机构界面调整,分页实现后台国际化,列表数据为空显示提示

This commit is contained in:
chiguangxu
2018-04-13 18:15:54 +08:00
parent 056d5d6897
commit b386978b45
6 changed files with 88 additions and 66 deletions

View File

@@ -4,29 +4,20 @@
<html>
<head>
<title>机构管理</title>
<style type="text/css">
.ztree {overflow:auto;margin:0;_margin-top:10px;padding:10px 0 0 10px;}
#left {
float:left;
}
#right,#openClose {
float:left;
}
#openClose {width:6px;margin:0 1px;cursor:pointer;}
#openClose,#openClose.close {background:#efefef url("../global/img/openclose.png") no-repeat -29px center;}
#openClose.close {background-position:1px center;opacity:0.5;filter:alpha(opacity=50)}
#officeContent {
margin-left: 10px;
margin-top: -10px;
}
</style>
<link href="${ctxStatic}/global/plugins/jquery-ztree/3.5.12/css/zTreeStyle/zTreeStyle.min.css" rel="stylesheet" type="text/css"/>
<script src="${ctxStatic}/global/plugins/jquery-ztree/3.5.12/js/jquery.ztree.all-3.5.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/global/scripts/mustache.min.js" type="text/javascript"></script>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<div class="page-content-body">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/sys/office/form?itType=${itType}'">
<i class="fa fa-plus"></i>
@@ -37,22 +28,37 @@
<spring:message code="officeManage"></spring:message>
<small><spring:message code="date_list"/></small>
</h3>
<h5 class="page-header"></h5>
<h5 class="page-header"></h5>
<sys:message content="${message}"/>
<div id="content" class="row-fluid">
<div id="left" class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle">组织机构<i class="icon-refresh pull-right" onclick="refreshTree();"></i></a>
<div class="row">
<div class="col-md-2">
<div class="portlet light bordered">
<div class="portlet-title">
<div class="caption">
<i class="icon-list font-blue-sharp"></i>
<span class="caption-subject font-blue-sharp bold uppercase">组织机构</span>
</div>
<div class="actions">
<a class="accordion-toggle"><i class="icon-refresh" onclick="refreshTree();"></i></a>
</div>
</div>
<div id="ztree" class="ztree"></div>
</div>
<div id="openClose" class="close">&nbsp;</div>
<div id="right">
<iframe id="officeContent" src="${ctx}/sys/office/list?id=&parentIds=" frameborder="no" width="100%" height="91%"></iframe>
</div>
</div>
</div>
<div id="ztree" class="ztree portlet-body"></div>
</div>
</div>
<div class="col-md-10">
<div id="officeContent"></div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
@@ -62,7 +68,28 @@
var setting = {data:{simpleData:{enable:true,idKey:"id",pIdKey:"pId",rootPId:'0'}},
callback:{onClick:function(event, treeId, treeNode){
var id = treeNode.pId ? treeNode.id : 1;
$('#officeContent').attr("src","${ctx}/sys/office/list?id="+id+"&parentIds="+treeNode.pIds);
var pageContentBody = $('#officeContent');
var url = "${ctx}/sys/office/list?id="+id+"&parentIds="+treeNode.pIds;
App.startPageLoading({animate:true});
$.ajax({
type: "GET",
cache: false,
url: url,
dataType: "html",
success: function (res) {
App.stopPageLoading();
pageContentBody.html(res);
},
error: function (xhr, ajaxOptions, thrownError) {
pageContentBody.html('<h4>Could not load the requested content.</h4>');
App.stopPageLoading();
}
});
}
}
};
@@ -81,20 +108,9 @@
}
var leftWidth = 180; // 左侧窗口大小
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] - 5);
var leftWidth = ($("#left").width() < 0 ? 0 : $("#left").width());
$("#right").width($("#content").width()- leftWidth - $("#openClose").width() -5);
$(".ztree").width(leftWidth - 10).height(frameObj.height() - 46);
}
</script>
<script src="${pageContext.request.contextPath}/static/global/scripts/wsize.min.js" type="text/javascript"></script>
</body>

View File

@@ -21592,15 +21592,15 @@ Color library demo
.none-data {
position: absolute;
display: block;
padding: 20px 15px;
background-color: #fff;
border-bottom: 1px solid #ddd;
text-align: center;
margin-top: -1px;
width: 100%;
left: 0;
height: 100px;
line-height: 100px;
}