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