修复卡、指纹、人脸、遥控、掌静脉、密码数据超过三页之后删除进入详情删除最后一条数据列表卡顿情况
This commit is contained in:
parent
496bf744e5
commit
33a1cecb8e
@ -131,8 +131,7 @@ class CardListLogic extends BaseGetXController {
|
|||||||
privateKey: getPrivateKeyList,
|
privateKey: getPrivateKeyList,
|
||||||
token: getTokenList,
|
token: getTokenList,
|
||||||
isBeforeAddUser: false);
|
isBeforeAddUser: false);
|
||||||
} else if (deviceConnectionState ==
|
} else if (deviceConnectionState == BluetoothConnectionState.disconnected) {
|
||||||
BluetoothConnectionState.disconnected) {
|
|
||||||
dismissEasyLoading();
|
dismissEasyLoading();
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
if (state.ifCurrentScreen.value == true) {
|
if (state.ifCurrentScreen.value == true) {
|
||||||
|
|||||||
@ -110,14 +110,16 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
|||||||
btnName:
|
btnName:
|
||||||
'添加卡'.tr,
|
'添加卡'.tr,
|
||||||
onClick: () async {
|
onClick: () async {
|
||||||
final data = await Get.toNamed(Routers.addCardPage,
|
await Get.toNamed(Routers.addCardPage,
|
||||||
arguments: <String, int>{
|
arguments: <String, int>{
|
||||||
'lockId': state.lockId.value,
|
'lockId': state.lockId.value,
|
||||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
});
|
})!.then((value) {
|
||||||
if (data != null) {
|
|
||||||
getHttpData(isRefresh: true);
|
getHttpData(isRefresh: true);
|
||||||
}
|
});
|
||||||
|
// if (data != null) {
|
||||||
|
// getHttpData(isRefresh: true);
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -174,13 +176,13 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
|||||||
fingerprintItemData.cardName!,
|
fingerprintItemData.cardName!,
|
||||||
logic.getKeyType(fingerprintItemData),
|
logic.getKeyType(fingerprintItemData),
|
||||||
logic.getKeyDateType(fingerprintItemData), () async {
|
logic.getKeyDateType(fingerprintItemData), () async {
|
||||||
final data = await Get.toNamed(Routers.cardDetailPage,
|
await Get.toNamed(Routers.cardDetailPage,
|
||||||
arguments: <String, FingerprintItemData>{
|
arguments: <String, FingerprintItemData>{
|
||||||
'fingerprintItemData': fingerprintItemData,
|
'fingerprintItemData': fingerprintItemData,
|
||||||
});
|
})!.then((value) => getHttpData(isRefresh: true));
|
||||||
if (data != null) {
|
// if (data != null) {
|
||||||
getHttpData(isRefresh: true);
|
// getHttpData(isRefresh: true);
|
||||||
}
|
// }
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -298,7 +298,11 @@ class FaceListLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取人脸列表
|
// 获取人脸列表
|
||||||
Future<FingerprintListDataEntity> getFaceListData() async {
|
Future<FingerprintListDataEntity> getFaceListData({required bool isRefresh}) async {
|
||||||
|
if (isRefresh) {
|
||||||
|
state.faceItemListData.clear();
|
||||||
|
pageNo = 1;
|
||||||
|
}
|
||||||
final FingerprintListDataEntity entity = await ApiRepository.to.getFaceListData(
|
final FingerprintListDataEntity entity = await ApiRepository.to.getFaceListData(
|
||||||
lockId: state.lockId.value.toString(),
|
lockId: state.lockId.value.toString(),
|
||||||
pageNo: pageNo.toString(),
|
pageNo: pageNo.toString(),
|
||||||
@ -307,21 +311,27 @@ class FaceListLogic extends BaseGetXController {
|
|||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
// state.faceItemListData.value = entity.data!.list!;
|
// state.faceItemListData.value = entity.data!.list!;
|
||||||
if (pageNo == 1) {
|
// if (pageNo == 1) {
|
||||||
state.faceItemListData.value = entity.data!.list!;
|
// state.faceItemListData.value = entity.data!.list!;
|
||||||
|
// pageNo++;
|
||||||
|
// } else {
|
||||||
|
// if (entity.data!.list!.isNotEmpty) {
|
||||||
|
// state.faceItemListData.value.addAll(entity.data!.list!);
|
||||||
|
// pageNo++;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
// 更新数据列表
|
||||||
|
state.faceItemListData.addAll(entity.data!.list!);
|
||||||
|
// 更新页码
|
||||||
pageNo++;
|
pageNo++;
|
||||||
} else {
|
|
||||||
if (entity.data!.list!.isNotEmpty) {
|
|
||||||
state.faceItemListData.value.addAll(entity.data!.list!);
|
|
||||||
pageNo++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除的人脸
|
// 删除的人脸
|
||||||
void deletFacesData() async {
|
Future<void> deletFacesData() async {
|
||||||
String faceId = '';
|
String faceId = '';
|
||||||
if (state.isDeletAll == false) {
|
if (state.isDeletAll == false) {
|
||||||
faceId = state.deletKeyID;
|
faceId = state.deletKeyID;
|
||||||
@ -331,9 +341,8 @@ class FaceListLogic extends BaseGetXController {
|
|||||||
lockId: state.lockId.value,
|
lockId: state.lockId.value,
|
||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
showToast('删除成功', something: (){
|
showToast('删除成功'.tr, something: (){
|
||||||
pageNo = 1;
|
getFaceListData(isRefresh: true);
|
||||||
getFaceListData();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -350,9 +359,8 @@ class FaceListLogic extends BaseGetXController {
|
|||||||
lockId: state.lockId.value,
|
lockId: state.lockId.value,
|
||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
showToast('重置成功', something: (){
|
showToast('重置成功'.tr, something: (){
|
||||||
pageNo = 1;
|
getFaceListData(isRefresh: true);
|
||||||
getFaceListData();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -387,8 +395,7 @@ class FaceListLogic extends BaseGetXController {
|
|||||||
late StreamSubscription _teamEvent;
|
late StreamSubscription _teamEvent;
|
||||||
void _initRefreshAction() {
|
void _initRefreshAction() {
|
||||||
_teamEvent = eventBus.on<OtherTypeRefreshListEvent>().listen((OtherTypeRefreshListEvent event) {
|
_teamEvent = eventBus.on<OtherTypeRefreshListEvent>().listen((OtherTypeRefreshListEvent event) {
|
||||||
pageNo = 1;
|
getFaceListData(isRefresh: true);
|
||||||
getFaceListData();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,10 +31,10 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
|||||||
final FaceListLogic logic = Get.put(FaceListLogic());
|
final FaceListLogic logic = Get.put(FaceListLogic());
|
||||||
final FaceListState state = Get.find<FaceListLogic>().state;
|
final FaceListState state = Get.find<FaceListLogic>().state;
|
||||||
|
|
||||||
Future<void> getHttpData() async {
|
Future<void> getHttpData({required bool isRefresh}) async {
|
||||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
logic.getFaceListData().then((FingerprintListDataEntity value) {
|
logic.getFaceListData(isRefresh: isRefresh).then((FingerprintListDataEntity value) {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
getHttpData();
|
getHttpData(isRefresh: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -92,19 +92,17 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
|||||||
),
|
),
|
||||||
body: EasyRefreshTool(
|
body: EasyRefreshTool(
|
||||||
onRefresh: () {
|
onRefresh: () {
|
||||||
logic.pageNo = 1;
|
getHttpData(isRefresh: true);
|
||||||
getHttpData();
|
|
||||||
},
|
},
|
||||||
onLoad: () {
|
onLoad: () {
|
||||||
getHttpData();
|
getHttpData(isRefresh: false);
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
KeySearchWidget(
|
KeySearchWidget(
|
||||||
editingController: state.searchController,
|
editingController: state.searchController,
|
||||||
onSubmittedAction: () {
|
onSubmittedAction: () {
|
||||||
logic.pageNo = 1;
|
getHttpData(isRefresh: true);
|
||||||
getHttpData();
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -115,15 +113,12 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
|||||||
btnName:
|
btnName:
|
||||||
'添加人脸'.tr,
|
'添加人脸'.tr,
|
||||||
onClick: () async {
|
onClick: () async {
|
||||||
final data = await Get.toNamed(Routers.addFaceTypePage,
|
await Get.toNamed(Routers.addFaceTypePage, arguments: <String, int>{
|
||||||
arguments: <String, int>{
|
|
||||||
'lockId': state.lockId.value,
|
'lockId': state.lockId.value,
|
||||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
});
|
})!.then((value) {
|
||||||
if (data != null) {
|
getHttpData(isRefresh: true);
|
||||||
logic.pageNo = 1;
|
});
|
||||||
getHttpData();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(height: 64.h)
|
SizedBox(height: 64.h)
|
||||||
@ -158,14 +153,10 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
|||||||
getFaceItemData.faceName!,
|
getFaceItemData.faceName!,
|
||||||
logic.getKeyType(getFaceItemData),
|
logic.getKeyType(getFaceItemData),
|
||||||
logic.getKeyDateType(getFaceItemData), () async {
|
logic.getKeyDateType(getFaceItemData), () async {
|
||||||
final data = await Get.toNamed(Routers.faceDetailPage,
|
await Get.toNamed(Routers.faceDetailPage,
|
||||||
arguments: <String, FingerprintItemData>{
|
arguments: <String, FingerprintItemData>{
|
||||||
'faceItemData': getFaceItemData,
|
'faceItemData': getFaceItemData,
|
||||||
});
|
})!.then((value) => getHttpData(isRefresh: true));
|
||||||
if (data != null) {
|
|
||||||
logic.pageNo = 1;
|
|
||||||
getHttpData();
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -328,8 +328,7 @@ class FingerprintListLogic extends BaseGetXController {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// 获取指纹列表
|
// 获取指纹列表
|
||||||
Future<FingerprintListDataEntity> getFingerprintsListData(
|
Future<FingerprintListDataEntity> getFingerprintsListData({required bool isRefresh}) async {
|
||||||
{required bool isRefresh}) async {
|
|
||||||
// 如果是下拉刷新,清空已有数据
|
// 如果是下拉刷新,清空已有数据
|
||||||
if (isRefresh) {
|
if (isRefresh) {
|
||||||
state.fingerprintItemListData.clear();
|
state.fingerprintItemListData.clear();
|
||||||
|
|||||||
@ -113,14 +113,14 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
|||||||
btnName:
|
btnName:
|
||||||
'添加指纹'.tr,
|
'添加指纹'.tr,
|
||||||
onClick: () async {
|
onClick: () async {
|
||||||
final data = await Get.toNamed(Routers.addFingerprintTypePage,
|
await Get.toNamed(Routers.addFingerprintTypePage,
|
||||||
arguments: <String, int>{
|
arguments: <String, int>{
|
||||||
'lockId': state.lockId.value,
|
'lockId': state.lockId.value,
|
||||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
});
|
})!.then((value) => getHttpData(isRefresh: true));
|
||||||
if (data != null) {
|
// if (data != null) {
|
||||||
getHttpData(isRefresh: true);
|
// getHttpData(isRefresh: true);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(height: 64.h)
|
SizedBox(height: 64.h)
|
||||||
@ -175,23 +175,21 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
|||||||
fingerprintItemData.fingerprintName!,
|
fingerprintItemData.fingerprintName!,
|
||||||
logic.getKeyType(fingerprintItemData),
|
logic.getKeyType(fingerprintItemData),
|
||||||
logic.getKeyDateType(fingerprintItemData), () async {
|
logic.getKeyDateType(fingerprintItemData), () async {
|
||||||
final data = await Get.toNamed(
|
await Get.toNamed(Routers.fingerprintDetailPage, arguments: <String, FingerprintItemData>{
|
||||||
Routers.fingerprintDetailPage,
|
|
||||||
arguments: <String, FingerprintItemData>{
|
|
||||||
'fingerprintItemData': fingerprintItemData,
|
'fingerprintItemData': fingerprintItemData,
|
||||||
});
|
})!.then((value) {
|
||||||
if (data == 'deletScuess') {
|
getHttpData(isRefresh: true);
|
||||||
state.fingerprintItemListData.removeWhere(
|
});
|
||||||
(FingerprintItemData item) =>
|
// if (data == 'deletScuess') {
|
||||||
item.fingerprintId ==
|
// // state.fingerprintItemListData.removeWhere((FingerprintItemData item) => item.fingerprintId == fingerprintItemData.fingerprintId!);
|
||||||
fingerprintItemData.fingerprintId!);
|
// // setState(() {});
|
||||||
setState(() {});
|
// getHttpData(isRefresh: true);
|
||||||
} else if (data != null) {
|
// } else if (data != null) {
|
||||||
logic
|
// logic
|
||||||
.refreshIndividualKeys(
|
// .refreshIndividualKeys(
|
||||||
fingerprintId: fingerprintItemData.fingerprintId!)
|
// fingerprintId: fingerprintItemData.fingerprintId!)
|
||||||
.then((dynamic value) => setState(() {}));
|
// .then((dynamic value) => setState(() {}));
|
||||||
}
|
// }
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1227,7 +1227,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
fit: BoxFit.fitWidth),
|
fit: BoxFit.fitWidth),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.w),
|
SizedBox(height: 5.w),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(name,
|
child: Text(name,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -1260,7 +1260,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
fit: BoxFit.fitWidth),
|
fit: BoxFit.fitWidth),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 20.h),
|
SizedBox(height: 5.h),
|
||||||
Text(
|
Text(
|
||||||
name,
|
name,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
@ -108,13 +108,13 @@ class UploadElectricQuantityLogic extends BaseGetXController {
|
|||||||
|
|
||||||
// 电池剩余电量
|
// 电池剩余电量
|
||||||
final int battRemCap = reply.data[132];
|
final int battRemCap = reply.data[132];
|
||||||
state.lockSetInfoData.value.lockBasicInfo!.electricQuantity =
|
state.battRemCap.value = battRemCap>100?100:battRemCap;
|
||||||
battRemCap;
|
state.lockSetInfoData.value.lockBasicInfo!.electricQuantity = state.battRemCap.value;
|
||||||
|
|
||||||
// 备用电池剩余电量
|
// 备用电池剩余电量
|
||||||
final int battRemCapStandby = reply.data[133];
|
final int battRemCapStandby = reply.data[133];
|
||||||
state.lockSetInfoData.value.lockBasicInfo!.electricQuantityStandby =
|
state.battRemCapStandby.value = battRemCapStandby>100?100:battRemCapStandby;
|
||||||
battRemCapStandby;
|
state.lockSetInfoData.value.lockBasicInfo!.electricQuantityStandby = state.battRemCapStandby.value;
|
||||||
|
|
||||||
uploadElectricQuantityRequest(
|
uploadElectricQuantityRequest(
|
||||||
battRemCap.toString(), battRemCapStandby.toString());
|
battRemCap.toString(), battRemCapStandby.toString());
|
||||||
|
|||||||
@ -57,23 +57,23 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
"${"电池1".tr}${TranslationLoader.lanKeys!.electricQuantity!.tr}:${state.lockBasicInfo.value.electricQuantity ?? ""}%",
|
"${"电池1".tr}${TranslationLoader.lanKeys!.electricQuantity!.tr}:${state.battRemCap.value}%",
|
||||||
style: TextStyle(fontSize: 20.sp),
|
style: TextStyle(fontSize: 20.sp),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: (state.lockSetInfoData.value.lockFeature ?? LockFeature()).isSupportBackupBattery == 1,
|
visible: (state.lockSetInfoData.value.lockFeature ?? LockFeature()).isSupportBackupBattery == 1,
|
||||||
child: Row(
|
child: Obx(() => Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
"${"电池2".tr}${TranslationLoader.lanKeys!.electricQuantity!.tr}:${state.lockBasicInfo.value.electricQuantityStandby ?? ""}%",
|
"${"电池2".tr}${TranslationLoader.lanKeys!.electricQuantity!.tr}:${state.battRemCapStandby.value}%",
|
||||||
style: TextStyle(fontSize: 20.sp),
|
style: TextStyle(fontSize: 20.sp),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
)),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
Obx(() => Row(
|
Obx(() => Row(
|
||||||
|
|||||||
@ -12,12 +12,16 @@ class UploadElectricQuantityState {// 0普通状态可用 1不可用
|
|||||||
if(lockSetInfoData.value.lockBasicInfo!=null){
|
if(lockSetInfoData.value.lockBasicInfo!=null){
|
||||||
lockBasicInfo.value = lockSetInfoData.value.lockBasicInfo!;
|
lockBasicInfo.value = lockSetInfoData.value.lockBasicInfo!;
|
||||||
uploadElectricQuantityDate.value = lockSetInfoData.value.lockBasicInfo!.electricQuantityDate!;
|
uploadElectricQuantityDate.value = lockSetInfoData.value.lockBasicInfo!.electricQuantityDate!;
|
||||||
|
battRemCap.value = lockSetInfoData.value.lockBasicInfo!.electricQuantity ?? 0;
|
||||||
|
battRemCapStandby.value = lockSetInfoData.value.lockBasicInfo!.electricQuantityStandby ?? 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rx<LockSetInfoData> lockSetInfoData = LockSetInfoData().obs;
|
Rx<LockSetInfoData> lockSetInfoData = LockSetInfoData().obs;
|
||||||
Rx<LockBasicInfo> lockBasicInfo = LockBasicInfo().obs;
|
Rx<LockBasicInfo> lockBasicInfo = LockBasicInfo().obs;
|
||||||
RxInt uploadElectricQuantityDate = 0.obs;
|
RxInt uploadElectricQuantityDate = 0.obs;
|
||||||
|
RxInt battRemCap = 0.obs;
|
||||||
|
RxInt battRemCapStandby = 0.obs;
|
||||||
int differentialTime = 0;
|
int differentialTime = 0;
|
||||||
|
|
||||||
RxBool ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
RxBool ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||||
|
|||||||
@ -108,13 +108,13 @@ class _PalmListPageState extends State<PalmListPage> with RouteAware {
|
|||||||
AddBottomWhiteBtn(
|
AddBottomWhiteBtn(
|
||||||
btnName: '添加掌静脉',
|
btnName: '添加掌静脉',
|
||||||
onClick: () async {
|
onClick: () async {
|
||||||
final data = await Get.toNamed(Routers.addPalmTypePage, arguments: <String, int>{
|
await Get.toNamed(Routers.addPalmTypePage, arguments: <String, int>{
|
||||||
'lockId': state.lockId.value,
|
'lockId': state.lockId.value,
|
||||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
});
|
})!.then((value) => getHttpData(isRefresh: true));
|
||||||
if (data != null) {
|
// if (data != null) {
|
||||||
getHttpData(isRefresh: true);
|
// getHttpData(isRefresh: true);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -171,13 +171,13 @@ class _PalmListPageState extends State<PalmListPage> with RouteAware {
|
|||||||
fingerprintItemData.palmVeinName!,
|
fingerprintItemData.palmVeinName!,
|
||||||
logic.getKeyType(fingerprintItemData),
|
logic.getKeyType(fingerprintItemData),
|
||||||
logic.getKeyDateType(fingerprintItemData), () async {
|
logic.getKeyDateType(fingerprintItemData), () async {
|
||||||
final data = await Get.toNamed(Routers.palmDetailPage,
|
final data = await Get.toNamed(Routers.palmDetailPage,
|
||||||
arguments: <String, FingerprintItemData>{
|
arguments: <String, FingerprintItemData>{
|
||||||
'fingerprintItemData': fingerprintItemData,
|
'fingerprintItemData': fingerprintItemData,
|
||||||
});
|
})!.then((value) => getHttpData(isRefresh: true));
|
||||||
if (data != null) {
|
// if (data != null) {
|
||||||
getHttpData(isRefresh: true);
|
// getHttpData(isRefresh: true);
|
||||||
}
|
// }
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -112,12 +112,11 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
|||||||
),
|
),
|
||||||
AddBottomWhiteBtn(
|
AddBottomWhiteBtn(
|
||||||
btnName: '获取密码'.tr,
|
btnName: '获取密码'.tr,
|
||||||
onClick: () {
|
onClick: () async {
|
||||||
Navigator.pushNamed(
|
await Get.toNamed(Routers.passwordKeyPerpetualPage,
|
||||||
context, Routers.passwordKeyPerpetualPage,
|
|
||||||
arguments: <String, LockListInfoItemEntity>{
|
arguments: <String, LockListInfoItemEntity>{
|
||||||
'keyInfo': state.keyInfo.value
|
'keyInfo': state.keyInfo.value
|
||||||
}).then((Object? val) {
|
})!.then((Object? val) {
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
getHttpData(isRefresh: true);
|
getHttpData(isRefresh: true);
|
||||||
}
|
}
|
||||||
@ -179,25 +178,26 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: _electronicKeyItem(index, 'images/icon_password.png',
|
child: _electronicKeyItem(index, 'images/icon_password.png',
|
||||||
passwordKeyListItem.keyboardPwdName!, useDateStr, () {
|
passwordKeyListItem.keyboardPwdName!, useDateStr, () async {
|
||||||
Navigator.pushNamed(context, Routers.passwordKeyDetailPage,
|
await Get.toNamed(Routers.passwordKeyDetailPage,
|
||||||
arguments: <String, PasswordKeyListItem>{
|
arguments: <String, PasswordKeyListItem>{
|
||||||
'itemData': passwordKeyListItem
|
'itemData': passwordKeyListItem
|
||||||
}).then((Object? val) {
|
})!.then((Object? val) {
|
||||||
if (val == 'deletScuess') {
|
getHttpData(isRefresh: true);
|
||||||
state.itemDataList.removeWhere(
|
// if (val == 'deletScuess') {
|
||||||
(PasswordKeyListItem item) =>
|
// state.itemDataList.removeWhere(
|
||||||
item.keyboardPwdId ==
|
// (PasswordKeyListItem item) =>
|
||||||
passwordKeyListItem.keyboardPwdId!);
|
// item.keyboardPwdId ==
|
||||||
setState(() {});
|
// passwordKeyListItem.keyboardPwdId!);
|
||||||
} else if (val != null) {
|
// setState(() {});
|
||||||
logic
|
// } else if (val != null) {
|
||||||
.refreshIndividualKeys(
|
// logic
|
||||||
lockId: passwordKeyListItem.lockId!,
|
// .refreshIndividualKeys(
|
||||||
keyboardPwdId:
|
// lockId: passwordKeyListItem.lockId!,
|
||||||
passwordKeyListItem.keyboardPwdId!)
|
// keyboardPwdId:
|
||||||
.then((dynamic value) => setState(() {}));
|
// passwordKeyListItem.keyboardPwdId!)
|
||||||
}
|
// .then((dynamic value) => setState(() {}));
|
||||||
|
// }
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -110,14 +110,14 @@ class _RemoteControlListPageState extends State<RemoteControlListPage> with Rout
|
|||||||
btnName:
|
btnName:
|
||||||
'添加遥控',
|
'添加遥控',
|
||||||
onClick: () async {
|
onClick: () async {
|
||||||
final data = await Get.toNamed(Routers.addRemoteControlTypePage,
|
await Get.toNamed(Routers.addRemoteControlTypePage,
|
||||||
arguments: <String, int>{
|
arguments: <String, int>{
|
||||||
'lockId': state.lockId.value,
|
'lockId': state.lockId.value,
|
||||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
});
|
})!.then((value) => getHttpData(isRefresh: true));
|
||||||
if (data != null) {
|
// if (data != null) {
|
||||||
getHttpData(isRefresh: true);
|
// getHttpData(isRefresh: true);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -172,13 +172,13 @@ class _RemoteControlListPageState extends State<RemoteControlListPage> with Rout
|
|||||||
fingerprintItemData.remoteName!,
|
fingerprintItemData.remoteName!,
|
||||||
logic.getKeyType(fingerprintItemData),
|
logic.getKeyType(fingerprintItemData),
|
||||||
logic.getKeyDateType(fingerprintItemData), () async {
|
logic.getKeyDateType(fingerprintItemData), () async {
|
||||||
final data = await Get.toNamed(Routers.remoteControlDetailPage,
|
await Get.toNamed(Routers.remoteControlDetailPage,
|
||||||
arguments: <String, FingerprintItemData>{
|
arguments: <String, FingerprintItemData>{
|
||||||
'fingerprintItemData': fingerprintItemData,
|
'fingerprintItemData': fingerprintItemData,
|
||||||
});
|
})!.then((data) {
|
||||||
if (data != null) {
|
|
||||||
getHttpData(isRefresh: true);
|
getHttpData(isRefresh: true);
|
||||||
}
|
});
|
||||||
|
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user