You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
263 lines
10 KiB
263 lines
10 KiB
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title></title>
|
|
<link rel="stylesheet" href="../../../component/layui/css/layui.css" />
|
|
<link rel="stylesheet" href="../../../component/pear/css/module/toast.css" />
|
|
|
|
<style>
|
|
th {
|
|
color: #303133;
|
|
background-color: #f5f7fa;
|
|
}
|
|
|
|
.layui-card {
|
|
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0) !important;
|
|
margin-bottom: 0 !important;
|
|
}
|
|
|
|
.layui-form-item {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.layui-table td,
|
|
.layui-table th {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.bp {
|
|
background-color: rgba(23, 179, 163, .1);
|
|
padding: 5px 10px;
|
|
height: 32px;
|
|
line-height: 30px;
|
|
font-size: 12px;
|
|
color: #17b3a3;
|
|
border-radius: 4px;
|
|
-webkit-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
border: 1px solid rgba(23, 179, 163, .2);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.xp {
|
|
background-color: rgba(144, 147, 153, .1);
|
|
padding: 5px 10px;
|
|
height: 32px;
|
|
line-height: 30px;
|
|
font-size: 12px;
|
|
color: #909399;
|
|
border-radius: 4px;
|
|
-webkit-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
border: 1px solid rgba(144, 147, 153, .2);
|
|
white-space: nowrap;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="layui-form">
|
|
|
|
<div class="layui-card">
|
|
<div class="layui-card-body">
|
|
|
|
<div class="layui-form-item layui-inline">
|
|
<label class="layui-form-label" style="width: auto;">行政区划:</label>
|
|
<div class="layui-input-inline" id="xzqhView"></div>
|
|
|
|
<script id="xzqhScript" type="text/html">
|
|
<select id="xzqhId" lay-filter="xzqh">
|
|
<option value="">全部</option>
|
|
{{# layui.each(d, function(index, item){ }}
|
|
<option value="{{item.id}}">{{item.area_name}}</option>
|
|
{{# }); }}
|
|
</select>
|
|
</script>
|
|
</div>
|
|
|
|
<div class="layui-form-item layui-inline">
|
|
<label class="layui-form-label" style="width: auto;">学校类型:</label>
|
|
<div class="layui-input-inline" id="xxlxView"></div>
|
|
|
|
<script id="xxlxScript" type="text/html">
|
|
<select id="xxlxId" lay-filter="xxlx">
|
|
<option value="-1">全部</option>
|
|
{{# layui.each(d, function(index, item){ }}
|
|
<option value="{{item.school_type_id}}">{{item.school_type_name}}</option>
|
|
{{# }); }}
|
|
</select>
|
|
</script>
|
|
</div>
|
|
|
|
<div class="layui-form-item layui-inline">
|
|
<label class="layui-form-label" style="width: auto;">学校名称:</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" lay-affix="clear" id="xxmc" placeholder="请输入学校名称" class="layui-input">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="layui-form-item layui-inline">
|
|
<button class="layui-btn layui-btn-sm" lay-submit lay-filter="user-query">
|
|
<i class="layui-icon layui-icon-search"></i>
|
|
查询
|
|
</button>
|
|
</div>
|
|
|
|
<button class="layui-btn layui-btn-sm layui-bg-orange" lay-submit lay-filter="export" style="position: fixed;right: 20px;top:15px">
|
|
<i class="layui-icon layui-icon-download-circle"></i>
|
|
导出
|
|
</button>
|
|
|
|
<table class="layui-table" id="myTable"></table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<script src="../../../component/layui/layui.js"></script>
|
|
<script src="../../../component/pear/xm-select.js"></script>
|
|
|
|
<script>
|
|
layui.use(function () {
|
|
var $ = layui.jquery;
|
|
var table = layui.table;
|
|
var toast = layui.toast;
|
|
var form = layui.form;
|
|
var laytpl = layui.laytpl;
|
|
|
|
|
|
$.ajax({
|
|
type: "GET",
|
|
async: false,
|
|
url: "/dsBase/zbdc/getXzqhList",
|
|
success: function (res) {
|
|
var xzqhTpl = xzqhScript.innerHTML,
|
|
xzqhView = document.getElementById('xzqhView');
|
|
laytpl(xzqhTpl).render(res.data, function (html) {
|
|
xzqhView.innerHTML = html;
|
|
});
|
|
form.render();
|
|
}
|
|
});
|
|
|
|
$.ajax({
|
|
type: "GET",
|
|
async: false,
|
|
url: "/dsBase/zbdc/getCurrentPersonAreaInfo",
|
|
success: function (res) {
|
|
if (res.shi_master != 1) {
|
|
|
|
$("#xzqhId").val(res.area_id);
|
|
$("#xzqhId").prop('disabled', true);
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
|
|
$.ajax({
|
|
type: "GET",
|
|
async: false,
|
|
url: "/dsBase/zbdc/getQuerySchoolType",
|
|
success: function (res) {
|
|
var xxlxTpl = xxlxScript.innerHTML,
|
|
xxlxView = document.getElementById('xxlxView');
|
|
laytpl(xxlxTpl).render(res.data, function (html) {
|
|
xxlxView.innerHTML = html;
|
|
});
|
|
form.render();
|
|
}
|
|
});
|
|
|
|
tableRender();
|
|
|
|
function tableRender() {
|
|
table.render({
|
|
elem: '#myTable',
|
|
url: '/dsBase/zbdc/getQueryBaseInfo',
|
|
where: {
|
|
area_id: $("#xzqhId").val(),
|
|
school_type_id: $("#xxlxId").val(),
|
|
keyword: $("#xxmc").val()
|
|
},
|
|
cellExpandedMode: "tips",
|
|
height: 'full-70',
|
|
page: {
|
|
limit: 15
|
|
, layout: ['count', 'prev', 'page', 'next', 'skip']
|
|
, prev: "上一页"
|
|
, next: "下一页"
|
|
},
|
|
cols: [
|
|
[
|
|
{ title: '序号', fixed: 'left', align: 'center', width: "60", type: 'numbers', rowspan: 2 },
|
|
{ title: '行政区域', fixed: 'left', field: 'area_name', align: 'center', width: "150", rowspan: 2 },
|
|
{ title: '学校名称', fixed: 'left', field: 'bureau_name', align: 'center', width: "300", rowspan: 2 },
|
|
{ title: '学校类型', field: 'school_type_name', align: 'center', width: "125", rowspan: 2 },
|
|
{ title: '学生总数', field: 'student_count', align: 'center', width: "100", rowspan: 2 },
|
|
{ title: '班级总数', field: 'class_count', align: 'center', width: "100", rowspan: 2 },
|
|
{ title: '教职工总数', field: 'teacher_count', align: 'center', width: "100", rowspan: 2 },
|
|
{ title: '专任教师总数', field: 'zhuanren_count', align: 'center', width: "115", rowspan: 2 },
|
|
|
|
{ title: '小学部', align: 'center', colspan: 4 },
|
|
{ title: '初中部', align: 'center', colspan: 4 },
|
|
{ title: '高中部', align: 'center', colspan: 4 }
|
|
],
|
|
[
|
|
{ title: '班级数', field: 'xx_class_count', align: 'center', width: "100" },
|
|
{ title: '学生数', field: 'xx_student_count', align: 'center', width: "100" },
|
|
{ title: '教职工数', field: 'xx_teacher_count', align: 'center', width: "100" },
|
|
{ title: '专任教师数', field: 'xx_zhuanren_count', align: 'center', width: "105"},
|
|
|
|
{ title: '班级数', field: 'cz_class_count', align: 'center', width: "100" },
|
|
{ title: '学生数', field: 'cz_student_count', align: 'center', width: "100" },
|
|
{ title: '教职工数', field: 'cz_teacher_count', align: 'center', width: "100" },
|
|
{ title: '专任教师数', field: 'cz_zhuanren_count', align: 'center', width: "105"},
|
|
|
|
{ title: '班级数', field: 'gz_class_count', align: 'center', width: "100" },
|
|
{ title: '学生数', field: 'gz_student_count', align: 'center', width: "100" },
|
|
{ title: '教职工数', field: 'gz_teacher_count', align: 'center', width: "100" },
|
|
{ title: '专任教师数', field: 'gz_zhuanren_count', align: 'center', width: "105"}
|
|
|
|
]
|
|
],
|
|
// skin: 'line',
|
|
defaultToolbar: []
|
|
});
|
|
}
|
|
|
|
form.on('submit(user-query)', function () {
|
|
|
|
tableRender()
|
|
|
|
// 阻止表单的默认提交行为
|
|
return false;
|
|
});
|
|
|
|
form.on('select(xzqh)', function () {
|
|
tableRender();
|
|
// 阻止表单的默认提交行为
|
|
return false;
|
|
});
|
|
|
|
form.on('select(xxlx)', function () {
|
|
tableRender();
|
|
// 阻止表单的默认提交行为
|
|
return false;
|
|
});
|
|
|
|
form.on('submit(export)', function () {
|
|
var url = "/dsBase/zbdc/getQueryBaseInfo?export_flag=1&page=1&limit=1000&area_id=" + $("#xzqhId").val() + "&school_type_id=" + $("#xxlxId").val() + "&keyword=" + $("#xxmc").val();
|
|
window.location.href = url;
|
|
// 阻止表单的默认提交行为
|
|
return false;
|
|
});
|
|
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html> |