123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531 |
- <style>
- /*切换选择*/
- .tab-con{
- position: relative;
- height: 30px;
- width: 200px;
- background: #F2F2F2;
- border: 1px solid #01B677;
- border-radius: 15px;
- }
- .has-sel{
- background: #01B677;
- color: #fff;
- width: 50%;
- height: 30px;
- border-top-left-radius: 15px;
- border-bottom-left-radius: 15px;
- text-align: center;
- line-height: 30px;
- }
- .sel-opt{
- width: 50%;
- position: relative;
- color: #01B677;
- line-height: 30px;
- text-indent: 6px;
- cursor: pointer;
- }
- .sel-opt:after{
- content: '';
- border-left: 6px solid transparent;
- border-right: 6px solid transparent;
- border-top: 8px solid #01B677;
- position: absolute;
- right: 12px;
- top: 12px;
- }
- // .sel-opt select{
- // width: 100%;
- // height: 30px;
- // background: #F2F2F2;
- // color: #01B677;
- // text-indent: 6px;
- // font-size: inherit;
- // border-top-right-radius: 15px;
- // border-bottom-right-radius: 15px;
- // cursor: pointer;
- // }
- // .sel-opt select option{
- // position: relative;
- // }
- .points{
- position: absolute;
- top: -2px;
- right: 0;
- width: 10px;
- height: 10px;
- background: #F01516;
- border-radius: 50%;
- }
- .sel-cons{
- border: 1px solid #01B677;
- width: 50%;
- position: absolute;
- right: 0;
- top: 30px;
- text-indent: 10px;
- display: none;
- }
- .sc-lis{
- line-height: 30px;
- cursor: pointer;
- }
- .sc-lis span{
- position: relative;
- }
- .sc-lis .points{
- top: 2px;
- right: -16px;
- }
- </style>
- <div class="main-content-inner">
- <ul class="clearfix main-content-inner-ul">
- <?php if((isset(Yii::app()->session['session_subject_id']) && Yii::app()->session['session_subject_id']==3) || (isset(Yii::app()->session['session_subject_id']) && Yii::app()->session['session_subject_id']==6)){?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/index",array('type'=>'wp'));?>"' class="button button_normal button_group button_arrow " data-button="red">打印试卷</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <!--<button onclick='ccc()' class="button button_normal button_group button_arrow " data-button="red">下载错题本</button>-->
- <button onclick='location.href="<?php echo $this->createUrl("print/sub_index",array('type'=>'wtb'));?>"' class="button button_normal button_group button_arrow " data-button="red">下载错题本</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <!--<button onclick='ccc()' class="button button_normal button_group button_arrow " data-button="red">下载个性化学习方案</button>-->
- <button onclick='location.href="<?php echo $this->createUrl("print/sub_index",array('type'=>'isp'));?>"' class="button button_normal button_group button_arrow" data-button="red">下载个性化学习方案</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/sub_index",array('type'=>'studytrend'));?>"' class="button button_normal button_group button_arrow " data-button="red">下载个性化学习宝</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/student_product");?>"' class="button button_normal button_group button_arrow " data-button="red">阶段复习个性化学习宝</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("third/index");?>"' class="button button_normal button_group button_arrow button_active" data-button="red">第三方试卷</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("export/index");?>"' class="button button_normal button_group button_arrow " data-button="red">导出报告</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("upload/index");?>"' class="button button_normal button_group button_arrow" data-button="red">上传试卷</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("record/importscore"); ?>"'
- class="button button_normal button_group button_arrow " data-button="red">导入成绩
- </button>
- <img src="/images/line.jpg" style="height:45px;"/>
- </li>
- <?php }else{ ?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/index",array('type'=>'wp'));?>"' class="button button_normal button_group button_arrow " data-button="red">打印试卷</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("export/index");?>"' class="button button_normal button_group button_arrow " data-button="red">导出报告</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/do_ruanyun_pdf");?>"' class="button button_normal button_group button_arrow" data-button="red">下载PDF</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <?php }?>
- <!-- <div class="tab-con clearfix pull-right" style="margin:8px 11px 0 0">
- <div class="has-sel fl"><?php /*echo isset(Yii::app()->params["subjectId"][Yii::app()->session['session_subject_id']])?Yii::app()->params["subjectId"][Yii::app()->session['session_subject_id']]:'数学'*/?></div>
- <div class="sel-opt fl">
- 切换学科
- <?php /*if($subject){*/?>
- <div class="points"></div>
- <?php /*}*/?>
- </div>
- <div class="sel-cons" style="z-index:6;background-color: #fff;">
- <div class="sc-lis" val="3"><span>数学<?php /*if($subject && isset($subject[3]) && !empty($subject[3])){*/?><div class="points"></div><?php /*}*/?></span></div>
- <div class="sc-lis" val="12"><span>物理<?php /*if($subject && isset($subject[12]) && !empty($subject[12])){*/?><div class="points"></div><?php /*}*/?></span></div>
- <div class="sc-lis" val="13"><span>化学<?php /*if($subject && isset($subject[13]) && !empty($subject[13])){*/?><div class="points"></div><?php /*}*/?></span></div>
- <div class="sc-lis" val="14"><span>生物<?php /*if($subject && isset($subject[14]) && !empty($subject[14])){*/?><div class="points"></div><?php /*}*/?></span></div>
- </div>
- </div>-->
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("cylet/index");?>"' class="button button_normal button_group button_arrow" data-button="red">全学科统考</button>
- </li>
- </ul>
- <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">
- <div class="col-xs-4">
- <form method="get" id="form1" action="<?php echo $this->createUrl("third/sheet");?>">
- <div class="dataTables_length" style="margin: 6px 0px;">
- <div class="dataTables_length">
- <label><input type="text" class="form-control input-sm" placeholder="请输入学生姓名" name="sname" value="<?php echo $sname;?>"></label>
- <!--<button class="btn btn-minier btn-primary" id="search">搜索</button>-->
- <button style="padding:4px 12px;"class="label-primary-s bth-s">搜索</button>
- </div>
- </div>
- <?php if(isset($exam['exam_id'])){
- ?>
- <input type="hidden" name="exam_id" class="emid" value="<?php echo $exam['exam_id'];?>" />
- <input type="hidden" name="class_id" class="class_id" value="<?php echo $class_id;?>" />
- <?php }?>
- </form>
- </div>
- <div class="col-xs-8">
- <div class="dataTables_filter" id="dynamic-table_filter" style="padding-top:15px;text-align: right;">
- <?php if(isset($exam['exam_id'])){
- ?>
- <a href="javascript:void(0);" class="btn label-primary-green btn-sm" id="selectSheet">
- <i style="font-style: normal;" ></i>选择模板
- </a>
- <?php }?>
- <a href="javascript:void(0);" class="btn label-primary-green btn-sm" id="addSheet">
- <i style="font-style: normal;" ></i>新建答题卡
- </a>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-xs-12" style="font-weight:bold;padding:0px 15px">
- <?php if(isset($exam['exam_id'])){
- ?>
- <?php echo $className;?> <?php echo $exam['name'];?> <?php echo $exam['topic_type'];?>
- <?php }?>
- </div>
- </div>
- <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" style="font-size:12px">
- <thead>
- <tr>
- <?php if(isset($exam['exam_id'])){
- ?>
- <th class="center">
- </th>
- </td>
- <?php }?>
- <th>答题卡ID</th>
- <th>答题卡名称</th>
- <th>客观题数量</th>
- <th>主观题数量</th>
- <th>选做题数量</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($sheet)):foreach($sheet as $rt):?>
- <tr>
- <?php if(isset($exam['exam_id'])){
- ?>
- <td class="center">
- <input type="radio" name="sheet_id" class="ace myselect" value="<?php echo $rt['sheet_id'];?>" stnm="<?php echo $rt['sheet_id'];?>">
- </td>
- <?php }?>
- <td><?php echo $rt['sheet_id'];?></td>
- <td><?php echo $rt['name'];?></td>
- <td><?php echo $rt['ke_topic_num'];?></td>
- <td><?php echo $rt['zu_topic_num'] ?></td>
- <td><?php echo $rt['xuan_topic_num'] ?></td>
- <td>
- <span class="iconfont addbx click-sc update" title="编辑" sheet_id = "<?php echo $rt['sheet_id']?>"></span>
- <span class="iconfont addbx click-delete delClass" style="background-color: red;" sheet_id = "<?php echo $rt['sheet_id']?>"></span> </td>
- </tr>
- <?php endforeach;else:?>
- <tr><td colspan="6">暂无数据!</td></tr>
- <?php endif;?>
- </tbody>
- </table>
- <?php if(isset($exam['exam_id'])){
- ?>
- <input type="hidden" name="wpCode" id="wpCode" value="<?php echo $exam['exam_id'];?>" />
- <input type="hidden" name="schoolId" id="schoolId" value="<?php echo Yii::app()->session['school_id'];?>" />
- <input type="hidden" name="className" id="className" value="<?php echo $className;?>" />
- <?php }?>
- </div>
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- <?php if(!empty($pages)):?>
- <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 '共:'.$rowsCount.'条';
- ?>
- </div>
- </div>
- </div>
- <?php endif;?>
- </div>
- </div>
- <script type="text/javascript">
- $(document).ready(function(){
- /*var str = '<div class="points"></div>';
- $(".sc-lis").each(function(){
- if($(this).find(".points").length>0){
- $(".sel-opt").append(str);
- }
- });*/
- $(".sel-opt,.sel-cons").mouseover(function(){
- $(".sel-cons").show();
- }).mouseout(function(){
- $(".sel-cons").hide();
- });
- $(".sc-lis").click(function(){
- var data = {
- subjectId : $(this).attr('val')
- };
- $.post("<?php echo Yii::app()->createUrl('print/setSubjectId')?>",data,function(flags){
- if(flags)
- {
- location.reload();
- }else
- {
- alert('网络异常');
- }
- });
- $('.has-sel').text($(this).text());
- $(".sel-cons").hide();
- });
- })
- function ccc(){
- layer.msg('敬请期待!', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- return false;
- }
- });
- }
- $(function(){
- // 全选\反选
- $("#selectSheet").click(function(){
- var sheet_id = $("input[name=sheet_id]:checked").val();
- if(sheet_id)
- {
- data={
- sheet_id:sheet_id,
- exam_id:$("input[name=exam_id]").val()
- };
- $.post("<?php echo Yii::app()->createUrl('third/binding')?>",data,function(rs){
- var m =JSON.parse(rs);
- if(m.status==0)
- {
- layer.msg('绑定失败',{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- if(m.status==1)
- {
- layer.msg('绑定成功',{
- icon: 1
- }, function(){
- layer.closeAll();
- location.href="<?php echo Yii::app()->createUrl('third/index')?>";
- });
- }
- if(m.status==-4)
- {
- layer.msg('答题卡与试卷不匹配',{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- if(m.status==-6)
- {
- layer.msg('答题卡分数与出卷分数不匹配',{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- if(m.status==-7)
- {
- layer.msg('答题卡分数未上传',{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- if(m.status==-1)
- {
- layer.msg('未上传答题卡',{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- if(m.status==-8)
- {
- layer.msg('试卷尚未上传题',{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- if(m.status==-2||m.status==-3)
- {
- layer.msg('试卷已绑定',{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- });
- }else{
- alert('请选择答题卡');
- }
- });
- $("#addSheet").click(function(){
- evaluationClient.createAnswerSheet(0);
- });
- $(".update").click(function(){
- var sheet_id = $(this).attr('sheet_id');
- if(sheet_id)
- {
- evaluationClient.createAnswerSheet(sheet_id);
- }else
- {
- alert('无法编辑');
- }
- });
- $(".delClass").click(function(){
- var sheet_id = $(this).attr('sheet_id');
- var msg = '您确定要删除答题卡吗?';
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- $.ajax({
- url: "<?php echo Yii::app()->createUrl('third/del')?>",
- type: "POST",
- dataType: "json",
- data: {
- sheet_id: sheet_id
- },
- success: function (data){
- if(data.status == 1){
- layer.msg('删除成功',{
- icon: 1
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }else{
- layer.msg('删除失败',{
- icon: 5
- }, function(){
- layer.closeAll();
- location.reload();
- });
- }
- },
- error: function (data, status, e){ //服务器响应失败处理函数
- layer.msg('返回失败!',{
- icon: 1
- }, function(){
- layer.closeAll();
- });
- }
- });
- }
- });
- });
- })
- </script>
|