|
@@ -52,16 +52,14 @@ const enterpriseStore = useEnterpriseStore()
|
|
|
const list = computed(() => {
|
|
|
return getList(enterpriseStore.enterpriseMenu)
|
|
|
})
|
|
|
-// console.log(import.meta.env.VITE_NODE_ENV, '当前环境变量============')
|
|
|
|
|
|
-// const isAdmin = localStorage.getItem('isAdmin') === '1'
|
|
|
+const isAdmin = localStorage.getItem('isAdmin') === '1'
|
|
|
// const info = localStorage.getItem('entBaseInfo') ? JSON.parse(localStorage.getItem('entBaseInfo')) : {}
|
|
|
const getList = (arr, obj = [], root = '') => {
|
|
|
// 是否为企业管理员
|
|
|
arr.forEach(element => {
|
|
|
if (!element.alwaysShow) return
|
|
|
let data = {}
|
|
|
- // const path = element.path[0] === '/' ? element.path : '/' + element.path
|
|
|
const path = root + element.path
|
|
|
data = {
|
|
|
title: element.name,
|
|
@@ -71,9 +69,6 @@ const getList = (arr, obj = [], root = '') => {
|
|
|
path: enterpriseStore.menuType.CATALOGUE === element.type ? path + '/index' : path,
|
|
|
children: []
|
|
|
}
|
|
|
- // if (element?.meta?.isAdmin) {
|
|
|
- // data.isAdmin = true
|
|
|
- // }
|
|
|
// 人才地图
|
|
|
// if (element?.meta?.isPersonMap) data.isPersonMap = true
|
|
|
// 全员猎寻
|
|
@@ -81,18 +76,11 @@ const getList = (arr, obj = [], root = '') => {
|
|
|
if (element?.children) {
|
|
|
getList(element.children, data.children, path + '/')
|
|
|
}
|
|
|
- obj.push(data)
|
|
|
+
|
|
|
+ // 企业管理员才有集团账户的权限
|
|
|
+ if (data.path === '/recruit/enterprise/systemManagement/groupAccount' && !isAdmin) {}
|
|
|
+ else obj.push(data)
|
|
|
})
|
|
|
- // if (!isAdmin) {
|
|
|
- // obj = obj.filter(e => !e.isAdmin)
|
|
|
- // obj.map(e => {
|
|
|
- // e.children = e.children.filter(val => !val.isAdmin)
|
|
|
- // })
|
|
|
- // }
|
|
|
- // 人才地图是否可看
|
|
|
- // if (info && Object.keys(info).length && !info?.entitlement?.personMap) obj = obj.filter(e => !e.isPersonMap)
|
|
|
- // 全员猎寻是否可看
|
|
|
- // if (info && Object.keys(info).length && !info?.entitlement?.hireJob) obj = obj.filter(e => !e.hireJob)
|
|
|
|
|
|
// 生产环境隐藏门墩儿新任命
|
|
|
if (import.meta.env.VITE_NODE_ENV === 'production') obj = obj.filter(e => !e.path.includes('/recruit/enterprise/newlyAppointed'))
|