From 469589516b60189b7158a6ef3131ad0681ed5b04 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 7 Mar 2024 16:26:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6=E5=8F=AA=E8=BF=87?= =?UTF-8?q?=E6=BB=A4tab=E7=BB=84=E4=BB=B6=E7=AC=AC=E4=B8=80=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/custom-component/v-query/Component.vue | 4 ++-- .../src/store/modules/data-visualization/dvMain.ts | 4 ++++ core/core-frontend/src/views/chart/components/views/index.vue | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/custom-component/v-query/Component.vue b/core/core-frontend/src/custom-component/v-query/Component.vue index 459a17b4c5..f1d94e7a7b 100644 --- a/core/core-frontend/src/custom-component/v-query/Component.vue +++ b/core/core-frontend/src/custom-component/v-query/Component.vue @@ -53,7 +53,7 @@ const props = defineProps({ const { element, view, scale } = toRefs(props) const { t } = useI18n() const dvMainStore = dvMainStoreWithOut() -const { curComponent, canvasViewInfo, mobileInPc } = storeToRefs(dvMainStore) +const { curComponent, canvasViewInfo, mobileInPc, firstLoadMap } = storeToRefs(dvMainStore) const canEdit = ref(false) const queryConfig = ref() const defaultStyle = { @@ -299,7 +299,7 @@ const queryData = () => { return } if (!emitterList.length) return - + dvMainStore.setFirstLoadMap([...new Set([...emitterList, ...firstLoadMap.value])]) emitterList.forEach(ele => { emitter.emit(`query-data-${ele}`) }) 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 9294ddfeac..401f9a4c1c 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -30,6 +30,7 @@ export const dvMainStore = defineStore('dataVisualization', { }, editMode: 'edit', // 编辑器模式 edit preview mobileInPc: false, + firstLoadMap: [], canvasStyleData: { ...deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK), backgroundColor: null }, // 当前展示画布缓存数据 componentDataCache: null, @@ -170,6 +171,9 @@ export const dvMainStore = defineStore('dataVisualization', { setPublicLinkStatus(value) { this.publicLinkStatus = value }, + setFirstLoadMap(value) { + this.firstLoadMap = value + }, setDataPrepareState(value) { this.dataPrepareState = value }, diff --git a/core/core-frontend/src/views/chart/components/views/index.vue b/core/core-frontend/src/views/chart/components/views/index.vue index b815568c9a..724a6b67b4 100644 --- a/core/core-frontend/src/views/chart/components/views/index.vue +++ b/core/core-frontend/src/views/chart/components/views/index.vue @@ -383,7 +383,8 @@ const queryData = (firstLoad = false) => { if (loading.value) { return } - const queryFilter = filter(firstLoad) + const searched = dvMainStore.firstLoadMap.includes(element.value.id) + const queryFilter = filter(searched ? false : firstLoad) let params = cloneDeep(view.value) params['chartExtRequest'] = queryFilter chartExtRequest.value = queryFilter