From 20c6ada48adf0788bdc2f1dbe2485ee76c400ff4 Mon Sep 17 00:00:00 2001 From: gaoyunqi Date: Fri, 23 Aug 2024 14:08:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E6=8F=90=E4=BA=A4=E6=B5=81=E7=A8=8B=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=A0=A1=E9=AA=8C=E9=94=99=E8=AF=AF=E4=BE=9D?= =?UTF-8?q?=E7=84=B6=E4=BC=9A=E8=A7=A6=E5=8F=91=E5=AE=A1=E6=89=B9=E6=B5=81?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/secondDev/approveFlowPage.vue | 66 +++++++++++++------------ 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/src/views/secondDev/approveFlowPage.vue b/src/views/secondDev/approveFlowPage.vue index afc7bc4..d14a540 100644 --- a/src/views/secondDev/approveFlowPage.vue +++ b/src/views/secondDev/approveFlowPage.vue @@ -80,6 +80,7 @@ import ProcessInformation from '/@/views/workflow/task/components/flow/ProcessInformation.vue'; import { useI18n } from '/@/hooks/web/useI18n'; import { useMessage } from '/@/hooks/web/useMessage'; + const { t } = useI18n(); const { notification } = useMessage(); @@ -106,7 +107,7 @@ const hasBtnApprove = ref(true); const hasBtnReject = ref(false); const hasBtnFinish = ref(false); - const drawNode = ref('') + const drawNode = ref(''); let approvalData = reactive({ isCountersign: false, @@ -140,33 +141,33 @@ }); } else if (key === 'transfer') { onTransferClick(); - } else if(key === 'drawBack') { + } else if (key === 'drawBack') { Modal.confirm({ - title: t('提示'), - icon: createVNode(ExclamationCircleOutlined), - content: t('请确认是否撤回该流程?'), - okText: t('确定'), - okType: 'danger', - cancelText: t('取消'), - onOk() { - withdraw(processId.value, drawNode.value).then(res => { - if (res) { - notification.open({ - type: 'success', - message: t('撤回'), - description: t('撤回成功'), + title: t('提示'), + icon: createVNode(ExclamationCircleOutlined), + content: t('请确认是否撤回该流程?'), + okText: t('确定'), + okType: 'danger', + cancelText: t('取消'), + onOk() { + withdraw(processId.value, drawNode.value).then((res) => { + if (res) { + notification.open({ + type: 'success', + message: t('撤回'), + description: t('撤回成功') + }); + } else { + notification.open({ + type: 'error', + message: t('撤回'), + description: t('撤回失败') + }); + } }); - } else { - notification.open({ - type: 'error', - message: t('撤回'), - description: t('撤回失败'), - }); - } - }) - }, - onCancel() {}, - }); + }, + onCancel() {} + }); } } @@ -184,6 +185,9 @@ async function onApproveClick() { await submit(); + if (!validateSuccess.value) { + return; + } const params = await getApproveParams(); const nextNodes = await postGetNextTaskMaybeArrival(params); approvalData.approvedType = ApproveType.AGREE; @@ -333,18 +337,18 @@ approvalData.circulateConfigs = []; } renderKey.value = Math.random() + ''; - getBackNode() + getBackNode(); } catch (error) {} }); function getBackNode() { - getDrawNode(processId.value).then(res => { + getDrawNode(processId.value).then((res) => { if (res.length) { - drawNode.value = res[0].activityId + drawNode.value = res[0].activityId; } else { - drawNode.value = '' + drawNode.value = ''; } - }) + }); } async function submit() {