jobLog.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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="jobLog-form">
  11. <div class="select-list">
  12. <ul>
  13. <li>
  14. <label>任务名称:</label><input type="text" name="jobName"/>
  15. </li>
  16. <li>
  17. <label>方法名称:</label><input type="text" name="methodName"/>
  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="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="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-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:job:export"><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:job: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 removeFlag = [[${@permission.hasPermi('monitor:job:remove')}]];
  52. var datas = [[${@dict.getType('sys_job_status')}]];
  53. var prefix = ctx + "monitor/jobLog"
  54. $(function() {
  55. var options = {
  56. url: prefix + "/list",
  57. removeUrl: prefix + "/remove",
  58. exportUrl: prefix + "/export",
  59. sortName: "createTime",
  60. sortOrder: "desc",
  61. modalName: "日志",
  62. search: false,
  63. showExport: false,
  64. columns: [{
  65. checkbox: true
  66. },
  67. {
  68. field: 'jobLogId',
  69. title: '任务日志编号'
  70. },
  71. {
  72. field: 'jobName',
  73. title: '任务名称',
  74. sortable: true
  75. },
  76. {
  77. field: 'jobGroup',
  78. title: '任务组名',
  79. sortable: true
  80. },
  81. {
  82. field: 'methodName',
  83. title: '方法名称'
  84. },
  85. {
  86. field: 'methodParams',
  87. title: '方法参数'
  88. },
  89. {
  90. field: 'jobMessage',
  91. title: '日志信息'
  92. },
  93. {
  94. field: 'status',
  95. title: '状态',
  96. align: 'center',
  97. formatter: function(value, row, index) {
  98. return $.table.selectDictLabel(datas, value);
  99. }
  100. },
  101. {
  102. field: 'createTime',
  103. title: '创建时间',
  104. sortable: true
  105. },
  106. {
  107. title: '操作',
  108. align: 'center',
  109. formatter: function(value, row, index) {
  110. var actions = [];
  111. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.jobLogId + '\')"><i class="fa fa-remove"></i>删除</a>');
  112. return actions.join('');
  113. }
  114. }]
  115. };
  116. $.table.init(options);
  117. });
  118. </script>
  119. </body>
  120. </html>