user_sel_by_role.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8" %>
  2. <%@ page import="com.redmoon.oa.pvg.*" %>
  3. <%@ page import="com.redmoon.oa.person.*" %>
  4. <%@ page import="com.redmoon.oa.dept.*" %>
  5. <%@ page import="com.redmoon.oa.flow.*" %>
  6. <%@ page import="cn.js.fan.util.*" %>
  7. <%@ page import="java.util.*" %>
  8. <HTML><HEAD><TITLE>选择用户</TITLE>
  9. <link rel="stylesheet" href="common.css">
  10. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  11. <META content="Microsoft FrontPage 4.0" name=GENERATOR><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  12. <style type="text/css">
  13. <!--
  14. .style1 {
  15. font-size: 12pt;
  16. font-weight: bold;
  17. }
  18. -->
  19. </style>
  20. <script>
  21. function selPerson(userName, userRealName) {
  22. var title = window.opener.getActionTitle();
  23. var OfficeColorIndex = window.opener.getActionColorIndex();
  24. var jobCode = window.opener.getActionJobCode();
  25. var jobName = window.opener.getActionJobName();
  26. var proxyJobCode = window.opener.getActionProxyJobCode();
  27. var proxyJobName = window.opener.getActionProxyJobName();
  28. var proxyUserName = window.opener.getActionProxyUserName();
  29. var proxyUserRealName = window.opener.getActionProxyUserRealName();
  30. var fieldWrite = window.opener.getActionFieldWrite();
  31. var checkState = window.opener.getActionCheckState();
  32. var dept = window.opener.getActionDept();
  33. var nodeMode = <%=WorkflowActionDb.NODE_MODE_ROLE_SELECTED%>;
  34. window.opener.ModifyAction(userName, title, OfficeColorIndex, userRealName, jobCode, jobName, proxyJobCode, proxyJobName, proxyUserName, proxyUserRealName, fieldWrite, checkState, nodeMode);
  35. window.close();
  36. }
  37. </script>
  38. </HEAD>
  39. <BODY bgColor=#FBFAF0 leftMargin=4 topMargin=8 rightMargin=0 class=menubar>
  40. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  41. <%
  42. String priv="read";
  43. if (!privilege.isUserPrivValid(request,priv))
  44. {
  45. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  46. return;
  47. }
  48. String roleCodes = ParamUtil.get(request, "roleCodes");
  49. String[] ary = StrUtil.split(roleCodes, ",");
  50. int len = 0;
  51. if (ary==null) {
  52. return;
  53. }
  54. len = ary.length;
  55. %>
  56. <table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableframe">
  57.   <tr> 
  58.     <td height="24" colspan="4" align="center" class="right-title"><span>用户角色</span></td>
  59.   </tr>
  60.   <tr> 
  61.     <td width="3%">&nbsp;</td>
  62.     <td colspan="2" valign="top">
  63. <%
  64. String showCode = ParamUtil.get(request, "showCode");
  65. String code;
  66. String desc;
  67. RoleDb urole = new RoleDb();
  68. Iterator userir = null;
  69. if (!showCode.equals("")) {
  70. urole = urole.getRoleDb(showCode);
  71. userir = urole.getAllUserOfRole().iterator();
  72. }
  73. else
  74. userir = (new Vector()).iterator();
  75. %>
  76.       <br>
  77.       <table width="95%" align="center">
  78.         <tbody>
  79. <%
  80. for (int i=0; i<len; i++) {
  81.   RoleDb ug = urole.getRoleDb(ary[i]);
  82. code = ug.getCode();
  83. desc = ug.getDesc();
  84. %>
  85.           <tr class="row" style="BACKGROUND-COLOR: #ffffff">
  86.             <td width="31%">
  87.   <a href="?showCode=<%=StrUtil.UrlEncode(code)%>&roleCodes=<%=StrUtil.UrlEncode(roleCodes)%>" menu="true"><%=desc%></a> </td>
  88.           </tr>
  89. <%}%>
  90.         </tbody>
  91.       </table> </td>
  92.     <td width="63%" align="center" valign="top" bgcolor="#F3F3F3">
  93. <div id="resultTable">
  94.   <table width="100%" border="0" cellpadding="4" cellspacing="0">
  95.       <thead>
  96.         <tr>
  97.           <th width="91" align="left" bgcolor="#B4D3F1">职员</th>
  98.           </tr>
  99.       </thead>
  100.       <tbody id="postsbody">
  101.   <%
  102.   while (userir.hasNext()) {
  103.    UserDb ud = (UserDb)userir.next();
  104.   %>
  105.   <tr>
  106.     <td><a onClick="selPerson('<%=ud.getName()%>', '<%=ud.getRealName()%>')" href="#"><%=ud.getRealName()%></a></td>
  107.     </tr>
  108.   <%}%>
  109.       </tbody>
  110.     </table>
  111. </div><table width="100%" border="0" cellspacing="0" cellpadding="0">
  112.   <tr>
  113.     <td height="30" align="center">&nbsp;</td>
  114.   </tr>
  115. </table> </td>
  116.   </tr>
  117. </table>
  118. </BODY></HTML>