bt-yjj-system-examination-s.../src/main/resources/static/route/classplan/list-merge-user.html
2021-05-15 20:47:15 +08:00

154 lines
5.7 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<base href="/signup/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" href="assets/js/vendor/zTree3/css/metroStyle/metroStyle.css"/>
<link rel="stylesheet" href="assets/layuiadmin/style/common.css" media="all">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-row layui-col-space15">
<div class="layui-col-md2 layui-col-sm2 layui-col-xs2">
<div class="layui-card">
<div class="layui-card-body left-tree-wrap">
<div id="leftTreeWrap">
<ul id="leftTree" class="ztree"></ul>
</div>
</div>
</div>
</div>
<div class="layui-col-md10 layui-col-sm10 layui-col-xs10">
<div class="layui-card">
<div id="listContentWrap" class="layui-card-body">
<blockquote id="treeTitle" class="layui-elem-quote">所有报名人员信息</blockquote>
<iframe id="listContent" frameborder="0" class="layadmin-iframe" style="margin-top: 65px;"></iframe>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script>
var common;
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'ztree', 'common'], function() {
common = layui.common;
var $ = layui.$;
var $win = $(window);
var resizeTimeout = null;
var parentId = '0';
var parentName = '';
var orgInfo = {};
var orgId = orgInfo.institutionId;
function initData(){
initSize();
getOrgInfo();
}
initData();
// 初始化大小
function initSize() {
$('#leftTreeWrap').css({
height: $win.height() - 40,
overflow: 'auto'
});
$('#listContentWrap').css({
height: $win.height() - 120,
});
}
function getOrgInfo(){
top.restAjax.get(top.restAjax.path('api/teacher/getorginfo', []), {}, null, function (code, data) {
orgInfo = data;
initThree();
$('#listContent').attr('src', top.restAjax.path('route/classplan/list-signup.html?orgId={arg1}&workerCatalog={arg2}',
[orgId,'']));
}, function (code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化树
function initThree() {
var setting = {
async: {
enable: true,
autoLoad: false,
type: 'get',
url: top.restAjax.path('api/worktype/listztree', []),
autoParam: ['id'],
otherParam: {
id : function () {
return parentId;
}
},
dataFilter: function (treeId, parentNode, childNodes) {
if (!childNodes) return null;
for (var i = 0, l = childNodes.length; i < l; i++) {
childNodes[i].name = childNodes[i].name.replace(/\.n/g, '.');
}
return childNodes;
}
},
callback: {
onClick: function (event, treeId, treeNode) {
if(treeNode.pId == '-1'){
$('#treeTitle').text('所有报名人员信息');
$('#listContent').attr('src', top.restAjax.path('route/classplan/list-signup.html?orgId={arg1}&workerCatalog={arg2}',
[orgId,'']));
return;
}
if(treeNode.isParent == true){
return;
}
parentId = treeNode.id;
parentName = treeNode.name;
$('#treeTitle').text(parentName);
initIFrame();
return false;
}
},
};
var zTree = $.fn.zTree.init($("#leftTree"), setting);
zTree.addNodes(null, {
id: '0',
pId: '-1',
name: '所有工种类型',
url: 'javascript:;',
isParent: 'true'
});
common.refreshTree('leftTree');
}
// 初始化IFrame
function initIFrame() {
$('#listContent').attr('src', top.restAjax.path('route/classplan/list-signup.html?orgId={arg1}&workerCatalog={arg2}',
[orgId,parentId]));
}
// 事件 - 页面变化
$win.on('resize', function() {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(function() {
initSize();
}, 500);
});
});
</script>
</body>
</html>