030f00a512a59a777ae6acdaaeb1e45456388d8d.svn-base 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <%@page language="java" pageEncoding="UTF-8"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>组织机构</title>
  7. <!--框架必需start-->
  8. <%@include file="../../include.jsp" %>
  9. <style>
  10. .l-layout-center{
  11. border:none!important;
  12. }
  13. .l-layout-left{
  14. border-bottom:none!important;
  15. }
  16. .l-layout-drophandle-left{
  17. width: 10px;
  18. }
  19. </style>
  20. </head>
  21. <body>
  22. <!-- <div class="b-m-mpanel" style="width: 150px;visibility:hidden;" id="rMenu">
  23. <div class="b-m-item" id="addUnit" onclick="addDept();">
  24. <img align="middle" src="../../../scripts/qui/libs/images/icons/add.png"/><span>新增单位</span>
  25. </div>
  26. <div class="b-m-item" id="addDept" onclick="addDept();">
  27. <img align="middle" src="../../../scripts/qui/libs/images/icons/add.png"/><span>新增部门</span>
  28. </div>
  29. <div class="b-m-item" id="addPerson" onclick="addPerson();">
  30. <img align="middle" src="../../../scripts/qui/libs/images/icons/add.png"/><span>新增人员</span>
  31. </div>
  32. <div class="b-m-item" id="DeletePerson" onclick="deleteData();">
  33. <img align="middle" src="../../../scripts/qui/libs/images/icons/close.png"/><span>删除人员</span>
  34. </div>
  35. <div class="b-m-item" id="DeleteDept" onclick="deleteData();">
  36. <img align="middle" src="../../../scripts/qui/libs/images/icons/close.png"/><span>删除部门</span>
  37. </div>
  38. </div> -->
  39. <table width="100%">
  40. <tr>
  41. <td class="ver01">
  42. <!-- <div class="box2" overflow="auto" showStatus="false" panelTitle="组织机构">
  43. <div class="cusBoxContent" style="width:300px;">
  44. <ul id="treeDept-gzfw" class="ztree"></ul>
  45. </div>
  46. </div> -->
  47. <div class="box2" showStatus="false" panelTitle="组织机构" style="overflow:auto;background-color:#F2F7F9;height:75%;">
  48. <div class="cusBoxContent" style="max-height:1500px;width:300px;overflow : auto;">
  49. <ul id="treeDept-gzfw" class="ztree"></ul>
  50. </div>
  51. </div>
  52. </td>
  53. <td width="100%" class="ver01" >
  54. <div id="tab_menu"></div>
  55. <div class="box1">
  56. <div id="page" style="width:100%;"></div>
  57. </div>
  58. </td>
  59. </tr>
  60. </table>
  61. <script type="text/javascript">
  62. //登陆人的机构id
  63. var loginOrgId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
  64. //示例2相关
  65. var setting = {
  66. view : {
  67. selectedMulti : false
  68. },
  69. edit: {
  70. enable: true,
  71. showRemoveBtn: false,
  72. showRenameBtn: false
  73. },
  74. async : {
  75. enable : true,
  76. dataType : 'JSON',
  77. dataName : 'treeNodes',
  78. aysnc : false,
  79. url : $.pathname()+ "/ws/InDepartmentService/InDepartmentService/getSysOrgInfoById",
  80. autoParam : [ "id", "name", "orgLevel" ],
  81. otherParam : ["deptId", loginOrgId]
  82. },
  83. callback: {
  84. onClick:zTreeSelect
  85. }
  86. };
  87. var zTree,node,tab;
  88. /***
  89. * 页面初始化
  90. */
  91. function initComplete(){
  92. zTree = $.fn.zTree.init($("#treeDept-gzfw"), setting);
  93. // initConstant();
  94. tab = new TabView( {
  95. containerId :'tab_menu',
  96. pageid :'page',
  97. cid :'tab1',
  98. position :"top"
  99. });
  100. }
  101. //点击树节点page/system/department/UserInfoEdit.jsp
  102. function zTreeSelect(event,treeId,treeNode) {
  103. //var type = treeNode.classId;
  104. var url = "DeptEdit.jsp?id="+treeNode.id+"&objectId="+treeNode.id;
  105. /***
  106. if(type=='807'){
  107. url = "UserInfoEdit.jsp?id="+treeNode.id+"&objectId="+treeNode.objectId;
  108. }
  109. */
  110. tabAddHandler(treeNode.id,treeNode.name,url);
  111. }
  112. function tabAddHandler(mid,mtitle,murl){
  113. tab.close(mid);
  114. tab.add({
  115. id :mid,
  116. title :mtitle,
  117. url :murl,
  118. isClosed :true
  119. });
  120. tab.activate(mid);
  121. }
  122. //处理高度自适应,每次浏览器尺寸变化时触发
  123. function customHeightSet(contentHeight){
  124. $(".cusBoxContent").height(contentHeight-50)
  125. $("#page").height(contentHeight-50);
  126. }
  127. </script>
  128. </body>
  129. </html>