You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

288 lines
8.2 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. import Vue from "vue";
  2. import VueRouter from "vue-router";
  3. // import HomeView from "../views/HomeView.vue";
  4. import login from "@/views/login/Login.vue";
  5. Vue.use(VueRouter);
  6. // const originalpush = VueRouter.prototype.push
  7. // VueRouter.prototype.push = function (location) {
  8. // return originalpush.call(this, location).catch(err => err)
  9. // }
  10. const routes = [
  11. {
  12. path: "/",
  13. component: login,
  14. },
  15. {
  16. path: "/login",
  17. name: "login",
  18. component: () => import("../views/login/Login.vue"),
  19. },
  20. {
  21. path: "/home",
  22. name: "home",
  23. component: () =>
  24. import(/* webpackChunkName: "about" */ "../views/Home.vue"),
  25. children: [
  26. {
  27. path: "/role",
  28. component: () => import("../views/user-list/Role.vue"),
  29. },
  30. {
  31. path: "/user-list",
  32. component: () => import("../views/user-list/UserList.vue"),
  33. },
  34. {
  35. path: "/organization-units",
  36. component: () => import("../views/user-list/OrganizationUnits.vue"),
  37. },
  38. {
  39. path: "/audit-log",
  40. component: () => import("../views/user-list/AuditLog.vue"),
  41. },
  42. {
  43. path: "/guide-type",
  44. component: () => import("../views/basic-dictionary/GuideType.vue"),
  45. },
  46. {
  47. path: "/medical-report-type",
  48. component: () =>
  49. import("../views/basic-dictionary/MedicalReportType.vue"),
  50. },
  51. {
  52. path: "/sex",
  53. component: () => import("../views/basic-dictionary/Sex.vue"),
  54. },
  55. {
  56. path: "/marital-status",
  57. component: () => import("../views/basic-dictionary/MaritalStatus.vue"),
  58. },
  59. {
  60. path: "/nation",
  61. component: () => import("../views/basic-dictionary/Nation.vue"),
  62. },
  63. {
  64. path: "/birth-place",
  65. component: () => import("../views/basic-dictionary/BirthPlace.vue"),
  66. },
  67. {
  68. path: "/result-status",
  69. component: () => import("../views/basic-dictionary/ResultStatus.vue"),
  70. },
  71. {
  72. path: "/medical-type",
  73. component: () => import("../views/basic-dictionary/MedicalType.vue"),
  74. },
  75. {
  76. path: "/personnel-type",
  77. component: () => import("../views/basic-dictionary/PersonnelType.vue"),
  78. },
  79. {
  80. path: "/device-type",
  81. component: () => import("../views/basic-dictionary/DeviceType.vue"),
  82. },
  83. {
  84. path: "/sample-type",
  85. component: () => import("../views/basic-dictionary/SampleType.vue"),
  86. },
  87. {
  88. path: "/unit",
  89. component: () => import("../views/basic-dictionary/Unit.vue"),
  90. },
  91. {
  92. path: "/diagnosis-postfix",
  93. component: () =>
  94. import("../views/basic-dictionary/DiagnosisPostfix.vue"),
  95. },
  96. {
  97. path: "/medical-conclusion-type",
  98. component: () =>
  99. import("../views/basic-dictionary/MedicalConclusionType.vue"),
  100. },
  101. {
  102. path: "/medical-conclusion",
  103. component: () =>
  104. import("../views/basic-dictionary/MedicalConclusion.vue"),
  105. },
  106. {
  107. path: "/sample-container",
  108. component: () =>
  109. import("../views/basic-dictionary/SampleContainer.vue"),
  110. },
  111. {
  112. path: "/common-char-type",
  113. component: () => import("../views/basic-dictionary/CommonCharType.vue"),
  114. },
  115. {
  116. path: "/common-char",
  117. component: () => import("../views/basic-dictionary/CommonChar.vue"),
  118. },
  119. {
  120. path: "/customer-org-type",
  121. component: () =>
  122. import("../views/basic-dictionary/CustomerOrgType.vue"),
  123. },
  124. {
  125. path: "/item-default-result",
  126. component: () =>
  127. import("../views/basic-dictionary/ItemDefaultResult.vue"),
  128. },
  129. {
  130. path: "/diagnosis-level",
  131. component: () => import("../views/basic-dictionary/DiagnosisLevel.vue"),
  132. },
  133. {
  134. path: "/invoice-item-type",
  135. component: () => import("../views/fee-settings/InvoiceItemType.vue"),
  136. },
  137. {
  138. path: "/pay-mode",
  139. component: () => import("../views/fee-settings/PayMode.vue"),
  140. },
  141. {
  142. path: "/item-type",
  143. component: () => import("../views/common-settings/ItemType.vue"),
  144. },
  145. {
  146. path: "/sample-group",
  147. component: () => import("../views/common-settings/SampleGroup.vue"),
  148. },
  149. {
  150. path: "/asbitem",
  151. component: () => import("../views/fee-settings/Asbitem.vue"),
  152. },
  153. {
  154. path: "/item",
  155. component: () => import("../views/fee-settings/Item.vue"),
  156. },
  157. {
  158. path: "/reference-range",
  159. component: () => import("../views/fee-settings/ReferenceRange.vue"),
  160. },
  161. {
  162. path: "/diagnosis",
  163. component: () => import("../views/fee-settings/Diagnosis.vue"),
  164. hidden: true,
  165. // meta: {
  166. // title: '诊断',
  167. // menu
  168. // }
  169. meat: {
  170. title: "诊断",
  171. noCache: true,
  172. menus: ["diagosis:advertDemandRelease"],
  173. },
  174. },
  175. {
  176. path: "/item-result-template",
  177. component: () => import("../views/fee-settings/ItemResultTemplate.vue"),
  178. },
  179. {
  180. path: "/item-result-match",
  181. component: () => import("../views/fee-settings/ItemResultMatch.vue"),
  182. },
  183. {
  184. path: "/item-template",
  185. component: () => import("../views/fee-settings/ItemTemplate.vue"),
  186. },
  187. {
  188. path: "/medical-package",
  189. component: () => import("../views/fee-settings/MedicalPackage.vue"),
  190. },
  191. {
  192. path: "/sex-hormone-reference-range",
  193. component: () =>
  194. import("../views/fee-settings/SexHormoneReferenceRange.vue"),
  195. },
  196. {
  197. path: "/diagnosis-template",
  198. component: () => import("../views/fee-settings/DiagnosisTemplate.vue"),
  199. },
  200. {
  201. path: "/sys-parm-type",
  202. component: () => import("../views/fee-settings/SysParmSet.vue"), //../views/fee-settings/SysParmType.vue
  203. },
  204. //---------------------- 体检登记 start ----------------------
  205. {
  206. path: "/customerOrg",
  207. name: "体检单位设置",
  208. component: () => import("../views/customerOrg/customerOrg.vue"),
  209. },
  210. {
  211. path: "/customerOrgGroup",
  212. name: "单位分组设置",
  213. component: () => import("../views/customerOrg/customerOrgGroup.vue"),
  214. },
  215. {
  216. path: "/patientRegister",
  217. name: "体检人员登记",
  218. component: () => import("../views/customerOrg/patientRegister.vue"),
  219. },
  220. {
  221. path: "/patientRegisterSign",
  222. name: "体检人员签到",
  223. component: () => import("../views/customerOrg/patientRegisterSign.vue"),
  224. },
  225. {
  226. path: "/patientRegisterRecover",
  227. name: "体检表回收",
  228. component: () =>
  229. import("../views/customerOrg/patientRegisterRecover.vue"),
  230. },
  231. {
  232. path: "/patientRegisterRefuse",
  233. name: "弃检登记",
  234. component: () =>
  235. import("../views/customerOrg/patientRegisterRefuse.vue"),
  236. },
  237. //---------------------- 体检登记 start ----------------------
  238. //---------------------- 体 检 start ----------------------
  239. {
  240. path: "/doctorCheck",
  241. name: "体检医生诊台",
  242. component: () => import("../views/doctorCheck/doctorCheck.vue"),
  243. },
  244. {
  245. path: "/sumDoctorCheck",
  246. name: "总检医生诊台",
  247. component: () => import("../views/doctorCheck/sumDoctorCheck.vue"),
  248. },
  249. {
  250. path: "/personnelBatch",
  251. name: "人员预约登记",
  252. component: () => import("../views/doctorCheck/personnelBatch.vue"),
  253. },
  254. //---------------------- 体 检 end ----------------------
  255. ],
  256. },
  257. ];
  258. const router = new VueRouter({
  259. //mode: "history",
  260. //base: process.env.BASE_URL,
  261. routes,
  262. });
  263. router.beforeEach((to, form, next) => {
  264. let token = localStorage.getItem("token");
  265. let tokentype = localStorage.getItem("tokentype");
  266. if (to.path === "/login") {
  267. if (token != null) {
  268. next({
  269. path: "/",
  270. });
  271. } else {
  272. next();
  273. }
  274. } else {
  275. if (token == null) {
  276. next({
  277. path: "/login",
  278. });
  279. } else {
  280. next();
  281. }
  282. }
  283. });
  284. export default router;