You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

417 lines
9.4 KiB

import Vue from 'vue'
import Router from 'vue-router'
/* Layout */
import Layout from '@/layout'
Vue.use(Router)
/* 所有角色可以访问/没有权限要求的基页 */
export const constantRoutes = [
{
path: '/redirect',
component: Layout,
hidden: true,
children: [{
path: '/redirect/:path(.*)',
component: () => import('@/views/redirect/index.vue')
}]
},
{
path: '/',
redirect: 'login'
},
{
path: '/login',
component: () => import('@/views/login/login.vue')
},
{
path: '/home',
component: () => import('@/views/Home/Home.vue'),
name: 'home'
},
{
path: '/index',
component: Layout,
redirect: '/index',
children: [{
path: '/index',
component: () =>
import('@/views/index.vue'),
name: 'index',
meta: {
title: '主页',
noCache: true,
affix: true
}
}]
}, {
path: '/region',
component: Layout,
redirect: '/region',
children: [{
path: '/region',
component: () =>
import('@/views/region/region.vue'),
name: 'region',
meta: {
title: '区域管理'
}
}]
}, {
path: '/userManage',
component: Layout,
redirect: '/userManage',
children: [{
path: '/userManage',
component: () =>
import('@/views/userManage/userManage.vue'),
name: 'userManage',
meta: {
title: '用户管理'
}
}]
}, {
path: '/RoleAdminister',
component: Layout,
redirect: '/RoleAdminister',
children: [{
path: '/RoleAdminister',
component: () =>
import('@/views/RoleAdminister/RoleAdminister.vue'),
name: 'RoleAdminister',
meta: {
title: '角色管理'
}
}]
}, {
path: '/postManage',
component: Layout,
redirect: '/postManage',
children: [{
path: '/postManage',
component: () =>
import('@/views/postManage/postManage.vue'),
name: 'postManage',
meta: {
title: '岗位管理'
}
}]
}, {
path: '/functional',
component: Layout,
redirect: '/functional',
children: [{
path: '/functional',
component: () =>
import('@/views/functional/functional.vue'),
name: 'functional',
meta: {
title: '功能管理'
}
}]
}, {
path: '/sourceManage',
component: Layout,
redirect: '/sourceManage',
children: [{
path: '/sourceManage',
component: () =>
import('@/views/sourceManage/sourceManage.vue'),
name: 'sourceManage',
meta: {
title: '资源管理'
}
}]
}, {
path: '/menuManage',
component: Layout,
redirect: '/menuManage',
children: [{
path: '/menuManage',
component: () => import('@/views/menuManage/menuManage.vue'),
name: 'menuManage',
meta: {
title: '菜单管理'
}
}]
},
{
path: '/mobileterminal',
component: Layout,
redirect: '/mobileterminal',
children: [{
path: '/mobileterminal',
component: () => import('@/views/mobileterminal/mobileterminal.vue'),
name: 'mobileterminal',
meta: {
title: '移动端管理'
}
}]
},
{
path: '/personalization',
component: Layout,
redirect: '/personalization',
children: [{
path: '/personalization',
component: () => import('@/views/personalization/personalization.vue'),
name: 'personalization',
meta: {
title: '个性化设置'
}
}]
},
{
path: '/copyofprocess',
component: Layout,
redirect: '/copyofprocess',
children: [{
path: '/copyofprocess',
component: () => import('@/views/copyofprocess/liuchengchasongguanli'),
name: 'mobileterminal',
meta: {
title: '流程抄送'
}
}]
},
{
path: '/dictManage',
component: Layout,
redirect: '/dictManage',
children: [{
path: '/dictManage',
component: () => import('@/views/dictManage/dictManage.vue'),
name: 'dictManage',
meta: {
title: '数据字典'
}
}]
},
{
path: '/pushmessage',
component: Layout,
redirect: '/pushmessage',
children: [{
path: '/pushmessage',
component: () => import('@/views/pushmessage/pushmessage.vue'),
name: 'PushMessage',
meta: {
title: '消息推送'
}
}]
},
{
path: '/downloadByApp',
component: Layout,
redirect: '/downloadByApp',
children: [{
path: '/downloadByApp',
component: () => import('@/views/downloadByApp/downloadByApp.vue'),
name: 'downloadByApp',
meta: {
title: 'app下载'
}
}]
},
{
path: '/notificationannouncement',
component: Layout,
redirect: '/notificationannouncement',
children: [{
path: '/notificationannouncement',
component: () => import('@/views/notificationannouncement/notificationannouncement.vue'),
name: 'TongZhiGongGao',
meta: {
title: '通知公告'
}
}]
},
{
path: '/logManage',
component: Layout,
redirect: '/logManage',
children: [{
path: '/logManage',
component: () =>
import('@/views/logManage/logManage.vue'),
name: 'logManage',
meta: {
title: '日志管理'
}
}]
}, {
path: '/PwdModify',
component: Layout,
redirect: '/PwdModify',
children: [{
path: '/PwdModify',
component: () => import('@/views/PwdModify/PwdModify.vue'),
name: 'PwdModify',
meta: {
title: '修改密码'
}
}]
}, {
path: '/organizationManage',
component: Layout,
redirect: '/organizationManage',
children: [{
path: '/organizationManage',
component: () =>
import('@/views/organizationManage/organizationManage.vue'),
name: 'organizationManage',
meta: {
title: '组织管理'
}
}]
},
// 工作流
{
path: '/workflow',
component: Layout,
redirect: '/workflow',
meta: {
title: '工作流'
},
children: [
{
path: '/workflow/definition',
component: () =>
import('@/views/workflow/definition/definition.vue'),
name: 'definition',
meta: {
title: '流程定义'
}
},
{
path: '/workflow/form',
component: () =>
import('@/views/workflow/form/form.vue'),
name: 'form',
meta: {
title: '表单配置'
}
}
]
},
{
path: '/datamapping',
component: Layout,
redirect: '/datamapping',
children: [{
path: '/datamapping',
component: () => import('@/views/datamapping/shujuyingshe.vue'),
name: 'shujuyingshe',
meta: { title: '数据映射', noCache: true }
}]
},
{
path: '/financialparameter',
component: Layout,
redirect: '/financialparameter',
children: [{
path: '/financialparameter',
component: () => import('@/views/financialparameter/financialparameter.vue'),
name: 'FinancialParameter',
meta: { title: '财务参数', noCache: true }
}]
},
{
path: '/statisticalparameter',
component: Layout,
redirect: '/statisticalparameter',
children: [{
path: '/statisticalparameter',
component: () => import('@/views/statisticalparameter/statisticalparameter.vue'),
name: 'StatisticalParameter',
meta: { title: '统计参数', noCache: true }
}]
},
// {
// path: '/workflow',
// component: Layout,
// redirect: '/workflow/index',
// children: [{
// path: '/workflow/index',
// component: () =>
// import('@/views/workflow/index.vue'),
// name: 'WorkflowIndex',
// meta: {
// title: '工作流'
// }
// }]
// },
{
path: '/todo',
component: () => import('@/views/flow/todoList.vue')
},
{
path: '/done',
component: () => import('@/views/flow/doneList.vue')
},
{
path: '/toberead',
component: () => import('@/views/flow/tobereadList.vue')
},
{
path: '/haveread',
component: () => import('@/views/flow/havereadList.vue')
},
{
path: '/notificationannouncement/relation/secondarysaleannouncement',
component: () => import('@/views/notificationannouncement/relation/secondarysaleannouncement.vue')
},
// {
// path: '/',
// component: Layout,
// redirect: 'dictCommon',
// children: [{
// path: 'dictCommon',
// component: () =>
// import('@/views/system-admin/dictCommon.vue'),
// name: 'dictCommon',
// meta: {
// title: '数据字典值'
// }
// }]
// },
{
path: '/404',
component: () =>
import('@/views/404'),
hidden: true
},
{
path: '/flow/flowRecordForBusiness',
component: () => import('@/views/flow/flowRecordForBusiness'),
name: 'flowRecordForBusiness'
}/*,
{
path: '/portal/flow/flowRecord',
component: ()=> import('@/views/flow/flowRecord'),
name: 'flowRecord'
}*/
// 404 page must be placed at the end !!!
// { path: '*', redirect: '/404', hidden: true }
]
// import componentsRouter from '@/router/modules/components'
const createRouter = () => new Router({
// mode: 'history', // require service support
scrollBehavior: () => ({y: 0}),
routes: constantRoutes
})
const router = createRouter()
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
const newRouter = createRouter()
router.matcher = newRouter.matcher // reset router
}
export default router