1,接收tcp推送消息和和接收tcp推送机器的状态推送消息。
2,集成选择作业列表中的一项接口。
This commit is contained in:
@@ -9,6 +9,9 @@ class DevicesState extends Equatable {
|
||||
final double? deviceLatitude; // 新增字段
|
||||
final double? deviceLongitude; // 新增字段
|
||||
final List<Map<String, dynamic>>? workRecords;
|
||||
final List<Map<String, dynamic>>? pathData;
|
||||
|
||||
|
||||
const DevicesState({
|
||||
this.devices = const [],
|
||||
this.selectedDevice,
|
||||
@@ -16,7 +19,8 @@ class DevicesState extends Equatable {
|
||||
this.errorMessage,
|
||||
this.deviceLatitude,
|
||||
this.deviceLongitude,
|
||||
this.workRecords
|
||||
this.workRecords,
|
||||
this.pathData,
|
||||
});
|
||||
|
||||
// 使用 copyWith 方便局部更新状态
|
||||
@@ -28,6 +32,7 @@ class DevicesState extends Equatable {
|
||||
double? deviceLatitude,
|
||||
double? deviceLongitude,
|
||||
List<Map<String, dynamic>>? workRecords,
|
||||
List<Map<String, dynamic>>? pathData,
|
||||
}) {
|
||||
return DevicesState(
|
||||
devices: devices ?? this.devices,
|
||||
@@ -36,6 +41,7 @@ class DevicesState extends Equatable {
|
||||
errorMessage: errorMessage, // 错误信息通常每次更新都要重新赋值或清空
|
||||
deviceLatitude: deviceLatitude ?? this.deviceLatitude,
|
||||
deviceLongitude: deviceLongitude ?? this.deviceLongitude,
|
||||
pathData: pathData ?? this.pathData,
|
||||
workRecords: workRecords ?? this.workRecords,
|
||||
);
|
||||
}
|
||||
@@ -46,5 +52,6 @@ class DevicesState extends Equatable {
|
||||
deviceLatitude,
|
||||
deviceLongitude,
|
||||
workRecords,
|
||||
pathData,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user