import request from '@/axios'
|
import { ElMessage } from 'element-plus'
|
|
export const getWaylineFileListApi = params => {
|
return request({
|
url: `/drone-device-core/wayline/api/v1/workspaces/getWaylineFileList`,
|
method: 'get',
|
params,
|
})
|
}
|
|
export const newGetWorkspacesPage = params => {
|
return request({
|
url: `/drone-device-core/wayline/api/v1/wayline-groups/page`,
|
method: 'get',
|
params,
|
})
|
}
|
|
export const updateWaylineNameApi = params => {
|
return request({
|
url: `/drone-device-core/wayline/api/v1/wayline-groups/updateWaylineName`,
|
method: 'put',
|
params,
|
})
|
}
|
|
export const creatWaylineApi = data => {
|
return request({
|
url: `/drone-device-core/dp/home/flyToPointsSplit`,
|
method: 'post',
|
data,
|
})
|
}
|
|
export const updateWaylineApi = data => {
|
return request({
|
url: `/drone-device-core/dp/home/updateWaylineSplit/${data.id}`,
|
method: 'post',
|
data,
|
})
|
}
|
|
export const deleteWaylineApi = params => {
|
return request({
|
url: `/drone-device-core/wayline/api/v1/wayline-groups/waylines/remove`,
|
method: 'post',
|
params,
|
})
|
}
|
|
// 获取航线规划-航线拆分
|
export const getWaylineSplitApi = id => {
|
return request({
|
url: `/drone-device-core/wayline/api/v1/wayline-groups/${id}`,
|
method: 'get',
|
})
|
}
|
|
// waylineType:航线类型 0普通 1图斑 2航测 3航点 4正射举证
|
// dkbh:图斑举证航线的图斑编号
|
// patchesId:举证图斑的id
|
// isTemp:是否为临时航线,0为临时航线不保存在库中
|
export const importKmzFileApi = function (data, params = {}) {
|
let url = `/drone-device-core/wayline/api/v1/workspaces/waylines/file/uploadFile`
|
return request({
|
url: url,
|
method: 'post',
|
headers: { 'Content-Type': 'multipart/form-data' },
|
data,
|
params,
|
})
|
}
|
|
// 上传录音 文件
|
export const waylineSpeakApi = data => {
|
return request({
|
url: `/drone-device-core/speak/api/v1/waylineSpeak`,
|
method: 'post',
|
data,
|
})
|
}
|
|
// 获取音频列表
|
export const getVoiceByUserIdApi = params => {
|
return request({
|
url: `/drone-device-core/speak/api/v1/getVoiceByUserId`,
|
method: 'get',
|
params,
|
})
|
}
|
|
// 删除音频
|
export const deleteSpeakVoiceByIdApi = id => {
|
return request({
|
url: `/drone-device-core/speak/api/v1/deleteSpeakVoiceById`,
|
method: 'delete',
|
params: { id },
|
})
|
}
|
|
// 获取音频列表
|
export const updateSpeakVoiceByIdApi = params => {
|
return request({
|
url: `/drone-device-core/speak/api/v1/updateSpeakVoiceById`,
|
method: 'put',
|
params,
|
})
|
}
|
// 获取音频详情
|
export const getSpeakVoiceByIdApi = id => {
|
return request({
|
url: `/drone-device-core/speak/api/v1/getSpeakVoiceById`,
|
method: 'get',
|
params: { id },
|
})
|
}
|
|
// 判断当前航线是否有执行中或者待执行任务
|
export const hasPendingOrRunningJobs = di => {
|
return request({
|
url: `/drone-device-core/wayline/api/v1/workspaces/hasPendingOrRunningJobs/${di}`,
|
method: 'get',
|
})
|
}
|
|
export const getAreaGridFilmGeoJsonApi = () => {
|
return request({
|
url: `/drone-odm/whiteFilmGeoJson/getAreaGridFilmGeoJson`,
|
method: 'get',
|
})
|
}
|