From 52ddc7079efbbf8abf688d589e10a8bbdbf1b592 Mon Sep 17 00:00:00 2001 From: zyh Date: Mon, 16 Oct 2023 18:00:44 +0800 Subject: [PATCH] =?UTF-8?q?=20NEZ-3235=20fix=EF=BC=9Anotebook=20=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=97=B6=E5=88=A0=E9=99=A4=20=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E5=A4=84=E7=90=86=E4=BA=A7=E7=94=9F=E7=9A=84=E4=B8=B4=E6=97=B6?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/chart/chartMixin.js | 1 - .../common/bottomBox/tabs/notebookTab.vue | 4 ++++ .../src/components/page/notebook/notebookList.vue | 13 +------------ 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/nezha-fronted/src/components/chart/chartMixin.js b/nezha-fronted/src/components/chart/chartMixin.js index 329f3c3d2..7386b6a5a 100644 --- a/nezha-fronted/src/components/chart/chartMixin.js +++ b/nezha-fronted/src/components/chart/chartMixin.js @@ -226,7 +226,6 @@ export default { if (chartInfo.elements) { if (chartInfo.elements[expressionIndex]) { alias = alias + this.handleLegendAlias(legend, chartInfo.elements[expressionIndex].legend, tagKeysArr) - console.log(alias, this.handleLegendAlias(legend, chartInfo.elements[expressionIndex].legend, tagKeysArr), legend, chartInfo.elements[expressionIndex].legend, tagKeysArr) } if (!alias) { alias = chartInfo.elements[expressionIndex].expression || '' diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/notebookTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/notebookTab.vue index e6c701e71..34c48a6d9 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/notebookTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/notebookTab.vue @@ -176,6 +176,10 @@ export default { let charts = this.$lodash.cloneDeep(this.$refs.notebookList.copyDataList) charts = charts.filter(item => item.name !== 'groupTemp') charts.forEach(item => { + delete item.x + delete item.y + delete item.modifiedName + delete item.oldElements if (item.type === 'text') { delete item.param.isEdit delete item.param.oldText diff --git a/nezha-fronted/src/components/page/notebook/notebookList.vue b/nezha-fronted/src/components/page/notebook/notebookList.vue index 548171b5d..2de237713 100644 --- a/nezha-fronted/src/components/page/notebook/notebookList.vue +++ b/nezha-fronted/src/components/page/notebook/notebookList.vue @@ -101,16 +101,6 @@ export default { this.$refs['chart' + item.id] && this.$refs['chart' + item.id][0] && this.$refs['chart' + item.id][0].getChartData(refreshData) }) }, - resizedEvent (i, newH, newW, newHPx, newWPx) { - // TODO 重新渲染图表,向后端发送put请求 - setTimeout(() => { - this.$refs['chart' + i][0].resize() - this.onScroll(this.scrollTop) - }, 100) - }, - movedEvent (i, newX, newY) { - this.onScroll(this.scrollTop) - }, onScroll (scrollTop = 0) { const self = this if (this.scrollTopTimer) { @@ -165,8 +155,7 @@ export default { const cloneDataList = this.$lodash.cloneDeep(n) const tempList = cloneDataList.map((item, index) => { return { - ...item, - i: item.id + ...item } }) this.$nextTick(() => {