import { RouteRecordRaw } from 'vue-router'; /** * * 建议:路由 path 路径与文件夹名称相同,找文件可浏览器地址找,方便定位文件位置 * * 路由meta对象参数说明 * meta: { * title: 菜单栏及 tagsView 栏、菜单搜索名称(国际化) * isLink: 是否超链接菜单,开启外链条件,`1、isLink: 链接地址不为空` * isHide: 是否隐藏此路由 * isKeepAlive: 是否缓存组件状态 * isAffix: 是否固定在 tagsView 栏上 * isIframe: 是否内嵌窗口,开启条件,`1、isIframe:true 2、isLink:链接地址不为空` * roles: 当前路由权限标识,取角色管理。控制路由显示、隐藏。超级管理员:admin 普通角色:common * icon: 菜单、tagsView 图标,阿里:加 `iconfont xxx`,fontawesome:加 `fa xxx` * } */ // 扩展 RouteMeta 接口 declare module 'vue-router' { interface RouteMeta { title?: string; isLink?: string; isHide?: boolean; isKeepAlive?: boolean; isAffix?: boolean; isIframe?: boolean; roles?: string[]; icon?: string; } } /** * 定义动态路由 * 前端添加路由,请在顶级节点的 `children 数组` 里添加 * @description 未开启 isRequestRoutes 为 true 时使用(前端控制路由),开启时第一个顶级 children 的路由将被替换成接口请求回来的路由数据 * @description 各字段请查看 `@/views/system/menu/components/Menu-add.vue 下的 ruleForm` * @returns 返回路由菜单数据 */ export const dynamicRoutes: Array = [ { path: '/', name: '/', component: () => import('@/layout/index.vue'), redirect: '/home', meta: { isKeepAlive: true, }, children: [ { path: '/home', name: 'home', component: () => import('@/views/home/index.vue'), meta: { title: '首页', isLink: '', isHide: false, isKeepAlive: true, isAffix: true, isIframe: false, icon: 'iconfont icon-shouye', }, }, ], }, { path: '/todo/seats/accept', name: 'orderAccept', component: () => import('@/views/todo/seats/accept/index.vue'), meta: { title: '工单受理', isKeepAlive: true, }, }, { path: '/knowledge/index/edit/:tagsViewName/:id?', name: 'knowledgeEdit', component: () => import('@/views/knowledge/index/edit.vue'), meta: { title: '知识库新增/编辑', isKeepAlive: true, isDynamic: true, }, }, { path: '/knowledge/index/preview/:tagsViewName/:id/:isAddPv?', name: 'knowledgePreview', component: () => import('@/views/knowledge/index/preview.vue'), meta: { title: '知识查看', isKeepAlive: true, isDynamic: true, }, }, { path: '/system/roles/dataAuth', name: 'systemDataAuth', component: () => import('@/views/system/dataAuth/index.vue'), meta: { title: '数据权限', isKeepAlive: true, }, }, { path: '/system/config/workflow/edit/:tagsViewName/:id?', name: 'workflowAddEdit', component: () => import('@/views/system/config/workflow/components/workflowEdit.vue'), meta: { title: '流程编辑', isKeepAlive: true, isDynamic: true, }, }, { path: '/auxiliary/notice/detail/:tagsViewName/:id', name: 'auxiliaryNoticeDetail', component: () => import('@/views/auxiliary/notice/detail.vue'), meta: { title: '通知详情', isKeepAlive: false, isDynamic: true, }, }, { path: '/public/notice/:tagsViewName/:id/:isRead', name: 'auxiliaryNoticeRead', component: () => import('@/views/public/notice/index.vue'), meta: { title: '通知阅读', isKeepAlive: false, isDynamic: true, }, }, { path: '/statistics/order/detailVisitDiscontent', name: 'statisticsOrderDetailVisitDiscontent', component: () => import('@/views/statistics/order/detailVisitDiscontent.vue'), meta: { title: '回访不满意原因统计明细', isKeepAlive: true, }, }, { path: '/statistics/order/specialTable', name: 'statisticsOrderSpecialTable', component: () => import('@/views/statistics/order/specialTable.vue'), meta: { title: '特提统计明细', isKeepAlive: true, }, }, { path: '/statistics/department/DepartmentSatisfiedDetail', name: 'statisticsDepartmentSatisfiedDetail', component: () => import('@/views/statistics/department/detailSatisfied.vue'), meta: { title: '部门满意度统计明细', isKeepAlive: true, }, }, { path: '/statistics/detailSatisfiedOrg/org', name: 'statisticsDepartmentSatisfiedOrg', component: () => import('@/views/statistics/department/detailSatisfiedOrg.vue'), meta: { title: '部门满意度统计明细', isKeepAlive: true, }, }, { path: '/statistics/center/detailEventFrequently', name: 'eventFrequentlyDetail', component: () => import('@/views/statistics/center/detailEventFrequently.vue'), meta: { title: '高频统计明细', isKeepAlive: true, }, }, { path: '/judicial/statistics/detailEventClass', name: 'judicialDetailEventClass', component: () => import('@/views/judicial/statistics/detailEventClass.vue'), meta: { title: '事项分类统计明细', isKeepAlive: true, }, }, { path: '/judicial/statistics/detailDepartment', //工单 name: 'judicialDetailDepartment', component: () => import('@/views/judicial/statistics/detailDepartment.vue'), meta: { title: '执法部门办件统计明细', isKeepAlive: true, }, }, { path: '/judicial/statistics/detailArea', name: 'judicialDetailArea', component: () => import('@/views/judicial/statistics/detailArea.vue'), meta: { title: '区域分类统计明细', isKeepAlive: true, }, }, { path: '/judicial/statistics/detailSatisfied', name: 'judicialStatisticsDetailSatisfied', component: () => import('@/views/judicial/statistics/detailSatisfied.vue'), meta: { title: '部门满意度统计明细', isKeepAlive: true, }, }, { path: '/statistics/center/detailWrongItem', name: 'statisticsCenterDetailWrongItem', component: () => import('@/views/statistics/center/detailWrongItem.vue'), meta: { title: '回退错件统计明细', isKeepAlive: true, }, }, { path: '/statistics/order/departmentDetailAcceptType', name: 'statisticsDepartmentDetailAcceptType', component: () => import('@/views/statistics/order/departmentDetailAcceptType.vue'), meta: { title: '部门受理类型统计周期明细', isKeepAlive: true, }, }, { path: '/statistics/department/detailDpAccept', name: 'statisticsDepartmentDetailDpAccept', component: () => import('@/views/statistics/department/detailDpAccept.vue'), meta: { title: '部门受理类型统计子部门', isKeepAlive: true, }, }, { path: '/statistics/department/detailDpAcceptList', name: 'statisticsDepartmentDetailAcceptList', component: () => import('@/views/statistics/department/detailDpAcceptList.vue'), meta: { title: '部门受理类型统计明细', isKeepAlive: true, }, }, { path: '/statistics/order/detailDispatch', name: 'statisticsOrderDetailDispatch', component: () => import('@/views/statistics/order/detailDispatch.vue'), meta: { title: '派单量统计明细', isKeepAlive: true, }, }, { path: '/statistics/department/detailHandleOrg', name: 'statisticsDepartmentDetailHandleOrg', component: () => import('@/views/statistics/department/detailHandleOrg.vue'), meta: { title: '部门办件统计表明细', isKeepAlive: true, }, }, { path: '/statistics/department/detailHandle', name: 'statisticsDepartmentDetailHandle', component: () => import('@/views/statistics/department/detailHandle.vue'), meta: { title: '部门办件统计表明细', isKeepAlive: true, }, }, { path: '/statistics/call/detailTalkTime', name: 'statisticsCallDetailTalkTime', component: () => import('@/views/statistics/call/detailTalkTime.vue'), meta: { title: '通话时段明细表', isKeepAlive: true, }, }, { path: '/statistics/department/detailOverdue', name: 'statisticsDepartmentDetailOverdue', component: () => import('@/views/statistics/department/detailOverdue.vue'), meta: { title: '部门超期统计明细', isKeepAlive: true, }, }, { path: '/statistics/department/detailDelay', name: 'statisticsDepartmentDetailDelay', component: () => import('@/views/statistics/department/detailDelay.vue'), meta: { title: '部门延期统计明细', isKeepAlive: true, }, }, { path: '/statistics/department/detailSh', name: 'statisticsDepartmentDetailSh', component: () => import('@/views/statistics/department/detailSh.vue'), meta: { title: '二次办理统计明细', isKeepAlive: true, }, }, { path: '/statistics/department/detailShSatisfied', name: 'statisticsDepartmentDetailShSatisfied', component: () => import('@/views/statistics/department/detailShSatisfied.vue'), meta: { title: '二次办理满意度统计明细', isKeepAlive: true, }, }, { path: '/dataShare/taskDetail/:id', name: 'dataShareTaskDetail', component: () => import('@/views/dataShare/taskDetail.vue'), meta: { title: '推送任务明细', isKeepAlive: true, isDynamic: true, }, }, { path: '/statistics/order/detailSource', name: 'statisticsOrderDetailSource', component: () => import('@/views/statistics/order/detailSource.vue'), meta: { title: '信件来源列表', isKeepAlive: true, }, }, { path: '/statistics/order/detailSourceOrder', name: 'statisticsDetailSourceOrder', component: () => import('@/views/statistics/order/detailSourceOrder.vue'), meta: { title: '信件来源列表明细', isKeepAlive: true, }, }, { path: '/statistics/order/detailSourceTime', name: 'statisticsOrderDetailSourceTime', component: () => import('@/views/statistics/order/detailSourceTime.vue'), meta: { title: '信件来源分时列表', isKeepAlive: true, }, }, { path: '/statistics/call/detailIndex', name: 'statisticsCallDetailIndex', component: () => import('@/views/statistics/call/detailIndex.vue'), meta: { title: '话务日期明细', isKeepAlive: true, }, }, { path: '/statistics/order/detailAcceptTime', name: 'statisticsOrderDetailAcceptTime', component: () => import('@/views/statistics/order/detailAcceptTime.vue'), meta: { title: '受理类型分时统计列表', isKeepAlive: true, }, }, { path: '/statistics/order/detailHotSpotTime', name: 'statisticsOrderDetailHotspotTime', component: () => import('@/views/statistics/order/detailHotSpotTime.vue'), meta: { title: '热点类型分时统计列表', isKeepAlive: true, }, }, { path: '/statistics/order/detailAreaTime', name: 'statisticsOrderDetailAreaTime', component: () => import('@/views/statistics/order/detailAreaTime.vue'), meta: { title: '区域分时统计列表', isKeepAlive: true, }, }, { path: '/statistics/department/detailSatisfiedList', name: 'statisticsDepartmentSatisfiedDetailList', component: () => import('@/views/statistics/department/detailSatisfiedList.vue'), meta: { title: '部门满意度列表明细', isKeepAlive: true, }, }, { path: '/statistics/department/detailHandleList', name: 'statisticsDepartmentDetailHandleList', component: () => import('@/views/statistics/department/detailHandleList.vue'), meta: { title: '部门办件列表明细', isKeepAlive: true, }, }, { path: '/statistics/department/detailOverdueList', name: 'statisticsDepartmentDetailOverdueList', component: () => import('@/views/statistics/department/detailOverdueList.vue'), meta: { title: '部门超期列表明细', isKeepAlive: true, }, }, { path: '/statistics/order/detailHotspotArea', name: 'statisticsOrderDetailHotspotArea', component: () => import('@/views/statistics/order/detailHotspotArea.vue'), meta: { title: '热点统计明细', isKeepAlive: true, }, }, { path: '/judicial/order/add', name: 'judgeOrderAdd', component: () => import('@/views/judicial/order/components/orderAdd.vue'), meta: { title: '新建工单', isKeepAlive: true, }, },{ path: '/statistics/order/detailAcceptTypeList', name: 'statisticsOrderDetailAcceptTypeList', component: () => import('@/views/statistics/order/detailAcceptTypeList.vue'), meta: { title: '受理类型统计列表', isKeepAlive: true, }, },{ path: '/statistics/order/detailAcceptType', name: 'statisticsDetailAcceptType', component: () => import('@/views/statistics/order/detailAcceptType.vue'), meta: { title: '受理类型统计明细', isKeepAlive: true, }, },{ path: '/statistics/order/detailHotspotSatisfied', name: 'statisticsOrderDetailHotspotSatisfied', component: () => import('@/views/statistics/order/detailHotspotSatisfied.vue'), meta: { title: '热点满意度统计明细', isKeepAlive: true, }, },{ path: '/statistics/call/detailIndexTime', name: 'statisticsCallDetailIndexTime', component: () => import('@/views/statistics/call/detailIndexTime.vue'), meta: { title: '话务时段分析日期', isKeepAlive: true, }, },{ path: '/statistics/call/detailIndexCall', name: 'statisticsCallDetailIndexCall', component: () => import('@/views/statistics/call/detailIndexCall.vue'), meta: { title: '话务时段分析明细', isKeepAlive: true, }, },{ path: '/statistics/center/detailReport/:id/:tagsViewName?', name: 'statisticsCenterDetailReport', component: () => import('@/views/statistics/center/detail-report.vue'), meta: { title: '查看分析报告', isKeepAlive: true, isDynamic: true, }, },{ path: '/statistics/center/detailAcceptCenter', name: 'statisticsCenterDetailAcceptCenter', component: () => import('@/views/statistics/center/detailAcceptCenter.vue'), meta: { title: '企业专席明细', isKeepAlive: true, }, },{ path: '/statistics/center/detailTwist', name: 'statisticsCenterDetailTwist', component: () => import('@/views/statistics/center/detailTwist.vue'), meta: { title: '扭转明细列表', isKeepAlive: true, }, },{ path: '/todo/edit/record', name: 'todoEditRecord', component: () => import('@/views/todo/edit/record.vue'), meta: { title: '修改记录', isKeepAlive: true, }, },{ path: '/statistics/call/detailSeatDate', name: 'statisticsCallDetailSeatsDate', component: () => import('@/views/statistics/call/detailSeatDate.vue'), meta: { title: '话务时段明细', isKeepAlive: true, }, },{ path: '/statistics/center/detailSeatSatisfactionList', name: 'statisticsCenterDetailSeatSatisfactionList', component: () => import('@/views/statistics/center/detailSeatSatisfactionList.vue'), meta: { title: '坐席满意度明细表', isKeepAlive: true, }, },{ path: '/statistics/center/detailSeatSatisfaction', name: 'statisticsCenterDetailSeatSatisfaction', component: () => import('@/views/statistics/center/detailSeatSatisfaction.vue'), meta: { title: '坐席满意度列表明细', isKeepAlive: true, }, },{ path: '/statistics/call/detailSeatsMoth', name: 'statisticsCallSeatsMothDetail', component: () => import('@/views/statistics/call/detailSeatsMoth.vue'), meta: { title: '通话时段明细', isKeepAlive: true, }, }, { path: '/plan/index/edit/:tagsViewName/:id?', name: 'planEdit', component: () => import('@/views/plan/index/edit.vue'), meta: { title: '预案库新增/编辑', isKeepAlive: true, isDynamic: true, }, }, { path: '/plan/index/preview/:tagsViewName/:id/:isAddPv?', name: 'planPreview', component: () => import('@/views/plan/index/preview.vue'), meta: { title: '预案查看', isKeepAlive: true, isDynamic: true, }, }, { path: '/case/index/edit/:tagsViewName/:id?', name: 'caseEdit', component: () => import('@/views/case/index/edit.vue'), meta: { title: '案例库新增/编辑', isKeepAlive: true, isDynamic: true, }, }, { path: '/case/index/preview/:tagsViewName/:id/:isAddPv?', name: 'casePreview', component: () => import('@/views/case/index/preview.vue'), meta: { title: '案例查看', isKeepAlive: true, isDynamic: true, }, }, { path: '/snapshot/inviteCode/detailStatistics', name: 'snapshotInviteCodeStatisticsDetail', component: () => import('@/views/snapshot/inviteCode/statistics/components/detail.vue'), meta: { title: '邀请码统计明细', isKeepAlive: true, }, }, { path: '/snapshot/statistics/detailStatistics', name: 'snapshotStatisticsDetail', component: () => import('@/views/snapshot/statistics/detailStatistics.vue'), meta: { title: '随手拍统计明细', isKeepAlive: true, }, }, { path: '/snapshot/statistic/detailHotSubclass', name: 'snapshotStatisticsDetailHotSubclass', component: () => import('@/views/snapshot/statistics/detailHotSubclass.vue'), meta: { title: '随手拍统计明细', isKeepAlive: true, }, }, { path: '/snapshot/statistic/detailPointList', name: 'snapshotStatisticsDetailPointList', component: () => import('@/views/snapshot/statistics/detailPointList.vue'), meta: { title: '随手拍积分列表明细', isKeepAlive: true, }, }, { path: '/snapshot/statistic/detailHandleOrder', name: 'snapshotStatisticsDetailHandleOrder', component: () => import('@/views/snapshot/statistics/detailHandleOrder.vue'), meta: { title: '随手拍办件统计明细', isKeepAlive: true, }, }, { path: '/snapshot/statistic/detailGridHandle', name: 'snapshotStatisticsDetailGridHandle', component: () => import('@/views/snapshot/statistics/detailGridHandle.vue'), meta: { title: '网格员办理情况明细', isKeepAlive: true, }, }, { path: '/snapshot/statistic/detailCommunity', name: 'snapshotStatisticsDetailCommunity', component: () => import('@/views/snapshot/statistics/detailCommunity.vue'), meta: { title: '社区统计明细', isKeepAlive: true, }, }, { path: '/snapshot/statistic/detailIndustry', name: 'snapshotStatisticsDetailIndustry', component: () => import('@/views/snapshot/statistics/detailIndustry.vue'), meta: { title: '行业统计明细', isKeepAlive: true, }, }, { path: '/snapshot/statistic/detailAverageHandleTime', name: 'snapshotStatisticsDetailAverageHandleTime', component: () => import('@/views/snapshot/statistics/detailAverageHandleTime.vue'), meta: { title: '部门平均办理时间明细', isKeepAlive: true, }, }, { path: '/snapshot/statistic/detailCheck', name: 'snapshotStatisticsDetailCheck', component: () => import('@/views/snapshot/statistics/detailCheck.vue'), meta: { title: '检查合规统计详情', isKeepAlive: true, }, }, { path: '/snapshot/statistic/detailRedo', name: 'snapshotStatisticsDetailRedo', component: () => import('@/views/snapshot/statistics/detailRedo.vue'), meta: { title: '重办件明细', isKeepAlive: true, }, }, { path: '/snapshot/statistics/detailReAudit', name: 'snapshotStatisticsDetailReAudit', component: () => import('@/views/snapshot/statistics/detailReAudit.vue'), meta: { title: '部门分类办件明细', isKeepAlive: true, }, }, { path: '/statistics/center/detailOverdueReturn', name: 'statisticsCenterDetailOverdueReturn', component: () => import('@/views/statistics/center/detailOverdueReturn.vue'), meta: { title: '超期退回统计明细', isKeepAlive: true, }, }, { path: '/statistics/center/detailSeatsBack', name: 'statisticsCenterDetailSeatsBack', component: () => import('@/views/statistics/center/detailSeatsBack.vue'), meta: { title: '坐席退回统计明细', isKeepAlive: true, }, }, { path: '/statistics/center/detailOrderNum', name: 'statisticsCenterDetailOrderNum', component: () => import('@/views/statistics/center/detailOrderNum.vue'), meta: { title: '工单业务量统计明细', isKeepAlive: true, }, }, { path: '/statistics/department/detailDpReturn', name: 'statisticsDepartmentDetailDpReturn', component: () => import('@/views/statistics/department/detailDpReturn.vue'), meta: { title: '部门退件明细', isKeepAlive: true, }, }, { path: '/statistics/order/detailVisitContent', name: 'statisticsOrderDetailVisitContent', component: () => import('@/views/statistics/order/detailVisitContent.vue'), meta: { title: '智能回访不满意明细', isKeepAlive: true, }, }, { path: '/statistics/order/detailVisitContentZG', name: 'statisticsOrderDetailVisitContentZG', component: () => import('@/views/statistics/order/detailVisitContentZG.vue'), meta: { title: '回访统计明细', isKeepAlive: true, }, }, { path: '/examTrain/questionBank/edit/:tagsViewName/:id?', name: 'questionEdit', component: () => import('@/views/examTrain/questionBank/edit.vue'), meta: { title: '试题新增/编辑', isKeepAlive: true, isDynamic: true, }, }, { path: '/examTrain/exam/testPaper/edit/:tagsViewName/:id?', name: 'testPaperEdit', component: () => import('@/views/examTrain/exam/testPaper/edit.vue'), meta: { title: '试卷管理新增/编辑', isKeepAlive: true, isDynamic: true, }, }, { path: '/examTrain/exam/examManage/edit/:tagsViewName/:id?', name: 'examManageEdit', component: () => import('@/views/examTrain/exam/examManage/edit.vue'), meta: { title: '考试管理新增/编辑', isKeepAlive: true, isDynamic: true, }, }, { path: '/examTrain/exam/marking/mark/:examId/:tagsViewName/:isView?', name: 'examTrainExamMarkingEdit', component: () => import('@/views/examTrain/exam/marking/components/Exam-Marking.vue'), meta: { title: '阅卷', isKeepAlive: true, isDynamic: true, }, }, ]; /** * 定义404、401界面 * @link 参考:https://next.router.vuejs.org/zh/guide/essentials/history-mode.html#netlify */ export const notFoundAndNoPower = [ { path: '/401', name: 'noPower', component: () => import('@/views/error/401.vue'), meta: { title: '无权限', isHide: true, }, }, { path: '/:pathMatch(.*)', name: 'notFound', component: () => import('@/views/error/404.vue'), meta: { title: '404', isHide: true, }, }, ]; /** * 定义静态路由(默认路由) * 此路由不要动,前端添加路由的话,请在 `dynamicRoutes 数组` 中添加 * @description 前端控制直接改 dynamicRoutes 中的路由,后端控制不需要修改,请求接口路由数据时,会覆盖 dynamicRoutes 第一个顶级 children 的内容(全屏,不包含 layout 中的路由出口) * @returns 返回路由菜单数据 */ export const staticRoutes: Array = [ { path: '/login', name: 'login', component: () => import('@/views/login/index.vue'), meta: { title: '登录', }, }, { path: '/resetPwd', name: 'resetPwd', component: () => import('@/views/resetPwd/index.vue'), meta: { title: '重置密码', }, }, { path: '/tableAudio', name: 'tableAudio', component: () => import('@/components/PlayRecord/tableAudio.vue'), meta: { title: '播放录音', }, }, ];