|
|
@@ -118,18 +118,25 @@
|
|
|
},
|
|
|
|
|
|
async handleAudit(status) {
|
|
|
- //发起人补充
|
|
|
- if (this.taskDefinitionKey === 'starter') {
|
|
|
- let arr = await this.getTableValue();
|
|
|
- if (!arr) {
|
|
|
- return;
|
|
|
- }
|
|
|
- let data = await UpdateInformation(arr);
|
|
|
- if (data.code != '0') {
|
|
|
- return;
|
|
|
+ const loading = this.$loading({ lock: true, text: '正在处理,请稍候...' });
|
|
|
+ try {
|
|
|
+ //发起人补充
|
|
|
+ if (this.taskDefinitionKey === 'starter') {
|
|
|
+ let arr = await this.getTableValue();
|
|
|
+ if (!arr) {
|
|
|
+ loading.close();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let data = await UpdateInformation(arr);
|
|
|
+ if (data.code != '0') {
|
|
|
+ loading.close();
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
+ await this._approveTaskWithVariables(status);
|
|
|
+ } finally {
|
|
|
+ loading.close();
|
|
|
}
|
|
|
- this._approveTaskWithVariables(status);
|
|
|
},
|
|
|
async _approveTaskWithVariables(status) {
|
|
|
let variables = {
|
|
|
@@ -137,7 +144,7 @@
|
|
|
};
|
|
|
|
|
|
let API = !!status ? approveTaskWithVariables : rejectTask;
|
|
|
- API({
|
|
|
+ return API({
|
|
|
id: this.taskId,
|
|
|
reason: this.form.reason,
|
|
|
variables
|