main
tamguo 7 years ago
parent d607a0b5ae
commit dd5ad8614b

@ -8,6 +8,7 @@ import org.springframework.web.servlet.ModelAndView;
public class CommonController { public class CommonController {
private final String TREE_SELECT_PAGE = "modules/sys/common/treeselect"; private final String TREE_SELECT_PAGE = "modules/sys/common/treeselect";
private final String SYS_DESKTOP_PAGE = "modules/sys/common/desktop";
@RequestMapping(path="sys/treeselect") @RequestMapping(path="sys/treeselect")
public ModelAndView index(ModelAndView model , String url) { public ModelAndView index(ModelAndView model , String url) {
@ -15,4 +16,10 @@ public class CommonController {
model.setViewName(TREE_SELECT_PAGE); model.setViewName(TREE_SELECT_PAGE);
return model; return model;
} }
@RequestMapping(path="sys/desktop")
public ModelAndView index(ModelAndView model) {
model.setViewName(SYS_DESKTOP_PAGE);
return model;
}
} }

@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.tamguo.modules.sys.model.SysCompanyEntity; import com.tamguo.modules.sys.model.SysCompanyEntity;
import com.tamguo.modules.sys.service.ISysCompanyService; import com.tamguo.modules.sys.service.ISysCompanyService;
@ -14,8 +15,15 @@ import com.tamguo.modules.sys.service.ISysCompanyService;
@RequestMapping(path="sys/company") @RequestMapping(path="sys/company")
public class CompanyController { public class CompanyController {
private final String COMPANY_INDEX_PAGE = "modules/sys/company/index";
@Autowired @Autowired
ISysCompanyService iSysCompanyService; ISysCompanyService iSysCompanyService;
@RequestMapping(path="index")
public String index(ModelAndView model) {
return COMPANY_INDEX_PAGE;
}
@RequestMapping(path="treeData") @RequestMapping(path="treeData")
@ResponseBody @ResponseBody

@ -20,7 +20,7 @@
<a title="组织管理" href="javascript:" data-href="blank" class="addTabPage"><i class="fa fa-fw icon-grid"></i> <span>组织管理</span> <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span></a> <a title="组织管理" href="javascript:" data-href="blank" class="addTabPage"><i class="fa fa-fw icon-grid"></i> <span>组织管理</span> <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span></a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<li class="treeview"><a title="用户管理" href="javascript:" data-href="sys/user/index" class="addTabPage"><i class="fa fa-fw icon-user"></i> <span>用户管理</span></a></li> <li class="treeview"><a title="用户管理" href="javascript:" data-href="sys/user/index" class="addTabPage"><i class="fa fa-fw icon-user"></i> <span>用户管理</span></a></li>
<li class="treeview"><a title="机构管理" href="javascript:" data-href="/js/a/sys/office/list" class="addTabPage"><i class="fa fa-fw icon-grid"></i> <span>机构管理</span></a></li> <li class="treeview"><a title="机构管理" href="javascript:" data-href="sys/company/index" class="addTabPage"><i class="fa fa-fw icon-grid"></i> <span>机构管理</span></a></li>
<li class="treeview"><a title="岗位管理" href="javascript:" data-href="/js/a/sys/post/list" class="addTabPage"><i class="fa fa-fw icon-trophy"></i> <span>岗位管理</span></a></li> <li class="treeview"><a title="岗位管理" href="javascript:" data-href="/js/a/sys/post/list" class="addTabPage"><i class="fa fa-fw icon-trophy"></i> <span>岗位管理</span></a></li>
</ul> </ul>
</li> </li>

@ -73,14 +73,14 @@
onclick="readMsg(this, '消息详情', '{{d.id}}')">查看</button>&nbsp; onclick="readMsg(this, '消息详情', '{{d.id}}')">查看</button>&nbsp;
</div> </div>
</script></li> </script></li>
<li class="dropdown notifications-menu"><a href="javascript:" <!-- <li class="dropdown notifications-menu"><a href="javascript:"
class="dropdown-toggle" data-hover="dropdown"> <i class="dropdown-toggle" data-hover="dropdown"> <i
class="fa fa-bell-o"></i> <span class="label label-warning">10</span> class="fa fa-bell-o"></i> <span class="label label-warning">10</span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li class="header">You have 10 notifications</li> <li class="header">You have 10 notifications</li>
<li> <li>
<!-- inner menu: contains the actual data --> inner menu: contains the actual data
<ul class="menu"> <ul class="menu">
<li><a href="#"> <i class="fa fa-users text-aqua"></i> 5 <li><a href="#"> <i class="fa fa-users text-aqua"></i> 5
new members joined today new members joined today
@ -102,18 +102,18 @@
</ul> </ul>
</li> </li>
<li class="footer"><a href="#">View all</a></li> <li class="footer"><a href="#">View all</a></li>
</ul></li> </ul></li> -->
<li class="dropdown tasks-menu"><a href="javascript:" <!-- <li class="dropdown tasks-menu"><a href="javascript:"
class="dropdown-toggle" data-hover="dropdown"> <i class="dropdown-toggle" data-hover="dropdown"> <i
class="fa fa-flag-o"></i> <span class="label label-danger">9</span> class="fa fa-flag-o"></i> <span class="label label-danger">9</span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li class="header">You have 9 tasks</li> <li class="header">You have 9 tasks</li>
<li> <li>
<!-- inner menu: contains the actual data --> inner menu: contains the actual data
<ul class="menu"> <ul class="menu">
<li> <li>
<!-- Task item --> <a href="#"> Task item <a href="#">
<h3> <h3>
Design some buttons <small class="pull-right">20%</small> Design some buttons <small class="pull-right">20%</small>
</h3> </h3>
@ -126,9 +126,9 @@
</div> </div>
</a> </a>
</li> </li>
<!-- end task item --> end task item
<li> <li>
<!-- Task item --> <a href="#"> Task item <a href="#">
<h3> <h3>
Create a nice theme <small class="pull-right">40%</small> Create a nice theme <small class="pull-right">40%</small>
</h3> </h3>
@ -141,9 +141,9 @@
</div> </div>
</a> </a>
</li> </li>
<!-- end task item --> end task item
<li> <li>
<!-- Task item --> <a href="#"> Task item <a href="#">
<h3> <h3>
Some task I need to do <small class="pull-right">60%</small> Some task I need to do <small class="pull-right">60%</small>
</h3> </h3>
@ -156,9 +156,9 @@
</div> </div>
</a> </a>
</li> </li>
<!-- end task item --> end task item
<li> <li>
<!-- Task item --> <a href="#"> Task item <a href="#">
<h3> <h3>
Make beautiful transitions <small class="pull-right">80%</small> Make beautiful transitions <small class="pull-right">80%</small>
</h3> </h3>
@ -171,11 +171,11 @@
</div> </div>
</a> </a>
</li> </li>
<!-- end task item --> end task item
</ul> </ul>
</li> </li>
<li class="footer"><a href="#">View all tasks</a></li> <li class="footer"><a href="#">View all tasks</a></li>
</ul></li> </ul></li> -->
<li class="dropdown user-menu mr5"><a href="javascript:" <li class="dropdown user-menu mr5"><a href="javascript:"
class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"> class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">
<img src="modules/sys/images/user1.jpg" class="user-image"> <span <img src="modules/sys/images/user1.jpg" class="user-image"> <span

@ -0,0 +1,134 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8"><meta content="webkit" name="renderer"/>
<meta http-equiv="X-UA-Compatible"
content="IE=edge"><meta name="keywords" content="PoweredByJeeSiteV4.0"/><meta http-equiv="Cache-Control"
content="no-cache, no-store, must-revalidate"/><meta name="description" content="PoweredByJeeSiteV4.0"/><meta
content="no-cache" http-equiv="Pragma"/><meta http-equiv="Expires" content="0"/><meta
content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
<title>机构管理 - JeeSite Demo</title>
<script th:src="${setting.domain + 'global.min.js?ctx=/js/a'}"></script>
<script th:src="${setting.domain + 'jquery/jquery-1.12.4.min.js'}"></script>
<script th:src="${setting.domain + 'jquery/jquery-migrate-1.4.1.min.js'}"></script>
<!--[if lt IE 9]><script src="/js/static/common/h5fix.min.js"></script><![endif]-->
<link rel="stylesheet" th:href="${setting.domain + 'fonts/font-icons.min.css'}">
<link rel="stylesheet" th:href="${setting.domain + 'bootstrap/css/bootstrap.min.css'}">
<link rel="stylesheet" th:href="${setting.domain + 'select2/4.0/select2.css'}">
<link rel="stylesheet" th:href="${setting.domain + 'icheck/1.0/minimal/grey.css'}">
<link rel="stylesheet" th:href="${setting.domain + 'jqGrid/4.7/css/ui.jqgrid.css'}">
<link rel="stylesheet" th:href="${setting.domain + 'adminlte/css/AdminLTE.min.css'}">
<link rel="stylesheet" th:href="${setting.domain + 'common/jeesite.css'}">
<link rel="stylesheet" th:href="${setting.domain + 'common/common.css'}">
</head><body class="hold-transition ">
<div class="wrapper"><div class="main-content">
<div class="box box-main">
<div class="box-header">
<div class="box-title">
<i class="fa icon-grid"></i> 机构管理
</div>
<div class="box-tools pull-right">
<a href="#" class="btn btn-default" id="btnSearch" title="查询"><i class="fa fa-filter"></i> 查询</a>
<a href="#" class="btn btn-default" id="btnRefreshTree" title="刷新"><i class="fa fa-refresh"></i> 刷新</a>
<a href="#" class="btn btn-default" id="btnExpandTreeNode" title="展开一级"><i class="fa fa-angle-double-down"></i> 展开</a>
<a href="#" class="btn btn-default" id="btnCollapseTreeNode" title="折叠全部"><i class="fa fa-angle-double-up"></i> 折叠</a>
<a href="/js/a/sys/office/form" class="btn btn-default btnTool" title="新增机构"><i class="fa fa-plus"></i> 新增</a>
</div>
</div>
<div class="box-body">
<form id="searchForm" action="/js/a/sys/office/listData" method="post" class="form-inline hide" data-page-no="" data-page-size="" data-order-by="">
<div class="form-group">
<label class="control-label">机构代码:</label>
<div class="control-inline">
<input type="text" id="viewCode" name="viewCode" value="" maxlength="100" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">机构名称:</label>
<div class="control-inline">
<input type="text" id="officeName" name="officeName" value="" maxlength="100" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">机构全称:</label>
<div class="control-inline">
<input type="text" id="fullName" name="fullName" value="" maxlength="200" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">机构类型:</label>
<div class="control-inline width-90">
<select id="officeType" name="officeType" class="form-control">
<option value="">&nbsp;</option><option value="1">省级公司</option><option value="2">市级公司</option><option value="3">部门</option></select> </div>
</div>
<div class="form-group">
<label class="control-label">状态:</label>
<div class="control-inline width-60">
<select id="status" name="status" class="form-control">
<option value="">&nbsp;</option><option value="0">正常</option><option value="2">停用</option></select> </div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-sm">查询</button>
<button type="reset" class="btn btn-default btn-sm">重置</button>
</div>
</form>
<table id="dataGrid"></table>
</div>
</div>
</div>
</div>
<a id="scroll-up" href="#" class="btn btn-sm"><i class="fa fa-angle-double-up"></i></a>
<script th:src="${setting.domain + 'bootstrap/js/bootstrap.min.js'}"></script>
<script th:src="${setting.domain + 'select2/4.0/select2.js'}"></script>
<script th:src="${setting.domain + 'select2/4.0/i18n/zh_CN.js'}"></script>
<script th:src="${setting.domain + 'layer/3.1/layer.js'}"></script>
<script th:src="${setting.domain + 'my97/WdatePicker.js'}"></script>
<script th:src="${setting.domain + 'jqGrid/4.7/js/jquery.jqGrid.js'}"></script>
<script th:src="${setting.domain + 'jqGrid/4.7/js/jquery.jqGrid.extend.js'}"></script>
<script th:src="${setting.domain + 'jqGrid/4.7/js/i18n/zh_CN.js'}"></script>
<script th:src="${setting.domain + 'common/jeesite.js'}"></script>
<script th:src="${setting.domain + 'common/i18n/jeesite_zh_CN.js'}"></script>
<script th:src="${setting.domain + 'common/common.js'}"></script>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
{header:'机构名称', name:'officeName', index:'a.office_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '( '+row.viewCode+' ) '+'<a href="/js/a/sys/office/form?officeCode='+row.officeCode+'" class="btnList" data-title="编辑机构">'+(val||row.id)+'</a>';
}},
{header:'机构全称', name:'fullName', index:'a.full_name', width:200, align:"left"},
{header:'排序号', name:'treeSort', index:'a.tree_sort', width:80, align:"center"},
{header:'机构类型', name:'officeType', index:'a.office_type', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel([{"id":"1019065443704786944","status":"0","createBy":"system","createDate":"2018-07-17 11:45","updateDate":"2018-07-17 11:45","updateBy":"system","treeLevel":0,"parentCodes":"0,","treeSort":30,"treeSorts":"0000000030,","treeNames":"省级公司","treeLeaf":"1","isSys":"1","cssClass":"","dictCode":"1019065443704786944","dictLabelOrig":"省级公司","dictType":"sys_office_type","cssStyle":"","description":"","dictValue":"1","dictLabel":"省级公司","parentCode":"0","isRoot":true,"isTreeLeaf":true},{"id":"1019065443864170496","status":"0","createBy":"system","createDate":"2018-07-17 11:45","updateDate":"2018-07-17 11:45","updateBy":"system","treeLevel":0,"parentCodes":"0,","treeSort":40,"treeSorts":"0000000040,","treeNames":"市级公司","treeLeaf":"1","isSys":"1","cssClass":"","dictCode":"1019065443864170496","dictLabelOrig":"市级公司","dictType":"sys_office_type","cssStyle":"","description":"","dictValue":"2","dictLabel":"市级公司","parentCode":"0","isRoot":true,"isTreeLeaf":true},{"id":"1019065444036136960","status":"0","createBy":"system","createDate":"2018-07-17 11:45","updateDate":"2018-07-17 11:45","updateBy":"system","treeLevel":0,"parentCodes":"0,","treeSort":50,"treeSorts":"0000000050,","treeNames":"部门","treeLeaf":"1","isSys":"1","cssClass":"","dictCode":"1019065444036136960","dictLabelOrig":"部门","dictType":"sys_office_type","cssStyle":"","description":"","dictValue":"3","dictLabel":"部门","parentCode":"0","isRoot":true,"isTreeLeaf":true}], val, '未知', true);
}},
{header:'更新时间', name:'updateDate', index:'a.update_date', width:150, align:"center"},
{header:'备注信息', name:'remarks', index:'a.remarks', width:200, align:"left"},
{header:'状态', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel([{"id":"1019065439174938624","status":"0","createBy":"system","createDate":"2018-07-17 11:45","updateDate":"2018-07-17 11:45","updateBy":"system","treeLevel":0,"parentCodes":"0,","treeSort":20,"treeSorts":"0000000020,","treeNames":"正常","treeLeaf":"1","isSys":"1","cssClass":"","dictCode":"1019065439174938624","dictLabelOrig":"正常","dictType":"sys_status","cssStyle":"","description":"","dictValue":"0","dictLabel":"正常","parentCode":"0","isRoot":true,"isTreeLeaf":true},{"id":"1019065439330127872","status":"0","createBy":"system","createDate":"2018-07-17 11:45","updateDate":"2018-07-17 11:45","updateBy":"system","treeLevel":0,"parentCodes":"0,","treeSort":30,"treeSorts":"0000000030,","treeNames":"删除","treeLeaf":"1","isSys":"1","cssClass":"","dictCode":"1019065439330127872","dictLabelOrig":"删除","dictType":"sys_status","cssStyle":"color:#f00;","description":"","dictValue":"1","dictLabel":"删除","parentCode":"0","isRoot":true,"isTreeLeaf":true},{"id":"1019065439481122816","status":"0","createBy":"system","createDate":"2018-07-17 11:45","updateDate":"2018-07-17 11:45","updateBy":"system","treeLevel":0,"parentCodes":"0,","treeSort":40,"treeSorts":"0000000040,","treeNames":"停用","treeLeaf":"1","isSys":"1","cssClass":"","dictCode":"1019065439481122816","dictLabelOrig":"停用","dictType":"sys_status","cssStyle":"color:#f00;","description":"","dictValue":"2","dictLabel":"停用","parentCode":"0","isRoot":true,"isTreeLeaf":true},{"id":"1019065439699226624","status":"0","createBy":"system","createDate":"2018-07-17 11:45","updateDate":"2018-07-17 11:45","updateBy":"system","treeLevel":0,"parentCodes":"0,","treeSort":50,"treeSorts":"0000000050,","treeNames":"冻结","treeLeaf":"1","isSys":"1","cssClass":"","dictCode":"1019065439699226624","dictLabelOrig":"冻结","dictType":"sys_status","cssStyle":"color:#fa0;","description":"","dictValue":"3","dictLabel":"冻结","parentCode":"0","isRoot":true,"isTreeLeaf":true},{"id":"1019065439875387392","status":"0","createBy":"system","createDate":"2018-07-17 11:45","updateDate":"2018-07-17 11:45","updateBy":"system","treeLevel":0,"parentCodes":"0,","treeSort":60,"treeSorts":"0000000060,","treeNames":"待审","treeLeaf":"1","isSys":"1","cssClass":"","dictCode":"1019065439875387392","dictLabelOrig":"待审","dictType":"sys_status","cssStyle":"","description":"","dictValue":"4","dictLabel":"待审","parentCode":"0","isRoot":true,"isTreeLeaf":true},{"id":"1019065440022188032","status":"0","createBy":"system","createDate":"2018-07-17 11:45","updateDate":"2018-07-17 11:45","updateBy":"system","treeLevel":0,"parentCodes":"0,","treeSort":70,"treeSorts":"0000000070,","treeNames":"驳回","treeLeaf":"1","isSys":"1","cssClass":"","dictCode":"1019065440022188032","dictLabelOrig":"驳回","dictType":"sys_status","cssStyle":"","description":"","dictValue":"5","dictLabel":"驳回","parentCode":"0","isRoot":true,"isTreeLeaf":true},{"id":"1019065440210931712","status":"0","createBy":"system","createDate":"2018-07-17 11:45","updateDate":"2018-07-17 11:45","updateBy":"system","treeLevel":0,"parentCodes":"0,","treeSort":80,"treeSorts":"0000000080,","treeNames":"草稿","treeLeaf":"1","isSys":"1","cssClass":"","dictCode":"1019065440210931712","dictLabelOrig":"草稿","dictType":"sys_status","cssStyle":"color:#aaa;","description":"","dictValue":"9","dictLabel":"草稿","parentCode":"0","isRoot":true,"isTreeLeaf":true}], val, '未知', true);
}},
{header:'操作', name:'actions', width:150, sortable:false, title:false, formatter: function(val, obj, row, act){
var actions = [];
actions.push('<a href="/js/a/sys/office/form?officeCode='+row.officeCode+'" class="btnList" title="编辑机构"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="/js/a/sys/office/disable?officeCode='+row.officeCode+'" class="btnList" title="停用机构" data-confirm="确认要停用该机构吗?"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
}
if (row.status == Global.STATUS_DISABLE){
actions.push('<a href="/js/a/sys/office/enable?officeCode='+row.officeCode+'" class="btnList" title="启用机构" data-confirm="确认要启用该机构吗?"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="/js/a/sys/office/delete?officeCode='+row.officeCode+'" class="btnList" title="删除机构" data-confirm="确认要删除该机构及所有子机构吗?" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="/js/a/sys/office/form?parentCode='+row.id+'" class="btnList" title="新增下级机构"><i class="fa fa-plus-square"></i></a>&nbsp;');
return actions.join('');
}}
],
treeGrid: true, // 启用树结构表格
defaultExpandLevel: 0, // 默认展开的层次
expandNodeClearPostData: 'viewCode,officeName,fullName,officeType,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据) // 加载成功后执行事件
ajaxSuccess: function(data){
}
});
</script>

@ -55,7 +55,7 @@
<script src="common/jeesite.js?V4.0-07200941"></script> <script src="common/jeesite.js?V4.0-07200941"></script>
<script src="common/i18n/jeesite_zh_CN.js?V4.0-07200941"></script> <script src="common/i18n/jeesite_zh_CN.js?V4.0-07200941"></script>
<script src="common/common.js?V4.0-07200941"></script> <script src="common/common.js?V4.0-07200941"></script>
<div class="hide" id="desktopTabPage" data-title="仪表盘" data-url="/js/a/desktop"></div> <div class="hide" id="desktopTabPage" data-title="仪表盘" th:attr="data-url=${setting.domain + 'sys/desktop'}"></div>
<div class="hide" id="modifyPasswordTip" data-message=""></div> <div class="hide" id="modifyPasswordTip" data-message=""></div>
<script src="jquery-toastr/2.0/toastr.min.js?V4.0-07200941"></script> <script src="jquery-toastr/2.0/toastr.min.js?V4.0-07200941"></script>
<script src="jquery-plugins/jquery.slimscroll.js"></script> <script src="jquery-plugins/jquery.slimscroll.js"></script>

Loading…
Cancel
Save