Browse Source

首页显示街镇,卷帘对比提示调整

Bella 2 năm trước cách đây
mục cha
commit
42c76f9e39
2 tập tin đã thay đổi với 55 bổ sung35 xóa
  1. 31 30
      src/components/map/MapHolder.vue
  2. 24 5
      src/views/ComprehensiveAnalysis.vue

+ 31 - 30
src/components/map/MapHolder.vue

@@ -631,12 +631,11 @@ export default {
           );
           let newCorrectCoordArr = publicFun.latLngsCorrection(correctCordArr);
           feature.geometry.coordinates = newCorrectCoordArr;
-
-          if (
-            this.town.indexOf(feature.properties.NAME.replace("镇", "")) > -1
-          ) {
-            this.renderPolygon(feature);
-          }
+          // if (
+          // this.town.indexOf(feature.properties.NAME.replace("镇", "")) > -1
+          // ) {
+          this.renderPolygon(feature);
+          // }
         });
       });
     },
@@ -713,30 +712,32 @@ export default {
       // 坐标
       townLocationMap.set(name, center);
       townPolygonMap.set(name, polygon);
-      let wmarker = L.circleMarker(center, {
-        radius: 10,
-        weight: 1,
-        fillOpacity: 0,
-        color: "#e6d273",
-      });
-      wmarker.bindLabel(feature.properties.NAME, {
-        noHide: true,
-        clickable: true,
-        offset: [-25, 10],
-      });
-      wmarker.addTo(map2DViewer.groups["浦东新区_label"]);
-      let circle1 = L.circleMarker(center, {
-        radius: 8,
-        weight: 1,
-        fillOpacity: 0,
-        color: "#e6d273",
-      }).addTo(map2DViewer.groups["浦东新区_polygon"]);
-      let circle2 = L.circleMarker(center, {
-        radius: 5,
-        weight: 1,
-        fillOpacity: 1,
-        color: "#e6d273",
-      }).addTo(map2DViewer.groups["浦东新区_polygon"]);
+      if (this.town.indexOf(feature.properties.NAME.replace("镇", "")) > -1) {
+        let wmarker = L.circleMarker(center, {
+          radius: 10,
+          weight: 1,
+          fillOpacity: 0,
+          color: "#e6d273",
+        });
+        wmarker.bindLabel(feature.properties.NAME, {
+          noHide: true,
+          clickable: true,
+          offset: [-25, 10],
+        });
+        wmarker.addTo(map2DViewer.groups["浦东新区_label"]);
+        let circle1 = L.circleMarker(center, {
+          radius: 8,
+          weight: 1,
+          fillOpacity: 0,
+          color: "#e6d273",
+        }).addTo(map2DViewer.groups["浦东新区_polygon"]);
+        let circle2 = L.circleMarker(center, {
+          radius: 5,
+          weight: 1,
+          fillOpacity: 1,
+          color: "#e6d273",
+        }).addTo(map2DViewer.groups["浦东新区_polygon"]);
+      }
     },
     latLngsToReverse: function (latlngsAry) {
       var tempLatlngsAry = JSON.parse(JSON.stringify(latlngsAry));

+ 24 - 5
src/views/ComprehensiveAnalysis.vue

@@ -36,8 +36,12 @@
     <div class="comprehensive-analysis-infobox">
       当前显示的疑点数 : &nbsp;<span>{{ currentTotal }}</span>
     </div>
-    <div class="comprehensive-analysis-leftjuanlianInfo" v-show="false">sat2019-s1</div>
-    <div class="comprehensive-analysis-rightjuanlianInfo" v-show="false">sat2022-s1</div>
+    <div class="comprehensive-analysis-leftjuanlianInfo" v-show="showJLInfo">
+      sat2019-s1
+    </div>
+    <div class="comprehensive-analysis-rightjuanlianInfo" v-show="showJLInfo">
+      sat2022-s1
+    </div>
     <!-- 属性弹窗 -->
     <AttributePopup
       class="comprehensive-analysis-popup"
@@ -310,6 +314,7 @@ export default {
   },
   data() {
     return {
+      showJLInfo: false,
       // 存储图斑颜色
       collectColorMap: new Map(),
       targetLayerPage: {},
@@ -399,6 +404,12 @@ export default {
     };
   },
   computed: {
+    // 监听底部菜单栏的状态 -- 监听卷帘对比状态
+    getJLStatus() {
+      let _index = this.$store.state.bottomMenuIndexs.index;
+      let _subIndex = this.$store.state.bottomMenuIndexs.subIndex;
+      return this.$store.state.jlActiveState;
+    },
     getCustomModel() {
       return this.$store.state.customModelsArr;
     },
@@ -438,6 +449,15 @@ export default {
       },
       immediate: true,
     },
+    // 监听底部菜单栏
+    getJLStatus(val) {
+      console.log("监听底部菜单栏 ----- 卷帘对比", val);
+      if (val) {
+        this.showJLInfo = true;
+      } else {
+        this.showJLInfo = false;
+      }
+    },
     // 控制全选的显示或隐藏
     labelAllVisibleChecked(val) {
       if (this.rightLabelData.length > 0) {
@@ -617,7 +637,6 @@ export default {
     // 上传数据后更新我的图层节点
     this.$bus.$off("addUploadLayerEvent");
     this.$bus.$on("addUploadLayerEvent", (data) => {
-      console.log("添加我的图层111");
       if (this.$refs.tree) {
         let children = [
           {
@@ -2004,7 +2023,7 @@ export default {
     font-size: 20px;
   }
 
-  &-leftjuanlianInfo{
+  &-leftjuanlianInfo {
     width: 150px;
     height: 40px;
     display: flex;
@@ -2019,7 +2038,7 @@ export default {
     font-size: 20px;
   }
 
-  &-rightjuanlianInfo{
+  &-rightjuanlianInfo {
     width: 150px;
     height: 40px;
     display: flex;