From ec3342e1b34dd02f33dae9bed2db16a14ae8096d Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期三, 21 十二月 2022 17:06:11 +0800
Subject: [PATCH] 1

---
 src/components/MapView/mapMenuTop.vue |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/components/MapView/mapMenuTop.vue b/src/components/MapView/mapMenuTop.vue
index eeea973..58ae11c 100644
--- a/src/components/MapView/mapMenuTop.vue
+++ b/src/components/MapView/mapMenuTop.vue
@@ -233,10 +233,19 @@
       //娓呯┖鏍囩粯
       sgworld.Creator.SimpleGraphic.edit(false, { editProp: false });
       sgworld.Creator.SimpleGraphic.clear();
+
+      if (this.treeChange.length == 0) {
+        this.$message.error('璇烽�夋嫨瑕佹煡璇㈢殑鏁版嵁');
+        return;
+      }
       if (this.menuTopFrom.queryType != 'inputFile') {
         sgworld.Creator.createSimpleGraphic(
           this.menuTopFrom.queryType,
-          {},
+          {
+            color: '#00FF0060',
+            outlineColor: '#0f0',
+            outlineWidth: 5,
+          },
           (entity) => {
             this.setTurfGeometry(entity);
           }
@@ -297,7 +306,6 @@
       if (type == 'polyline') {
         var line = turf.lineString(std, { name: 'polyline' });
         restVal = turf.buffer(line, 10, { units: 'miles' });
-        console.log('line', restVal);
       } else if (type == 'rectangle') {
         var ste = this.setCartesianToEightFour(res[0]);
         std.push([ste.lng, ste.lat]);
@@ -325,6 +333,8 @@
         this.$store.state.mapPopBoxFlag = '1';
       }
       this.$bus.$emit('changeMapMenuTop', 'true');
+      sgworld.Creator.SimpleGraphic.edit(false, { editProp: false });
+      sgworld.Creator.SimpleGraphic.clear();
       //娓呯┖inputFile
       // var file = document.getElementById('getMenuTopFile');
       // file.outerHTML = file.outerHTML;

--
Gitblit v1.9.3