| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481 |
- /* Layout */
- import Layout from '@/views/layout/layout'
- import LayoutInfo from '@/views/layout/layout-info'
- import LayoutDefault from '@/views/layout/layout-default'
- // import Main from '@/views/layout/app-main'
- // 由于懒加载页面太多的话会造成webpack热更新太慢,所以开发环境不使用懒加载,只有生产环境使用懒加载
- const _import = require('@/utils/util.import.' + process.env.NODE_ENV)
- /**
- * 在主框架内显示
- */
- const frameIn = [
- {
- path: '/',
- redirect: { name: 'dashboard' },
- component: Layout,
- children: [
- // 首页
- {
- path: 'dashboard',
- name: 'dashboard',
- meta: {
- title: '首页',
- auth: true
- },
- component: _import('/system/dashboard')
- },
- // 刷新页面 必须保留
- {
- path: 'refresh',
- name: 'refresh',
- hidden: true,
- component: _import('/system/function/refresh')
- },
- // 页面重定向 必须保留
- {
- path: 'redirect/:route*',
- name: 'redirect',
- hidden: true,
- component: _import('/system/function/redirect')
- }
- ]
- }
- ]
- /**
- * 在主框架之外显示
- */
- const frameOut = [
- // 登录
- {
- path: '/login',
- name: 'login',
- meta: {
- title: '登录'
- },
- component: _import('/system/login')
- },
- {
- path: '/fileView',
- name: 'fileView',
- meta: {
- title: '文件预览页'
- },
- component: _import('/viewFile')
- },
- {
- path: '/iframe',
- name: 'iframe',
- meta: {
- title: 'iframe'
- },
- component: _import('/system/iframe')
- }
- ]
- /**
- * 错误页面
- */
- const errorPage = [
- {
- path: '/404',
- name: 'error404',
- meta: {
- title: '404-页面不存在'
- },
- hidden: true,
- component: _import('/system/error/404')
- },
- {
- path: '/401',
- name: 'error401',
- meta: {
- title: '401- 未授权'
- },
- hidden: true,
- component: _import('/system/error/401')
- },
- {
- path: '/403',
- name: 'error403',
- meta: {
- title: '403-权限不足'
- },
- hidden: true,
- component: _import('/system/error/403')
- }
- // {
- // path: '/nomenu',
- // name: 'nomenu',
- // meta: {
- // title: '没有菜单资源'
- // },
- // hidden: true,
- // component: _import('/system/error/nomenu')
- // }
- ]
- // 自定义
- const frameCustom = [
- {
- path: '/next-menu',
- redirect: 'index',
- component: LayoutInfo,
- children: [
- {
- path: 'index',
- name: 'next-menu',
- meta: { title: '更多', icon: 'dashboard' },
- component: _import('/system/dashboard/next-menu')
- }
- ]
- },
- // {
- // path: '/message',
- // component: Layout,
- // redirect: 'index',
- // children: [
- // {
- // path: 'index',
- // name: 'message',
- // meta: { title: '消息', icon: 'message' },
- // component:_import('/message/index')
- // }, {
- // path: 'chat',
- // name: 'chat',
- // meta: { title: '聊天', icon: 'message' },
- // component:_import('/message/index')
- // }
- // ]
- // },
- {
- path: '/notice',
- component: Layout,
- redirect: 'index',
- children: [
- {
- path: 'index',
- name: 'notice',
- meta: { title: '公告', icon: 'notice' },
- component: _import('/platform/notice/index')
- }
- ]
- },
- {
- path: '/contacts',
- component: Layout,
- redirect: 'index',
- children: [
- {
- path: 'index',
- name: 'contacts',
- meta: { title: '通讯录', icon: 'contacts' },
- component: _import('/platform/contacts/index')
- }
- ]
- },
- {
- path: '/message/inner/receive',
- component: Layout,
- redirect: 'index',
- children: [
- {
- path: 'index',
- name: 'news',
- meta: { title: '我的消息', icon: 'news' },
- component: _import('/platform/message/inner/receive')
- }
- ]
- },
- {
- path: '/my',
- component: Layout,
- redirect: 'index',
- children: [
- {
- path: 'index',
- name: 'my',
- meta: { title: '我的', icon: 'my' },
- component: _import('/platform/my/index')
- },
- {
- path: 'userInfo',
- name: 'userInfo',
- meta: {
- title: '个人信息',
- icon: 'my',
- isLeftBar: true,
- isShowBar: false
- },
- component: _import('/platform/my/user-info')
- },
- {
- path: 'changePassword',
- name: 'changePassword',
- meta: {
- title: '修改密码',
- icon: 'my',
- isLeftBar: true,
- isShowBar: false
- },
- component: _import('/platform/my/change-password')
- },
- // {
- // path: 'setting',
- // name: 'setting',
- // meta: { title: '设置', icon: 'my', isLeftBar: true, isShowBar: false },
- // component:_import('/platform/my/setting')
- // },
- {
- path: 'help',
- name: 'help',
- meta: {
- title: '帮助',
- icon: 'help',
- isLeftBar: true,
- isShowBar: false
- },
- component: _import('/platform/my/help')
- },
- {
- path: 'aboutUs',
- name: 'aboutUs',
- meta: {
- title: '关于我们',
- icon: 'my',
- isLeftBar: true,
- isShowBar: false
- },
- component: _import('/platform/my/about-us')
- }
- ]
- },
- {
- path: '/bpmn',
- redirect: 'pending',
- component: LayoutDefault,
- children: [
- {
- path: 'pending/index',
- name: 'pending',
- meta: { title: '待办事宜' },
- component: _import('/platform/bpmn/pending/index')
- },
- {
- path: 'pending-matter/index',
- name: 'pendingMatter',
- meta: { title: '待办事宜' },
- component: _import('/platform/bpmn/pending-matter/index')
- },
- {
- path: 'completed/index',
- name: 'completed',
- meta: { title: '办结事宜' },
- component: _import('/platform/bpmn/completed/index')
- },
- {
- path: 'handled/index',
- name: 'handled',
- meta: { title: '已办事宜' },
- component: _import('/platform/bpmn/handled/index')
- },
- {
- path: 'myRequest/index',
- name: 'myRequest',
- meta: { title: '我的请求' },
- component: _import('/platform/bpmn/my-request/index')
- },
- {
- path: 'newProcess/index',
- name: 'newProcess',
- meta: { title: '新建流程' },
- component: _import('/platform/bpmn/new-process/index')
- },
- {
- path: 'myDraft/index',
- name: 'myDraft',
- meta: { title: '我的草稿' },
- component: _import('/platform/bpmn/my-draft/index')
- },
- {
- path: 'myRevoke/index',
- name: 'myRevoke',
- meta: { title: '可撤销事务' },
- component: _import('/platform/bpmn/my-revoke/index')
- },
- {
- path: 'uploadAttachment/index',
- name: 'uploadAttachment',
- meta: { title: '上传附件' },
- component: _import('/platform/bpmn/upload-attachment/index')
- },
- {
- path: 'myCompleted/index',
- name: 'myCompleted',
- meta: { title: '我结束的流程' },
- component: _import('/platform/bpmn/my-completed/index')
- },
- {
- path: 'taskChange/index',
- name: 'taskChange',
- meta: { title: '我的转办代理' },
- component: _import('/platform/bpmn/task-change/index')
- },
- {
- path: 'taskChangeDetail',
- name: 'taskChangeDetail',
- meta: { title: '详细信息' },
- component: _import('/platform/bpmn/task-change/detail')
- },
- {
- path: 'reminders/index',
- name: 'reminders',
- meta: { title: '催办事宜' },
- component: _import('/platform/bpmn/reminders/index')
- },
- // {
- // path: 'documents/documents',
- // name: 'documents',
- // meta: { title: '查阅文件' },
- // component: _import('/platform/bpmn/documents/documents')
- // },
- {
- path: 'memorandum/index',
- name: 'memorandum',
- meta: { title: '备忘录' },
- component: _import('/platform/bpmn/memorandum/index')
- },
- {
- path: 'documents/test',
- name: 'test',
- meta: { title: '查阅文件' },
- component: _import('/platform/bpmn/documents/test')
- },
- {
- path: 'myTest/index',
- name: 'myTest',
- meta: { title: '我的考试' },
- component: _import('/platform/bpmn/my-test/index')
- },
- {
- path: 'siginin/index',
- name: 'siginin',
- meta: { title: '签到' },
- component: _import('/platform/bpmn/siginin/index')
- },
- {
- path: 'siginin/outIndex',
- name: 'outSiginin',
- meta: { title: '签到' },
- component: _import('/platform/bpmn/siginin/outIndex')
- },
- {
- path: 'alienRegistration/index',
- name: 'alienRegistration',
- meta: { title: '外来人员登记' },
- component: _import('/platform/bpmn/alienRegistration/index')
- },
- {
- path: 'satisfactionV2/index',
- name: 'satisfactionV2',
- meta: { title: '满意度调查' },
- component: _import('/platform/bpmn/satisfactionV2/index')
- },
- {
- path: 'report/oralReport',
- name: 'oralReport',
- meta: { title: '口头报告查询' },
- component: _import('/platform/bpmn/report/oralReport')
- },
- {
- path: 'report/delayReport',
- name: 'delayReport',
- meta: { title: '延迟报告查询' },
- component: _import('/platform/bpmn/report/delayReport')
- },
- {
- path: 'addiInspect/index',
- name: 'addiInspect',
- meta: { title: '附加检验申请' },
- component: _import('/platform/bpmn/addiInspect/index')
- },
- {
- path: 'communication/communicationList',
- name: 'communicationList',
- meta: { title: '信息沟通' },
- component: _import('/platform/bpmn/communication/communicationList')
- },
- {
- path: 'complaint/complaintList',
- name: 'complaintList',
- meta: { title: '投诉列表' },
- component: _import('/platform/bpmn/complaint/complaintList')
- },
- {
- path: 'satisfaction/satisfaction',
- name: 'satisfaction',
- meta: { title: '满意度评价' },
- component: _import('/platform/bpmn/satisfaction/satisfaction')
- },
- {
- path: 'mySchedule/index',
- name: 'mySchedule',
- meta: { title: '我的排班' },
- component: _import('/platform/bpmn/my-schedule/index')
- },
- {
- path: 'shiftTransferApplication/staList',
- name: 'shiftTransferApplication',
- meta: { title: '调班申请' },
- component: _import('/platform/bpmn/shiftTransferApplication/staList')
- }
- ]
- },
- {
- path: '/message/inner/receive',
- component: _import('/platform/message/inner/receive'),
- name: 'messageInnerReceive',
- meta: { title: '我的消息' }
- },
- {
- path: '/d/list/:id(\\w+)',
- component: _import('/platform/data/template-list'),
- name: 'dataTemplateList',
- meta: { title: '模版' }
- },
- // {
- // path: '/d/form',
- // component:_import('/platform/data/template-form'),
- // name: 'dataTemplateform',
- // meta: { title: '表单明细' }
- // },
- {
- path: '/demo',
- component: LayoutInfo,
- redirect: 'form',
- children: [
- {
- path: 'form',
- name: 'demoForm',
- meta: { title: '表单Demo', icon: 'table' },
- component: _import('/demo/form')
- }
- // {
- // path: 'toolbar',
- // name: 'demoToolbar',
- // meta: { title: '工具栏', icon: 'toolbar' },
- // component:_import('/demo/toolbar')
- // }
- ]
- },
- { path: '*', redirect: '/404', hidden: true }
- ]
- // 导出需要显示菜单的
- export const frameInRoutes = frameIn
- // 重新组织后导出
- export default [...frameIn, ...frameOut, ...errorPage, ...frameCustom]
|