123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/webpage/include/taglib.jsp"%>
- <html>
- <head>
- <title>岗位管理</title>
- <meta name="decorator" content="default"/>
- <%@include file="/webpage/include/treeview.jsp" %>
- <style type="text/css">
- .ztree {overflow:auto;margin:0;_margin-top:10px;padding:10px 0 0 10px;}
- </style>
- <script type="text/javascript">
- function refresh(){//刷新
- window.location="${ctx}/sys/role/";
- }
- </script>
- <style>
- body{
- background-color:transparent;
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
- color:#ffffff;
- background-color:rgba(255,255,255,0);
- height:100%;
- }
- </style>
- </head>
- <body>
- <div class="wrapper wrapper-content full-width" id="divId">
- <sys:message content="${message}"/>
- <div id="content" class="pr full-height full-width">
- <div id="left" class="contentShadow fl contents">
- <div class="ztreeContainer">
- <div id="ztree" class="ztree leftBox-content"></div>
- </div>
- </div>
- <div id="right" class="fl contents">
- <div class="layui-row contentShadow full-height tran-bg">
- <iframe id="userContent" name="userContent" src="${ctx}/sys/role/list" width="100%" height="100%" frameborder="0"></iframe>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- function addDiyDom(treeId, treeNode) {
- var spaceWidth = 15;
- var switchObj = $("#" + treeNode.tId + "_switch"),
- icoObj = $("#" + treeNode.tId + "_ico");
- switchObj.remove();
- icoObj.before(switchObj);
- if (treeNode.level > 0) {
- var spaceStr = "<span style='display: inline-block;width:" + (spaceWidth * treeNode.level)+ "px'></span>";
- switchObj.before(spaceStr);
- }
- }
- var setting = {data:{simpleData:{enable:true,idKey:"id",pIdKey:"pId",rootPId:'0'}},
- callback:{onClick:function(event, treeId, treeNode){
- var id = treeNode.id == '0' ? '' :treeNode.id;
- var look = treeNode.look;
- $('#userContent').attr("src","${ctx}/sys/role/list?office.id="+id+"&look="+look+"&office.name="+ encodeURI(treeNode.name));
- }
- }
- ,view:{
- showLine: false,
- showIcon: false,
- addDiyDom: addDiyDom
- }
- };
- function refreshTree(){
- $.getJSON("${ctx}/sys/office/treeDataRole?"+ Math.random(),function(data){
- $.fn.zTree.init($("#ztree"), setting, data).expandAll(true);
- closeSubChilds();
- });
- }
- refreshTree();
- function closeSubChilds() {
- var secondLevel = $('#ztree').children().children().eq(1).children();
- var slists = secondLevel.find('a.level1').find('.level1');
- var arr = [];
- for (var i = 0, length = slists.length; i < length; i++) {
- arr.push(slists[i]);
- $(arr[i].parentNode.nextSibling).css('display','none');
- arr[i].click(function(){
- arr[i].removeClass("noline_close").addClass('noline_open');
- })
- }
- secondLevel.find('a.level1').children().eq(1).removeClass("noline_open").addClass('noline_close');
- }
- /*window.onload = function() {
- <%--$.getJSON("${ctx}/sys/office/treeDataRole?"+ Math.random(),function(data){--%>
- <%--$.fn.zTree.init($("#ztree"), setting, data).expandAll(true);--%>
- <%--});--%>
- var navg = window.navigator.userAgent;
- if(navg.indexOf('MSIE')!==-1){
- // var isFlag = true;
- // function ref(isFlag) {
- // isFlag = false;
- // window.refresh();
- // return isFlag;
- // }
- // ref(isFlag);
- // (function (){
- // window.refresh();
- // console.log('fre')
- // })()
- }
- var secondLevel = $('#ztree').children().children().eq(1).children();
- var slists = secondLevel.find('a.level1').find('.level1');
- var arr = [];
- for (var i = 0, length = slists.length; i < length; i++) {
- arr.push(slists[i]);
- $(arr[i].parentNode.nextSibling).css('display','none');
- arr[i].click(function(){
- arr[i].removeClass("noline_close").addClass('noline_open');
- })
- }
- secondLevel.find('a.level1').children().eq(1).removeClass("noline_open").addClass('noline_close');
- }*/
- // var width = $('#divId').width();
- // var leftWidth = width*0.1; // 左侧窗口大小
- // var htmlObj = $("html"), mainObj = $("#main");
- // var frameObj = $("#left, #openClose, #right, #right iframe");
- // function wSize(){
- // var strs = getWindowSize().toString().split(",");
- // htmlObj.css({"overflow-x":"hidden", "overflow-y":"hidden"});
- // mainObj.css("width","auto");
- // frameObj.height(strs[0] - 120);
- // /* var leftWidth = ($("#left").width() < 0 ? 0 : $("#left").width());
- // $("#right").width($("#content").width()- leftWidth - $("#openClose").width() -60);
- // $(".ztree").width(leftWidth - 10).height(frameObj.height() - 46);*/
- // $("#content").width(width);
- // $("#left").width(width*0.12);
- // $("#ztree").width(width*0.12);
- // $("#ztree").height('86%');
- // $("#right").width(width*0.82);
- // $("#officeContent").width(width*0.82);
- // }
- </script>
- <%--<script src="${ctxStatic}/common/wsize.min.js" type="text/javascript"></script>--%>
- </body>
- </html>
|