feat: 新增cookie值填写
This commit is contained in:
@ -3,8 +3,8 @@ export const MENU_LIST = [
|
||||
{
|
||||
id: MENU_GROUP_IDS.WORK_BENCH_ID,
|
||||
name: '工作台',
|
||||
pathName: 'Home',
|
||||
pathNames: ['Home'],
|
||||
routeName: 'Home',
|
||||
includeRouteNames: ['Home'],
|
||||
requiresAuth: false,
|
||||
permissionKey: '', // 权限key,如果为空,则表示该菜单不需要权限,与后端约定
|
||||
},
|
||||
@ -16,33 +16,33 @@ export const MENU_LIST = [
|
||||
children: [
|
||||
{
|
||||
name: '行业热门话题洞察',
|
||||
pathName: 'DataEngineHotTranslation',
|
||||
pathNames: ['DataEngineHotTranslation'],
|
||||
routeName: 'DataEngineHotTranslation',
|
||||
includeRouteNames: ['DataEngineHotTranslation'],
|
||||
},
|
||||
{
|
||||
name: '行业词云',
|
||||
pathName: 'DataEngineHotCloud',
|
||||
pathNames: ['DataEngineHotCloud'],
|
||||
routeName: 'DataEngineHotCloud',
|
||||
includeRouteNames: ['DataEngineHotCloud'],
|
||||
},
|
||||
{
|
||||
name: '行业关键词动向',
|
||||
pathName: 'DataEngineKeyWord',
|
||||
pathNames: ['DataEngineKeyWord'],
|
||||
routeName: 'DataEngineKeyWord',
|
||||
includeRouteNames: ['DataEngineKeyWord'],
|
||||
},
|
||||
{
|
||||
name: '用户痛点观察',
|
||||
pathName: 'DataEngineUserPainPoints',
|
||||
pathNames: ['DataEngineUserPainPoints'],
|
||||
routeName: 'DataEngineUserPainPoints',
|
||||
includeRouteNames: ['DataEngineUserPainPoints'],
|
||||
},
|
||||
{
|
||||
name: '重点品牌动向',
|
||||
pathName: 'DataEngineKeyBrandMovement',
|
||||
pathNames: ['DataEngineKeyBrandMovement'],
|
||||
routeName: 'DataEngineKeyBrandMovement',
|
||||
includeRouteNames: ['DataEngineKeyBrandMovement'],
|
||||
},
|
||||
{
|
||||
name: '用户画像',
|
||||
pathName: 'DataEngineUserPersona',
|
||||
pathNames: ['DataEngineUserPersona'],
|
||||
routeName: 'DataEngineUserPersona',
|
||||
includeRouteNames: ['DataEngineUserPersona'],
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -54,18 +54,22 @@ export const MENU_LIST = [
|
||||
children: [
|
||||
{
|
||||
name: '品牌资产管理',
|
||||
pathName: 'RepositoryBrandMaterials',
|
||||
pathNames: ['RepositoryBrandMaterials'],
|
||||
routeName: 'RepositoryBrandMaterials',
|
||||
includeRouteNames: ['RepositoryBrandMaterials'],
|
||||
},
|
||||
{
|
||||
name: '账号资源中心',
|
||||
pathName: 'MediaAccountAccountManagement',
|
||||
pathNames: ['MediaAccountAccountManagement', 'MediaAccountAccountDashboard', 'MediaAccountAccountDetails'],
|
||||
routeName: 'MediaAccountAccountManagement',
|
||||
includeRouteNames: [
|
||||
'MediaAccountAccountManagement',
|
||||
'MediaAccountAccountDashboard',
|
||||
'MediaAccountAccountDetails',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: '投放资源中心',
|
||||
pathName: 'PutAccountAccountManagement',
|
||||
pathNames: [
|
||||
routeName: 'PutAccountAccountManagement',
|
||||
includeRouteNames: [
|
||||
'PutAccountAccountManagement',
|
||||
'PutAccountAccountData',
|
||||
'PutAccountAccountDashboard',
|
||||
@ -75,8 +79,11 @@ export const MENU_LIST = [
|
||||
},
|
||||
{
|
||||
name: '智能方案管理',
|
||||
pathName: 'IntelligentSolutionBusinessAnalysisReport',
|
||||
pathNames: ['IntelligentSolutionBusinessAnalysisReport', 'IntelligentSolutionCompetitiveProductAnalysisReport'],
|
||||
routeName: 'IntelligentSolutionBusinessAnalysisReport',
|
||||
includeRouteNames: [
|
||||
'IntelligentSolutionBusinessAnalysisReport',
|
||||
'IntelligentSolutionCompetitiveProductAnalysisReport',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@ -89,9 +89,9 @@ export const useUserStore = defineStore('user', {
|
||||
}
|
||||
});
|
||||
|
||||
const pushAllowAccessRoutes = (pathNames: string[]) => {
|
||||
const pushAllowAccessRoutes = (includeRouteNames: string[]) => {
|
||||
const matchedRoute = appRoutes
|
||||
.filter((route: any) => pathNames.includes(route.name))
|
||||
.filter((route: any) => includeRouteNames.includes(route.name))
|
||||
.map((route: any) => route.name);
|
||||
this.allowAccessRoutes.push(...matchedRoute);
|
||||
};
|
||||
@ -99,10 +99,10 @@ export const useUserStore = defineStore('user', {
|
||||
menuList.forEach((item) => {
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((child: any) => {
|
||||
pushAllowAccessRoutes(child.pathNames);
|
||||
pushAllowAccessRoutes(child.includeRouteNames);
|
||||
});
|
||||
} else {
|
||||
pushAllowAccessRoutes(item.pathNames);
|
||||
pushAllowAccessRoutes(item.includeRouteNames);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user