roleList.jsp 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <!DOCTYPE html>
  2. <html >
  3. <%@ page language="java" contentType="text/html; charset=UTF-8"
  4. pageEncoding="UTF-8"%>
  5. <%@ page import="java.util.*"%>
  6. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  7. <%@ include file="../common/base.jsp"%>
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10. <title>角色列表</title>
  11. </head>
  12. <link rel="stylesheet" type="text/css"
  13. href="${basePath }/css/public.css" />
  14. <link rel="stylesheet" type="text/css" href="${basePath }/css/other.css" />
  15. <%@ include file="../common.jsp"%>
  16. <script type="text/javascript" src="${basePath}/static/biz/js/role/rolemain.js"></script>
  17. <script type="text/javascript">
  18. $(document).ready(function () {
  19. role.main.init();
  20. });
  21. </script>
  22. <body>
  23. <div class="ch-container">
  24. <div class="row">
  25. <div class="box col-md-12">
  26. <div class="box-inner">
  27. <div class="box-header well" data-original-title="11">
  28. <h2>
  29. <i class="glyphicon glyphicon-user"></i> 系统设置&gt;角色管理
  30. </h2>
  31. </div>
  32. <div class="box-content">
  33. <form action="${app }/role/querylist.html" id="roleform" method="post">
  34. <!-- 查询条件 -->
  35. <table class="search_table" width="95%" cellpadding="3" cellspacing="3">
  36. <tr style="height:60px;">
  37. <td align="center">
  38. <div class="form-inline has-feedback">
  39. <label class="control-label" for="inputSuccess4">角色名:</label>
  40. <input type="text" class="form-control" name="rolename"
  41. value="${rolename }" id="inputSuccess4">
  42. </div>
  43. </td>
  44. <td></td>
  45. <td align="center"><a class="btn btn-default btn-sm" href="#"
  46. onclick="role.main.search()"> <i
  47. class="glyphicon glyphicon-search"></i> 查询
  48. </a> <a class="btn btn-default btn-sm" href="#" data-toggle="modal"
  49. data-target="#myModal" onclick="role.main.clear()"> <i
  50. class="glyphicon glyphicon-plus" ></i> 新增
  51. </a></td>
  52. </tr>
  53. </table>
  54. <!-- 列表 -->
  55. <table class="table_ud">
  56. <tr >
  57. <th width="2%">序号</th>
  58. <th width="10%">角色编码</th>
  59. <th width="25%">角色名</th>
  60. <!-- <th width="15%">序列号</th> -->
  61. <th width="15%">操作</th>
  62. </tr>
  63. <c:if test="${roles!= null && fn:length(roles) > 0}">
  64. <c:forEach items="${roles}" var="role" varStatus="s">
  65. <tr>
  66. <td>${s.count}</td>
  67. <td>${role.roleCode}</td>
  68. <td>${role.roleName}</td>
  69. <%-- <td>${role.roleSort}</td> --%>
  70. <td>
  71. <a class="btn btn-default btn-sm" href="#" data-toggle="modal"
  72. data-target="#myModal" onclick="role.main.edit('${role.id}')"><i class="glyphicon glyphicon-wrench"></i>修改</a>
  73. <a href="#" class="btn btn-default btn-sm" onclick="role.main.del('${role.id}')"> <i class="glyphicon glyphicon-trash"></i>删除</a>
  74. <a href="#" class="btn btn-default btn-sm" onclick="role.main.grant('${role.id}')"><i class="glyphicon glyphicon-th-list"></i>授权</a>
  75. </td>
  76. </tr>
  77. </c:forEach>
  78. <tr>
  79. <td colspan="4"><jsp:include page="../pageinfo.jsp"></jsp:include>
  80. </td>
  81. </tr>
  82. </c:if>
  83. <c:if test="${roles== null || fn:length(roles) == 0}">
  84. <tr>
  85. <td colspan="4"><span style="color: red">没有记录</span></td>
  86. </tr>
  87. </c:if>
  88. </table>
  89. </div>
  90. </form>
  91. </div>
  92. </div>
  93. </div>
  94. <!--/row-->
  95. <!-- dialog -->
  96. <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
  97. aria-labelledby="myModalLabel" aria-hidden="true">
  98. <div class="modal-dialog">
  99. <div class="modal-content">
  100. <div class="modal-header">
  101. <button type="button" class="close" data-dismiss="modal">×</button>
  102. <h3 id="htitle">角色新增</h3>
  103. </div>
  104. <div class="modal-body">
  105. <form id="addform" method="post">
  106. <input type="hidden" id="editid" name="id" >
  107. <table class="add_table">
  108. <tr>
  109. <td width="20%" style="text-align: right;">角色名:</td>
  110. <td width="80%"><input type="text" class="form-control"
  111. id="editroleName" name="roleName" ></td>
  112. </tr>
  113. <tr>
  114. <td width="20%" style="text-align: right;">角色编码:</td>
  115. <td width="80%"><input type="text" class="form-control"
  116. id="editroleCode" name="roleCode"></td>
  117. </tr>
  118. <!-- <tr>
  119. <td width="20%" style="text-align: right;">排序号:</td>
  120. <td width="80%"><input type="text" class="form-control"
  121. id="editroleSort" name="roleSort"></td>
  122. </tr> -->
  123. </table>
  124. </form>
  125. </div>
  126. <div class="modal-footer">
  127. <a href="#" class="btn btn-default" data-dismiss="modal">取消</a> <a
  128. href="#" class="btn btn-default" data-dismiss="modal"
  129. onclick="role.main.save()">保存</a>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. <!-- dialog end-->
  135. </div>
  136. </body>
  137. </html>