dictionaries_list.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  4. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  5. <%
  6. String path = request.getContextPath();
  7. String basePath = request.getScheme() + "://"
  8. + request.getServerName() + ":" + request.getServerPort()
  9. + path + "/";
  10. %>
  11. <!DOCTYPE html>
  12. <html lang="en">
  13. <head>
  14. <base href="<%=basePath%>">
  15. <!-- jsp文件头和头部 -->
  16. <%@ include file="../../system/index/top.jsp"%>
  17. </head>
  18. <body class="no-skin">
  19. <!-- /section:basics/navbar.layout -->
  20. <div class="main-container" id="main-container">
  21. <!-- /section:basics/sidebar -->
  22. <div class="main-content">
  23. <div class="main-content-inner">
  24. <div class="page-content">
  25. <div class="row">
  26. <div class="col-xs-12">
  27. <!-- 检索 -->
  28. <form action="dictionaries/list.do" method="post" name="Form" id="Form">
  29. <table style="margin-top:5px;">
  30. <tr>
  31. <td>
  32. <div class="nav-search">
  33. <span class="input-icon">
  34. <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="keywords" name="keywords" autocomplete="off" value="${page.pd.keywords }" />
  35. <i class="ace-icon fa fa-search nav-search-icon"></i>
  36. </span>
  37. </div>
  38. </td>
  39. <td>&nbsp;
  40. <select name="DICTIONARIES_ID" id="DICTIONARIES_ID">
  41. <option value="${DICTIONARIES_ID}" <c:if test="${DICTIONARIES_ID != ''}">selected</c:if>>本级</option>
  42. <option value="" <c:if test="${DICTIONARIES_ID == ''}">selected</c:if>>全部</option>
  43. </select>
  44. </td>
  45. <c:if test="${QX.cha == 1 }">
  46. <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="gsearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td>
  47. </c:if>
  48. </tr>
  49. </table>
  50. <!-- 检索 -->
  51. <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;">
  52. <thead>
  53. <tr>
  54. <th class="center" style="width:50px;">序号</th>
  55. <th class="center">名称</th>
  56. <th class="center">英文</th>
  57. <th class="center">编码</th>
  58. <th class="center" style="width:150px;">ID</th>
  59. <th class="center">排序</th>
  60. <th class="center">操作</th>
  61. </tr>
  62. </thead>
  63. <tbody>
  64. <!-- 开始循环 -->
  65. <c:choose>
  66. <c:when test="${not empty varList}">
  67. <c:if test="${QX.cha == 1 }">
  68. <c:forEach items="${varList}" var="var" varStatus="vs">
  69. <tr>
  70. <td class='center' style="width: 30px;">${page.showCount*(page.currentPage-1)+vs.index+1}</td>
  71. <td class='center'><a href="javascript:goSondict('${var.DICTIONARIES_ID }')"><i class="ace-icon fa fa-share bigger-100"></i>&nbsp;${var.NAME}</a></td>
  72. <td class='center'><a href="javascript:goSondict('${var.DICTIONARIES_ID }')">${var.NAME_EN}</a></td>
  73. <td class='center'>${var.BIANMA}</td>
  74. <td class='center'>${var.DICTIONARIES_ID}</td>
  75. <td class='center'>${var.ORDER_BY}</td>
  76. <td class="center">
  77. <c:if test="${QX.edit != 1 && QX.del != 1 }">
  78. <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span>
  79. </c:if>
  80. <div class="hidden-sm hidden-xs btn-group">
  81. <c:if test="${QX.edit == 1 }">
  82. <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.DICTIONARIES_ID}');">
  83. <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i>
  84. </a>
  85. </c:if>
  86. <c:if test="${QX.del == 1 }">
  87. <c:if test="${'yes' != var.YNDEL}">
  88. <a class="btn btn-xs btn-danger" onclick="del('${var.DICTIONARIES_ID}');">
  89. <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i>
  90. </a>
  91. </c:if>
  92. </c:if>
  93. </div>
  94. <div class="hidden-md hidden-lg">
  95. <div class="inline pos-rel">
  96. <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto">
  97. <i class="ace-icon fa fa-cog icon-only bigger-110"></i>
  98. </button>
  99. <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
  100. <c:if test="${QX.edit == 1 }">
  101. <li>
  102. <a style="cursor:pointer;" onclick="edit('${var.DICTIONARIES_ID}');" class="tooltip-success" data-rel="tooltip" title="修改">
  103. <span class="green">
  104. <i class="ace-icon fa fa-pencil-square-o bigger-120"></i>
  105. </span>
  106. </a>
  107. </li>
  108. </c:if>
  109. <c:if test="${QX.del == 1 }">
  110. <c:if test="${'yes' != var.YNDEL}">
  111. <li>
  112. <a style="cursor:pointer;" onclick="del('${var.DICTIONARIES_ID}');" class="tooltip-error" data-rel="tooltip" title="删除">
  113. <span class="red">
  114. <i class="ace-icon fa fa-trash-o bigger-120"></i>
  115. </span>
  116. </a>
  117. </li>
  118. </c:if>
  119. </c:if>
  120. </ul>
  121. </div>
  122. </div>
  123. </td>
  124. </tr>
  125. </c:forEach>
  126. </c:if>
  127. <c:if test="${QX.cha == 0 }">
  128. <tr>
  129. <td colspan="100" class="center">您无权查看</td>
  130. </tr>
  131. </c:if>
  132. </c:when>
  133. <c:otherwise>
  134. <tr class="main_info">
  135. <td colspan="100" class="center" >没有相关数据</td>
  136. </tr>
  137. </c:otherwise>
  138. </c:choose>
  139. </tbody>
  140. </table>
  141. <div class="page-header position-relative">
  142. <table style="width:100%;">
  143. <tr>
  144. <td style="vertical-align:top;">
  145. <c:if test="${QX.add == 1 }">
  146. <a class="btn btn-sm btn-success" onclick="add('${DICTIONARIES_ID}');">新增</a>
  147. </c:if>
  148. <c:if test="${null != pd.DICTIONARIES_ID && pd.DICTIONARIES_ID != ''}">
  149. <a class="btn btn-sm btn-success" onclick="goSondict('${pd.PARENT_ID}');">返回</a>
  150. </c:if>
  151. </td>
  152. <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td>
  153. </tr>
  154. </table>
  155. </div>
  156. </form>
  157. </div>
  158. <!-- /.col -->
  159. </div>
  160. <!-- /.row -->
  161. </div>
  162. <!-- /.page-content -->
  163. </div>
  164. </div>
  165. <!-- /.main-content -->
  166. <!-- 返回顶部 -->
  167. <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
  168. <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
  169. </a>
  170. </div>
  171. <!-- /.main-container -->
  172. <!-- basic scripts -->
  173. <!-- 页面底部js¨ -->
  174. <%@ include file="../../system/index/foot.jsp"%>
  175. <!-- 删除时确认窗口 -->
  176. <script src="static/ace/js/bootbox.js"></script>
  177. <!-- ace scripts -->
  178. <script src="static/ace/js/ace/ace.js"></script>
  179. <!--提示框-->
  180. <script type="text/javascript" src="static/js/jquery.tips.js"></script>
  181. <script type="text/javascript">
  182. $(top.hangge());//关闭加载状态
  183. //检索
  184. function gsearch(){
  185. top.jzts();
  186. $("#Form").submit();
  187. }
  188. //去此ID下子列表
  189. function goSondict(DICTIONARIES_ID){
  190. top.jzts();
  191. window.location.href="<%=basePath%>dictionaries/list.do?DICTIONARIES_ID="+DICTIONARIES_ID;
  192. };
  193. //新增
  194. function add(DICTIONARIES_ID){
  195. top.jzts();
  196. var diag = new top.Dialog();
  197. diag.Drag=true;
  198. diag.Title ="新增";
  199. diag.URL = '<%=basePath%>dictionaries/goAdd.do?DICTIONARIES_ID='+DICTIONARIES_ID;
  200. diag.Width = 500;
  201. diag.Height = 620;
  202. diag.CancelEvent = function(){ //关闭事件
  203. if('none' == diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display){
  204. parent.location.href="<%=basePath%>dictionaries/listAllDict.do?DICTIONARIES_ID=${DICTIONARIES_ID}&dnowPage=${page.currentPage}";
  205. }
  206. diag.close();
  207. };
  208. diag.show();
  209. }
  210. //删除
  211. function del(Id){
  212. bootbox.confirm("确定要删除吗?", function(result) {
  213. if(result) {
  214. top.jzts();
  215. var url = "<%=basePath%>dictionaries/delete.do?DICTIONARIES_ID="+Id+"&tm="+new Date().getTime();
  216. $.get(url,function(data){
  217. if("success" == data.result){
  218. parent.location.href="<%=basePath%>dictionaries/listAllDict.do?DICTIONARIES_ID=${DICTIONARIES_ID}&dnowPage=${page.currentPage}";
  219. }else if("false" == data.result){
  220. top.hangge();
  221. bootbox.dialog({
  222. message: "<span class='bigger-110'>删除失败!请先删除子级或删除占用资源.</span>",
  223. buttons:
  224. {
  225. "button" :
  226. {
  227. "label" : "确定",
  228. "className" : "btn-sm btn-success"
  229. }
  230. }
  231. });
  232. }else if("false2" == data.result){
  233. top.hangge();
  234. bootbox.dialog({
  235. message: "<span class='bigger-110'>删除失败!排查表不存在或其表中没有BIANMA字段.</span>",
  236. buttons:
  237. {
  238. "button" :
  239. {
  240. "label" : "确定",
  241. "className" : "btn-sm btn-success"
  242. }
  243. }
  244. });
  245. }
  246. });
  247. }
  248. });
  249. }
  250. //修改
  251. function edit(Id){
  252. top.jzts();
  253. var diag = new top.Dialog();
  254. diag.Drag=true;
  255. diag.Title ="编辑";
  256. diag.URL = '<%=basePath%>dictionaries/goEdit.do?DICTIONARIES_ID='+Id;
  257. diag.Width = 500;
  258. diag.Height = 565;
  259. diag.CancelEvent = function(){ //关闭事件
  260. if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){
  261. parent.location.href="<%=basePath%>dictionaries/listAllDict.do?DICTIONARIES_ID=${DICTIONARIES_ID}&dnowPage=${page.currentPage}";
  262. }
  263. diag.close();
  264. };
  265. diag.show();
  266. }
  267. </script>
  268. </body>
  269. </html>