3.修改睡眠报告文字 正常窦性心律
This commit is contained in:
@@ -556,7 +556,7 @@
|
||||
"微信用户": "微信用户",
|
||||
"其他设备正在绑定中,是否终止其他设备绑定?": "其他设备正在绑定中,是否终止其他设备绑定?",
|
||||
"图形参考": "图像参考",
|
||||
"正常心率窦性图": "正常心率窦性",
|
||||
"正常心率窦性图": "正常窦性心率",
|
||||
"窦性心律不齐图": "窦性心律不齐",
|
||||
"持续性房颤图": "持续性房颤",
|
||||
"阵法性房颤图": "阵法性房颤",
|
||||
|
||||
@@ -551,7 +551,7 @@
|
||||
"其他设备正在绑定中,是否终止其他设备绑定?": "其他設備正在綁定中,是否終止其他設備綁定?",
|
||||
"未配置网络提示": "當前設備未進行網路配置,是否確認跳過網路配置?",
|
||||
"图形参考": "圖形參考",
|
||||
"正常心率窦性图": "正常心率竇性圖",
|
||||
"正常心率窦性图": "正常竇性心率圖",
|
||||
"窦性心律不齐图": "竇性心律不齊圖",
|
||||
"持续性房颤图": "持續性房顫圖",
|
||||
"阵法性房颤图": "陣法性房顫圖",
|
||||
|
||||
BIN
assets/miniapp/mhtControl_1.0.94.zip
Normal file
BIN
assets/miniapp/mhtControl_1.0.94.zip
Normal file
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
class ServiceConstant {
|
||||
// static const String baseHost = "zhmht.swes.com.cn:27021"; //服务地址 眠花糖测试地址
|
||||
static String baseHost = "zhmht.swes.com.cn:27020"; //服务地址 眠花糖正式地址
|
||||
// static const String baseHost = "vsbs-test.he-info.cn"; //服务地址 本地测试地址
|
||||
// static String baseHost = "vsbs-test.he-info.cn"; //服务地址 本地测试地址
|
||||
// static const String baseHost = "vsbst-api.he-info.com";//服务地址
|
||||
// static const String service_address = "http://$baseHost";
|
||||
static String service_address = "https://$baseHost";
|
||||
|
||||
@@ -8,8 +8,8 @@ import 'package:vbvs_app/enum/APPPackageType.dart';
|
||||
class AppConstants {
|
||||
// App-related constants
|
||||
|
||||
static const String zhmht_app_version = "SWES_1.2026.3.17"; //眠花糖
|
||||
static const String theh_app_version = "1.2603.23"; //太和
|
||||
static const String zhmht_app_version = "SWES_1.2026.3.30"; //眠花糖
|
||||
static const String theh_app_version = "1.2603.30"; //太和
|
||||
|
||||
// 1. 纯字符串列表格式
|
||||
static const List<String> integerTimeZones = [
|
||||
|
||||
@@ -54,6 +54,9 @@ class DeviceTypeController extends GetControllerEx<DeviceTypeModel> {
|
||||
RxBool own = false.obs; //体验id
|
||||
RxString errmsg = "".obs;
|
||||
RxBool qcListLoading = true.obs;
|
||||
RxBool qcDetailLoading = true.obs; // 详情加载状态(专门用于id不为空时的加载)
|
||||
|
||||
int _requestSequence = 0;
|
||||
|
||||
Future<ApiResponse> getDeviceType() async {
|
||||
ApiResponse apiResponse = ApiResponse(code: -1, msg: "请求失败".tr);
|
||||
@@ -128,7 +131,15 @@ class DeviceTypeController extends GetControllerEx<DeviceTypeModel> {
|
||||
}
|
||||
|
||||
Future<bool> getCheckHistory({required String mac, String? id}) async {
|
||||
// 生成新的序列号
|
||||
final currentSeq = ++_requestSequence;
|
||||
if (id == null || id.isEmpty) {
|
||||
qcListLoading.value = true;
|
||||
} else {
|
||||
qcDetailLoading.value = true;
|
||||
currentCq.value = {};
|
||||
}
|
||||
|
||||
String serviceAddress = ServiceConstant.qc_service_address;
|
||||
String serviceApi = ServiceConstant.getCheckHistory;
|
||||
String queryUrl = "$serviceAddress$serviceApi";
|
||||
@@ -155,6 +166,11 @@ class DeviceTypeController extends GetControllerEx<DeviceTypeModel> {
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
if (_requestSequence != currentSeq) {
|
||||
print('⚠️ 忽略过期请求 #$currentSeq,当前最新是 #$_requestSequence');
|
||||
return;
|
||||
}
|
||||
|
||||
flag = true;
|
||||
// 判断返回数据类型
|
||||
if (res.data is List) {
|
||||
@@ -164,16 +180,30 @@ class DeviceTypeController extends GetControllerEx<DeviceTypeModel> {
|
||||
// 如果是Map,赋值给currentCq
|
||||
currentCq.value = res.data as Map<String, dynamic>;
|
||||
}
|
||||
if (id == null || id.isEmpty) {
|
||||
qcListLoading.value = false;
|
||||
} else {
|
||||
qcDetailLoading.value = false;
|
||||
}
|
||||
// qcListLoading.value = false;
|
||||
updateAll();
|
||||
},
|
||||
onFailure: (res) {
|
||||
if (_requestSequence != currentSeq) {
|
||||
print('⚠️ 忽略过期失败回调 #$currentSeq');
|
||||
return;
|
||||
}
|
||||
|
||||
flag = false;
|
||||
if (id == null || id.isEmpty) {
|
||||
qcListLoading.value = false;
|
||||
} else {
|
||||
qcDetailLoading.value = false;
|
||||
}
|
||||
currentCq.value = {};
|
||||
NewTopSlideNotification.show(
|
||||
text: "数据加载失败", textColor: themeController.currentColor.sc9);
|
||||
EasyDartModule.logger.error("快检报告数据加载失败-->${res.msg??'服务器错误'}");
|
||||
EasyDartModule.logger.error("快检报告数据加载失败-->${res.msg ?? '服务器错误'}");
|
||||
},
|
||||
);
|
||||
return flag;
|
||||
|
||||
@@ -141,8 +141,8 @@ Future<void> main() async {
|
||||
void initServiceAddress() {
|
||||
if (AppConstants().ent_type == APPPackageType.MHT.code) {
|
||||
// 眠花糖
|
||||
// ServiceConstant.baseHost = "zhmht.swes.com.cn:27020";
|
||||
ServiceConstant.baseHost = "vsbs-test.he-info.cn";
|
||||
ServiceConstant.baseHost = "zhmht.swes.com.cn:27020";
|
||||
// ServiceConstant.baseHost = "vsbs-test.he-info.cn";
|
||||
} else if (AppConstants().ent_type == APPPackageType.TH.code) {
|
||||
// 太和
|
||||
// ServiceConstant.baseHost = "vsbst-api.he-info.com";
|
||||
@@ -698,7 +698,7 @@ void initEasyDartModule() {
|
||||
EasyDartModule.init(
|
||||
loggerConfig: LoggerConfig(
|
||||
host: "https://zhmht.swes.com.cn:27020/vsbs_log",
|
||||
serviceName: "太和e护test2026-03-23"),
|
||||
serviceName: "太和e护test2026-03-30"),
|
||||
webSocketConfig:
|
||||
WebSocketConfig(ServiceConstant.webSocketService, (data) {
|
||||
// 接收到服务消息
|
||||
|
||||
@@ -94,19 +94,28 @@ class _HealthReportCardWidgetState extends State<HealthReportCardWidget> {
|
||||
_formatTime(reportData['create_time']),
|
||||
onViewTap: () async {
|
||||
// 查看按钮点击事件
|
||||
edm.EasyDartModule.logger.info("快检报告查看按钮点击");
|
||||
String ID = reportData['id'];
|
||||
DeviceTypeController deviceTypeController =
|
||||
Get.find();
|
||||
await deviceTypeController.getCheckHistory(
|
||||
id: ID, mac: reportData['mac']);
|
||||
if (deviceTypeController.currentCq.value == null ||
|
||||
deviceTypeController.currentCq.value.isEmpty) {
|
||||
NewTopSlideNotification.show(
|
||||
text: "未找到快检报告".tr,
|
||||
textColor: themeController.currentColor.sc9);
|
||||
return;
|
||||
}
|
||||
_onViewReport(deviceTypeController.currentCq.value);
|
||||
Map data = {
|
||||
'id': ID,
|
||||
'mac': reportData['mac'],
|
||||
};
|
||||
// await deviceTypeController.getCheckHistory(
|
||||
// id: ID, mac: reportData['mac']);
|
||||
// if (Get.currentRoute != '/healthExperienceHistory')
|
||||
// return;
|
||||
// if (deviceTypeController.currentCq.value == null ||
|
||||
// deviceTypeController.currentCq.value.isEmpty) {
|
||||
// NewTopSlideNotification.show(
|
||||
// text: "未找到快检报告".tr,
|
||||
// textColor: themeController.currentColor.sc9);
|
||||
// return;
|
||||
// }
|
||||
// _onViewReport(deviceTypeController.currentCq.value);
|
||||
Get.toNamed('/healthQuickCheckReportPage',
|
||||
arguments: data);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1262,11 +1262,14 @@ class _HealthCheckPageState extends State<HealthCheckPage>
|
||||
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);
|
||||
Map data = {
|
||||
"id": deviceTypeController.experience_id.value,
|
||||
"mac": widget.personInfo['mac']
|
||||
};
|
||||
// await deviceTypeController.getCheckHistory(
|
||||
// id: deviceTypeController.experience_id.value,
|
||||
// mac: widget.personInfo['mac']);
|
||||
Get.toNamed('/healthQuickCheckReportPage', arguments: data);
|
||||
} catch (e) {
|
||||
edm.EasyDartModule.logger.error("快检报告页面加载失败---?${e.toString()}");
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import 'package:vbvs_app/controller/message/message_review_controller.dart';
|
||||
import 'package:vbvs_app/pages/device/component/HealthReportCard.dart';
|
||||
|
||||
class HealthExperienceHistory extends StatefulWidget {
|
||||
var data; //1.绑定时 2.绑定后
|
||||
var data;
|
||||
HealthExperienceHistory({super.key, required this.data});
|
||||
|
||||
@override
|
||||
|
||||
@@ -6,9 +6,11 @@ import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/NewTopSlideNotification.dart';
|
||||
import 'package:vbvs_app/controller/date/CalendarController.dart';
|
||||
import 'package:vbvs_app/controller/device/device_type_controller.dart';
|
||||
import 'package:vbvs_app/controller/sleep/sleep_report_controller.dart';
|
||||
import 'package:vbvs_app/pages/sleep_report/QcReportWidget.dart';
|
||||
import 'package:vbvs_app/pages/sleep_report/chart/StatusBarWithIndicator.dart';
|
||||
import 'package:EasyDartModule/EasyDartModule.dart' as edm;
|
||||
|
||||
class QuickHealthReportPage extends StatefulWidget {
|
||||
var data;
|
||||
@@ -27,6 +29,7 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
final GlobalKey breatheCardKey = GlobalKey();
|
||||
final ScrollController _scrollController = ScrollController();
|
||||
final RxBool isRightLimit = false.obs;
|
||||
DeviceTypeController deviceTypeController = Get.find();
|
||||
|
||||
@override
|
||||
void didUpdateWidget(QuickHealthReportPage oldWidget) {
|
||||
@@ -47,28 +50,50 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
deviceTypeController
|
||||
.getCheckHistory(id: widget.data['id'], mac: widget.data['mac'])
|
||||
.then((res) {
|
||||
if (deviceTypeController.currentCq.value == null ||
|
||||
deviceTypeController.currentCq.value.isEmpty) {
|
||||
// NewTopSlideNotification.show(
|
||||
// text: "未找到快检报告".tr, textColor: themeController.currentColor.sc9);
|
||||
edm.EasyDartModule.logger.info("未找到快检报告");
|
||||
return;
|
||||
} else {
|
||||
deviceTypeController.updateAll();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final healthLevelInfo = getHealthLevelInfo(widget.data);
|
||||
|
||||
double lineWidth = 150.rpx;
|
||||
try {
|
||||
if (widget.data == null || widget.data.isEmpty) {
|
||||
return Obx(() {
|
||||
final healthLevelInfo =
|
||||
getHealthLevelInfo(deviceTypeController.currentCq.value);
|
||||
if (deviceTypeController.qcDetailLoading.value) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: (widget.data['noBackImg'] != null &&
|
||||
widget.data['noBackImg'] == true)
|
||||
image: (deviceTypeController.currentCq.value['noBackImg'] !=
|
||||
null &&
|
||||
deviceTypeController.currentCq.value['noBackImg'] ==
|
||||
true)
|
||||
? null // ✅ 不要背景图
|
||||
: DecorationImage(
|
||||
image: (widget.data['backgroundImg'] != null &&
|
||||
widget.data['backgroundImg']
|
||||
image: (deviceTypeController
|
||||
.currentCq.value['backgroundImg'] !=
|
||||
null &&
|
||||
deviceTypeController
|
||||
.currentCq.value['backgroundImg']
|
||||
.toString()
|
||||
.isNotEmpty)
|
||||
? AssetImage(widget.data['backgroundImg'])
|
||||
? AssetImage(deviceTypeController
|
||||
.currentCq.value['backgroundImg'])
|
||||
: AssetImage(getBackgroundImageNoImage())
|
||||
as ImageProvider,
|
||||
fit: BoxFit.fill,
|
||||
@@ -76,12 +101,18 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent, // 背景透明
|
||||
appBar: (widget.data['arrow'] != null &&
|
||||
widget.data['arrow'] == false)
|
||||
appBar:
|
||||
(deviceTypeController.currentCq.value['arrow'] != null &&
|
||||
deviceTypeController.currentCq.value['arrow'] ==
|
||||
false)
|
||||
? null
|
||||
: AppBar(
|
||||
backgroundColor: widget.data['backgroundColor'] != null
|
||||
? widget.data['backgroundColor'].withOpacity(0.8)
|
||||
backgroundColor: deviceTypeController
|
||||
.currentCq.value['backgroundColor'] !=
|
||||
null
|
||||
? deviceTypeController
|
||||
.currentCq.value['backgroundColor']
|
||||
.withOpacity(0.8)
|
||||
: themeController.currentColor.sc5,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(
|
||||
@@ -105,8 +136,12 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
),
|
||||
|
||||
/// 左边返回按钮
|
||||
if (widget.data['arrow'] == null ||
|
||||
widget.data['arrow'] == true)
|
||||
if (deviceTypeController
|
||||
.currentCq.value['arrow'] ==
|
||||
null ||
|
||||
deviceTypeController
|
||||
.currentCq.value['arrow'] ==
|
||||
true)
|
||||
Positioned(
|
||||
left: 0,
|
||||
child: returnIconButtomNew(),
|
||||
@@ -117,26 +152,35 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Text('无数据'.tr),
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: themeController.currentColor.sc1,
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
return LayoutBuilder(
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: (widget.data['noBackImg'] != null &&
|
||||
widget.data['noBackImg'] == true)
|
||||
image: (deviceTypeController.currentCq.value['noBackImg'] !=
|
||||
null &&
|
||||
deviceTypeController.currentCq.value['noBackImg'] ==
|
||||
true)
|
||||
? null // ✅ 不要背景图
|
||||
: DecorationImage(
|
||||
image: (widget.data['backgroundImg'] != null &&
|
||||
widget.data['backgroundImg']
|
||||
image: (deviceTypeController
|
||||
.currentCq.value['backgroundImg'] !=
|
||||
null &&
|
||||
deviceTypeController
|
||||
.currentCq.value['backgroundImg']
|
||||
.toString()
|
||||
.isNotEmpty)
|
||||
? AssetImage(widget.data['backgroundImg'])
|
||||
? AssetImage(deviceTypeController
|
||||
.currentCq.value['backgroundImg'])
|
||||
: AssetImage(getBackgroundImageNoImage())
|
||||
as ImageProvider,
|
||||
fit: BoxFit.fill,
|
||||
@@ -144,12 +188,18 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent, // 背景透明
|
||||
appBar: (widget.data['arrow'] != null &&
|
||||
widget.data['arrow'] == false)
|
||||
appBar:
|
||||
(deviceTypeController.currentCq.value['arrow'] != null &&
|
||||
deviceTypeController.currentCq.value['arrow'] ==
|
||||
false)
|
||||
? null
|
||||
: AppBar(
|
||||
backgroundColor: widget.data['backgroundColor'] != null
|
||||
? widget.data['backgroundColor'].withOpacity(0.8)
|
||||
backgroundColor: deviceTypeController
|
||||
.currentCq.value['backgroundColor'] !=
|
||||
null
|
||||
? deviceTypeController
|
||||
.currentCq.value['backgroundColor']
|
||||
.withOpacity(0.8)
|
||||
: themeController.currentColor.sc5,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(
|
||||
@@ -173,8 +223,12 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
),
|
||||
|
||||
/// 左边返回按钮
|
||||
if (widget.data['arrow'] == null ||
|
||||
widget.data['arrow'] == true)
|
||||
if (deviceTypeController
|
||||
.currentCq.value['arrow'] ==
|
||||
null ||
|
||||
deviceTypeController
|
||||
.currentCq.value['arrow'] ==
|
||||
true)
|
||||
Positioned(
|
||||
left: 0,
|
||||
child: returnIconButtomNew(),
|
||||
@@ -189,8 +243,8 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.fromLTRB(30.rpx, 30.rpx, 30.rpx, 26.rpx),
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
30.rpx, 30.rpx, 30.rpx, 26.rpx),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
constraints: BoxConstraints(
|
||||
@@ -226,7 +280,8 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants()
|
||||
.smaller_text_fontSize,
|
||||
color: themeController.currentColor.sc8,
|
||||
color: themeController
|
||||
.currentColor.sc8,
|
||||
height: 1.4,
|
||||
),
|
||||
softWrap: true,
|
||||
@@ -253,10 +308,12 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
padding: EdgeInsets.all(30.rpx),
|
||||
decoration: BoxDecoration(
|
||||
// color: themeController.currentColor.sc5,
|
||||
borderRadius: BorderRadius.circular(16.rpx),
|
||||
borderRadius:
|
||||
BorderRadius.circular(16.rpx),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
// 左边的Column,包含五行文字
|
||||
Expanded(
|
||||
@@ -265,7 +322,7 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'${widget.data['person']['name']} (${widget.data['person']['gender']} ${widget.data['person']['age'].toInt()}岁)',
|
||||
'${deviceTypeController.currentCq.value['person']['name']} (${deviceTypeController.currentCq.value['person']['gender']} ${deviceTypeController.currentCq.value['person']['age'].toInt()}岁)',
|
||||
style: TextStyle(
|
||||
fontSize: AppConstants()
|
||||
.bigger_text_fontSize,
|
||||
@@ -277,7 +334,7 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
SizedBox(height: 18.rpx),
|
||||
Text(
|
||||
"快检得分:".tr +
|
||||
'${widget.data['score']['score'].toInt()} 分',
|
||||
'${deviceTypeController.currentCq.value['score']['score'].toInt()} 分',
|
||||
style: TextStyle(
|
||||
fontSize: AppConstants()
|
||||
.small_an_text_fontSize,
|
||||
@@ -302,8 +359,8 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
style: TextStyle(
|
||||
fontSize: AppConstants()
|
||||
.small_an_text_fontSize,
|
||||
color:
|
||||
healthLevelInfo['color'],
|
||||
color: healthLevelInfo[
|
||||
'color'],
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -311,7 +368,7 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
SizedBox(height: 18.rpx),
|
||||
Text(
|
||||
"设备ID:".tr +
|
||||
'${widget.data['mac']}',
|
||||
'${deviceTypeController.currentCq.value['mac']}',
|
||||
style: TextStyle(
|
||||
fontSize: AppConstants()
|
||||
.small_an_text_fontSize,
|
||||
@@ -322,7 +379,7 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
SizedBox(height: 18.rpx),
|
||||
Text(
|
||||
"快检时间:".tr +
|
||||
'${MyUtils.timestampToDateString(widget.data['create_time'].toInt())}',
|
||||
'${MyUtils.timestampToDateString(deviceTypeController.currentCq.value['create_time'].toInt())}',
|
||||
style: TextStyle(
|
||||
fontSize: AppConstants()
|
||||
.small_an_text_fontSize,
|
||||
@@ -361,28 +418,34 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
// height: 220.rpx,
|
||||
decoration: BoxDecoration(
|
||||
// color: themeController.currentColor.sc5,
|
||||
borderRadius: BorderRadius.circular(16.rpx),
|
||||
borderRadius:
|
||||
BorderRadius.circular(16.rpx),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
30.rpx, 20.rpx, 30.rpx, 20.rpx),
|
||||
child: StatusBarWithIndicator(
|
||||
selectKey: widget.data['score']['level']
|
||||
selectKey: deviceTypeController
|
||||
.currentCq.value['score']['level']
|
||||
.toInt(), // 这里传入对应的 level 值
|
||||
showLabel:
|
||||
(widget.data['type']['score'] as List)
|
||||
showLabel: (deviceTypeController
|
||||
.currentCq
|
||||
.value['type']['score'] as List)
|
||||
.map<Map<String, dynamic>>((item) {
|
||||
return {
|
||||
'key': item['level']?.toInt() ??
|
||||
0, // 使用 level 作为 key
|
||||
'name': item['name'] ?? '',
|
||||
'color': stringToColor(item['color'] ??
|
||||
'color': stringToColor(
|
||||
item['color'] ??
|
||||
''), // 将颜色字符串转换为 Color
|
||||
'range': item['range'] ?? '', // 添加范围数据
|
||||
'range':
|
||||
item['range'] ?? '', // 添加范围数据
|
||||
};
|
||||
}).toList(),
|
||||
showCurrentValue: true, // 显示当前值
|
||||
currentValueText: '当前属于'.tr, // 或者根据实际值动态生成
|
||||
currentValueText:
|
||||
'当前属于'.tr, // 或者根据实际值动态生成
|
||||
showRange: true, // 显示范围
|
||||
),
|
||||
),
|
||||
@@ -402,7 +465,8 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
// color: themeController.currentColor.sc5,
|
||||
borderRadius: BorderRadius.circular(16.rpx),
|
||||
),
|
||||
child: QcReportWidget(widget.data),
|
||||
child: QcReportWidget(
|
||||
deviceTypeController.currentCq.value),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
@@ -411,7 +475,7 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
children: [
|
||||
// Text(
|
||||
// "MAC号".tr +
|
||||
// ": ${widget.data['mac'] ?? '未知数据'.tr}",
|
||||
// ": ${deviceTypeController.currentCq.value['mac'] ?? '未知数据'.tr}",
|
||||
// style: TextStyle(
|
||||
// color: themeController.currentColor.sc4,
|
||||
// fontSize:
|
||||
@@ -426,7 +490,8 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
.tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc4,
|
||||
fontSize: AppConstants().smaller_text_fontSize,
|
||||
fontSize:
|
||||
AppConstants().smaller_text_fontSize,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -447,6 +512,8 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
NewTopSlideNotification.show(
|
||||
text: '页面渲染失败:${e.toString()}'.tr,
|
||||
@@ -456,15 +523,20 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: (widget.data['noBackImg'] != null &&
|
||||
widget.data['noBackImg'] == true)
|
||||
image: (deviceTypeController.currentCq.value['noBackImg'] !=
|
||||
null &&
|
||||
deviceTypeController.currentCq.value['noBackImg'] == true)
|
||||
? null // ✅ 不要背景图
|
||||
: DecorationImage(
|
||||
image: (widget.data['backgroundImg'] != null &&
|
||||
widget.data['backgroundImg']
|
||||
image: (deviceTypeController
|
||||
.currentCq.value['backgroundImg'] !=
|
||||
null &&
|
||||
deviceTypeController
|
||||
.currentCq.value['backgroundImg']
|
||||
.toString()
|
||||
.isNotEmpty)
|
||||
? AssetImage(widget.data['backgroundImg'])
|
||||
? AssetImage(deviceTypeController
|
||||
.currentCq.value['backgroundImg'])
|
||||
: AssetImage(getBackgroundImageNoImage())
|
||||
as ImageProvider,
|
||||
fit: BoxFit.fill,
|
||||
@@ -472,12 +544,16 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent, // 背景透明
|
||||
appBar: (widget.data['arrow'] != null &&
|
||||
widget.data['arrow'] == false)
|
||||
appBar: (deviceTypeController.currentCq.value['arrow'] != null &&
|
||||
deviceTypeController.currentCq.value['arrow'] == false)
|
||||
? null
|
||||
: AppBar(
|
||||
backgroundColor: widget.data['backgroundColor'] != null
|
||||
? widget.data['backgroundColor'].withOpacity(0.8)
|
||||
backgroundColor: deviceTypeController
|
||||
.currentCq.value['backgroundColor'] !=
|
||||
null
|
||||
? deviceTypeController
|
||||
.currentCq.value['backgroundColor']
|
||||
.withOpacity(0.8)
|
||||
: themeController.currentColor.sc5,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(
|
||||
@@ -501,8 +577,10 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
|
||||
),
|
||||
|
||||
/// 左边返回按钮
|
||||
if (widget.data['arrow'] == null ||
|
||||
widget.data['arrow'] == true)
|
||||
if (deviceTypeController.currentCq.value['arrow'] ==
|
||||
null ||
|
||||
deviceTypeController.currentCq.value['arrow'] ==
|
||||
true)
|
||||
Positioned(
|
||||
left: 0,
|
||||
child: returnIconButtomNew(),
|
||||
|
||||
Reference in New Issue
Block a user