| | |
| | | router.setName(getRouteName(menu));
|
| | | router.setPath(getRouterPath(menu));
|
| | | router.setComponent(getComponent(menu));
|
| | | router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon()));
|
| | | router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache())));
|
| | | List<SysMenu> cMenus = menu.getChildren();
|
| | | if (!cMenus.isEmpty() && cMenus.size() > 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType()))
|
| | | {
|
| | |
| | | children.setPath(menu.getPath());
|
| | | children.setComponent(menu.getComponent());
|
| | | children.setName(StringUtils.capitalize(menu.getPath()));
|
| | | children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon()));
|
| | | children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache())));
|
| | | childrenList.add(children);
|
| | | router.setChildren(childrenList);
|
| | | }
|
| | |
| | | {
|
| | | component = menu.getComponent();
|
| | | }
|
| | | else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu))
|
| | | {
|
| | | component = UserConstants.PARENT_VIEW;
|
| | | }
|
| | | return component;
|
| | | }
|
| | |
|
| | |
| | | return menu.getParentId().intValue() == 0 && UserConstants.TYPE_MENU.equals(menu.getMenuType())
|
| | | && menu.getIsFrame().equals(UserConstants.NO_FRAME);
|
| | | }
|
| | | |
| | | /**
|
| | | * 是否为parent_view组件
|
| | | * |
| | | * @param menu 菜单信息
|
| | | * @return 结果
|
| | | */
|
| | | public boolean isParentView(SysMenu menu)
|
| | | {
|
| | | return menu.getParentId().intValue() != 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType());
|
| | | }
|
| | |
|
| | | /**
|
| | | * 根据父节点的ID获取所有子节点
|