| | |
| | | |
| | | /* Layout */ |
| | | import Layout from '@/layout' |
| | | import qywechatRouter from './modules/qywechat' |
| | | |
| | | /** |
| | | * Note: 路由配置项 |
| | |
| | | path: '/system/gps/mapNeed', |
| | | component: () => import('@/views/system/gps/mapNeed'), |
| | | name: 'GpsMapNeed', |
| | | hidden: true, |
| | | meta: { title: '车辆轨迹', showMenu: false, icon: 'map' } |
| | | meta: { title: '车辆轨迹', icon: 'map' } |
| | | }, |
| | | |
| | | { |
| | | path: '/h5/task_create', |
| | | component: () => import('@/views/task/h5/create'), |
| | | hidden: false, |
| | | name: 'H5TaskCreate', |
| | | meta: { title: '创建任务' } |
| | | } |
| | | ] |
| | | |
| | | // 动态路由,基于用户权限动态去加载 |
| | | export const dynamicRoutes = [ |
| | | qywechatRouter, |
| | | { |
| | | path: '/system/user-auth', |
| | | component: Layout, |
| | |
| | | meta: { title: '修改生成配置', activeMenu: '/tool/gen' } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/task/general-detail', |
| | | component: Layout, |
| | | hidden: true, |
| | | permissions: ['task:general:query'], |
| | | children: [ |
| | | { |
| | | path: 'index/:taskId(\\d+)', |
| | | component: () => import('@/views/task/general/detail'), |
| | | name: 'TaskDetail', |
| | | meta: { title: '任务详情', activeMenu: '/task/general' } |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | |
| | |
| | | } |
| | | |
| | | export default new Router({ |
| | | mode: 'history', // 去掉url中的# |
| | | mode: 'history', // 使用history模式,URL更美观 |
| | | scrollBehavior: () => ({ y: 0 }), |
| | | routes: constantRoutes |
| | | }) |