先占个坑

This commit is contained in:
aixianling
2024-01-29 10:32:11 +08:00
parent f82d7f58e7
commit 776539a32b
5 changed files with 62 additions and 34 deletions

View File

@@ -55,6 +55,7 @@
<div v-if="data.showPingchangMapLegend" class="pingchangMapLegend"/> <div v-if="data.showPingchangMapLegend" class="pingchangMapLegend"/>
</ai-map> </ai-map>
<ai-monitor :src="data.src" v-else-if="currentType === 'monitor'" :type="data.monitorType"/> <ai-monitor :src="data.src" v-else-if="currentType === 'monitor'" :type="data.monitorType"/>
<ai-monitor-carousel :list="data.list" v-else-if="currentType === 'monitorCarousel'"/>
<video style="width: 100%; height: 100%; object-fit: fill;" loop :src="data.src" autoplay <video style="width: 100%; height: 100%; object-fit: fill;" loop :src="data.src" autoplay
v-else-if="currentType === 'video'"/> v-else-if="currentType === 'video'"/>
<AiDvPartyOrg style="width: 100%; height: 100%;" v-else-if="currentType === 'partyOrg'" :instance="instance"/> <AiDvPartyOrg style="width: 100%; height: 100%;" v-else-if="currentType === 'partyOrg'" :instance="instance"/>
@@ -77,6 +78,7 @@ import AiDvPanel from "./layout/AiDvPanel/AiDvPanel";
import AiDvSummary from "./layout/AiDvSummary/AiDvSummary"; import AiDvSummary from "./layout/AiDvSummary/AiDvSummary";
import AiDvPlot from "./layout/AiDvPlot/AiDvPlot.vue"; import AiDvPlot from "./layout/AiDvPlot/AiDvPlot.vue";
import AiAssist from "./AiAssist.vue"; import AiAssist from "./AiAssist.vue";
import AiMonitorCarousel from "./AiMonitorCarousel.vue";
Vue.use(scrollBoard) Vue.use(scrollBoard)
@@ -84,6 +86,7 @@ export default {
name: 'AiDvRender', name: 'AiDvRender',
props: ['data', 'index', 'theme', 'instance'], props: ['data', 'index', 'theme', 'instance'],
components: { components: {
AiMonitorCarousel,
AiAssist, AiAssist,
AiDvPlot, AiDvPlot,
// AiSprite, // AiSprite,

View File

@@ -0,0 +1,20 @@
<script>
export default {
name: "AiMonitorCarousel",
props: {
list: {default: () => []}
}
}
</script>
<template>
<section class="AiMonitorCarousel">
<el-carousel height="100%" indicator-position="none" arrow="hover">
</el-carousel>
</section>
</template>
<style scoped lang="scss">
</style>

View File

@@ -223,7 +223,7 @@
<el-input size="mini" clearable placeholder="请输入弹窗标题" v-model="config.dialogTitle"/> <el-input size="mini" clearable placeholder="请输入弹窗标题" v-model="config.dialogTitle"/>
</config-item> </config-item>
<config-item label="内容" v-if="!['table','AiDvTable'].includes(config.type)"> <config-item label="内容" v-if="!['table','AiDvTable'].includes(config.type)">
<ai-dialog-btn dialog-title="弹窗内容" text="打开编辑器"> <ai-dialog-btn dialog-title="弹窗内容" text="打开编辑器" :modal="false">
<ai-editor clearable placeholder="请输入弹窗内容" v-model="config.dialogContent" :instance="instance"/> <ai-editor clearable placeholder="请输入弹窗内容" v-model="config.dialogContent" :instance="instance"/>
</ai-dialog-btn> </ai-dialog-btn>
</config-item> </config-item>

View File

@@ -75,18 +75,20 @@ export default {
}, },
initStaticDataProps() { initStaticDataProps() {
const columnProp = "name" const columnProp = "name"
this.options.staticData.map((row, i) => { if (Array.isArray(this.options.staticData)) {
const prop = `c${i || ""}` this.options.staticData.map((row, i) => {
this.colConfigs.push({label: row[columnProp], prop}) const prop = `c${i || ""}`
Object.entries(row).map(([k, v]) => { this.colConfigs.push({label: row[columnProp], prop})
if (/^v/.test(k)) { Object.entries(row).map(([k, v]) => {
const item = this.tableData[k.substring(1) || 0] || {} if (/^v/.test(k)) {
item[prop] = v const item = this.tableData[k.substring(1) || 0] || {}
this.tableData[k.substring(1) || 0] = item item[prop] = v
} this.tableData[k.substring(1) || 0] = item
}
})
}) })
}) this.tableData = this.tableData.map(e => ({...e, $cellEdit: false}))
this.tableData = this.tableData.map(e => ({...e, $cellEdit: false})) }
} }
}, },
created() { created() {

View File

@@ -517,7 +517,7 @@ const components = [{
] ]
}, },
{ {
type: 'other', label: '其他', list: [{ label: '其他', list: [{
label: '地图', type: 'map', list: [{ label: '地图', type: 'map', list: [{
type: 'map', type: 'map',
label: '地图', label: '地图',
@@ -621,7 +621,7 @@ const components = [{
}] }]
}] }]
}, { }, {
label: '轮播图', type: 'swiper', list: [{ label: '轮播图', list: [{
type: 'swiper', type: 'swiper',
label: '轮播图', label: '轮播图',
width: 400, width: 400,
@@ -692,26 +692,29 @@ const components = [{
thumb: 'https://cdn.cunwuyun.cn/dvcp/dv/tpl/total.png' thumb: 'https://cdn.cunwuyun.cn/dvcp/dv/tpl/total.png'
}] }]
}, { }, {
label: '视频监控', type: 'monitor', list: [{ label: '视频监控', list: [
type: 'monitor', {
label: '视频监控', type: 'monitor',
src: '', label: '视频监控',
width: 480, src: '',
height: 240, width: 480,
zIndex: 1, height: 240,
top: 0, zIndex: 1,
left: 0, top: 0,
title: '', left: 0,
moniterId: '', title: '',
monitorType: 'cmcc', moniterId: '',
api: '/app/appzyvideoequipment/list2', monitorType: 'cmcc',
border: 'border2', api: '/app/appzyvideoequipment/list2',
sourceDataId: '', border: 'border2',
dataType: 'staticData', sourceDataId: '',
staticData: '', dataType: 'staticData',
dynamicData: '', staticData: '',
thumb: 'https://cdn.cunwuyun.cn/dvcp/dv/tpl/video.png' dynamicData: '',
}] thumb: 'https://cdn.cunwuyun.cn/dvcp/dv/tpl/video.png'
},
{type: "monitorCarousel", label: "视频轮播", width: 480, height: 480, zIndex: 1, title: "视频轮播", thumb: "https://cdn.cunwuyun.cn/dvcp/dv/tpl/video.png"}
]
}, customHtml] }, customHtml]
}] }]