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.

79 lines
2.5 KiB

2 years ago
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
2 years ago
<link rel="stylesheet" href="../../component/pear/css/pear.css" />
2 years ago
</head>
<body class="pear-container">
<div class="layui-card">
<div class="layui-card-body">
<table id="task-table" lay-filter="task-table"></table>
</div>
</div>
<script type="text/html" id="task-toolbar">
<button class="layui-btn" lay-event="add">
2 years ago
<i class="layui-icon layui-icon-download-circle"></i>
2 years ago
导出EXCEL
</button>
</script>
2 years ago
<script src="../../component/layui/layui.js"></script>
<script src="../../component/pear/pear.js"></script>
2 years ago
<script>
layui.use(['table', 'form', 'jquery', 'common'], function () {
let table = layui.table;
let form = layui.form;
let $ = layui.jquery;
let common = layui.common;
let cols = [
[
2 years ago
{ field: 'num', title: '名次', align: 'center', width: "10%" }
, { field: 'person_name', title: '姓名', align: 'center' }
, { field: 'score', title: '得分', align: 'center', width: "10%" }
, { field: 'start_time', title: '开始时间', align: 'center', width: "20%" }
, { field: 'end_time', title: '交卷时间', align: 'center', width: "20%" }
, { field: 'ys', title: '用时', align: 'center', width: "20%" }
2 years ago
]
]
tableRender()
function tableRender() {
table.render({
elem: '#task-table',
2 years ago
url: '/FengHuang/exam/getPageSummary',
2 years ago
page: {
2 years ago
limit: 10
2 years ago
, layout: ['count', 'prev', 'page', 'next', 'skip']
, prev: "上一页"
, next: "下一页"
},
cols: cols,
2 years ago
skin: 'line',
toolbar: '#task-toolbar',
2 years ago
defaultToolbar: []
});
}
2 years ago
2 years ago
table.on('toolbar(task-table)', function (data) {
if (data.event === 'add') {
2 years ago
window.location = "/FengHuang/exam/exportExcel";
2 years ago
}
2 years ago
});
2 years ago
2 years ago
2 years ago
})
</script>
</body>
</html>