From 905426ad454dbc2d1ec2ee912927b9518f04db4b Mon Sep 17 00:00:00 2001 From: gssong <1742057357@qq.com> Date: Mon, 8 Apr 2024 22:43:37 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BF=AE=E6=94=B9=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/workflow/processDefinition/index.ts | 4 ++-- src/views/workflow/processDefinition/index.vue | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/api/workflow/processDefinition/index.ts b/src/api/workflow/processDefinition/index.ts index 605012a..c063120 100644 --- a/src/api/workflow/processDefinition/index.ts +++ b/src/api/workflow/processDefinition/index.ts @@ -50,11 +50,11 @@ export const definitionXml = (processDefinitionId: string): AxiosPromise { +export const deleteProcessDefinition = (deploymentId: string | string[], processDefinitionId: string | string[]) => { return request({ url: `/workflow/processDefinition/${deploymentId}/${processDefinitionId}`, method: 'delete' diff --git a/src/views/workflow/processDefinition/index.vue b/src/views/workflow/processDefinition/index.vue index 376182b..52e15a8 100644 --- a/src/views/workflow/processDefinition/index.vue +++ b/src/views/workflow/processDefinition/index.vue @@ -41,6 +41,7 @@
+ 删除 部署流程文件
@@ -277,7 +278,9 @@ type CategoryOption = { }; const loading = ref(true); -const ids = ref>([]); +const ids = ref>([]); +const deploymentIds = ref>([]); +const keys = ref>([]); const single = ref(true); const multiple = ref(true); const showSearch = ref(true); @@ -368,6 +371,8 @@ const resetQuery = () => { // 多选框选中数据 const handleSelectionChange = (selection: any) => { ids.value = selection.map((item: any) => item.id); + deploymentIds.value = selection.map((item: any) => item.deploymentId); + keys.value = selection.map((item: any) => item.key); single.value = selection.length !== 1; multiple.value = !selection.length; }; @@ -414,9 +419,12 @@ const clickPreviewXML = async (id: string) => { }; /** 删除按钮操作 */ const handleDelete = async (row: ProcessDefinitionVO) => { - await proxy?.$modal.confirm('是否确认删除流程定义key为【' + row.key + '】的数据项?'); + const id = row.id || ids.value; + const deployIds = row.deploymentId || deploymentIds.value; + const defKeys = row.key || keys.value; + await proxy?.$modal.confirm('是否确认删除流程定义KEY为【' + keys.value + '】的数据项?'); loading.value = true; - await deleteProcessDefinition(row.deploymentId, row.id).finally(() => (loading.value = false)); + await deleteProcessDefinition(deployIds, id).finally(() => (loading.value = false)); await getList(); proxy?.$modal.msgSuccess('删除成功'); };