jobList.html 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <!DOCTYPE html>
  2. <html lang="zh-CN" xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
  4. layout:decorator="base">
  5. <head>
  6. <link rel="stylesheet" href="/static/css/applications.css" type="text/css"/>
  7. <!-- dataTables -->
  8. <link rel="stylesheet" type="text/css"
  9. href="/static/AdminLTE/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css"/>
  10. <!-- Select2 -->
  11. <link rel="stylesheet" type="text/css" href="/static/AdminLTE/bower_components/select2/dist/css/select2.min.css"/>
  12. </head>
  13. <body>
  14. <div layout:fragment="mainbody">
  15. <aside class="main-sidebar">
  16. <section class="sidebar">
  17. <div class="user-panel">
  18. <div class="pull-left image">
  19. <img src="/static/images/avatar/avatar-admin.jpg" class="img-circle" alt="User Image" />
  20. </div>
  21. <div class="pull-left info">
  22. <p>Admin</p>
  23. <a href="#">
  24. <i class="fa fa-circle text-success"></i>
  25. Online
  26. </a>
  27. </div>
  28. </div>
  29. <!-- Search form -->
  30. <form action="#" method="get" class="sidebar-form">
  31. <div class="input-group">
  32. <input type="text" name="q" class="form-control" placeholder="Search..." />
  33. <span class="input-group-btn">
  34. <button type="submit" name="search" id="search-btn" class="btn btn-flat">
  35. <i class="fa fa-search"></i>
  36. </button>
  37. </span>
  38. </div>
  39. </form>
  40. <!-- Sidebar Menu -->
  41. <ul class="sidebar-menu tree" data-widget="tree">
  42. <li>
  43. <a href="/addPaper">
  44. <i class="glyphicon glyphicon-pencil"></i>
  45. <span>
  46. 新建试卷
  47. </span>
  48. </a>
  49. </li>
  50. <li>
  51. <a href="/papers">
  52. <i class="glyphicon glyphicon-tasks"></i>
  53. <span>
  54. 试卷列表
  55. </span>
  56. </a>
  57. </li>
  58. <li>
  59. <a href="/review/jobs">
  60. <i class="glyphicon glyphicon-tasks"></i>
  61. <span>
  62. JOB列表
  63. </span>
  64. </a>
  65. </li>
  66. </ul>
  67. </section>
  68. </aside>
  69. <!-- Main Content -->
  70. <div class="content-wrapper" style="min-height: 691px;">
  71. <section class="content-header">
  72. <h1>全部应用</h1>
  73. <ol class="breadcrumb">
  74. <li class="active">
  75. <a href="/home">
  76. <i class="fa fa-dashboard"></i>
  77. 全部应用
  78. </a>
  79. </li>
  80. </ol>
  81. </section>
  82. <!-- Main Content -->
  83. <section class="content container-fluid">
  84. <!-- <div id="task-list-search" class="input-group col-md-6">
  85. <input type="text" class="form-control" placeholder="Search for application">
  86. <span class="input-group-btn">
  87. <button class="btn btn-default" type="button" id="task-search-btn">Search</button>
  88. </span>
  89. </div> -->
  90. <table id="task-list" class="table table-striped text-center" style="margin-top: 10px">
  91. <thead>
  92. <tr>
  93. <!--<th></th>-->
  94. <th>任务名称</th>
  95. <th>类型</th>
  96. <th>创建时间</th>
  97. <!--<th>版本</th>-->
  98. <th>操作</th>
  99. </tr>
  100. </thead>
  101. <tbody>
  102. <th:block th:each="task : ${tasks}">
  103. <tr>
  104. <td><b><a th:href="'/review/jobDetail?id='+${task.get('id')}" th:text="${task.get('name')}"></a></b></td>
  105. <!--<td><img th:src="${task.icon}" style="width: 25px; height: 25px;" /></td>-->
  106. <td>
  107. <span th:if="${task.get('group').equals('') and task.get('exam_id').equals('')}" class="label label-warning" >暂无</span>
  108. <span th:if="${task.get('group').equals('') and !task.get('exam_id').equals('')}" class="label label-info" >企业版</span>
  109. <span th:if="${task.get('exam_id').equals('') and !task.get('group').equals('') }" class="label label-success" >教育版</span>
  110. </td>
  111. <!-- <td><span class="label label-info" th:text="${task.caseId}">题号</span></td>-->
  112. <td><span class=" " th:if="${task.get('create_time')!=null}" th:text="${#dates.format(task.get('create_time'),'yyyy-MM-dd HH:mm:ss')} " ></span></td>
  113. <td>
  114. <!-- <button th:onclick="'showYulan( \''+${task.get('id')}+'\' )'" class="btn btn-default">预览</button>-->
  115. <a type="button" class="btn btn-default" th:href="'/review/changeJob?id='+${task.get('id')}">修改</a>
  116. <button th:jobId="${task.get('id')}" th:onclick="javascript:delJob( this, this.getAttribute('jobId'))" class="btn btn-default">删除</button>
  117. </td>
  118. <!--<td th:text="${task.version}"></td>-->
  119. <!-- <td th:if="${task.numOfUndeal > 0}"><span class="label label-info">审核中</span></td>-->
  120. <!-- <td th:if="${task.numOfUndeal == 0}"><span class="label label-success">审核结束</span></td>-->
  121. <!--<td th:text="${task.startTime}">{{ task.print_start_time }}</td>-->
  122. <!--<td th:text="${task.endTime}">{{ task.print_end_time }}</td>-->
  123. <!-- <td><span class="badge"><a th:href="'/task_detail?examId=' + ${task.examId} + '&amp;caseId=' + ${task.caseId}" style="color: #fff;" th:text="${task.numOfUndeal}"></a></span></td>-->
  124. </tr>
  125. </th:block>
  126. </tbody>
  127. </table><!-- table -->
  128. </section>
  129. </div>
  130. </div>
  131. </body>
  132. </html>
  133. <script src="/static/AdminLTE/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
  134. <script src="/static/AdminLTE/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
  135. <script src="/static/AdminLTE/bower_components/select2/dist/js/select2.min.js"></script>
  136. <script src="/static/AdminLTE/bower_components/bootstrap-notify/dist/bootstrap-notify.min.js"></script>
  137. <script type="text/javascript" xmlns:th="http://www.thymeleaf.org" th:inline="javascript">
  138. /*<![CDATA[*/
  139. var reportHost = [[${reportHost}]]
  140. /*]]>*/
  141. $(document).ready(function(){
  142. $('#task-list').DataTable({
  143. 'paging' : true,
  144. 'lengthChange': false,
  145. 'searching' : false,
  146. 'ordering' : true,
  147. 'info' : true,
  148. 'autoWidth' : false,
  149. // "columnDefs": [
  150. // {
  151. // 'targets': [2],
  152. // "type":"date"
  153. // }
  154. // ],
  155. searching: true,
  156. pageLength: 20,
  157. "order": []
  158. })
  159. });
  160. delJob = function ( element , id ) {
  161. $.ajax({
  162. url: 'http://'+reportHost+'/Bug/api/job/delJob?jobId='+id,
  163. // data:{
  164. // 'id':id
  165. // },
  166. type: 'POST',
  167. success: function (result) {
  168. console.log(result);
  169. console.log(result['status'])
  170. element.parentNode.parentNode.remove();
  171. $.notify({
  172. message: '删除成功'
  173. },{
  174. // settings
  175. delay: 100,
  176. timer: 1000,
  177. type: 'success'
  178. });
  179. }
  180. });
  181. }
  182. </script>