1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011 |
- <style>
- .nav-btns{
- margin: 10px 20px;
- }
- .nav-btns>a{
- display: inline-block;
- width: 120px;
- border: 1px solid #2977ff;
- text-align: center;
- line-height: 30px;
- }
- .active{
- color: #fff;
- background-color: #2977ff;
-
- }
- .fr{
- float: right;
- }
- .filter * {
- font-size: 14px;
- }
- .filter label {
- font-weight: bold;
- }
- .filter select {
- height: 36px;
- font-size: 14px;
- margin-left: 10px;
- }
- .filter select:nth-child(2) {
- width: 82px;
- }
- .filter select:nth-child(3) {
- width: 110px;
- }
- .filter button {
- border: none;
- background: #009965;
- width: 111px;
- height: 36px;
- border-radius: 3px;
- font-size: 14px;
- color: #fff;
- outline: none;
- cursor: pointer;
- margin-left: 10px;
- }
- .showClassInfo{
- cursor: pointer;
- }
- .list table {
- width: 96%;
- margin-top: 20px;
- text-align: center;
- border-right: 1px solid #ccc;
- margin:20px auto 0 auto;
- }
- .list table th {
- background: #f2f2f2;
- border: 1px solid #ccc;
- border-right: none;
- padding: 12px 15px;
- }
- .list table td {
- border: 1px solid #ccc;
- border-right: none;
- border-top: none;
- padding: 12px 15px;
- font-weight: bold;
- }
- .list table tr:nth-child(even) {
- background: #f2f2f2;
- }
- .list .tl {
- text-align: left;
- }
- .list .red {
- color: #cc3400;
- }
- .list .green {
- color: #079b67;
- }
- .icon {
- display: inline-block;
- background: center/contain no-repeat;
- width: 25px;
- height: 25px;
- cursor: pointer;
- vertical-align: middle;
- }
- .list .subjects {
- line-height: 22px;
- font-size: 0;
- }
- .list .icon{
- margin: 0 4px;
- }
- .list .subjects span {
- display: inline-block;
- font-size: 16px;
- word-break: keep-all;
- margin: 0 4px;
- }
- .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;}
- /*打印历史产品弹框*/
- .modal-content{position: absolute;left: 50%;top: 50%;padding-top: 40px; width: 500px;background: #fff; transform: translate(-50%,-50%);}
- .modal-title{position: absolute;top: 0;left: 0;padding-left: 20px; width: 100%;height: 40px;line-height: 40px;background: #009965;color:#fff;}
- .modal-title em{width: 40px;height: 40px;text-align: center;font-size: 20px;cursor: pointer;}
- .modal-btn{text-align: center;margin:10px 0;}
- .modal-btn a{display: inline-block;margin:0 5px; width: 100px; line-height: 40px;background: #50d2c2;color: #fff;}
- .modal-btn{text-align: center;margin:10px 0;}
- .modal-btn a{display: inline-block;margin:0 5px; width: 100px; line-height: 40px;background: #009965;color: #fff;}
- .modal-btn .close3{display: inline-block;margin:0 5px; width: 100px; line-height: 40px;background: #fff;color: #000;border:1px solid #555;border-radius: 3px;}
- .modal1_multi{position: fixed;top: 0;left: 0;width: 100%;height: 100%;font-size:14px;display:none ;background: rgba(0,0,0,.4)}
- .modal1_multi .model-score-m{width:80%;margin:5px auto;height: 20px;}
- .model-rule{width:80%;margin:8px auto;text-align: left;font-size:12px;}
- .modal1_multi .model-score-m label{margin:5px 0;font-size: 12px;color:red;font-weight: initial}
- </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(){
- var is_show = jQuery(this).attr("is_show");
- if(is_show>0)
- {
- return false;
- }
- var _display = '';
- 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"), [1010,1009,10,1011,7,11])){
- var style = "width:200px;color:gray; ";
- var state = "disabled";
- }else{
- _display = '';
- var style = "width:200px;";
- var state = "enabled";
- }
- }
- else{
- _display = '';
- var style = "width:200px;color:gray;";
- var state = "disabled";
- }
- var mar = 'margin:30px auto;';
- html = ""+
- '<div style="padding:10px 30px">'+
- '<div style="margin:5px 0; float: left;'+_display+'">选择纸张:</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;';
- if(parseInt(jQuery(this).attr("mark_type")) !=0 && parseInt(jQuery(this).attr("mark_type")) != 3)
- {
- html=html+'display:none';
- mar = 'margin:0px auto;';
- }
- html=html+'">阅卷方式:</div>'+
- '<div style="float: left"><select id="mark_type" style="width:200px;' ;
- if(parseInt(jQuery(this).attr("mark_type")) !=0 && parseInt(jQuery(this).attr("mark_type")) != 3)
- {
- html=html+'display:none';
- }
- html=html+'">'+
- '<option value="0" ';
- if(jQuery(this).attr("mark_type")=='0'){ html=html+'selected';}
- html=html+'>线下阅卷</option>';
- html=html+' <option value="3" ';
- if(jQuery(this).attr("mark_type")=='3'){ html=html+'selected';}
- html=html+'>班级混合阅卷</option> '+
- '</select></div>'+
- '<div class="row" style="'+mar+'text-align: center;"><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>注意:<br/>1、班级单独阅卷暂时不能与其他阅卷方式相互切换<br/>2、固定模板不能切换答题卡模板类型,只有自定义的可以<br/>3、切换完答题卡纸张类型后请记住使用切换后的答题卡类型打印复印</div>'+
- '</div>'+
- "";
- layer.open({
- type: 1,
- area: ['350px', '350px'],
- 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);
- var html = "<option value=''>全部班级</option>";
- if(data.success == 1){
- var classObj = $("#class");
- classObj.empty();
- $.each(data.message,function(i,n){
- html += "<option value='"+n.class_id+"'>" + n.class_name + "</option>";
- });
- }
- classObj.append(html);
- }
- );
- });
- });
- </script>
- <link rel="stylesheet" href="/fonts/fpdf/iconfont.css" />
- <div class="main-content-inner">
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/view_production_navigation.php');?>
- <!-- 导航栏结束-->
- <?php if($printType == 'third_isp'):?>
- <div class="nav-btns">
- <a href="<?php echo $this->createUrl("print/sub_index/type/third_isp");?>" class="active">个性化学习宝</a><a href="<?php echo $this->createUrl("print/mrv");?>">晨读词汇</a>
- </div>
- <?php endif;?>
- <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/sub_index");?>">
- <div class="col-xs-12">
- <div class="dataTables_length margin-zy">
- <input type="hidden" name="type" value="<?php echo $printType;?>" />
- <div class="dataTables_filter" id="dynamic-table_filter" style="float: right;">
- <a href="javascript:void(0);" class="btn label-primary-green btn-sm" id="selectPrint">
- <i style="font-style: normal;" class=""></i> 生成纠错本
- </a>
- </div>
- </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>
- <?php if($printType == 'wp'){?><th>考试日期</th><?php }?>
- <th><?php echo $printType == "wp" ? "是否打印" : "是否下载/打印";?></th>
- <th ><?php if($printType == 'wp'){echo '已上传';}else{echo '已生成';}?>/总数</th>
- <?php if($printType == 'wp'){?><th >状态</th><?php }?>
- <th >操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($printList)):foreach($printList as $cl):?>
- <tr>
- <td>
- <?php
- $iType = 0;
- if($printType == 'wtb'){
- $iType = 1;
- }elseif ($printType == 'isp' || $printType == 'studytrend'){
- $iType = $printType == "isp" ? 2 : 3;
- }elseif ($printType == 'third_wb' || $printType == 'studytrend'){
- $iType = 1;
- }elseif ($printType == 'third_isp' || $printType == 'studytrend'){
- $iType=$printType == "isp" ? 2 : 3;
- }
- ?>
- <?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id']. '_' . $printType) != 1){?>
- <input type="checkbox" class="ace myselect" value="<?php echo $cl['class_id'].'_'.$cl['exam_id'].'_'.$iType.'_',Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id']. '_' . $printType) == 1 ? 1 :0; ?>">
- <?php }?>
- </td>
- <td style="max-width:260px"><?php if($printType == 'wp'){
- if($cl['is_new']==0)
- {
- echo "<span style='color: #ff0000;font-weight: bold;'>【New】</span>";
- }
- $imgSrc = "";if($cl["mark_type"] > 0){$imgTitle="线上阅卷";$imgSrc.="/images/online/";}else{$imgTitle="线下阅卷";$imgSrc.="/images/offline/";}$imgSrc.="{$cl["paper_size"]}.png";$cursor = "pointer";echo "<img class='paperType' examId='{$cl["exam_id"]}' tpl_index='".$cl["tpl_index"]."' paper_size='".$cl["paper_size"]."' mark_type='".$cl["mark_type"]."' is_show = '".$cl['group_upload_status']."' style='cursor:pointer;width:22px;height:22px;margin-right:5px;' title='{$imgTitle}' src='{$imgSrc}'/>";}?>
- <?php if($printType == 'wp' && isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)){
- ?>
- <a href="<?php echo Yii::app()->createUrl('paper/index',array('eid'=>$cl['exam_id']))?>"><?php echo $cl['print_name'];?></a>
- <?php }else{
- echo "<a href=".$this->createUrl("print/getExamClass",array("examGroupId" => $cl['exam_group_id'],"printType"=>$printType,"subjectId"=>$duo_sub_id)).">{$cl['print_name']}</a>";
- // if(isset(Yii::app()->session['testFlag']) && Yii::app()->session['testFlag']==1 ){
- // echo "<a href=".$this->createUrl("print/getExamClass",array("examGroupId" => $cl['exam_group_id'],"printType"=>$printType,"subjectId"=>$duo_sub_id)).">{$cl['print_name']}</a>";
- // }else{
- // echo $cl['print_name'];
- // }
- }?>
- <!-- <a href="<?php /*echo Yii::app()->createUrl('paper/index',array('eid'=>$cl['exam_id']))*/?>"><?php /*echo $cl['print_name'];*/?></a>-->
- </td>
- <td style="max-width:100px"><?php echo $cl['class_name'];?></td>
- <td><?php if(!empty($cl['complete_time'])){ echo date('Y-m-d H:i',$cl['complete_time']);}?></td>
- <?php if($printType == 'wp'){?><td><?php if(!empty($cl['exam_time'])){ echo date('Y-m-d',$cl['exam_time']);}?></td><?php }?>
- <td>
- <?php
- if($printType == 'wp'){
- if(!empty($cl['is_print'])){ echo "已打印";}else{echo "未打印";}
- }elseif($printType == 'wtb' || $printType == 'third_wb'){
- echo $cl["wrongbook_download_count"] ? '已下载/打印' : '未下载/打印';
- }elseif($printType == 'isp'){
- echo $cl["isp_download_count"] ? '已下载/打印' : '未下载/打印';
- }elseif($printType == 'studytrend'){
- echo $cl["wbisp_download_count"] ? '已下载/打印' : '未下载/打印';
- }elseif($printType == 'third_wb'){
- echo $cl["wbisp_download_count"] ? '已下载/打印' : '未下载/打印';
- }elseif($printType == 'third_isp'){
- echo $cl["wbisp_download_count"] ? '已下载/打印' : '未下载/打印';
- }?>
- </td>
- <td>
- <?php if($printType == 'wp'){ echo '<span style="color:#697aff;font-weight: bold">'.$cl["is_uploaded_count"].'</span>/'.$cl["students_count"];}
- elseif($printType == 'wtb' || $printType == 'third_wb'){echo '<span style="color:#697aff;font-weight: bold">'.$cl["wrongbook_pdf_count"].'</span>/'.$cl["is_uploaded_count"];}
- elseif($printType == 'isp'){echo '<span style="color:#697aff;font-weight: bold">'.$cl['isp_pdf_count'].'</span>/'.$cl["is_uploaded_count"];}
- elseif($printType == 'studytrend'){echo '<span style="color:#697aff;font-weight: bold">'.$cl["wbisp_pdf_count"].'</span>/'.$cl["is_uploaded_count"];}
- elseif($printType == 'third_wb'){echo '<span style="color:#697aff;font-weight: bold">'.$cl["wbisp_pdf_count"].'</span>/'.$cl["is_uploaded_count"];}
- elseif($printType == 'third_isp'){echo '<span style="color:#697aff;font-weight: bold">'.$cl["wbisp_pdf_count"].'</span>/'.$cl["is_uploaded_count"];}
- ?>
- </td>
- <?php if($printType == 'wp'){?>
- <td>
- <?php if($cl["is_labelled"] == 1){
- echo "<span style='color:green;font-weight:normal;'>已标注</span>";
- }else if($cl["is_labelled"] == 2){
- echo "<span style='color:orange;font-weight:normal;'>已发送</span>";
- }else {?>
- <span class="iconfont click-sc addbx sendLabelTask" examId="<?php echo $cl["exam_id"];?>" examName="<?php echo $cl["exam_name"];?>" subjectId="<?php echo $cl["subject_id"];?>" createTime="<?php echo $cl["create_time"];?>" aria-hidden="true" title="发送试题标注"></span>
- <?php }?>
- </td>
- <?php }?>
- <td style="width:265px;">
- <?php if($printType == 'wp'):?>
- <?php if(!$cl['is_custom_tpl'] && $cl['paper_tpl_type'] != 3){ ?><span class="iconfont click-sc addbx" aria-hidden="true" title="<?php if($cl['paper_tpl_type'] == 2){echo '打印答题卡';}else{echo '打印试卷';}?>" onclick="<?php if($cl["paper_tpl_type"] == 2 && !$cl["answer_card_uploaded"]){?>layer.msg('请先上传答题卡模板');<?php }else{?>print('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>','<?php echo $cl['type'];?>',<?php echo $cl['is_tpl'];?>);<?php }?>"></span>
- <?php }?>
- <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($cl['type'] == 0 && $cl['paper_tpl_type'] == 1):?>
- <span class="iconfont click-sc addbx" aria-hidden="true" title="生成模板" onclick="createTemplate('<?php echo $cl['exam_id'];?>',1)"></span>
- <span class="iconfont click-sc addbx" aria-hidden="true" title="上传模板" onclick="uploadTemplate('<?php echo $cl['exam_id'];?>','<?php echo $cl['print_name'];?>', 1)"></span>
- <?php endif;?>
-
- <?php if($cl['paper_tpl_type'] == 2):?>
- <?php if($cl['is_custom_tpl']){?><!--<span class="iconfont click-sc addbx" aria-hidden="true" title="打印答题卡" onclick="print('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>','<?php echo $cl['type'];?>',<?php echo $cl['is_tpl'];?>);"></span>
- <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 }?>
- <span class="iconfont click-sc addbx" aria-hidden="true" title="下载试卷" onclick="createTemplate('<?php echo $cl['exam_id'];?>',2)"></span>
- <span class="iconfont click-sc addbx" aria-hidden="true" title="下载答题卡" onclick="createTemplate('<?php echo $cl['exam_id'];?>',3)"></span>
- <?php if(!$cl['is_custom_tpl']){?><span class="iconfont click-sc addbx" aria-hidden="true" title="上传答题卡" onclick="uploadTemplate('<?php echo $cl['exam_id'];?>','<?php echo $cl['print_name'] ?>', 2)"></span><?php }?>
- <?php if($cl["is_custom_tpl"]){?><span class="iconfont click-sc addbx answerAnalysis" examId="<?php echo $cl["exam_id"];?>" aria-hidden="true" title="下载答案解析"></span><?php }?>
- <?php endif;?>
- <?php if($cl['paper_tpl_type'] == 3){
- ?>
- <span class="iconfont click-sc addbx" aria-hidden="true" title="下载题卡合一" onclick="createTemplate('<?php echo $cl['exam_id'];?>',4)"></span>
- <span class="iconfont click-sc addbx answerAnalysis" examId="<?php echo $cl["exam_id"];?>" aria-hidden="true" title="下载答案解析"></span>
- <?php
- }?>
- <?php if($cl['paper_tpl_type'] == 4){
- ?>
- <span class="iconfont click-sc addbx" aria-hidden="true" title="下载试卷" onclick="createTemplate('<?php echo $cl['exam_id'];?>',2)"></span>
- <span class="iconfont click-sc addbx" aria-hidden="true" title="下载题卡分离" onclick="createTemplate('<?php echo $cl['exam_id'];?>',4)"></span>
- <span class="iconfont click-sc addbx answerAnalysis" examId="<?php echo $cl["exam_id"];?>" aria-hidden="true" title="下载答案解析"></span>
- <?php
- }?>
- <?php if ($cl['mark_type'] > 0 AND $cl['type'] == 0): ?>
- <?php if ($cl['upload_status'] == 1): ?>
- <!--<span style="cursor:pointer" title="已上传" class="label label-sm label-pink arrowed-right" onclick="uploadConfirm('<?php echo $cl['class_id'];?>', '<?php echo $cl['exam_id'];?>');">已上传</span>-->
- <!--<span class="iconfont click-delete addbx" style="background-color: red;" aria-hidden="true" title="确定试卷已上传" onclick="uploadConfirm('<?php /*echo $cl['class_id'];*/?>', '<?php /*echo $cl['exam_id'];*/?>','<?php /*echo $cl['class_name'];*/?>','<?php /*echo $cl['is_uploaded_count'];*/?>','<?php /*echo $cl['students_count'];*/?>');"></span>-->
- <?php elseif ($cl['upload_status'] == 2): ?>
- <!--<span class="label label-sm label-success">已上传</span>-->
- <!--<span class="iconfont click-sc addbx" aria-hidden="true" title="试卷已上传"></span>-->
- <?php endif; ?>
- <?php if($cl['upload_status']==0 && isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)){
- ?>
- <span class="iconfont addbx click-delete delClass" style="background-color: red;" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="删除" onclick="delExam(this)"></span>
- <?php
- }?>
- <?php endif; ?>
- <!-- 隐藏试卷操作 -->
- <?php if($cl['is_display'] == 1):?>
- <span class="iconfont click-sc click-tc addbx" aria-hidden="true" title="恢复试卷" onclick="oprateExam('<?php echo $cl['exam_id'];?>',0)"></span>
- <?php else:?>
- <span class="iconfont click-sc click-delete addbx" aria-hidden="true" title="隐藏试卷" onclick="oprateExam('<?php echo $cl['exam_id'];?>',1)"></span>
- <?php endif;?>
- <?php if($printType == 'wp'&&(Yii::app()->session['session_subject_id']!=3 && Yii::app()->session['session_subject_id']!=6)&&($cl["is_uploaded_count"] == $cl["students_count"]) && $cl["students_count"]!=0){?>
- <span class="iconfont click-sc icon-yifasong addbx ruanyun" exam_id="<?php echo $cl['exam_id']; ?>" title="发送第三方,并生成提分方案"></span>
- <?php }?>
- <?php elseif($printType == 'wtb'):?>
- <span class="iconfont click-sc addbx printBookTools" aria-hidden="true" title="打印错题本" printType="<?php echo $printType ?>" class_id="<?php echo $cl['class_id'];?>" ptype="1" exam_id="<?php echo $cl['exam_id'];?>" ></span>
- <span class="iconfont click-sc addbx icon-download-file" aria-hidden="true" title="下载错题本" onclick="downloadBook('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',1)"><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/changewrongtopic',array('cid'=>$cl['class_id'],'eid'=>$cl['exam_id']));?>'"></span>
- <!-- 发送云印任务 -->
- <span class="iconfont click-sc addbx" <?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1) echo 'style="background-color:gray"';?> aria-hidden="true" title="<?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1){echo ' 24小时内不可重复发送';}else{echo '发送云印任务';}?>" onclick="sendCloudTask('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',1,<?php echo Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1 ? 1 :0;?>)">云</span>
- <?php if(isset(Yii::app()->session['testFlag']) && Yii::app()->session['testFlag']==1 ){?>
- <span class="iconfont click-sc addbx" aria-hidden="true" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="重新生成错题本" onclick="wb_html(this)"></span>
- <?php if($sub_id != 8):?>
- <span class="iconfont click-sc addbx" aria-hidden="true" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="重新生成二步个性化学习宝" onclick="isp2_html(this)">二</span>
- <?php endif;?>
- <span class="iconfont click-sc addbx" aria-hidden="true" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="重新生成<?php echo ($sub_id != 8)?'三步':'';?>个性化学习宝" onclick="isp3_html(this)"><?php echo ($sub_id != 8)?'三':'提';?></span>
- <?php }?>
- <?php elseif($printType == 'isp' || $printType == 'studytrend'):?>
- <span class="iconfont click-sc addbx printBookTools" aria-hidden="true" title="打印个性化学习宝" printType="<?php echo $printType ?>" class_id="<?php echo $cl['class_id'];?>" ptype="<?php echo $printType == "isp" ? 2 : 3;?>" exam_id="<?php echo $cl['exam_id'];?>" ></span>
- <span class="iconfont click-sc addbx" aria-hidden="true" title="下载个性化学习宝" onclick="downloadBook('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',<?php echo $printType == "isp" ? 2 : 3;?>);"><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/changeraisescheme',array('cid'=>$cl['class_id'],'eid'=>$cl['exam_id'],'tid'=>$cl['type'],"type" => $printType,'subid'=>$sub_id));?>'"></span>
- <!-- 发送云印任务 -->
- <span class="iconfont click-sc addbx" <?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1) echo 'style="background-color:gray"';?> aria-hidden="true" title="<?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1){echo ' 24小时内不可重复发送';}else{echo '发送云印任务';}?>" onclick="sendCloudTask('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',<?php echo $printType == "isp" ? 2 : 3;?>,<?php echo Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1 ? 1 :0;?>)">云</span>
- <?php elseif($printType == 'third_wb' || $printType == 'studytrend'):?>
- <span class="iconfont click-sc addbx printBookTools" aria-hidden="true" title="打印错题本" printType="<?php echo $printType ?>" class_id="<?php echo $cl['class_id'];?>" ptype="1" exam_id="<?php echo $cl['exam_id'];?>" ></span>
- <span class="iconfont click-sc addbx" aria-hidden="true" title="下载错题本" onclick="downloadBook('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',1)"><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/changewrongtopic',array('cid'=>$cl['class_id'],'eid'=>$cl['exam_id'],'printType' => $printType));?>'"></span>
- <!-- 发送云印任务 -->
- <span class="iconfont click-sc addbx" <?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1) echo 'style="background-color:gray"';?> aria-hidden="true" title="<?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1){echo ' 24小时内不可重复发送';}else{echo '发送云印任务';}?>" onclick="sendCloudTask('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',1,<?php echo Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1 ? 1 :0;?>)">云</span>
- <?php if(isset(Yii::app()->session['testFlag']) && Yii::app()->session['testFlag']==1 ){?>
- <span class="iconfont click-sc addbx" aria-hidden="true" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="重新生成错题本" onclick="wb_html(this)"></span>
- <?php if($duo_sub_id == 8):?>
- <span class="iconfont click-sc addbx" aria-hidden="true" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="重新生成个性化学习宝" onclick="isp3_html(this)">提</span>
- <?php endif;?>
- <?php if($duo_sub_id == 12):?>
- <span class="iconfont click-sc addbx" aria-hidden="true" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="重新生成二步个性化学习宝" onclick="isp2_html(this)">二</span>
- <span class="iconfont click-sc addbx" aria-hidden="true" w_class_id="<?php echo $cl['class_id'];?>" w_exam_id="<?php echo $cl['exam_id']; ?>" title="重新生成三步个性化学习宝" onclick="isp3_html(this)">三</span>
- <?php endif;?>
- <?php }?>
- <?php elseif($printType == 'third_isp' || $printType == 'studytrend'):?>
- <span class="iconfont click-sc addbx printBookTools" aria-hidden="true" title="打印个性化学习宝" printType="<?php echo $printType ?>" class_id="<?php echo $cl['class_id'];?>" ptype="<?php echo $printType == "isp" ? 2 : 3;?>" exam_id="<?php echo $cl['exam_id'];?>" ></span>
- <span class="iconfont click-sc addbx" aria-hidden="true" title="下载个性化学习宝" onclick="downloadBook('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',<?php echo $printType == "isp" ? 2 : 3;?>);"><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/changeraisescheme',array('cid'=>$cl['class_id'],'eid'=>$cl['exam_id'],'tid'=>$cl['type'],'type' => $printType,'subid'=>$duo_sub_id));?>'"></span>
- <!-- 发送云印任务 -->
- <span class="iconfont click-sc addbx" <?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1) echo 'style="background-color:gray"';?> aria-hidden="true" title="<?php if(Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1){echo ' 24小时内不可重复发送';}else{echo '发送云印任务';}?>" onclick="sendCloudTask('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>',<?php echo $printType == "isp" ? 2 : 3;?>,<?php echo Yii::app()->cache->getValue("cloud_print_task_".$cl['class_id'].'_'.$cl['exam_id'].'_'.$printType) == 1 ? 1 :0;?>)">云</span>
- <?php endif;?>
- </td>
- </tr>
- <?php endforeach;else:?>
- <tr><td colspan="8">暂无数据!</td></tr>
- <?php endif;?>
- </tbody>
- </table>
- <?php if(!empty($page_total)):?>
- <div class="row">
- <div class="col-xs-6">
-
- </div>
- <div class="col-xs-6">
- <div class="dataTables_paginate paging_simple_numbers">
- <?php
- $this->widget('CLinkPager', array(
- 'header' => '',
- 'firstPageLabel'=> '首页',
- 'lastPageLabel' => '末页',
- 'prevPageLabel' => '上一页',
- 'nextPageLabel' => '下一页',
- 'pages' => $pages,
- 'maxButtonCount'=> 5,
- ));
- echo '共:'.$page_total.'条';
- ?>
- </div>
- </div>
- </div>
- <?php endif;?>
- </div>
-
- <!--上传模板弹窗-->
- <!--发送云印任务弹窗-->
- <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">0</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="modal1_multi">
- <div class="modal-shadow"></div>
- <div class="modal-content">
- <div class="modal-title clearfix">
- 打印过期产品<em class="fr close3">×</em>
- </div>
- <div class="model-rule">
- <p>说明:</p><p>1、本次操作可将已开通订单权限,但未生成产品的考试显示在列表中</p><p>2、找到想要生成产品的考试,点击【重置产品】</p>
- </div>
- <div class="model-score-m">
- </div>
- <div class="modal-btn">
- <a href="javascript:;" class="sumbit3" id="sendHistoryProduct">确定</a>
- <a href="javascript:;" class="close3 chameleon">取消</a>
- </div>
- </div>
- </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: 5
- }, function(){
- layer.closeAll();
- });
- }
- });
- }
- });
- });
- });
- function objToJson(obj){
- var json = "{ ";
- for(var item in obj){
- json += "'"+item+"':'"+obj[item]+"',";
- }
- json += " }";
-
- return json;
- }
- function ccc(){
- layer.msg('敬请期待!', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- return false;
- }
- });
- }
- function delExam(odj){
- if (!odj) return false;
- var classId = odj.getAttribute("w_class_id");
- var examId = odj.getAttribute("w_exam_id");
- 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: 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 downloadBook(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){
- //英语个性化学习宝提示不一样
- var print_type = "<?php echo $printType;?>";
- if(print_type == 'third_isp'){
- var sub_id = "<?php echo $duo_sub_id;?>";
- }else{
- var sub_id = "<?php echo $sub_id;?>";
- }
- if(sub_id == 8){
- message = "您确定要下载该班级个性化学习宝吗?";
- divTitle = "下载个性化学习宝";
- improveName = "个性化学习宝";
- }else{
- message = "您确定要下载该班级个性化学习方案吗?";
- divTitle = "下载个性化学习方案";
- improveName = "个性化学习方案";
- }
- objUrl = "<?php echo $this->createUrl('print/downloadraisescheme');?>";
- }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>'+
- "";
- var absent_filter = $("input[name='absent-filter']").is(':checked') ? 1 : 0;
-
- layer.msg(message, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- $.ajax({
- url: "<?php echo $this->createUrl('productdownload/getImproveFile');?>",
- type: "GET",
- dataType: "json",
- data: {"examId": eid, "classId": cid, "type": type,"absent_filter":absent_filter,"printType":"<?php echo $printType;?>"},
- 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/addIspTask");?>",
- data: {"examId": eid, "classId": cid, "type": type,"printType":"<?php echo $printType;?>"},
- 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){
- // 更试卷打印时间
- $.post("<?php echo $this->createUrl('print/updatepaperprinttime');?>", {cid: cid, eid: eid,type:type } );
- 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){
- // 更试卷打印时间
- $.post("<?php echo $this->createUrl('print/updatepaperprinttime');?>", {cid: cid, eid: eid,type:type } );
- 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: 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 (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: 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 print_type = "<?php echo $printType;?>";
- if(print_type == 'third_isp'){
- var sub_id = "<?php echo $duo_sub_id;?>";
- }else{
- var sub_id = "<?php echo $sub_id;?>";
- }
- if(sub_id == 8){
- var product_name = '个性化学习宝';
- }else{
- var product_name = '个性化学习方案';
- }
- var msg = '您确定要生成该班级的'+product_name+'吗?';
- 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('操作成功,重新生成'+product_name,{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }else if(data==0){
- layer.msg('操作失败,此班无'+product_name,{
- icon: 5
- }, function(){
- layer.closeAll();
- });
- }
- else{
- layer.msg('操作失败,重新生成'+product_name,{
- 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);
- }
- });
- }
- });
- }
- $('.confirmbox-mask .icon-close-1').click(function () {
- $('.confirmbox-mask').hide();
- })
- $('.confirmbox-mask .cancel').click(function () {
- $('.confirmbox-mask').hide();
- })
- //发送云印任务
- function sendCloudTask(cid,eid,type,isDisable){
- if(isDisable === 1){
- return false;
- }
- //$('.confirmbox-mask').show();return false;
- if (!cid || !eid || !type) {
- layer.msg("参数有误");return;
- }
- // 更试卷打印时间
- //$.post("<?php //echo $this->createUrl('print/updatepaperprinttime');?>//", {cid: cid, eid: eid,type:type } );
- var saveDataAry=[];
- var data1={"examId": eid, "classId": cid, "type": type,"printType":"<?php echo $printType;?>"};
- saveDataAry.push(data1);
- $.ajax({
- type: "POST",
- url: "<?php echo $this->createUrl("printCloud/generateTaskList");?>",
- 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').attr({'cid':cid, 'eid':eid, 'typeId':type, 'printType':"<?php echo $printType;?>"});
- $('#filter-uploaded').prop("checked", true)
- $('.confirmbox-mask').show();
- } else if (data.status == 0) {
- layer.msg(data.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 eid = 0;
- var type = 0;
- var isDisable = 0;
- var saveDataAry=[];
- var data1 = [];
- for(i=0;i<result.length;i++)
- {
- sp = result[i].split('_');
- cid = sp[0];
- eid = sp[1];
- type = sp[2];
- isDisable = sp[3];
- if(isDisable == 1 || !cid || !eid || !type) continue;
- // 更试卷打印时间
- //$.post("<?php //echo $this->createUrl('print/updatepaperprinttime');?>//", {cid: cid, eid: eid,type:type } );
- //alert(cid);alert(eid);alert(type);alert(printType);
- data1 = {"examId": eid, "classId": cid, "type": type,"printType":"<?php echo $printType;?>"};
- saveDataAry.push(data1);
- }
- $.ajax({
- type: "POST",
- url: "<?php echo $this->createUrl("printCloud/generateTaskList");?>",
- 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').attr({'cid':cid, 'eid':eid, 'typeId':type, 'printType':"<?php echo $printType;?>"});
- $('#filter-uploaded').prop("checked", true);
- $('.confirmbox-mask').show();
- } else if (data.status == 0) {
- layer.msg(data.message);
- }
- }
- }
- );
- });
- //显示打印历史产品
- $("#printHistoryPorduct").click(function () {
- $('.modal1_multi').show();
- });
- $('.close3').click(function(){
- $('.modal1_multi').hide();
- });
- //打印历史产品
- $("#sendHistoryProduct").click(function () {
- $('.modal1_multi').hide();
- $.post({
- url: "<?php echo $this->createUrl("historyProduct/viewProduct");?>",
- data: { 'printType':"<?php echo $printType;?>"},
- 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.alert('操作成功,可重置考试:'+data.data.exam_num+'个,学生:'+data.data.student_num+'个',{
- icon: 1,
- yes:function(){
- location.reload();
- }
- });
- } else if (data.status == 0) {
- layer.msg(data.message,{
- time: 3000,
- icon: 5
- }, function(){
- layer.closeAll();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- time: 2000,
- icon: 5
- }, function(){
- layer.closeAll();
- });
- }
- });
- });
- // 全选\反选
- $(".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/sendCloudTask");?>",
- data: {
- 'json_data' : json_data,
- 'is_filter' : is_filter,
- 'printType':"<?php echo $printType;?>"
- },
- 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);
- }
- }
- });
- })
- //批量下载
- $("#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 eid = 0;
- var type = 0;
- var saveDataAry=[];
- var data1 = [];
- for(i=0;i<result.length;i++)
- {
- sp = result[i].split('_');
- cid = sp[0];
- eid = sp[1];
- type = sp[2];
- if(!cid || !eid || !type) continue;
- var absent_filter = $("input[name='absent-filter']").is(':checked') ? 1 : 0;
- data1 = {"examId": eid, "classId": cid, "type": type,"absent_filter":absent_filter,"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/batchIsp');?>",
- 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>
|