修改单个记录问题。修改其他bug
This commit is contained in:
parent
406ca21a2b
commit
e388c53824
@ -309,14 +309,14 @@ SPEC CHECKSUMS:
|
||||
audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207
|
||||
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
|
||||
auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d
|
||||
camera_avfoundation: 759172d1a77ae7be0de08fc104cfb79738b8a59e
|
||||
camera_avfoundation: 8b8d780bcfb6a4a02b0fbe2b4bd17b5b71946e68
|
||||
connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d
|
||||
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
|
||||
DKImagePickerController: 0a24ebfe7b48beeb74c27531540aaa2cc1dac6cf
|
||||
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
||||
EMASRest: 8df6f87836767a9415ad5cc4af739bc9d215b475
|
||||
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
flutter_blue_plus: 4837da7d00cf5d441fdd6635b3a57f936778ea96
|
||||
flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086
|
||||
flutter_native_contact_picker: bd430ba0fbf82768bb50c2c52a69a65759a8f907
|
||||
@ -327,7 +327,7 @@ SPEC CHECKSUMS:
|
||||
google_maps_flutter_ios: f135b968a67c05679e0a53538e900b5c174b0d99
|
||||
GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4
|
||||
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
|
||||
image_picker_ios: b545a5f16c0fa88e3ecbbce3ed4de45567a8ec18
|
||||
image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425
|
||||
ios-voice-processor: 8e32d7f980a06d392d128ef1cd19cf6ddcaca3c1
|
||||
JCore: 05f0f3489672ea3fa55338bae4866224bc092b1f
|
||||
JPush: 76668b765fcfd7c15f86b05ca0e5cdc01945ce23
|
||||
@ -335,18 +335,18 @@ SPEC CHECKSUMS:
|
||||
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
|
||||
network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f
|
||||
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
||||
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
||||
ReachabilitySwift: 2128f3a8c9107e1ad33574c6e58e8285d460b149
|
||||
SDWebImage: 40b0b4053e36c660a764958bff99eed16610acbb
|
||||
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
|
||||
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
|
||||
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
||||
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
||||
system_settings: 8f5cdbfa72c677fc8d665b863bcc20d393d87e9d
|
||||
Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e
|
||||
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
||||
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
|
||||
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
|
||||
url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812
|
||||
video_player_avfoundation: 02011213dab73ae3687df27ce441fbbcc82b5579
|
||||
webview_flutter_wkwebview: 4f3e50f7273d31e5500066ed267e3ae4309c5ae4
|
||||
WechatOpenSDK-XCFramework: 36fb2bea0754266c17184adf4963d7e6ff98b69f
|
||||
|
||||
PODFILE CHECKSUM: 317f9473a5705c6fe4d79d95e81676f248048fdc
|
||||
|
||||
@ -34,7 +34,7 @@ class SenderReferEventRecordTimeCommand extends SenderProtocol {
|
||||
@override
|
||||
String toString() {
|
||||
return 'SenderReferEventRecordTimeCommand{keyID: $keyID, '
|
||||
'userID: $userID, logsCount: $logsCount, time: ${DateTool().dateIntToYMDHNString(time)}, '
|
||||
'userID: $userID, logsCount: $logsCount, time:$time timeStr: ${DateTool().dateIntToYMDHNString(time)}, '
|
||||
'token: $token, needAuthor: $needAuthor, publicKey: $publicKey, '
|
||||
'privateKey: $privateKey}';
|
||||
}
|
||||
|
||||
@ -51,8 +51,8 @@ class SenderCustomPasswordsCommand extends SenderProtocol {
|
||||
return 'SenderCustomPasswordsCommand{keyID: $keyID, userID: $userID, '
|
||||
'pwdNo: $pwdNo, pwd: $pwd, useCountLimit: $useCountLimit, operate: $operate, isAdmin: $isAdmin,'
|
||||
'token: $token, '
|
||||
'startTime: ${DateTool().dateIntToYMDHNString(startTime)}, '
|
||||
'endTime: ${DateTool().dateIntToYMDHNString(endTime)}, '
|
||||
'startTime:$startTime startTimeStr: ${DateTool().dateIntToYMDHNString(startTime)}, '
|
||||
'endTime:$endTime endTimeStr: ${DateTool().dateIntToYMDHNString(endTime)}, '
|
||||
'needAuthor: $needAuthor, signKey: $signKey, privateKey: $privateKey}';
|
||||
}
|
||||
|
||||
|
||||
@ -180,7 +180,7 @@ class SenderBeforeDataManage {
|
||||
useCountLimit = 1;
|
||||
}
|
||||
|
||||
AppLog.log("startTime.hour:${startTime!.hour} startTime.minute:${startTime!.minute} endTime.hour:${endTime!.hour} endTime.minute:${endTime!.minute}}");
|
||||
// AppLog.log("startTime.hour:${startTime!.hour} startTime.minute:${startTime!.minute} endTime.hour:${endTime!.hour} endTime.minute:${endTime!.minute}}");
|
||||
var addUserData = AddUserCommand(
|
||||
lockID: BlueManage().connectDeviceName,
|
||||
authUserID: currentKeyInfo.senderUserId!.toString(),
|
||||
|
||||
@ -183,7 +183,8 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
action: () {
|
||||
Get.toNamed(Routers.lockOperatingRecordPage, arguments: {
|
||||
'type': 2,
|
||||
'id': state.fingerprintItemData.value.cardId.toString()
|
||||
'id': state.fingerprintItemData.value.cardId.toString(),
|
||||
'recordName': state.fingerprintItemData.value.cardName
|
||||
});
|
||||
}),
|
||||
// SizedBox(height: 40.h),
|
||||
|
||||
@ -64,7 +64,7 @@ class DoorLockLogLogic extends BaseGetXController {
|
||||
var password = utf8String(passwordData);
|
||||
indexMap["user"] = password.toString();
|
||||
}else{
|
||||
int userNo = (indexList[1]*255) + indexList[2];
|
||||
int userNo = (indexList[1]*256) + indexList[2];
|
||||
indexMap["user"] = userNo.toString();
|
||||
}
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -259,7 +260,8 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
||||
action: () {
|
||||
Get.toNamed(Routers.lockOperatingRecordPage, arguments: {
|
||||
'type': 5,
|
||||
'id': state.itemData.value.keyId.toString()
|
||||
'id': state.itemData.value.keyId.toString(),
|
||||
'recordName': state.itemData.value.keyName
|
||||
});
|
||||
}),
|
||||
Container(height: 40.h),
|
||||
|
||||
@ -2,6 +2,7 @@ import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_settings.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_addFace.dart';
|
||||
import 'package:star_lock/blue/io_type.dart';
|
||||
import 'package:star_lock/main/lockDetail/face/faceDetail/faceDetail_state.dart';
|
||||
@ -45,7 +46,6 @@ class FaceDetailLogic extends BaseGetXController {
|
||||
}else{
|
||||
editFaceData();
|
||||
}
|
||||
deletFaceData();
|
||||
break;
|
||||
case 0x06:
|
||||
//无权限
|
||||
|
||||
@ -191,7 +191,8 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
action: () {
|
||||
Get.toNamed(Routers.lockOperatingRecordPage, arguments: {
|
||||
'type': 4,
|
||||
'id': state.faceItemData.value.faceId.toString()
|
||||
'id': state.faceItemData.value.faceId.toString(),
|
||||
'recordName': state.faceItemData.value.faceName
|
||||
});
|
||||
}),
|
||||
// SizedBox(height: 40.h),
|
||||
|
||||
@ -7,6 +7,7 @@ import 'package:star_lock/blue/io_protocol/io_addFace.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_queryingFaceStatus.dart';
|
||||
import 'package:star_lock/main/lockDetail/face/faceList/faceList_state.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import '../../../../app_settings/app_settings.dart';
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
import '../../../../blue/io_protocol/io_checkingUserInfoCount.dart';
|
||||
import '../../../../blue/io_reply.dart';
|
||||
@ -323,10 +324,8 @@ class FaceListLogic extends BaseGetXController {
|
||||
// 删除的人脸
|
||||
void deletFacesData() async {
|
||||
var faceId = "";
|
||||
var type = "1";
|
||||
if (state.isDeletAll == false) {
|
||||
faceId = state.deletKeyID;
|
||||
type = "0";
|
||||
}
|
||||
var entity = await ApiRepository.to.deleteFaceData(
|
||||
faceId: int.parse(faceId),
|
||||
|
||||
@ -151,7 +151,8 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
"faceItemData": getFaceItemData,
|
||||
});
|
||||
if (data != null) {
|
||||
logic.getFaceListData();
|
||||
logic.pageNo = 1;
|
||||
getHttpData();
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
||||
@ -6,12 +6,9 @@ import 'package:get/get.dart';
|
||||
|
||||
import '../../../../appRouters.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
import '../../../../tools/appRouteObserver.dart';
|
||||
import '../../../../tools/commonItem.dart';
|
||||
import '../../../../tools/dateTool.dart';
|
||||
import '../../../../tools/showIosTipView.dart';
|
||||
import '../../../../tools/showTFView.dart';
|
||||
import '../../../../tools/showTipView.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
@ -201,7 +198,8 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage>
|
||||
// 指纹
|
||||
Get.toNamed(Routers.lockOperatingRecordPage, arguments: {
|
||||
'type': 3,
|
||||
'id': state.fingerprintItemData.value.fingerprintId.toString()
|
||||
'id': state.fingerprintItemData.value.fingerprintId.toString(),
|
||||
'recordName': state.fingerprintItemData.value.fingerprintName
|
||||
});
|
||||
}),
|
||||
// SizedBox(height: 40.h),
|
||||
|
||||
@ -209,7 +209,7 @@ class LockDetailLogic extends BaseGetXController {
|
||||
var password = utf8String(passwordData);
|
||||
indexMap["user"] = password.toString();
|
||||
} else {
|
||||
int userNo = (indexList[1] * 255) + indexList[2];
|
||||
int userNo = (indexList[1] * 256) + indexList[2];
|
||||
indexMap["user"] = userNo.toString();
|
||||
}
|
||||
|
||||
@ -259,8 +259,7 @@ class LockDetailLogic extends BaseGetXController {
|
||||
var token = await Storage.getStringList(saveBlueToken);
|
||||
List<int> getTokenList = changeStringListToIntList(token!);
|
||||
|
||||
BlueManage()
|
||||
.bludSendData(state.keyInfos.value.bluetooth!.bluetoothDeviceName!,
|
||||
BlueManage().bludSendData(state.keyInfos.value.bluetooth!.bluetoothDeviceName!,
|
||||
(BluetoothConnectionState deviceConnectionState) async {
|
||||
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||
IoSenderManage.senderOpenLock(
|
||||
|
||||
@ -926,7 +926,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
'images/main/icon_main_operatingRecord.png',
|
||||
TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||||
state.bottomBtnisEable.value, () {
|
||||
Get.toNamed(Routers.lockOperatingRecordPage,
|
||||
Get.toNamed(Routers.doorLockLogPage,
|
||||
arguments: {"keyInfo": state.keyInfos.value});
|
||||
}));
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ class LockOperatingRecordLogic extends BaseGetXController {
|
||||
AppLog.log("password:$password passwordData:$passwordData");
|
||||
indexMap["user"] = password;
|
||||
}else{
|
||||
int userNo = (indexList[1]*255) + indexList[2];
|
||||
int userNo = (indexList[1]*256) + indexList[2];
|
||||
indexMap["user"] = userNo.toString();
|
||||
}
|
||||
|
||||
|
||||
@ -51,30 +51,30 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> with
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||||
barTitle: state.recordName.value.isNotEmpty? state.recordName.value : TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
(CommonDataManage().currentKeyInfo.isLockOwner == 1 ||
|
||||
CommonDataManage().currentKeyInfo.keyRight == 1)
|
||||
? IconButton(
|
||||
icon: Image.asset(
|
||||
'images/icon_bar_more.png',
|
||||
height: 30.h,
|
||||
width: 10.w,
|
||||
),
|
||||
onPressed: () async {
|
||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
_openModalBottomSheet();
|
||||
} else {
|
||||
// Get.toNamed(Routers.selectLockTypePage);
|
||||
logic.showToast("演示模式");
|
||||
}
|
||||
},
|
||||
)
|
||||
: Container(),
|
||||
],
|
||||
// actionsList: [
|
||||
// (CommonDataManage().currentKeyInfo.isLockOwner == 1 ||
|
||||
// CommonDataManage().currentKeyInfo.keyRight == 1)
|
||||
// ? IconButton(
|
||||
// icon: Image.asset(
|
||||
// 'images/icon_bar_more.png',
|
||||
// height: 30.h,
|
||||
// width: 10.w,
|
||||
// ),
|
||||
// onPressed: () async {
|
||||
// var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
// if (isDemoMode == false) {
|
||||
// _openModalBottomSheet();
|
||||
// } else {
|
||||
// // Get.toNamed(Routers.selectLockTypePage);
|
||||
// logic.showToast("演示模式");
|
||||
// }
|
||||
// },
|
||||
// )
|
||||
// : Container(),
|
||||
// ],
|
||||
),
|
||||
body: EasyRefreshTool(
|
||||
onRefresh: (){
|
||||
@ -86,29 +86,29 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> with
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
(CommonDataManage().currentKeyInfo.isLockOwner == 1 ||
|
||||
CommonDataManage().currentKeyInfo.keyRight == 1)
|
||||
? Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.only(left:20.h, right: 20.h, top: 20.h),
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.lockOperatingRecordTip!.tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontSize: 20.sp),
|
||||
),
|
||||
),
|
||||
KeySearchWidget(
|
||||
editingController: state.searchController,
|
||||
onSubmittedAction: () {
|
||||
logic.pageNo = 1;
|
||||
getHttpData();
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
: Container(),
|
||||
SizedBox(height: 10.h),
|
||||
// (CommonDataManage().currentKeyInfo.isLockOwner == 1 ||
|
||||
// CommonDataManage().currentKeyInfo.keyRight == 1)
|
||||
// ? Column(
|
||||
// children: [
|
||||
// Container(
|
||||
// padding: EdgeInsets.only(left:20.h, right: 20.h, top: 20.h),
|
||||
// child: Text(
|
||||
// TranslationLoader.lanKeys!.lockOperatingRecordTip!.tr,
|
||||
// textAlign: TextAlign.start,
|
||||
// style: TextStyle(fontSize: 20.sp),
|
||||
// ),
|
||||
// ),
|
||||
// KeySearchWidget(
|
||||
// editingController: state.searchController,
|
||||
// onSubmittedAction: () {
|
||||
// logic.pageNo = 1;
|
||||
// getHttpData();
|
||||
// },
|
||||
// ),
|
||||
// ],
|
||||
// )
|
||||
// : Container(),
|
||||
// SizedBox(height: 10.h),
|
||||
Expanded(child: _buildMainUI()),
|
||||
],
|
||||
),
|
||||
@ -128,7 +128,9 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> with
|
||||
DateTime.fromMillisecondsSinceEpoch(operateDate!);
|
||||
String operateDateStr =
|
||||
'${dateStr.toLocal().toString().substring(0, 16)} ';
|
||||
return _operatingRecordItem(getTypeIcon(dataItem.recordType!),
|
||||
// return _operatingRecordItem(getTypeIcon(dataItem.recordType!),
|
||||
// dataItem.recordTypeName!, operateDateStr, () {});
|
||||
return _operatingOneRecordItem(getTypeIcon(dataItem.recordType!),
|
||||
dataItem.recordTypeName!, operateDateStr, () {});
|
||||
},
|
||||
separatorBuilder: (BuildContext context, int index) {
|
||||
@ -166,63 +168,111 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> with
|
||||
return title;
|
||||
}
|
||||
|
||||
Widget _operatingRecordItem(String userAvatarStr, String userNameStr,
|
||||
String unlockDescStr, Function() action) {
|
||||
Widget _operatingOneRecordItem(String userAvatarStr, String userNameStr, String unlockDescStr, Function() action) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
height: 90.h,
|
||||
height: 80.h,
|
||||
width: 1.sw - 10.w - 34.w - 60.w,
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
// borderRadius: BorderRadius.circular(10.w),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Image.asset(
|
||||
userAvatarStr,
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
Icon(Icons.access_time, size: 35.w),
|
||||
SizedBox(width: 10.w,),
|
||||
Text(
|
||||
unlockDescStr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
SizedBox(width: 10.h),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
child:Container(
|
||||
margin: EdgeInsets.only(bottom: 3.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
userNameStr,
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp, color: AppColors.blackColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
unlockDescStr,
|
||||
style: TextStyle(
|
||||
fontSize: 20.sp,
|
||||
color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(width: 20.h),
|
||||
],
|
||||
// "发的发生大发手动阀手动阀三大发啥打法是打发三大发啥打法是打发",
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp, color: AppColors.blackColor)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 20.h),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// Widget _operatingRecordItem(String userAvatarStr, String userNameStr,
|
||||
// String unlockDescStr, Function() action) {
|
||||
// return GestureDetector(
|
||||
// onTap: action,
|
||||
// child: Container(
|
||||
// height: 90.h,
|
||||
// padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.white,
|
||||
// borderRadius: BorderRadius.circular(10.w),
|
||||
// ),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// Image.asset(
|
||||
// userAvatarStr,
|
||||
// width: 50.w,
|
||||
// height: 50.w,
|
||||
// ),
|
||||
// SizedBox(
|
||||
// width: 20.w,
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// children: [
|
||||
// Row(
|
||||
// children: [
|
||||
// Text(
|
||||
// userNameStr,
|
||||
// style: TextStyle(
|
||||
// fontSize: 24.sp, color: AppColors.blackColor),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// SizedBox(height: 10.h),
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
// children: [
|
||||
// Text(
|
||||
// unlockDescStr,
|
||||
// style: TextStyle(
|
||||
// fontSize: 20.sp,
|
||||
// color: AppColors.darkGrayTextColor),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// SizedBox(width: 20.h),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(width: 20.h),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
|
||||
Future _openModalBottomSheet() async {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
|
||||
@ -14,6 +14,7 @@ class LockOperatingRecordState {
|
||||
var logCountPage = 10; // 蓝牙记录一页多少个
|
||||
var idStr = ""; //
|
||||
var type = 0; // 1:密码 2:卡 3:指纹 4:人脸 5:钥匙
|
||||
var recordName = "".obs; // 记录名称
|
||||
|
||||
LockOperatingRecordState() {
|
||||
Map map = Get.arguments;
|
||||
@ -26,5 +27,8 @@ class LockOperatingRecordState {
|
||||
if(map["type"] != null){
|
||||
type = Get.arguments["type"];
|
||||
}
|
||||
if(map["recordName"] != null){
|
||||
recordName.value = Get.arguments["recordName"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
||||
}
|
||||
})),
|
||||
Obx(() => Visibility(
|
||||
visible: state.isCirculation.value == false,
|
||||
visible: (state.isCirculation.value == false) && (state.itemData.value.isCustom! != 1),
|
||||
child: CommonItem(
|
||||
leftTitel: "结束时间",
|
||||
rightTitle: DateTool().dateToYMDHNString(
|
||||
@ -151,10 +151,9 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
||||
rightTitle: "",
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.lockOperatingRecordPage,
|
||||
arguments: {
|
||||
Get.toNamed(Routers.lockOperatingRecordPage, arguments: {
|
||||
'type': 1,
|
||||
'id': state.itemData.value.keyboardPwdId.toString()
|
||||
'id': state.itemData.value.keyboardPwdId.toString(),
|
||||
});
|
||||
}),
|
||||
Visibility(
|
||||
|
||||
@ -13,6 +13,7 @@ import '../../../../blue/io_reply.dart';
|
||||
import '../../../../blue/io_tool/io_tool.dart';
|
||||
import '../../../../blue/io_tool/manager_event_bus.dart';
|
||||
import '../../../../blue/sender_manage.dart';
|
||||
import '../../../../tools/dateTool.dart';
|
||||
import '../../../../tools/eventBusEventManage.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
|
||||
@ -52,10 +53,10 @@ class PasswordKeyDetailChangeDateLogic extends BaseGetXController {
|
||||
pwdNo: state.itemData.value.pwdUserNo!,
|
||||
pwd: state.itemData.value.keyboardPwd!.toString(),
|
||||
operate: 1,
|
||||
isAdmin: 0,
|
||||
isAdmin: state.itemData.value.pwdUserNo!,
|
||||
useCountLimit: 0xffff,
|
||||
startTime:state.itemData.value.startDate! ~/ 1000,
|
||||
endTime:state.itemData.value.endDate! ~/ 1000,
|
||||
startTime:DateTool().dateToTimestamp(state.selectEffectiveDate.value, 1) ~/ 1000,
|
||||
endTime:DateTool().dateToTimestamp(state.selectFailureDate.value, 1) ~/ 1000,
|
||||
needAuthor: 1,
|
||||
isBeforeAddUser: false,
|
||||
signKey: signKeyDataList,
|
||||
@ -73,15 +74,15 @@ class PasswordKeyDetailChangeDateLogic extends BaseGetXController {
|
||||
|
||||
//更新密码请求
|
||||
Future<void> updatePwdRequest() async {
|
||||
var beginTimeTimestamp = state.itemData.value.startDate! ~/ 1000;
|
||||
var endTimeTimestamp = state.itemData.value.endDate! ~/ 1000;
|
||||
var beginTimeTimestamp = DateTool().dateToTimestamp(state.selectEffectiveDate.value, 1);
|
||||
var endTimeTimestamp = DateTool().dateToTimestamp(state.selectFailureDate.value, 1);
|
||||
if (beginTimeTimestamp > endTimeTimestamp ||
|
||||
beginTimeTimestamp == endTimeTimestamp) {
|
||||
showToast("失效时间需大于生效时间");
|
||||
return;
|
||||
}
|
||||
|
||||
if (endTimeTimestamp < DateTime.now().millisecondsSinceEpoch ~/ 1000) {
|
||||
if (endTimeTimestamp < DateTime.now().millisecondsSinceEpoch) {
|
||||
showToast("生效时间需大于当前时间");
|
||||
return;
|
||||
}
|
||||
@ -91,8 +92,8 @@ class PasswordKeyDetailChangeDateLogic extends BaseGetXController {
|
||||
keyboardPwdId: state.itemData.value.keyboardPwdId.toString(),
|
||||
keyboardPwdName: state.itemData.value.keyboardPwdName!,
|
||||
newKeyboardPwd: state.itemData.value.keyboardPwd!,
|
||||
startDate: state.itemData.value.startDate!,
|
||||
endDate: state.itemData.value.endDate!,
|
||||
startDate: beginTimeTimestamp,
|
||||
endDate: endTimeTimestamp,
|
||||
changeType: '1',
|
||||
hoursStart: state.itemData.value.hoursStart!,
|
||||
hoursEnd: state.itemData.value.hoursEnd!,
|
||||
@ -137,8 +138,8 @@ class PasswordKeyDetailChangeDateLogic extends BaseGetXController {
|
||||
operate: 1,
|
||||
isAdmin: state.itemData.value.pwdUserNo!,
|
||||
useCountLimit: 0xffff,
|
||||
startTime:state.itemData.value.startDate! ~/ 1000,
|
||||
endTime:state.itemData.value.endDate! ~/ 1000,
|
||||
startTime:DateTool().dateToTimestamp(state.selectEffectiveDate.value, 1) ~/ 1000,
|
||||
endTime:DateTool().dateToTimestamp(state.selectFailureDate.value, 1) ~/ 1000,
|
||||
needAuthor: 1,
|
||||
isBeforeAddUser: false,
|
||||
signKey: signKeyDataList,
|
||||
|
||||
@ -228,22 +228,18 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
|
||||
case 0xff:
|
||||
// 注册人脸失败
|
||||
showToast("退出添加".tr);
|
||||
Get.close(1);
|
||||
break;
|
||||
case 0xFE:
|
||||
// 管理员已满
|
||||
showToast("管理员已满".tr);
|
||||
Get.close(1);
|
||||
break;
|
||||
case 0xFD:
|
||||
// 用户已满
|
||||
showToast("用户已满".tr);
|
||||
Get.close(1);
|
||||
break;
|
||||
case 0xFC:
|
||||
// 指纹已满
|
||||
showToast("锁上面添加密码已满".tr);
|
||||
Get.close(1);
|
||||
break;
|
||||
case 0xFB:
|
||||
// 指纹已存在
|
||||
|
||||
@ -193,7 +193,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
|
||||
state.nameController),
|
||||
keyBottomWidget(
|
||||
"密码生成后,请在当日23:59前使用,否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。".tr)
|
||||
"清空密码使用一次后失效。清空内容1:今日0点前生成的除自定义以外所有密码(日0点后生成的密码,不受清空密码影响,可继续使用。清空内容2:清空密码使用后,立即清除所有自定义密码。如需彻底清除所有密码,请使用重置所有密码功能".tr)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@ -59,6 +59,7 @@ class SaveLockLogic extends BaseGetXController {
|
||||
case 0x00:
|
||||
//成功 如果成功保存用户编号
|
||||
state.lockUserNo = listChangInt(reply.data.sublist(47, 49));
|
||||
AppLog.log("state.lockUserNo:${state.lockUserNo}");
|
||||
|
||||
// 关闭超时
|
||||
cancelBlueConnetctToastTimer();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user