diff --git a/src/main/java/com/nis/web/controller/SystemController.java b/src/main/java/com/nis/web/controller/SystemController.java index c7ffd18eb..f817edf6e 100644 --- a/src/main/java/com/nis/web/controller/SystemController.java +++ b/src/main/java/com/nis/web/controller/SystemController.java @@ -25,73 +25,78 @@ public class SystemController extends BaseController{ @RequestMapping("help") public String help(HttpServletRequest request, HttpServletResponse response,ModelMap model){ - List menuList = UserUtils.getMenuList(); + List menuList = UserUtils.getMenuTreeList(); List newList = new ArrayList(); - for(SysMenu menu:menuList){ - if(menu.getIsTop()==1 && !StringUtil.isEmpty(menu.getChildren())){ - boolean topShow = false; - for(SysMenu second:menu.getChildren()){ - boolean secondShow = false; - if(second.getIsShow()==1){ - if(!StringUtil.isEmpty(second.getMenuBg())){ - secondShow = true; - } - if(!StringUtil.isEmpty(second.getChildren())){ - for(SysMenu third:second.getChildren()){ - boolean thirdShow = false; - if(third.getIsShow()==1){ - if(!StringUtil.isEmpty(third.getMenuBg())){ - thirdShow = true; - secondShow = true; - } - if(!StringUtil.isEmpty(third.getChildren())){ - for(SysMenu fourth:third.getChildren()){ - if(!StringUtil.isEmpty(fourth.getMenuBg())&&fourth.getIsShow()==1){ - newList.add(fourth); - thirdShow = true; - secondShow = true; + try { + for(SysMenu menu:menuList){ + if(menu.getIsTop()==1 && !StringUtil.isEmpty(menu.getChildren())){ + boolean topShow = false; + for(SysMenu second:menu.getChildren()){ + boolean secondShow = false; + if(second.getIsShow()==1){ + if(!StringUtil.isEmpty(second.getMenuBg())){ + secondShow = true; + } + if(!StringUtil.isEmpty(second.getChildren())){ + for(SysMenu third:second.getChildren()){ + boolean thirdShow = false; + if(third.getIsShow()==1){ + if(!StringUtil.isEmpty(third.getMenuBg())){ + thirdShow = true; + secondShow = true; + } + if(!StringUtil.isEmpty(third.getChildren())){ + for(SysMenu fourth:third.getChildren()){ + if(!StringUtil.isEmpty(fourth.getMenuBg())&&fourth.getIsShow()==1){ + newList.add(fourth); + thirdShow = true; + secondShow = true; + } } } } - } - if(thirdShow){ - newList.add(third); + if(thirdShow){ + newList.add(third); + } } } + + if(secondShow){ + newList.add(second); + topShow = true; + } + } - - if(secondShow){ - newList.add(second); - topShow = true; - } - } - } - if(topShow){ - newList.add(menu); + if(topShow){ + newList.add(menu); + } + } + /*if(menu.getChildren()!=null && menu.getChildren().size()>0 && menu.getIsShow()==1){ + newList.add(menu); + }else if(menu.getMenuBg()!=null && !"".equals(menu.getMenuBg())){ + newList.add(menu); + }else if(menu.getId()==1){ + newList.add(menu); + }*/ + + /*if((menu.getParentIds().startsWith("0,1,86,") + || menu.getId()==86 + ||menu.getId()==0 + ||menu.getId()==1) + && menu.getIsShow()==1 + ){ + System.out.println(menu.getParentIds()); + newList.add(menu); + }*/ + } - - /*if(menu.getChildren()!=null && menu.getChildren().size()>0 && menu.getIsShow()==1){ - newList.add(menu); - }else if(menu.getMenuBg()!=null && !"".equals(menu.getMenuBg())){ - newList.add(menu); - }else if(menu.getId()==1){ - newList.add(menu); - }*/ - - /*if((menu.getParentIds().startsWith("0,1,86,") - || menu.getId()==86 - ||menu.getId()==0 - ||menu.getId()==1) - && menu.getIsShow()==1 - ){ - System.out.println(menu.getParentIds()); - newList.add(menu); - }*/ - + } catch (Exception e) { + logger.error("help error",e); } + logger.info("menuSize:"+newList.size()); model.addAttribute("menuList",newList); return "/help"; } diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/cache/form.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/cache/form.jsp index 66d003d5e..c8f51caaf 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/cache/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/cache/form.jsp @@ -339,7 +339,7 @@ - +
diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectForm.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectForm.jsp index 50e725142..b04aa84f8 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectForm.jsp @@ -148,7 +148,7 @@ - +