1,新增门锁日志页面类(未完成)
This commit is contained in:
parent
b107e19f69
commit
8d3b11d548
@ -9,6 +9,7 @@
|
|||||||
"remoteControl":"RemoteControl",
|
"remoteControl":"RemoteControl",
|
||||||
"face":"face",
|
"face":"face",
|
||||||
"operatingRecord":"Operating Record",
|
"operatingRecord":"Operating Record",
|
||||||
|
"doorLockLog":"Door lock log",
|
||||||
"number":"Number",
|
"number":"Number",
|
||||||
"additive":"Additive",
|
"additive":"Additive",
|
||||||
"addTime":"Add Time",
|
"addTime":"Add Time",
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
"remoteControl":"remoteControl",
|
"remoteControl":"remoteControl",
|
||||||
"face":"face",
|
"face":"face",
|
||||||
"operatingRecord":"operatingRecord",
|
"operatingRecord":"operatingRecord",
|
||||||
|
"doorLockLog":"doorLockLog",
|
||||||
"number":"number",
|
"number":"number",
|
||||||
"additive":"additive",
|
"additive":"additive",
|
||||||
"addTime":"addTime",
|
"addTime":"addTime",
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
"remoteControl":"遥控",
|
"remoteControl":"遥控",
|
||||||
"face":"人脸",
|
"face":"人脸",
|
||||||
"operatingRecord":"操作记录",
|
"operatingRecord":"操作记录",
|
||||||
|
"doorLockLog":"门锁日志",
|
||||||
"number":"号",
|
"number":"号",
|
||||||
"additive":"添加者",
|
"additive":"添加者",
|
||||||
"addTime":"添加时间",
|
"addTime":"添加时间",
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
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/doorLockLog/doorLockLog_page.dart';
|
||||||
|
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_page.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';
|
||||||
@ -408,6 +409,7 @@ abstract class Routers {
|
|||||||
static const passwordKeyDetailChangeDatePage =
|
static const passwordKeyDetailChangeDatePage =
|
||||||
'/passwordKeyDetailChangeDatePage'; //密码更改时间
|
'/passwordKeyDetailChangeDatePage'; //密码更改时间
|
||||||
static const realTimePicturePage = '/realTimePicturePage'; //实时监控画面
|
static const realTimePicturePage = '/realTimePicturePage'; //实时监控画面
|
||||||
|
static const doorLockLogPage = '/doorLockLogPage'; //门锁日志
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class AppRouters {
|
abstract class AppRouters {
|
||||||
@ -993,6 +995,7 @@ abstract class AppRouters {
|
|||||||
page: () => const PasswordKeyDetailChangeDatePage()),
|
page: () => const PasswordKeyDetailChangeDatePage()),
|
||||||
GetPage(
|
GetPage(
|
||||||
name: Routers.realTimePicturePage,
|
name: Routers.realTimePicturePage,
|
||||||
page: () => const RealTimePicturePage())
|
page: () => const RealTimePicturePage()),
|
||||||
|
GetPage(name: Routers.doorLockLogPage, page: () => const DoorLockLogPage())
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
280
star_lock/lib/main/lockDetail/doorLockLog/doorLockLog_logic.dart
Normal file
280
star_lock/lib/main/lockDetail/doorLockLog/doorLockLog_logic.dart
Normal file
@ -0,0 +1,280 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
|
import 'package:flutter_reactive_ble/flutter_reactive_ble.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_state.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/lockOperatingRecord/lockOperatingRecordGetLastRecordTime_entity.dart';
|
||||||
|
import 'package:star_lock/tools/toast.dart';
|
||||||
|
|
||||||
|
import '../../../blue/blue_manage.dart';
|
||||||
|
import '../../../blue/io_protocol/io_referEventRecordTime.dart';
|
||||||
|
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 '../../../network/api_repository.dart';
|
||||||
|
import '../../../tools/baseGetXController.dart';
|
||||||
|
import '../../../tools/storage.dart';
|
||||||
|
import '../electronicKey/electronicKeyDetail/keyOperationRecordEntity.dart';
|
||||||
|
|
||||||
|
class DoorLockLogLogic extends BaseGetXController {
|
||||||
|
DoorLockLogState state = DoorLockLogState();
|
||||||
|
|
||||||
|
// 获取解析后的数据
|
||||||
|
late StreamSubscription<Reply> _replySubscription;
|
||||||
|
void _initReplySubscription() {
|
||||||
|
_replySubscription =
|
||||||
|
EventBusManager().eventBus!.on<Reply>().listen((reply) {
|
||||||
|
// if(reply is SenderReferEventRecordNumberReply) {
|
||||||
|
// _replyReferEventRecordNumber(reply);
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (reply is SenderReferEventRecordTimeReply) {
|
||||||
|
_replyReferEventRecordTime(reply);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据数量查解析数据
|
||||||
|
// Future<void> _replyReferEventRecordNumber(Reply reply) async {
|
||||||
|
// int status = reply.data[2];
|
||||||
|
// switch(status){
|
||||||
|
// case 0x00:
|
||||||
|
// //成功
|
||||||
|
// print("${reply.commandType}数据解析成功");
|
||||||
|
// // _getLockStatus();
|
||||||
|
// break;
|
||||||
|
// case 0x06:
|
||||||
|
// //无权限
|
||||||
|
// print("${reply.commandType}需要鉴权");
|
||||||
|
//
|
||||||
|
// break;
|
||||||
|
// case 0x07:
|
||||||
|
// //无权限
|
||||||
|
// print("${reply.commandType}用户无权限");
|
||||||
|
//
|
||||||
|
// break;
|
||||||
|
// case 0x09:
|
||||||
|
// // 权限校验错误
|
||||||
|
// print("${reply.commandType}权限校验错误");
|
||||||
|
//
|
||||||
|
// break;
|
||||||
|
// default:
|
||||||
|
// //失败
|
||||||
|
// print("${reply.commandType}失败");
|
||||||
|
//
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 根据时间查解析数据
|
||||||
|
Future<void> _replyReferEventRecordTime(Reply reply) async {
|
||||||
|
int status = reply.data[2];
|
||||||
|
switch (status) {
|
||||||
|
case 0x00:
|
||||||
|
//成功
|
||||||
|
print("${reply.commandType}数据解析成功");
|
||||||
|
if (reply.data[5] > 0) {
|
||||||
|
reply.data.removeRange(0, 6);
|
||||||
|
// 把得到的数据按8位分割成数组 然后塞进一个新的数组里面
|
||||||
|
var getList = splitList(reply.data, 8);
|
||||||
|
print("getList:$getList");
|
||||||
|
var uploadList = [];
|
||||||
|
for (int i = 0; i < getList.length; i++) {
|
||||||
|
var indexList = getList[i];
|
||||||
|
print("indexList:$indexList");
|
||||||
|
var indexMap = {};
|
||||||
|
indexMap["seq"] = indexList[0].toString();
|
||||||
|
indexMap["user"] = indexList[3].toString();
|
||||||
|
indexMap["pwd"] = indexList[2].toString();
|
||||||
|
indexMap["success"] = "1";
|
||||||
|
indexMap["type"] = indexList[1].toString();
|
||||||
|
|
||||||
|
int value = ((0xff & indexList[(4)]) << 24 |
|
||||||
|
(0xff & indexList[5]) << 16 |
|
||||||
|
(0xff & indexList[6]) << 8 |
|
||||||
|
(0xFF & indexList[7]));
|
||||||
|
// indexMap["date"] = DateTool().dateToYMDHNSString("$value");
|
||||||
|
// print("value:${DateTool().dateToYMDHNSString("$value")}");
|
||||||
|
|
||||||
|
indexMap["date"] = "${value * 1000}";
|
||||||
|
uploadList.add(indexMap);
|
||||||
|
}
|
||||||
|
lockRecordUploadData(uploadList);
|
||||||
|
// print("reply.data:${reply.data} getList:$getList}");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 0x06:
|
||||||
|
//无权限
|
||||||
|
print("${reply.commandType}需要鉴权");
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 0x07:
|
||||||
|
//无权限
|
||||||
|
print("${reply.commandType}用户无权限");
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 0x09:
|
||||||
|
// 权限校验错误
|
||||||
|
print("${reply.commandType}权限校验错误");
|
||||||
|
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
//失败
|
||||||
|
print("${reply.commandType}失败");
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询事件记录(页数查询)
|
||||||
|
// Future<void> senderReferEventRecordNumber() async {
|
||||||
|
// BlueManage().bludSendData(BlueManage().connectDeviceMacAddress, BlueManage().connectDeviceName, (DeviceConnectionState state) async {
|
||||||
|
// if (state == DeviceConnectionState.connected) {
|
||||||
|
// var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
|
// List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
|
//
|
||||||
|
// var token = await Storage.getStringList(saveBlueToken);
|
||||||
|
// List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
//
|
||||||
|
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
|
// List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
||||||
|
//
|
||||||
|
// IoSenderManage.senderReferEventRecordNumberCommand(
|
||||||
|
// keyID:BlueManage().connectDeviceName,
|
||||||
|
// userID:await Storage.getUid(),
|
||||||
|
// logsCount:20,
|
||||||
|
// logsNo:1,
|
||||||
|
// token:getTokenList,
|
||||||
|
// needAuthor:1,
|
||||||
|
// publicKey:getPublicKeyList,
|
||||||
|
// privateKey:getPrivateKeyList,
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 查询事件记录(时间查询)
|
||||||
|
Future<void> senderReferEventRecordTime(int time) async {
|
||||||
|
BlueManage().bludSendData(BlueManage().connectDeviceName,
|
||||||
|
(DeviceConnectionState state) async {
|
||||||
|
if (state == DeviceConnectionState.connected) {
|
||||||
|
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
|
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
|
var token = await Storage.getStringList(saveBlueToken);
|
||||||
|
List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
|
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
|
List<int> getPublicKeyList = changeStringListToIntList(publicKey!);
|
||||||
|
|
||||||
|
EasyLoading.show();
|
||||||
|
IoSenderManage.senderReferEventRecordTimeCommand(
|
||||||
|
keyID: BlueManage().connectDeviceName,
|
||||||
|
userID: await Storage.getUid(),
|
||||||
|
logsCount: 20,
|
||||||
|
// time:DateTime.now().millisecondsSinceEpoch~/1000,
|
||||||
|
time: time,
|
||||||
|
token: getTokenList,
|
||||||
|
needAuthor: 1,
|
||||||
|
publicKey: getPublicKeyList,
|
||||||
|
privateKey: getPrivateKeyList,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//请求操作记录列表
|
||||||
|
void mockNetworkDataRequest() async {
|
||||||
|
KeyOperationRecordEntity entity = await ApiRepository.to.lockRecordList(
|
||||||
|
'',
|
||||||
|
"",
|
||||||
|
'0',
|
||||||
|
state.keyInfos.value.lockId.toString(),
|
||||||
|
'1',
|
||||||
|
'1',
|
||||||
|
'20',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'');
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
print("操作记录列表成功:${entity.data?.itemList}");
|
||||||
|
state.lockOperatingRecordListData.value = entity.data!.itemList!;
|
||||||
|
} else {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询锁记录最后时间
|
||||||
|
void getLockRecordLastUploadDataTime() async {
|
||||||
|
LockOperatingRecordGetLastRecordTimeEntity entity = await ApiRepository.to
|
||||||
|
.getLockRecordLastUploadDataTime(
|
||||||
|
lockId: state.keyInfos.value.lockId.toString());
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
senderReferEventRecordTime(entity.data!.operateDate! ~/ 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 操作记录上传
|
||||||
|
void lockRecordUploadData(List list) async {
|
||||||
|
KeyOperationRecordEntity entity = await ApiRepository.to
|
||||||
|
.lockRecordUploadData(
|
||||||
|
lockId: state.keyInfos.value.lockId.toString(), records: list);
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
mockNetworkDataRequest();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//清空操作记录
|
||||||
|
void clearOperationRecordRequest() async {
|
||||||
|
KeyOperationRecordEntity entity =
|
||||||
|
await ApiRepository.to.clearOperationRecord('28');
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
Toast.show(msg: "清除数据成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> onReady() async {
|
||||||
|
// TODO: implement onReady
|
||||||
|
super.onReady();
|
||||||
|
print("onReady()");
|
||||||
|
|
||||||
|
// 获取是否是演示模式 演示模式不获取接口
|
||||||
|
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
|
if (isDemoMode == false) {
|
||||||
|
_initReplySubscription();
|
||||||
|
|
||||||
|
mockNetworkDataRequest();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> onInit() async {
|
||||||
|
// TODO: implement onInit
|
||||||
|
super.onInit();
|
||||||
|
print("onInit()");
|
||||||
|
|
||||||
|
// 获取是否是演示模式 演示模式不获取接口
|
||||||
|
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
|
if (isDemoMode == false) {
|
||||||
|
getLockRecordLastUploadDataTime();
|
||||||
|
// senderReferEventRecordTime();
|
||||||
|
// senderReferEventRecordNumber();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> onClose() async {
|
||||||
|
// TODO: implement onClose
|
||||||
|
super.onClose();
|
||||||
|
|
||||||
|
// 获取是否是演示模式 演示模式不获取接口
|
||||||
|
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
|
if (isDemoMode == false) {
|
||||||
|
_replySubscription.cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
142
star_lock/lib/main/lockDetail/doorLockLog/doorLockLog_page.dart
Normal file
142
star_lock/lib/main/lockDetail/doorLockLog/doorLockLog_page.dart
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_advanced_calendar/flutter_advanced_calendar.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_logic.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecordEntity.dart';
|
||||||
|
|
||||||
|
import '../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../tools/custom_bottom_sheet.dart';
|
||||||
|
import '../../../tools/noData.dart';
|
||||||
|
import '../../../tools/storage.dart';
|
||||||
|
import '../../../tools/titleAppBar.dart';
|
||||||
|
import '../../../tools/toast.dart';
|
||||||
|
import '../../../translations/trans_lib.dart';
|
||||||
|
|
||||||
|
class DoorLockLogPage extends StatefulWidget {
|
||||||
|
const DoorLockLogPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<DoorLockLogPage> createState() => _DoorLockLogPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DoorLockLogPageState extends State<DoorLockLogPage> {
|
||||||
|
final logic = Get.put(DoorLockLogLogic());
|
||||||
|
final state = Get.find<DoorLockLogLogic>().state;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
|
appBar: TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.doorLockLog!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
actionsList: [
|
||||||
|
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) {
|
||||||
|
// JhPopMenus.showLinePop(context, clickCallback: (index, selText) {
|
||||||
|
// print('选中index: $index');
|
||||||
|
// print('选中text: $selText');
|
||||||
|
// if (index == 0) {
|
||||||
|
// logic.mockNetworkDataRequest();
|
||||||
|
// } else if (index == 1) {
|
||||||
|
// logic.clearOperationRecordRequest();
|
||||||
|
// }
|
||||||
|
// }, listData: [
|
||||||
|
// {'text': '读取记录'},
|
||||||
|
// {'text': '清空记录'},
|
||||||
|
// {'text': '导出记录'},
|
||||||
|
// ]);
|
||||||
|
|
||||||
|
_openModalBottomSheet();
|
||||||
|
} else {
|
||||||
|
// Get.toNamed(Routers.seletLockTypePage);
|
||||||
|
Toast.show(msg: "演示模式");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
AdvancedCalendar(
|
||||||
|
controller: state.calendarControllerCustom,
|
||||||
|
events: state.events,
|
||||||
|
weekLineHeight: 50.0.h,
|
||||||
|
startWeekDay: 1,
|
||||||
|
innerDot: true,
|
||||||
|
keepLineSize: true,
|
||||||
|
calendarTextStyle: TextStyle(
|
||||||
|
fontSize: 22.sp,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
height: 1.3125,
|
||||||
|
letterSpacing: 0,
|
||||||
|
),
|
||||||
|
headerStyle: TextStyle(
|
||||||
|
fontSize: 22.sp,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
height: 1.3125,
|
||||||
|
letterSpacing: 0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
String getTypeIcon(int type) {
|
||||||
|
String title = 'images/controls_user.png';
|
||||||
|
switch (type) {
|
||||||
|
case 1:
|
||||||
|
// 蓝牙开锁
|
||||||
|
title = 'images/controls_user.png';
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
// 密码开锁
|
||||||
|
title = 'images/icon_password.png';
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
// ic卡
|
||||||
|
title = 'images/icon_card.png';
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
// 指纹开锁
|
||||||
|
title = 'images/icon_fingerprint.png';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future _openModalBottomSheet() async {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadiusDirectional.circular(10)),
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return AlertBottomWidget(
|
||||||
|
topTitle: '',
|
||||||
|
items: const ['读取记录', '清空记录', '导出记录'],
|
||||||
|
chooseCallback: (value) {
|
||||||
|
int getSelectIndex = value;
|
||||||
|
if (getSelectIndex == 0) {
|
||||||
|
logic.mockNetworkDataRequest();
|
||||||
|
} else if (getSelectIndex == 1) {
|
||||||
|
logic.clearOperationRecordRequest();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
import 'package:flutter_advanced_calendar/flutter_advanced_calendar.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../lockMian/entity/lockListInfo_entity.dart';
|
||||||
|
import '../electronicKey/electronicKeyDetail/keyOperationRecordEntity.dart';
|
||||||
|
|
||||||
|
class DoorLockLogState {
|
||||||
|
final keyInfos = LockListInfoItemEntity().obs;
|
||||||
|
final lockOperatingRecordListData = <KeyRecordDataItem>[].obs;
|
||||||
|
final calendarControllerToday = AdvancedCalendarController.today();
|
||||||
|
final calendarControllerCustom =
|
||||||
|
AdvancedCalendarController(DateTime(2024, 01, 09));
|
||||||
|
final events = <DateTime>[
|
||||||
|
DateTime.now(),
|
||||||
|
DateTime(2024, 10, 10),
|
||||||
|
];
|
||||||
|
|
||||||
|
DoorLockLogState() {
|
||||||
|
keyInfos.value = Get.arguments["keyInfo"];
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -434,7 +434,9 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
// 操作记录
|
// 操作记录
|
||||||
bottomItem('images/main/icon_main_operatingRecord.png',
|
bottomItem('images/main/icon_main_operatingRecord.png',
|
||||||
TranslationLoader.lanKeys!.operatingRecord!.tr, () {
|
TranslationLoader.lanKeys!.operatingRecord!.tr, () {
|
||||||
Get.toNamed(Routers.lockOperatingRecordPage,
|
// Get.toNamed(Routers.lockOperatingRecordPage,
|
||||||
|
// arguments: {"keyInfo": widget.lockListInfoItemEntity});
|
||||||
|
Get.toNamed(Routers.doorLockLogPage,
|
||||||
arguments: {"keyInfo": widget.lockListInfoItemEntity});
|
arguments: {"keyInfo": widget.lockListInfoItemEntity});
|
||||||
}),
|
}),
|
||||||
// 视频日志
|
// 视频日志
|
||||||
@ -561,7 +563,9 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
state.iSOpenLock.value == true ? 'images/main/unlocked_bg.png' : 'images/main/locked_bg.png',
|
state.iSOpenLock.value == true
|
||||||
|
? 'images/main/unlocked_bg.png'
|
||||||
|
: 'images/main/locked_bg.png',
|
||||||
width: 358.w,
|
width: 358.w,
|
||||||
height: 348.h,
|
height: 348.h,
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
class LanKeyEntity {
|
class LanKeyEntity {
|
||||||
LanKeyEntity(
|
LanKeyEntity({
|
||||||
{this.starLock,
|
this.starLock,
|
||||||
this.clickUnlockAndHoldDownClose,
|
this.clickUnlockAndHoldDownClose,
|
||||||
this.checkingIn,
|
this.checkingIn,
|
||||||
this.electronicKey,
|
this.electronicKey,
|
||||||
@ -10,6 +10,7 @@ class LanKeyEntity {
|
|||||||
this.remoteControl,
|
this.remoteControl,
|
||||||
this.face,
|
this.face,
|
||||||
this.operatingRecord,
|
this.operatingRecord,
|
||||||
|
this.doorLockLog,
|
||||||
this.number,
|
this.number,
|
||||||
this.additive,
|
this.additive,
|
||||||
this.addTime,
|
this.addTime,
|
||||||
@ -464,6 +465,7 @@ class LanKeyEntity {
|
|||||||
remoteControl = json['remoteControl'];
|
remoteControl = json['remoteControl'];
|
||||||
face = json['face'];
|
face = json['face'];
|
||||||
operatingRecord = json['operatingRecord'];
|
operatingRecord = json['operatingRecord'];
|
||||||
|
doorLockLog = json['doorLockLog'];
|
||||||
number = json['number'];
|
number = json['number'];
|
||||||
additive = json['additive'];
|
additive = json['additive'];
|
||||||
addTime = json['addTime'];
|
addTime = json['addTime'];
|
||||||
@ -905,7 +907,8 @@ class LanKeyEntity {
|
|||||||
openingDirectionSet = json['openingDirectionSet'];
|
openingDirectionSet = json['openingDirectionSet'];
|
||||||
motorPowerSetting = json['motorPowerSetting'];
|
motorPowerSetting = json['motorPowerSetting'];
|
||||||
bluetoothBroadcast = json['bluetoothBroadcast'];
|
bluetoothBroadcast = json['bluetoothBroadcast'];
|
||||||
whetherInternetRequiredWhenUnlocking = json['whetherInternetRequiredWhenUnlocking'];
|
whetherInternetRequiredWhenUnlocking =
|
||||||
|
json['whetherInternetRequiredWhenUnlocking'];
|
||||||
selectTheLockToJoinTheGroup = json['selectTheLockToJoinTheGroup'];
|
selectTheLockToJoinTheGroup = json['selectTheLockToJoinTheGroup'];
|
||||||
lockTrCount = json['lockTrCount'];
|
lockTrCount = json['lockTrCount'];
|
||||||
xiaomiIOTPlatform = json['xiaomiIOTPlatform'];
|
xiaomiIOTPlatform = json['xiaomiIOTPlatform'];
|
||||||
@ -950,6 +953,7 @@ class LanKeyEntity {
|
|||||||
String? remoteControl;
|
String? remoteControl;
|
||||||
String? face;
|
String? face;
|
||||||
String? operatingRecord;
|
String? operatingRecord;
|
||||||
|
String? doorLockLog;
|
||||||
String? number;
|
String? number;
|
||||||
String? additive;
|
String? additive;
|
||||||
String? addTime;
|
String? addTime;
|
||||||
@ -1426,6 +1430,7 @@ class LanKeyEntity {
|
|||||||
map['remoteControl'] = remoteControl;
|
map['remoteControl'] = remoteControl;
|
||||||
map['face'] = face;
|
map['face'] = face;
|
||||||
map['operatingRecord'] = operatingRecord;
|
map['operatingRecord'] = operatingRecord;
|
||||||
|
map['doorLockLog'] = doorLockLog;
|
||||||
map['number'] = number;
|
map['number'] = number;
|
||||||
map['additive'] = additive;
|
map['additive'] = additive;
|
||||||
map['addTime'] = addTime;
|
map['addTime'] = addTime;
|
||||||
@ -1864,7 +1869,8 @@ class LanKeyEntity {
|
|||||||
map['openingDirectionSet'] = openingDirectionSet;
|
map['openingDirectionSet'] = openingDirectionSet;
|
||||||
map['motorPowerSetting'] = motorPowerSetting;
|
map['motorPowerSetting'] = motorPowerSetting;
|
||||||
map['bluetoothBroadcast'] = bluetoothBroadcast;
|
map['bluetoothBroadcast'] = bluetoothBroadcast;
|
||||||
map['whetherInternetRequiredWhenUnlocking'] = whetherInternetRequiredWhenUnlocking;
|
map['whetherInternetRequiredWhenUnlocking'] =
|
||||||
|
whetherInternetRequiredWhenUnlocking;
|
||||||
map['selectTheLockToJoinTheGroup'] = selectTheLockToJoinTheGroup;
|
map['selectTheLockToJoinTheGroup'] = selectTheLockToJoinTheGroup;
|
||||||
map['lockTrCount'] = lockTrCount;
|
map['lockTrCount'] = lockTrCount;
|
||||||
map['xiaomiIOTPlatform'] = xiaomiIOTPlatform;
|
map['xiaomiIOTPlatform'] = xiaomiIOTPlatform;
|
||||||
|
|||||||
@ -134,6 +134,8 @@ dependencies:
|
|||||||
flutter_voice_processor: ^1.1.0
|
flutter_voice_processor: ^1.1.0
|
||||||
#监听网络连接状态
|
#监听网络连接状态
|
||||||
connectivity_plus: ^5.0.2
|
connectivity_plus: ^5.0.2
|
||||||
|
flutter_advanced_calendar: ^1.4.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user