route.ts 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. import { RouteRecordRaw } from 'vue-router';
  2. /**
  3. * * 建议:路由 path 路径与文件夹名称相同,找文件可浏览器地址找,方便定位文件位置
  4. *
  5. * 路由meta对象参数说明
  6. * meta: {
  7. * title: 菜单栏及 tagsView 栏、菜单搜索名称(国际化)
  8. * isLink: 是否超链接菜单,开启外链条件,`1、isLink: 链接地址不为空`
  9. * isHide: 是否隐藏此路由
  10. * isKeepAlive: 是否缓存组件状态
  11. * isAffix: 是否固定在 tagsView 栏上
  12. * isIframe: 是否内嵌窗口,开启条件,`1、isIframe:true 2、isLink:链接地址不为空`
  13. * roles: 当前路由权限标识,取角色管理。控制路由显示、隐藏。超级管理员:admin 普通角色:common
  14. * icon: 菜单、tagsView 图标,阿里:加 `iconfont xxx`,fontawesome:加 `fa xxx`
  15. * }
  16. */
  17. // 扩展 RouteMeta 接口
  18. declare module 'vue-router' {
  19. interface RouteMeta {
  20. title?: string;
  21. isLink?: string;
  22. isHide?: boolean;
  23. isKeepAlive?: boolean;
  24. isAffix?: boolean;
  25. isIframe?: boolean;
  26. roles?: string[];
  27. icon?: string;
  28. }
  29. }
  30. /**
  31. * 定义动态路由
  32. * 前端添加路由,请在顶级节点的 `children 数组` 里添加
  33. * @description 未开启 isRequestRoutes 为 true 时使用(前端控制路由),开启时第一个顶级 children 的路由将被替换成接口请求回来的路由数据
  34. * @description 各字段请查看 `@/views/system/menu/components/Menu-add.vue 下的 ruleForm`
  35. * @returns 返回路由菜单数据
  36. */
  37. export const dynamicRoutes: Array<RouteRecordRaw> = [
  38. {
  39. path: '/',
  40. name: '/',
  41. component: () => import('@/layout/index.vue'),
  42. redirect: '/home',
  43. meta: {
  44. isKeepAlive: true,
  45. },
  46. children: [
  47. {
  48. path: '/home',
  49. name: 'home',
  50. component: () => import('@/views/home/index.vue'),
  51. meta: {
  52. title: '首页',
  53. isLink: '',
  54. isHide: false,
  55. isKeepAlive: true,
  56. isAffix: true,
  57. isIframe: false,
  58. icon: 'iconfont icon-shouye',
  59. },
  60. },
  61. ],
  62. },
  63. {
  64. path: '/todo/seats/accept',
  65. name: 'orderAccept',
  66. component: () => import('@/views/todo/seats/accept/index.vue'),
  67. meta: {
  68. title: '工单受理',
  69. isKeepAlive: true,
  70. },
  71. },
  72. {
  73. path: '/knowledge/index/edit/:tagsViewName/:id?',
  74. name: 'knowledgeEdit',
  75. component: () => import('@/views/knowledge/index/edit.vue'),
  76. meta: {
  77. title: '知识库新增/编辑',
  78. isKeepAlive: true,
  79. isDynamic: true,
  80. },
  81. },
  82. {
  83. path: '/knowledge/index/preview/:tagsViewName/:id/:isAddPv?',
  84. name: 'knowledgePreview',
  85. component: () => import('@/views/knowledge/index/preview.vue'),
  86. meta: {
  87. title: '知识查看',
  88. isKeepAlive: true,
  89. isDynamic: true,
  90. },
  91. },
  92. {
  93. path: '/system/roles/dataAuth',
  94. name: 'systemDataAuth',
  95. component: () => import('@/views/system/dataAuth/index.vue'),
  96. meta: {
  97. title: '数据权限',
  98. isKeepAlive: true,
  99. },
  100. },
  101. {
  102. path: '/system/config/workflow/edit/:tagsViewName/:id?',
  103. name: 'workflowAddEdit',
  104. component: () => import('@/views/system/config/workflow/components/workflowEdit.vue'),
  105. meta: {
  106. title: '流程编辑',
  107. isKeepAlive: true,
  108. isDynamic: true,
  109. },
  110. },
  111. {
  112. path: '/auxiliary/notice/detail/:tagsViewName/:id',
  113. name: 'auxiliaryNoticeDetail',
  114. component: () => import('@/views/auxiliary/notice/detail.vue'),
  115. meta: {
  116. title: '通知详情',
  117. isKeepAlive: false,
  118. isDynamic: true,
  119. },
  120. },
  121. {
  122. path: '/public/notice/:tagsViewName/:id/:isRead',
  123. name: 'auxiliaryNoticeRead',
  124. component: () => import('@/views/public/notice/index.vue'),
  125. meta: {
  126. title: '通知阅读',
  127. isKeepAlive: false,
  128. isDynamic: true,
  129. },
  130. },
  131. {
  132. path: '/statistics/order/detailVisitDiscontent',
  133. name: 'statisticsOrderDetailVisitDiscontent',
  134. component: () => import('@/views/statistics/order/detailVisitDiscontent.vue'),
  135. meta: {
  136. title: '回访不满意原因统计明细',
  137. isKeepAlive: true,
  138. },
  139. },
  140. {
  141. path: '/statistics/order/specialTable',
  142. name: 'statisticsOrderSpecialTable',
  143. component: () => import('@/views/statistics/order/specialTable.vue'),
  144. meta: {
  145. title: '特提统计明细',
  146. isKeepAlive: true,
  147. },
  148. },
  149. {
  150. path: '/statistics/department/DepartmentSatisfiedDetail',
  151. name: 'statisticsDepartmentSatisfiedDetail',
  152. component: () => import('@/views/statistics/department/detailSatisfied.vue'),
  153. meta: {
  154. title: '部门满意度统计明细',
  155. isKeepAlive: true,
  156. },
  157. },
  158. {
  159. path: '/statistics/detailSatisfiedOrg/org',
  160. name: 'statisticsDepartmentSatisfiedOrg',
  161. component: () => import('@/views/statistics/department/detailSatisfiedOrg.vue'),
  162. meta: {
  163. title: '部门满意度统计明细',
  164. isKeepAlive: true,
  165. },
  166. },
  167. {
  168. path: '/statistics/center/detailEventFrequently',
  169. name: 'eventFrequentlyDetail',
  170. component: () => import('@/views/statistics/center/detailEventFrequently.vue'),
  171. meta: {
  172. title: '高频统计明细',
  173. isKeepAlive: true,
  174. },
  175. },
  176. {
  177. path: '/judicial/statistics/detailEventClass',
  178. name: 'judicialDetailEventClass',
  179. component: () => import('@/views/judicial/statistics/detailEventClass.vue'),
  180. meta: {
  181. title: '事项分类统计明细',
  182. isKeepAlive: true,
  183. },
  184. },
  185. {
  186. path: '/judicial/statistics/detailDepartment', //工单
  187. name: 'judicialDetailDepartment',
  188. component: () => import('@/views/judicial/statistics/detailDepartment.vue'),
  189. meta: {
  190. title: '执法部门办件统计明细',
  191. isKeepAlive: true,
  192. },
  193. },
  194. {
  195. path: '/judicial/statistics/detailArea',
  196. name: 'judicialDetailArea',
  197. component: () => import('@/views/judicial/statistics/detailArea.vue'),
  198. meta: {
  199. title: '区域分类统计明细',
  200. isKeepAlive: true,
  201. },
  202. },
  203. {
  204. path: '/judicial/statistics/detailSatisfied',
  205. name: 'judicialStatisticsDetailSatisfied',
  206. component: () => import('@/views/judicial/statistics/detailSatisfied.vue'),
  207. meta: {
  208. title: '部门满意度统计明细',
  209. isKeepAlive: true,
  210. },
  211. },
  212. {
  213. path: '/statistics/center/detailWrongItem',
  214. name: 'statisticsCenterDetailWrongItem',
  215. component: () => import('@/views/statistics/center/detailWrongItem.vue'),
  216. meta: {
  217. title: '回退错件统计明细',
  218. isKeepAlive: true,
  219. },
  220. },
  221. {
  222. path: '/statistics/order/departmentDetailAcceptType',
  223. name: 'statisticsDepartmentDetailAcceptType',
  224. component: () => import('@/views/statistics/order/departmentDetailAcceptType.vue'),
  225. meta: {
  226. title: '部门受理类型统计周期明细',
  227. isKeepAlive: true,
  228. },
  229. },
  230. {
  231. path: '/statistics/order/detailDispatch',
  232. name: 'statisticsOrderDetailDispatch',
  233. component: () => import('@/views/statistics/order/detailDispatch.vue'),
  234. meta: {
  235. title: '派单量统计明细',
  236. isKeepAlive: true,
  237. },
  238. },
  239. {
  240. path: '/statistics/department/detailHandleOrg',
  241. name: 'statisticsDepartmentDetailHandleOrg',
  242. component: () => import('@/views/statistics/department/detailHandleOrg.vue'),
  243. meta: {
  244. title: '部门办件统计表明细',
  245. isKeepAlive: true,
  246. },
  247. },
  248. {
  249. path: '/statistics/department/detailHandle',
  250. name: 'statisticsDepartmentDetailHandle',
  251. component: () => import('@/views/statistics/department/detailHandle.vue'),
  252. meta: {
  253. title: '部门办件统计表明细',
  254. isKeepAlive: true,
  255. },
  256. },
  257. {
  258. path: '/statistics/call/detailTalkTime',
  259. name: 'statisticsCallDetailTalkTime',
  260. component: () => import('@/views/statistics/call/detailTalkTime.vue'),
  261. meta: {
  262. title: '通话时段明细表',
  263. isKeepAlive: true,
  264. },
  265. },
  266. {
  267. path: '/statistics/department/detailOverdue',
  268. name: 'statisticsDepartmentDetailOverdue',
  269. component: () => import('@/views/statistics/department/detailOverdue.vue'),
  270. meta: {
  271. title: '部门超期统计明细',
  272. isKeepAlive: true,
  273. },
  274. },
  275. {
  276. path: '/statistics/department/detailDelay',
  277. name: 'statisticsDepartmentDetailDelay',
  278. component: () => import('@/views/statistics/department/detailDelay.vue'),
  279. meta: {
  280. title: '部门延期统计明细',
  281. isKeepAlive: true,
  282. },
  283. },
  284. {
  285. path: '/statistics/department/detailSh',
  286. name: 'statisticsDepartmentDetailSh',
  287. component: () => import('@/views/statistics/department/detailSh.vue'),
  288. meta: {
  289. title: '二次办理统计明细',
  290. isKeepAlive: true,
  291. },
  292. },
  293. {
  294. path: '/statistics/department/detailShSatisfied',
  295. name: 'statisticsDepartmentDetailShSatisfied',
  296. component: () => import('@/views/statistics/department/detailShSatisfied.vue'),
  297. meta: {
  298. title: '二次办理满意度统计明细',
  299. isKeepAlive: true,
  300. },
  301. },
  302. {
  303. path: '/dataShare/taskDetail/:id',
  304. name: 'dataShareTaskDetail',
  305. component: () => import('@/views/dataShare/taskDetail.vue'),
  306. meta: {
  307. title: '推送任务明细',
  308. isKeepAlive: true,
  309. isDynamic: true,
  310. },
  311. },
  312. {
  313. path: '/statistics/order/detailSource',
  314. name: 'statisticsOrderDetailSource',
  315. component: () => import('@/views/statistics/order/detailSource.vue'),
  316. meta: {
  317. title: '信件来源列表',
  318. isKeepAlive: true,
  319. },
  320. },
  321. {
  322. path: '/statistics/order/detailSourceOrder',
  323. name: 'statisticsDetailSourceOrder',
  324. component: () => import('@/views/statistics/order/detailSourceOrder.vue'),
  325. meta: {
  326. title: '信件来源列表明细',
  327. isKeepAlive: true,
  328. },
  329. },
  330. {
  331. path: '/statistics/order/detailSourceTime',
  332. name: 'statisticsOrderDetailSourceTime',
  333. component: () => import('@/views/statistics/order/detailSourceTime.vue'),
  334. meta: {
  335. title: '信件来源分时列表',
  336. isKeepAlive: true,
  337. },
  338. },
  339. {
  340. path: '/statistics/call/detailIndex',
  341. name: 'statisticsCallDetailIndex',
  342. component: () => import('@/views/statistics/call/detailIndex.vue'),
  343. meta: {
  344. title: '话务日期明细',
  345. isKeepAlive: true,
  346. },
  347. },
  348. {
  349. path: '/statistics/order/detailAcceptTime',
  350. name: 'statisticsOrderDetailAcceptTime',
  351. component: () => import('@/views/statistics/order/detailAcceptTime.vue'),
  352. meta: {
  353. title: '受理类型分时统计列表',
  354. isKeepAlive: true,
  355. },
  356. },
  357. {
  358. path: '/statistics/order/detailHotSpotTime',
  359. name: 'statisticsOrderDetailHotspotTime',
  360. component: () => import('@/views/statistics/order/detailHotSpotTime.vue'),
  361. meta: {
  362. title: '热点类型分时统计列表',
  363. isKeepAlive: true,
  364. },
  365. },
  366. {
  367. path: '/statistics/order/detailAreaTime',
  368. name: 'statisticsOrderDetailAreaTime',
  369. component: () => import('@/views/statistics/order/detailAreaTime.vue'),
  370. meta: {
  371. title: '区域分时统计列表',
  372. isKeepAlive: true,
  373. },
  374. },
  375. {
  376. path: '/statistics/department/detailSatisfiedList',
  377. name: 'statisticsDepartmentSatisfiedDetailList',
  378. component: () => import('@/views/statistics/department/detailSatisfiedList.vue'),
  379. meta: {
  380. title: '部门满意度列表明细',
  381. isKeepAlive: true,
  382. },
  383. },
  384. {
  385. path: '/statistics/department/detailHandleList',
  386. name: 'statisticsDepartmentDetailHandleList',
  387. component: () => import('@/views/statistics/department/detailHandleList.vue'),
  388. meta: {
  389. title: '部门办件列表明细',
  390. isKeepAlive: true,
  391. },
  392. },
  393. {
  394. path: '/statistics/department/detailOverdueList',
  395. name: 'statisticsDepartmentDetailOverdueList',
  396. component: () => import('@/views/statistics/department/detailOverdueList.vue'),
  397. meta: {
  398. title: '部门超期列表明细',
  399. isKeepAlive: true,
  400. },
  401. },
  402. {
  403. path: '/statistics/order/detailHotspotArea',
  404. name: 'statisticsOrderDetailHotspotArea',
  405. component: () => import('@/views/statistics/order/detailHotspotArea.vue'),
  406. meta: {
  407. title: '热点统计明细',
  408. isKeepAlive: true,
  409. },
  410. },
  411. {
  412. path: '/judicial/order/add',
  413. name: 'judgeOrderAdd',
  414. component: () => import('@/views/judicial/order/components/orderAdd.vue'),
  415. meta: {
  416. title: '新建工单',
  417. isKeepAlive: true,
  418. },
  419. },{
  420. path: '/statistics/order/detailAcceptTypeList',
  421. name: 'statisticsOrderDetailAcceptTypeList',
  422. component: () => import('@/views/statistics/order/detailAcceptTypeList.vue'),
  423. meta: {
  424. title: '受理类型统计列表',
  425. isKeepAlive: true,
  426. },
  427. },{
  428. path: '/statistics/order/detailAcceptType',
  429. name: 'statisticsDetailAcceptType',
  430. component: () => import('@/views/statistics/order/detailAcceptType.vue'),
  431. meta: {
  432. title: '受理类型统计明细',
  433. isKeepAlive: true,
  434. },
  435. },{
  436. path: '/statistics/order/detailHotspotSatisfied',
  437. name: 'statisticsOrderDetailHotspotSatisfied',
  438. component: () => import('@/views/statistics/order/detailHotspotSatisfied.vue'),
  439. meta: {
  440. title: '热点满意度统计明细',
  441. isKeepAlive: true,
  442. },
  443. },{
  444. path: '/statistics/call/detailIndexTime',
  445. name: 'statisticsCallDetailIndexTime',
  446. component: () => import('@/views/statistics/call/detailIndexTime.vue'),
  447. meta: {
  448. title: '话务时段分析日期',
  449. isKeepAlive: true,
  450. },
  451. },{
  452. path: '/statistics/call/detailIndexCall',
  453. name: 'statisticsCallDetailIndexCall',
  454. component: () => import('@/views/statistics/call/detailIndexCall.vue'),
  455. meta: {
  456. title: '话务时段分析明细',
  457. isKeepAlive: true,
  458. },
  459. },{
  460. path: '/statistics/center/detailReport/:id/:tagsViewName?',
  461. name: 'statisticsCenterDetailReport',
  462. component: () => import('@/views/statistics/center/detail-report.vue'),
  463. meta: {
  464. title: '查看分析报告',
  465. isKeepAlive: true,
  466. isDynamic: true,
  467. },
  468. },{
  469. path: '/statistics/center/detailCorporateSpecial',
  470. name: 'statisticsCenterDetailCorporateSpecial',
  471. component: () => import('@/views/statistics/center/detailCorporateSpecial.vue'),
  472. meta: {
  473. title: '企业专席明细',
  474. isKeepAlive: true,
  475. },
  476. },{
  477. path: '/statistics/center/detailAcceptCenter',
  478. name: 'statisticsCenterDetailAcceptCenter',
  479. component: () => import('@/views/statistics/center/detailAcceptCenter.vue'),
  480. meta: {
  481. title: '企业专席明细',
  482. isKeepAlive: true,
  483. },
  484. },{
  485. path: '/statistics/center/detailTwist',
  486. name: 'statisticsCenterDetailTwist',
  487. component: () => import('@/views/statistics/center/detailTwist.vue'),
  488. meta: {
  489. title: '扭转明细列表',
  490. isKeepAlive: true,
  491. },
  492. },{
  493. path: '/todo/edit/record',
  494. name: 'todoEditRecord',
  495. component: () => import('@/views/todo/edit/record.vue'),
  496. meta: {
  497. title: '修改记录',
  498. isKeepAlive: true,
  499. },
  500. },{
  501. path: '/statistics/call/detailSeatDate',
  502. name: 'statisticsCallDetailSeatsDate',
  503. component: () => import('@/views/statistics/call/detailSeatDate.vue'),
  504. meta: {
  505. title: '话务时段明细',
  506. isKeepAlive: true,
  507. },
  508. },
  509. ];
  510. /**
  511. * 定义404、401界面
  512. * @link 参考:https://next.router.vuejs.org/zh/guide/essentials/history-mode.html#netlify
  513. */
  514. export const notFoundAndNoPower = [
  515. {
  516. path: '/401',
  517. name: 'noPower',
  518. component: () => import('@/views/error/401.vue'),
  519. meta: {
  520. title: '无权限',
  521. isHide: true,
  522. },
  523. },
  524. {
  525. path: '/:pathMatch(.*)',
  526. name: 'notFound',
  527. component: () => import('@/views/error/404.vue'),
  528. meta: {
  529. title: '404',
  530. isHide: true,
  531. },
  532. },
  533. ];
  534. /**
  535. * 定义静态路由(默认路由)
  536. * 此路由不要动,前端添加路由的话,请在 `dynamicRoutes 数组` 中添加
  537. * @description 前端控制直接改 dynamicRoutes 中的路由,后端控制不需要修改,请求接口路由数据时,会覆盖 dynamicRoutes 第一个顶级 children 的内容(全屏,不包含 layout 中的路由出口)
  538. * @returns 返回路由菜单数据
  539. */
  540. export const staticRoutes: Array<RouteRecordRaw> = [
  541. {
  542. path: '/login',
  543. name: 'login',
  544. component: () => import('@/views/login/index.vue'),
  545. meta: {
  546. title: '登录',
  547. },
  548. },
  549. {
  550. path: '/resetPwd',
  551. name: 'resetPwd',
  552. component: () => import('@/views/resetPwd/index.vue'),
  553. meta: {
  554. title: '重置密码',
  555. },
  556. },
  557. ];