private String getPanelScript() {
Reader g4Reader = (Reader) SpringBeanLoader.getSpringBean("g4Reader");
// String rootName =
// (String)g4Reader.queryForObject("getMenuNameForCNPath", "01");
HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();
Dto dto = new BaseDto();
dto.put("contextPath", request.getContextPath());
dto.put("northTitle", northTitle);
dto.put("centerTitle",
G4Utils.isEmpty(WebUtils.getParamValue("MENU_FIRST", request)) ? "请配置" : WebUtils.getParamValue(
"MENU_FIRST", request));
dto.put("welcomePageTitle", G4Utils.isEmpty(WebUtils.getParamValue("WELCOME_PAGE_TITLE", request)) ? "请配置" : WebUtils.getParamValue(
"WELCOME_PAGE_TITLE", request));
dto.put("banner", request.getContextPath() + WebUtils.getParamValue("INDEX_BANNER", request));
dto.put("westTitle", westTitle);
dto.put("scriptStart", scriptStart);
dto.put("scriptEnd", scriptEnd);
dto.put("copyright", WebUtils.getParamValue("BOTTOM_COPYRIGHT", request));
String activeOnTop = "true";
if ("0".equals(WebUtils.getParamValue("WEST_CARDMENU_ACTIVEONTOP", request))) {
activeOnTop = "false";
}
dto.put("activeOnTop", activeOnTop);
SessionContainer sessionContainer = WebUtils.getSessionContainer(request);
String userid = sessionContainer.getUserInfo().getUserid();
Dto dto2 = new BaseDto();
dto2.put("userid", userid);
String account = sessionContainer.getUserInfo().getAccount();
account = account == null ? "" : account;
String accountType = SystemConstants.ACCOUNTTYPE_NORMAL;
if (account.equalsIgnoreCase(WebUtils.getParamValue("DEFAULT_ADMIN_ACCOUNT", request))) {
accountType = SystemConstants.ACCOUNTTYPE_SUPER;
} else if (account.equalsIgnoreCase(WebUtils.getParamValue("DEFAULT_DEVELOP_ACCOUNT", request))) {
accountType = SystemConstants.ACCOUNTTYPE_DEVELOPER;
}
dto2.put("accountType", accountType);
dto.put("accountType", accountType);
List cardList = tagSupportService.getCardList(dto2).getDefaultAList();
for (int i = 0; i < cardList.size(); i++) {
MenuVo cardVo = (MenuVo) cardList.get(i);
if (i != cardList.size() - 1) {
cardVo.setIsNotLast("true");
}
}
dto.put("date", G4Utils.getCurDate());
dto.put("week", G4Utils.getWeekDayByDate(G4Utils.getCurDate()));
dto.put("welcome", getWelcomeMsg());
dto.put("cardList", cardList);
dto.put("username", sessionContainer.getUserInfo().getUsername());
dto.put("account", sessionContainer.getUserInfo().getAccount());
Dto qDto = new BaseDto();
qDto.put("deptid", sessionContainer.getUserInfo().getDeptid());
dto.put("deptname", tagSupportService.getDepartmentInfo(qDto).getAsString("deptname"));
Dto themeDto = new BaseDto();
themeDto.put("userid", WebUtils.getSessionContainer(request).getUserInfo().getUserid());
Dto resultDto = new BaseDto();
resultDto = tagSupportService.getEauserSubInfo(themeDto);
String theme = resultDto.getAsString("theme");
theme = G4Utils.isEmpty(theme) ? "default" : theme;
dto.put("theme", theme);
String layout = null;
if(G4Utils.isNotEmpty(resultDto))
layout = resultDto.getAsString("layout");
String defaultLayout = WebUtils.getParamValue("APP_LAYOUT", request);
layout = G4Utils.isEmpty(layout) ? defaultLayout : layout;
dto.put("layout", layout);
dto.put("themeColor", getThemeColor(theme));
TemplateEngine engine = TemplateEngineFactory.getTemplateEngine(TemplateType.VELOCITY);