123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399 |
- <link rel="stylesheet" href="/css/assist/taskPage.css">
- <script src="/js/assist/drag.js" type="text/javascript"></script>
- <div class="hgc_taskPage">
- <div class="hgc_totalHeader">
- <span class="active">素材切割任务</span>
- <span><a href="<?php echo $this->createUrl('assistTask/myScanTask'); ?>">扫描处理任务</a></span>
- </div>
- <div class="searchArea">
- <form class="task_search" action="<?php echo $this->createUrl('assistTask/myTask');?>" method="get" >
- <div class="searchLeft">
- <div class="conditionItem">
- <em>答题卡:</em>
- <select name="answer_sheet_task">
- <option value="0">全部</option>
- <option value="1" <?php if($condition['answer_sheet_task']==1) echo 'selected'?>>排队中</option>
- <option value="2" <?php if($condition['answer_sheet_task']==2) echo 'selected'?>>受理中</option>
- <option value="3" <?php if($condition['answer_sheet_task']==3) echo 'selected'?>>已完成 </option>
- </select>
- </div>
- <div class="conditionItem">
- <em>试卷:</em>
- <select name="paper_task">
- <option value="0">全部</option>
- <option value="1" <?php if($condition['paper_task']==1) echo 'selected'?>>排队中</option>
- <option value="2" <?php if($condition['paper_task']==2) echo 'selected'?>>受理中</option>
- <option value="3" <?php if($condition['paper_task']==3) echo 'selected'?>>已完成 </option>
- </select>
- </div>
- <div class="conditionItem">
- <em>答案解析:</em>
- <select name="parse_task">
- <option value="0">全部</option>
- <option value="1" <?php if($condition['parse_task']==1) echo 'selected'?>>排队中</option>
- <option value="2" <?php if($condition['parse_task']==2) echo 'selected'?>>受理中</option>
- <option value="3" <?php if($condition['parse_task']==3) echo 'selected'?>>已完成 </option>
- </select>
- </div>
- <div class="conditionItem">
- <input type="text" placeholder="请输入考试名称/学校名称/学管姓名的等关键字搜索" name="search_name" value="<?php echo $condition['search_name'] ?>">
- <div class="submit hbtn">搜索</div>
- <input type="hidden" name="subject_id" value="<?php echo $subjectId?>">
- </div>
- </div>
- </form>
- <div class="conditionItem last">
- <em>学科:</em>
- <select name="subject_id" id="selectId">
- <option value="0">全部</option>
- <?php
- if(isset($subjects)){
- foreach ($subjects as $key => $subject){
- if($key==$subjectId){
- echo '<option value="'.$key.'" selected>'.$subject.'</option>';
- }else{
- echo '<option value="'.$key.'">'.$subject.'</option>';
- }
- }
- }
- ?>
- </select>
- </div>
- </div>
- <div class="tableBox">
- <table class="hgc_table" border="1" cellspacing="0">
- <thead>
- <tr>
- <th>考试名称</th>
- <th>学科</th>
- <th>学校名称</th>
- <th>学校地址</th>
- <th>学管姓名</th>
- <th>学管手机号</th>
- <th>答题卡任务</th>
- <th>试卷任务</th>
- <th>答案解析任务</th>
- <th>任务更新时间</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php $i = 1; if ($dataList):foreach ($dataList as $loop): ?>
- <tr>
- <td><p class="examName" title="<?php echo $loop['exam_name'] ?>"><?php echo $loop['exam_name'] ?></p></td>
- <td><?php echo Yii::app()->params['subjectId'][$loop['subject_id']] ?></td>
- <td><?php echo $loop['school_name'] ?></td>
- <td><?php echo $loop['address'] ?></td>
- <td><?php echo $loop['coach_name'] ?></td>
- <td><?php echo $loop['coach_mobile'] ?></td>
- <?php
- switch ($loop['answer_sheet_task']){
- case 0:
- echo '<td> 无</td>';
- break;
- case 1:
- echo '<td class="warning">排队中</td>';
- break;
- case 2:
- echo '<td class="notice">受理中</td>';
- break;
- case 3:
- echo ' <td class="theme">已完成</td>';
- break;
- default:
- echo '<td> 无</td>';
- }
- ?>
- <?php
- switch ($loop['paper_task']){
- case 0:
- echo '<td> 无</td>';
- break;
- case 1:
- echo '<td class="warning">排队中</td>';
- break;
- case 2:
- echo '<td class="notice">受理中</td>';
- break;
- case 3:
- echo '<td class="theme">已完成</td>';
- break;
- default:
- echo '<td> 无</td>';
- }
- ?>
- <?php
- switch ($loop['parse_task']){
- case 0:
- echo '<td> 无</td>';
- break;
- case 1:
- echo '<td class="warning">排队中</td>';
- break;
- case 2:
- echo '<td class="notice">受理中</td>';
- break;
- case 3:
- echo '<td class="theme">已完成</td>';
- break;
- default:
- echo '<td> 无</td>';
- }
- ?>
- <td class=" open-tips" tipstext="<?php echo $loop['tips']?>"><?php echo date('Y-m-d H:i:s',$loop['update_time'])?></td>
- <td >
- <div class="operator">
- <a href="<?php echo $this->createUrl('assistTask/detail',array('exam_group_id'=>$loop['exam_group_id']))?>" class="theme artical">查看并处理</a>
- <a href="#" class="complete blue" eid="<?php echo $loop['exam_group_id']?>">完成并提交</a>
- </div>
- </td>
- </tr>
- <?php ++$i;endforeach;
- else:?>
- <tr><td colspan="12">
- <?php
- if(isset($isNoLimit)){
- echo '用户无权限';
- }else{
- echo '暂无任务数据';
- }
- ?>
- </td></tr>
- <?php
- endif;
- ?>
- </tbody>
- </table>
- <div class="dataTables_paginate paging_simple_numbers" >
- <?php
- if(isset($pages['totalPage']) && $pages['totalPage']>1){
- $StartPage=$pages['page']-5;
- $EndPage=$pages['page']+5;
- if($StartPage<1){
- $StartPage=1;
- }
- if($EndPage>$pages['totalPage']){
- $EndPage=$pages['totalPage'];
- }
- ?>
- <div class="row" style="padding-top:10px;margin:0 auto;">
- <div class="col-xs-5" style="font-size: 16px">
- <div class="dataTables_paginate paging_simple_numbers" style="vertical-align:sub;">
- <ul id="yw0" class="yiiPager">
- <?php
- if($pages['page']>1){
- echo '<li class="previous"><a href="'.$this->createUrl('assistTask/myTask')."?page=".($pages['page']-1).'&'.http_build_query($condition).'">上一页</a></li>';
- }
- for($i=$StartPage;$i<=$EndPage;$i++){
- $url=$this->createUrl('assistTask/myTask')."?page=".$i.'&'.http_build_query($condition);
- if($pages['page']==$i){
- echo '<li class="page selected"><a href="#">'.$i.'</a></li>';
- }else{
- echo '<li class="page"><a href="'.$url.'">'.$i.'</a></li>';
- }
- }
- if($pages['page']<$pages['totalPage']){
- echo '<li class="previous"><a href="'.$this->createUrl('assistTask/myTask')."?page=".($pages['page']+1).'&'.http_build_query($condition).'">下一页</a></li>';
- }
- ?>
- </ul>
- 共:<?php echo $pages['total']?>条
- </div>
- </div>
- </div>
- <?php } ?>
- </div>
- </div>
- <div class="hgc_dialog" style="display: none">
- <div class="hgc_dialogContent">
- <h2>任务完成 <i class="close btn-colse">x</i></h2>
- <div class="content">
- <p class="warning">您将提交以下勾选中的任务对象,请确认!</p>
- <div class="conditionItem" id="taskYes">
- <p class="mgt">
- <div class="ch"><input type="checkbox" name="answer_card" value="1">答题卡<br><span class="answer_card_status">(已设置)</span></div>
- <div class="ch"><input type="checkbox" name="paper" value="1">试卷<br><span class="paper_status">(已设置)</span></div>
- <div class="ch"><input type="checkbox" name="parse" value="1">答案解析<br><span class="parse_status">(已设置)</span></div>
- </p>
- <input type="hidden" name="exam_group_id" value="0">
- </div>
- </div>
- <div class="btns">
- <input type="hidden" name="exam_id" value="0">
- <input type="hidden" name="file_type" value="">
- <div class="hbtn up-form disabled" id="btnSubmit">确定</div>
- <div class="hbtn btn-colse" id="btnClose">取消</div>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- $(document).ready(function () {
- //任务完成
- var $yesCheckInput = $('#taskYes input[type="checkbox"]')
- $yesCheckInput.off('click').click(function(e){
- if($(this).prop('checked')){
- $('#btnSubmit').removeClass('disabled')
- }else{
- var count = 0
- $yesCheckInput.each(function () {
- if($(this).prop('checked')){
- $('#btnSubmit').removeClass('disabled')
- return false;
- } else{
- count++;
- }
- })
- if(count === $yesCheckInput.length)$('#btnSubmit').addClass('disabled')
- }
- })
- //关闭弹窗
- $(".btn-colse").on("click", function () {
- //layer.closeAll();
- $('.hgc_dialog').hide();
- });
- $('.complete').click(function(){
- var examGroupId=$(this).attr('eid');
- if(examGroupId!=0){
- $.ajax({
- url:'<?php echo $this->createUrl('assistTask/getDetail')?>',
- type:'POST',
- dataType:'json',
- data:{exam_group_id:examGroupId},
- success:function(res){
- if(res.status==1){
- if(res.data['answer_card']==1){
- $('.answer_card_status').html('(已设置)');
- }else{
- $('.answer_card_status').html('(未设置)');
- }
- if(res.data['answer_card_input_status']==1){
- $('input[name=answer_card]').attr('disabled',false);
- }else{
- $('input[name=answer_card]').attr('checked',false);
- $('input[name=answer_card]').attr('disabled',true);
- }
- if(res.data['paper']==1){
- $('.paper_status').html('(已设置)');
- }else{
- $('.paper_status').html('(未设置)');
- }
- if(res.data['paper_input_status']==1){
- $('input[name=paper]').attr('disabled',false);
- }else{
- $('input[name=paper]').attr('checked',false);
- $('input[name=paper]').attr('disabled',true);
- }
- if(res.data['parse']==1){
- $('.parse_status').html('(已设置)');
- }else{
- $('.parse_status').html('(未设置)');
- }
- if(res.data['parse_input_status']==1){
- $('input[name=parse]').attr('disabled',false);
- }else{
- $('input[name=parse]').attr('checked',false);
- $('input[name=parse]').attr('disabled',true);
- }
- $('input[name=exam_group_id]').val(examGroupId);
- $('.hgc_dialog').show();
- // layer.open({
- // title: false,
- // closeBtn: 0,
- // type: 1,
- // area: ['300px', '220px'],
- // content: $("#classModal")
- // });
- }
- }
- });
- }
- });
- //完成提交
- $('.up-form').click(function(){
- var examGroupId=$('input[name=exam_group_id]').val();
- var answerCardStatus=0,
- paperStatus=0,
- parseStatus=0;
- var sendOk=false;
- if($('input[name=answer_card]').is(':checked')){
- answerCardStatus=1;
- sendOk=true;
- }
- if($('input[name=paper]').is(':checked')){
- paperStatus=1;
- sendOk=true;
- }
- if($('input[name=parse]').is(':checked')){
- parseStatus=1;
- sendOk=true;
- }
- if(examGroupId!=0 && sendOk){
- $.ajax({
- url:'<?php echo $this->createUrl('assistTask/complete')?>',
- type:'POST',
- dataType:'json',
- data:{exam_group_id:examGroupId,answer_card:answerCardStatus,paper:paperStatus,parse:parseStatus},
- success:function(res){
- if(res.status==1){
- layer.msg('提交成功');
- window.location.reload()
- }else{
- if(res.msg!=undefined){
- layer.msg(res.msg);
- }else{
- layer.msg('提交失败');
- }
- }
- }
- })
- }
- });
- $(".open-tips").on("mouseenter", function () {
- var tips_text = $(this).attr("tipstext");
- layer.tips(tips_text, this, {
- tips: [1, '#14AE68'] //还可配置颜色
- });
- });
- $('#selectId').change(function(){
- window.location.href='<?php echo $this->createUrl('assistTask/myTask')?>?subject_id='+$(this).val();
- });
- $('.submit').click(function(){
- $('.task_search').submit();
- });
- });
- </script>
|