更新
This commit is contained in:
@@ -364,7 +364,7 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
width: 160.rpx,
|
||||
width: 180.rpx,
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
'体征检测设备.我的e护'.tr,
|
||||
@@ -416,7 +416,7 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
width: 160.rpx,
|
||||
width: 180.rpx,
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
'体征检测设备.云关爱'.tr,
|
||||
@@ -437,6 +437,9 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
.currentColor
|
||||
.sc2,
|
||||
),
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.rpx),
|
||||
@@ -447,8 +450,8 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
],
|
||||
),
|
||||
Obx(() {
|
||||
// 横线宽度固定为160.rpx
|
||||
double lineWidth = 160.rpx;
|
||||
// 横线宽度固定为180.rpx
|
||||
double lineWidth = 180.rpx;
|
||||
return AnimatedPositioned(
|
||||
duration: Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
@@ -456,7 +459,7 @@ class _BodyDevicePageState extends State<BodyDeviceWidget> {
|
||||
left:
|
||||
bodyDeviceController.model.type == 1
|
||||
? 0
|
||||
: 160.rpx,
|
||||
: 180.rpx,
|
||||
child: Container(
|
||||
width: lineWidth,
|
||||
height: 4.rpx,
|
||||
|
||||
@@ -35,6 +35,7 @@ class _AfterCalibrationPersonPageState
|
||||
Timer? _pollingTimer;
|
||||
|
||||
bool exit = false;
|
||||
bool start = false;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -123,11 +124,68 @@ class _AfterCalibrationPersonPageState
|
||||
borderRadius: 20.rpx,
|
||||
onTap: () async {
|
||||
if (deviceCalibrationController.flag.value != 2) {
|
||||
showConfirmDialog(
|
||||
context, Container(), "校准未完成提示".tr,
|
||||
onConfirm: () async {
|
||||
// Get.back();
|
||||
// print("object");
|
||||
if (start) {
|
||||
showConfirmDialog(
|
||||
context, Container(), "校准未完成提示".tr,
|
||||
onConfirm: () async {
|
||||
// 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
|
||||
.bed_calibration.value = 0;
|
||||
@@ -180,7 +238,7 @@ class _AfterCalibrationPersonPageState
|
||||
|
||||
await Get.toNamed("/afterUpdatePersonPage");
|
||||
return;
|
||||
}, onCancel: () {});
|
||||
}
|
||||
} else {
|
||||
// Get.back();
|
||||
deviceCalibrationController.process.value = 0;
|
||||
@@ -686,6 +744,7 @@ class _AfterCalibrationPersonPageState
|
||||
borderRadius: AppConstants()
|
||||
.button_container_radius, // 圆角半径
|
||||
onTap: () async {
|
||||
start = true;
|
||||
if (deviceCalibrationController.flag.value ==
|
||||
2) {
|
||||
deviceCalibrationController
|
||||
|
||||
@@ -186,7 +186,7 @@ Future<void> showHaveBindDialog(BuildContext context) async {
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 93.rpx, 0.rpx, 0.rpx),
|
||||
child: Text(
|
||||
'无法绑定'.tr,
|
||||
'蓝牙绑定.无法绑定'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 30.rpx,
|
||||
@@ -202,21 +202,21 @@ Future<void> showHaveBindDialog(BuildContext context) async {
|
||||
child: RichText(
|
||||
text: TextSpan(children: [
|
||||
TextSpan(
|
||||
text: "无法绑定1".tr,
|
||||
text: "蓝牙绑定.无法绑定1".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: "无法绑定2".tr,
|
||||
text: "蓝牙绑定.无法绑定2".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc8,
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: "无法绑定3".tr,
|
||||
text: "蓝牙绑定.无法绑定3".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
|
||||
@@ -33,6 +33,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
Timer? _pollingTimer;
|
||||
|
||||
bool exit = false;
|
||||
bool start = false;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -95,9 +96,23 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
child: returnIconButtomAddCallback(() {
|
||||
if (deviceCalibrationController.flag.value != 2) {
|
||||
try {
|
||||
showConfirmDialog(
|
||||
context, Container(), "校准未完成提示".tr,
|
||||
onConfirm: () async {
|
||||
if (start) {
|
||||
showConfirmDialog(
|
||||
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;
|
||||
deviceCalibrationController.process.value = 0;
|
||||
deviceCalibrationController
|
||||
@@ -106,9 +121,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
.position_calibration.value = 0;
|
||||
blueteethBindController.cid!.value = "";
|
||||
Get.back();
|
||||
}, onCancel: () {
|
||||
exit = false;
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
@@ -128,9 +141,21 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
onTap: () async {
|
||||
if (deviceCalibrationController.flag.value !=
|
||||
2) {
|
||||
showConfirmDialog(
|
||||
context, Container(), "校准未完成提示".tr,
|
||||
onConfirm: () async {
|
||||
if (start) {
|
||||
showConfirmDialog(
|
||||
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");
|
||||
print("object");
|
||||
deviceCalibrationController.process.value =
|
||||
@@ -140,7 +165,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
deviceCalibrationController
|
||||
.position_calibration.value = 0;
|
||||
blueteethBindController.cid!.value = "";
|
||||
}, onCancel: () {});
|
||||
}
|
||||
} else {
|
||||
await Get.toNamed("/personPage");
|
||||
deviceCalibrationController.process.value = 0;
|
||||
@@ -595,6 +620,7 @@ class _CalibrationPageState extends State<CalibrationPage> {
|
||||
borderRadius: AppConstants()
|
||||
.button_container_radius, // 圆角半径
|
||||
onTap: () async {
|
||||
start = true;
|
||||
if (deviceCalibrationController.flag.value ==
|
||||
2) {
|
||||
deviceCalibrationController
|
||||
|
||||
@@ -33,6 +33,7 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
|
||||
Timer? _pollingTimer;
|
||||
|
||||
bool exit = false;
|
||||
bool start = false;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -92,12 +93,31 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
|
||||
),
|
||||
Positioned(
|
||||
left: 0,
|
||||
child: returnIconButtomAddCallback(() {
|
||||
child: returnIconButtomAddCallback(() async {
|
||||
if (deviceCalibrationController.flag.value != 2) {
|
||||
try {
|
||||
showConfirmDialog(
|
||||
context, Container(), "校准未完成提示".tr,
|
||||
onConfirm: () async {
|
||||
if (start) {
|
||||
showConfirmDialog(
|
||||
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;
|
||||
if (widget.type == 2) {
|
||||
Get.back();
|
||||
@@ -111,9 +131,7 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
|
||||
deviceCalibrationController
|
||||
.position_calibration.value = 0;
|
||||
blueteethBindController.cid!.value = "";
|
||||
}, onCancel: () {
|
||||
exit = false;
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
@@ -597,6 +615,7 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
|
||||
borderRadius: AppConstants()
|
||||
.button_container_radius, // 圆角半径
|
||||
onTap: () async {
|
||||
start = true;
|
||||
if (deviceCalibrationController.flag.value ==
|
||||
2) {
|
||||
deviceCalibrationController
|
||||
|
||||
@@ -91,7 +91,7 @@ class _HomePageState extends State<HomePage> {
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(height: 11.rpx),
|
||||
ClickableContainer(
|
||||
@@ -1123,7 +1123,7 @@ class _HomePageState extends State<HomePage> {
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: "绑定流程未走完是否继续?".tr,
|
||||
text: "绑定流程未走完是否继续".tr,
|
||||
style: TextStyle(
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
color: themeController.currentColor.sc3,
|
||||
|
||||
@@ -84,7 +84,10 @@ class _ApplyRepairPageState extends State<ApplyRepairPage> {
|
||||
}
|
||||
if (bodyDeviceController.deviceList.isNotEmpty) {
|
||||
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();
|
||||
}
|
||||
return LayoutBuilder(
|
||||
@@ -157,14 +160,20 @@ class _ApplyRepairPageState extends State<ApplyRepairPage> {
|
||||
EdgeInsetsDirectional.fromSTEB(30.rpx, 29.rpx, 30.rpx, 0),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Obx(() {
|
||||
var devicetype = deviceTypeController
|
||||
.deviceTypeList.value
|
||||
.where((device) => device['type'] == 1)
|
||||
.toList();
|
||||
return SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal, // 横向滚动
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min, // 设置为 min,避免撑满父组件宽度
|
||||
children: deviceTypeController.deviceTypeList.value
|
||||
children: devicetype
|
||||
.map(
|
||||
(deviceType) => CustomCard(
|
||||
borderRadius:
|
||||
|
||||
@@ -117,7 +117,7 @@ class _RepairModelWidgetState extends State<RepairModelWidget> {
|
||||
);
|
||||
if (matchedDevice != null) {
|
||||
// 找到了匹配的项
|
||||
widget.model['param'] = matchedDevice['mac'];
|
||||
// widget.model['param'] = matchedDevice['mac'];
|
||||
widget.model['mac'] = matchedDevice['mac'];
|
||||
widget.model['code'] =
|
||||
matchedDevice['code'] ?? '';
|
||||
@@ -161,7 +161,7 @@ class _RepairModelWidgetState extends State<RepairModelWidget> {
|
||||
isMultiSelect: false,
|
||||
// controller: _deviceController,
|
||||
options: repairController.deviceListId!,
|
||||
optionLabels: repairController.deviceListId!,
|
||||
optionLabels: repairController.deviceListIdLabel!,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -129,8 +129,6 @@ class _LanguageSettingState extends State<LanguageSetting> {
|
||||
languageController
|
||||
.updateAll(); // 更新操作
|
||||
try {
|
||||
// ef.kv.set("language",
|
||||
// language.language_code);
|
||||
await ef.kvdb.write(
|
||||
"th/language",
|
||||
language.language_code);
|
||||
|
||||
Reference in New Issue
Block a user