¶Ô±ÈÐÂÎļþ |
| | |
| | | import type { AppRouteModule, AppRouteRecordRaw } from '/@/router/types' |
| | | |
| | | import { PAGE_NOT_FOUND_ROUTE, REDIRECT_ROUTE } from '/@/router/routes/basic' |
| | | |
| | | import { mainOutRoutes } from './mainOut' |
| | | import { PageEnum } from '/@/enums/pageEnum' |
| | | import { t } from '/@/hooks/web/useI18n' |
| | | |
| | | const modules = import.meta.glob('./modules/**/*.ts', { eager: true }) |
| | | |
| | | const routeModuleList: AppRouteModule[] = [] |
| | | |
| | | // å å
¥å°è·¯ç±éåä¸ |
| | | Object.keys(modules).forEach((key) => { |
| | | const mod = (modules as Recordable)[key].default || {} |
| | | const modList = Array.isArray(mod) ? [...mod] : [mod] |
| | | routeModuleList.push(...modList) |
| | | }) |
| | | |
| | | export const asyncRoutes = [PAGE_NOT_FOUND_ROUTE, ...routeModuleList] |
| | | |
| | | export const RootRoute: AppRouteRecordRaw = { |
| | | path: '/', |
| | | name: 'Root', |
| | | redirect: PageEnum.BASE_HOME, |
| | | meta: { |
| | | title: 'Root', |
| | | }, |
| | | } |
| | | |
| | | export const LoginRoute: AppRouteRecordRaw = { |
| | | path: '/login', |
| | | name: 'Login', |
| | | //æ°çåå°ç»å½ï¼å¦ææ³è¦ä½¿ç¨æ§çç»å½æ¾å¼å³å¯ |
| | | // component: () => import('/@/views/sys/login/Login.vue'), |
| | | component: () => import('/@/views/system/loginmini/MiniLogin.vue'), |
| | | meta: { |
| | | title: t('routes.basic.login'), |
| | | }, |
| | | } |
| | | |
| | | export const BigScreen: AppRouteRecordRaw = { |
| | | path: '/bigScreen', |
| | | name: 'BigScreen', |
| | | component: () => import('/@/views/dry/bigScreen/BigWorkShop.vue'), |
| | | meta: { |
| | | title: t('big.screen.workshop'), |
| | | }, |
| | | } |
| | | export const BigScreenN: AppRouteRecordRaw = { |
| | | path: '/bigScreenN', |
| | | name: 'BigScreenN', |
| | | component: () => import('/@/views/dry/bigScreen/BigWorkShop2.vue'), |
| | | meta: { |
| | | title: t('big.screen.workshopn'), |
| | | }, |
| | | } |
| | | export const BigEqp: AppRouteRecordRaw = { |
| | | path: '/bigEqp', |
| | | name: 'BigEqp', |
| | | component: () => import('/@/views/dry/bigScreen/BigEqp.vue'), |
| | | meta: { |
| | | title: t('big.screen.eqp'), |
| | | }, |
| | | } |
| | | //update-begin---author:wangshuai ---date:20220629 forï¼auth2ç»å½é¡µé¢è·¯ç±------------ |
| | | export const Oauth2LoginRoute: AppRouteRecordRaw = { |
| | | path: '/oauth2-app/login', |
| | | name: 'oauth2-app-login', |
| | | //æ°çééå
ç»å½ï¼å¦ææ³è¦ä½¿ç¨æ§çæ¾å¼å³å¯ |
| | | // component: () => import('/@/views/sys/login/OAuth2Login.vue'), |
| | | component: () => import('/@/views/system/loginmini/OAuth2Login.vue'), |
| | | meta: { |
| | | title: t('routes.oauth2.login'), |
| | | }, |
| | | } |
| | | //update-end---author:wangshuai ---date:20220629 forï¼auth2ç»å½é¡µé¢è·¯ç±------------ |
| | | |
| | | /** |
| | | * ãéè¿tokenç´æ¥éé»ç»å½ãæµç¨åçç»å½é¡µé¢ ä¸è½¬è·³è½¬ |
| | | */ |
| | | export const TokenLoginRoute: AppRouteRecordRaw = { |
| | | path: '/tokenLogin', |
| | | name: 'TokenLoginRoute', |
| | | component: () => import('/@/views/sys/login/TokenLoginPage.vue'), |
| | | meta: { |
| | | title: '带tokenç»å½é¡µé¢', |
| | | ignoreAuth: true, |
| | | }, |
| | | } |
| | | |
| | | // Basic routing without permission |
| | | export const basicRoutes = [LoginRoute, RootRoute, ...mainOutRoutes, REDIRECT_ROUTE, PAGE_NOT_FOUND_ROUTE, TokenLoginRoute, Oauth2LoginRoute,BigScreen,BigScreenN,BigEqp] |