From 6f0d7721fb248e937934637827f9cd382a839157 Mon Sep 17 00:00:00 2001 From: junjie Date: Fri, 30 Jul 2021 18:08:59 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=A7=86=E5=9B=BEtree=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=86=E7=BB=84=E9=BB=98=E8=AE=A4=E5=B1=95=E5=BC=80?= =?UTF-8?q?=EF=BC=9B=E6=95=B0=E6=8D=AE=E9=9B=86=E6=95=B0=E6=8D=AE=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E6=8E=A5=E5=8F=A3=E8=AF=B7=E6=B1=82=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=BB=B6=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/dataset/dataset.js | 3 ++- frontend/src/views/chart/group/Group.vue | 3 ++- frontend/src/views/dataset/common/DatasetTableData.vue | 2 +- frontend/src/views/dataset/data/ViewTable.vue | 2 +- frontend/src/views/dataset/group/Group.vue | 8 ++++---- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/frontend/src/api/dataset/dataset.js b/frontend/src/api/dataset/dataset.js index d011d924c0..fbd92257e3 100644 --- a/frontend/src/api/dataset/dataset.js +++ b/frontend/src/api/dataset/dataset.js @@ -103,11 +103,12 @@ export function batchEdit(data) { }) } -export function post(url, data, showLoading = true) { +export function post(url, data, showLoading = true, timeout = 10000) { return request({ url: url, method: 'post', loading: showLoading, + timeout: timeout, data }) } diff --git a/frontend/src/views/chart/group/Group.vue b/frontend/src/views/chart/group/Group.vue index 8389c3f6ae..714493751b 100644 --- a/frontend/src/views/chart/group/Group.vue +++ b/frontend/src/views/chart/group/Group.vue @@ -535,7 +535,8 @@ export default { type: 'success', showClose: true }) - this.treeNode(this.groupForm) + // this.treeNode(this.groupForm) + this.refreshNodeBy(group.pid) }) } else { // this.$message({ diff --git a/frontend/src/views/dataset/common/DatasetTableData.vue b/frontend/src/views/dataset/common/DatasetTableData.vue index cb58e377b8..95b01c8156 100644 --- a/frontend/src/views/dataset/common/DatasetTableData.vue +++ b/frontend/src/views/dataset/common/DatasetTableData.vue @@ -72,7 +72,7 @@ export default { if (this.table.id) { this.dataLoading = true this.table.row = 100 - post('/dataset/table/getPreviewData/1/100', this.table, false).then(response => { + post('/dataset/table/getPreviewData/1/100', this.table, false, 30000).then(response => { this.fields = response.data.fields this.data = response.data.data const datas = this.data diff --git a/frontend/src/views/dataset/data/ViewTable.vue b/frontend/src/views/dataset/data/ViewTable.vue index bb4e4db495..30e0aaa456 100644 --- a/frontend/src/views/dataset/data/ViewTable.vue +++ b/frontend/src/views/dataset/data/ViewTable.vue @@ -130,7 +130,7 @@ export default { initPreviewData(page) { if (this.table.id) { this.table.row = this.tableViewRowForm.row - post('/dataset/table/getPreviewData/' + page.page + '/' + page.pageSize, this.table).then(response => { + post('/dataset/table/getPreviewData/' + page.page + '/' + page.pageSize, this.table, true, 30000).then(response => { this.fields = response.data.fields this.data = response.data.data this.page = response.data.page diff --git a/frontend/src/views/dataset/group/Group.vue b/frontend/src/views/dataset/group/Group.vue index dd8292be32..9409fc740a 100644 --- a/frontend/src/views/dataset/group/Group.vue +++ b/frontend/src/views/dataset/group/Group.vue @@ -341,7 +341,7 @@