|
@@ -19,6 +19,7 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div style="margin-left: 10%; margin-bottom: 20px; font-size: 14px">
|
|
<div style="margin-left: 10%; margin-bottom: 20px; font-size: 14px">
|
|
|
<el-button
|
|
<el-button
|
|
|
|
|
+ :loading="loading"
|
|
|
icon="el-icon-edit-outline"
|
|
icon="el-icon-edit-outline"
|
|
|
type="success"
|
|
type="success"
|
|
|
size="mini"
|
|
size="mini"
|
|
@@ -27,6 +28,7 @@
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
|
|
|
<el-button
|
|
<el-button
|
|
|
|
|
+ :loading="loading"
|
|
|
icon="el-icon-circle-close"
|
|
icon="el-icon-circle-close"
|
|
|
type="danger"
|
|
type="danger"
|
|
|
size="mini"
|
|
size="mini"
|
|
@@ -66,7 +68,8 @@
|
|
|
return {
|
|
return {
|
|
|
form:{
|
|
form:{
|
|
|
reason:''
|
|
reason:''
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ loading: false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {},
|
|
created() {},
|
|
@@ -80,7 +83,8 @@
|
|
|
this.$emit('handleBackList');
|
|
this.$emit('handleBackList');
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- async handleAudit(status) {
|
|
|
|
|
|
|
+ handleAudit(status) {
|
|
|
|
|
+ this.loading = true;
|
|
|
let API = !!status ? approveTaskWithVariables : rejectTask;
|
|
let API = !!status ? approveTaskWithVariables : rejectTask;
|
|
|
API({
|
|
API({
|
|
|
id: this.taskId,
|
|
id: this.taskId,
|
|
@@ -88,23 +92,32 @@
|
|
|
variables: {
|
|
variables: {
|
|
|
pass: !!status
|
|
pass: !!status
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
- this.$emit('handleAudit', {
|
|
|
|
|
- status,
|
|
|
|
|
- title: status === 0 ? '驳回' : ''
|
|
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.data.code != '-1') {
|
|
|
|
|
+ this.$emit('handleAudit', {
|
|
|
|
|
+ status,
|
|
|
|
|
+ title: '驳回'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ this.loading = false;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
rejectTask(status) {
|
|
rejectTask(status) {
|
|
|
|
|
+ this.loading = true;
|
|
|
rejectTask({
|
|
rejectTask({
|
|
|
id: this.taskId,
|
|
id: this.taskId,
|
|
|
reason: this.form.reason,
|
|
reason: this.form.reason,
|
|
|
variables: {
|
|
variables: {
|
|
|
pass: !!status
|
|
pass: !!status
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
- this.$emit('handleAudit', {
|
|
|
|
|
- status,
|
|
|
|
|
- title: status === 0 ? '驳回' : ''
|
|
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.data.code != '-1') {
|
|
|
|
|
+ this.$emit('handleAudit', {
|
|
|
|
|
+ status,
|
|
|
|
|
+ title: status === 0 ? '驳回' : ''
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ this.loading = false;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|