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 |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/components/poplayer/history2.vue b/src/components/poplayer/history2.vue
index 03a62e0..4b6fcc3 100644
--- a/src/components/poplayer/history2.vue
+++ b/src/components/poplayer/history2.vue
@@ -23,15 +23,15 @@
 <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: {},
   data() {
     return {
       arr: [
-        2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
-        2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021,
+        2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010,
+        2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001,
       ],
       currentValue: 2021,
     };
@@ -39,9 +39,10 @@
   mounted() {
     store.setNavigatorShow(false);
     store.setMapToolShow(false);
-    // window.mapapi.getView().setCenter(ol.proj.fromLonLat([4.606512, 2.621472]));
-    window.mapapi.getView().setCenter(ol.proj.fromLonLat([116.505348, 39.795592]));
+    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);
     }
@@ -54,7 +55,10 @@
     close() {
       store.setHistoryShow(false);
       window.mapapi.removeLayer(this.$global.historyLayer);
-      window.mapapi.getView().setCenter(ol.proj.fromLonLat([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);
     },
@@ -103,8 +107,7 @@
   color: #127dff;
 }
 
-
-.active {
+.listBox .active {
   /* background-color: #4590d7; */
   color: #127dff;
 }

--
Gitblit v1.9.3