3f6d343e3164650e3b8e6a35e114ac42beaa1986.svn-base 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. <!--框架必需start-->
  6. <script type="text/javascript" src="../../libs/js/jquery.js"></script>
  7. <script type="text/javascript" src="../../libs/js/language/cn.js"></script>
  8. <script type="text/javascript" src="../../libs/js/framework.js"></script>
  9. <link href="../../libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  10. <link rel="stylesheet" type="text/css" id="skin" prePath="../../"/>
  11. <link rel="stylesheet" type="text/css" id="customSkin"/>
  12. <!--框架必需end-->
  13. <!--树组件start -->
  14. <script type="text/javascript" src="../../libs/js/tree/ztree/ztree.js"></script>
  15. <link href="../../libs/js/tree/ztree/ztree.css" rel="stylesheet" type="text/css"/>
  16. <!--树组件end -->
  17. <!--布局控件start-->
  18. <script type="text/javascript" src="../../libs/js/nav/layout.js"></script>
  19. <!--布局控件end-->
  20. </head>
  21. <body>
  22. <div id="layout1">
  23. <div id="leftCon" position="left" style="" panelTitle="组织机构">
  24. <div class="orgTreeContainer">
  25. <ul id="tree-1" class="ztree ztree_org"></ul>
  26. </div>
  27. </div>
  28. <div id="centerCon" position="center" style="">
  29. <IFRAME height="100%" width="100%" frameBorder=0 id=frmright name=frmright src="sample3_1.html" allowTransparency="true"></IFRAME>
  30. </div>
  31. </div>
  32. <script type="text/javascript">
  33. var nodes1 = [
  34. { id:1, parentId:0, name:"中心1", open: true,icon:"../../libs/icons/user_group.gif"},
  35. { id:11, parentId:1, name:"部门1",iconOpen:"../icons/tree_close.gif",iconClose:"../icons/tree_open.gif",icon:"org_child_icon.gif"},
  36. { id:12, parentId:1, name:"部门2",iconOpen:"../icons/tree_close.gif",iconClose:"../icons/tree_open.gif",icon:"org_child_icon.gif"},
  37. { id:13, parentId:1, name:"部门3",iconOpen:"../icons/tree_close.gif",iconClose:"../icons/tree_open.gif",icon:"org_child_icon.gif"},
  38. { id:2, parentId:0, name:"中心2", open: true,icon:"../../libs/icons/user_group.gif"},
  39. { id:21, parentId:2, name:"部门4",iconOpen:"../icons/tree_close.gif",iconClose:"../icons/tree_open.gif",icon:"org_child_icon.gif"},
  40. { id:22, parentId:2, name:"部门5",iconOpen:"../icons/tree_close.gif",iconClose:"../icons/tree_open.gif",icon:"org_child_icon.gif"},
  41. { id:23, parentId:2, name:"部门6",iconOpen:"../icons/tree_close.gif",iconClose:"../icons/tree_open.gif",icon:"org_child_icon.gif"}
  42. ];
  43. var setting = {
  44. view: {
  45. showLine: false,
  46. selectedMulti: false,
  47. dblClickExpand: false
  48. },
  49. callback: {
  50. onClick: onClick
  51. }
  52. };
  53. function onClick(event, treeId, treeNode){
  54. var zTree = $.fn.zTree.getZTreeObj("tree-1");
  55. zTree.expandNode(treeNode);
  56. }
  57. function initComplete(){
  58. $("#layout1").layout({ leftWidth: 150,onEndResize:function(){
  59. }});
  60. //本地数据源
  61. $.fn.zTree.init($("#tree-1"),setting, nodes1);
  62. }
  63. function customHeightSet(contentHeight){
  64. $(".orgTreeContainer").height(contentHeight-30);
  65. }
  66. </script>
  67. </html>