⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dmadddataauthinfo.jsp

📁 tomcat最新安装程序
💻 JSP
字号:
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="cn.com.aheadsoft.recordset.DataAuthRoleRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.DataAuthInfoRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.UserGroupInfoRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.DepartmentInfoRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.BasicAuthUnitRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.ModuleInfoRecordSet" %>
<%@ page import="cn.com.aheadsoft.util.AccessCtlChecker" %>
<%@ page import="java.util.*" %>
<%
 AccessCtlChecker mychecker=new AccessCtlChecker();
 
 List userdata=(List)session.getAttribute("userdata") ;
 
 DataAuthRoleRecordSet recordsetr=(DataAuthRoleRecordSet)userdata.get(0);
 recordsetr.next();
 String mroleuid=recordsetr.getDAR_UserGroupID();
 String mroleid=recordsetr.getDAR_RoleID();
 String mrolename=recordsetr.getDAR_RoleName();
 String accessctl=recordsetr.getDAR_AccessControl();
 mychecker.setaccessctlword(accessctl);

 ModuleInfoRecordSet recordsetm=(ModuleInfoRecordSet)userdata.get(1);
 BasicAuthUnitRecordSet recordsetb=(BasicAuthUnitRecordSet)userdata.get(2);
 DataAuthRoleRecordSet recordset=(DataAuthRoleRecordSet)userdata.get(3);
 //UserGroupInfoRecordSet recordsetu=(UserGroupInfoRecordSet)userdata.get(4);
 DepartmentInfoRecordSet recordsetd=(DepartmentInfoRecordSet)userdata.get(4);
 String mdid=(String)userdata.get(5);
 DataAuthInfoRecordSet recordsetdi=(DataAuthInfoRecordSet)userdata.get(6);

recordsetm.next();
String modulename=recordsetm.getMI_ModuleName();
	String moduleid=recordsetm.getMI_ModuleID();	
	recordsetb.next();
        	String unitname=recordsetb.getBAU_UnitName();
		String unitid=recordsetb.getBAU_UnitID();
		String unitmoduleid=recordsetb.getBAU_ModuleID();
		int theallcount=0;
%>
<script language="JavaScript">
  function empty(){
	 for(i=0;i<document.myform.authinfo.length;i++){
       document.myform.authinfo[i].checked=false;	 
	 }
  }
  
  function selectAll(){
	 for(i=0;i<document.myform.authinfo.length;i++){
       document.myform.authinfo[i].checked=true;	 
	 }  
  }
  	 
  function selectNot(){
	 for(i=0;i<document.myform.authinfo.length;i++){
	    if(document.myform.authinfo[i].checked==true){
		   document.myform.authinfo[i].checked=false;
		 }  
		else   
		   document.myform.authinfo[i].checked=true;
	 }    
  }	 
