吉安感知网项目-前端
shuishen
2026-02-03 89380e6260a75d1d3b94de687ebcc2f50d50659d
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import request from '@/axios'
import { v4 as uuidv4 } from 'uuid'
// 机巢统计
export const getDeviceInfoNum = params => {
    return request({
        url: '/drone-device-core/manage/api/v1/devices/getDeviceInfoNum',
        method: 'get',
        params,
    })
}
 
// 机巢统计
export const getDeviceInfoNumByAreaCodeApi = params => {
    return request({
        url: '/drone-device-core/manage/api/v1/devices/getDeviceInfoNumByAreaCode',
        method: 'get',
        params,
    })
}
// 机巢列表
export const selectDevicePage = ({ nickname, ...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_online: params.isOnline,
        },
    })
}
 
// 机巢列表-简单版本-速度更快
export const selectDevicePageSimplify = ({ nickname, ...params }) => {
    return request({
        url: `/drone-device-core/manage/api/v1/devices/selectDeviceListByPage?type=${params.type}&current=${params.current}&size=${params.size}`,
        method: 'post',
        data: {
            nickname,
            is_online: params.isOnline,
        },
    })
}
// 机巢数据
export const getFlightStatistics = dockSn => {
    return request({
        url: `/drone-device-core/manage/api/v1/devices/getFlightStatistics?dockSn=${dockSn}`,
        method: 'get',
        params: {},
    })
}
// 机巢直播/无人机直播 均可使用
export const liveStart = (deviceSn, quality) => {
    return request({
        url: `/drone-device-core/manage/api/v1/live/streams/liveStart?deviceSn=${deviceSn}&quality=${quality}`,
        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: {},
    })
}
 
// 单个机巢获取hms信息
export const getDeviceHmsDetail = deviceSn => {
    return request({
        url: `/drone-hms/manage/api/v1/devices/hms/${deviceSn}`,
        method: 'get',
        params: {},
    })
}
 
// 更新单个机巢hms信息
export const postDeviceUpdateHms = params => {
    return request({
        url: `/drone-hms/manage/api/v1/devices/updateHms`,
        method: 'put',
        params,
    })
}
 
// 设备-事件列表
export const getDeviceEventList = (data, params) => {
    return request({
        url: `/drone-device-core/jobEvent/eventPage`,
        method: 'post',
        data,
        params,
    })
}
 
// 事件列表---点位上图
export const getEventList = (data, params) => {
    return request({
        url: '/drone-device-core/jobEvent/eventList',
        method: 'post',
        data,
        params,
    })
}
 
// 轮询刷新
export const pollingDataUpdate = (params) => {
    return request({
        url: '/drone-device-core/manage/api/v1/devices/deviceStatusChanged?intervalTime=4',
        method: 'get',
        params,
    })
}
// 生成固定uuid
const uuid = uuidv4()
// 轮询刷新
export const statusChangedApi = (params = {}) => {
    return request({
        url: '/drone-device-core/manage/api/v1/devices/statusChanged',
        method: 'get',
        params: {
            uuid,
            intervalTime: 4,
            ...params,
        },
    })
}