123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- <script type="text/javascript">
- jQuery(document).ready(function(){
- jQuery("#grades").change(function(){
- var grade = jQuery(this).val();
- location.href = "<?php echo $this->createUrl("record/index?grade=");?>"+grade;
- });
-
- jQuery("#classes").change(function(){
- var classId = jQuery(this).val();
- location.href = "<?php echo $this->createUrl("record/index?classId=");?>"+classId;
- });
-
- jQuery(".delExam").click(function(){
- document.examId = jQuery(this).attr("examId");
- msg = "确定删除?";
-
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
-
- jQuery.post(
- "<?php echo $this->createUrl("record/delact");?>",
- {"examId": document.examId},
- function(data){
- data = JSON.parse(data);
- if(data.code == "0"){
- msg = data.msg;
- icon = 6;
- }
- else{
- msg = data.msg;
- icon = 5;
- }
-
- layer.alert(msg, {icon: icon}, function(){
- location.href = "<?php echo 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];?>";
- });
- }
- );
- }
- });
- });
- });
- </script>
- <div class="main-content-inner">
- <div class="breadcrumbs" id="breadcrumbs">
- <ul class="clearfix main-content-inner-ul">
- <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("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='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("vacationhomework/classes?type=vh");?>"' 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("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/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("cylet/index");?>"' class="button button_normal button_group button_arrow " data-button="red">全学科统考</button>
- </li>
- </ul>
- </div>
- <div class="page-content">
- <div class="row marginNo">
- <div class="col-xs-12">
- <!-- PAGE CONTENT BEGINS -->
- <div id="dynamic-table_wrapper " class="dataTables_wrapper form-inline no-footer">
- <div class="row marginNo">
- <div class="dataTables_length margin-zy">
- <div class="col-xs-10 paddingNo">
- <div style="float: left;margin-top: 4px;">
- 按学期筛选:
- </div>
- <select id="grades" style="width:140px">
- <option <?php echo $grade == "1" ? "selected" : "";?> value="1">高一</option>
- <option <?php echo $grade == "2" ? "selected" : "";?> value="2">高二</option>
- <option <?php echo $grade == "3" ? "selected" : "";?> value="3">高三</option>
- </select>
-
- <?php if($classes){?>
- <select id="classes" style="width:140px">
- <?php foreach($classes as $key => $val){?>
- <option <?php echo $val["class_id"] == $class["class_id"] ? "selected" : "";?> value="<?php echo $val["class_id"];?>"><?php echo $val["class_name"];?></option>
- <?php }?>
- </select>
- <?php }?>
- <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索</button>
- </div>
- <div class="col-xs-2">
- <div id="dynamic-table_filter" class="dataTables_filter">
- <a class="btn btn-success btn-sm" href="<?php echo $this->createUrl('record/edit');?>">
- <i class="fa fa-plus" style="font-style: normal;"></i> 录入成绩
- </a>
- </div>
- </div>
- </div>
- </div>
- <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <thead>
- <tr>
- <th>序号</th>
- <th>名称</th>
- <th>年级</th>
- <th>班级</th>
- <th>日期</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if($exams):$k = 1;foreach($exams as $exam):?>
- <tr>
- <td><?php echo $k;?></td>
- <td><?php echo $exam["name"];?></td>
- <td>高<?php echo Char::numToZh($class['grade']);?></td>
- <td><?php echo $class["class_name"];?></td>
- <td><?php echo date('Y-m-d H:i:s',$exam['create_time']);?></td>
- <td>
- <!--<a href="<?php echo $this->createUrl("record/edit?act=edit&examId={$exam["exam_id"]}");?>"><span style="margin-right:8px">修改</span></a>-->
- <a href="<?php echo $this->createUrl("record/view?examId={$exam["exam_id"]}");?>"><span style="margin-right:8px">查看成绩</span></a>
- <a href="javascript:;" class="delExam" examId="<?php echo $exam["exam_id"];?>"><span style="margin-right:8px">删除</span></a></td>
- </tr>
- <?php $k++;endforeach;else:?>
- <tr><td colspan="7">暂无数据!</td></tr>
- <?php endif;?>
- </tbody>
- </table>
-
- <div class="row marginNo">
- <div class="col-xs-6">
-
- </div>
- <div class="col-xs-6">
- <div class="dataTables_paginate paging_simple_numbers">
- <?php if($pager->pagesCount){
- $this->widget('CLinkPager', array(
- 'header' => '',
- 'firstPageLabel'=> '首页',
- 'lastPageLabel' => '末页',
- 'prevPageLabel' => '上一页',
- 'nextPageLabel' => '下一页',
- 'pages' => $pager,
- 'maxButtonCount'=> 5,
- ));}
- ?>
- </div>
- </div>
- </div>
- </div>
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
- <script src="/js/layer/layer.js"></script>
- <script type="text/javascript">
- </script>
|