|
@@ -14,7 +14,8 @@ import { cloneDeep } from 'lodash';
|
|
|
import { includeArray } from '@/libs/system';
|
|
import { includeArray } from '@/libs/system';
|
|
|
|
|
|
|
|
// 根据 menu 配置的权限,过滤菜单
|
|
// 根据 menu 配置的权限,过滤菜单
|
|
|
-function filterMenu(menuList, access, lastList) {
|
|
|
|
|
|
|
+function filterMenu(menuList, access, lastList) {
|
|
|
|
|
+ // console.log(menuList,'menuList')
|
|
|
menuList.forEach(menu => {
|
|
menuList.forEach(menu => {
|
|
|
let menuAccess = menu.auth;
|
|
let menuAccess = menu.auth;
|
|
|
|
|
|
|
@@ -24,11 +25,14 @@ function filterMenu(menuList, access, lastList) {
|
|
|
if (i !== 'children') newMenu[i] = cloneDeep(menu[i]);
|
|
if (i !== 'children') newMenu[i] = cloneDeep(menu[i]);
|
|
|
}
|
|
}
|
|
|
if (menu.children && menu.children.length) newMenu.children = [];
|
|
if (menu.children && menu.children.length) newMenu.children = [];
|
|
|
-
|
|
|
|
|
- lastList.push(newMenu);
|
|
|
|
|
|
|
+ if(newMenu.title != '系统设置') {
|
|
|
|
|
+ lastList.push(newMenu);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
menu.children && filterMenu(menu.children, access, newMenu.children);
|
|
menu.children && filterMenu(menu.children, access, newMenu.children);
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ // console.log(lastList,'lastList')
|
|
|
return lastList;
|
|
return lastList;
|
|
|
}
|
|
}
|
|
|
|
|
|