lcw
This commit is contained in:
@ -1,14 +1,27 @@
|
||||
import path from "path";
|
||||
import { getItem } from '@/utils/storage'
|
||||
/*
|
||||
*获取所有的子集路由
|
||||
*/
|
||||
const getChildrenRoutes = (routes) => {
|
||||
const result = [];
|
||||
const { deptBizType, deptLevel } = getItem('deptId')[0]
|
||||
routes.forEach((route) => {
|
||||
if (route.children && route.children.length > 0) {
|
||||
result.push(...route.children);
|
||||
if (deptBizType == '23') {
|
||||
result.push(...route.children);
|
||||
} else {
|
||||
if (route.path == '/HumanIntelligence') {
|
||||
route.children.splice(0, 1);
|
||||
result.push(...route.children);
|
||||
} else {
|
||||
result.push(...route.children);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
console.log(result);
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user