From 1bebb82e17085bbff48eddb650716dd8c96b25b0 Mon Sep 17 00:00:00 2001
From: Joe <1712833832@qq.com>
Date: Thu, 18 Jan 2024 11:08:21 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E8=A1=8C=E8=BD=A6=E8=AF=B1=E5=AF=BC?=
 =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../components/RoadAndEvents/utils/buttonEvent.js   | 10 ++++++++--
 .../Home/components/RoadAndEvents/utils/map.js      | 13 ++++++++++---
 .../src/views/JiHeExpressway/scss/el-reset.scss     | 12 ++++++------
 3 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
index 3f697a41..40f6b3fc 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
@@ -47,7 +47,7 @@ export const eventMap = {
 
     cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.();
 
-    cacheRemoveFunc.DriveTestEquipment_Camera_Remove = setMarkToMap.call(
+    cacheRemoveFunc.DriveTestEquipment_Camera_Remove = await setMarkToMap.call(
       this,
       item,
       data,
@@ -96,13 +96,17 @@ export const eventMap = {
 
     cacheRemoveFunc.Driving_Guidance_Remove?.();
 
-    cacheRemoveFunc.Driving_Guidance_Remove = setMarkToMap.call(
+    let noneLocation = true;
+
+    cacheRemoveFunc.Driving_Guidance_Remove = await setMarkToMap.call(
       this,
       item,
       data,
       (item) => {
         const { lng, lat } = PilePointJSON[item.stakeMarkId] || {};
 
+        if (lng && lat) noneLocation = false;
+
         return {
           lnglat: [lng, lat],
         };
@@ -114,6 +118,8 @@ export const eventMap = {
         };
       }
     );
+
+    if (noneLocation) Message.warning("匹配到诱导设备位置!");
     // cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.();
   },
 };
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
index eb721cfe..f6671b09 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
@@ -1,4 +1,5 @@
 import { loadAMap } from "@screen/pages/Home/components/AMapContainer/loadAMap.js";
+import { Message } from "element-ui";
 
 /**
  * @typedef {Object} Point
@@ -24,6 +25,8 @@ export async function setMarkerCluster(map, points, markerFun) {
 
   let hasClick = false;
 
+  if (!points.length) Message.warning("匹配到对应坐标点");
+
   const markerCluster = new AMap.MarkerCluster(map, points, {
     // gridSize: 15,
     maxZoom: 15,
@@ -94,7 +97,7 @@ export async function setMarkerCluster(map, points, markerFun) {
  * @param {*} _markerClick marker 点击
  * @returns
  */
-export function setMarkToMap(item, data, resolveMarker, _markerClick) {
+export async function setMarkToMap(item, data, resolveMarker, _markerClick) {
   const { mapIns } = this.getMap();
 
   if (!mapIns) return Message.error("地图加载失败!");
@@ -118,7 +121,7 @@ export function setMarkToMap(item, data, resolveMarker, _markerClick) {
     _markerClick(extData, e);
   };
 
-  const markerCluster = setMarkerCluster(
+  const markerCluster = await setMarkerCluster(
     mapIns,
     data.map((item) => {
       const { lnglat, content } = resolveMarker(item);
@@ -153,7 +156,11 @@ export function setMarkToMap(item, data, resolveMarker, _markerClick) {
     markerClick
   );
 
-  mapIns.setFitView(markerCluster.U, false, [360, 360, 360, 360]);
+  mapIns.setZoom(9);
+
+  setTimeout(() => {
+    mapIns.setFitView([...markerCluster.U], false, [0, 0, 0, 0]);
+  });
 
   return () => markerCluster.setMap(null);
 }
diff --git a/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss b/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss
index 60159e30..148fe407 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss
+++ b/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss
@@ -282,14 +282,11 @@ div.el-scrollbar {
 }
 
 body {
-  input.el-input__inner {
+  input.el-input__inner,
+  textarea.el-textarea__inner {
     background-color: #0d5f79;
     color: #fff;
     border-radius: 2px;
-    border: 0;
-    height: 100%;
-    min-height: fit-content;
-    line-height: unset;
 
     &::placeholder {
       color: #fff;
@@ -298,6 +295,10 @@ body {
 
   div.el-input {
     input.el-input__inner {
+      border: 0;
+      height: 100%;
+      min-height: fit-content;
+      line-height: unset;
       font-size: 12px;
     }
 
@@ -311,7 +312,6 @@ body {
     textarea.el-textarea__inner {
       background: #0a3e54;
       border-radius: 5px;
-      opacity: 1;
       border: 1px solid rgba(98, 224, 254, 0.6);
     }
 

From 2ff94dea0d3b543d40220f33f763d26916b7deec Mon Sep 17 00:00:00 2001
From: Joe <1712833832@qq.com>
Date: Thu, 18 Jan 2024 11:15:42 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=20=E8=81=9A=E7=84=A6?=
 =?UTF-8?q?=E5=88=B0=20=E5=9C=B0=E5=9B=BE=20=E6=96=B0=20marker=20=E4=B8=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../pages/Home/components/RoadAndEvents/utils/map.js          | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
index f6671b09..7f14a0fc 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
@@ -156,10 +156,8 @@ export async function setMarkToMap(item, data, resolveMarker, _markerClick) {
     markerClick
   );
 
-  mapIns.setZoom(9);
-
   setTimeout(() => {
-    mapIns.setFitView([...markerCluster.U], false, [0, 0, 0, 0]);
+    mapIns.setFitView([...markerCluster.U], false, [0, 0, 0, 0], 7);
   });
 
   return () => markerCluster.setMap(null);