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 d9b9a195c2..d1ef18a1b9 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -1230,20 +1230,22 @@ export const dvMainStore = defineStore('dataVisualization', { setViewDataDetails(viewId, chartDataInfo) { this.canvasViewDataInfo[viewId] = chartDataInfo.data const viewInfo = this.canvasViewInfo[viewId] - 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] - } - }) + if (viewInfo) { + 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 } - this.canvasViewInfo[viewId]['calParams'] = chartDataInfo.calParams || null }, getViewDataDetails(viewId) { return this.canvasViewDataInfo[viewId] diff --git a/core/core-frontend/src/views/template/component/DeTemplateImport.vue b/core/core-frontend/src/views/template/component/DeTemplateImport.vue index 8d0ffa5534..29fbbb9040 100644 --- a/core/core-frontend/src/views/template/component/DeTemplateImport.vue +++ b/core/core-frontend/src/views/template/component/DeTemplateImport.vue @@ -246,7 +246,6 @@ const importTemplate = () => { ElMessage.warning('当前名称已在模版管理中存在,请修改') } else { save(state.templateInfo).then(rsp => { - console.log('====' + JSON.stringify(rsp)) ElMessage.success(t('导入成功')) emits('refresh', getRefreshPInfo()) emits('closeEditTemplateDialog')