operlog.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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 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 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 hidden-xs" id="toolbar" role="group">
  40. <a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:operlog:remove">
  41. <i class="fa fa-remove"></i> 删除
  42. </a>
  43. <a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:operlog:remove">
  44. <i class="fa fa-trash"></i> 清空
  45. </a>
  46. <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:operlog:export">
  47. <i class="fa fa-download"></i> 导出
  48. </a>
  49. </div>
  50. <div class="col-sm-12 select-table table-striped">
  51. <table id="bootstrap-table" data-mobile-responsive="true"></table>
  52. </div>
  53. </div>
  54. </div>
  55. <div th:include="include :: footer"></div>
  56. <script th:inline="javascript">
  57. var detailFlag = [[${@permission.hasPermi('monitor:operlog:detail')}]];
  58. var datas = [[${@dict.getType('sys_oper_type')}]];
  59. var prefix = ctx + "monitor/operlog";
  60. $(function() {
  61. var options = {
  62. url: prefix + "/list",
  63. cleanUrl: prefix + "/clean",
  64. detailUrl: prefix + "/detail/{id}",
  65. removeUrl: prefix + "/remove",
  66. exportUrl: prefix + "/export",
  67. sortName: "operTime",
  68. sortOrder: "desc",
  69. modalName: "操作日志",
  70. escape: true,
  71. columns: [{
  72. checkbox: true
  73. },
  74. {
  75. field: 'operId',
  76. title: '日志编号'
  77. },
  78. {
  79. field: 'title',
  80. title: '系统模块'
  81. },
  82. {
  83. field: 'businessType',
  84. title: '操作类型',
  85. align: 'center',
  86. formatter: function(value, row, index) {
  87. return $.table.selectDictLabel(datas, value);
  88. }
  89. },
  90. {
  91. field: 'operName',
  92. title: '操作人员',
  93. sortable: true
  94. },
  95. {
  96. field: 'deptName',
  97. title: '部门名称'
  98. },
  99. {
  100. field: 'operIp',
  101. title: '主机'
  102. },
  103. {
  104. field: 'operLocation',
  105. title: '操作地点'
  106. },
  107. {
  108. field: 'status',
  109. title: '操作状态',
  110. align: 'center',
  111. formatter: function(value, row, index) {
  112. if (value == 0) {
  113. return '<span class="badge badge-primary">成功</span>';
  114. } else if (value == 1) {
  115. return '<span class="badge badge-danger">异常</span>';
  116. }
  117. }
  118. },
  119. {
  120. field: 'operTime',
  121. title: '操作时间',
  122. sortable: true
  123. },
  124. {
  125. title: '操作',
  126. align: 'center',
  127. formatter: function(value, row, index) {
  128. var actions = [];
  129. actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="#" onclick="$.operate.detail(\'' + row.operId + '\')"><i class="fa fa-search"></i>详细</a>');
  130. return actions.join('');
  131. }
  132. }]
  133. };
  134. $.table.init(options);
  135. });
  136. </script>
  137. </body>
  138. </html>