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]