1.前台拼接需要删除的ID字符串
//删除流程模板 delFlowModel: function () { var that = modObj; var rows = that.uiStore.gvFlowModelList.getCheckRows(); if (rows.length == 0) { alert("请先选择流程模板"); return false; } if (confirm("是否删除选中的流程模板?")) { //需要删除的模板ID var modelID = [] for (var i = 0; i < rows.length; i++) { modelID.push(rows[i].WF_M_ID); } //删除流程模板 var param = { reqType: "DelFlowModel", modelID: modelID.join(that.splitChar.splitStr1st) }; that.ajaxDeal(that.dataStore.ajaxUrl, param, function (result) { if (result.state == "ok") { alert("删除成功") } else { alert("删除失败") } }); var modelClassCode = "root"; that.loadModelListByClass(modelClassCode); } },
2.在Service层拆分字符串
/// <summary> /// 删除流程模板 /// </summary> /// <param name="modelID"></param> public void DelFlowModel(string modelID) { var modelIDs = modelID.Split(PublicValue.FirstSplitString); //循环删除 foreach (var item in modelIDs) { _flowConfigDao.DelFlowModel(item); } }
原文地址:https://www.cnblogs.com/ChenMM/p/9951406.html
时间: 2024-11-01 11:11:41