From 49042f83fd6759a823c5377f810c47b1b68b713d Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 10 Mar 2022 15:27:01 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=20chartTemp=20?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/chart/chartList.vue | 2 +- .../src/components/common/bottomBox/tabs/panelTabNew.vue | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/chart/chartList.vue b/nezha-fronted/src/components/chart/chartList.vue index db038a7f5..906759e83 100644 --- a/nezha-fronted/src/components/chart/chartList.vue +++ b/nezha-fronted/src/components/chart/chartList.vue @@ -297,7 +297,7 @@ export default { } this.scrollTopTimer = setTimeout(() => { this.copyDataList.forEach(item => { - if (!this.$refs['grid-item' + item.id][0]) { + if (!this.$refs['grid-item' + item.id] || !this.$refs['grid-item' + item.id][0]) { return; } const dom = this.$refs['grid-item' + item.id][0].$el diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue index c772ba6e0..da97c5da6 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue @@ -686,7 +686,13 @@ export default { }, chartBySync () { this.panelTabLoading = true - this.$post('visual/panel/chart/syncTmpl', { panelId: this.showPanel.id }).then(res => { + const params = {} + if (this.from === 'chartTemp') { + params.pid = this.obj.id + } else { + params.panelId = this.showPanel.id + } + this.$post('visual/panel/chart/syncTmpl', params).then(res => { this.panelTabLoading = false if (res.code === 200) { this.getTableData(this.obj.id)