党建大屏

This commit is contained in:
yanran200730
2022-05-05 18:00:11 +08:00
parent 6f14126a2e
commit a0c2bf8f67
8 changed files with 102 additions and 7 deletions

View File

@@ -64,6 +64,11 @@
@close="isShowLayout = false">
</Layout>
<ai-dv-wrapper :views="[{label: '返回'}]" @change="screenId = false" v-if="screenId" :title="form.name">
<AiDvBackground
:theme="config.theme"
v-if="config.length || config.theme === '1'"
:src="config.theme === '1' ? 'https://cdn.cunwuyun.cn/dvcp/dv/img/dj-bg.png' : config.backgroundImage[0].url">
</AiDvBackground>
<AppGigscreenViewer :urlPrefix="urlPrefix" :instance="instance" :dict="dict" :id="screenId"></AppGigscreenViewer>
</ai-dv-wrapper>
<ai-dialog :visible.sync="dialog" title="定制大屏" @closed="custom={}" @onConfirm="handleCustomizedDV">
@@ -137,6 +142,9 @@ export default {
rules: {
dv: [{required: true, message: "请选择 定制大屏"}],
title: [{required: true, message: "请输入 大屏标题"}],
},
config: {
backgroundImage: []
}
}
},
@@ -193,6 +201,11 @@ export default {
},
toViewer(id) {
this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryLargeScreenDetailById?id=${id}`).then(res => {
if (res.data) {
this.config = JSON.parse(res.data.config).dashboard
}
})
this.screenId = id
},

View File

@@ -64,8 +64,8 @@
<div style="width: 100%; height: 100%">
<AiDvBackground
:theme="dashboard.theme"
v-if="dashboard.backgroundImage.length"
:src="dashboard.backgroundImage[0].url">
v-if="dashboard.backgroundImage.length || dashboard.theme === '1'"
:src="dashboard.theme === '1' ? 'https://cdn.cunwuyun.cn/dvcp/dv/img/dj-bg.png' : dashboard.backgroundImage[0].url">
</AiDvBackground>
<vue-draggable-resizable
:w="item.width"
@@ -404,7 +404,7 @@
}],
images: [],
summaryList: ['summary0', 'summary1', 'summary2', 'summary3', 'summary4', 'summary5', 'summary7', 'summary9', 'summary10'],
borderList: ['border0', 'border1', 'border2', 'border3', 'border4']
borderList: ['border0', 'border1', 'border2', 'border3', 'border4', 'border5']
}
},
@@ -608,7 +608,7 @@
this.$set(this.componentList[index], 'height', h)
if (type.indexOf('Chart') > -1) {
this.$refs[`chart${index}`][0].watchResize()
// this.$refs[`chart${index}`][0].watchResize()
}
},

View File

@@ -14,7 +14,7 @@
}"
v-for="(item, index) in componentList"
:key="index">
<RenderElement :data="item" :index="index"></RenderElement>
<RenderElement :data="item" :index="index" :theme="dashboard.theme"></RenderElement>
</div>
</div>
<components v-else :is="component" :dict="dict" :instance="instance" :nav="meta"/>
@@ -56,6 +56,7 @@ export default {
width: 1920,
height: 1080,
backgroundColor: '',
theme: '0',
backgroundImage: []
},
componentList: [],