From 4c5349ad83cb72fac993e93338bec182adb02a1d Mon Sep 17 00:00:00 2001 From: zyh Date: Mon, 15 Apr 2024 11:39:18 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-3438=20fix:=20Notebook=20=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=20=E8=A1=A8=E8=BE=BE=E5=BC=8F=20=E5=9B=9E?= =?UTF-8?q?=E6=98=BE=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/bottomBox/tabs/notebookTab.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/notebookTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/notebookTab.vue index 068ae42a6..d6b6ba416 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/notebookTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/notebookTab.vue @@ -173,6 +173,9 @@ export default { let charts = this.$lodash.cloneDeep(this.$refs.notebookList.copyDataList) charts = charts.filter(item => item.name !== 'groupTemp') charts.forEach(item => { + item.elements.forEach((subItem, subIndex) => { + subItem.expression = item.oldElements[subIndex].expression + }) delete item.x delete item.y delete item.modifiedName @@ -247,7 +250,8 @@ export default { this.chart.position = { position: 'after', id: data.id } this.chart.panelName = this.showPanel.name this.chart.id = '' - this.chart.elements.forEach((item) => { + this.chart.elements.forEach((item, index) => { + item.expression = this.chart.oldElements[index].expression item.id = '' item.chartId = '' delete item.seq @@ -261,6 +265,9 @@ export default { } else { this.chart = JSON.parse(JSON.stringify(data)) this.chart.panelName = this.showPanel.name + this.chart.elements.forEach((item, index) => { + item.expression = this.chart.oldElements[index].expression + }) this.$nextTick(() => { this.$refs.addChartModal.isStable = 'stable' })