jobLog.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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="jobLog-form">
  11. <div class="select-list">
  12. <ul>
  13. <li>
  14. 任务名称:<input type="text" name="jobName" th:value="${job!=null?job.jobName:''}"/>
  15. </li>
  16. <li>
  17. 任务分组:<select name="jobGroup" th:with="type=${@dict.getType('sys_job_group')}">
  18. <option value="">所有</option>
  19. <th:block th:if="${job==null}"><option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option></th:block>
  20. <th:block th:if="${job!=null}"><option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{job.jobGroup}"></option></th:block>
  21. </select>
  22. </li>
  23. <li>
  24. 执行状态:<select name="status" th:with="type=${@dict.getType('sys_common_status')}">
  25. <option value="">所有</option>
  26. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  27. </select>
  28. </li>
  29. <li class="select-time">
  30. <label>执行时间: </label>
  31. <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
  32. <span>-</span>
  33. <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
  34. </li>
  35. <li>
  36. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  37. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  38. </li>
  39. </ul>
  40. </div>
  41. </form>
  42. </div>
  43. <div class="btn-group-sm" id="toolbar" role="group">
  44. <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:job:remove">
  45. <i class="fa fa-remove"></i> 删除
  46. </a>
  47. <a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:job:remove">
  48. <i class="fa fa-trash"></i> 清空
  49. </a>
  50. <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:job:export">
  51. <i class="fa fa-download"></i> 导出
  52. </a>
  53. </div>
  54. <div class="col-sm-12 select-table table-striped">
  55. <table id="bootstrap-table"></table>
  56. </div>
  57. </div>
  58. </div>
  59. <th:block th:include="include :: footer" />
  60. <script th:inline="javascript">
  61. var detailFlag = [[${@permission.hasPermi('monitor:job:detail')}]];
  62. var statusDatas = [[${@dict.getType('sys_common_status')}]];
  63. var groupDatas = [[${@dict.getType('sys_job_group')}]];
  64. var prefix = ctx + "monitor/jobLog";
  65. $(function() {
  66. var options = {
  67. url: prefix + "/list",
  68. cleanUrl: prefix + "/clean",
  69. detailUrl: prefix + "/detail/{id}",
  70. removeUrl: prefix + "/remove",
  71. exportUrl: prefix + "/export",
  72. sortName: "createTime",
  73. sortOrder: "desc",
  74. modalName: "调度日志",
  75. columns: [{
  76. checkbox: true
  77. },
  78. {
  79. field: 'jobLogId',
  80. title: '日志编号'
  81. },
  82. {
  83. field: 'jobName',
  84. title: '任务名称'
  85. },
  86. {
  87. field: 'jobGroup',
  88. title: '任务分组',
  89. formatter: function(value, row, index) {
  90. return $.table.selectDictLabel(groupDatas, value);
  91. }
  92. },
  93. {
  94. field: 'invokeTarget',
  95. title: '调用目标字符串',
  96. formatter: function(value, row, index) {
  97. return $.table.tooltip(value);
  98. }
  99. },
  100. {
  101. field: 'jobMessage',
  102. title: '日志信息'
  103. },
  104. {
  105. field: 'status',
  106. title: '状态',
  107. align: 'center',
  108. formatter: function(value, row, index) {
  109. return $.table.selectDictLabel(statusDatas, value);
  110. }
  111. },
  112. {
  113. field: 'createTime',
  114. title: '创建时间',
  115. sortable: true
  116. },
  117. {
  118. title: '操作',
  119. align: 'center',
  120. formatter: function(value, row, index) {
  121. var actions = [];
  122. actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.jobLogId + '\')"><i class="fa fa-search"></i>详细</a>');
  123. return actions.join('');
  124. }
  125. }]
  126. };
  127. $.table.init(options);
  128. });
  129. </script>
  130. </body>
  131. </html>