From 4467f211abdd97798a65fd6f17c83103a60f361b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E9=A3=9E=E6=89=AC?= <15678871232@qq.com> Date: Wed, 15 Jun 2022 09:40:37 +0000 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4=E6=B5=81?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/FlowDefinitionController.java | 8 +++++--- ruoyi-ui/src/api/flowable/definition.js | 5 ++--- ruoyi-ui/src/views/flowable/definition/index.vue | 13 +++++-------- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/ruoyi-flowable/src/main/java/com/ruoyi/flowable/controller/FlowDefinitionController.java b/ruoyi-flowable/src/main/java/com/ruoyi/flowable/controller/FlowDefinitionController.java index ece435a..e6000a8 100644 --- a/ruoyi-flowable/src/main/java/com/ruoyi/flowable/controller/FlowDefinitionController.java +++ b/ruoyi-flowable/src/main/java/com/ruoyi/flowable/controller/FlowDefinitionController.java @@ -167,9 +167,11 @@ public class FlowDefinitionController { } @ApiOperation(value = "删除流程") - @DeleteMapping(value = "/delete") - public AjaxResult delete(@ApiParam(value = "流程部署ID", required = true) @RequestParam String deployId) { - flowDefinitionService.delete(deployId); + @DeleteMapping(value = "/{deployIds}") + public AjaxResult delete(@PathVariable String[] deployIds) { + for (String deployId : deployIds) { + flowDefinitionService.delete(deployId); + } return AjaxResult.success(); } diff --git a/ruoyi-ui/src/api/flowable/definition.js b/ruoyi-ui/src/api/flowable/definition.js index 9041c34..d2243df 100644 --- a/ruoyi-ui/src/api/flowable/definition.js +++ b/ruoyi-ui/src/api/flowable/definition.js @@ -105,11 +105,10 @@ export function updateDeployment(data) { } // 删除流程定义 -export function delDeployment(query) { +export function delDeployment(deployId) { return request({ - url: '/flowable/definition/delete/', + url: '/flowable/definition/' + deployId, method: 'delete', - params: query }) } diff --git a/ruoyi-ui/src/views/flowable/definition/index.vue b/ruoyi-ui/src/views/flowable/definition/index.vue index 488453b..55c2d6c 100644 --- a/ruoyi-ui/src/views/flowable/definition/index.vue +++ b/ruoyi-ui/src/views/flowable/definition/index.vue @@ -371,7 +371,7 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) + this.ids = selection.map(item => item.deploymentId) this.single = selection.length!==1 this.multiple = !selection.length }, @@ -468,7 +468,7 @@ export default { /** 修改按钮操作 */ handleUpdate(row) { this.reset(); - const id = row.id || this.ids + const id = row.deploymentId || this.ids getDeployment(id).then(response => { this.form = response.data; this.open = true; @@ -497,16 +497,13 @@ export default { }, /** 删除按钮操作 */ handleDelete(row) { - // const ids = row.deploymentId || this.ids; - const params = { - deployId: row.deploymentId - } - this.$confirm('是否确认删除流程定义编号为"' + params.deployId + '"的数据项?', "警告", { + const deploymentIds = row.deploymentId || this.ids; + this.$confirm('是否确认删除流程定义编号为"' + deploymentIds + '"的数据项?', "警告", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(function() { - return delDeployment(params); + return delDeployment(deploymentIds); }).then(() => { this.getList(); this.msgSuccess("删除成功");