feat(fix):前端请求,loading配置
This commit is contained in:
parent
c627f44e6e
commit
ec24cf3d39
@ -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
|
||||
})
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user