批量删除流程

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 = "删除流程")
@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();
}

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

@ -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("删除成功");

Loading…
Cancel
Save