mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
feat:审批中心前端优化
This commit is contained in:
parent
60f5341a9a
commit
ae00f49b30
@ -177,10 +177,10 @@
|
|||||||
|
|
||||||
<!--审批操作-->
|
<!--审批操作-->
|
||||||
<div class="approve-operation">
|
<div class="approve-operation">
|
||||||
<Button type="success" v-if="isShowAgreeBtn" @click="approve(1)">{{$L('同意')}}</Button>
|
<Button type="success" v-if="isShowAgreeBtn" :loading="loadIng > 0" @click="approve(1)">{{$L('同意')}}</Button>
|
||||||
<Button type="error" v-if="isShowAgreeBtn" @click="approve(2)">{{$L('拒绝')}}</Button>
|
<Button type="error" v-if="isShowAgreeBtn" :loading="loadIng > 0" @click="approve(2)">{{$L('拒绝')}}</Button>
|
||||||
<Button type="warning" v-if="isShowWarningBtn" @click="revocation">{{$L('撤销')}}</Button>
|
<Button type="warning" v-if="isShowWarningBtn" :loading="loadIng > 0" @click="revocation">{{$L('撤销')}}</Button>
|
||||||
<Button @click="comment" type="success" ghost>+{{$L('添加评论')}}</Button>
|
<Button type="success" @click="comment" ghost>+{{$L('添加评论')}}</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--加载中-->
|
<!--加载中-->
|
||||||
@ -359,6 +359,7 @@ export default {
|
|||||||
if (type != 1 && !desc) {
|
if (type != 1 && !desc) {
|
||||||
return `请输入审批意见`
|
return `请输入审批意见`
|
||||||
}
|
}
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
this.$store.dispatch("call", {
|
this.$store.dispatch("call", {
|
||||||
url: 'approve/task/complete',
|
url: 'approve/task/complete',
|
||||||
data: {
|
data: {
|
||||||
@ -373,10 +374,11 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$emit('approve')
|
this.$emit('approve')
|
||||||
}
|
}
|
||||||
|
resolve()
|
||||||
}).catch(({msg}) => {
|
}).catch(({msg}) => {
|
||||||
$A.modalError(msg);
|
reject(msg)
|
||||||
});
|
});
|
||||||
return false
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -403,10 +405,8 @@ export default {
|
|||||||
this.$emit('revocation')
|
this.$emit('revocation')
|
||||||
}
|
}
|
||||||
}).catch(({msg}) => {
|
}).catch(({msg}) => {
|
||||||
$A.modalError(msg);
|
reject(msg);
|
||||||
resolve();
|
|
||||||
});
|
});
|
||||||
return false
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user