更新特殊处理测试账号
This commit is contained in:
@@ -1025,154 +1025,107 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
color: themeController.currentColor.sc4,
|
||||
),
|
||||
SizedBox(height: 5.rpx),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Expanded(
|
||||
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();
|
||||
if (!AppConstants.is_test_account)
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Expanded(
|
||||
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.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']);
|
||||
} 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 = [];
|
||||
}
|
||||
await Get.toNamed("/updatePersonPage",
|
||||
arguments: widget.device['bind_type']);
|
||||
bodyDeviceController.getDeviceList();
|
||||
},
|
||||
colors: [
|
||||
themeController.currentColor.sc1,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 143.rpx,
|
||||
minHeight: 61.rpx,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"体征检测设备.人员资料".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 17.rpx)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.rpx,
|
||||
),
|
||||
Expanded(
|
||||
// 使用 Expanded 来占据屏幕宽度
|
||||
child: CustomCard(
|
||||
borderRadius: AppConstants().button_container_radius,
|
||||
onTap: () {
|
||||
Get.toNamed("/instantBodyPage",
|
||||
arguments: widget.device);
|
||||
},
|
||||
colors: [
|
||||
themeController.currentColor.sc1,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 143.rpx,
|
||||
minHeight: 61.rpx,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"体征检测设备.实时体征".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
personController.selectedDiseaseIds.value =
|
||||
widget.device['person']['disease'] ?? [];
|
||||
personController.birthday.value =
|
||||
widget.device['person']['birthday'] ?? '';
|
||||
personController.dateTime =
|
||||
MyUtils.formatBirthdayTime(
|
||||
widget.device['person']['birthday']);
|
||||
} 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 = [];
|
||||
}
|
||||
await Get.toNamed("/updatePersonPage",
|
||||
arguments: widget.device['bind_type']);
|
||||
bodyDeviceController.getDeviceList();
|
||||
},
|
||||
colors: [
|
||||
themeController.currentColor.sc1,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 143.rpx,
|
||||
minHeight: 61.rpx,
|
||||
),
|
||||
].divide(SizedBox(width: 17.rpx)),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"体征检测设备.人员资料".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 17.rpx)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 20.rpx,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Expanded(
|
||||
// 使用 Expanded 来占据屏幕宽度的一半
|
||||
child: CustomCard(
|
||||
borderRadius: AppConstants().button_container_radius,
|
||||
onTap: () {
|
||||
// TopSlideNotification.show(context, text: "待开发功能".tr);
|
||||
Get.toNamed("/messageReviewPage",
|
||||
arguments: widget.device);
|
||||
},
|
||||
colors: [
|
||||
themeController.currentColor.sc1,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
SizedBox(
|
||||
width: 20.rpx,
|
||||
),
|
||||
Expanded(
|
||||
// 使用 Expanded 来占据屏幕宽度
|
||||
child: CustomCard(
|
||||
borderRadius: AppConstants().button_container_radius,
|
||||
onTap: () {
|
||||
Get.toNamed("/instantBodyPage",
|
||||
arguments: widget.device);
|
||||
},
|
||||
colors: [
|
||||
themeController.currentColor.sc1,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||
@@ -1185,7 +1138,7 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"体征检测设备.消息回看".tr,
|
||||
"体征检测设备.实时体征".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
@@ -1198,64 +1151,251 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.rpx,
|
||||
),
|
||||
Expanded(
|
||||
// 使用 Expanded 来占据屏幕宽度的一半
|
||||
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);
|
||||
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,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 143.rpx,
|
||||
minHeight: 61.rpx,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"体征检测设备.睡眠报告".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
],
|
||||
),
|
||||
if (!AppConstants.is_test_account)
|
||||
SizedBox(
|
||||
height: 20.rpx,
|
||||
),
|
||||
if (!AppConstants.is_test_account)
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Expanded(
|
||||
// 使用 Expanded 来占据屏幕宽度的一半
|
||||
child: CustomCard(
|
||||
borderRadius: AppConstants().button_container_radius,
|
||||
onTap: () {
|
||||
// TopSlideNotification.show(context, text: "待开发功能".tr);
|
||||
Get.toNamed("/messageReviewPage",
|
||||
arguments: widget.device);
|
||||
},
|
||||
colors: [
|
||||
themeController.currentColor.sc1,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 143.rpx,
|
||||
minHeight: 61.rpx,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"体征检测设备.消息回看".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 17.rpx)),
|
||||
].divide(SizedBox(width: 17.rpx)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.rpx,
|
||||
),
|
||||
Expanded(
|
||||
// 使用 Expanded 来占据屏幕宽度的一半
|
||||
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);
|
||||
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,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 143.rpx,
|
||||
minHeight: 61.rpx,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"体征检测设备.睡眠报告".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 17.rpx)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (AppConstants.is_test_account)
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Expanded(
|
||||
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']);
|
||||
} 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 = [];
|
||||
}
|
||||
await Get.toNamed("/updatePersonPage",
|
||||
arguments: widget.device['bind_type']);
|
||||
bodyDeviceController.getDeviceList();
|
||||
},
|
||||
colors: [
|
||||
themeController.currentColor.sc1,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 143.rpx,
|
||||
minHeight: 61.rpx,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"体征检测设备.人员资料".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 17.rpx)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.rpx,
|
||||
),
|
||||
Expanded(
|
||||
// 使用 Expanded 来占据屏幕宽度的一半
|
||||
child: CustomCard(
|
||||
borderRadius: AppConstants().button_container_radius,
|
||||
onTap: () {
|
||||
// TopSlideNotification.show(context, text: "待开发功能".tr);
|
||||
Get.toNamed("/messageReviewPage",
|
||||
arguments: widget.device);
|
||||
},
|
||||
colors: [
|
||||
themeController.currentColor.sc1,
|
||||
themeController.currentColor.sc2,
|
||||
],
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
height: MediaQuery.sizeOf(context).height * 0.0037,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 143.rpx,
|
||||
minHeight: 61.rpx,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"体征检测设备.消息回看".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 17.rpx)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
].divide(SizedBox(height: 0.rpx)),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user