From 00468a057ca642bc535dfdf80c7c1c7716eea4f0 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 27 Nov 2024 19:32:14 +0800
Subject: [PATCH] 地图销毁相关处理

---
 src/pages/layout/components/scomponents/tool/curtain.vue |   80 ++++++++++++++++++++--------------------
 1 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/src/pages/layout/components/scomponents/tool/curtain.vue b/src/pages/layout/components/scomponents/tool/curtain.vue
index 8b5074d..87d2bce 100644
--- a/src/pages/layout/components/scomponents/tool/curtain.vue
+++ b/src/pages/layout/components/scomponents/tool/curtain.vue
@@ -2,25 +2,25 @@
  * @Author: shuishen 1109946754@qq.com
  * @Date: 2024-10-29 15:48:36
  * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-10-29 19:53:49
- * @FilePath: \bigScreen\src\views\layout\components\scomponents\tool\location.vue
+ * @LastEditTime: 2024-11-27 19:17:04
+ * @FilePath: \bigScreen\src\pages\layout\components\scomponents\tool\curtain.vue
  * @Description: 
  * 
  * Copyright (c) 2024 by shuishen, All Rights Reserved. 
 -->
 <template>
-    <public-box style="z-index: 100;">
-        <template #name>
-            <div class="name"><i class="fa fa-map-pin"></i>&nbsp;卷帘对比 &nbsp;</div>
-        </template>
+  <public-box style="z-index: 100;">
+    <template #name>
+      <div class="name"><i class="fa fa-map-pin"></i>&nbsp;卷帘对比 &nbsp;</div>
+    </template>
 
-        <template #close>
-            <div class="close cursor-p" @click="$emit('closeChild')"><i class="fa fa-close"></i></div>
-        </template>
+    <template #close>
+      <div class="close cursor-p" @click="$emit('closeChild')"><i class="fa fa-close"></i></div>
+    </template>
 
-        <template #content>
-            <div class="cur-btn">
-                <!-- <div class="m-4">
+    <template #content>
+      <div class="cur-btn">
+        <!-- <div class="m-4">
                     <p>左侧图层</p>
                     <el-select class="transparent-bg" v-model="value1" placeholder="天地图">
                         <el-option v-for="item in components" :key="item.value" :label="item.label" :value="item.value" />
@@ -32,11 +32,11 @@
                         <el-option v-for="item in components" :key="item.value" :label="item.label" :value="item.value" />
                     </el-select>
                 </div> -->
-            </div>
-        </template>
-    </public-box>
+      </div>
+    </template>
+  </public-box>
 </template>
-  
+
 <script setup>
 const value1 = ref([])
 const value2 = ref([])
@@ -44,65 +44,65 @@
 
 
 onMounted(() => {
-    window.$viewer.sceneSplit.enable = true
+  window.$viewer.sceneSplit.enable = true
 })
 
 // 关闭
 const close = () => {
-    window.$viewer.sceneSplit.enable = false
+  window.$viewer.sceneSplit.enable = false
 }
 
 const flyTo = () => {
-    // window.$viewer.flyToPosition(new DC.Position(longitude.value, latitude.value, height.value, 0, -90, 0), () => { }, 3)
+  // window.$viewer.flyToPosition(new DC.Position(longitude.value, latitude.value, height.value, 0, -90, 0), () => { }, 3)
 }
 
 onUnmounted(() => {
-    window.$viewer.sceneSplit.enable = false
+  window.$viewer && (window.$viewer.sceneSplit.enable = false)
 })
 
 const components = [
-    { label: '天地图', value: '1' },
-    { label: '谷歌影像', value: '2' },
-    { label: '谷歌矢量', value: '3' },
-    { label: '高德影像', value: '4' },
+  { label: '天地图', value: '1' },
+  { label: '谷歌影像', value: '2' },
+  { label: '谷歌矢量', value: '3' },
+  { label: '高德影像', value: '4' },
 ]
 </script>
-  
-<style lang="scss" scoped >
+
+<style lang="scss" scoped>
 .cur-btn {
-    margin: 10px 0;
-    display: flex;
+  margin: 10px 0;
+  display: flex;
 
-    // justify-content: center;
-    // align-items: center;
+  // justify-content: center;
+  // align-items: center;
 
-    // &.el-select {
-    //     width: 50px;
-    // }
+  // &.el-select {
+  //     width: 50px;
+  // }
 }
 
 .m-4 {
-    text-align: center;
-    width: 200px;
+  text-align: center;
+  width: 200px;
 }
 
 .transparent-bg {
-    background: transparent;
+  background: transparent;
 
 }
 
 // 重新el——select样式
 ::v-deep .el-select__wrapper {
-    background: transparent;
+  background: transparent;
 
 }
 
 ::v-deep .el-select-dropdown {
-    // background: transparent;
-    background-color: aqua;
+  // background: transparent;
+  background-color: aqua;
 }
 
 ::v-deep .el-select .el-select__placeholder {
-    color: #fff;
+  color: #fff;
 }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3