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