|
@@ -19,23 +19,11 @@ export class InitSystemDataService {
|
|
|
/**初始化角色的菜单(不包含管理员) */
|
|
|
async initRoleMenus() {
|
|
|
const builder = this.Role.createQueryBuilder().update(Role);
|
|
|
- /**共有: 基础信息,认证信息,行业动态 */
|
|
|
- const common = ['center_basic', 'center_attestation', 'center_notice', 'center_collection', 'center_password', 'center_sign'];
|
|
|
- // 只用通用菜单的角色
|
|
|
- const justCommonRole = ['User', 'Association', 'Investment', 'State'];
|
|
|
+ /**共有: 基础信息,认证信息,通知管理,我的收藏,修改密码,导出管理,活动管理 */
|
|
|
+ const common = ['center_basic', 'center_attestation', 'center_notice', 'center_collection', 'center_password', 'center_sign', 'center_export'];
|
|
|
+ // 除管理员外,其他的角色都一样
|
|
|
+ const justCommonRole = ['User', 'Association', 'Investment', 'State', 'Expert', 'Unit', 'Incubator', 'Company', 'YX', 'Competition'];
|
|
|
await builder.set({ menu: common }).where('code IN (:...value)', { value: justCommonRole }).execute();
|
|
|
- // 第一类菜单
|
|
|
- const menus1 = [...common, 'center_news2', 'center_demand', 'center_supply', 'center_achievement', 'center_project', 'center_footplate', 'center_service'];
|
|
|
- // 第一类菜单用户: 用户,科研机构,孵化基地,企业,高校
|
|
|
- const roleUseMenus1 = ['Expert', 'Unit', 'Incubator', 'Company', 'YX'];
|
|
|
- await builder.set({ menu: menus1 }).where('code IN (:...value)', { value: roleUseMenus1 }).execute();
|
|
|
- // 创业大赛用户: 需要去掉报名管理,加入赛事管理
|
|
|
- const MatchRole = common.filter(f => f !== 'center_sign');
|
|
|
- MatchRole.push('center_match');
|
|
|
- await builder
|
|
|
- .set({ menu: MatchRole })
|
|
|
- .where('code IN (:...value)', { value: ['Competition'] })
|
|
|
- .execute();
|
|
|
}
|
|
|
|
|
|
/**初始化角色数据 */
|
|
@@ -314,6 +302,19 @@ export class InitSystemDataService {
|
|
|
is_use: '0',
|
|
|
icon: 'SwitchFilled',
|
|
|
},
|
|
|
+ {
|
|
|
+ order_num: 997,
|
|
|
+ name: '导出管理',
|
|
|
+ route_name: 'center_export',
|
|
|
+ i18n_code: 'menus.center_export',
|
|
|
+ path: '/center/export',
|
|
|
+ component: '/center/export',
|
|
|
+ type: '1',
|
|
|
+ config: [],
|
|
|
+ is_default: '0',
|
|
|
+ is_use: '0',
|
|
|
+ icon: 'Collection',
|
|
|
+ },
|
|
|
{
|
|
|
order_num: 998,
|
|
|
name: '我的收藏',
|