From 48dabe68c1e1f06c44201c724e60924445168c29 Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:48:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/customComponent/UserView.vue | 5 +++++ frontend/src/components/widget/deWidget/DeTabs.vue | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/canvas/customComponent/UserView.vue b/frontend/src/components/canvas/customComponent/UserView.vue index 86dfaba760..f42553a851 100644 --- a/frontend/src/components/canvas/customComponent/UserView.vue +++ b/frontend/src/components/canvas/customComponent/UserView.vue @@ -322,6 +322,7 @@ export default { curFields: [], isFirstLoad: true, // 是否是第一次加载 refId: null, + getDataLoading: false, chart: BASE_CHART_STRING, requestStatus: 'success', message: null, @@ -491,6 +492,7 @@ export default { handler: function(val1, val2) { if (isChange(val1, val2) && !this.isFirstLoad) { this.getData(this.element.propValue.viewId) + this.getDataLoading = true } }, deep: true @@ -747,6 +749,7 @@ export default { }, getData(id, cache = true, dataBroadcast = false) { if (id) { + if (this.getDataLoading) return this.requestStatus = 'waiting' this.message = null @@ -845,6 +848,8 @@ export default { } this.isFirstLoad = false return true + }).finally(() => { + this.getDataLoading = false }) } }, diff --git a/frontend/src/components/widget/deWidget/DeTabs.vue b/frontend/src/components/widget/deWidget/DeTabs.vue index 3ef69c5547..2818d54a5b 100644 --- a/frontend/src/components/widget/deWidget/DeTabs.vue +++ b/frontend/src/components/widget/deWidget/DeTabs.vue @@ -423,7 +423,7 @@ export default { try { const targetRef = _this.$refs['canvasTabRef-' + _this.activeTabName] if (targetRef) { - targetRef[0].restore() + targetRef[0]?.restore() } _this.$refs[this.activeTabName][0].resizeChart() } catch (e) { @@ -528,7 +528,7 @@ export default { _this.activeTabName = _this.element.options.tabList[nowIndex].name const targetRef = _this.$refs['canvasTabRef-' + _this.activeTabName] if (targetRef) { - targetRef[0].restore() + targetRef[0]?.restore() } }); }, switchTime) From 431f8a643dc647a15eef562c6326812d2fcbf461 Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Thu, 13 Apr 2023 22:55:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E6=95=B0=E6=8D=AE=E9=9B=86=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E8=BF=87=E5=BF=AB=E9=87=8D=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/dataset/add/AddApi.vue | 1 + frontend/src/views/dataset/add/AddDB.vue | 1 + frontend/src/views/dataset/add/AddExcel.vue | 1 + frontend/src/views/dataset/add/AddSQL.vue | 1 + frontend/src/views/dataset/add/AddUnion.vue | 1 + 5 files changed, 5 insertions(+) diff --git a/frontend/src/views/dataset/add/AddApi.vue b/frontend/src/views/dataset/add/AddApi.vue index 8001c55ee1..0b90528090 100644 --- a/frontend/src/views/dataset/add/AddApi.vue +++ b/frontend/src/views/dataset/add/AddApi.vue @@ -420,6 +420,7 @@ export default { this.openMessageSuccess('deDataset.cannot_be_duplicate', 'error') return } + if (this.loading) return this.loading = true const sceneId = this.param.id const dataSourceId = this.dataSource diff --git a/frontend/src/views/dataset/add/AddDB.vue b/frontend/src/views/dataset/add/AddDB.vue index f613e85486..d7ef3e36e3 100644 --- a/frontend/src/views/dataset/add/AddDB.vue +++ b/frontend/src/views/dataset/add/AddDB.vue @@ -439,6 +439,7 @@ export default { this.openMessageSuccess('deDataset.cannot_be_duplicate', 'error') return } + if (this.loading) return this.loading = true const sceneId = this.param.id const dataSourceId = this.dataSource diff --git a/frontend/src/views/dataset/add/AddExcel.vue b/frontend/src/views/dataset/add/AddExcel.vue index 1a2a50abbe..66aee823ff 100644 --- a/frontend/src/views/dataset/add/AddExcel.vue +++ b/frontend/src/views/dataset/add/AddExcel.vue @@ -591,6 +591,7 @@ export default { } this.handlerConfirm(options) } else { + if (this.loading) return this.loading = true post('/dataset/table/update', table) .then((response) => { diff --git a/frontend/src/views/dataset/add/AddSQL.vue b/frontend/src/views/dataset/add/AddSQL.vue index 7ec5d98da2..c720195192 100644 --- a/frontend/src/views/dataset/add/AddSQL.vue +++ b/frontend/src/views/dataset/add/AddSQL.vue @@ -1011,6 +1011,7 @@ export default { return } this.parseVariable() + if (this.loading) return this.loading = true const table = { id: this.param.tableId, diff --git a/frontend/src/views/dataset/add/AddUnion.vue b/frontend/src/views/dataset/add/AddUnion.vue index 1e59168035..71aa9bfe81 100644 --- a/frontend/src/views/dataset/add/AddUnion.vue +++ b/frontend/src/views/dataset/add/AddUnion.vue @@ -261,6 +261,7 @@ export default { this.openMessageSuccess('dataset.char_can_not_more_50', 'error') return } + if (this.loading) return this.loading = true const table = { id: this.param.tableId,