公司管理、菜单管理、行政区划增加左树右表
This commit is contained in:
@@ -28,6 +28,7 @@ import com.jeesite.common.idgen.IdGen;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.sys.entity.Area;
|
||||
import com.jeesite.modules.sys.entity.Company;
|
||||
import com.jeesite.modules.sys.service.AreaService;
|
||||
import com.jeesite.modules.sys.utils.AreaUtils;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
@@ -53,6 +54,16 @@ public class AreaController extends BaseController {
|
||||
return areaService.get(areaCode, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 区域管理
|
||||
*/
|
||||
@RequiresPermissions("sys:area:view")
|
||||
@RequestMapping(value = "index")
|
||||
public String index(Company area, Model model) {
|
||||
model.addAttribute("area", area);
|
||||
return "modules/sys/areaIndex";
|
||||
}
|
||||
|
||||
/**
|
||||
* 区域列表
|
||||
* @param area
|
||||
|
||||
@@ -55,6 +55,16 @@ public class CompanyController extends BaseController {
|
||||
return companyService.get(companyCode, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司管理
|
||||
*/
|
||||
@RequiresPermissions("sys:company:view")
|
||||
@RequestMapping(value = "index")
|
||||
public String index(Company company, Model model) {
|
||||
model.addAttribute("company", company);
|
||||
return "modules/sys/companyIndex";
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司列表
|
||||
* @param company
|
||||
|
||||
@@ -53,7 +53,7 @@ public class OfficeController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 机构管理主页面
|
||||
* 机构管理
|
||||
*/
|
||||
@RequiresPermissions("sys:office:view")
|
||||
@RequestMapping(value = "index")
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<% layout('/layouts/default.html', {title: '公司管理', libs: ['layout','zTree']}){ %>
|
||||
<div class="ui-layout-west">
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-grid"></i> ${text('公司')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" id="btnExpand" title="${text('展开')}" style="display:none;"><i class="fa fa-chevron-up"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="${text('折叠')}"><i class="fa fa-chevron-down"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="${text('刷新')}"><i class="fa fa-refresh"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-content">
|
||||
<div id="tree" class="ztree"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-center">
|
||||
<iframe id="mainFrame" name="mainFrame" class="ui-layout-content p0"
|
||||
src="${ctx}/sys/area/list"></iframe>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化布局
|
||||
$('body').layout({
|
||||
west__initClosed: $(window).width() <= 767, // 是否默认关闭
|
||||
west__size: 200
|
||||
});
|
||||
// 主页框架
|
||||
var win = $("#mainFrame")[0].contentWindow;
|
||||
// 树结构初始化加载
|
||||
var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{enable:true}},
|
||||
callback:{onClick:function(event, treeId, treeNode){
|
||||
tree.expandNode(treeNode);
|
||||
//win.$('button[type=reset]').click();
|
||||
win.$('#menuCode').val(treeNode.id);
|
||||
win.page();
|
||||
}}
|
||||
}, tree, loadTree = function(){
|
||||
js.ajaxSubmit("${ctx}/sys/area/treeData?___t=" + new Date().getTime(), function(data){
|
||||
tree = $.fn.zTree.init($("#tree"), setting, data);//.expandAll(true);
|
||||
// 展开第一级节点
|
||||
var nodes = tree.getNodesByParam("level", 0);
|
||||
for(var i=0; i<nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
}
|
||||
// 展开第二级节点
|
||||
// nodes = tree.getNodesByParam("level", 1);
|
||||
// for(var i=0; i<nodes.length; i++) {
|
||||
// tree.expandNode(nodes[i], true, false, false);
|
||||
// }
|
||||
}, null, null, js.text('loading.message'));
|
||||
};loadTree();
|
||||
// 工具栏按钮绑定
|
||||
$('#btnExpand').click(function(){
|
||||
tree.expandAll(true);
|
||||
$(this).hide();
|
||||
$('#btnCollapse').show();
|
||||
});
|
||||
$('#btnCollapse').click(function(){
|
||||
tree.expandAll(false);
|
||||
$(this).hide();
|
||||
$('#btnExpand').show();
|
||||
});
|
||||
$('#btnRefresh').click(function(){
|
||||
loadTree();
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,71 @@
|
||||
<% layout('/layouts/default.html', {title: '公司管理', libs: ['layout','zTree']}){ %>
|
||||
<div class="ui-layout-west">
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-grid"></i> ${text('公司')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" id="btnExpand" title="${text('展开')}" style="display:none;"><i class="fa fa-chevron-up"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="${text('折叠')}"><i class="fa fa-chevron-down"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="${text('刷新')}"><i class="fa fa-refresh"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-content">
|
||||
<div id="tree" class="ztree"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-center">
|
||||
<iframe id="mainFrame" name="mainFrame" class="ui-layout-content p0"
|
||||
src="${ctx}/sys/company/list"></iframe>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化布局
|
||||
$('body').layout({
|
||||
west__initClosed: $(window).width() <= 767, // 是否默认关闭
|
||||
west__size: 200
|
||||
});
|
||||
// 主页框架
|
||||
var win = $("#mainFrame")[0].contentWindow;
|
||||
// 树结构初始化加载
|
||||
var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{enable:true}},
|
||||
callback:{onClick:function(event, treeId, treeNode){
|
||||
tree.expandNode(treeNode);
|
||||
//win.$('button[type=reset]').click();
|
||||
win.$('#menuCode').val(treeNode.id);
|
||||
win.page();
|
||||
}}
|
||||
}, tree, loadTree = function(){
|
||||
js.ajaxSubmit("${ctx}/sys/company/treeData?___t=" + new Date().getTime(), function(data){
|
||||
tree = $.fn.zTree.init($("#tree"), setting, data);//.expandAll(true);
|
||||
// 展开第一级节点
|
||||
var nodes = tree.getNodesByParam("level", 0);
|
||||
for(var i=0; i<nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
}
|
||||
// 展开第二级节点
|
||||
// nodes = tree.getNodesByParam("level", 1);
|
||||
// for(var i=0; i<nodes.length; i++) {
|
||||
// tree.expandNode(nodes[i], true, false, false);
|
||||
// }
|
||||
}, null, null, js.text('loading.message'));
|
||||
};loadTree();
|
||||
// 工具栏按钮绑定
|
||||
$('#btnExpand').click(function(){
|
||||
tree.expandAll(true);
|
||||
$(this).hide();
|
||||
$('#btnCollapse').show();
|
||||
});
|
||||
$('#btnCollapse').click(function(){
|
||||
tree.expandAll(false);
|
||||
$(this).hide();
|
||||
$('#btnExpand').show();
|
||||
});
|
||||
$('#btnRefresh').click(function(){
|
||||
loadTree();
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user