index.js 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892
  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: '/',
  108. component: Layout,
  109. name: 'part-device',
  110. meta: {
  111. title: i18n.t('tab.deviceManage'),
  112. icon: 'component'
  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. },
  148. // {
  149. // path: '/ncs-device',
  150. // component: Layout,
  151. // redirect: '/ncs-device/index',
  152. // children: [
  153. // {
  154. // path: 'index',
  155. // // component: () => import('@/views/ncs-device/index'),
  156. // component: () => import('@/views/ncs-device/deviceManagement'),
  157. // name: 'CallingDevice',
  158. // meta: { title: i18n.t('tab.deviceManage'), icon: 'component', noCache: true } // 所有设备
  159. // }
  160. // ]
  161. // },
  162. {
  163. path: '/ncs-clerk',
  164. component: Layout,
  165. redirect: '/ncs-clerk/clerkList',
  166. children: [
  167. {
  168. path: 'clerkList',
  169. component: () => import('@/views/ncs-clerk/clerkManagement'),
  170. name: 'clerkList',
  171. meta: { title: i18n.t('tab.clerkManage'), icon: 'peoples', noCache: true }
  172. }
  173. ]
  174. },
  175. {
  176. path: '/entrace-guard',
  177. component: Layout,
  178. redirect: '/entrace-guard/users',
  179. children: [
  180. {
  181. path: 'users',
  182. component: () => import('@/views/entrace-guard/users'),
  183. name: 'users',
  184. meta: { title: i18n.t('tab.entraceguardUser'), icon: 'pass_through', noCache: true }
  185. }]
  186. },
  187. {
  188. path: '/ncs-clerk-frame-manage',
  189. component: Layout,
  190. redirect: '/ncs-clerk-frame-manage/index',
  191. children: [
  192. {
  193. path: 'clerkList',
  194. component: () => import('@/views/ncs-clerk-frame-manage/index'),
  195. name: 'clerkList',
  196. meta: { title: i18n.t('tab.staffManageFrames'), icon: 'frame_manage', noCache: true }
  197. }
  198. ]
  199. },
  200. // {
  201. // path: '/customer',
  202. // component: Layout,
  203. // redirect: '/customer/list',
  204. // children: [
  205. // {
  206. // path: 'customer',
  207. // component: () => import('@/views/customer/list'),
  208. // name: 'customerList',
  209. // meta: { title: '入住人管理', icon: 'el-icon-s-custom', noCache: true }
  210. // }
  211. // ]
  212. // },
  213. {
  214. path: '/customerlist',
  215. component: Layout,
  216. redirect: '/customerlist/index',
  217. children: [
  218. {
  219. path: 'index',
  220. component: () => uiVersion === 1 ? import('@/views/customer/patientManagement') : uiVersion === 2 ? import('@/views/customer/customerManagement') : import('@/views/customer/elderlyCareManagement'),
  221. name: uiVersion === 1 ? 'patientManagement' : uiVersion === 2 ? 'customerManager' : 'elderlyCareManager',
  222. meta: {
  223. title: uiVersion === 1 ? i18n.t('tab.patientManage') : i18n.t('tab.customerManage'),
  224. icon: 'el-icon-s-custom',
  225. noCache: true
  226. }
  227. },
  228. {
  229. path: '/allMap',
  230. component: () => import('@/views/customer/allMap'),
  231. name: 'allMap',
  232. meta: { title: '用户分布', icon: 'area', noCache: true },
  233. hidden: true
  234. },
  235. {
  236. path: '/advice/:id?',
  237. component: () => import('@/views/ncs-advice/index'),
  238. name: 'advice',
  239. meta: { title: i18n.t('tab.customerAdvice'), icon: 'area', noCache: true },
  240. hidden: true
  241. }
  242. ]
  243. },
  244. // {
  245. // path: '/ncs-nurse-watch',
  246. // component: Layout,
  247. // redirect: '/ncs-device/nurse_watch',
  248. // children: [
  249. // {
  250. // path: 'index',
  251. // component: () => import('@/views/ncs-device/nurse_watch'),
  252. // name: 'nurse_watch',
  253. // meta: { title: i18n.t('tab.mobileDeviceManage'), icon: 'el-icon-watch', noCache: true } // 移动设备
  254. // },
  255. // {
  256. // path: '/myMapHtml',
  257. // component: () => import('@/views/customer/myMapHtml'),
  258. // name: 'myMapHtml',
  259. // meta: { title: i18n.t('customerManage.footprint'), icon: 'area', noCache: true },
  260. // hidden: true
  261. // }
  262. // ]
  263. // },
  264. // {
  265. // path: '/ncs-user-watch',
  266. // component: Layout,
  267. // redirect: '/ncs-device/user_watch',
  268. // children: [
  269. // {
  270. // path: 'index',
  271. // component: () => import('@/views/ncs-device/user_watch'),
  272. // name: 'user_watch',
  273. // meta: { title: i18n.t('tab.userLocationManage'), icon: 'el-icon-watch', noCache: true }
  274. // }
  275. // ]
  276. // },
  277. // {
  278. // path: '/ncs-sos-device',
  279. // component: Layout,
  280. // redirect: '/ncs-device/sos_device',
  281. // children: [
  282. // {
  283. // path: 'index',
  284. // component: () => import('@/views/ncs-sos-device-setting/sos_device_setting'),
  285. // name: 'sos-device-setting',
  286. // meta: { title: i18n.t('tab.sosDeviceSettingManage'), icon: 'el-icon-s-help', noCache: true }
  287. // }
  288. // ]
  289. // },
  290. {
  291. path: '/ncs-channel',
  292. component: Layout,
  293. redirect: '/ncs-channel/index',
  294. children: [
  295. {
  296. path: 'index',
  297. component: () => import('@/views/ncs-channel/index'),
  298. name: 'ncsChannel',
  299. meta: { title: i18n.t('tab.channelManage'), icon: 'el-icon-mobile-phone', noCache: true }
  300. },
  301. {
  302. path: '/ncs-channel/history/:id?',
  303. component: () => import('@/views/ncs-channel/channelImHistory'),
  304. name: 'channelImHistory',
  305. meta: { title: i18n.t('tab.channelImHistory'), icon: 'area', noCache: true },
  306. hidden: true
  307. }
  308. ]
  309. },
  310. {
  311. path: '/remark',
  312. component: Layout,
  313. redirect: '/remark/index',
  314. children: [
  315. {
  316. path: 'remark',
  317. component: () => import('@/views/ncs-remark/index'),
  318. name: 'remarkList',
  319. meta: { title: i18n.t('tab.remarkManage'), icon: 'el-icon-s-order', noCache: true }
  320. }
  321. ]
  322. },
  323. {
  324. path: '/task',
  325. component: Layout,
  326. redirect: '/task/index',
  327. children: [
  328. {
  329. path: 'task',
  330. component: () => import('@/views/ncs-task/index'),
  331. name: 'taskList',
  332. meta: { title: i18n.t('tab.taskManage'), icon: 'table', noCache: true }
  333. }
  334. ]
  335. },
  336. {
  337. path: '/ncs-interaction',
  338. component: Layout,
  339. redirect: '/ncs-interaction/index',
  340. children: [
  341. {
  342. path: 'index',
  343. component: () => import('@/views/ncs-interaction/index'),
  344. name: 'CallingList',
  345. meta: { title: i18n.t('tab.interactionHistory'), icon: 'list', noCache: true }
  346. }
  347. ]
  348. },
  349. // {
  350. // path: '/calling-message',
  351. // component: Layout,
  352. // redirect: '/calling-message/index',
  353. // children: [
  354. // {
  355. // path: 'index',
  356. // component: () => import('@/views/calling-message/index'),
  357. // name: 'CallingMessage',
  358. // meta: { title: '留言设置', icon: 'email', noCache: true }
  359. // }
  360. // ]
  361. // },
  362. {
  363. path: '',
  364. component: Layout,
  365. redirect: '/frameGroup/index',
  366. name: 'frameGroup',
  367. children: [
  368. {
  369. path: '/frameGroup/index',
  370. component: () => import('@/views/hospitalFrame/frameGroup'),
  371. name: 'frameGroup',
  372. meta: { title: i18n.t('tab.frameGroupManage'), icon: 'area', noCache: true }
  373. },
  374. {
  375. path: '/frameGroup/edit/:id?',
  376. component: () => import('@/views/hospitalFrame/frameGroupEdit'),
  377. name: 'frameGroupEdit',
  378. meta: { title: i18n.t('tab.frameGroupEdit'), icon: 'area', noCache: true },
  379. hidden: true
  380. },
  381. {
  382. path: 'nurse_watch_frame/:id?',
  383. component: () => import('@/views/hospitalFrame/nurse_watch_frame'),
  384. name: 'nurseWatchFrame',
  385. meta: { title: i18n.t('tab.watchFrameManage'), icon: 'area', noCache: true },
  386. hidden: true
  387. }
  388. ]
  389. },
  390. {
  391. path: '',
  392. component: Layout,
  393. redirect: '/broadcast/index',
  394. children: [
  395. {
  396. path: '/broadcast/index',
  397. component: () => import('@/views/ncs-broadcast/index'),
  398. name: 'Broadcast',
  399. meta: { title: i18n.t('tab.broadcastManage'), icon: 'el-icon-headset', noCache: true } // 广播设置
  400. },
  401. {
  402. path: '/broadcast/edit/:id?',
  403. component: () => import('@/views/ncs-broadcast/broadcastEdit'),
  404. name: 'broadcastEdit',
  405. meta: { title: i18n.t('tab.broadcastEdit'), icon: 'area', noCache: true },
  406. hidden: true
  407. }
  408. ],
  409. hidden: uiVersion !== 1
  410. },
  411. {
  412. path: '/ncs-nurse-config',
  413. component: Layout,
  414. redirect: '/ncs-nurse-config/index',
  415. children: [
  416. {
  417. path: 'index',
  418. component: () => import('@/views/ncs-nurse-config/index'),
  419. name: 'NcsNurseConfig',
  420. meta: { title: i18n.t('tab.nurseConfig'), icon: 'care1', noCache: true } // 护理参数
  421. }
  422. ],
  423. hidden: uiVersion !== 1
  424. },
  425. {
  426. path: '/calling-board',
  427. component: Layout,
  428. redirect: '/calling-board/index',
  429. children: [
  430. {
  431. path: 'index',
  432. component: () => import('@/views/calling-board/index'),
  433. name: 'CallingBoard',
  434. meta: { title: i18n.t('tab.boardManage'), icon: 'el-icon-data-board', noCache: true }
  435. }
  436. ],
  437. hidden: uiVersion === 2
  438. },
  439. {
  440. path: '/board-title',
  441. component: Layout,
  442. redirect: '/custom-infoboard/board-title',
  443. children: [
  444. {
  445. path: 'index',
  446. component: () => import('@/views/custom-infoboard/board-title'),
  447. name: 'BoardTitle',
  448. meta: { title: i18n.t('tab.customBoardManage'), icon: 'designer', noCache: true }
  449. }
  450. ],
  451. hidden: uiVersion === 2
  452. },
  453. {
  454. path: '/calling-board-designer',
  455. component: Layout,
  456. redirect: '/custom-infoboard/screen-designer',
  457. children: [
  458. {
  459. path: 'index/:id?',
  460. component: () => import('@/views/custom-infoboard/screen-designer'),
  461. name: 'BoardDesigner',
  462. meta: { title: i18n.t('tab.customBoardDesigner'), icon: 'el-icon-data-board', noCache: true }
  463. }
  464. ],
  465. hidden: true
  466. },
  467. {
  468. path: '/ncs-event',
  469. component: Layout,
  470. redirect: '/ncs-event/index',
  471. children: [
  472. {
  473. path: 'index',
  474. component: () => import('@/views/ncs-event/index'),
  475. name: 'eventList',
  476. meta: { title: i18n.t('tab.eventManage'), icon: 'el-icon-notebook-2', noCache: true }
  477. }
  478. ],
  479. hidden: uiVersion === 1
  480. },
  481. // {
  482. // path: '/calling-deviceregisterparams',
  483. // component: Layout,
  484. // redirect: '/deviceregisterparams/index',
  485. // children: [
  486. // {
  487. // path: 'index',
  488. // component: () => import('@/views/calling-deviceRegisterParam/index'),
  489. // name: 'deviceRegisterParam',
  490. // meta: { title: '设备自动注册参数', icon: 'params', noCache: true }
  491. // }
  492. // ]
  493. // },
  494. {
  495. path: '/ncs-interaction-chars',
  496. component: Layout,
  497. redirect: '/ncs-interaction-chars/index',
  498. children: [
  499. {
  500. path: 'index',
  501. component: () => import('@/views/ncs-chars/index'),
  502. name: 'interactionChars',
  503. meta: { title: i18n.t('tab.interactionChars'), icon: 'el-icon-pie-chart', noCache: true }
  504. }
  505. ]
  506. },
  507. {
  508. path: '/function-mapping',
  509. component: Layout,
  510. redirect: '/function-mapping/index',
  511. children: [
  512. {
  513. path: 'index',
  514. component: () => import('@/views/function-mapping/index'),
  515. name: 'functionMapping',
  516. meta: { title: i18n.t('tab.functionRoleMapping'), icon: 'function', noCache: true }
  517. }
  518. ]
  519. },
  520. {
  521. path: '/countdown-config',
  522. component: Layout,
  523. redirect: '/ncs-countdown-config/index',
  524. children: [
  525. {
  526. path: 'index',
  527. component: () => import('@/views/ncs-countdown-config/index'),
  528. name: 'countdownConfig',
  529. meta: { title: i18n.t('tab.functionRoleMapping'), icon: 'function', noCache: true }
  530. }
  531. ]
  532. },
  533. {
  534. path: '/interaction-chain',
  535. component: Layout,
  536. redirect: '/interaction-chain/index',
  537. children: [
  538. {
  539. path: 'index',
  540. component: () => import('@/views/interaction-chain/index'),
  541. name: 'interactionChain',
  542. meta: { title: i18n.t('tab.interactionChain'), icon: 'squence', noCache: true }
  543. }
  544. ]
  545. },
  546. {
  547. path: '/calling-setting',
  548. component: Layout,
  549. redirect: '/calling-setting/index',
  550. children: [
  551. {
  552. path: 'index',
  553. component: () => import('@/views/calling-setting/index'),
  554. name: 'CallingSetting',
  555. meta: { title: i18n.t('tab.partSetting'), icon: 'el-icon-s-tools', noCache: true }
  556. }
  557. ]
  558. },
  559. {
  560. path: '/ncs_led',
  561. component: Layout,
  562. redirect: '/ncs_led/index',
  563. children: [
  564. {
  565. path: 'index',
  566. component: () => import('@/views/ncs-led/ledManager'),
  567. name: 'part_led',
  568. meta: { title: i18n.t('tab.ledDevice'), icon: 'el-icon-message-solid', noCache: true }
  569. }
  570. ],
  571. hidden: uiVersion !== 1
  572. },
  573. { path: '*', redirect: '/404', hidden: true }
  574. ]
  575. export const hospitalRoutes = [
  576. {
  577. path: '/hospital/ncs_frame',
  578. component: Layout,
  579. redirect: '/ncs_frame/index',
  580. children: [
  581. {
  582. path: 'index',
  583. component: () => import('@/views/hospital/ncs_frame/frameTreeView'),
  584. name: 'hospital_frameTreeView',
  585. meta: { title: i18n.t('tab.frameManage'), icon: 'tree', noCache: true }
  586. }
  587. ]
  588. },
  589. {
  590. path: '/hospital/ncs_device',
  591. component: Layout,
  592. redirect: '/ncs_device/index',
  593. children: [
  594. {
  595. path: 'index',
  596. // component: () => import('@/views/hospital/ncs_device/deviceManager'),
  597. component: () => import('@/views/hospital/deviceManagement'),
  598. name: 'hospital_deviceList',
  599. meta: { title: i18n.t('tab.deviceManage'), icon: 'component', noCache: true }
  600. }
  601. ]
  602. },
  603. {
  604. path: '/hospital/ncs_clerk',
  605. component: Layout,
  606. redirect: '/ncs_clerk/index',
  607. children: [
  608. {
  609. path: 'index',
  610. component: () => import('@/views/hospital/clerkManager'),
  611. name: 'hospital_clerkList',
  612. meta: { title: i18n.t('tab.clerkManage'), icon: 'peoples', noCache: true }
  613. }
  614. ]
  615. },
  616. {
  617. path: '/hospital/ncs_customer',
  618. component: Layout,
  619. redirect: '/ncs_customer/index',
  620. children: [
  621. {
  622. path: 'index',
  623. component: () => import('@/views/hospital/customerManagement'),
  624. name: 'hospital_customerList',
  625. meta: { title: i18n.t('tab.customerManage'), icon: 'el-icon-s-custom', noCache: true }
  626. // component: () => uiVersion === 1 ? import('@/views/customer/patientManagement') : import('@/views/customer/customerManagement'),
  627. // name: uiVersion === 1 ? 'hospital_patientList' : 'hospital_customerList',
  628. // meta: { title: uiVersion === 1 ? '入住人管理' : '用户管理', icon: 'el-icon-s-custom', noCache: true }
  629. }
  630. ]
  631. },
  632. {
  633. path: '/hospital/ncs_led',
  634. component: Layout,
  635. redirect: '/ncs_led/index',
  636. children: [
  637. {
  638. path: 'index',
  639. component: () => import('@/views/hospital/ledManager'),
  640. name: 'hospital_led',
  641. meta: { title: i18n.t('tab.ledDevice'), icon: 'el-icon-message-solid', noCache: true }
  642. }
  643. ]
  644. },
  645. { path: '*', redirect: '/404', hidden: true }
  646. ]
  647. export const adminRoutes = [
  648. {
  649. path: '/admin/ncs_frame',
  650. component: Layout,
  651. redirect: '/ncs_frame/frame-admin',
  652. children: [
  653. {
  654. path: 'index',
  655. component: () => import('@/views/hospitalFrame/frameTreeView-admin'),
  656. name: 'CallingFrameTreeViewAdmin',
  657. meta: { title: i18n.t('tab.frameManage'), icon: 'tree', noCache: true }
  658. }
  659. ]
  660. },
  661. {
  662. path: '/admin/ncs_clerk',
  663. component: Layout,
  664. redirect: '/ncs_clerk/clerk-admin',
  665. children: [
  666. {
  667. path: 'index',
  668. component: () => import('@/views/ncs-clerk/clerk-admin'),
  669. name: 'CallingClerkAdmin',
  670. meta: { title: i18n.t('tab.allClerk'), icon: 'peoples', noCache: true }
  671. }
  672. ]
  673. },
  674. {
  675. path: '/admin/ncs_customer',
  676. component: Layout,
  677. redirect: '/ncs_customer/customer-admin',
  678. children: [
  679. {
  680. path: 'index',
  681. component: () => import('@/views/customer/customer-admin'),
  682. name: 'CallingCustomerAdmin',
  683. meta: { title: i18n.t('tab.allCustomer'), icon: 'el-icon-s-custom', noCache: true }
  684. // component: () => uiVersion === 1 ? import('@/views/customer/patientManagement') : import('@/views/customer/customerManagement'),
  685. // name: uiVersion === 1 ? 'hospital_patientList' : 'hospital_customerList',
  686. // meta: { title: uiVersion === 1 ? '入住人管理' : '用户管理', icon: 'el-icon-s-custom', noCache: true }
  687. }
  688. ]
  689. },
  690. {
  691. path: '/admin/ncs-device',
  692. component: Layout,
  693. redirect: '/ncs-device/device-admin',
  694. children: [
  695. {
  696. path: 'index',
  697. component: () => import('@/views/ncs-device/device-admin'),
  698. name: 'CallingDeviceAdmin',
  699. meta: { title: i18n.t('tab.allDevice'), icon: 'component', noCache: true }
  700. }
  701. ]
  702. },
  703. {
  704. path: '/admin/ncs_event',
  705. component: Layout,
  706. redirect: '/ncs-event/event',
  707. children: [
  708. {
  709. path: 'index',
  710. component: () => import('@/views/ncs-event/eventManagement'),
  711. name: 'EventManagement',
  712. meta: { title: i18n.t('tab.eventManage'), icon: 'el-icon-notebook-2', noCache: true }
  713. }
  714. ]
  715. },
  716. {
  717. path: '/admin/ncs-his',
  718. component: Layout,
  719. redirect: '/ncs-his/hisManager',
  720. children: [
  721. {
  722. path: 'index',
  723. component: () => import('@/views/ncs-his/hisManagement'),
  724. name: 'hisManagement',
  725. meta: { title: i18n.t('tab.hisManage'), icon: 'el-icon-search', noCache: true }
  726. },
  727. {
  728. path: 'patientManage/:keyval?',
  729. component: () => import('@/views/ncs-his/his-patient/hisPatientManage'),
  730. name: 'hisPatientManage',
  731. meta: { title: i18n.t('his.hisPatient'), icon: 'el-icon-search', noCache: true },
  732. hidden: true
  733. },
  734. {
  735. path: 'clerkManage/:keyval?',
  736. component: () => import('@/views/ncs-his/his-clerk/hisClerkManager'),
  737. name: 'hisClerkManage',
  738. meta: { title: i18n.t('his.hisClerk'), icon: 'el-icon-search', noCache: true },
  739. hidden: true
  740. },
  741. {
  742. path: 'nurseConfigManage/:keyval?',
  743. component: () => import('@/views/ncs-his/his-nurse-config/hisNurseConfigManager'),
  744. name: 'hisNurseConfigManage',
  745. meta: { title: i18n.t('his.hisNurseConfig'), icon: 'el-icon-search', noCache: true },
  746. hidden: true
  747. }
  748. ]
  749. },
  750. {
  751. path: '/calling-ncError',
  752. component: Layout,
  753. redirect: '/calling-ncError/index',
  754. children: [
  755. {
  756. path: 'index',
  757. component: () => import('@/views/calling-ncError/index'),
  758. name: 'CallingNcError',
  759. meta: { title: i18n.t('tab.errorLog'), icon: 'bug', noCache: true }
  760. }
  761. ]
  762. },
  763. {
  764. path: '/ncs-system-config',
  765. component: Layout,
  766. redirect: 'index',
  767. children: [
  768. {
  769. path: 'index',
  770. component: () => import('@/views/ncs-system-config/index'),
  771. name: 'NcsSystemConfig',
  772. meta: { title: i18n.t('tab.systemConfig'), icon: 'nested', noCache: true }
  773. }
  774. ]
  775. },
  776. {
  777. path: '/calling-partInfoSetting',
  778. component: Layout,
  779. children: [
  780. {
  781. path: 'index/:id?',
  782. component: () => import('@/views/ncs-orginazition/partInfoSetting'),
  783. name: 'partInfoSetting',
  784. meta: { title: i18n.t('tab.shopSetting'), icon: 'nested', noCache: true },
  785. hidden: true
  786. }
  787. ]
  788. },
  789. {
  790. path: '/calling-menu',
  791. component: Layout,
  792. children: [
  793. {
  794. path: 'index',
  795. component: () => import('@/views/ncs-menu/menuManager'),
  796. name: 'menuSetting',
  797. meta: { title: i18n.t('tab.menuManage'), icon: 'function', noCache: true }
  798. }
  799. ]
  800. },
  801. {
  802. path: '/ncs-orginazition',
  803. component: Layout,
  804. children: [
  805. {
  806. path: 'index',
  807. component: () => import('@/views/ncs-orginazition/index'),
  808. name: 'organization',
  809. meta: { title: i18n.t('tab.organization'), icon: 'tree', noCache: true }
  810. }
  811. ]
  812. },
  813. {
  814. path: '/ncs-rolemanager',
  815. component: Layout,
  816. children: [
  817. {
  818. path: 'index',
  819. component: () => import('@/views/ncs-auth/superadmin/defaultRoleManager'),
  820. name: 'rolemanager',
  821. meta: { title: i18n.t('tab.roleManage'), icon: 'authen', noCache: true }
  822. }
  823. ]
  824. },
  825. {
  826. path: '/ncs-485',
  827. component: Layout,
  828. children: [
  829. {
  830. path: 'index',
  831. component: () => import('@/views/ncs-485/index'),
  832. name: '485Commissioning',
  833. meta: { title: i18n.t('tab.debugging485'), icon: 'authen', noCache: true }
  834. }
  835. ]
  836. },
  837. {
  838. path: '/ncs-linux-version',
  839. component: Layout,
  840. children: [
  841. {
  842. path: 'index',
  843. component: () => import('@/views/ncs-linux-version/linuxVersionSetting'),
  844. name: 'linuxVersion',
  845. meta: { title: i18n.t('tab.linuxVersion'), icon: 'nested', noCache: true }
  846. }
  847. ]
  848. },
  849. {
  850. path: '/device-frame',
  851. component: Layout,
  852. children: [
  853. {
  854. path: 'device-frame',
  855. component: () => import('@/views/ncs-orginazition/device-frame'),
  856. name: 'device-frame',
  857. meta: { title: i18n.t('tab.deviceFrame'), icon: 'nested', noCache: true },
  858. hidden: true
  859. }
  860. ]
  861. },
  862. { path: '*', redirect: '/404', hidden: true }
  863. ]
  864. const createRouter = () => new Router({
  865. mode: 'history', // require service support
  866. scrollBehavior: () => ({ y: 0 }),
  867. routes: constantRoutes
  868. })
  869. const router = createRouter()
  870. // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
  871. export function resetRouter() {
  872. const newRouter = createRouter()
  873. router.matcher = newRouter.matcher // reset router
  874. }
  875. export default router