From 136ad0b42eb602317d40a6eb5904108ddb3487b8 Mon Sep 17 00:00:00 2001 From: gssong <1742057357@qq.com> Date: Sat, 7 Oct 2023 17:45:30 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=B0=83=E6=95=B4=E8=AF=B7=E5=81=87?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E6=B5=81=E7=A8=8B=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/demo/leave/index.vue | 18 ++++++++++-------- src/views/workflow/task/myDocument.vue | 2 ++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/views/demo/leave/index.vue b/src/views/demo/leave/index.vue index 14f2ebbe..903d58ba 100644 --- a/src/views/demo/leave/index.vue +++ b/src/views/demo/leave/index.vue @@ -56,7 +56,7 @@ v-hasPermi="['demo:leave:remove']"> - @@ -209,14 +209,13 @@ const handleAdd = () => { /** 修改按钮操作 */ const handleUpdate = (row?: LeaveVO) => { - loading.value = true; + buttonLoading.value = false; dialog.visible = true; dialog.title = '修改请假申请'; nextTick(async () => { reset(); const _id = row?.id || ids.value[0]; const res = await getLeave(_id); - loading.value = false; Object.assign(form.value, res.data); }); }; @@ -228,17 +227,18 @@ const submitForm = (status: string) => { buttonLoading.value = true; let res = {}; if (form.value.id) { - res = await updateLeave(form.value).finally(() => (buttonLoading.value = false)); + res = await updateLeave(form.value) } else { - res = await addLeave(form.value).finally(() => (buttonLoading.value = false)); + res = await addLeave(form.value) } + form.value = res.data if (status === 'draft') { + buttonLoading.value = false proxy?.$modal.msgSuccess('暂存成功'); dialog.visible = false; } else { handleStartWorkFlow(res.data); } - await getList(); } }); }; @@ -265,14 +265,16 @@ const handleExport = () => { //提交申请 const handleStartWorkFlow = async (data: any) => { - submitFormData.value.processKey = 'test2'; + submitFormData.value.processKey = 'demo01'; submitFormData.value.businessKey = data.id; + //流程变量 submitFormData.value.variables = { + entity: data, leaveDays: data.leaveDays, - userList: [1] }; startWorkFlow(submitFormData.value).then((response: any) => { if (submitVerifyRef.value) { + buttonLoading.value = false submitVerifyRef.value.openDialog(response.data.taskId); } }); diff --git a/src/views/workflow/task/myDocument.vue b/src/views/workflow/task/myDocument.vue index 8e9ada4d..f9943491 100644 --- a/src/views/workflow/task/myDocument.vue +++ b/src/views/workflow/task/myDocument.vue @@ -69,6 +69,8 @@ 删除 + 撤销