From d568e2924f24498dc8aec984d9970348e7923510 Mon Sep 17 00:00:00 2001 From: Vce Date: Wed, 27 Mar 2024 16:04:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E5=B8=BD=E5=9B=B4=E6=A0=8F=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/equipmentPosition.ts | 4 + src/api/modules/smartSafeHat.ts | 45 +- .../equipmentPosition/index.vue | 11 +- .../smartSafeHat/index.vue | 653 ++++++++++-------- 4 files changed, 384 insertions(+), 329 deletions(-) diff --git a/src/api/modules/equipmentPosition.ts b/src/api/modules/equipmentPosition.ts index 9ee6fd6..8cc0bde 100644 --- a/src/api/modules/equipmentPosition.ts +++ b/src/api/modules/equipmentPosition.ts @@ -21,6 +21,10 @@ export const getEpAlarmRecordInfoApi = (params: {}) => { export const getEpRealtimeDataApi = (params: {}) => { return http.get(BASEURL + `/xmgl/mechanicalEquipmentPositionData/list`, params); }; +// 机械设备定位--查询实时数据信息 +export const getEpRealtimeDataPageApi = (params: {}) => { + return http.get(BASEURL + `/xmgl/mechanicalEquipmentPositionData/page`, params); +}; // 机械设备定位--查询机械设备日行数据 export const getEpDayRecordApi = (params: {}) => { return http.get(BASEURL + `/xmgl/mechanicalEquipmentPositionDayRecord/list`, params); diff --git a/src/api/modules/smartSafeHat.ts b/src/api/modules/smartSafeHat.ts index 599e251..8ae84d5 100644 --- a/src/api/modules/smartSafeHat.ts +++ b/src/api/modules/smartSafeHat.ts @@ -1,47 +1,6 @@ import http from "@/api"; const BASEURL = import.meta.env.VITE_API_URL; -// 分页列表查询车辆(人员)定位- 实时数据信息 -export const getRealtimeRecordInfo = (params: {}) => { - return http.get(BASEURL + `/xmgl/vehiclePositionData/page`, params); -}; - -// 列表查询车辆(人员)定位- 实时数据信息 -export const getRealtimeRecordList = (params: {}) => { - return http.get(BASEURL + `/xmgl/vehiclePositionData/list`, params); -}; - -// 车辆定位-设备中台 -export const getstandardDevListApi = (params: {}) => { - return http.get(BASEURL + `/xmgl/vehiclePositionDev/page`, params); -}; -export const addstandardDevApi = (params: {}) => { - return http.post(BASEURL + `/xmgl/vehiclePositionDev/add`, params); -}; -export const editstandardDevApi = (params: {}) => { - return http.post(BASEURL + `/xmgl/vehiclePositionDev/edit`, params); -}; -export const deletestandardDevApi = (params: {}) => { - return http.post(BASEURL + `/xmgl/vehiclePositionDev/delete`, params); -}; - -export const getVehiclePositionFence = (params: {}) => { - return http.get(BASEURL + `/xmgl/vehiclePositionFence/list`, params); -}; -export const addVehiclePositionFence = (params: {}) => { - return http.post(BASEURL + `/xmgl/vehiclePositionFence/add`, params); -}; -export const editVehiclePositionFence = (params: {}) => { - return http.post(BASEURL + `/xmgl/vehiclePositionFence/edit`, params); -}; -export const deleteVehiclePositionFence = (params: {}) => { - return http.post(BASEURL + `/xmgl/vehiclePositionFence/delete`, params); -}; - -// 查询车辆日行数据 -export const getVehiclePositionDayRecord = (params: {}) => { - return http.get(BASEURL + `/xmgl/vehiclePositionDayRecord/list`, params); -}; // 智能安全帽--分类查询设备列表 export const getHatDevOptionApi = (params: {}) => { @@ -67,6 +26,10 @@ export const getAlarmRecordInfoApi = (params: {}) => { export const getRealtimeDataApi = (params: {}) => { return http.get(BASEURL + `/xmgl/safetyHatData/list`, params); }; +// 智能安全帽--查询实时数据信息 +export const getRealtimeDataPageApi = (params: {}) => { + return http.get(BASEURL + `/xmgl/safetyHatData/page`, params); +}; // 智能安全帽--查询安全帽日行数据 export const getSafeHatDayRecordApi = (params: {}) => { return http.get(BASEURL + `/xmgl/safetyHatData/list`, params); diff --git a/src/views/sevenLargeScreen/digitalConstruction/equipmentPosition/index.vue b/src/views/sevenLargeScreen/digitalConstruction/equipmentPosition/index.vue index 41eb31c..ce9d3d7 100644 --- a/src/views/sevenLargeScreen/digitalConstruction/equipmentPosition/index.vue +++ b/src/views/sevenLargeScreen/digitalConstruction/equipmentPosition/index.vue @@ -288,6 +288,7 @@ import { getEpSuroundInfoApi, getEpAlarmRecordInfoApi, getEpRealtimeDataApi, + getEpRealtimeDataPageApi, getEpDayRecordApi, addEpPositionFence, deleteEpFence @@ -687,12 +688,14 @@ function devChange(e) { function getRealTimeData(e) { let data = { devSn: e.devSn, - projectSn: store.sn + projectSn: store.sn, + pageNo: 1, + pageSize: 1 }; - getEpRealtimeDataApi(data).then(res => { - if (res.result.length > 0) { + getEpRealtimeDataPageApi(data).then(res => { + if (res.result.records.length > 0) { // echoPersonMarker(res.result.records[0]); - echoPersonMarker(res.result[0]); + echoPersonMarker(res.result.records[0]); } else { console.log("设备暂无数据", res); } diff --git a/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/index.vue b/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/index.vue index ab08115..142c029 100644 --- a/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/index.vue +++ b/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/index.vue @@ -1,194 +1,210 @@