ec5cb1e4df2b50485dfe801d0fd37df0c71d2f9e.svn-base 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title></title>
  6. <!--框架必需start-->
  7. <script type="text/javascript" src="../../libs/js/jquery.js"></script>
  8. <script type="text/javascript" src="../../libs/js/language/cn.js"></script>
  9. <script type="text/javascript" src="../../libs/js/framework.js"></script>
  10. <link href="../../libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  11. <link rel="stylesheet" type="text/css" id="skin" prePath="../../" scrollerY="false"/>
  12. <link rel="stylesheet" type="text/css" id="customSkin"/>
  13. <!--框架必需end-->
  14. <!--树组件start -->
  15. <script type="text/javascript" src="../../libs/js/tree/ztree/ztree.js"></script>
  16. <link href="../../libs/js/tree/ztree/ztree.css" rel="stylesheet" type="text/css"/>
  17. <!--树组件end -->
  18. <!--动态选项卡start-->
  19. <script type="text/javascript" src="../../libs/js/nav/dynamicTab.js"></script>
  20. <!--动态选项卡end-->
  21. </head>
  22. <body>
  23. <table width="100%">
  24. <tr>
  25. <td class="ver01">
  26. <div class="box2" overflow="auto" showStatus="false" panelTitle="导航菜单">
  27. <div class="cusBoxContent" style="width:150px;">
  28. <ul id="tree1" class="ztree"></ul>
  29. </div>
  30. </div>
  31. </td>
  32. <td width="100%" class="ver01">
  33. <div id="tab_menu"></div>
  34. <div class="box1">
  35. <div id="page" style="width:100%;"></div>
  36. </div>
  37. </td>
  38. </tr>
  39. </table>
  40. <script>
  41. var setting = {
  42. data: {
  43. simpleData: {
  44. enable: true
  45. }
  46. },
  47. callback: {
  48. onClick: treeOnClick
  49. }
  50. };
  51. var nodes1 = [
  52. { id:1, parentId:0, name:"中心1", open: true,icon:"../../libs/icons/user_group.gif"},
  53. { id:11, parentId:1, name:"部门1人员列表",icon:"../../libs/icons/user_group.gif",pageUrl:"../../sample_html/layout/layout-htab-content2.html"},
  54. { id:12, parentId:1, name:"部门2人员列表",icon:"../../libs/icons/user_group.gif",pageUrl:"../../sample_html/layout/layout-htab-content2.html"},
  55. { id:13, parentId:1, name:"部门3人员列表",icon:"../../libs/icons/user_group.gif",pageUrl:"../../sample_html/layout/layout-htab-content2.html"},
  56. { id:2, parentId:0, name:"中心2", open: true,icon:"../../libs/icons/user_group.gif"},
  57. { id:21, parentId:2, name:"部门4人员列表",icon:"../../libs/icons/user_group.gif",pageUrl:"../../sample_html/layout/layout-htab-content2.html"},
  58. { id:22, parentId:2, name:"部门5人员列表",icon:"../../libs/icons/user_group.gif",pageUrl:"../../sample_html/layout/layout-htab-content2.html"},
  59. { id:23, parentId:2, name:"部门6人员列表",icon:"../../libs/icons/user_group.gif",pageUrl:"../../sample_html/layout/layout-htab-content2.html"},
  60. { id:24, parentId:2, name:"部门7人员列表",icon:"../../libs/icons/user_group.gif",pageUrl:"../../sample_html/layout/layout-htab-content2.html"},
  61. { id:25, parentId:2, name:"部门8人员列表",icon:"../../libs/icons/user_group.gif",pageUrl:"../../sample_html/layout/layout-htab-content2.html"},
  62. { id:26, parentId:2, name:"部门9人员列表",icon:"../../libs/icons/user_group.gif",pageUrl:"../../sample_html/layout/layout-htab-content2.html"},
  63. { id:27, parentId:2, name:"部门10人员列表",icon:"../../libs/icons/user_group.gif",pageUrl:"../../sample_html/layout/layout-htab-content2.html"}
  64. ];
  65. var tab;
  66. function initComplete(){
  67. $.fn.zTree.init($("#tree1"), setting, nodes1);
  68. tab = new TabView( {
  69. containerId :'tab_menu',
  70. pageid :'page',
  71. cid :'tab1',
  72. position :"top"
  73. });
  74. tab.add( {
  75. id :'tab1_index1',
  76. title :"表单填写",
  77. url :"../../sample_html/layout/layout-htab-content1.html",
  78. isClosed :false
  79. });
  80. }
  81. function treeOnClick(e,treeId, treeNode) {
  82. if(treeNode.pageUrl!=null){
  83. showProgressBar();
  84. //调用方法弹出tab
  85. tabAddHandler(treeNode.id,treeNode.name,treeNode.pageUrl)
  86. }
  87. }
  88. function tabAddHandler(mid,mtitle,murl){
  89. tab.add( {
  90. id :mid,
  91. title :mtitle,
  92. url :murl,
  93. isClosed :true
  94. });
  95. tab.activate(mid)
  96. }
  97. function customHeightSet(contentHeight){
  98. $(".cusBoxContent").height(contentHeight-50)
  99. $("#page").height(contentHeight-50);
  100. }
  101. </script>
  102. </body>
  103. </html>