| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- /* Layout */
- import Layout from '@/layout'
- export const asyncRouterMap = [
- {
- path: '/',
- component: Layout,
- redirect: '/dashboard',
- children: [
- {
- path: 'dashboard',
- name: 'Dashboard',
- component: () => import('@/views/dashboard'),
- meta: { title: 'Dashboard', icon: 'dashboard' }
- }
- ]
- },
- {
- path: '/recipe',
- component: Layout,
- children: [
- {
- path: '',
- name: '菜谱列表',
- component: () => import('@/views/recipe/index'),
- meta: { title: '菜谱列表', icon: 'recipe', admin: true }
- },
- {
- path: ':id/food',
- name: '食物管理',
- component: () => import('@/views/recipe/food'),
- meta: { title: '食物管理' },
- hidden: true
- },
- {
- path: ':id/step',
- name: '步骤管理',
- component: () => import('@/views/recipe/step'),
- meta: { title: '步骤管理' },
- hidden: true
- }
- ]
- },
- {
- path: '/food',
- component: Layout,
- name: '食物列表',
- meta: { title: '食物列表', icon: 'food' },
- children: [
- {
- path: '',
- name: '全部',
- component: () => import('@/views/food/index'),
- meta: { title: '全部', admin: true }
- },
- {
- path: 'entry',
- name: '录入',
- component: () => import('@/views/food/index'),
- meta: { title: '录入' }
- },
- {
- path: 'cfct',
- name: 'CFCT',
- component: () => import('@/views/food/index'),
- meta: { title: 'CFCT', admin: true }
- },
- {
- path: 'create',
- name: '食物创建',
- component: () => import('@/views/food/create'),
- meta: { title: '食物创建', icon: 'food' },
- hidden: true
- },
- {
- path: 'edit/:id',
- name: '食物编辑',
- component: () => import('@/views/food/edit'),
- meta: { title: '食物编辑', icon: 'food' },
- hidden: true
- },
- {
- path: ':id/nutrient',
- name: '营养素关联',
- component: () => import('@/views/food/nutrient'),
- meta: { title: '营养素关联', icon: 'food' },
- hidden: true
- },
- {
- path: ':id/unit',
- name: '单位管理',
- component: () => import('@/views/food/unit'),
- meta: { title: '单位管理' },
- hidden: true
- },
- {
- path: ':id/modifier',
- name: '规格管理',
- component: () => import('@/views/foodModifier/index'),
- meta: { title: '规格管理' },
- hidden: true
- },
- {
- path: ':id/modifier/create',
- name: '新建食物规格',
- component: () => import('@/views/foodModifier/create'),
- meta: { title: '新建食物规格' },
- hidden: true
- },
- {
- path: ':id/modifier/:modifierId/edit',
- name: '编辑食物规格',
- component: () => import('@/views/foodModifier/edit'),
- meta: { title: '编辑食物规格' },
- hidden: true
- }
- ]
- },
- {
- path: '/nutrient',
- component: Layout,
- children: [
- {
- path: '',
- name: '营养素列表',
- component: () => import('@/views/nutrient/index'),
- meta: { title: '营养素列表', icon: 'nutrient', admin: true }
- }
- ]
- },
- {
- path: '/unit',
- component: Layout,
- children: [
- {
- path: '',
- name: '单位列表',
- component: () => import('@/views/unit/index'),
- meta: { title: '单位列表', icon: 'unit', admin: true }
- }
- ]
- },
- {
- path: '/user',
- component: Layout,
- meta: { admin: true },
- children: [
- {
- path: '',
- name: '用户列表',
- component: () => import('@/views/user/index'),
- meta: { title: '用户列表', icon: 'user', admin: true }
- }
- ]
- },
- {
- path: '/nutrient-template',
- component: Layout,
- children: [
- {
- path: '',
- name: '营养素模板列表',
- component: () => import('@/views/nutrientTemplate/index'),
- meta: { title: '营养素模板列表', icon: 'template' }
- },
- {
- path: ':id/detail',
- name: '模板营养素管理',
- component: () => import('@/views/nutrientTemplate/detail'),
- meta: { title: '模板营养素管理' },
- hidden: true
- }
- ]
- },
- {
- path: '/food-category',
- component: Layout,
- children: [
- {
- path: '',
- name: '食物种类管理',
- component: () => import('@/views/foodCategory/index'),
- meta: { title: '食物种类管理', icon: 'category', admin: true }
- }
- ]
- },
- // 404 page must be placed at the end !!!
- { path: '*', redirect: '/404', hidden: true }
- ]
- /**
- * 基础路由
- * @type { *[] }
- */
- export const constantRouterMap = [
- {
- path: '/404',
- hidden: true,
- component: () => import('@/views/404')
- },
- {
- path: '/login',
- component: () => import('@/views/login/index'),
- hidden: true
- }
- ]
|