index.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import i18n from '@/utils/i18n'
  4. // eslint-disable-next-line no-unused-vars
  5. // import { uiVersion } from 'domain'
  6. Vue.use(Router)
  7. /* Layout */
  8. import Layout from '@/layout'
  9. const uiVersion = domain.uiVersion
  10. /* Router Modules */
  11. // import componentsRouter from './modules/components'
  12. // import chartsRouter from './modules/charts'
  13. // import tableRouter from './modules/table'
  14. // import nestedRouter from './modules/nested'
  15. /**
  16. * Note: sub-menu only appear when route children.length >= 1
  17. * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
  18. *
  19. * hidden: true if set true, item will not show in the sidebar(default is false)
  20. * alwaysShow: true if set true, will always show the root menu
  21. * if not set alwaysShow, when item has more than one children route,
  22. * it will becomes nested mode, otherwise not show the root menu
  23. * redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
  24. * name:'router-name' the name is used by <keep-alive> (must set!!!)
  25. * meta : {
  26. roles: ['admin','editor'] control the page roles (you can set multiple roles)
  27. title: 'title' the name show in sidebar and breadcrumb (recommend set)
  28. icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
  29. noCache: true if set true, the page will no be cached(default is false)
  30. affix: true if set true, the tag will affix in the tags-view
  31. breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
  32. activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
  33. }
  34. */
  35. /**
  36. * constantRoutes
  37. * a base page that does not have permission requirements
  38. * all roles can be accessed
  39. */
  40. export const constantRoutes = [
  41. {
  42. path: '/redirect',
  43. component: Layout,
  44. hidden: true,
  45. children: [
  46. {
  47. path: '/redirect/:path(.*)',
  48. component: () => import('@/views/redirect/index')
  49. }
  50. ]
  51. },
  52. {
  53. path: '/login',
  54. component: () => import('@/views/login/index'),
  55. hidden: true
  56. },
  57. {
  58. path: '/auth-redirect',
  59. component: () => import('@/views/login/auth-redirect'),
  60. hidden: true
  61. },
  62. {
  63. path: '/404',
  64. component: () => import('@/views/error-page/404'),
  65. hidden: true
  66. },
  67. {
  68. path: '/401',
  69. component: () => import('@/views/error-page/401'),
  70. hidden: true
  71. },
  72. {
  73. path: '/',
  74. component: Layout,
  75. redirect: '/dashboard',
  76. children: [
  77. {
  78. path: 'dashboard',
  79. component: () => import('@/views/dashboard/index'),
  80. name: 'Dashboard',
  81. meta: { title: i18n.t('tab.home'), icon: 'dashboard', affix: true }
  82. }
  83. ]
  84. },
  85. {
  86. path: '/vital_sign_log',
  87. component: () => import('@/views/vital-sign/index'),
  88. hidden: true
  89. }
  90. ]
  91. // 科室级页面
  92. export const partRoutes = [
  93. {
  94. path: '/frameTreeView',
  95. component: Layout,
  96. redirect: '/hospitalFrame/frameTreeView',
  97. children: [
  98. {
  99. path: 'frameTreeView',
  100. component: () => import('@/views/hospitalFrame/frameTreeView'),
  101. name: 'hospitalFrame',
  102. meta: { title: i18n.t('tab.frameManage'), icon: 'tree', noCache: true } // 空间位置
  103. }
  104. ]
  105. },
  106. {
  107. path: '/device',
  108. component: Layout,
  109. name: 'part-device',
  110. meta: {
  111. title: i18n.t('deviceManage.deviceManage'),
  112. icon: 'devices'
  113. },
  114. children: [
  115. {
  116. path: 'ncs-device',
  117. component: () => import('@/views/ncs-device/deviceManagement'),
  118. name: 'CallingDevice',
  119. meta: { title: i18n.t('tab.deviceManage'), icon: 'component', noCache: true } // 所有设备
  120. },
  121. {
  122. path: 'ncs-nurse-watch',
  123. component: () => import('@/views/ncs-device/nurse_watch'),
  124. name: 'nurse_watch',
  125. meta: { title: i18n.t('tab.mobileDeviceManage'), icon: 'el-icon-watch', noCache: true } // 移动设备
  126. },
  127. {
  128. path: 'ncs-user-watch',
  129. component: () => import('@/views/ncs-device/user_watch'),
  130. name: 'user_watch',
  131. meta: { title: i18n.t('tab.userLocationManage'), icon: 'el-icon-watch-1', noCache: true } // 用户设备
  132. },
  133. {
  134. path: 'ncs-sos-device',
  135. component: () => import('@/views/ncs-sos-device-setting/sos_device_setting'),
  136. name: 'sos-device-setting',
  137. meta: { title: i18n.t('tab.sosDeviceSettingManage'), icon: 'el-icon-s-help', noCache: true } // 报警设备
  138. },
  139. {
  140. path: 'myMapHtml',
  141. component: () => import('@/views/customer/myMapHtml'),
  142. name: 'myMapHtml',
  143. meta: { title: i18n.t('customerManage.footprint'), icon: 'area', noCache: true }, // 足迹
  144. hidden: true
  145. },
  146. {
  147. path: 'information-board',
  148. component: () => import('@/views/calling-board/index'),
  149. name: 'CallingBoard',
  150. meta: { title: i18n.t('tab.boardManage'), icon: 'infomation_board', noCache: true },
  151. hidden: uiVersion === 2
  152. },
  153. {
  154. path: 'custom-infoboard',
  155. component: () => import('@/views/custom-infoboard/board-title'),
  156. name: 'BoardTitle',
  157. meta: { title: i18n.t('tab.customBoardManage'), icon: 'designer', noCache: true },
  158. hidden: uiVersion === 2
  159. }
  160. ]
  161. },
  162. // {
  163. // path: '/ncs-device',
  164. // component: Layout,
  165. // redirect: '/ncs-device/index',
  166. // children: [
  167. // {
  168. // path: 'index',
  169. // // component: () => import('@/views/ncs-device/index'),
  170. // component: () => import('@/views/ncs-device/deviceManagement'),
  171. // name: 'CallingDevice',
  172. // meta: { title: i18n.t('tab.deviceManage'), icon: 'component', noCache: true } // 所有设备
  173. // }
  174. // ]
  175. // },
  176. {
  177. path: '/ncs-clerk',
  178. component: Layout,
  179. redirect: '/ncs-clerk/clerkList',
  180. children: [
  181. {
  182. path: 'clerkList',
  183. component: () => import('@/views/ncs-clerk/clerkManagement'),
  184. name: 'clerkList',
  185. meta: { title: i18n.t('tab.clerkManage'), icon: 'peoples', noCache: true }
  186. }
  187. ]
  188. },
  189. {
  190. path: '/entrace-guard',
  191. component: Layout,
  192. redirect: '/entrace-guard/users',
  193. children: [
  194. {
  195. path: 'users',
  196. component: () => import('@/views/entrace-guard/users'),
  197. name: 'users',
  198. meta: { title: i18n.t('tab.entraceguardUser'), icon: 'pass_through', noCache: true }
  199. }]
  200. },
  201. {
  202. path: '/ncs-clerk-frame-manage',
  203. component: Layout,
  204. redirect: '/ncs-clerk-frame-manage/index',
  205. children: [
  206. {
  207. path: 'clerkList',
  208. component: () => import('@/views/ncs-clerk-frame-manage/index'),
  209. name: 'clerkList',
  210. meta: { title: i18n.t('tab.staffManageFrames'), icon: 'frame_manage', noCache: true }
  211. }
  212. ]
  213. },
  214. // {
  215. // path: '/customer',
  216. // component: Layout,
  217. // redirect: '/customer/list',
  218. // children: [
  219. // {
  220. // path: 'customer',
  221. // component: () => import('@/views/customer/list'),
  222. // name: 'customerList',
  223. // meta: { title: '入住人管理', icon: 'el-icon-s-custom', noCache: true }
  224. // }
  225. // ]
  226. // },
  227. {
  228. path: '/customerlist',
  229. component: Layout,
  230. redirect: '/customerlist/index',
  231. children: [
  232. {
  233. path: 'index',
  234. component: () => uiVersion === 1 ? import('@/views/customer/patientManagement') : uiVersion === 2 ? import('@/views/customer/customerManagement') : import('@/views/customer/elderlyCareManagement'),
  235. name: uiVersion === 1 ? 'patientManagement' : uiVersion === 2 ? 'customerManager' : 'elderlyCareManager',
  236. meta: {
  237. title: uiVersion === 1 ? i18n.t('tab.patientManage') : i18n.t('tab.customerManage'),
  238. icon: 'el-icon-s-custom',
  239. noCache: true
  240. }
  241. },
  242. {
  243. path: '/allMap',
  244. component: () => import('@/views/customer/allMap'),
  245. name: 'allMap',
  246. meta: { title: '用户分布', icon: 'area', noCache: true },
  247. hidden: true
  248. },
  249. {
  250. path: '/advice/:id?',
  251. component: () => import('@/views/ncs-advice/index'),
  252. name: 'advice',
  253. meta: { title: i18n.t('tab.customerAdvice'), icon: 'area', noCache: true },
  254. hidden: true
  255. }
  256. ]
  257. },
  258. // {
  259. // path: '/ncs-nurse-watch',
  260. // component: Layout,
  261. // redirect: '/ncs-device/nurse_watch',
  262. // children: [
  263. // {
  264. // path: 'index',
  265. // component: () => import('@/views/ncs-device/nurse_watch'),
  266. // name: 'nurse_watch',
  267. // meta: { title: i18n.t('tab.mobileDeviceManage'), icon: 'el-icon-watch', noCache: true } // 移动设备
  268. // },
  269. // {
  270. // path: '/myMapHtml',
  271. // component: () => import('@/views/customer/myMapHtml'),
  272. // name: 'myMapHtml',
  273. // meta: { title: i18n.t('customerManage.footprint'), icon: 'area', noCache: true },
  274. // hidden: true
  275. // }
  276. // ]
  277. // },
  278. // {
  279. // path: '/ncs-user-watch',
  280. // component: Layout,
  281. // redirect: '/ncs-device/user_watch',
  282. // children: [
  283. // {
  284. // path: 'index',
  285. // component: () => import('@/views/ncs-device/user_watch'),
  286. // name: 'user_watch',
  287. // meta: { title: i18n.t('tab.userLocationManage'), icon: 'el-icon-watch', noCache: true }
  288. // }
  289. // ]
  290. // },
  291. // {
  292. // path: '/ncs-sos-device',
  293. // component: Layout,
  294. // redirect: '/ncs-device/sos_device',
  295. // children: [
  296. // {
  297. // path: 'index',
  298. // component: () => import('@/views/ncs-sos-device-setting/sos_device_setting'),
  299. // name: 'sos-device-setting',
  300. // meta: { title: i18n.t('tab.sosDeviceSettingManage'), icon: 'el-icon-s-help', noCache: true }
  301. // }
  302. // ]
  303. // },
  304. {
  305. path: '/ncs-channel',
  306. component: Layout,
  307. redirect: '/ncs-channel/index',
  308. children: [
  309. {
  310. path: 'index',
  311. component: () => import('@/views/ncs-channel/index'),
  312. name: 'ncsChannel',
  313. meta: { title: i18n.t('tab.channelManage'), icon: 'el-icon-mobile-phone', noCache: true }
  314. },
  315. {
  316. path: '/ncs-channel/history/:id?',
  317. component: () => import('@/views/ncs-channel/channelImHistory'),
  318. name: 'channelImHistory',
  319. meta: { title: i18n.t('tab.channelImHistory'), icon: 'area', noCache: true },
  320. hidden: true
  321. }
  322. ]
  323. },
  324. {
  325. path: '/remark',
  326. component: Layout,
  327. redirect: '/remark/index',
  328. children: [
  329. {
  330. path: 'remark',
  331. component: () => import('@/views/ncs-remark/index'),
  332. name: 'remarkList',
  333. meta: { title: i18n.t('tab.remarkManage'), icon: 'el-icon-s-order', noCache: true }
  334. }
  335. ]
  336. },
  337. {
  338. path: '/task',
  339. component: Layout,
  340. redirect: '/task/index',
  341. children: [
  342. {
  343. path: 'task',
  344. component: () => import('@/views/ncs-task/index'),
  345. name: 'taskList',
  346. meta: { title: i18n.t('tab.taskManage'), icon: 'table', noCache: true }
  347. }
  348. ]
  349. },
  350. {
  351. path: '/ncs-interaction',
  352. component: Layout,
  353. redirect: '/ncs-interaction/index',
  354. children: [
  355. {
  356. path: 'index',
  357. component: () => import('@/views/ncs-interaction/index'),
  358. name: 'CallingList',
  359. meta: { title: i18n.t('tab.interactionHistory'), icon: 'list', noCache: true }
  360. }
  361. ]
  362. },
  363. // {
  364. // path: '/calling-message',
  365. // component: Layout,
  366. // redirect: '/calling-message/index',
  367. // children: [
  368. // {
  369. // path: 'index',
  370. // component: () => import('@/views/calling-message/index'),
  371. // name: 'CallingMessage',
  372. // meta: { title: '留言设置', icon: 'email', noCache: true }
  373. // }
  374. // ]
  375. // },
  376. {
  377. path: '',
  378. component: Layout,
  379. redirect: '/frameGroup/index',
  380. name: 'frameGroup',
  381. children: [
  382. {
  383. path: '/frameGroup/index',
  384. component: () => import('@/views/hospitalFrame/frameGroup'),
  385. name: 'frameGroup',
  386. meta: { title: i18n.t('tab.frameGroupManage'), icon: 'area', noCache: true }
  387. },
  388. {
  389. path: '/frameGroup/edit/:id?',
  390. component: () => import('@/views/hospitalFrame/frameGroupEdit'),
  391. name: 'frameGroupEdit',
  392. meta: { title: i18n.t('tab.frameGroupEdit'), icon: 'area', noCache: true },
  393. hidden: true
  394. },
  395. {
  396. path: 'nurse_watch_frame/:id?',
  397. component: () => import('@/views/hospitalFrame/nurse_watch_frame'),
  398. name: 'nurseWatchFrame',
  399. meta: { title: i18n.t('tab.watchFrameManage'), icon: 'area', noCache: true },
  400. hidden: true
  401. }
  402. ]
  403. },
  404. {
  405. path: '',
  406. component: Layout,
  407. redirect: '/broadcast/index',
  408. children: [
  409. {
  410. path: '/broadcast/index',
  411. component: () => import('@/views/ncs-broadcast/index'),
  412. name: 'Broadcast',
  413. meta: { title: i18n.t('tab.broadcastManage'), icon: 'el-icon-headset', noCache: true } // 广播设置
  414. },
  415. {
  416. path: '/broadcast/edit/:id?',
  417. component: () => import('@/views/ncs-broadcast/broadcastEdit'),
  418. name: 'broadcastEdit',
  419. meta: { title: i18n.t('tab.broadcastEdit'), icon: 'area', noCache: true },
  420. hidden: true
  421. }
  422. ],
  423. hidden: uiVersion !== 1
  424. },
  425. {
  426. path: '/ncs-nurse-config',
  427. component: Layout,
  428. redirect: '/ncs-nurse-config/index',
  429. children: [
  430. {
  431. path: 'index',
  432. component: () => import('@/views/ncs-nurse-config/index'),
  433. name: 'NcsNurseConfig',
  434. meta: { title: i18n.t('tab.nurseConfig'), icon: 'care1', noCache: true } // 护理参数
  435. }
  436. ],
  437. hidden: uiVersion !== 1
  438. },
  439. // {
  440. // path: '/calling-board',
  441. // component: Layout,
  442. // redirect: '/calling-board/index',
  443. // children: [
  444. // {
  445. // path: 'index',
  446. // component: () => import('@/views/calling-board/index'),
  447. // name: 'CallingBoard',
  448. // meta: { title: i18n.t('tab.boardManage'), icon: 'el-icon-data-board', noCache: true }
  449. // }
  450. // ],
  451. //
  452. // },
  453. // {
  454. // path: '/board-title',
  455. // component: Layout,
  456. // redirect: '/custom-infoboard/board-title',
  457. // children: [
  458. // {
  459. // path: 'index',
  460. // component: () => import('@/views/custom-infoboard/board-title'),
  461. // name: 'BoardTitle',
  462. // meta: { title: i18n.t('tab.customBoardManage'), icon: 'designer', noCache: true }
  463. // }
  464. // ],
  465. // hidden: uiVersion === 2
  466. // },
  467. {
  468. path: '/calling-board-designer',
  469. component: Layout,
  470. redirect: '/custom-infoboard/screen-designer',
  471. children: [
  472. {
  473. path: 'index/:id?',
  474. component: () => import('@/views/custom-infoboard/screen-designer'),
  475. name: 'BoardDesigner',
  476. meta: { title: i18n.t('tab.customBoardDesigner'), icon: 'el-icon-data-board', noCache: true }
  477. }
  478. ],
  479. hidden: true
  480. },
  481. {
  482. path: '/ncs-event',
  483. component: Layout,
  484. redirect: '/ncs-event/index',
  485. children: [
  486. {
  487. path: 'index',
  488. component: () => import('@/views/ncs-event/index'),
  489. name: 'eventList',
  490. meta: { title: i18n.t('tab.eventManage'), icon: 'el-icon-notebook-2', noCache: true }
  491. }
  492. ],
  493. hidden: uiVersion === 1
  494. },
  495. // {
  496. // path: '/calling-deviceregisterparams',
  497. // component: Layout,
  498. // redirect: '/deviceregisterparams/index',
  499. // children: [
  500. // {
  501. // path: 'index',
  502. // component: () => import('@/views/calling-deviceRegisterParam/index'),
  503. // name: 'deviceRegisterParam',
  504. // meta: { title: '设备自动注册参数', icon: 'params', noCache: true }
  505. // }
  506. // ]
  507. // },
  508. {
  509. path: '/ncs-interaction-chars',
  510. component: Layout,
  511. redirect: '/ncs-interaction-chars/index',
  512. children: [
  513. {
  514. path: 'index',
  515. component: () => import('@/views/ncs-chars/index'),
  516. name: 'interactionChars',
  517. meta: { title: i18n.t('tab.interactionChars'), icon: 'el-icon-pie-chart', noCache: true }
  518. }
  519. ]
  520. },
  521. // {
  522. // path: '/function-mapping',
  523. // component: Layout,
  524. // redirect: '/function-mapping/index',
  525. // children: [
  526. //
  527. // ]
  528. // },
  529. {
  530. path: '/components',
  531. component: Layout,
  532. meta: {
  533. title: i18n.t('tab.bedsideInteration'),
  534. icon: 'component'
  535. },
  536. children: [
  537. {
  538. path: '/function-mapping/index',
  539. component: () => import('@/views/function-mapping/index'),
  540. name: 'functionMapping',
  541. meta: { title: i18n.t('tab.functionRoleMapping'), icon: 'function', noCache: true }
  542. },
  543. {
  544. path: '/interaction-chain/index',
  545. component: () => import('@/views/interaction-chain/index'),
  546. name: 'interactionChain',
  547. meta: { title: i18n.t('tab.interactionChain'), icon: 'squence', noCache: true }
  548. },
  549. {
  550. path: '/countdonw/index',
  551. component: () => import('@/views/ncs-countdown-config/index'),
  552. name: 'countdownConfig',
  553. meta: { title: i18n.t('tab.countdownConfig'), icon: 'countdown', noCache: true }
  554. },
  555. {
  556. path: '/screentip/index',
  557. component: () => import('@/views/ncs-screentip/index'),
  558. name: 'screenTip',
  559. meta: { title: i18n.t('tab.screentip'), icon: 'screen_tip', noCache: true }
  560. }
  561. ]
  562. },
  563. // {
  564. // path: '/screen-tip',
  565. // component: Layout,
  566. // redirect: '/ncs-screentip/index',
  567. // children: [
  568. // {
  569. // path: 'index',
  570. // component: () => import('@/views/ncs-screentip/index'),
  571. // name: 'screenTip',
  572. // meta: { title: i18n.t('tab.screentip'), icon: 'screen_tip', noCache: true }
  573. // }
  574. // ]
  575. // },
  576. // {
  577. // path: '/interaction-chain',
  578. // component: Layout,
  579. // redirect: '/interaction-chain/index',
  580. // children: [
  581. //
  582. // ]
  583. // },
  584. {
  585. path: '/calling-setting',
  586. component: Layout,
  587. redirect: '/calling-setting/index',
  588. children: [
  589. {
  590. path: 'index',
  591. component: () => import('@/views/calling-setting/index'),
  592. name: 'CallingSetting',
  593. meta: { title: i18n.t('tab.partSetting'), icon: 'el-icon-s-tools', noCache: true }
  594. }
  595. ]
  596. },
  597. {
  598. path: '/ncs_led',
  599. component: Layout,
  600. redirect: '/ncs_led/index',
  601. children: [
  602. {
  603. path: 'index',
  604. component: () => import('@/views/ncs-led/ledManager'),
  605. name: 'part_led',
  606. meta: { title: i18n.t('tab.ledDevice'), icon: 'el-icon-message-solid', noCache: true }
  607. }
  608. ],
  609. hidden: uiVersion !== 1
  610. },
  611. { path: '*', redirect: '/404', hidden: true }
  612. ]
  613. export const hospitalRoutes = [
  614. {
  615. path: '/hospital/ncs_frame',
  616. component: Layout,
  617. redirect: '/ncs_frame/index',
  618. children: [
  619. {
  620. path: 'index',
  621. component: () => import('@/views/hospital/ncs_frame/frameTreeView'),
  622. name: 'hospital_frameTreeView',
  623. meta: { title: i18n.t('tab.frameManage'), icon: 'tree', noCache: true }
  624. }
  625. ]
  626. },
  627. {
  628. path: '/hospital/ncs_device',
  629. component: Layout,
  630. redirect: '/ncs_device/index',
  631. children: [
  632. {
  633. path: 'index',
  634. // component: () => import('@/views/hospital/ncs_device/deviceManager'),
  635. component: () => import('@/views/hospital/deviceManagement'),
  636. name: 'hospital_deviceList',
  637. meta: { title: i18n.t('tab.deviceManage'), icon: 'component', noCache: true }
  638. }
  639. ]
  640. },
  641. {
  642. path: '/hospital/ncs_clerk',
  643. component: Layout,
  644. redirect: '/ncs_clerk/index',
  645. children: [
  646. {
  647. path: 'index',
  648. component: () => import('@/views/hospital/clerkManager'),
  649. name: 'hospital_clerkList',
  650. meta: { title: i18n.t('tab.clerkManage'), icon: 'peoples', noCache: true }
  651. }
  652. ]
  653. },
  654. {
  655. path: '/hospital/ncs_customer',
  656. component: Layout,
  657. redirect: '/ncs_customer/index',
  658. children: [
  659. {
  660. path: 'index',
  661. component: () => import('@/views/hospital/customerManagement'),
  662. name: 'hospital_customerList',
  663. meta: { title: i18n.t('tab.customerManage'), icon: 'el-icon-s-custom', noCache: true }
  664. // component: () => uiVersion === 1 ? import('@/views/customer/patientManagement') : import('@/views/customer/customerManagement'),
  665. // name: uiVersion === 1 ? 'hospital_patientList' : 'hospital_customerList',
  666. // meta: { title: uiVersion === 1 ? '入住人管理' : '用户管理', icon: 'el-icon-s-custom', noCache: true }
  667. }
  668. ]
  669. },
  670. {
  671. path: '/hospital/ncs_led',
  672. component: Layout,
  673. redirect: '/ncs_led/index',
  674. children: [
  675. {
  676. path: 'index',
  677. component: () => import('@/views/hospital/ledManager'),
  678. name: 'hospital_led',
  679. meta: { title: i18n.t('tab.ledDevice'), icon: 'el-icon-message-solid', noCache: true }
  680. }
  681. ]
  682. },
  683. { path: '*', redirect: '/404', hidden: true }
  684. ]
  685. export const adminRoutes = [
  686. {
  687. path: '/admin/ncs_frame',
  688. component: Layout,
  689. redirect: '/ncs_frame/frame-admin',
  690. children: [
  691. {
  692. path: 'index',
  693. component: () => import('@/views/hospitalFrame/frameTreeView-admin'),
  694. name: 'CallingFrameTreeViewAdmin',
  695. meta: { title: i18n.t('tab.frameManage'), icon: 'tree', noCache: true }
  696. }
  697. ]
  698. },
  699. {
  700. path: '/admin/ncs_clerk',
  701. component: Layout,
  702. redirect: '/ncs_clerk/clerk-admin',
  703. children: [
  704. {
  705. path: 'index',
  706. component: () => import('@/views/ncs-clerk/clerk-admin'),
  707. name: 'CallingClerkAdmin',
  708. meta: { title: i18n.t('tab.allClerk'), icon: 'peoples', noCache: true }
  709. }
  710. ]
  711. },
  712. {
  713. path: '/admin/ncs_customer',
  714. component: Layout,
  715. redirect: '/ncs_customer/customer-admin',
  716. children: [
  717. {
  718. path: 'index',
  719. component: () => import('@/views/customer/customer-admin'),
  720. name: 'CallingCustomerAdmin',
  721. meta: { title: i18n.t('tab.allCustomer'), icon: 'el-icon-s-custom', noCache: true }
  722. // component: () => uiVersion === 1 ? import('@/views/customer/patientManagement') : import('@/views/customer/customerManagement'),
  723. // name: uiVersion === 1 ? 'hospital_patientList' : 'hospital_customerList',
  724. // meta: { title: uiVersion === 1 ? '入住人管理' : '用户管理', icon: 'el-icon-s-custom', noCache: true }
  725. }
  726. ]
  727. },
  728. {
  729. path: '/admin/ncs-device',
  730. component: Layout,
  731. redirect: '/ncs-device/device-admin',
  732. children: [
  733. {
  734. path: 'index',
  735. component: () => import('@/views/ncs-device/device-admin'),
  736. name: 'CallingDeviceAdmin',
  737. meta: { title: i18n.t('tab.allDevice'), icon: 'component', noCache: true }
  738. }
  739. ]
  740. },
  741. {
  742. path: '/admin/ncs_event',
  743. component: Layout,
  744. redirect: '/ncs-event/event',
  745. children: [
  746. {
  747. path: 'index',
  748. component: () => import('@/views/ncs-event/eventManagement'),
  749. name: 'EventManagement',
  750. meta: { title: i18n.t('tab.eventManage'), icon: 'el-icon-notebook-2', noCache: true }
  751. }
  752. ]
  753. },
  754. {
  755. path: '/admin/ncs-his',
  756. component: Layout,
  757. redirect: '/ncs-his/hisManager',
  758. children: [
  759. {
  760. path: 'index',
  761. component: () => import('@/views/ncs-his/hisManagement'),
  762. name: 'hisManagement',
  763. meta: { title: i18n.t('tab.hisManage'), icon: 'el-icon-search', noCache: true }
  764. },
  765. {
  766. path: 'patientManage/:keyval?',
  767. component: () => import('@/views/ncs-his/his-patient/hisPatientManage'),
  768. name: 'hisPatientManage',
  769. meta: { title: i18n.t('his.hisPatient'), icon: 'el-icon-search', noCache: true },
  770. hidden: true
  771. },
  772. {
  773. path: 'clerkManage/:keyval?',
  774. component: () => import('@/views/ncs-his/his-clerk/hisClerkManager'),
  775. name: 'hisClerkManage',
  776. meta: { title: i18n.t('his.hisClerk'), icon: 'el-icon-search', noCache: true },
  777. hidden: true
  778. },
  779. {
  780. path: 'nurseConfigManage/:keyval?',
  781. component: () => import('@/views/ncs-his/his-nurse-config/hisNurseConfigManager'),
  782. name: 'hisNurseConfigManage',
  783. meta: { title: i18n.t('his.hisNurseConfig'), icon: 'el-icon-search', noCache: true },
  784. hidden: true
  785. }
  786. ]
  787. },
  788. {
  789. path: '/calling-ncError',
  790. component: Layout,
  791. redirect: '/calling-ncError/index',
  792. children: [
  793. {
  794. path: 'index',
  795. component: () => import('@/views/calling-ncError/index'),
  796. name: 'CallingNcError',
  797. meta: { title: i18n.t('tab.errorLog'), icon: 'bug', noCache: true }
  798. }
  799. ]
  800. },
  801. {
  802. path: '/ncs-system-config',
  803. component: Layout,
  804. redirect: 'index',
  805. children: [
  806. {
  807. path: 'index',
  808. component: () => import('@/views/ncs-system-config/index'),
  809. name: 'NcsSystemConfig',
  810. meta: { title: i18n.t('tab.systemConfig'), icon: 'nested', noCache: true }
  811. }
  812. ]
  813. },
  814. {
  815. path: '/calling-partInfoSetting',
  816. component: Layout,
  817. children: [
  818. {
  819. path: 'index/:id?',
  820. component: () => import('@/views/ncs-orginazition/partInfoSetting'),
  821. name: 'partInfoSetting',
  822. meta: { title: i18n.t('tab.shopSetting'), icon: 'nested', noCache: true },
  823. hidden: true
  824. }
  825. ]
  826. },
  827. {
  828. path: '/calling-menu',
  829. component: Layout,
  830. children: [
  831. {
  832. path: 'index',
  833. component: () => import('@/views/ncs-menu/menuManager'),
  834. name: 'menuSetting',
  835. meta: { title: i18n.t('tab.menuManage'), icon: 'function', noCache: true }
  836. }
  837. ]
  838. },
  839. {
  840. path: '/ncs-orginazition',
  841. component: Layout,
  842. children: [
  843. {
  844. path: 'index',
  845. component: () => import('@/views/ncs-orginazition/index'),
  846. name: 'organization',
  847. meta: { title: i18n.t('tab.organization'), icon: 'tree', noCache: true }
  848. }
  849. ]
  850. },
  851. {
  852. path: '/ncs-rolemanager',
  853. component: Layout,
  854. children: [
  855. {
  856. path: 'index',
  857. component: () => import('@/views/ncs-auth/superadmin/defaultRoleManager'),
  858. name: 'rolemanager',
  859. meta: { title: i18n.t('tab.roleManage'), icon: 'authen', noCache: true }
  860. }
  861. ]
  862. },
  863. {
  864. path: '/ncs-485',
  865. component: Layout,
  866. children: [
  867. {
  868. path: 'index',
  869. component: () => import('@/views/ncs-485/index'),
  870. name: '485Commissioning',
  871. meta: { title: i18n.t('tab.debugging485'), icon: 'authen', noCache: true }
  872. }
  873. ]
  874. },
  875. {
  876. path: '/ncs-linux-version',
  877. component: Layout,
  878. children: [
  879. {
  880. path: 'index',
  881. component: () => import('@/views/ncs-linux-version/linuxVersionSetting'),
  882. name: 'linuxVersion',
  883. meta: { title: i18n.t('tab.linuxVersion'), icon: 'nested', noCache: true }
  884. }
  885. ]
  886. },
  887. {
  888. path: '/device-frame',
  889. component: Layout,
  890. children: [
  891. {
  892. path: 'device-frame',
  893. component: () => import('@/views/ncs-orginazition/device-frame'),
  894. name: 'device-frame',
  895. meta: { title: i18n.t('tab.deviceFrame'), icon: 'nested', noCache: true },
  896. hidden: true
  897. }
  898. ]
  899. },
  900. { path: '*', redirect: '/404', hidden: true }
  901. ]
  902. const createRouter = () => new Router({
  903. mode: 'history', // require service support
  904. scrollBehavior: () => ({ y: 0 }),
  905. routes: constantRoutes
  906. })
  907. const router = createRouter()
  908. // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
  909. export function resetRouter() {
  910. const newRouter = createRouter()
  911. router.matcher = newRouter.matcher // reset router
  912. }
  913. export default router