NEZ-1292 feat: chart-hexagon 六边形组件开发

This commit is contained in:
zhangyu
2021-12-28 18:09:44 +08:00
parent 805ec979c6
commit bb5f780d9e
12 changed files with 502 additions and 34 deletions

View File

@@ -586,6 +586,10 @@ export default {
id: 'stat',
name: this.$t('dashboard.panel.chartForm.typeVal.singleStat.label')
},
{
id: 'hexagon',
name: this.$t('dashboard.panel.chartForm.typeVal.hexagonFigure.label')
},
{
id: 'bar',
name: this.$t('dashboard.panel.chartForm.typeVal.bar.label')
@@ -650,8 +654,9 @@ export default {
chartTypeChange (type) {
switch (type) {
case 'stat':
case 'hexagon':
case 'guage':
if (this.oldType === 'stat' || this.oldType === 'guage') {
if (this.oldType === 'stat' || this.oldType === 'guage' || this.oldType === 'hexagon') {
break
}
this.chartConfig.param = {
@@ -666,7 +671,8 @@ export default {
legend: true,
valueMapping: false,
thresholds: false
}
},
datasource: [...this.chartConfig.param.datasource]
}
break
case 'bar':
@@ -688,7 +694,8 @@ export default {
legend: true,
valueMapping: false,
thresholds: false
}
},
datasource: [...this.chartConfig.param.datasource]
}
break
case 'table':
@@ -707,30 +714,11 @@ export default {
valueMapping: false,
thresholds: false
},
datasource: [{
name: 'System',
type: '',
systemGroup: '',
systemSelect: '',
group: '',
select: '',
limit: 100,
sort: 'desc'
}
]
datasource: [...this.chartConfig.param.datasource]
}
break
}
this.chartConfig.param.datasource[0].type = this.systemData[0].name
this.groupList = this.systemData[0].group
this.selectList = this.systemData[0].select
this.oldType = type
this.systemNameShow = [{
error: false,
hideInput: true,
show: true,
oldName: this.chartConfig.param.datasource[0].name
}]
this.change()
},
changeSystem (item) {