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('删除成功'); };