123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- <script type="text/javascript">
- jQuery(document).ready(function(){
- jQuery(".delTeacher").click(function(){
- document.teacherId = jQuery(this).attr("teacherId");
-
- layer.msg('确定删除?', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
-
- jQuery.post(
- "<?php echo $this->createUrl("teacher/delteacheract");?>",
- {"teacherId": document.teacherId},
- function(data){
- data = eval("("+data+")");
-
- if(data.code == "0"){
- msg = data.msg;
- icon = 6;
- }
- else{
- msg = "因为以下原因操作失败:<br/>"+data.msg;
- icon = 5;
- }
-
- layer.alert(msg, {icon: icon}, function(){
- location.href = "<?php echo $this->createUrl("teacher/index");?>";
- });
- }
- );
- }
- });
- });
- $(".teacher-export-msg").click(function(){
- var subject_id = $("#subject_id").val();
- var realname = $("input[name='realname']").val();
- var class_id = $("#class_id").val();
- window.location.href = "<?php echo $this->createUrl("teacher/batchImport");?>"+"?subject_id="+subject_id+"&class_id="+class_id+"&realname="+realname;
- });
- });
- </script>
- <script src="/js/xsgl.js"></script>
- <style>
- ul .page a ,ul .selected a{
- border:1px solid #619aff !important;
- color: #619aff !important;
- }
- ul.yiiPager .selected a {
- background: #619aff !important;
- }
- .click_gray{
- background-color: #999;
- border:1px solid #999;
- }
- </style>
- <div class="main-content-inner">
- <!----<div class="breadcrumbs" id="breadcrumbs">
- <ul class="breadcrumb">
- <li>
- <a href="<?php echo $this->createUrl("semester/index");?>">学期管理</a>
- </li>
- <li class="li_backgrond_color">
- <a href="<?php echo $this->createUrl("teacher/index");?>">教师管理</a>
- </li>
- <li>
- <a href="<?php echo $this->createUrl("classes/index");?>">班级管理</a>
- </li>
- <li>
- <a href="<?php echo $this->createUrl("studentinfo/index");?>">学生管理</a>
- </li>
- </ul>
- </div>--->
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/class_navigation.php');?>
- <!-- 导航栏结束-->
- <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">
- <form method="get" action="<?php echo $this->createUrl('teacher/index');?>" style="padding-left: 0px">
- <div class="col-xs-9">
- <div class="dataTables_length margin-zy">
- <div style="float: left;margin-top: 4px; padding-left: 5px;">
- 学科:
- </div>
- <div class='diy_select1' style="display: inline;margin-right: 5px;border: 1px solid #c9ccd2; width: 131px">
- <input type='hidden' id="subject_id" name="subject_id" class='diy_select_input1' value="<?php echo $subject_id?>"/>
- <div class='diy_select_txt1'><?php if(empty($subject_id)){echo "选择学科";}else{echo Yii::app()->params['subjectId'][$subject_id];}?></div>
- <div class='diy_select_btn1'></div>
- <ul class='diy_select_list1'>
- <li val="0" >选择学科</li>
- <?php
- foreach ($subjectslist as $key => $val){
- echo '<li val="'.$key.'">'.$val.'</li>';
- }
- ?>
- </ul>
- </div>
- <div style="float: left;margin-top: 4px;">
- 班级:
- </div>
- <div class='diy_select' style="width:131px;">
- <input type='hidden' class='diy_select_input' name="class_id" id="class_id" value="<?php echo $class_id?>"/>
- <div class='diy_select_txt' >
- <?php if($class_data && isset($class_data[$class_id])){echo $class_data[$class_id];}else{
- echo '--请选择--';
- }?>
- </div>
- <div class='diy_select_btn'></div>
- <ul class='diy_select_list'>
- <li val="0">--请选择--</li>
- <?php foreach ($class_data as $k=>$v){?>
- <li val="<?php echo $k?>"><?php echo $v?></li>
- <?php }?>
- </ul>
- </div>
- <input type="text" class="form-control input-sm" placeholder="请输入教师姓名/账号!" name="realname" value="<?php if(!empty($realname)){echo $realname;}?>">
- <!--<button class="btn btn-minier btn-primary">搜索</button>-->
- <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索</button>
- </div>
- </div>
- </form>
- <div id="dynamic-table_filter" class="dataTables_filter" style="margin-right: 10px;">
- <a class="btn label-primary-green btn-sm teacher-export-msg" style="float:right;margin:6px 0px;" href="javascript:void(0)">
- <i class="fa fa-download" style="font-style: normal;"></i> 导出
- </a>
- </div>
- <div id="dynamic-table_filter" class="dataTables_filter" style="margin-right: 10px;">
- <a class="btn label-primary-green btn-sm" style="float:right;margin:6px 0px;" href="<?php echo $this->createUrl('teacher/add');?>">
- <i class="fa fa-plus" style="font-style: normal;"></i> 添加教师
- </a>
- </div>
- <div id="dynamic-table_filter" class="dataTables_filter" style="margin-right: 10px;">
- <a class="btn label-primary-green btn-sm" style="float:right;margin:6px 0px;" href="<?php echo $this->createUrl('teacher/excelinfo');?>">
- <i class="fa fa-plus" style="font-style: normal;"></i> 批量导入教师
- </a>
- </div>
- <?php if(isset(Yii::app()->session['testFlag']) && (Yii::app()->session['testFlag']==1)){ ?>
- <div id="dynamic-table_filter" class="dataTables_filter" style="margin-right: 10px;">
- <a class="btn label-primary-green btn-sm" style="float:right;margin:6px 0px;" href="<?php echo $this->createUrl('teacher/change');?>">
- <i class="fa fa-plus" style="font-style: normal;"></i> 教师账号去重
- </a>
- </div>
- <?php } ?>
-
- </div>
- <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <thead>
- <tr>
- <th style="width:80px;">教师姓名</th>
- <th>登录账号</th>
- <th>执教班级</th>
- <!--<th>邮箱</th>-->
- <th style="width:50px;">性别</th>
- <th>学科组</th>
- <th>岗位</th>
- <th>职称</th>
- <th>创建时间</th>
- <th>可用</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($teachArray)):foreach($teachArray as $ta):?>
- <tr>
- <td style="width:80px;"><?php echo $ta['teacher_name'];?></td>
- <td><?php echo $ta['businessphone'] ? $ta['businessphone'] : "暂无";?></td>
- <td style="width: 40%"><?php echo $ta['class_name'];?></td>
- <!--<td><?php echo $ta['teacher_email'];?></td>-->
- <td style="text-align:center;line-height:;"><?php if($ta['teacher_sex'] == 1){echo '女';}else{echo '男';}?></td>
- <td><?php echo isset($subjectslist[$ta['subjects']])?$subjectslist[$ta['subjects']]:'';?></td>
- <td><?php echo isset($postlist[$ta['posts']])?$postlist[$ta['posts']]:'';?></td>
- <td><?php echo $titlelist[$ta['title']];?></td>
- <td><?php echo date('Y-m-d H:i:s',$ta['add_time']);?></td>
- <td class="hidden-480">
- <?php if($ta['status'] == 0 && $ta['businessphone']):?>
- <span class="label label-sm label-success">是</span>
- <?php else:?>
- <span class="label label-sm label-warning">否</span>
- <?php endif;?>
- </td>
-
- <td style="width:100px;">
- <div class="hidden-sm hidden-xs action-buttons">
- <?php if($ta['posts']==5):?>
- <span class="iconfont addbx click_gray" title="编辑"></span>
- <span class="iconfont addbx click_gray" title="删除" teacherId="<?php echo $ta['teacher_id'];?>"></span
- <?php else:?>
- <?php if($ta['businessphone']):?>
- <span class="iconfont addbx click-sc" title="编辑" onclick="javascript:location.href='<?php echo $this->createUrl('teacher/edit',array('thid'=>$ta['teacher_id']));?>'"></span>
- <?php endif;?>
-
- <span class="iconfont addbx click-delete delTeacher" title="删除" teacherId="<?php echo $ta['teacher_id'];?>"></span
- <?php endif;?>
- </div>
-
- </td>
- </tr>
- <?php endforeach;else:?>
- <tr><td colspan="10">暂无数据!</td></tr>
- <?php endif;?>
- </tbody>
- </table>
- <?php if(!empty($page_total)):?>
- <div class="row">
- <div class="col-xs-7">
-
- </div>
- <div class="col-xs-5">
- <div class="dataTables_paginate paging_simple_numbers">
- <?php
- $this->widget('CLinkPager', array(
- 'header' => '',
- 'firstPageLabel'=> '首页',
- 'lastPageLabel' => '末页',
- 'prevPageLabel' => '上一页',
- 'nextPageLabel' => '下一页',
- 'pages' => $pages,
- 'maxButtonCount'=> 5,
- ));
- echo '共:'.$page_total.'条';
- ?>
- </div>
- </div>
- </div>
- <?php endif;?>
- </div>
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
|