From 35a17e35c4bd72bde09aa6b09a1556efabfa3aec Mon Sep 17 00:00:00 2001 From: zyh Date: Fri, 17 Feb 2023 11:23:41 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8Ddashboard?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=20=E7=BC=96=E8=BE=91=E5=9B=BE=E8=A1=A8Right?= =?UTF-8?q?=20Y=20Axis=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/bottomBox/tabs/panelTabNew.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue index 8844eb012..39e447d36 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue @@ -439,7 +439,21 @@ export default { this.chart = JSON.parse(JSON.stringify(chartData)) this.chart.panelId = this.showPanel.id this.chart.panelName = this.showPanel.name - this.chart.param = JSON.parse(this.chart.param) + if (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) { this.chart.groupId = '' }