修复部分语言中文

This commit is contained in:
wyf
2026-03-27 15:42:52 +08:00
parent a1e835ecbc
commit 446d884ac2
13 changed files with 192 additions and 692 deletions

View File

@@ -8,6 +8,7 @@ import 'package:vbvs_app/controller/device/device_share_controller.dart';
import 'package:vbvs_app/controller/device/device_type_controller.dart';
import 'package:vbvs_app/controller/message/message_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:EasyDartModule/EasyDartModule.dart' as edm;
class HealthReportCardWidget extends StatefulWidget {
final data;
@@ -96,7 +97,8 @@ class _HealthReportCardWidgetState extends State<HealthReportCardWidget> {
String ID = reportData['id'];
DeviceTypeController deviceTypeController =
Get.find();
await deviceTypeController.getCheckHistory(id: ID,mac: reportData['mac']);
await deviceTypeController.getCheckHistory(
id: ID, mac: reportData['mac']);
if (deviceTypeController.currentCq.value == null ||
deviceTypeController.currentCq.value.isEmpty) {
NewTopSlideNotification.show(
@@ -215,7 +217,11 @@ class _HealthReportCardWidgetState extends State<HealthReportCardWidget> {
// 可以根据需要跳转到报告详情页面
print('查看报告: ${reportData['_id']}');
// 示例Get.to(() => ReportDetailPage(reportId: reportData['_id']));
Get.toNamed('/healthQuickCheckReportPage', arguments: reportData);
try {
Get.toNamed('/healthQuickCheckReportPage', arguments: reportData);
} catch (e) {
edm.EasyDartModule.logger.error("快检报告页面加载失败---?${e.toString()}");
}
}
// 格式化时间戳

View File

@@ -354,494 +354,9 @@ class _HealthCheckPageState extends State<HealthCheckPage>
},
child: Column(
children: [
// Row(
// mainAxisSize: MainAxisSize.max,
// children: [
// Flexible(
// flex: 2,
// child: Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Row(
// children: [
// Column(
// crossAxisAlignment:
// CrossAxisAlignment
// .end,
// children: [
// Text(
// '实时体征.姓名'.tr,
// style: TextStyle(
// fontFamily:
// 'Inter',
// fontSize: 26.rpx,
// letterSpacing:
// 0.0,
// color: themeController
// .currentColor
// .sc4,
// ),
// ),
// ].divide(SizedBox(
// height: 34.rpx)),
// ),
// Column(
// crossAxisAlignment:
// CrossAxisAlignment
// .start,
// children: [
// Container(
// width: MediaQuery
// .sizeOf(
// context)
// .width *
// 0.2,
// child: Text(
// device['person'] != null &&
// device['person']
// [
// 'name'] !=
// null &&
// device['person']
// [
// 'name']
// .toString()
// .trim()
// .isNotEmpty
// ? device['person']
// [
// 'name']
// .toString()
// : '体征检测设备'.tr,
// style: TextStyle(
// fontFamily:
// 'Inter',
// fontSize:
// 26.rpx,
// letterSpacing:
// 0.0,
// color: themeController
// .currentColor
// .sc3,
// ),
// maxLines: 1,
// overflow:
// TextOverflow
// .ellipsis,
// ),
// ),
// ].divide(SizedBox(
// height: 34.rpx)),
// ),
// ]
// .divide(SizedBox(
// width: 33.rpx))
// .addToStart(SizedBox(
// width: 37.rpx)),
// ),
// Row(
// children: [
// Column(
// crossAxisAlignment:
// CrossAxisAlignment
// .end,
// children: [
// Text(
// '性别'.tr,
// style: TextStyle(
// fontFamily:
// 'Inter',
// fontSize: 26.rpx,
// letterSpacing:
// 0.0,
// color: themeController
// .currentColor
// .sc4,
// ),
// ),
// ].divide(SizedBox(
// height: 34.rpx)),
// ),
// Column(
// crossAxisAlignment:
// CrossAxisAlignment
// .start,
// children: [
// Container(
// width: MediaQuery
// .sizeOf(
// context)
// .width *
// 0.2,
// child: Text(
// device['person'] != null &&
// device['person']
// [
// 'gender'] !=
// null &&
// device['person']
// [
// 'gender']
// .toString()
// .trim()
// .isNotEmpty
// ? _getGenderText(
// device['person']
// [
// 'gender'])
// : '-'.tr,
// style: TextStyle(
// fontFamily:
// 'Inter',
// fontSize:
// 26.rpx,
// letterSpacing:
// 0.0,
// color: themeController
// .currentColor
// .sc3,
// ),
// maxLines: 1,
// overflow:
// TextOverflow
// .ellipsis,
// ),
// ),
// ].divide(SizedBox(
// height: 34.rpx)),
// ),
// ]
// .divide(SizedBox(
// width: 33.rpx))
// .addToStart(SizedBox(
// width: 37.rpx)),
// ),
// Row(
// children: [
// Column(
// crossAxisAlignment:
// CrossAxisAlignment
// .end,
// children: [
// Text(
// '身高'.tr,
// style: TextStyle(
// fontFamily:
// 'Inter',
// fontSize: 26.rpx,
// letterSpacing:
// 0.0,
// color: themeController
// .currentColor
// .sc4,
// ),
// ),
// ].divide(SizedBox(
// height: 34.rpx)),
// ),
// Column(
// crossAxisAlignment:
// CrossAxisAlignment
// .start,
// children: [
// Container(
// width: MediaQuery
// .sizeOf(
// context)
// .width *
// 0.2,
// child: Text(
// device['person'] != null &&
// device['person']
// [
// 'height'] !=
// null &&
// device['person']
// [
// 'height']
// .toString()
// .trim()
// .isNotEmpty
// ? device['person']
// [
// 'height']
// .toString() +
// "cm"
// : '-'.tr +
// "cm",
// style: TextStyle(
// fontFamily:
// 'Inter',
// fontSize:
// 26.rpx,
// letterSpacing:
// 0.0,
// color: themeController
// .currentColor
// .sc3,
// ),
// maxLines: 1,
// overflow:
// TextOverflow
// .ellipsis,
// ),
// ),
// ].divide(SizedBox(
// height: 34.rpx)),
// ),
// ]
// .divide(SizedBox(
// width: 33.rpx))
// .addToStart(SizedBox(
// width: 37.rpx)),
// ),
// ]
// .addToStart(
// SizedBox(height: 0.rpx))
// .addToEnd(
// SizedBox(height: 0.rpx))
// .divide(SizedBox(
// height: 36.rpx,
// )),
// ),
// ),
// Flexible(
// flex: 3,
// child: Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Row(
// children: [
// Column(
// crossAxisAlignment:
// CrossAxisAlignment
// .end,
// children: [
// Text(
// '实时体征.设备ID'.tr,
// style: TextStyle(
// fontFamily:
// 'Inter',
// fontSize: 26.rpx,
// letterSpacing:
// 0.0,
// color: themeController
// .currentColor
// .sc4,
// ),
// ),
// ].divide(SizedBox(
// height: 34.rpx)),
// ),
// Expanded(
// child: Column(
// crossAxisAlignment:
// CrossAxisAlignment
// .start,
// children: [
// Text(
// '${device['code'] ?? '未知数据'.tr}',
// // "D11250300003",
// style: TextStyle(
// fontFamily:
// 'Inter',
// fontSize:
// 26.rpx,
// letterSpacing:
// 0.0,
// color: themeController
// .currentColor
// .sc3,
// ),
// maxLines: 1,
// overflow:
// TextOverflow
// .ellipsis,
// ),
// ].divide(SizedBox(
// height: 34.rpx)),
// ),
// ),
// ]
// .divide(SizedBox(
// width: 33.rpx))
// .addToStart(SizedBox(
// width: 37.rpx)),
// ),
// Row(
// children: [
// Column(
// crossAxisAlignment:
// CrossAxisAlignment
// .end,
// children: [
// Text(
// '年龄'.tr,
// style: TextStyle(
// fontFamily:
// 'Inter',
// fontSize: 26.rpx,
// letterSpacing:
// 0.0,
// color: themeController
// .currentColor
// .sc4,
// ),
// ),
// ].divide(SizedBox(
// height: 34.rpx)),
// ),
// Expanded(
// child: Column(
// crossAxisAlignment:
// CrossAxisAlignment
// .start,
// children: [
// Text(
// device['person'] != null &&
// device['person']
// [
// 'birthday'] !=
// null &&
// device['person']
// [
// 'birthday']
// .toString()
// .trim()
// .isNotEmpty
// ? _calculateAge(
// device['person']
// [
// 'birthday']
// .toString())
// : '-'.tr,
// style: TextStyle(
// fontFamily:
// 'Inter',
// fontSize:
// 26.rpx,
// letterSpacing:
// 0.0,
// color: themeController
// .currentColor
// .sc3,
// ),
// maxLines: 1,
// overflow:
// TextOverflow
// .ellipsis,
// ),
// ].divide(SizedBox(
// height: 34.rpx)),
// ),
// ),
// ]
// .divide(SizedBox(
// width: 33.rpx))
// .addToStart(SizedBox(
// width: 37.rpx)),
// ),
// Row(
// children: [
// Column(
// crossAxisAlignment:
// CrossAxisAlignment
// .end,
// children: [
// Text(
// '体重'.tr,
// style: TextStyle(
// fontFamily:
// 'Inter',
// fontSize: 26.rpx,
// letterSpacing:
// 0.0,
// color: themeController
// .currentColor
// .sc4,
// ),
// ),
// // Text(
// // '实时体征.体重'.tr,
// // style: TextStyle(
// // fontFamily: 'Inter',
// // fontSize: 26.rpx,
// // letterSpacing: 0.0,
// // color: themeController
// // .currentColor.sc4,
// // ),
// // ),
// ].divide(SizedBox(
// height: 34.rpx)),
// ),
// Expanded(
// child: Column(
// crossAxisAlignment:
// CrossAxisAlignment
// .start,
// children: [
// Text(
// device['person'] != null &&
// device['person']
// [
// 'weight'] !=
// null &&
// device['person']
// [
// 'weight']
// .toString()
// .trim()
// .isNotEmpty
// ? device['person']
// [
// 'weight']
// .toString() +
// "kg"
// : '-'.tr +
// "kg",
// style: TextStyle(
// fontFamily:
// 'Inter',
// fontSize:
// 26.rpx,
// letterSpacing:
// 0.0,
// color: themeController
// .currentColor
// .sc3,
// ),
// maxLines: 1,
// overflow:
// TextOverflow
// .ellipsis,
// ),
// ].divide(SizedBox(
// height: 34.rpx)),
// ),
// ),
// ]
// .divide(SizedBox(
// width: 33.rpx))
// .addToStart(SizedBox(
// width: 37.rpx)),
// ),
// ]
// .addToStart(
// SizedBox(height: 0.rpx))
// .addToEnd(
// SizedBox(height: 0.rpx))
// .divide(SizedBox(
// height: 36.rpx,
// )),
// ),
// ),
// ],
// ),
Container(
padding: EdgeInsets.fromLTRB(
37.rpx, 37.rpx, 37.rpx, 37.rpx),
37.rpx, 37.rpx, 20.rpx, 37.rpx),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment:
@@ -849,7 +364,7 @@ class _HealthCheckPageState extends State<HealthCheckPage>
children: [
// 左侧列 - 标签和值
Expanded(
flex: 2,
flex: 3,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
@@ -862,7 +377,7 @@ class _HealthCheckPageState extends State<HealthCheckPage>
children: [
// 标签 - 也不能换行,超出显示...
Expanded(
flex: 1,
flex: 3,
child: Text(
'实时体征.姓名'.tr,
style: TextStyle(
@@ -884,7 +399,7 @@ class _HealthCheckPageState extends State<HealthCheckPage>
.rpx), // 标签和值之间的间距
// 值
Expanded(
flex: 2,
flex: 4,
child: Text(
device['person'] !=
null &&
@@ -926,7 +441,7 @@ class _HealthCheckPageState extends State<HealthCheckPage>
.center,
children: [
Expanded(
flex: 1,
flex: 3,
child: Text(
'性别'.tr,
style: TextStyle(
@@ -945,7 +460,7 @@ class _HealthCheckPageState extends State<HealthCheckPage>
),
SizedBox(width: 20.rpx),
Expanded(
flex: 2,
flex: 4,
child: Text(
device['person'] !=
null &&
@@ -989,7 +504,7 @@ class _HealthCheckPageState extends State<HealthCheckPage>
.center,
children: [
Expanded(
flex: 1,
flex: 3,
child: Text(
'身高'.tr,
style: TextStyle(
@@ -1008,7 +523,7 @@ class _HealthCheckPageState extends State<HealthCheckPage>
),
SizedBox(width: 20.rpx),
Expanded(
flex: 2,
flex: 4,
child: Text(
device['person'] !=
null &&
@@ -1049,7 +564,7 @@ class _HealthCheckPageState extends State<HealthCheckPage>
// 右侧列 - 标签和值
Expanded(
flex: 3,
flex: 4,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
@@ -1741,31 +1256,21 @@ class _HealthCheckPageState extends State<HealthCheckPage>
if (deviceTypeController.experience_status.value ==
APPQuickCheckStatus.completed.value) {
//体验正常结束
deviceTypeController.experience_status.value = 404;
deviceTypeController.experience_status.value = 0;
progressNotifier.value = 0;
edm.EasyDartModule.logger.info("快检结束,停止定时查询");
_checkStatusTimer?.cancel();
await deviceTypeController.getCheckHistory(
id: deviceTypeController.experience_id.value,mac: widget.personInfo['mac']);
Get.toNamed('/healthQuickCheckReportPage',
arguments: deviceTypeController.currentCq.value);
try {
deviceTypeController.experience_status.value = 404;
deviceTypeController.experience_status.value = 0;
progressNotifier.value = 0;
edm.EasyDartModule.logger.info("快检结束,停止定时查询");
_checkStatusTimer?.cancel();
await deviceTypeController.getCheckHistory(
id: deviceTypeController.experience_id.value,
mac: widget.personInfo['mac']);
Get.toNamed('/healthQuickCheckReportPage',
arguments: deviceTypeController.currentCq.value);
} catch (e) {
edm.EasyDartModule.logger.error("快检报告页面加载失败---?${e.toString()}");
}
}
// if (deviceTypeController.experience_status.value != APPQuickCheckStatus.inProgress.value &&
// deviceTypeController.experience_status.value != 201 &&
// deviceTypeController.experience_status.value != 404 &&
// deviceTypeController.experience_status.value != 203) {
// //体验异常结束
// deviceTypeController.experience_status.value = 404;
// deviceTypeController.experience_percent.value = 0;
// progressNotifier.value = 0;
// edm.EasyDartModule.logger.info("快检结束,停止定时查询");
// _checkStatusTimer?.cancel();
// // NewTopSlideNotification.show(
// // text:
// // "体验异常结束".tr,
// // textColor: themeController.currentColor.sc9);
// }
if (deviceTypeController.experience_status.value ==
APPQuickCheckStatus.timeout.value ||
deviceTypeController.experience_status.value ==