index.html 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!DOCTYPE html>
  2. <html xmlns:th="http://www.thymeleaf.org">
  3. <head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
  4. </head>
  5. <body class="timo-layout-page">
  6. <div class="layui-card">
  7. <div class="layui-card-header timo-card-header">
  8. <span><i class="fa fa-bars"></i> 角色列表</span>
  9. <i class="layui-icon layui-icon-refresh refresh-btn"></i>
  10. </div>
  11. <div class="layui-card-body">
  12. <div class="layui-row timo-card-screen">
  13. <div class="pull-left layui-form-pane timo-search-box">
  14. <div class="layui-inline">
  15. <label class="layui-form-label">角色名</label>
  16. <div class="layui-input-block">
  17. <input type="text" name="name" th:value="${param.name}" placeholder="请输入角色名"
  18. autocomplete="off" class="layui-input">
  19. </div>
  20. </div>
  21. <div class="layui-inline">
  22. <button class="layui-btn timo-search-btn">
  23. <i class="fa fa-search"></i>
  24. </button>
  25. </div>
  26. </div>
  27. <div class="pull-right screen-btn-group">
  28. <button class="layui-btn open-popup" data-title="添加角色" th:attr="data-url=@{/rbac/role/add}"
  29. data-size="460,357">
  30. <i class="fa fa-plus"></i> 添加
  31. </button>
  32. </div>
  33. </div>
  34. <div class="timo-table-wrap">
  35. <table class="layui-table timo-table">
  36. <thead>
  37. <tr>
  38. <th data-field="name">角色名</th>
  39. <th data-field="description">角色描述</th>
  40. <th data-field="createTime">创建时间</th>
  41. <th>拥有角色的用户</th>
  42. <th>授权资源</th>
  43. <th>操作</th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. <tr th:each="item:${list}">
  48. <td th:text="${item.name}">角色</td>
  49. <td th:text="${item.description}">描述</td>
  50. <td th:text="${item.createTime}">创建时间</td>
  51. <td>
  52. <span style="color: red" th:text="${item.total}"></span>
  53. <a class="open-popup" th:attr="data-title=@{'拥有 ' + ${item.name} + ' 角色的用户'},
  54. data-url=@{'/rbac/role/users/'+${item.id}}" data-size="640,480" href="#">查看</a>
  55. </td>
  56. <td>
  57. <a class="open-popup" th:attr="data-title=@{'授予 ' + ${item.name} + ' 角色资源'},
  58. data-url=@{'/rbac/role/menus/'+${item.id}}" data-size="720,540" href="#">设置</a>
  59. </td>
  60. <td>
  61. <a class="open-popup" data-title="修改角色描述" th:attr="data-url=@{'/rbac/role/edit/'+${item.id}}"
  62. data-size="480,320" href="#">编辑</a>
  63. <a class="open-popup" data-title="详细信息" th:attr="data-url=@{'/rbac/role/detail/'+${item.id}}"
  64. data-size="640,480" href="#">详细</a>
  65. <a class="ajax-delete" th:attr="data-msg='确定要删除 '+ ${item.name} + '?'"
  66. th:href="@{'/rbac/role/' + ${item.id}}">删除</a>
  67. </td>
  68. </tr>
  69. </tbody>
  70. </table>
  71. </div>
  72. <div th:replace="/common/fragment :: page"></div>
  73. </div>
  74. </div>
  75. <script th:replace="/common/template :: script"></script>
  76. </body>
  77. </html>