fix:修改chart group切换时分组显示的不对的问题

This commit is contained in:
zhangyu
2021-04-09 17:04:30 +08:00
parent 57b8d2d4a8
commit 47c8119eaa
5 changed files with 2161 additions and 2125 deletions

View File

@@ -627,6 +627,17 @@ export default {
selectPanel (panel) {
this.panelName = panel.name
this.panelId = panel.id
this.editChart.groupId = ''
this.$get('visual/panel/chart?panelId=' + this.panelId).then(response => {
if (response.code === 200) {
this.groupArr = []
response.data.list.forEach((item, index) => {
if (item.type === 'group') {
this.groupArr.push({ id: item.id, name: item.name })
}
})
}
})
},
toAddPanel () {
this.$refs.panelBox2.show(true)
@@ -1261,6 +1272,7 @@ export default {
this.editChart.param.threshold = data.param.threshold
this.editChart.param.statistics = this.statistics = data.param.statistics
if (this.editChart.type === 'bar') {
this.statisticsList = JSON.parse(JSON.stringify(this.$CONSTANTS.statisticsList))
this.statisticsList.push({ value: 'null', label: i18n.t('dashboard.panel.chartForm.statisticsVal.null') })
}
} else {