xx
This commit is contained in:
@@ -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',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import {
|
||||
Row, Col, Card, Button, Space, Table, Tag, Typography, Progress, Badge,
|
||||
Tabs, Input, Switch, Divider, Tooltip, Timeline
|
||||
@@ -31,6 +31,7 @@ import {
|
||||
Maximize2,
|
||||
Target
|
||||
} from 'lucide-react';
|
||||
import { getsinglePlan } from '@/src/api/api';
|
||||
|
||||
const { Text, Title } = Typography;
|
||||
|
||||
@@ -104,6 +105,11 @@ export default function WayLinePage() {
|
||||
bg: 'linear-gradient(135deg, #E8F3FF 0%, #BAE0FF 100%)'
|
||||
},
|
||||
];
|
||||
//useEffect(()=>{
|
||||
// getsinglePlan().then(res=>{
|
||||
|
||||
// })
|
||||
//})
|
||||
|
||||
return (
|
||||
<div className="normal-spacing" style={{ background: '#f5f7fa', minHeight: '100vh', padding: '16px' }}>
|
||||
@@ -228,7 +234,7 @@ export default function WayLinePage() {
|
||||
|
||||
{/* 航点列表 */}
|
||||
<Card
|
||||
title={<span style={{ fontSize: fontNormal, fontWeight: 700 }}>航点列表 <Text type="secondary" style={{ fontSize: 10, fontWeight: 400, marginLeft: 8 }}>航线:FL-03</Text></span>}
|
||||
title={<span style={{ fontSize: fontNormal, fontWeight: 700 }}>航线列表 <Text type="secondary" style={{ fontSize: 10, fontWeight: 400, marginLeft: 8 }}>航线:FL-03</Text></span>}
|
||||
size="small"
|
||||
extra={<PlusOutlined style={{ cursor: 'pointer', color: '#165DFF', fontSize: 12 }} />}
|
||||
bordered={false}
|
||||
|
||||
Reference in New Issue
Block a user