123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031 |
- <style>
- .confirmbox {
- background: #fff;
- border: 1px solid #cccccc;
- border-radius: 3px;
- padding: 40px 40px 30px;
- text-align: center;
- position: fixed;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- z-index: 99;
- }
- .confirmbox-mask {
- background: rgba(0, 0, 0, .7);
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- z-index: 99;
- position: fixed;
- }
- .btn_area button {
- border: none;
- background: #009965;
- width: 111px;
- height: 36px;
- border-radius: 3px;
- font-size: 14px;
- color: #fff;
- outline: none;
- cursor: pointer;
- }
- .btn_area button.save {
- display: block;
- margin: 40px auto;
- }
- .confirmbox .confirmbox-btns {
- margin-top: 40px;
- }
- .class-modal-body .classes {
- margin-bottom: 10px;
- }
- .class-modal-body .classes > div {
- display: inline-block;
- max-width: 640px;
- vertical-align: top;
- }
- .class-modal-body .classes a {
- text-decoration: none;
- display: inline-block;
- margin: 0 5px 5px;
- color: #136bfb;
- font-size: 14px;
- }
- .class-modal-body .classes a.active {
- color: #fc091b
- }
- .class-modal .icon-close{
- position: absolute;
- right: 20px;
- top: 20px;
- }
- .class-modal-1 {
- width: auto;
- background: #fff;
- border-radius: 5px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- .class-modal-head-1 {
- font-size: 14px;
- text-align: left;
- color:#fff;
- line-height:30px;
- background: #2977ff;
- padding-left:15px;
- }
- .class-modal-body-1{
- padding:15px;
- }
- .class-modal-body-1 h2,.class-modal-body-1 h3{
- font-size:14px;
- font-weight:normal;
- margin-top:10px;
- }
- .class-modal-body-1 h3 span{
- font-size:10px;
- color:#ccc;
- }
- .class-modal-body-1 label{
- display: inline-block;
- font-weight: normal;
- margin-right: 15px;
- height:30px;
- position: relative;
- }
- .class-modal-1 .icon-close-1{
- position: absolute;
- right: 10px;
- top:5px;
- }
- .class-modal-1 .class_area{
- height:115px;
- border:1px solid #ccc;
- padding:5px;
- overflow-y: auto;
- margin-bottom:15px;
- }
- .class-modal-1 .checkAll{
- position:absolute;
- right:5px;
- top:115px;
- }
- .class-modal-1 .subsection{
- }
- .class-modal-1 .btn p{color:#000;}
- .class-modal-1 .btn_area{
- padding: 10px;
- border-top: 1px solid #aab6aa;
- margin-top:10px;
- }
- .class-modal-1 .btn_area p{
- display: inline-block;
- }
- .class-modal-1 .btn_area button{
- margin-left:5px;
- }
- .class-modal-1 .btn_area .cancel{
- background: #fff;
- color:#000;
- border:1px solid #666;
- }
- .c-red-1 {
- color: #CC3300;
- font-size:10px;
- display: inline-block;
- position:absolute;
- left:15px;
- top:18px;
- }
- .vtm{vertical-align: middle;}
- .pointer{cursor: pointer;}
- .dib{display: inline-block;}
- .pdp-con .pop-opt-con{border-top: 1px solid #ddd;padding-top: 20px;}
- .tit-sub-intro{color: #666;}
- .tit-sub-intro span{font-size: 12px;}
- .subsection{width: 44px;height: 24px;border: 1px solid #ddd;text-align: center;font-size: 12px;}
- .reduce-btn,.add-btn{width: 16px;height: 16px;line-height: 16px;text-align: center;color: #16AE68;border: 1px solid #16AE68;border-radius: 3px;font-size: 16px;font-weight: bold;margin-right: 6px;}
- .reduce-btn.forbidden,.add-btn.forbidden{color: #bbb;border: 1px solid #bbb;cursor: no-drop;}
- </style>
- <script type="text/javascript">
- function in_array(search, array){
- for(var i in array){
- if(array[i]==search){
- return true;
- }
- }
- return false;
- }
- 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;
- 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);*/
- evaluationClient.printDAJX(JSON.stringify(obj.object));
- } else {
- layer.msg(obj.message);
- }
- }
- );
- }
- });
- });
- jQuery(".needToSendLabelTask").click(function(){
- layer.msg("请先发送标注任务");
- });
- jQuery(".sendLabelTask").click(function(){
- var examId = jQuery(this).attr("examId");
- var examName = jQuery(this).attr("examName");
- var subjectId = jQuery(this).attr("subjectId");
- var createTime = jQuery(this).attr("createTime");
- layer.msg('您确定发送试题标注任务吗?', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- jQuery.post(
- "<?php echo $this->createUrl("print/sendlabeltask");?>",
- {"examId": examId, "examName": examName, "createTime": createTime},
- function(data){
- data = JSON.parse(data);
- if(data.success == 1){
- layer.msg(data.message);
- setTimeout(function(){location.reload();}, 1300);
- }
- else{
- layer.msg(data.message);
- }
- }
- );
- }
- });
- });
- jQuery(".enterStudentsList1").click(function(){
- layer.msg("请先发送标注任务");
- });
- jQuery(".paperType").click(function(){
- if(testFlag != 1)
- return false;
- var examId = jQuery(this).attr("examId");
- var tpl_index = jQuery(this).attr("tpl_index");
- if(in_array(jQuery(this).attr("tpl_index"), customTplsIds)){
- if(in_array(jQuery(this).attr("tpl_index"), [10,1011,11])){
- var style = "width:200px;color:gray;";
- var state = "disabled";
- }else{
- var style = "width:200px;";
- var state = "enabled";
- }
- }
- else{
- var style = "width:200px;color:gray;";
- var state = "disabled";
- }
- html = ""+
- '<div style="padding:10px 30px">'+
- '<div style="margin:5px 0; float: left">选择纸张:</div>'+
- '<div style="float: left"><select id="paperSize" style="'+style+'" '+state+' >'+
- '<option value="A3" ';
- if(jQuery(this).attr("paper_size")=='A3'){ html=html+'selected';}
- html=html+'>A3</option>'+
- '<option value="A4" ';
- if(jQuery(this).attr("paper_size")=='A4'){ html=html+'selected';}
- html=html+'>A4</option>'+
- '<option value="8K" ';
- if(jQuery(this).attr("paper_size")=='8K'){ html=html+'selected';}
- html=html+'>8K</option>'+
- '<option value="16K" ';
- if(jQuery(this).attr("paper_size")=='16K'){ html=html+'selected';}
- html=html+'>16K</option>'+
- '</select></div>'+
- '<div style="padding-top:10px;clear: left"></div>'+
- '<div style="margin:5px 0; float: left">阅卷方式:</div>'+
- '<div style="float: left"><select id="mark_type" style="width:200px">'+
- '<option value="0" ';
- if(jQuery(this).attr("mark_type")=='0'){ html=html+'selected';}
- html=html+'>线下阅卷</option>'+
- '<option value="1" ';
- if(jQuery(this).attr("mark_type")=='1'){ html=html+'selected';}
- html=html+'>在线阅卷(题)</option> <option value="3" ';
- if(jQuery(this).attr("mark_type")=='3'){ html=html+'selected';}
- html=html+'>班级混合阅卷</option> <option value="4" ';
- if(jQuery(this).attr("mark_type")=='4'){ html=html+'selected';}
- html=html+'>班级单独阅卷</option> '+
- '</select></div>'+
- '<div class="row" style="margin:30px auto;"><button id="confirm" class="label-primary-s bth-s" style="padding:4px 12px;margin:20px 0 0 15px">确定</button>'+
- '<button id="cancel" class="label-primary-s bth-s" style="border:gray;background:gray;padding:4px 12px;margin:20px 0 0 25px">取消</button></div>'+
- '</div>'+
- '</div>'+
- "";
- layer.open({
- type: 1,
- area: ['350px', '220px'],
- title: "更改试卷",
- content: html,
- success: function(index, layerObj){
- jQuery("#cancel").on("click", function(){
- layer.closeAll();
- });
- jQuery("#confirm").on("click", function(){
- var paperSize = jQuery("#paperSize").val();
- var mark_type = jQuery("#mark_type").val();
- jQuery.post(
- "<?php echo $this->createUrl("print/setpapersize");?>",
- {"examId": examId, "paperSize": paperSize,"mark_type":mark_type,"tpl_index":tpl_index},
- function(data){
- data = JSON.parse(data);
- layer.msg(data.message);
- if(data.success == 1){
- setTimeout(function(){location.reload();}, 1300);
- }
- }
- );
- layer.closeAll();
- });
- },
- end: function(){
- }
- });
- });
- // 根据年级筛选班级
- jQuery("#grade").change(function(){
- var grade = $(this).val();
- var subjectId='<?php echo $subjectId?>';
- if (!grade) return false;
- jQuery.post(
- '<?php echo $this->createUrl("print/getGradeClass");?>',{"grade": grade,"subjectId":subjectId},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.html(html);
- }else
- {
- var classObj = $("#class");
- var html = "<option value=''>全部班级</option>";
- classObj.html(html);
- }
- }
- );
- });
- });
- </script>
- <style>
- /*切换选择*/
- .tab-con{
- position: relative;
- height: 30px;
- width: 200px;
- background: #F2F2F2;
- border: 1px solid #01B677;
- border-radius: 15px;
- }
- .has-sel{
- background: #01B677;
- 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: #01B677;
- 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 #01B677;
- 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 #01B677;
- 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;
- }
- .review_fram_table th{
- border:0!important;
- text-align: center;
- font-weight:normal!important;
- }
- .review_fram_table tr{
- background:none!important;
- }
- .review_fram_table tr:nth-child(2n) td:first-child{
- text-align: left;
- }
- .review_fram_table tr td:last-child span{
- background: #15ae68;
- color: #fff;
- padding: 5px 20px;
- border-radius: 3px;
- cursor:pointer;
- border:1px solid #15ae68;
- }
- .review_fram_table tr td:last-child span.status1{
- border:1px solid #15ae68;
- background: #fff;
- color: #15ae68;
- }
- .review_fram_table tr td:last-child span.status2{
- border:1px solid #ccc;
- background: #fff;
- color: #ccc;
- }
- .review_fram_table tr td:last-child span.status3{
- border:1px solid #ccc;
- background: #ccc;
- color: #fff;
- }
- .review_fram_table tr td:first-child,.review_fram_table tr td:last-child{
- text-align:center
- }
- </style>
- <link rel="stylesheet" href="/fonts/fpdf/iconfont.css" />
- <div class="main-content-inner">
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/view_production_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/student_product");?>">
- <div class="col-xs-12">
- <div class="dataTables_length margin-zy">
- <select class="form-control" id="grade" name="grade">
- <option value="">年级</option>
- <option value="1" <?php if($grade == 1) echo "selected";?>>高一</option>
- <option value="2" <?php if($grade == 2) echo "selected";?>>高二</option>
- <option value="3" <?php if($grade == 3) echo "selected";?>>高三</option>
- </select>
- <select class="form-control" id="class" name="class_id">
- <option value="">全部班级</option>
- <?php foreach($class_all as $class){
- if($grade){
- if($grade == $class->grade){
- ?>
- <option <?php if($class_id == $class->class_id) echo "selected";?> value="<?php echo $class->class_id;?>"><?php echo $class->class_name;?></option>
- <?php
- }
- }else{
- ?>
- <option <?php if($class_id == $class->class_id) echo "selected";?> value="<?php echo $class->class_id;?>"><?php echo $class->class_name;?></option>
- <?php
- } }?>
- </select>
- <select class="form-control" id="ptype" name="ptype">
- <option value="">类型</option>
- <option value="1" <?php if($ptype == 1) echo "selected";?>>期中</option>
- <option value="2" <?php if($ptype == 2) echo "selected";?>>期末</option>
- <option value="3" <?php if($ptype == 3) echo "selected";?>>总复习</option>
- </select>
- <select class="form-control" id="season" name="season">
- <option value="">季节</option>
- <option value="1" <?php if($season == 1) echo "selected";?>>春季</option>
- <option value="2" <?php if($season == 2) echo "selected";?>>秋季</option>
- </select>
- <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索</button>
- <!-- <button class="label-primary-s bth-s" id="generate_review" style="padding:4px 12px;">生成阶段复习个性化学习宝</button>-->
- <span class="label-primary-s bth-s fr" id="generate_review" style="display:inline-block; padding:4px 12px;margin-top:1px;cursor:pointer;">生成阶段复习学习宝</span>
- <span id="selectPrint" class="label-primary-s bth-s fr" style="display:inline-block; padding:4px 12px;margin-top:1px;cursor:pointer;">发送云印任务</span>
- <span id="batchPrint" class="label-primary-s bth-s fr" style="display:inline-block; padding:4px 12px;margin-top:1px;cursor:pointer;">批量下载</span>
- <span id="batchPrintToolsJieDuan" class="label-primary-s bth-s fr" style="display:inline-block; padding:4px 12px;margin-top:1px;cursor:pointer;">批量打印</span>
- </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 class="center">
- <input type="checkbox" class="ace selectAll">
- </th>
- <th>名称</th>
- <th>季节</th>
- <th>班级</th>
- <th >已生成/总数</th>
- <th>是否下载/打印</th>
- <th >操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($class_data)){
- foreach($class_data as $cl){
- for($i=1;$i<7;$i++){
- //下载和云印,类型只有123,转换
- $turnType=$i;
- if($i==4){
- $turnType=1;
- }elseif($i==5){
- $turnType=2;
- }elseif($i==6){
- $turnType=3;
- }
- if($ptype ){
- if($ptype==1 && !in_array($i,array(1,4))){
- continue;
- }elseif($ptype==2 && !in_array($i,array(2,5))){
- continue;
- }elseif($ptype==3 && !in_array($i,array(3,6))){
- continue;
- }
- }
- if($season){
- if($season==1 && !in_array($i,array(1,2,3))){
- continue;
- }elseif($season==2 && !in_array($i,array(4,5,6))){
- continue;
- }
- }
- $disabled=false;
- if(Yii::app()->params['season_product']==1){
- //春季
- if(in_array($i,array(1,2,3))){
- $disabled=true;
- }
- }elseif(Yii::app()->params['season_product']==2){
- //秋季
- if(in_array($i,array(4,5,6))){
- $disabled=true;
- }
- }
- ?>
- <tr>
- <td>
- <?php if(Yii::app()->cache->getValue("cloud_print_task_fx_tfb_".$cl['class_id'].'_'.$cl['semester_id'].'_'.$turnType) != 1){?>
- <input type="checkbox" class="ace myselect" value="<?php echo $cl['class_id'];?>_<?php echo $turnType;?>_<?php switch($i){
- case 1:echo $semester_name."期中阶段复习学习宝";break;
- case 2:echo $semester_name."期末阶段复习学习宝";break;
- case 3:echo $semester_name."总复习学习宝";break;
- case 4:echo $semester_name."期中阶段复习学习宝";break;
- case 5:echo $semester_name."期末阶段复习学习宝";break;
- case 6:echo $semester_name."总复习学习宝";break;
- }?>">
- <?php }?>
- </td>
- <td style="max-width:260px"> <?php switch($i){
- case 1:echo $semester_name."期中阶段复习学习宝";break;
- case 2:echo $semester_name."期末阶段复习学习宝";break;
- case 3:echo $semester_name."总复习学习宝";break;
- case 4:echo $semester_name."期中阶段复习学习宝";break;
- case 5:echo $semester_name."期末阶段复习学习宝";break;
- case 6:echo $semester_name."总复习学习宝";break;
- }?> </td>
- <td style="max-width:100px"><?php if($i<4){echo '春季';}else{echo '秋季';}?></td>
- <td style="max-width:100px"><?php echo $cl->class_name;?></td>
- <td><?php if(isset($class_student[$cl->class_id]))
- {
- if(isset($class_create[$cl->class_id][$i]))
- {
- echo $class_create[$cl->class_id][$i]['student_sum'].'/'.count($class_student[$cl->class_id]);
- }else{
- echo "0/".count($class_student[$cl->class_id]);
- }
- }else
- {
- echo '0/0' ;
- }
- if(isset($class_bt[$cl->class_id])){
- if(isset($class_bt[$cl->class_id][$i])){
- echo '<span class="red" style="display: inline-block;float: right">补题中,请稍候</span>';
- }
- }
- ?></td>
- <td>
- <?php if(isset($class_student[$cl->class_id]))
- {
- if(isset($class_down[$cl->class_id][$i]))
- {
- if($class_down[$cl->class_id][$i]['student_sum'] == count($class_student[$cl->class_id]))
- {
- echo '已下载/打印';
- }else
- {
- echo '已下载/打印';
- }
- }else
- {
- echo '未下载/打印';
- }
- }else
- {
- echo '未下载/打印';
- }?>
- </td>
- <td style="width:265px;">
- <span class="iconfont click-sc addbx printToolsJieDuan" aria-hidden="true" title="打印<?php switch($turnType){
- case 1:echo "期中阶段复习学习宝";break;
- case 2:echo "期末阶段复习学习宝";break;
- case 3:echo "总复习学习宝";break;
- }?>" cid="<?php echo $cl['class_id'];?>" trun-type="<?php echo $turnType?>" ></span>
- <span class="iconfont click-sc addbx" aria-hidden="true" title="下载<?php switch($turnType){
- case 1:echo "期中阶段复习学习宝";break;
- case 2:echo "期末阶段复习学习宝";break;
- case 3:echo "总复习学习宝";break;
- }?>" onclick="printBook('<?php echo $cl['class_id'];?>',<?php echo $turnType?>)"><img src="/images/download.png" style="margin-bottom:-2px;"></span>
- <span class="iconfont click-sc addbx" aria-hidden="true" title="选择学生" onclick="javascript:location.href='<?php echo $this->createUrl('print/class_student_product',array('cid'=>$cl['class_id'],'type'=>$i))?>'"></span>
- <span class="iconfont click-sc addbx" <?php if(Yii::app()->cache->getValue("cloud_print_task_fx_tfb_".$cl['class_id'].'_'.$cl['semester_id'].'_'.$turnType) == 1) echo 'style="background-color:gray"';?> aria-hidden="true" title="<?php if(Yii::app()->cache->getValue("cloud_print_task_fx_tfb_".$cl['class_id'].'_'.$cl['semester_id'].'_'.$turnType) == 1){echo '24小时内不可重复发送';}else{echo '发送云印任务';};?>" onclick="sendCloudTask('<?php echo $cl['class_id'];?>','<?php echo $turnType;?>','<?php switch($turnType){
- case 1:echo $semester_name."期中阶段复习学习宝";break;
- case 2:echo $semester_name."期末阶段复习学习宝";break;
- case 3:echo $semester_name."总复习学习宝";break;
- }?>',<?php echo Yii::app()->cache->getValue("cloud_print_task_fx_tfb_".$cl['class_id'].'_'.$cl['semester_id'].'_'.$turnType) == 1 ? 1 :0;?>)">云</span>
- <?php if(isset(Yii::app()->session['testFlag']) && Yii::app()->session['testFlag']==1 && isset($cate3_rel_cate6[$i]) && $disabled):?>
- <span class="iconfont click-sc addbx reset-review" aria-hidden="true" class_id="<?php echo $cl['class_id'];?>" cate="<?php echo $cate3_rel_cate6[$i];?>" title="重置阶段复习学习宝"></span>
- <?php endif;?>
- </td>
- </tr>
- <?php }}}else{?>
- <tr><td colspan="8">暂无数据!</td></tr>
- <?php }?>
- </tbody>
- </table>
- <?php if(!empty($pape_count)){
- $times=6;
- if($season) $times=$times/2;
- if($ptype) $times=$times/3;
- ?>
- <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 '共:'.($pape_count*$times).'条';
- ?>
- </div>
- </div>
- </div>
- <?php }?>
- </div>
- <!--上传模板弹窗-->
- <!--发送云印任务弹窗-->
- <div class="confirmbox-mask" id="classModal-1" style="display: none;">
- <div class="class-modal-1">
- <i class="icon icon-close-1" style="color: white">X</i><div class="class-modal-head-1">发送云印任务</div>
- <div class="class-modal-body-1">
- <div>
- <span>亲爱的学管:您正在发起云印任务,请核对以下云印任务数据!</span>
- <span style="float: right;">共<i id="task_count"></i>条任务,<i id="total_print_num">0</i>份云印任务</span>
- </div>
- <table style="margin-top: 15px;" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <thead>
- <tr>
- <th>序号</th>
- <th>任务名称</th>
- <th>班级</th>
- <th>完成日期</th>
- <th>已生成/已开通/可下载</th>
- <th>已下载</th>
- <th>云印份数</th>
- <th>备注</th>
- </tr>
- </thead>
- <tbody id="taskList">
- </tbody>
- </table>
- <div style="margin-top: 40px;">
- <span><img width="20px" height="20px" src="/images/icon-tip.svg">发送后,请至学管端【IMS-云印任务】模块查看任务进程,请等待云印中心打印后,寄回给学校!</span>
- <span style="margin-left:15px;float: right;"><input id="filter-uploaded" checked="checked" type="checkbox">过滤【已下载】的学生</span>
- </div>
- <div class="btn_area" style="text-align: center;">
- <input type="hidden" id="sendJson" name="sendJson" value="">
- <button id="sendCloudPrint" class="download">发送</button>
- <button class="cancel">取消</button>
- </div>
- </div>
- </div>
- </div>
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
- <!--阶段复习个性化学习宝弹框-->
- <div class="review_fram" style="display: none">
- <table class="table table-striped table-bordered table-hover dataTable no-footer review_fram_table DTTT_selectable"
- style="font-size:12px">
- <thead>
- <tr>
- <th>产品名称</th>
- <th>季节</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($review_isp as $info):?>
- <?php foreach ($info['season_arr'] as $k => $v):
- $disabled=false;
- if(Yii::app()->params['season_product']==1){
- //春季
- if(in_array($v['category_id'],array(1,2,3))){
- $disabled=true;
- }
- }elseif(Yii::app()->params['season_product']==2){
- //秋季
- if(in_array($v['category_id'],array(4,5,6))){
- $disabled=true;
- }
- }
- ?>
- <tr>
- <?php if(!$k):?>
- <td rowspan="2"><?php echo $info['product_name'];?></td>
- <?php endif;?>
- <td><?php echo $v['category_name'];?></td>
- <td>
- <?php if($v['status'] == 1):?>
- <span class="status2">生成</span>
- <?php
- // if($v['reset_time']==0 || (isset(Yii::app()->session['testFlag']) && Yii::app()->session['testFlag']==1 && (time()-$v['reset_time'])>3600*2)){
- if($v['reset_time']==0 || (isset(Yii::app()->session['testFlag']) && Yii::app()->session['testFlag']==1 && (time()-$v['reset_time'])>600)){
- if($disabled){
- echo '<span cate="'.$v['category_id'].'" handle_type="reset" class="handle_btn">重置</span>';
- }else{
- echo '<span cate="'.$v['category_id'].'" handle_type="reset" class="status2">重置</span>';
- }
- }
- ?>
- <?php elseif($v['status'] == 90):?>
- <span class="status2">生成</span>
- <?php if(isset(Yii::app()->session['testFlag']) && Yii::app()->session['testFlag']==1 ):?>
- <span class="status2">重置</span>
- <?php endif;?>
- <?php else:?>
- <?php if($disabled):?>
- <span cate="<?php echo $v['category_id'];?>" handle_type="generat" class="handle_btn">生成</span>
- <?php else:?>
- <span cate="<?php echo $v['category_id'];?>" handle_type="generat" class="status2">生成</span>
- <?php endif;?>
- <?php if(isset(Yii::app()->session['testFlag']) && Yii::app()->session['testFlag']==1 ):?>
- <span class="status2" cate="<?php echo $v['category_id'];?>">重置</span>
- <?php endif;?>
- <?php endif;?>
- </td>
- </tr>
- <?php endforeach;?>
- <?php endforeach;?>
- </tbody>
- </table>
- </div>
- <?php require_once "_print.php"?>
- <script src="/js/jquery.ajaxfileupload.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- /*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();
- });
- }
- });
- }
- });
- });
- //生成阶段复习个性化学习宝
- $("#generate_review").click(function () {
- var review_fram = $(".review_fram").html();
- layer.open({
- type: 1,
- title: '生成阶段复习学习宝',
- btn: [],
- area: ['640px', '380px'], //宽高
- btnAlign: 'c',
- content: '<div style="padding:0 20px;margin:20px 0"><div id="review_fram_win">'+review_fram+'</div><p style="font-size: 12px;color:red;line-height: 20px;">报告只可生成一次,请大家慎重点击!!点击生成后,最晚一天后可进行下载使用(如果在当前月份还没有任何考试,误点击生成按钮,会在第一场考试结束后,自动生成)一定要看清日期!!</p></div>',
- btn2: function (index, layero) {
- }
- });
- });
- //重置班级
- $(".reset-review").click(function () {
- var btn_obj = $(this);
- var semester_id = "<?php echo $semester_id;?>";
- var class_id = btn_obj.attr('class_id');
- var category = btn_obj.attr('cate');
- var handle_type = 'reset';
- $.ajax({
- url: "<?php echo $this->createUrl('print/setReviewIsp');?>",
- type: "POST",
- dataType: "json",
- data: {
- semester_id: semester_id,
- class_id: class_id,
- category: category,
- handle_type:handle_type
- },
- success: function (data){
- if(data.status == 1){
- layer.msg('操作成功',{
- icon: 1,time:1000
- }, function(){
- // layer.closeAll();
- });
- $(this).hide();
- }else{
- layer.msg(data.msg,{
- icon: 5,time:2000
- }, function(){
- // layer.closeAll();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }
- });
- });
- //设置阶段个性化学习宝
- $("body").delegate('.handle_btn','click',function () {
- var btn_obj = $(this);
- var semester_id = "<?php echo $semester_id;?>";
- var category = btn_obj.attr('cate');
- var handle_type = btn_obj.attr('handle_type');
- layer.confirm('确定要生成吗?', {
- btn: ['确定', '取消'] //按钮
- }, function () {
- layer.msg('正在发送',{
- icon: 1,time:5000
- }, function(){
- // layer.closeAll();
- });
- $.ajax({
- url: "<?php echo $this->createUrl('print/setReviewIsp');?>",
- type: "POST",
- dataType: "json",
- data: {
- semester_id: semester_id,
- category: category,
- handle_type:handle_type
- },
- success: function (data){
- if(data.status == 1){
- layer.msg('操作成功',{
- icon: 1,time:1000
- }, function(){
- // layer.closeAll();
- });
- if(handle_type == 'generat'){
- btn_obj.addClass('status2').removeClass('handle_btn').siblings('span').removeClass('status2');
- btn_obj.siblings('span').attr('handle_type','reset').addClass('handle_btn');
- }else{
- btn_obj.addClass('status2').removeClass('handle_btn');
- }
- $(".review_fram").html($("#review_fram_win").html());
- }else{
- layer.msg(data.msg,{
- icon: 5,time:2000
- }, function(){
- // layer.closeAll();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.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 delExam(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('print/delexam');?>",
- type: "POST",
- dataType: "json",
- data: {
- examId: examId,
- classId:classId
- },
- 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,type){
- if (!cid || !type) {
- layer.msg("打印参数有误");return;
- }
- var message = '';
- var objUrl = '';
- if (type == 1) {
- message = "您确定要下载该班级期中阶段复习学习宝吗?";
- //objUrl = "<?php echo $this->createUrl('print/download_student_product');?>";
- 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);
- $.ajax({
- url: "<?php echo $this->createUrl('productdownload/download_student_product');?>",
- type: "GET",
- dataType: "json",
- data: { "classId": cid, "type": type},
- timeout: <?php echo Yii::app()->params["product_download_time_limit"];?>,
- beforeSend:function(){
- layer.msg("下载中请稍后...",{"time": <?php echo Yii::app()->params["product_download_time_limit"];?>});
- },
- error: function (jqXHR, textStatus, errorThrown) {
- if(textStatus=="timeout"){
- $.ajax({
- type:'GET',
- url: "<?php echo $this->createUrl("productdownload/addSpTask");?>",
- data: { "classId": cid, "type": type},
- dataType: "json",
- success:function (data) {
- layer.alert('文件正在打包,请去右上角“下载”窗口获取下载链接!',{
- icon: 1,
- yes:function(){
- layer.closeAll();
- }
- });
- }
- })
- }else {
- layer.msg('返回失败!',{
- icon: 5
- }, function(){
- layer.closeAll();
- });
- }
- },
- success: function (data){
- layer.closeAll();
- if(data.success == 1||data.success == 2){
- layer.open({
- type: 1,
- area: ['550px', '220px'],
- title: divTitle,
- content: html,
- success: function(index, layerObj){
- 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 == 3){
- layer.alert('文件正在打包,请去右上角“下载”窗口获取下载链接!',{
- icon: 1,
- yes:function(){
- layer.closeAll();
- }
- });
- }
- else if(data.success == 0){
- 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 (eid,flag){
- if (!eid) {
- layer.msg('未找到周周练id');
- }
- var msg = '';
- if (flag == 2) {
- msg = '您确定要下载试卷嘛?';
- } else if(flag == 1){
- 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},function(data){
- var obj = JSON.parse(data);
- if (obj.success == 1) {
- if (flag == 2) {
- evaluationClient.CreatePaperTiGan(JSON.stringify(obj.object));
- } else if(flag == 1){
- evaluationClient.createPaper(JSON.stringify(obj.object));
- }
- else if(flag == 3){
- evaluationClient.CreatePaperDaTiKa(JSON.stringify(obj.object));
- }else if(flag == 4){
- evaluationClient.CreatePaperDaTiKa(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: 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);
- }
- });
- }
- });
- }
- //批量发送云印任务
- $("#selectPrint").click(function() {
- // 判断是否有选中
- if (!$("input[class='ace myselect']").is(':checked')) {
- layer.msg('至少选择一个目标!');
- return false;
- }
- var result = [];
- $(".myselect").each(function(m,n){
- if ($(this).prop('checked')) {
- if ($(this).val() /*&& $(this).attr("stnm")*/) {
- result.push($(this).val());
- }
- }
- });
- var sp = [];
- var cid = 0;
- var type = 0;
- var taskName = '';
- var saveDataAry=[];
- var data1 = [];
- for(i=0;i<result.length;i++)
- {
- sp = result[i].split('_');
- cid = sp[0];
- type = sp[1];
- taskName = sp[2];
- if( !cid || !type || !taskName) continue;
- data1 = {"classId": cid, "type": type,"taskName":taskName};
- saveDataAry.push(data1);
- }
- $.ajax({
- type: "POST",
- url: "<?php echo $this->createUrl("printCloud/generateFxTfbTask");?>",
- dataType: "json",
- contentType: "application/json",
- data: JSON.stringify(saveDataAry),
- beforeSend:function(){
- layer.load(1, {
- shade: [0.1,'#fff'] //0.1透明度的白色背景
- });
- },
- success:function(data) {
- var index = layer.load();
- layer.close(index);
- if (data.status == 1) {
- $('#sendJson').attr('value', JSON.stringify(data));
- var con = '';
- var task_count = 0;
- var totalCount = 0;
- $.each(data.data, function(index, item) {
- var one_count = item.enable_download_count - item.download_count;
- totalCount += (one_count>0?one_count:0);
- if((item.enable_download_count - item.download_count)>0) {
- task_count += 1;
- }
- con += '<tr><td>' + (index + 1) + '</td><td>' + item.taskName + '</td><td>' + item.clazzName + '</td><td>' + item.complete_time + '</td><td>'
- + item.generate_count + '/' + item.dredge_count + '/' + '<i style="color: green">' + item.enable_download_count + '</i><input type="hidden" name="drege_count" value="'+ item.enable_download_count +'"></td><td>'
- + item.download_count + '</td><td>' + (one_count>0?one_count:0) + '</td><td>' + (one_count>0?'可发送':'不可发送')
- + '</td></tr>'
- });
- $('#task_count').html(task_count);
- $('#total_print_num').html(totalCount);
- $('#taskList').html(con);
- $('#filter-uploaded').prop("checked", true);
- $('.confirmbox-mask').show();
- } else if (data.status == 0) {
- layer.msg(data.message);
- }
- }
- }
- );
- });
- // 生成任务列表
- function sendCloudTask(cid,type,taskName,isDisable){
- if(isDisable === 1){
- return false;
- }
- if (!cid || !type) {
- layer.msg("参数有误");return;
- }
- var saveDataAry=[];
- var data1={"classId": cid, "type": type,'taskName':taskName};
- saveDataAry.push(data1);
- $.ajax({
- type: "POST",
- url: "<?php echo $this->createUrl("printCloud/generateFxTfbTask");?>",
- dataType: "json",
- contentType: "application/json",
- data: JSON.stringify(saveDataAry),
- beforeSend:function(){
- layer.load(1, {
- shade: [0.1,'#fff'] //0.1透明度的白色背景
- });
- },
- success:function(data) {
- var index = layer.load();
- layer.close(index);
- if (data.status == 1) {
- $('#sendJson').attr('value', JSON.stringify(data));
- var con = '';
- var task_count = 0;
- var totalCount = 0;
- $.each(data.data, function(index, item) {
- var one_count = item.enable_download_count - item.download_count;
- totalCount += (one_count>0?one_count:0);
- if((item.enable_download_count - item.download_count)>0) {
- task_count += 1;
- }
- con += '<tr><td>' + (index + 1) + '</td><td>' + item.taskName + '</td><td>' + item.clazzName + '</td><td>' + item.complete_time + '</td><td>'
- + item.generate_count + '/' + item.dredge_count + '/' + '<i style="color: green">' + item.enable_download_count + '</i><input type="hidden" name="drege_count" value="'+ item.enable_download_count +'"></td><td>'
- + item.download_count + '</td><td>' + (one_count>0?one_count:0) + '</td><td>' + (one_count>0?'可发送':'不可发送')
- + '</td></tr>'
- });
- $('#task_count').html(task_count);
- $('#total_print_num').html(totalCount);
- $('#taskList').html(con);
- $('#filter-uploaded').prop("checked", true)
- $('.confirmbox-mask').show();
- } else if (data.status == 0) {
- layer.msg(data.message);
- }
- }
- }
- );
- }
- // 全选\反选
- $(".selectAll").click(function(){
- if ($(this).prop("checked")) {
- var s_obj = $(".myselect");
- var s_len = s_obj.length;
- for (var i=0;i<s_len;i++) {
- if (!s_obj[i].disabled) {
- s_obj[i].checked=true;
- }
- }
- } else {
- $(".myselect").prop("checked",false);
- }
- });
- //过滤已下载学生
- $('#filter-uploaded').click(function () {
- if($(this).is(':checked')){
- var totalCount = 0;
- var task_count = 0;
- $('#taskList tr').each(function () {
- var enable_count = parseInt($(this).children("td:eq(4)").children('i').html());
- var dowanload_count = parseInt($(this).children("td:eq(5)").html());
- $(this).children("td:eq(6)").html((enable_count-dowanload_count)>0?(enable_count-dowanload_count):0);
- totalCount += ((enable_count-dowanload_count)>0?(enable_count-dowanload_count):0);
- if((enable_count-dowanload_count)==0){
- $(this).children("td:eq(7)").html('不可发送');
- }else{
- $(this).children("td:eq(7)").html('可发送');
- task_count += 1;
- }
- });
- $('#task_count').html(task_count);
- $('#total_print_num').html(totalCount)
- }else {
- var totalCount = 0;
- var task_count = 0;
- $('#taskList tr').each(function () {
- var enable_count = $(this).children("td:eq(4)").children('i').html();
- $(this).children("td:eq(6)").html(enable_count);
- totalCount += parseInt(enable_count);
- if(enable_count==0){
- $(this).children("td:eq(7)").html('不可发送');
- }else{
- $(this).children("td:eq(7)").html('可发送');
- task_count += 1;
- }
- });
- $('#task_count').html(task_count);
- $('#total_print_num').html(totalCount);
- $('#filter-uploaded').attr('isFilter',0)
- }
- });
- //发送云印任务(真正发送)
- $('#sendCloudPrint').click(function (){
- var task_count = parseInt($('#task_count').html());
- if(task_count === 0){
- layer.msg('没有可发送的任务');
- return false;
- }
- var json_data = $('#sendJson').val();
- var is_filter = $('#filter-uploaded').is(':checked') ? 1 : 0;
- $.post({
- url: "<?php echo $this->createUrl("printCloud/sendFxTfbTask");?>",
- data: {
- 'json_data' : json_data,
- 'is_filter' : is_filter,
- },
- dataType: "json",
- beforeSend:function(){
- layer.load(1, {
- shade: [0.1,'#fff'] //0.1透明度的白色背景
- });
- },
- success:function(data) {
- var index = layer.load();
- layer.close(index);
- if (data.status == 1) {
- layer.msg('操作成功,请耐心等待后台打包');
- $('.confirmbox-mask').hide();
- location.reload();
- } else if (data.status == 0) {
- layer.msg(data.message);
- }
- }
- });
- })
- $('.confirmbox-mask .icon-close-1').click(function () {
- $('.confirmbox-mask').hide();
- })
- $('.confirmbox-mask .cancel').click(function () {
- $('.confirmbox-mask').hide();
- })
- //批量下载
- $("#batchPrint").click(function(){
- var message = "您确定要批量下载该产品吗?";
- // 判断是否有选中
- if (!$("input[class='ace myselect']").is(':checked')) {
- layer.msg('至少选择一个目标!');
- return false;
- }
- var result = [];
- $(".myselect").each(function(m,n){
- if ($(this).prop('checked')) {
- if ($(this).val() /*&& $(this).attr("stnm")*/) {
- result.push($(this).val());
- }
- }
- })
- var sp = [];
- var cid = 0;
- var type = 0;
- var saveDataAry=[];
- var data1 = [];
- for(i=0;i<result.length;i++)
- {
- sp = result[i].split('_');
- cid = sp[0];
- type = sp[1];
- if(!cid || !type) continue;
- data1 = {"classId": cid, "type": type,"printType":"<?php echo $printType;?>"};
- saveDataAry.push(data1);
- }
- layer.msg(message, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- $.ajax({
- type: "POST",
- url: "<?php echo $this->createUrl('productdownload/batchSp');?>",
- dataType: "json",
- contentType: "application/json",
- data: JSON.stringify(saveDataAry),
- success: function (data){
- layer.closeAll();
- if(data.success == 1) {
- layer.alert('文件正在打包,请去右上角“下载”窗口获取下载链接!', {
- icon: 1,
- yes: function () {
- layer.closeAll();
- }
- });
- }else {
- layer.msg(data.message);
- }
- },
- });
- }
- });
- });
- </script>
|