|
@ -118,9 +118,80 @@ public class CommonPageController extends BaseController {
|
|
|
/*
|
|
|
首页页面
|
|
|
*/
|
|
|
@RequestMapping("{tenantName}/indexPage")
|
|
|
public String tenantIndex(
|
|
|
@PathVariable(name = "tenantName") String tenantName,
|
|
|
HttpServletRequest request,Model model) {
|
|
|
|
|
|
HttpSession session = request.getSession();
|
|
|
boolean auth = false;
|
|
|
String clientId = request.getParameter("clientId");
|
|
|
String token = request.getParameter("token");
|
|
|
boolean succ = validToken(clientId, token);
|
|
|
if (succ){
|
|
|
//TODO 根据token和clientId 获取用户信息
|
|
|
SystemUser userInfo = new SystemUser();
|
|
|
userInfo.setLoginCode("admin");
|
|
|
userInfo.setUserName("管理员");
|
|
|
session.setAttribute("userInfo",userInfo);
|
|
|
try {
|
|
|
auth = authenticateService.auth(session, tenantName);
|
|
|
if (auth){
|
|
|
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
model.addAttribute("userName", "admin");
|
|
|
model.addAttribute("tenant",tenantName);
|
|
|
//获取菜单
|
|
|
String menu = "[{id: 1, text: '任务管理',icon:'${staticRoot}/images/index/menu2_icon.png'},\n" +
|
|
|
" {id: 11, pid: 1, text: '任务跟踪', url: '${contextRoot}/datacollect/trackJob',targetType:'1'},\n" +
|
|
|
" {id: 12, pid: 1, text: '任务补采', url: '${contextRoot}/datacollect/repeatDatacollect'},\n" +
|
|
|
" {id: 13, pid: 1, text: '任务配置', url: '${contextRoot}/datacollect/configJob'},\n" +
|
|
|
" {id: 2, text: '标准管理',icon:'${staticRoot}/images/index/menu3_icon.png'},\n" +
|
|
|
" {id: 21, pid: 2, text: '集成标准', url: '${contextRoot}/integration/initial/standard'},\n" +
|
|
|
" {id: 22, pid: 2, text: '应用标准', url: '${contextRoot}/integration/initial/application'},\n" +
|
|
|
" {id: 23, pid: 2, text: '适配方案', url: '${contextRoot}/adapterPlan/initial'},\n" +
|
|
|
" {id: 3, text: '资源管理',icon:'${staticRoot}/images/index/menu4_icon.png'},\n" +
|
|
|
" {id: 31, pid: 3, text: '资源注册', url: '${contextRoot}/resource/resource/initial'},\n" +
|
|
|
" {id: 32, pid: 3, text: '资源浏览', url: '${contextRoot}/resource/resourcePage'},\n" +
|
|
|
" {id: 34, pid: 3, text: '资源分类', url: '${contextRoot}/resource/rsCategory/initial'},\n" +
|
|
|
" {id: 35, pid: 3, text: '业务资源', url: '${contextRoot}/resourceRest/initial'},\n" +
|
|
|
" {id: 4, text: '维度管理',icon:'${staticRoot}/images/index/menu5_icon.png'},\n" +
|
|
|
" {id: 41, pid: 4, text: '维度配置', url: '${contextRoot}/dimension/dimension'},\n" +
|
|
|
" {id: 42, pid: 4, text: '维度类别配置', url: '${contextRoot}/dimension/dimensioncatetory'},\n" +
|
|
|
" {id: 9, text: '系统配置',icon:'${staticRoot}/images/index/menu6_icon.png'},\n" +
|
|
|
" {id: 91, pid: 9, text: '机构配置', url: '${contextRoot}/org/initial'},\n" +
|
|
|
" {id: 92, pid: 9, text: '数据源配置', url: '${contextRoot}/datasource/configSources'},\n" +
|
|
|
" {id: 93, pid: 9, text: '菜单配置', url: '${contextRoot}/menu/initial'},\n" +
|
|
|
" {id: 100, pid: 9, text: '菜单按钮配置', url: '${contextRoot}/menu/menuAction/initial'},\n" +
|
|
|
" {id: 94, pid: 9, text: '用户管理', url: '${contextRoot}/user/initial'},\n" +
|
|
|
" {id: 95, pid: 9, text: '角色管理', url: '${contextRoot}/role/initial'},\n" +
|
|
|
" {id: 96, pid: 9, text: '权限管理', url: '${contextRoot}/authority/initial'},\n" +
|
|
|
" {id: 97, pid: 9, text: '字典管理', url: '${contextRoot}/dict/initial' },\n" +
|
|
|
" {id: 98, pid: 9, text: '系统参数', url: '${contextRoot}/param/initial'},\n" +
|
|
|
" {id: 99, pid: 9, text: '<spring:message code=\"title.app.manage\"/>', url: '${contextRoot}/app/initial'}]";
|
|
|
model.addAttribute("menu", menu);
|
|
|
|
|
|
|
|
|
model.addAttribute("contentPage","/common/index");
|
|
|
}else {
|
|
|
//TODO 返回验证错误页面
|
|
|
model.addAttribute("contentPage","/common/tokenValidFail");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
return "pageView";
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
首页页面
|
|
|
*/
|
|
|
@RequestMapping("indexPage")
|
|
|
public String index(HttpServletRequest request,Model model) {
|
|
|
|
|
|
HttpSession session = request.getSession();
|
|
|
SystemUser user = (SystemUser) session.getAttribute("userInfo");
|
|
|
TenantSession tenantSession = (TenantSession) session.getAttribute(ContextAttributes.TENANT_SESSION);
|
|
@ -162,6 +233,7 @@ public class CommonPageController extends BaseController {
|
|
|
return "pageView";
|
|
|
}
|
|
|
|
|
|
|
|
|
/*
|
|
|
系统主页
|
|
|
*/
|