diff --git a/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart b/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart index f466f207..28daf30b 100755 --- a/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart +++ b/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart @@ -233,7 +233,7 @@ class _AuthorizedAdminListPageState extends State { children: [ Flexible( child: Text(receiveUser, - maxLines: 3, + maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 24.sp, diff --git a/lib/main/lockDetail/card/cardDetail/cardDetail_page.dart b/lib/main/lockDetail/card/cardDetail/cardDetail_page.dart index 20a3f742..73743c83 100755 --- a/lib/main/lockDetail/card/cardDetail/cardDetail_page.dart +++ b/lib/main/lockDetail/card/cardDetail/cardDetail_page.dart @@ -46,12 +46,7 @@ class _CardDetailPageState extends State with RouteAware { rightTitle: state.typeNumber.value, isHaveDirection: false, isHaveLine: true)), - Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, - rightTitle: state.typeName.value, - isHaveDirection: true, - isHaveLine: true, - action: () { + Obx(() => lockDataListItem(TranslationLoader.lanKeys!.name!.tr,state.typeName.value, () { ShowTipView().showTFViewAlertDialog( state.changeNameController, '${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}', @@ -212,6 +207,40 @@ class _CardDetailPageState extends State with RouteAware { ); } + 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), + decoration: BoxDecoration( + color: Colors.white, + border: Border( + bottom: BorderSide( + 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, )) + ), + SizedBox(width: 10.w), + Image.asset( + 'images/icon_right_grey.png', + width: 12.w, + height: 21.w, + ) + ], + ), + ), + ); + } + //isStressFingerprint false:不是胁迫指纹 ture:胁迫指纹 CupertinoSwitch _isStressFingerprint() { return CupertinoSwitch( diff --git a/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_logic.dart b/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_logic.dart index a95a057c..e48c8f0f 100755 --- a/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_logic.dart +++ b/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_logic.dart @@ -1,3 +1,4 @@ + import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:star_lock/appRouters.dart'; diff --git a/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart b/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart index 24f8972c..caa423e7 100755 --- a/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart +++ b/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart @@ -56,12 +56,7 @@ class _ElectronicKeyDetailPageState extends State { backgroundColor: AppColors.mainColor), body: ListView( children: [ - Obx(() => CommonItem( - leftTitel: '姓名'.tr, - rightTitle: state.keyName.value, - isHaveDirection: true, - isHaveLine: true, - action: () { + Obx(() => lockDataListItem('姓名'.tr, state.keyName.value, () { showCupertinoAlertDialog( tipsTitle: '修改姓名'.tr, alertEnum: ShowAlertEnum.name); })), @@ -282,6 +277,40 @@ class _ElectronicKeyDetailPageState extends State { ); } + 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), + decoration: BoxDecoration( + color: Colors.white, + border: Border( + bottom: BorderSide( + 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, )) + ), + SizedBox(width: 10.w), + Image.asset( + 'images/icon_right_grey.png', + width: 12.w, + height: 21.w, + ) + ], + ), + ), + ); + } + CupertinoSwitch _realNameAuthSwitch() { return CupertinoSwitch( activeColor: CupertinoColors.activeBlue, diff --git a/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart b/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart index 01e7c55b..be44eeee 100755 --- a/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart +++ b/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart @@ -283,7 +283,7 @@ class _ElectronicKeyListPageState extends State { children: [ Flexible( child: Text(receiveUser, - maxLines: 3, + maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 24.sp, diff --git a/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart b/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart index b79a27d6..b32f3225 100755 --- a/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart +++ b/lib/main/lockDetail/face/faceDetail/faceDetail_page.dart @@ -44,12 +44,7 @@ class _FaceDetailPageState extends State with RouteAware { rightTitle: state.typeNumber.value, isHaveDirection: false, isHaveLine: true)), - Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, - rightTitle: state.typeName.value, - isHaveDirection: true, - isHaveLine: true, - action: () { + Obx(() => lockDataListItem(TranslationLoader.lanKeys!.name!.tr, state.typeName.value, () { // showCupertinoAlertDialog(context); ShowTipView().showTFViewAlertDialog( state.changeNameController, @@ -220,6 +215,40 @@ class _FaceDetailPageState extends State with RouteAware { ); } + 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), + decoration: BoxDecoration( + color: Colors.white, + border: Border( + bottom: BorderSide( + 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, )) + ), + SizedBox(width: 10.w), + Image.asset( + 'images/icon_right_grey.png', + width: 12.w, + height: 21.w, + ) + ], + ), + ), + ); + } + CupertinoSwitch _isStressFace() { return CupertinoSwitch( activeColor: CupertinoColors.activeBlue, diff --git a/lib/main/lockDetail/fingerprint/fingerprintDetail/fingerprintDetail_page.dart b/lib/main/lockDetail/fingerprint/fingerprintDetail/fingerprintDetail_page.dart index 97a7727e..cf099f1e 100755 --- a/lib/main/lockDetail/fingerprint/fingerprintDetail/fingerprintDetail_page.dart +++ b/lib/main/lockDetail/fingerprint/fingerprintDetail/fingerprintDetail_page.dart @@ -46,12 +46,7 @@ class _FingerprintDetailPageState extends State rightTitle: state.typeNumber.value, isHaveDirection: false, isHaveLine: true)), - Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, - rightTitle: state.typeName.value, - isHaveDirection: true, - isHaveLine: true, - action: () { + Obx(() => lockDataListItem(TranslationLoader.lanKeys!.name!.tr, state.typeName.value, () { ShowTipView().showTFViewAlertDialog( state.changeNameController, '${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}', @@ -227,6 +222,40 @@ class _FingerprintDetailPageState extends State ); } + 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), + decoration: BoxDecoration( + color: Colors.white, + border: Border( + bottom: BorderSide( + 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, )) + ), + SizedBox(width: 10.w), + Image.asset( + 'images/icon_right_grey.png', + width: 12.w, + height: 21.w, + ) + ], + ), + ), + ); + } + //isStressFingerprint false:不是胁迫指纹 ture:胁迫指纹 CupertinoSwitch _isStressFingerprint() { return CupertinoSwitch( diff --git a/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart b/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart index c2c205c0..bbf5d235 100755 --- a/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart +++ b/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart @@ -104,12 +104,7 @@ class _BasicInformationPageState extends State { SizedBox(height: 10.h), Obx(() => Visibility( visible: state.lockBasicInfo.value.isLockOwner == 1 || state.lockBasicInfo.value.keyRight == 1, - child: CommonItem( - leftTitel: TranslationLoader.lanKeys!.lockName!.tr, - rightTitle: state.lockBasicInfo.value.lockAlias, - isHaveLine: true, - isHaveDirection: true, - action: () async { + child: lockDataListItem(TranslationLoader.lanKeys!.lockName!.tr, state.lockBasicInfo.value.lockAlias ?? '', () async { var data = await Get.toNamed(Routers.editLockNamePage, arguments: { 'lockSetInfoData': state.lockSetInfoData.value }); @@ -119,12 +114,7 @@ class _BasicInformationPageState extends State { }); } }))), - Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.lockGrouping!.tr, - rightTitle: state.lockBasicInfo.value.groupName ?? '', - isHaveLine: true, - isHaveDirection: true, - action: () async { + Obx(() => lockDataListItem(TranslationLoader.lanKeys!.lockGrouping!.tr, state.lockBasicInfo.value.groupName ?? '', () async { Get.toNamed(Routers.lockSelectGroupingPage, arguments: { 'lockSetInfoData': state.lockSetInfoData.value })!.then((val) { @@ -187,4 +177,39 @@ class _BasicInformationPageState extends State { ], )); } + + 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), + decoration: BoxDecoration( + color: Colors.white, + border: Border( + bottom: BorderSide( + 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, )) + ), + SizedBox(width: 10.w), + Image.asset( + 'images/icon_right_grey.png', + width: 12.w, + height: 21.w, + ) + ], + ), + ), + ); + } + } diff --git a/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_logic.dart b/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_logic.dart index 0363aecb..e433b7eb 100755 --- a/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_logic.dart +++ b/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_logic.dart @@ -12,9 +12,9 @@ class LockSelectGroupingLogic extends BaseGetXController { //创建锁分组请求 Future addLockGroupRequest() async { - MassSendLockGroupListEntity entity = await ApiRepository.to.addLockGroup(state.changeNameController.text, '0'); + final MassSendLockGroupListEntity entity = await ApiRepository.to.addLockGroup(state.changeNameController.text, '0'); if (entity.errorCode!.codeIsSuccessful) { - showToast("创建成功".tr, something: () { + showToast('创建成功'.tr, something: () { mockNetworkDataRequest(); }); } @@ -22,15 +22,16 @@ class LockSelectGroupingLogic extends BaseGetXController { //设置锁分组请求 Future setLockGroupRequest(GroupListItem itemData) async { - MassSendLockGroupListEntity entity = await ApiRepository.to.setLockGroup( + final MassSendLockGroupListEntity entity = await ApiRepository.to.setLockGroup( state.lockSetInfoData.value.lockId.toString(), itemData.keyGroupId.toString()); if (entity.errorCode!.codeIsSuccessful) { - showToast("设置锁分组成功".tr, something: () { - state.lockBasicInfo.value.groupId = itemData.keyGroupId; - state.lockBasicInfo.value.groupName = itemData.keyGroupName; - mockNetworkDataRequest(); - state.lockSetInfoData.value.lockBasicInfo!.groupId = itemData.keyGroupId; - state.lockSetInfoData.value.lockBasicInfo!.groupName = itemData.keyGroupName; + state.lockBasicInfo.value.groupId = itemData.keyGroupId; + state.lockBasicInfo.value.groupName = itemData.keyGroupName; + + state.lockSetInfoData.value.lockBasicInfo!.groupId = itemData.keyGroupId; + state.lockSetInfoData.value.lockBasicInfo!.groupName = itemData.keyGroupName; + + showToast('设置锁分组成功'.tr, something: () { eventBus.fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value)); eventBus.fire(RefreshLockListInfoDataEvent()); }); @@ -38,8 +39,8 @@ class LockSelectGroupingLogic extends BaseGetXController { } //分组列表请求 - void mockNetworkDataRequest() async { - MassSendLockGroupListEntity entity = await ApiRepository.to.lockGroupList('1'); + Future mockNetworkDataRequest() async { + final MassSendLockGroupListEntity entity = await ApiRepository.to.lockGroupList('1'); if (entity.errorCode!.codeIsSuccessful) { state.groupList.value = entity.data!.groupList!; } @@ -47,20 +48,17 @@ class LockSelectGroupingLogic extends BaseGetXController { @override void onReady() { - // TODO: implement onReady super.onReady(); mockNetworkDataRequest(); } @override void onInit() { - // TODO: implement onInit super.onInit(); } @override void onClose() { - // TODO: implement onClose - + super.onClose(); } } diff --git a/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_page.dart b/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_page.dart index 4b5509b0..fc9a77cf 100755 --- a/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_page.dart +++ b/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_page.dart @@ -1,8 +1,10 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart'; +import 'package:star_lock/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_state.dart'; import '../../../../../app_settings/app_colors.dart'; import '../../../../../tools/commonItem.dart'; @@ -21,8 +23,8 @@ class LockSelectGroupingPage extends StatefulWidget { } class _LockSelectGroupingPageState extends State { - final logic = Get.put(LockSelectGroupingLogic()); - final state = Get.find().state; + final LockSelectGroupingLogic logic = Get.put(LockSelectGroupingLogic()); + final LockSelectGroupingState state = Get.find().state; @override Widget build(BuildContext context) { @@ -34,7 +36,7 @@ class _LockSelectGroupingPageState extends State { haveBack: true, backgroundColor: AppColors.mainColor), body: Column( - children: [ + children: [ Expanded(child: _buildMainUI()), SubmitBtn( btnName: TranslationLoader.lanKeys!.createNewGroup!.tr, @@ -44,10 +46,12 @@ class _LockSelectGroupingPageState extends State { padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: () { // showCupertinoAlertDialog(context); - ShowTipView().showTFViewAlertDialog(state.changeNameController, TranslationLoader.lanKeys!.createNewGroup!.tr, "请输入分组名称".tr, (){ + ShowTipView().showTFViewAlertDialog(state.changeNameController, TranslationLoader.lanKeys!.createNewGroup!.tr, '请输入分组名称'.tr, (){ logic.addLockGroupRequest(); Get.back(); - }); + }, isShowSuffixIcon:true, inputFormatters: [ + LengthLimitingTextInputFormatter(50), + ]); }), SizedBox( height: 40.h, @@ -60,27 +64,45 @@ class _LockSelectGroupingPageState extends State { Widget _buildMainUI() { return Obx(() => state.groupList.value.isNotEmpty ? ListView.builder( itemCount: state.groupList.value.length, - itemBuilder: (c, index) { - GroupListItem itemData = state.groupList.value[index]; - return CommonItem( - leftTitel: itemData.keyGroupName, - rightTitle: "", - allHeight: 70.h, - isHaveLine: true, - isHaveDirection: false, - isHaveRightWidget: true, - rightWidget: state.lockBasicInfo.value.groupId == itemData.keyGroupId - ? Image( - image: const AssetImage("images/icon_item_checked.png"), - width: 30.w, - height: 30.w, - fit: BoxFit.contain, - ) - : Container(), - action: () { - logic.setLockGroupRequest(itemData); + itemBuilder: (BuildContext c, int index) { + final GroupListItem itemData = state.groupList.value[index]; + return lockDataListItem(itemData.keyGroupName ?? '', state.lockBasicInfo.value.groupId == itemData.keyGroupId, + () { + logic.setLockGroupRequest(itemData).then((value) => setState(() {})); }); }) : NoData()); } + Widget lockDataListItem(String title, bool isShowSeletIcon, Function()? action){ + return GestureDetector( + onTap: action, + child: Container( + // height: 70.h, + padding: EdgeInsets.only(left: 20.w, right: 20.w, top: 15.h, bottom: 15.h), + decoration: BoxDecoration( + color: Colors.white, + border: Border( + bottom: BorderSide( + color: AppColors.greyLineColor, // 设置边框颜色 + width: 2.0.h, // 设置边框宽度 + ), + ) + ), + child: Row( + children: [ + Expanded( + child: Text(title, style: TextStyle(fontSize: 22.sp)) + ), + SizedBox(width: 15.w), + if (isShowSeletIcon) Image( + image: const AssetImage('images/icon_item_checked.png'), + width: 30.w, + height: 30.w, + fit: BoxFit.contain, + ) else SizedBox(width: 30.w, height: 30.w,), + ], + ), + ), + ); + } } diff --git a/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_state.dart b/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_state.dart index c9a2bed5..70c86a36 100755 --- a/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_state.dart +++ b/lib/main/lockDetail/lockSet/basicInformation/lockSelectGrouping/lockSelectGrouping_state.dart @@ -1,5 +1,4 @@ - import 'package:flutter/material.dart'; import 'package:get/get.dart'; @@ -7,19 +6,19 @@ import '../../../electronicKey/massSendElectronicKey/massSendLockGroupList/massS import '../../lockSet/lockSetInfo_entity.dart'; class LockSelectGroupingState { - var lockSetInfoData = LockSetInfoData().obs; - var lockBasicInfo = LockBasicInfo().obs; - - var groupList = [].obs; - final TextEditingController changeNameController = TextEditingController(); LockSelectGroupingState() { var map = Get.arguments; - if(map["lockSetInfoData"] != null){ - lockSetInfoData.value = map["lockSetInfoData"]; + if(map['lockSetInfoData'] != null){ + lockSetInfoData.value = map['lockSetInfoData']; if(lockSetInfoData.value.lockBasicInfo!=null){ lockBasicInfo.value = lockSetInfoData.value.lockBasicInfo!; } } } + Rx lockSetInfoData = LockSetInfoData().obs; + Rx lockBasicInfo = LockBasicInfo().obs; + + RxList groupList = [].obs; + final TextEditingController changeNameController = TextEditingController(); } diff --git a/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart b/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart index 72f39bbb..de208c97 100755 --- a/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart +++ b/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart @@ -473,10 +473,7 @@ class _LockSetPageState extends State with RouteAware { // 考勤 Obx( () => Visibility( - visible: (state.lockBasicInfo.value.isLockOwner == 1 && - state.lockFeature.value.attendance == 1) - ? true - : false, + visible: state.lockBasicInfo.value.isLockOwner == 1 && state.lockFeature.value.attendance == 1, child: CommonItem( leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr, rightTitle: '', diff --git a/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart b/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart index 02f683ab..4a0692e7 100755 --- a/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart +++ b/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart @@ -72,15 +72,18 @@ class _PasswordKeyDetailPageState extends State with Rout context, state.inputPwdController); } })), - Obx(() => CommonItem( - leftTitel: TranslationLoader.lanKeys!.name!.tr, - rightTitle: state.keyboardPwdName.value, - isHaveDirection: true, - isHaveLine: true, - action: () { - showCupertinoAlertDialog( - context, state.inputNameController); - })), + // Obx(() => CommonItem( + // leftTitel: TranslationLoader.lanKeys!.name!.tr, + // rightTitle: state.keyboardPwdName.value, + // isHaveDirection: true, + // isHaveLine: true, + // action: () { + // showCupertinoAlertDialog( + // context, state.inputNameController); + // })), + Obx(() => lockDataListItem(TranslationLoader.lanKeys!.name!.tr, state.keyboardPwdName.value, (){ + showCupertinoAlertDialog(context, state.inputNameController); + })), Obx(() => CommonItem( leftTitel: '有效期', rightTitle: logic.getUseDateStr(), @@ -277,6 +280,40 @@ class _PasswordKeyDetailPageState extends State with Rout ); } + 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), + decoration: BoxDecoration( + color: Colors.white, + border: Border( + bottom: BorderSide( + 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, )) + ), + SizedBox(width: 10.w), + Image.asset( + 'images/icon_right_grey.png', + width: 12.w, + height: 21.w, + ) + ], + ), + ), + ); + } + //发送时间 String getSenderDate(PasswordKeyListItem indexEntity) { String senderDate = ''; diff --git a/lib/mine/mineSet/appUnlockNeedMobileNetworkingLock/appUnlockNeedMobileNetworkingLock_page.dart b/lib/mine/mineSet/appUnlockNeedMobileNetworkingLock/appUnlockNeedMobileNetworkingLock_page.dart index a0ea8964..bf54c19c 100755 --- a/lib/mine/mineSet/appUnlockNeedMobileNetworkingLock/appUnlockNeedMobileNetworkingLock_page.dart +++ b/lib/mine/mineSet/appUnlockNeedMobileNetworkingLock/appUnlockNeedMobileNetworkingLock_page.dart @@ -131,11 +131,11 @@ class _APPUnlockNeedMobileNetworkingLockPageState extends State { logic.showToast( TranslationLoader.lanKeys!.pleaseEnterAGroupName!.tr); } - }); + }, isShowSuffixIcon:true, inputFormatters: [ + LengthLimitingTextInputFormatter(50), + ]); }, ), ], @@ -115,11 +118,7 @@ class _LockGroupListPageState extends State { decoration: const BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(1)), ), - child: CommonItem( - leftTitel: '${itemData.keyGroupName}(${itemData.lockList?.length})', - rightTitle: '', - allHeight: 70.h, - action: () { + child: lockDataListItem('${itemData.keyGroupName}(${itemData.lockList?.length})', () { Get.toNamed(Routers.lockItemListPage, arguments: { 'groupListItem': itemData, 'ungrouped': state.ungrouped @@ -200,4 +199,31 @@ class _LockGroupListPageState extends State { ), ); } + + Widget lockDataListItem(String title, 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), + decoration: BoxDecoration( + color: Colors.white, + border: Border( + bottom: BorderSide( + color: AppColors.greyLineColor, // 设置边框颜色 + width: 2.0.h, // 设置边框宽度 + ), + ) + ), + child: Row( + children: [ + Expanded(child: + Text(title, style: TextStyle(fontSize: 22.sp)) + ), + // Text(title, style: TextStyle(fontSize: 22.sp)), + ], + ), + ), + ); + } } diff --git a/lib/tools/showTipView.dart b/lib/tools/showTipView.dart index d4b14e59..06606a19 100755 --- a/lib/tools/showTipView.dart +++ b/lib/tools/showTipView.dart @@ -93,9 +93,7 @@ class ShowTipView { ); } - void showTFViewAlertDialog(TextEditingController controller, String title, - String tipTitle, Function sureClick, - {List? inputFormatters, bool? isShowSuffixIcon}) { + void showTFViewAlertDialog(TextEditingController controller, String title, String tipTitle, Function sureClick, {List? inputFormatters, bool? isShowSuffixIcon}) { // 点击删除 开始扫描 showDialog( context: Get.context!,