</script>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="/krm/jsp/css/css.css">
</head>
<form method="post" name="myform" action="/krm/servlet/dataauthinfoservlet">
<input type="hidden" name="status" value="imu">
<input type="hidden" name="mu" value="<%=moduleid%>-<%=unitid%>">
<input type="hidden" name="mroleid" value="<%=mroleid%>">
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" >
  <tr >
    <td class="trA">&nbsp;系统管理 >> 数据授权 >> 角色数据授权 >> 模块授权 >><font class="fontcolor">授权信息列表</font></td>  
  </tr>
  <tr height="8">
    <td></td>
  </tr>
  <tr>
    <td align="center">
      <table border="0" width="98%" bordercolor="A1B7DB" class="collapse">
	<tr >
	<td  class="tdA"  align="left" colspan="4">对 <%=mrolename%> 数据授权信息列表</td>
	</tr>
	   
	<%
	{
	
	%>   
	<tr  >
	<td  width="100%" class="common"   colspan="4" align="center"><%=modulename%></td>
	</tr>
	<tr>
	     <td  class="tdA" align="center" colspan="4">
     		 <INPUT name="Button13" type="button"   onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" value="全 选" onClick="return selectAll();"> 
             &nbsp;&nbsp;<INPUT name="Button12" type="button"   onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" value="清 空" onClick="return empty();"> 			  
			  &nbsp;&nbsp;<INPUT name="Button14" type="button"   onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" value="反向选择" onClick="return selectNot();"> 		 
		 </td>
	</tr>
	
        	<% //recordsetb.beforefirst();
        	{
        	if (unitmoduleid.equalsIgnoreCase(moduleid)){
        	
        	
        	char qdegree=mychecker.getauthdegree(moduleid,unitid,"q");
        	char idegree=mychecker.getauthdegree(moduleid,unitid,"i");
        	char udegree=mychecker.getauthdegree(moduleid,unitid,"u");
        	char ddegree=mychecker.getauthdegree(moduleid,unitid,"d");
        	
        	if(qdegree=='2' | qdegree=='3'|qdegree=='9' |udegree=='2' | udegree=='3'|udegree=='9' |ddegree=='2' | ddegree=='3'|ddegree=='9' )
        	{
        	%>   
        	
        	<tr height="20" >
	          <td  width="20%" class="common" bgcolor="f5f5f5"><%=unitname%></td>
	          <td  width="80%" class="common" >
	          <table border="0" width="100%" height="60%"  class="collapse">
		  
		  	
		  	<%
		  	
		  	recordsetd.beforefirst();
		  	
		  	while(recordsetd.next()){ 
			   String dname=recordsetd.getDI_DepartmentName().trim();
			   String did=recordsetd.getDI_DepartmentID().trim();
			  // out.println(dname);
			   
			%>
				<%if (mdid.equalsIgnoreCase(did)) {%>
				
				<%//////////////////////////////////////////////////////%>
				<%
				if(qdegree=='2'| udegree=='2' |ddegree=='2' |qdegree=='9'| udegree=='9' |ddegree=='9') {
				%>	   
				<tr height="18" >
				<td  class="common"   colspan="4" align="left" bgcolor="f5f5f5">部门:<%=dname%></td>
				</tr>
				
					   <%
						   recordset.beforefirst();
						   System.out.println("did:"+did);
						   while(recordset.next()){
						   //String druid=recordset.getDAR_UserGroupID();
						   String drdeptid=recordset.getDAR_DeptID();						   
						   String drid=recordset.getDAR_RoleID();
						   String drname=recordset.getDAR_RoleName();
						   %>
				   		
						<% if(drdeptid.equalsIgnoreCase(did)) {
						
						theallcount++;%>
						
						<tr height="25" >
					       	<td width="100%" class="common" colspan="4" align="left">对角色:<%=drname%></td>
					       	</tr>	  	
						<tr height="20">
						<%if(qdegree=='2' |qdegree=='9') {%>
						<td class="common"  align="left">
						<%
						int isat=0;
						recordsetdi.beforefirst();
						while(recordsetdi.next()){
						if(recordsetdi.getDAI_ClientRoleID().equalsIgnoreCase(drid)&recordsetdi.getDAI_BasicUnitID().equalsIgnoreCase(moduleid+"-"+unitid)&recordsetdi.getDAI_OperationType().equalsIgnoreCase("q")){
						isat++;
						}
						}%>
						<%if(isat>0){%>
						<input type="checkbox" name="authinfo" checked value="<%=mroleid%>-<%=drid%>-<%=moduleid%>-<%=unitid%>-q">可否浏览
						<%}else{%>
						<input type="checkbox" name="authinfo"  value="<%=mroleid%>-<%=drid%>-<%=moduleid%>-<%=unitid%>-q">可否浏览
						<%}%>
						</td>
						<%}%>
						<%if(udegree=='2' |udegree=='9' ) {%>
						<td class="common"  align="left">
						<%
						int isat=0;
						recordsetdi.beforefirst();
						while(recordsetdi.next()){
						if(recordsetdi.getDAI_ClientRoleID().equalsIgnoreCase(drid)&recordsetdi.getDAI_BasicUnitID().equalsIgnoreCase(moduleid+"-"+unitid)&recordsetdi.getDAI_OperationType().equalsIgnoreCase("u")){
						isat++;
						}
						}%>
						<%if(isat>0){%>
						<input type="checkbox" name="authinfo" checked value="<%=mroleid%>-<%=drid%>-<%=moduleid%>-<%=unitid%>-u">可否修改
						<%}else{%>
						<input type="checkbox" name="authinfo"  value="<%=mroleid%>-<%=drid%>-<%=moduleid%>-<%=unitid%>-u">可否修改
						<%}%>
						</td>
						<%}%>
						<%if(ddegree=='2' |ddegree=='9') {%>
						<td class="common"  align="left">
						<%
						int isat=0;
						recordsetdi.beforefirst();
						while(recordsetdi.next()){
						if(recordsetdi.getDAI_ClientRoleID().equalsIgnoreCase(drid)&recordsetdi.getDAI_BasicUnitID().equalsIgnoreCase(moduleid+"-"+unitid)&recordsetdi.getDAI_OperationType().equalsIgnoreCase("d")){
						isat++;
						}
						}%>
						<%if(isat>0){%>
						<input type="checkbox" name="authinfo" checked value="<%=mroleid%>-<%=drid%>-<%=moduleid%>-<%=unitid%>-d">可否删除
						<%}else{%>
						<input type="checkbox" name="authinfo"  value="<%=mroleid%>-<%=drid%>-<%=moduleid%>-<%=unitid%>-d">可否删除
						<%}%>
						</td>
						<%}%>
						</tr>
					<%}%>        
					<%}%> 
				<tr height="25" >
				<td width="100" class="common" colspan="4"></td>
				</tr> 
				<%}%>
				
				<%} else {%>
				
				<%//////////////////////////////////////////////////////%>
				<%
				if(qdegree=='3'| udegree=='3' |ddegree=='3' |qdegree=='9'| udegree=='9' |ddegree=='9') {
				%>	   
				<tr height="18" >
				<td  class="common"   colspan="4" align="left" bgcolor="f5f5f5">部门:<%=dname%></td>
				</tr>
				
				   <%
						   recordset.beforefirst();
						   while(recordset.next()){
						   //String druid=recordset.getDAR_UserGroupID();
						   String drdeptid=recordset.getDAR_DeptID();
						   String drid=recordset.getDAR_RoleID();
						   String drname=recordset.getDAR_RoleName();
						   %>
				   		
						<% if(drdeptid.equalsIgnoreCase(did)) {
						theallcount++;%>
						
						<tr height="25" >
					       	<td width="100%" class="common" colspan="4" align="left">对角色:<%=drname%></td>
					       	</tr>	  	
					       	
						<tr class="common" height="20">
						<%if(qdegree=='3' |qdegree=='9') {%>
						<td class="common"  align="left">
						<%
						int isat=0;
						recordsetdi.beforefirst();
						while(recordsetdi.next()){
						if(recordsetdi.getDAI_ClientRoleID().equalsIgnoreCase(drid)&recordsetdi.getDAI_BasicUnitID().equalsIgnoreCase(moduleid+"-"+unitid)&recordsetdi.getDAI_OperationType().equalsIgnoreCase("q")){
						isat++;
						}
						}%>
						<%if(isat>0){%>
						<input type="checkbox" name="authinfo" checked value="<%=mroleid%>-<%=drid%>-<%=moduleid%>-<%=unitid%>-q">可否浏览
						<%}else{%>
						<input type="checkbox" name="authinfo"  value="<%=mroleid%>-<%=drid%>-<%=moduleid%>-<%=unitid%>-q">可否浏览
						<%}%>
						</td>
						<%}%>
						<%if(udegree=='3' |udegree=='9' ) {%>
						<td class="common" align="left">
						<%
						int isat=0;
						recordsetdi.beforefirst();
						while(recordsetdi.next()){
						if(recordsetdi.getDAI_ClientRoleID().equalsIgnoreCase(drid)&recordsetdi.getDAI_BasicUnitID().equalsIgnoreCase(moduleid+"-"+unitid)&recordsetdi.getDAI_OperationType().equalsIgnoreCase("u")){
						isat++;
						}
						}%>
						<%if(isat>0){%>
						<input type="checkbox" name="authinfo" checked value="<%=mroleid%>-<%=drid%>-<%=moduleid%>-<%=unitid%>-u">可否修改
						<%}else{%>
						<input type="checkbox" name="authinfo"  value="<%=mroleid%>-<%=drid%>-<%=moduleid%>-<%=unitid%>-u">可否修改
						<%}%>
						</td>
						<%}%>
						<%if(ddegree=='3' |ddegree=='9') {%>
						<td class="common" align="left">
						<%
						int isat=0;
						recordsetdi.beforefirst();
						while(recordsetdi.next()){
						if(recordsetdi.getDAI_ClientRoleID().equalsIgnoreCase(drid)&recordsetdi.getDAI_BasicUnitID().equalsIgnoreCase(moduleid+"-"+unitid)&recordsetdi.getDAI_OperationType().equalsIgnoreCase("d")){
						isat++;
						}
						}%>
						<%if(isat>0){%>
						<input type="checkbox" name="authinfo" checked value="<%=mroleid%>-<%=drid%>-<%=moduleid%>-<%=unitid%>-d">可否删除
						<%}else{%>
						<input type="checkbox" name="authinfo"  value="<%=mroleid%>-<%=drid%>-<%=moduleid%>-<%=unitid%>-d">可否删除
						<%}%>
						</td>
						<%}%>
						</tr>
						
							        
						<%}%>
						<%}%>
						
				<tr height="25" >
				<td width="100" class="common" colspan="4"></td>
				</tr> 
				<%}%>
				
				<%}%>
				
			<%}%>
		  </table>
	          </td>
     
                </tr>
        	
        	<%
        	}
        	}
        	}%>
        <%}%>
        <%if(theallcount>0){%>
	<tr  >
		<td  class="tdC" colspan="5" align="center">		<input type="submit"  onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" value="修 改" name="button11">
		&nbsp;&nbsp;<INPUT name="BtnBack" type="button"   onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" value="返 回" onClick="history.back(1);"> </td>
		
		</tr>     
		<%}%>   
     </table>
	<br>
	</td>
  </tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -