Browse Source

修改: 菜单树bug

master
FLYPHT 2 years ago
parent
commit
1b54eb5505
2 changed files with 4 additions and 1 deletions
  1. +0
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanContent.java
  2. +4
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanHandler.java

+ 0
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanContent.java View File

@@ -92,7 +92,6 @@ public class MenuPlanContent {
}
}
}

// 转换成字符串
public String toContentStr() {
return JsonUtil.encodeString(list);


+ 4
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanHandler.java View File

@@ -184,13 +184,17 @@ public class MenuPlanHandler {
}
MenuPlanContent menuPlanContent = new MenuPlanContent(menuPlan.getContent());
MenuPlanItem menuPlanItem = menuPlanContent.findById(id);
MenuPlanItem parent;
if (menuPlanItem == null) {
return new SwMap();
}else {
parent = menuPlanContent.findParentById(menuPlanItem.getId());
}
SwMap r = new SwMap();
r.putAll(menuPlanItem.getData());
r.put("plan_id", plan_id);
r.put("type", menuPlanItem.getMenu() > 0 ? 1 : 0);
r.put("parent_id",parent == null ? -1 : parent.getId());
return r;
}
return super.loadData(filter, pageDataSet);


Loading…
Cancel
Save