Files
geg-gas-web/src/router/routes/basic.ts
‘huanghaiixia’ e896cefe31 采运销关联
2026-04-02 18:21:21 +08:00

414 lines
12 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import type { AppRouteRecordRaw } from '/@/router/types';
import { t } from '/@/hooks/web/useI18n';
import { REDIRECT_NAME, LAYOUT, EXCEPTION_COMPONENT, PAGE_NOT_FOUND_NAME } from '/@/router/constant';
import { PageEnum } from '/@/enums/pageEnum';
// 404 on a page
export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = {
path: '/:path(.*)*',
name: PAGE_NOT_FOUND_NAME,
component: LAYOUT,
meta: {
title: 'ErrorPage',
hideBreadcrumb: true,
hideMenu: true
},
children: [
{
path: '/:path(.*)*',
name: PAGE_NOT_FOUND_NAME,
component: EXCEPTION_COMPONENT,
meta: {
title: 'ErrorPage',
hideBreadcrumb: true,
hideMenu: true
}
}
]
};
export const REDIRECT_ROUTE: AppRouteRecordRaw = {
path: '/redirect',
component: LAYOUT,
name: 'RedirectTo',
meta: {
title: REDIRECT_NAME,
hideBreadcrumb: true,
hideMenu: true
},
children: [
{
path: '/redirect/:path(.*)',
name: REDIRECT_NAME,
component: () => import('/@/views/sys/redirect/index.vue'),
meta: {
title: REDIRECT_NAME,
hideBreadcrumb: true
}
}
]
};
export const ERROR_LOG_ROUTE: AppRouteRecordRaw = {
path: '/error-log',
name: 'ErrorLog',
component: LAYOUT,
redirect: '/error-log/list',
meta: {
title: 'ErrorLog',
hideBreadcrumb: true,
hideChildrenInMenu: true
},
children: [
{
path: 'list',
name: 'ErrorLogList',
component: () => import('/@/views/sys/error-log/index.vue'),
meta: {
title: t('错误日志列表'),
hideBreadcrumb: true,
currentActiveMenu: '/error-log'
}
}
]
};
export const SYSTEM_ROUTE: AppRouteRecordRaw = {
path: '/dashboard',
name: 'Dashboard',
component: LAYOUT,
redirect: '/dashboard/analysis',
meta: {
orderNo: 10,
icon: 'ion:grid-outline',
title: t('分析页')
},
children: [
{
path: 'analysis',
name: 'Analysis',
component: () => import('/@/views/dashboard/analysis/index.vue'),
meta: {
affix: true,
title: t('分析页')
}
},
{
path: 'workbench',
name: 'Workbench',
component: () => import('/@/views/dashboard/workbench/index.vue'),
meta: {
title: t('工作台')
}
}
]
};
export const USERCENTER_ROUTE: AppRouteRecordRaw = {
path: '/user-center',
name: 'UserCenter',
component: LAYOUT,
redirect: PageEnum.USER_CENTER,
meta: {
title: t('用户中心')
},
children: [
{
path: 'info',
name: 'UserInfo',
component: () => import('/@/views/system/setting/index.vue'),
meta: {
title: t('用户中心'),
icon: 'ant-design:user-outlined'
}
}
]
};
export const FLOW_ROUTE: AppRouteRecordRaw[] = [{
path: '/flow/:arg1/:arg2',
name: 'Flow',
meta: {
title: '流程'
},
component: LAYOUT,
children: [
{
path: 'createFlow',
name: 'CreateFlow',
component: () => import('/@/views/secondDev/createFlow.vue'),
meta: {
title: (route) => (route.query.formName||'流程')
}
},
{
path: 'approveFlow',
name: 'ApproveFlow',
component: () => import('/@/views/secondDev/approveFlowPage.vue'),
meta: {
title: (route) => (route.query.formName||'流程')
}
}
]
}, {
path: '/flowList',
name: 'FlowList',
meta: {
title: '流程列表'
},
component: LAYOUT,
children: [
/* 菜单不支持复用不同菜单如果path或者name一样会报错 */
{
path: 'draft',
name: 'FlowListPage',
component: () => import('/@/views/secondDev/processTasksPage.vue'),
meta: {
title: '草稿箱'
}
},
{
path: 'todo',
name: 'FlowListPage2',
component: () => import('/@/views/secondDev/processTasksPage.vue'),
meta: {
title: '待办列表'
}
},
{
path: 'myProcess',
name: 'FlowListPage3',
component: () => import('/@/views/secondDev/processTasksPage.vue'),
meta: {
title: '我发起的'
}
},
{
path: 'done',
name: 'FlowListPage4',
component: () => import('/@/views/secondDev/processTasksPage.vue'),
meta: {
title: '已办'
}
}
]
}, {
path: '/form/:module/:id',
name: 'SimpleForm',
meta: {
title: '表单'
},
component: LAYOUT,
children: [
{
path: 'createForm',
name: 'createForm',
component: () => import('/@/views/secondDev/formCreatePage.vue'),
meta: {
title: (route) => '新建'+(route.query.formName||'表单')
}
},
{
path: 'updateForm',
name: 'updateForm',
component: () => import('/@/views/secondDev/formCreatePage.vue'),
meta: {
title: (route) => '更新'+(route.query.formName||'表单')
}
},
{
path: 'viewForm',
name: 'viewForm',
component: () => import('/@/views/secondDev/formCreatePage.vue'),
meta: {
title: (route) => '查看'+(route.query.formName||'表单')
}
},
]
}];
export const PROCESS_MONITORING: AppRouteRecordRaw[] = [{
path: '/processMonitoring/:arg1/:arg2',
name: 'ProcessMonitoring',
meta: {
title: '流程监控'
},
component: LAYOUT,
children: [
{
path: 'processMonitoringFlow',
name: 'ProcessMonitoringFlow',
component: () => import('/@/views/secondDev/processMonitoringPage.vue'),
meta: {
title: (route) => '流程监控'
}
},
]
}]
// 自定义页面路由
export const PAGE_CUSTOM_ROUTE: AppRouteRecordRaw[] = [{
path: '',
name: '',
meta: {
title: ''
},
component: LAYOUT,
children: [
{
path: '/approve/Appro/viewForm',
name: 'ApproForm',
component: () => import('/@/views/approve/Appro/components/createForm.vue'),
meta: {
title: (route) => '签报详情'
}
},
{
path: '/contract/ContractFact/viewForm',
name: 'ContractFactForm',
component: () => import('/@/views/contract/ContractFact/components/createForm.vue'),
meta: {
title: (route) => '合同详情'
}
},
{
path: '/dayPlan/PngAppro/createForm',
name: 'PngAppro',
component: () => import('/@/views/dayPlan/PngAppro/components/createForm.vue'),
meta: {
title: (route) => route.query.formName
}
},
{
path: '/dayPlan/PngMeasureSalesPur/createForm',
name: 'PngMeasureSalesPur',
component: () => import('/@/views/dayPlan/PngMeasureSalesPur/components/createForm.vue'),
meta: {
title: (route) => route.query.formName
}
},
{
path: '/dayPlan/Demand/createForm',
name: 'Demand',
component: () => import('/@/views/dayPlan/Demand/components/createForm.vue'),
meta: {
title: (route) => route.query.formName
}
},
{
path: '/contract/ContractSales/viewForm',
name: 'ContractSalesviewForm',
component: () => import('/@/views/contract/ContractSales/components/createForm.vue'),
meta: {
title: (route) => ('管道气销售合同详情')
}
},
{
path: '/contract/ContractPurPng/viewForm',
name: 'ContractPurPngviewForm',
component: () => import('/@/views/contract/ContractPurPng/components/createForm.vue'),
meta: {
title: (route) => ('管道气采购合同详情')
}
},
{
path: '/ship/ShipSchedule/createForm',
name: 'ShipSchedule',
component: () => import('/@/views/ship/ShipSchedule/components/createForm.vue'),
meta: {
title: (route) => route.query.formName
}
},
{
path: '/ship/OpsPurInt/createForm',
name: 'OpsPurInt',
component: () => import('/@/views/ship/OpsPurInt/components/createForm.vue'),
meta: {
title: (route) => route.query.formName
}
},
{
path: '/ship/OpsSalesInt/createForm',
name: 'OpsSalesInt',
component: () => import('/@/views/ship/OpsSalesInt/components/createForm.vue'),
meta: {
title: (route) => route.query.formName
}
},
{
path: '/ship/MeaPurInt/createForm',
name: 'MeaPurInt',
component: () => import('/@/views/ship/MeaPurInt/components/createForm.vue'),
meta: {
title: (route) => route.query.formName
}
},
{
path: '/dayPlan/LngDemand/createForm',
name: 'LngDemand',
component: () => import('/@/views/dayPlan/LngDemand/components/createForm.vue'),
meta: {
title: (route) => route.query.formName
}
},
{
path: '/dayPlan/LngAppro/createForm',
name: 'LngAppro',
component: () => import('/@/views/dayPlan/LngAppro/components/createForm.vue'),
meta: {
title: (route) => route.query.formName
}
},
{
path: '/system/LngSmsTemplate/LngSmsRecord',
name: 'LngSmsTemplate',
component: () => import('/@/views/system/LngSmsTemplate/LngSmsRecord.vue'),
meta: {
title: (route) => (route.query.formName || '短信记录')
}
},
{
path: '/inventory/LngInventoryIn/createForm',
name: 'LngInventoryIn',
component: () => import('/@/views/inventory/LngInventoryIn/components/createForm.vue'),
meta: {
title: (route) => (route.query.formName)
}
},
{
path: '/inventory/LngInventoryOut/createForm',
name: 'LngInventoryOut',
component: () => import('/@/views/inventory/LngInventoryOut/components/createForm.vue'),
meta: {
title: (route) => (route.query.formName)
}
},
{
path: '/inventory/LngInventoryPngNa/createForm',
name: 'LngInventoryPngNa',
component: () => import('/@/views/inventory/LngInventoryPngNa/components/createForm.vue'),
meta: {
title: (route) => (route.query.formName)
}
},
{
path: '/inventory/LngInventoryPngZy/createForm',
name: 'LngInventoryPngZy',
component: () => import('/@/views/inventory/LngInventoryPngZy/components/createForm.vue'),
meta: {
title: (route) => (route.query.formName)
}
},
{
path: '/contract/ContractSalesPngPur/createForm',
name: 'ContractSalesPngPur',
component: () => import('/@/views/contract/ContractSalesPngPur/components/createForm.vue'),
meta: {
title: (route) => (route.query.formName)
}
},
]
}];