98 lines
2.4 KiB
HTML
98 lines
2.4 KiB
HTML
|
|
<!DOCTYPE html>
|
|||
|
|
<html>
|
|||
|
|
|
|||
|
|
<head>
|
|||
|
|
<meta charset="utf-8">
|
|||
|
|
<title>我的作业</title>
|
|||
|
|
<link rel="stylesheet" href="js/layui-v2.5.6/layui/css/layui.css" media="all">
|
|||
|
|
<style type="text/css">
|
|||
|
|
.layui-btn-primary {
|
|||
|
|
border: 1px solid #C9C9C9;
|
|||
|
|
background-color: #01b9dd !important;
|
|||
|
|
color: white !important;
|
|||
|
|
}
|
|||
|
|
</style>
|
|||
|
|
<script>
|
|||
|
|
function mskc(data) {
|
|||
|
|
layer.open({
|
|||
|
|
type: 2,
|
|||
|
|
area: ['50%', '70%'],
|
|||
|
|
title: "查看具体",
|
|||
|
|
maxmin: true,
|
|||
|
|
content: 'mskcform.html',
|
|||
|
|
btn: ['关闭'],
|
|||
|
|
yes: function(index) {
|
|||
|
|
layer.close(index);
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
</script>
|
|||
|
|
</head>
|
|||
|
|
</head>
|
|||
|
|
|
|||
|
|
<body>
|
|||
|
|
<table id="demo" class="layui-hide" lay-filter="xk"></table>
|
|||
|
|
|
|||
|
|
<script type="text/html" id="barDemo">
|
|||
|
|
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
|||
|
|
</script>
|
|||
|
|
<script src="js/layui-v2.5.6/layui/layui.all.js"></script>
|
|||
|
|
<script>
|
|||
|
|
layui.use('table', function() {
|
|||
|
|
var table = layui.table;
|
|||
|
|
table.render({
|
|||
|
|
elem: '#demo',
|
|||
|
|
url: 'files/mskc.json' //数据接口
|
|||
|
|
,
|
|||
|
|
cellMinWidth: 80 //全局定义常规单元格的最小宽度
|
|||
|
|
,
|
|||
|
|
page: true //开启分页
|
|||
|
|
,
|
|||
|
|
cols: [
|
|||
|
|
[ //表头
|
|||
|
|
{
|
|||
|
|
field: 'kcbt',
|
|||
|
|
title: '课程标题'
|
|||
|
|
}, {
|
|||
|
|
field: 'kclx',
|
|||
|
|
title: '课程类型'
|
|||
|
|
}, {
|
|||
|
|
field: 'khfs',
|
|||
|
|
title: '考核方式'
|
|||
|
|
}, {
|
|||
|
|
field: 'kczt',
|
|||
|
|
title: '课程状态'
|
|||
|
|
}, {
|
|||
|
|
field: 'jssj',
|
|||
|
|
title: '结束时间'
|
|||
|
|
},{
|
|||
|
|
field: 'yxrs',
|
|||
|
|
title: '已选人数'
|
|||
|
|
}, {
|
|||
|
|
field: 'pxwcrs',
|
|||
|
|
title: '培训完成人数'
|
|||
|
|
},{
|
|||
|
|
fixed: 'right',
|
|||
|
|
title: '查看具体信息',
|
|||
|
|
width: 165,
|
|||
|
|
align: 'center',
|
|||
|
|
toolbar: '#barDemo'
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
]
|
|||
|
|
});
|
|||
|
|
//监听行工具事件
|
|||
|
|
table.on('tool(xk)', function(obj) { //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
|
|||
|
|
var data = obj.data //获得当前行数据
|
|||
|
|
,
|
|||
|
|
layEvent = obj.event; //获得 lay-event 对应的值
|
|||
|
|
if (layEvent === 'detail') {
|
|||
|
|
mskc();
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
</script>
|
|||
|
|
</body>
|
|||
|
|
|
|||
|
|
</html>
|