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); - }) - } } };