同意操作请求过程新增遮罩层
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<a-spin :spinning="spinning" tip="请稍后...">
|
||||
<div class="page-bg-wrap">
|
||||
<div class="geg-flow-page">
|
||||
<div class="top-toolbar">
|
||||
@ -62,6 +63,7 @@
|
||||
</a-modal>
|
||||
</div>
|
||||
</div>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@ -85,6 +87,7 @@
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
||||
const spinning = ref(false);
|
||||
const userStore = useUserStore();
|
||||
const { t } = useI18n();
|
||||
const { notification } = useMessage();
|
||||
@ -156,6 +159,7 @@
|
||||
okType: 'danger',
|
||||
cancelText: t('取消'),
|
||||
onOk() {
|
||||
openSpinning();
|
||||
withdraw(processId.value, drawNode.value).then((res) => {
|
||||
if (res) {
|
||||
notification.open({
|
||||
@ -170,6 +174,8 @@
|
||||
description: t('撤回失败')
|
||||
});
|
||||
}
|
||||
}).finally(()=>{
|
||||
closeSpinning();
|
||||
});
|
||||
},
|
||||
onCancel() {}
|
||||
@ -190,10 +196,12 @@
|
||||
}
|
||||
|
||||
async function onApproveClick(isAutoAgreeBreak = false) {
|
||||
openSpinning();
|
||||
if (!isAutoAgreeBreak) {
|
||||
await submit();
|
||||
}
|
||||
if (!validateSuccess.value) {
|
||||
closeSpinning();
|
||||
return;
|
||||
}
|
||||
const params = await getApproveParams();
|
||||
@ -204,6 +212,7 @@
|
||||
if (isAutoAgreeBreak) {
|
||||
opinionDlg.value.stopLoading()
|
||||
}
|
||||
closeSpinning();
|
||||
opinionDlg.value.toggleDialog({
|
||||
action: 'agree',
|
||||
nextNodes,
|
||||
@ -461,4 +470,11 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function openSpinning() {
|
||||
spinning.value = true;
|
||||
}
|
||||
function closeSpinning() {
|
||||
spinning.value = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user