diff --git a/src/router/index.js b/src/router/index.js index a29418b..d978548 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -88,5 +88,5 @@ export const asyncRouterMap = [ ...menuRouters, ...systemRouters, - { path: '*', redirect: '/404', hidden: true }, + { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/index.js b/src/router/index.js index a29418b..d978548 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -88,5 +88,5 @@ export const asyncRouterMap = [ ...menuRouters, ...systemRouters, - { path: '*', redirect: '/404', hidden: true }, + { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/menu.js b/src/router/modules/menu.js index f608f1d..c00bc56 100644 --- a/src/router/modules/menu.js +++ b/src/router/modules/menu.js @@ -3,11 +3,29 @@ export const menuRouters = [ { path: '/', + name: '/', + component: Layout, + redirect: '/loginBoard', + meta: { + title: '主页', + icon: 'icon-config' // 图标 + }, + children: [ + { + path: '/loginBoard', + name: 'LoginBoard', + component: () => import('@/views/backstage/loginBoard'), + meta: { title: '主页', icon: 'icon-config', permission: [] } + } + ] + }, + { + path: '/caseList', + name: 'caseList', component: Layout, redirect: '/caseList', - name: '/', meta: { - title: '安防事件管理', + title: '安防事件', permission: ['/case'], // 权限名称 icon: 'icon-config' // 图标 }, @@ -56,7 +74,7 @@ name: 'VideoHistory', component: () => import('@/views/video/history'), meta: { title: '历史视频', icon: '', permission: ['/video/history'] } - }, + } // { // path: '/person/route', // name: 'PersonRoute', @@ -124,7 +142,7 @@ path: '/inoutList', name: 'InoutList', component: () => import('@/views/person/inoutList'), - meta: { title: '人员进出记录', icon: ''} + meta: { title: '人员进出记录', icon: '' } } ] }, @@ -275,33 +293,59 @@ ] }, { - path: 'backstage', + path: 'message', component: Layout, - redirect: '/backstage', - name: 'Backstage', + redirect: '/message', + name: 'MessageList', meta: { - title: '小程序后台', - permission: ['/backstage'], + title: '消息后台', + permission: ['/backstage/message'], // 权限名称 icon: 'icon-config' // 图标 }, children: [ { - path: '/messageList', + path: '/message', name: 'MessageList', component: () => import('@/views/backstage/messageList'), - meta: { title: '消息后台', icon: '', permission: ['/backstage/message'] } - }, + meta: { title: '消息后台', icon: 'icon-data', permission: ['/backstage/message'] } + } + ] + }, + { + path: 'person', + component: Layout, + redirect: '/person', + name: 'PersonList', + meta: { + title: '人员管理后台', + permission: ['/backstage/person'], // 权限名称 + icon: 'icon-config' // 图标 + }, + children: [ { - path: '/personList', + path: '/person', name: 'PersonList', component: () => import('@/views/backstage/personList'), - meta: { title: '人员管理后台', icon: '', permission: ['/backstage/person'] } - }, + meta: { title: '人员管理后台', icon: 'user', permission: ['/backstage/person'] } + } + ] + }, + { + path: 'visit', + component: Layout, + redirect: '/visit', + name: 'VisitList', + meta: { + title: '访客申请后台', + permission: ['/backstage/visit'], // 权限名称 + icon: 'icon-config' // 图标 + }, + children: [ { - path: '/visitAdmin', + path: '/visit', name: 'VisitList', component: () => import('@/views/backstage/visitList'), - meta: { title: '访客申请后台', icon: '', permission: ['/backstage/visit'] } + meta: { title: '访客申请后台', icon: 'icon-config', permission: ['/backstage/visit'] } } ] } diff --git a/src/router/index.js b/src/router/index.js index a29418b..d978548 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -88,5 +88,5 @@ export const asyncRouterMap = [ ...menuRouters, ...systemRouters, - { path: '*', redirect: '/404', hidden: true }, + { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/menu.js b/src/router/modules/menu.js index f608f1d..c00bc56 100644 --- a/src/router/modules/menu.js +++ b/src/router/modules/menu.js @@ -3,11 +3,29 @@ export const menuRouters = [ { path: '/', + name: '/', + component: Layout, + redirect: '/loginBoard', + meta: { + title: '主页', + icon: 'icon-config' // 图标 + }, + children: [ + { + path: '/loginBoard', + name: 'LoginBoard', + component: () => import('@/views/backstage/loginBoard'), + meta: { title: '主页', icon: 'icon-config', permission: [] } + } + ] + }, + { + path: '/caseList', + name: 'caseList', component: Layout, redirect: '/caseList', - name: '/', meta: { - title: '安防事件管理', + title: '安防事件', permission: ['/case'], // 权限名称 icon: 'icon-config' // 图标 }, @@ -56,7 +74,7 @@ name: 'VideoHistory', component: () => import('@/views/video/history'), meta: { title: '历史视频', icon: '', permission: ['/video/history'] } - }, + } // { // path: '/person/route', // name: 'PersonRoute', @@ -124,7 +142,7 @@ path: '/inoutList', name: 'InoutList', component: () => import('@/views/person/inoutList'), - meta: { title: '人员进出记录', icon: ''} + meta: { title: '人员进出记录', icon: '' } } ] }, @@ -275,33 +293,59 @@ ] }, { - path: 'backstage', + path: 'message', component: Layout, - redirect: '/backstage', - name: 'Backstage', + redirect: '/message', + name: 'MessageList', meta: { - title: '小程序后台', - permission: ['/backstage'], + title: '消息后台', + permission: ['/backstage/message'], // 权限名称 icon: 'icon-config' // 图标 }, children: [ { - path: '/messageList', + path: '/message', name: 'MessageList', component: () => import('@/views/backstage/messageList'), - meta: { title: '消息后台', icon: '', permission: ['/backstage/message'] } - }, + meta: { title: '消息后台', icon: 'icon-data', permission: ['/backstage/message'] } + } + ] + }, + { + path: 'person', + component: Layout, + redirect: '/person', + name: 'PersonList', + meta: { + title: '人员管理后台', + permission: ['/backstage/person'], // 权限名称 + icon: 'icon-config' // 图标 + }, + children: [ { - path: '/personList', + path: '/person', name: 'PersonList', component: () => import('@/views/backstage/personList'), - meta: { title: '人员管理后台', icon: '', permission: ['/backstage/person'] } - }, + meta: { title: '人员管理后台', icon: 'user', permission: ['/backstage/person'] } + } + ] + }, + { + path: 'visit', + component: Layout, + redirect: '/visit', + name: 'VisitList', + meta: { + title: '访客申请后台', + permission: ['/backstage/visit'], // 权限名称 + icon: 'icon-config' // 图标 + }, + children: [ { - path: '/visitAdmin', + path: '/visit', name: 'VisitList', component: () => import('@/views/backstage/visitList'), - meta: { title: '访客申请后台', icon: '', permission: ['/backstage/visit'] } + meta: { title: '访客申请后台', icon: 'icon-config', permission: ['/backstage/visit'] } } ] } diff --git a/src/views/backstage/loginBoard.vue b/src/views/backstage/loginBoard.vue new file mode 100644 index 0000000..1c62ab2 --- /dev/null +++ b/src/views/backstage/loginBoard.vue @@ -0,0 +1,199 @@ + + + + + + 欢迎您:{{ name }}! + + + + + {{ item.name }} + + + + + + + 中国,北京时间 + + + {{ time }} + + + + + + + + +