jobLog.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. <a class="btn btn-danger" onclick="closeItem()">
  54. <i class="fa fa-reply-all"></i> 关闭
  55. </a>
  56. </div>
  57. <div class="col-sm-12 select-table table-striped">
  58. <table id="bootstrap-table"></table>
  59. </div>
  60. </div>
  61. </div>
  62. <th:block th:include="include :: footer" />
  63. <script th:inline="javascript">
  64. var detailFlag = [[${@permission.hasPermi('monitor:job:detail')}]];
  65. var statusDatas = [[${@dict.getType('sys_common_status')}]];
  66. var groupDatas = [[${@dict.getType('sys_job_group')}]];
  67. var prefix = ctx + "monitor/jobLog";
  68. $(function() {
  69. var options = {
  70. url: prefix + "/list",
  71. cleanUrl: prefix + "/clean",
  72. detailUrl: prefix + "/detail/{id}",
  73. removeUrl: prefix + "/remove",
  74. exportUrl: prefix + "/export",
  75. sortName: "createTime",
  76. sortOrder: "desc",
  77. modalName: "调度日志",
  78. columns: [{
  79. checkbox: true
  80. },
  81. {
  82. field: 'jobLogId',
  83. title: '日志编号'
  84. },
  85. {
  86. field: 'jobName',
  87. title: '任务名称'
  88. },
  89. {
  90. field: 'jobGroup',
  91. title: '任务分组',
  92. formatter: function(value, row, index) {
  93. return $.table.selectDictLabel(groupDatas, value);
  94. }
  95. },
  96. {
  97. field: 'invokeTarget',
  98. title: '调用目标字符串',
  99. formatter: function(value, row, index) {
  100. return $.table.tooltip(value);
  101. }
  102. },
  103. {
  104. field: 'jobMessage',
  105. title: '日志信息'
  106. },
  107. {
  108. field: 'status',
  109. title: '状态',
  110. align: 'center',
  111. formatter: function(value, row, index) {
  112. return $.table.selectDictLabel(statusDatas, value);
  113. }
  114. },
  115. {
  116. field: 'createTime',
  117. title: '创建时间',
  118. sortable: true
  119. },
  120. {
  121. title: '操作',
  122. align: 'center',
  123. formatter: function(value, row, index) {
  124. var actions = [];
  125. 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>');
  126. return actions.join('');
  127. }
  128. }]
  129. };
  130. $.table.init(options);
  131. });
  132. </script>
  133. </body>
  134. </html>