288 lines
7.8 KiB
HTML
288 lines
7.8 KiB
HTML
{extend name="common@list" /}
|
|
{block name="topnav"}
|
|
<nav class="breadcrumb">
|
|
<i class="Hui-iconfont"></i> 首页
|
|
<span class="c-gray en">></span> 师生管理
|
|
<span class="c-gray en">></span> 教师列表
|
|
<a class="btn btn-success radius r"
|
|
style="line-height:1.6em;margin-top:3px"
|
|
href="javascript:location.replace(location.href);"
|
|
title="刷新" >
|
|
<i class="Hui-iconfont"></i>
|
|
</a>
|
|
</nav>
|
|
{/block}
|
|
{block name="bouttons"}
|
|
<div class="cl pd-5 bg-1 bk-gray mt-20">
|
|
<span class="l">
|
|
<!-- 删除按钮 -->
|
|
<a href="javascript:;" onclick="dels('/teacher/m')" class="btn btn-danger radius">
|
|
<i class="Hui-iconfont"></i>
|
|
批量删除
|
|
</a>
|
|
<!-- 添加按钮 -->
|
|
<a href="javascript:;" onclick=addfull('批量上传',"/teacher/createall") class="btn btn-primary radius">
|
|
<i class="Hui-iconfont"></i>
|
|
批量上传
|
|
</a>
|
|
<a href="javascript:;" onclick=addfull('添加教师',"/teacher/create") class="btn btn-primary radius">
|
|
<i class="Hui-iconfont"></i>
|
|
添加教师
|
|
</a>
|
|
</span>
|
|
<span class="r">
|
|
共有数据:<strong>{$list.count}</strong> 条
|
|
</span>
|
|
</div>
|
|
<div class="panel panel-default mt-10 mb-10">
|
|
<div class="panel-header" id="shaixuan">筛选教师信息</div>
|
|
<div class="panel-body" style="min-height: 60px">
|
|
<div>
|
|
{php}
|
|
$school = schlist('校级','区级');
|
|
{/php}
|
|
<label class="f-l">现工作单位:</label>
|
|
<dt>
|
|
<dd class=" mt-10">
|
|
{foreach $school as $key=>$vo }
|
|
<label class="ml-10">
|
|
<input type="checkbox" value="{$vo.id}" id="hjschool" name="danwei" onclick="dtreload()">
|
|
{$vo.jiancheng}
|
|
</label>
|
|
{/foreach}
|
|
</dd>
|
|
</dt>
|
|
</div>
|
|
<div>
|
|
{php}$category = getCategory(107);{/php}
|
|
<label class="f-l">职务:</label>
|
|
<dt>
|
|
<dd class=" mt-10">
|
|
{foreach $category as $key=>$vo }
|
|
<label class="ml-10">
|
|
<input type="checkbox" value="{$vo.id}" name="zhiwu" onclick="dtreload()">
|
|
{$vo.title}
|
|
</label>
|
|
{/foreach}
|
|
</dd>
|
|
</dt>
|
|
</div>
|
|
<div>
|
|
{php}$category = getCategory(106);{/php}
|
|
<label class="f-l">职专业技术职称:</label>
|
|
<dt>
|
|
<dd class=" mt-10">
|
|
{foreach $category as $key=>$vo }
|
|
<label class="ml-10">
|
|
<input type="checkbox" value="{$vo.id}" name="zhicheng" onclick="dtreload()">
|
|
{$vo.title}
|
|
</label>
|
|
{/foreach}
|
|
</dd>
|
|
</dt>
|
|
</div>
|
|
<div>
|
|
{php}$category = getCategory(105);{/php}
|
|
<label class="f-l">学历:</label>
|
|
<dt>
|
|
<dd class=" mt-10">
|
|
{foreach $category as $key=>$vo }
|
|
<label class="ml-10">
|
|
<input type="checkbox" value="{$vo.id}" name="xueli" onclick="dtreload()">
|
|
{$vo.title}
|
|
</label>
|
|
{/foreach}
|
|
</dd>
|
|
</dt>
|
|
</div>
|
|
<div>
|
|
{php}
|
|
$subject = new \app\teach\model\Subject;
|
|
$subject = $subject->where('status',1)->field('id,jiancheng')->select();
|
|
|
|
{/php}
|
|
<label class="f-l">任教学科:</label>
|
|
<dt>
|
|
<dd class=" mt-10">
|
|
{foreach $subject as $key=>$vo }
|
|
<label class="ml-10">
|
|
<input type="checkbox" value="{$vo.id}" name="subject" onclick="dtreload()">
|
|
{$vo.jiancheng}
|
|
</label>
|
|
{/foreach}
|
|
</dd>
|
|
</dt>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/block}
|
|
{block name="tables"}
|
|
<table id="table1" class="display" cellspacing="0" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th><input type="checkbox" name="" value=""></th>
|
|
<th>姓名</th>
|
|
<th>性别</th>
|
|
<th>周岁</th>
|
|
<th>学历</th>
|
|
<th>毕业院校</th>
|
|
<th>工龄</th>
|
|
<th>专业</th>
|
|
<th>工作单位</th>
|
|
<th>状态</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
{/block}
|
|
{block name="myjs"}
|
|
<script type="text/javascript">
|
|
|
|
// 定义DTajax参数
|
|
var myajax = {
|
|
url: "{:url('ajaxdata')}",
|
|
type: "post",
|
|
data: {
|
|
danwei:function(){
|
|
var chk = [];
|
|
$('input[name="danwei"]:checked').each(function(){
|
|
if(typeof($(this).val()) != "undefined")
|
|
{
|
|
chk.push($(this).val());
|
|
}
|
|
});
|
|
return chk;
|
|
},
|
|
zhiwu:function(){
|
|
var chk = [];
|
|
$('input[name="zhiwu"]:checked').each(function(){
|
|
if(typeof($(this).val()) != "undefined")
|
|
{
|
|
chk.push($(this).val());
|
|
}
|
|
});
|
|
return chk;
|
|
},
|
|
zhicheng:function(){
|
|
var chk = [];
|
|
$('input[name="zhicheng"]:checked').each(function(){
|
|
if(typeof($(this).val()) != "undefined")
|
|
{
|
|
chk.push($(this).val());
|
|
}
|
|
});
|
|
return chk;
|
|
},
|
|
xueli:function(){
|
|
var chk = [];
|
|
$('input[name="xueli"]:checked').each(function(){
|
|
if(typeof($(this).val()) != "undefined")
|
|
{
|
|
chk.push($(this).val());
|
|
}
|
|
});
|
|
return chk;
|
|
},
|
|
subject:function(){
|
|
var chk = [];
|
|
$('input[name="subject"]:checked').each(function(){
|
|
if(typeof($(this).val()) != "undefined")
|
|
{
|
|
chk.push($(this).val());
|
|
}
|
|
});
|
|
return chk;
|
|
},
|
|
|
|
},
|
|
};
|
|
|
|
|
|
|
|
// 定义列参数
|
|
var mycolumns = [
|
|
{ "data": "id" },
|
|
{ "data": "xingming" },
|
|
{ "data": "sex" },
|
|
{ "data": "age" ,"name":"shengri","defaultContent": ""},
|
|
{ "data": "js_xueli.title","name":"xueli","defaultContent": ""},
|
|
{ "data": "biye" },
|
|
{ "data": "gongling","name":"worktime","defaultContent": ""}, //工龄
|
|
{ "data": "zhuanye" },
|
|
{ "data": "js_danwei.jiancheng","name":"danwei","defaultContent": ""},
|
|
{ "data": "status" },
|
|
{ "data": "id" },
|
|
];
|
|
|
|
// 定义修改列参数
|
|
var mycolumnDefs =[
|
|
// 对象格式
|
|
{
|
|
"targets": 0,
|
|
"render": function(data, type, row, meta) {
|
|
return '<input type="checkbox" name="test" value="' + row.id + '" />'
|
|
}
|
|
},
|
|
{
|
|
"targets": 1,
|
|
"render": function(data, type, row, meta) {
|
|
return '<a title="查看信息" data-href="teacher/'+ row.id +'" data-title="'+row.xingming+'" onClick="Hui_admin_tab(this)" class="" style="text-decoration:none"><i class="Hui-iconfont">'+row.xingming+'</i></a>'
|
|
}
|
|
},
|
|
{
|
|
"targets": -1,
|
|
"className":'.td-manage',
|
|
"render": function(data, type, row, meta) {
|
|
// 停用按钮
|
|
stopbut = '<a style="text-decoration:none" onClick="stop(this,'+ row.id +')" href="javascript:;" title="停用"><i class="Hui-iconfont"></i></a>';
|
|
// 启用按钮
|
|
startbut = '<a style="text-decoration:none" onClick="start(this,'+ row.id +')" href="javascript:;" title="启用"><i class="Hui-iconfont"></i></a>';
|
|
// 编辑按钮
|
|
editbut = '<a title="编辑" href="javascript:void(0);" onclick=addfull("编辑","/teacher/'+row.id+'/edit") class="ml-5" style="text-decoration:none"><i class="Hui-iconfont"></i></a>';
|
|
delbut = '<a title="删除" href="javascript:void(0);" onclick=del(this,"/teacher/'+row.id+'") class="ml-5" style="text-decoration:none"><i class="Hui-iconfont"></i></a>';
|
|
if(row.status == '已停用')
|
|
{
|
|
buts = startbut + editbut + delbut;
|
|
}else{
|
|
buts = stopbut + editbut + delbut;
|
|
}
|
|
|
|
return buts;
|
|
}
|
|
},
|
|
{
|
|
"targets": -2,
|
|
"className":'.td-status',
|
|
"render": function(data, type, row, meta) {
|
|
if(row.status == '已停用')
|
|
{
|
|
d = "<span class='label label-error radius'>" + row.status + "</span>";
|
|
}else{
|
|
d = "<span class='label label-success radius'>" + row.status + "</span>";
|
|
}
|
|
|
|
return d;
|
|
},
|
|
},
|
|
{
|
|
"orderable": false,
|
|
"targets": [0,-1]
|
|
},
|
|
];
|
|
|
|
// 筛选成绩面板折叠
|
|
$('#shaixuan').click(function(){
|
|
$(this).next().toggle();
|
|
});
|
|
|
|
// 重载数据
|
|
function dtreload()
|
|
{
|
|
$('#table1').DataTable().ajax.reload();
|
|
}
|
|
</script>
|
|
{/block} |