feat: 完善机巢模拟调试与素材交付交互
增加禁飞期间的设备指令拦截及本地模拟拍摄流程;适配订单素材库和景区空境库,完善素材筛选、预览与下载;订单交付入口改为方式选择弹窗并复用云端上传。补充单元测试、接口记录和模拟器截图。
This commit is contained in:
@@ -500,13 +500,15 @@ final class DronePreparationFooterView: UIView {
|
||||
refreshButton.isHidden = !viewModel.shouldShowSummonRefresh
|
||||
}
|
||||
|
||||
/// 按购买权限启用待飞任务创建;本阶段不提供无人机召唤或起飞入口。
|
||||
func apply(preparationViewModel viewModel: DroneDockPreparationViewModel, isRefreshing: Bool = false) {
|
||||
/// 绑定准备页提交许可;模拟来源仅影响文案,不改变业务权限或真实传输保护。
|
||||
func apply(preparationViewModel viewModel: DroneDockPreparationViewModel, isRefreshing: Bool = false,
|
||||
isLocalSimulation: Bool = false) {
|
||||
connectionLabel.apply(title: viewModel.connectionTitle, tone: viewModel.connectionTone)
|
||||
selectionLabel.text = viewModel.selectionSummary
|
||||
selectionLabel.numberOfLines = 2
|
||||
deviceLabel.apply(title: viewModel.deviceStatusText, tone: viewModel.deviceTone)
|
||||
primaryButton.setTitle(viewModel.primaryButtonTitle, for: .normal)
|
||||
let title = isLocalSimulation && viewModel.canCreateTask ? "确认并召唤(模拟)" : viewModel.primaryButtonTitle
|
||||
primaryButton.setTitle(title, for: .normal)
|
||||
primaryButton.isEnabled = (viewModel.isPrimaryActionEnabled || viewModel.canOpenShootingTask) && !isRefreshing
|
||||
primaryButton.backgroundColor = primaryButton.isEnabled ? DroneDockStyle.primary : UIColor(hex: 0xE1E7F0)
|
||||
primaryButton.setTitleColor(.white, for: .normal)
|
||||
@@ -516,6 +518,9 @@ final class DronePreparationFooterView: UIView {
|
||||
} else {
|
||||
messageLabel.text = viewModel.planeStatusErrorMessage.map { "无人机状态获取失败:\($0)" } ?? viewModel.admissionMessage
|
||||
}
|
||||
if isLocalSimulation {
|
||||
messageLabel.text = "本地模拟,不会向无人机发送指令\n" + (messageLabel.text ?? "")
|
||||
}
|
||||
messageLabel.textColor = DroneDockStyle.secondary
|
||||
refreshButton.isHidden = false
|
||||
refreshButton.isEnabled = !viewModel.isLoading && !viewModel.isCreatingTask && !viewModel.isSummoning && !isRefreshing
|
||||
|
||||
Reference in New Issue
Block a user