|
|
@@ -7,22 +7,17 @@ import Solo from '@/layout/Solo'
|
|
|
Vue.use(Router)
|
|
|
|
|
|
/**
|
|
|
- * Note: sub-menu only appear when route children.length >= 1
|
|
|
- * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
|
|
|
- *
|
|
|
- * dev: true if set true, item will not show in production
|
|
|
- * hidden: true if set true, item will not show in the sidebar(default is false)
|
|
|
- * alwaysShow: true if set true, will always show the root menu
|
|
|
- * if not set alwaysShow, when item has more than one children route,
|
|
|
- * it will becomes nested mode, otherwise not show the root menu
|
|
|
- * name:'router-name' the name is used by <keep-alive> (must set!!!)
|
|
|
+ * sub-menu only appear when route children.length >= 1
|
|
|
+ * dev: true if set true, item will not show in production
|
|
|
+ * hidden: true if set true, item will not show in the sidebar(default is false)
|
|
|
+ * name:'router-name' the name is used by <keep-alive> (must set!!!)
|
|
|
* meta : {
|
|
|
- roles: ['admin','editor'] control the page roles (you can set multiple roles)
|
|
|
- title: 'title' the name show in sidebar and breadcrumb (recommend set)
|
|
|
- icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
|
|
|
- breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
|
|
|
- activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
|
|
|
- }
|
|
|
+ * include: ['admin'], control the page roles (you can set multiple roles)
|
|
|
+ * exclude: ['editor'], control the page roles (you can set multiple roles)
|
|
|
+ * title: 'title', the name show in sidebar and breadcrumb (recommend set)
|
|
|
+ * icon: 'svg-name'/'el-icon-x', the icon show in the sidebar
|
|
|
+ * activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
|
|
|
+ * }
|
|
|
*/
|
|
|
|
|
|
/**
|
|
|
@@ -49,8 +44,8 @@ export const asyncRoutes = [
|
|
|
component: Layout,
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'dashboard',
|
|
|
name: 'dashboard',
|
|
|
+ path: 'dashboard',
|
|
|
component: () => import('@/views/dashboard/index'),
|
|
|
meta: { title: '首页', icon: 'el-icon-s-home' }
|
|
|
},
|
|
|
@@ -63,27 +58,16 @@ export const asyncRoutes = [
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
- {
|
|
|
- name: 'design',
|
|
|
- path: '/design/:id',
|
|
|
- component: () => import('@/views/bigscreen/designer/index'),
|
|
|
- hidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'view',
|
|
|
- path: '/view/:id',
|
|
|
- component: () => import('@/views/bigscreen/viewer/index'),
|
|
|
- hidden: true
|
|
|
- },
|
|
|
{
|
|
|
path: '/cm',
|
|
|
component: Layout,
|
|
|
- meta: { title: '智能信发', icon: 'el-icon-s-promotion', placeholder: true },
|
|
|
+ meta: { title: '智能信发', icon: 'el-icon-s-promotion' },
|
|
|
children: [
|
|
|
{
|
|
|
name: 'media',
|
|
|
path: 'media',
|
|
|
component: () => import('@/views/media/index'),
|
|
|
+ exclude: [Role.VISITOR],
|
|
|
meta: { title: '媒资管理' }
|
|
|
},
|
|
|
{
|
|
|
@@ -108,6 +92,7 @@ export const asyncRoutes = [
|
|
|
name: 'schedule-design',
|
|
|
path: ':id',
|
|
|
component: () => import('@/views/schedule/designer/index'),
|
|
|
+ exclude: [Role.VISITOR],
|
|
|
meta: { title: '排期编辑', activeMenu: '/cm/schedule', cache: 'ScheduleList' },
|
|
|
hidden: true
|
|
|
}
|
|
|
@@ -117,13 +102,15 @@ export const asyncRoutes = [
|
|
|
name: 'schedule-deploy',
|
|
|
path: 'deploy',
|
|
|
component: () => import('@/views/schedule/deploy/index'),
|
|
|
+ exclude: [Role.VISITOR],
|
|
|
meta: { title: '排期发布' }
|
|
|
},
|
|
|
{
|
|
|
name: 'review',
|
|
|
path: 'review',
|
|
|
component: () => import('@/views/review/index'),
|
|
|
- meta: { title: '审核管理', roles: [Role.SUPERVISOR] }
|
|
|
+ include: [Role.SUPERVISOR],
|
|
|
+ meta: { title: '审核管理' }
|
|
|
},
|
|
|
{
|
|
|
name: 'schedule-deploy-history',
|
|
|
@@ -137,7 +124,7 @@ export const asyncRoutes = [
|
|
|
dev: !__PREVIEW__,
|
|
|
path: '/dm',
|
|
|
component: Layout,
|
|
|
- meta: { title: '大屏设备', icon: 'el-icon-monitor', placeholder: true },
|
|
|
+ meta: { title: '大屏设备', icon: 'el-icon-monitor' },
|
|
|
children: [
|
|
|
{
|
|
|
name: 'schedule-timeline',
|
|
|
@@ -157,19 +144,21 @@ export const asyncRoutes = [
|
|
|
{
|
|
|
path: '/m',
|
|
|
component: Layout,
|
|
|
- meta: { title: '大屏管理', icon: 'el-icon-monitor', placeholder: true },
|
|
|
+ meta: { title: '大屏管理', icon: 'el-icon-monitor' },
|
|
|
children: [
|
|
|
{
|
|
|
name: 'category',
|
|
|
path: 'category',
|
|
|
component: () => import('@/views/device/category/index'),
|
|
|
- meta: { title: '产品分类', roles: [Role.ADMIN] }
|
|
|
+ include: [Role.ADMIN],
|
|
|
+ meta: { title: '产品分类' }
|
|
|
},
|
|
|
{
|
|
|
name: 'product',
|
|
|
path: 'product',
|
|
|
component: () => import('@/views/device/product/index'),
|
|
|
- meta: { title: '产品管理', roles: [Role.ADMIN] }
|
|
|
+ include: [Role.ADMIN],
|
|
|
+ meta: { title: '产品管理' }
|
|
|
},
|
|
|
{
|
|
|
path: 'device',
|
|
|
@@ -196,6 +185,7 @@ export const asyncRoutes = [
|
|
|
name: 'group',
|
|
|
path: 'group',
|
|
|
component: () => import('@/views/device/group/index'),
|
|
|
+ exclude: [Role.VISITOR],
|
|
|
meta: { title: '分组管理' }
|
|
|
}
|
|
|
]
|
|
|
@@ -203,33 +193,36 @@ export const asyncRoutes = [
|
|
|
{
|
|
|
path: '/l',
|
|
|
component: Layout,
|
|
|
- meta: { roles: [Role.ADMIN] },
|
|
|
+ exclude: [Role.STAFF],
|
|
|
+ meta: { icon: 'el-icon-edit-outline' },
|
|
|
children: [
|
|
|
{
|
|
|
path: '',
|
|
|
name: 'logger',
|
|
|
component: () => import('@/views/logger/index'),
|
|
|
- meta: { title: '操作日志', icon: 'el-icon-edit-outline' }
|
|
|
+ meta: { title: '操作日志' }
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
path: '/d',
|
|
|
component: Layout,
|
|
|
- meta: { roles: [Role.ADMIN] },
|
|
|
+ include: [Role.ADMIN],
|
|
|
+ meta: { icon: 'bug' },
|
|
|
children: [
|
|
|
{
|
|
|
path: '',
|
|
|
name: 'debug',
|
|
|
component: () => import('@/views/debug/index'),
|
|
|
- meta: { title: '调试', icon: 'bug' }
|
|
|
+ meta: { title: '调试' }
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
path: '/u',
|
|
|
component: Layout,
|
|
|
- meta: { title: '升级管理', icon: 'el-icon-upload', placeholder: true, roles: [Role.ADMIN] },
|
|
|
+ include: [Role.ADMIN],
|
|
|
+ meta: { title: '升级管理', icon: 'el-icon-upload' },
|
|
|
children: [
|
|
|
{
|
|
|
path: 'apk',
|
|
|
@@ -245,6 +238,19 @@ export const asyncRoutes = [
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
+ {
|
|
|
+ name: 'design',
|
|
|
+ path: '/design/:id',
|
|
|
+ component: () => import('@/views/bigscreen/designer/index'),
|
|
|
+ exclude: [Role.VISITOR],
|
|
|
+ hidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'view',
|
|
|
+ path: '/view/:id',
|
|
|
+ component: () => import('@/views/bigscreen/viewer/index'),
|
|
|
+ hidden: true
|
|
|
+ },
|
|
|
// 404 page must be placed at the end !!!
|
|
|
{ path: '*', redirect: '/', hidden: true }
|
|
|
]
|