From ff32ea7dc1fb910635e4bb679e20d3fe30f8a74d Mon Sep 17 00:00:00 2001 From: zhangyu Date: Wed, 2 Mar 2022 10:46:57 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=8E=A5=E5=8F=A3=20visual/panel/c?= =?UTF-8?q?hart/id=20=E7=9A=84=E8=BF=94=E5=9B=9E=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/charts/chart-list.vue | 2 +- .../src/components/common/bottomBox/tabs/panelTabNew.vue | 2 +- nezha-fronted/src/components/page/config/template/chartTemp.vue | 2 +- nezha-fronted/src/components/page/dashboard/panel.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue index a8063ae1e..9334695b5 100644 --- a/nezha-fronted/src/components/charts/chart-list.vue +++ b/nezha-fronted/src/components/charts/chart-list.vue @@ -849,7 +849,7 @@ export default { if (this.$refs['editChart' + chartItem.id] && this.$refs['editChart' + chartItem.id].length > 0) { if (filterType === 'refresh') { this.$get('visual/panel/chart/' + chartItem.id).then(res => { - const data = res.data.data + const data = res.data data.param = JSON.parse(data.param) this.$refs['editChart' + chartItem.id][0].setData(data, null, this.filter.panelId, null, '') diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue index f09da0cc6..b9a63543a 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue @@ -377,7 +377,7 @@ export default { this.$get('visual/panel/chart/' + data.id).then(res => { this.rightBox.loading = false if (res.code === 200) { - const chartData = res.data.data + const chartData = res.data this.chart = JSON.parse(JSON.stringify(chartData)) this.chart.panelId = this.showPanel.id this.chart.panelName = this.showPanel.name diff --git a/nezha-fronted/src/components/page/config/template/chartTemp.vue b/nezha-fronted/src/components/page/config/template/chartTemp.vue index 97f1fe328..8f80ede8f 100644 --- a/nezha-fronted/src/components/page/config/template/chartTemp.vue +++ b/nezha-fronted/src/components/page/config/template/chartTemp.vue @@ -234,7 +234,7 @@ export default { this.$get('visual/panel/chart/' + data.id).then(res => { this.rightBox.loading = false if (res.code === 200) { - const chartData = res.data.data + const chartData = res.data this.object = JSON.parse(JSON.stringify(chartData)) this.object.panelId = this.showPanel.id this.object.panelName = this.showPanel.name diff --git a/nezha-fronted/src/components/page/dashboard/panel.vue b/nezha-fronted/src/components/page/dashboard/panel.vue index 217503faa..c7c268377 100644 --- a/nezha-fronted/src/components/page/dashboard/panel.vue +++ b/nezha-fronted/src/components/page/dashboard/panel.vue @@ -438,7 +438,7 @@ export default { this.$get('visual/panel/chart/' + data.id).then(res => { this.rightBox.loading = false if (res.code === 200) { - const chartData = res.data.data + const chartData = res.data this.chart = JSON.parse(JSON.stringify(chartData)) this.chart.panelId = this.showPanel.id this.chart.panelName = this.showPanel.name