123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337 |
- <script src="/js/xsgl.js"></script>
- <script>
- function endDates() {
- //将结束日期的事件改成 false 即可
- }
- $(function(){
- // $(".ttd").fadeIn();
- var start = {
- dateCell: '#start_time',
- format: 'YYYY-MM-DD hh:mm:ss',
- minDate: '2014-06-16 23:59:59', //设定最小日期为当前日期
- // isinitVal:true,
- maxDate: jeDate.now(0), //最大日期
- isTime: true,
- choosefun: function(obj){
- end.minDate = obj.toString(); //开始日选好后,重置结束日的最小日期
- end.trigger = true;
- jeDate(end);
- }
- };
- var end = {
- dateCell: '#end_time',
- format: 'YYYY-MM-DD hh:mm:ss',
- // minDate: jeDate.now(0), //设定最小日期为当前日期
- maxDate: '2099-06-16 23:59:59', //最大日期
- choosefun: function(datas){
- start.maxDate = datas; //将结束日的初始值设定为开始日的最大日期
- }
- };
- jeDate(start);
- jeDate(end);
- //全选
- $(".selectAll").click(function(){
- if ($(this).prop("checked")) {
- $(".myselect").prop("checked",true);
- } else {
- $(".myselect").prop("checked",false);
- }
- });
- //删除
- $("#del").click(function(){
- // 判断是否有选中
- var n_id;
- layer.msg('确定删除选中的记录吗?', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- if (!$("input[class='ace myselect']").is(':checked'))
- {
- layer.msg('请至少一个记录!');return false;
- }
- jQuery("input[class='ace myselect']").each(function()
- {
- if(jQuery(this).is(":checked") && typeof(jQuery(this).val())!= "undefined")
- {
- n_id += ","+jQuery(this).val();
- }
- });
- if(n_id)
- {
- n_id = n_id.replace("undefined,",'');
- }
- var data={n_id:n_id};
- $.post("<?php echo Yii::app()->createUrl('notification/del') ?>", data, function(flags) {
- var m = JSON.parse(flags);
- if(m.status)
- {
- location.reload();
- }else
- {
- layer.msg('删除失败');
- }
- });
- }
- });
- });
- $("#btnClose").click(function(){
- $(this).parents(".ttd").fadeOut();
- location.reload();
- });
- $(".info").click(function () {
- var data={
- exam_group_id:$(this).attr('exam_group_id'),
- n_id: $(this).attr('n_id'),
- mode: $(this).attr('mode')
- };
- $.post("<?php echo Yii::app()->createUrl('notification/ajax_exam_info') ?>", data, function(flags) {
- var m = JSON.parse(flags);
- if(m)
- {
- if(m.mode==2){
- $('.title').html('您有新的预警需要注意');
- $('#exam_name').html('预警名称:'+m.title);
- if(m.alarm_level==0){
- $('#teacher_name').html('预警级别:红色预警');
- }
- if(m.alarm_level==1){
- $('#teacher_name').html('预警级别:黄色预警');
- }
- if(m.alarm_level==2){
- $('#teacher_name').html('预警级别:绿色预警');
- }
- $('#exam_class').html('预警学校:'+m.school_name);
- $('#mark_type').html('预警详情:无');
- if(m.alarm_description){
- $('#mark_type').html('预警详情:'+m.alarm_description);
- }
- $('#exam_time').html('预警时间:'+m.create_time);
- $('#complete').html('');
- $(".ttd").fadeIn();
- }else{
- $('#exam_name').html('试卷名称:'+m.exam_name);
- if(m.mark_type==3)
- {
- if(m.subject_id !=3 && m.subject_id !=6 && m.subject_id!=51){
- $('#teacher_name').html('主阅卷老师:'+m.teacher_name);
- }else{
- $('#teacher_name').html('出卷老师:'+m.teacher_name);
- }
- $('#mark_type').html('阅卷方式:班级混合阅卷');
- $('#complete').html('所有老师已完成阅卷,请及时处理!');
- }
- if(m.mark_type==4)
- {
- $('#teacher_name').html('阅卷老师:'+m.teacher_name);
- $('#mark_type').html('阅卷方式:班级单独阅卷');
- $('#complete').html('老师已完成阅卷,请及时处理!');
- }
- $('#exam_class').html('考试班级:'+m.class_name);
- $('#exam_time').html('考试时间:'+m.exam_time);
- $(".ttd").fadeIn();
- }
- evaluationClient.SetNotification(m.count);
- }else
- {
- layer.msg('数据有误');
- }
- });
- });
- });
- </script>
- <script type="text/javascript" src="/js/times/jedate.js"></script>
- <style>
- a{color: #ffffff}
- a:hover a:active{color: #ffffff}
- *{padding:0px;margin:0px;font-family:微软雅黑}
- ul,li,ol{list-style-type:none;}
- .clearfix:after{clear:both;overflow:hidden;content:"";display:block;}
- input ,button{outline:none;}
- .position-r{position:relative}
- .fl{float:left;}
- .fr{float:right;}
- .mt5{margin-top:5px;}
- .mt10{margin-top:10px;}
- .mt20{margin-top:20px;}
- .ml15{margin-left:15px;}
- .mr15{margin-right:15px;}
- .font_bold{font-weight:bold;}
- .choseImg{cursor:pointer;}
- .ttd{background:url(/images/back-d.png) center repeat;width:100%;height:100%;position:fixed;top:0px;z-index:999}
- .s-state{width:380px;background:#fff;margin:12% auto 0 auto;}
- .hint_size{height:45px;width:90%;color:#333;line-height:45px;margin:0px auto;border-bottom:1px solid #ccc;}
- .mistake_character{text-align:left;color:#606060;font-size:14px;padding:0px 0px 28px 0px;width:90%;margin:0px auto;}
- .roger{width:100px;height:35px;border:1px solid #2977ff;background:#2977ff;color:#fff;font-size:16px;cursor:pointer;}
- .rogergb{background:#ccc;border:1px solid #ccc;}
- .allTeacher{width:164px;height:30px;border:1px solid #ccc;border-radius:6px;margin-top:10px;}
- button.wordBtn{background:#2977ff;color:#fff;width:120px;height:30px;border:1px solid #2977ff;cursor:pointer;border-radius:4px;margin-left: 15px;}
- </style>
- <div class="main-content-inner">
- <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="col-xs-7">
- <form method="get" id="form1" action="<?php echo $this->createUrl("notification/index");?>">
- <div class="col-xs-12 fl">
- <div class="dataTables_length margin-zy">
- 开始时间: <input type="text" id="start_time" class="form-control input-sm" placeholder="开始时间" name="start_time" value="<?php echo $start_time?>" readonly ">
- 结束时间: <input type="text" id="end_time" class="form-control input-sm" placeholder="结束时间" name="end_time" value="<?php echo $end_time?>" readonly ">
- 通知类型:<select class="form-control" id="mode" name="mode" style="width: 100px;">
- <option value="0" >全部类型</option>
- <option value="-1" <?php if($mode<0){echo 'selected';}?> >通知类型</option>
- <option value="2" <?php if($mode>0){echo 'selected';}?>>预警类型</option>
- </select>
- <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索</button>
- </div>
- </div>
- </form>
- </div>
- <div class="col-xs-3 fl" style="margin: 10px"> <button class="label-primary-s bth-s" id="del" style="padding:4px 12px;">选中删除</button></div>
- <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <thead>
- <tr>
- <th><input type="checkbox" class="ace selectAll"></th>
- <th>序号</th>
- <th>时间</th>
- <th>标题</th>
- <th>状态</th>
- <th>类型</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php
- if(isset($list) && !empty($list)){
- foreach ($list as $k=>$v){
- ?>
- <tr>
- <td><input type="checkbox" class="ace myselect" value="<?php echo $v->id?>"></td>
- <td><?php echo ($_page*10)-(10-$k-1)?></td>
- <td><?php echo date('Y-m-d H:i:s',$v->create_time)?></td>
- <td><?php echo $v->title?></td>
- <td><?php if($v->status){echo '已读';}else{echo '未读';}?></td>
- <td><?php if($v->mode==0){echo '通知';}else{echo "预警类";}?></td>
- <td><button class="label-primary-s bth-s info" mode="<?php echo $v->mode?>" exam_group_id = "<?php echo $v->exam_group_id?>" n_id="<?php echo $v->id?>" style="padding:4px 12px;">详情</button></td>
- </tr>
- <?php
- }}else{?>
- <tr><td colspan="7">暂无数据!</td></tr>
- <?php }?>
- </tbody>
- </table>
- <?php if(isset($page)&&!empty($page)):?>
- <div class="row">
- <div class="col-xs-7">
- <!-- <div class="dataTables_info" id="dynamic-table_info" role="status" aria-live="polite">Showing 1 to 10 of 23 entries</div> -->
- </div>
- <div class="col-xs-5">
- <div class="dataTables_paginate paging_simple_numbers">
- <?php
- $this->widget('CLinkPager', array(
- 'header' => '',
- //'selectedPageCssClass' => 'active2', //当前页的class
- //'hiddenPageCssClass' => 'disabled2', //禁用页的class
- 'firstPageLabel' => '首页',
- 'lastPageLabel' => '末页',
- 'prevPageLabel' => '上一页',
- 'nextPageLabel' => '下一页',
- 'pages' => $page,
- 'maxButtonCount'=> 5,
- ));
- ?><?php echo '共:'.$page_total.'条';?>
- </div>
- </div>
- </div>
- <?php endif;?>
- </div>
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
- <div class="ttd" style="display: none;">
- <div class="s-state clearfix posirela">
- <div class="hint_size clearfix">
- <span class="fl ml15 title" >系统通知</span>
- </div>
- <div class="mistake_character clearfix" style="padding-top: 10px; padding-bottom: 0;">
- <label class="ml15 fl" style="line-height:37px" id="exam_name">试卷名称:</label>
- </div>
- <div class="mistake_character clearfix" style="padding-top: 0; padding-bottom: 0px;">
- <label class="ml15 fl" style="line-height:37px" id="teacher_name">主阅卷老师:</label>
- </div>
- <div class="mistake_character clearfix" style="padding-top: 0; padding-bottom: 10px;">
- <label class="ml15 fl" style="line-height:37px" id="exam_class">考试班级:</label>
- </div>
- <div class="mistake_character clearfix" style="padding-top: 0; padding-bottom: 10px;">
- <label class="ml15 fl" style="line-height:37px" id="mark_type">阅卷方式:</label>
- </div>
- <div class="mistake_character clearfix" style="padding-top: 0; padding-bottom: 10px;">
- <label class="ml15 fl" style="line-height:37px" id="exam_time">考试时间:</label>
- </div>
- <div class="mistake_character clearfix" style="padding-top: 0; padding-bottom: 10px;">
- <label class="ml15 fl" style="line-height:37px" id="complete">所有老师已完成阅卷,请及时处理!</label>
- </div>
- <div class="mistake_character clearfix">
- <div class="clearfix" style="width:300px;margin:0px auto;">
- <p class="fl"><button class="roger shut" id="btnClose">确定</button></p>
-
- </div>
- </div>
- </div>
- </div>
|