|
@@ -45,26 +45,28 @@ export default {
|
|
|
name: 'LayoutHeader',
|
|
name: 'LayoutHeader',
|
|
|
data() {
|
|
data() {
|
|
|
const token = getToken();
|
|
const token = getToken();
|
|
|
|
|
+ const popedomCodeList = this.$store.state.user?.popedom_code_list || [];
|
|
|
|
|
+
|
|
|
// 用户类型与菜单映射
|
|
// 用户类型与菜单映射
|
|
|
const projectListMap = {
|
|
const projectListMap = {
|
|
|
USER: [
|
|
USER: [
|
|
|
{ key: 'home', name: '主页' },
|
|
{ key: 'home', name: '主页' },
|
|
|
- { key: 'personal_workbench/project', name: '教材管理' },
|
|
|
|
|
- { key: 'personal_workbench/edit_task', name: '教材制作' },
|
|
|
|
|
- { key: 'personal_workbench/check_task', name: '教材审核' },
|
|
|
|
|
- { key: 'personal_workbench/template_list_org', name: '模板制作' },
|
|
|
|
|
|
|
+ { key: 'personal_workbench/project', name: '教材管理', isShow: true },
|
|
|
|
|
+ { key: 'personal_workbench/edit_task', name: '教材制作', isShow: true },
|
|
|
|
|
+ { key: 'personal_workbench/check_task', name: '教材审核', isShow: true },
|
|
|
|
|
+ { key: 'personal_workbench/template_list_org', name: '模板制作', isShow: popedomCodeList.includes(2000001) },
|
|
|
{ key: 'personal_center', name: '个人中心' },
|
|
{ key: 'personal_center', name: '个人中心' },
|
|
|
],
|
|
],
|
|
|
ORG_MANAGER: [
|
|
ORG_MANAGER: [
|
|
|
- { key: 'project_manage/org/project', name: '项目管理' },
|
|
|
|
|
- { key: 'personal_workbench/template_list_manager', name: '模板管理' },
|
|
|
|
|
- { key: 'user_manage_org', name: '用户管理' },
|
|
|
|
|
- { key: 'personal_center', name: '个人中心' },
|
|
|
|
|
|
|
+ { key: 'project_manage/org/project', name: '项目管理', isShow: true },
|
|
|
|
|
+ { key: 'personal_workbench/template_list_manager', name: '模板管理', isShow: true },
|
|
|
|
|
+ { key: 'user_manage_org', name: '用户管理', isShow: true },
|
|
|
|
|
+ { key: 'personal_center', name: '个人中心', isShow: true },
|
|
|
],
|
|
],
|
|
|
ADMIN: [
|
|
ADMIN: [
|
|
|
- { key: 'org_manage', name: '机构管理' },
|
|
|
|
|
- { key: 'user_manage', name: '用户管理' },
|
|
|
|
|
- { key: 'system_config', name: '系统配置' },
|
|
|
|
|
|
|
+ { key: 'org_manage', name: '机构管理', isShow: true },
|
|
|
|
|
+ { key: 'user_manage', name: '用户管理', isShow: true },
|
|
|
|
|
+ { key: 'system_config', name: '系统配置', isShow: true },
|
|
|
],
|
|
],
|
|
|
};
|
|
};
|
|
|
// 获取当前用户类型
|
|
// 获取当前用户类型
|
|
@@ -73,7 +75,7 @@ export default {
|
|
|
token: this.$store.state.user || token,
|
|
token: this.$store.state.user || token,
|
|
|
activePro: '',
|
|
activePro: '',
|
|
|
LoginNavIndex: 0,
|
|
LoginNavIndex: 0,
|
|
|
- projectList: projectListMap[userType] || projectListMap.USER,
|
|
|
|
|
|
|
+ projectList: projectListMap[userType]?.filter((item) => item.isShow !== false) || projectListMap.USER,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|