From f21ba60dd8cd2f9f021d579fe52325abd37f4af1 Mon Sep 17 00:00:00 2001
From: chenzeping <ChenZeping02609@163.com>
Date: 星期三, 10 三月 2021 17:27:34 +0800
Subject: [PATCH] 修改已知问题

---
 src/components/panel/ToolBoxPanel.vue |   35 +++++++++++++++++++++++++----------
 1 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/src/components/panel/ToolBoxPanel.vue b/src/components/panel/ToolBoxPanel.vue
index 0666a93..1e9cba4 100644
--- a/src/components/panel/ToolBoxPanel.vue
+++ b/src/components/panel/ToolBoxPanel.vue
@@ -3,11 +3,6 @@
     <div class="init-choose" @click="changeSelect()">
       <img src="@/assets/images/map-pages/icon/toolbox/circle.png" alt="">
     </div>
-    <!--    <transition name="fade">-->
-    <!--      <ul v-show='selectGroup'>-->
-    <!--        <li v-for="(item,i) in imgList" :key="i" @click="toggleActive(i)" :value="total"><img :src="item"/></li>-->
-    <!--      </ul>-->
-    <!--    </transition>-->
     <div class="el-select-dropdown" v-show='selectGroup'>
       <el-dropdown @command="handleCommand" trigger="click" v-for="(item,i) in imgLists" :key="i" :value="total">
         <transition name="fade">
@@ -20,6 +15,8 @@
         </el-dropdown-menu>
       </el-dropdown>
     </div>
+    <!--    // 寮规-->
+    <TextBounced v-show="this.bouncedText" @changeBounced="gitBounced"></TextBounced>
   </div>
 </template>
 
@@ -31,9 +28,16 @@
 import polygon from '@/assets/images/map-pages/icon/toolbox/polygon.png'
 import square from '@/assets/images/map-pages/icon/toolbox/square.png'
 
+import '@/components/plugin/leaflet-measure-path/leaflet-measure-path.css'
+import Measure from '@/components/plugin/MeaSure'
+
+import MakeTation from '@components/plugin/MakeTation'
+
+import TextBounced from '@components/panel/bounced/TextBounced'
+
 export default {
   name: 'ToolBoxPanel',
-  components: {},
+  components: { TextBounced },
   data () {
     return {
       isPanelVisible: false,
@@ -103,11 +107,16 @@
       },
       selectGroup: false,
       drawLayer: null,
+      map: null,
       L: window.L,
-      map: null
+      // 鎺у埗宸ュ叿鏍� 鏂囧瓧鏍囨敞 鐨勫脊妗嗘槸鍚︽樉绀�
+      bouncedText: false
     }
   },
   methods: {
+    gitBounced (params) {
+      this.bouncedText = params
+    },
     changeSelect () {
       this.selectGroup = !this.selectGroup
     },
@@ -157,7 +166,7 @@
           this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit)
           break
         case '绠ご鏍囩粯':
-          this.drawLayer = this.map.editTools.startPolyline()
+          this.drawLayer = this.map.editTools.startPolylineArrow()
           this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit)
           break
         case '鐐规爣娉�':
@@ -169,8 +178,14 @@
           this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit)
           break
         case '鏂囧瓧鏍囨敞':
-          this.drawLayer = this.map.editTools.startText()
-          this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit)
+          this.bouncedText = true
+          MakeTation.startMakeText(this.map, this.L)
+          break
+        case '璺濈娴嬮噺':
+          Measure.startMeasureLen(this.map, this.L)
+          break
+        case '闈㈢Н娴嬮噺':
+          Measure.startMeasureArea(this.map, this.L)
           break
       }
     },

--
Gitblit v1.8.0