123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896 |
- <link rel="stylesheet" href="/css/assist/successPage.css"/>
- <style>
- .fr{
- float: right;
- }
- .filter {
- font-size: 0;
- margin-top:10px;
- width: 96%;
- margin:10px auto 0 auto;
- }
- .filter * {
- font-size: 14px;
- }
- .filter label {
- font-weight: bold;
- }
- .filter select {
- height: 36px;
- font-size: 14px;
- margin-left: 10px;
- }
- .filter select:nth-child(2) {
- width: 82px;
- }
- .filter select:nth-child(3) {
- width: 110px;
- }
- .filter button {
- border: none;
- background: #2977ff;
- width: 111px;
- height: 36px;
- border-radius: 3px;
- font-size: 14px;
- color: #fff;
- outline: none;
- cursor: pointer;
- margin-left: 10px;
- }
- .showClassInfo{
- cursor: pointer;
- }
- .list table {
- width: 96%;
- margin-top: 20px;
- text-align: center;
- border-right: 1px solid #ccc;
- margin:20px auto 0 auto;
- }
- .list table th {
- background: #f2f2f2;
- border: 1px solid #ccc;
- border-right: none;
- padding: 12px 15px;
- }
- .list table td {
- border: 1px solid #ccc;
- border-right: none;
- border-top: none;
- padding: 12px 15px;
- font-weight: bold;
- }
- .list table tr:nth-child(even) {
- background: #f2f2f2;
- }
- .list .tl {
- text-align: left;
- }
- .list .red {
- color: #cc3400;
- }
- .list .green {
- color: #079b67;
- }
- .icon {
- display: inline-block;
- background: center/contain no-repeat;
- width: 25px;
- height: 25px;
- cursor: pointer;
- vertical-align: middle;
- }
- .icon-edit {
- background-image: url("/images/edit.png")
- }
- .icon-eye-close {
- background-image: url("/images/eye_close.png")
- }
- .icon-download {
- background-image: url("/images/download_cylet.png")
- }
- .icon-xunhuan {
- background-image: url("/images/xunhuan.png")
- }
- .icon-add {
- background-image: url("/images/add.png");
- width: 20px;
- height: 20px;
- }
- .list .subjects {
- line-height: 22px;
- font-size: 0;
- }
- .list .icon{
- margin: 0 4px;
- }
- .list .subjects span {
- display: inline-block;
- font-size: 16px;
- word-break: keep-all;
- margin: 0 4px;
- }
- .confirmbox {
- background: #fff;
- border: 1px solid #cccccc;
- border-radius: 3px;
- padding: 40px 40px 30px;
- text-align: center;
- position: fixed;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- z-index: 99;
- }
- .confirmbox-mask {
- background: rgba(0, 0, 0, .7);
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- z-index: 99;
- position: fixed;
- }
- button {
- border: none;
- background: #009965;
- width: 111px;
- height: 36px;
- border-radius: 3px;
- font-size: 14px;
- color: #fff;
- outline: none;
- cursor: pointer;
- }
- button.save {
- display: block;
- margin: 40px auto;
- }
- .confirmbox .confirmbox-btns {
- margin-top: 40px;
- }
- /*弹出层*/
- .confirmbox {
- background: #fff;
- border: 1px solid #cccccc;
- border-radius: 3px;
- padding: 40px 40px 30px;
- text-align: center;
- position: fixed;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- z-index: 99;
- }
- .confirmbox-mask {
- background: rgba(0, 0, 0, .7);
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- z-index: 99;
- position: fixed;
- }
- .confirmbox-mask button {
- border: none;
- background: #2977ff;
- width: 80px;
- height: 26px;
- border-radius: 3px;
- font-size: 14px;
- color: #fff;
- outline: none;
- cursor: pointer;
- }
- .confirmbox-mask button.save {
- display: block;
- margin: 40px auto;
- }
- .confirmbox .confirmbox-btns {
- margin-top: 40px;
- }
- .class-modal {
- width: 900px;
- background: #fff;
- // border-radius: 5px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- min-height:520px;
- }
- .class-modal-head {
- font-size: 14px;
- background:#2977ff;
- color:#fff;
- height:35px;
- line-height: 35px;
- padding: 0 0 0 15px;
- }
- .class-modal-body {
- margin-top: 5px;
- padding:15px;
- min-height: 340px;
- }
- .class-modal-body .classes {
- margin-bottom: 20px;
- }
- .class-modal-body .classes > div {
- display: inline-block;
- max-width: 640px;
- vertical-align: top;
- }
- .class-modal-body .classes a {
- text-decoration: none;
- display: inline-block;
- margin: 0 5px 5px;
- color: #136bfb;
- font-size: 14px;
- }
- .class-modal-body .classes a.active {
- color: #fc091b;
- }
- .class-modal .icon-close{
- position: absolute;
- right: 10px;
- top: 5px;
- color:#fff;
- font-size: 18px;
- }
- .c-red {
- color: #CC3300
- }
- .avg{
- margin:0 10px;
- }
- .class_btn{
- text-align: center;
- }
- .confirmbox-mask p{
- word-wrap : break-word ;
- }
- .icon-close{
- cursor: pointer;
- }
- .model-input{
- border:1px solid #ccc;
- padding:5px;
- margin-top:10px;
- }
- .model-input label{
- margin:0 15px;
- }
- table{margin-top:5px;}
- .table_list{
- height:420px;
- overflow: auto;
- }
- .upload-box{
- position:relative;
- padding-left:106px;
- line-height: 28px;
- }
- .upload-div,.upload-ipt{
- position: absolute;
- left:0;
- top:0;
- width:100px!important;
- }
- .upload-div{
- height:28px;
- text-align: center;
- background: #eee;
- color: #333;
- border-radius: 3px;
- border:1px solid #ccc;
- }
- .upload-div:hover{
- background: #69d9a7;
- }
- .upload-ipt{
- z-index: 2;
- opacity: 0;
- }
- </style>
- <script>
- function getClassByGrade(gradeId,$classId){
- $.ajax({
- type:'post',
- url:'<?php echo $this->createUrl("cylet/getclassbygrade");?>',
- async: true,
- dataType: 'json',
- data:{'grade':gradeId},
- success: function (result) {
- if(result.status==1){
- $('#class').html('<option value="0">全部班级</option>');
- for(var i=0;i<result.data.length;i++){
- if($.trim($classId)==$.trim(result.data[i]['class_id'])){
- html='<option value="'+result.data[i]['class_id']+'" selected>'+result.data[i]['class_name']+'</option>';
- }else{
- html='<option value="'+result.data[i]['class_id']+'" >'+result.data[i]['class_name']+'</option>';
- }
- $('#class').append(html);
- }
- }
- },
- error: function () {
- return;
- }
- });
- }
- function changeDisplay(cid,display){
- var showAll=$('#display').is(':checked');
- if(parseInt(cid)==0){
- return false;
- }
- $.ajax({
- type:'post',
- url:'<?php echo $this->createUrl("zhiliao/changestatus");?>',
- async: true,
- dataType: 'json',
- data:{'cid':cid,'display':display},
- success: function (result) {
- if(result.status==1){
- if(display==1){
- if(showAll){
- $('#'+cid).find('.icon').eq(2).removeClass('icon-eye-close').addClass('icon-xunhuan');
- }else{
- $('#'+cid).hide();
- }
- }else{
- $('#'+cid).find('.icon').eq(2).removeClass('icon-xunhuan').addClass('icon-eye-close');
- $('#'+cid).hide();
- }
- window.location.reload()
- }
- },
- error: function () {
- return;
- }
- });
- }
- </script>
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/view_navigation.php');?>
- <!-- 导航栏结束-->
- <div class="hgc_headOPerator fl" style="background: transparent;padding-left: 0;">
- <div class="menuBtn" id="hgc_scanUploadBtn">
- <img src="/images/assist/icon_hgc_menu.svg" />
- <span class="btnText">不推送成绩设置</span>
- </div>
- </div>
- <div class="hgc_siderBar" id="hgc_siderBar">
- <div class="menuBtn" id="hgc_hideMenuBtn">
- <img src="/images/assist/icon_hgc_menu.svg" />
- <span class="btnText">家校成绩设置</span>
- </div>
- <ul class="menuList">
- <li>
- <a>不推送成绩设置</a>
- </li>
- <li>
- <a href="<?php echo $this->createUrl('zhiliao/reportsetting')?>">家长端成绩报告设置</a>
- </li>
- <!-- <li>
- <a>阅卷监控管理</a>
- </li>-->
- <li class="back" id="hgc_menuBack">
- <a href="<?php echo $this->createUrl('zhiliao/index')?>"> <img src="/images/assist/icon_hgc_back.svg" alt=""> 返回</a>
- </li>
- </ul>
- </div>
- <div class="filter">
-
- <?php
- $gradeSelect=array(
- 0=>'',
- 1=>'',
- 2=>'',
- 3=>''
- );
- //
- // if(isset($grade)){
- // $gradeSelect[$grade]='selected';
- // if($class){
- // $class=(string)$class;
- // echo "<script>getClassByGrade(".$grade.",'".$class."');</script>";
- // }else{
- // echo "<script>getClassByGrade(".$grade.",0);</script>";
- // }
- //
- // }
- ?>
- <form action="" method="get" name="cylet" id="cyletForm">
- <select name="grade" id="grade">
- <option value="0">年级</option>
- <option value="1" <?php echo $gradeSelect[1] ?>>高一</option>
- <option value="2" <?php echo $gradeSelect[2]?>>高二</option>
- <option value="3" <?php echo $gradeSelect[3]?>>高三</option>
- </select>
- <select name="class_id" id="class">
- <option value="0">全部班级</option>
- </select>
- <input type="text" name="name" value="" >
- <button type="submit" name="search_btn">搜索</button>
- <span class="c-red">同步在家长端及学生端</span>
- <button type="button" class="fr blackListSet" style="margin-right:10px;width:150px;">
- <i class="icon icon-add"></i>
- <span style="display: inline-block;vertical-align: middle">新增不推送试卷</span>
- </button>
- </form>
- </div>
- <div class="list">
- <table cellspacing="0" cellpadding="0" >
- <thead>
- <tr>
- <th >考试名称</th>
- <th >申请日期</th>
- <th >考试日期</th>
- <th >学科</th>
- <th >年级</th>
- <th >班级</th>
- <th>班级类型</th>
- <th>考试类型</th>
- <th>成绩是否已生成</th>
- <th width="12%">操作</th>
- </tr>
- </thead>
- <tbody>
- <?php
- if(isset($dataList) && !empty($dataList)):
- $i=0;
- $gradeArr=array(
- 1=>'高一',
- 2=>'高二',
- 3=>'高三'
- );
- $classArr=array(
- 1=>'行政班',
- 2=>'教学班'
- );
- //1:周考2:单元考3:月考4:联考5:期中6:期末7:高考模拟8:冲刺
- $typeArr=array(
- 1=>'周考',
- 2=>'单元考',
- 3=>'月考',
- 4=>'联考',
- 5=>'期中',
- 6=>'期末',
- 7=>'高考模拟',
- 8=>'冲刺',
- 9=>'测验'
- );
- foreach ($dataList as $val):
- $i++;
- ?>
- <tr id="<?php echo $val['exam_id']?>">
- <td><?php echo $val['name']?></td>
- <td class="tl"><?php echo date('Y-m-d',$val['exam_create_time']) ?></td>
- <td><?php echo $val['exam_date']?></td>
- <td class="tl"><?php echo $val['subject']?></td>
- <td class="tl"><?php echo isset($gradeArr[$val['grade']])?$gradeArr[$val['grade']]:''?></td>
- <td><?php echo $val['class_name']?></td>
- <td class="tl"><?php echo $classArr[$val['class_type']] ?></td>
- <td class="tl"><?php echo $typeArr[$val['type']]?></td>
- <td class="tl"><?php echo $val['status']?></td>
- <td>
- <a href="<?php echo $this->createUrl('zhiliao/delBlacklist',array('exam_id'=>$val['exam_id']))?>" class="delBlacklist" status="<?php echo $val['status'] ?>" title="移出试卷">删除</a>
- </td>
- </tr>
- <?php endforeach;endif;?>
- <tr>
- <td colspan="11" class="page">
- <?php
- if(isset($pageTotal) && $pageTotal>1){
- $StartPage=$page-5;
- $EndPage=$page+5;
- if($StartPage<1){
- $StartPage=1;
- }
- if($EndPage>$pageTotal){
- $EndPage=$pageTotal;
- }
- ?>
- <div class="row" style="padding-top:10px;">
- <div class="col-xs-7">
-
- </div>
- <div class="col-xs-5" style="font-size: 16px">
- <div class="dataTables_paginate paging_simple_numbers" style="vertical-align:sub;">
- <ul id="yw0" class="yiiPager">
- <?php
- if($page>1){
- $query['page']=$page-1;
- echo '<li class="previous"><a href="'.$this->createUrl('zhiliao/blacklist')."?".http_build_query($query).'">上一页</a></li>';
- }
- for($i=$StartPage;$i<=$EndPage;$i++){
- $query['page']=$i;
- $url=$this->createUrl('zhiliao/blacklist').'?'.http_build_query($query);
- if($page==$i){
- echo '<li class="page selected"><a href="#">'.$i.'</a></li>';
- }else{
- echo '<li class="page"><a href="'.$url.'">'.$i.'</a></li>';
- }
- }
- if($page<$pageTotal){
- $query['page']=$page+1;
- echo '<li class="next"><a href="'.$this->createUrl('zhiliao/blacklist')."?".http_build_query($query).'">下一页</a></li>';
- }
- }
- ?>
- </ul>
- <span>共:<?php echo $total?>条</span>
- </td>
- </tr>
- </tbody>
- </table>
- </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">
- <select name="grade" class="grade">
- <option value="0">年级</option>
- <option value="1"> 高一</option>
- <option value="2"> 高二</option>
- <option value="3"> 高三</option>
- </select>
- <select name="class" class="class">
- <option value="0">班级</option>
- </select>
- <input type="text" name="keyword" value="" placeholder="">
- <button class="search_exam">搜索</button>
- <div class="table_list">
- <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <tr><td align="center">请先查找您需要的试卷
- </td></tr>
- </table>
- </div>
- </div>
- <div class="page">
- <div class="row" style="padding-top:10px;padding-bottom: 15px;">
- <div class="" style="font-size: 16px;float: right;padding-right:15px;">
- <div class="dataTables_paginate paging_simple_numbers alertPage" style="vertical-align:sub;">
- </div>
- </div>
- </div>
- </div>
- <p class="class_btn">
- <button type="button" class="setting_sumbit">确定</button>
- <button type="button" class="close_1">取消</button>
- </p>
- </form>
- </div>
- </div>
- <script>
- $(function(){
- var scanMenuBtn = document.getElementById('hgc_scanUploadBtn');
- var scanMenu = document.getElementById('hgc_siderBar')
- var scanMenuBack = document.getElementById('hgc_menuBack')
- var scanMenuHideBtn = document.getElementById('hgc_hideMenuBtn')
- scanMenuBtn.addEventListener('click',function(){
- var originMeunText = scanMenuBtn.lastElementChild.innerText;
- scanMenu.style.top = $(scanMenuBtn).offset().top - $(window).scrollTop()+'px'
- scanMenu.className = 'hgc_siderBar active'
- scanMenuHideBtn.lastElementChild.innerText = originMeunText
- })
- scanMenuBack.addEventListener('click',function(){
- scanMenu.className = 'hgc_siderBar'
- })
- scanMenuHideBtn.addEventListener('click',function(){
- scanMenu.className = 'hgc_siderBar'
- })
- $(document).click(function(e){
- var e = e || window.event; //浏览器兼容性
- var elem = e.target || e.srcElement;
- while (elem) { //循环判断至跟节点,防止点击的是div子元素
- if (elem.id && (elem.id == 'hgc_scanUploadBtn' || elem.id == 'hgc_scanUploadBtn')) {
- return;
- }
- elem = elem.parentNode;
- }
- $('#hgc_siderBar').removeClass("active"); //点击的不是div或其子元素
- });
- $('.blackListSet').click(function(){
- $('#fieldModal').fadeIn();
- });
- $('.close_1').click(function(){
- $('#fieldModal').fadeOut();
- });
- $(document).on("change", "#grade", function(){
- // $('#grade').change(function(){
- var subjectId='<?php echo $subject?>';
- $.post("<?php echo $this->createUrl('print/getGradeClass'); ?>", {"grade": $('#grade').val(),"subjectId":subjectId}, function(data) {
- var m = JSON.parse(data);
- if(m.success==0)
- {
- var html = '<option value="0">请选择班级</option>';
- $("#class").html(html);
- }else{
- var html = '<option value="0">请选择班级</option>';
- $.each(m.message,function(i,n){
- html+='<option value="'+ n.class_id+'">'+ n.class_name+'</option>';
- });
- $("#class").html(html);
- }
- });
- });
- $('.grade').change(function(){
- var subjectId='<?php echo $subject?>';
- $.post("<?php echo $this->createUrl('print/getGradeClass'); ?>", {"grade": $('.grade').val(),"subjectId":subjectId}, function(data) {
- var m = JSON.parse(data);
- if(m.status==0)
- {
- var html = '<option value="0">请选择班级</option>';
- $(".class").html(html);
- }else{
- var html = '<option value="0">请选择班级</option>';
- $.each(m.message,function(i,n){
- html+='<option value="'+ n.class_id+'">'+ n.class_name+'</option>';
- });
- $(".class").html(html);
- }
- });
- });
- $('.search_exam').click(function(){
- loadExam(1);
- return false;
- });
- function loadExam(page){
- var exam_type=$('.exam_type').val();
- var subject=$('.subject').val();
- var grade=$('.grade').val();
- var class_id=$('.class').val();
- var keyword=$('input[name=keyword]').val();
- $.ajax({
- url:'<?php echo $this->createUrl('zhiliao/ajaxsearchexam')?>',
- type:'POST',
- dataType:'json',
- data:{'exam_type':exam_type,'subject':subject,'grade':grade,'class':class_id,'keyword':keyword,'page':page},
- success:function(res){
- if(res.status==1){
- var html='';
- var pageHtml='';
- html+='<tr>';
- html+='<th><input type="checkbox" name="select-all" class="selectAll" value=""></th>';
- html+='<th>考试名称</th>';
- html+='<th>学科</th>';
- html+='<th>申请日期</th>';
- html+='<th>考试日期</th>';
- html+='<th>年级</th>';
- html+='<th>班级</th>';
- html+='<th>班级类型</th>';
- html+='<th>考试类型</th>';
- html+='<th>成绩是否已生成</th>';
- html+='</tr>';
- $.each(res.list,function(i,n){
- html+='<tr>';
- html+='<td><input type="checkbox" status="'+n.status+'" name="exam" value="'+n.exam_id+'"></td>';
- html+='<td>'+n.name+'</td>';
- html+='<td>'+n.subject_name+'</td>';
- html+='<td>'+n.create_date+'</td>';
- html+='<td>'+n.exam_date+'</td>';
- html+='<td>'+n.grade+'</td>';
- html+='<td>'+n.class_name+'</td>';
- html+='<td>'+n.class_type+'</td>';
- html+='<td>'+n.type+'</td>';
- html+='<td>'+n.status_msg+'</td>';
- html+='</tr>';
- });
- //分页
- if(res.pages.totalPage>0){
- var pages=res.pages;
- var startPage=1;
- var endPage=5;
- if(pages.totalPage>1){
- startPage=parseInt(pages.page)-2;
- endPage=parseInt(pages.page)+3;
- if(startPage<1){
- startPage=1;
- }
- if(endPage>pages.totalPage){
- endPage=pages.totalPage;
- }
- pageHtml+='<ul id="yw0" class="yiiPager ">';
- nowPage=parseInt(pages.page)
- if(nowPage>1){
- pageHtml+='<li class="page "><a href="#" class="load_exam" page='+(nowPage-1)+'>上一页</a></li>';
- }
- for(var i=startPage;i<=endPage;i++){
- if(i==nowPage){
- pageHtml+='<li class="page selected"><a href="#">'+i+'</a></li>';
- }else{
- pageHtml+='<li class="page"><a href="#" class="load_exam" page='+i+'>'+i+'</a></li>';
- }
- }
- if(nowPage<pages.totalPage){
- pageHtml+='<li class="page "><a href="#" class="load_exam" page='+(nowPage+1)+'>下一页</a></li>';
- }
- pageHtml+='</ul>';
- pageHtml+='<span>共'+pages.total+'条</span>';
- }
- }
- $('#dynamic-table').html(html);
- $('.alertPage').html(pageHtml);
- }
- }
- });
- }
- $('.setting_sumbit').click(function(){
- var examIds=[],isHasComplete=false,isHasNoComplete=false,msg='';
- $.each($('input[name=exam]:checked'),function(){
- examIds.push($(this).val());
- if($(this).attr('status')=='1'){
- isHasComplete=true;
- }else {
- isHasNoComplete=true;
- }
- });
-
- if(examIds.length==0){
- layer.msg('请选择试卷');
- return false;
- }
- if(isHasComplete && isHasNoComplete){
- msg='您所选的试卷部分已发送成绩给家长,确定要撤回?';
- }else if(isHasComplete){
- msg='您所选试卷的成绩已发送给家长,您确定要撤回?';
- }else if(isHasNoComplete){
- msg='您确定要将所选试卷的成绩对家长隐藏?';
- }
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- jQuery.post(
- '<?php echo $this->createUrl('zhiliao/addBlacklist');?>',
- {"examIds":examIds},
- function(data){
- var obj = JSON.parse(data);
- if (obj.status == 1) {
- window.location.reload();
- } else {
- layer.msg('添加失败');
- }
- }
- );
- }
- });
- });
- $('.delBlacklist').click(function(){
- var status=$(this).attr('status');
- var msg='确定要移出试卷吗';
- var url=$(this).attr('href');
- console.log(url);
- if(status=='是'){
- msg='您确认要移出该试卷吗?移出后该试卷将重新推送成绩给家长';
- }else{
- msg='您确认要移出该试卷吗?移出后该试卷出成绩后将推送成绩给家长';
- }
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- window.location.href=url;
- }
- });
- return false;
- });
- // 全选按钮
- $("#examSelect")
- .on('change',"input[name='select-all']",function(){
- var type = $("input[name='select-all']").prop("checked");
-
- if(type){
- $("#dynamic-table").find("input[name=exam]").prop("checked", true);
- }else{
- $("#dynamic-table").find("input[name=exam]").prop("checked", false);
- }
- })
- .on('click','.load_exam',function(){
- var page=$(this).attr('page');
- loadExam(page);
- })
-
- //初始化年级班级
- function initClass(){
- var subjectId='<?php echo $subject?>';
- var grade = '<?php echo $grade;?>';
- var classId = '<?php echo $classId;?>';
- var name = '<?php echo $name;?>';
- if(grade > 0){
- $.post("<?php echo $this->createUrl('print/getGradeClass'); ?>", {"grade": grade,"subjectId":subjectId}, function(data) {
- var m = JSON.parse(data);
- if(m.success==0)
- {
- var html = '<option value="0">请选择班级</option>';
- $("#class").html(html);
- }else{
- var html = '<option value="0">请选择班级</option>';
- $.each(m.message,function(i,n){
- if(n.class_id == classId){
- html+='<option value="'+ n.class_id+'" selected="selected">'+ n.class_name+'</option>';
- }else{
- html+='<option value="'+ n.class_id+'">'+ n.class_name+'</option>';
- }
- });
- $("#class").html(html);
- $("#grade option[value='"+grade+"']").attr("selected",true);
- }
- });
- }
- if(name){
- $("input[name='name']").val(name);
- }
- }
- initClass();
- });
- </script>
|