operlog.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org"
  3. xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  4. <meta charset="utf-8">
  5. <head th:include="include :: header"></head>
  6. <body class="gray-bg">
  7. <div class="container-div">
  8. <div class="row">
  9. <div class="col-sm-12 select-info">
  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="action" th:with="type=${@dict.getType('sys_oper_type')}">
  21. <option value="">所有</option>
  22. <option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>
  23. </select>
  24. </li>
  25. <li class="time">
  26. <label>操作时间: </label>
  27. <input type="text" class="layui-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
  28. <span>-</span>
  29. <input type="text" class="layui-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-success btn-rounded btn-sm" onclick="$.table.exportExcel()"><i class="fa fa-download"></i>&nbsp;下载</a>
  34. </li>
  35. </ul>
  36. </div>
  37. </form>
  38. </div>
  39. <div class="btn-group hidden-xs" id="toolbar" role="group">
  40. <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="monitor:logininfor:remove">
  41. <i class="fa fa-trash-o"></i> 删除
  42. </a>
  43. </div>
  44. <div class="col-sm-12 select-info table-striped">
  45. <table id="bootstrap-table" data-mobile-responsive="true"></table>
  46. </div>
  47. </div>
  48. </div>
  49. <div th:include="include :: footer"></div>
  50. <script th:inline="javascript">
  51. var detailFlag = [[${@permission.hasPermi('monitor:operlog:detail')}]];
  52. var datas = [[${@dict.getType('sys_oper_type')}]];
  53. var prefix = ctx + "monitor/operlog"
  54. $(function() {
  55. var options = {
  56. url: prefix + "/list",
  57. removeUrl: prefix + "/remove",
  58. exportUrl: prefix + "/export",
  59. sortName: "operTime",
  60. sortOrder: "desc",
  61. search: false,
  62. showExport: false,
  63. columns: [{
  64. checkbox: true
  65. },
  66. {
  67. field: 'operId',
  68. title: '日志编号'
  69. },
  70. {
  71. field: 'title',
  72. title: '系统模块'
  73. },
  74. {
  75. field: 'action',
  76. title: '操作类型',
  77. align: 'center',
  78. formatter: function(value, row, index) {
  79. return $.table.selectDictLabel(datas, value);
  80. }
  81. },
  82. {
  83. field: 'operName',
  84. title: '操作人员',
  85. sortable: true
  86. },
  87. {
  88. field: 'deptName',
  89. title: '部门名称'
  90. },
  91. {
  92. field: 'operIp',
  93. title: '主机'
  94. },
  95. {
  96. field: 'operLocation',
  97. title: '操作地点'
  98. },
  99. {
  100. field: 'status',
  101. title: '操作状态',
  102. align: 'center',
  103. formatter: function(value, row, index) {
  104. if (value == 0) {
  105. return '<span class="badge badge-primary">成功</span>';
  106. } else if (value == 1) {
  107. return '<span class="badge badge-danger">异常</span>';
  108. }
  109. }
  110. },
  111. {
  112. field: 'operTime',
  113. title: '操作时间',
  114. sortable: true
  115. },
  116. {
  117. title: '操作',
  118. align: 'center',
  119. formatter: function(value, row, index) {
  120. var actions = [];
  121. actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="#" onclick="detail(\'' + row.operId + '\')"><i class="fa fa-search"></i>详细</a>');
  122. return actions.join('');
  123. }
  124. }]
  125. };
  126. $.table.init(options);
  127. });
  128. /*操作日志-详细*/
  129. function detail(id) {
  130. var url = prefix + '/detail/' + id;
  131. $.modal.open("操作日志详细", url);
  132. }
  133. </script>
  134. </body>
  135. </html>