This commit is contained in:
wyf
2025-05-23 14:51:09 +08:00
parent 8a418c9c98
commit c650bad8b1
36 changed files with 1297 additions and 892 deletions

View File

@@ -38,13 +38,13 @@ class PersonController extends GetControllerEx<PersonModel> {
attr = GetModel(PersonModel()).obs;
}
RxList selectedDiseaseIds = [].obs;
RxString currentPersonId = "".obs;
RxString name = "".obs;
RxInt gender = 1.obs;
RxString birthday = "".obs;
RxInt weight = 65.obs;
RxInt height = 175.obs;
RxString weight = "".obs;
RxString height = "".obs;
DateTime? dateTime = DateTime.now(); //选择时间
RxList diseaseList = [].obs;
@@ -70,15 +70,15 @@ class PersonController extends GetControllerEx<PersonModel> {
apiResponse.msg = "请输入姓名".tr;
return apiResponse;
}
// if (birthday.value.isEmpty) {
// apiResponse.msg = "请选择生日".tr;
// return apiResponse;
// }
if (weight.value == 0) {
if (birthday.value.isEmpty) {
apiResponse.msg = "请选择生日".tr;
return apiResponse;
}
if (weight == null || weight.value.isEmpty) {
apiResponse.msg = "请输入体重".tr;
return apiResponse;
}
if (height.value == 0) {
if (height == null || height.value.isEmpty) {
apiResponse.msg = "请输入身高".tr;
return apiResponse;
}
@@ -90,7 +90,7 @@ class PersonController extends GetControllerEx<PersonModel> {
"birthday": (birthday.value == null || birthday.value!.isEmpty)
? MyUtils.formatBindTime(dateTime!)
: birthday.value,
"weight": weight.value,
"weight": weight!.value,
"height": height.value,
"disease": selectedDiseaseIds.value,
};