From 622cddbf7f517fcf9343b1d640b046ab08760911 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 19 Jul 2024 09:44:39 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=A2=9E=E5=8A=A0=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=B8=82=E5=9C=BA=E5=88=86=E7=B1=BB=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=BA=94=E7=94=A8=E6=A8=A1=E6=9D=BF=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/dashboard/DbToolbar.vue | 2 + .../data-visualization/DvToolbar.vue | 2 + .../modules/data-visualization/snapshot.ts | 12 +++++ .../src/views/template-market/index.vue | 50 +++++++++++++++++-- .../api/template/dto/TemplateMarketDTO.java | 4 ++ 5 files changed, 66 insertions(+), 4 deletions(-) diff --git a/core/core-frontend/src/components/dashboard/DbToolbar.vue b/core/core-frontend/src/components/dashboard/DbToolbar.vue index 059639c726..264ce39973 100644 --- a/core/core-frontend/src/components/dashboard/DbToolbar.vue +++ b/core/core-frontend/src/components/dashboard/DbToolbar.vue @@ -193,6 +193,8 @@ const saveResource = () => { initCanvasData(dvInfo.value.id, 'dashboard', () => { useEmitt().emitter.emit('refresh-dataset-selector') resourceAppOpt.value.close() + dvMainStore.setAppDataInfo(null) + snapshotStore.resetSnapshot() }) } }) diff --git a/core/core-frontend/src/components/data-visualization/DvToolbar.vue b/core/core-frontend/src/components/data-visualization/DvToolbar.vue index 389b8ceeda..75eae70f68 100644 --- a/core/core-frontend/src/components/data-visualization/DvToolbar.vue +++ b/core/core-frontend/src/components/data-visualization/DvToolbar.vue @@ -137,6 +137,8 @@ const saveResource = () => { initCanvasData(dvInfo.value.id, 'dataV', () => { useEmitt().emitter.emit('refresh-dataset-selector') resourceAppOpt.value.close() + dvMainStore.setAppDataInfo(null) + snapshotStore.resetSnapshot() }) } }) diff --git a/core/core-frontend/src/store/modules/data-visualization/snapshot.ts b/core/core-frontend/src/store/modules/data-visualization/snapshot.ts index e4d9ec3cfa..ea9e798e46 100644 --- a/core/core-frontend/src/store/modules/data-visualization/snapshot.ts +++ b/core/core-frontend/src/store/modules/data-visualization/snapshot.ts @@ -138,6 +138,18 @@ export const snapshotStore = defineStore('snapshot', { resetStyleChangeTimes() { this.styleChangeTimes = 0 }, + resetSnapshot() { + this.styleChangeTimes = -1 + this.cacheStyleChangeTimes = 0 + this.snapshotCacheTimes = 0 + this.cacheViewIdInfo = { + snapshotCacheViewCalc: [], + snapshotCacheViewRender: [] + } + this.snapshotData = [] + this.snapshotIndex = -1 + this.recordSnapshot() + }, recordSnapshot() { this.styleChangeTimes = ++this.styleChangeTimes diff --git a/core/core-frontend/src/views/template-market/index.vue b/core/core-frontend/src/views/template-market/index.vue index d3527f2a99..10767ca7f9 100644 --- a/core/core-frontend/src/views/template-market/index.vue +++ b/core/core-frontend/src/views/template-market/index.vue @@ -81,6 +81,14 @@ :value="item.value" /> + + +