| | |
| | | rth_altitude: number // 相对机场返航高度 20 - 500 |
| | | out_of_control_action: OutOfControlAction // 失控动作 |
| | | |
| | | // 重复频率类型 |
| | | rep_fre_type?:number |
| | | // 重复频率值 |
| | | rep_fre_val?:number |
| | | // 重复规则值 |
| | | rep_rule_val?:[] |
| | | rep_rule_type?:number |
| | | |
| | | min_battery_capacity?:number |
| | | // 执行开始时间 |
| | | execute_start_time_arr:number[][] |
| | | } |
| | | // 新增计划 |
| | | export const createPlan = async function (workspaceId: string, plan: CreatePlan): Promise<IWorkspaceResponse<any>> { |
| | | const url = `${HTTP_PREFIX}/workspaces/${workspaceId}/flight-tasks` |
| | | const result = await request.post(url, plan) |
| | | return result.data |
| | | } |
| | | |
| | | // 新增计划,重复定时和连续执行走这个逻辑 |
| | | export const createPlanCondition = async function (workspaceId: string, plan: CreatePlan): Promise<IWorkspaceResponse<any>> { |
| | | const url = `${HTTP_PREFIX}/workspaces/${workspaceId}/flight-tasks-condition` |
| | | const result = await request.post(url, plan) |
| | | return result.data |
| | | } |
| | |
| | | name?:string |
| | | startTime?:string |
| | | endTime?:string |
| | | parentId?:string |
| | | } |
| | | |
| | | // 获取计划列表(分页) |
| | | export const getWaylineJobs = async function (workspaceId: string, page: IPage, params:TaskQueryParam): Promise<IListWorkspaceResponse<Task>> { |
| | | const url = `${HTTP_PREFIX}/workspaces/${workspaceId}/jobs?page=${page.page}&page_size=${page.page_size}` |
| | | const result = await request.get(url, { params }) |
| | | return result.data |
| | | } |
| | | |
| | | // 获取子数据 |
| | | export const getWaylineChildrenJobs = async function (workspaceId: string, params:TaskQueryParam): Promise<IListWorkspaceResponse<Task>> { |
| | | const url = `${HTTP_PREFIX}/workspaces/${workspaceId}/getChildrenJobs` |
| | | const result = await request.get(url, { params }) |
| | | return result.data |
| | | } |
| | |
| | | const result = await request.post(url) |
| | | return result.data |
| | | } |
| | | |
| | | // 历史轨迹记录 |
| | | export const getHistoryTrack = async function (workspaceId: string, page: number, page_size :number): Promise<IWorkspaceResponse<any>> { |
| | | const url = `/log/droneFlightLog/page?page=${page}&page_sie=${page_size}&workspaceId=${workspaceId}` |
| | | const result = await request.get(url) |
| | | return result.data |
| | | } |
| | | |
| | | // 历史轨迹详情 |
| | | export const getHistoryDetail = async function (id: string): Promise<IWorkspaceResponse<any>> { |
| | | const url = `/log/droneFlightLog/infoListByFid?flightId=${id}` |
| | | const result = await request.get(url) |
| | | return result.data |
| | | } |