更新实时体征数据样式

This commit is contained in:
wyf
2025-07-11 16:20:50 +08:00
parent 1671e1a4b2
commit 00eb60acf5
2 changed files with 37 additions and 19 deletions

View File

@@ -1207,11 +1207,19 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
child: CustomCard(
borderRadius: AppConstants().button_container_radius,
onTap: () {
String mac = widget.device['mac'];
String sleepReportUrl =
"${ServiceConstant.sleep_report_url}?mac=${mac}&token=${ServiceConstant.sleep_token}";
Get.toNamed("/sleepReportPage",
arguments: sleepReportUrl);
// String mac = widget.device['mac'];
// String sleepReportUrl =
// "${ServiceConstant.sleep_report_url}?mac=${mac}&token=${ServiceConstant.sleep_token}";
// Get.toNamed("/sleepReportPage",
// arguments: sleepReportUrl);
Get.toNamed("/newSleepReportPage", arguments: {
'date':DateTime.now().millisecondsSinceEpoch,
"mac": widget.device['mac'],
'type': 1,
'name': 'sleep', //'sleep', 'heartRate' 或 'breathe'
// 'itemName': widget.data['id'],
'person': widget.device['person'],
});
},
colors: [
themeController.currentColor.sc1,

View File

@@ -830,7 +830,9 @@ class _InstantBodyPageState extends State<InstantBodyPage>
title: "体动".tr,
iconAsset:
"assets/img/icon/bodymotion.svg",
value: (bodyMotion == null ||
value: inBed == "离床"
? ("-")
: (bodyMotion == null ||
bodyMotion == -1)
? "未知数据".tr
: "$bodyMotion",
@@ -845,16 +847,20 @@ class _InstantBodyPageState extends State<InstantBodyPage>
title: "心率".tr,
iconAsset:
"assets/img/icon/heart.svg",
value: (heartrate == null ||
value: inBed == "离床"
? "-"
: ((heartrate == null ||
heartrate == -1)
? "未知数据".tr
: "$heartrate",
: "$heartrate"),
),
DeviceStatusInfoWidget(
title: "打鼾".tr,
iconAsset:
"assets/img/icon/snore.svg",
value: '${snores}'.tr,
value: inBed == "离床"
? "-"
: ('${snores}'.tr),
),
],
),
@@ -866,16 +872,20 @@ class _InstantBodyPageState extends State<InstantBodyPage>
title: "呼吸".tr,
iconAsset:
"assets/img/icon/breathe.svg",
value: (breathrate == null ||
value: inBed == "离床"
? ("-")
: ((breathrate == null ||
breathrate == -1)
? "未知数据".tr
: "$breathrate",
: "$breathrate"),
),
DeviceStatusInfoWidget(
title: "呼吸暂停".tr,
iconAsset:
"assets/img/icon/breathe_pause.svg",
value: '${breathState}',
value: inBed == "离床"
? "-"
: ('${breathState}'),
),
],
),