From 7dc7f92c2d283a692928682b2a67d9a1451b6c9b Mon Sep 17 00:00:00 2001 From: tony <846249920@qq.com> Date: Mon, 26 Dec 2022 09:47:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B7=B2=E5=8F=91?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=88=97=E8=A1=A8=E5=88=A0=E9=99=A4=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/FlowInstanceController.java | 8 +++-- ruoyi-ui/src/api/flowable/finished.js | 2 +- .../views/flowable/task/myProcess/index.vue | 19 +++-------- .../src/views/flowable/task/todo/index.vue | 33 ++----------------- 4 files changed, 12 insertions(+), 50 deletions(-) diff --git a/ruoyi-flowable/src/main/java/com/ruoyi/flowable/controller/FlowInstanceController.java b/ruoyi-flowable/src/main/java/com/ruoyi/flowable/controller/FlowInstanceController.java index b48f7f8c..e004f880 100644 --- a/ruoyi-flowable/src/main/java/com/ruoyi/flowable/controller/FlowInstanceController.java +++ b/ruoyi-flowable/src/main/java/com/ruoyi/flowable/controller/FlowInstanceController.java @@ -53,10 +53,12 @@ public class FlowInstanceController { } @ApiOperation(value = "删除流程实例") - @DeleteMapping(value = "/delete") - public AjaxResult delete(@ApiParam(value = "流程实例ID", required = true) @RequestParam String instanceId, + @DeleteMapping(value = "/delete/{instanceIds}") + public AjaxResult delete(@ApiParam(value = "流程实例ID", required = true) @PathVariable String[] instanceIds, @ApiParam(value = "删除原因") @RequestParam(required = false) String deleteReason) { - flowInstanceService.delete(instanceId,deleteReason); + for (String instanceId : instanceIds) { + flowInstanceService.delete(instanceId,deleteReason); + } return AjaxResult.success(); } } \ No newline at end of file diff --git a/ruoyi-ui/src/api/flowable/finished.js b/ruoyi-ui/src/api/flowable/finished.js index 806b14fc..2921be65 100644 --- a/ruoyi-ui/src/api/flowable/finished.js +++ b/ruoyi-ui/src/api/flowable/finished.js @@ -65,7 +65,7 @@ export function updateDeployment(data) { // 删除流程定义 export function delDeployment(id) { return request({ - url: '/flowable/instance/delete/?instanceId=' + id, + url: '/flowable/instance/delete/' + id, method: 'delete' }) } diff --git a/ruoyi-ui/src/views/flowable/task/myProcess/index.vue b/ruoyi-ui/src/views/flowable/task/myProcess/index.vue index d7433c5b..091c2ca1 100644 --- a/ruoyi-ui/src/views/flowable/task/myProcess/index.vue +++ b/ruoyi-ui/src/views/flowable/task/myProcess/index.vue @@ -46,16 +46,6 @@ v-hasPermi="['system:deployment:remove']" >删除 - - 导出 - @@ -279,7 +269,7 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) + this.ids = selection.map(item => item.procInsId) this.single = selection.length!==1 this.multiple = !selection.length }, @@ -356,13 +346,12 @@ export default { }, /** 删除按钮操作 */ handleDelete(row) { - // const ids = row.procInsId || this.ids;// 暂不支持删除多个流程 - const ids = row.procInsId; + const ids = row.procInsId || this.ids;// 暂不支持删除多个流程 this.$confirm('是否确认删除流程定义编号为"' + ids + '"的数据项?', "警告", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" - }).then(function() { + }).then(() => { return delDeployment(ids); }).then(() => { this.getList(); @@ -376,7 +365,7 @@ export default { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" - }).then(function() { + }).then(() => { return exportDeployment(queryParams); }).then(response => { this.download(response.msg); diff --git a/ruoyi-ui/src/views/flowable/task/todo/index.vue b/ruoyi-ui/src/views/flowable/task/todo/index.vue index bddcbef3..d9251aa3 100644 --- a/ruoyi-ui/src/views/flowable/task/todo/index.vue +++ b/ruoyi-ui/src/views/flowable/task/todo/index.vue @@ -185,29 +185,13 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) + this.ids = selection.map(item => item.taskId) this.single = selection.length !== 1 this.multiple = !selection.length }, - /** 新增按钮操作 */ - handleAdd() { - this.reset(); - this.open = true; - this.title = "添加流程定义"; - }, - /** 修改按钮操作 */ - handleUpdate(row) { - this.reset(); - const id = row.id || this.ids - getDeployment(id).then(response => { - this.form = response.data; - this.open = true; - this.title = "修改流程定义"; - }); - }, /** 删除按钮操作 */ handleDelete(row) { - const ids = row.id || this.ids; + const ids = row.taskId || this.ids; this.$confirm('是否确认删除流程定义编号为"' + ids + '"的数据项?', "警告", { confirmButtonText: "确定", cancelButtonText: "取消", @@ -219,19 +203,6 @@ export default { this.$modal.msgSuccess("删除成功"); }) }, - /** 导出按钮操作 */ - handleExport() { - const queryParams = this.queryParams; - this.$confirm('是否确认导出所有流程定义数据项?', "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(function () { - return exportDeployment(queryParams); - }).then(response => { - this.download(response.msg); - }) - } } };