更新首页报告详情
This commit is contained in:
@@ -584,6 +584,63 @@ class _DynamicReportDetailWidgetState extends State<DynamicReportDetailWidget> {
|
|||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (!AppConstants.is_test_account)
|
||||||
|
ClickableContainer(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
highlightColor: themeController.currentColor.sc3,
|
||||||
|
borderRadius: 0,
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
onTap: () {
|
||||||
|
String mac = targetDevice['mac'];
|
||||||
|
List<SleepDateWidget> selectedWidgets = widget.sleepDateWidgets
|
||||||
|
.where((w) => w.isSelected == true)
|
||||||
|
.toList();
|
||||||
|
if (selectedWidgets.isNotEmpty) {
|
||||||
|
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(
|
||||||
|
int.parse(selectedWidgets[0].time!));
|
||||||
|
String time = MyUtils.formatBindTime(dateTime);
|
||||||
|
// String sleepReportUrl =
|
||||||
|
// "${ServiceConstant.sleep_report_url}?mac=$mac&token=${ServiceConstant.sleep_token}&date=$time";
|
||||||
|
// Get.toNamed("/sleepReportPage", arguments: sleepReportUrl);
|
||||||
|
Get.toNamed("/newSleepReportPage", arguments: {
|
||||||
|
'date': dateTime != null
|
||||||
|
? dateTime.millisecondsSinceEpoch
|
||||||
|
: DateTime.now().millisecondsSinceEpoch,
|
||||||
|
"mac": mac,
|
||||||
|
'type': 1,
|
||||||
|
'name': 'sleep', //'sleep', 'heartRate' 或 'breathe'
|
||||||
|
// 'itemName': widget.data['id'],
|
||||||
|
'person': widget.targetDevice['person'],
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
TopSlideNotification.show(context,
|
||||||
|
text: "当前暂无数据".tr,
|
||||||
|
textColor: themeController.currentColor.sc9);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'首页.报告详情'.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
color: themeController.currentColor.sc2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(0, 6.rpx, 0, 0.rpx),
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
'assets/img/icon/arrow_right.svg',
|
||||||
|
width: 14.rpx,
|
||||||
|
height: 14.rpx,
|
||||||
|
color: themeController.currentColor.sc3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].divide(SizedBox(width: 22.rpx)),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user