Sfoglia il codice sorgente

修改: 菜单树bug

master
FLYPHT 2 anni fa
parent
commit
52bff43f88
2 ha cambiato i file con 10 aggiunte e 3 eliminazioni
  1. +3
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/PreviewMenuTreeService.java
  2. +7
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanContent.java

+ 3
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/PreviewMenuTreeService.java Vedi File

@@ -76,7 +76,9 @@ public class PreviewMenuTreeService {

public List<MenuVO> buildMenu(String prj_id, String module, UserSession us) {
Set<MenuPlan> set = MenuPlanCache.getInstance().getByP(prj_id);
if (PubUtil.isEmpty(set)) new ArrayList<>();
if (PubUtil.isEmpty(set)) {
return new ArrayList<>();
}
MenuPlan menuPlan = set.iterator().next();
MenuPlanContent mpc = new MenuPlanContent(menuPlan.getContent());
List<MenuVO> list = new ArrayList<>();


+ 7
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanContent.java Vedi File

@@ -131,8 +131,13 @@ public class MenuPlanContent {
if (item.getId() == id) {
return item;
}
if (PubUtil.isNotEmpty(item.getChildren())) {
return findById(id, item.getChildren());
}
for (MenuPlanItem item : itemList) {
if(PubUtil.isNotEmpty(item.getChildren())){
MenuPlanItem rt = findById(id,item.getChildren());
if(rt!=null){
return rt;
}
}
}
return null;


Caricamento…
Annulla
Salva