1,新增锁详情页面根据后台返回权限是否有虹膜、手掌
2,虹膜、手掌的国际化添加 3,新增停止语音播放的方法 4,删除操作日志的测试数据json文件
This commit is contained in:
parent
a45957f284
commit
73aa9b736f
@ -1,77 +0,0 @@
|
||||
{
|
||||
"errorCode": 0,
|
||||
"description": "success",
|
||||
"errorMsg": "success",
|
||||
"data": {
|
||||
"list": [{
|
||||
"recordId": 42672,
|
||||
"lockId": 1744,
|
||||
"lockAlias": "T9A_d7d74b2f66b8",
|
||||
"recordType": 130,
|
||||
"recordTypeName": "防拆报警",
|
||||
"username": "",
|
||||
"operateDate": 1705852800000,
|
||||
"imagesUrl": null,
|
||||
"videoUrl": null,
|
||||
"headUrl": "",
|
||||
"userid": ""
|
||||
},
|
||||
{
|
||||
"recordId": 42660,
|
||||
"lockId": 1744,
|
||||
"lockAlias": "T9A_d7d74b2f66b8",
|
||||
"recordType": 220,
|
||||
"recordTypeName": "逗留检测",
|
||||
"username": "",
|
||||
"operateDate": 1706494730335,
|
||||
"imagesUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706494718\/54c5044a-93bd-466d-a123-e1face292841.jpg",
|
||||
"videoUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706494718\/08a2b732-536b-4f06-9d20-778fdf94f137.mp4",
|
||||
"headUrl": "",
|
||||
"userid": ""
|
||||
},
|
||||
{
|
||||
"recordId": 42659,
|
||||
"lockId": 1744,
|
||||
"lockAlias": "T9A_d7d74b2f66b8",
|
||||
"recordType": 220,
|
||||
"recordTypeName": "逗留检测",
|
||||
"username": "",
|
||||
"operateDate": 1706494672036,
|
||||
"imagesUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706494660\/d85dcea0-c402-4f68-8664-5641a0feabe3.jpg",
|
||||
"videoUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706494660\/f3de0384-63f8-4177-9611-d8c43707afce.mp4",
|
||||
"headUrl": "",
|
||||
"userid": ""
|
||||
},
|
||||
{
|
||||
"recordId": 42658,
|
||||
"lockId": 1744,
|
||||
"lockAlias": "T9A_d7d74b2f66b8",
|
||||
"recordType": 130,
|
||||
"recordTypeName": "防拆报警",
|
||||
"username": "",
|
||||
"operateDate": 1706493793884,
|
||||
"imagesUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706493778\/f43ec840-ddaa-4d94-b759-7ae4384edd8f.jpg",
|
||||
"videoUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706493778\/b4a90c5c-d86f-4995-8365-d7e21a67a48d.mp4",
|
||||
"headUrl": "",
|
||||
"userid": ""
|
||||
},
|
||||
{
|
||||
"recordId": 42657,
|
||||
"lockId": 1744,
|
||||
"lockAlias": "T9A_d7d74b2f66b8",
|
||||
"recordType": 130,
|
||||
"recordTypeName": "防拆报警",
|
||||
"username": "",
|
||||
"operateDate": 1706493715812,
|
||||
"imagesUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706493702\/928c2b1d-1cd4-4d7f-9e61-e9315f8c4547.jpg",
|
||||
"videoUrl": "http:\/\/oss-pre-starlock.star-lock.cn\/starchart\/T9A_d7d74b2f66b8-1706493702\/29e8b8e4-cd79-436d-a384-3e50dacf5cc8.mp4",
|
||||
"headUrl": "",
|
||||
"userid": ""
|
||||
}
|
||||
],
|
||||
"pageNo": 1,
|
||||
"pageSize": 5,
|
||||
"pages": 4,
|
||||
"total": 18
|
||||
}
|
||||
}
|
||||
@ -678,5 +678,8 @@
|
||||
"权限被拒绝": "Permission denied",
|
||||
"请手动在系统设置中开启": "Please manually enable it in the system settings",
|
||||
"权限以继续使用应用": "Permission to continue using the application.",
|
||||
"去设置": "Go set it up"
|
||||
"去设置": "Go set it up",
|
||||
|
||||
"虹膜":"iris",
|
||||
"手掌":"palm"
|
||||
}
|
||||
|
||||
@ -677,5 +677,8 @@
|
||||
"权限被拒绝": "权限被拒绝",
|
||||
"请手动在系统设置中开启": "请手动在系统设置中开启",
|
||||
"权限以继续使用应用": "权限以继续使用应用。",
|
||||
"去设置": "去设置"
|
||||
"去设置": "去设置",
|
||||
|
||||
"虹膜":"虹膜",
|
||||
"手掌":"手掌"
|
||||
}
|
||||
|
||||
@ -679,5 +679,8 @@
|
||||
"权限被拒绝": "权限被拒绝",
|
||||
"请手动在系统设置中开启": "请手动在系统设置中开启",
|
||||
"权限以继续使用应用": "权限以继续使用应用。",
|
||||
"去设置": "去设置"
|
||||
"去设置": "去设置",
|
||||
|
||||
"虹膜":"虹膜",
|
||||
"手掌":"手掌"
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ class _AddIrisPageState extends State<AddIrisPage> {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}虹膜",
|
||||
barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}${'虹膜'.tr}",
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
|
||||
@ -28,7 +28,7 @@ class _AddIrisTypeManagePageState extends State<AddIrisTypeManagePage> {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}虹膜",
|
||||
barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}${'虹膜'.tr}",
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
|
||||
@ -32,7 +32,7 @@ class _IrisListPageState extends State<IrisListPage> {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: '虹膜',
|
||||
barTitle: '虹膜'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
@ -66,7 +66,7 @@ class _IrisListPageState extends State<IrisListPage> {
|
||||
),
|
||||
Expanded(child: _buildMainUI()),
|
||||
AddBottomWhiteBtn(
|
||||
btnName: '${TranslationLoader.lanKeys!.add!.tr}虹膜',
|
||||
btnName: '${TranslationLoader.lanKeys!.add!.tr}${'虹膜'.tr}',
|
||||
onClick: () async {
|
||||
// var data =
|
||||
// await Get.toNamed(Routers.addFaceTypeManagePage, arguments: {
|
||||
|
||||
@ -678,23 +678,27 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
);
|
||||
}
|
||||
|
||||
showWidgetArr.add(
|
||||
bottomItem('images/main/icon_iris.png', '虹膜',
|
||||
state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
|
||||
Get.toNamed(Routers.irisListPage, arguments: {
|
||||
"lockId": state.keyInfos.value.lockId,
|
||||
});
|
||||
}),
|
||||
);
|
||||
if (state.keyInfos.value.lockFeature!.isSupportIris == 1) {
|
||||
showWidgetArr.add(
|
||||
bottomItem('images/main/icon_iris.png', '虹膜'.tr,
|
||||
state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
|
||||
Get.toNamed(Routers.irisListPage, arguments: {
|
||||
"lockId": state.keyInfos.value.lockId,
|
||||
});
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
showWidgetArr.add(
|
||||
bottomItem('images/main/icon_palm.png', '手掌',
|
||||
state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
|
||||
Get.toNamed(Routers.palmListPage, arguments: {
|
||||
"lockId": state.keyInfos.value.lockId,
|
||||
});
|
||||
}),
|
||||
);
|
||||
if (state.keyInfos.value.lockFeature!.palmVein == 1) {
|
||||
showWidgetArr.add(
|
||||
bottomItem('images/main/icon_palm.png', '手掌'.tr,
|
||||
state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
|
||||
Get.toNamed(Routers.palmListPage, arguments: {
|
||||
"lockId": state.keyInfos.value.lockId,
|
||||
});
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
//可视对讲门锁新增->监控
|
||||
if (state.keyInfos.value.lockFeature!.videoIntercom == 1) {
|
||||
|
||||
@ -148,7 +148,9 @@ class LockMonitoringLogic extends BaseGetXController {
|
||||
|
||||
//开始录音
|
||||
Future<void> startProcessing() async {
|
||||
CallTalk().finishPcmSound();
|
||||
if (state.isProcessing.value) {
|
||||
CallTalk().stopPlaySound();
|
||||
}
|
||||
state.isButtonDisabled.value = true;
|
||||
|
||||
state.voiceProcessor?.addFrameListener(_onFrame);
|
||||
@ -169,6 +171,9 @@ class LockMonitoringLogic extends BaseGetXController {
|
||||
}
|
||||
|
||||
Future<void> _onFrame(List<int> frame) async {
|
||||
if (state.isProcessing.value) {
|
||||
CallTalk().stopPlaySound();
|
||||
}
|
||||
state.allFrames.add(frame); // 将帧添加到状态变量中
|
||||
List<int> concatenatedFrames = concatenateFrames(state.allFrames); // 连接所有帧
|
||||
Get.log("pcm数据:$concatenatedFrames");
|
||||
@ -199,6 +204,9 @@ class LockMonitoringLogic extends BaseGetXController {
|
||||
}
|
||||
|
||||
Future<void> stopProcessing() async {
|
||||
if (state.isProcessing.value) {
|
||||
CallTalk().stopPlaySound();
|
||||
}
|
||||
state.isButtonDisabled.value = true;
|
||||
try {
|
||||
await state.voiceProcessor?.stop();
|
||||
@ -410,7 +418,7 @@ class LockMonitoringLogic extends BaseGetXController {
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
print("锁详情界面销毁了");
|
||||
CallTalk().finishPcmSound();
|
||||
CallTalk().finishAVData();
|
||||
stopProcessing();
|
||||
_getUDPStatusRefreshUIEvent!.cancel();
|
||||
state.getTVDataRefreshUIEvent!.cancel();
|
||||
|
||||
@ -233,7 +233,7 @@ class _LockMonitoringPageState extends State<LockMonitoringPage> {
|
||||
bottomBtnItemWidget(
|
||||
"images/main/icon_lockDetail_hangUp.png", "挂断", Colors.red, () async {
|
||||
logic.stopProcessing();
|
||||
CallTalk().finishPcmSound();
|
||||
CallTalk().finishAVData();
|
||||
// 挂断
|
||||
if (state.isClickHangUp.value == false) {
|
||||
logic.initiateUdpHangUpAction(3);
|
||||
|
||||
@ -318,7 +318,7 @@ class RealTimePictureLogic extends BaseGetXController {
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
print("锁详情界面销毁了");
|
||||
CallTalk().finishPcmSound();
|
||||
CallTalk().finishAVData();
|
||||
_getTVDataRefreshUIEvent!.cancel();
|
||||
_getUDPStatusRefreshUIEvent!.cancel();
|
||||
if (state.oneMinuteTimeTimer != null) {
|
||||
|
||||
@ -261,7 +261,7 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
||||
"images/main/icon_lockDetail_hangUp.png", "挂断", Colors.red, () async {
|
||||
// 挂断
|
||||
logic.udpHangUpAction();
|
||||
CallTalk().finishPcmSound();
|
||||
CallTalk().finishAVData();
|
||||
Get.back();
|
||||
}),
|
||||
bottomBtnItemWidget("images/main/icon_lockDetail_monitoringUnlock.png",
|
||||
@ -401,7 +401,7 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
||||
|
||||
void _handleFailure() {
|
||||
// 在这里处理失败的逻辑
|
||||
CallTalk().finishPcmSound();
|
||||
CallTalk().finishAVData();
|
||||
state.realTimePicTimer.cancel();
|
||||
state.autoBackTimer.cancel();
|
||||
if (state.animationController != null) {
|
||||
@ -414,7 +414,7 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
||||
state.animationController.dispose();
|
||||
state.realTimePicTimer.cancel();
|
||||
state.autoBackTimer.cancel();
|
||||
CallTalk().finishPcmSound();
|
||||
CallTalk().finishAVData();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,9 @@ class LockListInfoEntity {
|
||||
errorCode = json['errorCode'];
|
||||
description = json['description'];
|
||||
errorMsg = json['errorMsg'];
|
||||
data = json['data'] != null ? LockListInfoGroupEntity.fromJson(json['data']) : null;
|
||||
data = json['data'] != null
|
||||
? LockListInfoGroupEntity.fromJson(json['data'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
@ -33,7 +35,8 @@ class LockListInfoGroupEntity {
|
||||
int? pages;
|
||||
int? total;
|
||||
|
||||
LockListInfoGroupEntity({this.groupList, this.pageNo, this.pageSize, this.pages, this.total});
|
||||
LockListInfoGroupEntity(
|
||||
{this.groupList, this.pageNo, this.pageSize, this.pages, this.total});
|
||||
|
||||
LockListInfoGroupEntity.fromJson(Map<String, dynamic> json) {
|
||||
if (json['groupList'] != null) {
|
||||
@ -125,32 +128,32 @@ class LockListInfoItemEntity {
|
||||
|
||||
LockListInfoItemEntity(
|
||||
{this.keyId,
|
||||
this.lockId,
|
||||
this.lockName,
|
||||
this.lockAlias,
|
||||
this.electricQuantity,
|
||||
this.fwVersion,
|
||||
this.hwVersion,
|
||||
this.keyType,
|
||||
this.passageMode,
|
||||
this.userType,
|
||||
this.startDate,
|
||||
this.endDate,
|
||||
this.weekDays,
|
||||
this.remoteEnable,
|
||||
this.faceAuthentication,
|
||||
this.lastFaceValidateTime,
|
||||
this.keyRight,
|
||||
this.keyStatus,
|
||||
this.isLockOwner,
|
||||
this.bluetooth,
|
||||
this.lockFeature,
|
||||
this.lockSetting,
|
||||
this.sendDate,
|
||||
this.lockUserNo,
|
||||
this.electricQuantityDate,
|
||||
this.electricQuantityStandby,
|
||||
this.senderUserId});
|
||||
this.lockId,
|
||||
this.lockName,
|
||||
this.lockAlias,
|
||||
this.electricQuantity,
|
||||
this.fwVersion,
|
||||
this.hwVersion,
|
||||
this.keyType,
|
||||
this.passageMode,
|
||||
this.userType,
|
||||
this.startDate,
|
||||
this.endDate,
|
||||
this.weekDays,
|
||||
this.remoteEnable,
|
||||
this.faceAuthentication,
|
||||
this.lastFaceValidateTime,
|
||||
this.keyRight,
|
||||
this.keyStatus,
|
||||
this.isLockOwner,
|
||||
this.bluetooth,
|
||||
this.lockFeature,
|
||||
this.lockSetting,
|
||||
this.sendDate,
|
||||
this.lockUserNo,
|
||||
this.electricQuantityDate,
|
||||
this.electricQuantityStandby,
|
||||
this.senderUserId});
|
||||
|
||||
LockListInfoItemEntity.fromJson(Map<String, dynamic> json) {
|
||||
keyId = json['keyId'];
|
||||
@ -236,10 +239,10 @@ class Bluetooth {
|
||||
|
||||
Bluetooth(
|
||||
{this.bluetoothDeviceId,
|
||||
this.bluetoothDeviceName,
|
||||
this.publicKey,
|
||||
this.privateKey,
|
||||
this.signKey});
|
||||
this.bluetoothDeviceName,
|
||||
this.publicKey,
|
||||
this.privateKey,
|
||||
this.signKey});
|
||||
|
||||
Bluetooth.fromJson(Map<String, dynamic> json) {
|
||||
bluetoothDeviceId = json['bluetoothDeviceId'];
|
||||
@ -266,18 +269,20 @@ class LockFeature {
|
||||
int? fingerprint;
|
||||
int? fingerVein;
|
||||
int? palmVein;
|
||||
int? isSupportIris;
|
||||
int? d3Face;
|
||||
int? bluetoothRemoteControl;
|
||||
int? videoIntercom;
|
||||
LockFeature(
|
||||
{this.password,
|
||||
this.icCard,
|
||||
this.fingerprint,
|
||||
this.fingerVein,
|
||||
this.palmVein,
|
||||
this.d3Face,
|
||||
this.bluetoothRemoteControl,
|
||||
this.videoIntercom});
|
||||
this.icCard,
|
||||
this.fingerprint,
|
||||
this.fingerVein,
|
||||
this.palmVein,
|
||||
this.isSupportIris,
|
||||
this.d3Face,
|
||||
this.bluetoothRemoteControl,
|
||||
this.videoIntercom});
|
||||
|
||||
LockFeature.fromJson(Map<String, dynamic> json) {
|
||||
password = json['password'];
|
||||
@ -285,6 +290,7 @@ class LockFeature {
|
||||
fingerprint = json['fingerprint'];
|
||||
fingerVein = json['fingerVein'];
|
||||
palmVein = json['palmVein'];
|
||||
isSupportIris = json['isSupportIris'];
|
||||
d3Face = json['d3Face'];
|
||||
bluetoothRemoteControl = json['bluetoothRemoteControl'];
|
||||
videoIntercom = json['videoIntercom'];
|
||||
@ -297,6 +303,7 @@ class LockFeature {
|
||||
data['fingerprint'] = fingerprint;
|
||||
data['fingerVein'] = fingerVein;
|
||||
data['palmVein'] = palmVein;
|
||||
data['isSupportIris'] = isSupportIris;
|
||||
data['d3Face'] = d3Face;
|
||||
data['bluetoothRemoteControl'] = bluetoothRemoteControl;
|
||||
data['videoIntercom'] = videoIntercom;
|
||||
|
||||
@ -145,8 +145,14 @@ class CallTalk {
|
||||
}
|
||||
}
|
||||
|
||||
//停止接收音频数据
|
||||
void finishPcmSound() {
|
||||
void stopPlaySound() {
|
||||
FlutterPcmSound.pause();
|
||||
FlutterPcmSound.clear();
|
||||
FlutterPcmSound.stop();
|
||||
}
|
||||
|
||||
//停止接收音视频数据
|
||||
void finishAVData() {
|
||||
// FlutterPcmSound.setup(sampleRate: 8000, channelCount: 1);
|
||||
FlutterPcmSound.pause();
|
||||
FlutterPcmSound.clear();
|
||||
|
||||
@ -203,7 +203,7 @@ class CommandUDPReciverManager {
|
||||
break;
|
||||
case 30:
|
||||
{
|
||||
CallTalk().finishPcmSound();
|
||||
CallTalk().finishAVData();
|
||||
|
||||
// 监视结束
|
||||
if ((data[7] & 0x3) == 1) {
|
||||
|
||||
@ -188,7 +188,7 @@ class UDPTalkClass {
|
||||
isBeCall = false;
|
||||
// isEndCall = true;
|
||||
// LockMonitoringState().isClickHangUp.value = false;
|
||||
CallTalk().finishPcmSound();
|
||||
CallTalk().finishAVData();
|
||||
eventBus.fire(GetUDPStatusRefreshUI(UDPTalkClass().status));
|
||||
Get.back();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user