123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- <!DOCTYPE html>
- <html lang="zh-CN" xmlns:th="http://www.thymeleaf.org"
- xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
- layout:decorator="base">
- <head>
- <link rel="stylesheet" href="/static/css/applications.css" type="text/css"/>
- <!-- dataTables -->
- <link rel="stylesheet" type="text/css"
- href="/static/AdminLTE/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css"/>
- <!-- Select2 -->
- <link rel="stylesheet" type="text/css" href="/static/AdminLTE/bower_components/select2/dist/css/select2.min.css"/>
- </head>
- <body>
- <div layout:fragment="mainbody">
- <aside class="main-sidebar">
- <section class="sidebar">
- <div class="user-panel">
- <div class="pull-left image">
- <img src="/static/images/avatar/avatar-admin.jpg" class="img-circle" alt="User Image" />
- </div>
- <div class="pull-left info">
- <p>Admin</p>
- <a href="#">
- <i class="fa fa-circle text-success"></i>
- Online
- </a>
- </div>
- </div>
- <!-- Search form -->
- <form action="#" method="get" class="sidebar-form">
- <div class="input-group">
- <input type="text" name="q" class="form-control" placeholder="Search..." />
- <span class="input-group-btn">
- <button type="submit" name="search" id="search-btn" class="btn btn-flat">
- <i class="fa fa-search"></i>
- </button>
- </span>
- </div>
- </form>
- <!-- Sidebar Menu -->
- <ul class="sidebar-menu tree" data-widget="tree">
- <li>
- <a href="/addPaper">
- <i class="glyphicon glyphicon-pencil"></i>
- <span>
- 新建试卷
- </span>
- </a>
- </li>
- <li>
- <a href="/papers">
- <i class="glyphicon glyphicon-tasks"></i>
- <span>
- 试卷列表
- </span>
- </a>
- </li>
- <li>
- <a href="/review/jobs">
- <i class="glyphicon glyphicon-tasks"></i>
- <span>
- JOB列表
- </span>
- </a>
- </li>
- </ul>
- </section>
- </aside>
- <!-- Main Content -->
- <div class="content-wrapper" style="min-height: 691px;">
- <section class="content-header">
- <h1>全部应用</h1>
- <ol class="breadcrumb">
- <li class="active">
- <a href="/home">
- <i class="fa fa-dashboard"></i>
- 全部应用
- </a>
- </li>
- </ol>
- </section>
- <!-- Main Content -->
- <section class="content container-fluid">
- <!-- <div id="task-list-search" class="input-group col-md-6">
- <input type="text" class="form-control" placeholder="Search for application">
- <span class="input-group-btn">
- <button class="btn btn-default" type="button" id="task-search-btn">Search</button>
- </span>
- </div> -->
- <table id="task-list" class="table table-striped text-center" style="margin-top: 10px">
- <thead>
- <tr>
- <!--<th></th>-->
- <th>任务名称</th>
- <th>类型</th>
- <th>创建时间</th>
- <!--<th>版本</th>-->
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <th:block th:each="task : ${tasks}">
- <tr>
- <td><b><a th:href="'/review/jobDetail?id='+${task.get('id')}" th:text="${task.get('name')}"></a></b></td>
- <!--<td><img th:src="${task.icon}" style="width: 25px; height: 25px;" /></td>-->
- <td>
- <span th:if="${task.get('group').equals('') and task.get('exam_id').equals('')}" class="label label-warning" >暂无</span>
- <span th:if="${task.get('group').equals('') and !task.get('exam_id').equals('')}" class="label label-info" >企业版</span>
- <span th:if="${task.get('exam_id').equals('') and !task.get('group').equals('') }" class="label label-success" >教育版</span>
- </td>
- <!-- <td><span class="label label-info" th:text="${task.caseId}">题号</span></td>-->
- <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>
- <td>
- <!-- <button th:onclick="'showYulan( \''+${task.get('id')}+'\' )'" class="btn btn-default">预览</button>-->
- <a type="button" class="btn btn-default" th:href="'/review/changeJob?id='+${task.get('id')}">修改</a>
- <button th:jobId="${task.get('id')}" th:onclick="javascript:delJob( this, this.getAttribute('jobId'))" class="btn btn-default">删除</button>
- </td>
- <!--<td th:text="${task.version}"></td>-->
- <!-- <td th:if="${task.numOfUndeal > 0}"><span class="label label-info">审核中</span></td>-->
- <!-- <td th:if="${task.numOfUndeal == 0}"><span class="label label-success">审核结束</span></td>-->
- <!--<td th:text="${task.startTime}">{{ task.print_start_time }}</td>-->
- <!--<td th:text="${task.endTime}">{{ task.print_end_time }}</td>-->
- <!-- <td><span class="badge"><a th:href="'/task_detail?examId=' + ${task.examId} + '&caseId=' + ${task.caseId}" style="color: #fff;" th:text="${task.numOfUndeal}"></a></span></td>-->
- </tr>
- </th:block>
- </tbody>
- </table><!-- table -->
- </section>
- </div>
- </div>
- </body>
- </html>
- <script src="/static/AdminLTE/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
- <script src="/static/AdminLTE/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
- <script src="/static/AdminLTE/bower_components/select2/dist/js/select2.min.js"></script>
- <script src="/static/AdminLTE/bower_components/bootstrap-notify/dist/bootstrap-notify.min.js"></script>
- <script type="text/javascript" xmlns:th="http://www.thymeleaf.org" th:inline="javascript">
- /*<![CDATA[*/
- var reportHost = [[${reportHost}]]
- /*]]>*/
- $(document).ready(function(){
- $('#task-list').DataTable({
- 'paging' : true,
- 'lengthChange': false,
- 'searching' : false,
- 'ordering' : true,
- 'info' : true,
- 'autoWidth' : false,
- // "columnDefs": [
- // {
- // 'targets': [2],
- // "type":"date"
- // }
- // ],
- searching: true,
- pageLength: 20,
- "order": []
- })
- });
- delJob = function ( element , id ) {
- $.ajax({
- url: 'http://'+reportHost+'/Bug/api/job/delJob?jobId='+id,
- // data:{
- // 'id':id
- // },
- type: 'POST',
- success: function (result) {
- console.log(result);
- console.log(result['status'])
- element.parentNode.parentNode.remove();
- $.notify({
- message: '删除成功'
- },{
- // settings
- delay: 100,
- timer: 1000,
- type: 'success'
- });
- }
- });
- }
- </script>
|