1,群发钥匙新增部分逻辑判断
2,更换、新增部分图片
@ -134,7 +134,7 @@
|
|||||||
"lockEscalation":"锁升级",
|
"lockEscalation":"锁升级",
|
||||||
"markedHouseState":"标记房态",
|
"markedHouseState":"标记房态",
|
||||||
"unlockReminder":"开锁提醒",
|
"unlockReminder":"开锁提醒",
|
||||||
"unlockQRCode":"开锁二维码",
|
"unlockQRCode":"微信二维码",
|
||||||
"lockNumber":"锁编号",
|
"lockNumber":"锁编号",
|
||||||
"electricQuantity":"电量",
|
"electricQuantity":"电量",
|
||||||
"lockName":"名称",
|
"lockName":"名称",
|
||||||
|
|||||||
BIN
star_lock/images/lockType/lockType_NFCLock.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 20 KiB |
BIN
star_lock/images/lockType/lockType_entranceGuardLock.png
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
star_lock/images/lockType/lockType_gatewayLock.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
star_lock/images/main/icon_catEyes.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
star_lock/images/main/icon_face.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 112 KiB |
@ -1,13 +1,10 @@
|
|||||||
import 'package:flutter/widgets.dart';
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/common/safetyVerification/safetyVerification_binding.dart';
|
import 'package:star_lock/common/safetyVerification/safetyVerification_binding.dart';
|
||||||
import 'package:star_lock/login/register/starLock_register_binding.dart';
|
import 'package:star_lock/login/register/starLock_register_binding.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/lockUserList_page.dart';
|
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lockDetail/lockDetail_main_page.dart';
|
import 'package:star_lock/main/lockDetail/lockDetail/lockDetail_main_page.dart';
|
||||||
import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
|
|
||||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/minePersonInfoEmail_page.dart';
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/minePersonInfoEmail_page.dart';
|
||||||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator_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/lockGroup/lockGroupList_page.dart';
|
||||||
@ -75,7 +72,6 @@ import 'main/lockDetail/electronicKey/electronicKeyPeriodValidity/electronicKeyP
|
|||||||
import 'main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_page.dart';
|
import 'main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicManageKey/massSendElectronicKeyManage_page.dart';
|
||||||
import 'main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_page.dart';
|
import 'main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_page.dart';
|
||||||
import 'main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_page.dart';
|
import 'main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_page.dart';
|
||||||
import 'main/lockDetail/lockDetail/lockDetail_page.dart';
|
|
||||||
import 'main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart';
|
import 'main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart';
|
||||||
import 'main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart';
|
import 'main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart';
|
||||||
import 'main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart';
|
import 'main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart';
|
||||||
@ -746,7 +742,7 @@ abstract class AppRouters {
|
|||||||
GetPage(
|
GetPage(
|
||||||
name: Routers.configuringWifiPage,
|
name: Routers.configuringWifiPage,
|
||||||
page: () => const ConfiguringWifiPage()),
|
page: () => const ConfiguringWifiPage()),
|
||||||
GetPage(
|
GetPage(
|
||||||
name: Routers.massSendLockGroupPage,
|
name: Routers.massSendLockGroupPage,
|
||||||
page: () => const MassSendLockGroupListPage()),
|
page: () => const MassSendLockGroupListPage()),
|
||||||
GetPage(
|
GetPage(
|
||||||
@ -754,6 +750,5 @@ abstract class AppRouters {
|
|||||||
page: () => const MassSendReceiverPage()),
|
page: () => const MassSendReceiverPage()),
|
||||||
GetPage(
|
GetPage(
|
||||||
name: Routers.lockUserListPage, page: () => const LockUserListPage())
|
name: Routers.lockUserListPage, page: () => const LockUserListPage())
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter_pickers/pickers.dart';
|
||||||
|
import 'package:flutter_pickers/time_picker/model/date_mode.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||||
@ -22,6 +24,13 @@ class MassSendElectronicKeyPage extends StatefulWidget {
|
|||||||
class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||||
final FlutterContactPicker _contactPicker = FlutterContactPicker();
|
final FlutterContactPicker _contactPicker = FlutterContactPicker();
|
||||||
late Contact _contact;
|
late Contact _contact;
|
||||||
|
var _selectEffectiveDate = ''; //生效时间
|
||||||
|
var _selectFailureDate = ''; //失效时间
|
||||||
|
late DateTime _effectiveDateTime;
|
||||||
|
late DateTime _failureDateTime;
|
||||||
|
late bool _isSendSuccess;
|
||||||
|
late bool _isRemote; //是否远程开锁
|
||||||
|
List _receiverList = [];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -31,6 +40,16 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
|
DateTime dateTime = DateTime.now();
|
||||||
|
_effectiveDateTime = dateTime;
|
||||||
|
_failureDateTime = dateTime;
|
||||||
|
_selectEffectiveDate =
|
||||||
|
'${dateTime.year}-${dateTime.month}-${dateTime.day} ${dateTime.hour}:${dateTime.minute}'; //默认为当前时间
|
||||||
|
_selectFailureDate =
|
||||||
|
'${dateTime.year}-${dateTime.month}-${dateTime.day} ${dateTime.hour}:${dateTime.minute}'; //默认为当前时间
|
||||||
|
_isSendSuccess = false;
|
||||||
|
_isRemote = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget indexChangeWidget() {
|
Widget indexChangeWidget() {
|
||||||
@ -82,11 +101,21 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
|||||||
Container(height: 10.h),
|
Container(height: 10.h),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||||
rightTitle: TranslationLoader.lanKeys!.pleaseAdd!.tr,
|
rightTitle: _receiverList.isEmpty
|
||||||
|
? TranslationLoader.lanKeys!.pleaseAdd!.tr
|
||||||
|
: _receiverList.length.toString(),
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Navigator.pushNamed(context, Routers.massSendReceiverPage);
|
Navigator.pushNamed(context, Routers.massSendReceiverPage)
|
||||||
|
.then((value) {
|
||||||
|
if (value != null) {
|
||||||
|
value as Map<String, dynamic>;
|
||||||
|
_receiverList = value['lockUserList'];
|
||||||
|
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.lock!.tr,
|
leftTitel: TranslationLoader.lanKeys!.lock!.tr,
|
||||||
@ -106,12 +135,33 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
|||||||
children: [
|
children: [
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||||
rightTitle: "2020.06.20 11:49",
|
rightTitle: _selectEffectiveDate,
|
||||||
isHaveLine: true),
|
isHaveLine: true,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Pickers.showDatePicker(context, mode: DateMode.YMDHM,
|
||||||
|
onConfirm: (p) {
|
||||||
|
setState(() {
|
||||||
|
_selectEffectiveDate =
|
||||||
|
'${p.year}-${intToStr(p.month!)}-${intToStr(p.day!)} ${intToStr(p.hour!)}:${intToStr(p.minute!)}';
|
||||||
|
_effectiveDateTime = DateTime.parse(_selectEffectiveDate);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||||
rightTitle: "2020.06.20 11:49",
|
rightTitle: _selectFailureDate,
|
||||||
),
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Pickers.showDatePicker(context, mode: DateMode.YMDHM,
|
||||||
|
onConfirm: (p) {
|
||||||
|
setState(() {
|
||||||
|
_selectFailureDate =
|
||||||
|
'${p.year}-${intToStr(p.month!)}-${intToStr(p.day!)} ${intToStr(p.hour!)}:${intToStr(p.minute!)}';
|
||||||
|
_failureDateTime = DateTime.parse(_selectFailureDate);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}),
|
||||||
Container(height: 10.h),
|
Container(height: 10.h),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -162,17 +212,20 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CupertinoSwitch _switch() {
|
CupertinoSwitch _switch() {
|
||||||
bool _isOn = false;
|
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
trackColor: CupertinoColors.systemGrey5,
|
trackColor: CupertinoColors.systemGrey5,
|
||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: _isOn,
|
value: _isRemote,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_isOn = value;
|
_isRemote = !_isRemote;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String intToStr(int v) {
|
||||||
|
return (v < 10) ? "0$v" : "$v";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
import 'dart:ui';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/utils.dart';
|
import 'package:get/utils.dart';
|
||||||
import 'package:star_lock/app_settings/app_colors.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/lockUserListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserListEntity.dart';
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
import 'package:star_lock/network/api_repository.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
import 'package:star_lock/tools/submitBtn.dart';
|
import 'package:star_lock/tools/submitBtn.dart';
|
||||||
@ -0,0 +1,92 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserListEntity.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
||||||
|
|
||||||
|
class massSendLockGroupCell extends StatelessWidget {
|
||||||
|
final int currentIndex;
|
||||||
|
// LockListItem itemData;
|
||||||
|
List lockListByGroup;
|
||||||
|
final VoidCallback selectLockAction;
|
||||||
|
|
||||||
|
massSendLockGroupCell(int index,
|
||||||
|
{Key? key,
|
||||||
|
required this.currentIndex,
|
||||||
|
required this.lockListByGroup,
|
||||||
|
// required this.itemData,
|
||||||
|
required this.selectLockAction})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return ListView.separated(
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
shrinkWrap: true,
|
||||||
|
itemCount: lockListByGroup.length,
|
||||||
|
itemBuilder: (_, itemIndex) {
|
||||||
|
LockListItem itemData = lockListByGroup[itemIndex];
|
||||||
|
return _itemBuilder(itemData);
|
||||||
|
},
|
||||||
|
separatorBuilder: (BuildContext context, int index) {
|
||||||
|
return const Divider(
|
||||||
|
height: 1,
|
||||||
|
color: AppColors.greyLineColor,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _itemBuilder(LockListItem itemData) {
|
||||||
|
return GestureDetector(
|
||||||
|
child: Container(
|
||||||
|
height: 60.h,
|
||||||
|
color: Colors.white,
|
||||||
|
width: ScreenUtil().screenWidth,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 30.w,
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
'images/mine/icon_mine_gatewaySignal_prompt.png',
|
||||||
|
width: 36.w,
|
||||||
|
height: 36.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 10.w,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
itemData.lockAlias!,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: SizedBox(
|
||||||
|
width: 20.w,
|
||||||
|
)),
|
||||||
|
Image.asset(
|
||||||
|
itemData.isCheck!
|
||||||
|
? "images/icon_round_selet.png"
|
||||||
|
: "images/icon_round_unSelet.png",
|
||||||
|
width: 30.w,
|
||||||
|
height: 30.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 30.w,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
selectLockAction();
|
||||||
|
// selectNameIndex = index;
|
||||||
|
// setState(() {
|
||||||
|
// if (selectNameIndex == index) {
|
||||||
|
// isNameSelect = !isNameSelect;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -52,9 +52,10 @@ class LockListData {
|
|||||||
class LockListItem {
|
class LockListItem {
|
||||||
int? lockId;
|
int? lockId;
|
||||||
String? lockAlias;
|
String? lockAlias;
|
||||||
|
bool? isCheck = false;
|
||||||
bool? isRefresh = false;
|
bool? isRefresh = false;
|
||||||
|
|
||||||
LockListItem({this.lockId, this.lockAlias, this.isRefresh});
|
LockListItem({this.lockId, this.lockAlias, this.isRefresh, this.isCheck});
|
||||||
|
|
||||||
LockListItem.fromJson(Map<String, dynamic> json) {
|
LockListItem.fromJson(Map<String, dynamic> json) {
|
||||||
lockId = json['lockId'];
|
lockId = json['lockId'];
|
||||||
|
|||||||
@ -2,11 +2,13 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/utils.dart';
|
import 'package:get/utils.dart';
|
||||||
import 'package:star_lock/app_settings/app_colors.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupCell.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/LockGroupListEntity.dart';
|
import 'package:star_lock/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/LockGroupListEntity.dart';
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
import 'package:star_lock/network/api_repository.dart';
|
||||||
import 'package:star_lock/tools/ExpandedListView.dart';
|
import 'package:star_lock/tools/ExpandedListView.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
import 'package:star_lock/tools/submitBtn.dart';
|
||||||
import 'package:star_lock/translations/trans_lib.dart';
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
|
|
||||||
class MassSendLockGroupListPage extends StatefulWidget {
|
class MassSendLockGroupListPage extends StatefulWidget {
|
||||||
@ -22,6 +24,7 @@ class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
|||||||
List lockListByGroup = [];
|
List lockListByGroup = [];
|
||||||
List lockGroupList = [];
|
List lockGroupList = [];
|
||||||
List clickIndexList = [];
|
List clickIndexList = [];
|
||||||
|
int clickIndex = -1;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -66,6 +69,12 @@ class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
|||||||
height: 10.h,
|
height: 10.h,
|
||||||
),
|
),
|
||||||
Expanded(child: _buildListView(context, lockGroupList)),
|
Expanded(child: _buildListView(context, lockGroupList)),
|
||||||
|
SubmitBtn(
|
||||||
|
btnName: '确定',
|
||||||
|
onClick: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 40.h,
|
height: 40.h,
|
||||||
)
|
)
|
||||||
@ -97,9 +106,10 @@ class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
|||||||
dataList = entity.data!.lockList!;
|
dataList = entity.data!.lockList!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lockListByGroup = dataList;
|
|
||||||
|
|
||||||
setState(() {});
|
setState(() {
|
||||||
|
lockListByGroup = dataList;
|
||||||
|
});
|
||||||
return dataList;
|
return dataList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,68 +135,15 @@ class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
listLockByGroup(itemData.keyGroupId.toString());
|
listLockByGroup(itemData.keyGroupId.toString());
|
||||||
clickIndexList.add(index);
|
clickIndexList.add(index);
|
||||||
|
clickIndex = index;
|
||||||
},
|
},
|
||||||
title: itemData.keyGroupName!,
|
title: itemData.keyGroupName!,
|
||||||
imgName: '',
|
imgName: '',
|
||||||
typeImgList: const [],
|
typeImgList: const [],
|
||||||
child: ListView.separated(
|
child: massSendLockGroupCell(index,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
currentIndex: index,
|
||||||
shrinkWrap: true,
|
lockListByGroup: lockListByGroup,
|
||||||
itemCount: lockListByGroup.length,
|
selectLockAction: () {}),
|
||||||
itemBuilder: (_, itemIndex) {
|
|
||||||
LockListItem itemData = lockListByGroup[itemIndex];
|
|
||||||
return _buildNameWidget(context, itemIndex,
|
|
||||||
'images/icon_password.png', itemData.lockAlias);
|
|
||||||
},
|
|
||||||
separatorBuilder: (BuildContext context, int index) {
|
|
||||||
return const Divider(
|
|
||||||
height: 1,
|
|
||||||
color: AppColors.greyLineColor,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
//单个姓名行
|
|
||||||
Widget _buildNameWidget(context, index, imageName, getName) {
|
|
||||||
return GestureDetector(
|
|
||||||
child: Container(
|
|
||||||
height: 60.h,
|
|
||||||
color: Colors.white,
|
|
||||||
width: ScreenUtil().screenWidth,
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
width: 30.w,
|
|
||||||
),
|
|
||||||
Image.asset(
|
|
||||||
'images/mine/icon_mine_gatewaySignal_prompt.png',
|
|
||||||
width: 36.w,
|
|
||||||
height: 36.w,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 10.w,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
getName,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 30.w,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
onTap: () {
|
|
||||||
// selectNameIndex = index;
|
|
||||||
// setState(() {
|
|
||||||
// if (selectNameIndex == index) {
|
|
||||||
// isNameSelect = !isNameSelect;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,155 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get_utils/get_utils.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserListEntity.dart';
|
||||||
|
import 'package:star_lock/tools/commonItem.dart';
|
||||||
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
|
|
||||||
|
class MassSendReceiverCell extends StatelessWidget {
|
||||||
|
final int currentIndex;
|
||||||
|
LockUserData userData;
|
||||||
|
final VoidCallback clickDeleteUser;
|
||||||
|
|
||||||
|
MassSendReceiverCell(int index,
|
||||||
|
{Key? key,
|
||||||
|
required this.currentIndex,
|
||||||
|
required this.userData,
|
||||||
|
required this.clickDeleteUser})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
TextEditingController emailOrPhoneController = TextEditingController();
|
||||||
|
TextEditingController keyNameController = TextEditingController();
|
||||||
|
|
||||||
|
return Container(
|
||||||
|
color: Colors.white,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
child: SizedBox(
|
||||||
|
width: 40.w,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 10.w,
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
'images/icon_massSend_delete.png',
|
||||||
|
width: 26.w,
|
||||||
|
height: 26.w,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
clickDeleteUser();
|
||||||
|
// _lockUserList.removeAt(index - 1);
|
||||||
|
// setState(() {});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
CommonItem(
|
||||||
|
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||||
|
rightTitle: userData.userid ?? ' ',
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveRightWidget: true,
|
||||||
|
rightWidget: getTFWidget(
|
||||||
|
true,
|
||||||
|
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||||
|
1,
|
||||||
|
userData)),
|
||||||
|
CommonItem(
|
||||||
|
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||||
|
rightTitle: userData.nickname ?? ' ',
|
||||||
|
isHaveRightWidget: true,
|
||||||
|
rightWidget: getTFWidget(
|
||||||
|
false,
|
||||||
|
TranslationLoader.lanKeys!.enterYourName!.tr,
|
||||||
|
2,
|
||||||
|
userData)),
|
||||||
|
],
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
TextEditingController _receiverController(String getStr) {
|
||||||
|
TextEditingController controller = TextEditingController(text: getStr);
|
||||||
|
controller.addListener(() {
|
||||||
|
print(controller.text);
|
||||||
|
});
|
||||||
|
|
||||||
|
return controller;
|
||||||
|
}
|
||||||
|
|
||||||
|
TextEditingController _nickNameController(String getStr) {
|
||||||
|
TextEditingController controller = TextEditingController(text: getStr);
|
||||||
|
controller.addListener(() {
|
||||||
|
print(controller.text);
|
||||||
|
});
|
||||||
|
|
||||||
|
return controller;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 接受者信息输入框
|
||||||
|
Widget getTFWidget(
|
||||||
|
bool isHaveBtn, String tfStr, int lineIndex, LockUserData userData) {
|
||||||
|
return SizedBox(
|
||||||
|
height: 50.h,
|
||||||
|
width: 320.w,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: TextField(
|
||||||
|
controller: lineIndex == 1
|
||||||
|
? _receiverController(userData.userid ?? '')
|
||||||
|
: _nickNameController(userData.nickname ?? ''),
|
||||||
|
//输入框一行
|
||||||
|
maxLines: 1,
|
||||||
|
autofocus: false,
|
||||||
|
textAlign: TextAlign.end,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
//输入里面输入文字内边距设置
|
||||||
|
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
||||||
|
hintText: tfStr,
|
||||||
|
hintStyle: TextStyle(fontSize: 22.sp),
|
||||||
|
//不需要输入框下划线
|
||||||
|
border: InputBorder.none,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 10.w,
|
||||||
|
),
|
||||||
|
isHaveBtn
|
||||||
|
? Container(
|
||||||
|
width: 32.w,
|
||||||
|
height: 32.w,
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage('images/icon_addressBook.png'),
|
||||||
|
fit: BoxFit.fill),
|
||||||
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () async {
|
||||||
|
// Contact? currentContact =
|
||||||
|
// await _contactPicker.selectContact();
|
||||||
|
// setState(() {
|
||||||
|
// _contact = currentContact!;
|
||||||
|
// // print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Container()
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,7 +3,8 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
import 'package:get/utils.dart';
|
import 'package:get/utils.dart';
|
||||||
import 'package:star_lock/appRouters.dart';
|
import 'package:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/app_settings/app_colors.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/lockUserListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserListEntity.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiverCell.dart';
|
||||||
import 'package:star_lock/tools/commonItem.dart';
|
import 'package:star_lock/tools/commonItem.dart';
|
||||||
import 'package:star_lock/translations/trans_lib.dart';
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
|
|
||||||
@ -49,6 +50,19 @@ class _MassSendReceiverPageState extends State<MassSendReceiverPage> {
|
|||||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.white),
|
icon: const Icon(Icons.arrow_back_ios, color: Colors.white),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
),
|
),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
child: Text(
|
||||||
|
TranslationLoader.lanKeys!.save!.tr,
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Map<String, dynamic> resultMap = {};
|
||||||
|
resultMap['lockUserList'] = _lockUserList;
|
||||||
|
Navigator.pop(context, resultMap);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
@ -83,6 +97,9 @@ class _MassSendReceiverPageState extends State<MassSendReceiverPage> {
|
|||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
LockUserData data = _lockUserList[index];
|
LockUserData data = _lockUserList[index];
|
||||||
|
emailOrPhoneController.text = data.userid ?? '';
|
||||||
|
keyNameController.text = data.nickname ?? '';
|
||||||
|
|
||||||
return _itemBuilder(index, data);
|
return _itemBuilder(index, data);
|
||||||
},
|
},
|
||||||
itemCount: _lockUserList.length,
|
itemCount: _lockUserList.length,
|
||||||
@ -149,110 +166,14 @@ class _MassSendReceiverPageState extends State<MassSendReceiverPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _itemBuilder(int index, LockUserData userData) {
|
Widget _itemBuilder(int index, LockUserData userData) {
|
||||||
return Container(
|
return MassSendReceiverCell(
|
||||||
color: Colors.white,
|
index,
|
||||||
child: Row(
|
currentIndex: index,
|
||||||
children: [
|
userData: userData,
|
||||||
GestureDetector(
|
clickDeleteUser: () {
|
||||||
child: SizedBox(
|
_lockUserList.removeAt(index - 1);
|
||||||
width: 40.w,
|
setState(() {});
|
||||||
child: Row(
|
},
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
width: 10.w,
|
|
||||||
),
|
|
||||||
Image.asset(
|
|
||||||
'images/icon_massSend_delete.png',
|
|
||||||
width: 26.w,
|
|
||||||
height: 26.w,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
onTap: () {
|
|
||||||
_lockUserList.removeAt(index - 1);
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
CommonItem(
|
|
||||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
|
||||||
rightTitle: userData.userid ?? ' ',
|
|
||||||
isHaveLine: true,
|
|
||||||
isHaveRightWidget: true,
|
|
||||||
rightWidget: getTFWidget(
|
|
||||||
true,
|
|
||||||
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
|
||||||
1)),
|
|
||||||
CommonItem(
|
|
||||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
|
||||||
rightTitle: userData.nickname ?? ' ',
|
|
||||||
isHaveRightWidget: true,
|
|
||||||
rightWidget: getTFWidget(
|
|
||||||
false, TranslationLoader.lanKeys!.enterYourName!.tr, 2)),
|
|
||||||
],
|
|
||||||
))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 接受者信息输入框
|
|
||||||
Widget getTFWidget(bool isHaveBtn, String tfStr, int lineIndex) {
|
|
||||||
return SizedBox(
|
|
||||||
height: 50.h,
|
|
||||||
width: 320.w,
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: TextField(
|
|
||||||
controller:
|
|
||||||
lineIndex == 1 ? emailOrPhoneController : keyNameController,
|
|
||||||
//输入框一行
|
|
||||||
maxLines: 1,
|
|
||||||
// controller: _controller,
|
|
||||||
autofocus: false,
|
|
||||||
textAlign: TextAlign.end,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
//输入里面输入文字内边距设置
|
|
||||||
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
|
||||||
hintText: tfStr,
|
|
||||||
hintStyle: TextStyle(fontSize: 22.sp),
|
|
||||||
//不需要输入框下划线
|
|
||||||
border: InputBorder.none,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 10.w,
|
|
||||||
),
|
|
||||||
isHaveBtn
|
|
||||||
? Container(
|
|
||||||
width: 32.w,
|
|
||||||
height: 32.w,
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
image: DecorationImage(
|
|
||||||
image: AssetImage('images/icon_addressBook.png'),
|
|
||||||
fit: BoxFit.fill),
|
|
||||||
),
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () async {
|
|
||||||
// Contact? currentContact =
|
|
||||||
// await _contactPicker.selectContact();
|
|
||||||
// setState(() {
|
|
||||||
// _contact = currentContact!;
|
|
||||||
// // print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
|
|
||||||
// });
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: Container()
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,12 +128,21 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
leftTitel: TranslationLoader
|
leftTitel: TranslationLoader
|
||||||
.lanKeys!.adminOpenLockPassword!.tr,
|
.lanKeys!.adminOpenLockPassword!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: false,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Navigator.pushNamed(context,
|
Navigator.pushNamed(context,
|
||||||
Routers.adminOpenLockPasswordPage);
|
Routers.adminOpenLockPasswordPage);
|
||||||
}),
|
}),
|
||||||
|
CommonItem(
|
||||||
|
leftTitel:
|
||||||
|
TranslationLoader.lanKeys!.unlockQRCode!.tr,
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Get.toNamed(Routers.unlockQRCodePage);
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -65,57 +65,43 @@ class _LockSetPageState extends State<LockSetPage> {
|
|||||||
height: 10.h,
|
height: 10.h,
|
||||||
),
|
),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel:
|
leftTitel: TranslationLoader.lanKeys!.doorMagnetic!.tr,
|
||||||
TranslationLoader.lanKeys!.wirelessKeyboard!.tr,
|
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
// Get.toNamed(Routers.wirelessKeyboardPage);
|
Get.toNamed(Routers.doorMagneticPage);
|
||||||
Toast.show(msg: "功能暂未开放");
|
// Toast.show(msg: "功能暂未开放");
|
||||||
}),
|
}),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.doorMagnetic!.tr,
|
leftTitel:
|
||||||
|
TranslationLoader.lanKeys!.wirelessKeyboard!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
// Get.toNamed(Routers.doorMagneticPage);
|
Get.toNamed(Routers.wirelessKeyboardPage);
|
||||||
Toast.show(msg: "功能暂未开放");
|
// Toast.show(msg: "功能暂未开放");
|
||||||
}),
|
}),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.h,
|
height: 10.h,
|
||||||
),
|
),
|
||||||
Obx(()=> CommonItem(
|
|
||||||
leftTitel: TranslationLoader.lanKeys!.remoteUnlocking!.tr,
|
|
||||||
rightTitle: state.getKeyInfosData.value.remoteEnable == 1 ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr,
|
|
||||||
isHaveLine: true,
|
|
||||||
isHaveDirection: true,
|
|
||||||
action: () {
|
|
||||||
Get.toNamed(Routers.remoteUnlockingPage, arguments: state.getKeyInfosData.value);
|
|
||||||
})),
|
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
||||||
rightTitle: state.getKeyInfosData.value.autoLockTime! > -1 ? "${state.getKeyInfosData.value.autoLockTime!.toString()}s" : TranslationLoader.lanKeys!.closed!.tr,
|
rightTitle: state.getKeyInfosData.value.autoLockTime! > -1
|
||||||
|
? "${state.getKeyInfosData.value.autoLockTime!.toString()}s"
|
||||||
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.automaticBlockingPage, arguments: state.getKeyInfosData.value);
|
Get.toNamed(Routers.automaticBlockingPage,
|
||||||
|
arguments: state.getKeyInfosData.value);
|
||||||
})),
|
})),
|
||||||
Obx(() => CommonItem(
|
|
||||||
leftTitel:
|
|
||||||
TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
|
||||||
rightTitle: state.getKeyInfosData.value.passageMode == 1 ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr,
|
|
||||||
isHaveLine: true,
|
|
||||||
isHaveDirection: true,
|
|
||||||
action: () {
|
|
||||||
Get.toNamed(Routers.normallyOpenModePage, arguments: state.getKeyInfosData.value);
|
|
||||||
}),),
|
|
||||||
Obx(() {
|
Obx(() {
|
||||||
var titleStr = "";
|
var titleStr = "";
|
||||||
if(state.getKeyInfosData.value.lockSound == 1){
|
if (state.getKeyInfosData.value.lockSound == 1) {
|
||||||
switch(state.getKeyInfosData.value.volume){
|
switch (state.getKeyInfosData.value.volume) {
|
||||||
case 1:
|
case 1:
|
||||||
titleStr = TranslationLoader.lanKeys!.low!.tr;
|
titleStr = TranslationLoader.lanKeys!.low!.tr;
|
||||||
break;
|
break;
|
||||||
@ -132,7 +118,7 @@ class _LockSetPageState extends State<LockSetPage> {
|
|||||||
titleStr = TranslationLoader.lanKeys!.higher!.tr;
|
titleStr = TranslationLoader.lanKeys!.higher!.tr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
titleStr = TranslationLoader.lanKeys!.closed!.tr;
|
titleStr = TranslationLoader.lanKeys!.closed!.tr;
|
||||||
}
|
}
|
||||||
return CommonItem(
|
return CommonItem(
|
||||||
@ -141,51 +127,113 @@ class _LockSetPageState extends State<LockSetPage> {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.lockSoundSetPage, arguments: state.getKeyInfosData.value);
|
Get.toNamed(Routers.lockSoundSetPage,
|
||||||
|
arguments: state.getKeyInfosData.value);
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.burglarAlarm!.tr,
|
leftTitel: TranslationLoader.lanKeys!.burglarAlarm!.tr,
|
||||||
rightTitle: state.getKeyInfosData.value.tamperAlert == 1 ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr,
|
rightTitle: state.getKeyInfosData.value.tamperAlert == 1
|
||||||
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.burglarAlarmPage, arguments: state.getKeyInfosData.value);
|
Get.toNamed(Routers.burglarAlarmPage,
|
||||||
|
arguments: state.getKeyInfosData.value);
|
||||||
|
})),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.h,
|
||||||
|
),
|
||||||
|
Obx(
|
||||||
|
() => CommonItem(
|
||||||
|
leftTitel:
|
||||||
|
TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
||||||
|
rightTitle: state.getKeyInfosData.value.passageMode == 1
|
||||||
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Get.toNamed(Routers.normallyOpenModePage,
|
||||||
|
arguments: state.getKeyInfosData.value);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
Obx(() => CommonItem(
|
||||||
|
leftTitel: TranslationLoader.lanKeys!.remoteUnlocking!.tr,
|
||||||
|
rightTitle: state.getKeyInfosData.value.remoteEnable == 1
|
||||||
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Get.toNamed(Routers.remoteUnlockingPage,
|
||||||
|
arguments: state.getKeyInfosData.value);
|
||||||
})),
|
})),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.resetButton!.tr,
|
leftTitel: TranslationLoader.lanKeys!.resetButton!.tr,
|
||||||
rightTitle: state.getKeyInfosData.value.resetButton == 1 ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr,
|
rightTitle: state.getKeyInfosData.value.resetButton == 1
|
||||||
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.resetButtonPage, arguments: state.getKeyInfosData.value);
|
Get.toNamed(Routers.resetButtonPage,
|
||||||
|
arguments: state.getKeyInfosData.value);
|
||||||
})),
|
})),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.h,
|
||||||
|
),
|
||||||
|
Obx(() {
|
||||||
|
var title = "";
|
||||||
|
if (state.getKeyInfosData.value.roomStatus == 1) {
|
||||||
|
title = TranslationLoader.lanKeys!.checkedIn!.tr;
|
||||||
|
} else if (state.getKeyInfosData.value.roomStatus == 2) {
|
||||||
|
title = TranslationLoader.lanKeys!.leisure!.tr;
|
||||||
|
}
|
||||||
|
return CommonItem(
|
||||||
|
leftTitel:
|
||||||
|
TranslationLoader.lanKeys!.markedHouseState!.tr,
|
||||||
|
rightTitle: title,
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {
|
||||||
|
Get.toNamed(Routers.markedHouseStatePage,
|
||||||
|
arguments: state.getKeyInfosData.value);
|
||||||
|
});
|
||||||
|
}),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.unlockQRCode!.tr,
|
leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveRightWidget: true,
|
||||||
action: () {
|
rightWidget: SizedBox(width: 60.w, child: _switch())),
|
||||||
Get.toNamed(Routers.unlockQRCodePage);
|
|
||||||
}),
|
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.wifiDistributionNetwork!.tr,
|
leftTitel: TranslationLoader.lanKeys!.unlockReminder!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
|
isHaveRightWidget: true,
|
||||||
|
rightWidget: SizedBox(width: 60.w, child: _switch())),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.h,
|
||||||
|
),
|
||||||
|
CommonItem(
|
||||||
|
leftTitel: TranslationLoader
|
||||||
|
.lanKeys!.wifiDistributionNetwork!.tr,
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.configuringWifiPage);
|
Get.toNamed(Routers.configuringWifiPage);
|
||||||
}),
|
}),
|
||||||
SizedBox(
|
|
||||||
height: 10.h,
|
|
||||||
),
|
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.lockTime!.tr,
|
leftTitel: TranslationLoader.lanKeys!.lockTime!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.lockTimePage, arguments: state.getKeyInfosData.value);
|
Get.toNamed(Routers.lockTimePage,
|
||||||
|
arguments: state.getKeyInfosData.value);
|
||||||
}),
|
}),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.diagnose!.tr,
|
leftTitel: TranslationLoader.lanKeys!.diagnose!.tr,
|
||||||
@ -220,53 +268,6 @@ class _LockSetPageState extends State<LockSetPage> {
|
|||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.lockEscalationPage);
|
Get.toNamed(Routers.lockEscalationPage);
|
||||||
}),
|
}),
|
||||||
SizedBox(
|
|
||||||
height: 10.h,
|
|
||||||
),
|
|
||||||
CommonItem(
|
|
||||||
leftTitel: "Amazon Alexa",
|
|
||||||
rightTitle: "",
|
|
||||||
isHaveLine: true,
|
|
||||||
isHaveDirection: true,
|
|
||||||
action: () {}),
|
|
||||||
CommonItem(
|
|
||||||
leftTitel: "Google Home",
|
|
||||||
rightTitle: "",
|
|
||||||
isHaveLine: true,
|
|
||||||
isHaveDirection: true,
|
|
||||||
action: () {}),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.h,
|
|
||||||
),
|
|
||||||
Obx((){
|
|
||||||
var title = "";
|
|
||||||
if(state.getKeyInfosData.value.roomStatus == 1){
|
|
||||||
title = TranslationLoader.lanKeys!.checkedIn!.tr;
|
|
||||||
}else if(state.getKeyInfosData.value.roomStatus == 2){
|
|
||||||
title = TranslationLoader.lanKeys!.leisure!.tr;
|
|
||||||
}
|
|
||||||
return CommonItem(
|
|
||||||
leftTitel:
|
|
||||||
TranslationLoader.lanKeys!.markedHouseState!.tr,
|
|
||||||
rightTitle: title,
|
|
||||||
isHaveLine: true,
|
|
||||||
isHaveDirection: true,
|
|
||||||
action: () {
|
|
||||||
Get.toNamed(Routers.markedHouseStatePage, arguments: state.getKeyInfosData.value);
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
CommonItem(
|
|
||||||
leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr,
|
|
||||||
rightTitle: "",
|
|
||||||
isHaveLine: true,
|
|
||||||
isHaveRightWidget: true,
|
|
||||||
rightWidget: SizedBox(width: 60.w, child: _switch())),
|
|
||||||
CommonItem(
|
|
||||||
leftTitel: TranslationLoader.lanKeys!.unlockReminder!.tr,
|
|
||||||
rightTitle: "",
|
|
||||||
isHaveLine: false,
|
|
||||||
isHaveRightWidget: true,
|
|
||||||
rightWidget: SizedBox(width: 60.w, child: _switch())),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 30.h,
|
height: 30.h,
|
||||||
),
|
),
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class _UnlockQRCodePageState extends State<UnlockQRCodePage> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: TranslationLoader.lanKeys!.burglarAlarm!.tr,
|
barTitle: TranslationLoader.lanKeys!.unlockQRCode!.tr,
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: Column(
|
body: Column(
|
||||||
|
|||||||
@ -56,7 +56,8 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
|||||||
Storage.setStringList(saveBluePrivateKey, savePrivateKeyList);
|
Storage.setStringList(saveBluePrivateKey, savePrivateKeyList);
|
||||||
|
|
||||||
// signKey
|
// signKey
|
||||||
List<int> signKeyData = state.keyInfos.value.bluetooth!.signKey!.cast<int>();
|
List<int> signKeyData =
|
||||||
|
state.keyInfos.value.bluetooth!.signKey!.cast<int>();
|
||||||
var saveSignKeyList = changeIntListToStringList(signKeyData);
|
var saveSignKeyList = changeIntListToStringList(signKeyData);
|
||||||
Storage.setStringList(saveBlueSignKey, saveSignKeyList);
|
Storage.setStringList(saveBlueSignKey, saveSignKeyList);
|
||||||
// print("publicKeyData:$publicKeyData saveStrList:$saveStrList privateKeyData:$privateKeyData savePrivateKeyList:$savePrivateKeyList");
|
// print("publicKeyData:$publicKeyData saveStrList:$saveStrList privateKeyData:$privateKeyData savePrivateKeyList:$savePrivateKeyList");
|
||||||
@ -129,7 +130,8 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
|||||||
width: 268.w, height: 268.w),
|
width: 268.w, height: 268.w),
|
||||||
)),
|
)),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: state.keyInfos.value.remoteEnable == 1 ? true: false,
|
visible:
|
||||||
|
state.keyInfos.value.remoteEnable == 1 ? true : false,
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: const Alignment(0.6, 1),
|
alignment: const Alignment(0.6, 1),
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
@ -174,92 +176,99 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
|||||||
// color: Colors.blue,
|
// color: Colors.blue,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
child: GridView.count(
|
child: GridView.count(
|
||||||
crossAxisCount: 4,
|
crossAxisCount: 4,
|
||||||
// childAspectRatio: 3,
|
// childAspectRatio: 3,
|
||||||
crossAxisSpacing: 20.w,
|
crossAxisSpacing: 20.w,
|
||||||
mainAxisSpacing: 0.h,
|
mainAxisSpacing: 0.h,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
children: getShowWidget()
|
children: getShowWidget()),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> getShowWidget(){
|
List<Widget> getShowWidget() {
|
||||||
var showWidgetArr = <Widget>[];
|
var showWidgetArr = <Widget>[];
|
||||||
|
|
||||||
// 考勤
|
// 考勤
|
||||||
showWidgetArr.add(bottomItem('images/main/icon_main_clockingIn.png',
|
showWidgetArr.add(bottomItem('images/main/icon_main_clockingIn.png',
|
||||||
TranslationLoader.lanKeys!.checkingIn!.tr, () {
|
TranslationLoader.lanKeys!.checkingIn!.tr, () {
|
||||||
Get.toNamed( Routers.checkingInListPage);
|
Get.toNamed(Routers.checkingInListPage);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var defaultWidgetArr = [
|
var defaultWidgetArr = [
|
||||||
// 电子钥匙
|
// 电子钥匙
|
||||||
bottomItem('images/main/icon_main_electronicKey.png', TranslationLoader.lanKeys!.electronicKey!.tr, () {
|
bottomItem('images/main/icon_main_electronicKey.png',
|
||||||
|
TranslationLoader.lanKeys!.electronicKey!.tr, () {
|
||||||
Get.toNamed(Routers.electronicKeyListPage, arguments: {
|
Get.toNamed(Routers.electronicKeyListPage, arguments: {
|
||||||
"lockMainEntity": widget.lockMainEntity,
|
"lockMainEntity": widget.lockMainEntity,
|
||||||
"keyInfo": widget.keyInfo
|
"keyInfo": widget.keyInfo
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
// 密码
|
// 密码
|
||||||
bottomItem('images/main/icon_main_password.png', TranslationLoader.lanKeys!.password!.tr, () {
|
bottomItem('images/main/icon_main_password.png',
|
||||||
Get.toNamed(Routers.passwordKeyListPage,
|
TranslationLoader.lanKeys!.password!.tr, () {
|
||||||
arguments: {
|
Get.toNamed(Routers.passwordKeyListPage, arguments: {
|
||||||
"lockMainEntity": widget.lockMainEntity,
|
"lockMainEntity": widget.lockMainEntity,
|
||||||
"keyInfo": widget.keyInfo
|
"keyInfo": widget.keyInfo
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
// ic卡
|
// ic卡
|
||||||
bottomItem('images/main/icon_main_icCard.png', TranslationLoader.lanKeys!.card!.tr, () {
|
bottomItem('images/main/icon_main_icCard.png',
|
||||||
Get.toNamed(Routers.otherTypeKeyListPage,
|
TranslationLoader.lanKeys!.card!.tr, () {
|
||||||
arguments: 0);
|
Get.toNamed(Routers.otherTypeKeyListPage, arguments: 0);
|
||||||
}),
|
}),
|
||||||
// 指纹
|
// 指纹
|
||||||
bottomItem('images/main/icon_main_fingerprint.png', TranslationLoader.lanKeys!.fingerprint!.tr, () {
|
bottomItem('images/main/icon_main_fingerprint.png',
|
||||||
Get.toNamed(Routers.otherTypeKeyListPage,
|
TranslationLoader.lanKeys!.fingerprint!.tr, () {
|
||||||
arguments: 1);
|
Get.toNamed(Routers.otherTypeKeyListPage, arguments: 1);
|
||||||
}),
|
}),
|
||||||
// 遥控
|
// 遥控
|
||||||
bottomItem('images/main/icon_main_remoteControl.png', TranslationLoader.lanKeys!.remoteControl!.tr, () {
|
bottomItem('images/main/icon_main_remoteControl.png',
|
||||||
Get.toNamed(Routers.otherTypeKeyListPage,
|
TranslationLoader.lanKeys!.remoteControl!.tr, () {
|
||||||
arguments: 2);
|
Get.toNamed(Routers.otherTypeKeyListPage, arguments: 2);
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
showWidgetArr.addAll(defaultWidgetArr);
|
showWidgetArr.addAll(defaultWidgetArr);
|
||||||
|
|
||||||
//可视对讲门锁新增->人脸
|
//可视对讲门锁新增->人脸
|
||||||
showWidgetArr.add(bottomItem('images/main/icon_main_fingerprint.png', '人脸', () {
|
showWidgetArr.add(
|
||||||
// Navigator.pushNamed(context, Routers.otherTypeKeyListPage,
|
bottomItem('images/main/icon_face.png', '人脸', () {
|
||||||
// arguments: 1);
|
// Navigator.pushNamed(context, Routers.otherTypeKeyListPage,
|
||||||
}),);
|
// arguments: 1);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
//可视对讲门锁新增->监控
|
//可视对讲门锁新增->监控
|
||||||
showWidgetArr.add(bottomItem('images/main/icon_main_fingerprint.png', '监控', () {
|
showWidgetArr.add(
|
||||||
// Navigator.pushNamed(context, Routers.otherTypeKeyListPage,
|
bottomItem('images/main/icon_catEyes.png', '监控', () {
|
||||||
// arguments: 1);
|
// Navigator.pushNamed(context, Routers.otherTypeKeyListPage,
|
||||||
}),);
|
// arguments: 1);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
var endWiddget = [
|
var endWiddget = [
|
||||||
// 授权管理员
|
// 授权管理员
|
||||||
bottomItem('images/main/icon_main_authorizedAdmin.png', TranslationLoader.lanKeys!.authorizedAdmin!.tr, () {
|
bottomItem('images/main/icon_main_authorizedAdmin.png',
|
||||||
Get.toNamed(Routers.authorizedAdminListPage, arguments: {
|
TranslationLoader.lanKeys!.authorizedAdmin!.tr, () {
|
||||||
"lockMainEntity": widget.lockMainEntity,
|
Get.toNamed(Routers.authorizedAdminListPage, arguments: {
|
||||||
"keyInfo": widget.keyInfo
|
"lockMainEntity": widget.lockMainEntity,
|
||||||
});
|
"keyInfo": widget.keyInfo
|
||||||
}),
|
});
|
||||||
|
}),
|
||||||
// 操作记录
|
// 操作记录
|
||||||
bottomItem('images/main/icon_main_operatingRecord.png', TranslationLoader.lanKeys!.operatingRecord!.tr, () {
|
bottomItem('images/main/icon_main_operatingRecord.png',
|
||||||
Get.toNamed(Routers.lockOperatingRecordPage,
|
TranslationLoader.lanKeys!.operatingRecord!.tr, () {
|
||||||
arguments: {
|
Get.toNamed(Routers.lockOperatingRecordPage, arguments: {
|
||||||
"lockMainEntity": widget.lockMainEntity,
|
"lockMainEntity": widget.lockMainEntity,
|
||||||
"keyInfo": widget.keyInfo
|
"keyInfo": widget.keyInfo
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
// 设置
|
// 设置
|
||||||
bottomItem('images/main/icon_main_set.png', TranslationLoader.lanKeys!.set!.tr, () {
|
bottomItem(
|
||||||
Get.toNamed(Routers.lockSetPage, arguments: widget.keyInfo);
|
'images/main/icon_main_set.png', TranslationLoader.lanKeys!.set!.tr,
|
||||||
}),
|
() {
|
||||||
|
Get.toNamed(Routers.lockSetPage, arguments: widget.keyInfo);
|
||||||
|
}),
|
||||||
];
|
];
|
||||||
showWidgetArr.addAll(endWiddget);
|
showWidgetArr.addAll(endWiddget);
|
||||||
return showWidgetArr;
|
return showWidgetArr;
|
||||||
|
|||||||
@ -86,8 +86,8 @@ class _PasswordKeyManageTabbarPageState
|
|||||||
Tab _tab(ItemView item) {
|
Tab _tab(ItemView item) {
|
||||||
return Tab(
|
return Tab(
|
||||||
// text: item.title,
|
// text: item.title,
|
||||||
child: Container(
|
child: SizedBox(
|
||||||
width: 1.sw / 8,
|
width: item.title.length > 2 ? 1.sw / 8 : 1.sw / 12,
|
||||||
// margin: EdgeInsets.all(10.w),
|
// margin: EdgeInsets.all(10.w),
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|||||||
@ -41,7 +41,7 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
|||||||
TranslationLoader.lanKeys!.doorLock!.tr, () {
|
TranslationLoader.lanKeys!.doorLock!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
}),
|
}),
|
||||||
lockTypeItem('images/lockType/lockType_doorLock.png',
|
lockTypeItem('images/lockType/lockType_NFCLock.png',
|
||||||
TranslationLoader.lanKeys!.NFCPassiveLock!.tr, () {
|
TranslationLoader.lanKeys!.NFCPassiveLock!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
}),
|
}),
|
||||||
@ -57,8 +57,7 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
|||||||
TranslationLoader.lanKeys!.parkingLock!.tr, () {
|
TranslationLoader.lanKeys!.parkingLock!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
}),
|
}),
|
||||||
lockTypeItem(
|
lockTypeItem('images/lockType/lockType_entranceGuardLock.png',
|
||||||
'images/lockType/lockType_intelligentLockCore.png',
|
|
||||||
TranslationLoader.lanKeys!.itelligentAccessControl!.tr,
|
TranslationLoader.lanKeys!.itelligentAccessControl!.tr,
|
||||||
() {
|
() {
|
||||||
Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
@ -68,7 +67,7 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
|||||||
// TranslationLoader.lanKeys!.bicycleLock!.tr, () {
|
// TranslationLoader.lanKeys!.bicycleLock!.tr, () {
|
||||||
// Navigator.pushNamed(context, Routers.addLockPage);
|
// Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
// }),
|
// }),
|
||||||
lockTypeItem('images/lockType/lockType_remoteControl.png',
|
lockTypeItem('images/lockType/lockType_gatewayLock.png',
|
||||||
TranslationLoader.lanKeys!.gateway!.tr, () {
|
TranslationLoader.lanKeys!.gateway!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.gatewayListPage);
|
Navigator.pushNamed(context, Routers.gatewayListPage);
|
||||||
}),
|
}),
|
||||||
@ -138,8 +137,8 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
|||||||
SizedBox(width: 30.w),
|
SizedBox(width: 30.w),
|
||||||
Image.asset(
|
Image.asset(
|
||||||
lockTypeIcon,
|
lockTypeIcon,
|
||||||
width: 32.w,
|
width: 48.w,
|
||||||
height: 48.w,
|
height: 60.w,
|
||||||
),
|
),
|
||||||
SizedBox(width: 20.w),
|
SizedBox(width: 20.w),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
@ -17,32 +17,62 @@ class MineMultiLanguagePage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _MineMultiLanguagePageState extends State<MineMultiLanguagePage> {
|
class _MineMultiLanguagePageState extends State<MineMultiLanguagePage> {
|
||||||
|
|
||||||
final logic = Get.put(MineMultiLanguageLogic());
|
final logic = Get.put(MineMultiLanguageLogic());
|
||||||
final state = Get.find<MineMultiLanguageLogic>().state;
|
final state = Get.find<MineMultiLanguageLogic>().state;
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.multilingual!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
appBar: TitleAppBar(
|
||||||
body: Column(
|
barTitle: TranslationLoader.lanKeys!.multilingual!.tr,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
haveBack: true,
|
||||||
mainAxisSize: MainAxisSize.min,
|
backgroundColor: AppColors.mainColor),
|
||||||
children: _children(),
|
body: Column(
|
||||||
)
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
);
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: _children(),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _children(){
|
List<Widget> _children() {
|
||||||
List<Widget> l = [];
|
List<Widget> l = [];
|
||||||
for(int i = 0; i < state.languages.length; i++){
|
l.add(
|
||||||
|
CommonItem(
|
||||||
|
leftTitel: '跟随系统',
|
||||||
|
rightTitle: "",
|
||||||
|
allHeight: 90.h,
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveDirection: false,
|
||||||
|
isHaveRightWidget: true,
|
||||||
|
rightWidget: Container(),
|
||||||
|
action: () {
|
||||||
|
// logic.changeLanguage(e);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
for (int i = 0; i < state.languages.length; i++) {
|
||||||
var e = state.languages[i];
|
var e = state.languages[i];
|
||||||
var lanType = ExtensionLanguageType.fromLanguageCode(e.languageCode);
|
var lanType = ExtensionLanguageType.fromLanguageCode(e.languageCode);
|
||||||
l.add(CommonItem(leftTitel:lanType.lanTitle, rightTitle:"", allHeight: 90.h, isHaveLine: true, isHaveDirection:false, isHaveRightWidget: true, rightWidget: Obx(() => state.currentLanguageType.value == lanType ? Image(image: const AssetImage("images/icon_item_checked.png"),width:30.w,height:30.w, fit: BoxFit.contain,): Container()), action: (){
|
l.add(
|
||||||
logic.changeLanguage(e);
|
CommonItem(
|
||||||
}),);
|
leftTitel: lanType.lanTitle,
|
||||||
|
rightTitle: "",
|
||||||
|
allHeight: 90.h,
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveDirection: false,
|
||||||
|
isHaveRightWidget: true,
|
||||||
|
rightWidget: Obx(() => state.currentLanguageType.value == lanType
|
||||||
|
? Image(
|
||||||
|
image: const AssetImage("images/icon_item_checked.png"),
|
||||||
|
width: 30.w,
|
||||||
|
height: 30.w,
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
)
|
||||||
|
: Container()),
|
||||||
|
action: () {
|
||||||
|
logic.changeLanguage(e);
|
||||||
|
}),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -153,6 +153,21 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
Navigator.pushNamed(context,
|
Navigator.pushNamed(context,
|
||||||
Routers.aPPUnlockNeedMobileNetworkingLockPage);
|
Routers.aPPUnlockNeedMobileNetworkingLockPage);
|
||||||
}),
|
}),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.h,
|
||||||
|
),
|
||||||
|
CommonItem(
|
||||||
|
leftTitel: "Amazon Alexa",
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {}),
|
||||||
|
CommonItem(
|
||||||
|
leftTitel: "Google Home",
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveDirection: true,
|
||||||
|
action: () {}),
|
||||||
// CommonItem(leftTitel:TranslationLoader.lanKeys!.valueAddedServices!.tr, rightTitle:"", isHaveDirection: true, action: (){
|
// CommonItem(leftTitel:TranslationLoader.lanKeys!.valueAddedServices!.tr, rightTitle:"", isHaveDirection: true, action: (){
|
||||||
//
|
//
|
||||||
// }),
|
// }),
|
||||||
|
|||||||
@ -46,7 +46,8 @@ abstract class Api {
|
|||||||
final String getWifiServiceIpURL = '/wifiLock/getWifiServiceIp'; // 获取Wifi锁服务器
|
final String getWifiServiceIpURL = '/wifiLock/getWifiServiceIp'; // 获取Wifi锁服务器
|
||||||
final String updateSpecialValueUrl = '/room/updateSpecialValue'; // 开启/关闭 远程开锁
|
final String updateSpecialValueUrl = '/room/updateSpecialValue'; // 开启/关闭 远程开锁
|
||||||
final String setAutoLockTimeUrl = '/room/setAutoLockTime'; // 自动闭锁
|
final String setAutoLockTimeUrl = '/room/setAutoLockTime'; // 自动闭锁
|
||||||
final String getPassageModeConfigUrl = '/room/getPassageModeConfig'; // 获取锁的常开模式设置
|
final String getPassageModeConfigUrl =
|
||||||
|
'/room/getPassageModeConfig'; // 获取锁的常开模式设置
|
||||||
final String configPassageModeUrl = '/room/configPassageMode'; // 配置锁的常开模式
|
final String configPassageModeUrl = '/room/configPassageMode'; // 配置锁的常开模式
|
||||||
final String updateSettingUrl = '/room/updateSetting'; // 锁声音/防撬报警/重置键/考勤
|
final String updateSettingUrl = '/room/updateSetting'; // 锁声音/防撬报警/重置键/考勤
|
||||||
final String roomQueryDateUrl = '/room/queryDate'; // 获取网关时间
|
final String roomQueryDateUrl = '/room/queryDate'; // 获取网关时间
|
||||||
@ -56,5 +57,4 @@ abstract class Api {
|
|||||||
final String lockUserListURL = '/keyUser/listKeyUser'; //锁用户列表
|
final String lockUserListURL = '/keyUser/listKeyUser'; //锁用户列表
|
||||||
final String canSendKeyURL = '/keyUser/canSendKey'; //群发钥匙检查
|
final String canSendKeyURL = '/keyUser/canSendKey'; //群发钥匙检查
|
||||||
final String batchSendKeyURL = '/key/batchSend'; //批处理群发钥匙
|
final String batchSendKeyURL = '/key/batchSend'; //批处理群发钥匙
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -297,10 +297,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 获取Wifi锁服务器
|
// 获取Wifi锁服务器
|
||||||
Future<Response> getWifiLockServiceIpAndPort() => post(
|
Future<Response> getWifiLockServiceIpAndPort() =>
|
||||||
getWifiServiceIpURL.toUrl,
|
post(getWifiServiceIpURL.toUrl, jsonEncode({}));
|
||||||
jsonEncode({
|
|
||||||
}));
|
|
||||||
|
|
||||||
Future<Response> passwordKeyList(
|
Future<Response> passwordKeyList(
|
||||||
String keyStatus,
|
String keyStatus,
|
||||||
@ -428,10 +426,10 @@ class ApiProvider extends BaseProvider {
|
|||||||
lockListByGroupURL.toUrl,
|
lockListByGroupURL.toUrl,
|
||||||
jsonEncode({'type': type, 'keyGroupId': keyGroupId}));
|
jsonEncode({'type': type, 'keyGroupId': keyGroupId}));
|
||||||
|
|
||||||
|
/// 锁设置模块
|
||||||
/// 锁设置模块
|
|
||||||
// 远程开锁
|
// 远程开锁
|
||||||
Future<Response> remoteUnlockingOpenOrCloseLoadData(String lockId, String featureValue) =>
|
Future<Response> remoteUnlockingOpenOrCloseLoadData(
|
||||||
|
String lockId, String featureValue) =>
|
||||||
post(
|
post(
|
||||||
updateSpecialValueUrl.toUrl,
|
updateSpecialValueUrl.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -440,7 +438,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 自动闭锁
|
// 自动闭锁
|
||||||
Future<Response> setAutoUnlockLoadData(String lockId, String autoLockTime, String type) =>
|
Future<Response> setAutoUnlockLoadData(
|
||||||
|
String lockId, String autoLockTime, String type) =>
|
||||||
post(
|
post(
|
||||||
setAutoLockTimeUrl.toUrl,
|
setAutoLockTimeUrl.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -450,15 +449,22 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 获取锁的常开模式设置
|
// 获取锁的常开模式设置
|
||||||
Future<Response> getPassageModeConfigLoadData(String lockId) =>
|
Future<Response> getPassageModeConfigLoadData(String lockId) => post(
|
||||||
post(
|
getPassageModeConfigUrl.toUrl,
|
||||||
getPassageModeConfigUrl.toUrl,
|
jsonEncode({
|
||||||
jsonEncode({
|
'lockId': lockId,
|
||||||
'lockId': lockId,
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
// 获取锁的常开模式设置
|
// 获取锁的常开模式设置
|
||||||
Future<Response> configPassageMode(String lockId, String passageMode, String autoUnlock, String type, String startDate, String endDate, String isAllDay, List weekDays) =>
|
Future<Response> configPassageMode(
|
||||||
|
String lockId,
|
||||||
|
String passageMode,
|
||||||
|
String autoUnlock,
|
||||||
|
String type,
|
||||||
|
String startDate,
|
||||||
|
String endDate,
|
||||||
|
String isAllDay,
|
||||||
|
List weekDays) =>
|
||||||
post(
|
post(
|
||||||
configPassageModeUrl.toUrl,
|
configPassageModeUrl.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -473,7 +479,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 获取锁的常开模式设置
|
// 获取锁的常开模式设置
|
||||||
Future<Response> setLockSetGeneralSetting(String lockId, String changeType, String isOn, String type) =>
|
Future<Response> setLockSetGeneralSetting(
|
||||||
|
String lockId, String changeType, String isOn, String type) =>
|
||||||
post(
|
post(
|
||||||
updateSettingUrl.toUrl,
|
updateSettingUrl.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -484,27 +491,25 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// 通过网关获取锁的时间
|
// 通过网关获取锁的时间
|
||||||
Future<Response> getLockTimeFromGatewayLoadData(String lockId) =>
|
Future<Response> getLockTimeFromGatewayLoadData(String lockId) => post(
|
||||||
post(
|
roomQueryDateUrl.toUrl,
|
||||||
roomQueryDateUrl.toUrl,
|
jsonEncode({
|
||||||
jsonEncode({
|
'lockId': lockId,
|
||||||
'lockId': lockId,
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
// 获取服务器当前时间
|
// 获取服务器当前时间
|
||||||
Future<Response> getServerDatetimeLoadData(String lockId) =>
|
Future<Response> getServerDatetimeLoadData(String lockId) => post(
|
||||||
post(
|
getServerDatetimeUrl.toUrl,
|
||||||
getServerDatetimeUrl.toUrl,
|
jsonEncode({
|
||||||
jsonEncode({
|
'lockId': lockId,
|
||||||
'lockId': lockId,
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
// 获取锁版本信息
|
// 获取锁版本信息
|
||||||
Future<Response> getLockVersionInfoLoadData(String lockId) =>
|
Future<Response> getLockVersionInfoLoadData(String lockId) => post(
|
||||||
post(
|
getLockVersionInfoUrl.toUrl,
|
||||||
getLockVersionInfoUrl.toUrl,
|
jsonEncode({
|
||||||
jsonEncode({
|
'lockId': lockId,
|
||||||
'lockId': lockId,}));
|
}));
|
||||||
|
|
||||||
Future<Response> listLockByGroup(String type, String keyGroupId) => post(
|
Future<Response> listLockByGroup(String type, String keyGroupId) => post(
|
||||||
listLockByGroupURL.toUrl,
|
listLockByGroupURL.toUrl,
|
||||||
@ -532,6 +537,25 @@ class ApiProvider extends BaseProvider {
|
|||||||
'keyGroupIdList': keyGroupIdList,
|
'keyGroupIdList': keyGroupIdList,
|
||||||
'lockIdList': lockIdList
|
'lockIdList': lockIdList
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
Future<Response> batchSendKey(
|
||||||
|
String endDate,
|
||||||
|
String keyGroupIdList,
|
||||||
|
String lockIdList,
|
||||||
|
String createUser,
|
||||||
|
String isRemoteUnlock,
|
||||||
|
String keyNameForAdmin,
|
||||||
|
String receiverUsername,
|
||||||
|
String startDate,
|
||||||
|
String countryCode,
|
||||||
|
String usernameType) =>
|
||||||
|
post(
|
||||||
|
batchSendKeyURL.toUrl,
|
||||||
|
jsonEncode({
|
||||||
|
'endDate': endDate,
|
||||||
|
'keyGroupIdList': keyGroupIdList,
|
||||||
|
'lockIdList': lockIdList
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ExtensionString on String {
|
extension ExtensionString on String {
|
||||||
|
|||||||
@ -2,8 +2,8 @@ import 'package:get/get.dart';
|
|||||||
import 'package:star_lock/login/seletCountryRegion/common/countryRegionEntity.dart';
|
import 'package:star_lock/login/seletCountryRegion/common/countryRegionEntity.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecordEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecordEntity.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserListEntity.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/lockUserListEntity.dart';
|
|
||||||
import 'package:star_lock/main/lockDetail/lcokSet/basicInformation/basicInformation/KeyDetailEntity.dart';
|
import 'package:star_lock/main/lockDetail/lcokSet/basicInformation/basicInformation/KeyDetailEntity.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/LockGroupListEntity.dart';
|
import 'package:star_lock/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/LockGroupListEntity.dart';
|
||||||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart';
|
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart';
|
||||||
@ -408,105 +408,93 @@ class ApiRepository {
|
|||||||
return PasswordKeyEntity.fromJson(res.body);
|
return PasswordKeyEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 获取Wifi锁服务器
|
// 获取Wifi锁服务器
|
||||||
Future<ConfiguringWifiEntity> getWifiLockServiceIpAndPort() async {
|
Future<ConfiguringWifiEntity> getWifiLockServiceIpAndPort() async {
|
||||||
final res = await apiProvider.getWifiLockServiceIpAndPort();
|
final res = await apiProvider.getWifiLockServiceIpAndPort();
|
||||||
return ConfiguringWifiEntity.fromJson(res.body);
|
return ConfiguringWifiEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 锁设置模块
|
/// 锁设置模块
|
||||||
// 远程开锁开/关
|
// 远程开锁开/关
|
||||||
Future<LoginEntity> remoteUnlockingOpenOrClose(
|
Future<LoginEntity> remoteUnlockingOpenOrClose({
|
||||||
{
|
|
||||||
required String lockId,
|
required String lockId,
|
||||||
required String featureValue,
|
required String featureValue,
|
||||||
}) async {
|
}) async {
|
||||||
final res =
|
final res = await apiProvider.remoteUnlockingOpenOrCloseLoadData(
|
||||||
await apiProvider.remoteUnlockingOpenOrCloseLoadData(lockId, featureValue);
|
lockId, featureValue);
|
||||||
return LoginEntity.fromJson(res.body);
|
return LoginEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自动闭锁
|
// 自动闭锁
|
||||||
Future<LoginEntity> setAutoUnlock(
|
Future<LoginEntity> setAutoUnlock({
|
||||||
{
|
required String lockId,
|
||||||
required String lockId,
|
required String autoLockTime,
|
||||||
required String autoLockTime,
|
required String type,
|
||||||
required String type,
|
}) async {
|
||||||
}) async {
|
|
||||||
final res =
|
final res =
|
||||||
await apiProvider.setAutoUnlockLoadData(lockId, autoLockTime, type);
|
await apiProvider.setAutoUnlockLoadData(lockId, autoLockTime, type);
|
||||||
return LoginEntity.fromJson(res.body);
|
return LoginEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取锁的常开模式设置 configPassageMode
|
// 获取锁的常开模式设置 configPassageMode
|
||||||
Future<GetPassageModeConfigEntity> getPassageModeConfig(
|
Future<GetPassageModeConfigEntity> getPassageModeConfig({
|
||||||
{
|
required String lockId,
|
||||||
required String lockId,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.getPassageModeConfigLoadData(lockId);
|
||||||
final res =
|
|
||||||
await apiProvider.getPassageModeConfigLoadData(lockId);
|
|
||||||
return GetPassageModeConfigEntity.fromJson(res.body);
|
return GetPassageModeConfigEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 配置锁的常开模式
|
// 配置锁的常开模式
|
||||||
Future<GetPassageModeConfigEntity> configPassageModeLoadData(
|
Future<GetPassageModeConfigEntity> configPassageModeLoadData({
|
||||||
{
|
required String lockId,
|
||||||
required String lockId,
|
required String passageMode,
|
||||||
required String passageMode,
|
required String autoUnlock,
|
||||||
required String autoUnlock,
|
required String type,
|
||||||
required String type,
|
required String startDate,
|
||||||
required String startDate,
|
required String endDate,
|
||||||
required String endDate,
|
required String isAllDay,
|
||||||
required String isAllDay,
|
required List weekDays,
|
||||||
required List weekDays,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.configPassageMode(lockId, passageMode,
|
||||||
final res =
|
autoUnlock, type, startDate, endDate, isAllDay, weekDays);
|
||||||
await apiProvider.configPassageMode(lockId, passageMode, autoUnlock, type, startDate, endDate, isAllDay, weekDays);
|
|
||||||
return GetPassageModeConfigEntity.fromJson(res.body);
|
return GetPassageModeConfigEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 配置锁的常规设置
|
// 配置锁的常规设置
|
||||||
Future<LoginEntity> setLockSetGeneralSettingData(
|
Future<LoginEntity> setLockSetGeneralSettingData({
|
||||||
{
|
required String lockId,
|
||||||
required String lockId,
|
required String changeType,
|
||||||
required String changeType,
|
required String isOn,
|
||||||
required String isOn,
|
required String type,
|
||||||
required String type,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.setLockSetGeneralSetting(
|
||||||
final res =
|
lockId, changeType, isOn, type);
|
||||||
await apiProvider.setLockSetGeneralSetting(lockId, changeType, isOn, type);
|
|
||||||
return LoginEntity.fromJson(res.body);
|
return LoginEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取锁时间 通过网关
|
// 获取锁时间 通过网关
|
||||||
Future<GetPassageModeConfigEntity> getLockTimeFromGateway(
|
Future<GetPassageModeConfigEntity> getLockTimeFromGateway({
|
||||||
{
|
required String lockId,
|
||||||
required String lockId,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.getLockTimeFromGatewayLoadData(lockId);
|
||||||
final res =
|
|
||||||
await apiProvider.getLockTimeFromGatewayLoadData(lockId);
|
|
||||||
return GetPassageModeConfigEntity.fromJson(res.body);
|
return GetPassageModeConfigEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取服务器当前时间
|
// 获取服务器当前时间
|
||||||
Future<GetServerDatetimeEntity> getServerDatetimeData(
|
Future<GetServerDatetimeEntity> getServerDatetimeData({
|
||||||
{
|
required String lockId,
|
||||||
required String lockId,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.getServerDatetimeLoadData(lockId);
|
||||||
final res =
|
|
||||||
await apiProvider.getServerDatetimeLoadData(lockId);
|
|
||||||
return GetServerDatetimeEntity.fromJson(res.body);
|
return GetServerDatetimeEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取锁版本信息
|
// 获取锁版本信息
|
||||||
Future<GetServerDatetimeEntity> getLockVersionInfoData(
|
Future<GetServerDatetimeEntity> getLockVersionInfoData({
|
||||||
{
|
required String lockId,
|
||||||
required String lockId,
|
}) async {
|
||||||
}) async {
|
final res = await apiProvider.getLockVersionInfoLoadData(lockId);
|
||||||
final res =
|
return GetServerDatetimeEntity.fromJson(res.body);
|
||||||
await apiProvider.getLockVersionInfoLoadData(lockId);
|
}
|
||||||
return GetServerDatetimeEntity.fromJson(res.body);}
|
|
||||||
|
|
||||||
//分组下的锁列表
|
//分组下的锁列表
|
||||||
Future<MassSendLockGroupListEntity> listLockByGroup(
|
Future<MassSendLockGroupListEntity> listLockByGroup(
|
||||||
@ -535,4 +523,30 @@ class ApiRepository {
|
|||||||
await apiProvider.canSendKey(endDate, keyGroupIdList, lockIdList);
|
await apiProvider.canSendKey(endDate, keyGroupIdList, lockIdList);
|
||||||
return KeyDetailEntity.fromJson(res.body);
|
return KeyDetailEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//群发钥匙检查
|
||||||
|
Future<KeyDetailEntity> batchSendKey(
|
||||||
|
String endDate,
|
||||||
|
String keyGroupIdList,
|
||||||
|
String lockIdList,
|
||||||
|
String createUser,
|
||||||
|
String isRemoteUnlock,
|
||||||
|
String keyNameForAdmin,
|
||||||
|
String receiverUsername,
|
||||||
|
String startDate,
|
||||||
|
String countryCode,
|
||||||
|
String usernameType) async {
|
||||||
|
final res = await apiProvider.batchSendKey(
|
||||||
|
endDate,
|
||||||
|
keyGroupIdList,
|
||||||
|
lockIdList,
|
||||||
|
createUser,
|
||||||
|
isRemoteUnlock,
|
||||||
|
keyNameForAdmin,
|
||||||
|
receiverUsername,
|
||||||
|
startDate,
|
||||||
|
countryCode,
|
||||||
|
usernameType);
|
||||||
|
return KeyDetailEntity.fromJson(res.body);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import 'dart:async';
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:get/get_connect/http/src/request/request.dart';
|
import 'package:get/get_connect/http/src/request/request.dart';
|
||||||
|
import 'package:star_lock/login/login/entity/LoginData.dart';
|
||||||
|
|
||||||
import '../login/login/entity/LoginEntity.dart';
|
import '../login/login/entity/LoginEntity.dart';
|
||||||
import '../tools/platform_info_services.dart';
|
import '../tools/platform_info_services.dart';
|
||||||
@ -18,7 +19,10 @@ FutureOr<Request> requestInterceptor(Request request) async {
|
|||||||
String? xToken = '';
|
String? xToken = '';
|
||||||
final data = await Storage.getString('userLoginData');
|
final data = await Storage.getString('userLoginData');
|
||||||
if (data != null && data.isNotEmpty) {
|
if (data != null && data.isNotEmpty) {
|
||||||
xToken = LoginEntity.fromJson(jsonDecode(data)).data!.accessToken;
|
LoginData loginData = LoginData.fromJson(jsonDecode(data));
|
||||||
|
xToken = loginData.accessToken;
|
||||||
|
|
||||||
|
// xToken = LoginEntity.fromJson(jsonDecode(data)).data!.accessToken;
|
||||||
}
|
}
|
||||||
request.headers['Authorization'] = "Bearer ${xToken ?? ''}";
|
request.headers['Authorization'] = "Bearer ${xToken ?? ''}";
|
||||||
return request;
|
return request;
|
||||||
|
|||||||
@ -45,11 +45,10 @@ class ShowTFView extends StatelessWidget {
|
|||||||
controller: controller,
|
controller: controller,
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
//输入里面输入文字内边距设置
|
|
||||||
contentPadding:
|
contentPadding:
|
||||||
EdgeInsets.only(top: 20.h, left: 15.0, bottom: 13.h),
|
const EdgeInsets.only(left: 5, top: -8, bottom: 6),
|
||||||
hintText: tipTitle,
|
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||||
hintStyle: TextStyle(fontSize: 28.sp),
|
hintStyle: TextStyle(fontSize: 22.sp, height: 1.0),
|
||||||
//不需要输入框下划线
|
//不需要输入框下划线
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
//左边图标设置
|
//左边图标设置
|
||||||
|
|||||||