This commit is contained in:
mmc
2026-05-21 13:32:11 +08:00
parent bff4f55f56
commit eee617ca83
2 changed files with 104 additions and 2 deletions

View File

@@ -42,4 +42,100 @@ export function getJurisdiction(data) {
//
// 获取所有航线
export function getsinglePlan(data) {
return request({
url: `/iot/UAV/getFlightTask?sn=${data.gateway_sn}`,
method: 'get',
})
}
// 获取航线轨迹 iot/UAV/getFlightTaskTrack
export function getsinglePlanTrack(data) {
return request({
url: `/iot/UAV/getFlightTaskTrack?taskId=${data.uuid}`,
method: 'get',
})
}
//上传航线
export function uploadWayLine(data) {
return request({
url: '/iot/UAV/uploadWayline',
method: 'post',
data: data, // 上传文件必须用 data,不能用 params
headers: {
'Content-Type': 'multipart/form-data' // 上传文件必加!
}
})
}
//创建航线任务
export function createWaylineTask(data) {
return request({
url: '/iot/UAV/createFlightTask',
method: 'post',
data: data,
})
}
export function updateFlightTaskStatus(taskId, status) {
return request({
url: '/iot/UAV/updateFlightTaskStatus',
method: 'post',
params: { taskId, status }
})
}
export function getFlightTaskDetail(taskId) {
return request({
url: '/iot/UAV/getFlightTaskDetail',
method: 'get',
params: { taskId }
})
}
/// 航线列表
export function getWayLine() {
return request({
url: '/iot/UAV/getWayline',
method: 'get',
})
}
//直播流
///iot/UAV/flightTaskCommand
export function postFlightCommmand(data) {
return request({
url: '/iot/UAV/flightTaskCommand',
method: 'post',
data
})
}
//切换相机
export function changeCamera(data) {
return request({
url: '/iot/UAV/changeCamera',
method: 'post',
data
})
}
//直播心跳
export function postLiveHeartbeat(data) {
return request({
url: `/iot/UAV/liveHeartbeat?sn=${data.sn}&cameraIndex=${data.cameraIndex}`,
method: 'post',
})
}