修试审核增加列表刷新和loding
This commit is contained in:
parent
ed15eeb45a
commit
88299830a0
|
|
@ -412,6 +412,8 @@ export default {
|
|||
confirmButtonText: "确定",
|
||||
});
|
||||
} else {
|
||||
// 添加全局loading
|
||||
const loading = this.$loading({text: '提交中...'});
|
||||
outerAudit(this.passTemp).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("通过成功");
|
||||
|
|
@ -420,8 +422,16 @@ export default {
|
|||
this.passTemp = [];
|
||||
this.failTemp = [];
|
||||
// router.go(0); // 刷新页面
|
||||
this.getList();
|
||||
}
|
||||
this.getTaskInfo();
|
||||
// this.getTaskInfo();
|
||||
}).catch((error) => {
|
||||
// 捕获异常,防止loading一直显示
|
||||
console.error('通过操作失败:', error);
|
||||
this.$modal.msgError("通过失败");
|
||||
}).finally(() => {
|
||||
// 无论成功失败,都关闭loading
|
||||
loading.close();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
@ -433,6 +443,8 @@ export default {
|
|||
confirmButtonText: "确定",
|
||||
});
|
||||
} else {
|
||||
// 添加全局loading
|
||||
const loading = this.$loading({text: '提交中...'});
|
||||
outerAudit(this.failTemp).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("驳回成功");
|
||||
|
|
@ -441,8 +453,16 @@ export default {
|
|||
this.passTemp = [];
|
||||
this.failTemp = [];
|
||||
// router.go(0); // 刷新页面
|
||||
this.getList();
|
||||
}
|
||||
this.getTaskInfo();
|
||||
// this.getTaskInfo();
|
||||
}).catch((error) => {
|
||||
// 捕获异常,防止loading一直显示
|
||||
console.error('驳回操作失败:', error);
|
||||
this.$modal.msgError("驳回失败");
|
||||
}).finally(() => {
|
||||
// 无论成功失败,都关闭loading
|
||||
loading.close();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue