2024-02-05 09:15:37 +08:00
|
|
|
|
import type { AppRouteRecordRaw } from '/@/router/types';
|
|
|
|
|
|
import { t } from '/@/hooks/web/useI18n';
|
2024-02-15 10:18:52 +08:00
|
|
|
|
import { REDIRECT_NAME, LAYOUT, EXCEPTION_COMPONENT, PAGE_NOT_FOUND_NAME } from '/@/router/constant';
|
2024-02-05 09:15:37 +08:00
|
|
|
|
import { PageEnum } from '/@/enums/pageEnum';
|
|
|
|
|
|
|
|
|
|
|
|
// 404 on a page
|
|
|
|
|
|
export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = {
|
2024-02-15 10:18:52 +08:00
|
|
|
|
path: '/:path(.*)*',
|
|
|
|
|
|
name: PAGE_NOT_FOUND_NAME,
|
|
|
|
|
|
component: LAYOUT,
|
|
|
|
|
|
meta: {
|
2024-02-05 09:15:37 +08:00
|
|
|
|
title: 'ErrorPage',
|
|
|
|
|
|
hideBreadcrumb: true,
|
2024-02-15 10:18:52 +08:00
|
|
|
|
hideMenu: true
|
2024-02-05 09:15:37 +08:00
|
|
|
|
},
|
2024-02-15 10:18:52 +08:00
|
|
|
|
children: [
|
|
|
|
|
|
{
|
|
|
|
|
|
path: '/:path(.*)*',
|
|
|
|
|
|
name: PAGE_NOT_FOUND_NAME,
|
|
|
|
|
|
component: EXCEPTION_COMPONENT,
|
|
|
|
|
|
meta: {
|
|
|
|
|
|
title: 'ErrorPage',
|
|
|
|
|
|
hideBreadcrumb: true,
|
|
|
|
|
|
hideMenu: true
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
2024-02-05 09:15:37 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export const REDIRECT_ROUTE: AppRouteRecordRaw = {
|
2024-02-15 10:18:52 +08:00
|
|
|
|
path: '/redirect',
|
|
|
|
|
|
component: LAYOUT,
|
|
|
|
|
|
name: 'RedirectTo',
|
|
|
|
|
|
meta: {
|
2024-02-05 09:15:37 +08:00
|
|
|
|
title: REDIRECT_NAME,
|
|
|
|
|
|
hideBreadcrumb: true,
|
2024-02-15 10:18:52 +08:00
|
|
|
|
hideMenu: true
|
2024-02-05 09:15:37 +08:00
|
|
|
|
},
|
2024-02-15 10:18:52 +08:00
|
|
|
|
children: [
|
|
|
|
|
|
{
|
|
|
|
|
|
path: '/redirect/:path(.*)',
|
|
|
|
|
|
name: REDIRECT_NAME,
|
|
|
|
|
|
component: () => import('/@/views/sys/redirect/index.vue'),
|
|
|
|
|
|
meta: {
|
|
|
|
|
|
title: REDIRECT_NAME,
|
|
|
|
|
|
hideBreadcrumb: true
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
2024-02-05 09:15:37 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export const ERROR_LOG_ROUTE: AppRouteRecordRaw = {
|
2024-02-15 10:18:52 +08:00
|
|
|
|
path: '/error-log',
|
|
|
|
|
|
name: 'ErrorLog',
|
|
|
|
|
|
component: LAYOUT,
|
|
|
|
|
|
redirect: '/error-log/list',
|
|
|
|
|
|
meta: {
|
|
|
|
|
|
title: 'ErrorLog',
|
2024-02-05 09:15:37 +08:00
|
|
|
|
hideBreadcrumb: true,
|
2024-02-15 10:18:52 +08:00
|
|
|
|
hideChildrenInMenu: true
|
2024-02-05 09:15:37 +08:00
|
|
|
|
},
|
2024-02-15 10:18:52 +08:00
|
|
|
|
children: [
|
|
|
|
|
|
{
|
|
|
|
|
|
path: 'list',
|
|
|
|
|
|
name: 'ErrorLogList',
|
|
|
|
|
|
component: () => import('/@/views/sys/error-log/index.vue'),
|
|
|
|
|
|
meta: {
|
|
|
|
|
|
title: t('错误日志列表'),
|
|
|
|
|
|
hideBreadcrumb: true,
|
|
|
|
|
|
currentActiveMenu: '/error-log'
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
2024-02-05 09:15:37 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export const SYSTEM_ROUTE: AppRouteRecordRaw = {
|
2024-02-15 10:18:52 +08:00
|
|
|
|
path: '/dashboard',
|
|
|
|
|
|
name: 'Dashboard',
|
|
|
|
|
|
component: LAYOUT,
|
|
|
|
|
|
redirect: '/dashboard/analysis',
|
|
|
|
|
|
meta: {
|
|
|
|
|
|
orderNo: 10,
|
|
|
|
|
|
icon: 'ion:grid-outline',
|
|
|
|
|
|
title: t('分析页')
|
2024-02-05 09:15:37 +08:00
|
|
|
|
},
|
2024-02-15 10:18:52 +08:00
|
|
|
|
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('工作台')
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
2024-02-05 09:15:37 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export const USERCENTER_ROUTE: AppRouteRecordRaw = {
|
2024-02-15 10:18:52 +08:00
|
|
|
|
path: '/user-center',
|
|
|
|
|
|
name: 'UserCenter',
|
|
|
|
|
|
component: LAYOUT,
|
|
|
|
|
|
redirect: PageEnum.USER_CENTER,
|
|
|
|
|
|
meta: {
|
|
|
|
|
|
title: t('用户中心')
|
2024-02-05 09:15:37 +08:00
|
|
|
|
},
|
2024-02-15 10:18:52 +08:00
|
|
|
|
children: [
|
|
|
|
|
|
{
|
|
|
|
|
|
path: 'info',
|
|
|
|
|
|
name: 'UserInfo',
|
|
|
|
|
|
component: () => import('/@/views/system/setting/index.vue'),
|
|
|
|
|
|
meta: {
|
|
|
|
|
|
title: t('用户中心'),
|
|
|
|
|
|
icon: 'ant-design:user-outlined'
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
2024-02-05 09:15:37 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2024-02-28 16:16:17 +08:00
|
|
|
|
export const FLOW_ROUTE: AppRouteRecordRaw[] = [{
|
|
|
|
|
|
path: '/flow/:arg1/:arg2',
|
2024-02-15 10:18:52 +08:00
|
|
|
|
name: 'Flow',
|
|
|
|
|
|
meta: {
|
|
|
|
|
|
title: '流程'
|
2024-02-05 11:27:33 +08:00
|
|
|
|
},
|
2024-02-15 10:18:52 +08:00
|
|
|
|
component: LAYOUT,
|
|
|
|
|
|
children: [
|
|
|
|
|
|
{
|
|
|
|
|
|
path: 'createFlow',
|
|
|
|
|
|
name: 'CreateFlow',
|
|
|
|
|
|
component: () => import('/@/views/secondDev/createFlow.vue'),
|
|
|
|
|
|
meta: {
|
|
|
|
|
|
title: '新建流程'
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
path: 'approveFlow',
|
|
|
|
|
|
name: 'ApproveFlow',
|
2024-02-21 15:52:18 +08:00
|
|
|
|
component: () => import('/@/views/secondDev/approveFlowPage.vue'),
|
2024-02-15 10:18:52 +08:00
|
|
|
|
meta: {
|
|
|
|
|
|
title: '审批流程'
|
|
|
|
|
|
}
|
2024-02-28 16:16:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
|
|
|
path: '/flowList',
|
|
|
|
|
|
name: 'FlowList',
|
|
|
|
|
|
meta: {
|
|
|
|
|
|
title: '流程列表'
|
|
|
|
|
|
},
|
|
|
|
|
|
component: LAYOUT,
|
|
|
|
|
|
children: [
|
2024-02-22 10:23:38 +08:00
|
|
|
|
/* 菜单不支持复用,不同菜单如果path或者name一样会报错 */
|
2024-02-15 10:18:52 +08:00
|
|
|
|
{
|
2024-02-28 16:16:17 +08:00
|
|
|
|
path: 'draft',
|
2024-02-15 10:18:52 +08:00
|
|
|
|
name: 'FlowListPage',
|
|
|
|
|
|
component: () => import('/@/views/secondDev/processTasksPage.vue'),
|
|
|
|
|
|
meta: {
|
2024-02-28 16:16:17 +08:00
|
|
|
|
title: '草稿箱'
|
2024-02-15 10:18:52 +08:00
|
|
|
|
}
|
2024-02-22 10:23:38 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2024-02-28 16:16:17 +08:00
|
|
|
|
path: 'todo',
|
2024-02-22 10:23:38 +08:00
|
|
|
|
name: 'FlowListPage2',
|
|
|
|
|
|
component: () => import('/@/views/secondDev/processTasksPage.vue'),
|
|
|
|
|
|
meta: {
|
|
|
|
|
|
title: '待办列表'
|
|
|
|
|
|
}
|
2024-03-06 14:46:03 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
path: 'myProcess',
|
|
|
|
|
|
name: 'FlowListPage3',
|
|
|
|
|
|
component: () => import('/@/views/secondDev/processTasksPage.vue'),
|
|
|
|
|
|
meta: {
|
|
|
|
|
|
title: '我发起的'
|
|
|
|
|
|
}
|
2024-02-15 10:18:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
]
|
2024-02-28 16:16:17 +08:00
|
|
|
|
}];
|