123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!--框架必需start-->
- <script type="text/javascript" src="../../libs/js/jquery.js"></script>
- <script type="text/javascript" src="../../libs/js/language/cn.js"></script>
- <script type="text/javascript" src="../../libs/js/framework.js"></script>
- <link href="../../libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
- <link rel="stylesheet" type="text/css" id="skin" prePath="../../"/>
- <link rel="stylesheet" type="text/css" id="customSkin"/>
- <!--框架必需end-->
- <!--树组件start -->
- <script type="text/javascript" src="../../libs/js/tree/ztree/ztree.js"></script>
- <link href="../../libs/js/tree/ztree/ztree.css" rel="stylesheet" type="text/css"/>
- <!--树组件end -->
- <!--布局控件start-->
- <script type="text/javascript" src="../../libs/js/nav/layout.js"></script>
- <!--布局控件end-->
- </head>
- <body>
- <div id="layout1">
- <div id="leftCon" position="left" style="" panelTitle="组织机构">
- <div class="orgTreeContainer">
- <ul id="tree-1" class="ztree ztree_org"></ul>
- </div>
- </div>
- <div id="centerCon" position="center" style="">
- <IFRAME height="100%" width="100%" frameBorder=0 id=frmright name=frmright src="sample3_1.html" allowTransparency="true"></IFRAME>
- </div>
- </div>
- <script type="text/javascript">
- var nodes1 = [
- { id:1, parentId:0, name:"中心1", open: true,icon:"../../libs/icons/user_group.gif"},
- { id:11, parentId:1, name:"部门1",iconOpen:"../icons/tree_close.gif",iconClose:"../icons/tree_open.gif",icon:"org_child_icon.gif"},
- { id:12, parentId:1, name:"部门2",iconOpen:"../icons/tree_close.gif",iconClose:"../icons/tree_open.gif",icon:"org_child_icon.gif"},
- { id:13, parentId:1, name:"部门3",iconOpen:"../icons/tree_close.gif",iconClose:"../icons/tree_open.gif",icon:"org_child_icon.gif"},
- { id:2, parentId:0, name:"中心2", open: true,icon:"../../libs/icons/user_group.gif"},
- { id:21, parentId:2, name:"部门4",iconOpen:"../icons/tree_close.gif",iconClose:"../icons/tree_open.gif",icon:"org_child_icon.gif"},
- { id:22, parentId:2, name:"部门5",iconOpen:"../icons/tree_close.gif",iconClose:"../icons/tree_open.gif",icon:"org_child_icon.gif"},
- { id:23, parentId:2, name:"部门6",iconOpen:"../icons/tree_close.gif",iconClose:"../icons/tree_open.gif",icon:"org_child_icon.gif"}
- ];
-
- var setting = {
- view: {
- showLine: false,
- selectedMulti: false,
- dblClickExpand: false
- },
- callback: {
- onClick: onClick
- }
- };
- function onClick(event, treeId, treeNode){
- var zTree = $.fn.zTree.getZTreeObj("tree-1");
- zTree.expandNode(treeNode);
- }
-
- function initComplete(){
- $("#layout1").layout({ leftWidth: 150,onEndResize:function(){
-
- }});
-
- //本地数据源
- $.fn.zTree.init($("#tree-1"),setting, nodes1);
- }
-
- function customHeightSet(contentHeight){
- $(".orgTreeContainer").height(contentHeight-30);
- }
- </script>
- </html>
|