49d83064e2862ec28de4d64b287582b6e925c468.svn-base 5.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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="../../"/>
  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 src="../../libs/js/table/quiGrid.js" type="text/javascript"></script>
  20. <!--数据表格end-->
  21. </head>
  22. <body>
  23. <table width="100%">
  24. <tr>
  25. <td class="ver01">
  26. <div class="box1" whiteBg="true" panelWidth="180" panelHeight="328">
  27. <div>
  28. <ul id="tree-1" class="ztree"></ul>
  29. </div>
  30. </div>
  31. </td>
  32. <td class="ver01">
  33. <div class="box1" whiteBg="true">
  34. <div id="maingrid" style="overflow:hidden;">
  35. </div>
  36. </div>
  37. </td>
  38. </tr>
  39. </table>
  40. <script>
  41. var nodes1 = [
  42. { id:1, parentId:0, name:"中心1", open: true,icon:"../../libs/icons/user_group.gif"},
  43. { id:11, parentId:1, name:"部门1",icon:"../../libs/icons/user_group.gif"},
  44. { id:12, parentId:1, name:"部门2",icon:"../../libs/icons/user_group.gif"},
  45. { id:13, parentId:1, name:"部门3",icon:"../../libs/icons/user_group.gif"},
  46. { id:2, parentId:0, name:"中心2", open: true,icon:"../../libs/icons/user_group.gif"},
  47. { id:21, parentId:2, name:"部门4",icon:"../../libs/icons/user_group.gif"},
  48. { id:22, parentId:2, name:"部门5",icon:"../../libs/icons/user_group.gif"},
  49. { id:23, parentId:2, name:"部门6",icon:"../../libs/icons/user_group.gif"}
  50. ];
  51. //数据表格使用
  52. var gridData={"form.paginate.pageNo":1,"form.paginate.totalRows":13,"rows":[
  53. {"deptName":"部门1","sex":"女","remark":"好啊","hobby":["唱歌"],"beginworkDate":"2012-06-13 00:00:00.0","photo":null,"version":null,"id":125,"degree":"硕士结业","age":20,"name":"员工1","deptId":12,"ability":5},
  54. {"deptName":"部门1","sex":"男","remark":"备注啊","hobby":["唱歌"],"beginworkDate":"2012-06-13 00:00:00.0","photo":null,"version":null,"id":124,"degree":"本科毕业","age":20,"name":"员工2","deptId":11,"ability":5},
  55. {"deptName":"部门1","sex":"男","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-12 00:00:00.0","photo":null,"version":null,"id":123,"degree":"本科毕业","age":20,"name":"员工3","deptId":9,"ability":5},
  56. {"deptName":"部门1","sex":"女","remark":"不错啊","hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-12 00:00:00.0","photo":null,"version":null,"id":121,"degree":"硕士肄业","age":20,"name":"员工4","deptId":8,"ability":5},
  57. {"deptName":"部门1","sex":"男","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-12 00:00:00.0","photo":null,"version":null,"id":120,"degree":"博士肄业","age":20,"name":"员工5","deptId":7,"ability":5},
  58. {"deptName":"部门2","sex":"女","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-05 00:00:00.0","photo":null,"version":null,"id":119,"degree":"博士肄业","age":20,"name":"员工6","deptId":6,"ability":5},
  59. {"deptName":"部门2","sex":"女","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-05 00:00:00.0","photo":null,"version":null,"id":119,"degree":"博士肄业","age":20,"name":"员工7","deptId":6,"ability":5},
  60. {"deptName":"部门2","sex":"女","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-05 00:00:00.0","photo":null,"version":null,"id":119,"degree":"博士肄业","age":20,"name":"员工8","deptId":6,"ability":5},
  61. {"deptName":"部门2","sex":"女","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-05 00:00:00.0","photo":null,"version":null,"id":119,"degree":"博士肄业","age":20,"name":"员工9","deptId":6,"ability":5},
  62. {"deptName":"部门2","sex":"女","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-05 00:00:00.0","photo":null,"version":null,"id":119,"degree":"博士肄业","age":20,"name":"员工10","deptId":6,"ability":5},
  63. {"deptName":"部门2","sex":"女","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-05 00:00:00.0","photo":null,"version":null,"id":119,"degree":"博士肄业","age":20,"name":"员工11","deptId":6,"ability":5},
  64. {"deptName":"部门2","sex":"女","remark":null,"hobby":["唱歌","跳舞"],"beginworkDate":"2012-06-05 00:00:00.0","photo":null,"version":null,"id":119,"degree":"博士肄业","age":20,"name":"员工12","deptId":6,"ability":5}
  65. ]}
  66. var g;
  67. function initComplete(){
  68. //本地数据源
  69. $.fn.zTree.init($("#tree-1"), {}, nodes1);
  70. g = $("#maingrid").quiGrid({
  71. columns: [
  72. { display: '姓名', name: 'name', align: 'left', width: "80"},
  73. { display: '性别', name: 'sex', align: 'left', width: "50"},
  74. { display: '部门', name: 'deptName', align: 'left', width: "100", isSort:false},
  75. { display: '学历', name: 'degree', align: 'left', width: "100" }
  76. ],
  77. //pageSize默认为10,可以不配置
  78. data:gridData, pageSize: 10, sortName: 'id',rownumbers:true,total:35,
  79. height: '335', width:"365"
  80. });
  81. }
  82. function selectUser(){
  83. var row = g.getSelectedRow();
  84. if (!row) {
  85. top.Dialog.alert('请选择用户');
  86. }
  87. else{
  88. top.frmright.document.getElementById("userName").value=row.name;
  89. top.Dialog.close();
  90. }
  91. }
  92. </script>
  93. </body>
  94. </html>