1,解决胁迫指纹—指纹列表不能搜索问题
2,修复群发钥匙-接收者 点通讯录无反应问题
This commit is contained in:
parent
204cd370d8
commit
5f676340dd
@ -154,23 +154,26 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
|||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||||
rightTitle: state.receiverList.isEmpty
|
rightTitle: state.receiverList.isEmpty
|
||||||
? TranslationLoader.lanKeys!.pleaseAdd!.tr
|
? TranslationLoader.lanKeys!.pleaseAdd!.tr
|
||||||
: state.receiverList.length.toString(),
|
: state.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) {
|
arguments: {
|
||||||
if (value != null) {
|
'lockUserList': state.receiverList,
|
||||||
value as Map<String, dynamic>;
|
}).then((value) {
|
||||||
state.receiverList = value['lockUserList'];
|
if (value != null) {
|
||||||
|
value as Map<String, dynamic>;
|
||||||
|
state.receiverList = value['lockUserList'];
|
||||||
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}),
|
},
|
||||||
|
),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
|
|||||||
@ -1,25 +1,52 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get_utils/get_utils.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_entity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_entity.dart';
|
||||||
import 'package:star_lock/translations/trans_lib.dart';
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
|
|
||||||
import '../../../../../../app_settings/app_colors.dart';
|
import '../../../../../../app_settings/app_colors.dart';
|
||||||
|
|
||||||
class MassSendReceiverCell extends StatelessWidget {
|
class MassSendReceiverCell extends StatefulWidget {
|
||||||
|
const MassSendReceiverCell({
|
||||||
|
required this.currentIndex,
|
||||||
|
required this.userData,
|
||||||
|
required this.onDeleteUser,
|
||||||
|
Key? key,
|
||||||
|
}) : super(key: key);
|
||||||
final int currentIndex;
|
final int currentIndex;
|
||||||
LockUserItemData userData;
|
final LockUserItemData userData;
|
||||||
final VoidCallback clickDeleteUser;
|
final VoidCallback onDeleteUser;
|
||||||
final FlutterContactPicker contactPicker = FlutterContactPicker();
|
|
||||||
late Contact contact;
|
|
||||||
|
|
||||||
MassSendReceiverCell(int index,
|
@override
|
||||||
{Key? key,
|
_MassSendReceiverCellState createState() => _MassSendReceiverCellState();
|
||||||
required this.currentIndex,
|
}
|
||||||
required this.userData,
|
|
||||||
required this.clickDeleteUser})
|
class _MassSendReceiverCellState extends State<MassSendReceiverCell> {
|
||||||
: super(key: key);
|
final FlutterContactPicker contactPicker = FlutterContactPicker();
|
||||||
|
late TextEditingController _receiverController;
|
||||||
|
late TextEditingController _nickNameController;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_receiverController =
|
||||||
|
TextEditingController(text: widget.userData.userid ?? '');
|
||||||
|
_nickNameController =
|
||||||
|
TextEditingController(text: widget.userData.nickname ?? '');
|
||||||
|
_receiverController.addListener(() {
|
||||||
|
widget.userData.userid = _receiverController.text;
|
||||||
|
});
|
||||||
|
_nickNameController.addListener(() {
|
||||||
|
widget.userData.nickname = _nickNameController.text;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_receiverController.dispose();
|
||||||
|
_nickNameController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -28,184 +55,129 @@ class MassSendReceiverCell extends StatelessWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
child: SizedBox(
|
onTap: widget.onDeleteUser,
|
||||||
// width: 40.w,
|
child: Padding(
|
||||||
child: Row(
|
padding: EdgeInsets.symmetric(horizontal: 20.w),
|
||||||
children: [
|
child: Image.asset(
|
||||||
SizedBox(
|
'images/icon_massSend_delete.png',
|
||||||
width: 20.w,
|
width: 26.w,
|
||||||
),
|
height: 26.w,
|
||||||
Image.asset(
|
|
||||||
'images/icon_massSend_delete.png',
|
|
||||||
width: 26.w,
|
|
||||||
height: 26.w,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () {
|
|
||||||
clickDeleteUser();
|
|
||||||
// _lockUserList.removeAt(index - 1);
|
|
||||||
// setState(() {});
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
massSendReceiverCellWidget(
|
_buildCellWidget(
|
||||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
leftTitle: TranslationLoader.lanKeys!.receiver!.tr,
|
||||||
rightTitle: userData.userid ?? ' ',
|
isInputField: true,
|
||||||
isHaveLine: true,
|
inputHint:
|
||||||
isHaveRightWidget: true,
|
|
||||||
rightWidget: getTFWidget(
|
|
||||||
true,
|
|
||||||
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||||
1,
|
controller: _receiverController,
|
||||||
userData)),
|
isContactPickerEnabled: true,
|
||||||
Divider(
|
),
|
||||||
color: AppColors.greyLineColor,
|
Divider(
|
||||||
indent: 20.w,
|
color: AppColors.greyLineColor,
|
||||||
endIndent: 20.w,
|
indent: 20.w,
|
||||||
height: 1,
|
endIndent: 20.w,
|
||||||
),
|
height: 1,
|
||||||
massSendReceiverCellWidget(
|
),
|
||||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
_buildCellWidget(
|
||||||
rightTitle: userData.nickname ?? ' ',
|
leftTitle: TranslationLoader.lanKeys!.name!.tr,
|
||||||
isHaveRightWidget: true,
|
isInputField: true,
|
||||||
rightWidget: getTFWidget(
|
inputHint: TranslationLoader.lanKeys!.enterYourName!.tr,
|
||||||
false,
|
controller: _nickNameController,
|
||||||
TranslationLoader.lanKeys!.enterYourName!.tr,
|
isContactPickerEnabled: false,
|
||||||
2,
|
),
|
||||||
userData)),
|
],
|
||||||
],
|
),
|
||||||
))
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEditingController _receiverController(String getStr) {
|
Widget _buildCellWidget({
|
||||||
TextEditingController controller = TextEditingController(text: getStr);
|
required String leftTitle,
|
||||||
controller.addListener(() {
|
required bool isInputField,
|
||||||
userData.userid = controller.text;
|
required String inputHint,
|
||||||
});
|
required TextEditingController controller,
|
||||||
|
required bool isContactPickerEnabled,
|
||||||
return controller;
|
|
||||||
}
|
|
||||||
|
|
||||||
TextEditingController _nickNameController(String getStr) {
|
|
||||||
TextEditingController controller = TextEditingController(text: getStr);
|
|
||||||
controller.addListener(() {
|
|
||||||
userData.nickname = controller.text;
|
|
||||||
});
|
|
||||||
|
|
||||||
return controller;
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget massSendReceiverCellWidget({
|
|
||||||
String? leftTitel,
|
|
||||||
String? rightTitle,
|
|
||||||
bool? isHaveDirection,
|
|
||||||
bool? isHaveLine,
|
|
||||||
bool? isHaveRightWidget,
|
|
||||||
Widget? rightWidget,
|
|
||||||
Function()? action,
|
|
||||||
double? allHeight,
|
|
||||||
}) {
|
}) {
|
||||||
return Column(
|
return Container(
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
height: 60.h,
|
||||||
children: [
|
padding: EdgeInsets.only(right: 20.w),
|
||||||
Container(
|
child: Row(
|
||||||
height: 60.h,
|
children: [
|
||||||
color: Colors.white,
|
SizedBox(width: 20.w),
|
||||||
padding: EdgeInsets.only(right: 20.w), // , top: 20.w, bottom: 20.w
|
Text(leftTitle, style: TextStyle(fontSize: 22.sp)),
|
||||||
child: Row(
|
Expanded(child: SizedBox(width: 10.w)),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 20.w),
|
if (isInputField)
|
||||||
Text(leftTitel!, style: TextStyle(fontSize: 22.sp)),
|
_buildTextField(controller, inputHint, isContactPickerEnabled)
|
||||||
Expanded(child: SizedBox(width: 10.w)),
|
else
|
||||||
Row(
|
Text(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
controller.text,
|
||||||
children: [
|
textAlign: TextAlign.end,
|
||||||
isHaveRightWidget!
|
style: TextStyle(
|
||||||
? rightWidget!
|
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||||
: Text(
|
),
|
||||||
rightTitle ?? "",
|
|
||||||
textAlign: TextAlign.end,
|
|
||||||
// overflow: TextOverflow.ellipsis,
|
|
||||||
// maxLines: 1,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 22.sp,
|
|
||||||
color: AppColors.darkGrayTextColor),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
],
|
||||||
],
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 接受者信息输入框
|
Widget _buildTextField(TextEditingController controller, String hintText,
|
||||||
Widget getTFWidget(
|
bool isContactPickerEnabled) {
|
||||||
bool isHaveBtn, String tfStr, int lineIndex, LockUserItemData userData) {
|
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: 50.h,
|
|
||||||
width: 380.w,
|
width: 380.w,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: lineIndex == 1
|
controller: controller,
|
||||||
? _receiverController(userData.userid ?? '')
|
|
||||||
: _nickNameController(userData.nickname ?? ''),
|
|
||||||
//输入框一行
|
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
autofocus: false,
|
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
//输入里面输入文字内边距设置
|
|
||||||
contentPadding: const EdgeInsets.only(top: -12.0, bottom: 0.0),
|
contentPadding: const EdgeInsets.only(top: -12.0, bottom: 0.0),
|
||||||
hintText: tfStr,
|
hintText: hintText,
|
||||||
hintStyle: TextStyle(fontSize: 22.sp),
|
hintStyle: TextStyle(fontSize: 22.sp),
|
||||||
//不需要输入框下划线
|
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
if (isContactPickerEnabled)
|
||||||
width: 10.w,
|
Padding(
|
||||||
),
|
padding: EdgeInsets.only(left: 10.w),
|
||||||
isHaveBtn
|
child: InkWell(
|
||||||
? Container(
|
onTap: _pickContact,
|
||||||
|
child: Image.asset(
|
||||||
|
'images/icon_addressBook.png',
|
||||||
width: 32.w,
|
width: 32.w,
|
||||||
height: 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(() {
|
|
||||||
// state.contact = currentContact!;
|
|
||||||
// if (currentContact.phoneNumbers!.isNotEmpty) {
|
|
||||||
// state.emailOrPhoneController.text = currentContact
|
|
||||||
// .phoneNumbers![0]
|
|
||||||
// .replaceAll(RegExp(r"\s+\b|\b\s"), "");
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: Container()
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> _pickContact() async {
|
||||||
|
final Contact? selectedContact = await contactPicker.selectContact();
|
||||||
|
if (selectedContact != null) {
|
||||||
|
setState(() {
|
||||||
|
if (selectedContact.phoneNumbers?.isNotEmpty ?? false) {
|
||||||
|
_receiverController.text = selectedContact.phoneNumbers!.first;
|
||||||
|
}
|
||||||
|
if (selectedContact.fullName?.isNotEmpty ?? false) {
|
||||||
|
_nickNameController.text = selectedContact.fullName!;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -177,11 +177,10 @@ class _MassSendReceiverPageState extends State<MassSendReceiverPage> {
|
|||||||
|
|
||||||
Widget _itemBuilder(int index, LockUserItemData userData) {
|
Widget _itemBuilder(int index, LockUserItemData userData) {
|
||||||
return MassSendReceiverCell(
|
return MassSendReceiverCell(
|
||||||
index,
|
|
||||||
currentIndex: index,
|
currentIndex: index,
|
||||||
userData: userData,
|
userData: userData,
|
||||||
clickDeleteUser: () {
|
onDeleteUser: () {
|
||||||
state.lockUserList.value.removeAt(index - 1);
|
state.lockUserList.removeAt(index - 1);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@ -3,6 +3,13 @@ import 'package:get/get.dart';
|
|||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_entity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_entity.dart';
|
||||||
|
|
||||||
class MassSendReceiverState {
|
class MassSendReceiverState {
|
||||||
|
// MassSendReceiverState() {
|
||||||
|
// final Map map = Get.arguments;
|
||||||
|
// if (map['lockUserList'] != null) {
|
||||||
|
// lockUserList = map['lockUserList'] ?? [];
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
var isVip = false.obs;
|
var isVip = false.obs;
|
||||||
var lockUserList = <LockUserItemData>[].obs;
|
var lockUserList = <LockUserItemData>[].obs;
|
||||||
TextEditingController emailOrPhoneController = TextEditingController();
|
TextEditingController emailOrPhoneController = TextEditingController();
|
||||||
|
|||||||
@ -106,7 +106,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
// Container(height: 10.h),
|
// Container(height: 10.h),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: getTFWidget(
|
rightWidget: getTFWidget(
|
||||||
@ -116,7 +116,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
logic)),
|
logic)),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
@ -139,7 +139,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
),
|
),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: getTFWidget(
|
rightWidget: getTFWidget(
|
||||||
false, TranslationLoader.lanKeys!.enterYourName!.tr, 2, logic)),
|
false, TranslationLoader.lanKeys!.enterYourName!.tr, 2, logic)),
|
||||||
@ -192,13 +192,13 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
children: [
|
children: [
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr,
|
leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isTipsImg: true,
|
isTipsImg: true,
|
||||||
isHaveLine:
|
isHaveLine:
|
||||||
logic.state.isRequireAuth.value == true ? true : false,
|
logic.state.isRequireAuth.value == true ? true : false,
|
||||||
tipsImgAction: () {
|
tipsImgAction: () {
|
||||||
ShowTipView().showSureAlertDialog(
|
ShowTipView().showSureAlertDialog(
|
||||||
"人脸实名认证指的是用户在使用手机APP开锁时,需要先进行本人人脸验证,验证通过才能开锁。".tr);
|
'人脸实名认证指的是用户在使用手机APP开锁时,需要先进行本人人脸验证,验证通过才能开锁。'.tr);
|
||||||
},
|
},
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
@ -210,7 +210,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
visible: logic.state.isRequireAuth.value,
|
visible: logic.state.isRequireAuth.value,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: '真实姓名'.tr,
|
leftTitel: '真实姓名'.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
rightWidget: getTFWidget(false, '请输入真实姓名'.tr, 3, logic)))),
|
rightWidget: getTFWidget(false, '请输入真实姓名'.tr, 3, logic)))),
|
||||||
@ -218,7 +218,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
visible: logic.state.isRequireAuth.value,
|
visible: logic.state.isRequireAuth.value,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: '身份证号'.tr,
|
leftTitel: '身份证号'.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: getTFWidget(false, '请输入身份证号'.tr, 4, logic)))),
|
rightWidget: getTFWidget(false, '请输入身份证号'.tr, 4, logic)))),
|
||||||
],
|
],
|
||||||
@ -232,7 +232,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||||
rightTitle:
|
rightTitle:
|
||||||
"${logic.state.cycleBeginTime}\n${logic.state.cycleEndTime}",
|
'${logic.state.cycleBeginTime}\n${logic.state.cycleEndTime}',
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
@ -256,8 +256,8 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
Visibility(
|
Visibility(
|
||||||
visible: logic.state.weekdaysList.isNotEmpty ? true : false,
|
visible: logic.state.weekdaysList.isNotEmpty ? true : false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: "有效日".tr,
|
leftTitel: '有效日'.tr,
|
||||||
rightTitle: logic.state.weekdaysList.join(",").toString(),
|
rightTitle: logic.state.weekdaysList.join(',').toString(),
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
@ -281,9 +281,9 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
Visibility(
|
Visibility(
|
||||||
visible: logic.state.effectiveDateTime.isNotEmpty,
|
visible: logic.state.effectiveDateTime.isNotEmpty,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: "有效时间".tr,
|
leftTitel: '有效时间'.tr,
|
||||||
rightTitle:
|
rightTitle:
|
||||||
"${logic.state.effectiveDateTime}-${logic.state.failureDateTime}",
|
'${logic.state.effectiveDateTime}-${logic.state.failureDateTime}',
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
@ -334,7 +334,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
} else {
|
} else {
|
||||||
//演示模式不获取接口
|
//演示模式不获取接口
|
||||||
logic.showToast("演示模式".tr);
|
logic.showToast('演示模式'.tr);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
Container(
|
Container(
|
||||||
@ -349,7 +349,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
Navigator.pushNamed(
|
Navigator.pushNamed(
|
||||||
context, Routers.massSendElectronicKeyManagePage);
|
context, Routers.massSendElectronicKeyManagePage);
|
||||||
} else {
|
} else {
|
||||||
logic.showToast("演示模式".tr);
|
logic.showToast('演示模式'.tr);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
@ -389,7 +389,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"发送成功".tr,
|
'发送成功'.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 26.sp,
|
fontSize: 26.sp,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
@ -433,7 +433,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
roomStatus: 1,
|
roomStatus: 1,
|
||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
logic.showToast("标记成功".tr);
|
logic.showToast('标记成功'.tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -482,35 +482,36 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: 10.w,
|
width: 10.w,
|
||||||
),
|
),
|
||||||
isHaveBtn
|
if (isHaveBtn)
|
||||||
? Container(
|
Container(
|
||||||
width: 32.w,
|
width: 32.w,
|
||||||
height: 32.w,
|
height: 32.w,
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage('images/icon_addressBook.png'),
|
image: AssetImage('images/icon_addressBook.png'),
|
||||||
fit: BoxFit.fill),
|
fit: BoxFit.fill),
|
||||||
),
|
),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
Contact? currentContact =
|
final Contact? currentContact =
|
||||||
await logic.state.contactPicker.selectContact();
|
await logic.state.contactPicker.selectContact();
|
||||||
logic.state.contact = currentContact!;
|
logic.state.contact = currentContact!;
|
||||||
if (currentContact.phoneNumbers!.isNotEmpty) {
|
if (currentContact.phoneNumbers!.isNotEmpty) {
|
||||||
logic.state.emailOrPhoneController.text = currentContact
|
logic.state.emailOrPhoneController.text = currentContact
|
||||||
.phoneNumbers![0]
|
.phoneNumbers![0]
|
||||||
.replaceAll(RegExp(r"\s+\b|\b\s"), "");
|
.replaceAll(RegExp(r'\s+\b|\b\s'), '');
|
||||||
}
|
}
|
||||||
if (currentContact.fullName!.isNotEmpty) {
|
if (currentContact.fullName!.isNotEmpty) {
|
||||||
logic.state.keyNameController.text =
|
logic.state.keyNameController.text =
|
||||||
currentContact.fullName!;
|
currentContact.fullName!;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Container()
|
else
|
||||||
|
Container()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -528,7 +529,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
children: [
|
children: [
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr,
|
leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
width: 60.w, height: 50.h, child: _remoteSwitch(true, logic)),
|
width: 60.w, height: 50.h, child: _remoteSwitch(true, logic)),
|
||||||
|
|||||||
@ -1299,7 +1299,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
}
|
}
|
||||||
|
|
||||||
//如果需要实名认证,需认证完成,方可开锁
|
//如果需要实名认证,需认证完成,方可开锁
|
||||||
isNeedRealNameAuthThenOpenLock() {
|
void isNeedRealNameAuthThenOpenLock() {
|
||||||
state.nextAuthTime.value = state.keyInfos.value.nextFaceValidateTime ?? 0;
|
state.nextAuthTime.value = state.keyInfos.value.nextFaceValidateTime ?? 0;
|
||||||
if (state.keyInfos.value.faceAuthentication == 1 &&
|
if (state.keyInfos.value.faceAuthentication == 1 &&
|
||||||
state.nextAuthTime.value > 0 &&
|
state.nextAuthTime.value > 0 &&
|
||||||
|
|||||||
@ -15,6 +15,7 @@ class CoerceFingerprintListLogic extends BaseGetXController {
|
|||||||
lockId: state.getLockId.value,
|
lockId: state.getLockId.value,
|
||||||
pageNo: state.pageNum.value,
|
pageNo: state.pageNum.value,
|
||||||
pageSize: state.pageSize.value,
|
pageSize: state.pageSize.value,
|
||||||
|
searchStr: state.searchController.text,
|
||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
state.fingerprintList.value = entity.data!.list!;
|
state.fingerprintList.value = entity.data!.list!;
|
||||||
|
|||||||
@ -1984,11 +1984,15 @@ class ApiProvider extends BaseProvider {
|
|||||||
|
|
||||||
// 获取胁迫指纹列表
|
// 获取胁迫指纹列表
|
||||||
Future<Response> getCoercedFingerprintList(
|
Future<Response> getCoercedFingerprintList(
|
||||||
int lockId, int pageNo, int pageSize) =>
|
int lockId, int pageNo, int pageSize, String searchStr) =>
|
||||||
post(
|
post(
|
||||||
getCoercedFingerprintListURL.toUrl,
|
getCoercedFingerprintListURL.toUrl,
|
||||||
jsonEncode(
|
jsonEncode({
|
||||||
{'lockId': lockId, 'pageNo': pageNo, 'pageSize': pageSize}));
|
'lockId': lockId,
|
||||||
|
'pageNo': pageNo,
|
||||||
|
'pageSize': pageSize,
|
||||||
|
'searchStr': searchStr
|
||||||
|
}));
|
||||||
|
|
||||||
// 获取云存列表
|
// 获取云存列表
|
||||||
Future<Response> getLockCloudStorageList(int lockId) =>
|
Future<Response> getLockCloudStorageList(int lockId) =>
|
||||||
|
|||||||
@ -2014,9 +2014,12 @@ class ApiRepository {
|
|||||||
|
|
||||||
// 获取胁迫指纹列表
|
// 获取胁迫指纹列表
|
||||||
Future<CoerceFingerprintListEntity> getCoercedFingerprintList(
|
Future<CoerceFingerprintListEntity> getCoercedFingerprintList(
|
||||||
{required int lockId, required int pageNo, required int pageSize}) async {
|
{required int lockId,
|
||||||
final res =
|
required int pageNo,
|
||||||
await apiProvider.getCoercedFingerprintList(lockId, pageNo, pageSize);
|
required int pageSize,
|
||||||
|
required String searchStr}) async {
|
||||||
|
final res = await apiProvider.getCoercedFingerprintList(
|
||||||
|
lockId, pageNo, pageSize, searchStr);
|
||||||
return CoerceFingerprintListEntity.fromJson(res.body);
|
return CoerceFingerprintListEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user