From 237d85a5e91ffd7e24b163a4702be380f0417ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Fri, 21 Apr 2023 18:12:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=B0=E5=9B=BE=E5=9D=90?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/realTimeMonitoring/electronicFence.js | 38 +------- .../carMonitoring/index.vue | 86 +++++++++++-------- .../electronicFence/index.vue | 44 +++++++--- .../historicalRoute/index.vue | 24 ------ .../vehicleMonitoring/index.vue | 82 ++++++++++-------- .../views/tireManagement/lifecycle/index.vue | 14 +-- ruoyi-ui/vite.config.js | 2 +- 7 files changed, 141 insertions(+), 149 deletions(-) diff --git a/ruoyi-ui/src/api/realTimeMonitoring/electronicFence.js b/ruoyi-ui/src/api/realTimeMonitoring/electronicFence.js index 9ec75b0..cb4d973 100644 --- a/ruoyi-ui/src/api/realTimeMonitoring/electronicFence.js +++ b/ruoyi-ui/src/api/realTimeMonitoring/electronicFence.js @@ -2,44 +2,10 @@ import request from '@/utils/request' // 查询轮胎基础信息列表 -export function listTest(query) { +export function listBaseCar(query) { return request({ - url: '/basetyre/CollectMachineGps/list', + url: '/carqueue/carqueue/carQueuelist', method: 'get', params: query }) } - -// 查询轮胎基础信息详细 -export function getTest(id) { - return request({ - url: '/test/test/' + id, - method: 'get' - }) -} - -// 新增轮胎基础信息 -export function addTest(data) { - return request({ - url: '/test/test', - method: 'post', - data: data - }) -} - -// 修改轮胎基础信息 -export function updateTest(data) { - return request({ - url: '/test/test', - method: 'put', - data: data - }) -} - -// 删除轮胎基础信息 -export function delTest(id) { - return request({ - url: '/test/test/' + id, - method: 'delete' - }) -} diff --git a/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue b/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue index e3abc39..24c730a 100644 --- a/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue +++ b/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue @@ -41,14 +41,16 @@
-
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-1`))[0].temperature }} +
+ {{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-1`))[0].temperature }}
-
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-1`))[0].pressure }} +
+ {{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-1`))[0].pressure }}
- - - + + +
-
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-2`))[0].temperature }} +
+ {{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-2`))[0].temperature }}
-
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-2`))[0].pressure }} +
+ {{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-1-2`))[0].pressure }}
- - - + + +
-
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-2`))[0].temperature }} +
+ {{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-2`))[0].temperature }}
-
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-2`))[0].pressure }} +
+ {{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-2`))[0].pressure }}
- - - + + +
-
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-1`))[0].temperature }} +
+ {{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-1`))[0].temperature }}
-
{{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-1`))[0].pressure }} +
+ {{ tyreList.filter(e => e.tyrePositionS === (`${index + 1}-2-1`))[0].pressure }}
- - - + + +
@@ -319,7 +327,6 @@ AMapLoader.load({ center: [116.397428, 39.90923], //初始化地图中心点位置 }); }).catch(e => { - console.log(e); }) proxy.$nextTick(async () => { pageId.value = $router?.currentRoute?.value?.query?.id @@ -355,10 +362,9 @@ const getList = async () => { const tableChange = async (e) => { pageId.value = e.id const {data: info} = await getCarGpsList({id: pageId.value}) - console.log(info) cardInfo.value = { carLicense: info.carLicense, - name:info.carQueue + name: info.carQueue } let TireRow1 = info.cartype?.split('T')[1]?.split('|').filter(e => e !== '') || [] let title = [] @@ -374,7 +380,6 @@ const tableChange = async (e) => { }) tyreList.value = tyreListData tyreDataList.value = tyreListData.map(e => e.tyrePositionS) - console.log(tyreList.value) let timeOut = () => { setTimeout(() => { if (map) { @@ -456,16 +461,23 @@ const resetQuery = () => { tableRef1.value.setCurrentRow() } const setMarker = (res) => { - markers.value ? map.remove(markers.value) : '' - markers.value = new AMap.Marker({ - content: '
', - position: [res.longitude, res.latitude], - anchor: 'bottom-center', - offset: new AMap.Pixel(0, 0), - }); - map.add(markers.value) - map.setFitView() - map.setZoom(8) + console.log(res) + let pathRow = [[res.longitude, res.latitude]] + markers.value && map.remove(markers.value) + AMap.convertFrom(pathRow, 'gps', function (status, result) { + if (result.info === 'ok') { + let lnglats = result.locations.map(e => [e.lng, e.lat]); + markers.value = new AMap.Marker({ + content: '
', + position: lnglats[0], + anchor: 'bottom-center', + offset: new AMap.Pixel(0, 0), + }); + map.add(markers.value) + map.setFitView() + map.setZoom(8) + } + }) } onBeforeUnmount(() => { map.destroy() @@ -534,7 +546,8 @@ onBeforeUnmount(() => { .el-descriptions__label { width: 170px; } -.icon1{ + +.icon1 { margin-left: 5px; display: inline-block; vertical-align: top; @@ -546,7 +559,8 @@ onBeforeUnmount(() => { background-size: 100% 100%; background-image: url('@/assets/images/temperature.png') } -.icon2{ + +.icon2 { margin-left: 5px; display: inline-block; vertical-align: top; diff --git a/ruoyi-ui/src/views/realTimeMonitoring/electronicFence/index.vue b/ruoyi-ui/src/views/realTimeMonitoring/electronicFence/index.vue index 6a8d25f..1d11fda 100644 --- a/ruoyi-ui/src/views/realTimeMonitoring/electronicFence/index.vue +++ b/ruoyi-ui/src/views/realTimeMonitoring/electronicFence/index.vue @@ -4,13 +4,13 @@ - + @change="cascaderChange"/>