集成接口 开始执行任务的领域层和数据层和UI层的开发啊(待测试)
集成功能 暂停 取消功能 恢复功能的接口的领域层和数据层的开发 下一步待集成到页面上 优化功能,优化了接口异常和未知异常对页面渲染的影响对用户的体验的不好情况。具体通过弹窗友好提示! 优化更新了tcp指示灯点击出现机器状态中添加选中设备的编号 方便用户使用的明白明了!。 优化更新关闭了tcp重连操作内链条中的获取用户设备和切换设备操作项。 调整了获取无人机状态信息的更新频率 为14秒一次
This commit is contained in:
@@ -76,12 +76,12 @@ class PositionState extends Equatable {
|
||||
|
||||
/// UAV详情实体(用于详情页面API返回的数据)
|
||||
class UAVDetailEntity extends Equatable {
|
||||
final String deviceSn; // 设备序列号(无人机序列号)
|
||||
final String gatewaySn; // 网关序列号
|
||||
final String callsign; // 机场呼号/名称
|
||||
final String droneCallsign; // 无人机呼号
|
||||
final int onlineStatus; // 机场在线状态 (1:在线, 0:离线)
|
||||
final int droneOnlineStatus; // 无人机在线状态
|
||||
final String deviceSn;
|
||||
final String gatewaySn;
|
||||
final String callsign;
|
||||
final String droneCallsign;
|
||||
final int onlineStatus;
|
||||
final int droneOnlineStatus;
|
||||
final double? latitude;
|
||||
final double? longitude;
|
||||
final double? capacityPercent;
|
||||
@@ -173,7 +173,9 @@ class UAVDetailEntity extends Equatable {
|
||||
: null,
|
||||
droneCameraList: json['drone_camera_list'] != null
|
||||
? (json['drone_camera_list'] as List)
|
||||
.map((item) => CameraInfo.fromJson(item as Map<String, dynamic>))
|
||||
.map(
|
||||
(item) => CameraInfo.fromJson(item as Map<String, dynamic>),
|
||||
)
|
||||
.toList()
|
||||
: null,
|
||||
orgId: json['orgId'],
|
||||
@@ -333,7 +335,9 @@ class DroneStationEntity extends Equatable {
|
||||
: null,
|
||||
droneCameraList: json['drone_camera_list'] != null
|
||||
? (json['drone_camera_list'] as List)
|
||||
.map((item) => CameraInfo.fromJson(item as Map<String, dynamic>))
|
||||
.map(
|
||||
(item) => CameraInfo.fromJson(item as Map<String, dynamic>),
|
||||
)
|
||||
.toList()
|
||||
: null,
|
||||
orgId: json['orgId'] ?? 0,
|
||||
|
||||
@@ -5,7 +5,6 @@ class FlightTaskDetailEntity {
|
||||
final String taskType;
|
||||
final String status;
|
||||
final String sn;
|
||||
final String droneSn; // 无人机序列号
|
||||
final String waylineUuid;
|
||||
final String beginAt;
|
||||
final String endAt;
|
||||
@@ -27,7 +26,6 @@ class FlightTaskDetailEntity {
|
||||
required this.taskType,
|
||||
required this.status,
|
||||
required this.sn,
|
||||
required this.droneSn,
|
||||
required this.waylineUuid,
|
||||
required this.beginAt,
|
||||
required this.endAt,
|
||||
@@ -47,26 +45,18 @@ class FlightTaskDetailEntity {
|
||||
factory FlightTaskDetailEntity.fromJson(Map<String, dynamic> json) {
|
||||
// 安全处理 folder_info 嵌套结构
|
||||
final rawFolderInfo = json['folder_info'];
|
||||
final Map<String, dynamic> folderInfo = (rawFolderInfo is Map)
|
||||
? Map<String, dynamic>.from(rawFolderInfo)
|
||||
final Map<String, dynamic> folderInfo = (rawFolderInfo is Map)
|
||||
? Map<String, dynamic>.from(rawFolderInfo)
|
||||
: <String, dynamic>{};
|
||||
print(
|
||||
'🔍 [FlightTaskDetailEntity] folder_info 类型: ${rawFolderInfo.runtimeType}',
|
||||
);
|
||||
print('🔍 [FlightTaskDetailEntity] folder_info 类型: ${rawFolderInfo.runtimeType}');
|
||||
print('🔍 [FlightTaskDetailEntity] folder_info 值: $rawFolderInfo');
|
||||
|
||||
|
||||
return FlightTaskDetailEntity(
|
||||
name: json['name'] ?? '',
|
||||
uuid: json['uuid'] ?? '',
|
||||
taskType: json['task_type'] ?? '',
|
||||
status: json['status'] ?? '',
|
||||
sn: json['sn'] ?? '',
|
||||
droneSn:
|
||||
json['drone_sn'] ??
|
||||
json['device_sn'] ??
|
||||
json['droneSn'] ??
|
||||
json['deviceSn'] ??
|
||||
'',
|
||||
waylineUuid: json['wayline_uuid'] ?? '',
|
||||
beginAt: json['begin_at'] ?? '',
|
||||
endAt: json['end_at'] ?? '',
|
||||
@@ -99,7 +89,6 @@ class FlightTaskDetailEntity {
|
||||
'task_type': taskType,
|
||||
'status': status,
|
||||
'sn': sn,
|
||||
'drone_sn': droneSn,
|
||||
'wayline_uuid': waylineUuid,
|
||||
'begin_at': beginAt,
|
||||
'end_at': endAt,
|
||||
|
||||
Reference in New Issue
Block a user