main
kgdxpr 1 year ago
parent b103a42d27
commit 41c6cafea4

@ -8,11 +8,6 @@
<link rel="stylesheet" href="../../../component/pear/css/module/toast.css" />
<style>
.layui-table-cell {
height: 50px;
line-height: 40px;
}
th {
color: #303133;
background-color: #f5f7fa;
@ -66,11 +61,11 @@
<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>
@ -110,7 +105,7 @@
</button>
</div>
<table class="layui-table" id="myTable"></table>
<table class="layui-table" id="myTable"></table>
</div>
</div>
@ -127,7 +122,7 @@
var table = layui.table;
var toast = layui.toast;
var form = layui.form;
var laytpl = layui.laytpl;
var laytpl = layui.laytpl;
$.ajax({
@ -140,7 +135,7 @@
laytpl(xzqhTpl).render(res.data, function (html) {
xzqhView.innerHTML = html;
});
form.render();
form.render();
}
});
@ -154,29 +149,69 @@
laytpl(xxlxTpl).render(res.data, function (html) {
xxlxView.innerHTML = html;
});
form.render();
form.render();
}
});
tableRender();
function tableRender() {
table.render({
elem: '#myTable',
url: '/QingLong/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: '序号', align: 'center', width: "60", type: 'numbers', rowspan: 2 },
{ title: '行政区域', field: 'area_name', align: 'center', width: "150", rowspan: 2 },
{ title: '学校名称', field: 'bureau_name', align: 'center', width: "300", rowspan: 2 },
{ title: '学校类型', field: 'school_type_name', align: 'center', width: "100", 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: '小学部', align: 'center', colspan: 3 },
{ title: '初中部', align: 'center', colspan: 3 },
{ title: '高中部', align: 'center', colspan: 3 }
],
[
{ title: '班级数', field: 'xx_class_count', align: 'center', width: "100" },
{ title: '学生数', align: 'xx_student_count', align: 'center', width: "100" },
{ title: '教职工数', align: 'xx_teacher_count', align: 'center', width: "100" },
{ title: '班级数', field: 'cz_class_count', align: 'center', width: "100" },
{ title: '学生数', align: 'cz_student_count', align: 'center', width: "100" },
{ title: '教职工数', align: 'cz_teacher_count', align: 'center', width: "100" },
{ title: '班级数', field: 'gz_class_count', align: 'center', width: "100" },
{ title: '学生数', align: 'gz_student_count', align: 'center', width: "100" },
{ title: '教职工数', align: 'gz_teacher_count', align: 'center', width: "100" }
]
],
// skin: 'line',
defaultToolbar: []
});
}
form.on('submit(user-query)', function () {
tableRender()
// 阻止表单的默认提交行为
return false;
});
});
</script>

@ -24,35 +24,7 @@
.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;
}
}
.woo-tool-text-delimiter {
width: 1px;

Loading…
Cancel
Save