From c520a825aa61991fd0eb5d5f55a94c10d7254567 Mon Sep 17 00:00:00 2001 From: Daisy <> Date: Tue, 1 Aug 2023 09:47:03 +0800 Subject: [PATCH] =?UTF-8?q?1=EF=BC=8C=E6=A0=B9=E6=8D=AE=E7=94=B0=E6=80=BB?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E9=9C=80=E6=B1=82->=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86=E7=9B=B8=E5=85=B3=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- star_lock/images/lan/lan_en.json | 5 + star_lock/images/lan/lan_keys.json | 5 + star_lock/images/lan/lan_zh.json | 5 + star_lock/lib/appRouters.dart | 75 +- .../authorityManagement_page.dart | 296 +++++++ .../getDeviceList_page.dart | 136 ++++ .../authorityManagement/getNameList_page.dart | 138 ++++ star_lock/lib/mine/mineSet/mineSet_page.dart | 11 + star_lock/lib/translations/lanKeyEntity.dart | 760 +++++++++--------- 9 files changed, 1027 insertions(+), 404 deletions(-) create mode 100644 star_lock/lib/mine/mineSet/authorityManagement/authorityManagement_page.dart create mode 100644 star_lock/lib/mine/mineSet/authorityManagement/getDeviceList_page.dart create mode 100644 star_lock/lib/mine/mineSet/authorityManagement/getNameList_page.dart diff --git a/star_lock/images/lan/lan_en.json b/star_lock/images/lan/lan_en.json index 13795fa1..995f0824 100644 --- a/star_lock/images/lan/lan_en.json +++ b/star_lock/images/lan/lan_en.json @@ -203,7 +203,12 @@ "touchUnlock":"Touch Unlock", "pushNotification":"Push Notification", "lockUserManagement":"Lock User Management", + "authorityManagement":"Authority management", + "associatedDevice":"Associated device", + "associatedName":"Associated name", + "device":"Device", "aboutToExpire":"About to expire", + "deAuthorize":"de-authorize", "changeName":"Change name", "authorizedAdmin":"Authorized Admin", "addAuthorizedAdmin":"Adding an Authorized Administrator", diff --git a/star_lock/images/lan/lan_keys.json b/star_lock/images/lan/lan_keys.json index 21014f91..46c0d7e5 100644 --- a/star_lock/images/lan/lan_keys.json +++ b/star_lock/images/lan/lan_keys.json @@ -203,6 +203,10 @@ "touchUnlock":"touchUnlock", "pushNotification":"pushNotification", "lockUserManagement":"lockUserManagement", + "authorityManagement":"authorityManagement", + "associatedDevice":"associatedDevice", + "associatedName":"associatedName", + "device":"device", "authorizedAdmin":"authorizedAdmin", "addAuthorizedAdmin":"addAuthorizedAdmin", "lockGroup":"lockGroup", @@ -246,6 +250,7 @@ "problemThree":"problemThree", "pleaseEnterYourAnswer":"pleaseEnterYourAnswer", "aboutToExpire":"aboutToExpire", + "deAuthorize":"deAuthorize", "changeName":"changeName", "designation": "designation", diff --git a/star_lock/images/lan/lan_zh.json b/star_lock/images/lan/lan_zh.json index 745798ec..b55e3ff3 100644 --- a/star_lock/images/lan/lan_zh.json +++ b/star_lock/images/lan/lan_zh.json @@ -203,6 +203,10 @@ "touchUnlock":"触摸开锁", "pushNotification":"消息推送", "lockUserManagement":"锁用户管理", + "authorityManagement":"权限管理", + "associatedDevice":"关联设备", + "associatedName":"关联姓名", + "device":"设备", "authorizedAdmin":"授权管理员", "addAuthorizedAdmin":"添加授权管理员", "lockGroup":"锁分组", @@ -247,6 +251,7 @@ "pleaseEnterYourAnswer":"请输入你的答案", "aboutToExpire":"即将到期", "changeName":"修改名称", + "deAuthorize":"去授权", "designation": "名称", "state": "状态", diff --git a/star_lock/lib/appRouters.dart b/star_lock/lib/appRouters.dart index 5e1c0069..06e4ff18 100644 --- a/star_lock/lib/appRouters.dart +++ b/star_lock/lib/appRouters.dart @@ -2,6 +2,9 @@ import 'package:get/get.dart'; import 'package:star_lock/common/safetyVerification/safetyVerification_binding.dart'; import 'package:star_lock/login/register/starLock_register_binding.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/minePersonInfoEmail_page.dart'; +import 'package:star_lock/mine/mineSet/authorityManagement/authorityManagement_page.dart'; +import 'package:star_lock/mine/mineSet/authorityManagement/getDeviceList_page.dart'; +import 'package:star_lock/mine/mineSet/authorityManagement/getNameList_page.dart'; import 'package:star_lock/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator_page.dart'; import 'package:star_lock/mine/mineSet/lockGroup/lockGroupList_page.dart'; import 'package:star_lock/mine/mineSet/lockUserManage/lockUserManageList_page.dart'; @@ -243,26 +246,35 @@ abstract class Routers { '/ValueAddedServicesListEmailTemplatePage'; // 增值服务-邮箱模版列表 static const valueAddedServicesAddEmailTemplatePage = '/ValueAddedServicesAddEmailTemplatePage'; // 增值服务-自定义邮箱模版 - static const valueAddedServicesBuyAndUseRecordManagePage = '/ValueAddedServicesBuyAndUseRecordManagePage'; // 增值服务-购买使用记录 + static const valueAddedServicesBuyAndUseRecordManagePage = + '/ValueAddedServicesBuyAndUseRecordManagePage'; // 增值服务-购买使用记录 static const lockScreenPage = '/LockScreenPage'; // 我的设置-锁屏 - static const aPPUnlockNeedMobileNetworkingLockPage = '/APPUnlockNeedMobileNetworkingLockPage'; // 我的设置-app开锁时需手机连网的锁 - static const hideInvalidUnlockPermissionsPage = '/HideInvalidUnlockPermissionsPage'; // 我的设置-隐藏无效开锁权限 + static const aPPUnlockNeedMobileNetworkingLockPage = + '/APPUnlockNeedMobileNetworkingLockPage'; // 我的设置-app开锁时需手机连网的锁 + static const hideInvalidUnlockPermissionsPage = + '/HideInvalidUnlockPermissionsPage'; // 我的设置-隐藏无效开锁权限 static const lockUserManageLisPage = '/LockUserManageLisPage'; //我的设置-锁用户管理 - static const authorizedAdministratorListPage = '/AuthorizedAdministratorListPage'; //我的设置-授权管理员 + static const authorizedAdministratorListPage = + '/AuthorizedAdministratorListPage'; //我的设置-授权管理员 static const lockGroupListPage = '/LockGroupListPage'; //我的设置-锁分组 static const lockItemListPage = '/LockItemListPage'; //锁分组-锁列表 static const transferSmartLockPage = '/transferSmartLockPage'; //转移智能锁 static const recipientInformationPage = '/recipientInformationPage'; //接受人信息 static const selectBranchPage = '/SelectBranchPage'; //选择分店 static const selectGetewayListPage = '/selectGetewayListPage'; //选择网关 - static const addAuthorizedAdministratorPage = '/addAuthorizedAdministratorPage'; //添加授权管理员 + static const addAuthorizedAdministratorPage = + '/addAuthorizedAdministratorPage'; //添加授权管理员 static const ownedKeyListPage = '/ownedKeyListPage'; //拥有的钥匙 + static const authorityManagementPage = '/authorityManagementPage'; //权限管理 + static const getDeviceListPage = '/getDeviceListPage'; //设备列表 + static const getNameListPage = '/getNameListPage'; //姓名列表 static const starLockLoginPage = '/StarLockLoginPage'; // 登录 static const starLockRegisterPage = '/StarLockRegisterPage'; // 注册 - static const starLockForgetPasswordPage = '/StarLockForgetPasswordPage'; // 忘记密码 + static const starLockForgetPasswordPage = + '/StarLockForgetPasswordPage'; // 忘记密码 static const seletCountryRegionPage = '/SeletCountryRegionPage'; // 选择国家和地区 static const safetyVerificationPage = '/SafetyVerificationPage'; // 安全验证 @@ -388,9 +400,9 @@ abstract class AppRouters { page: () => const StarLockLoginPage(), ), GetPage( - name: Routers.starLockRegisterPage, - page: () => const StarLockRegisterPage(), binding:StarLockRegisterBinding() - ), + name: Routers.starLockRegisterPage, + page: () => const StarLockRegisterPage(), + binding: StarLockRegisterBinding()), GetPage( name: Routers.starLockForgetPasswordPage, page: () => const StarLockForgetPasswordPage(), @@ -665,51 +677,46 @@ abstract class AppRouters { ), GetPage( name: Routers.authorizedAdministratorListPage, - page: () => const AuthorizedAdministratorListPage() - ), + page: () => const AuthorizedAdministratorListPage()), GetPage( name: Routers.lockUserManageLisPage, - page: () => const LockUserManageListListPage() - ), + page: () => const LockUserManageListListPage()), GetPage( - name: Routers.lockGroupListPage, page: () => const LockGroupListPage() - ), + name: Routers.lockGroupListPage, page: () => const LockGroupListPage()), GetPage( - name: Routers.lockItemListPage, page: () => const LockItemListPage() - ), + name: Routers.lockItemListPage, page: () => const LockItemListPage()), GetPage( name: Routers.transferSmartLockPage, - page: () => const TransferSmartLockPage() - ), + page: () => const TransferSmartLockPage()), GetPage( name: Routers.recipientInformationPage, - page: () => const RecipientInformationPage() - ), + page: () => const RecipientInformationPage()), GetPage( - name: Routers.selectBranchPage, page: () => const SelectBranchPage() - ), + name: Routers.selectBranchPage, page: () => const SelectBranchPage()), GetPage( name: Routers.selectGetewayListPage, - page: () => const SelectGetewayListPage() - ), + page: () => const SelectGetewayListPage()), GetPage( name: Routers.minePersonInfoEditEmailPage, - page: () => const MinePersonInfoEditEmailPage() - ), + page: () => const MinePersonInfoEditEmailPage()), GetPage( name: Routers.addAuthorizedAdministratorPage, - page: () => const AddAuthorizedAdministratorPage() - ), + page: () => const AddAuthorizedAdministratorPage()), GetPage( - name: Routers.safetyVerificationPage, - page: () => const SafetyVerificationPage(), + name: Routers.safetyVerificationPage, + page: () => const SafetyVerificationPage(), binding: SafetyVerificationBinding(), ), GetPage( - name: Routers.ownedKeyListPage, page: () => const OwnedKeyListPage() - ), + name: Routers.ownedKeyListPage, page: () => const OwnedKeyListPage()), GetPage( name: Routers.keyOperationRecordPage, - page: () => const KeyOperationRecordPage()) + page: () => const KeyOperationRecordPage()), + GetPage( + name: Routers.authorityManagementPage, + page: () => const AuthorityManagementPage()), + GetPage( + name: Routers.getDeviceListPage, page: () => const GetDeviceListPage()), + GetPage(name: Routers.getNameListPage, page: () => const GetNameListPage()) ]; } diff --git a/star_lock/lib/mine/mineSet/authorityManagement/authorityManagement_page.dart b/star_lock/lib/mine/mineSet/authorityManagement/authorityManagement_page.dart new file mode 100644 index 00000000..7e82d7f3 --- /dev/null +++ b/star_lock/lib/mine/mineSet/authorityManagement/authorityManagement_page.dart @@ -0,0 +1,296 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get_utils/get_utils.dart'; +import 'package:star_lock/appRouters.dart'; +import 'package:star_lock/app_settings/app_colors.dart'; +import 'package:star_lock/tools/submitBtn.dart'; +import 'package:star_lock/translations/trans_lib.dart'; + +class AuthorityManagementPage extends StatefulWidget { + const AuthorityManagementPage({Key? key}) : super(key: key); + + @override + State createState() { + return _AuthorityManagementPageState(); + } +} + +class _AuthorityManagementPageState extends State + with SingleTickerProviderStateMixin { + TabController? _tabController; + final FlutterContactPicker _contactPicker = FlutterContactPicker(); + late Contact _contact; + final _templateNameTf = TextEditingController(); + bool isNameSelect = false; + bool isDeviceSelect = false; + int selectDeviceIndex = 0; + int selectNameIndex = 0; + + List tabs = [ + TranslationLoader.lanKeys!.name!.tr, + TranslationLoader.lanKeys!.device!.tr + ]; + + @override + void initState() { + super.initState(); + + _tabController = TabController(length: 2, vsync: this); + } + + @override + Widget build(BuildContext context) { + return DefaultTabController( + length: 2, + child: Scaffold( + appBar: AppBar( + backgroundColor: AppColors.mainColor, + title: Text( + TranslationLoader.lanKeys!.authorityManagement!.tr, + style: TextStyle( + color: Colors.white, + fontSize: 28.sp, + fontWeight: FontWeight.w600), + ), + elevation: 0, + leading: IconButton( + icon: const Icon(Icons.arrow_back_ios, color: Colors.white), + onPressed: () => Navigator.of(context).pop(), + ), + bottom: PreferredSize( + preferredSize: const Size.fromHeight(45), + child: Material( + color: Colors.white, + child: Theme( + data: ThemeData( + ///点击的背景高亮颜色,处理阴影 + highlightColor: Colors.transparent, + + ///点击水波纹颜色 + splashColor: Colors.transparent, + ), + child: TabBar( + controller: _tabController, + indicatorSize: TabBarIndicatorSize.label, + indicatorColor: AppColors.mainColor, + unselectedLabelColor: AppColors.blackColor, + labelColor: AppColors.mainColor, + // isScrollable: true, + tabs: tabs.map((e) => Tab(text: e)).toList()), + )), + ), + ), + body: TabBarView( + controller: _tabController, + children: [_permissionNameList(), _permissionDeviceList()]))); + } + +//姓名列表 + Widget _permissionNameList() { + return Column( + children: [ + SizedBox( + height: 10.h, + ), + Expanded( + child: ListView.separated( + itemBuilder: (context, index) { + if (index == 0) { + return _buildNameWidget( + context, index, 'images/icon_password.png', '密码1'); + } else if (index == 1) { + return _buildNameWidget( + context, index, 'images/icon_card.png', '卡1'); + } else if (index == 2) { + return _buildNameWidget( + context, index, 'images/icon_fingerprint.png', '指纹1'); + } else if (index == 3) { + return _buildNameWidget( + context, index, 'images/icon_card.png', '遥控1'); + } + return null; + // return _buildNameWidget(context, index); + }, + separatorBuilder: (context, index) { + return const Divider( + height: 1, + color: AppColors.greyLineColor, + ); + }, + itemCount: 5)), + SizedBox( + height: 20.h, + ), + _buildDeauthorizationBtn1(), + SizedBox( + height: 40.h, + ) + ], + ); + } + + //设备列表 + Widget _permissionDeviceList() { + return Column( + children: [ + SizedBox( + height: 10.h, + ), + Expanded( + child: ListView.separated( + itemBuilder: (context, index) { + if (index == 0) { + return _buildDeviceWidget( + context, index, 'images/icon_lock.png', "大门锁"); + } else if (index == 1) { + return _buildDeviceWidget( + context, index, 'images/icon_lock.png', "办公室锁"); + } else if (index == 2) { + return _buildDeviceWidget( + context, index, 'images/icon_lock.png', "会议室锁"); + } else { + return _buildDeviceWidget( + context, index, 'images/icon_lock.png', "宴会厅锁"); + } + }, + separatorBuilder: (context, index) { + return const Divider( + height: 1, + color: AppColors.greyLineColor, + ); + }, + itemCount: 5)), + SizedBox( + height: 20.h, + ), + _buildDeauthorizationBtn2(), + SizedBox( + height: 40.h, + ) + ], + ); + } + + Widget _buildNameWidget(context, index, imageName, getName) { + return GestureDetector( + child: Container( + height: 90.h, + color: Colors.white, + width: ScreenUtil().screenWidth, + child: Row( + children: [ + SizedBox( + width: 30.w, + ), + Image.asset( + imageName, + width: 36.w, + height: 36.w, + ), + SizedBox( + width: 10.w, + ), + Text( + getName, + style: TextStyle(fontSize: 22.sp, color: AppColors.blackColor), + ), + Expanded( + child: SizedBox( + width: 20.w, + )), + Image.asset( + isNameSelect == false + ? 'images/icon_round_unSelet.png' + : 'images/icon_round_selet.png', + width: 30.sp, + height: 30.sp, + ), + SizedBox( + width: 30.w, + ) + ], + ), + ), + onTap: () { + selectNameIndex = index; + setState(() { + if (selectNameIndex == index) { + isNameSelect = !isNameSelect; + } + }); + }, + ); + } + + Widget _buildDeviceWidget(context, index, imageName, deviceName) { + return GestureDetector( + child: Container( + height: 90.h, + color: Colors.white, + width: ScreenUtil().screenWidth, + child: Row( + children: [ + SizedBox( + width: 30.w, + ), + Image.asset( + imageName, + width: 36.w, + height: 36.w, + ), + SizedBox( + width: 10.w, + ), + Text( + deviceName, + style: TextStyle(fontSize: 22.sp, color: AppColors.blackColor), + ), + Expanded( + child: SizedBox( + width: 20.w, + )), + Image.asset( + isDeviceSelect == false + ? 'images/icon_round_unSelet.png' + : 'images/icon_round_selet.png', + width: 30.sp, + height: 30.sp, + ), + SizedBox( + width: 30.w, + ) + ], + ), + ), + onTap: () { + selectDeviceIndex = index; + setState(() { + if (selectDeviceIndex == index) { + isDeviceSelect = !isDeviceSelect; + } + }); + }, + ); + } + +//去授权按钮-姓名 + Widget _buildDeauthorizationBtn1() { + return SubmitBtn( + btnName: TranslationLoader.lanKeys!.deAuthorize!.tr, + onClick: () { + Navigator.pushNamed(context, Routers.getDeviceListPage); + }, + ); + } + + //去授权按钮-关联设备 + Widget _buildDeauthorizationBtn2() { + return SubmitBtn( + btnName: TranslationLoader.lanKeys!.deAuthorize!.tr, + onClick: () { + Navigator.pushNamed(context, Routers.getNameListPage); + }, + ); + } +} diff --git a/star_lock/lib/mine/mineSet/authorityManagement/getDeviceList_page.dart b/star_lock/lib/mine/mineSet/authorityManagement/getDeviceList_page.dart new file mode 100644 index 00000000..9f8fa5a3 --- /dev/null +++ b/star_lock/lib/mine/mineSet/authorityManagement/getDeviceList_page.dart @@ -0,0 +1,136 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:star_lock/tools/submitBtn.dart'; + +import '../../../../app_settings/app_colors.dart'; +import '../../../../tools/titleAppBar.dart'; +import '../../../../translations/trans_lib.dart'; + +class GetDeviceListPage extends StatefulWidget { + const GetDeviceListPage({Key? key}) : super(key: key); + + @override + State createState() => _GetDeviceListPageState(); +} + +class _GetDeviceListPageState extends State { + bool isNameSelect = false; + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.associatedDevice!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor, + ), + body: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + left: 30.w, top: 16.w, right: 30.w, bottom: 16.w), + child: Text( + '请选择姓名要关联哪些设备', + style: TextStyle( + color: AppColors.darkGrayTextColor, fontSize: 20.sp), + textAlign: TextAlign.start, + ), + ), + Expanded(child: _permissionDeviceList()), + ], + ), + ); + } + + //设备列表 + Widget _permissionDeviceList() { + return Column( + children: [ + Expanded( + child: ListView.separated( + itemBuilder: (context, index) { + if (index == 0) { + return _buildDeviceWidget( + context, index, 'images/icon_lock.png', "大门锁"); + } else if (index == 1) { + return _buildDeviceWidget( + context, index, 'images/icon_lock.png', "办公室锁"); + } else if (index == 2) { + return _buildDeviceWidget( + context, index, 'images/icon_lock.png', "会议室锁"); + } else { + return _buildDeviceWidget( + context, index, 'images/icon_lock.png', "宴会厅锁"); + } + }, + separatorBuilder: (context, index) { + return const Divider( + height: 1, + color: AppColors.greyLineColor, + ); + }, + itemCount: 5)), + SizedBox( + height: 20.h, + ), + SubmitBtn( + btnName: '确定', + onClick: () {}, + ), + SizedBox( + height: 40.h, + ) + ], + ); + } + + Widget _buildDeviceWidget(context, index, imageName, deviceName) { + return GestureDetector( + child: Container( + height: 90.h, + color: Colors.white, + width: ScreenUtil().screenWidth, + child: Row( + children: [ + SizedBox( + width: 30.w, + ), + Image.asset( + isNameSelect == false + ? 'images/icon_round_unSelet.png' + : 'images/icon_round_selet.png', + width: 30.sp, + height: 30.sp, + ), + SizedBox( + width: 20.w, + ), + Image.asset( + imageName, + width: 36.w, + height: 36.w, + ), + SizedBox( + width: 10.w, + ), + Text( + deviceName, + style: TextStyle(fontSize: 22.sp, color: AppColors.blackColor), + ), + SizedBox( + width: 30.w, + ) + ], + ), + ), + onTap: () { + setState(() { + isNameSelect = !isNameSelect; + }); + }, + ); + } +} diff --git a/star_lock/lib/mine/mineSet/authorityManagement/getNameList_page.dart b/star_lock/lib/mine/mineSet/authorityManagement/getNameList_page.dart new file mode 100644 index 00000000..2761e59e --- /dev/null +++ b/star_lock/lib/mine/mineSet/authorityManagement/getNameList_page.dart @@ -0,0 +1,138 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:star_lock/tools/submitBtn.dart'; + +import '../../../../app_settings/app_colors.dart'; +import '../../../../tools/titleAppBar.dart'; +import '../../../../translations/trans_lib.dart'; + +class GetNameListPage extends StatefulWidget { + const GetNameListPage({Key? key}) : super(key: key); + + @override + State createState() => _GetNameListPageState(); +} + +class _GetNameListPageState extends State { + bool isNameSelect = false; + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.associatedName!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor, + ), + body: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + left: 30.w, top: 16.w, right: 30.w, bottom: 16.w), + child: Text( + '请选择设备要关联哪些姓名', + style: TextStyle( + color: AppColors.darkGrayTextColor, fontSize: 20.sp), + textAlign: TextAlign.start, + ), + ), + Expanded(child: _permissionNameList()), + ], + ), + ); + } + +//姓名列表 + Widget _permissionNameList() { + return Column( + children: [ + Expanded( + child: ListView.separated( + itemBuilder: (context, index) { + if (index == 0) { + return _buildNameWidget( + context, index, 'images/icon_password.png', '密码1'); + } else if (index == 1) { + return _buildNameWidget( + context, index, 'images/icon_card.png', '卡1'); + } else if (index == 2) { + return _buildNameWidget( + context, index, 'images/icon_fingerprint.png', '指纹1'); + } else if (index == 3) { + return _buildNameWidget( + context, index, 'images/icon_card.png', '遥控1'); + } + return null; + }, + separatorBuilder: (context, index) { + return const Divider( + height: 1, + color: AppColors.greyLineColor, + ); + }, + itemCount: 5)), + SizedBox( + height: 20.h, + ), + SubmitBtn( + btnName: '确定', + onClick: () {}, + ), + SizedBox( + height: 40.h, + ) + ], + ); + } + + Widget _buildNameWidget(context, index, imageName, getName) { + return GestureDetector( + child: Container( + height: 90.h, + color: Colors.white, + width: ScreenUtil().screenWidth, + child: Row( + children: [ + SizedBox( + width: 30.w, + ), + Image.asset( + imageName, + width: 36.w, + height: 36.w, + ), + SizedBox( + width: 10.w, + ), + Text( + getName, + style: TextStyle(fontSize: 22.sp, color: AppColors.blackColor), + ), + Expanded( + child: SizedBox( + width: 20.w, + )), + Image.asset( + isNameSelect == false + ? 'images/icon_round_unSelet.png' + : 'images/icon_round_selet.png', + width: 30.sp, + height: 30.sp, + ), + SizedBox( + width: 30.w, + ) + ], + ), + ), + onTap: () { + setState(() { + isNameSelect = !isNameSelect; + }); + }, + ); + } +} diff --git a/star_lock/lib/mine/mineSet/mineSet_page.dart b/star_lock/lib/mine/mineSet/mineSet_page.dart index 3139cdd5..74eb72b6 100644 --- a/star_lock/lib/mine/mineSet/mineSet_page.dart +++ b/star_lock/lib/mine/mineSet/mineSet_page.dart @@ -76,6 +76,17 @@ class _MineSetPageState extends State { Navigator.pushNamed( context, Routers.authorizedAdministratorListPage); }), + //by DaisyWu 新增--权限管理 + CommonItem( + leftTitel: + TranslationLoader.lanKeys!.authorityManagement!.tr, + rightTitle: "", + isHaveLine: true, + isHaveDirection: true, + action: () { + Navigator.pushNamed( + context, Routers.authorityManagementPage); + }), CommonItem( leftTitel: TranslationLoader.lanKeys!.lockGroup!.tr, rightTitle: "", diff --git a/star_lock/lib/translations/lanKeyEntity.dart b/star_lock/lib/translations/lanKeyEntity.dart index a1dcb741..455a1d3a 100644 --- a/star_lock/lib/translations/lanKeyEntity.dart +++ b/star_lock/lib/translations/lanKeyEntity.dart @@ -1,374 +1,378 @@ class LanKeyEntity { - LanKeyEntity({ - this.starLock, - this.clickUnlockAndHoldDownClose, - this.checkingIn, - this.electronicKey, - this.password, - this.card, - this.fingerprint, - this.remoteControl, - this.operatingRecord, - this.number, - this.additive, - this.addTime, - this.reset, - this.sendKey, - this.timeLimit, - this.permanent, - this.once, - this.circulation, - this.receiver, - this.pleaseEnterNumberOrEmail, - this.name, - this.enterYourName, - this.effectiveTime, - this.failureTime, - this.effectiveDate, - this.failureDate, - this.monday, - this.tuesday, - this.wednesday, - this.thursday, - this.friday, - this.saturday, - this.sunday, - this.mondayShort, - this.tuesdayShort, - this.wednesdayShort, - this.thursdayShort, - this.fridayShort, - this.saturdayShort, - this.sundayShort, - this.realNameAuthentication, - this.sendKeyBottomTip, - this.send, - this.periodValidity, - this.sendGroupKey, - this.lock, - this.pleaseAdd, - this.pleaseSelet, - this.remoteUnlockingAllowed, - this.pleaseEnter, - this.getPassword, - this.custom, - this.clearAll, - this.recursiveDevice, - this.pleaseNameYourPassword, - this.pleaseEnterDigitsNumber, - this.getPasswordTip1, - this.getPasswordTip2, - this.getPasswordTip3, - this.getPasswordTip4, - this.getPasswordTip5, - this.getPasswordTip6, - this.getTip, - this.addTip, - this.sender, - this.senderTime, - this.keyDetail, - this.detail, - this.delete, - this.passwordDetail, - this.share, - this.amend, - this.sure, - this.cancel, - this.add, - this.accountNumber, - this.volumeAuthorizationLock, - this.authorizedAdminTip, - this.lockOperatingRecordTip, - this.rankingList, - this.earlyArrivalList, - this.lateList, - this.hardWorkingList, - this.basicInformation, - this.wirelessKeyboard, - this.doorMagnetic, - this.remoteUnlocking, - this.automaticBlocking, - this.normallyOpenMode, - this.lockSound, - this.burglarAlarm, - this.resetButton, - this.lockTime, - this.diagnose, - this.uploadData, - this.importOtherLockData, - this.lockEscalation, - this.markedHouseState, - this.unlockReminder, - this.unlockQRCode, - this.lockNumber, - this.electricQuantity, - this.lockName, - this.lockGrouping, - this.selectGroup, - this.createNewGroup, - this.adminOpenLockPassword, - this.update, - this.updateElectricQuantityTip, - this.adminOpenLockPasswordTip, - this.updateLockAdminPassword, - this.whenScreenFlashesClickNext, - this.theScreenNeverFlickered, - this.enterNumberOrPressSet, - this.theLocationOfTheSetKeyWillBeDifferent, - this.pressAndHoldTheResetButtonTwoSeconds, - this.nearbyEquipment, - this.noData, - this.doorMagneticListTopTip, - this.remoteUnlockingPageTip, - this.currentMode, - this.delayTime, - this.automaticBlockingTip, - this.time, - this.normallyOpen, - this.date, - this.begin, - this.end, - this.allDay, - this.save, - this.normallyOpenModeTip, - this.pleaseSeletLockVolume, - this.lockSoundTip, - this.low, - this.lower, - this.medium, - this.high, - this.higher, - this.burglarAlarmTip, - this.resetButtonTip1, - this.resetButtonTip2, - this.calibrationTime, - this.setTheDSTMode, - this.diagnoseTip, - this.uploading, - this.uploadDataTip, - this.importOtherLockDataTip, - this.haveNewVersion, - this.currentVersion, - this.newVersion, - this.upgrade, - this.leisure, - this.checkedIn, - this.company, - this.staff, - this.work, - this.workday, - this.holidays, - this.punchingMode, - this.whetherTheEmployeeHasAKey, - this.selectKey, - this.officeHours, - this.closingTime, - this.thisWeek, - this.singleDayWeekend, - this.twoDaysOff, - this.oddOrEvenDaysOff, - this.year, - this.month, - this.libertyDay, - this.coverDate, - this.addedHoliday, - this.startDate, - this.accessDate, - this.mustFillIn, - this.endDate, - this.dailyCharts, - this.monthlyLeaderboard, - this.noAttendanceRecord, - this.everyoneIsVeryMotivated, - this.workingHoursWereNotReleased, - this.beLate, - this.leaveEarly, - this.noCardPunched, - this.lanEnglish, - this.lanChinese, - this.multilingual, - this.addLock, - this.addDevice, - this.gateway, - this.message, - this.supportStaff, - this.set, - this.moreServices, - this.moreSet, - this.prompTone, - this.touchUnlock, - this.pushNotification, - this.lockUserManagement, - this.authorizedAdmin, - this.addAuthorizedAdmin, - this.lockGroup, - this.transferSmartLock, - this.selectiveLock, - this.recipientInformation, - this.transferGateway, - this.multiLanguage, - this.lockScreen, - this.closed, - this.opened, - this.hideInvalidUnlockPermissions, - this.appUnlockRequiresMobilePhoneAccessToTheLock, - this.valueAddedServices, - this.about, - this.userAgreement, - this.privacyPolicy, - this.personalInformationCollectionList, - this.applicationPermissionDescription, - this.thirdPartyInformationSharingList, - this.logout, - this.deleteAccount, - this.personalInformation, - this.avatar, - this.nickName, - this.changeNickName, - this.modifyAccount, - this.resetPasswords, - this.safetyProblem, - this.modifyAccountTip, - this.pleaseEnterAccountNumber, - this.pleaseEnterNewAccountNumber, - this.changeIphoneTip, - this.changeEmailTip, - this.originalPassword, - this.newPassword, - this.surePassword, - this.safetyProblemTip, - this.problemOne, - this.problemTwo, - this.problemThree, - this.pleaseEnterYourAnswer, - this.aboutToExpire, - this.changeName, - this.designation, - this.state, - this.wifiName, - this.networkMAC, - this.gatewayUpgrade, - this.gatewayConnectionLock, - this.strongSignal, - this.mediumSignal, - this.averageSignal, - this.weakSignal, - this.selectGatewayType, - this.addGateway, - this.turnThePowerBackOn, - this.indicatorLight, - this.seletGatewayTypeNextTip, - this.selectGateway, - this.gatewayConfigurationWifiTip, - this.wifiPassward, - this.pleaseEnterTheWiFiPassword, - this.gatewayName, - this.pleaseEnterGatewayName, - this.wifiMAC, - this.ipAddress, - this.subnetMask, - this.defaultGateway, - this.automaticallyGetTheDNSServerAddress, - this.preferredDNS, - this.alternativeDNS, - this.noStaticIPIsUsed, - this.allLock, - this.searchAllLockType, - this.doorLock, - this.padlock, - this.safeLock, - this.intelligentLockCore, - this.itelligentAccessControl, - this.parkingLock, - this.bicycleLock, - this.longRangeControl, - this.lightTouchScreen, - this.lightTouchScreenTip, - this.next, - this.nearbyLock, - this.addSuccessfullyPleaseRename, - this.whenAddingLockThePhoneMustBeNextToTheLock, - this.login, - this.register, - this.forgetPassword, - this.readAndAgree, - this.verificationCode, - this.registerPasswordTip, - this.iphone, - this.email, - this.countryAndRegion, - this.selet, - this.businessCooperation, - this.officialWebsite, - this.computerWebVersion, - this.hotelSystem, - this.manualWebVersion, - this.introduce, - this.note, - this.mail, - this.advancedFunction, - this.pushMessage, - this.recordsRetention, - this.smsBuyTip, - this.emailBuyTip, - this.currentRemainingQuantity, - this.buy, - this.customSMSTemplate, - this.customMailTemplate, - this.record, - this.buyRealNameTip, - this.buyRealNameSeletYouWantBuyTip, - this.forTheFirstTime, - this.onceDay, - this.weekOnce, - this.monthOnce, - this.currentState, - this.onTrial, - this.haveNotOpened, - this.advancedFeaturesAndBenefitsContent, - this.smsTemplate, - this.emailTemplate, - this.cardIssuingtool, - this.titleForBuyingAdvancedFeatures, - this.tipsForBuyingAdvancedFeatures, - this.freeTrial, - this.openNow, - this.buySMS, - this.buyMail, - this.buyRealNameAuthenticationTimes, - this.enablingAdvancedFeatures, - this.chooseAPackage, - this.modeOfPayment, - this.alipay, - this.goToPay, - this.customTemplatesTip, - this.haveOpened, - this.unHaveOpenedTip1, - this.unHaveOpenedTip2, - this.freeTrialKeywords, - this.goToTheOpen, - this.creatingANewTemplate, - this.type, - this.templateContent, - this.preview, - this.hello, - this.yourRoomIs, - this.roomName, - this.theCodeToOpenTheDoorIs, - this.templateTip1, - this.templateTip2, - this.templateTip3, - this.expectedNotoCount, - this.templateTip4, - this.and, - this.willBeReplacedWithTheActualValue, - this.downloadLink, - this.lockScreenTip, - this.hideInvalidUnlockPermissionsTip, - this.appUnlockRequiresMobilePhoneAccessToTheLockTip, - this.checkAll, - this.getVerificationCode - }); + LanKeyEntity( + {this.starLock, + this.clickUnlockAndHoldDownClose, + this.checkingIn, + this.electronicKey, + this.password, + this.card, + this.fingerprint, + this.remoteControl, + this.operatingRecord, + this.number, + this.additive, + this.addTime, + this.reset, + this.sendKey, + this.timeLimit, + this.permanent, + this.once, + this.circulation, + this.receiver, + this.pleaseEnterNumberOrEmail, + this.name, + this.enterYourName, + this.effectiveTime, + this.failureTime, + this.effectiveDate, + this.failureDate, + this.monday, + this.tuesday, + this.wednesday, + this.thursday, + this.friday, + this.saturday, + this.sunday, + this.mondayShort, + this.tuesdayShort, + this.wednesdayShort, + this.thursdayShort, + this.fridayShort, + this.saturdayShort, + this.sundayShort, + this.realNameAuthentication, + this.sendKeyBottomTip, + this.send, + this.periodValidity, + this.sendGroupKey, + this.lock, + this.pleaseAdd, + this.pleaseSelet, + this.remoteUnlockingAllowed, + this.pleaseEnter, + this.getPassword, + this.custom, + this.clearAll, + this.recursiveDevice, + this.pleaseNameYourPassword, + this.pleaseEnterDigitsNumber, + this.getPasswordTip1, + this.getPasswordTip2, + this.getPasswordTip3, + this.getPasswordTip4, + this.getPasswordTip5, + this.getPasswordTip6, + this.getTip, + this.addTip, + this.sender, + this.senderTime, + this.keyDetail, + this.detail, + this.delete, + this.passwordDetail, + this.share, + this.amend, + this.sure, + this.cancel, + this.add, + this.accountNumber, + this.volumeAuthorizationLock, + this.authorizedAdminTip, + this.lockOperatingRecordTip, + this.rankingList, + this.earlyArrivalList, + this.lateList, + this.hardWorkingList, + this.basicInformation, + this.wirelessKeyboard, + this.doorMagnetic, + this.remoteUnlocking, + this.automaticBlocking, + this.normallyOpenMode, + this.lockSound, + this.burglarAlarm, + this.resetButton, + this.lockTime, + this.diagnose, + this.uploadData, + this.importOtherLockData, + this.lockEscalation, + this.markedHouseState, + this.unlockReminder, + this.unlockQRCode, + this.lockNumber, + this.electricQuantity, + this.lockName, + this.lockGrouping, + this.selectGroup, + this.createNewGroup, + this.adminOpenLockPassword, + this.update, + this.updateElectricQuantityTip, + this.adminOpenLockPasswordTip, + this.updateLockAdminPassword, + this.whenScreenFlashesClickNext, + this.theScreenNeverFlickered, + this.enterNumberOrPressSet, + this.theLocationOfTheSetKeyWillBeDifferent, + this.pressAndHoldTheResetButtonTwoSeconds, + this.nearbyEquipment, + this.noData, + this.doorMagneticListTopTip, + this.remoteUnlockingPageTip, + this.currentMode, + this.delayTime, + this.automaticBlockingTip, + this.time, + this.normallyOpen, + this.date, + this.begin, + this.end, + this.allDay, + this.save, + this.normallyOpenModeTip, + this.pleaseSeletLockVolume, + this.lockSoundTip, + this.low, + this.lower, + this.medium, + this.high, + this.higher, + this.burglarAlarmTip, + this.resetButtonTip1, + this.resetButtonTip2, + this.calibrationTime, + this.setTheDSTMode, + this.diagnoseTip, + this.uploading, + this.uploadDataTip, + this.importOtherLockDataTip, + this.haveNewVersion, + this.currentVersion, + this.newVersion, + this.upgrade, + this.leisure, + this.checkedIn, + this.company, + this.staff, + this.work, + this.workday, + this.holidays, + this.punchingMode, + this.whetherTheEmployeeHasAKey, + this.selectKey, + this.officeHours, + this.closingTime, + this.thisWeek, + this.singleDayWeekend, + this.twoDaysOff, + this.oddOrEvenDaysOff, + this.year, + this.month, + this.libertyDay, + this.coverDate, + this.addedHoliday, + this.startDate, + this.accessDate, + this.mustFillIn, + this.endDate, + this.dailyCharts, + this.monthlyLeaderboard, + this.noAttendanceRecord, + this.everyoneIsVeryMotivated, + this.workingHoursWereNotReleased, + this.beLate, + this.leaveEarly, + this.noCardPunched, + this.lanEnglish, + this.lanChinese, + this.multilingual, + this.addLock, + this.addDevice, + this.gateway, + this.message, + this.supportStaff, + this.set, + this.moreServices, + this.moreSet, + this.prompTone, + this.touchUnlock, + this.pushNotification, + this.lockUserManagement, + this.authorityManagement, + this.associatedDevice, + this.associatedName, + this.device, + this.authorizedAdmin, + this.addAuthorizedAdmin, + this.lockGroup, + this.transferSmartLock, + this.selectiveLock, + this.recipientInformation, + this.transferGateway, + this.multiLanguage, + this.lockScreen, + this.closed, + this.opened, + this.hideInvalidUnlockPermissions, + this.appUnlockRequiresMobilePhoneAccessToTheLock, + this.valueAddedServices, + this.about, + this.userAgreement, + this.privacyPolicy, + this.personalInformationCollectionList, + this.applicationPermissionDescription, + this.thirdPartyInformationSharingList, + this.logout, + this.deleteAccount, + this.personalInformation, + this.avatar, + this.nickName, + this.changeNickName, + this.modifyAccount, + this.resetPasswords, + this.safetyProblem, + this.modifyAccountTip, + this.pleaseEnterAccountNumber, + this.pleaseEnterNewAccountNumber, + this.changeIphoneTip, + this.changeEmailTip, + this.originalPassword, + this.newPassword, + this.surePassword, + this.safetyProblemTip, + this.problemOne, + this.problemTwo, + this.problemThree, + this.pleaseEnterYourAnswer, + this.aboutToExpire, + this.deAuthorize, + this.changeName, + this.designation, + this.state, + this.wifiName, + this.networkMAC, + this.gatewayUpgrade, + this.gatewayConnectionLock, + this.strongSignal, + this.mediumSignal, + this.averageSignal, + this.weakSignal, + this.selectGatewayType, + this.addGateway, + this.turnThePowerBackOn, + this.indicatorLight, + this.seletGatewayTypeNextTip, + this.selectGateway, + this.gatewayConfigurationWifiTip, + this.wifiPassward, + this.pleaseEnterTheWiFiPassword, + this.gatewayName, + this.pleaseEnterGatewayName, + this.wifiMAC, + this.ipAddress, + this.subnetMask, + this.defaultGateway, + this.automaticallyGetTheDNSServerAddress, + this.preferredDNS, + this.alternativeDNS, + this.noStaticIPIsUsed, + this.allLock, + this.searchAllLockType, + this.doorLock, + this.padlock, + this.safeLock, + this.intelligentLockCore, + this.itelligentAccessControl, + this.parkingLock, + this.bicycleLock, + this.longRangeControl, + this.lightTouchScreen, + this.lightTouchScreenTip, + this.next, + this.nearbyLock, + this.addSuccessfullyPleaseRename, + this.whenAddingLockThePhoneMustBeNextToTheLock, + this.login, + this.register, + this.forgetPassword, + this.readAndAgree, + this.verificationCode, + this.registerPasswordTip, + this.iphone, + this.email, + this.countryAndRegion, + this.selet, + this.businessCooperation, + this.officialWebsite, + this.computerWebVersion, + this.hotelSystem, + this.manualWebVersion, + this.introduce, + this.note, + this.mail, + this.advancedFunction, + this.pushMessage, + this.recordsRetention, + this.smsBuyTip, + this.emailBuyTip, + this.currentRemainingQuantity, + this.buy, + this.customSMSTemplate, + this.customMailTemplate, + this.record, + this.buyRealNameTip, + this.buyRealNameSeletYouWantBuyTip, + this.forTheFirstTime, + this.onceDay, + this.weekOnce, + this.monthOnce, + this.currentState, + this.onTrial, + this.haveNotOpened, + this.advancedFeaturesAndBenefitsContent, + this.smsTemplate, + this.emailTemplate, + this.cardIssuingtool, + this.titleForBuyingAdvancedFeatures, + this.tipsForBuyingAdvancedFeatures, + this.freeTrial, + this.openNow, + this.buySMS, + this.buyMail, + this.buyRealNameAuthenticationTimes, + this.enablingAdvancedFeatures, + this.chooseAPackage, + this.modeOfPayment, + this.alipay, + this.goToPay, + this.customTemplatesTip, + this.haveOpened, + this.unHaveOpenedTip1, + this.unHaveOpenedTip2, + this.freeTrialKeywords, + this.goToTheOpen, + this.creatingANewTemplate, + this.type, + this.templateContent, + this.preview, + this.hello, + this.yourRoomIs, + this.roomName, + this.theCodeToOpenTheDoorIs, + this.templateTip1, + this.templateTip2, + this.templateTip3, + this.expectedNotoCount, + this.templateTip4, + this.and, + this.willBeReplacedWithTheActualValue, + this.downloadLink, + this.lockScreenTip, + this.hideInvalidUnlockPermissionsTip, + this.appUnlockRequiresMobilePhoneAccessToTheLockTip, + this.checkAll, + this.getVerificationCode}); LanKeyEntity.fromJson(dynamic json) { starLock = json['starLock']; @@ -577,6 +581,11 @@ class LanKeyEntity { touchUnlock = json['touchUnlock']; pushNotification = json['pushNotification']; lockUserManagement = json['lockUserManagement']; + authorityManagement = json['authorityManagement']; + associatedDevice = json['associatedDevice']; + associatedName = json['associatedName']; + device = json['device']; + authorizedAdmin = json['authorizedAdmin']; addAuthorizedAdmin = json['addAuthorizedAdmin']; lockGroup = json['lockGroup']; @@ -623,6 +632,7 @@ class LanKeyEntity { problemThree = json['problemThree']; pleaseEnterYourAnswer = json['pleaseEnterYourAnswer']; aboutToExpire = json['aboutToExpire']; + deAuthorize = json['deAuthorize']; changeName = json['changeName']; designation = json['designation']; @@ -969,6 +979,10 @@ class LanKeyEntity { String? touchUnlock; String? pushNotification; String? lockUserManagement; + String? authorityManagement; + String? associatedDevice; + String? associatedName; + String? device; String? authorizedAdmin; String? addAuthorizedAdmin; String? lockGroup; @@ -1015,6 +1029,7 @@ class LanKeyEntity { String? problemThree; String? pleaseEnterYourAnswer; String? aboutToExpire; + String? deAuthorize; String? changeName; String? designation; @@ -1359,6 +1374,10 @@ class LanKeyEntity { map['touchUnlock'] = touchUnlock; map['pushNotification'] = pushNotification; map['lockUserManagement'] = lockUserManagement; + map['authorityManagement'] = authorityManagement; + map['associatedDevice'] = associatedDevice; + map['associatedName'] = associatedName; + map['device'] = device; map['authorizedAdmin'] = authorizedAdmin; map['addAuthorizedAdmin'] = addAuthorizedAdmin; map['lockGroup'] = lockGroup; @@ -1406,6 +1425,7 @@ class LanKeyEntity { map['problemThree'] = problemThree; map['pleaseEnterYourAnswer'] = pleaseEnterYourAnswer; map['aboutToExpire'] = aboutToExpire; + map['deAuthorize'] = deAuthorize; map['changeName'] = changeName; map['designation'] = designation;