123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606 |
- <script src="/js/jquery.datetimepicker.js"></script>
- <link rel="stylesheet" href="/fonts/fpdf/iconfont.css" />
- <link rel="stylesheet" href="/css/modelCreatePaper.css" />
- <link rel="stylesheet" href="/css/jquery.datetimepicker.css" />
- <link rel="stylesheet" href="/css/third/paperCard.css" />
- <style>
- #choose-error{color: #FF0000;}
- #examName-error{color: #FF0000;}
- #classIds-error{color: #FF0000;}
- #type-error{color: #FF0000;}
- #markType-error{color: #FF0000;}
- #subject-error{color: #FF0000;}
- #examDate{color: #FF0000;}
- .dialog-information-inquiry{
- display: none;
- width: 400px;
- margin: 0 auto;
- border: 1px solid #f1f1f1;
- /*box-shadow:4px 4px 10px #7c7c7c;*/
- }
- .dialog-information-inquiry .title{
- padding: 0 16px;
- height: 30px;
- line-height: 30px;
- background-color: #1BBF7B;
- }
- .dialog-information-inquiry .title .title-text{
- font-size: 16px;
- color: #fff;
- font-weight: 650px;
- }
- .dialog-information-inquiry .title .title-tag{
- display: inline-block;
- margin-right: 20px;
- margin-top: 10px;
- padding: 6px 12px;
- height: 16px;
- line-height: 16px;
- color: #fff;
- border: 1px solid #F8F8FA;
- border-radius: 4px;
- background-color: #1BBF7B;
- cursor: pointer;
- }
- .dialog-information-inquiry .dialog-btn-close{
- display: inline-block;
- color: #fff;
- cursor: pointer;
- }
- .dialog-information-inquiry .dialog-msg{
- margin: 20px 0;
- text-align: center;
- line-height: 20px;
- font-size: 16px;
- }
- .dialog-information-inquiry .btn-box{
- margin-bottom: 28px;
- text-align: center;
- }
- .dialog-information-inquiry .btn-yes{
- display: inline-block;
- /* padding: 6px 12px; */
- height: 30px;
- line-height: 30px;
- border-radius: 4px;
- color: #fff;
- cursor: pointer;
- background-color: #1BBF7B;
- }
- </style>
- <div class="main-content-inner">
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/view_navigation.php');?>
- <!-- 导航栏结束-->
- <div class="test-data">
- <div class="page-content">
- <div class="mcp-title">
- <span class="active">第1步、考试基本信息</span>
- <span><i class="horizontal-line"></i></span>
- <span>第2步、关联在线答题卡</span>
- </div>
- <form class="saveForm">
- <div class="mcp-main-con">
- <div class="mcp-form-list clearfix">
- <div class="mcp-form-menu fl">试卷名称</div>
- <div class="mcp-form-detail fl"><input type="text" placeholder="必填" class="test-paper-name" name="examName" value='<?php echo $name?>'></div>
- <div id="examName-error"></div>
- </div>
- <?php if(Yii::app()->params['section']!=0):?>
- <div class="mcp-form-list clearfix">
- <div class="mcp-form-menu fl">试卷类型</div>
- <div class="mcp-form-menu fl">
- <div class="mcp-form-detail fl clearfix">
- <select name="paperType" class="fl choose-subject" disabled >
- <?php
- if(in_array(Yii::app()->session['session_duoxueke_subject_id'],array(3,6,51))):
- ?>
- <option value="1050" <?php if($paperType==1050)echo 'selected';?> >全国版</option>
- <option value="1051" <?php if($paperType==1051)echo 'selected';?> >江苏版</option>
- <?php elseif(!in_array(Yii::app()->session['session_duoxueke_subject_id'],array(18,19))):?>
- <option value="0" <?php if($paperType==0)echo 'selected';?> >全国版</option>
- <option value="1" <?php if($paperType==1)echo 'selected';?> >江苏版</option>
- <option value="2" <?php if($paperType==2)echo 'selected';?> >浙江版</option>
- <option value="1050" <?php if($paperType==1050)echo 'selected';?> >其它</option>
- <?php else:?>
- <option value="1050" <?php if($paperType==1050)echo 'selected';?> >其它</option>
- <?php endif;?>
- </select>
- </div>
- </div>
- <div id="subject-error"></div>
- </div>
- <?php endif;?>
- <div class="mcp-form-list clearfix">
- <div class="mcp-form-menu fl">考试类型</div>
- <div class="mcp-form-detail fl clearfix">
- <div class="mcp-radio-sel fl <?php if($examStatus==2){echo 'disabled';}?>">
- <span class="sel-btn <?php if($type==1) echo 'select';?> examType" value="1"></span>
- <span>周考</span>
- </div>
- <div class="mcp-radio-sel fl <?php if($examStatus==2){echo 'disabled';}?>">
- <span class="sel-btn <?php if($type==2) echo 'select';?> examType" value="2"></span>
- <span>单元考</span>
- </div>
- <div class="mcp-radio-sel fl <?php if($examStatus==2){echo 'disabled';}?>">
- <span class="sel-btn <?php if($type==3) echo 'select';?> examType" value="3"></span>
- <span>月考</span>
- </div>
- <div class="mcp-radio-sel fl <?php if($examStatus==2){echo 'disabled';}?>">
- <span class="sel-btn <?php if($type==4) echo 'select';?> examType" value="4"></span>
- <span>联考</span>
- </div>
- <div class="mcp-radio-sel fl <?php if($examStatus==2){echo 'disabled';}?>">
- <span class="sel-btn <?php if($type==5) echo 'select';?> examType" value="5"></span>
- <span>期中考试</span>
- </div>
- <div class="mcp-radio-sel fl <?php if($examStatus==2){echo 'disabled';}?>">
- <span class="sel-btn <?php if($type==6) echo 'select';?> examType" value="6"></span>
- <span>期末考试</span>
- </div>
- <div class="mcp-radio-sel fl <?php if($examStatus==2){echo 'disabled';}?>">
- <span class="sel-btn <?php if($type==7) echo 'select';?> examType" value="7"></span>
- <span>模拟考</span>
- </div>
- <div class="mcp-radio-sel fl <?php if($examStatus==2){echo 'disabled';}?>">
- <span class="sel-btn <?php if($type==8) echo 'select';?> examType" value="8"></span>
- <span>冲刺考</span>
- </div>
- <div class="clear"></div>
- <div class="mcp-radio-sel fl <?php if($examStatus==2){echo 'disabled';}?>">
- <span class="sel-btn <?php if($type==9) echo 'select';?> examType" value="9"></span>
- <span>测验(适用于非正式考试)</span>
- </div>
- </div>
- <div id="type-error"></div>
- </div>
- <!--
- <div class="mcp-form-list clearfix">
- <div class="mcp-form-menu fl">线上阅卷</div>
- <div class="mcp-form-detail fl clearfix" id ="markType">
- <div class="mcp-radio-sel fl">
- <span class="sel-btn <?php if($markType==3) echo 'select';?> markType" value="3"></span>
- <span class ="markType" value="3">班级混合阅卷</span>
- </div>
- <div class="mcp-radio-sel fl">
- <span class="sel-btn <?php if($markType==4) echo 'select';?> markType" value="4"></span>
- <span class="markType" value="4">班级单独阅卷</span>
- </div>
- <div id="markType-error"></div>
- </div>
- </div>
- -->
- <div class="mcp-form-list clearfix">
- <div class="mcp-form-menu fl">考试时间</div>
- <div class="mcp-form-detail fl clearfix">
- <input type="text" class='core datetimepicker8' <?php if($examStatus==2){echo 'disabled="disabled"';}?> style="width: 100px;" name="examDate" value='<?php echo $examDate?>' />
- </div>
- <div id="examDate"></div>
- </div>
- </div>
- <input name="examGroupId" value="<?php echo $examGroupId?>" type="hidden"/>
- <input name="type" value="<?php echo $type?>" type="hidden"/>
- <input name="markType" value="<?php echo $markType?>" type="hidden"/>
- <input name="grade" value="<?php echo $grade?>" type="hidden"/>
- </form>
- <!--<button id="createThird">确定</button>-->
- <!-- <div class="mcp-form-list mcp-fl-btns clearfix" style="float: left;padding-left: 150px;">
- <input type="button" value="确定" class="mcp-sure-btn" id="createThird" active="true">
- <input type="button" value="返回" class="mcp-back-btn">
- </div> -->
- <div class="template-flag-box">
- <a href="javascript:;" id="createThird" active="true">保存并返回</a>
- <a href="javascript:;" id="goNextNew" active="true" >保存并下一步</a>
- <!-- <a href="javascript:;" id="goNext" active="true">保存并下一步</a> -->
- <!-- <a href="javascript:;" id="goNextNew" active="true" style="width:140px">保存并下一步(新版)</a> -->
- <a href="javascript:;" id="goBack" class="gray" active="true">放弃并返回</a>
- <!--<a href="javascript:;" class="template-flag">创建答题卡</a>-->
- </div>
- </div>
- </div>
- <div class="relation-answer-card">
- <div class="page-content">
- <div class="mcp-title">
- <span >第1步、考试基本信息</span>
- <span><i class="horizontal-line"></i></span>
- <span class="active">第2步、关联在线答题卡</span>
- </div>
- <!-- 新版本右侧答题卡 -->
- <div class="hgc_leftContent">
- <div class="module">
- <h2>
- <span>当前答题卡</span>
- <span class="theme notice">新版本,无需切割模板,可通过扫描入口直接扫描</span>
- </h2>
- <div class="contentInfo">
- <div class="opratorBnts">
- <span class="theme" id="saveMyTpl">保存为我的模版</span>
- <span class="theme" id="downLoadPdfBtn">下载答题卡</span>
- <span class="theme" id="editMyTpl">修改答题卡>></span>
- </div>
- <div class="subjectInfo">
- <div class="infoItem">
- <em>基本信息:</em>
- <div class="info">
- <p>
- <span>板式:A3-横版-三栏</span>
- <span>考号:填涂(10位)</span>
- <span>装订线:有</span>
- <span>总分:150分</span>
- <span>题量:50</span>
- </p>
- </div>
- </div>
- <div class="infoItem">
- <em>题目信息:</em>
- <div class="info">
- <p>
- <span>一、单项填空</span>
- <span>单选</span>
- <span>20题</span>
- <span>共20分</span>
- </p>
- </div>
- </div>
- </div>
- </div>
- <div class="contentNoInfo">
- <!-- <img src="" alt=""> -->
- <span>未创建答题卡</span>
- <div class="hbtn">创建在线答题卡</div>
- </div>
- </div>
- <div class="module">
- <h2>
- <span>我的模版(<em id="tplLength">0</em>)</span>
- </h2>
- <div class="tplBox">
- <div class="leftBtn btnItem"></div>
- <div class="tplCut">
- <div class="tplList">
- </div>
- <p id="tplListMsg" style="text-align: center;">暂未保存模板</p>
- </div>
- <div class="rightBtn btnItem"></div>
- </div>
- </div>
- </div>
- <div class="template-flag-box">
- <a href="javascript:;" id="createThirdCard" active="true">保存并返回</a>
- <a href="javascript:;" id="goBack" class="gray" active="true">放弃并返回</a>
- </div>
- </div>
- </div>
- <div class="dialog-information-inquiry">
- <div class="title clearfix">
- <span class="title-text fl">提示</span>
- <span class="dialog-btn-close fr">X</span>
- </div>
- <div class="content-box clearfix">
- <p class="dialog-msg">在线答题卡版本已更新,不支持查看历史数据,如有问题,请联系技术支持</p>
- <div class="btn-box">
- <span class="btn-yes dialog-btn-close">知道了</span>
- </div>
- </div>
- </div>
- </div>
- <script>
- var hasThirdCard=0,hasOnlineCard=0;
- var subjectId=<?php echo Yii::app()->session['session_duoxueke_subject_id'] ?>;
- var grade = <?php echo $grade?>;
- <?php
- if(isset($answerSheet) && $answerSheet==1){
- echo 'hasThirdCard=1;';
- }
- if(isset($onlineCard) && $onlineCard==1){
- echo 'hasOnlineCard=1;';
- }
- ?>
- var examStatus = <?php echo json_encode($examStatus); ?>;
- localStorage.setItem('examStatus',examStatus)
- // var exam_group_id = 0;
- var locationUrl = window.location.href;
- var isCardReturn = locationUrl.indexOf('isCardReturn')
- // if(isCardReturn==-1){
- // var reg2 = /([^exam_group_id/]+)$/;
- // exam_group_id = locationUrl.match(reg2)[1];
- // }
- function isReturn(){
- // var isCardReturn = localStorage.getItem('isCardReturn');
- // var isCardReturn = ~document.referrer.indexOf('online/third');
- // if(document.referrer.length<1){
- // isCardReturn = true;
- // }
- if(isCardReturn>-1){
- $('.test-data').hide();
- $('.relation-answer-card').show();
- saveFormData = JSON.parse(localStorage.getItem('testFormData'));
- }else{
- localStorage.setItem('referrerUrl',JSON.stringify(locationUrl));
- }
- }
- isReturn();
- $(document).ready(function(){
- var saveFormData ="";
- $('.datetimepicker8').datetimepicker({
- onGenerate:function( ct ){
- $(this).find('.xdsoft_date').toggleClass('xdsoft_disabled');
- $(this).find('.xdsoft_today').removeClass('xdsoft_disabled');
- },
- format:'Y-m-d',
- formatDate:'Y-m-d',
- minDate:'-1970/01/2',
- maxDate:'+1970/01/2',
- //minDate: '-<?php echo date('Y-m-d', strtotime('Yesterday')); ?>',
- timepicker:false
- });
- //选择考试时间
- //返回
- $('.mcp-back-btn').click(function(){
- location.href="<?php echo Yii::app()->createUrl('third/index')?>";
- });
- $('input[name="examName"]').keydown(function(event){
- $('#examName-error').html("");
- });
- //阅卷方式
- $('.markType').click(function(){
- var markType = $(this).attr('value');
- if(markType){
- $('#markType-error').html("");
- }
- $('input[name="markType"]').val(markType);
- });
- //考试类型
- $('.examType').click(function(){
- var type = $(this).attr('value');
- if(type){
- $('#type-error').html("");
- }
- $('input[name="type"]').val(type);
- });
- if ($('.sel-classes > span').length > 0){
- for (var i = 0;i < $('.sel-classes > span').length; i++){
- for (var k = 0;k < $('.bjs-lis').length; k++){
- if ($('.bjs-lis').eq(k).text().trim()==$('.sel-classes > span').eq(i).text().trim()) {
- $('.bjs-lis').eq(k).find('.judge-sel').addClass('active');
- }
- }
- }
- }
- $('.mcp-radio-sel').click(function(){
- if (!$(this).find('.sel-btn').hasClass('select') && !$(this).hasClass('disabled')) {
- $(this).find('.sel-btn').addClass('select');
- $(this).siblings().find('.sel-btn').removeClass('select');
- }
- });
- $('.grade-sel ul li').click(function(){
- $(this).addClass('active').siblings().removeClass('active');
- });
- // $('.judge-sel').on('click',function(){
- // alert(1);
- // if (!$(this).hasClass('active')) {
- // $(this).addClass('active');
- // $('.sel-classes').append('<span>'+$(this).closest('.bjs-lis').text()+'</span>');
- // } else {
- // $(this).removeClass('active');
- // for (var i = 0;i < $('.sel-classes > span').length; i++) {
- // console.log($('.sel-classes > span').eq(i).text());
- // if ($('.sel-classes > span').eq(i).text().trim() == $(this).closest('.bjs-lis').text().trim()){
- // $('.sel-classes > span').eq(i).remove();
- // }
- // }
- // }
- // });
- $('.sel-classes > span').click(function(){
- $(this).remove();
- for (var i = 0;i < $('.bjs-lis').length; i++) {
- if ($('.bjs-lis').eq(i).text().trim()==$(this).text().trim()){
- $('.bjs-lis').eq(i).find('.judge-sel').removeClass('active');
- }
- }
- });
- // 下拉列表模拟
- $('.inp-text').click(function(){
- if ($(this).next().is(':hidden')){
- $(this).next().show();
- } else {
- $(this).next().hide();
- }
- });
- // 点下拉列表选项
- $('.select-con li').click(function(){
- $(this).closest('.select-con').hide();
- $(this).closest('.mcp-form-detail').find('.inp-text').text($(this).text());
- });
- // 点击空白处下拉列表消失
- $(document).click(function(e){
- var targetNode = $(e.target).closest(".inp-text");
- if (targetNode.length>0){
- return;
- }else{
- $(".select-con").hide();
- }
- });
- function saveEditThirdForm(e,btnType){
- var error = new Array();
- var examName = $('input[name="examName"]').val();
- var type = $('input[name="type"]').val();
- // var markType = $("#markType").find(".select").attr("value");
- var examDate = $("input[name='examDate']").val();
- if(examName == "" || examName == null){
- $('#examName-error').html('请指定考试名称');
- error.push('没有指定考试名称');
- }else{
- $('#examName-error').html('');
- }
- if(type == "" || type == null){
- $('#type-error').html('请指定考试类型');
- error.push('没有指定考试类型');
- }else{
- $('#type-error').html('');
- }
- if (examDate == '') {
- $('#examDate').html('请设置考试日期');
- error.push('请设置考试日期');
- } else{
- $('#examDate').html('');
- }
- if(error.length == 0){
- $(e.target).attr("active","false");
- saveFormData = {
- examName:examName,
- paperType:$('select[name="paperType"]').val(),
- examDate:examDate,
- examGroupId:$('input[name="examGroupId"]').val(),
- type:type,
- // markType:markType,
- }
- var formData = new FormData();
- for(var k in saveFormData){
- formData.append(k,saveFormData[k])
- }
- $.ajax({
- url:"<?php echo Yii::app()->createUrl('third/ajaxModifyThirdExam')?>",
- method: 'POST',
- processData: false,
- contentType: false,
- dataType: 'json',
- data: formData,
- success: function (data) {
- if(data.success ==1){
- saveFormData.hasThirdCard = hasThirdCard;
- saveFormData.hasOnlineCard = hasOnlineCard;
- saveFormData.grade = grade;
- saveFormData.subjectId = subjectId;
- saveFormData.referrerUrl = locationUrl;
- localStorage.setItem('testFormData',JSON.stringify(saveFormData));
- if(btnType===1){
- goBack();
- }else if(btnType===2){
- $('.test-data').hide();
- $('.relation-answer-card').show();
- }else if(btnType===3){
- // location.href = '/index.php/third/thirdCardSecond?isThird=1'
- location.href = '/index.php/online/answersheetList/examGroupId/'+saveFormData.examGroupId+'?isThird=1&examGroupId='+saveFormData.examGroupId
- }
- }else{
- if(data.info){
- layer.msg(data.info);
- }else if(data.msg){
- layer.msg(data.msg);
- }
- $(e.target).attr("active","true");
- }
- }
- })
- // $(".saveForm").submit();
- }
- }
- function goBack(){
- //location.href = '/index.php/third/index'
- window.history.back();
- }
- $("body").delegate("#createThird[active='true']", "click", function(e) {
- // console.log($(".saveForm").serialize())
- $('#createThird').attr('active',false);
- $('#goNext').attr('active',false);
- $('#goNextNew').attr('active',false);
- saveEditThirdForm(e,1);
- });
- //保存并关联答题卡
- $("body").delegate("#goNext[active='true']", "click", function(e) {
- $('#createThird').attr('active',false);
- $('#goNext').attr('active',false);
- $('#goNextNew').attr('active',false);
- saveEditThirdForm(e,2);
- });
- //保存并关联答题卡新版
- $("body").delegate("#goNextNew[active='true']", "click", function(e) {
- var savePrintInfoData = localStorage.getItem('savePrintInfo')!=undefined? JSON.parse(localStorage.getItem('savePrintInfo')):{}
- $('#createThird').attr('active',false);
- $('#goNext').attr('active',false);
- $('#goNextNew').attr('active',false);
- if(savePrintInfoData.position&&savePrintInfoData.online_card_version != '3.0.0'){
- layer.open({
- title: false,
- closeBtn: 0,
- type: 1,
- area: ['400px', '170px'],
- offset: '100px',
- content: $(".dialog-information-inquiry")
- });
- }else{
- saveEditThirdForm(e,3);
- }
- });
- //关闭弹窗
- $(".dialog-btn-close").on("click", function() {
- layer.close(layer.index);
- });
- //取消并返回
- $("body").delegate("#goBack[active='true']", "click", function(e) {
- goBack();
- });
- });
- </script>
- <script src="/js/third/submit.js"></script>
|