From b695dbf2d53907c1e4485604ce243ee90b99b25a Mon Sep 17 00:00:00 2001 From: yangwj <> Date: Thu, 2 Jul 2026 10:29:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(workflow):=20=E6=B7=BB=E5=8A=A0=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=AE=9A=E4=B9=89=E5=8F=96=E6=B6=88=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在流程定义表格中添加取消发布按钮 - 实现取消发布接口调用和确认弹窗逻辑 - 添加取消发布后的页面状态更新和提示信息 - 优化发布确认弹窗的字符串拼接格式 --- .../workflow/processDefinition/index.vue | 35 ++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/src/views/workflow/processDefinition/index.vue b/src/views/workflow/processDefinition/index.vue index 63764de2..45c6c8b8 100644 --- a/src/views/workflow/processDefinition/index.vue +++ b/src/views/workflow/processDefinition/index.vue @@ -215,6 +215,17 @@ > 发布流程 + + 取消发布 + @@ -335,6 +346,7 @@ import { importDef, unPublishList, publish, + unPublish, add, edit, getInfo, @@ -517,10 +529,10 @@ const handleDelete = async (row?: Partial) => { const handlePublish = async (row?: Partial) => { await modal.confirm( '是否确认发布流程定义编码为【' + - row.flowCode + - '】版本为【' + - row.version + - '】的数据项?,发布后会将已发布流程定义改为失效!' + row.flowCode + + '】版本为【' + + row.version + + '】的数据项?,发布后会将已发布流程定义改为失效!' ); setLoading(true); await publish(row.id).finally(() => setLoading(false)); @@ -528,6 +540,21 @@ const handlePublish = async (row?: Partial) => { await handleQuery(); modal.msgSuccess('发布成功'); }; +/** 取消发布流程定义 */ +const handleUnPublish = async (row?: Partial) => { + await modal.confirm( + '是否确认取消发布流程定义编码为【' + + row.flowCode + + '】版本为【' + + row.version + + '】的数据项?,取消发布后,此流程定义将不再显示在流程定义列表!' + ); + setLoading(true); + await unPublish(row.id).finally(() => setLoading(false)); + activeName.value = '1'; + await handleQuery(); + modal.msgSuccess('取消发布成功'); +} /** 挂起/激活 */ const handleProcessDefState = async (row: Partial, status: number | string | boolean) => { let msg: string;