2023-02-11 00:44:00 +08:00
|
|
|
|
import { Layout } from '@/utils/routerHelper'
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
/**
|
2023-04-24 11:42:44 +08:00
|
|
|
|
* redirect: noredirect 当设置 noredirect 的时候该路由在面包屑导航中不可被点击
|
|
|
|
|
* name:'router-name' 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题
|
|
|
|
|
* meta : {
|
2023-02-11 00:44:00 +08:00
|
|
|
|
hidden: true 当设置 true 的时候该路由不会再侧边栏出现 如404,login等页面(默认 false)
|
|
|
|
|
|
|
|
|
|
alwaysShow: true 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式,
|
|
|
|
|
只有一个时,会将那个子路由当做根路由显示在侧边栏,
|
|
|
|
|
若你想不管路由下面的 children 声明的个数都显示你的根路由,
|
|
|
|
|
你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则,
|
|
|
|
|
一直显示根路由(默认 false)
|
|
|
|
|
|
|
|
|
|
title: 'title' 设置该路由在侧边栏和面包屑中展示的名字
|
|
|
|
|
|
|
|
|
|
icon: 'svg-name' 设置该路由的图标
|
|
|
|
|
|
|
|
|
|
noCache: true 如果设置为true,则不会被 <keep-alive> 缓存(默认 false)
|
|
|
|
|
|
|
|
|
|
breadcrumb: false 如果设置为false,则不会在breadcrumb面包屑中显示(默认 true)
|
|
|
|
|
|
|
|
|
|
affix: true 如果设置为true,则会一直固定在tag项中(默认 false)
|
|
|
|
|
|
|
|
|
|
noTagsView: true 如果设置为true,则不会出现在tag中(默认 false)
|
|
|
|
|
|
|
|
|
|
activeMenu: '/dashboard' 显示高亮的路由路径
|
|
|
|
|
|
|
|
|
|
followAuth: '/dashboard' 跟随哪个路由进行权限过滤
|
|
|
|
|
|
|
|
|
|
canTo: true 设置为true即使hidden为true,也依然可以进行路由跳转(默认 false)
|
|
|
|
|
}
|
2023-04-24 11:42:44 +08:00
|
|
|
|
**/
|
2023-02-11 00:44:00 +08:00
|
|
|
|
const remainingRouter: AppRouteRecordRaw[] = [
|
|
|
|
|
{
|
|
|
|
|
path: '/redirect',
|
|
|
|
|
component: Layout,
|
|
|
|
|
name: 'Redirect',
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: '/redirect/:path(.*)',
|
|
|
|
|
name: 'Redirect',
|
|
|
|
|
component: () => import('@/views/Redirect/Redirect.vue'),
|
|
|
|
|
meta: {}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
meta: {
|
|
|
|
|
hidden: true,
|
|
|
|
|
noTagsView: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/',
|
|
|
|
|
component: Layout,
|
|
|
|
|
redirect: '/index',
|
|
|
|
|
name: 'Home',
|
|
|
|
|
meta: {},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: 'index',
|
|
|
|
|
component: () => import('@/views/Home/Index.vue'),
|
|
|
|
|
name: 'Index',
|
|
|
|
|
meta: {
|
|
|
|
|
title: t('router.home'),
|
|
|
|
|
icon: 'ep:home-filled',
|
|
|
|
|
noCache: false,
|
|
|
|
|
affix: true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/user',
|
|
|
|
|
component: Layout,
|
|
|
|
|
name: 'UserInfo',
|
|
|
|
|
meta: {
|
|
|
|
|
hidden: true
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: 'profile',
|
|
|
|
|
component: () => import('@/views/Profile/Index.vue'),
|
|
|
|
|
name: 'Profile',
|
|
|
|
|
meta: {
|
|
|
|
|
canTo: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
noTagsView: false,
|
|
|
|
|
icon: 'ep:user',
|
|
|
|
|
title: t('common.profile')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'notify-message',
|
|
|
|
|
component: () => import('@/views/system/notify/my/index.vue'),
|
|
|
|
|
name: 'MyNotifyMessage',
|
|
|
|
|
meta: {
|
|
|
|
|
canTo: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
noTagsView: false,
|
|
|
|
|
icon: 'ep:message',
|
|
|
|
|
title: '我的站内信'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
2023-03-19 16:48:27 +08:00
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
path: '/dict',
|
|
|
|
|
component: Layout,
|
|
|
|
|
name: 'dict',
|
|
|
|
|
meta: {
|
|
|
|
|
hidden: true
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: 'type/data/:dictType',
|
2023-04-05 20:13:35 +08:00
|
|
|
|
component: () => import('@/views/system/dict/data/index.vue'),
|
2023-04-08 11:48:37 +08:00
|
|
|
|
name: 'SystemDictData',
|
2023-03-19 16:48:27 +08:00
|
|
|
|
meta: {
|
|
|
|
|
title: '字典数据',
|
|
|
|
|
noCache: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
canTo: true,
|
|
|
|
|
icon: '',
|
2023-04-05 20:13:35 +08:00
|
|
|
|
activeMenu: '/system/dict'
|
2023-03-19 16:48:27 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
|
2023-02-11 00:44:00 +08:00
|
|
|
|
{
|
|
|
|
|
path: '/codegen',
|
|
|
|
|
component: Layout,
|
|
|
|
|
name: 'CodegenEdit',
|
|
|
|
|
meta: {
|
|
|
|
|
hidden: true
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: 'edit',
|
|
|
|
|
component: () => import('@/views/infra/codegen/EditTable.vue'),
|
2023-04-08 11:48:37 +08:00
|
|
|
|
name: 'InfraCodegenEditTable',
|
2023-02-11 00:44:00 +08:00
|
|
|
|
meta: {
|
|
|
|
|
noCache: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
canTo: true,
|
|
|
|
|
icon: 'ep:edit',
|
|
|
|
|
title: '修改生成配置',
|
|
|
|
|
activeMenu: 'infra/codegen/index'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/job',
|
|
|
|
|
component: Layout,
|
|
|
|
|
name: 'JobL',
|
|
|
|
|
meta: {
|
|
|
|
|
hidden: true
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: 'job-log',
|
2023-04-01 14:26:29 +08:00
|
|
|
|
component: () => import('@/views/infra/job/logger/index.vue'),
|
2023-04-08 11:48:37 +08:00
|
|
|
|
name: 'InfraJobLog',
|
2023-02-11 00:44:00 +08:00
|
|
|
|
meta: {
|
|
|
|
|
noCache: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
canTo: true,
|
|
|
|
|
icon: 'ep:edit',
|
|
|
|
|
title: '调度日志',
|
|
|
|
|
activeMenu: 'infra/job/index'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/login',
|
|
|
|
|
component: () => import('@/views/Login/Login.vue'),
|
|
|
|
|
name: 'Login',
|
|
|
|
|
meta: {
|
|
|
|
|
hidden: true,
|
|
|
|
|
title: t('router.login'),
|
|
|
|
|
noTagsView: true
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-04-07 01:45:29 +08:00
|
|
|
|
{
|
|
|
|
|
path: '/sso',
|
|
|
|
|
component: () => import('@/views/Login/Login.vue'),
|
|
|
|
|
name: 'SSOLogin',
|
|
|
|
|
meta: {
|
|
|
|
|
hidden: true,
|
|
|
|
|
title: t('router.login'),
|
|
|
|
|
noTagsView: true
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-02-11 00:44:00 +08:00
|
|
|
|
{
|
|
|
|
|
path: '/403',
|
|
|
|
|
component: () => import('@/views/Error/403.vue'),
|
|
|
|
|
name: 'NoAccess',
|
|
|
|
|
meta: {
|
|
|
|
|
hidden: true,
|
|
|
|
|
title: '403',
|
|
|
|
|
noTagsView: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/404',
|
|
|
|
|
component: () => import('@/views/Error/404.vue'),
|
|
|
|
|
name: 'NoFound',
|
|
|
|
|
meta: {
|
|
|
|
|
hidden: true,
|
|
|
|
|
title: '404',
|
|
|
|
|
noTagsView: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/500',
|
|
|
|
|
component: () => import('@/views/Error/500.vue'),
|
|
|
|
|
name: 'Error',
|
|
|
|
|
meta: {
|
|
|
|
|
hidden: true,
|
|
|
|
|
title: '500',
|
|
|
|
|
noTagsView: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/bpm',
|
|
|
|
|
component: Layout,
|
|
|
|
|
name: 'bpm',
|
|
|
|
|
meta: {
|
|
|
|
|
hidden: true
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: '/manager/form/edit',
|
2023-03-25 19:45:56 +08:00
|
|
|
|
component: () => import('@/views/bpm/form/editor/index.vue'),
|
2023-04-08 11:48:37 +08:00
|
|
|
|
name: 'BpmFormEditor',
|
2023-02-11 00:44:00 +08:00
|
|
|
|
meta: {
|
|
|
|
|
noCache: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
canTo: true,
|
|
|
|
|
title: '设计流程表单',
|
2023-03-23 22:50:48 +08:00
|
|
|
|
activeMenu: '/bpm/manager/form'
|
2023-02-11 00:44:00 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/manager/model/edit',
|
2023-03-25 19:45:56 +08:00
|
|
|
|
component: () => import('@/views/bpm/model/editor/index.vue'),
|
2023-04-08 11:48:37 +08:00
|
|
|
|
name: 'BpmModelEditor',
|
2023-02-11 00:44:00 +08:00
|
|
|
|
meta: {
|
|
|
|
|
noCache: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
canTo: true,
|
|
|
|
|
title: '设计流程',
|
2023-03-25 19:45:56 +08:00
|
|
|
|
activeMenu: '/bpm/manager/model'
|
2023-02-11 00:44:00 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/manager/definition',
|
|
|
|
|
component: () => import('@/views/bpm/definition/index.vue'),
|
2023-04-08 11:48:37 +08:00
|
|
|
|
name: 'BpmProcessDefinition',
|
2023-02-11 00:44:00 +08:00
|
|
|
|
meta: {
|
|
|
|
|
noCache: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
canTo: true,
|
|
|
|
|
title: '流程定义',
|
2023-03-26 19:32:19 +08:00
|
|
|
|
activeMenu: '/bpm/manager/model'
|
2023-02-11 00:44:00 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/manager/task-assign-rule',
|
|
|
|
|
component: () => import('@/views/bpm/taskAssignRule/index.vue'),
|
2023-04-19 20:10:04 +08:00
|
|
|
|
name: 'BpmTaskAssignRuleList',
|
2023-02-11 00:44:00 +08:00
|
|
|
|
meta: {
|
|
|
|
|
noCache: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
canTo: true,
|
|
|
|
|
title: '任务分配规则'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/process-instance/create',
|
2023-03-28 08:10:11 +08:00
|
|
|
|
component: () => import('@/views/bpm/processInstance/create/index.vue'),
|
2023-02-11 00:44:00 +08:00
|
|
|
|
name: 'BpmProcessInstanceCreate',
|
|
|
|
|
meta: {
|
|
|
|
|
noCache: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
canTo: true,
|
|
|
|
|
title: '发起流程',
|
|
|
|
|
activeMenu: 'bpm/processInstance/create'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/process-instance/detail',
|
2023-03-28 00:10:42 +08:00
|
|
|
|
component: () => import('@/views/bpm/processInstance/detail/index.vue'),
|
2023-02-11 00:44:00 +08:00
|
|
|
|
name: 'BpmProcessInstanceDetail',
|
|
|
|
|
meta: {
|
|
|
|
|
noCache: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
canTo: true,
|
|
|
|
|
title: '流程详情',
|
|
|
|
|
activeMenu: 'bpm/processInstance/detail'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/bpm/oa/leave/create',
|
|
|
|
|
component: () => import('@/views/bpm/oa/leave/create.vue'),
|
|
|
|
|
name: 'OALeaveCreate',
|
|
|
|
|
meta: {
|
|
|
|
|
noCache: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
canTo: true,
|
|
|
|
|
title: '发起 OA 请假',
|
2023-04-15 16:03:12 +08:00
|
|
|
|
activeMenu: '/bpm/oa/leave'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/bpm/oa/leave/detail',
|
|
|
|
|
component: () => import('@/views/bpm/oa/leave/detail.vue'),
|
|
|
|
|
name: 'OALeaveDetail',
|
|
|
|
|
meta: {
|
|
|
|
|
noCache: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
canTo: true,
|
|
|
|
|
title: '查看 OA 请假',
|
|
|
|
|
activeMenu: '/bpm/oa/leave'
|
2023-02-11 00:44:00 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
2023-03-30 16:57:48 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/property',
|
|
|
|
|
component: Layout,
|
|
|
|
|
name: 'property',
|
|
|
|
|
meta: {
|
|
|
|
|
hidden: true
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: 'value/:propertyId(\\d+)',
|
|
|
|
|
component: () => import('@/views/mall/product/property/value/index.vue'),
|
2023-04-08 11:48:37 +08:00
|
|
|
|
name: 'ProductPropertyValue',
|
2023-03-30 16:57:48 +08:00
|
|
|
|
meta: { title: '商品属性值', icon: '', activeMenu: '/product/property' }
|
|
|
|
|
}
|
|
|
|
|
]
|
2023-04-24 11:42:44 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/product',
|
|
|
|
|
component: Layout,
|
2023-05-17 18:24:34 +08:00
|
|
|
|
name: 'Product',
|
2023-04-24 11:42:44 +08:00
|
|
|
|
meta: {
|
|
|
|
|
hidden: true
|
|
|
|
|
},
|
|
|
|
|
children: [
|
|
|
|
|
{
|
2023-05-17 18:24:34 +08:00
|
|
|
|
path: 'productSpuAdd', // TODO @puhui999:最好拆成 add 和 edit 两个路由;添加商品;修改商品 fix
|
2023-05-06 22:54:41 +08:00
|
|
|
|
component: () => import('@/views/mall/product/spu/addForm.vue'),
|
2023-05-17 18:24:34 +08:00
|
|
|
|
name: 'ProductSpuAdd',
|
2023-04-24 11:42:44 +08:00
|
|
|
|
meta: {
|
|
|
|
|
noCache: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
canTo: true,
|
|
|
|
|
icon: 'ep:edit',
|
|
|
|
|
title: '添加商品',
|
2023-05-17 18:24:34 +08:00
|
|
|
|
activeMenu: '/product/product-spu'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'productSpuEdit/:spuId(\\d+)',
|
|
|
|
|
component: () => import('@/views/mall/product/spu/addForm.vue'),
|
|
|
|
|
name: 'productSpuEdit',
|
|
|
|
|
meta: {
|
|
|
|
|
noCache: true,
|
|
|
|
|
hidden: true,
|
|
|
|
|
canTo: true,
|
|
|
|
|
icon: 'ep:edit',
|
|
|
|
|
title: '编辑商品',
|
|
|
|
|
activeMenu: '/product/product-spu'
|
2023-04-24 11:42:44 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
2023-02-11 00:44:00 +08:00
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
export default remainingRouter
|