批量删除流程

approve-sys
云飞扬 2 years ago committed by Gitee
parent 972c239497
commit 4467f211ab
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -167,9 +167,11 @@ public class FlowDefinitionController {
} }
@ApiOperation(value = "删除流程") @ApiOperation(value = "删除流程")
@DeleteMapping(value = "/delete") @DeleteMapping(value = "/{deployIds}")
public AjaxResult delete(@ApiParam(value = "流程部署ID", required = true) @RequestParam String deployId) { public AjaxResult delete(@PathVariable String[] deployIds) {
for (String deployId : deployIds) {
flowDefinitionService.delete(deployId); flowDefinitionService.delete(deployId);
}
return AjaxResult.success(); return AjaxResult.success();
} }

@ -105,11 +105,10 @@ export function updateDeployment(data) {
} }
// 删除流程定义 // 删除流程定义
export function delDeployment(query) { export function delDeployment(deployId) {
return request({ return request({
url: '/flowable/definition/delete/', url: '/flowable/definition/' + deployId,
method: 'delete', method: 'delete',
params: query
}) })
} }

@ -371,7 +371,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.deploymentId)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -468,7 +468,7 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id || this.ids const id = row.deploymentId || this.ids
getDeployment(id).then(response => { getDeployment(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
@ -497,16 +497,13 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
// const ids = row.deploymentId || this.ids; const deploymentIds = row.deploymentId || this.ids;
const params = { this.$confirm('是否确认删除流程定义编号为"' + deploymentIds + '"的数据项?', "警告", {
deployId: row.deploymentId
}
this.$confirm('是否确认删除流程定义编号为"' + params.deployId + '"的数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(function() { }).then(function() {
return delDeployment(params); return delDeployment(deploymentIds);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");

Loading…
Cancel
Save