This commit is contained in:
wyf
2025-08-16 11:01:17 +08:00
parent 79cbdb3fa2
commit 2e1ce8f9d7
13 changed files with 174 additions and 50 deletions

View File

@@ -3,9 +3,9 @@
"菜单": { "菜单": {
"首页": "Home", "首页": "Home",
"报告": "Report", "报告": "Report",
"小e": "Little e", "小e": "EChat",
"消息": "Messages", "消息": "Messages",
"我的": "Me" "我的": "Mine"
}, },
"首页": { "首页": {
"登录": "Login", "登录": "Login",
@@ -16,8 +16,8 @@
"扫一扫绑定": "Scan to add new device", "扫一扫绑定": "Scan to add new device",
"蓝牙绑定": "Search nearby devices via Bluetooth", "蓝牙绑定": "Search nearby devices via Bluetooth",
"已关联体征监测设备": "Bound vital sign monitoring devices", "已关联体征监测设备": "Bound vital sign monitoring devices",
"我的e护": "My eCare", "我的e护": "Mine",
"云关爱": "Cloud Care", "云关爱": "Cloud",
"报告详情": "Report details" "报告详情": "Report details"
}, },
"我的": { "我的": {
@@ -183,8 +183,8 @@
"标题": "Vital Sign Monitoring Device", "标题": "Vital Sign Monitoring Device",
"输入关键词": "Enter keywords", "输入关键词": "Enter keywords",
"搜索": "Search", "搜索": "Search",
"我的e护": "My eCare", "我的e护": "Mine",
"云关爱": "Cloud Care", "云关爱": "Cloud",
"设备ID": "Device ID", "设备ID": "Device ID",
"更新时间": "Update time", "更新时间": "Update time",
"设备来源": "Device source", "设备来源": "Device source",
@@ -236,7 +236,7 @@
"更新时间": "Update time", "更新时间": "Update time",
"已分享": "Shared", "已分享": "Shared",
"设备来源": "Device source", "设备来源": "Device source",
"云关爱": "Cloud Care", "云关爱": "Cloud",
"是否确认解绑": "Confirm unbinding?", "是否确认解绑": "Confirm unbinding?",
"请求失败": "Request failed!", "请求失败": "Request failed!",
"操作成功": "Operation successful!", "操作成功": "Operation successful!",
@@ -511,5 +511,10 @@
"否": "No", "否": "No",
"男": "Male", "男": "Male",
"女": "Female", "女": "Female",
"可用WLAN": "Available WiFi" "可用WLAN": "Available WiFi",
"发现": "Found!",
"检测到": "Detected",
"绑定流程未走完是否继续": "Binding process is incomplete, continue?",
"继续": "Continue",
"下次再说": "deal next time"
} }

View File

@@ -427,7 +427,7 @@
"下次再说": "下次再说", "下次再说": "下次再说",
"发现": "发现!", "发现": "发现!",
"检测到": "检测到", "检测到": "检测到",
"绑定流程未走完是否继续": "绑定流程未走完是否继续", "绑定流程未走完是否继续": "绑定流程未走完是否继续?",
"暂无": "暂无", "暂无": "暂无",
"设备连接超时,请重试": "设备连接超时,请点击刷新重试", "设备连接超时,请重试": "设备连接超时,请点击刷新重试",
"设备连接失败": "设备连接失败,请点击刷新重试", "设备连接失败": "设备连接失败,请点击刷新重试",

View File

@@ -508,5 +508,9 @@
"否": "否", "否": "否",
"男": "男", "男": "男",
"女": "女", "女": "女",
"": "男" "发现": "發現!",
"检测到": "檢測到",
"绑定流程未走完是否继续": "綁定流程未走完是否繼續?",
"继续": "繼續",
"下次再说": "下次再說"
} }

View File

