对接连续任务列表接口和连续任务下发,便捷操作中暂停任务的对接,底部导航tab项的设置根据用户角色显示和设置
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
class WorkHistoryRecord {
|
||||
const WorkHistoryRecord({
|
||||
required this.id,
|
||||
required this.deviceId,
|
||||
required this.workName,
|
||||
required this.status,
|
||||
required this.statusLabel,
|
||||
this.deviceAlias,
|
||||
this.siteId,
|
||||
this.orgId,
|
||||
this.planId,
|
||||
this.routeId,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.startedAt,
|
||||
this.finishedAt,
|
||||
this.taskType,
|
||||
this.routeType,
|
||||
this.remark,
|
||||
this.accepted,
|
||||
});
|
||||
|
||||
final int id;
|
||||
final String deviceId;
|
||||
final String? deviceAlias;
|
||||
final String workName;
|
||||
final String status;
|
||||
final String statusLabel;
|
||||
final int? siteId;
|
||||
final int? orgId;
|
||||
final int? planId;
|
||||
final int? routeId;
|
||||
final String? createdAt;
|
||||
final String? updatedAt;
|
||||
final String? startedAt;
|
||||
final String? finishedAt;
|
||||
final String? taskType;
|
||||
final String? routeType;
|
||||
final String? remark;
|
||||
final bool? accepted;
|
||||
|
||||
String get normalizedStatus => status.trim().toUpperCase();
|
||||
bool get isCompleted => normalizedStatus == 'FINISH';
|
||||
bool get isCanceled =>
|
||||
const {'CANCELED', 'CANCELLED'}.contains(normalizedStatus);
|
||||
DateTime? get recordDate => DateTime.tryParse(startedAt ?? createdAt ?? '');
|
||||
}
|
||||
|
||||
class WorkHistoryPage {
|
||||
WorkHistoryPage({
|
||||
required this.total,
|
||||
required List<WorkHistoryRecord> records,
|
||||
}) : records = List.unmodifiable(records);
|
||||
final int total;
|
||||
final List<WorkHistoryRecord> records;
|
||||
}
|
||||
Reference in New Issue
Block a user