新增大屏饼图组件
This commit is contained in:
@@ -383,7 +383,21 @@ export const chartTpl = [{
|
||||
config: 'pieChart3',
|
||||
sourceDataId: '',
|
||||
dynamicData: []
|
||||
}]
|
||||
}, {
|
||||
type: 'summary',
|
||||
label: '进度饼图',
|
||||
title: '进度饼图',
|
||||
border: 'border15',
|
||||
display: 'processPie',
|
||||
width: 500,
|
||||
height: 300,
|
||||
zIndex: 1,
|
||||
top: 0,
|
||||
left: 0,
|
||||
thumb: 'https://cdn.cunwuyun.cn/dvcp/dv/tpl/processPieChart.png',
|
||||
dataType: 'staticData',
|
||||
staticData: {name: '综合调处率', label: "累计调解成功", v1: 23, totalLabel: "累计排查受理", total: 33},
|
||||
},]
|
||||
}]
|
||||
|
||||
const customHtml = {
|
||||
@@ -767,9 +781,9 @@ export class DvCompData {
|
||||
|
||||
getData() {
|
||||
return this.type == 'staticData' ? this.getStaticData() :
|
||||
this.type == 'htmlData' ? this.getStaticData() :
|
||||
this.type == 'dynamicData' ? this.getDynamicData() :
|
||||
this.type == 'apiData' ? this.getApiData() : []
|
||||
this.type == 'htmlData' ? this.getStaticData() :
|
||||
this.type == 'dynamicData' ? this.getDynamicData() :
|
||||
this.type == 'apiData' ? this.getApiData() : []
|
||||
}
|
||||
|
||||
getDynamicData() {
|
||||
@@ -793,8 +807,8 @@ export class DvCompData {
|
||||
return this.instance.post(api).then(res => {
|
||||
if (res?.data) {
|
||||
const list = res.data,
|
||||
firstRecord = list?.[0] || {},
|
||||
keys = Object.keys(firstRecord)
|
||||
firstRecord = list?.[0] || {},
|
||||
keys = Object.keys(firstRecord)
|
||||
let meta = []
|
||||
if (['AiDvTable', 'table'].includes(this.params.type)) {
|
||||
meta = keys.map(v => {
|
||||
|
||||
@@ -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