employeePrivilegeList.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:6k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page import="com.vnex.intranet.pub.BusinessSession" %>
  2. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  3. <%@ taglib uri="/vnex_hr.tld" prefix="hr" %>
  4. <%@ taglib uri="/vnex_privilegeassign.tld" prefix="privass" %>
  5. <%@ page import="com.vnex.intranet.organization.loader.DivisionLoader" %>
  6. <%@ page import="com.vnex.intranet.organization.value.DivisionValueBean" %>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  8. <HTML>
  9. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  10. <script language="Javascript">
  11. function dochange()
  12. {
  13. var eid = form1.employee.value;
  14. if (eid == "")
  15. window.location = "/mainctrl/personal/privilegeAssign/employeePrivilegeList";
  16. else
  17. window.location = "/mainctrl/personal/privilegeAssign/employeePrivilegeList?empId="+eid;
  18. }
  19. function dodelete(id)
  20. { var index1 = id;
  21. var sname = "form1.privilege"+index;
  22. var privilegeId = sname.value;
  23. var empId = form1.employee.value;
  24. var url1 ="/mainctrl/personal/privilegeAssign/removePrivilege?empId="+empId+"&privilegeId="+privilegeId;
  25. window.location = url1;
  26. }
  27. function addPrivilege(sel,surl)
  28. {
  29. var value = sel.options[sel.selectedIndex].value;
  30. if (value == "") 
  31. {
  32. alert("请选择员工!");
  33. return false;
  34. }
  35. var url1 = surl;
  36. var name = sel.options[sel.selectedIndex].text;
  37. url1 = surl + "?empId="+value +"&empName="+name;
  38. window.location = url1;
  39. }
  40. </script>
  41. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  42. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
  43. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  44. <DIV align=center>
  45. <form name="form1" method="post" action="">
  46.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  47.     <TBODY> 
  48.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  49.     <TR> 
  50.         <TD colSpan=3 align="center" class="iframestyle" valign="top"><br> <!--菜单开始 --> 
  51.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  52.             <tr valign="top" bgcolor="#fafafa"> 
  53.               <td height="33" > 
  54.                 <table width="100%" border="0" cellspacing="0" cellpadding="2">
  55.                   <tr bgcolor="#666666"> 
  56.                     <td><font class="strongw">
  57. <a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;
  58. <a href="/mainctrl/personal/main"><font color="#FFFFFF">个人办公</font></a>&gt;&gt;
  59. <font color="#FFFFFF">权限分发</font></font></td>
  60.                   </tr>
  61.   <tr >
  62.                       
  63.                     <td height="30">
  64.                                           <%
  65. BusinessSession bs = (BusinessSession)session.getAttribute("BusinessName");
  66. String dname = null;
  67. int did = -1;
  68. if (bs != null)
  69. {
  70. dname = bs.getDeptName();                          
  71. did = bs.getDeptId();
  72. }
  73. String temId =request.getParameter("empId");
  74. int empId;
  75. if (temId != null)
  76. empId = Integer.parseInt(temId);
  77. else
  78. empId = 0;
  79. System.out.println("the department id is a ddddddd"+did);
  80. %>
  81.                        员工部门:<%=dname%>&nbsp;&nbsp;  选择姓名 <hr:EmployeeList divisionId='<%=did%>'> 
  82.                       <select name="employee" onchange="dochange()" >
  83. <option >请选择:</option>
  84. <vnex:items  select ='<%=empId+""%>'>
  85. <option value="<hr:EmployeeAttribute attribute="id" />" <hr:EmployeeAttribute attribute="isSelected"/> >
  86. <hr:EmployeeAttribute attribute='<%=null%>'/>
  87. </option>
  88. </vnex:items>
  89. </select>
  90.                       </hr:EmployeeList></td>
  91. </tr>
  92.                 </table>
  93.                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
  94.                   <tr bgcolor="#CCCCCC"> 
  95.                     <td> 
  96.                       <table class=title width="100%" border="0" cellpadding="2" cellspacing="1">
  97.                         <tr bgcolor="#fafafa"> 
  98.                           <td  height="30" colspan=4>&nbsp;&nbsp;
  99. <input type="button" value="添加权限" name="B2"  style="width:60px" onClick="Javascript:addPrivilege(form1.employee,'/mainctrl/personal/privilegeAssign/toGrantPrivilege')" class="text">
  100.                           </td>
  101.                         </tr>
  102. <privass:EmpPrivilegeList empId='<%=empId%>' depId='<%=bs.getDeptId()%>'>
  103.                         <tr > 
  104.                           <td width="25%" height="6" align="center"><font class="strong">权限名称</font></td>
  105.                           <td width="25%" height="6" align="center"><font class="strong">授予者</font></td>
  106.                           <td width="25%" height="6" align="center"><font class="strong">授予日期</font></td>
  107.                           <td width="25%" height="6" align="center"><font class="strong">操作</font></td>
  108.                         </tr>
  109.                         <vnex:items> 
  110.                         <tr bgcolor="<vnex:itemsColor/>"> 
  111.                           <td width="25%" height="12" align="center"><privass:EmpPrivilegeAttribute attribute="privilegeName"/></td>
  112.                           <td width="25%" height="12" align="center"><privass:EmpPrivilegeAttribute attribute="assignerName"/></td>
  113.                           <td width="25%" height="12" align="center"><privass:EmpPrivilegeAttribute attribute="assignDate"/></td>
  114.                           <td width="25%" height="12" align="center"> <a onclick="if (!confirm('确定要删除吗?')) return false;" href="/mainctrl/personal/privilegeAssign/removePrivilege?empId=<privass:EmpPrivilegeAttribute attribute="empId"/>&privilegeId=<privass:EmpPrivilegeAttribute attribute="privilegeId"/>&assignerId=<privass:EmpPrivilegeAttribute attribute="assignerId"/>">删除</a> 
  115.                           </td>
  116.                         </tr>
  117.                         </vnex:items> 
  118. </privass:EmpPrivilegeList> 
  119.                       </table>
  120.                     </td>
  121.                   </tr>
  122.                 </table>
  123.                 
  124.               </td>
  125.             </tr>
  126.           </table>
  127.           <br>
  128.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  129.        </TD>
  130.      </TR>
  131.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  132.     </TBODY> 
  133.   </TABLE>
  134.     <BR>
  135.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  136. </form>
  137. </DIV>
  138. </BODY>
  139. </HTML>