新增大屏饼图组件

This commit is contained in:
aixianling
2024-03-22 18:34:38 +08:00
parent 10b43594ca
commit bffb6d14e0
24 changed files with 815 additions and 669 deletions

View File

@@ -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 => {