From 5a77c272c8d0b6ebf913d7f05b8cfe20db2a3bc5 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 12 Aug 2024 15:18:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E8=AE=A1=E7=AE=97=E5=AD=97=E6=AE=B5=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E8=AE=BE=E7=BD=AE=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/modules/data-visualization/dvMain.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts index 12201c30eb..cee3eba06e 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -1192,9 +1192,20 @@ export const dvMainStore = defineStore('dataVisualization', { setViewDataDetails(viewId, chartDataInfo) { this.canvasViewDataInfo[viewId] = chartDataInfo.data const viewInfo = this.canvasViewInfo[viewId] - if (viewInfo.tableId !== chartDataInfo.tableId) { - this.canvasViewInfo[viewId]['calcParams'] = chartDataInfo.calcParams || null + const oldCalParams = viewInfo.calParams + ? viewInfo.calParams.reduce((map, params) => { + map[params.id] = params.value + return map + }, {}) + : {} + if (chartDataInfo.calParams) { + chartDataInfo.calParams.forEach(paramsItem => { + if (oldCalParams[paramsItem.id]) { + paramsItem.value = oldCalParams[paramsItem.id] + } + }) } + this.canvasViewInfo[viewId]['calParams'] = chartDataInfo.calParams || null }, getViewDataDetails(viewId) { return this.canvasViewDataInfo[viewId]