12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474 |
- <script type="text/javascript">
- function in_array(search, array){
- for(var i in array){
- if(array[i]==search){
- return true;
- }
- }
- return false;
- }
- //客户端发送打印弹窗(客户端调用)
- function sendToPrint(){
- layer.msg('已成功发送至打印列表');
- }
- testFlag = "<?php echo $this->testFlag;?>";
- customTplsIds = new Array();
- var i = 0;
- <?php foreach(Yii::app()->params["custom_tpls_ids"] as $tplId){?>
- customTplsIds[i] = "<?php echo $tplId;?>";
- i++;
- <?php }?>
- jQuery(document).ready(function(){
- // 打印答案解析
- $(".answerAnalysis").click(function(){
- var element = this;
- var isEng = $(this).attr('isEng');
- layer.msg('您确定下载答案解析嘛?', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- var wpCode = jQuery(element).attr("examId");
- if (!wpCode) {
- layer.msg('周周练id有误!');return false;
- }
- jQuery.post(
- '<?php echo $this->createUrl('print/createtempelate');?>',
- {"eid":wpCode},
- function(data){
- var obj = JSON.parse(data);
- if (obj.success == 1) {
- /*alert(obj.message);
- alert(obj);*/
- if(isEng == 1){
- evaluationClient.PrintSubjectDAJX(JSON.stringify(obj.object));
- }else{
- evaluationClient.newprintDAJX(JSON.stringify(obj.object));
- }
- } else {
- layer.msg(obj.message);
- }
- }
- );
- }
- });
- });
- // 根据年级筛选班级
- });
- </script>
- <style>
- .loading-pop{position: fixed;left: 0;top: 0;bottom: 0;right: 0;background: rgba(0,0,0,0.5);z-index: 200;}
- .loading-pop-msg{color: #fff;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 22px;letter-spacing: 4px;}
- /*切换选择*/
- .tab-con{
- position: relative;
- height: 30px;
- width: 200px;
- background: #F2F2F2;
- border: 1px solid #619aff;
- 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;
- }
- .h_list span {font-size: 14px;}
- .add_class_input {width: 20px;height: 20px;vertical-align: -4px;}
- .class_right li{margin-bottom: 2px;}
- .dialog-information-inquiry{
- display: none;
- width: 400px;
- margin: 0 auto;
- border: 1px solid #f1f1f1;
- /*box-shadow:4px 4px 10px #7c7c7c;*/
- }
- .dialog-information-inquiry .title{
- padding: 0 16px;
- height: 30px;
- line-height: 30px;
- background-color: #2977ff;
- }
- .dialog-information-inquiry .title .title-text{
- font-size: 18px;
- color: #fff;
- font-weight: 650px;
- }
- .dialog-information-inquiry .title .title-tag{
- display: inline-block;
- margin-right: 20px;
- margin-top: 10px;
- padding: 6px 12px;
- height: 16px;
- line-height: 16px;
- color: #fff;
- border: 1px solid #F8F8FA;
- border-radius: 4px;
- background-color: #2977ff;
- cursor: pointer;
- }
- .dialog-information-inquiry .dialog-btn-close{
- display: inline-block;
- color: #fff;
- cursor: pointer;
- }
- .dialog-information-inquiry .dialog-msg{
- margin: 20px 0;
- text-align: center;
- line-height: 20px;
- font-size: 16px;
- }
- .dialog-information-inquiry .btn-box{
- margin-bottom: 28px;
- text-align: center;
- }
- .dialog-information-inquiry .btn-yes{
- display: inline-block;
- /* padding: 6px 12px; */
- width:90px;
- height: 30px;
- line-height: 30px;
- border-radius: 4px;
- color: #fff;
- cursor: pointer;
- background-color: #2977ff;
- }
- .show_classes{display: inline-block;padding:2px 10px 5px 5px;}
- </style>
- <link rel="stylesheet" href="/fonts/fpdf/iconfont.css" />
- <link rel="stylesheet" href="/fonts/zip/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">
- <form method="get" id="form1" action="<?php echo $this->createUrl("print/class_exam");?>" style="padding-left: 0;">
- <div class="clearfix"style="padding-left: 12px;">
- <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>
- <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('print/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('print/index')?>"> <img src="/images/assist/icon_hgc_back.svg" alt=""> 返回</a>
- </li>
- </ul>
- </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;">
- <input type="text" class="form-control input-sm" placeholder="请输入班级名称" name="class_name" value="<?php echo $class_name;?>">
- <input type="hidden" name="exam_group_id" value="<?php echo $exam_group_data->exam_group_id?>">
- <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索</button>
- </div>
- <div style="float: right;margin-right: 30px;margin-top:12px; padding-bottom: 10px;" class="h_list">
- <?php
- if ($subject && $exam_group_data['is_scan_changed'] == 0 && $exam_group_data['homework'] == 0 && (Yii::app()->session['session_subject_id']!=8 || $exam_group_data['qxk_paper_id']>0)) {
- ?>
-
- <?php if(!$printList[0]['online_card']):?>
- <span class="click-sc addbx" aria-hidden="true" title="在线答题卡" onclick="createCardOnlineThree('<?php echo $exam_group_id; ?>','<?php echo $noOnline ?>')">在线答题卡</span>
- <?php else:?>
- <a class="click-sc addbx" aria-hidden="true" title="在线答题卡" href="<?php echo $this->createUrl('online/answersheetList',array('examGroupId'=>$exam_group_id))?>?isThird=0&examGroupId=<?php echo $exam_group_id;?>">在线答题卡</a>
- <?php endif;?>
- <?php
- }
- ?>
- <?php if($print['paper_tpl_type'] == 1){?>
- <span class="click-sc addbx" aria-hidden="true" title="生成模板" onclick="createTemplate('<?php echo $exam_id;?>',1)">生成模板</span>
- <span class=" click-sc addbx" aria-hidden="true" title="上传模板" onclick="uploadTemplate('<?php echo $exam_id?>','<?php echo $exam_name;?>', 1)">上传模板</span>
- <span class="click-sc addbx answerAnalysis" examId="<?php echo $exam_id;?>" aria-hidden="true" title="下载答案解析">下载答案解析</span>
- <?php };?>
- <?php if($qxk_paper_id){
- echo '<span class=" click-sc addbx downloadAllSubjectPaper" aria-hidden="true" title="下载试卷及答案" >下载试卷及答案</span>';
- }else{
- if($print['paper_tpl_type'] == 2){?>
- <span class=" click-sc addbx" aria-hidden="true" title="下载试卷" onclick="createTemplate('<?php echo $exam_id;?>',2)">下载试卷</span>
- <?php
- if(isset(Yii::app()->session['testFlag']) && (Yii::app()->session['testFlag']==1)){
- ?>
- <span class=" click-sc addbx" aria-hidden="true" title="下载答题卡" onclick="createTemplate('<?php echo $exam_id;?>',3)">下载答题卡</span>
- <?php
- }
- ?>
- <?php if(!$print['is_custom_tpl']){?><span class=" click-sc addbx" aria-hidden="true" title="上传答题卡" onclick="uploadTemplate('<?php echo $exam_id;?>','<?php echo $exam_name ?>', 2)">上传答题卡</span><?php }?>
- <span class=" click-sc addbx answerAnalysis" examId="<?php echo $exam_id;?>" aria-hidden="true" title="下载答案解析">下载答案解析</span>
- <?php };?>
- <?php if($print['paper_tpl_type'] == 3){
- ?>
- <span class=" click-sc addbx" aria-hidden="true" title="下载题卡合一" onclick="createTemplate('<?php echo $exam_id;?>',4)">下载题卡合一</span>
- <span class=" click-sc addbx answerAnalysis" examId="<?php echo $exam_id;?>" aria-hidden="true" title="下载答案解析">下载答案解析</span>
- <?php
- }?>
- <?php if($print['paper_tpl_type'] == 4) {
- ?>
- <span class="click-sc addbx" aria-hidden="true" title="下载试卷" onclick="createTemplate('<?php echo $exam_id; ?>',2)">下载试卷</span>
- <span class=" click-sc addbx" aria-hidden="true" title="下载题卡分离" onclick="createTemplate('<?php echo $exam_id; ?>',4)">下载题卡分离</span>
- <span class=" click-sc addbx answerAnalysis" examId="<?php echo $exam_id;?>" aria-hidden="true" title="下载答案解析">下载答案解析</span>
- <?php
- }
- if($print['paper_tpl_type'] == 5){?>
- <span class=" click-sc addbx" aria-hidden="true" title="下载试卷" onclick="createTemplate('<?php echo $exam_id;?>',11)">下载试卷</span>
- <span class=" click-sc addbx" aria-hidden="true" title="下载答题卡" onclick="createTemplate('<?php echo $exam_id;?>',12)">下载答题卡</span>
- <span class=" click-sc addbx answerAnalysis" isEng = '1' examId="<?php echo $exam_id;?>" aria-hidden="true" title="下载答案解析">下载答案解析</span>
- <?php }
- }
- ?>
- <?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="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>
- <!--<span class=" click-sc addbx click-delete answerAnalysis" id="delPaperStudentAll" aria-hidden="true" title="删除全部未考试学生">删除全部未考试学生</span>-->
- <span class=" click-sc addbx " id="viewNoUploadPaperStudentAll" exam_group_id="<?php echo $exam_group_id?>" aria-hidden="true" title="查看未上传考生">查看未上传考生</span>
- <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)))): ?>
- <!-- <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;?>
- </div>
- </div>
- </form>
- </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>
- <th>是否打印(word)</th>
- <?php
- if($online_card==1 && $is_qrcode_online==1){
- ?>
- <th>在线答题卡生成进度</th>
- <?php }?>
- <th>是否打印(在线答题卡)</th>
- <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
- $imgSrc = "";if($exam_group_data->mark_type > 0){$imgTitle="线上阅卷";$imgSrc.="/images/online/";}else{$imgTitle="线下阅卷";$imgSrc.="/images/offline/";}$imgSrc.="{$cl["paper_size"]}.png";$cursor = "pointer";echo "<img class='paperType' style='cursor:pointer;width:22px;height:22px;margin-right:5px;' title='{$imgTitle}' src='{$imgSrc}'/>";?>
- <?php echo $cl['print_name'];?>
- </td>
- <td style="max-width:100px"><?php if(isset($class_data[$cl['class_id']])){echo $class_data[$cl['class_id']];}?></td>
- <td style="max-width:100px"><?php if(isset($class_types[$cl['class_id']])){echo $class_types[$cl['class_id']];}?></td>
- <td><?php if(isset($exam_print[$cl['exam_id']]) && !empty($exam_print[$cl['exam_id']])){echo '已打印';}else{echo '未打印';}?></td>
- <?php
- if($online_card==1 && $is_qrcode_online==1){
- ?>
- <td>
- <?php if(isset($cl['card_created'])){echo $cl['card_created'];}else{ echo 0;}?>/<?php if(isset($exam_student[$cl['exam_id']])){echo count($exam_student[$cl['exam_id']]);}else{ echo 0;}?>
- </td>
- <?php }?>
- <td><?php if(isset($exam_online_print[$cl['exam_id']]) && !empty($exam_online_print[$cl['exam_id']])){echo '已打印';}else{echo '未打印';}?></td>
- <td>
- <?php if(isset($exam_up_student[$cl['exam_id']])){echo count($exam_up_student[$cl['exam_id']]);}else{ echo 0;}?>/<?php if(isset($exam_student[$cl['exam_id']])){echo count($exam_student[$cl['exam_id']]);}else{ echo 0;}?>
- </td>
- <td>
- <?php if(isset($student_answer_img_num[$cl['exam_id']])){echo $student_answer_img_num[$cl['exam_id']];}else{ echo 0;}?>/<?php if(isset($exam_student[$cl['exam_id']])){echo count($exam_student[$cl['exam_id']]);}else{ echo 0;}?>
- </td>
- <td>
- <?php if(isset($student_img_up_num[$cl['exam_id']])){echo count($student_img_up_num[$cl['exam_id']]);}else{ echo 0;}?>/<?php if(isset($exam_student[$cl['exam_id']])){echo count($exam_student[$cl['exam_id']]);}else{ echo 0;}?>
- </td>
- <td style="width:265px;">
- <span class="iconfont click-sc addbx" aria-hidden="true" title="选择学生" onclick="javascript:location.href='<?php echo $this->createUrl('print/change',array('cid'=>$cl['class_id'],'eid'=>$cl['exam_id'],'tid'=>$cl['type']));?>'"></span>
- <?php if(!$print['is_custom_tpl'] && $print['paper_tpl_type'] != 3){ ?><span class="iconfont click-sc addbx" aria-hidden="true" title="<?php if($print['paper_tpl_type'] == 2){echo '打印答题卡';}else{echo '打印试卷';}?>" onclick="<?php if($print["paper_tpl_type"] == 2 && !$print["answer_card_uploaded"]){?>layer.msg('请先上传答题卡模板');<?php }else{?>print('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>','0',<?php echo $print['is_tpl'];?>);<?php }?>"></span>
- <!-- <span class="iconfont icon-zip click-sc addbx print_pack" w_class_id="--><?php //echo $cl['class_id'];?><!--" w_exam_id="--><?php //echo $cl['exam_id']; ?><!--" title="打包打印" ></span>-->
- <?php }?>
- <?php
- if($cl['online_card']==1 && $cl['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
- }
- ?>
- <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($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(Yii::app()->session['session_subject_id']==8 && $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(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" title="完成作业" examGroupId="<?php echo $exam_group_data['exam_group_id']; ?>" examId="<?php echo $cl['exam_id']; ?>" >完成作业</span>
- <?php
- }
- ?>
- <?php if(in_array(Yii::app()->session['session_subject_id'],array_merge(Yii::app()->params['mathSubjectId'],array(12)))): ?>
- <?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;?>
- </td>
- </tr>
- <?php endforeach;else:?>
- <tr><td colspan="5">暂无数据!</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="loading-pop" style="display:none;">
- <div class="loading-pop-msg">正在打包,请稍候···</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;">
- <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>
- <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="class_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="class_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="class_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="class_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">取消</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" style="width:130px">
- </select>
- </td>
- <td><img src="/images/arrows.png"></td>
- <td>
- 转移给<br>
- <select id="noUploadedStudent" name="noUploadStudent" style="width:130px">
- </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 class="dialog-information-inquiry">
- <div class="title clearfix">
- <span class="title-text fl">提示</span>
- <span class="dialog-btn-close fr">X</span>
- </div>
- <div class="content-box clearfix">
- <p class="dialog-msg">在线答题卡版本已更新,不支持查看历史数据,如有问题,请联系技术支持</p>
- <div class="btn-box">
- <span class="btn-yes dialog-btn-close">知道了</span>
- </div>
- </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>
- <!-- 全学科下载试卷答案解析 -->
- <div class="confirmbox-mask" style="display: none;" id="downloadPaper">
- <div class="class-modal" style="padding: 0;height:220px;width:500px;">
- <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="download-paper-close" style="float: right;padding: 5px;cursor: pointer;">X</span></div>
- <form id="downloadPaperForm">
- <div class="">
- <p class="title">
- </p>
- <p class="title" style="margin-top:20px;margin-bottom: 30px;">
- <span >
- 试卷纸张:
- <input type="radio" name="paperSheet" checked value="0">A4(竖版)
- <input type="radio" name="paperSheet" value="1">A3(分两栏)
- <input type="radio" name="paperSheet" value="2">A4(横版)
- </span>
- </p>
- <p class="title" style="margin-bottom: 30px;">
- <span >
- 使用类型:
- <input type="radio" name="downloadType" value="0">教师用卷
- <input type="radio" name="downloadType" checked value="1">学生用卷
- <input type="radio" name="downloadType" value="2">普通用卷
- </span>
- </p>
- <p class="title" style="margin-bottom: 30px;">
- <span >
- 打开方式:
- <input type="radio" name="wordType" value="1">Microsoft Word
- <input type="radio" name="wordType" checked value="0">金山Wps(公式无法编辑)
- </span>
- </p>
- </div>
- <p class="class_btn" style="text-align: center;">
- <input type="hidden" name="examGroupId" value="<?php echo $exam_group_data['exam_group_id']?>">
- <!--<button type="button" onclick="PaperPrintTools()" style="margin-right: 10px;">打印</button>-->
- <button type="button" class="downloadpaper_sumbit" style="margin-right: 10px;">下载</button>
- <button type="button" class="download-paper-btn">取消</button>
- </p>
- </form>
- </div>
- </div>
- <?php require_once '_print.php'?>
- <script src="/js/jquery.ajaxfileupload.js"></script>
- <script src="/js/jquery.cookie.js"></script>
- <script src="/js/print/ajax.js"></script>
- <script type="text/javascript">
- var quanxueke='<?php echo $qxk_paper_id?>';
- var isNewVersion=2;
- console.log(isNewVersion)
- $(document).ready(function(){
-
- var gradeArr=[];
- gradeArr[1]='高一';
- gradeArr[2]='高二';
- gradeArr[3]='高三';
- $('#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();
- });
- $('.download-paper-close,.download-paper-btn').click(function () {
- $('#downloadPaper').hide();
- });
- $('.downloadAllSubjectPaper').click(function(){
- $('#downloadPaper').show();
- });
- $('#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':0},
- success:function(res){
- layer.closeAll();
- if(res.status==1){
- layer.msg('修改成功');
- $('#fieldModal').hide();
- window.location.reload();
- }else{
- layer.msg(res.msg);
- }
- }
- });
- }
- });
- $(".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: 5
- }, function(){
- layer.closeAll();
- });
- }
- });
- }
- });
- });
- $(".print_pack").click(function(){
- $(".loading-pop").show();
- var data = {
- exam_id:$(this).attr("w_exam_id")
- };
- $.post("<?php echo Yii::app()->createUrl('print/print_pack')?>",data,function(flags){
- var m = JSON.parse(flags);
- if(m.status==1)
- {
- html = ""+
- '<div style="padding:20px 30px 0px 30px">'+
- '<div style="padding:8px 0;">请复制下方链接打印包。</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.open({
- type: 1,
- area: ['550px', '220px'],
- title: '打印包',
- content: html,
- success: function(index, layerObj){
- $(".loading-pop").hide();
- jQuery("#downloadUrl").html('下载地址:<span style=""><input id="url" type="text" size="40" readonly value="'+m.result+'" /></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(){
- }
- });
- return;
- }else
- {
- layer.msg(m.result);
- $(".loading-pop").hide();return;
- }
- setTimeout(function() {
- $(".loading-pop").hide();
- }, 2000);
- });
- });
- $("#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);
- });
- }
- });
- }
- });
- });
- //下载全学科试卷解析
- $('.downloadpaper_sumbit').click(function(){
- layer.msg('生成中,请稍候。。。。。。',{time:0});
- $.ajax({
- url:'<?php echo $this->createUrl('print/downloadPaper')?>',
- type:'POST',
- data:$('#downloadPaperForm').serialize(),
- dataType:'json',
- success:function(res){
- if(res.status==1){
- layer.closeAll();
- window.location.href=res.data;
- // html = ""+
- // '<div style="padding:20px 30px 0px 30px">'+
- // '<div style="padding:8px 0;">请复制下方链接打印包。</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.open({
- // type: 1,
- // area: ['550px', '220px'],
- // title: '打印包',
- // content: html,
- // success: function(index, layerObj){
- //
- // $(".loading-pop").hide();
- // jQuery("#downloadUrl").html('下载地址:<span style=""><input id="url" type="text" size="40" readonly value="'+res.data+'" /></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(){
- //
- // }
- // });
- }
- }
- });
- });
- $('.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')) {
- 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+='<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+='<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'))
- }
- })
- // if(topics.length==0){
- // layer.msg('未设置题目');
- // $(this).attr('disabled',false);
- // return false;
- // }
- 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 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 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 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:0
- },
- 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: 5
- }, 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('考试信息不存在!');
- 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>');
- location.reload();
- } else {
- layer.msg(obj.message,{
- icon: 5,
- }, function(){
- layer.closeAll();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- icon: 5,
- }, function(){
- layer.closeAll();
- });
- }
- });
- return false;
- }
- // 搜索事件
- $("#search").click(function(){
- $("#form1").submit();
- });
- function print(cid,eid,tid,fg){
- if (!cid || !eid) return false;
- var msg = '';
- if (fg == 1) {
- msg = '打印答题卡';
- } else {
- 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.newprintPaper(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 notice(){
- console.log('222');
- msg = "<div style='text-align:left;'>知心提醒:<br/> 目前【在线答题卡v1.0】处于公测阶段,请亲爱的学管们视情况使用!<br/> 如遇扫描异常,可切换至第三方考试,去制作模板并扫描!<br/> 注:含 四选二 的选做题考试,暂不支持转第三方,因此该类考试需要谨慎使用【在线答题卡】!</div>";
- layer.msg(msg, {
- time: 0,
- btn: ['知道了'],
- yes: function(index){
- layer.close(index);
- }
- });
- }
- // 生成试卷模板
- function createTemplate (eid,flag){
- if (!eid) {
- layer.msg('未找到考试信息');
- }
- var msg = '';
- if (flag == 2) {
- msg = '您确定要下载试卷嘛?';
- } else if(flag == 1){
- msg = '您确定要生成模板嘛?';
- }
- if (flag == 12) {
- msg = '您确定要下载答题卡嘛?';
- } else if(flag == 11){
- msg = '您确定要下载试卷嘛?';
- }
- else if(flag == 3){
- msg = "<div style='text-align:left;'>编辑答题卡注意事项:<br/>1、试卷的名字最多支持2行,字体的大小和字体种类保持原有格式不变<br/>2、选择题和填空题的答题区域中里面的内容和识别点不许更改<br/>3、整套试卷中所有的识别点不许更改<br/><br/>点击确定下载</div>";
- }else if(flag == 4){
- msg = "<div style='text-align:left;'>编辑题卡合一注意事项:<br/>1、试卷的名字最多支持2行,字体的大小和字体种类保持原有格式不变<br/>2、选择题和填空题的答题区域中里面的内容和识别点不许更改<br/>3、整套试卷中所有的识别点不许更改<br/><br/>点击确定下载</div>";
- }else{
- layer.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 == 2) {
- evaluationClient.newCreatePaperTiGan(JSON.stringify(obj.object));
- } else if(flag == 1){
- evaluationClient.newcreatePaper(JSON.stringify(obj.object));
- }
- else if(flag == 3){
- evaluationClient.newCreatePaperDaTiKa(JSON.stringify(obj.object));
- }else if(flag == 4){
- evaluationClient.newCreatePaperDaTiKa(JSON.stringify(obj.object));
- }else 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);
- }
- });
- }
- });
- }
- 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: 5
- }, function(){
- layer.closeAll();
- });
- }
- else{
- layer.msg('操作失败,重新生成错题本',{
- icon: 5
- }, function(){
- layer.closeAll();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- icon: 5
- }, 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: 5
- }, function(){
- layer.closeAll();
- });
- }
- else{
- layer.msg('操作失败,重新生成提分方案',{
- icon: 5
- }, function(){
- layer.closeAll();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- icon: 5
- }, 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: 5
- }, function(){
- layer.closeAll();
- });
- }
- else{
- layer.msg('操作失败,重新生成提分方案',{
- icon: 5
- }, function(){
- layer.closeAll();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- icon: 5
- }, 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 createCardOnline(examGroupId,noOnline){
- let url = 'http://xbcard.testing.xiaoben.com'
- if(window.location.href.includes('dev.xueping.com')){
- url = 'http://card.dev.xueping.com'
- }else if(window.location.href.includes('schcur.com')){
- url = 'http://xbcard.schcur.com'
- }
- new_answer_sheet_subject='<?php echo $new_answer_sheet_subject;?>'
- $.ajax({
- url:'<?php echo $this->createUrl('print/GetOnlineToken')?>',
- type:'POST',
- dataType:'json',
- success:function(res){
-
- if(res.status==1 && res.data!=undefined){
- let token=res.data;
- $.cookie('cardToken',null,{ path: '/',domain: url.substring(url.indexOf('card.')+4)});
- $.cookie("cardToken", token, { path: '/', expires: 1 ,domain: url.substring(url.indexOf('card.')+4)});
- if(quanxueke!=undefined && quanxueke>0){
- if(new_answer_sheet_subject=='1'){
- window.location.href=`${url}/subjects13.html?examGroupId=${examGroupId}&cardType=1`;
- }else{
- window.location.href=`${url}/mixSubjects.html?examGroupId=${examGroupId}&cardType=1`;
- }
- }else{
- window.location.href=`${url}?examGroupId=${examGroupId}&cardType=1`;
- }
- }else{
- if(res.msg!=undefined){
- layer.msg(res.msg)
- }else{
- layer.msg('token读取失败');
- }
- }
- }
- });
- // document.cookie=`token=${token}; path=/ ;domain=.testing.xueping.com`
- }
- var exam_group_id_card= '<?php echo $exam_group_id; ?>';
- var isNewCard = 0;
- var isGetCardType = false;
- $.post('/index.php/print/getPaperWithTopicsDetails',
- { examGroupId:exam_group_id_card },
- function (res) {
- res = JSON.parse(res)
- if (res.success) {
- isGetCardType = true
- if(res.position){
- if(JSON.parse(res.position).bigTopicArr){
- isNewCard = 1
- }
- }
- }
- }
- )
- function createCardOnlineThree(examGroupId,noOnline){
- //是否是新版在线答题卡
- if(isGetCardType){
- if(isNewCard!=0){
- layer.open({
- title: false,
- closeBtn: 0,
- type: 1,
- area: ['400px', '170px'],
- offset: '100px',
- content: $(".dialog-information-inquiry")
- });
- }else{
- createCardOnline(examGroupId,noOnline)
- }
- } else {
- setTimeout(()=>{
- if(isNewCard!=0){
- layer.open({
- title: false,
- closeBtn: 0,
- type: 1,
- area: ['400px', '170px'],
- offset: '100px',
- content: $(".dialog-information-inquiry")
- });
- }else{
- createCardOnline(examGroupId,noOnline)
- }
- },1000)
- }
- }
- //关闭弹窗
- $(".dialog-btn-close").on("click", function() {
- layer.close(layer.index);
- });
- $(".downloadOnlinePdf").click(function(){
- debugger
- 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)
- {
- // 更试卷打印时间
- $.post("<?php echo $this->createUrl('print/updateOnlinePaperPrintTime');?>", {cid: class_id, eid: exam_id,type:0 } );
- if(isNewVersion==1){
- $param='{"exam_id":"'+exam_id+'","student_id":""}';
- evaluationClient.NewPrintPDF($param);
- }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);
- }
- }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>
|