更新快检功能
This commit is contained in:
@@ -99,6 +99,7 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
|
||||
final allTexts = [
|
||||
"体征检测设备.首页展示".tr,
|
||||
"体征检测设备.人员资料".tr,
|
||||
"体征检测设备.设备详情".tr,
|
||||
"WIFI配置".tr,
|
||||
"设备校准".tr,
|
||||
@@ -286,6 +287,69 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
? themeController.currentColor.sc2
|
||||
: themeController.currentColor.sc3,
|
||||
),
|
||||
_buildMenuItem(
|
||||
text: "人员资料.标题".tr,
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
_isPopupOpen = false;
|
||||
});
|
||||
_popupEntry?.remove();
|
||||
_popupEntry = null;
|
||||
if (widget.device['person'] != null) {
|
||||
personController.currentPersonId.value = widget.device['_id'];
|
||||
personController.name.value = widget.device['person']['name'];
|
||||
personController.update_person_mac.value = widget.device['mac'];
|
||||
personController.gender.value =
|
||||
widget.device['person']['gender'] ?? 1;
|
||||
personController.weight?.value =
|
||||
widget.device['person']['weight'] == null
|
||||
? ''
|
||||
: widget.device['person']['weight'].toString();
|
||||
|
||||
personController.height.value =
|
||||
widget.device['person']['height'] == null
|
||||
? ''
|
||||
: widget.device['person']['height'].toString();
|
||||
|
||||
personController.selectedDiseaseIds.value =
|
||||
widget.device['person']['disease'] ?? [];
|
||||
personController.birthday.value =
|
||||
widget.device['person']['birthday'] ?? '';
|
||||
personController.dateTime =
|
||||
MyUtils.formatBirthdayTime(widget.device['person']['birthday']);
|
||||
personController.timeZone.value =
|
||||
widget.device['person']['UTC'] ?? '';
|
||||
if (widget.device['person']['city_id'] != null) {
|
||||
// 根据city_id查找完整的城市数据
|
||||
final int cityId = widget.device['person']['city_id'];
|
||||
await initializeCityData();
|
||||
final CityModel? completeCityData = _findCityDataById(cityId);
|
||||
|
||||
if (completeCityData != null) {
|
||||
personController.cityModel = completeCityData;
|
||||
} else {
|
||||
personController.cityModel = null;
|
||||
}
|
||||
} else {
|
||||
personController.cityModel = null;
|
||||
}
|
||||
} else {
|
||||
personController.update_person_mac.value = widget.device['mac'];
|
||||
personController.currentPersonId.value = widget.device['_id'];
|
||||
personController.name.value = "";
|
||||
personController.gender.value = 1;
|
||||
personController.dateTime = null;
|
||||
personController.height.value = "";
|
||||
personController.weight.value = "";
|
||||
personController.diseaseList.value = [];
|
||||
personController.cityModel = null;
|
||||
personController.timeZone.value = "";
|
||||
}
|
||||
await Get.toNamed("/updatePersonPage",
|
||||
arguments: widget.device['bind_type']);
|
||||
bodyDeviceController.getDeviceList();
|
||||
},
|
||||
),
|
||||
_buildMenuItem(
|
||||
text: "体征检测设备.设备详情".tr,
|
||||
onTap: () {
|
||||
@@ -1158,69 +1222,8 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
child: CustomCard(
|
||||
borderRadius: AppConstants().button_container_radius,
|
||||
onTap: () async {
|
||||
if (widget.device['person'] != null) {
|
||||
personController.currentPersonId.value =
|
||||
widget.device['_id'];
|
||||
personController.name.value =
|
||||
widget.device['person']['name'];
|
||||
personController.update_person_mac.value =
|
||||
widget.device['mac'];
|
||||
personController.gender.value =
|
||||
widget.device['person']['gender'] ?? 1;
|
||||
personController.weight?.value =
|
||||
widget.device['person']['weight'] == null
|
||||
? ''
|
||||
: widget.device['person']['weight']
|
||||
.toString();
|
||||
|
||||
personController.height.value =
|
||||
widget.device['person']['height'] == null
|
||||
? ''
|
||||
: widget.device['person']['height']
|
||||
.toString();
|
||||
|
||||
personController.selectedDiseaseIds.value =
|
||||
widget.device['person']['disease'] ?? [];
|
||||
personController.birthday.value =
|
||||
widget.device['person']['birthday'] ?? '';
|
||||
personController.dateTime =
|
||||
MyUtils.formatBirthdayTime(
|
||||
widget.device['person']['birthday']);
|
||||
personController.timeZone.value =
|
||||
widget.device['person']['UTC'] ?? '';
|
||||
if (widget.device['person']['city_id'] != null) {
|
||||
// 根据city_id查找完整的城市数据
|
||||
final int cityId =
|
||||
widget.device['person']['city_id'];
|
||||
await initializeCityData();
|
||||
final CityModel? completeCityData =
|
||||
_findCityDataById(cityId);
|
||||
|
||||
if (completeCityData != null) {
|
||||
personController.cityModel = completeCityData;
|
||||
} else {
|
||||
personController.cityModel = null;
|
||||
}
|
||||
} else {
|
||||
personController.cityModel = null;
|
||||
}
|
||||
} else {
|
||||
personController.update_person_mac.value =
|
||||
widget.device['mac'];
|
||||
personController.currentPersonId.value =
|
||||
widget.device['_id'];
|
||||
personController.name.value = "";
|
||||
personController.gender.value = 1;
|
||||
personController.dateTime = null;
|
||||
personController.height.value = "";
|
||||
personController.weight.value = "";
|
||||
personController.diseaseList.value = [];
|
||||
personController.cityModel = null;
|
||||
personController.timeZone.value = "";
|
||||
}
|
||||
await Get.toNamed("/updatePersonPage",
|
||||
arguments: widget.device['bind_type']);
|
||||
bodyDeviceController.getDeviceList();
|
||||
await Get.toNamed("/healthCheckPage",
|
||||
arguments: widget.device);
|
||||
},
|
||||
colors: [
|
||||
themeController.currentColor.sc1,
|
||||
@@ -1241,7 +1244,7 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"体征检测设备.人员资料".tr,
|
||||
"健康快检".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
|
||||
Reference in New Issue
Block a user