You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
3.3 KiB
139 lines
3.3 KiB
// router/routes.ts
|
|
import n_audit from 'assets/images/menuIcon/n-audit.svg'
|
|
import n_debug from 'assets/images/menuIcon/n-debug.svg'
|
|
import n_disinfect from 'assets/images/menuIcon/n-disinfect.svg'
|
|
import n_formula from 'assets/images/menuIcon/n-formula.svg'
|
|
import n_gas from 'assets/images/menuIcon/n-gas.svg'
|
|
import n_liquid from 'assets/images/menuIcon/n-liquid.svg'
|
|
import n_seal from 'assets/images/menuIcon/n-seal.svg'
|
|
import n_setting from 'assets/images/menuIcon/n-setting.svg'
|
|
import s_audit from 'assets/images/menuIcon/s-audit.svg'
|
|
import s_debug from 'assets/images/menuIcon/s-debug.svg'
|
|
import s_disinfect from 'assets/images/menuIcon/s-disinfect.svg'
|
|
import s_formula from 'assets/images/menuIcon/s-formula.svg'
|
|
import s_gas from 'assets/images/menuIcon/s-gas.svg'
|
|
import s_liquid from 'assets/images/menuIcon/s-liquid.svg'
|
|
import s_seal from 'assets/images/menuIcon/s-seal.svg'
|
|
import s_setting from 'assets/images/menuIcon/s-setting.svg'
|
|
import type { RouteRecordRaw } from 'vue-router'
|
|
|
|
const authRoutes: RouteRecordRaw[] = [
|
|
{
|
|
path: '/home',
|
|
name: 'home',
|
|
component: () => import('views/home/index.vue'),
|
|
meta: {
|
|
isDefault: true,
|
|
title: '消毒',
|
|
icon: n_disinfect,
|
|
activeIcon: s_disinfect,
|
|
},
|
|
children: [
|
|
{
|
|
path: 'config',
|
|
name: 'config',
|
|
component: () => import('components/home/config.vue'),
|
|
},
|
|
{
|
|
path: 'chart',
|
|
name: 'chart',
|
|
component: () => import('views/home/chart.vue'),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/liquid',
|
|
name: 'liquid',
|
|
component: () => import('views/liquid/index.vue'),
|
|
meta: {
|
|
isDefault: true,
|
|
title: '消毒液',
|
|
icon: n_liquid,
|
|
activeIcon: s_liquid,
|
|
keepAlive: true,
|
|
},
|
|
},
|
|
{
|
|
path: '/seal',
|
|
name: 'seal',
|
|
component: () => import('views/seal/index.vue'),
|
|
meta: {
|
|
isDefault: true,
|
|
title: '密封测试',
|
|
icon: n_seal,
|
|
activeIcon: s_seal,
|
|
},
|
|
},
|
|
{
|
|
path: '/formula',
|
|
name: 'formula',
|
|
component: () => import('views/formula/index.vue'),
|
|
meta: {
|
|
isDefault: true,
|
|
title: '配方',
|
|
icon: n_formula,
|
|
activeIcon: s_formula,
|
|
},
|
|
},
|
|
{
|
|
path: '/gas',
|
|
name: 'gas',
|
|
component: () => import('views/gas/index.vue'),
|
|
meta: {
|
|
isDefault: true,
|
|
title: '气路控制',
|
|
icon: n_gas,
|
|
activeIcon: s_gas,
|
|
},
|
|
},
|
|
{
|
|
path: '/debug',
|
|
name: 'debug',
|
|
component: () => import('views/debug/index.vue'),
|
|
meta: {
|
|
isDefault: true,
|
|
title: '测试',
|
|
icon: n_debug,
|
|
activeIcon: s_debug,
|
|
},
|
|
},
|
|
{
|
|
path: '/audit',
|
|
name: 'audit',
|
|
component: () => import('views/audit/index.vue'),
|
|
meta: {
|
|
isDefault: true,
|
|
title: '审计',
|
|
icon: n_audit,
|
|
activeIcon: s_audit,
|
|
},
|
|
},
|
|
{
|
|
path: '/setting',
|
|
name: 'setting',
|
|
component: () => import('views/setting/index.vue'),
|
|
meta: {
|
|
isDefault: true,
|
|
title: '设置',
|
|
icon: n_setting,
|
|
activeIcon: s_setting,
|
|
},
|
|
},
|
|
]
|
|
|
|
const routes: RouteRecordRaw[] = [
|
|
{
|
|
path: '/login',
|
|
name: 'login',
|
|
component: () => import('../views/login/index.vue'),
|
|
},
|
|
{
|
|
path: '/',
|
|
component: () => import('../layouts/default.vue'),
|
|
redirect: '/home',
|
|
children: authRoutes,
|
|
},
|
|
]
|
|
|
|
export { authRoutes }
|
|
export default routes
|