/** * * 角色 R002105430222 抢修中心 暂时不考虑手动填写要求 */ //返回用户属于专业管理部门的角色 function getZyRole(roleId){ var arr = []; if(roleId.indexOf(",")!=-1){ var roleIdArr = roleId.split(","); for(var i=0;i0){ for(var i=0;i0){ for(var i=0;i0){ for(var i=0;i-1){ if(roleVal==deatil){ url = url.split(",")[0]+"?role_Id="+roleVal; }else{ url = url.split(",")[1]+"?role_Id="+roleVal; } }else if(deatil&&url.indexOf(",")==-1){ url = url+"?fd_id="+deatil+"&role_Id="+roleVal; } else{ url = url+"?role_Id="+roleVal; } fn(url); diag.close(); } }; diag.CancelEvent = function(){ diag.close(); }; //窗口Id diag.ID="showRole"; diag.ButtonAlign="center";//按钮居中 diag.show();//显示窗口 diag.OnLoad=function(){ diag.innerFrame.contentWindow.showRole(userId,zyRoleId); }; } /** * * @param userId 用户的角色Id * @param roleArr 用户所对应的角色数组 * @param fn 回调函数(跳转页面) * @param url 跳转页面url * @param zyRoleId 用户对应角色的字符串 * @param deatil */ function getRoleDeaitl (userId,roleArr,fn,url,zyRoleId,deatil){ var diag = new top.Dialog();//定义一个窗口对象 diag.Title = "角色选择";//窗口标题 diag.URL = "/nwyj/page/business/em/report/GetRole.html";//窗口对应的页面 diag.Height = 380; diag.Width= 400; diag.OKEvent = function(){ var roleVal = diag.innerFrame.contentWindow.selRole(); /* if(roleVal=="R002105430222"){ top.Dialog.alert("此角色填写的表暂不支持导入功能"); $(parent.document.body).find("#_ButtonClose_showRole").click(); return; } */ if(roleVal==""||roleVal==undefined){ top.Dialog.alert("没有选择角色,请选择角色"); }else { if(deatil&&url.indexOf(",")>-1){ if(roleVal==deatil){ url = url.split(",")[0]+"?role_Id="+roleVal; }else{ url = url.split(",")[1]+"?role_Id="+roleVal; } }else if(deatil&&url.indexOf(",")==-1){ url = url+"?fd_id="+deatil+"&role_Id="+roleVal; } else{ url = url+"?role_Id="+roleVal; } fn(url); diag.close(); } }; diag.CancelEvent = function(){ diag.close(); }; //窗口Id diag.ID="showRole"; diag.ButtonAlign="center";//按钮居中 diag.show();//显示窗口 diag.OnLoad=function(){ diag.innerFrame.contentWindow.showRole(userId,zyRoleId); }; } function getDelRole(roleArr,params){ var arr = []; if(roleArr.length>0){ if(params.indexOf(",")==-1){ for(var i=0;i