角色无法添加问题

This commit is contained in:
zhal 2022-07-24 21:41:36 +08:00
parent 45aaf7b125
commit 82b170c5a4

View File

@ -3518,85 +3518,85 @@ function openRelationDig(obj,value) {
}] }]
}); });
}else{ }else{
$("#attr_dialog_normal_relevance_shapes_div").dialog({ $("#attr_dialog_normal_relevance_shapes_div").dialog({
buttons : [ buttons : [
{ {
text : '刷新', text : '刷新',
cls : "yellow", cls : "yellow",
handler : function() { handler : function() {
// 刷新页面 // 刷新页面
document.getElementById("attr_content_iframe_relevance_shapes").contentWindow.location.reload(true); document.getElementById("attr_content_iframe_relevance_shapes").contentWindow.location.reload(true);
} }
},{ },{
text : "新建角色模型", text : "新建角色模型",
cls : "green", cls : "green",
handler : function() { handler : function() {
//根据角色 //根据角色
$.ajax({ $.ajax({
type : "POST", type : "POST",
url : "./jd?sid=" url : "./jd?sid="
+ CLB.sid + CLB.sid
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_find_same_role", + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_find_same_role",
data : { data : {
uuid:ruuid, uuid:ruuid,
methodId:methodId methodId:methodId
}, },
success : function(msg) { success : function(msg) {
if (msg.data.result == "ok") { if (msg.data.result == "ok") {
window.top.$.simpleAlert("请勿重复新建角色模型!!!"); window.top.$.simpleAlert("请勿重复新建角色模型!!!");
}else{ }else{
//跳转角色 //跳转角色
$.ajax({ $.ajax({
type : "POST", type : "POST",
url : "./jd?sid=" url : "./jd?sid="
+ CLB.sid + CLB.sid
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createDialogModel", + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createDialogModel",
data : { data : {
uuid:ruuid, uuid:ruuid,
methodId:methodId, methodId:methodId,
wsId:wsId wsId:wsId
}, },
success : function(msg) { success : function(msg) {
if (msg.result == "ok") { if (msg.result == "ok") {
window.open("./w?uuid=" + msg.data.uuid+"&teamId" window.open("./w?uuid=" + msg.data.uuid+"&teamId"
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val())); + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val()));
}
} }
});
}
}
});
} }
}, { });
text : '确定', }
cls : "blue",
handler : function() {
var tmpObjId = $(obj).attr("objid");
getRelevanceShapes(tmpObjId,value);
var tmpShape = Utils.getSelected()[0];
var tmpTitle = tmpShape.title;
if (tmpShape.name == "linker") {
return;
} }
if (tmpTitle.indexOf("泳道") > -1 || tmpTitle.indexOf("泳池") > -1 || tmpTitle.indexOf("分隔") > -1) { });
return;
} }
if (isForceShowError && tmpAttrIdValue.indexOf(tmpObjId) > -1) { }, {
$.simpleAlert("已设置不允许修改,请在应用参数中设置", 'error'); text : '确定',
isForceShowError = false; cls : "blue",
} handler : function() {
tmpAttrIdValue = []; var tmpObjId = $(obj).attr("objid");
getRelevanceShapes(tmpObjId,value);
var tmpShape = Utils.getSelected()[0];
var tmpTitle = tmpShape.title;
if (tmpShape.name == "linker") {
return;
} }
}, { if (tmpTitle.indexOf("泳道") > -1 || tmpTitle.indexOf("泳池") > -1 || tmpTitle.indexOf("分隔") > -1) {
text : '关闭', return;
handler : function() {
$("#attr_dialog_normal_relevance_shapes_div").dialog('close');
} }
}] if (isForceShowError && tmpAttrIdValue.indexOf(tmpObjId) > -1) {
}); $.simpleAlert("已设置不允许修改,请在应用参数中设置", 'error');
} isForceShowError = false;
}
tmpAttrIdValue = [];
}
}, {
text : '关闭',
handler : function() {
$("#attr_dialog_normal_relevance_shapes_div").dialog('close');
}
}]
});
}
} }
}); });
}else{ }else{
@ -3726,25 +3726,27 @@ function saveRelevanceShapesTODB(shapesObj, shapeId, shapeName, fileName,
} }
} }
//by bzp 校验角色和岗位不能同时选择 //by bzp 校验角色和岗位不能同时选择
if(objId == 'role' || objId == 'post'){ if(shape.category!="org_role") {
if(objId == 'role'){ if (objId == 'role' || objId == 'post') {
//判断岗位 if (objId == 'role') {
var tmp = $("input[objid='post']").val(); //判断岗位
if(tmp.length > 0){ var tmp = $("input[objid='post']").val();
$.simpleAlert("不能同时选择岗位和角色"); if (tmp.length > 0) {
return; $.simpleAlert("不能同时选择岗位和角色");
} return;
} }
if(objId == 'post'){ }
//判断角色 if (objId == 'post') {
var tmp = $("input[objid='role']").val(); //判断角色
if(tmp.length > 0){ var tmp = $("input[objid='role']").val();
$.simpleAlert("不能同时选择岗位和角色"); if (tmp.length > 0) {
return; $.simpleAlert("不能同时选择岗位和角色");
} return;
} }
} }
//by bzp end }
}
//by bzp end
var ref = $("input[objid_shapeId='" + objId + "']").attr("ref"); var ref = $("input[objid_shapeId='" + objId + "']").attr("ref");
$.ajax({ $.ajax({
type : "POST", type : "POST",
@ -4396,8 +4398,8 @@ function delPolicyFile(obj) {
data : { data : {
sid: sid, sid: sid,
appId: "com.actionsoft.apps.coe.pal.datamigration", appId: "com.actionsoft.apps.coe.pal.datamigration",
repositoryName: "migration", repositoryName: "migration",
groupValue:"policyFile", groupValue:"policyFile",
ruuid:ruuid, ruuid:ruuid,
fileName:name fileName:name
}, },