diff --git a/lib/pages/sleep_report/component/AIAdviceWidget.dart b/lib/pages/sleep_report/component/AIAdviceWidget.dart index 4aef03d..c772116 100644 --- a/lib/pages/sleep_report/component/AIAdviceWidget.dart +++ b/lib/pages/sleep_report/component/AIAdviceWidget.dart @@ -77,7 +77,8 @@ class _AIAdviceWidgetState extends State { context, Container( child: Text( - "AI分析介绍".tr, + // "AI分析介绍".tr, + "AI分析是指利用人工智能技术对用户的睡眠数据进行自动化处理与规律提取,对用户的异常睡眠数据给到一定的辅助决策或者解决问题。".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/component/BreathePauseNewWidget.dart b/lib/pages/sleep_report/component/BreathePauseNewWidget.dart index 6c3d597..9e7bdc6 100644 --- a/lib/pages/sleep_report/component/BreathePauseNewWidget.dart +++ b/lib/pages/sleep_report/component/BreathePauseNewWidget.dart @@ -97,7 +97,8 @@ class _SnoreViewWidgetWidgetState extends State { context, Container( child: Text( - "呼吸暂停监测介绍。", + // "呼吸暂停监测介绍。", + "呼吸暂停监测是指用户在睡眠过程中产生的呼吸暂停的图表说明。", style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/component/BreatheStandardWidget.dart b/lib/pages/sleep_report/component/BreatheStandardWidget.dart index 159a140..53cf8a2 100644 --- a/lib/pages/sleep_report/component/BreatheStandardWidget.dart +++ b/lib/pages/sleep_report/component/BreatheStandardWidget.dart @@ -129,7 +129,8 @@ class _BreatheStandardWidgetState extends State { context, Container( child: Text( - "呼吸数据介绍".tr, + // "呼吸数据介绍".tr, + "呼吸数据是指用户在睡眠过程中呼吸的基本数据,是评估睡眠呼吸质量、筛查睡眠呼吸障碍的核心指标。".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/component/CompareSleepWidget.dart b/lib/pages/sleep_report/component/CompareSleepWidget.dart index f53aa91..2613617 100644 --- a/lib/pages/sleep_report/component/CompareSleepWidget.dart +++ b/lib/pages/sleep_report/component/CompareSleepWidget.dart @@ -86,7 +86,8 @@ class _CompareSleepWidgetState extends State { context, Container( child: Text( - "与昨日对比分析介绍".tr, + // "与昨日对比分析介绍".tr, + "基于时间维度的横向比较分析方法,通过将当前(今日)的数据、状态、行为等与前一日(昨日)的同类信息进行对照,识别差异、趋势或变化规律,查看用户短期时间序列的动态变化。".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/component/DiseasePercentsWidget.dart b/lib/pages/sleep_report/component/DiseasePercentsWidget.dart index 1f51c0c..2665647 100644 --- a/lib/pages/sleep_report/component/DiseasePercentsWidget.dart +++ b/lib/pages/sleep_report/component/DiseasePercentsWidget.dart @@ -78,7 +78,8 @@ class _DiseasePercentsWidgetState extends State { context, Container( child: Text( - "慢性病风险指数介绍".tr, + // "慢性病风险指数介绍".tr, + "慢性病风险指数是通过整合个体的生理指标、生活方式等多维度数据,构建的量化评估模型,用于预测用户未来患慢性非传染性疾病(如高血压、糖尿病、冠心病、癌症等)的风险概率。".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/component/HeartChangeWidget.dart b/lib/pages/sleep_report/component/HeartChangeWidget.dart index d36c9a6..aa9c453 100644 --- a/lib/pages/sleep_report/component/HeartChangeWidget.dart +++ b/lib/pages/sleep_report/component/HeartChangeWidget.dart @@ -79,7 +79,8 @@ class _HeartChangeWidgetState extends State { context, Container( child: Text( - "心率变异性(HRV)介绍".tr, + // "心率变异性(HRV)介绍".tr, + "心率变异性(HRV)是指心脏每次跳动间隔时间的差异程度,反映自主神经系统(交感神经和副交感神经)对心脏的调节能力,是评估心血管健康和压力状态的重要指标。".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/component/HeartHealthWidget.dart b/lib/pages/sleep_report/component/HeartHealthWidget.dart index 59cbda0..3583f22 100644 --- a/lib/pages/sleep_report/component/HeartHealthWidget.dart +++ b/lib/pages/sleep_report/component/HeartHealthWidget.dart @@ -79,7 +79,8 @@ class _HeartHealthWidgetState extends State { context, Container( child: Text( - "心理健康评估介绍".tr, + // "心理健康评估介绍".tr, + "心率健康评估主要通过用户睡眠报告中的时间点、体征数据及HRV数据等信息,来判断其心理健康水平、疲劳程度。".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/component/HeartPointWidget.dart b/lib/pages/sleep_report/component/HeartPointWidget.dart index 64e620f..67d963d 100644 --- a/lib/pages/sleep_report/component/HeartPointWidget.dart +++ b/lib/pages/sleep_report/component/HeartPointWidget.dart @@ -96,7 +96,8 @@ class _HeartPointWidgetState extends State { context, Container( child: Text( - "心率散点图介绍".tr, + // "心率散点图介绍".tr, + "心电散点图是用非线性的图形方法描记的连续心冲击图的RR间期图,因图形由散点组成,又称散点图。".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/component/HeartRateStandardWidget.dart b/lib/pages/sleep_report/component/HeartRateStandardWidget.dart index c344019..880f35a 100644 --- a/lib/pages/sleep_report/component/HeartRateStandardWidget.dart +++ b/lib/pages/sleep_report/component/HeartRateStandardWidget.dart @@ -128,7 +128,8 @@ class _HeartRateStandardWidgetState extends State { context, Container( child: Text( - "心率数据介绍".tr, + // "心率数据介绍".tr, + "心率数据是指用户在睡眠过程中基本心率数据,可初步判断睡眠中的心血管负荷及自主神经功能状态,为睡眠健康评估提供重要依据。".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/component/SkinPercentWidget.dart b/lib/pages/sleep_report/component/SkinPercentWidget.dart index f7b3fee..b6ef67d 100644 --- a/lib/pages/sleep_report/component/SkinPercentWidget.dart +++ b/lib/pages/sleep_report/component/SkinPercentWidget.dart @@ -37,108 +37,110 @@ class _SkinPercentWidgetState extends State { Widget build(BuildContext context) { try { if (widget.sleepReport == null || - widget.sleepReport['sicp'] == null || - widget.sleepReport['sicp'].isEmpty) { - return Container(); - } - int id = 100001; - List data = widget.sleepReport['sicp']; - final target = data.firstWhere( - (element) => element['id'] == id, - orElse: () => null, // 如果没有找到,返回 null(你也可以抛异常或用 {} 替代) - ); + widget.sleepReport['sicp'] == null || + widget.sleepReport['sicp'].isEmpty) { + return Container(); + } + int id = 100001; + List data = widget.sleepReport['sicp']; + final target = data.firstWhere( + (element) => element['id'] == id, + orElse: () => null, // 如果没有找到,返回 null(你也可以抛异常或用 {} 替代) + ); - if (target == null) { - return Container(); - } - List> showLabel = []; - if (target != null && target['type'] is List) { - showLabel = (target['type'] as List).map>((item) { - return { - 'key': item['type'], - 'name': item['name'], - 'color': stringToColor(item['color']), - }; - }).toList(); - } - return Container( - width: double.infinity, - decoration: BoxDecoration( - color: themeController.currentColor.sc5, - borderRadius: BorderRadius.circular( - AppConstants().normal_container_radius), // 你可以按需调整圆角半径 - ), - child: Padding( - padding: EdgeInsetsDirectional.fromSTEB(26.rpx, 29.rpx, 26.rpx, 45.rpx), - child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "皮肤指数".tr, - style: TextStyle( - color: themeController.currentColor.sc3, - fontSize: AppConstants().title_text_fontSize), - ), - ClickableContainer( - backgroundColor: Colors.transparent, - highlightColor: Colors.white, // 或设置为你需要的水波纹颜色 - padding: EdgeInsetsDirectional.fromSTEB( - 14.rpx, 0.rpx, 14.rpx, 0), // - borderRadius: 0.rpx, // 圆形点击区域 - onTap: () { - showTipDialog( - context, - Container( - child: Text( - "皮肤指数介绍".tr, - style: TextStyle( - fontSize: 26.rpx, - color: themeController.currentColor.sc3, + if (target == null) { + return Container(); + } + List> showLabel = []; + if (target != null && target['type'] is List) { + showLabel = (target['type'] as List).map>((item) { + return { + 'key': item['type'], + 'name': item['name'], + 'color': stringToColor(item['color']), + }; + }).toList(); + } + return Container( + width: double.infinity, + decoration: BoxDecoration( + color: themeController.currentColor.sc5, + borderRadius: BorderRadius.circular( + AppConstants().normal_container_radius), // 你可以按需调整圆角半径 + ), + child: Padding( + padding: + EdgeInsetsDirectional.fromSTEB(26.rpx, 29.rpx, 26.rpx, 45.rpx), + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "皮肤指数".tr, + style: TextStyle( + color: themeController.currentColor.sc3, + fontSize: AppConstants().title_text_fontSize), + ), + ClickableContainer( + backgroundColor: Colors.transparent, + highlightColor: Colors.white, // 或设置为你需要的水波纹颜色 + padding: EdgeInsetsDirectional.fromSTEB( + 14.rpx, 0.rpx, 14.rpx, 0), // + borderRadius: 0.rpx, // 圆形点击区域 + onTap: () { + showTipDialog( + context, + Container( + child: Text( + // "皮肤指数介绍".tr, + "皮肤指数通过用户睡眠过程中的体征数据,计算皮肤电反应,生成综合评估指标,用于睡眠中的生理应激状态或自主神经活动。" + .tr, + style: TextStyle( + fontSize: 26.rpx, + color: themeController.currentColor.sc3, + ), ), ), + ); + }, + child: Container( + padding: EdgeInsetsDirectional.fromSTEB( + 0, 0.rpx, 0.rpx, 0), // 外部 padding 移到内部 + width: 28.rpx, + height: 28.rpx, + child: SvgPicture.asset( + 'assets/img/icon/explain.svg', + fit: BoxFit.cover, + color: themeController.currentColor.sc4, ), - ); - }, - child: Container( - padding: EdgeInsetsDirectional.fromSTEB( - 0, 0.rpx, 0.rpx, 0), // 外部 padding 移到内部 - width: 28.rpx, - height: 28.rpx, - child: SvgPicture.asset( - 'assets/img/icon/explain.svg', - fit: BoxFit.cover, - color: themeController.currentColor.sc4, ), ), - ), - ], + ], + ), ), - ), - SizedBox( - height: 83.rpx, - ), - Padding( - padding: - EdgeInsetsDirectional.fromSTEB(30.rpx, 0.rpx, 30.rpx, 0.rpx), - child: StatusBarWithIndicator( - selectKey: target['value'], - showLabel: showLabel, + SizedBox( + height: 83.rpx, ), - ), - SizedBox( - height: 56.rpx, - ), - ], + Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 30.rpx, 0.rpx, 30.rpx, 0.rpx), + child: StatusBarWithIndicator( + selectKey: target['value'], + showLabel: showLabel, + ), + ), + SizedBox( + height: 56.rpx, + ), + ], + ), ), - ), - ); - + ); } catch (e) { - es.EasyDartModule.logger.error("打鼾监测绘制异常${e}"); + es.EasyDartModule.logger.error("打鼾监测绘制异常${e}"); return Container(); } } diff --git a/lib/pages/sleep_report/component/SleepView.dart b/lib/pages/sleep_report/component/SleepView.dart index deb4003..5378908 100644 --- a/lib/pages/sleep_report/component/SleepView.dart +++ b/lib/pages/sleep_report/component/SleepView.dart @@ -53,10 +53,8 @@ class _SleepViewWidgetState extends State { List lightSnore = widget.sleepReport['ssp']['data'][0]; List heavySnore = widget.sleepReport['ssp']['data'][1]; - snoreValues = [...lightSnore, ...heavySnore]; - snoreValues.sort((a, b) { return a['st'].compareTo(b['st']); }); @@ -100,7 +98,7 @@ class _SleepViewWidgetState extends State { context, Container( child: Text( - "睡眠规律性介绍", + "睡眠规律性是指个体睡眠模式在时间、时长、环境等方面呈现出的稳定性和一致性,是衡量睡眠质量的重要指标之一。", style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, @@ -173,7 +171,7 @@ class _SleepViewWidgetState extends State { mainAxisSize: MainAxisSize.min, children: [ Container( - height: 43.rpx, + height: 20.rpx, child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -328,7 +326,7 @@ class _SleepViewWidgetState extends State { ), ); } catch (e) { - es.EasyDartModule.logger.error("打鼾监测绘制异常${e}"); + es.EasyDartModule.logger.error("打鼾监测绘制异常${e}"); return Container(); } } diff --git a/lib/pages/sleep_report/component/SnoreViewWidget.dart b/lib/pages/sleep_report/component/SnoreViewWidget.dart index e38d2ab..cf82ed5 100644 --- a/lib/pages/sleep_report/component/SnoreViewWidget.dart +++ b/lib/pages/sleep_report/component/SnoreViewWidget.dart @@ -127,7 +127,8 @@ class _SnoreViewWidgetWidgetState extends State { context, Container( child: Text( - "打鼾监测介绍。", + // "打鼾监测介绍。", + "打鼾监测是指用户在睡眠过程中打鼾频次的图表说明。", style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3, diff --git a/lib/pages/sleep_report/component/ZiZhuShenJingPercentWidget.dart b/lib/pages/sleep_report/component/ZiZhuShenJingPercentWidget.dart index 3815908..a245ccc 100644 --- a/lib/pages/sleep_report/component/ZiZhuShenJingPercentWidget.dart +++ b/lib/pages/sleep_report/component/ZiZhuShenJingPercentWidget.dart @@ -98,7 +98,8 @@ class _ZiZhuShenJingPercentWidgetState context, Container( child: Text( - "自主神经平衡指数监测介绍".tr, + // "自主神经平衡指数监测介绍".tr, + "自主神经平衡指数 是评估人体自主神经系统(ANS)功能状态的重要指标,主要反映交感神经和副交感神经的活性平衡关系。".tr, style: TextStyle( fontSize: 26.rpx, color: themeController.currentColor.sc3,