@@ -47,6 +47,7 @@ class RepairController extends GetControllerEx<RepairModel> {
RxString phone = "".obs; RxString phone = "".obs;
List<String>? deviceListId = []; List<String>? deviceListId = [];
List<String>? deviceListIdLabel = [];
List<String>? deviceListName = []; List<String>? deviceListName = [];
RxList repairHistory = [].obs; RxList repairHistory = [].obs;

View File

@@ -364,7 +364,7 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
Container( Container(
width: 160.rpx, width: 180.rpx,
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
'体征检测设备.我的e护'.tr, '体征检测设备.我的e护'.tr,
@@ -416,7 +416,7 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
Container( Container(
width: 160.rpx, width: 180.rpx,
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
'体征检测设备.云关爱'.tr, '体征检测设备.云关爱'.tr,
@@ -437,6 +437,9 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
.currentColor .currentColor
.sc2, .sc2,
), ),
overflow:
TextOverflow.ellipsis,
maxLines: 1,
), ),
), ),
SizedBox(height: 10.rpx), SizedBox(height: 10.rpx),
@@ -447,8 +450,8 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
], ],
), ),
Obx(() { Obx(() {
// 横线宽度固定为160.rpx // 横线宽度固定为180.rpx
double lineWidth = 160.rpx; double lineWidth = 180.rpx;
return AnimatedPositioned( return AnimatedPositioned(
duration: Duration(milliseconds: 300), duration: Duration(milliseconds: 300),
curve: Curves.easeInOut, curve: Curves.easeInOut,
@@ -456,7 +459,7 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
left: left:
bodyDeviceController.model.type == 1 bodyDeviceController.model.type == 1
? 0 ? 0
: 160.rpx, : 180.rpx,
child: Container( child: Container(
width: lineWidth, width: lineWidth,
height: 4.rpx, height: 4.rpx,

View File

@@ -35,6 +35,7 @@ class _AfterCalibrationPersonPageState
Timer? _pollingTimer; Timer? _pollingTimer;
bool exit = false; bool exit = false;
bool start = false;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@@ -123,11 +124,68 @@ class _AfterCalibrationPersonPageState
borderRadius: 20.rpx, borderRadius: 20.rpx,
onTap: () async { onTap: () async {
if (deviceCalibrationController.flag.value != 2) { if (deviceCalibrationController.flag.value != 2) {
showConfirmDialog( if (start) {
context, Container(), "校准未完成提示".tr, showConfirmDialog(
onConfirm: () async { context, Container(), "校准未完成提示".tr,
// Get.back(); onConfirm: () async {
// print("object"); // Get.back();
// print("object");
deviceCalibrationController.process.value =
0;
deviceCalibrationController
.bed_calibration.value = 0;
deviceCalibrationController
.position_calibration.value = 0;
blueteethBindController.cid!.value = "";
PersonController personController =
Get.find();
var data = personController.after_deveice;
if (data['person'] != null) {
personController.currentPersonId.value =
data['_id'];
personController.name.value =
data['person']['name'];
personController.update_person_mac.value =
data['mac'];
personController.gender.value =
data['person']['gender'] ?? 1;
personController.weight?.value =
data['person']['weight'] == null
? ''
: data['person']['weight']
.toString();
personController.height.value =
data['person']['height'] == null
? ''
: data['person']['height']
.toString();
personController
.selectedDiseaseIds.value =
data['person']['disease'] ?? [];
personController.birthday.value =
data['person']['birthday'] ?? '';
personController.dateTime =
MyUtils.formatBirthdayTime(
data['person']['birthday']);
} else {
personController.update_person_mac.value =
data['mac'];
personController.currentPersonId.value =
data['_id'];
personController.name.value = "";
personController.gender.value = 1;
personController.dateTime = null;
personController.height.value = "";
personController.weight.value = "";
personController.diseaseList.value = [];
}
await Get.toNamed("/afterUpdatePersonPage");
return;
}, onCancel: () {});
} else {
deviceCalibrationController.process.value = 0; deviceCalibrationController.process.value = 0;
deviceCalibrationController deviceCalibrationController
.bed_calibration.value = 0; .bed_calibration.value = 0;
@@ -180,7 +238,7 @@ class _AfterCalibrationPersonPageState
await Get.toNamed("/afterUpdatePersonPage"); await Get.toNamed("/afterUpdatePersonPage");
return; return;
}, onCancel: () {}); }
} else { } else {
// Get.back(); // Get.back();
deviceCalibrationController.process.value = 0; deviceCalibrationController.process.value = 0;
@@ -686,6 +744,7 @@ class _AfterCalibrationPersonPageState
borderRadius: AppConstants() borderRadius: AppConstants()
.button_container_radius, // 圆角半径 .button_container_radius, // 圆角半径
onTap: () async { onTap: () async {
start = true;
if (deviceCalibrationController.flag.value == if (deviceCalibrationController.flag.value ==
2) { 2) {
deviceCalibrationController deviceCalibrationController

View File

@@ -186,7 +186,7 @@ Future<void> showHaveBindDialog(BuildContext context) async {
padding: EdgeInsetsDirectional.fromSTEB( padding: EdgeInsetsDirectional.fromSTEB(
0.rpx, 93.rpx, 0.rpx, 0.rpx), 0.rpx, 93.rpx, 0.rpx, 0.rpx),
child: Text( child: Text(
'无法绑定'.tr, '蓝牙绑定.无法绑定'.tr,
style: TextStyle( style: TextStyle(
fontFamily: 'Inter', fontFamily: 'Inter',
fontSize: 30.rpx, fontSize: 30.rpx,
@@ -202,21 +202,21 @@ Future<void> showHaveBindDialog(BuildContext context) async {
child: RichText( child: RichText(
text: TextSpan(children: [ text: TextSpan(children: [
TextSpan( TextSpan(
text: "无法绑定1".tr, text: "蓝牙绑定.无法绑定1".tr,
style: TextStyle( style: TextStyle(
color: themeController.currentColor.sc3, color: themeController.currentColor.sc3,
fontSize: AppConstants().normal_text_fontSize, fontSize: AppConstants().normal_text_fontSize,
), ),
), ),
TextSpan( TextSpan(
text: "无法绑定2".tr, text: "蓝牙绑定.无法绑定2".tr,
style: TextStyle( style: TextStyle(
color: themeController.currentColor.sc8, color: themeController.currentColor.sc8,
fontSize: AppConstants().normal_text_fontSize, fontSize: AppConstants().normal_text_fontSize,
), ),
), ),
TextSpan( TextSpan(
text: "无法绑定3".tr, text: "蓝牙绑定.无法绑定3".tr,
style: TextStyle( style: TextStyle(
color: themeController.currentColor.sc3, color: themeController.currentColor.sc3,
fontSize: AppConstants().normal_text_fontSize, fontSize: AppConstants().normal_text_fontSize,

View File

@@ -33,6 +33,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
Timer? _pollingTimer; Timer? _pollingTimer;
bool exit = false; bool exit = false;
bool start = false;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@@ -95,9 +96,23 @@ class _CalibrationPageState extends State<CalibrationPage> {
child: returnIconButtomAddCallback(() { child: returnIconButtomAddCallback(() {
if (deviceCalibrationController.flag.value != 2) { if (deviceCalibrationController.flag.value != 2) {
try { try {
showConfirmDialog( if (start) {
context, Container(), "校准未完成提示".tr, showConfirmDialog(
onConfirm: () async { context, Container(), "校准未完成提示".tr,
onConfirm: () async {
exit = true;
deviceCalibrationController.process.value =
0;
deviceCalibrationController
.bed_calibration.value = 0;
deviceCalibrationController
.position_calibration.value = 0;
blueteethBindController.cid!.value = "";
Get.back();
}, onCancel: () {
exit = false;
});
} else {
exit = true; exit = true;
deviceCalibrationController.process.value = 0; deviceCalibrationController.process.value = 0;
deviceCalibrationController deviceCalibrationController
@@ -106,9 +121,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
.position_calibration.value = 0; .position_calibration.value = 0;
blueteethBindController.cid!.value = ""; blueteethBindController.cid!.value = "";
Get.back(); Get.back();
}, onCancel: () { }
exit = false;
});
} catch (e) { } catch (e) {
print(e); print(e);
} }
@@ -128,9 +141,21 @@ class _CalibrationPageState extends State<CalibrationPage> {
onTap: () async { onTap: () async {
if (deviceCalibrationController.flag.value != if (deviceCalibrationController.flag.value !=
2) { 2) {
showConfirmDialog( if (start) {
context, Container(), "校准未完成提示".tr, showConfirmDialog(
onConfirm: () async { context, Container(), "校准未完成提示".tr,
onConfirm: () async {
await Get.toNamed("/personPage");
print("object");
deviceCalibrationController
.process.value = 0;
deviceCalibrationController
.bed_calibration.value = 0;
deviceCalibrationController
.position_calibration.value = 0;
blueteethBindController.cid!.value = "";
}, onCancel: () {});
} else {
await Get.toNamed("/personPage"); await Get.toNamed("/personPage");
print("object"); print("object");
deviceCalibrationController.process.value = deviceCalibrationController.process.value =
@@ -140,7 +165,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
deviceCalibrationController deviceCalibrationController
.position_calibration.value = 0; .position_calibration.value = 0;
blueteethBindController.cid!.value = ""; blueteethBindController.cid!.value = "";
}, onCancel: () {}); }
} else { } else {
await Get.toNamed("/personPage"); await Get.toNamed("/personPage");
deviceCalibrationController.process.value = 0; deviceCalibrationController.process.value = 0;
@@ -595,6 +620,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
borderRadius: AppConstants() borderRadius: AppConstants()
.button_container_radius, // 圆角半径 .button_container_radius, // 圆角半径
onTap: () async { onTap: () async {
start = true;
if (deviceCalibrationController.flag.value == if (deviceCalibrationController.flag.value ==
2) { 2) {
deviceCalibrationController deviceCalibrationController

View File

@@ -33,6 +33,7 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
Timer? _pollingTimer; Timer? _pollingTimer;
bool exit = false; bool exit = false;
bool start = false;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@@ -92,12 +93,31 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
), ),
Positioned( Positioned(
left: 0, left: 0,
child: returnIconButtomAddCallback(() { child: returnIconButtomAddCallback(() async {
if (deviceCalibrationController.flag.value != 2) { if (deviceCalibrationController.flag.value != 2) {
try { try {
showConfirmDialog( if (start) {
context, Container(), "校准未完成提示".tr, showConfirmDialog(
onConfirm: () async { context, Container(), "校准未完成提示".tr,
onConfirm: () async {
exit = true;
if (widget.type == 2) {
Get.back();
return;
}
await Get.toNamed("/personPage");
print("object");
deviceCalibrationController.process.value =
0;
deviceCalibrationController
.bed_calibration.value = 0;
deviceCalibrationController
.position_calibration.value = 0;
blueteethBindController.cid!.value = "";
}, onCancel: () {
exit = false;
});
} else {
exit = true; exit = true;
if (widget.type == 2) { if (widget.type == 2) {
Get.back(); Get.back();
@@ -111,9 +131,7 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
deviceCalibrationController deviceCalibrationController
.position_calibration.value = 0; .position_calibration.value = 0;
blueteethBindController.cid!.value = ""; blueteethBindController.cid!.value = "";
}, onCancel: () { }
exit = false;
});
} catch (e) { } catch (e) {
print(e); print(e);
} }
@@ -597,6 +615,7 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
borderRadius: AppConstants() borderRadius: AppConstants()
.button_container_radius, // 圆角半径 .button_container_radius, // 圆角半径
onTap: () async { onTap: () async {
start = true;
if (deviceCalibrationController.flag.value == if (deviceCalibrationController.flag.value ==
2) { 2) {
deviceCalibrationController deviceCalibrationController

View File

@@ -91,7 +91,7 @@ class _HomePageState extends State<HomePage> {
), ),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox(height: 11.rpx), SizedBox(height: 11.rpx),
ClickableContainer( ClickableContainer(
@@ -1123,7 +1123,7 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
TextSpan( TextSpan(
text: "绑定流程未走完是否继续?".tr, text: "绑定流程未走完是否继续".tr,
style: TextStyle( style: TextStyle(
fontSize: AppConstants().normal_text_fontSize, fontSize: AppConstants().normal_text_fontSize,
color: themeController.currentColor.sc3, color: themeController.currentColor.sc3,

View File

@@ -84,7 +84,10 @@ class _ApplyRepairPageState extends State<ApplyRepairPage> {
} }
if (bodyDeviceController.deviceList.isNotEmpty) { if (bodyDeviceController.deviceList.isNotEmpty) {
repairController.deviceListId = bodyDeviceController.deviceList repairController.deviceListId = bodyDeviceController.deviceList
.map((e) => e['_id'] as String) .map((e) => (e['_id']) as String)
.toList();
repairController.deviceListIdLabel = bodyDeviceController.deviceList
.map((e) => (e['code']??e['mac']) as String)
.toList(); .toList();
} }
return LayoutBuilder( return LayoutBuilder(
@@ -157,14 +160,20 @@ class _ApplyRepairPageState extends State<ApplyRepairPage> {
EdgeInsetsDirectional.fromSTEB(30.rpx, 29.rpx, 30.rpx, 0), EdgeInsetsDirectional.fromSTEB(30.rpx, 29.rpx, 30.rpx, 0),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
Obx(() { Obx(() {
var devicetype = deviceTypeController
.deviceTypeList.value
.where((device) => device['type'] == 1)
.toList();
return SingleChildScrollView( return SingleChildScrollView(
scrollDirection: Axis.horizontal, // 横向滚动 scrollDirection: Axis.horizontal, // 横向滚动
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min, // 设置为 min避免撑满父组件宽度 mainAxisSize: MainAxisSize.min, // 设置为 min避免撑满父组件宽度
children: deviceTypeController.deviceTypeList.value children: devicetype
.map( .map(
(deviceType) => CustomCard( (deviceType) => CustomCard(
borderRadius: borderRadius:

View File

@@ -117,7 +117,7 @@ class _RepairModelWidgetState extends State<RepairModelWidget> {
); );
if (matchedDevice != null) { if (matchedDevice != null) {
// 找到了匹配的项 // 找到了匹配的项
widget.model['param'] = matchedDevice['mac']; // widget.model['param'] = matchedDevice['mac'];
widget.model['mac'] = matchedDevice['mac']; widget.model['mac'] = matchedDevice['mac'];
widget.model['code'] = widget.model['code'] =
matchedDevice['code'] ?? ''; matchedDevice['code'] ?? '';
@@ -161,7 +161,7 @@ class _RepairModelWidgetState extends State<RepairModelWidget> {
isMultiSelect: false, isMultiSelect: false,
// controller: _deviceController, // controller: _deviceController,
options: repairController.deviceListId!, options: repairController.deviceListId!,
optionLabels: repairController.deviceListId!, optionLabels: repairController.deviceListIdLabel!,
), ),
), ),
), ),

View File

@@ -129,8 +129,6 @@ class _LanguageSettingState extends State<LanguageSetting> {
languageController languageController
.updateAll(); // 更新操作 .updateAll(); // 更新操作
try { try {
// ef.kv.set("language",
// language.language_code);
await ef.kvdb.write( await ef.kvdb.write(
"th/language", "th/language",
language.language_code); language.language_code);