|
|
@@ -223,11 +223,11 @@ export default defineComponent({ |
|
|
|
} |
|
|
|
|
|
|
|
const handleOperate = () => { |
|
|
|
data.operate = data.operate === '悬停' ? '继续飞行' : '悬停' |
|
|
|
stopOrGo(data.operate) |
|
|
|
data.operate = data.operate === '悬停' ? '继续飞行' : '悬停' |
|
|
|
} |
|
|
|
const stopOrGo = async(value) => { |
|
|
|
if (value !== '悬停') { |
|
|
|
if (value === '悬停') { |
|
|
|
const res = await controlAir({ |
|
|
|
value: { |
|
|
|
'zhilin': '01', |
|
|
@@ -240,6 +240,19 @@ export default defineComponent({ |
|
|
|
if (res.code === 0) { |
|
|
|
console.log('悬停成功') |
|
|
|
} |
|
|
|
} else { |
|
|
|
const res = await controlAir({ |
|
|
|
value: { |
|
|
|
'zhilin': '04', |
|
|
|
'taskId': inspectionStore.getList?.id, |
|
|
|
'airportId': inspectionStore.getList?.airportId, |
|
|
|
'msg': '飞行任务' |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
if (res.code === 0) { |
|
|
|
console.log('继续飞行') |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|