1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230 |
- <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, "flag": 0},
- 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);
- }
- }
- );
- }
- });
- });
- //发送/取消/重新发送标注
- var flag = true;
- $(".sendLabelTask").bind("click", function () {
- var productSwitch=<?php echo $productSwitch?>;
- var examId = jQuery(this).attr("examId");
- var examName = jQuery(this).attr("examName");
- var subjectId = jQuery(this).attr("subjectId");
- var createTime = jQuery(this).attr("createTime");
- var type = jQuery(this).attr("type");
- var status = jQuery(this).attr("status");
- var _this = jQuery(this);
- var isTagging=$(this).attr('isTagging');
- var sub_id = $('input[name="subject_id"]').val();
- var textbook_set=0;
- <?php
- if(Yii::app()->params['school_textbook_setting'] ){
- foreach (Yii::app()->params['school_textbook_setting'] as $val){
- $textbookArr[$val['grade']]=1;
- }
- if(isset($textbookArr[1]) && isset($textbookArr[2])){
- echo 'textbook_set=1;';
- }
- }
- ?>
- if(textbook_set==0 && type!='cancel' && isTagging==0 && (subjectId==3 || subjectId==6 || subjectId==51)){
- layer.msg('请先在教材管理模块设置高一、高二的教材版本');
- return false;
- }
- if(productSwitch==3 && type!='cancel' && (subjectId==3 || subjectId==6 || subjectId==51) && isTagging!=1){
- sendLabelForSelectType(examId,examName,subjectId,createTime,type,status);
- return false;
- }
- if (type=='cancel') {
- //取消标注
- layer.msg('本次考试不需要老师标注吗?', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function (index) {
- _this.removeClass('sendlabeltask');
- _this.unbind();
- layer.close(index);
- if (flag){
- flag = false;
- jQuery.post(
- "<?php echo $this->createUrl("print/sendlabeltask");?>",
- {"examId": examId, "examName": examName, "createTime": createTime, 'type': type,'status':status,'isTagging':isTagging},
- function (data) {
- data = JSON.parse(data);
- if (data.success == 1) {
- layer.alert('取消成功', {'icon': 1,'closeBtn':0}, function () {
- location.reload();
- });
- }else if (data.success == 2){
- layer.alert(data.message, {'icon': 1,'closeBtn':0}, function () {
- location.reload();
- });
- }
- else {
- flag = true;
- layer.msg(data.message);
- }
- }
- );
- }
- }
- });
- }else{
- if (sub_id == 3 || sub_id == 6 || sub_id==12 || (sub_id==8 && isTagging==1)) {
- str=$('#label_win');
- $('.label_remark').val('');
- layer.open({
- title: '发送标注',
- type: 1,
- skin: 'layui-layer-rim', //加上边框
- area: '450px',
- content: str,
- shade: 0.6, //不显示遮罩
- offset: 'auto',
- btn: ['确定', '取消'],
- yes:function(){
- estimate=$('.estimate').val();
- remark=$('.label_remark').val();
- if(estimate==''){
- layer.msg('请选择期望完成时间');
- return false;
- }
- if(remark.length>100){
- layer.msg('备注内容不大于100个字符');
- return false;
- }
- if (flag){
- flag = false;
- indexSend=layer.msg('正在发送,请稍候......',{time:0});
- jQuery.post(
- "<?php echo $this->createUrl("print/sendlabeltask");?>",
- {"examId": examId, "examName": examName, "createTime": createTime,'type': type,'status':status,'isTagging':isTagging,remark:remark,estimate:estimate},
- function (data) {
- layer.close(indexSend);
- data = JSON.parse(data);
- if (data.success == 1) {
- layer.msg('发送成功');
- setTimeout(function () {
- location.reload();
- }, 2000);
- }else if (data.success == 2){
- layer.alert(data.message, {'icon': 1,'closeBtn':0}, function () {
- location.reload();
- });
- }
- else {
- flag = true;
- layer.msg(data.message);
- }
- }
- );
- }
- }
- });
- }else{
- sendLabel(examId,examName,createTime,type,status,isTagging);
- }
- return false;
- }
- });
- //发送标注到题库
- function sendLabel(examId,examName,createTime,type,status,isTagging) {
- if (flag){
- flag = false;
- indexSend=layer.msg('正在发送,请稍候......',{time:0});
- jQuery.post(
- "<?php echo $this->createUrl("print/sendlabeltask");?>",
- {"examId": examId, "examName": examName, "createTime": createTime,'type': type,'status':status,remark:$(".label-remark").val(),'isTagging':isTagging},
- function (data) {
- layer.close(indexSend);
- data = JSON.parse(data);
- if (data.success == 1) {
- layer.msg('发送成功');
- setTimeout(function () {
- location.reload();
- }, 2000);
- }else if (data.success == 2){
- layer.alert(data.message, {'icon': 1,'closeBtn':0}, function () {
- location.reload();
- });
- }
- else {
- flag = true;
- layer.msg(data.message);
- }
- }
- );
- }
- }
- //发送标注到教师端
- function sendLabelToTeacher(examId,type,status) {
- if (flag){
- flag = false;
- indexSend=layer.msg('正在发送,请稍候......',{time:0});
- jQuery.post(
- "<?php echo $this->createUrl("print/sendLabelToTeacher");?>",
- {"examId": examId,'type': type,'status':status},
- function (data) {
- layer.close(indexSend);
- data = JSON.parse(data);
- if (data.success == 1) {
- layer.msg('发送成功');
- setTimeout(function () {
- location.reload();
- }, 2000);
- }else if (data.success == 2){
- layer.alert(data.message, {'icon': 1,'closeBtn':0}, function () {
- location.reload();
- });
- }
- else {
- flag = true;
- layer.msg(data.message);
- }
- }
- );
- }
- }
- //选择发送发注类型
- function sendLabelForSelectType(examId,examName,subjectId,createTime,type,status){
- var str = '<div id="hgc_editor" style="padding:20px 35px;">\
- <p>选择标注类型</p>\
- <span class="selectSendType selected">题库后台标注</span>\
- <span class="selectSendType">学校自主标注</span>\
- <input type="hidden" name="sendType" value="1">\
- </div>';
- layer.open({
- title:'选择标注类型'
- ,area:'740px'
- ,type: 1
- ,offset: 'auto'
- ,content: str
- ,btn: ['确定','取消']
- ,btnAlign: 'c' //按钮居中
- ,shade: 0.6 //不显示遮罩
- ,yes:function(){
- //确定回调
- var sendType=$('input[name=sendType]').val();
- if(sendType==undefined){
- layer.msg('请选择标注类型')
- }else if(sendType==1){
- var sub_id = $('input[name="subject_id"]').val();
- if (sub_id == 3 || sub_id == 6) {
- var str = '<div id="hgc_editor" style="padding:20px 35px;">\
- <p>请慎重填写该份试卷的备注(可不写)。例如,该年级头几次使用需重视,马上放假需要快速标记等。</p>\
- <textarea style="width:100%;height:200px;resize:vertical;" placeholder="请输入该份试卷的标注要求" class="label-remark"></textarea>\
- </div>';
- layer.open({
- title:'发送标注'
- ,area:'740px'
- ,type: 1
- ,offset: 'auto'
- ,content: str
- ,btn: ['确定','取消']
- ,btnAlign: 'c' //按钮居中
- ,shade: 0.6 //不显示遮罩
- ,yes:function(){
- //确定回调
- sendLabel(examId,examName,createTime,type,status);
- }
- });
- }else{
- sendLabel(examId,examName,createTime,type,status);
- }
- }else if(sendType==2){
- sendLabelToTeacher(examId,type,status)
- }
- }
- });
- }
- 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, 2011, 3011, 11, 3007, 4007])) {
- 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:10px 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>';
- html = html + '<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/>切换完答题卡纸张类型后请记住使用切换后的答题卡类型打印复印</div>' +
- '</div>' +
- "";
- layer.open({
- type: 1,
- area: ['350px', '250px'],
- title: "更改试卷",
- content: html,
- success: function (index, layerObj) {
- jQuery("#cancel").on("click", function () {
- layer.closeAll();
- });
- jQuery("#confirm").on("click", function () {
- var paperSize = jQuery("#paperSize").val();
- jQuery.post(
- "<?php echo $this->createUrl("print/setpapersize");?>",
- {"examId": examId, "paperSize": paperSize, "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(".maskType").click(function () {
- var is_show = jQuery(this).attr("is_show");
- if (is_show > 0) {
- return false;
- }
- var _display = '';
- var exam_group_id = jQuery(this).attr("examId");
- var tpl_index = jQuery(this).attr("tpl_index");
- var marking_papers=$(this).attr('marking_papers');
- var online_card=$(this).attr('online');
- var mar = 'margin:30px auto;';
- html = "" +
- '<div style="padding:10px 30px">' +
- '<div style="padding-top:10px;clear: left"></div>' +
- '<div style="margin:5px 0; float: left;';
- html = html + '">阅卷方式:</div>' +
- '<div style="float: left"><select id="mark_type" style="width:200px;';
- 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> ';
- html = html + ' <option value="4" ';
- if (jQuery(this).attr("mark_type") == '4') {
- 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>' +
- "";
- layer.open({
- type: 1,
- area: ['350px', '300px'],
- title: "更改试卷",
- content: html,
- success: function (index, layerObj) {
- jQuery("#cancel").on("click", function () {
- layer.closeAll();
- });
- jQuery("#confirm").on("click", function () {
- var mark_type = jQuery("#mark_type").val();
- console.log('markpapers:'+marking_papers+',marktyp:'+mark_type+',online:'+online_card);
- if(online_card==1 && marking_papers==2 && mark_type==0){
- layer.msg("当前在线答题卡的评阅方式为网阅,不支持修改为线下阅卷,请进入在线答题卡修改评阅方式为手批后再更改阅卷方式!", {
- time: 0,
- btn: ['我已知晓'],
- yes: function (index) {
- layer.closeAll();
- }
- })
- }else{
- jQuery.post(
- "<?php echo $this->createUrl("print/Setmasktype");?>",
- {"exam_group_id": exam_group_id, "mark_type": mark_type, "tpl_index": tpl_index},
- function (data) {
- data = JSON.parse(data);
- if (data.success == 1) {
- layer.msg(data.message);
- setTimeout(function () {
- location.reload();
- }, 1300);
- }else{
- layer.msg(data.message,{time:10000});
- }
- }
- );
- }
- // layer.closeAll();
- });
- },
- end: function () {
- }
- });
- });
- // 根据年级筛选班级
- jQuery("#grade").change(function () {
- var grade = $(this).val();
- if (!grade) return false;
- jQuery.post(
- '<?php echo $this->createUrl("print/getGradeClass");?>', {"grade": grade}, function (data) {
- data = JSON.parse(data);
- if (data.success == 1) {
- var classObj = $("#class");
- var html = "<option value=''>全部班级</option>";
- classObj.empty();
- $.each(data.message, function (i, n) {
- html += "<option value='" + n.class_id + "'>" + n.class_name + "</option>";
- });
- classObj.append(html);
- }
- }
- );
- });
- jQuery(".studentCard").click(function () {
- var is_show = jQuery(this).attr("is_show");
- var cardStatus=jQuery(this).attr("cardStatus");
- var cardLength=jQuery(this).attr("cardLength");
- if (is_show > 0) {
- return false;
- }
- var _display = '';
- var exam_group_id = jQuery(this).attr("examId");
- var mar = 'margin:30px auto;';
- html = "" +
- '<div style="padding:10px 30px">' +
- '<div style="padding-top:10px;clear: left"></div>' +
- '<div style="margin:5px 0; float: left;';
- html = html + '">考号类型:</div>' +
- '<div style="float: left"><select id="schoolCard" style="width:200px;';
- html = html + '">' +
- '<option value="1" ';
- if (jQuery(this).attr("school_card_status") == '1') {
- html = html + 'selected';
- }
- html = html + '>学校准考证</option>';
- html = html + ' <option value="0" ';
- if (jQuery(this).attr("school_card_status") == '0') {
- html = html + 'selected';
- }
- html = html + '>系统准考证</option> '+
- '</select></div>';
- html+='<div style="margin:5px 0; float: left;">考号位数:</div>';
- html+='<div style="margin:5px 0; float: left"><input type="text" id="schoolCardLength" length="'+cardLength+'" name="schoolCardLength" value="'+cardLength+'"></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>' +
- "";
- layer.open({
- type: 1,
- area: ['350px', '300px'],
- title: "更改考号类型",
- content: html,
- success: function (index, layerObj) {
- jQuery("#cancel").on("click", function () {
- layer.closeAll();
- });
- jQuery("#confirm").on("click", function () {
- var schoolCard = jQuery("#schoolCard").val();
- var schoolCardLength = parseInt(jQuery("#schoolCardLength").val());
- if(schoolCard==1 && schoolCardLength==0){
- layer.msg('请输入准考证位数');
- return false;
- }else if(schoolCard==1 && (jQuery("#schoolCardLength").val()%1 !== 0 || schoolCardLength>14)){
- layer.msg('准考证位数不正确');
- return false;
- }
- jQuery.post(
- "<?php echo $this->createUrl("print/changeStudentCardType");?>",
- {"examGroupId": exam_group_id, "schoolCard": schoolCard, "schoolCardLength": schoolCardLength},
- function (data) {
- data = JSON.parse(data);
- layer.msg(data.message);
- if (data.success == 1) {
- setTimeout(function () {
- location.reload();
- }, 1300);
- }
- }
- );
- layer.closeAll();
- });
- },
- end: function () {
- }
- });
- });
- $('body').on('change','#schoolCard',function(){
- console.log($(this).val());
- studentCard= $('#schoolCardLength').attr('length');
- if($(this).val()==0){
- $('#schoolCardLength').val('');
- $('#schoolCardLength').attr('disabled',true);
- }else{
- $('#schoolCardLength').val(studentCard);
- $('#schoolCardLength').attr('disabled',false);
- }
- })
- });
- </script>
- <style>
- /*切换选择*/
- .tab-con {
- position: relative;
- height: 30px;
- width: 200px;
- background: #F2F2F2;
- border: 1px solid #01B677;
- border-radius: 15px;
- }
- .has-sel {
- background: #0155fe;
- 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: 30 px;
- / / background: #F2F2F2;
- / / color: #01B677;
- / / text-indent: 6 px;
- / / font-size: inherit;
- / / border-top-right-radius: 15 px;
- / / border-bottom-right-radius: 15 px;
- / / 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;
- }
- .ellipsis { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
- .class_btn{text-align: center}
- .table-hover>tbody>tr:hover {
- background-color: #E6F1EC
- }
- .selectSendType{width:180px;height:100px;border:1px solid #ccc;display: inline-block;text-align: center;line-height: 100px;cursor:pointer;border-radius:5px;}
- .selected{background:#aaa; }
- /* Tooltip 容器 */
- .tooltipclass {
- display: inline-block;
- }
- /* Tooltip 文本 */
- .tooltipclass .tooltiptext {
- visibility: hidden;
- width: 160px;
- background-color: #555;
- color: #fff;
- padding: 5px;
- border-radius: 6px;
- font-size:11px;
- text-align: left;
- /* 定位 */
- position: absolute;
- z-index: 1;
- }
- /* 鼠标移动上去后显示提示框 */
- .tooltipclass:hover .tooltiptext {
- visibility: visible;
- }
- .sendLabelTask{margin-left:10px;}
- </style>
- <link rel="stylesheet" href="/fonts/fpdf/iconfont.css"/>
- <link rel="stylesheet" href="/css/alert.css"/>
- <?php include(Yii::app()->basePath.'/views/layouts/parse_label.php');?>
- <div class="main-content-inner">
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/view_navigation.php');?>
- <!-- 导航栏结束-->
- <div class="page-content">
- <div class="row" style="margin:0px;">
- <div class="col-xs-12">
- <!-- PAGE CONTENT BEGINS -->
- <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
- <div class="row">
- <form method="get" id="form1" action="<?php echo $this->createUrl("print/index"); ?>">
- <div class="col-xs-12">
- <div class="dataTables_length margin-zy">
- <input type="hidden" name="subject_id" value="<?php echo $sub_id;?>">
- <input type="checkbox" name="display"
- style="margin: -1px 2px 0 0;display:inline-block;vertical-align: middle;width:15px;height:15px;"
- value="1" <?php if ($display === '1') echo "checked"; ?>>显示隐藏试卷
- <!--
- <?php if($sub_id != 8 && Yii::app()->params['section']!=3):?>
- <select class="form-control" id="labelled" name="labelled">
- <option value="-1">标注状态</option>
- <option value="0" <?php if ($labelled === '0') echo "selected"; ?> >未发送</option>
- <option value="2" <?php if ($labelled == 2) echo "selected"; ?> >已发送未开始</option>
- <option value="1" <?php if ($labelled == 1) echo "selected"; ?>>已标注</option>
- <option value="3" <?php if ($labelled == 3) echo "selected"; ?> >标注中</option>
- <option value="4" <?php if ($labelled == 4) echo "selected"; ?> >已取消</option>
- <option value="5" <?php if ($labelled == 5) echo "selected"; ?>>补题中</option>
- </select>
- <?php endif;?>
- -->
- <select class="form-control" id="grade" name="grade">
- <option value="0">年级</option>
- <?php
- if(Yii::app()->params['grade_config']){
- foreach (Yii::app()->params['grade_config'] as $val){
- if($grade==$val['id']){
- echo ' <option value="'.$val['id'].'" selected >'.$val['grade_name'].'</option>';
- }else{
- echo ' <option value="'.$val['id'].'" >'.$val['grade_name'].'</option>';
- }
- }
- }
- ?>
- </select>
- <!-- 命卷人
- <select class="form-control" id="teacher_id" name="teacher_id">
- <option value="0">全部</option>
- <?php
- if($teacherNames){
- foreach ($teacherNames as $key =>$val){
- if($teacherId==$key){
- echo '<option value="'.$key.'" selected >'.$val.'</option>';
- }else{
- echo '<option value="'.$key.'" >'.$val.'</option>';
- }
- }
- }
- ?>
- </select>
- -->
- <input type="text" class="form-control input-sm" placeholder="请输入打印任务/命卷人名称" name="name"
- value="<?php echo $printName; ?>">
- <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索
- </button>
- <?php
- if(in_array(Yii::app()->session['session_subject_id'],Yii::app()->params['mathSubjectId']) || Yii::app()->session['session_subject_id']==12):?>
- <button class="label-primary-s bth-s" id="changeScan" style="padding:4px 12px;">切换扫描方式</button>
- <?php endif;?>
- </div>
- </div>
- </form>
- </div>
- <table id="dynamic-table"
- class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable"
- style="font-size:12px">
- <thead>
- <tr>
- <th>名称</th>
- <th>命卷人</th>
- <th>答题卡类型</th>
- <th>考号类型</th>
- <th>阅卷方式</th>
- <th>年级</th>
- <th>申请日期</th>
- <th>考试日期</th>
- <th>打印班级(word答题卡)</th>
- <th>打印班级(在线答题卡)</th>
- <!--<th>
- 标注状态
- <div class="tooltipclass"> <img src="/images/icon-warning-red.png"><span class="tooltiptext">标注状态栏,“老”代表数学老题库,个性化学习宝系列产品发送标注时,请点击对应按钮。“新”代表全学科题库,方法宝产品发送标注时,请点击对应按钮。仅适用于高中数学学科。</span></div>
- </th>-->
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if (!empty($printList)):foreach ($printList as $cl): ?>
- <tr>
- <td style="max-width:260px"><?php
- if ($cl['is_new'] == 0) {
- echo "<span style='color: #ff0000;font-weight: bold;'>【New】</span>";
- }
- $wp = '';
- if ($cl["paper_size"] == '8K') {
- if (isset($exam_use_wp) && $exam_use_wp > 0) {
- $wp = '/纸张大小(270*390)';
- } else {
- $wp = '/纸张大小(260*370)';
- }
- }
- $imgSrc = "";
- if ($cl["mark_type"] > 0) {
- $imgTitle = "线上阅卷" . $wp;
- $imgSrc .= "/images/online/";
- } else {
- $imgTitle = "线下阅卷" . $wp;
- $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['upload_status'] . "' style='cursor:pointer;width:22px;height:22px;margin-right:5px;' title='{$imgTitle}' src='{$imgSrc}'/>";
- if($cl['homework']==1)
- {
- echo "<span style='color: #fff;font-weight: bold;display:inline-block;background: #337ab7;padding:0 5px;'> 作业 </span>";
- }
- if($cl['qxk_paper_id']){
- ?>
- <a href="<?php echo Yii::app()->createUrl('allSubject/index', array('eid' => $cl['exam_id'])) ?>"><?php echo $cl['print_name']; ?></a>
- <?php
- }else{
- ?>
- <a href="<?php echo Yii::app()->createUrl('paper/index', array('eid' => $cl['exam_id'])) ?>"><?php echo $cl['print_name']; ?></a>
- <?php
- }
- ?>
- </td>
- <td><?php echo $cl['teacher_name']?></td>
- <td>
- <?php
- if(!$cl['qxk_paper_id']){
- $txt='';
- if($cl['online_card']==1){
- $txt='在线';
- }else{
- $txt='word';
- }
- $attr=array();
- if(!$cl['is_custom_tpl']){
- $attr[]='固定模板';
- }else{
- if($cl['paper_tpl_type']==1 || $cl['paper_tpl_type']==3){
- $attr[]='题卡合一';
- }else{
- if($cl["subject_id"]!=8){
- $txt='在线';
- }
- $attr[]='题卡分离';
- }
- }
- if($cl['is_qrcode_online']==1 || $cl['qrcode'] ){
- $attr[]='含二维码';
- }
- echo $txt.'('.implode(',',$attr).')';
- }else{
- if($cl['online_card']==1){
- echo '在线';
- }elseif($cl['third_card']){
- echo '第三方';
- }
- }
- ?>
- </td>
- <td>
- <?php
- if($cl['school_card_status']==1){
- if ($cl['upload_status'] > 0 || $cl['homework']==1) {
- echo '学校';
- }else{
- echo '<a href="javascript::void()" class="studentCard" cardStatus="'.$cl['school_card_status'].'" cardLength="'.$cl['school_card_length'].'" is_show="' . $cl['upload_status'] . '" examId="' . $cl["exam_group_id"] . '" >学校</a>';
- }
- }else{
- if ($cl['upload_status'] > 0 || $cl['homework']==1) {
- echo '系统';
- }else{
- echo '<a href="javascript::void()" class="studentCard" cardStatus="'.$cl['school_card_status'].'" cardLength="'.$cl['school_card_length'].'" is_show="' . $cl['upload_status'] . '" examId="' . $cl["exam_group_id"] . '" >系统</a>';
- }
- }
- ?>
- </td>
- <td >
- <?php
- $txt='';
- if($cl['import_score_type']>0){
- $txt='导入成绩';
- }elseif ($cl['mark_type'] == 0) {
- $txt='线下阅卷';
- }elseif($cl['mark_type'] == 4){
- $txt='班级单独阅卷';
- }elseif($cl['mark_type']==3){
- $txt='混合阅卷';
- }
- if ($cl['upload_status'] > 0 || $cl['homework']==1 || $cl['import_score_type']>0) {
- echo $txt;
- }else{
- echo '<a href="javascript::void()" class="maskType" online="'.$cl['online_card'].'" marking_papers="'.$cl['marking_papers'].'" is_show="' . $cl['upload_status'] . '" examId="' . $cl["exam_group_id"] . '" tpl_index="' . $cl["tpl_index"] . '" mark_type="' . $cl["mark_type"] . '" >'.$txt.'</a>';
- }
- ?></td>
- <td>
- <?php
- if (isset($class_grade[$cl['class_id']])) {
- switch ($class_grade[$cl['class_id']]) {
- case 1:
- echo '高一';
- break;
- case 2:
- echo '高二';
- break;
- case 3:
- echo '高三';
- break;
- }
- }
- ?>
- </td>
- <td><?php if (!empty($cl['create_time'])) {
- echo date('Y-m-d H:i', $cl['create_time']);
- } ?></td>
- <td><?php if (!empty($cl['exam_time'])) {
- echo date('Y-m-d', $cl['exam_time']);
- } ?></td>
- <td>
- <?php
- if (isset($printer['word'][$cl['exam_group_id']])) {
- echo count($printer['word'][$cl['exam_group_id']]);
- } else {
- echo 0;
- }
- ?>/<?php
- if (isset($exam_class[$cl['exam_group_id']])) {
- echo count($exam_class[$cl['exam_group_id']]);
- } else {
- echo 0;
- }
- ?>
- </td>
- <td>
- <?php
- if (isset($printer['online'][$cl['exam_group_id']])) {
- echo count($printer['online'][$cl['exam_group_id']]);
- } else {
- echo 0;
- }
- ?>/<?php
- if (isset($exam_class[$cl['exam_group_id']])) {
- echo count($exam_class[$cl['exam_group_id']]);
- } else {
- echo 0;
- }
- ?>
- </td>
- <!--<td>
- <?php
- if(in_array(Yii::app()->session['session_duoxueke_subject_id'],Yii::app()->params['mathSubjectId'])){
- require 'operate/status_3.php';
- }elseif(Yii::app()->session['session_duoxueke_subject_id']==8){
- require 'operate/status_8.php';
- }elseif(Yii::app()->session['session_duoxueke_subject_id']==12 || Yii::app()->session['session_duoxueke_subject_id']==41){
- require 'operate/status_12.php';
- }else{
- require 'operate/status_other.php';
- }
- ?>
- </td>-->
- <td style="width: 250px;">
- <?php
- $_num = '';
- $use_version = '';
- if (isset(Yii::app()->session['coachInfo']->use_version)) {
- $use_version = Yii::app()->session['coachInfo']->use_version;
- } else {
- $use_version = Yii::app()->session['coachInfo']['use_version'];
- }
- if (!$use_version) {
- $use_version = 100;
- }
- $version_number = implode('', explode('.', $use_version));
- if (strlen($version_number) < 7) {
- for ($i = 0; $i < 7 - strlen($version_number); $i++) {
- $_num .= '0';
- }
- }
- $version_number = (int)$version_number . $_num;
- ?>
- <span class=" click-sc addbx" aria-hidden="true" title="查看考试班级"
- onclick="javascript:location.href='<?php echo $this->createUrl('print/class_exam', array('exam_group_id' => $cl['exam_group_id'],'branch'=>$cl['branch'],'grade'=>$class_grade[$cl['class_id']],'upload_status'=>$cl['upload_status'])); ?>'">班</span>
- <?php if($cl['is_scan_changed'] == 1):?>
- <a class="iconfont click-sc addbx create_sheet" qxk="<?php if($cl['qxk_paper_id']){echo 1;}else{echo 0;}?>" aria-hidden="true" title="<?php if(isset($exam_sheets[$cl['exam_group_id']]) && !empty($exam_sheets[$cl['exam_group_id']])){ echo '修改答题卡';}else{echo "创建答题卡";}?>" exam_group_id="<?php echo $cl['exam_group_id']?>" sheet_id ="<?php if(isset($exam_sheets[$cl['exam_group_id']]) && !empty($exam_sheets[$cl['exam_group_id']])){ echo $exam_sheets[$cl['exam_group_id']];}else{echo 0;}?>"></a>
- <span class="iconfont click-sc addbx" aria-hidden="true" title="扫描答题卡" onclick="createTemplateScan('<?php echo $cl['exam_group_id'];?>',<?php echo $cl['import_score_type']?>)">扫</span>
- <?php endif; ?>
- <a href="<?php echo $this->createUrl("print/modifyThirdExam",array('exam_group_id'=>$cl['exam_group_id']));?>" class="iconfont click-sc addbx" aria-hidden="true" title="编辑考试信息" >编</a>
- <!-- 隐藏试卷操作 -->
- <?php if ($cl['is_display'] == 1): ?>
- <span class="iconfont click-sc click-tc addbx" aria-hidden="true" title="恢复试卷"
- onclick="oprateExam('<?php echo $cl['exam_group_id']; ?>',0)"></span>
- <?php else: ?>
- <span class="iconfont click-sc click-delete addbx" aria-hidden="true"
- title="隐藏试卷"
- onclick="oprateExam('<?php echo $cl['exam_group_id']; ?>',1)"></span>
- <?php endif; ?>
- <?php //if($version_number>=1990000):?>
- <?php
- if((in_array($cl['subject_id'],$this->mathSubjectId) || in_array($cl['subject_id'],array(8,9,12,13,14,15,16,17))) && $cl['is_scan_changed'] != 1 && $cl['homework']==0 ):?>
- <span class="iconfont addbx" aria-hidden="true" title="扫描在线答题卡" onclick="createTemplateScanOnline('<?php echo $cl['exam_group_id'];?>',this,'<?php echo $cl['print_name']; ?>',<?php echo $cl['import_score_type']?>)"><img src="/images/online_scan.svg"></span>
- <?php endif;?>
- <?php //endif;?>
- <!-- 发送标注按钮 -->
- <?php if (isset($paper[$cl['exam_group_id']])):?>
- <?php if($cl['is_united']==1):?>
- <?php if($cl['upload_status']==0):?>
- <span class="add_class click-sc addbx" grade="<?php echo $class_grade[$cl['class_id']];?>" branch="<?php echo $cl['branch']; ?>" eid="<?php echo $cl['exam_group_id']?>" aria-hidden="true" title="考试班级" >+</span>
- <?php endif; ?>
- <?php endif; ?>
- <?php endif;?>
- <?php if(Yii::app()->params['section']==1 && $cl["create_time"]>strtotime('2022-9-1 21:00:00')):?>
- <a href="/vue/index.html#/ExamProcess/ExamProcessList?examGroupId=<?php echo $cl['exam_group_id'] ?>" class="iconfont click-sc addbx" aria-hidden="true" title="查看考试流程" >轨</a>
- <?php endif;?>
- <?php if($exportExam && $cl['is_feedback']==1):?>
- <span class="iconfont click-sc addbx exam_export" eid="<?php echo $cl['exam_group_id'] ?>" aria-hidden="true" title="导出考试数据" >导出</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>
- <!--上传模板弹窗-->
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
- <!--弹窗-->
- <!-- 弹窗 -->
- <div class="confirmbox-mask" style="display: none" id="fieldModal">
- <div class="class-modal">
- <i class="icon close_1 icon-close"></i>
- <div class="class-modal-head">添加考试班级</div>
- <form id="examSelect">
- <div class="class-modal-body">
- <p class="title">年级:高一 分科:文科</p>
- <div class="class_area">
- <div class="class_left">
- <p>A层班级</p>
- <input type="checkbox" class="checkAll">全选
- </div>
- <ul class="class_right area_1">
- </ul>
- <div class="clear"></div>
- <div class="class_left">
- <p>B层班级</p>
- <input type="checkbox" class="checkAll">全选
- </div>
- <ul class="class_right area_2">
- </ul>
- <div class="clear"></div>
- <div class="class_left">
- <p>C层班级</p>
- <input type="checkbox" class="checkAll">全选
- </div>
- <ul class="class_right area_3">
- </ul>
- </div>
- </div>
- <p class="class_btn">
- <input type="hidden" name="exam_gruop_id" value="0">
- <button type="button" class="setting_sumbit">确定</button>
- </p>
- </form>
- </div>
- </div>
- <script src="/js/jquery.ajaxfileupload.js"></script>
- <script type="text/javascript">
- $(document).ready(function () {
- var gradeArr=[],branchArr=[];
- gradeArr[1]='高一';
- gradeArr[2]='高二';
- gradeArr[3]='高三';
- branchArr[0]='不分科';
- branchArr[1]='文科';
- branchArr[2]='理科';
- $('.add_class').click(function(){
- var branch=$(this).attr('branch');
- var eid=$(this).attr('eid');
- var grade=$(this).attr('grade');
- var title="年级:"+gradeArr[grade]+" 分科:"+branchArr[branch];
- $('.area_1').html('');
- $('.area_2').html('');
- $('.area_3').html('');
- $('.checkAll').prop('checked',false);
- $('.class-modal-body .title').html(title);
- $.ajax({
- url:'<?php echo $this->createUrl('print/loadclass')?>',
- type:'POST',
- dataType:'json',
- data:{'branch':branch,'eid':eid,'grade':grade},
- success:function(res){
- if(res.status==1){
- class_data=res.classData;
- $('input[name=exam_gruop_id]').val(eid);
- if(class_data[1]!=undefined){
- area_1_html='';
- for(var i=0;i<class_data[1].length;i++){
- if(class_data[1][i]['is_used']==1){
- $('.checkAll').eq(0).prop('checked',true);
- area_1_html+="<li class='ellipsis' title='"+class_data[1][i]['class_name']+"'><input type='checkbox' class='choose_class' checked value='"+class_data[1][i]['class_id']+"'>"+class_data[1][i]['class_name']+"</li>";
- }else{
- area_1_html+="<li class='ellipsis' title='"+class_data[1][i]['class_name']+"'><input type='checkbox' class='choose_class' title='"+class_data[1][i]['class_name']+"' value='"+class_data[1][i]['class_id']+"'>"+class_data[1][i]['class_name']+"</li>";
- }
- }
- $('.area_1').html(area_1_html);
- }
- if(class_data[2]!=undefined){
- area_2_html='';
- for(var i=0;i<class_data[2].length;i++){
- if(class_data[2][i]['is_used']==1){
- $('.checkAll').eq(1).prop('checked',true);
- area_2_html+="<li class='ellipsis' title='"+class_data[2][i]['class_name']+"'><input type='checkbox' class='choose_class' checked value='"+class_data[2][i]['class_id']+"'>"+class_data[2][i]['class_name']+"</li>";
- }else{
- area_2_html+="<li class='ellipsis' title='"+class_data[2][i]['class_name']+"'><input type='checkbox' class='choose_class' value='"+class_data[2][i]['class_id']+"'>"+class_data[2][i]['class_name']+"</li>";
- }
- }
- $('.area_2').html(area_2_html);
- }
- if(class_data[3]!=undefined){
- area_3_html='';
- for(var i=0;i<class_data[3].length;i++){
- if(class_data[3][i]['is_used']==1){
- $('.checkAll').eq(2).prop('checked',true);
- area_3_html+="<li class='ellipsis' title='"+class_data[3][i]['class_name']+"'><input type='checkbox' class='choose_class' title='"+class_data[3][i]['class_name']+"' checked value='"+class_data[3][i]['class_id']+"'>"+class_data[3][i]['class_name']+"</li>";
- }else{
- area_3_html+="<li class='ellipsis' title='"+class_data[3][i]['class_name']+"'><input type='checkbox' class='choose_class' title='"+class_data[3][i]['class_name']+"' value='"+class_data[3][i]['class_id']+"'>"+class_data[3][i]['class_name']+"</li>";
- }
- }
- $('.area_3').html(area_3_html);
- }
- $('#fieldModal').show();
- }
- }
- });
- });
- $('.icon-close').click(function () {
- $('#fieldModal').hide();
- });
- $('body').on('click','.selectSendType',function(){
- $('.selectSendType').removeClass('selected');
- $('input[name=sendType]').val($(this).index());
- $(this).addClass('selected');
- })
- //全选
- $('.checkAll').click(function(){
- var index=$('.checkAll').index(this)+1;
- if($(this).is(':checked')) {
- $('.area_'+index).find('input').prop("checked", true);
- }else {
- $('.area_'+index).find('input').prop("checked", false);
- }
- });
- //保存班级加减操作
- $('.setting_sumbit').click(function(){
- var class_id=[];
- // console.log($('.choose_class').length);
- for(var i=0;i<$('.choose_class').length;i++){
- if($('.choose_class').eq(i).is(':checked')){
- class_id.push($('.choose_class').eq(i).val());
- }
- }
- var eid=$('input[name=exam_gruop_id]').val();
- console.log(class_id);
- if(class_id.length==0){
- layer.msg('请选择考试班级');
- return false;
- }else{
- $.ajax({
- url:'<?php echo $this->createUrl('print/saveexamclass')?>',
- type:'POST',
- dataType:'json',
- data:{'eid':eid,'classId':class_id},
- success:function(res){
- if(res.status==1){
- layer.msg('修改成功');
- $('#fieldModal').hide();
- }
- }
- });
- }
- });
- $(".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 printBook(cid, eid, type) {
- if (!cid || !eid || !type) {
- layer.msg("打印参数有误");
- return;
- }
- var message = '';
- var objUrl = '';
- if (type == 1) {
- message = "您确定要下载该班级纠错本吗?";
- objUrl = "<?php echo $this->createUrl('print/downloadwrongtopic');?>";
- divTitle = "下载错题本";
- improveName = "错题本";
- } else if (type == 2) {
- message = "您确定要下载该班级个性化学习方案吗?";
- objUrl = "<?php echo $this->createUrl('print/downloadraisescheme');?>";
- divTitle = "下载个性化学习方案";
- improveName = "个性化学习方案";
- } else if (type == 3) {
- message = "您确定要下载该班级个性化学习宝吗?";
- objUrl = "<?php echo $this->createUrl('print/downloadraisescheme');?>";
- divTitle = "下载个性化学习宝";
- improveName = "个性化学习宝";
- }
- else {
- layer.msg("打印参数有误");
- return;
- }
- html = "" +
- '<div style="padding:20px 30px 0px 30px">' +
- '<div style="padding:8px 0;">请复制下方链接下载' + improveName + '。</div>' +
- '<div id="downloadUrl" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:455px;"></div>' +
- '<div class="row" style="margin:30px auto 0px auto;text-align:center"><button id="confirm" class="label-primary-s bth-s" style="padding:4px 12px;margin:5px 0 10px 15px;background:gray;border-color:gray;">关闭</button>' +
- '</div>' +
- '</div>' +
- "";
- layer.msg(message, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function (index) {
- layer.close(index);
- msgIndex = layer.msg("下载中请稍后...", {"time": 3600000});
- // 更试卷打印时间
- $.post("<?php echo $this->createUrl('print/updatepaperprinttime');?>", {
- cid: cid,
- eid: eid,
- type: type
- });
- /*if(type == 1)
- location.href = objUrl+"/cid/"+cid+"/eid/"+eid;
- else
- location.href = objUrl+"/cid/"+cid+"/eid/"+eid+"/type/"+type;*/
- startTime = (new Date()).getTime();
- showTip = true;
- tipShowed = false;
- toPromptTime = 3000;
- window.interval = setInterval(function () {
- execTime = (new Date()).getTime() - startTime;
- if (execTime > toPromptTime && showTip && !tipShowed) {
- // msgIndex = layer.msg("该文件较大,请耐心等待...", {"time": 3600000});
- // tipShowed = true;
- }
- }, 1000);
- jQuery.get(
- "<?php echo $this->createUrl("print/getImproveFile");?>",
- {"examId": eid, "classId": cid, "type": type},
- function (data) {
- data = JSON.parse(data);
- if (data.success == 1 || data.success == 2) {
- layer.open({
- type: 1,
- area: ['550px', '220px'],
- title: divTitle,
- content: html,
- success: function (index, layerObj) {
- clearInterval(window.interval);
- msgIndex = layer.msg(data.limitinfo, {"time": 3000});
- clearInterval(window.interval);
- layer.close(msgIndex);
- jQuery("#downloadUrl").html('下载地址:<span style=""><input id="url" type="text" size="40" readonly value="' + data.downloadPath + '" /></span><button id="copy" class="label-primary-s bth-s" style="padding:4px 12px;margin:5px 0 10px 15px;">全选</button>');
- jQuery("#confirm, #cancel").on("click", function () {
- layer.close(layerObj);
- });
- jQuery("#copy").on("click", function () {
- jQuery("#url").select();
- });
- },
- end: function () {
- }
- });
- }
- else if (data.success == 0) {
- clearInterval(window.interval);
- msgIndex = layer.msg(data.message, {"time": 3000});
- }
- }
- );
- }
- });
- }
- // 上传试卷模板
- function uploadTemplate(eid, name, type) {
- if (!eid) {
- layer.msg('操作失败!');
- return false;
- }
- if (type == 1)
- forCheckUrl = "<?php echo $this->createUrl('print/verifyTpl');?>";
- else
- forCheckUrl = "<?php echo $this->createUrl('print/checkanswercard');?>";
- $.post(forCheckUrl, {eid: eid}, function (data) {
- var obj = JSON.parse(data);
- var html = '<div class="layer_notice" style="padding:5px;">';
- html += '<table class="table table-striped table-bordered table-hover ">';
- html += '<thead class="thin-border-bottom">';
- html += '<tr>';
- html += '<th>试卷名称</th>';
- html += '<th>是否上传</th>';
- html += '<th>操作</th>';
- html += '</tr>';
- html += '</thead>';
- html += '<tbody class="content_tbody">';
- if (obj.success == 1) {
- html += '<td>' + name + '</td><td><span style="color:red;">已上传</span></td><td><input type="file" name="word_file" id="word_file" /></td></tr>';
- } else {
- html += '<td>' + name + '</td><td id="alreadUpload">未上传</td><td><input type="file" name="word_file" id="word_file" /></td></tr>';
- }
- html += '</tbody>';
- html += '</table>';
- html += '<span style="width:582px;display:inline-block;text-align:center;">';
- html += '<button class="btn btn-success btn-sm" onclick="uploadWord(' + type + ')"><i class="ace-icon fa fa-check bigger-110"></i>确定</button>';
- html += '</span>';
- html += '<input type="hidden" id="mpEid" value="' + eid + '">';
- html += '</div>';
- layer.open({
- type: 1,
- skin: 'layui-layer-rim', //加上边框
- area: ['600px', '300px'], //宽高
- content: html
- });
- });
- }
- function uploadWord(type) {
- var paramEid = $('#mpEid').val();
- if (!paramEid) {
- layer.msg('没找到周周练ID!');
- return false;
- }
- var obj_file = $("#word_file").val();
- if (!obj_file) {
- layer.msg('请选择上传文件');
- return false;
- }
- var extStart = obj_file.lastIndexOf('.');
- var extName = obj_file.substring(extStart, obj_file.length).toLowerCase();
- if (extName != ".dotx" && extName != ".dotm") {
- layer.msg('模板格式有误,请上传dotx格式word!');
- return false;
- }
- $.ajaxFileUpload({
- url: "<?php echo $this->createUrl('print/uploadTpl');?>", //用于文件上传的服务器端请求地址
- secureuri: false, //是否需要安全协议,一般设置为false
- fileElementId: 'word_file', //文件上传域的ID
- dataType: 'text', //返回值类型 一般设置为json
- data: {"eid": paramEid, "type": type},
- success: function (data, status) {
- var obj = JSON.parse(data);
- if (obj.success == 1) {
- layer.msg(obj.message, {
- icon: 1,
- }, function () {
- layer.closeAll();
- });
- $("#alreadUpload").html('<span style="color:red;">已上传</span>');
- } else {
- layer.msg(obj.message, {
- icon: 5,
- }, function () {
- layer.closeAll();
- });
- }
- },
- error: function (data, status, e) { //服务器响应失败处理函数
- layer.msg('返回失败!', {
- icon: 5,
- }, function () {
- layer.closeAll();
- });
- }
- });
- return false;
- }
- // 搜索事件
- $("#search").click(function () {
- $("#form1").submit();
- });
- //切换扫描方式
- $('#changeScan').click(function(){
- window.location.href="<?php echo $this->createUrl('print/changeScan')?>";
- return false;
- });
- 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,
- "flag": flag
- }, 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 msg = '您确定要生成该班级的二步提分方案吗?';
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function (index) {
- layer.close(index);
- $.ajax({
- url: "<?php echo $this->createUrl('client/isp2html');?>",
- type: "POST",
- dataType: "json",
- data: {
- examId: examId,
- classId: classId
- },
- success: function (data) {
- if (data > 0) {
- layer.msg('操作成功,重新生成提分方案', {
- icon: 1
- }, function () {
- layer.closeAll();
- });
- } else if (data == 0) {
- layer.msg('操作失败,此班无提分方案', {
- icon: 5
- }, function () {
- layer.closeAll();
- });
- }
- else {
- layer.msg('操作失败,重新生成提分方案', {
- icon: 5
- }, function () {
- layer.closeAll();
- });
- }
- },
- error: function (data, status, e) { //服务器响应失败处理函数
- layer.msg('返回失败!', {
- icon: 5
- }, function () {
- layer.closeAll();
- });
- }
- });
- }
- });
- }
- function isp3_html(odj) {
- if (!odj) return false;
- var classId = odj.getAttribute("w_class_id");
- var examId = odj.getAttribute("w_exam_id");
- if (!classId || !examId) return false;
- var msg = '您确定要生成该班级的个性化学习宝吗?';
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function (index) {
- layer.close(index);
- $.ajax({
- url: "<?php echo $this->createUrl('client/isp3html');?>",
- type: "POST",
- dataType: "json",
- data: {
- examId: examId,
- classId: classId
- },
- success: function (data) {
- if (data > 0) {
- layer.msg('操作成功,重新生成提分方案', {
- icon: 1
- }, function () {
- layer.closeAll();
- });
- } else if (data == 0) {
- layer.msg('操作失败,此班无提分方案', {
- icon: 5
- }, function () {
- layer.closeAll();
- });
- }
- else {
- layer.msg('操作失败,重新生成提分方案', {
- icon: 5
- }, function () {
- layer.closeAll();
- });
- }
- },
- error: function (data, status, e) { //服务器响应失败处理函数
- layer.msg('返回失败!', {
- icon: 5
- }, function () {
- layer.closeAll();
- });
- }
- });
- }
- });
- }
- function show_version() {
- layer.msg('你的客户端版本太低,请升最新版本');
- }
- // 隐藏试卷
- function oprateExam(exam_groupId, flag) {
- if (exam_groupId) {
- 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");?>', {
- exam_groupId: exam_groupId,
- flag: flag
- }, function (data) {
- var obj = JSON.parse(data);
- if (obj.success == 1) {
- location.reload();
- } else {
- layer.msg(obj.message);
- }
- });
- }
- });
- }
- $(".create_sheet").click(function(){
- var exam_group_id = $(this).attr("exam_group_id");
- var sheet_id = $(this).attr("sheet_id");
- var qxk = $(this).attr("qxk");
- if(exam_group_id>0){
- $.post("<?php echo Yii::app()->createUrl('third/set_new')?>",{exam_group_id:exam_group_id});
- if(qxk==1){
- evaluationClient.CreateWholeDisciplineAnswerSheet(sheet_id+","+exam_group_id);
- }else{
- evaluationClient.CreateAnswerSheetShuxuebaoliu(sheet_id+","+exam_group_id);
- }
- }
- });
- //扫描答题卡
- function createTemplateScan (exam_group_id,importType){
- if (!exam_group_id) {
- layer.msg('未找到试卷ID');
- }
- var data={
- exam_group_id:exam_group_id
- }
- $.post("<?php echo Yii::app()->createUrl("third/paper")?>",data,function(rs){
- var m = JSON.parse(rs);
- if(m.status==1)
- {
- if(importType>0){
- evaluationClient.ImportLoadThirdParty(exam_group_id);
- }else{
- evaluationClient.loadThirdParty(exam_group_id);
- }
- }else {
- layer.msg('尚未创建答题卡,请创建');
- }
- });
- }
- //扫描在线答题卡
- function createTemplateScanOnline(exam_group_id,obj,exam_name,import_type){
- if (!exam_group_id) {
- layer.msg('未找到试卷ID');
- }
- if($(obj).hasClass('disabled')){
- return false;
- }
- var data={
- exam_group_id:exam_group_id
- }
- $.post("<?php echo Yii::app()->createUrl("print/getOnlineCard")?>",data,function(rs){
- var m = JSON.parse(rs);
- if(m.status==1)
- {
- $(obj).addClass('disabled');
- if(m.qxk_paper_id!=undefined && m.qxk_paper_id!=0){
- if(import_type>0){
- evaluationClient.ImportLoadThirdParty_OnLineAnswerCard_M(exam_group_id+","+exam_name+","+<?php echo Yii::app()->session['session_subject_id']?>);
- }else{
- evaluationClient.loadThirdParty_OnLineAnswerCard_M(exam_group_id+","+exam_name+","+<?php echo Yii::app()->session['session_subject_id']?>);
- }
- }else{
- if(import_type>0){
- evaluationClient.ImportNewScan(exam_group_id+","+exam_name);
- }else{
- evaluationClient.NewScan(exam_group_id+","+exam_name);
- }
- }
- }else if(m.status==-1) {
- layer.msg('尚未创建在线答题卡,请创建');
- }else if(m.status==-2){
- layer.msg('客观题答案未设置不可进行扫描,<br>' +
- '\n' +
- '请前往试卷详情页设置完整答案', {
- time: 0,
- btn: ['好的']
- ,yes: function(index, layero){
- layer.closeAll();
- }
- });
- }
- });
- }
- //导入成绩扫描
- function createImportScanOnline(exam_group_id,obj,exam_name){
- if (!exam_group_id) {
- layer.msg('未找到试卷ID');
- }
- if($(obj).hasClass('disabled')){
- return false;
- }
- var data={
- exam_group_id:exam_group_id
- }
- evaluationClient.ImportByLoadThirdParty(exam_group_id+","+exam_name);
- }
- $('.exam_export').click(function(){
- eid=$(this).attr('eid');
- data={examGroupId:eid}
- $.post("<?php echo Yii::app()->createUrl('print/exportExamData')?>",data,function(flags){
- var m = JSON.parse(flags);
- if(m.status==1)
- {
- var html = ""+
- '<div style="padding:20px 30px 0px 30px">'+
- '<div style="padding:8px 0;">请复制下方链接打印包。</div>'+
- '<div id="downloadUrl" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:455px;"></div>'+
- '<div class="row" style="margin:30px auto 0px auto;text-align:center"><button id="confirm" class="label-primary-s bth-s" style="padding:4px 12px;margin:5px 0 10px 15px;background:gray;border-color:gray;">关闭</button>'+
- '</div>'+
- '</div>'+
- "";
- //
- layer.open({
- type: 1,
- area: ['550px', '220px'],
- title: '下载',
- content: html,
- success: function(index, layerObj){
- $(".loading-pop").hide();
- jQuery("#downloadUrl").html('下载地址:<span style=""><input id="url" type="text" size="40" readonly value="'+m.data+'" /></span><button id="copy" class="label-primary-s bth-s" style="padding:4px 12px;margin:5px 0 10px 15px;">全选</button>');
- jQuery("#confirm, #cancel").on("click", function(){
- layer.close(layerObj);
- });
- jQuery("#copy").on("click", function(){
- jQuery("#url").select();
- });
- },
- end: function(){
- }
- });
- return;
- }else if(m.status==2) {
- layer.msg('数据正在生成中,请稍侯点击导出下载');
- }else{
- layer.msg(m.result);
- }
- });
- });
- </script>
|