commit
This commit is contained in:
@@ -22,25 +22,29 @@ const flowMixins = {
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
console.log(this.$refs)
|
||||
console.log(this.$refs.guava)
|
||||
|
||||
// this.oepnAudit({})
|
||||
//
|
||||
//
|
||||
// this.$axios.post(location.pathname + '/queryTask', {taskId}).then(res => {
|
||||
// if (res.code === 0) {
|
||||
// // 延迟1.5秒 显示loading动画 解决Guava异步加载 获取不到实例的问题
|
||||
// setTimeout(() => {
|
||||
// if (res.data.taskState === 10) {
|
||||
// this.openAudit(res.data);
|
||||
// } else {
|
||||
// this.openView(res.data);
|
||||
// }
|
||||
// loading.close();
|
||||
// }, 1500)
|
||||
// }
|
||||
// })
|
||||
let delayCloseLoading = false
|
||||
this.$axios.post(location.pathname + "/queryTask", {taskId}).then((res) => {
|
||||
if (res.code === 0 && res.data) {
|
||||
delayCloseLoading = true
|
||||
// Guava 为异步组件,等待组件实例完成挂载后再打开任务弹窗。
|
||||
setTimeout(() => {
|
||||
try {
|
||||
if (res.data.taskState === 10) {
|
||||
this.openAudit(res.data)
|
||||
} else {
|
||||
this.openView(res.data)
|
||||
}
|
||||
} finally {
|
||||
loading.close()
|
||||
}
|
||||
}, 1500)
|
||||
}
|
||||
}).finally(() => {
|
||||
// 查询失败或未返回任务数据时,必须关闭全屏 Loading。
|
||||
if (!delayCloseLoading) {
|
||||
loading.close()
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,11 +71,13 @@ const initTableMixins = {
|
||||
const address = this.pageDataUrl ? this.pageDataUrl : loc() + "/pageData"
|
||||
this.tableLoading = true
|
||||
this.$axios.post(address, data ? data : this.pageForm).then((res) => {
|
||||
this.tableLoading = false
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
}).finally(() => {
|
||||
// 接口异常时同样结束加载状态,避免表格持续显示加载动画。
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
notifySuccess(msg) {
|
||||
|
||||
Reference in New Issue
Block a user