123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717 |
- <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" type="text/css" href="/css/update-exam/base.css">
- <link rel="stylesheet" type="text/css" href="/css/update-exam/open.css">
- <link rel="stylesheet" type="text/css" href="/css/update-exam/selPaperPop.css">
- <div class="main-content-inner">
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/view_navigation.php');?>
- <!-- 导航栏结束-->
- <style>
- body{
- overflow:initial;
- }
- .range-select ul {
- position: relative;
- font-size: 0;
- border: 1px solid #BBBBBB;
- margin-right: 24px;
- }
- .range-select ul li {
- text-align: center;
- display: inline-block;
- font-size: 14px;
- width: 25px;
- height: 24px;
- line-height: 24px;
- border-right: 1px solid #BBBBBB;
- }
- .decade-con:after, .decade-con-inp:after {
- content: '十位';
- position: absolute;
- left: 50%;
- top: 30px;
- width: 60px;
- font-size: 12px;
- transform: translateX(-50%);
- text-align: center;
- }
- </style>
- <div class="page-content">
- <div class="mcp-title">基本信息</div>
- <form class="saveForm" action="<?php echo Yii::app()->createUrl('print/modifyThirdExam')?>" method="post" enctype="multipart/form-data">
- <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>
-
- <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>
- <?php if(!$qxkPaperId):?>
- <div class="mcp-form-list clearfix">
- <div class="mcp-form-menu fl"> </div>
- <div class="mcp-form-detail fl clearfix <?php if($examStatus==2){echo 'disabled';}?>">
- <?php
- if($is_custom_tpl==0){
- echo '(当前考试为固定模板,不可修改试卷和答题卡)';
- }else{
- ?>
- <div class="mcp-radio-sel fl">
- <span >打印方式:</span>
- <span class="show_msg_1">
- <?php
- if($paper_tpl_type==1){
- echo '题卡合一';
- }else{
- echo '题卡分离';
- }
- ?>
- </span>
- </div>
- <div class="mcp-radio-sel paper_type_set fl <?php if($paper_tpl_type==1) echo 'hide'?>">
- <span >试卷纸张:</span>
- <span class="show_msg_2">
- <?php
- if($paper==0){
- echo 'A4';
- }else{
- echo 'A3';
- }
- ?>
- </span>
- </div>
- <div class="mcp-radio-sel fl">
- <span >答题卡纸张:</span>
- <span class="show_msg_3">
- <?php
- echo $dtk;
- ?>
- </span>
- </div>
- <div class="clear"></div>
- <?php if($createType==1):?>
- <div class="mcp-radio-sel fl">
- <span >填空题分值格式:</span>
- <span class="show_msg_4">
- <?php
- switch ($tianType){
- case 1:
- echo '自定义分值';
- break;
- case 2:
- echo '2/3/5分';
- break;
- case 3:
- echo '2/3/4/6分';
- break;
- case 4:
- echo '2/4分';
- break;
- default:
- echo '';
- }
- ?>
- </span>
- </div>
- <div class="mcp-radio-sel fl">
- <span >解答题分值上限:</span>
- <span class="show_msg_5">
- <?php
- switch ($jieType){
- case 1:
- echo '15';
- break;
- case 2:
- echo '16';
- break;
- case 3:
- echo '29';
- break;
- case 4:
- echo '49';
- break;
- default:
- echo '';
- }
- ?>
- </span>
- </div>
- <?php
- endif;
- }
- ?>
- <div class="clear"></div>
- <div class="mcp-form-detail fl clearfix">
- <?php if($is_custom_tpl==1 && $subjectId!=8 && $examStatus<2):?>
- <a href="#" class="openDtk">>>>设置模板</a>
- <?php endif;?>
- </div>
- </div>
- <div id="type-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">
- <input type="text" class='core datetimepicker8' style="width: 100px;" name="examDate" <?php if($examStatus==2){echo 'disabled';}?> 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="tianType" value="<?php echo $tianType?>" type="hidden"/>
- <input name="jieType" value="<?php echo $jieType?>" type="hidden"/>
- <input name="isCustomTpl" value="<?php echo $is_custom_tpl?>" type="hidden"/>
- <input name="tplDataPaper" value="<?php echo $paper?>" type="hidden"/>
- <input name="printTypeCard" value="<?php echo $paper_tpl_type?>" type="hidden"/>
- <input name="dtkType" value="<?php echo $dtkType?>" type="hidden"/>
- <p></p>
- <p></p>
- <p></p>
- <div style="min-height: 100px;"></div>
- </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>
- </div>
- <!--修改试卷模板-->
- <div class="sel-paper-pop editDtk" style="display: none">
- <div class="paper-pop-con">
- <div class="paper-pop-top clearfix">
- 试卷模板管理<div class="fr pop-close">×</div>
- </div>
- <div class="paper-pop-main clearfix">
-
- <div class="fl exam-set-detail">
- <div class="sel-print-set clearfix">
- <div class="set-top-title fl">打印设置</div>
- <div class="fl">
- <div class="opt-top">
- <span class="set-top-opt-name gray-font">打印方式:</span>
- <div class="set-top-tab">
- <span class="tab-list <?php if($paper_tpl_type==1){echo 'selected';}?>">题卡合一</span>
- <span class="tab-list <?php if($paper_tpl_type!=1){echo 'selected';}?>">题卡分离</span>
- </div>
- </div>
-
- <div class="set-block-opt clearfix">
- <div class="print-type-card fl">
- <span class="gray-font">答题卡:</span>
- <div class="prev-class">
- <select name="dtk_type" class="dtk_type">
- <option value="0">请选择类型</option>
- <option value="1" <?php if(isset($dtk) && $dtk=='A3'){echo 'selected';}?>>A3</option>
- <?php if($subjectId!=8):?>
- <option value="2" <?php if(isset($dtk) && $dtk=='A4'){echo 'selected';}?>>A4</option>
- <option value="3" <?php if(isset($dtk) && $dtk=='8k'){echo 'selected';}?>>8k</option>
- <option value="4" <?php if(isset($dtk) && $dtk=='16k'){echo 'selected';}?>>16k</option>
- <?php endif;?>
- </select>
- </div>
- </div>
- <div class="print-type-card fl <?php if($paper_tpl_type==1) echo 'hide';?>">
- <span class="gray-font">试卷:</span>
- <div class="prev-class">
- <select name="paper_type" class="paper_type">
- <option value="0">请选择类型</option>
- <option value="2" <?php if($paper==0) echo 'selected';?>>A4</option>
- <?php if($subjectId!=8):?>
- <option value="1" <?php if($paper!=0) echo 'selected';?>>A3</option>
- <?php endif;?>
- </select>
- </div>
- </div>
- </div>
- <p class="red-font">*选择题上限30道,填空题上限30道,解答题上限5道</p>
-
-
- </div>
- </div>
- <div class="sel-print-set clearfix">
- <div class="set-top-title fl">填空题设置</div>
- <?php if($createType==1):?>
- <div class="fl">
- <div class="opt-top">
- <span class="set-top-opt-name gray-font">分值格式:</span>
- <div class="set-top-tab kong-tab-opt">
- <span class="tab-list <?php if($tianType==1) echo 'selected';?> ">自定义分值</span>
- <span class="tab-list <?php if($tianType==2) echo 'selected';?>">2/3/5分</span>
- <span class="tab-list <?php if($tianType==3) echo 'selected';?>">2/3/4/6分</span>
- <span class="tab-list <?php if($tianType==4) echo 'selected';?>">2/4分</span>
- </div>
- </div>
- <div class="set-block-opt">
- <span class="gray-font">打分框示意图如下:</span>
- </div>
- <div class="kong-set">
- <span class="line-show"></span>
- <div class="card-set-score kong-set-score <?php if($tianType!=1) echo 'hide';?>">
- <span class="score-msg fir-score-msg"></span>
- <a class="red-font">*打√打×即可</a>
- </div>
- <div class="card-set-score kong-set-score <?php if($tianType!=2) echo 'hide';?>">
- <span class="score-msg">2</span>
- <span class="score-msg">3</span>
- <span class="score-msg">5</span>
- </div>
- <div class="card-set-score kong-set-score <?php if($tianType!=3) echo 'hide';?>">
- <span class="score-msg">2</span>
- <span class="score-msg">3</span>
- <span class="score-msg">4</span>
- <span class="score-msg">6</span>
- </div>
- <div class="card-set-score kong-set-score <?php if($tianType!=4) echo 'hide';?>">
- <span class="score-msg">2</span>
- <span class="score-msg">4</span>
- </div>
- </div>
- </div>
- <?php else:?>
- <div class="fl">
- <p class="red-font">*当前考试为旧版组卷,不支持分值格式设置</p>
- </div>
- <?php endif;?>
- </div>
- <div class="sel-print-set clearfix">
- <div class="set-top-title fl">解答题设置</div>
- <?php if($createType==1):?>
- <div class="fl">
- <div class="opt-top">
- <span class="set-top-opt-name gray-font">分值上限:</span>
- <div class="set-top-tab jieda-score">
- <?php
- if($this->schoolInfo->province_id==12){
- ?>
- <span value="1" class="tab-list <?php if($jieType==1) echo 'selected';?>">15</span>
- <?php
- }else{
- ?>
- <span value="2" class="tab-list <?php if($jieType==2) echo 'selected';?>">16</span>
- <?php
- }
- ?>
- <span value="3" class="tab-list <?php if($jieType==3) echo 'selected';?>">29</span>
- <span value="4" class="tab-list <?php if($jieType==4) echo 'selected';?>">49</span>
- </div>
- </div>
- <div class="set-block-opt">
- <span class="gray-font">打分框示意图如下:</span>
- </div>
- <div class="card-set-score jie-set-score range-select <?php if($jieType!=1 && $jieType!=2 ) echo 'hide';?>">
- <ul class="fl decade-con">
- <li>1</li>
- </ul>
- <ul class="fl single-con">
- <li>0</li>
- <li>1</li>
- <li>2</li>
- <li>3</li>
- <li>4</li>
- <li>5</li>
- <li>6</li>
- </ul>
- </div>
- <div class="card-set-score range-select jie-set-score <?php if($jieType!=3) echo 'hide';?>" >
- <ul class="fl decade-con">
- <li>1</li>
- <li>2</li>
- </ul>
- <ul class="fl single-con">
- <li>0</li>
- <li>1</li>
- <li>2</li>
- <li>3</li>
- <li>4</li>
- <li>5</li>
- <li>6</li>
- <li>7</li>
- <li>8</li>
- <li>9</li>
- </ul>
- </div>
- <div class="card-set-score range-select jie-set-score <?php if($jieType!=4) echo 'hide';?>" >
- <ul class="fl decade-con">
- <li>1</li>
- <li>2</li>
- <li>3</li>
- <li>4</li>
- </ul>
- <ul class="fl single-con">
- <li>0</li>
- <li>1</li>
- <li>2</li>
- <li>3</li>
- <li>4</li>
- <li>5</li>
- <li>6</li>
- <li>7</li>
- <li>8</li>
- <li>9</li>
- </ul>
- </div>
- </div>
- <?php else:?>
- <div class="fl">
- <p class="red-font">*当前考试为旧版组卷,不支持分值上限设置</p>
- </div>
- <?php endif;?>
- </div>
- </div>
- </div>
- <div class="paper-pop-bottom">
- <div class="paper-set-save-btn">保存</div>
- </div>
- </div>
- </div>
- <script>
- var printTypeCard='<?php echo $paper_tpl_type?>',
- dtk_type='<?php echo $dtkType?>',
- tplDataPaper='<?php echo $paper?>',
- tianType='<?php echo $tianType?>',
- jieType='<?php echo $jieType?>',
- subjectId=parseInt('<?php echo $subjectId?>');
- $('.openDtk').click(function(){
- $('.editDtk').show();
- });
- $('.pop-close').click(function(){
- $('.editDtk').hide();
- });
- $('.dtk_type').change(function(){
- if($(this).val()>0){
- dtk_type=$(this).val();
- }
- });
- $('.paper_type').change(function(){
- if($(this).val()>0){
- tplDataPaper=$(this).val();
- }
- });
- $('.exam-type-list,.tab-list').click(function(){
- if (!$(this).hasClass('selected')) {
- if ($(this).text()=='题卡分离') {
- $('.print-type-card').eq(1).removeClass('hide');
- printTypeCard=2;
- } else if ($(this).text()=='题卡合一') {
- if(subjectId==8){
- return false;
- }
- $('.print-type-card').eq(1).addClass('hide');
- printTypeCard=1;
- }
- if ($(this).parent().hasClass('kong-tab-opt')) {
- var idx = $(this).index();
- tianType=idx+1;
- $('.kong-set-score').addClass('hide');
- $('.kong-set-score').eq(idx).removeClass('hide');
- }
- if ($(this).parent().hasClass('jieda-score')) {
- var idx = $(this).index();
- console.log(idx);
- jieType=$(this).attr('value');
- $('.jie-set-score').addClass('hide');
- $('.jie-set-score').eq(idx).removeClass('hide');
- }
- $(this).addClass('selected').siblings().removeClass('selected');
- }
- })
- $('.paper-set-save-btn').click(function(){
- $('input[name=printTypeCard]').val(printTypeCard);
- $('input[name=tplDataPaper]').val(tplDataPaper);
- $('input[name=dtkType]').val(dtk_type);
- $('input[name=tianType]').val(tianType);
- $('input[name=jieType]').val(jieType);
- $('.editDtk').hide();
- if(printTypeCard==1){
- $('.show_msg_1').html('题卡合一');
- $('.paper_type_set').addClass('hide');
- }else{
- $('.show_msg_1').html('题卡分离');
- $('.paper_type_set').removeClass('hide');
- }
- if(tplDataPaper==1){
- $('.show_msg_2').html('A3');
- }else if(tplDataPaper==2){
- $('.show_msg_2').html('A4');
- }
- if(dtk_type==1){
- $('.show_msg_3').html('A3');
- }else if(dtk_type==2){
- $('.show_msg_3').html('A4');
- }else if(dtk_type==3){
- $('.show_msg_3').html('8k');
- }else if(dtk_type==4){
- $('.show_msg_3').html('16k');
- }
- if(tianType==1){
- $('.show_msg_4').html('自定义分值');
- }else if(tianType==2){
- $('.show_msg_4').html('2/3/5分');
- }else if(tianType==3){
- $('.show_msg_4').html('2/3/4/6分');
- }else if(tianType==4){
- $('.show_msg_4').html('2/4分');
- }
- if(jieType==1) {
- $('.show_msg_5').html('15');
- }else if(jieType==2){
- $('.show_msg_5').html('16');
- }else if(jieType==3){
- $('.show_msg_5').html('29');
- }else if(jieType==4){
- $('.show_msg_5').html('49');
- }
- });
- </script>
- <!--修改试卷模板end-->
- <script>
- $(document).ready(function(){
- $('.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('print/index')?>";
- window.history.back();
- });
-
- $('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();
- }
- });
-
-
- $("body").delegate("#createThird[active='true']", "click", function(e) {
-
- 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('');
- }
-
- console.log(error);
- if(error.length == 0){
- $(this).attr("active","false");
- $(".saveForm").submit();
- }
-
-
-
- });
-
-
-
-
- });
- </script>
|