1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050 |
- <script type="text/javascript">
- jQuery(document).ready(function(){
- // 根据年级筛选班级
- jQuery("#grade").change(function(){
- var grade = $(this).val();
- if (!grade) return false;
- jQuery.post(
- '<?php echo $this->createUrl("print/getGradeClass");?>',{"grade": grade},function(data){
- data = JSON.parse(data);
- if(data.success == 1){
- var classObj = $("#class");
- var html = "<option value=''>全部班级</option>";
- classObj.empty();
- $.each(data.message,function(i,n){
- html += "<option value='"+n.class_id+"'>" + n.class_name + "</option>";
- });
- classObj.append(html);
- }
- }
- );
- });
- });
- //客户端发送打印弹窗(客户端调用)
- function sendToPrint(){
- layer.msg('已成功发送至打印列表');
- }
- </script>
- <style>
- /*切换选择*/
- .tab-con{
- position: relative;
- height: 30px;
- width: 200px;
- background: #2977ff;
- border: 1px solid #2977ff;
- border-radius: 15px;
- }
- .has-sel{
- background: #2977ff;
- color: #fff;
- width: 50%;
- height: 30px;
- border-top-left-radius: 15px;
- border-bottom-left-radius: 15px;
- text-align: center;
- line-height: 30px;
- }
- .sel-opt{
- width: 50%;
- position: relative;
- color: #2977ff;
- line-height: 30px;
- text-indent: 6px;
- cursor: pointer;
- }
- .sel-opt:after{
- content: '';
- border-left: 6px solid transparent;
- border-right: 6px solid transparent;
- border-top: 8px solid #2977ff;
- position: absolute;
- right: 12px;
- top: 12px;
- }
- // .sel-opt select{
- // width: 100%;
- // height: 30px;
- // background: #F2F2F2;
- // color: #01B677;
- // text-indent: 6px;
- // font-size: inherit;
- // border-top-right-radius: 15px;
- // border-bottom-right-radius: 15px;
- // cursor: pointer;
- // }
- // .sel-opt select option{
- // position: relative;
- // }
- .points{
- position: absolute;
- top: -2px;
- right: 0;
- width: 10px;
- height: 10px;
- background: #F01516;
- border-radius: 50%;
- }
- .sel-cons{
- border: 1px solid #2977ff;
- width: 50%;
- position: absolute;
- right: 0;
- top: 30px;
- text-indent: 10px;
- display: none;
- }
- .sc-lis{
- line-height: 30px;
- cursor: pointer;
- }
- .sc-lis span{
- position: relative;
- }
- .sc-lis .points{
- top: 2px;
- right: -16px;
- }
- .click-sc:focus {
- color: #fff;
- }
- .click-sc:hover {
- color: #fff;
- }
- .add_class_input {width: 20px;height: 20px;vertical-align: -4px;}
- .class_right li{margin-bottom: 2px;}
- </style>
- <link rel="stylesheet" href="/fonts/fpdf/iconfont.css" />
- <link rel="stylesheet" href="/css/alert.css"/>
- <link rel="stylesheet" href="/css/assist/successPage.css"/>
- <link type="text/css" rel="stylesheet" href="/js/select/select2.min.css" />
- <script src="/js/select/select2.min.js"></script>
- <div class="main-content-inner">
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/view_navigation.php');?>
- <!-- 导航栏结束-->
- <div class="page-content">
- <div class="row" style="margin:0px;">
- <div class="col-xs-12">
- <!-- PAGE CONTENT BEGINS -->
- <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
- <div class="row">
- <div class="col-xs-6">
- <form method="get" id="form1" action="<?php echo $this->createUrl("third/exam_list");?>" style="padding-left: 0;">
- <div class="clearfix">
- <div class="hgc_siderBar" id="hgc_siderBar">
- <div class="menuBtn" id="hgc_hideMenuBtn">
- <img src="/images/assist/icon_hgc_menu.svg" />
- <span class="btnText">考试详情管理</span>
- </div>
- <ul class="menuList">
- <li>
- <a>考试详情管理</a>
- </li>
- <li>
- <a href="<?php echo $this->createUrl('third/getTaskDetail',array('exam_group_id'=>$exam_group_data->exam_group_id,'grade'=>$grade,'branch'=>$branch))?>">扫描上传管理</a>
- </li>
- <!-- <li>
- <a>阅卷监控管理</a>
- </li>-->
- <li class="back" id="hgc_menuBack">
- <a href="<?php echo $this->createUrl('third/index')?>"> <img src="/images/assist/icon_hgc_back.svg" alt=""> 返回</a>
- </li>
- </ul>
- </div>
- </div>
- <div class="col-xs-12 clearfix" style="padding-left: 0;">
- <div class="hgc_headOPerator fl" style="background: transparent;padding-left: 0;">
- <div class="menuBtn" id="hgc_scanUploadBtn">
- <img src="/images/assist/icon_hgc_menu.svg" />
- <span class="btnText">考试详情管理</span>
- </div>
- </div>
- <script>
- var scanMenuBtn = document.getElementById('hgc_scanUploadBtn');
- var scanMenu = document.getElementById('hgc_siderBar')
- var scanMenuBack = document.getElementById('hgc_menuBack')
- var scanMenuHideBtn = document.getElementById('hgc_hideMenuBtn')
- scanMenuBtn.addEventListener('click',function(){
- var originMeunText = scanMenuBtn.lastElementChild.innerText;
- scanMenu.style.top = $(scanMenuBtn).offset().top - $(window).scrollTop()+'px'
- scanMenu.className = 'hgc_siderBar active'
- scanMenuHideBtn.lastElementChild.innerText = originMeunText
- })
- scanMenuBack.addEventListener('click',function(){
- scanMenu.className = 'hgc_siderBar'
- })
- scanMenuHideBtn.addEventListener('click',function(){
- scanMenu.className = 'hgc_siderBar'
- })
- </script>
- <div class="dataTables_length margin-zy fl" style="margin-top: 15px;">
- <select class="form-control" id="class" name="classId">
- <option value="">全部班级</option>
- <?php foreach($classes as $key=>$class){?>
- <option <?php if(isset($class[$classId])){echo "selected";}?> value="<?php echo $class[$key]["class_id"];?>"><?php echo $class[$key]["class_name"];?></option>
- <?php }?>
- </select>
- <input type="hidden" value="<?php echo $exam_group_id?>" name="exam_group_id">
- <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索</button>
- </div>
- </div>
- </form>
- </div>
- <div class="col-xs-6">
- <div class="dataTables_filter" id="dynamic-table_filter" style="padding-top:15px;text-align: right;">
- <?php if(isset($is_change_to_third) && $is_change_to_third==1){?>
- <span class=" click-sc addbx" onclick="createTemplateEnglish('<?php echo $exam_id;?>',11)" eid="<?php echo $exam_group_id;?>" aria-hidden="true" title="下载试卷">下载试卷</span>
- <?php }?>
- <span class=" click-sc addbx" id="addClass" <?php if(!$enable_add_class){echo 'style="background-color:gray;border-color:gray" enable=0';}else{echo 'enable=1';}?> grade="<?php echo $grade;?>" branch="<?php echo $branch; ?>" eid="<?php echo $exam_group_id;?>" aria-hidden="true" title="添加班级">添加班级</span>
- <!-- <a href="javascript:void(0);" class="btn click-delete btn-sm" id="delPaperStudentAll">
- <i style="font-style: normal;" ></i>删除全部未考试学生
- </a>-->
- <span class=" click-sc addbx " id="viewNoUploadPaperStudentAll" exam_group_id="<?php echo $exam_group_id?>" aria-hidden="true" title="查看未上传考生">查看未上传考生</span>
- <?php if($exam_group_data->mark_type > 0 && $exam_group_data->mark_status==2 && $exam_group_data->upload_status==2 && $exam_group_data->import_score_type==0 && ($exam_group_data['homework']==0 || !$is_all_select))
- {
- ?>
- <span class="click-sc addbx" aria-hidden="true" title="恢复考试状态" onclick="renewExamStat('<?php echo $exam_id; ?>')">恢复考试状态</span>
- <?php
- }?>
- <span class=" click-sc addbx " id="transfer" exam_group_id="<?php echo $exam_group_id?>" aria-hidden="true" title="转移学生成绩">转移学生成绩</span>
- <span class=" click-sc addbx " <?php if($restore==1 || $exam_uploaded==0){echo 'style="background-color:gray;border-color:gray" '; }else{ echo 'id="restore"';}?> exam_name="<?php echo $exam_name?>" exam_group_id="<?php echo $exam_group_id?>" exam_date="<?php echo $exam_date?>" aria-hidden="true" title="申请还原考试">申请还原考试</span>
- <?php if(in_array(Yii::app()->session['session_subject_id'],array_merge(Yii::app()->params['mathSubjectId'],array(12)))): ?>
- <?php if($answer_card_saved==0):?>
- <!-- <span class=" click-sc addbx" aria-hidden="true" style="background-color:gray;border-color:gray" title="指定题目" onclick="javascript:layer.msg('请先创建答题卡')" >指定题目</span>-->
- <?php else:?>
- <!-- <span class=" click-sc addbx topicPushBatch" exam_name="<?php echo $exam_name?>" exam_group_id="<?php echo $exam_group_id?>" aria-hidden="true" title="指定题目">指定题目</span>-->
- <?php endif;?>
- <?php endif;?>
- </div>
- </div>
- </div>
- <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" style="font-size:12px">
- <thead>
- <tr>
- <th>
- <input type="checkbox" class="ace selectAll">
- 名称</th>
- <th >班级</th>
- <th>申请日期</th>
- <?php if($online_card==1 && $is_qrcode_online==1){
- ?>
- <th >在线答题卡生成进度</th>
- <?php }?>
- <th >成绩已上传/总数</th>
- <th >答卷图片已上传/总数</th>
- <th >原卷已上传/总数</th>
- <th >操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($printList)):foreach($printList as $cl):?>
- <tr>
- <td style="max-width:260px">
- <input type="checkbox" class="ace myselect" value="<?php echo $cl['exam_id'];?>">
- <?php if( isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)){
- ?>
- <?php echo $cl['exam_name'];?>
- <?php }else{echo $cl['exam_name'];}?>
- </td>
- <td><?php echo $cl['class_name']?></td>
- <td><?php if(!empty($cl['create_time'])){ echo date('Y-m-d H:i',$cl['create_time']);}?></td>
- <?php if($online_card==1 && $is_qrcode_online==1){
- ?>
- <td><?php echo '<span style="color:#619aff;font-weight: bold">'.$cl["card_created"].'</span>/'.$cl["students_count"];?></td>
- <?php }?>
- <td><?php echo '<span style="color:#619aff;font-weight: bold">'.$cl["is_uploaded_count"].'</span>/'.$cl["students_count"];?></td>
- <td><?php echo '<span style="color:#619aff;font-weight: bold">'.$cl["student_img_up_num"].'</span>/'.$cl["students_count"];?></td>
- <td><?php echo '<span style="color:#619aff;font-weight: bold">'.$cl["student_img_count"].'</span>/'.$cl["students_count"];?></td>
- <td style="width:265px;">
- <span class="iconfont click-sc addbx" aria-hidden="true" title="选择学生" onclick="javascript:location.href='<?php echo $this->createUrl('third/change',array('eid'=>$cl['exam_id'],'cid'=>$cl['class_id']));?>'"></span>
- <span class="iconfont addbx click-delete delClass" <?php if($cl['upload_status']==0 && $page_total>1){ echo 'style="background-color: red;" w_enable=1';}else{echo 'style="background-color: gray;border-color:gray;" w_enable=0';}?> w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="删除" onclick="delExam(this)">删</span>
- <?php if($online_card==1 && $is_qrcode_online==1){
- ?>
- <span class="iconfont click-sc addbx downloadOnlinePdf" style="padding:5px 0;" class_id="<?php echo $cl['class_id']?>" exam_id="<?php echo $cl['exam_id']; ?>" aria-hidden="true" ><img src="/images/online/pdf.svg"></span>
- <?php
- }
- ?>
- <?php
- if(Yii::app()->session['session_duoxueke_subject_id']==8 && $is_all_select==1 && $exam_group_data['mark_type']==4){
- ?>
- <span class="click-sc addbx sendExamStomp" aria-hidden="true" examGroupId="<?php echo $exam_group_data['exam_group_id']; ?>" examId="<?php echo $cl['exam_id']; ?>" title="上传完成" >上传完成</span>
- <?php
- }
- ?>
- <?php if($exam_group_data->mark_type ==4 && $cl['status']==1 && $exam_group_data->import_score_type==0 && ($exam_group_data['homework']==0 || !$is_all_select))
- {
- ?>
- <span class="click-sc addbx" aria-hidden="true" title="恢复考试状态" onclick="renewExamStatClass('<?php echo $cl['exam_id']; ?>')">恢</span>
- <?php
- }?>
- <?php
- if(in_array(Yii::app()->session['session_subject_id'],array(3,6,51,12)) && $is_all_select==1 && $exam_group_data['mark_type']==4){
- ?>
- <span class="click-sc addbx sendExamStomp" aria-hidden="true" title="上传完成" examGroupId="<?php echo $exam_group_data['exam_group_id']; ?>" examId="<?php echo $cl['exam_id']; ?>" >上传完成</span>
- <?php
- }
- ?>
- <?php
- if($exam_group_data['homework']==1 && $is_all_select==1 && $exam_group_data['mark_type']==4){
- ?>
- <span class="click-sc addbx sendExamStompHomework" aria-hidden="true" examGroupId="<?php echo $exam_group_data['exam_group_id']; ?>" examId="<?php echo $cl['exam_id']; ?>" title="完成作业" >完成作业</span>
- <?php
- }
- ?>
- <?php if(in_array(Yii::app()->session['session_subject_id'],array_merge(Yii::app()->params['mathSubjectId'],array(12)))): ?>
- <?php if($answer_card_saved==0):?>
- <span class="iconfont addbx" aria-hidden="true" title="指定题目" onclick="javascript:layer.msg('请先创建答题卡')" examGroupId="<?php echo $exam_group_data['exam_group_id']; ?>" examId="<?php echo $cl['exam_id']; ?>" ><img src="/images/topic_push_3.bmp" ></span>
- <?php else:?>
- <?php if(isset($topic_push_setting[(string)$cl['exam_id']])):?>
- <span class="iconfont addbx topicPush" aria-hidden="true" title="指定题目" examGroupId="<?php echo $exam_group_data['exam_group_id']; ?>" examId="<?php echo $cl['exam_id']; ?>" ><img src="/images/topic_push_2.png" ></span>
- <?php else:?>
- <span class="iconfont addbx topicPush" aria-hidden="true" title="指定题目" examGroupId="<?php echo $exam_group_data['exam_group_id']; ?>" examId="<?php echo $cl['exam_id']; ?>" ><img src="/images/topic_push_1.png" ></span>
- <?php endif;?>
- <?php endif;?>
- <?php endif;?>
- </td>
- </tr>
- <?php endforeach;else:?>
- <tr><td colspan="8">暂无数据!</td></tr>
- <?php endif;?>
- </tbody>
- </table>
- <?php if(!empty($page_total)):?>
- <div class="row">
- <div class="col-xs-6">
-
- </div>
- <div class="col-xs-6">
- <div class="dataTables_paginate paging_simple_numbers">
- <?php
- $this->widget('CLinkPager', array(
- 'header' => '',
- 'firstPageLabel'=> '首页',
- 'lastPageLabel' => '末页',
- 'prevPageLabel' => '上一页',
- 'nextPageLabel' => '下一页',
- 'pages' => $pages,
- 'maxButtonCount'=> 5,
- ));
- echo '共:'.$page_total.'条';
- ?>
- </div>
- </div>
- </div>
- <?php endif;?>
- </div>
- <!--上传模板弹窗-->
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
- <!-- 弹窗 -->
- <div class="confirmbox-mask" style="display: none;" id="fieldModal">
- <div class="class-modal" style="padding: 0px;">
- <div class="class-modal-head" style="background-color: #2977ff;color: white;height: 30px;font-size: 16px;font-weight: initial;"><span style="float: left;padding: 5px;">添加考试班级</span><span class=" add-class-close" style="float: right;padding: 5px;cursor: pointer;">X</span></div>
- <form id="examSelect">
- <div class="class-modal-body">
- <p class="title">
- <input type="hidden" id="grade_id" name="grade_id" value="0">
- <span style="float: left;" id="grade">
- </span>
- <span style="margin-left: 20px;">
- <?php if(Yii::app()->params['section']==1): ?>
- <select class="form-control" id="branch" name="branch" style="width: auto;display: inline-block">
- <option value="0">全部</option>
- <option value="1">文科</option>
- <option value="2">理科</option>
- </select>
- <?php endif;?>
- <span style="margin-left: 20px;">
- <input type="checkbox" id="global_check_all" class="add_class_input"> 全选 <span style="color: red;">(共选中<i id="allCheckCount">0</i>个)</span>
- </span>
- </span>
- <span style="float: right;color: red;margin-right: 20px;">已自动过滤考试中的班级</span>
- </p>
- <div class="class_area" id="class_area">
- <div class="class_left">
- <p><span style="font-weight: bold">A层班级</span> (已选: <i id="aCheckCount">0</i>)</p>
- </div>
- <ul class="class_right area_1">
- </ul>
- <div class="clear"></div>
- <div class="class_left">
- <p><span style="font-weight: bold">B层班级</span> (已选: <i id="bCheckCount">0</i>)</p>
- </div>
- <ul class="class_right area_2">
- </ul>
- <div class="clear"></div>
- <div class="class_left">
- <p><span style="font-weight: bold">C层班级</span> (已选: <i id="cCheckCount">0</i>)</p>
- </div>
- <ul class="class_right area_3">
- </ul>
- </div>
- </div>
- <p class="class_btn" style="text-align: center;">
- <input type="hidden" name="exam_gruop_id" value="0">
- <button type="button" class="setting_sumbit" style="margin-right: 10px;">确定</button>
- <button type="button" class="cancel-btn">取消</button>
- </p>
- </form>
- </div>
- </div>
- <!--题目设置弹窗-->
- <style>
- .topic_list,.topic_class{width:100%;display: block;clear:both}
- .topic_list li{padding:0 10px;height:30px;border:1px solid #ccc;background: #fff;margin:5px;text-align: center;line-height: 30px;cursor: pointer}
- /*.topic_list li.active{background:#aaa}*/
- .topic_list li.active{background:#2977ff;color:#FFFFFF}
- .topic_class li{margin:0 10px 5px 10px;padding:0;float:left}
- .topic-modal-body{margin-top:15px;max-height: 400px;overflow: auto}
- .topic_right{float:left;margin-bottom:15px;}
- .topic_right li{float:left;}
- </style>
- <div class="confirmbox-mask" style="display:none;" id="fieldModalTopic">
- <div class="class-modal" style="padding: 0px;">
- <div class="class-modal-head" style="background-color: #2977ff;color: white;height: 30px;font-size: 16px;font-weight: initial;"><span style="float: left;padding: 5px;">指定题目</span><span class="topic-push-close" style="float: right;padding: 5px;cursor: pointer;">X</span></div>
- <form id="examSelect">
- <div class="topic-modal-body">
- <div class="class_area" id="class_area">
- <div class="">
- <p><span style="font-weight: bold">适用班级</span> </p>
- </div>
- <ul class="topic_class">
- <li><span>班级1</span></li>
- <li><span>班级1</span></li>
- <li><span>班级1</span></li>
- <li><span>班级1</span></li>
- </ul>
- <div class="clear"></div>
- <div class="paper_topic_show">
- <div class="">
- <p><span style="font-weight: bold">试卷结构</span> </p>
- </div>
- <div class="">
- <p><span style="font-weight: bold">单选题</span> </p>
- </div>
- <ul class="topic_right topic_list">
- <li><span>1</span></li>
- <li><span>1</span></li>
- <li class="active"><span >1</span></li>
- </ul>
- <div class="">
- <p><span style="font-weight: bold">单选题</span> </p>
- </div>
- <ul class="topic_right topic_list">
- <li><span>1</span></li>
- <li><span>1</span></li>
- <li class="active"><span >1</span></li>
- </ul>
- <div class="">
- <p><span style="font-weight: bold">单选题</span> </p>
- </div>
- <ul class="topic_right topic_list">
- <li><span>1</span></li>
- <li><span>1</span></li>
- <li class="active"><span >1</span></li>
- </ul>
- <div class="">
- <p><span style="font-weight: bold">单选题</span> </p>
- </div>
- <ul class="topic_right topic_list">
- <li><span>1</span></li>
- <li><span>1</span></li>
- <li class="active"><span >1</span></li>
- </ul>
- </div>
- <div class="clear"></div>
- </div>
- </div>
- <p>
- <span class="red">注意:</span><br>
- 1.如果答题卡试题结构更改,或者答题卡类型变化,指定题目数据将自动清空,请谨慎操作!<br>
- 2.对于选做题,一组选做题请全部选择,或者全部不选。
- </p>
- <p class="class_btn" style="text-align: center;">
- <input type="hidden" name="examTopicGroupId" value="0">
- <input type="hidden" name="examTopicExamIds" value="">
- <button type="button" class="topic_setting_sumbit" style="margin-right: 10px;">确定</button>
- <button type="button" class="topic-push-close gray">取消</button>
- </p>
- </form>
- </div>
- </div>
- <!--题目设置弹窗end-->
- <!-- 未上传考生列表弹窗 -->
- <div class="confirmbox-mask" style="display: none;" id="fieldModalStudent">
- <div class="class-modal" style="padding: 0;height:580px;width:800px;">
- <div class="class-modal-head" style="background-color: #2977ff;color: white;height: 30px;font-size: 16px;font-weight: initial;"><span style="float: left;padding: 5px;">统计</span><span class="student-list-close" style="float: right;padding: 5px;cursor: pointer;">X</span></div>
- <form id="examSelect">
- <div class="" style="height:520px;padding:10px;">
- <p class="title">
- <input type="hidden" id="exam_group_id" name="exam_group_id" value="<?php echo $exam_group_data['exam_group_id']; ?>">
- <span style="float: left;" id="grade">
- </span>
- <span style="margin-left: 20px;">
- 班级
- <select class="form-control" id="classes" name="class" style="width: auto;display: inline-block">
- <option value="0">全部</option>
- </select>
- 类型
- <select class="form-control" id="studentType" name="studentType" style="width: auto;display: inline-block">
- <option value="-1">全部</option>
- <option value="0" selected>未上传考生</option>
- <option value="1">缺考</option>
- </select>
- </span>
- <span style="float: right;color: red;margin-right: 20px;">
- <button class="delClassStudent">删除未上传</button>
- <button class="delBatchStudent">批量删除未上传</button>
- <button class="downLoadBatchStudent">下载全部</button>
- </span>
- </p>
- <div class="class_area" id="class_area">
- <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer student-list" style="font-size:12px">
- <thead>
- <tr>
- <th width="1%" nowrap="nowrap"> <input type="checkbox" name="select-all" class="selectAll" value="1" />全选</th>
- <th>序号</th>
- <th>姓名</th>
- <th>系统准考证号</th>
- <th>学校准考证号</th>
- <th>班级</th>
- <th>状态</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <tr><td colspan="8">暂无数据</td></tr>
- </tbody>
- </table>
- <div class="row">
- <div class="col-xs-6">
- <div class="dataTables_paginate paging_simple_numbers student_list_page">
- </div>
- </div>
- </div>
- </div>
- </div>
- </form>
- </div>
- </div>
- <!-- 转移成绩弹窗 -->
- <div class="confirmbox-mask" style="display: none;" id="transferWindow">
- <div class="class-modal" style="padding: 0;height:320px;width:410px;">
- <div class="class-modal-head" style="background-color: #2977ff;color: white;height: 30px;font-size: 16px;font-weight: initial;"><span style="float: left;padding: 5px;">转移学生成绩</span><span class="transfer-close" style="float: right;padding: 5px;cursor: pointer;">X</span></div>
- <form id="examSelect">
- <div style="clear: both">
- <span>说明:该功能适用于学生涂错考号需要调换成绩的情况,只能将已上传成绩的学生成绩转移给未上传的学生,且相关班级未完成阅卷</span>
- </div>
- <div>
- <table>
- <tr>
- <td>
- 请选择需要转移的学生<br>
- <select id="uploadedStudent" name="uploadedStudent">
- </select>
- </td>
- <td><img src="/images/arrows.png"></td>
- <td>
- 转移给<br>
- <select id="noUploadedStudent" name="noUploadStudent">
- </select>
- </td>
- </tr>
- </table>
- </div>
- <p class="class_btn" style="text-align: center;margin-top:50px;">
- <button type="button" class="transferSubmit" style="margin-right: 10px;">确定</button>
- <button type="button" class="transfer-cancel-btn ">取消</button>
- </p>
- </form>
- </div>
- </div>
- <!-- 删除未上传班级弹窗-->
- <div id="studentUploadClass" style="display: none;">
- <div class="content-box clearfix " style="padding:10px;">
- <div class="uploadedClass"><span style="font-weight: bold">已上传班级:</span>
- <span class="show_uploaded">
- </span>
- </div>
- <div class="noUploaded"><span style="font-weight: bold">未上传班级:</span>
- <span class="show_nouploaded">
- </span>
- </div>
- <p class="red">选择班级后,将对班级内未上传的学生进行删除</p>
- </div>
- </div>
- <script src="/js/jquery.ajaxfileupload.js"></script>
- <script src="/js/print/ajax.js"></script>
- <script type="text/javascript">
- var isNewVersion=2;
- console.log(isNewVersion)
- $(document).ready(function(){
- var gradeArr=[];
-
- <?php
- if(Yii::app()->params['grade_list']){
- foreach (Yii::app()->params['grade_list'] as $id => $val){
- echo "gradeArr[".$id."]='".$val['grade_name']."';";
- }
- }
- ?>
- $('#addClass').click(function(){
- var eid=$(this).attr('eid');
- var grade=$(this).attr('grade');
- var enable=$(this).attr('enable');
- if(enable == 0){
- return false;
- }
- $('.area_1').html('');
- $('.area_2').html('');
- $('.area_3').html('');
- $('.checkAll').prop('checked',false);
- $('#grade').html(gradeArr[grade]);
- $('#grade_id').val(grade);
- $.ajax({
- url:'<?php echo $this->createUrl('print/loadclass')?>',
- type:'POST',
- dataType:'json',
- data:{'branch':0,'eid':eid,'grade':grade},
- success:function(res){
- if(res.status==1){
- class_data=res.classData;
- $('input[name=exam_gruop_id]').val(eid);
- if(class_data[1]!=undefined){
- area_1_html='';
- for(var i=0;i<class_data[1].length;i++){
- if(class_data[1][i]['is_used']==1){
- area_1_html+="<li style='color: gray;' class='ellipsis' title='"+class_data[1][i]['class_name']+"'><input onclick='syncCount()' name='a_check_class' type='checkbox' class='add_class_input choose_class' disabled='disabled' checked value='"+class_data[1][i]['class_id']+"'>"+handleLongName(class_data[1][i]['class_name'],6)+"</li>";
- }else{
- area_1_html+="<li class='ellipsis' title='"+class_data[1][i]['class_name']+"'><input name='a_check_class' onclick='syncCount()' type='checkbox' class='add_class_input choose_class' title='"+class_data[1][i]['class_name']+"' value='"+class_data[1][i]['class_id']+"'>"+handleLongName(class_data[1][i]['class_name'],6)+"</li>";
- }
- }
- $('.area_1').html(area_1_html);
- }
- if(class_data[2]!=undefined){
- area_2_html='';
- for(var i=0;i<class_data[2].length;i++){
- if(class_data[2][i]['is_used']==1){
- area_2_html+="<li style='color: gray;' class='ellipsis' title='"+class_data[2][i]['class_name']+"'><input onclick='syncCount()' name='b_check_class' type='checkbox' class='add_class_input choose_class' disabled='disabled' checked value='"+class_data[2][i]['class_id']+"'>"+handleLongName(class_data[2][i]['class_name'],6)+"</li>";
- }else{
- area_2_html+="<li class='ellipsis' title='"+class_data[2][i]['class_name']+"'><input onclick='syncCount()' name='b_check_class' type='checkbox' class='add_class_input choose_class' value='"+class_data[2][i]['class_id']+"'>"+handleLongName(class_data[2][i]['class_name'],6)+"</li>";
- }
- }
- $('.area_2').html(area_2_html);
- }
- if(class_data[3]!=undefined){
- area_3_html='';
- for(var i=0;i<class_data[3].length;i++){
- if(class_data[3][i]['is_used']==1){
- area_3_html+="<li style='color: gray;' class='ellipsis' title='"+class_data[3][i]['class_name']+"'><input onclick='syncCount()' name='c_check_class' type='checkbox' class='add_class_input choose_class' disabled='disabled' title='"+class_data[3][i]['class_name']+"' checked value='"+class_data[3][i]['class_id']+"'>"+handleLongName(class_data[3][i]['class_name'],6)+"</li>";
- }else{
- area_3_html+="<li class='ellipsis' title='"+class_data[3][i]['class_name']+"'><input onclick='syncCount()' name='c_check_class' type='checkbox' class='add_class_input choose_class' title='"+class_data[3][i]['class_name']+"' value='"+class_data[3][i]['class_id']+"'>"+handleLongName(class_data[3][i]['class_name'],6)+"</li>";
- }
- }
- $('.area_3').html(area_3_html);
- }
- syncCount();
- $('#fieldModal').show();
- }
- }
- });
- });
- $('#branch').change(function () {
- var branch=$(this).val();
- var eid=$('input[name=exam_gruop_id]').val();
- var grade=$('#grade_id').val();
- $('.area_1').html('');
- $('.area_2').html('');
- $('.area_3').html('');
- $('.checkAll').prop('checked',false);
- $.ajax({
- url:'<?php echo $this->createUrl('print/loadclass')?>',
- type:'POST',
- dataType:'json',
- data:{'branch':branch,'eid':eid,'grade':grade},
- success:function(res){
- if(res.status==1){
- class_data=res.classData;
- $('input[name=exam_gruop_id]').val(eid);
- if(class_data[1]!=undefined){
- area_1_html='';
- for(var i=0;i<class_data[1].length;i++){
- if(class_data[1][i]['is_used']==1){
- area_1_html+="<li style='color: gray;' class='ellipsis' title='"+class_data[1][i]['class_name']+"'><input onclick='syncCount()' name='a_check_class' type='checkbox' class='add_class_input choose_class' disabled='disabled' checked value='"+class_data[1][i]['class_id']+"'>"+handleLongName(class_data[1][i]['class_name'],6)+"</li>";
- }else{
- area_1_html+="<li class='ellipsis' title='"+class_data[1][i]['class_name']+"'><input name='a_check_class' onclick='syncCount()' type='checkbox' class='add_class_input choose_class' title='"+class_data[1][i]['class_name']+"' value='"+class_data[1][i]['class_id']+"'>"+handleLongName(class_data[1][i]['class_name'],6)+"</li>";
- }
- }
- $('.area_1').html(area_1_html);
- }
- if(class_data[2]!=undefined){
- area_2_html='';
- for(var i=0;i<class_data[2].length;i++){
- if(class_data[2][i]['is_used']==1){
- area_2_html+="<li style='color: gray;' class='ellipsis' title='"+class_data[2][i]['class_name']+"'><input onclick='syncCount()' name='b_check_class' type='checkbox' class='add_class_input choose_class' disabled='disabled' checked value='"+class_data[2][i]['class_id']+"'>"+handleLongName(class_data[2][i]['class_name'],6)+"</li>";
- }else{
- area_2_html+="<li class='ellipsis' title='"+class_data[2][i]['class_name']+"'><input onclick='syncCount()' name='b_check_class' type='checkbox' class='add_class_input choose_class' value='"+class_data[2][i]['class_id']+"'>"+handleLongName(class_data[2][i]['class_name'],6)+"</li>";
- }
- }
- $('.area_2').html(area_2_html);
- }
- if(class_data[3]!=undefined){
- area_3_html='';
- for(var i=0;i<class_data[3].length;i++){
- if(class_data[3][i]['is_used']==1){
- area_3_html+="<li style='color: gray;' class='ellipsis' title='"+class_data[3][i]['class_name']+"'><input onclick='syncCount()' name='c_check_class' type='checkbox' class='add_class_input choose_class' disabled='disabled' title='"+class_data[3][i]['class_name']+"' checked value='"+class_data[3][i]['class_id']+"'>"+handleLongName(class_data[3][i]['class_name'],6)+"</li>";
- }else{
- area_3_html+="<li class='ellipsis' title='"+class_data[3][i]['class_name']+"'><input onclick='syncCount()' name='c_check_class' type='checkbox' class='add_class_input choose_class' title='"+class_data[3][i]['class_name']+"' value='"+class_data[3][i]['class_id']+"'>"+handleLongName(class_data[3][i]['class_name'],6)+"</li>";
- }
- }
- $('.area_3').html(area_3_html);
- }
- syncCount();
- $('#fieldModal').show();
- }
- }
- });
- });
- $('.add-class-close,.cancel-btn').click(function () {
- $('#fieldModal').hide();
- });
- $('#global_check_all').change(function(){
- var hasChecked = $(this).prop('checked');
- var allChecks = $('#class_area').find('input[type="checkbox"]');
- allChecks.each(function (index,el) {
- if($(el).prop('disabled'))return;
- $(el).prop('checked',hasChecked);
- });
- syncCount();
- });
- //保存班级加减操作
- $('.setting_sumbit').click(function(){
- var class_id=[];
- // console.log($('.choose_class').length);
- for(var i=0;i<$('.choose_class').length;i++){
- var checkItem = $('.choose_class').eq(i);
- if(checkItem.is(':checked') && !checkItem.prop('disabled')){
- class_id.push($('.choose_class').eq(i).val());
- }
- }
- var eid=$('input[name=exam_gruop_id]').val();
- console.log(class_id);
- if(class_id.length==0){
- layer.msg('请选择考试班级');
- return false;
- }else{
- $(this).attr('disabled',true);
- layer.msg('操作中请稍候。。。。。。',{time:0})
- $.ajax({
- url:'<?php echo $this->createUrl('print/addexamclass')?>',
- type:'POST',
- dataType:'json',
- data:{'eid':eid,'classId':class_id,'is_third':1},
- success:function(res){
- layer.closeAll();
- if(res.status==1){
- layer.msg('修改成功');
- $('#fieldModal').hide();
- window.location.reload();
- }else{
- layer.msg(res.msg);
- }
- }
- });
- }
- });
- /*var str = '<div class="points"></div>';
- $(".sc-lis").each(function(){
- if($(this).find(".points").length>0){
- $(".sel-opt").append(str);
- }
- });*/
- $(".sel-opt,.sel-cons").mouseover(function(){
- $(".sel-cons").show();
- }).mouseout(function(){
- $(".sel-cons").hide();
- });
- $(".sc-lis").click(function(){
- var data = {
- subjectId : $(this).attr('val')
- };
- $.post("<?php echo Yii::app()->createUrl('print/setSubjectId')?>",data,function(flags){
- if(flags)
- {
- location.reload();
- }else
- {
- alert('网络异常');
- }
- });
- $('.has-sel').text($(this).text());
- $(".sel-cons").hide();
- });
- $(".ruanyun").click(function(){
- var exam_id = $(this).attr('exam_id');
- layer.msg("确定发送吗?学生是否全部上传成绩", {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- $.ajax({
- url: "<?php echo $this->createUrl('print/send_ruanyun_pdf');?>",
- type: "POST",
- dataType: "json",
- data:{ examId: exam_id
- },
- success: function (data){
- if(data.status == 1){
- layer.msg('发送成功',{
- icon: 1
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }else if(data.status == 2){
- layer.msg('发送失败,未上传成绩',{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }else{
- layer.msg('发送失败',{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }
- });
- }
- });
- });
- $(".create_sheet").click(function(){
- var exam_group_id = $(this).attr("exam_group_id");
- var sheet_id = $(this).attr("sheet_id");
- if(exam_group_id>0){
- evaluationClient.createAnswerSheet(sheet_id+","+exam_group_id);
- }
- });
- $("#delPaperStudentAll").click(function(){
- // 判断是否有选中
- var studentsIds;
- layer.msg('确定删除全部未考试的学生吗?', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- var data={
- "exam_group_id":"<?php echo $exam_group_id ?>",
- };
- jQuery.post(
- "<?php echo $this->createUrl("print/delExamStudentAll?");?>",data,function(data){
- var m =JSON.parse(data);
- if(m.status==1)
- {
- var icon = 6;
- layer.alert("删除成功", {icon: icon}, function(){
- location.replace(location.href);
- });
- }else if(m.status==2){
- var icon = 5;
- layer.alert("无未上传成绩的学生", {icon: icon}, function(){
- location.replace(location.href);
- });
- }else{
- var icon = 5;
- layer.alert("删除失败", {icon: icon}, function(){
- location.replace(location.href);
- });
- }
- });
- }
- });
- });
- $('.topicPush').click(function(){
- var examId=$(this).attr('examId');
- var examGroupId=$(this).attr('examGroupId');
- //加载数据
- layer.msg('正在加载数据,请稍候......',{time:0})
- LoadExamPushTopic(examId,examGroupId);
- });
- //批量设置试题推送
- $('.topicPushBatch').click(function(){
- // 判断是否有选中
- examGroupId=$(this).attr('exam_group_id')
- examIds=[];
- $(".myselect").each(function(m,n){
- if ($(this).prop('checked')) {
- console.log('11');
- examIds.push($(this).val());
- }
- });
- if(examIds.length==0){
- layer.msg('请至少选择一个班级');
- return false;
- }
- console.log(examIds);
- LoadExamPushTopic(examIds,examGroupId);
- });
- function LoadExamPushTopic(examId,examGroupId){
- $.ajax({
- url: '<?php echo $this->createUrl('print/loadExamPushTopic')?>',
- type: 'POST',
- dataType: 'json',
- data: {'examIds': examId,'examGroupId':examGroupId},
- success: function (res) {
- layer.closeAll()
- if(res.status==1){
- apiData=res.data;
- if(apiData['qxk_paper_id']>0){
- html='';
- html+=' <div class="">\n' +
- ' <p><span style="font-weight: bold">试卷结构</span> </p>\n' +
- ' </div>';
- html+=' <div class="">\n' +
- ' <p><span style="font-weight: bold">试卷结构</span> </p>\n' +
- ' </div>';
- html+='<ul class="topic_right topic_list">';
- $.each(apiData['paper_topic'],function(i,v){
- if($.inArray(v,apiData['topic_setting'])!=-1){
- html+='<li class="topic active"><span topic_id="'+v+'">'+i+'</span></li>';
- }else{
- html+='<li class="topic"><span topic_id="'+v+'">'+i+'</span></li>';
- }
- })
- html+='</ul>';
- $('#fieldModalTopic').find('.paper_topic_show').html(html);
- }else{
- html='';
- html+=' <div class="">\n' +
- ' <p><span style="font-weight: bold">试题结构</span> </p>\n' +
- ' </div>';
- html+='<div class="">';
- topicNo=['一','二','三','四','五','六','七','八','九','十'];
- var no=0;
- $.each(apiData['paper_topic'],function(i,v){
- topicname=topicNo[no]+'、单选题';
- if(i==2 || i==11){
- topicname=topicNo[no]+'、多选题';
- }else if(i==5){
- topicname=topicNo[no]+'、填空题';
- }else if(i==7){
- topicname=topicNo[no]+'、解答题';
- }else if(i==17){
- topicname=topicNo[no]+'、选做题';
- }
- no++;
- html+='<div class="">';
- html+='<p><span style="font-weight: bold">'+topicname+'</span> </p>';
- html+='</div>';
- html+='<ul class="topic_right topic_list">';
- $.each(v,function (ii,vv) {
- if($.inArray(vv['topic_id'],apiData['topic_setting'])!=-1){
- html+='<li class="topic active"><span topic_id="'+vv['topic_id']+'">'+vv['order']+'</span></li>';
- }else{
- html+='<li class="topic"><span topic_id="'+vv['topic_id']+'">'+vv['order']+'</span></li>';
- }
- })
- html+='</ul>';
- })
- $('#fieldModalTopic').find('.paper_topic_show').html(html);
- }
- classHtml='';
- $.each(apiData['classes'],function(i,v){
- classHtml+='<li><span>'+v+'</span></li>';
- })
- $('#fieldModalTopic').find('.topic_class').html(classHtml);
- $('#fieldModalTopic').show();
- $('input[name=examTopicGroupId]').val(examGroupId);
- $('input[name=examTopicExamIds]').val(examId);
- $('.topic_setting_sumbit').attr('disabled',false);
- }
- }
- });
- }
- $('.topic-push-close').click(function(){
- $('#fieldModalTopic').hide();
- });
- $('#fieldModalTopic').on('click','.topic',function(){
- if($(this).hasClass('active')){
- $(this).removeClass('active')
- }else{
- $(this).addClass('active')
- }
- })
- //保存推送试题设置
- $('.topic_setting_sumbit').click(function(){
- var examIds=$('input[name=examTopicExamIds]').val();
- var examGroupId=$('input[name=examTopicGroupId]').val();
- $(this).attr('disabled',true);
- var topics=[];
- topicEle=$('#fieldModalTopic').find('.topic');
- topicEle.each(function(i,v){
- // console.log(topicEle.eq(i).find('span').attr('topic_id'))
- if($(v).hasClass('active')){
- console.log($(v).find('span').attr('topic_id'))
- topics.push($(v).find('span').attr('topic_id'))
- }
- })
- layer.msg('正在保存,请稍候......',{time:0})
- $.ajax({
- url:'<?php echo $this->createUrl('print/saveExamPushTopicSetting')?>',
- type:'POST',
- dataType:'json',
- data:{'examGroupId':examGroupId,'examIds':examIds,'topics':topics},
- success:function(res){
- if(res.status==1){
- layer.msg('保存成功!',{
- icon: 1
- }, function(){
- layer.closeAll();
- window.location.reload()
- });
- }else{
- msg='保存失败'
- if(res.msg!=undefined){
- msg=res.msg;
- }
- layer.msg(msg,{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }
- }
- });
- });
- });
- function renewExamStat(exam_id) {
- if(!exam_id)
- {
- layer.msg('参数不正确!')
- }
- var msg = '您确定恢复本次考试状态吗?';
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- $.ajax({
- url: "<?php echo $this->createUrl('paper/recover');?>",
- type: "POST",
- dataType: "json",
- data: {
- exam_id: exam_id,
- },
- success: function (data){
- var m = data;
- if(m.status == 1){
- layer.msg('恢复成功,可以继续上传试卷',{
- icon: 1
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }else{
- layer.msg('恢复失败,'+m.msg,{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- icon: 5
- }, function(){
- layer.closeAll();
- });
- }
- });
- }
- });
- }
- function renewExamStatClass(exam_id) {
- if(!exam_id)
- {
- layer.msg('参数不正确!')
- }
- var msg = '您确定恢复本次考试状态吗?';
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- $.ajax({
- url: "<?php echo $this->createUrl('paper/recover_one_class');?>",
- type: "POST",
- dataType: "json",
- data: {
- exam_id: exam_id,
- },
- success: function (data){
- var m = data;
- if(m.status == 1){
- layer.msg('恢复成功,可以继续上传试卷',{
- icon: 1
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }else{
- layer.msg('恢复失败,'+m.msg,{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- icon: 5
- }, function(){
- layer.closeAll();
- });
- }
- });
- }
- });
- }
- function objToJson(obj){
- var json = "{ ";
- for(var item in obj){
- json += "'"+item+"':'"+obj[item]+"',";
- }
- json += " }";
- return json;
- }
- function ccc(){
- layer.msg('敬请期待!', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- return false;
- }
- });
- }
- function delExam(odj){
- if (!odj) return false;
- var classId = odj.getAttribute("w_class_id");
- var examId = odj.getAttribute("w_exam_id");
- var enable = odj.getAttribute("w_enable");
- var totalCount = <?php echo $page_total;?>;
- if(totalCount <=1){
- return;
- }
- if(enable == 0){
- return;
- }
- if (!classId || !examId) return false;
- var msg = '您确定要删除此班的考试吗?';
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- $.ajax({
- url: "<?php echo $this->createUrl('print/delexam');?>",
- type: "POST",
- dataType: "json",
- data: {
- examId: examId,
- classId:classId,
- is_third:1
- },
- success: function (data){
- if(data.status == 1){
- layer.msg('删除成功',{
- icon: 1
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }else{
- layer.msg('删除失败',{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }
- });
- }
- });
- }
- // 确认上传成绩
- function uploadConfirm(classId, examId,className,is_uploaded_count,students_count) {
- //if (confirm('您确定已上传成绩了吗?')) {
- msg = "<div style='text-align:left;'>("+className+")已上传(<span style=' font-size:20px;color:#15ae68 ;font-weight: bold'>"+is_uploaded_count+"</span>)份试卷,还有(<span style='font-size:20px;color: red;font-weight: bold'>"+(students_count-is_uploaded_count)+"</span>)份试卷未上传!是否确认本班级试卷都已上传?<br/><br/><span style='color: red'>请注意!试卷上传确认后将不能再次上传本班的试卷!!!</span></div>";
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index, layerObj){
- layer.close(index);
- $.ajax({
- url: "<?php echo $this->createUrl('print/uploadConfirm');?>",
- type: "POST",
- data: {
- classId: classId,
- examId: examId
- },
- beforeSend:function(){
- // 发送请求显示打印中
- layer.msg('确认中...', {time: 20000});
- },
- dataType: "JSON",
- success: function(data) {
- if (data.status == 1) {
- layer.msg('确认成功!');
- setTimeout(function(){location.reload();}, 1300);
- } else {
- layer.msg(data.error);
- }
- },
- complete:function(){
- },
- error:function(){
- }
- });
- }
- });
- //}
- }
- // 打印错题本
- function printBook(cid,eid,type){
- if (!cid || !eid || !type) {
- layer.msg("打印参数有误");return;
- }
- var message = '';
- var objUrl = '';
- if (type == 1) {
- message = "您确定要下载该班级纠错本吗?";
- objUrl = "<?php echo $this->createUrl('print/downloadwrongtopic');?>";
- divTitle = "下载错题本";
- improveName = "错题本";
- } else if (type == 2){
- message = "您确定要下载该班级个性化学习方案吗?";
- objUrl = "<?php echo $this->createUrl('print/downloadraisescheme');?>";
- divTitle = "下载个性化学习方案";
- improveName = "个性化学习方案";
- }else if (type == 3){
- message = "您确定要下载该班级个性化学习宝吗?";
- objUrl = "<?php echo $this->createUrl('print/downloadraisescheme');?>";
- divTitle = "下载个性化学习宝";
- improveName = "个性化学习宝";
- }
- else{
- layer.msg("打印参数有误");return;
- }
- html = ""+
- '<div style="padding:20px 30px 0px 30px">'+
- '<div style="padding:8px 0;">请复制下方链接下载'+improveName+'。</div>'+
- '<div id="downloadUrl" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:455px;"></div>'+
- '<div class="row" style="margin:30px auto 0px auto;text-align:center"><button id="confirm" class="label-primary-s bth-s" style="padding:4px 12px;margin:5px 0 10px 15px;background:gray;border-color:gray;">关闭</button>'+
- '</div>'+
- '</div>'+
- "";
- layer.msg(message, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- msgIndex = layer.msg("下载中请稍后...", {"time": 3600000});
- // 更试卷打印时间
- $.post("<?php echo $this->createUrl('print/updatepaperprinttime');?>", {cid: cid, eid: eid,type:type } );
- /*if(type == 1)
- location.href = objUrl+"/cid/"+cid+"/eid/"+eid;
- else
- location.href = objUrl+"/cid/"+cid+"/eid/"+eid+"/type/"+type;*/
- startTime = (new Date()).getTime();
- showTip = true;
- tipShowed = false;
- toPromptTime = 3000;
- window.interval = setInterval(function(){
- execTime = (new Date()).getTime() - startTime;
- if(execTime > toPromptTime && showTip && !tipShowed){
- // msgIndex = layer.msg("该文件较大,请耐心等待...", {"time": 3600000});
- // tipShowed = true;
- }
- }, 1000);
- jQuery.get(
- "<?php echo $this->createUrl("print/getImproveFile");?>",
- {"examId": eid, "classId": cid, "type": type},
- function(data){
- data = JSON.parse(data);
- if(data.success == 1||data.success == 2){
- layer.open({
- type: 1,
- area: ['550px', '220px'],
- title: divTitle,
- content: html,
- success: function(index, layerObj){
- clearInterval(window.interval);
- msgIndex = layer.msg(data.limitinfo, {"time": 3000});
- clearInterval(window.interval);
- layer.close(msgIndex);
- jQuery("#downloadUrl").html('下载地址:<span style=""><input id="url" type="text" size="40" readonly value="'+data.downloadPath+'" /></span><button id="copy" class="label-primary-s bth-s" style="padding:4px 12px;margin:5px 0 10px 15px;">全选</button>');
- jQuery("#confirm, #cancel").on("click", function(){
- layer.close(layerObj);
- });
- jQuery("#copy").on("click", function(){
- jQuery("#url").select();
- });
- },
- end: function(){
- }
- });
- }
- else if(data.success == 0){
- clearInterval(window.interval);
- msgIndex = layer.msg(data.message, {"time": 3000});
- }
- }
- );
- }
- });
- }
- // 上传试卷模板
- function uploadTemplate(eid,name, type){
- if (!eid) {
- layer.msg('操作失败!');
- return false;
- }
- if(type == 1)
- forCheckUrl = "<?php echo $this->createUrl('print/verifyTpl');?>";
- else
- forCheckUrl = "<?php echo $this->createUrl('print/checkanswercard');?>";
- $.post(forCheckUrl,{eid:eid},function(data){
- var obj = JSON.parse(data);
- var html ='<div class="layer_notice" style="padding:5px;">';
- html +='<table class="table table-striped table-bordered table-hover ">';
- html +='<thead class="thin-border-bottom">';
- html +='<tr>';
- html +='<th>试卷名称</th>';
- html +='<th>是否上传</th>';
- html +='<th>操作</th>';
- html +='</tr>';
- html +='</thead>';
- html +='<tbody class="content_tbody">';
- if (obj.success == 1) {
- html +='<td>'+name+'</td><td><span style="color:red;">已上传</span></td><td><input type="file" name="word_file" id="word_file" /></td></tr>';
- } else {
- html +='<td>'+name+'</td><td id="alreadUpload">未上传</td><td><input type="file" name="word_file" id="word_file" /></td></tr>';
- }
- html +='</tbody>';
- html +='</table>';
- html +='<span style="width:582px;display:inline-block;text-align:center;">';
- html +='<button class="btn btn-success btn-sm" onclick="uploadWord('+type+')"><i class="ace-icon fa fa-check bigger-110"></i>确定</button>';
- html +='</span>';
- html +='<input type="hidden" id="mpEid" value="'+eid+'">';
- html +='</div>';
- layer.open({
- type: 1,
- skin: 'layui-layer-rim', //加上边框
- area: ['600px', '300px'], //宽高
- content: html
- });
- });
- }
- function uploadWord(type) {
- var paramEid = $('#mpEid').val();
- if (!paramEid) {
- layer.msg('没找到周周练ID!');
- return false;
- }
- var obj_file = $("#word_file").val();
- if (!obj_file) {
- layer.msg('请选择上传文件');
- return false;
- }
- var extStart = obj_file.lastIndexOf('.');
- var extName = obj_file.substring(extStart,obj_file.length).toLowerCase();
- if (extName != ".dotx" && extName != ".dotm") {
- layer.msg('模板格式有误,请上传dotx格式word!');
- return false;
- }
- $.ajaxFileUpload({
- url: "<?php echo $this->createUrl('print/uploadTpl');?>", //用于文件上传的服务器端请求地址
- secureuri: false, //是否需要安全协议,一般设置为false
- fileElementId: 'word_file', //文件上传域的ID
- dataType: 'text', //返回值类型 一般设置为json
- data:{"eid":paramEid, "type": type},
- success: function (data, status){
- var obj = JSON.parse(data);
- if (obj.success == 1) {
- layer.msg(obj.message,{
- icon: 1,
- }, function(){
- layer.closeAll();
- });
- $("#alreadUpload").html('<span style="color:red;">已上传</span>');
- } else {
- layer.msg(obj.message,{
- icon: 1,
- }, function(){
- layer.closeAll();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- icon: 1,
- }, function(){
- layer.closeAll();
- });
- }
- });
- return false;
- }
- // 搜索事件
- $("#search").click(function(){
- $("#form1").submit();
- });
- function print(cid,eid,tid,fg){
- if (!cid || !eid) return false;
- var msg = '';
- if (tid == 0) {
- if (fg == 1) {
- msg = '打印答题卡';
- } else {
- msg = '您确定要打印该试卷嘛?';
- }
- } else if (tid == 1) {
- msg = '您确定要打印该错题本嘛?';
- } else if (tid == 2) {
- msg = '您确定要打印该个性化学习宝吗?';
- }
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- ajaxPrint(cid, eid, tid);
- }
- });
- }
- function ajaxPrint(cid, eid, tid) {
- $.ajax({
- url:"<?php echo $this->createUrl('print/ajaxupdate');?>",
- type:"post",
- data:{cid:cid,eid:eid,tid:tid},
- dataType: "json",
- beforeSend:function(){
- // 发送请求显示打印中
- layer.msg('打印中', {icon: 16,time: 20000});
- },
- success:function(obj){
- var index = layer.msg();
- layer.close(index);
- if (obj.success == 1) {
- if (tid == 0) {//console.log(JSON.stringify(obj.message));
- evaluationClient.printPaper(JSON.stringify(obj.message));
- //alert('提交打印试卷成功!');
- } else if (tid == 1) {
- evaluationClient.printCTB(JSON.stringify(obj.message));
- //alert('提交打印错题本成功!');
- } else if (tid == 2) {
- evaluationClient.printTFFA(JSON.stringify(obj.message));
- //alert('提交打印提分册成功!');
- } else {
- layer.msg('操作错误!');
- }
- location.reload();
- } else {//alert(obj.message);
- layer.msg(obj.message);
- }
- },
- complete:function(){
- //layer.msg('打印失败!');
- //var index = layer.msg();
- //layer.close(index);
- },
- error:function(){
- //var index = layer.msg();
- //layer.close(index);
- }
- });
- }
- // 生成试卷模板
- function createTemplate (paper_id){
- if (!paper_id) {
- layer.msg('未找到试卷ID');
- }
- evaluationClient.loadThirdParty(paper_id);
- }
- function wb_html(odj){
- if (!odj) return false;
- var classId = odj.getAttribute("w_class_id");
- var examId = odj.getAttribute("w_exam_id");
- if (!classId || !examId) return false;
- var msg = '您确定要生成该班级的错题本吗?';
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- $.ajax({
- url: "<?php echo $this->createUrl('client/wbhtml');?>",
- type: "POST",
- dataType: "json",
- data: {
- examId: examId,
- classId:classId
- },
- success: function (data){
- if(data > 0){
- layer.msg('操作成功,重新生成错题本',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }else if(data==0){
- layer.msg('操作失败,此班无错题本',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }
- else{
- layer.msg('操作失败,重新生成错题本',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }
- });
- }
- });
- }
- function isp2_html(odj){
- if (!odj) return false;
- var classId = odj.getAttribute("w_class_id");
- var examId = odj.getAttribute("w_exam_id");
- if (!classId || !examId) return false;
- var msg = '您确定要生成该班级的二步提分方案吗?';
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- $.ajax({
- url: "<?php echo $this->createUrl('client/isp2html');?>",
- type: "POST",
- dataType: "json",
- data: {
- examId: examId,
- classId:classId
- },
- success: function (data){
- if(data > 0){
- layer.msg('操作成功,重新生成提分方案',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }else if(data==0){
- layer.msg('操作失败,此班无提分方案',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }
- else{
- layer.msg('操作失败,重新生成提分方案',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }
- });
- }
- });
- }
- function isp3_html(odj){
- if (!odj) return false;
- var classId = odj.getAttribute("w_class_id");
- var examId = odj.getAttribute("w_exam_id");
- if (!classId || !examId) return false;
- var msg = '您确定要生成该班级的个性化学习宝吗?';
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- $.ajax({
- url: "<?php echo $this->createUrl('client/isp3html');?>",
- type: "POST",
- dataType: "json",
- data: {
- examId: examId,
- classId:classId
- },
- success: function (data){
- if(data > 0){
- layer.msg('操作成功,重新生成提分方案',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }else if(data==0){
- layer.msg('操作失败,此班无提分方案',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }
- else{
- layer.msg('操作失败,重新生成提分方案',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }
- });
- }
- });
- }
- // 隐藏试卷
- function oprateExam(examId,flag){
- if (examId) {
- layer.msg('未找到周周练id');
- }
- var msg = '您确定要隐藏该试卷吗?';
- if (flag == 0) {
- msg = '您确定要恢复该试卷吗?';
- }
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- $.post('<?php echo $this->createUrl("print/oprateexam");?>',{examId:examId,flag:flag},function(data){
- var obj = JSON.parse(data);
- if (obj.success == 1) {
- location.reload();
- } else {
- layer.msg(obj.message);
- }
- });
- }
- });
- }
- //统计数量
- function syncCount()
- {
- var a = $("input[name='a_check_class']:checked").length;
- var b = $("input[name='b_check_class']:checked").length;
- var c = $("input[name='c_check_class']:checked").length;
- $('#aCheckCount').html(a);
- $('#bCheckCount').html(b);
- $('#cCheckCount').html(c);
- $('#allCheckCount').html((a+b+c));
- }
- function handleLongName(str,length) {
- var str_len = str.length;
- if(str_len > length){
- return str.substring(0,length-1) + '...';
- }else {
- return str;
- }
- }
- $('.sendExamStomp').click(function(){
- examGroupId=$(this).attr('examGroupId');
- examId=$(this).attr('examId');
- if(examGroupId=='' || examId==''){
- return false;
- }
- if($(this).hasClass('disabled')==false){
- $(this).addClass('disabled');
- $.ajax({
- url:'<?php echo $this->createUrl('print/sendExamStomp')?>',
- type:'POST',
- dataType:'json',
- data:{examGroupId:examGroupId,examId:examId},
- success:function(res){
- if(res.status==1){
- layer.msg('操作成功');
- }else{
- layer.msg('操作失败');
- }
- }
- });
- }
- });
- $('.sendExamStompHomework').click(function(){
- examGroupId=$(this).attr('examGroupId');
- examId=$(this).attr('examId');
- if(examGroupId=='' || examId==''){
- return false;
- }
- if ($(this).hasClass('disabled') == false) {
- $(this).addClass('disabled');
- $.ajax({
- url: '<?php echo $this->createUrl('print/sendExamStompHomework')?>',
- type: 'POST',
- dataType: 'json',
- data: {examGroupId: examGroupId, examId: examId},
- success: function (res) {
- if (res.status == 1) {
- layer.msg('操作成功');
- } else {
- layer.msg('操作失败');
- }
- }
- })
- }
- });
- $('.sendExamProduct').click(function(){
- examGroupId=$(this).attr('examGroupId');
- examId=$(this).attr('examId');
- if(examGroupId=='' || examId==''){
- return false;
- }
- if ($(this).hasClass('disabled') == false) {
- $(this).addClass('disabled');
- $.ajax({
- url: '<?php echo $this->createUrl('print/sendProductHtml')?>',
- type: 'POST',
- dataType: 'json',
- data: {examGroupId: examGroupId, examId: examId},
- success: function (res) {
- if (res.status == 1) {
- layer.msg('操作成功');
- } else {
- layer.msg('操作失败');
- }
- }
- })
- }
- });
- //发送消息
- function sendStomp(examGroupId,examId){
- if(examGroupId=='' || examId==''){
- return false;
- }
- if($('.sendExamStomp').hasClass('disabled')==false){
- $('.sendExamStomp').addClass('disabled');
- $.ajax({
- url:'<?php echo $this->createUrl('print/sendExamStomp')?>',
- type:'POST',
- dataType:'json',
- data:{examGroupId:examGroupId,examId:examId},
- success:function(res){
- if(res.status==1){
- layer.msg('操作成功');
- }else{
- layer.msg('操作失败');
- }
- }
- });
- }
- }
- // 生成试卷模板
- function createTemplateEnglish (eid,flag){
- if (!eid) {
- layer.msg('未找到考试信息');
- }
- var msg = '';
- if (flag == 12) {
- msg = '您确定要下载答题卡嘛?';
- } else if(flag == 11){
- msg = '您确定要下载试卷嘛?';
- }
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- $.post('<?php echo $this->createUrl('print/createtempelate');?>',{"eid":eid,"flag":flag},function(data){
- var obj = JSON.parse(data);
- if (obj.success == 1) {
- if(flag == 11){
- evaluationClient.CreateSubjectPaperTiGan(JSON.stringify(obj.object));
- }else if(flag == 12){
- evaluationClient.CreateSubjectWordTiKa(JSON.stringify(obj.object));
- }else{
- layer.msg("参数错误");
- }
- } else {
- layer.msg(obj.message);
- }
- });
- }
- });
- }
- $(".downloadOnlinePdf").click(function(){
- var exam_id=$(this).attr('exam_id');
- var class_id=$(this).attr('class_id');
- var data={'exam_id':exam_id};
- $.post("<?php echo Yii::app()->createUrl('print/printPdfOnline')?>",data,function(flags){
- var m = JSON.parse(flags);
- if(m.success==1)
- {
- if(isNewVersion==1){
- params={
- exam_id:exam_id,
- student_id:"",
- };
- evaluationClient.NewPrintPDF(JSON.stringify(params));
- }else if(isNewVersion==2){
- let $param={"typeId":14,"params":{"examIds":[exam_id],"classIds":[class_id],"studentIds":[]}}
- evaluationClient.BulkPrintPDF(JSON.stringify($param))
- }else{
- evaluationClient.PrintPDF(flags);
- }
- // 更试卷打印时间
- $.post("<?php echo $this->createUrl('print/updateOnlinePaperPrintTime');?>", {cid: class_id, eid: exam_id,type:0 } );
- }else
- {
- if(m.msg!=undefined){
- layer.msg(m.msg);
- }else{
- layer.msg('打印失败');
- }
- }
- });
- });
- //还原考试申请
- $('#restore').click(function(){
- var examName=$(this).attr('exam_name'),
- examId=$(this).attr('exam_group_id'),
- examDate=$(this).attr('exam_date');
- msg="<b>你确定要初始化该场考试?</b><br>考试名称:"+examName+" <br>考试日期:"+examDate+"<br>"+
- "<sapn style='color:red'>还原考试后,考试数据将被还原到刚创建的时候,请谨慎操作!</sapn>";
- layer.msg(msg, {
- time: 0,
- icon:0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- layer.msg('正在发送申请,请稍候。。。。。',{time:0});
- $.post('<?php echo $this->createUrl("print/restoreApply");?>',{examId:examId},function(data){
- var obj = JSON.parse(data);
- layer.closeAll();
- if (obj.status == 1) {
- layer.msg('操作成功!',{
- icon: 1
- }, function(){
- layer.closeAll();
- window.location.reload()
- });
- } else {
- layer.msg(obj.msg);
- }
- });
- }
- });
- });
- </script>
|