routes.dart 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. import 'package:get/get.dart';
  2. import 'package:vitalapp/pages/admin/controller.dart';
  3. import 'package:vitalapp/pages/admin/view.dart';
  4. import 'package:vitalapp/pages/contract/package_list/widgets/capture_portrait.dart';
  5. import 'package:vitalapp/pages/contract/package_list/widgets/family_doctor_service_package.dart';
  6. import 'package:vitalapp/pages/contract/package_list/widgets/personal_information.dart';
  7. import 'package:vitalapp/pages/contract/package_list/widgets/remark.dart';
  8. import 'package:vitalapp/pages/contract/package_list/widgets/service_information.dart';
  9. import 'package:vitalapp/pages/data_sync/index/controller.dart';
  10. import 'package:vitalapp/pages/data_sync/index/view.dart';
  11. import 'package:vitalapp/pages/from_page/controller.dart';
  12. import 'package:vitalapp/pages/check/follow_up_record/controller.dart';
  13. import 'package:vitalapp/pages/check/follow_up_record/view.dart';
  14. import 'package:vitalapp/pages/home/personal_center/controller.dart';
  15. import 'package:vitalapp/pages/home/personal_center/view.dart';
  16. import 'package:vitalapp/pages/medical/controller.dart';
  17. import 'package:vitalapp/pages/medical/records/controller.dart';
  18. import 'package:vitalapp/pages/medical/records/view.dart';
  19. import 'package:vitalapp/pages/medical/view.dart';
  20. import 'package:vitalapp/pages/patient/create/widgets/quick_create.dart';
  21. import 'package:vitalapp/pages/redirect/redirect.dart';
  22. import 'package:vitalapp/pages/settings/center/controller.dart';
  23. import 'package:vitalapp/pages/settings/center/view.dart';
  24. import 'package:vitalapp/pages/settings/devices/controller.dart';
  25. import 'package:vitalapp/pages/settings/server/controller.dart';
  26. import 'package:vitalapp/routes/route_setting.dart';
  27. import 'package:vitalapp/pages/check/examination/controller.dart';
  28. import 'package:vitalapp/pages/check/examination/view.dart';
  29. import 'package:vitalapp/pages/check/follow_up/controller.dart';
  30. import 'package:vitalapp/pages/check/follow_up/view.dart';
  31. import 'package:vitalapp/pages/check/health_check_record/controller.dart';
  32. import 'package:vitalapp/pages/check/health_check_record/view.dart';
  33. import 'package:vitalapp/pages/contract/contract_record_html/controller.dart';
  34. import 'package:vitalapp/pages/contract/contract_records/controller.dart';
  35. import 'package:vitalapp/pages/contract/contract_records/view.dart';
  36. import 'package:vitalapp/pages/contract/contract_template/controller.dart';
  37. import 'package:vitalapp/pages/contract/contract_template/view.dart';
  38. import 'package:vitalapp/pages/contract/package_info/controller.dart';
  39. import 'package:vitalapp/pages/contract/package_info/view.dart';
  40. import 'package:vitalapp/pages/contract/package_list/controller.dart';
  41. import 'package:vitalapp/pages/contract/package_list/view.dart';
  42. import 'package:vitalapp/pages/contract/signature_board/controller.dart';
  43. import 'package:vitalapp/pages/contract/signature_board/view.dart';
  44. import 'package:vitalapp/pages/controllers/crowd_labels.dart';
  45. import 'package:vitalapp/pages/dashboard/controller.dart';
  46. import 'package:vitalapp/pages/dashboard/view.dart';
  47. import 'package:vitalapp/pages/home/controller.dart';
  48. import 'package:vitalapp/pages/home/view.dart';
  49. import 'package:vitalapp/pages/login/controller.dart';
  50. import 'package:vitalapp/pages/login/view.dart';
  51. import 'package:vitalapp/pages/login_gateway/controller.dart';
  52. import 'package:vitalapp/pages/login_gateway/view.dart';
  53. import 'package:vitalapp/pages/patient/create/controller.dart';
  54. import 'package:vitalapp/pages/patient/detail/controller.dart';
  55. import 'package:vitalapp/pages/patient/detail/view.dart';
  56. import 'package:vitalapp/pages/patient/info/controller.dart';
  57. import 'package:vitalapp/pages/patient/info/view.dart';
  58. import 'package:vitalapp/pages/patient/list/controller.dart';
  59. import 'package:vitalapp/pages/patient/list/view.dart';
  60. import 'package:vitalapp/pages/splash/controller.dart';
  61. import 'package:vitalapp/pages/splash/view.dart';
  62. import '../pages/contract/contract_record_html/view.dart';
  63. class Routes {
  64. static Map<String, dynamic> parameters = {};
  65. static final routes = [
  66. VRouteSetting(
  67. '/admin',
  68. () => const AdminPage(),
  69. binding: BindingsBuilder(
  70. () {
  71. Get.put(AdminController());
  72. },
  73. ),
  74. ),
  75. VRouteSetting(
  76. '/redirect',
  77. () => const RedirectPage(),
  78. ),
  79. VRouteSetting(
  80. "/splash",
  81. () => const SplashPage(),
  82. binding: BindingsBuilder(
  83. () {
  84. Get.put(SplashController());
  85. },
  86. ),
  87. ),
  88. VRouteSetting(
  89. "/login",
  90. () => const LoginPage(),
  91. binding: BindingsBuilder(
  92. () {
  93. Get.put(LoginController());
  94. },
  95. ),
  96. ),
  97. VRouteSetting(
  98. "/login/gateway",
  99. () => const LoginGatewayPage(),
  100. binding: BindingsBuilder(
  101. () {
  102. Get.put(LoginGatewayController());
  103. },
  104. ),
  105. ),
  106. VRouteSetting(
  107. "/",
  108. () => const HomePage(),
  109. binding: BindingsBuilder(
  110. () {
  111. Get.put(HomeController());
  112. },
  113. ),
  114. ),
  115. VRouteSetting(
  116. "/dashboard",
  117. // participatesInRootNavigator: false,
  118. // preventDuplicates: true,
  119. () => const DashboardPage(),
  120. binding: BindingsBuilder(
  121. () {
  122. Get.put(DashboardController());
  123. },
  124. ),
  125. ),
  126. // VRouteSetting(
  127. // "/settings",
  128. // () => const SettingsPage(),
  129. // binding: BindingsBuilder(
  130. // () {
  131. // Get.put(SettingsController());
  132. // },
  133. // ),
  134. // ),
  135. VRouteSetting(
  136. "/settings",
  137. () => const SettingCenterPage(),
  138. binding: BindingsBuilder(
  139. () {
  140. Get.lazyPut(() => DevicesSettingController());
  141. Get.lazyPut(() => ServerSettingController());
  142. Get.put(SettingCenterController());
  143. },
  144. ),
  145. ),
  146. VRouteSetting(
  147. "/data_sync",
  148. () => const DataSyncPage(),
  149. binding: BindingsBuilder(
  150. () {
  151. Get.put(DataSyncController());
  152. },
  153. ),
  154. ),
  155. VRouteSetting(
  156. "/patient/create",
  157. // participatesInRootNavigator: false,
  158. // preventDuplicates: true,
  159. () => const QuickCreatePatientPage(),
  160. binding: BindingsBuilder(
  161. () {
  162. Get.lazyPut(() => CrowdLabelsController());
  163. if (!Get.isRegistered<CreatePatientController>()) {
  164. Get.lazyPut(() => CreatePatientController());
  165. }
  166. Get.lazyPut(() => PatientListController());
  167. Get.lazyPut(() => PatientDetailController());
  168. },
  169. ),
  170. ),
  171. VRouteSetting(
  172. "/patient/list",
  173. // participatesInRootNavigator: false,
  174. // preventDuplicates: true,
  175. () => const PatientListPage(),
  176. binding: BindingsBuilder(
  177. () {
  178. Get.lazyPut(() => CrowdLabelsController());
  179. if (!Get.isRegistered<CreatePatientController>()) {
  180. Get.lazyPut(() => CreatePatientController());
  181. }
  182. Get.lazyPut(() => PatientListController());
  183. Get.lazyPut(() => PatientDetailController());
  184. },
  185. ),
  186. ),
  187. VRouteSetting(
  188. "/patient/detail",
  189. // preventDuplicates: true,
  190. () => const PatientDetailPage(),
  191. binding: BindingsBuilder(
  192. () {
  193. Get.put(CrowdLabelsController());
  194. Get.put(PatientDetailController());
  195. },
  196. ),
  197. ),
  198. VRouteSetting(
  199. "/patient/info",
  200. () => const PatientInfoPage(),
  201. binding: BindingsBuilder(
  202. () {
  203. Get.put(PatientInfoController());
  204. },
  205. ),
  206. ),
  207. VRouteSetting(
  208. "/contract/package_list",
  209. () => const ServicePackageContractPage(),
  210. binding: BindingsBuilder(
  211. () {
  212. Get.put(CrowdLabelsController());
  213. Get.put(ServicePackageContractController());
  214. Get.put(FromPageController());
  215. },
  216. ),
  217. ),
  218. VRouteSetting(
  219. "/contract/package_info",
  220. () => const PackageInfoPage(),
  221. binding: BindingsBuilder(
  222. () {
  223. Get.put(PackageInfoController());
  224. },
  225. ),
  226. ),
  227. VRouteSetting(
  228. "/contract/signature",
  229. () => SignatureBoardPage(),
  230. binding: BindingsBuilder(
  231. () {
  232. Get.put(SignatureBoardController());
  233. },
  234. ),
  235. ),
  236. VRouteSetting(
  237. "/contract/contract_template",
  238. () => ContractTemplatePage(),
  239. binding: BindingsBuilder(
  240. () {
  241. Get.put(ContractTemplateController());
  242. },
  243. ),
  244. ),
  245. VRouteSetting(
  246. "/check/form",
  247. () => const ExaminationPage(),
  248. binding: BindingsBuilder(
  249. () {
  250. Get.put(ExaminationController());
  251. },
  252. ),
  253. ),
  254. VRouteSetting(
  255. "/check/follow_up",
  256. () => const FollowUpPage(),
  257. binding: BindingsBuilder(
  258. () {
  259. Get.put(FollowUpController());
  260. },
  261. ),
  262. ),
  263. VRouteSetting(
  264. "/check/healthCheckRecord",
  265. () => const HealthCheckRecordPage(),
  266. binding: BindingsBuilder(
  267. () {
  268. Get.put(HealthCheckRecordController());
  269. },
  270. ),
  271. ),
  272. VRouteSetting(
  273. "/contract/contract_records",
  274. () => const ContractRecordsPage(),
  275. binding: BindingsBuilder(
  276. () {
  277. Get.put(ContractRecordsController());
  278. },
  279. ),
  280. ),
  281. VRouteSetting(
  282. "/contract/contract_record_html",
  283. () => const ContractRecordsHtmlPage(),
  284. binding: BindingsBuilder(
  285. () {
  286. Get.put(ContractRecordsHtmlController());
  287. },
  288. ),
  289. ),
  290. VRouteSetting(
  291. "/contract/package_list/capture_portrait",
  292. () => const CapturePortraitPage(),
  293. binding: BindingsBuilder(
  294. () {
  295. // Get.put(CrowdLabelsController());
  296. // Get.put(ServicePackageContractController());
  297. },
  298. ),
  299. ),
  300. VRouteSetting(
  301. "/contract/package_list/family_doctor_service_package",
  302. () => const FamilyDoctorServicePackagePage(),
  303. binding: BindingsBuilder(
  304. () {
  305. // Get.put(CrowdLabelsController());
  306. // Get.put(ServicePackageContractController());
  307. },
  308. ),
  309. ),
  310. VRouteSetting(
  311. "/contract/package_list/personal_information",
  312. () => const PersonalInformationPage(),
  313. binding: BindingsBuilder(
  314. () {
  315. // Get.put(CrowdLabelsController());
  316. // Get.put(ServicePackageContractController());
  317. },
  318. ),
  319. ),
  320. VRouteSetting(
  321. "/contract/package_list/remark",
  322. () => const RemarkPage(),
  323. binding: BindingsBuilder(
  324. () {
  325. // Get.put(CrowdLabelsController());
  326. // Get.put(ServicePackageContractController());
  327. },
  328. ),
  329. ),
  330. VRouteSetting(
  331. "/contract/package_list/service_information",
  332. () => const ServiceInformationPage(),
  333. binding: BindingsBuilder(() {
  334. // Get.put(CrowdLabelsController());
  335. // Get.put(ServicePackageContractController());
  336. }),
  337. ),
  338. VRouteSetting(
  339. '/check/follow_up_record',
  340. () => const FollowUpRecordPage(),
  341. binding: BindingsBuilder(
  342. () {
  343. Get.put(FollowUpRecordController());
  344. },
  345. ),
  346. ),
  347. VRouteSetting(
  348. '/medical',
  349. () => const MedicalPage(),
  350. binding: BindingsBuilder(
  351. () {
  352. if (!Get.isRegistered<MedicalController>()) {
  353. Get.lazyPut(() => MedicalController());
  354. }
  355. Get.put(PatientDetailController());
  356. },
  357. ),
  358. ),
  359. VRouteSetting(
  360. '/home/personal_center',
  361. () => const PersonalCenterPage(),
  362. binding: BindingsBuilder(
  363. () {
  364. Get.put(PersonalCenterController());
  365. },
  366. ),
  367. ),
  368. VRouteSetting(
  369. '/medical/records',
  370. () => const MedicalRecordsPage(),
  371. binding: BindingsBuilder(
  372. () {
  373. Get.put(MedicalRecordsController());
  374. },
  375. ),
  376. ),
  377. ];
  378. }