adminManage.jsp 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
  2. <%@page import="com.ccgj.platform.util.GlobalDefine"%>
  3. <%@page import="com.opensymphony.xwork2.ActionContext"%>
  4. <%@ page import="com.ccgj.database.beans.YHB"%>
  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. <title>管理员---导航主页</title>
  9. <link href="../ligerui/lib/ligerUI/skins/Aqua/css/ligerui-all.css"
  10. rel="stylesheet" type="text/css" />
  11. <link href="css/all.css" rel="stylesheet" type="text/css" />
  12. <!-- ztree-css -->
  13. <link href="css/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css" />
  14. <script src="../ligerui/lib/jquery/jquery-1.5.2.min.js"
  15. type="text/javascript"></script>
  16. <!-- ztree-js -->
  17. <script src="js/jquery.ztree.core-3.5.js" type="text/javascript"></script>
  18. <script src="../ligerui/lib/ligerUI/js/ligerui.min.js"
  19. type="text/javascript"></script>
  20. <script src="../ligerui/indexdata.js" type="text/javascript"></script>
  21. <script src="../manage/js/json2.js" type="text/javascript"></script>
  22. <script type="text/javascript">
  23. var tab = null;
  24. var accordion = null;
  25. var tree = null;
  26. $(function() {
  27. //布局
  28. $("#layout1").ligerLayout( {
  29. leftWidth : 190,
  30. height : '100%',
  31. heightDiff : -34,
  32. space : 4,
  33. onHeightChanged : f_heightChanged
  34. });
  35. var height = $(".l-layout-center").height();
  36. //Tab
  37. $("#framecenter").ligerTab( {
  38. height : height
  39. });
  40. //面板
  41. $("#accordion1").ligerAccordion( {
  42. height : height - 24,
  43. speed : null
  44. });
  45. $(".l-link").hover(function() {
  46. $(this).addClass("l-link-over");
  47. }, function() {
  48. $(this).removeClass("l-link-over");
  49. });
  50. var setting = {
  51. view: {
  52. //dblClickExpand: false,
  53. expandSpeed: 100 //设置树展开的动画速度
  54. },
  55. //获取json数据
  56. async : {
  57. enable : true,
  58. url : "columns!init?extendFlag=false", // Ajax 获取数据的 URL 地址
  59. autoParam : [ "id", "name" ] //ajax提交的时候,传的是id值
  60. },
  61. data:{ // 必须使用data
  62. simpleData : {
  63. enable : true,
  64. idKey : "id", // id编号命名
  65. pIdKey : "pid", // 父id编号命名
  66. rootPId : 0
  67. }
  68. },
  69. // 回调函数
  70. //?????treeId
  71. callback : {
  72. onClick : function(event, treeId, treeNode, clickFlag) {
  73. if (!treeNode.jump){
  74. return;
  75. }
  76. if(true) {
  77. f_addTab(treeNode.id, treeNode.name, treeNode.jump);
  78. return;
  79. }
  80. },
  81. //捕获异步加载出现异常错误的事件回调函数 和 成功的回调函数
  82. onAsyncSuccess : function(event, treeId, treeNode, msg){
  83. }
  84. }
  85. };
  86. // 过滤函数
  87. function filter(treeId, parentNode, childNodes) {
  88. if (!childNodes)
  89. return null;
  90. for ( var i = 0, l = childNodes.length; i < l; i++) {
  91. childNodes[i].name = childNodes[i].name.replace(/\.n/g, '.');
  92. }
  93. return childNodes;
  94. }
  95. //
  96. $(document).ready(function() {
  97. $.fn.zTree.init($("#tree1"), setting );
  98. });
  99. tab = $("#framecenter").ligerGetTabManager();
  100. accordion = $("#accordion1").ligerGetAccordionManager();
  101. //tree = $("#tree1").ligerGetTreeManager();
  102. $("#pageloading").hide();
  103. });
  104. function f_heightChanged(options) {
  105. if (tab)
  106. tab.addHeight(options.diff);
  107. if (accordion && options.middleHeight - 24 > 0)
  108. accordion.setHeight(options.middleHeight - 24);
  109. }
  110. function f_addTab(tabid, text, url) {
  111. tab.addTabItem( {
  112. tabid : tabid,
  113. text : text,
  114. url : url
  115. });
  116. }
  117. function exit(){
  118. $.ajax({
  119. type:"post",
  120. url:'manage/login!exit',
  121. dataType:'json',
  122. success: function(success){
  123. if(success.msg == "1"){
  124. window.location.href = "login.jsp";
  125. }
  126. }
  127. });
  128. }
  129. </script>
  130. <%
  131. String id="";
  132. String name="";
  133. if(ActionContext.getContext().getSession().get(GlobalDefine.USER) != null){
  134. YHB yhbBean = (YHB) ActionContext.getContext().getSession().get(GlobalDefine.USER);
  135. id = yhbBean.getId().toString();
  136. name = yhbBean.getYhmc().toString().trim();
  137. }else{
  138. out.print("<script>alert('操作延时,请重新登陆!');parent.window.location.href='login.jsp'</script>");
  139. return;
  140. }
  141. %>
  142. </head>
  143. <body style="padding: 0px; background: #EAEEF5;">
  144. <div id="pageloading"></div>
  145. <div id="topmenu" class="l-topmenu">
  146. <div class="l-topmenu-logo">
  147. 管理员
  148. </div>
  149. <div class="l-topmenu-welcome">
  150. <a href="../main/80/index.html" class="l-link2" target="_blank">首页</a>
  151. <span class="space">|</span>
  152. <a href="javascript:f_addTab('superAdmin','个人中心','manageAdmin/manageAdmin!init?yhsx=3&id=<%=id%>')">个人中心</a>
  153. <span class="space">|</span>
  154. <a href="" class="l-link2" onclick="exit()">退出</a>
  155. </div>
  156. </div>
  157. <div id="layout1"
  158. style="width: 99.2%; margin: 0 auto; margin-top: 4px;">
  159. <div position="left" title="功能菜单" id="accordion1" style="overflow:auto;width:100%" >
  160. <ul id="tree1" style="margin-top: 3px;" class="ztree"></ul>
  161. <ul id="tree2" style="margin-top: 3px;"></ul>
  162. </div>
  163. <div position="center" id="framecenter">
  164. <div tabid="home" title="我的主页" style="height: 300px">
  165. <iframe frameborder="0" name="home" id="home" src="welcome.jsp"></iframe>
  166. </div>
  167. </div>
  168. </div>
  169. <div style="height: 32px; line-height: 32px; text-align: center;">
  170. <iframe frameborder="0" name="foot" id="foot" src="foot.jsp" width="400px" height="32px" scrolling="no"></iframe>
  171. </div>
  172. <div style="display: none"></div>
  173. </body>
  174. </html>