From ec24cf3d39bc7250783aca35d1910368755fe09f Mon Sep 17 00:00:00 2001 From: junjie Date: Wed, 2 Jun 2021 17:35:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(fix):=E5=89=8D=E7=AB=AF=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=EF=BC=8Cloading=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/dataset/dataset.js | 8 ++++---- .../src/views/dataset/common/DatasetGroupSelector.vue | 8 ++++---- frontend/src/views/dataset/common/DatasetTableData.vue | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/frontend/src/api/dataset/dataset.js b/frontend/src/api/dataset/dataset.js index 0dd77de2ba..1bf56d0bdd 100644 --- a/frontend/src/api/dataset/dataset.js +++ b/frontend/src/api/dataset/dataset.js @@ -85,10 +85,10 @@ export function getPreviewData(data) { }) } -export function fieldList(id) { +export function fieldList(id, showLoading = true) { return request({ url: '/dataset/field/list/' + id, - loading: true, + loading: showLoading, method: 'post' }) } @@ -102,11 +102,11 @@ export function batchEdit(data) { }) } -export function post(url, data) { +export function post(url, data, showLoading = true) { return request({ url: url, method: 'post', - loading: true, + loading: showLoading, data }) } diff --git a/frontend/src/views/dataset/common/DatasetGroupSelector.vue b/frontend/src/views/dataset/common/DatasetGroupSelector.vue index 2f3e06d6bc..c01814a56d 100644 --- a/frontend/src/views/dataset/common/DatasetGroupSelector.vue +++ b/frontend/src/views/dataset/common/DatasetGroupSelector.vue @@ -161,7 +161,7 @@ export default { }, 'table': function() { if (this.table && this.table.sceneId) { - post('dataset/group/getScene/' + this.table.sceneId, {}).then(response => { + post('dataset/group/getScene/' + this.table.sceneId, {}, false).then(response => { this.currGroup = response.data this.$nextTick(function() { @@ -213,7 +213,7 @@ export default { tree(group) { this.dsLoading = true - post('/dataset/group/tree', group).then(response => { + post('/dataset/group/tree', group, false).then(response => { this.data = response.data this.dsLoading = false }) @@ -227,7 +227,7 @@ export default { sort: 'type asc,create_time desc,name asc', sceneId: this.currGroup.id, mode: this.mode < 0 ? null : this.mode - }).then(response => { + }, false).then(response => { this.tables = response.data for (let i = 0; i < this.tables.length; i++) { if (this.tables[i].mode === 1 && this.kettleRunning === false) { @@ -278,7 +278,7 @@ export default { } // check mode=1的数据集是否创建doris表 if (data.mode === 1) { - post('/dataset/table/checkDorisTableIsExists/' + data.id, {}).then(response => { + post('/dataset/table/checkDorisTableIsExists/' + data.id, {}, false).then(response => { if (response.data) { this.$nextTick(function() { this.$emit('getTable', data) diff --git a/frontend/src/views/dataset/common/DatasetTableData.vue b/frontend/src/views/dataset/common/DatasetTableData.vue index 7aabcff676..e94c1ee1b0 100644 --- a/frontend/src/views/dataset/common/DatasetTableData.vue +++ b/frontend/src/views/dataset/common/DatasetTableData.vue @@ -67,7 +67,7 @@ export default { if (this.table.id) { this.dataLoading = true this.table.row = 100 - post('/dataset/table/getPreviewData/1/100', this.table).then(response => { + post('/dataset/table/getPreviewData/1/100', this.table, false).then(response => { this.fields = response.data.fields this.data = response.data.data const datas = this.data