From 135520a0eeed81cba817ff60c7d26d91a56fe590 Mon Sep 17 00:00:00 2001 From: renna <576157508@qq.com> Date: Wed, 16 Jul 2025 17:37:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85=E8=B7=AF=E7=94=B1=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- public/.htaccess | 1 + .../map/controls/OpenLayersZoomControl.vue | 25 +++++++----------- src/components/map/info/AlarmNotification.vue | 2 +- src/components/map/info/CarDetail.vue | 9 ++++--- src/components/map/info/eventlist.vue | 5 ++-- src/router/index.js | 26 +++++++++++-------- src/utils/request.js | 2 +- src/views/system/driver/index.vue | 5 ++-- vite.config.js | 2 +- 10 files changed, 40 insertions(+), 39 deletions(-) create mode 100644 public/.htaccess diff --git a/.env.production b/.env.production index e7596e3..4b364a1 100644 --- a/.env.production +++ b/.env.production @@ -5,7 +5,7 @@ VITE_APP_TITLE = 青岛机场无人驾驶车辆协同云平台 VITE_APP_ENV = 'production' # 青岛机场无人驾驶车辆协同云平台/生产环境 -VITE_APP_BASE_API = '/prod-api' +VITE_APP_BASE_API = 'http://10.0.0.126:8080' VITE_APP_WEBSOCKET_URL='ws://10.0.0.124:8080/collision' diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/public/.htaccess @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/map/controls/OpenLayersZoomControl.vue b/src/components/map/controls/OpenLayersZoomControl.vue index d7ec653..d8c6995 100644 --- a/src/components/map/controls/OpenLayersZoomControl.vue +++ b/src/components/map/controls/OpenLayersZoomControl.vue @@ -27,11 +27,16 @@ import { ref, onMounted, onUnmounted, watch } from "vue"; import LayerSwitcher from "./LayerSwitcher.vue"; // 导入图片资源 -import znzBgImg from "../../../assets/images/znzBg.png"; -import needleImg from "../../../assets/images/znz.png"; -import leftArrowImg from "../../../assets/images/left_arrow.png"; -import rightArrowImg from "../../../assets/images/right_arrow.png"; +import leftArrowActiveImg from "../../../assets/images/left_arrow_active.png"; +import rightArrowActiveImg from "../../../assets/images/right_arrow_active.png"; +import zoomInActiveImg from "../../../assets/images/zoomInActive.png"; +import zoomOutActiveImg from "../../../assets/images/zoomOutActive.png"; +import layerActiveImg from "../../../assets/images/layerActive.png"; +[leftArrowActiveImg, rightArrowActiveImg, zoomInActiveImg, zoomOutActiveImg, layerActiveImg].forEach(src => { + const img = new window.Image(); + img.src = src; +}); // 定义props接受地图实例 const props = defineProps({ map: Object, // 地图实例 @@ -111,18 +116,6 @@ function rotateRight() { } } -// 指南针/重置视图 -function onCompass() { - emit("compass"); - if (props.resetView) { - props.resetView(); - } else if (props.map) { - // 如果没有提供重置函数,尝试使用地图的初始视图 - const initialCenter = props.map.options.center; - const initialZoom = props.map.options.zoom || 7; - props.map.setView(initialCenter, initialZoom, { animate: true }); - } -} // 放大地图 function onZoomIn() { diff --git a/src/components/map/info/AlarmNotification.vue b/src/components/map/info/AlarmNotification.vue index 688f9ec..1689dad 100644 --- a/src/components/map/info/AlarmNotification.vue +++ b/src/components/map/info/AlarmNotification.vue @@ -48,7 +48,7 @@