|
|
@@ -9,6 +9,7 @@ import { getFormattedText } from '/@/components/Configurable/hooks/helper';
|
|
|
// import { listToTree } from '/@/utils/helper/treeHelper';
|
|
|
import { MineDepartment, useMineDepartmentStore } from '/@/store/modules/mine';
|
|
|
import { AppRouteRecordRaw } from '/@/router/types';
|
|
|
+import { cloneDeep } from 'lodash';
|
|
|
|
|
|
enum Api {
|
|
|
GetMenuList = '/sys/permission/getUserPermissionByToken',
|
|
|
@@ -75,7 +76,7 @@ export const getMenuList: () => Promise<getMenuListResultModel> = () => {
|
|
|
auth: res.auth || [],
|
|
|
codeList: res.codeList || [],
|
|
|
// menu: __STATIC_ROUTES__,
|
|
|
- menu: processStaticRoutes(__STATIC_ROUTES__, mineStore).map((route) => {
|
|
|
+ menu: processStaticRoutes(cloneDeep(__STATIC_ROUTES__), mineStore).map((route) => {
|
|
|
if (route.meta?.generation && route.children && route.children.length) {
|
|
|
const template = route.children[0];
|
|
|
route.children = generateStaticSealedMonitorRoute(template, mineStore.getDepartTree);
|