fix:修复dashboard模板 编辑图表Right Y Axis报错

This commit is contained in:
zyh
2023-02-17 11:23:41 +08:00
parent 7dde3258b8
commit 35a17e35c4

View File

@@ -439,7 +439,21 @@ export default {
this.chart = JSON.parse(JSON.stringify(chartData)) this.chart = JSON.parse(JSON.stringify(chartData))
this.chart.panelId = this.showPanel.id this.chart.panelId = this.showPanel.id
this.chart.panelName = this.showPanel.name this.chart.panelName = this.showPanel.name
if (this.chart.param) {
this.chart.param = JSON.parse(this.chart.param) this.chart.param = JSON.parse(this.chart.param)
} else {
this.chart.param = {}
}
if (!this.chart.param.rightYAxis) {
this.chart.param.rightYAxis = {
elementNames: [],
style: 'line',
unit: 2,
label: '',
min: undefined,
max: undefined
}
}
if (!this.chart.groupId || this.chart.groupId == -1) { if (!this.chart.groupId || this.chart.groupId == -1) {
this.chart.groupId = '' this.chart.groupId = ''
} }