Files
admin-sjzx/src/router/static.ts

318 lines
10 KiB
TypeScript
Raw Normal View History

2024-02-19 13:44:32 +08:00
import type { RouteRecordRaw } from 'vue-router'
const pageTitle = (name: string): string => {
return `pagesTitle.${name}`
}
/**
*
*/
export const adminBaseRoutePath = '/admin'
export const adminBaseRoute = {
path: adminBaseRoutePath,
name: 'admin',
component: () => import('@/layouts/admin/index.vue'),
// 直接重定向到 loading 路由
redirect: adminBaseRoutePath + '/loading',
meta: {
title: `pagesTitle.admin`
},
children: [
{
path: 'loading/:to?',
name: 'adminMainLoading',
component: () => import('@/layouts/common/components/loading.vue'),
meta: {
title: `pagesTitle.loading`
}
2024-03-08 10:33:06 +08:00
},
{
path: 'businessUserRouter',
name: '业务管理员页面',
meta: {
title: pageTitle('businessUser'),
icon: 'ep:management',
alwaysShow: true
},
children: [
{
path: 'eventView',
2024-03-28 13:25:41 +08:00
component: () => import('@/views/pqs/voltageSags/sagGovern/businessUser/event/eventView.vue'),
2024-03-08 10:33:06 +08:00
name: '暂降事件查看页面',
meta: {
title: pageTitle('router.eventView')
}
2024-03-28 13:25:41 +08:00
},
{
path: 'productLine',
component: () => import('@/views/pqs/voltageSags/sagGovern/businessUser/productLine/index.vue'),
name: '生产线查看页面',
meta: {
title: pageTitle('router.eventView')
}
},
{
path: 'machine',
component: () => import('@/views/pqs/voltageSags/sagGovern/businessUser/machine/index.vue'),
2024-06-13 13:32:50 +08:00
name: '终端查看页面',
2024-03-28 13:25:41 +08:00
meta: {
title: pageTitle('router.eventView')
}
2024-03-08 10:33:06 +08:00
}
2024-03-28 13:25:41 +08:00
]
},
{
path: 'sagGovernScheme',
name: '暂降治理评估方案',
meta: {
title: pageTitle('sagGovernScheme'),
icon: 'ep:management',
alwaysShow: true
},
children: [
{
path: 'schemeCalc',
component: () => import('@/views/pqs/voltageSags/sagGovern/scheme/schemeCalc/index.vue'),
name: '治理评估页面',
meta: {
title: pageTitle('router.schemeCalc')
}
},
2024-04-19 14:35:12 +08:00
{
path: 'schemeHistory',
component: () => import('@/views/pqs/voltageSags/sagGovern/scheme/history/index.vue'),
name: '治理方案结果详情',
meta: {
title: pageTitle('router.schemeHistory')
2024-04-19 14:35:12 +08:00
}
}
2024-03-08 10:33:06 +08:00
]
},
{
2024-05-09 14:18:39 +08:00
path: '/bpm',
name: 'bpm',
meta: {
2024-05-09 14:18:39 +08:00
hidden: true
},
children: [
{
2024-05-09 14:18:39 +08:00
path: 'formEdit',
component: () => import('@/views/system/bpm/form/editor/index.vue'),
name: 'BpmFormEditor',
meta: {
2024-05-09 14:18:39 +08:00
title: pageTitle('router.formEdit')
}
2024-05-06 13:57:06 +08:00
},
{
2024-05-09 14:18:39 +08:00
path: 'modelEdit',
component: () => import('@/views/system/bpm/model/editor/index.vue'),
name: 'BpmModelEditor',
2024-05-06 13:57:06 +08:00
meta: {
2024-05-09 14:18:39 +08:00
title: pageTitle('router.modelEdit')
2024-05-06 13:57:06 +08:00
}
2024-05-09 14:18:39 +08:00
},
{
path: 'instanceDetail',
component: () => import('@/views/system/bpm/processInstance/detail/index.vue'),
name: 'BpmProcessInstanceDetail',
meta: {
title: pageTitle('router.instanceDetail')
2024-12-16 20:57:17 +08:00
}
},
2024-05-16 16:22:18 +08:00
{
2024-05-16 18:56:13 +08:00
path: 'ProgramReviewInter',
component: () =>
import('@/views/pqs/supervise/interfere/components/normalizationManager/programReview.vue'),
2024-05-16 18:56:13 +08:00
name: 'ProgramReview',
2024-05-16 16:22:18 +08:00
meta: {
title: pageTitle('router.programReview')
}
},
{
path: 'effectProblem',
component: () => import('@/views/pqs/supervise/plan/components/effectProblem/index.vue'),
name: 'PlanEffectProblem',
meta: {
title: pageTitle('router.effectProblem')
}
}
2024-05-09 14:18:39 +08:00
// {
// path: 'manager/model/edit',
// component: () => import('@/views/bpm/model/editor/index.vue'),
// name: 'BpmModelEditor',
// meta: {
// noCache: true,
// hidden: true,
// canTo: true,
// title: '设计流程',
// activeMenu: '/bpm/manager/model'
// }
// },
// {
// path: 'manager/definition',
// component: () => import('@/views/bpm/definition/index.vue'),
// name: 'BpmProcessDefinition',
// meta: {
// noCache: true,
// hidden: true,
// canTo: true,
// title: '流程定义',
// activeMenu: '/bpm/manager/model'
// }
// },
]
},
2025-01-15 10:44:57 +08:00
{
path: 'division',
name: '谐波责任划分页面',
meta: {
title: pageTitle('division'),
icon: 'ep:management',
alwaysShow: true
},
children: [
{
path: 'aListOfLoadData',
component: () => import('@/views/pqs/harmonicMonitoring/detailed/division/components/aListOfLoadData.vue'),
name: '负荷数据列表页面',
meta: {
title: pageTitle('router.aListOfLoadData')
}
},{
path: 'compute',
component: () => import('@/views/pqs/harmonicMonitoring/detailed/division/components/compute.vue'),
name: '贡献度计算页面',
meta: {
title: pageTitle('router.compute')
}
},
{
path: 'detail',
component: () => import('@/views/pqs/harmonicMonitoring/detailed/division/components/detail.vue'),
name: 'detail',
meta: {
title: pageTitle('router.detail')
}
},
]
},
2025-03-25 10:57:52 +08:00
{
path: 'runManage',
name: '谐波责任划分页面',
meta: {
title: pageTitle('runManage'),
icon: 'ep:management',
alwaysShow: true
},
children: [
{
path: 'addUser',
component: () => import('@/views/pqs/runManage/assessment/components/uese/form.vue'),
name: '新增评估用户',
meta: {
title: pageTitle('router.addUser')
}
},
]
},
2024-12-16 20:57:17 +08:00
{
path: '/boX',
name: 'boX',
component: () => import('@/components/echarts/boX.vue'),
meta: {
title: pageTitle('boX')
}
}
/*{
2024-05-16 18:56:13 +08:00
path: '/bpm',
name: 'bpm',
meta: {
hidden: true
},
children: [
{
path: 'programReview',
component: () => import('@/views/pqs/supervise/interfere/components/normalizationManager/programReview.vue'),
name: 'programReview',
meta: {
title: pageTitle('router.programReview')
}
},{
path: 'projectTreat',
component: () => import('@/views/pqs/supervise/interfere/components/normalizationManager/projectTreat.vue'),
name: 'projectTreat',
meta: {
title: pageTitle('router.projectTreat')
}
},
]
},*/
2024-02-19 13:44:32 +08:00
]
}
/*
*
* ./static push
*/
const staticRoutes: Array<RouteRecordRaw> = [
adminBaseRoute,
{
path: '/',
redirect: to => {
2024-02-19 13:44:32 +08:00
return {
name: 'adminMainLoading'
}
}
},
{
// 管理员登录页 - 不放在 adminBaseRoute.children 因为登录页不需要使用后台的布局
path: '/login',
name: 'login',
component: () => import('@/views/user/login.vue'),
meta: {
title: pageTitle('login')
}
},
{
path: '/:path(.*)*',
redirect: '/404'
},
{
path: '/404',
name: 'notFound',
component: () => import('@/views/common/error/404.vue'),
meta: {
title: pageTitle('notFound') // 页面不存在
}
},
2024-06-06 22:14:20 +08:00
{
path: '/previewFile',
name: 'previewFile',
component: () => import('@/components/PreviewFile/index.vue'),
meta: {
title: pageTitle('previewFile')
}
},
2024-12-16 20:57:17 +08:00
2024-02-19 13:44:32 +08:00
{
// 后台找不到页面了-可能是路由未加载上
path: adminBaseRoutePath + ':path(.*)*',
redirect: to => {
2024-02-19 13:44:32 +08:00
return {
name: 'adminMainLoading',
params: {
to: JSON.stringify({
path: to.path,
query: to.query
})
}
}
}
}
]
export default staticRoutes