From ed5fcf5a0fb11f441ecdd4f7d346e02946134f79 Mon Sep 17 00:00:00 2001 From: lixin <1241640713@qq.com> Date: Thu, 4 Jan 2024 13:25:57 +0800 Subject: [PATCH 1/2] 5266 --- src/views/dashboard/components/OneMap.vue | 6 +++--- src/views/dashboard/components/Underlay.vue | 5 ++--- src/views/early-warning/fire/components/FlightDrawer.vue | 5 ++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/views/dashboard/components/OneMap.vue b/src/views/dashboard/components/OneMap.vue index 3b98729..86862f2 100644 --- a/src/views/dashboard/components/OneMap.vue +++ b/src/views/dashboard/components/OneMap.vue @@ -45,7 +45,6 @@ import { airportList, getWarning } from '@/api/dashboard/index.js' import { getTaskDetail } from '@/api/task/index.js' -import { gcj02towgs84 } from '@/utils/coordinate-util.js' import AirInfo from './AirInfo.vue' import ProblemInfo from './ProblemInfo.vue' import SuppliesInfo from './SuppliesInfo.vue' @@ -281,10 +280,11 @@ export default { if (data.airportsAll.length > 0) { for (let i = 0; i < data.airportsAll.length; i++) { const airport = data.airportsAll[i] - const lngLat = gcj02towgs84( + const lngLat = [ parseFloat(airport.longitude), parseFloat(airport.latitude) - ) + ] + const feature = new Feature({ geometry: new Point(fromLonLat(lngLat)) }) diff --git a/src/views/dashboard/components/Underlay.vue b/src/views/dashboard/components/Underlay.vue index dc3c1e3..90c5a41 100644 --- a/src/views/dashboard/components/Underlay.vue +++ b/src/views/dashboard/components/Underlay.vue @@ -21,7 +21,6 @@ import { styleList } from '@/utils/style.js' import { getTrackList } from '@/api/task/index.js' import { useInspectionStore } from '@/store/modules/inspection.js' import { airportList, getWarningInfo } from '@/api/dashboard/index.js' -import { gcj02towgs84 } from '@/utils/coordinate-util.js' import uav_icon from '@/assets/images/airport.png' import warningIcon from '@/assets/gis/images/fire.png' import gcj02Mecator from '@/utils/map/gcj02Mecator.js' @@ -120,10 +119,10 @@ export default { for (let i = 0; i < res.data.length; i++) { if (id === res.data[i].id) { const airport = res.data[i] - const lngLat = gcj02towgs84( + const lngLat = [ parseFloat(airport.longitude), parseFloat(airport.latitude) - ) + ] const feature = new Feature({ geometry: new Point(fromLonLat(lngLat)) }) diff --git a/src/views/early-warning/fire/components/FlightDrawer.vue b/src/views/early-warning/fire/components/FlightDrawer.vue index a41489f..6db995a 100644 --- a/src/views/early-warning/fire/components/FlightDrawer.vue +++ b/src/views/early-warning/fire/components/FlightDrawer.vue @@ -59,7 +59,6 @@ import warningIcon from '@/assets/gis/images/fire.png' // 视频组件 import VideoPlayer from '@/components/VideoPlayer/index.vue' import gcj02Mecator from '@/utils/map/gcj02Mecator.js' -import { gcj02towgs84 } from '@/utils/coordinate-util.js' export default defineComponent({ name: 'FlightDrawer', components: { VideoPlayer }, @@ -160,10 +159,10 @@ export default defineComponent({ for (let i = 0; i < res.data.length; i++) { if (id === res.data[i].id) { const airport = res.data[i] - const lngLat = gcj02towgs84( + const lngLat = [ parseFloat(airport.longitude), parseFloat(airport.latitude) - ) + ] const feature = new Feature({ geometry: new Point(fromLonLat(lngLat)) }) -- 2.27.0 From 25cf7639b490a27caba869171e6dfb5e56f71a3f Mon Sep 17 00:00:00 2001 From: lixin <1241640713@qq.com> Date: Thu, 4 Jan 2024 14:55:09 +0800 Subject: [PATCH 2/2] 5266 --- src/layout/components/Header/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layout/components/Header/index.vue b/src/layout/components/Header/index.vue index 7ff28e5..f3d4bee 100644 --- a/src/layout/components/Header/index.vue +++ b/src/layout/components/Header/index.vue @@ -11,7 +11,7 @@