From 83b2b7159da992f2349b11918e2bd8c6419d21e3 Mon Sep 17 00:00:00 2001 From: Daisy <> Date: Tue, 1 Aug 2023 14:38:02 +0800 Subject: [PATCH] =?UTF-8?q?1=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E5=9B=BE=E7=89=87=202=EF=BC=8C=E4=BC=98=E5=8C=96=E5=8F=B3?= =?UTF-8?q?=E4=B8=8A=E8=A7=92=E7=82=B9=E5=87=BB=E5=BC=B9=E5=87=BA=E6=A1=86?= =?UTF-8?q?=E4=BC=A0=E5=85=A5=E6=95=B0=E6=8D=AE=203=EF=BC=8C=E5=AF=B9?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=85=A5=E5=8F=A3=E8=BF=9B=E8=A1=8C=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- star_lock/images/icon_bar_share.png | Bin 0 -> 1256 bytes star_lock/images/lan/lan_en.json | 1 + star_lock/images/lan/lan_keys.json | 1 + star_lock/images/lan/lan_zh.json | 1 + .../authorizedAdminDetail_page.dart | 4 ++- .../authorizedAdminList_page.dart | 30 +++++++----------- .../electronicKeyDetail_page.dart | 23 +++++++++++++- .../lockOperatingRecord_page.dart | 7 +++- .../otherTypeKeyDetail_page.dart | 4 ++- .../passwordKeyDetail_page.dart | 22 ++++++++++--- .../authorizedAdministratorList_page.dart | 3 +- .../lockUserManage/ownedKeyList_page.dart | 8 +++-- star_lock/lib/tools/jh_pop_menus.dart | 22 +++++++------ star_lock/lib/translations/lanKeyEntity.dart | 4 +++ 14 files changed, 89 insertions(+), 41 deletions(-) create mode 100644 star_lock/images/icon_bar_share.png diff --git a/star_lock/images/icon_bar_share.png b/star_lock/images/icon_bar_share.png new file mode 100644 index 0000000000000000000000000000000000000000..e4ed055c76204a9670ffb438df50c707554aa63e GIT binary patch literal 1256 zcmVP)23C>tJKUrlLkiX}E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z_rya&!Mb}$a;SOFTPh_O_>-zV1N7=Q*Zk*u2kEZ}lV}$TPOC&Y3V;YQ2mb|Jf)e$( St<&QG0000 { leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle: "", isHaveDirection: true, - action: () {}), + action: () { + Navigator.pushNamed(context, Routers.keyOperationRecordPage); + }), Container(height: 40.h), SubmitBtn( btnName: TranslationLoader.lanKeys!.delete!.tr, diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart index 7de67ee0..ff504eec 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart @@ -47,11 +47,6 @@ class _AuthorizedAdminListPageState extends State { Navigator.pushNamed(context, Routers.authorizedAdminManagePage); }, ), - // SubmitBtn( - // btnName: TranslationLoader.lanKeys!.authorizedAdmin!.tr, - // onClick: () { - // Navigator.pushNamed(context, Routers.authorizedAdminManagePage); - // }), SizedBox( height: 64.h, ) @@ -66,7 +61,8 @@ class _AuthorizedAdminListPageState extends State { itemBuilder: (c, index) { return _electronicKeyItem('images/controls_user.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15", () { - Navigator.pushNamed(context, Routers.authorizedAdminDetailPage); + // Navigator.pushNamed(context, Routers.authorizedAdminDetailPage); + Navigator.pushNamed(context, Routers.electronicKeyDetailPage); }); }); } @@ -125,18 +121,16 @@ class _AuthorizedAdminListPageState extends State { ], ), SizedBox(height: 5.h), - Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text( - "2023.6.21 11.15 永久", - style: TextStyle( - fontSize: 18.sp, - color: AppColors.placeholderTextColor), - ), - ], - ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "2023.6.21 11.15 永久", + style: TextStyle( + fontSize: 18.sp, + color: AppColors.placeholderTextColor), + ), + ], ), SizedBox(width: 20.h), ], diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart index 28690fb9..c2bf0922 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart @@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:star_lock/tools/jh_pop_menus.dart'; import '../../../../../appRouters.dart'; import '../../../../../app_settings/app_colors.dart'; @@ -30,6 +31,25 @@ class _ElectronicKeyDetailPageState extends State { appBar: TitleAppBar( barTitle: TranslationLoader.lanKeys!.keyDetail!.tr, haveBack: true, + actionsList: [ + IconButton( + icon: Image.asset( + 'images/icon_bar_more.png', + height: 30.h, + width: 10.w, + ), + onPressed: () { + JhPopMenus.showLinePop(context, + clickCallback: (index, selText) { + print('选中index: $index'); + print('选中text: $selText'); + }, listData: [ + {'text': '冻结'}, + {'text': '取消授权'} + ]); + }, + ), + ], backgroundColor: AppColors.mainColor), body: Column( children: [ @@ -78,7 +98,8 @@ class _ElectronicKeyDetailPageState extends State { rightTitle: "", isHaveDirection: true, action: () { - Navigator.pushNamed(context, Routers.keyOperationRecordPage, arguments: {}); + Navigator.pushNamed(context, Routers.keyOperationRecordPage, + arguments: {}); }), Container(height: 40.h), SubmitBtn( diff --git a/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart b/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart index c362f9ed..ea7faba7 100644 --- a/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart +++ b/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart @@ -42,10 +42,15 @@ class _LockOperatingRecordPageState extends State { if (selText == '扫一扫') { // _scan(); } - }); + }, listData: [ + {'text': '读取记录'}, + {'text': '清空记录'}, + {'text': '导出记录'}, + ]); }, ), ], + /* actionsList: [ TextButton( diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart index 94bc7074..e4a23b14 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart @@ -80,7 +80,9 @@ class _OtherTypeKeyDetailPageState extends State { leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle: "", isHaveDirection: true, - action: () {}), + action: () { + Navigator.pushNamed(context, Routers.keyOperationRecordPage); + }), Container(height: 40.h), SubmitBtn( btnName: TranslationLoader.lanKeys!.delete!.tr, diff --git a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart index feb3e201..5e267bf9 100644 --- a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart +++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart @@ -27,14 +27,24 @@ class _PasswordKeyDetailPageState extends State { haveBack: true, backgroundColor: AppColors.mainColor, actionsList: [ - TextButton( - child: Text( - "分享", - style: TextStyle(color: Colors.white, fontSize: 24.sp), + IconButton( + icon: Image.asset( + 'images/icon_bar_share.png', + height: 30.h, + width: 30.w, ), onPressed: () {}, ), ], + // actionsList: [ + // TextButton( + // child: Text( + // "分享", + // style: TextStyle(color: Colors.white, fontSize: 24.sp), + // ), + // onPressed: () {}, + // ), + // ], ), body: Column( children: [ @@ -76,7 +86,9 @@ class _PasswordKeyDetailPageState extends State { leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle: "", isHaveDirection: true, - action: () {}), + action: () { + Navigator.pushNamed(context, Routers.keyOperationRecordPage); + }), Container(height: 40.h), SubmitBtn( btnName: TranslationLoader.lanKeys!.delete!.tr, diff --git a/star_lock/lib/mine/mineSet/authorizedAdministrator/authorizedAdministratorList_page.dart b/star_lock/lib/mine/mineSet/authorizedAdministrator/authorizedAdministratorList_page.dart index 9710bcc6..20be0f8a 100644 --- a/star_lock/lib/mine/mineSet/authorizedAdministrator/authorizedAdministratorList_page.dart +++ b/star_lock/lib/mine/mineSet/authorizedAdministrator/authorizedAdministratorList_page.dart @@ -90,7 +90,8 @@ class _AuthorizedAdministratorListPageState itemBuilder: (c, index) { return _electronicKeyItem('images/controls_user.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15", () { - Navigator.pushNamed(context, Routers.authorizedAdminDetailPage); + // Navigator.pushNamed(context, Routers.authorizedAdminDetailPage); + Navigator.pushNamed(context, Routers.electronicKeyDetailPage); }); }); } diff --git a/star_lock/lib/mine/mineSet/lockUserManage/ownedKeyList_page.dart b/star_lock/lib/mine/mineSet/lockUserManage/ownedKeyList_page.dart index e85c34f6..30ae047d 100644 --- a/star_lock/lib/mine/mineSet/lockUserManage/ownedKeyList_page.dart +++ b/star_lock/lib/mine/mineSet/lockUserManage/ownedKeyList_page.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get_utils/get_utils.dart'; +import 'package:star_lock/translations/trans_lib.dart'; import '../../../../appRouters.dart'; import '../../../../app_settings/app_colors.dart'; @@ -18,7 +20,7 @@ class _OwnedKeyListPageState extends State { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( - barTitle: "拥有的钥匙", + barTitle: TranslationLoader.lanKeys!.ownedKey!.tr, haveBack: true, backgroundColor: AppColors.mainColor, ), @@ -38,9 +40,9 @@ class _OwnedKeyListPageState extends State { // margin: EdgeInsets.only(left: 30.w, top: 30.w, right: 30.w, bottom: 30.w), child: Padding( padding: - EdgeInsets.only(left: 30.w, top: 30.w, right: 20.w, bottom: 10.w), + EdgeInsets.only(left: 30.w, top: 20.w, right: 20.w, bottom: 10.w), child: Text( - "拥有的钥匙", + TranslationLoader.lanKeys!.ownedKey!.tr, style: TextStyle(fontSize: 24.sp), ), ), diff --git a/star_lock/lib/tools/jh_pop_menus.dart b/star_lock/lib/tools/jh_pop_menus.dart index bbc4e692..74f51050 100644 --- a/star_lock/lib/tools/jh_pop_menus.dart +++ b/star_lock/lib/tools/jh_pop_menus.dart @@ -2,11 +2,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'screen_utils.dart'; -List _listData = [ - {'text': '读取记录'}, - {'text': '清空记录'}, - {'text': '导出记录'}, -]; +// List _listData = [ +// {'text': '读取记录'}, +// {'text': '清空记录'}, +// {'text': '导出记录'}, +// ]; const Color _bgColor = Color(0xFF2D2D2D); const double _fontSize = 20.0; @@ -17,6 +17,7 @@ class JhPopMenus { /// 显示pop static void show( BuildContext context, { + required List listData, Function(int selectIndex, String selectText)? clickCallback, }) { // Cell @@ -31,7 +32,7 @@ class JhPopMenus { color: _bgColor, child: InkWell( onTap: () { - clickCallback?.call(index, _listData[index]['text']); + clickCallback?.call(index, listData[index]['text']); Navigator.pop(context); }, child: Row( @@ -74,13 +75,14 @@ class JhPopMenus { } Navigator.of(context) - .push(DialogRouter(_BasePopMenus(child: menusView(_listData)))); + .push(DialogRouter(_BasePopMenus(child: menusView(listData)))); } /// 显示带线带背景 pop static void showLinePop( BuildContext context, { bool isShowBg = false, + required List listData, Function(int selectIndex, String selectText)? clickCallback, }) { // 带线 @@ -94,7 +96,7 @@ class JhPopMenus { color: _bgColor, child: InkWell( onTap: () { - clickCallback?.call(index, _listData[index]['text']); + clickCallback?.call(index, listData[index]['text']); Navigator.pop(context); }, child: SizedBox( @@ -158,12 +160,12 @@ class JhPopMenus { context: context, barrierDismissible: false, builder: (context) { - return _BasePopMenus(child: menusView(_listData)); + return _BasePopMenus(child: menusView(listData)); }, ); } else { Navigator.of(context) - .push(DialogRouter(_BasePopMenus(child: menusView(_listData)))); + .push(DialogRouter(_BasePopMenus(child: menusView(listData)))); } } } diff --git a/star_lock/lib/translations/lanKeyEntity.dart b/star_lock/lib/translations/lanKeyEntity.dart index 455a1d3a..7713fa1f 100644 --- a/star_lock/lib/translations/lanKeyEntity.dart +++ b/star_lock/lib/translations/lanKeyEntity.dart @@ -199,6 +199,7 @@ class LanKeyEntity { this.touchUnlock, this.pushNotification, this.lockUserManagement, + this.ownedKey, this.authorityManagement, this.associatedDevice, this.associatedName, @@ -581,6 +582,7 @@ class LanKeyEntity { touchUnlock = json['touchUnlock']; pushNotification = json['pushNotification']; lockUserManagement = json['lockUserManagement']; + ownedKey = json['ownedKey']; authorityManagement = json['authorityManagement']; associatedDevice = json['associatedDevice']; associatedName = json['associatedName']; @@ -979,6 +981,7 @@ class LanKeyEntity { String? touchUnlock; String? pushNotification; String? lockUserManagement; + String? ownedKey; String? authorityManagement; String? associatedDevice; String? associatedName; @@ -1374,6 +1377,7 @@ class LanKeyEntity { map['touchUnlock'] = touchUnlock; map['pushNotification'] = pushNotification; map['lockUserManagement'] = lockUserManagement; + map['ownedKey'] = ownedKey; map['authorityManagement'] = authorityManagement; map['associatedDevice'] = associatedDevice; map['associatedName'] = associatedName;