From a36b208d04ed1764293b981c8ff2e8267085bbf4 Mon Sep 17 00:00:00 2001 From: bsw215583320 <baoshiwei121@163.com> Date: 星期五, 22 十一月 2024 15:28:53 +0800 Subject: [PATCH] feat(dry): 新增云平台实时监控大屏相关功能 --- src/router/routes/index.ts | 130 ++++++++++++++++++++++++++++-------------- 1 files changed, 86 insertions(+), 44 deletions(-) diff --git a/src/router/routes/index.ts b/src/router/routes/index.ts index 6df062f..2128c2e 100644 --- a/src/router/routes/index.ts +++ b/src/router/routes/index.ts @@ -1,69 +1,111 @@ -import type { AppRouteRecordRaw, AppRouteModule } from '/@/router/types'; +import type { AppRouteModule, AppRouteRecordRaw } from '/@/router/types' -import { PAGE_NOT_FOUND_ROUTE, REDIRECT_ROUTE } from '/@/router/routes/basic'; +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'; +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 modules = import.meta.glob('./modules/**/*.ts', { eager: true }) -const routeModuleList: AppRouteModule[] = []; +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); -}); + 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 asyncRoutes = [PAGE_NOT_FOUND_ROUTE, ...routeModuleList] export const RootRoute: AppRouteRecordRaw = { - path: '/', - name: 'Root', - redirect: PageEnum.BASE_HOME, - meta: { - title: 'Root', - }, -}; + 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'), + 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'), + }, +} +export const BigEqpCloud: AppRouteRecordRaw = { + path: '/bigEqpCloud', + name: 'BigEqpCloud', + component: () => import('/@/views/dry/bigScreen/BigEqpCloud.vue'), meta: { - title: t('routes.basic.login'), + title: t('big.screen.eqpCloud'), }, -}; +} + +export const BigFaultCloud: AppRouteRecordRaw = { + path: '/bigFaultCloud', + name: 'BigFaultCloud', + component: () => import('/@/views/dry/bigScreen/BigFaultCloud.vue'), + meta: { + title: t('big.screen.faultCloud'), + }, +} //update-begin---author:wangshuai ---date:20220629 for锛歛uth2鐧诲綍椤甸潰璺敱------------ 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'), - }, -}; + 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锛歛uth2鐧诲綍椤甸潰璺敱------------ /** * 銆愰�氳繃token鐩存帴闈欓粯鐧诲綍銆戞祦绋嬪姙鐞嗙櫥褰曢〉闈� 涓浆璺宠浆 */ export const TokenLoginRoute: AppRouteRecordRaw = { - path: '/tokenLogin', - name: 'TokenLoginRoute', - component: () => import('/@/views/sys/login/TokenLoginPage.vue'), - meta: { - title: '甯oken鐧诲綍椤甸潰', - ignoreAuth: true, - }, -}; + path: '/tokenLogin', + name: 'TokenLoginRoute', + component: () => import('/@/views/sys/login/TokenLoginPage.vue'), + meta: { + title: '甯oken鐧诲綍椤甸潰', + ignoreAuth: true, + }, +} // Basic routing without permission -export const basicRoutes = [LoginRoute, RootRoute, ...mainOutRoutes, REDIRECT_ROUTE, PAGE_NOT_FOUND_ROUTE, TokenLoginRoute, Oauth2LoginRoute]; +export const basicRoutes = [LoginRoute, RootRoute, ...mainOutRoutes, REDIRECT_ROUTE, PAGE_NOT_FOUND_ROUTE, TokenLoginRoute, Oauth2LoginRoute,BigScreen,BigScreenN,BigEqp,BigEqpCloud,BigFaultCloud] -- Gitblit v1.9.3