|
|
@@ -23,6 +23,7 @@
|
|
|
type="success"
|
|
|
size="mini"
|
|
|
v-click-once
|
|
|
+ :loading="loading"
|
|
|
@click="handleAudit(1)"
|
|
|
>通过
|
|
|
</el-button>
|
|
|
@@ -31,6 +32,7 @@
|
|
|
type="danger"
|
|
|
size="mini"
|
|
|
v-click-once
|
|
|
+ :loading="loading"
|
|
|
@click="_approveTaskWithVariables(0)"
|
|
|
>驳回
|
|
|
</el-button>
|
|
|
@@ -77,6 +79,7 @@
|
|
|
technicianId: '',
|
|
|
reason: '同意'
|
|
|
},
|
|
|
+ loading: false,
|
|
|
tabOptions: [
|
|
|
{ key: 'starter', permissionType: 'update', name: '发起人申请' },
|
|
|
{
|
|
|
@@ -113,18 +116,22 @@
|
|
|
let variables = {
|
|
|
pass: !!status
|
|
|
};
|
|
|
+ this.loading = true;
|
|
|
let API = !!status ? approveTaskWithVariables : rejectTask;
|
|
|
API({
|
|
|
id: this.taskId,
|
|
|
reason: this.form.reason,
|
|
|
variables
|
|
|
}).then((res) => {
|
|
|
+ this.loading = false;
|
|
|
if (res.data.code != '-1') {
|
|
|
this.$emit('handleAudit', {
|
|
|
status,
|
|
|
title: status === 0 ? '驳回' : ''
|
|
|
});
|
|
|
}
|
|
|
+ }).finally(() => {
|
|
|
+ this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
|