From 363a31dcfc44076c839f294fde9900a773b320be Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 20 Dec 2023 18:27:45 +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=E7=94=BB=E5=B8=83=E4=B8=AD=E5=AD=98=E5=9C=A8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=8C=89=E9=92=AE=E6=97=B6=EF=BC=8C=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E8=81=94=E5=8A=A8=E5=88=9D=E6=AC=A1=E6=9F=A5=E8=AF=A2=E6=97=B6?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=B8=A6=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20#7061?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/customComponent/UserView.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/core/frontend/src/components/canvas/customComponent/UserView.vue b/core/frontend/src/components/canvas/customComponent/UserView.vue index 860fb9d68d..f556741480 100644 --- a/core/frontend/src/components/canvas/customComponent/UserView.vue +++ b/core/frontend/src/components/canvas/customComponent/UserView.vue @@ -367,7 +367,9 @@ export default { show: 0 }, view: {}, - cancelTime: null + cancelTime: null, + // 外部查询按钮是否已经触发 用来检查画布中如果存在查询按钮 是否被首次点击过 默认true + searchButtonReady: true } }, @@ -422,7 +424,7 @@ export default { }, filter() { const filter = {} - filter.filter = this.initLoad && this.cfilters?.length === 0 ? this.filters : this.cfilters + filter.filter = (this.initLoad && this.cfilters?.length === 0) || !this.searchButtonReady ? this.filters : this.cfilters filter.linkageFilters = this.element.linkageFilters filter.outerParamsFilters = this.element.outerParamsFilters filter.drill = this.drillClickDimensionList @@ -585,7 +587,13 @@ export default { }, mounted() { bus.$on('tab-canvas-change', this.tabSwitch) + bus.$on('trigger-search-button', this.triggerSearchButton) this.bindPluginEvent() + this.$nextTick(() => { + if (this.filters && this.filters.length > 0) { + this.searchButtonReady = false + } + }) }, beforeDestroy() { @@ -624,6 +632,9 @@ export default { } }, methods: { + triggerSearchButton() { + this.searchButtonReady = true + }, groupFilter(filters) { const result = { ready: [],