index.js 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951
  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. const enableBroadcast = domain.enableBroadcast
  11. const enableMobile = domain.enableMobile
  12. const enableEntraceguard = domain.enableEntraceguard
  13. const enableNBiot = domain.enableNBiot
  14. const enableCustomerDevice = domain.enableCustomerDevice
  15. const enableSosDevice = domain.enableSosDevice
  16. const enable485 = domain.enable485
  17. const enableLinux = domain.enableLinux
  18. /**
  19. * constantRoutes
  20. * a base page that does not have permission requirements
  21. * all roles can be accessed
  22. */
  23. export const constantRoutes = [
  24. {
  25. path: '/redirect',
  26. component: Layout,
  27. hidden: true,
  28. children: [
  29. {
  30. path: '/redirect/:path(.*)',
  31. component: () => import('@/views/redirect/index')
  32. }
  33. ]
  34. },
  35. {
  36. path: '/login',
  37. component: () => import('@/views/login/index'),
  38. hidden: true
  39. },
  40. {
  41. path: '/auth-redirect',
  42. component: () => import('@/views/login/auth-redirect'),
  43. hidden: true
  44. },
  45. {
  46. path: '/404',
  47. component: () => import('@/views/error-page/404'),
  48. hidden: true
  49. },
  50. {
  51. path: '/401',
  52. component: () => import('@/views/error-page/401'),
  53. hidden: true
  54. },
  55. {
  56. path: '/',
  57. component: Layout,
  58. redirect: '/dashboard',
  59. children: [
  60. {
  61. path: 'dashboard',
  62. component: () => import('@/views/dashboard/index'),
  63. name: 'Dashboard',
  64. meta: { title: i18n.t('tab.home'), icon: 'dashboard', affix: true }
  65. }
  66. ]
  67. },
  68. {
  69. path: '/vital_sign_log',
  70. component: () => import('@/views/vital-sign/index'),
  71. hidden: true
  72. }
  73. ]
  74. // 科室级页面
  75. export const partRoutes = [
  76. // 空间设备相关
  77. {
  78. path: '/frame',
  79. component: Layout,
  80. redirect: '/frame/tree',
  81. name: 'frame-tree',
  82. meta: { title: i18n.t('tab.frameManage'), icon: 'tree', noCache: true },
  83. children: [{
  84. path: 'tree',
  85. component: () => import('@/views/hospitalFrame/frameTreeView'),
  86. name: 'part-frame-tree',
  87. meta: { title: i18n.t('tab.frameManage'), icon: 'tree', noCache: true } // 空间位置
  88. }, {
  89. path: 'clerk_frame_manage',
  90. component: () => import('@/views/ncs-clerk-frame-manage/index'),
  91. name: 'clerk-frame-manage',
  92. meta: { title: i18n.t('tab.staffManageFrames'), icon: 'frame_manage', noCache: true }
  93. }
  94. ]
  95. },
  96. {
  97. path: '/device',
  98. name: 'part-device',
  99. component: Layout,
  100. redirect: '/device/list',
  101. meta: { title: i18n.t('deviceManage.deviceManage'), icon: 'devices' },
  102. children: [
  103. {
  104. path: 'list',
  105. component: () => import('@/views/ncs-device/deviceManagement'),
  106. name: 'device-list',
  107. meta: { title: i18n.t('tab.deviceManage'), icon: 'component', noCache: true } // 所有设备
  108. },
  109. {
  110. path: 'mobile',
  111. component: () => import('@/views/ncs-device/nurse_watch'),
  112. name: 'device-mobile',
  113. hidden: !enableMobile,
  114. meta: { title: i18n.t('tab.mobileDeviceManage'), icon: 'el-icon-watch', noCache: true } // 移动设备
  115. },
  116. {
  117. path: 'user_watch',
  118. component: () => import('@/views/ncs-device/user_watch'),
  119. name: 'user-watch',
  120. hidden: !enableCustomerDevice,
  121. meta: { title: i18n.t('tab.userLocationManage'), icon: 'el-icon-watch-1', noCache: true } // 用户设备
  122. },
  123. {
  124. path: 'huayi_sleep',
  125. component: () => import('@/views/ncs-device/huayi_sleep'),
  126. name: 'huayi-sleep',
  127. hidden: !enableCustomerDevice,
  128. meta: { title: i18n.t('zy20241209.huayiSleep'), icon: 'sleep_monitoring', noCache: true } // 用户设备
  129. },
  130. {
  131. path: 'sos',
  132. component: () => import('@/views/ncs-sos-device-setting/sos_device_setting'),
  133. name: 'sos-device',
  134. hidden: !enableSosDevice,
  135. meta: { title: i18n.t('tab.sosDeviceSettingManage'), icon: 'el-icon-s-help', noCache: true } // 报警设备
  136. },
  137. {
  138. path: 'map',
  139. component: () => import('@/views/customer/myMapHtml'),
  140. name: 'device-map',
  141. meta: { title: i18n.t('customerManage.footprint'), icon: 'area', noCache: true }, // 足迹
  142. hidden: true
  143. },
  144. {
  145. path: 'nbdevice_condition',
  146. component: () => import('@/views/ncs-device/nbDeviceCondition'),
  147. name: 'nbdevice-condition',
  148. meta: { title: i18n.t('tab.nbiotDeviceStatus'), icon: 'iot', noCache: true },
  149. hidden: !enableNBiot
  150. },
  151. {
  152. path: 'information_board',
  153. component: () => import('@/views/calling-board/index'),
  154. name: 'information-board',
  155. meta: { title: i18n.t('tab.boardManage'), icon: 'infomation_board', noCache: true },
  156. hidden: uiVersion === 2
  157. },
  158. {
  159. path: 'custom_infoboard',
  160. component: () => import('@/views/custom-infoboard/board-title'),
  161. name: 'board-title',
  162. meta: { title: i18n.t('tab.customBoardManage'), icon: 'designer', noCache: true },
  163. hidden: uiVersion === 2
  164. },
  165. {
  166. path: 'index/:id?',
  167. component: () => import('@/views/custom-infoboard/infoboard-designer'), // 自定义看板 component: () => import('@/views/custom-infoboard/infoboard-designer'),资阳 component: () => import('@/views/custom-infoboard/screen-designer')
  168. name: 'infoboard-designer-manager',
  169. meta: { title: i18n.t('tab.customBoardDesigner'), icon: 'el-icon-data-board', noCache: true },
  170. hidden: true
  171. },
  172. {
  173. path: 'device_menu',
  174. component: () => import('@/views/ncs-device-menu/index'),
  175. name: 'device-menu',
  176. meta: { title: i18n.t('tab.deviceMenuManager'), icon: 'el-icon-menu', noCache: true }
  177. },
  178. {
  179. path: 'device_menu_detail/:id',
  180. component: () => import('@/views/ncs-device-menu-detail/index'),
  181. name: 'device-menu-detail',
  182. meta: { title: i18n.t('tab.deviceMenuDetail'), icon: 'el-icon-tickets', noCache: true },
  183. hidden: true
  184. },
  185. // {
  186. // path: 'led',
  187. // component: () => import('@/views/ncs-led/ledDeviceManagement'),
  188. // name: 'led-manager',
  189. // meta: { title: i18n.t('tab.ledDeviceManager'), icon: 'led', noCache: true },
  190. // hidden: uiVersion === 2
  191. // },
  192. {
  193. path: 'led-control',
  194. component: () => import('@/views/ncs-led/ledControl'),
  195. name: 'led-control',
  196. meta: { title: i18n.t('tab.ledDevice'), icon: 'el-icon-message-solid', noCache: true }, // LED点阵屏
  197. hidden: true
  198. }
  199. ]
  200. },
  201. // 职员相关
  202. {
  203. path: '/clerk',
  204. component: Layout,
  205. redirect: '/clerk/list',
  206. name: 'part-clerk',
  207. meta: { title: i18n.t('tab.clerkManage'), icon: 'peoples', noCache: true },
  208. children: [
  209. {
  210. path: 'list',
  211. component: () => import('@/views/ncs-clerk/clerkManagement'),
  212. name: 'clerk-list',
  213. meta: { title: i18n.t('tab.clerkManage'), icon: 'el-icon-user-solid', noCache: true }
  214. },
  215. {
  216. path: 'nfc_interaction_list',
  217. component: () => import('@/views/nfc-interaction/index'),
  218. name: 'nfc-interaction-list',
  219. meta: { title: i18n.t('tab.clerkCalendar'), icon: 'el-icon-date', noCache: true }
  220. }
  221. ]
  222. },
  223. // 门禁
  224. {
  225. path: '/entrace_guard',
  226. component: Layout,
  227. name: 'entrace-guard',
  228. redirect: '/entrace_guard/users',
  229. hidden: !enableEntraceguard,
  230. children: [
  231. {
  232. path: 'users',
  233. component: () => import('@/views/entrace-guard/users'),
  234. name: 'entrace-guard-list',
  235. meta: { title: i18n.t('tab.entraceguardUser'), icon: 'pass_through', noCache: true },
  236. hidden: !enableEntraceguard
  237. }]
  238. },
  239. // 客户信息
  240. {
  241. path: '/customer',
  242. component: Layout,
  243. redirect: '/customer/list',
  244. name: 'customer-manager',
  245. meta: {
  246. title: uiVersion === 1 ? i18n.t('tab.patientManage') : i18n.t('tab.customerManage'),
  247. icon: 'el-icon-s-custom',
  248. noCache: true
  249. },
  250. children: [
  251. {
  252. path: 'list',
  253. component: () => uiVersion === 1 ? import('@/views/customer/patientManagement') : uiVersion === 2 ? import('@/views/customer/customerManagement') : import('@/views/customer/elderlyCareManagement'),
  254. name: 'customer-list',
  255. meta: {
  256. title: uiVersion === 1 ? i18n.t('tab.patientManage') : i18n.t('tab.customerManage'),
  257. icon: 'el-icon-s-custom',
  258. noCache: true
  259. }
  260. },
  261. {
  262. path: 'map',
  263. component: () => import('@/views/customer/allMap'),
  264. name: 'map',
  265. meta: { title: i18n.t('tab.CustomerDistribution'), icon: 'area', noCache: true },
  266. hidden: true
  267. },
  268. {
  269. path: '/advice/:id?',
  270. component: () => import('@/views/ncs-advice/index'),
  271. name: 'advice',
  272. meta: { title: i18n.t('tab.customerAdvice'), icon: 'area', noCache: true },
  273. hidden: true
  274. },
  275. {
  276. path: '/customer_affair',
  277. component: () => import('@/views/ncs-customer-affair/index'),
  278. name: 'customer-affair',
  279. meta: { title: i18n.t('zy20240530.customerAffair'), icon: 'el-icon-notebook-2', noCache: true }
  280. }
  281. ]
  282. },
  283. // 便签
  284. {
  285. path: '/remark',
  286. component: Layout,
  287. name: 'remark',
  288. redirect: '/remark/list',
  289. meta: { title: i18n.t('tab.remarkManage'), icon: 'el-icon-s-order', noCache: true },
  290. children: [
  291. {
  292. path: 'list',
  293. component: () => import('@/views/ncs-remark/index'),
  294. name: 'remark-list',
  295. meta: { title: i18n.t('tab.remarkManage'), icon: 'el-icon-s-order', noCache: true }
  296. }
  297. ]
  298. },
  299. // 文档管理
  300. {
  301. path: '/file-manager',
  302. component: Layout,
  303. redirect: '/file-manager/index',
  304. children: [
  305. {
  306. path: 'index',
  307. component: () => import('@/views/ncs-file-manager/index'),
  308. name: 'file-manager',
  309. meta: { title: i18n.t('wu20240322.fileManager'), icon: 'el-icon-folder-opened', noCache: true }
  310. }
  311. ]
  312. },
  313. // 任务
  314. {
  315. path: '/task',
  316. component: Layout,
  317. name: 'task',
  318. redirect: '/task/list',
  319. meta: { title: i18n.t('tab.taskManage'), icon: 'table', noCache: true },
  320. children: [
  321. {
  322. path: 'list',
  323. component: () => import('@/views/ncs-task/index'),
  324. name: 'task-list',
  325. meta: { title: i18n.t('tab.taskManage'), icon: 'table', noCache: true }
  326. }
  327. ]
  328. },
  329. // 交互信息
  330. {
  331. path: '/interaction',
  332. component: Layout,
  333. redirect: '/interaction/history',
  334. name: 'interaction',
  335. meta: { title: i18n.t('tab.interaction'), icon: 'list', noCache: true },
  336. children: [
  337. {
  338. path: 'history',
  339. component: () => import('@/views/ncs-interaction/index'),
  340. name: 'interaction-history',
  341. meta: { title: i18n.t('tab.interactionHistory'), icon: 'list', noCache: true }
  342. }, {
  343. path: 'chars',
  344. component: () => import('@/views/ncs-chars/index'),
  345. name: 'interaction-chars',
  346. meta: { title: i18n.t('tab.interactionChars'), icon: 'el-icon-pie-chart', noCache: true }
  347. }
  348. ]
  349. },
  350. // 消息中心
  351. {
  352. path: '/message-center',
  353. component: Layout,
  354. // redirect: '/interaction/history',
  355. name: 'message-center',
  356. meta: { title: i18n.t('mc.messageCenter'), icon: 'el-icon-message', noCache: true },
  357. children: [
  358. {
  359. path: 'message-type',
  360. component: () => import('@/views/message-center/message-type/index'),
  361. name: 'message-type',
  362. meta: { title: i18n.t('mc.messageType'), icon: 'messageType', noCache: true }
  363. },
  364. {
  365. path: 'messages',
  366. component: () => import('@/views/message-center/messages/index'),
  367. name: 'messages',
  368. meta: { title: i18n.t('mc.messages'), icon: 'messageList', noCache: true }
  369. },
  370. {
  371. path: 'messages-edit/:id?',
  372. component: () => import('@/views/message-center/messages/message-edit'),
  373. name: 'message-edit',
  374. meta: { title: i18n.t('mc.messagesModule.addMessage'), icon: 'messageList', noCache: true },
  375. hidden: true
  376. },
  377. {
  378. path: 'template-param',
  379. component: () => import('@/views/message-center/template-paramer/index'),
  380. name: 'template-param',
  381. meta: { title: i18n.t('mc.templateParamer'), icon: 'templateParamer', noCache: true }
  382. },
  383. {
  384. path: 'message-template',
  385. component: () => import('@/views/message-center/message-template/index'),
  386. name: 'message-template',
  387. meta: { title: i18n.t('mc.messageTemplate'), icon: 'messageTemplate', noCache: true }
  388. }
  389. ]
  390. },
  391. // 广播
  392. {
  393. path: '/broadcast',
  394. component: Layout,
  395. name: 'broadcast',
  396. redirect: '/broadcast/index',
  397. hidden: !enableBroadcast || uiVersion !== 1,
  398. children: [
  399. {
  400. path: 'index',
  401. component: () => import('@/views/ncs-broadcast/index'),
  402. name: 'broadcast-list',
  403. meta: { title: i18n.t('tab.broadcastManage'), icon: 'el-icon-headset', noCache: true }, // 广播设置
  404. hidden: !enableBroadcast || uiVersion !== 1
  405. },
  406. {
  407. path: 'edit/:id?',
  408. component: () => import('@/views/ncs-broadcast/broadcastEdit'),
  409. name: 'broadcast-edit',
  410. meta: { title: i18n.t('tab.broadcastEdit'), icon: 'area', noCache: true },
  411. hidden: true
  412. }
  413. ]
  414. },
  415. // {
  416. // path: '/infoboard_designer',
  417. // component: Layout,
  418. // name: 'infoboard-designer',
  419. // children: [
  420. // {
  421. // path: 'index/:id?',
  422. // component: () => import('@/views/custom-infoboard/infoboard-designer'), // 自定义看板 component: () => import('@/views/custom-infoboard/infoboard-designer'),资阳 component: () => import('@/views/custom-infoboard/screen-designer')
  423. // name: 'infoboard-designer-manager',
  424. // meta: { title: i18n.t('tab.customBoardDesigner'), icon: 'el-icon-data-board', noCache: true }
  425. // }
  426. // ],
  427. // hidden: true
  428. // },
  429. {
  430. path: '/settings',
  431. component: Layout,
  432. redirect: '/settings/index',
  433. name: 'settings',
  434. meta: {
  435. title: i18n.t('tab.settings'),
  436. icon: 'el-icon-s-tools'
  437. },
  438. children: [
  439. {
  440. path: 'index',
  441. component: () => import('@/views/calling-setting/index'),
  442. name: 'part-settings',
  443. meta: { title: i18n.t('tab.partSettings'), icon: 'el-icon-s-tools', noCache: true } // 机构设置
  444. }, {
  445. path: 'nurse_config',
  446. component: () => import('@/views/ncs-nurse-config/index'),
  447. name: 'nurse-config',
  448. meta: { title: i18n.t('tab.nurseConfig'), icon: 'care1', noCache: true }, // 护理参数
  449. hidden: uiVersion !== 1
  450. },
  451. {
  452. path: 'channel',
  453. component: () => import('@/views/hospitalFrame/index'),
  454. name: 'channel',
  455. redirect: '/settings/channel/index',
  456. meta: { title: i18n.t('tab.channelManage'), icon: 'el-icon-mobile-phone', noCache: true },
  457. children: [
  458. {
  459. path: 'index',
  460. component: () => import('@/views/ncs-channel/index'),
  461. name: 'channel-im',
  462. meta: { title: i18n.t('tab.channelManage'), icon: 'el-icon-mobile-phone', noCache: true }
  463. },
  464. {
  465. path: 'history/:id?',
  466. component: () => import('@/views/ncs-channel/channelImHistory'),
  467. name: 'channel-im-history',
  468. meta: { title: i18n.t('tab.channelImHistory'), icon: 'area', noCache: true },
  469. hidden: true
  470. }
  471. ]
  472. }, {
  473. path: 'event_list',
  474. component: () => import('@/views/ncs-event/index'),
  475. name: 'event-list',
  476. meta: { title: i18n.t('tab.eventManage'), icon: 'el-icon-notebook-2', noCache: true }
  477. }, {
  478. path: 'components',
  479. component: () => import('@/views/hospitalFrame/index'),
  480. redirect: '/settings/components/function_mapping',
  481. name: 'beds-side',
  482. meta: {
  483. title: i18n.t('tab.bedsideInteraction'),
  484. icon: 'component'
  485. },
  486. children: [
  487. {
  488. path: 'function_mapping',
  489. component: () => import('@/views/function-mapping/index'),
  490. name: 'function-mapping',
  491. meta: { title: i18n.t('tab.functionRoleMapping'), icon: 'function', noCache: true }
  492. },
  493. {
  494. path: 'interaction_chain',
  495. component: () => import('@/views/interaction-chain/index'),
  496. name: 'interaction-chain',
  497. meta: { title: i18n.t('tab.interactionChain'), icon: 'squence', noCache: true } // 交互接收顺序
  498. },
  499. {
  500. path: 'countdonw',
  501. component: () => import('@/views/ncs-countdown-config/index'),
  502. name: 'countdown-config',
  503. meta: { title: i18n.t('tab.countdownConfig'), icon: 'countdown', noCache: true }
  504. },
  505. {
  506. path: 'screentip',
  507. component: () => import('@/views/ncs-screentip/index'),
  508. name: 'screen-tip',
  509. meta: { title: i18n.t('tab.screentip'), icon: 'screen_tip', noCache: true }
  510. }
  511. ]
  512. }, {
  513. path: '/frame_group',
  514. component: () => import('@/views/hospitalFrame/index'),
  515. name: 'frame-group-manager',
  516. redirect: '/frame_group/index',
  517. children: [
  518. {
  519. path: 'index',
  520. component: () => import('@/views/hospitalFrame/frameGroup'),
  521. name: 'frame-group',
  522. meta: { title: i18n.t('tab.frameGroupManage'), icon: 'area', noCache: true }
  523. },
  524. {
  525. path: 'edit/:id?',
  526. component: () => import('@/views/hospitalFrame/frameGroupEdit'),
  527. name: 'frame-group-edit',
  528. meta: { title: i18n.t('tab.frameGroupEdit'), icon: 'area', noCache: true },
  529. hidden: true
  530. },
  531. {
  532. path: 'watch_frame/:id?',
  533. component: () => import('@/views/hospitalFrame/nurse_watch_frame'),
  534. name: 'nurse-watch-frame',
  535. meta: { title: i18n.t('tab.watchFrameManage'), icon: 'area', noCache: true },
  536. hidden: true
  537. }
  538. ]
  539. }
  540. ]
  541. },
  542. { path: '*', redirect: '/404', hidden: true }
  543. ]
  544. export const hospitalRoutes = [
  545. {
  546. path: '/hospital/frame',
  547. component: Layout,
  548. redirect: '/hospital/frame/index',
  549. name: 'hospital-frame',
  550. children: [
  551. {
  552. path: 'index',
  553. component: () => import('@/views/hospital/frame/frameTreeView'),
  554. name: 'hospital-frame-tree',
  555. meta: { title: i18n.t('tab.frameManage'), icon: 'tree', noCache: true }
  556. }
  557. ]
  558. },
  559. {
  560. path: '/hospital/device',
  561. component: Layout,
  562. redirect: '/hospital/device/index',
  563. name: 'hospital-device-manager',
  564. meta: { title: i18n.t('deviceManage.deviceManage'), icon: 'devices' },
  565. children: [
  566. {
  567. path: 'index',
  568. component: () => import('@/views/hospital/deviceManagement'),
  569. name: 'hospital-device-list',
  570. meta: { title: i18n.t('tab.deviceManage'), icon: 'component', noCache: true }
  571. },
  572. {
  573. path: 'led_control',
  574. component: () => import('@/views/hospital/ledControl'),
  575. name: 'hospital-led-control',
  576. meta: { title: i18n.t('tab.ledDevice'), icon: 'el-icon-message-solid', noCache: true }
  577. },
  578. {
  579. path: 'information_board',
  580. component: () => import('@/views/calling-board/index'),
  581. name: 'information-board',
  582. meta: { title: i18n.t('tab.boardManage'), icon: 'infomation_board', noCache: true },
  583. hidden: uiVersion === 2
  584. },
  585. {
  586. path: 'custom_infoboard',
  587. component: () => import('@/views/custom-infoboard/board-title'),
  588. name: 'board-title',
  589. meta: { title: i18n.t('tab.customBoardManage'), icon: 'designer', noCache: true },
  590. hidden: uiVersion === 2
  591. },
  592. {
  593. path: 'index/:id?',
  594. component: () => import('@/views/custom-infoboard/infoboard-designer'), // 自定义看板 component: () => import('@/views/custom-infoboard/infoboard-designer'),资阳 component: () => import('@/views/custom-infoboard/screen-designer')
  595. name: 'infoboard-designer-manager',
  596. meta: { title: i18n.t('tab.customBoardDesigner'), icon: 'el-icon-data-board', noCache: true },
  597. hidden: true
  598. }
  599. ]
  600. },
  601. {
  602. path: '/hospital/clerk',
  603. component: Layout,
  604. redirect: '/hospital/clerk/index',
  605. name: 'hospital-clerk-manager',
  606. children: [
  607. {
  608. path: 'index',
  609. component: () => import('@/views/hospital/clerkManager'),
  610. name: 'hospital-clerk-list',
  611. meta: { title: i18n.t('tab.clerkManage'), icon: 'peoples', noCache: true }
  612. }
  613. ]
  614. },
  615. {
  616. path: '/hospital/customer',
  617. component: Layout,
  618. redirect: '/hospital/customer/index',
  619. name: 'hospital-customer-manager',
  620. children: [
  621. {
  622. path: 'index',
  623. component: () => import('@/views/hospital/customerManagement'),
  624. name: 'hospital-customer-list',
  625. meta: { title: i18n.t('tab.customerManage'), icon: 'el-icon-s-custom', noCache: true }
  626. }
  627. ]
  628. },
  629. // {
  630. // path: '/hospital/led',
  631. // component: Layout,
  632. // redirect: '/hospital/led/index',
  633. // children: [
  634. // {
  635. // path: 'index',
  636. // component: () => import('@/views/hospital/ledControl'),
  637. // name: 'hospital_led',
  638. // meta: { title: i18n.t('tab.ledDevice'), icon: 'el-icon-message-solid', noCache: true }
  639. // }
  640. // ]
  641. // },
  642. { path: '*', redirect: '/404', hidden: true }
  643. ]
  644. export const adminRoutes = [
  645. {
  646. path: '/frame',
  647. component: Layout,
  648. redirect: '/frame/index',
  649. children: [
  650. {
  651. path: 'index',
  652. component: () => import('@/views/hospitalFrame/frameTreeView-admin'),
  653. name: 'admin-frame',
  654. meta: { title: i18n.t('tab.frameManage'), icon: 'tree', noCache: true }
  655. }
  656. ]
  657. },
  658. {
  659. path: '/clerk',
  660. component: Layout,
  661. redirect: '/clerk/index',
  662. children: [
  663. {
  664. path: 'index',
  665. component: () => import('@/views/ncs-clerk/clerk-admin'),
  666. name: 'admin-clerk',
  667. meta: { title: i18n.t('tab.allClerk'), icon: 'peoples', noCache: true }
  668. }
  669. ]
  670. },
  671. {
  672. path: '/customer',
  673. component: Layout,
  674. redirect: '/customer/index',
  675. children: [
  676. {
  677. path: 'index',
  678. component: () => import('@/views/customer/customer-admin'),
  679. name: 'admin-customer',
  680. meta: { title: i18n.t('tab.allCustomer'), icon: 'el-icon-s-custom', noCache: true }
  681. }
  682. ]
  683. },
  684. {
  685. path: '/device',
  686. component: Layout,
  687. redirect: '/device/index',
  688. meta: {
  689. title: i18n.t('deviceManage.deviceManage'),
  690. icon: 'devices'
  691. },
  692. children: [
  693. {
  694. path: 'index',
  695. component: () => import('@/views/ncs-device/device-admin'),
  696. name: 'admin-device',
  697. meta: { title: i18n.t('tab.allDevice'), icon: 'component', noCache: true }
  698. },
  699. {
  700. path: 'device_menu',
  701. component: () => import('@/views/ncs-device-menu/deviceMenuManagement'),
  702. name: 'admin-device_menu',
  703. meta: { title: i18n.t('tab.deviceMenuManager'), icon: 'el-icon-menu', noCache: true }
  704. },
  705. {
  706. path: 'linux_version',
  707. component: () => import('@/views/ncs-linux-version/linuxVersionSetting'),
  708. name: 'admin-linux-version',
  709. meta: { title: i18n.t('tab.linuxVersion'), icon: 'nested', noCache: true },
  710. hidden: !enableLinux
  711. },
  712. {
  713. path: 'led_device',
  714. component: () => import('@/views/ncs-led/led-admin'),
  715. name: 'admin-led-device',
  716. meta: { title: i18n.t('tab.ledDeviceManager'), icon: 'led', noCache: true }
  717. },
  718. {
  719. path: 'device_type',
  720. component: () => import('@/views/ncs-orginazition/device-type.vue'),
  721. name: 'admin-device-type',
  722. meta: { title: i18n.t('deviceManage.deviceType'), icon: 'component', noCache: true }
  723. }
  724. ]
  725. },
  726. {
  727. path: '/event',
  728. component: Layout,
  729. redirect: '/event/index',
  730. children: [
  731. {
  732. path: 'index',
  733. component: () => import('@/views/ncs-event/eventManagement'),
  734. name: 'admin-event',
  735. meta: { title: i18n.t('tab.eventManage'), icon: 'el-icon-notebook-2', noCache: true }
  736. }
  737. ]
  738. },
  739. {
  740. path: '/his',
  741. component: Layout,
  742. redirect: '/his/index',
  743. children: [
  744. {
  745. path: 'index',
  746. component: () => import('@/views/ncs-his/hisManagement'),
  747. name: 'admin-hist',
  748. meta: { title: i18n.t('tab.hisManage'), icon: 'el-icon-search', noCache: true }
  749. },
  750. {
  751. path: 'patient/:keyval?',
  752. component: () => import('@/views/ncs-his/his-patient/hisPatientManage'),
  753. name: 'admin-his-patient',
  754. meta: { title: i18n.t('his.hisPatient'), icon: 'el-icon-search', noCache: true },
  755. hidden: true
  756. },
  757. {
  758. path: 'clerk/:keyval?',
  759. component: () => import('@/views/ncs-his/his-clerk/hisClerkManager'),
  760. name: 'admin-his-clerk',
  761. meta: { title: i18n.t('his.hisClerk'), icon: 'el-icon-search', noCache: true },
  762. hidden: true
  763. },
  764. {
  765. path: 'nurse_config/:keyval?',
  766. component: () => import('@/views/ncs-his/his-nurse-config/hisNurseConfigManager'),
  767. name: 'admin-his-nurse-config',
  768. meta: { title: i18n.t('his.hisNurseConfig'), icon: 'el-icon-search', noCache: true },
  769. hidden: true
  770. }
  771. ]
  772. },
  773. {
  774. path: '/error_log',
  775. component: Layout,
  776. redirect: '/error_log/index',
  777. children: [
  778. {
  779. path: 'index',
  780. component: () => import('@/views/calling-ncError/index'),
  781. name: 'admin-error-log',
  782. meta: { title: i18n.t('tab.errorLog'), icon: 'bug', noCache: true }
  783. }
  784. ]
  785. },
  786. {
  787. path: '/system_config',
  788. component: Layout,
  789. redirect: '/system_config/index',
  790. children: [
  791. {
  792. path: 'index',
  793. component: () => import('@/views/ncs-system-config/index'),
  794. name: 'admin-system-config',
  795. meta: { title: i18n.t('tab.systemConfig'), icon: 'nested', noCache: true }
  796. }
  797. ]
  798. }, {
  799. path: '/menu',
  800. component: Layout,
  801. redirect: '/menu/index',
  802. children: [
  803. {
  804. path: 'index',
  805. component: () => import('@/views/ncs-menu/menuManager'),
  806. name: 'admin-menu',
  807. meta: { title: i18n.t('tab.menuManage'), icon: 'function', noCache: true }
  808. }
  809. ]
  810. },
  811. {
  812. path: '/orginazition',
  813. component: Layout,
  814. redirect: '/orginazition/index',
  815. children: [
  816. {
  817. path: 'index',
  818. component: () => import('@/views/ncs-orginazition/index'),
  819. name: 'admin-organization',
  820. meta: { title: i18n.t('tab.organization'), icon: 'tree', noCache: true }
  821. }, {
  822. path: 'index/:id?',
  823. component: () => import('@/views/ncs-orginazition/partInfoSetting'),
  824. name: 'admin-part-settings',
  825. meta: { title: i18n.t('tab.shopSetting'), icon: 'nested', noCache: true },
  826. hidden: true
  827. }
  828. ]
  829. },
  830. {
  831. path: '/rolemanager',
  832. component: Layout,
  833. redirect: '/rolemanager/index',
  834. children: [
  835. {
  836. path: 'index',
  837. component: () => import('@/views/ncs-auth/superadmin/defaultRoleManager'),
  838. name: 'admin-rolemanager',
  839. meta: { title: i18n.t('tab.roleManage'), icon: 'authen', noCache: true }
  840. }
  841. ]
  842. },
  843. {
  844. path: '/485',
  845. component: Layout,
  846. redirect: '/485/index',
  847. children: [
  848. {
  849. path: 'index',
  850. component: () => import('@/views/ncs-485/index'),
  851. name: 'admin-485-commissioning',
  852. meta: { title: i18n.t('tab.debugging485'), icon: 'authen', noCache: true }
  853. }
  854. ],
  855. hidden: !enable485
  856. },
  857. {
  858. path: '/interaction_push',
  859. component: Layout,
  860. redirect: '/interaction_push/index',
  861. children: [
  862. {
  863. path: 'index',
  864. component: () => import('@/views/ncs-interaction-push-config/index'),
  865. name: 'admin-interaction-push',
  866. meta: { title: i18n.t('tab.interactionPush'), icon: 'el-icon-s-promotion', noCache: true }
  867. },
  868. {
  869. path: 'paramer-config/:id?',
  870. component: () => import('@/views/ncs-interaction-push-config/param-config'),
  871. name: 'admin-interaction-push-config',
  872. meta: { title: i18n.t('tab.interactionPushParamConfig'), icon: 'el-icon-s-promotion', noCache: true },
  873. hidden: true
  874. }
  875. ]
  876. },
  877. {
  878. path: '/convenient_sync',
  879. component: Layout,
  880. redirect: '/convenient_sync/index',
  881. children: [
  882. {
  883. path: 'index',
  884. component: () => import('@/views/convenient-data-sync/index'),
  885. name: 'convenient-data-sync',
  886. meta: { title: i18n.t('tab.convenientDataSync'), icon: 'el-icon-refresh', noCache: true }
  887. }
  888. ]
  889. },
  890. {
  891. path: '/mysql_backups',
  892. component: Layout,
  893. redirect: '/mysql_backups/index',
  894. children: [
  895. {
  896. path: 'index',
  897. component: () => import('@/views/mysql-backups/index'),
  898. name: 'mysql-backups-index',
  899. meta: { title: i18n.t('zy20240205.dataBackup'), icon: 'el-icon-refresh', noCache: true }
  900. }
  901. ]
  902. },
  903. {
  904. path: '/device_frame',
  905. component: Layout,
  906. redirect: '/device_frame/index',
  907. children: [
  908. {
  909. path: 'index',
  910. component: () => import('@/views/ncs-orginazition/device-frame'),
  911. name: 'admin-device-frame',
  912. meta: { title: i18n.t('tab.deviceFrame'), icon: 'nested', noCache: true },
  913. hidden: true
  914. }
  915. ]
  916. },
  917. {
  918. path: '/license',
  919. component: Layout,
  920. redirect: '/license/server',
  921. children: [
  922. {
  923. path: 'server',
  924. component: () => import('@/views/ncs-orginazition/server-license'),
  925. name: 'server-license',
  926. meta: { title: i18n.t('partInfo.serverLicense'), icon: 'el-icon-key', noCache: true }
  927. }
  928. ]
  929. },
  930. { path: '*', redirect: '/404', hidden: true }
  931. ]
  932. const createRouter = () => new Router({
  933. mode: 'history', // require service support
  934. scrollBehavior: () => ({ y: 0 }),
  935. routes: constantRoutes
  936. })
  937. const router = createRouter()
  938. // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
  939. export function resetRouter() {
  940. const newRouter = createRouter()
  941. router.matcher = newRouter.matcher // reset router
  942. }
  943. export default router