From f5233339920a59103d53e8efadc6f3f5d0b64f31 Mon Sep 17 00:00:00 2001
From: lixuliang <lixuliang_hd@126.com>
Date: 星期三, 08 五月 2024 14:45:37 +0800
Subject: [PATCH] 移动端

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

diff --git a/src/components/poplayer/history2.vue b/src/components/poplayer/history2.vue
index c7d93bb..3475168 100644
--- a/src/components/poplayer/history2.vue
+++ b/src/components/poplayer/history2.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="historyBox">
-    <div class="colseBtn">
-      <img class="searchBtn" @click="close" src="@/assets/closeinput1.png" />
+    <div class="closeWrapper">
+      <img class="colseBtn" @click="close" src="@/assets/closeinput1.png" />
     </div>
     <div class="listBox">
       <ul>
@@ -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);
     },
@@ -61,14 +66,14 @@
 };
 </script>
 <style scoped>
-.colseBtn {
+.closeWrapper {
   position: absolute;
   top: 20px;
   right: 9px;
 }
 
-.searchBtn {
-  width: 51px;
+.colseBtn {
+  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;
 }
@@ -104,15 +107,7 @@
   color: #127dff;
 }
 
-.mapLeft {
-  float: left;
-  position: absolute;
-  width: 100vw;
-  height: 100vh;
-}
-
 .listBox .active {
-  /* background-color: #4590d7; */
   color: #127dff;
 }
 </style>

--
Gitblit v1.9.3