logininfor.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <th:block th:include="include :: header('登录日志列表')" />
  5. </head>
  6. <body class="gray-bg">
  7. <div class="container-div">
  8. <div class="row">
  9. <div class="col-sm-12 search-collapse">
  10. <form id="logininfor-form">
  11. <div class="select-list">
  12. <ul>
  13. <li>
  14. <label>登录地址:</label><input type="text" name="ipaddr"/>
  15. </li>
  16. <li>
  17. <label>登录名称:</label><input type="text" name="loginName"/>
  18. </li>
  19. <li>
  20. <label>登录状态:</label><select name="status" th:with="type=${@dict.getType('sys_common_status')}">
  21. <option value="">所有</option>
  22. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  23. </select>
  24. </li>
  25. <li class="select-time">
  26. <label>登录时间: </label>
  27. <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
  28. <span>-</span>
  29. <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
  30. </li>
  31. <li>
  32. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  33. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  34. </li>
  35. </ul>
  36. </div>
  37. </form>
  38. </div>
  39. <div class="btn-group-sm" id="toolbar" role="group">
  40. <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:logininfor:remove">
  41. <i class="fa fa-remove"></i> 删除
  42. </a>
  43. <a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:logininfor:remove">
  44. <i class="fa fa-trash"></i> 清空
  45. </a>
  46. <a class="btn btn-primary single disabled" onclick="unlock()" shiro:hasPermission="monitor:logininfor:unlock">
  47. <i class="fa fa-unlock"></i> 解锁
  48. </a>
  49. <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:logininfor:export">
  50. <i class="fa fa-download"></i> 导出
  51. </a>
  52. </div>
  53. <div class="col-sm-12 select-table table-striped">
  54. <table id="bootstrap-table"></table>
  55. </div>
  56. </div>
  57. </div>
  58. <th:block th:include="include :: footer" />
  59. <script th:inline="javascript">
  60. var datas = [[${@dict.getType('sys_common_status')}]];
  61. var prefix = ctx + "monitor/logininfor";
  62. $(function() {
  63. var options = {
  64. url: prefix + "/list",
  65. cleanUrl: prefix + "/clean",
  66. removeUrl: prefix + "/remove",
  67. exportUrl: prefix + "/export",
  68. sortName: "loginTime",
  69. sortOrder: "desc",
  70. modalName: "登录日志",
  71. escape: true,
  72. showPageGo: true,
  73. rememberSelected: true,
  74. columns: [{
  75. field: 'state',
  76. checkbox: true
  77. },
  78. {
  79. field: 'infoId',
  80. title: '访问编号'
  81. },
  82. {
  83. field: 'loginName',
  84. title: '登录名称',
  85. sortable: true
  86. },
  87. {
  88. field: 'ipaddr',
  89. title: '登录地址'
  90. },
  91. {
  92. field: 'loginLocation',
  93. title: '登录地点'
  94. },
  95. {
  96. field: 'browser',
  97. title: '浏览器'
  98. },
  99. {
  100. field: 'os',
  101. title: '操作系统'
  102. },
  103. {
  104. field: 'status',
  105. title: '登录状态',
  106. align: 'center',
  107. formatter: function(value, row, index) {
  108. return $.table.selectDictLabel(datas, value);
  109. }
  110. },
  111. {
  112. field: 'msg',
  113. title: '操作信息'
  114. },
  115. {
  116. field: 'loginTime',
  117. title: '登录时间',
  118. sortable: true
  119. }]
  120. };
  121. $.table.init(options);
  122. });
  123. function unlock() {
  124. $.operate.post(prefix + "/unlock?loginName=" + $.table.selectColumns("loginName"));
  125. }
  126. </script>
  127. </body>
  128. </html>