123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- import type { AppRouteRecordRaw, AppRouteModule } 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'),
- },
- };
- //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,
- },
- };
- // 峰平谷监控大屏
- export const fpgMonitoring: AppRouteRecordRaw = {
- path: '/fpgMonitoring/:code?/:id?',
- name: 'fpgMonitoring',
- component: () => import('/@/views/peakFlatValley/largeScreen/index.vue'),
- meta: {
- title: t('龙钢公司峰平谷用电集中管控平台'),
- },
- };
- // 采集大屏
- export const gasControl: AppRouteRecordRaw = {
- path: '/gasControl',
- name: 'GasControl',
- component: () => import('/@/views/gas/largeScreen/index.vue'),
- meta: {
- title: t('煤气集中管控平台'),
- },
- };
- // 采集大屏新版-去掉转炉和高炉
- export const gasControlNew: AppRouteRecordRaw = {
- path: '/gasControlNew',
- name: 'GasControlNew',
- component: () => import('/@/views/gas/largeScreen/gasControlNew.vue'),
- meta: {
- title: t('煤气集中管控平台'),
- },
- };
- // 采集大屏新版-只显示炼钢厂转炉和炼铁新老厂的高炉
- export const gasControlNewSteel: AppRouteRecordRaw = {
- path: '/gasControlHeat',
- name: 'GasControlNewHeat',
- component: () => import('/@/views/gas/largeScreen/gasControlNewSteel.vue'),
- meta: {
- title: t('煤气集中管控平台'),
- },
- };
- // 驾驶舱大屏页面
- export const squareArray: AppRouteRecordRaw = {
- path: '/squareArray',
- name: 'SquareArray',
- component: () => import('/@/views/peakFlatValley/squareArray/index.vue'),
- meta: {
- title: t('设备方块阵'),
- },
- };
- // 大屏设计器
- export const screenDesigner: AppRouteRecordRaw = {
- path: '/designer/:code?/:id?',
- name: 'ScreenDesigner',
- component: () => import('/@/views/largeScreen/designer/index.vue'),
- meta: {
- title: t('大屏设计器'),
- },
- };
- // 实时监控页面
- export const billetHome: AppRouteRecordRaw = {
- path: '/billetHome',
- name: 'BilletHomePage',
- component: () => import('/@/views/billet/homePage/index.vue'),
- meta: {
- title: t('龙钢公司钢坯数字化管控平台'),
- },
- };
- // 大屏设计器
- export const carBoard: AppRouteRecordRaw = {
- path: '/carBoard',
- name: 'CarBoardPanel',
- component: () => import('/@/views/billet/carBoard/index.vue'),
- meta: {
- title: t('车辆运行看板'),
- },
- };
- // 车辆监测页面
- export const carMonitor: AppRouteRecordRaw = {
- path: '/car/:ccmNo/:positionNo',
- name: 'CarMonitor',
- component: () => import('/@/views/billet/VehicleOperation/index.vue'),
- meta: {
- title: t('车辆到达及目的地确认'),
- ignoreAuth: true,
- },
- };
- // 推钢室操作页面
- export const operatorPage: AppRouteRecordRaw = {
- path: '/operator/:ccmNo',
- name: 'OperatorPage',
- component: () => import('/@/views/billet/operator/index.vue'),
- meta: {
- title: t('推钢室操作界面'),
- ignoreAuth: true,
- },
- };
- // Basic routing without permission
- export const basicRoutes = [
- LoginRoute,
- RootRoute,
- ...mainOutRoutes,
- REDIRECT_ROUTE,
- PAGE_NOT_FOUND_ROUTE,
- TokenLoginRoute,
- Oauth2LoginRoute,
- fpgMonitoring,
- gasControl,
- gasControlNew,
- gasControlNewSteel,
- squareArray,
- screenDesigner,
- billetHome,
- carBoard,
- carMonitor,
- operatorPage,
- ];
|