新增大屏饼图组件
This commit is contained in:
@@ -17,7 +17,10 @@
|
||||
<div class="layout-left" :class="{hide:leftHide}">
|
||||
<h2 class="flex">
|
||||
<div class="fill">全部资产</div>
|
||||
<el-button class="leftHideBtn" type="text" @click="leftHide=!leftHide">{{ leftHide ? "展开" : "收起" }}</el-button>
|
||||
<el-button class="leftHideBtn" type="text" @click="leftHide=!leftHide">{{
|
||||
leftHide ? "展开" : "收起"
|
||||
}}
|
||||
</el-button>
|
||||
</h2>
|
||||
<div class="layout-left__wrapper">
|
||||
<div class="layout-left__left">
|
||||
@@ -306,6 +309,13 @@ export default {
|
||||
}
|
||||
|
||||
return []
|
||||
},
|
||||
comps: v => {
|
||||
const obj = {}
|
||||
v.components.map(e => e.list.map(c => c.list.map(com => {
|
||||
obj[com.type] = com
|
||||
})))
|
||||
return obj
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -378,7 +388,7 @@ export default {
|
||||
id && this.instance.post(`/app/appdiylargescreen/queryLargeScreenDetailById?id=${id}`).then(res => {
|
||||
if (res?.data) {
|
||||
const data = JSON.parse(res.data.config)
|
||||
this.componentList = data.config.filter(Boolean)
|
||||
this.componentList = data.config.filter(Boolean).map(e => ({...this.comps[e.type], ...e}))
|
||||
this.dashboard = data.dashboard
|
||||
this.images = data.images || []
|
||||
}
|
||||
@@ -408,7 +418,7 @@ export default {
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success('保存成功')
|
||||
this.back(res.data)
|
||||
this.getInfo(this.$route.query.did)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user