From 21ddc9ec1b1b76d2ce20e512328e65acaf1af2bf Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期一, 16 一月 2023 10:35:15 +0800
Subject: [PATCH] 廊坊代码更新

---
 src/views/Synthesis/LeftMenu.vue |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/views/Synthesis/LeftMenu.vue b/src/views/Synthesis/LeftMenu.vue
index a21ad2a..afeff0d 100644
--- a/src/views/Synthesis/LeftMenu.vue
+++ b/src/views/Synthesis/LeftMenu.vue
@@ -873,6 +873,11 @@
         { cyjj: 50, objid: 0 },
         (Distance) => {
           if (Distance.gcs && Distance.gcs.length) {
+            var url = window.location.href;
+            var testurl = '';
+            if (url.indexOf('web') != -1) {
+              testurl = '/web';
+            }
             window.AnalysisDXPM.analyseData = Distance;
             this.dxpmIndex = layer.open({
               type: 2,
@@ -881,7 +886,7 @@
               area: ['80%', '280px'],
               offset: 'b',
               skin: 'other-class',
-              content: '/SmartEarthSDK/Workers/analysis/AnalysisDXPM.html',
+              content: testurl + '/SmartEarthSDK/Workers/analysis/AnalysisDXPM.html',
               end: () => {
                 this.dxpmIndex && this.clear('d4');
               },
@@ -996,7 +1001,14 @@
     setCoverage(res) {
       switch (res) {
         case 'a1':
-          this.$refs && this.$refs.maplayer && this.$refs.maplayer.open();
+          if (this.$store.state.layerMnage == false) {
+            this.$refs && this.$refs.maplayer && this.$refs.maplayer.open();
+            this.$store.state.layerMnage = true;
+          } else if (this.$store.state.layerMnage == true) {
+            this.$refs && this.$refs.maplayer && this.$refs.maplayer.close();
+            this.$store.state.layerMnage = false;
+          }
+
           break;
       }
     },
@@ -1020,8 +1032,9 @@
     });
     this.$bus.$on('showLeftMenu', (res) => {
       this.$store.state.showAllLayers = true;
+
       this.setCoverage('a1');
-      // this.$bus.$emit('setAllLayers', true);
+
     });
   },
 };

--
Gitblit v1.9.3