From c467d95703be720f303cb92ca7eca394469f23fd Mon Sep 17 00:00:00 2001 From: songgaoshuai <1742057357@qq.com> Date: Tue, 4 Jun 2024 11:26:38 +0800 Subject: [PATCH] =?UTF-8?q?https://gitee.com/dromara/RuoYi-Cloud-Plus/issu?= =?UTF-8?q?es/I9US1Q=20fix=E4=BF=AE=E5=A4=8D=E6=88=91=E7=9A=84=E5=8D=95?= =?UTF-8?q?=E6=8D=AE=E6=92=A4=E9=94=80=EF=BC=8C=E5=88=A0=E9=99=A4=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/task/myDocument.vue | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/views/workflow/task/myDocument.vue b/src/views/workflow/task/myDocument.vue index e8592f8..2dec097 100644 --- a/src/views/workflow/task/myDocument.vue +++ b/src/views/workflow/task/myDocument.vue @@ -88,7 +88,7 @@ - + @@ -123,7 +123,7 @@ const categoryTreeRef = ref(); // 遮罩层 const loading = ref(true); // 选中数组 -const ids = ref>([]); +const businessKeys = ref>([]); // 非单个禁用 const single = ref(true); // 非多个禁用 @@ -190,12 +190,6 @@ const getTreeselect = async () => { categoryOptions.value.push(data); }; -//审批记录 -const handleApprovalRecord = (processInstanceId: string) => { - if (approvalRecordRef.value) { - approvalRecordRef.value.init(processInstanceId); - } -}; /** 搜索按钮操作 */ const handleQuery = () => { getList(); @@ -210,7 +204,7 @@ const resetQuery = () => { }; // 多选框选中数据 const handleSelectionChange = (selection: ProcessInstanceVO[]) => { - ids.value = selection.map((item: any) => item.id); + businessKeys.value = selection.map((item: any) => item.businessKey); single.value = selection.length !== 1; multiple.value = !selection.length; }; @@ -226,22 +220,22 @@ const getList = () => { /** 删除按钮操作 */ const handleDelete = async (row: ProcessInstanceVO) => { - const id = row.id || ids.value; - await proxy?.$modal.confirm('是否确认删除id为【' + id + '】的数据项?'); + const businessKey = row.businessKey || businessKeys.value; + await proxy?.$modal.confirm('是否确认删除业务id为【' + businessKey + '】的数据项?'); loading.value = true; if ('running' === tab.value) { - await deleteRunAndHisInstance(id).finally(() => (loading.value = false)); + await deleteRunAndHisInstance(businessKey).finally(() => (loading.value = false)); getList(); } proxy?.$modal.msgSuccess('删除成功'); }; /** 撤销按钮操作 */ -const handleCancelProcessApply = async (processInstanceId: string) => { +const handleCancelProcessApply = async (businessKey: string) => { await proxy?.$modal.confirm('是否确认撤销当前单据?'); loading.value = true; if ('running' === tab.value) { - await cancelProcessApply(processInstanceId).finally(() => (loading.value = false)); + await cancelProcessApply(businessKey).finally(() => (loading.value = false)); getList(); } proxy?.$modal.msgSuccess('撤销成功');