diff --git a/images/lan/lan_en.json b/images/lan/lan_en.json index 5f66a7a8..d0c782b8 100755 --- a/images/lan/lan_en.json +++ b/images/lan/lan_en.json @@ -924,5 +924,6 @@ "导出成功":"Export success", "发送钥匙": "Send key", "进度": "Progress", - "失败": "Failure" + "失败": "Failure", + "人脸详情": "Face details" } diff --git a/images/lan/lan_keys.json b/images/lan/lan_keys.json index c60eaf12..2d798848 100755 --- a/images/lan/lan_keys.json +++ b/images/lan/lan_keys.json @@ -956,5 +956,6 @@ "导出成功":"导出成功", "发送钥匙": "发送钥匙", "进度": "进度", - "失败": "失败" + "失败": "失败", + "人脸详情": "人脸详情" } diff --git a/images/lan/lan_zh.json b/images/lan/lan_zh.json index 59861ed2..b788524f 100755 --- a/images/lan/lan_zh.json +++ b/images/lan/lan_zh.json @@ -921,6 +921,7 @@ "导出成功":"导出成功", "发送钥匙": "发送钥匙", "进度": "进度", - "失败": "失败" + "失败": "失败", + "人脸详情": "人脸详情" } diff --git a/lib/main/lockDetail/face/faceDetail/faceDetail_logic.dart b/lib/main/lockDetail/face/faceDetail/faceDetail_logic.dart index 5ac27227..b4f75049 100755 --- a/lib/main/lockDetail/face/faceDetail/faceDetail_logic.dart +++ b/lib/main/lockDetail/face/faceDetail/faceDetail_logic.dart @@ -174,6 +174,8 @@ class FaceDetailLogic extends BaseGetXController { showToast('修改成功', something: () { Get.back(result: 'addScuess'); }); + }else{ + Get.back(); } } diff --git a/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart b/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart index b32f3225..54bf087f 100755 --- a/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart +++ b/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart @@ -33,7 +33,7 @@ class _FaceDetailPageState extends State with RouteAware { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: '人脸详情', + barTitle: '人脸详情'.tr, haveBack: true, backgroundColor: AppColors.mainColor, ), @@ -44,7 +44,9 @@ class _FaceDetailPageState extends State with RouteAware { rightTitle: state.typeNumber.value, isHaveDirection: false, isHaveLine: true)), - Obx(() => lockDataListItem(TranslationLoader.lanKeys!.name!.tr, state.typeName.value, () { + Obx(() => lockDataListItem( + TranslationLoader.lanKeys!.name!.tr, state.typeName.value, + () { // showCupertinoAlertDialog(context); ShowTipView().showTFViewAlertDialog( state.changeNameController, @@ -54,7 +56,6 @@ class _FaceDetailPageState extends State with RouteAware { logic.showToast('请输入姓名'.tr); return; } - Get.back(); state.typeName.value = state.changeNameController.text; logic.updateFaceNameData(); }, inputFormatters: [ @@ -64,8 +65,8 @@ class _FaceDetailPageState extends State with RouteAware { })), Obx(() => Visibility( visible: state.keyType.value == 4 || - state.keyType.value == 2 || - state.keyType.value == 1, + state.keyType.value == 2 || + state.keyType.value == 1, child: CommonItem( leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, allHeight: 70.h, @@ -187,11 +188,12 @@ class _FaceDetailPageState extends State with RouteAware { rightTitle: '', isHaveDirection: true, action: () { - Get.toNamed(Routers.lockOperatingRecordPage, arguments: { - 'type': 4, - 'id': state.faceItemData.value.faceId.toString(), - 'recordName': state.faceItemData.value.faceName - }); + Get.toNamed(Routers.lockOperatingRecordPage, + arguments: { + 'type': 4, + 'id': state.faceItemData.value.faceId.toString(), + 'recordName': state.faceItemData.value.faceName + }); }), // SizedBox(height: 40.h), // addControlsBtn(type), @@ -215,12 +217,14 @@ class _FaceDetailPageState extends State with RouteAware { ); } - Widget lockDataListItem(String leftTitle, String conentStr, Function()? action){ + Widget lockDataListItem( + String leftTitle, String conentStr, Function()? action) { return GestureDetector( onTap: action, child: Container( // height: 70.h, - padding: EdgeInsets.only(left: 20.w, right: 10.w, top: 15.h, bottom: 15.h), + padding: + EdgeInsets.only(left: 20.w, right: 10.w, top: 15.h, bottom: 15.h), decoration: BoxDecoration( color: Colors.white, border: Border( @@ -228,15 +232,17 @@ class _FaceDetailPageState extends State with RouteAware { color: AppColors.greyLineColor, // 设置边框颜色 width: 2.0.h, // 设置边框宽度 ), - ) - ), + )), child: Row( children: [ Text(leftTitle, style: TextStyle(fontSize: 22.sp)), SizedBox(width: 10.w), Expanded( - child: Text(conentStr, textAlign:TextAlign.end, style: TextStyle(fontSize: 22.sp, )) - ), + child: Text(conentStr, + textAlign: TextAlign.end, + style: TextStyle( + fontSize: 22.sp, + ))), SizedBox(width: 10.w), Image.asset( 'images/icon_right_grey.png', diff --git a/lib/tools/showDeleteAdministratorIsHaveAllDataWidget.dart b/lib/tools/showDeleteAdministratorIsHaveAllDataWidget.dart index b5cda199..cdf0dec0 100755 --- a/lib/tools/showDeleteAdministratorIsHaveAllDataWidget.dart +++ b/lib/tools/showDeleteAdministratorIsHaveAllDataWidget.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -8,34 +7,47 @@ class ShowDeleteAdministratorIsHaveAllDataWidget extends StatefulWidget { BlockIsHaveAllDataCallback? blockIsHaveAllDataCallback; String? contentStr; - ShowDeleteAdministratorIsHaveAllDataWidget({Key? key, this.contentStr, this.blockIsHaveAllDataCallback}) : super(key: key); + ShowDeleteAdministratorIsHaveAllDataWidget( + {Key? key, this.contentStr, this.blockIsHaveAllDataCallback}) + : super(key: key); @override - State createState() => _ShowDeleteAdministratorIsHaveAllDataWidgetState(); + State createState() => + _ShowDeleteAdministratorIsHaveAllDataWidgetState(); } -class _ShowDeleteAdministratorIsHaveAllDataWidgetState extends State { +class _ShowDeleteAdministratorIsHaveAllDataWidgetState + extends State { bool selet = false; @override Widget build(BuildContext context) { - return Row( - children: [ - GestureDetector( - onTap: () { - setState(() { - selet = !selet; - widget.blockIsHaveAllDataCallback!(selet); - }); - }, - child: Image.asset( - selet ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', - width: 30.w, - height: 30.w, - )), - SizedBox(width: 15.w,), - Expanded(child: Text(widget.contentStr!, maxLines: 2, textAlign: TextAlign.start, style: TextStyle(fontSize: 24.sp))), - ], + return GestureDetector( + onTap: () { + setState(() { + selet = !selet; + widget.blockIsHaveAllDataCallback!(selet); + }); + }, + child: Row( + children: [ + Image.asset( + selet + ? 'images/icon_round_select.png' + : 'images/icon_round_unSelect.png', + width: 30.w, + height: 30.w, + ), + SizedBox( + width: 15.w, + ), + Expanded( + child: Text(widget.contentStr!, + maxLines: 2, + textAlign: TextAlign.start, + style: TextStyle(fontSize: 24.sp))), + ], + ), ); } }