operlog.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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="operlog-form">
  11. <div class="select-list">
  12. <ul>
  13. <li>
  14. <label>系统模块: </label><input type="text" name="title"/>
  15. </li>
  16. <li>
  17. <label>操作人员: </label><input type="text" name="operName"/>
  18. </li>
  19. <li>
  20. <label>操作类型: </label><select name="businessType" th:with="type=${@dict.getType('sys_oper_type')}">
  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>
  26. <label>操作状态:</label><select name="status" th:with="type=${@dict.getType('sys_common_status')}">
  27. <option value="">所有</option>
  28. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  29. </select>
  30. </li>
  31. <li class="select-time">
  32. <label>操作时间: </label>
  33. <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
  34. <span>-</span>
  35. <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
  36. </li>
  37. <li>
  38. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  39. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  40. </li>
  41. </ul>
  42. </div>
  43. </form>
  44. </div>
  45. <div class="btn-group-sm" id="toolbar" role="group">
  46. <a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:operlog:remove">
  47. <i class="fa fa-remove"></i> 删除
  48. </a>
  49. <a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:operlog:remove">
  50. <i class="fa fa-trash"></i> 清空
  51. </a>
  52. <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:operlog:export">
  53. <i class="fa fa-download"></i> 导出
  54. </a>
  55. </div>
  56. <div class="col-sm-12 select-table table-striped">
  57. <table id="bootstrap-table" data-mobile-responsive="true"></table>
  58. </div>
  59. </div>
  60. </div>
  61. <th:block th:include="include :: footer" />
  62. <script th:inline="javascript">
  63. var detailFlag = [[${@permission.hasPermi('monitor:operlog:detail')}]];
  64. var datas = [[${@dict.getType('sys_oper_type')}]];
  65. var prefix = ctx + "monitor/operlog";
  66. $(function() {
  67. var options = {
  68. url: prefix + "/list",
  69. cleanUrl: prefix + "/clean",
  70. detailUrl: prefix + "/detail/{id}",
  71. removeUrl: prefix + "/remove",
  72. exportUrl: prefix + "/export",
  73. sortName: "operTime",
  74. sortOrder: "desc",
  75. modalName: "操作日志",
  76. escape: true,
  77. showPageGo: true,
  78. rememberSelected: true,
  79. columns: [{
  80. field: 'state',
  81. checkbox: true
  82. },
  83. {
  84. field: 'operId',
  85. title: '日志编号'
  86. },
  87. {
  88. field: 'title',
  89. title: '系统模块'
  90. },
  91. {
  92. field: 'businessType',
  93. title: '操作类型',
  94. align: 'center',
  95. formatter: function(value, row, index) {
  96. return $.table.selectDictLabel(datas, value);
  97. }
  98. },
  99. {
  100. field: 'operName',
  101. title: '操作人员',
  102. sortable: true
  103. },
  104. {
  105. field: 'deptName',
  106. title: '部门名称'
  107. },
  108. {
  109. field: 'operIp',
  110. title: '主机'
  111. },
  112. {
  113. field: 'operLocation',
  114. title: '操作地点'
  115. },
  116. {
  117. field: 'status',
  118. title: '操作状态',
  119. align: 'center',
  120. formatter: function(value, row, index) {
  121. if (value == 0) {
  122. return '<span class="badge badge-primary">成功</span>';
  123. } else if (value == 1) {
  124. return '<span class="badge badge-danger">失败</span>';
  125. }
  126. }
  127. },
  128. {
  129. field: 'operTime',
  130. title: '操作时间',
  131. sortable: true
  132. },
  133. {
  134. title: '操作',
  135. align: 'center',
  136. formatter: function(value, row, index) {
  137. var actions = [];
  138. actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.operId + '\')"><i class="fa fa-search"></i>详细</a>');
  139. return actions.join('');
  140. }
  141. }]
  142. };
  143. $.table.init(options);
  144. });
  145. </script>
  146. </body>
  147. </html>