123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- // eslint-disable-next-line
- import { UserLayout, BasicLayout, BlankLayout } from '@/layouts'
- const RouteView = {
- name: 'RouteView',
- render: (h) => h('router-view')
- }
- // 带hidden true permission 数组一定要写他的相关连的url 否则无法和后端返回的url匹配上
- export const asyncRouterMap = [
- {
- path: '/',
- name: 'index',
- component: BasicLayout,
- meta: { title: 'menu.home' },
- redirect: '/markting/leads',
- children: [
- // marting
- {
- path: '/markting',
- component: RouteView,
- name: 'Markting',
- meta: { title: '销售管理', icon: 'user', keepAlive: true, permission: [ '/markting' ] },
- children: [
- {
- path: '/markting/active',
- name: 'Active',
- component: () => import('@/views/markting/active/list'),
- meta: { title: '市场活动', hideHeader: true, permission: [ '/markting/active' ] }
- },
- {
- path: '/markting/active/info',
- name: 'ActiveInfo',
- hidden: true,
- component: () => import('@/views/markting/active/info'),
- meta: { title: '活动详情', keepAlive: true, hideHeader: true, permission: [ '/markting/active' ] }
- },
- {
- path: '/markting/seas',
- name: 'Seas',
- component: () => import('@/views/markting/seas/list'),
- meta: { title: '公海池', hideHeader: true, permission: [ '/markting/seas' ] }
- },
- {
- path: '/markting/leads',
- name: 'Leads',
- component: () => import('@/views/markting/leads/list'),
- meta: { title: '线索管理', hideHeader: true, permission: [ '/markting/leads' ] }
- },
- {
- path: '/markting/leadsDetail',
- name: 'leadsDetail',
- hidden: true,
- component: () => import('@/views/markting/leads/leadsDetail'),
- meta: { title: '线索详情', hideHeader: true, permission: [ '/markting/leads' ] }
- },
- {
- path: '/markting/leadsRecord',
- name: 'leadsRecord',
- component: () => import('@/views/markting/leadsRecord/index'),
- meta: { title: '跟进记录', hideHeader: true, permission: [ '/markting/leadsRecord' ] }
- },
- {
- path: '/markting/BuyClass',
- name: 'BuyClass',
- hidden: true,
- component: () => import('@/views/markting/leads/buyClass'),
- meta: { title: '购课', hideHeader: false, permission: [ '/markting/BuyClass' ] }
- }
- ]
- },
- {
- path: '/student',
- component: RouteView,
- redirect: '/student/admin',
- name: 'student',
- meta: { title: '学员管理', icon: 'user', keepAlive: true, permission: [ '/student' ] },
- children: [
- {
- path: '/student/admin',
- name: 'studentAdmin',
- component: () => import('@/views/student/index'),
- meta: { title: '学员列表', hideHeader: true, permission: [ '/student/admin' ] }
- },
- {
- path: '/student/studentDetail',
- name: 'studentDetail',
- hidden: true,
- component: () => import('@/views/student/studentDetail'),
- meta: { title: '学员详情', hideHeader: true, permission: [ '/student/admin' ] }
- }
- ]
- },
- // 教务管理
- {
- path: '/eduAdmin',
- component: RouteView,
- redirect: '/eduAdmin/calss',
- name: 'eduAdmin',
- meta: { title: '教务管理', icon: 'user', keepAlive: true, permission: [ '/eduAdmin' ] },
- children: [
- {
- path: '/eduAdmin/calss',
- name: 'Calss',
- component: () => import('@/views/eduAdmin/class/index'),
- meta: { title: '课程管理', hideHeader: true, permission: [ '/eduAdmin/calss' ] }
- },
- {
- path: '/eduAdmin/grade',
- name: 'grade',
- component: () => import('@/views/eduAdmin/grade/index'),
- meta: { title: '班级管理', hideHeader: true, permission: [ '/eduAdmin/grade' ] }
- },
- {
- path: '/eduAdmin/gradeDetail',
- name: 'gradeDetail',
- hidden: true,
- component: () => import('@/views/eduAdmin/grade/gradeDetail'),
- meta: { title: '班级详情', hideHeader: true, permission: [ '/eduAdmin/grade' ] }
- },
- {
- path: '/eduAdmin/courseDetail',
- name: 'courseDetail',
- hidden: true,
- component: () => import('@/views/eduAdmin/grade/courseDetail'),
- meta: { title: '课程详情', hideHeader: true, permission: [ '/eduAdmin/grade' ] }
- }
- // {
- // path: '/eduAdmin/classSchedule',
- // name: 'classSchedule',
- // component: () => import('@/views/eduAdmin/classSchedule/index'),
- // meta: { title: '总课表', hideHeader: true, permission: [ 'datum' ] }
- // }
- ]
- },
- // 数据分析datum
- {
- path: '/datum',
- component: RouteView,
- redirect: '/datum/sell',
- name: 'basics',
- meta: { title: '数据统计', icon: 'user', keepAlive: true, permission: [ '/datum' ] },
- children: [
- {
- path: '/datum/sell',
- name: 'datumSell',
- component: () => import('@/views/datum/sell/index'),
- meta: { title: '销售统计', hideHeader: true, permission: [ '/datum/sell' ] }
- },
- // {
- // path: '/datum/removeCourse',
- // name: 'removeCourse',
- // component: () => import('@/views/datum/removeCourse/index'),
- // meta: { title: '消课统计', hideHeader: true, permission: [ 'datum' ] }
- // },
- {
- path: '/datum/student',
- name: 'datumStudent',
- component: () => import('@/views/datum/student/index'),
- meta: { title: '学员分析', hideHeader: true, permission: [ '/datum/student' ] }
- },
- {
- path: '/datum/finace',
- name: 'datumFinace',
- component: () => import('@/views/datum/fiance/index'),
- meta: { title: '财务分析', hideHeader: true, permission: [ '/datum/finace' ] }
- }
- ]
- },
- // 基础设置
- {
- path: '/basics',
- component: RouteView,
- redirect: '/basics/sell',
- name: 'basics',
- meta: { title: '基础配置', icon: 'user', keepAlive: true, permission: [ '/basics' ] },
- children: [
- {
- path: '/basics/sell',
- name: 'sell',
- component: () => import('@/views/basics/sell/index'),
- meta: { title: '销售配置', hideHeader: true, permission: [ '/basics/sell' ] }
- },
- {
- path: '/basics/tag',
- name: 'tag',
- component: () => import('@/views/basics/tag/index'),
- meta: { title: '标签配置', hideHeader: true, permission: [ '/basics/tag' ] }
- },
- {
- path: '/basics/class',
- name: 'class',
- component: () => import('@/views/basics/class/index'),
- meta: { title: '教室配置', hideHeader: true, permission: [ '/basics/class' ] }
- }
- ]
- },
- // 权限设置
- {
- path: '/roleIng',
- component: RouteView,
- name: 'roleIng',
- redirect: '/account/role',
- meta: { title: '权限管理', icon: 'user', hideHeader: true, permission: [ '/roleIng' ] },
- children: [
- {
- path: '/roleIng/staff',
- name: 'staff',
- component: () => import('@/views/roleIng/staff/index'),
- meta: { title: '员工管理', hideHeader: true, permission: [ '/roleIng/staff' ] }
- },
- {
- path: '/roleIng/role',
- name: 'role',
- component: () => import('@/views/roleIng/role/index'),
- meta: { title: '角色管理', hideHeader: true, permission: [ '/roleIng/role' ] }
- }
- ]
- }
- ]
- }
- // {
- // path: '*', redirect: '/404', hidden: true
- // }
- ]
- /**
- * 基础路由
- * @type { *[] }
- */
- export const constantRouterMap = [
- {
- path: '/user/login',
- component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login'),
- // redirect: '/user/login',
- hidden: true,
- children: [
- ]
- },
- {
- path: '/404',
- component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
- }
- ]
|