state.dart 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import 'package:fis_jsonrpc/rpc.dart';
  2. import 'package:get/get_rx/src/rx_types/rx_types.dart';
  3. import 'package:vitalapp/consts/rpc_enum_labels.dart';
  4. import 'package:vitalapp/pages/check/follow_up/models/select_model.dart';
  5. class FollowUpState {
  6. final Rx<DateTime?> _followUpTime = Rx(
  7. DateTime(
  8. DateTime.now().year,
  9. DateTime.now().month,
  10. DateTime.now().day,
  11. 23,
  12. 59,
  13. 59,
  14. ),
  15. );
  16. final Rx<DateTime?> _nextFollowUpTime = Rx(null);
  17. final Rx<FollowUpModeEnum?> _followUpMode = Rx(FollowUpModeEnum.Outpatient);
  18. final Rx<String?> _followUpPhoto = Rx('');
  19. final Rx<FollowUpChild3_6YearEnum?> _followUp3_6_Year =
  20. Rx(FollowUpChild3_6YearEnum.ThreeYear);
  21. DateTime? get followUpTime => _followUpTime.value;
  22. set followUpTime(DateTime? val) => _followUpTime.value = val;
  23. DateTime? get nextFollowUpTime => _nextFollowUpTime.value;
  24. set nextFollowUpTime(DateTime? val) => _nextFollowUpTime.value = val;
  25. FollowUpModeEnum? get followUpMode => _followUpMode.value;
  26. set followUpMode(FollowUpModeEnum? val) => _followUpMode.value = val;
  27. FollowUpChild3_6YearEnum? get followUp3_6_Year => _followUp3_6_Year.value;
  28. set followUp3_6_Year(FollowUpChild3_6YearEnum? val) =>
  29. _followUp3_6_Year.value = val;
  30. String? get followUpPhoto => _followUpPhoto.value;
  31. set followUpPhoto(String? val) => _followUpPhoto.value = val;
  32. final followUpModeEnumSelectList = [
  33. SelectModel<FollowUpModeEnum>(
  34. code: FollowUpModeEnum.Outpatient, name: '门诊'),
  35. SelectModel<FollowUpModeEnum>(code: FollowUpModeEnum.Visit, name: '家庭'),
  36. SelectModel<FollowUpModeEnum>(code: FollowUpModeEnum.Phone, name: '电话'),
  37. ];
  38. final followUpChild3_6YearSelectList = [
  39. SelectModel<FollowUpChild3_6YearEnum>(
  40. code: FollowUpChild3_6YearEnum.ThreeYear,
  41. name: '3岁',
  42. ),
  43. SelectModel<FollowUpChild3_6YearEnum>(
  44. code: FollowUpChild3_6YearEnum.FourYear,
  45. name: '4岁',
  46. ),
  47. SelectModel<FollowUpChild3_6YearEnum>(
  48. code: FollowUpChild3_6YearEnum.FiveYear,
  49. name: '5岁',
  50. ),
  51. SelectModel<FollowUpChild3_6YearEnum>(
  52. code: FollowUpChild3_6YearEnum.SixYear,
  53. name: '6岁',
  54. ),
  55. ];
  56. }