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.

168 lines
6.8 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">
<button class="layui-btn layui-btn-sm" lay-submit lay-filter="user-query">
<i class="layui-icon layui-icon-search"></i>
查询
</button>
</div> -->
<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.extend({
toast: '../../../component/pear/module/toast' // {/}的意思即代表采用自有路径,即不跟随 base 路径
}).use(['toast'], function () {
var $ = layui.jquery;
var table = layui.table;
var form = layui.form;
table.render({
elem: '#myTable',
id: 'test',
url: '/QingLong/zbdc/getSummaryCgzb',
cellExpandedMode: "tips",
height: 'full-35',
cols: [
[
{ title: '序号', align: 'center', width: "60", type: 'numbers', rowspan: 2 },
{ title: '行政区域', field: 'area_name', align: 'center', width: "190", rowspan: 2 },
{ title: '基础环境', align: 'center', colspan: 4 },
{ title: '数字终端', align: 'center', colspan: 7 },
{ title: '数字化教学空间', align: 'center', colspan: 7 },
{ title: '文化生活空间', align: 'center', colspan: 4 },
{ title: '网络安全', align: 'center', colspan: 1 },
],
[
//基础环境
{ title: '设备总数', field: 'wl_cgss', align: 'center', width: "100" },
{ title: '网络环境设备(台)', field: 'wl_tjss', align: 'center', width: "125" },
{ title: '存储容量设备(台)', field: 'wl_yqsss', align: 'center', width: "125" },
{ title: '校园安全监控设备(台)', field: 'wl_pbl', align: 'center', width: "155" },
//数字终端
{ title: '设备总数', field: 'hx_cgss', align: 'center', width: "100" },
{ title: '正常使用(台)', field: 'hx_tjss', align: 'center', width: "115" },
{ title: '学生计算机教室设(台)', field: 'hx_yqsss', align: 'center', width: "155" },
{ title: '智慧教室设备(台)', field: 'hx_pbl', align: 'center', width: "125" },
{ title: '电子图书阅览室设备(台)', field: 'hx_pbl', align: 'center', width: "160" },
{ title: '教师用计算机(台)', field: 'hx_pbl', align: 'center', width: "125" },
{ title: '电子备课室设备(台)', field: 'hx_pbl', align: 'center', width: "135" },
//数字化教学空间
{ title: '设备总数', field: 'hx_cgss', align: 'center', width: "100" },
{ title: '多媒体教室设备(台)', field: 'hx_tjss', align: 'center', width: "135" },
{ title: '多功能教室设备(台)', field: 'hx_yqsss', align: 'center', width: "135" },
{ title: '竞品录播教室设备(台)', field: 'hx_pbl', align: 'center', width: "155" },
{ title: '常态化录播教室设备(台)', field: 'hx_pbl', align: 'center', width: "160" },
{ title: '语音系统设备(台)', field: 'hx_pbl', align: 'center', width: "125" },
{ title: '创新类活动室设备(台)', field: 'hx_pbl', align: 'center', width: "155" },
//文化生活空间
{ title: '设备总数', field: 'hx_cgss', align: 'center', width: "100" },
{ title: '校园广播设备(台)', field: 'hx_cgss', align: 'center', width: "125" },
{ title: '虚拟演播室设备(台)', field: 'hx_cgss', align: 'center', width: "135" },
{ title: '校园电视系统设备(台)', field: 'hx_cgss', align: 'center', width: "155" },
//网络安全
{ title: '互联网带宽(MB)', field: 'hx_cgss', align: 'center', width: "125" },
]
],
// skin: 'line',
// defaultToolbar: []
});
form.on('submit(user-query)', function () {
table.exportFile([[['a','b'], '性别', '年龄']], [
['张三', '男', '20'],
['李四', '女', '18'],
['王五', '女', '19']
], {
type: 'csv', // 导出的文件格式,支持: csv,xls
title: '导出的文件标题'
});
// 阻止表单的默认提交行为
return false;
});
});
</script>
</body>
</html>