diff --git a/src/api/device.js b/src/api/device.js new file mode 100644 index 0000000..266ad1d --- /dev/null +++ b/src/api/device.js @@ -0,0 +1,57 @@ +import request from '@/utils/request' + +/** + * 分页查询监控设备列表 + * 查询 + * @param data + * @returns {*} + */ +export const videoCameraFindPage = (data) => { + return request({ + url: '/videoCamera/findPage', + method: 'post', + data: data + }) +} +/** + * 原有监控点位 + * 查询 + * @param data + * @returns {*} + */ +export const dsVideoList = (data) => { + return request({ + url: '/fishingPort/dsVideo/getList', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json;charset=utf-8' + } + }) +} +/** + * 分页查询无人机设备列表 + * 查询 + * @param data + * @returns {*} + */ +export const findUavPage = (data) => { + return request({ + url: '/videoCamera/findUavPage', + method: 'post', + data: data + }) +} +/** + * 分页查询环境检测设备列表 / ais基站 + * 查询 + * @param data + * @returns {*} + */ +export const findEnvPage = (data) => { + return request({ + url: '/videoCamera/findEnvPage', + method: 'post', + data: data + }) +} \ No newline at end of file diff --git a/src/components/Map/index.vue b/src/components/Map/index.vue index f28948e..32a8491 100644 --- a/src/components/Map/index.vue +++ b/src/components/Map/index.vue @@ -24,6 +24,7 @@ import { ElMessage } from 'element-plus' import { monitors, uavs, stations, environmentals, fences, detailFences } from './js/mock.js' import InfoWindowComponent from '@/components/Map/window/index.vue' import TrawlerInfoWindowComponent from '@/components/Map/window/trawler.vue' +import { videoCameraFindPage, findUavPage, findEnvPage, dsVideoList } from '@/api/device.js' const mapStore = useMapStore() const UAV = computed(() => mapStore.legend.UAV) @@ -313,12 +314,30 @@ const addEnvironmentalToMap = () => { } const initUAV = () => { - geography.UAV = uavs - addUAVToMap() + const params = { + pageNo: 1, + pageSize: 9999 + } + findUavPage(params).then(res => { + if (res.success) { + geography.UAV = res.result.records + addUAVToMap() + } + }) + } const initMonitor = () => { - geography.monitor = monitors + const params = { + pageNo: 1, + pageSize: 9999 + } + videoCameraFindPage(params).then(res => { + if (res.success) { + geography.monitor = res.result.records addMonitorToMap() + + } + }) } const initAisStation = () => { geography.ais_station = stations diff --git a/src/components/Map/window/uav.vue b/src/components/Map/window/uav.vue index d9582d5..66f5235 100644 --- a/src/components/Map/window/uav.vue +++ b/src/components/Map/window/uav.vue @@ -1,219 +1,27 @@