|
|
@@ -13,16 +13,18 @@ const formatRouter = (list) => {
|
|
|
let arr = [];
|
|
|
for (const p of list) {
|
|
|
if (p.menuType === 2) {
|
|
|
- p.children = [];
|
|
|
- authorities.push(p);
|
|
|
+ // p.children = [];
|
|
|
+ // authorities.push(p);
|
|
|
+ p.hide = true;
|
|
|
+ }
|
|
|
+ // else {
|
|
|
+ if (p.children?.length) {
|
|
|
+ p.children = fn(p.children);
|
|
|
} else {
|
|
|
- if (p.children?.length) {
|
|
|
- p.children = fn(p.children);
|
|
|
- } else {
|
|
|
- p.children = [];
|
|
|
- }
|
|
|
- arr.push(p);
|
|
|
+ p.children = [];
|
|
|
}
|
|
|
+ arr.push(p);
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
return arr;
|