|
@@ -1,5 +1,6 @@
|
|
|
package thyyxxk.webserver.utils;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import thyyxxk.webserver.entity.ResultVo;
|
|
|
import thyyxxk.webserver.entity.settings.permissions.MenuItem;
|
|
|
|
|
@@ -19,6 +20,12 @@ public class TreeUtil {
|
|
|
List<MenuItem> resultList = new ArrayList<>();
|
|
|
Map<Integer, MenuItem> treeMap = new HashMap<>(tempList.size());
|
|
|
for (MenuItem item : tempList) {
|
|
|
+ JSONObject meta = new JSONObject();
|
|
|
+ if (StringUtil.notBlank(item.getIcon())) {
|
|
|
+ meta.put("icon", "iconfont " + item.getIcon());
|
|
|
+ }
|
|
|
+ meta.put("title", item.getName());
|
|
|
+ item.setMeta(meta);
|
|
|
treeMap.put(item.getCode(), item);
|
|
|
if (0 == item.getParent()) {
|
|
|
resultList.add(item);
|