95 lines
4.1 KiB
Plaintext
95 lines
4.1 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%><%@
|
|
include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
|
/*角色列表*/
|
|
//通过显示模版产生模型对象doTemp
|
|
ASObjectModel doTemp = new ASObjectModel("RoleList");
|
|
String sCurPOrg=CurUser.getRelativeOrgID();
|
|
/*
|
|
if(CurUser.hasRole("299")){
|
|
sCurPOrg=session.getAttribute("managerPlatFormOrgId").toString();
|
|
doTemp.appendJboWhere(" AND O.RoleID not in('099','299') and(BELONGORG=8 or BELONGORG like '"+sCurPOrg+"%' ) ");
|
|
}
|
|
if(CurUser.hasRole("399")){
|
|
doTemp.appendJboWhere(" AND O.RoleID not in('099','299') and(BELONGORG=8 or BELONGORG like '"+sCurPOrg+"%' ) ");
|
|
}
|
|
if(!CurUser.hasRole("099")&&!CurUser.hasRole("299")&&!CurUser.hasRole("399")){
|
|
doTemp.appendJboWhere(" AND O.RoleID in('xxxx') ");
|
|
}*/
|
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
|
dwTemp.Style="1"; //设置DW风格 1:Grid 2:Freeform
|
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
|
dwTemp.setPageSize(20);
|
|
dwTemp.genHTMLObjectWindow("");
|
|
String sButtons[][] = {
|
|
{(CurUser.hasRole("099")||CurUser.hasRole("299")?"true":"false"),"","Button","新增角色","新增一种角色","newRecord()","","","","btn_icon_add"},
|
|
{"true","","Button","详情","查看角色情况","viewAndEdit()","","","","btn_icon_detail"},
|
|
{"true","","Button","角色下用户","查看该角色所有用户","viewUser()","","","","btn_icon_role"},
|
|
{"true","","Button","主菜单授权","给角色授权主菜单","my_AddMenu()","","","","btn_icon_menu"},
|
|
{"true","","Button","多角色菜单授权","给多个角色授权主菜单","much_AddMenu()","","","","btn_icon_roles"},
|
|
{"true","","Button","变更生效","同步缓存中数据使数据库变更生效","reloadCacheRole()","","","","btn_icon_valid"},
|
|
{"true","","Button","保存","保存","as_save(0)","","","","btn_icon_save"}
|
|
};
|
|
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
|
<script type="text/javascript">
|
|
function newRecord(){
|
|
AsDialog.PopView("/AppConfig/RoleManage/RoleInfo.jsp","",{width:"600px",height:"450px",title:"新增角色"},function(sReturn){
|
|
reloadSelf();
|
|
});
|
|
}
|
|
function viewAndEdit(){
|
|
var sRoleID = getItemValue(0,getRow(),"RoleID");
|
|
if (typeof(sRoleID)=="undefined" || sRoleID.length==0){
|
|
alert(getMessageText('AWEW1001'));//请选择一条信息!
|
|
return;
|
|
}
|
|
|
|
AsDialog.PopView("/AppConfig/RoleManage/RoleInfo.jsp","RoleID="+sRoleID,{width:"600px",height:"450px",title:"查看编辑角色"},function(sReturn){
|
|
|
|
if (typeof(sReturn)!='undefined' && sReturn.length!=0) {
|
|
reloadSelf();
|
|
}
|
|
});
|
|
}
|
|
|
|
function deleteRecord(){
|
|
var sRoleID = getItemValue(0,getRow(),"RoleID");
|
|
if (typeof(sRoleID)=="undefined" || sRoleID.length==0){
|
|
alert(getMessageText('AWEW1001'));//请选择一条信息!
|
|
return;
|
|
}
|
|
if(confirm(getMessageText("ALS70902"))){ //删除该角色的同时将删除该角色对应的权限,确定删除该角色吗?
|
|
as_delete("myiframe0");
|
|
}
|
|
}
|
|
|
|
<%/*~[Describe=给角色授权主菜单;]~*/%>
|
|
function my_AddMenu(){
|
|
var sRoleID = getItemValue(0,getRow(),"RoleID");
|
|
if (typeof(sRoleID)=="undefined" || sRoleID.length==0){
|
|
alert(getMessageText('AWEW1001'));//请选择一条信息!
|
|
return;
|
|
}
|
|
AsDialog.PopView("/AppConfig/RoleManage/AddRoleMenu.jsp","RoleID="+sRoleID,"dialogWidth=600px;dialogHeight=400px;status:no;center:yes;help:no;minimize:no;maximize:no;border:thin;",null,"配置角色下菜单");
|
|
}
|
|
|
|
<%/*[Describe=给多角色授权主菜单;]*/%>
|
|
function much_AddMenu(){
|
|
AsDialog.PopView("/AppConfig/RoleManage/AddMuchRoleMenus.jsp","","dialogWidth=550px;dialogHeight=650px;center:yes;resizable:yes;scrollbars:no;status:no;help:no",null,"批量配置角色下菜单");
|
|
}
|
|
<%/*[Describe=查看该角色所有用户;]*/%>
|
|
function viewUser(){
|
|
var sRoleID = getItemValue(0,getRow(),"RoleID");
|
|
if (typeof(sRoleID)=="undefined" || sRoleID.length==0){
|
|
alert(getMessageText('AWEW1001'));//请选择一条信息!
|
|
return;
|
|
}
|
|
var tabinfo={"title":"角色["+sRoleID+"]下用户列表"};
|
|
AsControl.OpenTab("/AppConfig/RoleManage/ViewAllUserList.jsp","RoleID="+sRoleID,tabinfo);
|
|
}
|
|
|
|
<%/*~[Describe=生效变更;]~*/%>
|
|
function reloadCacheRole(){
|
|
AsDebug.reloadCacheAll();
|
|
}
|
|
</script>
|
|
<%@ include file="/Frame/resources/include/include_end.jspf"%> |