Procházet zdrojové kódy

合规性分析定位优化

maxiaoxiao před 1 rokem
rodič
revize
194b11d0d6

+ 8 - 3
src/views/complianceAnalysis/components/scjg.vue

@@ -139,7 +139,7 @@ export default {
         this.echarts[i].dataList.forEach((child, ci) => {
           this.changeDataSources({ ...child, iseyes }, colors[ci]);
         });
-      this.lForEach(this.echarts[i].lchildren, iseyes, "sources");
+      this.lForEach(this.echarts[i].lchildren, "sources", iseyes);
       // }
       // emit("eyesChaneg");
     },
@@ -171,13 +171,18 @@ export default {
         }
       });
     },
-    changeDataSources({ geom, id, iseyes }, color) {
-      if (dataSourceList[id]) {
+    changeDataSources({ geom, id, iseyes, iszoom }, color) {
+      if (iszoom) {
+        this.zoomTo(id);
+      } else if (dataSourceList[id]) {
         dataSourceList[id].show = iseyes;
       } else if (geom) {
         this.addPolygon(geom, id, color);
       }
     },
+    zoomTo(id) {
+      if (dataSourceList[id]) viewer.zoomTo(dataSourceList[id]);
+    },
     setEchart(data, id, childid) {
       this.$nextTick(() => {
         let type = data.length <= 6 ? "horizontal" : "vertical";