Explorar el Código

地图添加测量工具

JX.LI hace 2 años
padre
commit
11bb1a3b7e

+ 81 - 1
src/components/supermap-2.5d.vue

@@ -9,6 +9,7 @@
         </div>
         <div class="map-txt" v-html="bindPopupHtml">
         </div>
+        <div id="super2" />
       </div>
     </transition>
     <!--地图top 显示 结束-->
@@ -51,6 +52,10 @@
         connectBoxEntityTwo: null, //地图线实体
         /*************************原地图属性*********************/
         isEditableLayers: false, //绘图控件
+        selOptV: 2, // 贴地量算
+        clampMode: 1, // 空间模式
+        handlerDis: null, // 距离
+        handlerArea: null, // 面积
 
         /*************************原地图属性*********************/
         aac: null,
@@ -68,6 +73,81 @@
     mounted() {},
     props: {},
     methods: {
+      choseMeasuringAreaAll() {
+        if (this.handlerDis != null) {
+          this.handlerDis.clear()
+        }
+        if (this.handlerArea != null) {
+          this.handlerArea.clear()
+        }
+      },
+      //  测量距离
+      choseMeasuringDistance() {
+        let that = this
+        if (that.handlerDis != null) {
+          that.handlerDis.deactivate()
+          that.handlerDis.clear()
+        }
+        //初始化测量距离
+        that.handlerDis = new Cesium.MeasureHandler(that.viewer, Cesium.MeasureMode.Distance, that.clampMode);
+        that.handlerDis.clampMode = 1;
+        //注册测距功能事件
+        that.handlerDis.measureEvt.addEventListener(function(result) {
+          var dis = Number(result.distance);
+          var selOptV = that.selOptV;
+          if (selOptV == 3 || selOptV == 4) {
+            dis = Number(calcClampDistance(positions));
+          };
+          var distance = dis > 1000 ? (dis / 1000).toFixed(2) + 'km' : dis.toFixed(2) + 'm';
+          that.handlerDis.disLabel.text = '距离:' + distance;
+
+        });
+        that.handlerDis.activeEvt.addEventListener(function(isActive) {
+          if (isActive == true) {
+            that.viewer.enableCursorStyle = false;
+            that.viewer._element.style.cursor = '';
+            $('#super2').removeClass('measureCur').addClass('measureCur');
+            that.viewer.scene.pickPointEnabled = false;
+          } else {
+            that.viewer.enableCursorStyle = true;
+            $('#super2').removeClass('measureCur');
+            that.viewer.scene.pickPointEnabled = false;
+          }
+        });
+        that.handlerDis.activate();
+      },
+      // 测量面积
+      choseMeasuringArea() {
+        let that = this
+        if (that.handlerArea != null) {
+          // that.handlerArea.deactivate()
+          that.handlerArea.clear()
+        }
+
+        //初始化测量面积
+        that.handlerArea = new Cesium.MeasureHandler(that.viewer, Cesium.MeasureMode.Area, that.clampMode);
+
+        that.handlerArea.clampMode = 1;
+        that.handlerArea.measureEvt.addEventListener(function(result) {
+          var mj = Number(result.area);
+          var area = mj > 1000000 ? (mj / 1000000).toFixed(2) + 'km²' : mj.toFixed(2) + '㎡'
+          that.handlerArea.areaLabel.text = '面积:' + area;
+        });
+        that.handlerArea.activeEvt.addEventListener(function(isActive) {
+          if (isActive == true) {
+            that.viewer.enableCursorStyle = false;
+            that.viewer._element.style.cursor = '';
+            $('#super2').removeClass('measureCur').addClass('measureCur');
+            that.viewer.scene.pickPointEnabled = false;
+          } else {
+            that.viewer.enableCursorStyle = true;
+            that.viewer._element.style.cursor = '';
+            $('#super2').removeClass('measureCur');
+            that.viewer.scene.pickPointEnabled = false;
+          }
+        });
+        that.handlerArea.activate();
+      },
       //清除所有
       clearAll() {
         this.viewer.entities.removeAll()
@@ -490,4 +570,4 @@
     opacity: 0;
     transform: translateY(-10rem);
   }
-</style>
+</style>

+ 27 - 0
src/components/vBottomMenu.vue

@@ -49,6 +49,20 @@
 						<!-- 	<el-button type="danger" icon="el-icon-close" style="position: absolute;right: 0;top: 0;width: 1rem;height: 1rem;padding:0;"
                         @click.stop="closeChild"></el-button> -->
 					</div>
+          <div v-if="showMeasure && fastMenu.click == 'editableLayers'" class="nav-child">
+            <el-button type="primary"
+                       @click.stop="choseMeasuringDistance"
+                       class="nav-child-btn" plain>测距
+            </el-button>
+            <el-button type="primary"
+                       @click.stop="choseMeasuringArea"
+                       class="nav-child-btn" plain>测面
+            </el-button>
+            <el-button type="primary"
+                       @click.stop="choseMeasuringClear"
+                       class="nav-child-btn" plain>清除
+            </el-button>
+          </div>
 					<!-- 林斑 -->
 					<div v-show="showBanChild && fastMenu.click == 'forestban'" class="nav-child">
 						<div class="forestban">
@@ -417,6 +431,7 @@
 				btmTipIndent: '', //图例收起弹出
 				eventLocationVisible: false,
 				showChild: false,
+      showMeasure: false, //测量工具
 				showBanChild: false, //林斑
 				showChangChild: false, //林场
 				fastMenu: [{
@@ -525,6 +540,18 @@
     },
 
     methods: {
+    // 测量距离
+    choseMeasuringDistance(){
+      this.$parent.$refs.supermap.choseMeasuringDistance()
+    },
+    // 测量面积
+    choseMeasuringArea(){
+      this.$parent.$refs.supermap.choseMeasuringArea()
+    },
+    // 测量清除
+    choseMeasuringClear(){
+      this.$parent.$refs.supermap.choseMeasuringAreaAll()
+    },
       initWebSocket(wsurl,postName,userId) {
         this.postName=postName
         this.wsurl=wsurl

+ 8 - 8
src/views/afforestation.vue

@@ -112,7 +112,7 @@ export default {
     showDialog(click) {
       if (click == 'eventLocation') {
         this.$refs.eventLocation.showEventLocation()
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
@@ -120,13 +120,13 @@ export default {
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
-        if (!this.$refs.supermap.isEditableLayers) {
-          this.$refs.supermap.isEditableLayers = true
+        if (!this.$refs.bottomMenu.showMeasure) {
+          this.$refs.bottomMenu.showMeasure = true
         } else {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
         }
       } else if (click == 'layerSwitching') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
         if (!this.$refs.bottomMenu.showChild) {
@@ -136,12 +136,12 @@ export default {
         }
       } else if (click == 'TVWall') {
         this.$refs.TVWall.showTVWall()
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
       } else if (click == 'forestban') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showChangChild = false
         if (!this.$refs.bottomMenu.showBanChild) {
@@ -150,7 +150,7 @@ export default {
           this.$refs.bottomMenu.showBanChild = false
         }
       } else if (click == 'forestchang') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChild = false
         if (!this.$refs.bottomMenu.showChangChild) {

+ 8 - 8
src/views/animal.vue

@@ -183,7 +183,7 @@ export default {
     showDialog(click) {
       if (click == 'eventLocation') {
         this.$refs.eventLocation.showEventLocation()
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
@@ -191,13 +191,13 @@ export default {
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
-        if (!this.$refs.supermap.isEditableLayers) {
-          this.$refs.supermap.isEditableLayers = true
+        if (!this.$refs.bottomMenu.showMeasure) {
+          this.$refs.bottomMenu.showMeasure = true
         } else {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
         }
       } else if (click == 'layerSwitching') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
         if (!this.$refs.bottomMenu.showChild) {
@@ -207,12 +207,12 @@ export default {
         }
       } else if (click == 'TVWall') {
         this.$refs.TVWall.showTVWall()
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
       } else if (click == 'forestban') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showChangChild = false
         if (!this.$refs.bottomMenu.showBanChild) {
@@ -221,7 +221,7 @@ export default {
           this.$refs.bottomMenu.showBanChild = false
         }
       } else if (click == 'forestchang') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChild = false
         if (!this.$refs.bottomMenu.showChangChild) {

+ 8 - 8
src/views/datacenter.vue

@@ -145,7 +145,7 @@ export default {
     showDialog(click) {
       if (click == 'eventLocation') {
         this.$refs.eventLocation.showEventLocation()
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
@@ -153,13 +153,13 @@ export default {
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
-        if (!this.$refs.supermap.isEditableLayers) {
-          this.$refs.supermap.isEditableLayers = true
+        if (!this.$refs.bottomMenu.showMeasure) {
+          this.$refs.bottomMenu.showMeasure = true
         } else {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
         }
       } else if (click == 'layerSwitching') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
         if (!this.$refs.bottomMenu.showChild) {
@@ -169,12 +169,12 @@ export default {
         }
       } else if (click == 'TVWall') {
         this.$refs.TVWall.showTVWall()
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
       } else if (click == 'forestban') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showChangChild = false
         if (!this.$refs.bottomMenu.showBanChild) {
@@ -183,7 +183,7 @@ export default {
           this.$refs.bottomMenu.showBanChild = false
         }
       } else if (click == 'forestchang') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChild = false
         if (!this.$refs.bottomMenu.showChangChild) {

+ 8 - 8
src/views/disaster.vue

@@ -449,7 +449,7 @@ export default {
     showDialog(click) {
       if (click == 'eventLocation') {
         this.$refs.eventLocation.showEventLocation()
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
@@ -457,13 +457,13 @@ export default {
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
-        if (!this.$refs.supermap.isEditableLayers) {
-          this.$refs.supermap.isEditableLayers = true
+        if (!this.$refs.bottomMenu.showMeasure) {
+          this.$refs.bottomMenu.showMeasure = true
         } else {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
         }
       } else if (click == 'layerSwitching') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
         if (!this.$refs.bottomMenu.showChild) {
@@ -473,12 +473,12 @@ export default {
         }
       } else if (click == 'TVWall') {
         this.$refs.TVWall.showTVWall()
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
       } else if (click == 'forestban') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showChangChild = false
         if (!this.$refs.bottomMenu.showBanChild) {
@@ -487,7 +487,7 @@ export default {
           this.$refs.bottomMenu.showBanChild = false
         }
       } else if (click == 'forestchang') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChild = false
         if (!this.$refs.bottomMenu.showChangChild) {

+ 5 - 5
src/views/event.vue

@@ -592,17 +592,17 @@
 			showDialog(click) {
 				if (click == 'eventLocation') {
 					this.$refs.eventLocation.showEventLocation()
-					this.$refs.supermap.isEditableLayers = false
+					this.$refs.bottomMenu.showMeasure = false
 					this.$refs.bottomMenu.showChild = false
 				} else if (click == 'editableLayers') {
 					this.$refs.bottomMenu.showChild = false
-					if (!this.$refs.supermap.isEditableLayers) {
-						this.$refs.supermap.isEditableLayers = true
+					if (!this.$refs.bottomMenu.showMeasure) {
+						this.$refs.bottomMenu.showMeasure = true
 					} else {
-						this.$refs.supermap.isEditableLayers = false
+						this.$refs.bottomMenu.showMeasure = false
 					}
 				} else if (click == 'layerSwitching') {
-					this.$refs.supermap.isEditableLayers = false
+					this.$refs.bottomMenu.showMeasure = false
 					if (!this.$refs.bottomMenu.showChild) {
 						this.$refs.bottomMenu.showChild = true
 					} else {

+ 1 - 1
src/views/eventdetailsdialog.vue

@@ -1588,7 +1588,7 @@ export default {
       initByCameras(params).then(res=>
       {
         this.$refs.TVWall.showTVWall1(this.longitude,this.latitude,res.data);
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false

+ 8 - 8
src/views/forest.vue

@@ -1471,7 +1471,7 @@
       showDialog(click) {
         if (click == 'eventLocation') {
           this.$refs.eventLocation.showEventLocation()
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showChild = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChangChild = false
@@ -1479,13 +1479,13 @@
           this.$refs.bottomMenu.showChild = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChangChild = false
-          if (!this.$refs.supermap.isEditableLayers) {
-            this.$refs.supermap.isEditableLayers = true
+          if (!this.$refs.bottomMenu.showMeasure) {
+            this.$refs.bottomMenu.showMeasure = true
           } else {
-            this.$refs.supermap.isEditableLayers = false
+            this.$refs.bottomMenu.showMeasure = false
           }
         } else if (click == 'layerSwitching') {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChangChild = false
           if (!this.$refs.bottomMenu.showChild) {
@@ -1495,12 +1495,12 @@
           }
         } else if (click == 'TVWall') {
           this.$refs.TVWall.showTVWall()
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showChild = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChangChild = false
         } else if (click == 'forestban') {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showChild = false
           this.$refs.bottomMenu.showChangChild = false
           if (!this.$refs.bottomMenu.showBanChild) {
@@ -1509,7 +1509,7 @@
             this.$refs.bottomMenu.showBanChild = false
           }
         } else if (click == 'forestchang') {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChild = false
           if (!this.$refs.bottomMenu.showChangChild) {

+ 8 - 8
src/views/leader.vue

@@ -223,7 +223,7 @@
       showDialog(click) {
         if (click == 'eventLocation') {
           this.$refs.eventLocation.showEventLocation()
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showChild = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChangChild = false
@@ -231,13 +231,13 @@
           this.$refs.bottomMenu.showChild = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChangChild = false
-          if (!this.$refs.supermap.isEditableLayers) {
-            this.$refs.supermap.isEditableLayers = true
+          if (!this.$refs.bottomMenu.showMeasure) {
+            this.$refs.bottomMenu.showMeasure = true
           } else {
-            this.$refs.supermap.isEditableLayers = false
+            this.$refs.bottomMenu.showMeasure = false
           }
         } else if (click == 'layerSwitching') {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChangChild = false
           if (!this.$refs.bottomMenu.showChild) {
@@ -247,12 +247,12 @@
           }
         } else if (click == 'TVWall') {
           this.$refs.TVWall.showTVWall()
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showChild = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChangChild = false
         } else if (click == 'forestban') {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showChild = false
           this.$refs.bottomMenu.showChangChild = false
           if (!this.$refs.bottomMenu.showBanChild) {
@@ -261,7 +261,7 @@
             this.$refs.bottomMenu.showBanChild = false
           }
         } else if (click == 'forestchang') {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChild = false
           if (!this.$refs.bottomMenu.showChangChild) {

+ 8 - 8
src/views/monitor.vue

@@ -344,7 +344,7 @@ export default {
     showDialog(click) {
       if (click == 'eventLocation') {
         this.$refs.eventLocation.showEventLocation()
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
@@ -352,13 +352,13 @@ export default {
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
-        if (!this.$refs.supermap.isEditableLayers) {
-          this.$refs.supermap.isEditableLayers = true
+        if (!this.$refs.bottomMenu.showMeasure) {
+          this.$refs.bottomMenu.showMeasure = true
         } else {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
         }
       } else if (click == 'layerSwitching') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
         if (!this.$refs.bottomMenu.showChild) {
@@ -368,12 +368,12 @@ export default {
         }
       } else if (click == 'TVWall') {
         this.$refs.TVWall.showTVWall()
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
       } else if (click == 'forestban') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showChangChild = false
         if (!this.$refs.bottomMenu.showBanChild) {
@@ -382,7 +382,7 @@ export default {
           this.$refs.bottomMenu.showBanChild = false
         }
       } else if (click == 'forestchang') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChild = false
         if (!this.$refs.bottomMenu.showChangChild) {

+ 8 - 8
src/views/resources.vue

@@ -380,7 +380,7 @@
       showDialog(click) {
         if (click == 'eventLocation') {
           this.$refs.eventLocation.showEventLocation()
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showChild = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChangChild = false
@@ -388,13 +388,13 @@
           this.$refs.bottomMenu.showChild = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChangChild = false
-          if (!this.$refs.supermap.isEditableLayers) {
-            this.$refs.supermap.isEditableLayers = true
+          if (!this.$refs.bottomMenu.showMeasure) {
+            this.$refs.bottomMenu.showMeasure = true
           } else {
-            this.$refs.supermap.isEditableLayers = false
+            this.$refs.bottomMenu.showMeasure = false
           }
         } else if (click == 'layerSwitching') {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChangChild = false
           if (!this.$refs.bottomMenu.showChild) {
@@ -404,12 +404,12 @@
           }
         } else if (click == 'TVWall') {
           this.$refs.TVWall.showTVWall()
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showChild = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChangChild = false
         } else if (click == 'forestban') {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showChild = false
           this.$refs.bottomMenu.showChangChild = false
           if (!this.$refs.bottomMenu.showBanChild) {
@@ -418,7 +418,7 @@
             this.$refs.bottomMenu.showBanChild = false
           }
         } else if (click == 'forestchang') {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
           this.$refs.bottomMenu.showBanChild = false
           this.$refs.bottomMenu.showChild = false
           if (!this.$refs.bottomMenu.showChangChild) {

+ 8 - 8
src/views/traffic.vue

@@ -1043,7 +1043,7 @@ export default {
     showDialog(click) {
       if (click == 'eventLocation') {
         this.$refs.eventLocation.showEventLocation()
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
@@ -1051,13 +1051,13 @@ export default {
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
-        if (!this.$refs.supermap.isEditableLayers) {
-          this.$refs.supermap.isEditableLayers = true
+        if (!this.$refs.bottomMenu.showMeasure) {
+          this.$refs.bottomMenu.showMeasure = true
         } else {
-          this.$refs.supermap.isEditableLayers = false
+          this.$refs.bottomMenu.showMeasure = false
         }
       } else if (click == 'layerSwitching') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
         if (!this.$refs.bottomMenu.showChild) {
@@ -1067,12 +1067,12 @@ export default {
         }
       } else if (click == 'TVWall') {
         this.$refs.TVWall.showTVWall()
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChangChild = false
       } else if (click == 'forestban') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showChild = false
         this.$refs.bottomMenu.showChangChild = false
         if (!this.$refs.bottomMenu.showBanChild) {
@@ -1081,7 +1081,7 @@ export default {
           this.$refs.bottomMenu.showBanChild = false
         }
       } else if (click == 'forestchang') {
-        this.$refs.supermap.isEditableLayers = false
+        this.$refs.bottomMenu.showMeasure = false
         this.$refs.bottomMenu.showBanChild = false
         this.$refs.bottomMenu.showChild = false
         if (!this.$refs.bottomMenu.showChangChild) {