135 lines
4.6 KiB
HTML
135 lines
4.6 KiB
HTML
<!DOCTYPE html>
|
|
<html class="x-admin-sm">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>{$list.title}</title>
|
|
<meta name="renderer" content="webkit">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
|
|
{load href="__STATIC__/xadmin/css/font.css" /}
|
|
{load href="__STATIC__/xadmin/css/xadmin.css" /}
|
|
{load href="__STATIC__/xadmin/js/jquery.min.js" /}
|
|
{load href="__STATIC__/xadmin/lib/layui/layui.js" /}
|
|
{load href="__STATIC__/xadmin/js/xadmin.js" /}
|
|
{load href="__STATIC__/xadmin/js/cookie.js" /}
|
|
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
|
<!--[if lt IE 9]>
|
|
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
|
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
|
<![endif]-->
|
|
</head>
|
|
|
|
<body class="">
|
|
<div class="x-nav">
|
|
<span class="layui-breadcrumb">
|
|
<a href="">系统管理</a>
|
|
<a href="">单位管理</a>
|
|
<a>
|
|
<cite>单位列表</cite></a>
|
|
</span>
|
|
<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
|
|
<i class="layui-icon" style="line-height:30px">ဂ</i></a>
|
|
</div>
|
|
<div class="x-body">
|
|
<div class="layui-row">
|
|
<form class="layui-form layui-col-md12 x-so">
|
|
<input class="layui-input" autocomplete="off" placeholder="开始日" name="start" id="start">
|
|
<input class="layui-input" autocomplete="off" placeholder="截止日" name="end" id="end">
|
|
<input type="text" name="username" placeholder="请输入用户名" autocomplete="off" class="layui-input">
|
|
<button class="layui-btn" lay-submit="" lay-filter="sreach"><i class="layui-icon"></i></button>
|
|
</form>
|
|
</div>
|
|
<table id="demo" lay-filter="test"></table>
|
|
</div>
|
|
<script type="text/html" id="toolbarDemo">
|
|
<div class="layui-btn-container">
|
|
<button class="layui-btn layui-btn-sm" lay-event="getCheckData">获取选中行数据</button>
|
|
<button class="layui-btn layui-btn-sm" lay-event="getCheckLength">获取选中数目</button>
|
|
<button class="layui-btn layui-btn-sm" lay-event="isAll">验证是否全选</button>
|
|
</div>
|
|
</script>
|
|
<script type="text/html" id="switchTpl">
|
|
<!-- 这里的 checked 的状态只是演示 -->
|
|
<input type="checkbox" name="sex" value="{{d.id}}" lay-skin="switch" lay-text="女|男" lay-filter="sexDemo" {{ d.id == 10003 ? 'checked' : '' }}>
|
|
</script>
|
|
<script>
|
|
layui.use('laydate', function(){
|
|
var laydate = layui.laydate;
|
|
|
|
//执行一个laydate实例
|
|
laydate.render({
|
|
elem: '#start' //指定元素
|
|
});
|
|
|
|
//执行一个laydate实例
|
|
laydate.render({
|
|
elem: '#end' //指定元素
|
|
});
|
|
|
|
|
|
});
|
|
</script>
|
|
|
|
<script>
|
|
layui.use('table', function(){
|
|
var table = layui.table;
|
|
|
|
//头工具栏事件
|
|
table.on('toolbar(test)', function(obj){
|
|
var checkStatus = table.checkStatus(obj.config.id);
|
|
switch(obj.event){
|
|
case 'getCheckData':
|
|
var data = checkStatus.data;
|
|
layer.alert(JSON.stringify(data));
|
|
break;
|
|
case 'getCheckLength':
|
|
var data = checkStatus.data;
|
|
layer.msg('选中了:'+ data.length + ' 个');
|
|
break;
|
|
case 'isAll':
|
|
layer.msg(checkStatus.isAll ? '全选': '未全选');
|
|
break;
|
|
};
|
|
});
|
|
|
|
|
|
|
|
|
|
//第一个实例
|
|
table.render({
|
|
elem: '#demo',
|
|
height: 312,
|
|
url:"{:url('ajaxdata')}",
|
|
method:"POST", //数据接口
|
|
page: true, //开启分页
|
|
loading:true,
|
|
cols: [[ //表头
|
|
{type:'checkbox', fixed: 'left'},
|
|
{field: 'title', title: '单位名称',sort: true},
|
|
{field: 'jiancheng', title: '单位简称'},
|
|
{field: 'dw_xingzhi.title', title: '性质',sort: true},
|
|
{field: 'dw_jibie.title', title: '级别'} ,
|
|
{field: 'dw_xueduan.title', title: '学段'},
|
|
{field: 'paixu', title: '排序', sort: true},
|
|
{field: 'dw_teacher_count', title: '教师数', sort: true},
|
|
{field: 'status', title: '状态'},
|
|
{field: 'id', title: '操作', sort: true}
|
|
]],
|
|
limits:[1],
|
|
limit:1,
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |