Merge pull request #12000 from dataease/pr@dev-v2@fix_copy

fix(图表): 修复复用时部分图表不显示问题
This commit is contained in:
王嘉豪 2024-09-04 15:15:26 +08:00 committed by GitHub
commit 1bfd6c6abe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 14 deletions

View File

@ -1230,6 +1230,7 @@ export const dvMainStore = defineStore('dataVisualization', {
setViewDataDetails(viewId, chartDataInfo) {
this.canvasViewDataInfo[viewId] = chartDataInfo.data
const viewInfo = this.canvasViewInfo[viewId]
if (viewInfo) {
const oldCalParams = viewInfo.calParams
? viewInfo.calParams.reduce((map, params) => {
map[params.id] = params.value
@ -1244,6 +1245,7 @@ export const dvMainStore = defineStore('dataVisualization', {
})
}
this.canvasViewInfo[viewId]['calParams'] = chartDataInfo.calParams || null
}
},
getViewDataDetails(viewId) {
return this.canvasViewDataInfo[viewId]

View File

@ -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')