From da8d4b1581cd190a1beaab56312183ae98f8bcec Mon Sep 17 00:00:00 2001 From: GAOANG <1140589958@qq.com> Date: Sun, 28 Apr 2024 10:50:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=9B=E5=BB=BA=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=90=8E=20=E4=B8=8D=E6=98=BE=E7=A4=BAloadin?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SecondDev/OpinionDialog.vue | 7 ++++++- src/views/secondDev/createFlow.vue | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/SecondDev/OpinionDialog.vue b/src/components/SecondDev/OpinionDialog.vue index 0fcc739..2f77f4f 100644 --- a/src/components/SecondDev/OpinionDialog.vue +++ b/src/components/SecondDev/OpinionDialog.vue @@ -46,6 +46,7 @@ let _taskId = ''; let _nextNodes = []; let _callback = null; + let _onCancel = null; const formState = reactive({ nextNodeName: '', @@ -62,7 +63,7 @@ .join('、'); } - function toggleDialog({ isClose, action, callback, processId, taskId, nextNodes } = {}) { + function toggleDialog({ isClose, action, callback, onCancel, processId, taskId, nextNodes } = {}) { if (isClose) { isOpen.value = false; loading.value = false; @@ -71,6 +72,7 @@ isOpen.value = true; _action.value = action; _callback = callback; + _onCancel = onCancel; _processId = processId; _taskId = taskId; _nextNodes = nextNodes; @@ -134,6 +136,9 @@ } function onClickCancel() { + if (_onCancel && typeof _onCancel === 'function') { + _onCancel(); + } isOpen.value = false; } diff --git a/src/views/secondDev/createFlow.vue b/src/views/secondDev/createFlow.vue index 9a84a98..dfcdea7 100644 --- a/src/views/secondDev/createFlow.vue +++ b/src/views/secondDev/createFlow.vue @@ -219,6 +219,9 @@ async function approvalCreate() { approvalData.approvedContent = args.opinion; approvalData.nextTaskUser = args.nextTaskUser; onFinish({}); + }, + onCancel:() => { + loading.value = false } }); }