From cc172379672d3d580d503a7bb17ab53a8852616c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Wed, 29 Mar 2023 14:56:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../realTimeMonitoring/vehicleMonitoring.js | 8 +++++++ .../src/views/deviceManagement/info/index.vue | 2 ++ .../vehicleMonitoring/index.vue | 21 ++++++++++++------- .../views/tireManagement/lifecycle/index.vue | 4 ++-- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/ruoyi-ui/src/api/realTimeMonitoring/vehicleMonitoring.js b/ruoyi-ui/src/api/realTimeMonitoring/vehicleMonitoring.js index 381fd12..57b55d1 100644 --- a/ruoyi-ui/src/api/realTimeMonitoring/vehicleMonitoring.js +++ b/ruoyi-ui/src/api/realTimeMonitoring/vehicleMonitoring.js @@ -9,6 +9,14 @@ export function getCarGpsList(query) { }) } +export function queryCardata(query) { + return request({ + url: '/basecar/car/queryCardata', + method: 'get', + params: query + }) +} + export function listBasetyre(query) { return request({ url: '/carqueue/carqueue/carQueuelist', diff --git a/ruoyi-ui/src/views/deviceManagement/info/index.vue b/ruoyi-ui/src/views/deviceManagement/info/index.vue index e08e87f..08cefbf 100644 --- a/ruoyi-ui/src/views/deviceManagement/info/index.vue +++ b/ruoyi-ui/src/views/deviceManagement/info/index.vue @@ -44,6 +44,7 @@ import AMapLoader from '@amap/amap-jsapi-loader'; -import {getCarGpsList, listBasetyre} from '@/api/realTimeMonitoring/vehicleMonitoring' +import {getCarGpsList, listBasetyre,queryCardata} from '@/api/realTimeMonitoring/vehicleMonitoring' import {parseTime} from "@/utils/ruoyi"; import {onBeforeUnmount} from "@vue/runtime-core"; @@ -20,19 +20,26 @@ const treeClick = (data) => { if (!data.baseCarList) { map.remove(markers.value); markers.value = [] - setMarker({id: data.id}, 14) + setMarker({id: data.id}, 14,false) } else { map.remove(markers.value); markers.value = [] - setMarker({queueId: data.id}, 8) + setMarker({queueId: data.id}, 8,true) } } window.$tab = proxy.$tab -const setMarker = async (data, zoom) => { - const {data: markerArr} = await getCarGpsList(data) +const setMarker = async (data, zoom,isChildren) => { + let markerArr = [] + if(isChildren){ + let e= await listBasetyre(data) + markerArr = e.rows?.[0]?.baseCarList + } else{ + let e = await queryCardata(data) + markerArr = [e.data] + } + console.log(markerArr) markerArr.forEach((e, index) => { - // 点标记 markers.value[index] = new AMap.Marker({ content: '
', @@ -69,7 +76,7 @@ AMapLoader.load({ zoom: 8, //初始化地图级别 center: [116.397428, 39.90923], //初始化地图中心点位置 }); - await setMarker() + await setMarker(undefined,undefined,true) // 在图面添加工具条控件,工具条控件集成了缩放、平移、定位等功能按钮在内的组合控件 diff --git a/ruoyi-ui/src/views/tireManagement/lifecycle/index.vue b/ruoyi-ui/src/views/tireManagement/lifecycle/index.vue index d905e59..e3829d2 100644 --- a/ruoyi-ui/src/views/tireManagement/lifecycle/index.vue +++ b/ruoyi-ui/src/views/tireManagement/lifecycle/index.vue @@ -18,7 +18,7 @@ 最长连续报警时间   {{ tireInfo.warringTime }}   历史最高胎压   - {{ tireInfo.highTemHis }}   + {{ tireInfo.highPressHis }}  
预计剩余里程   @@ -26,7 +26,7 @@ 最长连续工作时间   {{ tireInfo.longestWorkTime }}   历史最高胎温   - {{ tireInfo.highPressHis }}   + {{ tireInfo.highTemHis }}  
报警次数