Browse Source

选址范围显隐

maxiaoxiao 9 months ago
parent
commit
11e67421df

+ 2 - 2
src/views/complianceAnalysis/components/scjg.vue

@@ -230,7 +230,7 @@ export default {
         clampToGround: true,
         stroke: scolor,
         fill: fcolor.withAlpha(0.3), //注意:颜色必须大写,即不能为blue
-        strokeWidth: 3,
+        strokeWidth: 5,
       });
       polygon.then(function (dataSource) {
         // dataSource.id = id;
@@ -238,7 +238,7 @@ export default {
         viewer.dataSources.add(dataSource);
         viewer.zoomTo(dataSource);
         dataSourceList[id] = dataSource;
-        if (id == "all") this.isshowAll = true;
+        if (id == "all") _this.isshowAll = true;
         // 可以获取实体并进行操作
         // dataSource.entities.values.forEach((entity) => {
         //   // 你可以在这里设置实体的属性,例如位置、颜色等

+ 0 - 1
src/views/complianceAnalysis/index.vue

@@ -76,7 +76,6 @@ export default {
       if (newValue != "hgxfx") this.$refs.hgxfx.reset();
       if (newValue != "lsju") this.$refs.lsju.reset();
       if (newValue != "scjg") this.$refs.scjg.reset();
-      console.log(newValue,'---',this.$refs.hgxfx)
       if (newValue == "hgxfx") this.$refs.hgxfx.initform();
       if (newValue == "lsju") {
         this.$refs.lsju.reset();

+ 2 - 1
src/views/siteselection/components/xzjg.vue

@@ -274,6 +274,7 @@ export default {
 
     // 加载GeoJSON数据
     loadGeoJSON(geojson, yanse, id, height) {
+      let _this = this
       let fcolor =
       id && id != "all"
         ? Cesium.Color.fromCssColorString(yanse)
@@ -316,7 +317,7 @@ export default {
           if (id) {
             dataSources[id] = data;
           }
-          if (id == "all") this.isshowAll = true;
+          if (id == "all") _this.isshowAll = true;
         });
     },
     addprogramme(e, item) {