From 7e6b37afd1295c71bca1de595426330aff88420d Mon Sep 17 00:00:00 2001
From: surprise <15810472099@163.com>
Date: 星期一, 08 一月 2024 09:55:53 +0800
Subject: [PATCH] 代码提交

---
 src/components/right/switchImagerLayer.vue |   79 ++++++++++++++++++++++++---------------
 1 files changed, 49 insertions(+), 30 deletions(-)

diff --git a/src/components/right/switchImagerLayer.vue b/src/components/right/switchImagerLayer.vue
index cdccb03..439f496 100644
--- a/src/components/right/switchImagerLayer.vue
+++ b/src/components/right/switchImagerLayer.vue
@@ -8,59 +8,62 @@
         />
       </li> -->
       <li>
-        <img
-          @click="switchImagerLayerClick('褰卞儚搴曞浘')"
-          src="@/assets/img/new/yingxiang.png"
-        />
+        <img @click="switchImagerLayerClick('褰卞儚搴曞浘')" src="@/assets/img/new/yingxiang.png" />
       </li>
       <li>
-        <div class="radiogroup" @change="switchImagerLayerClick('浜岀淮搴曞浘')">
-          <el-radio-group v-model="radio">
+        <div class="radiogroup" @click="switchImagerLayerClick('浜岀淮搴曞浘')">
+          <!-- <el-radio-group v-model="radio">
             <el-radio :label="2">鏍囧噯鐧�</el-radio>
             <el-radio :label="1">绉戞妧钃�</el-radio>
             <el-radio :label="0">鏆楀榛�</el-radio>
-          </el-radio-group>
+          </el-radio-group> -->
           <img src="@/assets/img/new/shiliang.png" />
         </div>
       </li>
-      <li>
+      <!-- <li>
         <img
           @click="switchImagerLayerClick('瀹炴櫙妯″瀷')"
           src="@/assets/img/new/sanwei.png"
         />
-      </li>
+      </li> -->
     </ul>
   </div>
 </template>
 
 <style  scoped>
 .switchImagerLayer {
-  width: 395px;
+  width: 260px;
   height: 88px;
   position: absolute;
-  right: 78px;
+  right: 10px;
   top: -90px;
 }
+
 .switchImagerLayer ul {
   width: 100%;
   list-style: none;
   display: flex;
   justify-content: space-between;
 }
+
 li {
   cursor: pointer;
   width: 124px;
   height: 89px;
 }
+
 li img {
   width: 100%;
 }
+
 li:hover {
   background-color: rgb(0, 136, 255, 0.4);
 }
+
 .switchImagerLayer li .radiogroup {
   position: absolute;
 }
+
 .switchImagerLayer li .el-radio-group {
   display: flex;
   flex-direction: column;
@@ -71,6 +74,7 @@
   top: 5px;
   z-index: 10;
 }
+
 .el-radio {
   color: #fff;
   text-shadow: 1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000,
@@ -105,6 +109,7 @@
 <script>
 import Bus from "../tools/Bus";
 import baseVuex from "@mixin/baseVuex";
+
 export default {
   name: "switchImagerLayer",
   components: {},
@@ -121,31 +126,45 @@
       },
     };
   },
-  mounted() {},
+  mounted() { },
   mixins: [baseVuex],
   methods: {
-    clearLayer() {},
+    clearLayer() { },
+    removeLayer() {
+      var layer = Viewer.imageryLayers._layers[1];
+      if (layer) {
+        Viewer.imageryLayers.remove(layer)
+      }
+    },
     switchImagerLayerClick(type) {
       switch (type) {
         case "褰卞儚搴曞浘":
-          this.radio = null;
-          this.changeLayer("2d"); //娣诲姞鐩告満鑼冨洿闄愬埗
-          this.clearSwitchImagerLayerClick();
-          Bus.$emit("switchImage");
-          this.$parent.changeImage("1");
+          // this.radio = null;
+          // this.changeLayer("2d"); //娣诲姞鐩告満鑼冨洿闄愬埗
+          // this.clearSwitchImagerLayerClick();
+          // Bus.$emit("switchImage");
+          // this.$parent.changeImage("1");
+          // 
+          Viewer.imageryLayers._layers[1].show = false;
+          Viewer.imageryLayers._layers[2].show = false;
+          Viewer.imageryLayers._layers[3].show = true;
           break;
         case "浜岀淮搴曞浘":
-          this.changeLayer("2d"); //娣诲姞鐩告満鑼冨洿闄愬埗
-          this.clearSwitchImagerLayerClick();
-          if (this.radio == 0) {
-            Bus.$emit("heijin2D");
-          } else if (this.radio == 1) {
-            Bus.$emit("shenlan2D");
-          } else {
-            Bus.$emit("baise2D");
-          }
-          // Bus.$emit("switch2D");
-          this.$parent.changeImage("2");
+          Viewer.imageryLayers._layers[1].show = true;
+          Viewer.imageryLayers._layers[2].show = true;
+          Viewer.imageryLayers._layers[3].show = false;
+          // Viewer.imageryLayers.remove(Viewer.imageryLayers._layers[1])
+          // this.changeLayer("2d"); //娣诲姞鐩告満鑼冨洿闄愬埗
+          // this.clearSwitchImagerLayerClick();
+          // if (this.radio == 0) {
+          //   Bus.$emit("heijin2D");
+          // } else if (this.radio == 1) {
+          //   Bus.$emit("shenlan2D");
+          // } else {
+          //   Bus.$emit("baise2D");
+          // }
+          // // Bus.$emit("switch2D");
+          // this.$parent.changeImage("2");
           break;
         case "瀹炴櫙妯″瀷":
           this.radio = null;
@@ -223,7 +242,7 @@
 
       try {
         if (window.panoramaLayer) window.panoramaLayer.deleteObject();
-      } catch (e) {}
+      } catch (e) { }
       if (window.panoramaHandler) window.panoramaHandler.destroy();
       if (window.panoramaHandler) window.panoramaHandler = undefined;
     },

--
Gitblit v1.9.3