From 97612f19684aa78319d135da6a3e1ed46ba45d1e Mon Sep 17 00:00:00 2001 From: junjie Date: Fri, 30 Jul 2021 17:44:44 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=95=B0=E6=8D=AE=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E6=8E=A5=E5=8F=A3=E5=BB=B6=E9=95=BF=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= 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/dataset/common/DatasetTableData.vue | 2 +- frontend/src/views/dataset/data/ViewTable.vue | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/api/dataset/dataset.js b/frontend/src/api/dataset/dataset.js index ebd256eaf9..a91a6c7d06 100644 --- a/frontend/src/api/dataset/dataset.js +++ b/frontend/src/api/dataset/dataset.js @@ -111,11 +111,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/dataset/common/DatasetTableData.vue b/frontend/src/views/dataset/common/DatasetTableData.vue index cb58e377b8..d5ad466c2b 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 844dafbfa2..3e645ec7c8 100644 --- a/frontend/src/views/dataset/data/ViewTable.vue +++ b/frontend/src/views/dataset/data/ViewTable.vue @@ -134,7 +134,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