treeList.jsp 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. <c:if test="${requestScope.menu_code == 3001}"><%-- 判断产品类别的及数 --%>
  38. var level = $("#level").val();
  39. if(level >0){
  40. $("#addBut").hide();
  41. $("#delBut").hide();
  42. } else {
  43. $("#addBut").show();
  44. $("#delBut").show();
  45. }
  46. </c:if>
  47. var checkbox = true;
  48. var params = {'select_type_id': $("#select_type_id").val()};
  49. grid = $("#maingrid4").ligerGrid(
  50. {
  51. columns : [
  52. {display : '编号', name : 'id', width : 200 },
  53. {display : '名称', name : 'text', width : 400 }
  54. <c:if test="${menuaccess.columnedit == 1}">
  55. , {display : '操作', width : 120, isAllowHide : false,
  56. render : function(row) {
  57. var html = '<a href=\"#\" onclick=\"edit(\''+ row.id + '\',\''+ row.pid + '\',\'' + row.text + '\',\'${menu_code}\')\">修改</a>&nbsp;';
  58. return html;
  59. }
  60. }
  61. </c:if>
  62. ],
  63. url : "BasicInformationAction.do?task=toList&menu_code=${menu_code}&time=" + new Date().getTime(),
  64. pageParmName : 'p', //页索引参数名,(提交给服务器)
  65. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  66. width : '99.9%',
  67. checkbox:checkbox,
  68. usePager :false,
  69. parms: params,
  70. deleteRow: true,
  71. height : '99%',
  72. single :true,
  73. allowHideColumn: false, rownumbers: true, colDraggable: true, rowDraggable: true,
  74. onCheckRow: function(checked, rowdata, rowindex) {
  75. <%-- 里面的代码为单选 or (var rowid in this.records){ this.unselect(rowid); } if(checked){ this.select(rowindex); }else{ this.unselect(rowindex); } --%>
  76. }
  77. });
  78. $("#pageloading").hide();
  79. }
  80. // 获取选中的值
  81. function selectCheckd(){
  82. var checked = grid.getCheckedRows();
  83. var values = "";
  84. for(var i=0;i<checked.length;i++){
  85. values = values + checked[i].id + ",";
  86. }
  87. return values;
  88. }
  89. $(function () {
  90. $("#layout1").ligerLayout({ leftWidth: 250, height: '99%'});
  91. var height = $(".l-layout-center").height();
  92. $("#accordion1").ligerAccordion({ height: height - 28, speed: null });
  93. loadTree('&menu_code=${menu_code}'); // 树形结构加载
  94. initGrid(); // 列表页面加载
  95. });
  96. $.ajax({
  97. url: "${pageContext.request.contextPath }/BasicInformationAction.do?task=getresultmapvalue&menu_code=${menu_code}",
  98. type: "post",
  99. dataType: "text",
  100. data: "",
  101. success: function (result) {
  102. if(result != null && "null" != result && "" != result){
  103. $("#select_type_id").attr("value",result);
  104. }
  105. }
  106. });
  107. </script>
  108. </head>
  109. <body style="padding:0px;">
  110. <input type="hidden" name="select_type_id" id="select_type_id" value=""/><%-- 被选中的节点id --%>
  111. <input type="hidden" name="level" id="level" value=""/><%-- 被选中的是第几及 --%>
  112. <div id="layout1">
  113. <div position="left" title="树" id="accordion1">
  114. <div title="<c:if test="${requestScope.menu_code == 3003}">区域</c:if><c:if test="${requestScope.menu_code == 3001}">产品类别</c:if>" class="l-scroll">
  115. <ul id="typeTree" class="tree" style="margin-top: 3px;margin-left: -10px;"></ul>
  116. </div>
  117. </div>
  118. <div position="center" id="assetList" title="列表页面">
  119. <c:if test="${menuaccess.columnadd == 1 || menuaccess.columndel == 1}">
  120. <div id="deptBtn" style="text-align:left;">
  121. <c:if test="${menuaccess.columnadd == 1}">
  122. <input id="addBut" type="button" value="新增" class="l-button" onclick="create('${menu_code}')" style="width:90px;margin-left:10px;"/>
  123. </c:if>
  124. <c:if test="${menuaccess.columndel == 1}">
  125. <input id="delBut" type="button" value="删除" class="l-button" onclick="del('${menu_code}')" style="width:90px;margin-left:10px;"/>
  126. </c:if>
  127. </div>
  128. </c:if>
  129. <div style="overflow: hidden; clear: both;">
  130. <div id="maingrid4" style="margin: 0; padding: 0"></div>
  131. </div>
  132. </div>
  133. </div>
  134. <%@ include file="/include/message.jsp"%>
  135. </body>
  136. </html>