From 626003e9beb59cf711f59f3b48087300070f121e Mon Sep 17 00:00:00 2001
From: lixuliang <lixuliang_hd@126.com>
Date: 星期五, 15 三月 2024 09:49:31 +0800
Subject: [PATCH] 优化

---
 src/components/poplayer/history2.vue |   26 +++++++++++---------------
 1 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/src/components/poplayer/history2.vue b/src/components/poplayer/history2.vue
index c7d93bb..4b6fcc3 100644
--- a/src/components/poplayer/history2.vue
+++ b/src/components/poplayer/history2.vue
@@ -23,7 +23,7 @@
 <script>
 import _GLOBAL from "@/assets/GLOBAL";
 import store from "@/utils/store2";
-import { addHistoryLayer } from "@/utils/tool";
+import { addHistoryLayer, addHistoryLW } from "@/utils/tool";
 export default {
   name: "historyBox",
   components: {},
@@ -39,8 +39,10 @@
   mounted() {
     store.setNavigatorShow(false);
     store.setMapToolShow(false);
-    window.mapapi.getView().setCenter([4.606512, 2.621472]);
+    window.mapapi.getView().setCenter(ol.proj.fromLonLat([4.606512, 2.621472]));
+    // window.mapapi.getView().setCenter(ol.proj.fromLonLat([116.505348, 39.795592]));
     addHistoryLayer(this.currentValue);
+    addHistoryLW();
     if (_GLOBAL.GPSMarker) {
       window.mapapi.removeLayer(_GLOBAL.GPSMarker);
     }
@@ -53,7 +55,10 @@
     close() {
       store.setHistoryShow(false);
       window.mapapi.removeLayer(this.$global.historyLayer);
-      window.mapapi.getView().setCenter([116.505348, 39.795592]);
+      window.mapapi.removeLayer(this.$global.historyLW);
+      window.mapapi
+        .getView()
+        .setCenter(ol.proj.fromLonLat([116.505348, 39.795592]));
       store.setNavigatorShow(true);
       store.setMapToolShow(true);
     },
@@ -68,7 +73,7 @@
 }
 
 .searchBtn {
-  width: 51px;
+  width: 0.4rem;
   /* height: 40px; */
 }
 
@@ -77,7 +82,6 @@
   right: 10px;
   bottom: 18px;
   width: 48px;
-  /* height: 594px; */
   background: #ffffff;
   box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.21);
   border-radius: 13px;
@@ -88,10 +92,9 @@
 }
 .listBox li {
   font-weight: bold;
-  font-size: 15px;
+  font-size: 0.12rem;
+  line-height: 0.25rem;
   color: #1c222f;
-  /* height: 28px;
-  line-height: 28px; */
   border-bottom: 1px solid #e5e5e5;
   text-align: center;
 }
@@ -102,13 +105,6 @@
 .listBox li:hover {
   /* background-color: #00e1ff; */
   color: #127dff;
-}
-
-.mapLeft {
-  float: left;
-  position: absolute;
-  width: 100vw;
-  height: 100vh;
 }
 
 .listBox .active {

--
Gitblit v1.9.3