forked from drone/command-center-dashboard

shuishen
2025-04-02 524c42f8c77bcd5d93484bcbee721b6cd9ebe296
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import request from '@/axios';
 
// 机巢统计
export const getDeviceInfoNum = (params) => {
  return request({
    url: '/drone-device-core/manage/api/v1/devices/getDeviceInfoNum',
    method: 'get',
    params,
  });
};
// 机巢列表
export const selectDevicePage = ({ nickname,is_execute, ...params}) => {
  return request({
    url: `/drone-device-core/manage/api/v1/devices/selectDevicePage?type=${params.type}&current=${params.current}&size=${params.size}`,
    method: 'post',
    data: {
      nickname,
      is_execute,
    },
  });
};
// 机巢数据
export const getFlightStatistics = (dockSn) => {
  return request({
    url: `/drone-device-core/manage/api/v1/devices/getFlightStatistics?dockSn=${dockSn}`,
    method: 'get',
    params: {},
  });
};
// 机巢直播/无人机直播 均可使用
export const liveStart = (deviceSn) => {
  return request({
    url: `/drone-device-core/manage/api/v1/live/streams/liveStart?deviceSn=${deviceSn}`,
    method: 'post',
    data: {},
    headers: {
      'areaCode': '',
    },
  });
};
// 单个机巢获取机巢详情
export const getDeviceDetail = (deviceSn) => {
  return request({
    url: `/drone-device-core/manage/api/v1/devices/getDeviceDetail?deviceSn=${deviceSn}`,
    method: 'get',
    params: {},
  });
};