From 6fe940335b9ca7f4640983929b070c00e401dc61 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期四, 09 三月 2023 09:48:14 +0800
Subject: [PATCH] 综合展示点击模型显示详细信息

---
 src/views/Tools/terrainDig.vue |   30 ++++++++++++++++++++++++------
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/src/views/Tools/terrainDig.vue b/src/views/Tools/terrainDig.vue
index 52bcb45..44c0ecd 100644
--- a/src/views/Tools/terrainDig.vue
+++ b/src/views/Tools/terrainDig.vue
@@ -1,7 +1,15 @@
 <template>
-  <Popup ref="pop" :title="form.title" left="calc(100% - 330px)">
+  <Popup
+    ref="pop"
+    :title="form.title"
+    left="calc(100% - 330px)"
+  >
     <div class="terrainDig">
-      <el-form ref="form" :model="form" label-width="100px">
+      <el-form
+        ref="form"
+        :model="form"
+        label-width="100px"
+      >
         <el-form-item label="娣卞害(绫�):">
           <el-input-number
             v-model="form.depth"
@@ -14,7 +22,11 @@
           <el-switch v-model="form.showWall"></el-switch>
         </el-form-item> -->
         <el-form-item>
-          <el-button type="primary" size="mini" @click="dig">缁樺埗</el-button>
+          <el-button
+            type="primary"
+            size="mini"
+            @click="dig"
+          >缁樺埗</el-button>
           <!-- <el-upload
             class="button-group"
             action=""
@@ -50,11 +62,14 @@
     };
   },
   computed: {},
-  mounted() {},
+  mounted() { },
   methods: {
     // 鍏抽棴寮圭獥
     close() {
       this.$refs.pop.close();
+      if (window.Excavation) {
+        window.Excavation.drawHandler.destroy();
+      }
     },
     // 鎵撳紑寮圭獥
     open() {
@@ -68,6 +83,9 @@
     },
     // 鍦板舰寮�鎸�
     dig() {
+      // if (window.Excavation) {
+      //   window.Excavation.drawHandler.destroy();
+      // }
       window.Excavation = sgworld.Analysis.TerrainExcavation(
         this.form.depth,
         {
@@ -95,11 +113,11 @@
             ) {
               degreesArr.splice(length - 3, 3);
             }
-            Excavation = sgworld.Analysis.TerrainExcavation(this.form.depth, {
+            window.Excavation = sgworld.Analysis.TerrainExcavation(this.form.depth, {
               positions: degreesArr,
               showWall: this.form.showWall,
             });
-            this.addToTree(Excavation, degreesArr);
+            // this.addToTree(Excavation, degreesArr);
           });
         this.$message('寮�鎸栧尯鍩熷凡瀵煎叆');
       };

--
Gitblit v1.9.3