Browse Source

补充创建航线-失控动作

李富豪 1 year ago
parent
commit
59eaee21f8

+ 9 - 7
Web/src/api/wayline.ts

@@ -39,15 +39,17 @@ export const deleteWaylineFile = async function (workspaceId: string, waylineId:
 export interface CreatePlan {
 export interface CreatePlan {
   name: string,
   name: string,
   file_id: string,
   file_id: string,
+  wayline_type: WaylineType, // 航线类型
   dock_sn: string,
   dock_sn: string,
+  wayline_precision_type: number,
   task_type: TaskType, // 任务类型
   task_type: TaskType, // 任务类型
-  wayline_type: WaylineType, // 航线类型
-  task_days: number[] // 执行任务的日期(秒)
-  task_periods: number[][] // 执行任务的时间点(秒)
-  rth_altitude: number // 相对机场返航高度 20 - 500
-  out_of_control_action: OutOfControlAction // 失控动作
-  min_battery_capacity?: number, // The minimum battery capacity of aircraft.
-  min_storage_capacity?: number, // The minimum storage capacity of dock and aircraft.
+  task_time: number,
+  task_days: any[],
+  task_periods: any[],
+  min_battery_capacity: number,
+  rth_altitude: number,
+  breakpoint_continuation: boolean,
+  out_of_control_action: number,
 }
 }
 
 
 // Create Wayline Job
 // Create Wayline Job

+ 5 - 2
Web/src/pages/page-web/projects/task/taskList/components/TaskPanel.vue

@@ -254,7 +254,8 @@ interface State {
     task_periods: any[],
     task_periods: any[],
     min_battery_capacity: number,
     min_battery_capacity: number,
     rth_altitude: number,
     rth_altitude: number,
-    breakpoint_continuation: boolean;
+    breakpoint_continuation: boolean,
+    out_of_control_action: number,
   }
   }
 }
 }
 
 
@@ -263,7 +264,7 @@ const state: State = reactive({
   formModel: {
   formModel: {
     name: '',// 任务名称
     name: '',// 任务名称
     file_id: '',// 执行航线
     file_id: '',// 执行航线
-    wayline_type: undefined,
+    wayline_type: undefined,// 航线类型
     dock_sn: '',// 执行设备
     dock_sn: '',// 执行设备
     wayline_precision_type: 1,// 任务精度
     wayline_precision_type: 1,// 任务精度
     task_type: 0,// 任务策略
     task_type: 0,// 任务策略
@@ -273,6 +274,7 @@ const state: State = reactive({
     min_battery_capacity: 90,// 循环-任务开始执行的电量
     min_battery_capacity: 90,// 循环-任务开始执行的电量
     rth_altitude: 20,// 返航高度
     rth_altitude: 20,// 返航高度
     breakpoint_continuation: true,// 自动断点续飞
     breakpoint_continuation: true,// 自动断点续飞
+    out_of_control_action: 0,// 失控动作-返航
   }
   }
 })
 })
 
 
@@ -460,6 +462,7 @@ const handleClickConfirm = async () => {
     const data = {
     const data = {
       ...values,
       ...values,
       wayline_type: state.formModel.wayline_type,
       wayline_type: state.formModel.wayline_type,
+      out_of_control_action: state.formModel.out_of_control_action,
     };
     };
     if (values.task_time) {
     if (values.task_time) {
       data.task_time = moment(values.task_time).valueOf();
       data.task_time = moment(values.task_time).valueOf();