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.
167 lines
4.9 KiB
167 lines
4.9 KiB
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title></title>
|
|
<link rel="stylesheet" href="../../../component/pear/css/pear.css" />
|
|
<style>
|
|
.woo-tool-text-delimiter {
|
|
width: 1px;
|
|
height: 12px;
|
|
background: #EEEEEE;
|
|
display: inline-block;
|
|
margin: 0 6px 0 4px;
|
|
}
|
|
|
|
.woo-theme-color {
|
|
color: #2d8cf0 !important;
|
|
}
|
|
|
|
.woo-tool-span {
|
|
margin: 0 3px;
|
|
position: relative;
|
|
top: -1px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.layui-table-tool-temp {
|
|
padding-right: 0;
|
|
}
|
|
|
|
.layui-table-checked {
|
|
background-color: #ff5722 !important;
|
|
color: #EEEEEE;
|
|
}
|
|
|
|
.outer {
|
|
width: 500px;
|
|
height: 500px;
|
|
|
|
}
|
|
|
|
.inner {
|
|
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="pear-container layui-form">
|
|
|
|
<div class="layui-card">
|
|
<div class="layui-card-body">
|
|
<table id="data-table"></table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script type="text/html" id="table-bar">
|
|
<span class="woo-tool-span woo-tool-text-span" lay-event="viewDetails"><a
|
|
class="woo-theme-color">查看详情</a></span>
|
|
<i class="woo-tool-text-delimiter"></i>
|
|
<span class="woo-tool-span woo-tool-text-span" lay-event="downExcel"><a
|
|
class="woo-theme-color">下载EXCEL</a></span>
|
|
<i class="woo-tool-text-delimiter"></i>
|
|
<span class="woo-tool-span woo-tool-text-span" lay-event="viewLog"><a
|
|
class="woo-theme-color">查看日志</a></span>
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<script src="../../../component/layui/layui.js"></script>
|
|
<script src="../../../component/pear/pear.js"></script>
|
|
|
|
<script>
|
|
layui.use(['table', 'form', 'jquery', 'common', 'laytpl'], function () {
|
|
var table = layui.table;
|
|
var form = layui.form;
|
|
var $ = layui.jquery;
|
|
var common = layui.common;
|
|
var laytpl = layui.laytpl;
|
|
|
|
tableRender();
|
|
|
|
function tableRender() {
|
|
table.render({
|
|
elem: '#data-table',
|
|
url: '/QingLong/yunxiao/getTop10',
|
|
where: {
|
|
page: 1,
|
|
limit: 100,
|
|
system_id: 0
|
|
},
|
|
height: 'full-60',
|
|
cols: [[
|
|
{ title: '开始时间', field: 'st', align: 'center', width: "10%" },
|
|
{ title: '结束时间', field: 'ed', align: 'center', width: "10%" },
|
|
{ title: '单位数', field: 'ds_base_bureau', align: 'center' },
|
|
{ title: '部门数', field: 'ds_base_org', align: 'center' },
|
|
{ title: '班级数', field: 'ds_base_class', align: 'center' },
|
|
{ title: '教师数', field: 'ds_base_teacher', align: 'center' },
|
|
{ title: '学生数', field: 'ds_base_student', align: 'center' },
|
|
{ title: '学段数', field: 'ds_res_stage', align: 'center' },
|
|
{ title: '学科数', field: 'ds_res_subject', align: 'center' },
|
|
{ title: '版本数', field: 'ds_res_edition', align: 'center' },
|
|
{ title: '教材数', field: 'ds_res_textbook', align: 'center' },
|
|
{ title: '教材章节数', field: 'ds_res_chapter', align: 'center' },
|
|
{ title: '操作', toolbar: '#table-bar', align: 'center', width: "20%" }
|
|
]],
|
|
skin: 'line',
|
|
defaultToolbar: [],
|
|
parseData: function (res) {
|
|
for (var i = 0; i < res.data.length; i++) {
|
|
if (i === 5) {
|
|
res.data[i].LAY_CHECKED = true;
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
});
|
|
}
|
|
|
|
table.on('tool(data-table)', function (obj) {
|
|
if (obj.event === 'viewDetails') {
|
|
window.viewDetails(obj);
|
|
} else if (obj.event === 'downExcel') {
|
|
window.downExcel(obj);
|
|
} else if (obj.event === 'viewLog') {
|
|
window.viewLog(obj);
|
|
}
|
|
});
|
|
|
|
|
|
|
|
window.viewDetails = function (obj) {
|
|
window.open('/QingLong/Logs/' + obj.data.start_time + '.html');
|
|
}
|
|
|
|
window.downExcel = function (obj) {
|
|
window.location = '/QingLong/Logs/' + obj.data.start_time + '.xlsx';
|
|
}
|
|
|
|
window.viewLog = function (obj) {
|
|
var pdfUrl = "/QingLong/Logs/" + obj.data.start_time + ".pdf";
|
|
layer.open({
|
|
type: 2,
|
|
title: '查看日志',
|
|
shade: 0.1,
|
|
area: ['800px', '680px'],
|
|
content: './pdfjs/web/viewer.html?file=' + encodeURIComponent(pdfUrl)
|
|
});
|
|
}
|
|
|
|
function GetQueryString(name, istop) {
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
|
var r = window.location.search.substr(1).match(reg);
|
|
if (typeof (istop) != "undefined") r = top.location.search.substr(1).match(reg);
|
|
|
|
if (r != null) return unescape(r[2]);
|
|
return null;
|
|
}
|
|
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html> |