index.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. import { createRouter, createWebHistory } from 'vue-router'
  2. export const constantRoutes = [
  3. {
  4. path: '/',
  5. redirect: {
  6. path: '/wxService',
  7. },
  8. },
  9. {
  10. path: '/wxService/:code?/:to?',
  11. component: () => import('../views/Home.vue'),
  12. meta: { title: '医疗服务' },
  13. children: [
  14. {
  15. path: '/hospitalService/:code?/:to?',
  16. component: () => import('../views/hospital-service/HospitalServiceHome.vue'),
  17. meta: {
  18. title: '医疗服务',
  19. },
  20. },
  21. {
  22. path: '/hospitalIntroduction/:code?/:to?',
  23. component: () => import('../views/hospital-info/HospitalIntroduction.vue'),
  24. meta: {
  25. title: '医院信息',
  26. },
  27. },
  28. {
  29. path: '/mine/:code?/:to?',
  30. component: () => import('../views/mine/MineHome.vue'),
  31. meta: {
  32. title: '个人中心',
  33. },
  34. },
  35. ],
  36. },
  37. {
  38. path: '/myPatientIdCards',
  39. component: () => import('../views/mine/patient-id-cards/MyPatientIdCards.vue'),
  40. meta: { title: '我的就诊人' },
  41. },
  42. {
  43. path: '/bindPatientCard',
  44. component: () => import('../views/mine/patient-id-cards/BindPatientCard.vue'),
  45. meta: { title: '添加就诊人' },
  46. },
  47. {
  48. path: '/createPatientCard',
  49. component: () => import('../views/mine/patient-id-cards/CreatePatientCard.vue'),
  50. meta: { title: '新建就诊人' },
  51. },
  52. {
  53. path: '/appointment',
  54. component: () => import('../views/hospital-service/appointment/Appointment.vue'),
  55. meta: { title: '预约挂号' },
  56. },
  57. {
  58. path: '/nightClinic',
  59. component: () => import('../views/hospital-service/appointment/night-clinic/ChooseDepartment.vue'),
  60. meta: { title: '夜间门诊' },
  61. },
  62. {
  63. path: '/selectDoctorAndDate/:deptCode/:deptName/:nightClinic',
  64. component: () => import('../views/hospital-service/appointment/SelectDoctorAndDate.vue'),
  65. meta: { title: '' },
  66. },
  67. {
  68. path: '/doctorArrangement/:date/:dept/:doctor',
  69. component: () => import('../views/hospital-service/appointment/DoctorArrangement.vue'),
  70. meta: {
  71. title: '医生排班',
  72. },
  73. },
  74. {
  75. path: '/appointmentConfirm',
  76. component: () => import('../views/hospital-service/appointment/AppointmentConfirm.vue'),
  77. meta: { title: '挂号确认' },
  78. },
  79. {
  80. path: '/payClinicAppointmentOrder/:patientId/:times',
  81. component: () => import('../views/hospital-service/appointment/PayClinicAppointmentOrder.vue'),
  82. meta: { title: '挂号支付' },
  83. },
  84. {
  85. path: '/selectTargetPatient',
  86. component: () => import('../views/hospital-service/appointment/management/SelectTargetPatient.vue'),
  87. meta: { title: '选择就诊人' },
  88. },
  89. {
  90. path: '/appointmentManagement/:patientId',
  91. component: () => import('../views/hospital-service/appointment/management/AppointmentManagement.vue'),
  92. meta: { title: '挂号管理' },
  93. },
  94. {
  95. path: '/refundAppointment/:patientId/:times',
  96. component: () => import('../views/hospital-service/appointment/management/RefundAppointment.vue'),
  97. meta: { title: '退号退费' },
  98. },
  99. {
  100. path: '/selectPayPatient',
  101. component: () => import('../views/hospital-service/pay-mz-fee/SelectPayPatient.vue'),
  102. meta: { title: '选择就诊人' },
  103. },
  104. {
  105. path: '/unPaidList/:patientId',
  106. component: () => import('../views/hospital-service/pay-mz-fee/UnPaidList.vue'),
  107. meta: { title: '待缴费列表' },
  108. },
  109. {
  110. path: '/fromGuideBillQrScan/:patientId',
  111. component: () => import('../views/hospital-service/pay-mz-fee/FromGuideBillQrScan.vue'),
  112. meta: { title: '待缴费列表' },
  113. },
  114. {
  115. path: '/medinsSettle/:patientId/:hisOrdNum/:patientName/:deptName/:doctorName/:mdtrtId',
  116. name: 'medinsSettle',
  117. component: () => import('../views/hospital-service/pay-mz-fee/MedInsSettle.vue'),
  118. meta: { title: '医保结算' },
  119. },
  120. {
  121. path: '/unPaidDetail/:patientId/:hisOrdNum/:patientName/:deptName/:doctorCode/:doctorName/:totalAmt/:selfAmt/:fundPay?/:acctPay?',
  122. name: 'unPaidDetail',
  123. component: () => import('../views/hospital-service/pay-mz-fee/UnPaidDetail.vue'),
  124. meta: { title: '待缴费详情' },
  125. },
  126. {
  127. path: '/selectExamPatient',
  128. component: () => import('../views/hospital-service/check-exam/SelectExamPatient.vue'),
  129. meta: { title: '选择就诊人' },
  130. },
  131. {
  132. path: '/checkExamIndex/:patientId',
  133. component: () => import('../views/hospital-service/check-exam/CheckExamIndex.vue'),
  134. meta: { title: '报告查询' },
  135. },
  136. {
  137. path: '/checkExamDetail/:orderId/:patientId',
  138. component: () => import('../views/hospital-service/check-exam/CheckExamDetail.vue'),
  139. meta: { title: '报告详情' },
  140. },
  141. {
  142. path: '/selectPhysicalExamPatient',
  143. component: () => import('../views/hospital-service/physical-exam/PhysicalExamPatient.vue'),
  144. meta: { title: '选择就诊人' },
  145. },
  146. {
  147. path: '/physicalExamIndex/:patientId',
  148. component: () => import('../views/hospital-service/physical-exam/PhysicalExamIndex.vue'),
  149. meta: { title: '体检报告' },
  150. },
  151. {
  152. path: '/selectInpatientCard',
  153. component: () => import('../views/hospital-service/inpatient-service/SelectInpatientCard.vue'),
  154. meta: { title: '住院查询' },
  155. },
  156. {
  157. path: '/inPatientService/:patientId',
  158. component: () => import('../views/hospital-service/inpatient-service/InPatientService.vue'),
  159. meta: { title: '住院服务' },
  160. },
  161. {
  162. path: '/zyFeeDetail/:inpatientNo/:admissTimes/:admissDate',
  163. name: 'zyFeeDetail',
  164. component: () => import('../views/hospital-service/inpatient-service/ZyFeeDetail.vue'),
  165. meta: { title: '住院费用明细' },
  166. },
  167. {
  168. path: '/displayPrepaid/:patientId/:name/:inpatientNo/:admissTimes/:deptName/:lastBalance',
  169. name: 'displayPrepaid',
  170. component: () => import('../views/hospital-service/inpatient-service/DisplayPrepaid.vue'),
  171. meta: { title: '预交金' },
  172. },
  173. {
  174. path: '/selectHealthCartPatient',
  175. component: () => import('../views/hospital-service/health-cart/SelectPatientCard.vue'),
  176. meta: { title: '选择就诊人' },
  177. },
  178. {
  179. path: '/healthCartCategory/:patientId',
  180. component: () => import('../views/hospital-service/health-cart/ExaminationCategory.vue'),
  181. meta: { title: '类别选择' },
  182. },
  183. {
  184. path: '/bookableExaminations/:flag/:patientId',
  185. component: () => import('../views/hospital-service/health-cart/BookableExaminations.vue'),
  186. meta: { title: '可预约项目' },
  187. },
  188. {
  189. path: '/selectBookDate',
  190. component: () => import('../views/hospital-service/health-cart/SelectBookDate.vue'),
  191. meta: { title: '可预约时间' },
  192. },
  193. {
  194. path: '/bookExam',
  195. component: () => import('../views/hospital-service/health-cart/BookExam.vue'),
  196. meta: { title: '预约详情' },
  197. },
  198. {
  199. path: '/resignOrRefund/:reqNo',
  200. component: () => import('../views/hospital-service/health-cart/ResignOrRefund.vue'),
  201. meta: { title: '未成功的预约' },
  202. },
  203. {
  204. path: '/selectAppointmentRecordPatient',
  205. component: () => import('../views/mine/appointment-record/SelectPatientCard.vue'),
  206. meta: { title: '选择就诊人' },
  207. },
  208. {
  209. path: '/appiontmentRecords/:patientId',
  210. component: () => import('../views/mine/appointment-record/AppointmentRecords.vue'),
  211. meta: { title: '挂号记录' },
  212. },
  213. {
  214. path: '/selectMzFeePaymentRecordPatient',
  215. component: () => import('../views/mine/mz-pay-record/SelectPatientCard.vue'),
  216. meta: { title: '选择就诊人' },
  217. },
  218. {
  219. path: '/mzFeePaymentRecords/:patientId',
  220. component: () => import('../views/mine/mz-pay-record/MzFeePaymentRecords.vue'),
  221. meta: { title: '门诊缴费记录' },
  222. },
  223. {
  224. path: '/mzFeePaymentDetail/:deptName/:doctorName/:datetime/:hisOrdNum/:totalAmt',
  225. name: 'mzFeePaymentDetail',
  226. component: () => import('../views/mine/mz-pay-record/MzFeePaymentDetail.vue'),
  227. meta: { title: '门诊缴费详细' },
  228. },
  229. {
  230. path: '/selectZyYjjPatient',
  231. component: () => import('../views/mine/zy-prepaid-record/SelectPatientCard.vue'),
  232. meta: { title: '选择就诊人' },
  233. },
  234. {
  235. path: '/prepaidRecord/:patientId',
  236. component: () => import('../views/mine/zy-prepaid-record/PrepaidRecord.vue'),
  237. meta: { title: '住院预交金记录' },
  238. },
  239. {
  240. path: '/myCollection',
  241. component: () => import('../views/mine/my-collection/MyCollection.vue'),
  242. meta: { title: '我的收藏' },
  243. },
  244. {
  245. path: '/myCoupons',
  246. component: () => import('../views/mine/my-coupons/MyCoupons.vue'),
  247. meta: { title: '我的卡券' },
  248. },
  249. {
  250. path: '/patientCardInfo/:patientId',
  251. component: () => import('../views/mine/patient-id-cards/PatientCardInfo.vue'),
  252. meta: { title: '就诊人信息' },
  253. },
  254. {
  255. path: '/selectAssessmentPatient',
  256. component: () => import('../views/hospital-service/assessments/SelectAssessmentPatient.vue'),
  257. meta: { title: '选择问卷填写人' },
  258. },
  259. {
  260. path: '/assessments/:patientId',
  261. component: () => import('../views/hospital-service/assessments/AssessmentsEntrance.vue'),
  262. meta: {
  263. title: '问卷选择',
  264. },
  265. },
  266. {
  267. path: '/assessments/depression/:patientId',
  268. component: () => import('../views/hospital-service/assessments/DepressionAssessment.vue'),
  269. meta: {
  270. title: 'SDS抑郁自评量',
  271. },
  272. },
  273. {
  274. path: '/assessments/clinicSatisfied/:patientId',
  275. component: () => import('../views/hospital-service/assessments/ClinicSatisfiedAssessment.vue'),
  276. meta: {
  277. title: '门诊服务满意度调查',
  278. },
  279. },
  280. {
  281. path: '/clinicSatisfiedByPush/:patientId',
  282. component: () => import('../views/hospital-service/assessments/ClinicSatisfiedAssessment.vue'),
  283. meta: {
  284. title: '门诊服务满意度调查',
  285. },
  286. },
  287. {
  288. path: '/assessments/inpatientSatisfied/:visitId',
  289. component: () => import('../views/hospital-service/assessments/InpatientSatisfiedAssessment.vue'),
  290. meta: {
  291. title: '住院服务满意度调查',
  292. },
  293. },
  294. {
  295. path: '/inpatientSatisfiedByPush/:visitId',
  296. component: () => import('../views/hospital-service/assessments/InpatientSatisfiedAssessment.vue'),
  297. meta: {
  298. title: '住院服务满意度调查',
  299. },
  300. },
  301. {
  302. path: '/assessments/covid/:patientId?/:from?',
  303. component: () => import('../views/hospital-service/assessments/Covid19Assessment.vue'),
  304. meta: {
  305. title: '新型冠状病毒感染流行病学史问卷',
  306. },
  307. },
  308. {
  309. path: '/onlineConsult',
  310. component: () => import('../views/hospital-service/online-consult/OnlineConsult.vue'),
  311. meta: {
  312. title: '在线咨询',
  313. },
  314. },
  315. {
  316. path: '/studentInspection',
  317. component: () => import('../views/isolations/StudentInspection.vue'),
  318. meta: {
  319. title: '学生体检',
  320. },
  321. },
  322. {
  323. path: '/healthEducation',
  324. component: () => import('../views/isolations/HealthEducation.vue'),
  325. meta: {
  326. title: '健康宣教',
  327. },
  328. },
  329. {
  330. path: '/receiveCoupon/:key',
  331. component: () => import('../views/isolations/ReceiveCoupon.vue'),
  332. meta: {
  333. title: '领取优惠券',
  334. },
  335. },
  336. {
  337. path: '/selectPriceQueryBranch',
  338. component: () => import('../views/hospital-service/query-price/SelectPriceQueryBranch.vue'),
  339. meta: {
  340. title: '价格查询',
  341. },
  342. },
  343. {
  344. path: '/queryMedicinePrice',
  345. component: () => import('../views/hospital-service/query-price/QueryMedicinePrice.vue'),
  346. meta: {
  347. title: '药品价格查询',
  348. },
  349. },
  350. {
  351. path: '/queryItemPrice',
  352. component: () => import('../views/hospital-service/query-price/QueryItemPrice.vue'),
  353. meta: {
  354. title: '项目价格查询',
  355. },
  356. },
  357. {
  358. path: '/electronicHealthCardHome',
  359. component: () => import('../views/hospital-service/electronic-health-card/ElectronicHealthCardHome.vue'),
  360. meta: {
  361. title: '电子健康卡',
  362. },
  363. },
  364. {
  365. path: '/addElectronicHealthCard',
  366. component: () => import('../views/hospital-service/electronic-health-card/AddElectronicHealthCard.vue'),
  367. meta: {
  368. title: '添加健康卡',
  369. },
  370. },
  371. {
  372. path: '/linkHealthCardResult',
  373. component: () => import('../views/hospital-service/electronic-health-card/LinkHealthCardResult.vue'),
  374. meta: {
  375. title: '结果页',
  376. },
  377. },
  378. {
  379. path: '/activeHealthCard',
  380. component: () => import('../views/hospital-service/electronic-health-card/ActiveHealthCard.vue'),
  381. meta: {
  382. title: '激活健康卡',
  383. },
  384. },
  385. {
  386. path: '/showCardQrCode',
  387. name: 'showCardQrCode',
  388. component: () => import('../views/hospital-service/electronic-health-card/ShowCardQrCode.vue'),
  389. meta: {
  390. title: '我的健康卡',
  391. },
  392. },
  393. {
  394. path: '/newUserRegForElectronicHealthCard',
  395. component: () => import('../views/hospital-service/electronic-health-card/NewUserReg.vue'),
  396. meta: {
  397. title: '新用户注册',
  398. },
  399. },
  400. {
  401. path: '/shareholdersEquity',
  402. component: () => import('../views/hospital-service/shareholder/ShareholdersEquity.vue'),
  403. meta: {
  404. title: '股东权益',
  405. },
  406. },
  407. {
  408. path: '/chronicDisease',
  409. component: () => import('../views/isolations/ChronicDisease.vue'),
  410. meta: {
  411. title: '慢病患者登记表',
  412. },
  413. },
  414. {
  415. path: '/cashier',
  416. name: 'cashier',
  417. component: () => import('../views/public-pages/Cashier.vue'),
  418. meta: {
  419. title: '收银台'
  420. }
  421. },
  422. {
  423. path: '/resultSuccess/:title?/:subtitle?',
  424. name: 'resultSuccess',
  425. component: () => import('../views/public-pages/ResultSuccess.vue'),
  426. meta: {
  427. title: '',
  428. },
  429. },
  430. {
  431. path: '/paymentSuccess',
  432. name: 'paymentSuccess',
  433. component: () => import('../views/public-pages/PaymentSuccess.vue'),
  434. meta: {
  435. title: '支付完成'
  436. }
  437. },
  438. {
  439. path: '/500',
  440. component: () => import('../views/500.vue'),
  441. meta: {
  442. title: '服务器错误',
  443. },
  444. },
  445. {
  446. path: '/404',
  447. component: () => import('../views/404.vue'),
  448. meta: {
  449. title: '网页未找到',
  450. },
  451. },
  452. {
  453. // 找不到路由重定向到404页面
  454. path: '/:pathMatch(.*)',
  455. redirect: '/404',
  456. },
  457. ]
  458. const router = createRouter({
  459. history: createWebHistory(),
  460. routes: constantRoutes,
  461. })
  462. router.beforeEach((to, from, next) => {
  463. if (to.fullPath.startsWith('/selectDoctorAndDate')) {
  464. to.meta.title = to.params.deptName
  465. }
  466. document.title = to.meta.title
  467. next()
  468. })
  469. export default router