# 调整权限名称
This commit is contained in:
parent
5b2f7d7c9d
commit
f5568205f9
|
@ -120,6 +120,7 @@ export const asyncRouterMap = [
|
|||
{
|
||||
path: '/settings/device',
|
||||
component: Layout,
|
||||
meta: { roles: ['superadmin', 'admin'] },
|
||||
children: [{
|
||||
path: 'index',
|
||||
component: () => import('@/views/settings/device'),
|
||||
|
@ -131,7 +132,6 @@ export const asyncRouterMap = [
|
|||
{
|
||||
path: '/settings/system',
|
||||
component: Layout,
|
||||
meta: { roles: ['admin'] },
|
||||
children: [{
|
||||
path: 'index',
|
||||
component: () => import('@/views/settings/system'),
|
||||
|
|
|
@ -14,7 +14,6 @@ export default {
|
|||
components: { adminDashboard, editorDashboard },
|
||||
data() {
|
||||
return {
|
||||
allowRoles: ['admin', 'customer'],
|
||||
currentRole: 'adminDashboard'
|
||||
}
|
||||
},
|
||||
|
@ -24,7 +23,7 @@ export default {
|
|||
])
|
||||
},
|
||||
created() {
|
||||
const adminDashboardRoles = new Set(['admin', 'customer'])
|
||||
const adminDashboardRoles = new Set(['superadmin', 'admin', 'staff'])
|
||||
const userRoles = new Set(this.roles)
|
||||
const intersection = new Set([...userRoles].filter(role => adminDashboardRoles.has(role)))
|
||||
console.log(intersection.size)
|
||||
|
|
Loading…
Reference in New Issue