70a8b4680de317ab9e3b4ac81de9364aea10181b.svn-base 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%
  3. String path = request.getContextPath();
  4. %>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  9. <title>用户管理</title>
  10. <!--分离模式框架必需start-->
  11. <script type="text/javascript" src="<%=path%>/libs/js/jquery.js"></script>
  12. <script type="text/javascript" src="<%=path%>/libs/js/language/cn.js"></script>
  13. <script type="text/javascript" src="<%=path%>/libs/js/framework.js"></script>
  14. <link href="<%=path%>/libs/css/import_basic.css" rel="stylesheet" type="text/css" id="theme" themeColor="blue"/>
  15. <link rel="stylesheet" type="text/css" id="skin" prePath="<%=path%>/" splitMode="true" href="<%=path%>/libs/skins/blue/style.css"/>
  16. <link rel="stylesheet" type="text/css" id="customSkin" href="<%=path%>/system/layout/skin/style.css"/>
  17. <!--分离模式框架必需end-->
  18. <!--树组件start -->
  19. <script type="text/javascript" src="<%=path%>/libs/js/tree/ztree/ztree.js"></script>
  20. <link href="<%=path%>/libs/js/tree/ztree/ztree.css" rel="stylesheet" type="text/css"/>
  21. <!--树组件end -->
  22. <!--数据表格start-->
  23. <script src="<%=path%>/libs/js/table/quiGrid.js" type="text/javascript"></script>
  24. <!--数据表格end-->
  25. <!--弹窗组件start-->
  26. <script type="text/javascript" src="<%=path%>/libs/js/popup/drag.js"></script>
  27. <script type="text/javascript" src="<%=path%>/libs/js/popup/dialog.js"></script>
  28. <!--弹窗组件end-->
  29. </head>
  30. <body>
  31. <table width="100%" >
  32. <tr>
  33. <!--左侧区域start-->
  34. <td class="ver01" >
  35. <div class="box2" overflow="auto" showStatus="false" panelTitle="组织结构树">
  36. <div class="cusBoxContent" style="width:150px;">
  37. <ul id="tree-1" class="ztree"></ul>
  38. </div>
  39. </div>
  40. </td>
  41. <!--左侧区域end-->
  42. <!--右侧区域start-->
  43. <td width="100%" class="ver01" >
  44. <div class="box2" panelTitle="查询" showStatus="false">
  45. <form id="queryForm" method="post">
  46. <table>
  47. <tr>
  48. <td>名称:</td>
  49. <td><input type="text" /></td>
  50. <td><button id="search"><span class="icon_find">查询</span></button></td>
  51. <td><button id="resetButton"><span class="icon_clear">重置</span></button></td>
  52. </tr>
  53. </table>
  54. </form>
  55. </div>
  56. <div id="maingrid"></div>
  57. </td>
  58. <!--右侧区域end-->
  59. </tr>
  60. </table>
  61. <script type="text/javascript">
  62. var nodes1 = [
  63. { id:1, parentId:0, name:"中心1", open: true,icon:"<%=path%>/libs/icons/user_group.gif"},
  64. { id:11, parentId:1, name:"部门1",icon:"<%=path%>/libs/icons/user_group.gif"},
  65. { id:12, parentId:1, name:"部门2",icon:"<%=path%>/libs/icons/user_group.gif"},
  66. { id:13, parentId:1, name:"部门3",icon:"<%=path%>/libs/icons/user_group.gif"},
  67. { id:2, parentId:0, name:"中心2", open: true,icon:"<%=path%>/libs/icons/user_group.gif"},
  68. { id:21, parentId:2, name:"部门4",icon:"<%=path%>/libs/icons/user_group.gif"},
  69. { id:22, parentId:2, name:"部门5",icon:"<%=path%>/libs/icons/user_group.gif"},
  70. { id:23, parentId:2, name:"部门6",icon:"<%=path%>/libs/icons/user_group.gif"}
  71. ];
  72. //数据表格使用
  73. var gridData={"form.paginate.pageNo":1,"form.paginate.totalRows":13,"rows":[
  74. {"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},
  75. {"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},
  76. {"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},
  77. {"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},
  78. {"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},
  79. {"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},
  80. {"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},
  81. {"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},
  82. {"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},
  83. {"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},
  84. {"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},
  85. {"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}
  86. ]}
  87. var g;
  88. function initComplete(){
  89. //本地数据源
  90. $.fn.zTree.init($("#tree-1"), {}, nodes1);
  91. g = $("#maingrid").quiGrid({
  92. columns: [
  93. { display: '姓名', name: 'name', align: 'left', width: "20%"},
  94. { display: '性别', name: 'sex', align: 'left', width: "20%"},
  95. { display: '部门', name: 'deptName', align: 'left', width: "20%", isSort:false},
  96. { display: '学历', name: 'degree', align: 'left', width: "20%" },
  97. { display: '操作', isAllowHide: false, align: 'left', width: 80,
  98. //操作列渲染为图标
  99. render: function (rowdata, rowindex, value, column){
  100. return '<div class="padding_top4 padding_left5">'
  101. + '<span class="img_view hand" title="查看" onclick="onView(' + rowdata.id + ')"></span>'
  102. + '<span class="img_edit hand" title="修改" onclick="onEdit(' + rowdata.id + ')"></span>'
  103. + '<span class="img_delete hand" title="删除" onclick="onDelete(' + rowdata.id+','+rowindex + ')"></span>'
  104. + '</div>';
  105. }
  106. }
  107. ],
  108. data:gridData, pageSize: 10, sortName: 'id',rownumbers:true,checkbox:true,
  109. height: '100%', width:"100%",
  110. //顶部图标按钮栏
  111. toolbar:
  112. {
  113. items: [
  114. { text: '新增', click: addUser, iconClass: 'icon_add' },
  115. { line: true },
  116. { text: '批量删除', click: deleteUser, iconClass: 'icon_delete' },
  117. { line: true },
  118. { text: '导入', click: importUser, iconClass: 'icon_import' },
  119. { line: true },
  120. { text: '导出当前页', click: exportUser, iconClass: 'icon_export' },
  121. { line: true },
  122. { text: '导出所有', click: exportUser2, iconClass: 'icon_export' }
  123. ]
  124. }
  125. });
  126. }
  127. //添加
  128. function addUser() {
  129. Dialog.open({URL:"<%=path%>/sample/split/user-management-content.jsp",Title:"新增",Width:500,Height:330});
  130. }
  131. //批量删除
  132. function deleteUser() {
  133. top.Dialog.alert("向后台发送ajax请求来批量删除。见JAVA版或.NET版演示。");
  134. }
  135. //导入
  136. function importUser() {
  137. top.Dialog.alert("见JAVA版或.NET版演示。");
  138. }
  139. //导出
  140. function exportUser() {
  141. top.Dialog.alert("见JAVA版或.NET版演示。");
  142. }
  143. //导出所有
  144. function exportUser2() {
  145. top.Dialog.alert("见JAVA版或.NET版演示。");
  146. }
  147. //查看
  148. function onView(rowid){
  149. alert("选择的记录Id是:" + rowid );
  150. Dialog.open({URL:"<%=path%>/sample/split/user-management-content2.jsp",Title:"查看",Width:500,Height:330});
  151. }
  152. //修改
  153. function onEdit(rowid){
  154. top.Dialog.alert("见JAVA版或.NET版演示。");
  155. }
  156. //删除
  157. function onDelete(rowid,rowidx){
  158. top.Dialog.confirm("确定要删除该记录吗?",function(){
  159. top.Dialog.alert("向后台发送ajax请求来删除。见JAVA版或.NET版演示。");
  160. });
  161. }
  162. function customHeightSet(contentHeight){
  163. $(".cusBoxContent").height(contentHeight-48)
  164. }
  165. </script>
  166. </body>
  167. </html>