提交 97612f19 authored 作者: junjie's avatar junjie

refactor: 数据预览接口延长请求时间

上级 4b65494d
......@@ -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
})
}
......
......@@ -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
......
......@@ -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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论