phonetreeList.jsp 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="UTF-8"%>
  2. <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  3. <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  8. <script type="text/javascript">
  9. var pictype = "0";
  10. </script>
  11. <title></title>
  12. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  13. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  14. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  15. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  16. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  17. <script src="/shares/js/yw/sales/ligerui.all.js" type="text/javascript"></script>
  18. <script type="text/javascript" src="/shares/js/constant.js"></script>
  19. <script type="text/javascript" src="/shares/js/common.js"></script>
  20. <script type="text/javascript" src="/shares/js/yw/sales/typeTree.js"></script>
  21. <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  22. <style type="text/css">
  23. body,html{height:100%;}
  24. body{ padding:0px; margin:0; overflow:hidden;}
  25. .l-link{ display:block; height:26px; line-height:26px; padding-left:10px; text-decoration:underline; color:#333;}
  26. .l-link2{text-decoration:underline; color:white;}
  27. .l-layout-top{background:#102A49; color:White;}
  28. .l-layout-bottom{ background:#E5EDEF; text-align:center;}
  29. #pageloading{position:absolute; left:0px; top:0px; background:white url('loading.gif') no-repeat center; width:100%; height:100%;z-index:99999;}
  30. .l-link{ display:block; line-height:22px; height:22px; padding-left:20px;border:1px solid white; margin:4px;}
  31. .l-link-over{ background:#FFEEAC; border:1px solid #DB9F00;}
  32. .l-winbar{ background:#2B5A76; height:30px; position:absolute; left:0px; bottom:0px; width:100%; z-index:99999;}
  33. </style>
  34. <script type="text/javascript">
  35. var grid = null;
  36. function initGrid() {
  37. var checkbox = true;
  38. var params = {'select_type_id': $("#select_type_id").val()};
  39. grid = $("#maingrid4").ligerGrid(
  40. {
  41. columns : [
  42. {display : '编号', name : 'id', width : 200 },
  43. {display : '菜单名称', name : 'text', width : 160 },
  44. {display : '菜单排序', name : 'access_order', width : 160 }
  45. <c:if test="${menuaccess.columnedit == 1}">
  46. , {display : '操作', width : 120, isAllowHide : false,
  47. render : function(row) {
  48. var html = '<a href=\"#\" onclick=\"phonecreateoredit(\''+ row.id + '\',\''+ row.pid + '\',\'${menu_code}\',\'edit\')\">修改</a>&nbsp;';
  49. return html;
  50. }
  51. }
  52. </c:if>
  53. ],
  54. url : "BasicInformationAction.do?task=toList&menu_code=${menu_code}&time=" + new Date().getTime(),
  55. pageParmName : 'p', //页索引参数名,(提交给服务器)
  56. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  57. width : '99.9%',
  58. checkbox:checkbox,
  59. usePager :false,
  60. parms: params,
  61. deleteRow: true,
  62. height : '99%',
  63. single :true,
  64. allowHideColumn: false, rownumbers: true, colDraggable: true, rowDraggable: true,
  65. onCheckRow: function(checked, rowdata, rowindex) {
  66. <%-- 里面的代码为单选 or (var rowid in this.records){ this.unselect(rowid); } if(checked){ this.select(rowindex); }else{ this.unselect(rowindex); } --%>
  67. }
  68. });
  69. $("#pageloading").hide();
  70. }
  71. // 获取选中的值
  72. function selectCheckd(){
  73. var checked = grid.getCheckedRows();
  74. var values = "";
  75. for(var i=0;i<checked.length;i++){
  76. values = values + checked[i].id + ",";
  77. }
  78. return values;
  79. }
  80. $(function () {
  81. $("#layout1").ligerLayout({ leftWidth: 250, height: '99%'});
  82. var height = $(".l-layout-center").height();
  83. $("#accordion1").ligerAccordion({ height: height - 28, speed: null });
  84. loadTree('&menu_code=${menu_code}'); // 树形结构加载
  85. initGrid(); // 列表页面加载
  86. });
  87. $.ajax({
  88. url: "${pageContext.request.contextPath }/BasicInformationAction.do?task=getresultmapvalue&menu_code=${menu_code}",
  89. type: "post",
  90. dataType: "json",
  91. data: "",
  92. success: function (result) {
  93. if(result != null && "null" != result && "" != result){
  94. $("#select_type_id").attr("value",result);
  95. }
  96. }
  97. });
  98. </script>
  99. </head>
  100. <body style="padding:0px;">
  101. <input type="hidden" name="select_type_id" id="select_type_id" value=""/><%-- 被选中的节点id --%>
  102. <input type="hidden" name="level" id="level" value=""/><%-- 被选中的是第几及 --%>
  103. <div id="layout1">
  104. <div position="left" title="树" id="accordion1">
  105. <div title="手机端菜单" class="l-scroll">
  106. <ul id="typeTree" class="tree" style="margin-top: 3px;margin-left: -10px;"></ul>
  107. </div>
  108. </div>
  109. <div position="center" id="assetList" title="列表页面">
  110. <c:if test="${menuaccess.columnadd == 1 || menuaccess.columndel == 1}">
  111. <div id="deptBtn" style="text-align:left;">
  112. <c:if test="${menuaccess.columnadd == 1}">
  113. <input id="addBut" type="button" value="新增" class="l-button" onclick="phonecreateoredit('','','${menu_code}','create')" style="width:90px;margin-left:10px;"/>
  114. </c:if>
  115. <c:if test="${menuaccess.columndel == 1}">
  116. <input id="delBut" type="button" value="删除" class="l-button" onclick="del('${menu_code}')" style="width:90px;margin-left:10px;"/>
  117. </c:if>
  118. </div>
  119. </c:if>
  120. <div style="overflow: hidden; clear: both;">
  121. <div id="maingrid4" style="margin: 0; padding: 0"></div>
  122. </div>
  123. </div>
  124. </div>
  125. <%@ include file="/include/message.jsp"%>
  126. </body>
  127. </html>