From e93f8624cfc654385adf329e7b0aac831651b89f Mon Sep 17 00:00:00 2001 From: Daisy <> Date: Wed, 17 Jan 2024 14:11:10 +0800 Subject: [PATCH] =?UTF-8?q?2024-01-12=20=E4=BC=9A=E8=AE=AE=E7=A1=AE?= =?UTF-8?q?=E5=AE=9A=E5=8E=BB=E6=8E=89=E9=83=A8=E5=88=86=EF=BC=9A=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E9=9F=B3=E3=80=81=E8=A7=A6=E6=91=B8=E5=BC=80=E9=94=81?= =?UTF-8?q?=E3=80=81=E9=94=81=E5=B1=8F=E3=80=81=E5=BE=AE=E4=BF=A1=E4=BA=8C?= =?UTF-8?q?=E7=BB=B4=E7=A0=81=E3=80=81=E8=93=9D=E7=89=99=E5=B9=BF=E6=92=AD?= =?UTF-8?q?=20=E5=B7=B2=E6=B3=A8=E9=87=8A=E5=B9=B6=E6=A0=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- star_lock/lib/main.dart | 2 +- .../basicInformation_page.dart | 48 ++++++++++--------- .../lcokSet/lockSet/lockSet_page.dart | 25 ++++++---- .../mine/mineSet/mineSet/mineSet_page.dart | 7 ++- 4 files changed, 48 insertions(+), 34 deletions(-) diff --git a/star_lock/lib/main.dart b/star_lock/lib/main.dart index 761fb168..62759aea 100644 --- a/star_lock/lib/main.dart +++ b/star_lock/lib/main.dart @@ -118,7 +118,7 @@ class _MyAppState extends State with WidgetsBindingObserver, BaseWidget { @override void initState() { super.initState(); - WidgetsBinding.instance?.addObserver(this); + WidgetsBinding.instance.addObserver(this); openBlueScan(); diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart index d84c534a..c90846b3 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart @@ -42,8 +42,7 @@ class _BasicInformationPageState extends State { body: ListView( children: [ CommonItem( - leftTitel: - TranslationLoader.lanKeys!.lockNumber!.tr, + leftTitel: TranslationLoader.lanKeys!.lockNumber!.tr, rightTitle: state.lockBasicInfo.value.lockName, allHeight: 70.h, isHaveLine: true), @@ -56,19 +55,18 @@ class _BasicInformationPageState extends State { height: 10.h, ), CommonItem( - leftTitel: TranslationLoader - .lanKeys!.electricQuantity!.tr, + leftTitel: TranslationLoader.lanKeys!.electricQuantity!.tr, rightTitle: "${state.lockBasicInfo.value.electricQuantity}%", isHaveLine: true, isHaveDirection: true, action: () { - Navigator.pushNamed(context, - Routers.uploadElectricQuantityPage, - arguments: {'lockSetInfoData': state.lockSetInfoData.value}); + Navigator.pushNamed( + context, Routers.uploadElectricQuantityPage, arguments: { + 'lockSetInfoData': state.lockSetInfoData.value + }); }), CommonItem( - leftTitel: TranslationLoader - .lanKeys!.periodValidity!.tr, + leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, rightTitle: getUseDateStr(state.lockBasicInfo.value), allHeight: 70.h, isHaveLine: false), @@ -76,28 +74,28 @@ class _BasicInformationPageState extends State { height: 10.h, ), CommonItem( - leftTitel: - TranslationLoader.lanKeys!.lockName!.tr, + leftTitel: TranslationLoader.lanKeys!.lockName!.tr, rightTitle: state.lockBasicInfo.value.lockAlias, isHaveLine: true, isHaveDirection: true, action: () async { - var data = await Get.toNamed(Routers.editLockNamePage, arguments: {'lockSetInfoData': state.lockSetInfoData.value}); - if(data != null) { + var data = await Get.toNamed(Routers.editLockNamePage, + arguments: { + 'lockSetInfoData': state.lockSetInfoData.value + }); + if (data != null) { setState(() { state.lockBasicInfo.value = data["lockBasicInfo"]; }); } }), CommonItem( - leftTitel: - TranslationLoader.lanKeys!.lockGrouping!.tr, + leftTitel: TranslationLoader.lanKeys!.lockGrouping!.tr, // rightTitle: state.getKeyInfosData.value.groupName == "" ? _groupName : itemData.groupName, isHaveLine: true, isHaveDirection: true, action: () async { - Navigator.pushNamed( - context, Routers.lockSeletGroupingPage, + Navigator.pushNamed(context, Routers.lockSeletGroupingPage, arguments: { 'lockSetInfoData': state.lockSetInfoData.value }).then((val) { @@ -108,16 +106,22 @@ class _BasicInformationPageState extends State { }); }), Visibility( - visible: (state.lockBasicInfo.value.isLockOwner == 1 || state.lockBasicInfo.value.keyRight == 1) ? true : false, + visible: (state.lockBasicInfo.value.isLockOwner == 1 || + state.lockBasicInfo.value.keyRight == 1) + ? true + : false, child: CommonItem( - leftTitel: TranslationLoader.lanKeys!.adminOpenLockPassword!.tr, + leftTitel: + TranslationLoader.lanKeys!.adminOpenLockPassword!.tr, rightTitle: "", isHaveLine: true, isHaveDirection: true, action: () { - Navigator.pushNamed(context, Routers.adminOpenLockPasswordPage); + Navigator.pushNamed( + context, Routers.adminOpenLockPasswordPage); }), ), + /* 2024-01-12 会议确定去掉“微信二维码” by DaisyWu CommonItem( leftTitel: TranslationLoader.lanKeys!.unlockQRCode!.tr, @@ -127,9 +131,9 @@ class _BasicInformationPageState extends State { action: () { Get.toNamed(Routers.unlockQRCodePage); }), + */ ], - ) - ); + )); } //使用期限 diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart index 3130bd15..45d2a0e0 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart @@ -60,7 +60,8 @@ class _LockSetPageState extends State with RouteAware { List getListWidget() { print( "state.lockBasicInfo.value.isLockOwner:${state.lockBasicInfo.value.isLockOwner} state.lockBasicInfo.value.keyRight:${state.lockBasicInfo.value.keyRight}"); - if (state.lockBasicInfo.value.isLockOwner == 1 || state.lockBasicInfo.value.keyRight == 1) { + if (state.lockBasicInfo.value.isLockOwner == 1 || + state.lockBasicInfo.value.keyRight == 1) { // 超级管理员、授权管理员 return getAllWidget(); } else { @@ -105,7 +106,7 @@ class _LockSetPageState extends State with RouteAware { // 常开模式 Obx(() => Visibility( // visible: state.lockFeature.value.passageMode == 1 ? true : false, - visible:true, + visible: true, child: CommonItem( leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr, rightTitle: (state.lockSettingInfo.value.passageMode ?? 0) == 1 @@ -418,8 +419,9 @@ class _LockSetPageState extends State with RouteAware { Get.toNamed(Routers.motorPowerPage); })), // 蓝牙广播(关闭则不能使用蓝牙主动开锁) + /* 2024-01-12 会议确定去掉“蓝牙广播” by DaisyWu Obx(() => Visibility( - visible: true, + visible: true, child: CommonItem( leftTitel: TranslationLoader.lanKeys!.bluetoothBroadcast!.tr, rightTitle: "", @@ -427,6 +429,7 @@ class _LockSetPageState extends State with RouteAware { isHaveRightWidget: true, rightWidget: _lockBlueBroadcastSwitch()))), SizedBox(height: 10.h), + */ //-----新增至此 // 标记房态 Obx(() { @@ -450,7 +453,8 @@ class _LockSetPageState extends State with RouteAware { })); }), // 考勤 - Obx(() => Visibility( + Obx( + () => Visibility( visible: state.lockFeature.value.attendance == 1 ? true : false, child: CommonItem( leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr, @@ -596,7 +600,8 @@ class _LockSetPageState extends State with RouteAware { // 开启考勤 CupertinoSwitch _openCheckInSwitch() { - print("111111state.lockSettingInfo.value.attendance:${state.lockSettingInfo.value.attendance}"); + print( + "111111state.lockSettingInfo.value.attendance:${state.lockSettingInfo.value.attendance}"); return CupertinoSwitch( activeColor: CupertinoColors.activeBlue, trackColor: CupertinoColors.systemGrey5, @@ -814,10 +819,11 @@ class _LockSetPageState extends State with RouteAware { print("lockSet===didPop"); logic.cancelBlueConnetctToastTimer(); if (EasyLoading.isShow) EasyLoading.dismiss(animation: true); - if(state.deletWaitScanTimer != null){ + if (state.deletWaitScanTimer != null) { state.deletWaitScanTimer!.cancel(); } - if(state.deletWaitScanCompleter != null && !state.deletWaitScanCompleter!.isCompleted){ + if (state.deletWaitScanCompleter != null && + !state.deletWaitScanCompleter!.isCompleted) { state.deletWaitScanCompleter!.complete(); } BlueManage().stopScan(); @@ -840,10 +846,11 @@ class _LockSetPageState extends State with RouteAware { logic.cancelBlueConnetctToastTimer(); if (EasyLoading.isShow) EasyLoading.dismiss(animation: true); - if(state.deletWaitScanTimer != null){ + if (state.deletWaitScanTimer != null) { state.deletWaitScanTimer!.cancel(); } - if(state.deletWaitScanCompleter != null && !state.deletWaitScanCompleter!.isCompleted){ + if (state.deletWaitScanCompleter != null && + !state.deletWaitScanCompleter!.isCompleted) { state.deletWaitScanCompleter!.complete(); } BlueManage().stopScan(); diff --git a/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart b/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart index d65dcbc2..da643a22 100644 --- a/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart +++ b/star_lock/lib/mine/mineSet/mineSet/mineSet_page.dart @@ -45,6 +45,7 @@ class _MineSetPageState extends State { Widget getListDataView() { return Column( children: [ + /* 2024-01-12 会议确定去掉“提示音、触摸开锁” by DaisyWu CommonItem( leftTitel: TranslationLoader.lanKeys!.prompTone!.tr, rightTitle: "", @@ -63,6 +64,7 @@ class _MineSetPageState extends State { width: 60.w, height: 50.h, child: Obx(() => _isTouchUnlockSwitch()))), + */ CommonItem( leftTitel: TranslationLoader.lanKeys!.pushNotification!.tr, rightTitle: "", @@ -137,6 +139,7 @@ class _MineSetPageState extends State { state.currentLanguage.value = result['currentLanguage']; } })), + /* 2024-01-12 会议确定去掉“锁屏” by DaisyWu Obx(() => CommonItem( leftTitel: TranslationLoader.lanKeys!.lockScreen!.tr, rightTitle: (state.lockScreen.value == 1 @@ -150,6 +153,7 @@ class _MineSetPageState extends State { logic.userSettingsInfoRequest(); }); })), + */ Obx(() => CommonItem( leftTitel: TranslationLoader.lanKeys!.hideInvalidUnlockPermissions!.tr, @@ -197,8 +201,7 @@ class _MineSetPageState extends State { logic.showToast("功能暂未开放"); }), CommonItem( - leftTitel: TranslationLoader - .lanKeys!.xiaomiIOTPlatform!.tr, + leftTitel: TranslationLoader.lanKeys!.xiaomiIOTPlatform!.tr, rightTitle: "", isHaveLine: false, isHaveDirection: true,