gradeManage.jsp 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/commons/include/html_doctype.html"%>
  3. <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  4. <%@taglib prefix="f" uri="http://www.jee-soft.cn/functions"%>
  5. <c:set var="ctx" value="${pageContext.request.contextPath}" />
  6. <html>
  7. <head>
  8. <title>分级组织管理</title>
  9. <%@include file="/commons/include/get.jsp"%>
  10. <f:link href="tree/zTreeStyle.css"></f:link>
  11. <script type="text/javascript" src="${ctx}/js/tree/jquery.ztree.js"></script>
  12. <script type="text/javascript" src="${ctx}/js/hotent/platform/system/OrgManage.js"></script>
  13. <script type="text/javascript">
  14. var contextMenu=null;
  15. $(function() {
  16. $("#layout").ligerLayout({
  17. leftWidth : 220,
  18. height : '100%',
  19. allowLeftResize : false
  20. });
  21. height = $('#layout').height();
  22. $("#viewFrame").height(height - 25);
  23. $("#treeReFresh").click(function() {
  24. OrgTree.loadTree();
  25. });
  26. $("#treeExpand").click(function() {
  27. OrgTree.orgTree.expandAll(true);
  28. });
  29. $("#treeCollapse").click(function() {
  30. OrgTree.orgTree.expandAll(false);
  31. });
  32. getMenu();
  33. OrgTree.loadTree();
  34. });
  35. //右键菜单
  36. function getMenu() {
  37. contextMenu = $.ligerMenu({
  38. top : 100,
  39. left : 100,
  40. width : 100,
  41. items: getMenuItem()
  42. });
  43. };
  44. function getMenuItem(){
  45. var orgPerms = $("#orgAuth").children('option:selected').attr("orgPerms");
  46. var orgauthPerms = $("#orgAuth").children('option:selected').attr("orgauthPerms");
  47. var posPerms = $("#orgAuth").children('option:selected').attr("posPerms");
  48. var items=[];
  49. if(orgPerms.indexOf("add")>-1) {
  50. items.push({text : '增加',click: OrgTree.addOrg,alias:'gradeOrgEdit'});
  51. }
  52. if(orgPerms.indexOf("edit")>-1) {
  53. items.push({text : '编辑',click: OrgTree.editOrg,alias:'11'});
  54. }
  55. if(orgPerms.indexOf("del")>-1) {
  56. items.push({text : '删除',click: OrgTree.delNode,alias:'delOrg'});
  57. }
  58. if(orgauthPerms !=""){
  59. items.push({text : '设置管理员',click: OrgTree.orgAuth,alias:''});
  60. }
  61. items.push({text : '参数属性',click: OrgTree.orgParam,alias:''});
  62. return items;
  63. }
  64. </script>
  65. <style type="text/css">
  66. html {height: 100%}
  67. body {padding: 0px;margin: 0;overflow: auto;}
  68. #layout {width: 99.5%;margin: 0;padding: 0;}
  69. </style>
  70. </head>
  71. <body>
  72. <div id="layout" style="bottom: 1; top: 1">
  73. <c:choose>
  74. <c:when test="${not empty orgAuthList}">
  75. <div position="left" title="组织机构管理" id="rogTree" style="height: 100%; width: 100% !important;">
  76. <div style="width:100%;">
  77. <select id="orgAuth" style="width:99.8% !important;" onchange="javascript:OrgTree.loadTree();">
  78. <c:forEach var="orgAuth" items="${orgAuthList}">
  79. <option value="${orgAuth.orgId}" authId="${orgAuth.id}" dimId="${orgAuth.dimId}" orgPerms="${orgAuth.orgPerms}" orgauthPerms="${orgAuth.orgauthPerms}" posPerms="${orgAuth.posPerms}" >${orgAuth.orgName}—[${orgAuth.dimName}]</option>
  80. </c:forEach>
  81. </select>
  82. </div>
  83. <div class="tree-toolbar" id="pToolbar">
  84. <div class="toolBar"
  85. style="text-overflow: ellipsis; overflow: hidden; white-space: nowrap">
  86. <div class="group">
  87. <a class="link reload" id="treeReFresh" ></a>
  88. </div>
  89. <div class="l-bar-separator"></div>
  90. <div class="group">
  91. <a class="link expand" id="treeExpand" ></a>
  92. </div>
  93. <div class="l-bar-separator"></div>
  94. <div class="group">
  95. <a class="link collapse" id="treeCollapse" ></a>
  96. </div>
  97. </div>
  98. </div>
  99. <ul id="orgTree" class="ztree" style="height: 100%;width: 100%"></ul>
  100. </div>
  101. <div position="center" id="orgView" style="height: 100%;">
  102. <div class="l-layout-header">组织架构信息</div>
  103. <iframe id="viewFrame" frameborder="0" width="100%" height="100%"></iframe>
  104. </div>
  105. </c:when>
  106. <c:otherwise><div style="width:100%;text-align: center;margin-top: 10%;">您不是分级管理员,或者尚未授权管理任何组。<div></c:otherwise>
  107. </c:choose>
  108. </div>
  109. </body>
  110. </html>