|  | @@ -14,7 +14,7 @@
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |        <div>
 | 
	
		
			
				|  |  |          预检分析面积:
 | 
	
		
			
				|  |  | -        <span class="text">{{ compute(scjgObj.fxmj) }}亩</span>
 | 
	
		
			
				|  |  | +        <span class="text">{{ compute(scjgObj.xzmj) }}亩</span>
 | 
	
		
			
				|  |  |          <span class="export" @click="download">导出报告</span>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
	
		
			
				|  | @@ -55,6 +55,7 @@ import scjgContent from "../../complianceAnalysis/components/scjgContent.vue";
 | 
	
		
			
				|  |  |  import { getyjjg } from "@/api/stxf/tdzz.js";
 | 
	
		
			
				|  |  |  import { jslist } from "./config.js";
 | 
	
		
			
				|  |  |  import parse from "wellknown";
 | 
	
		
			
				|  |  | +import { loadGeoJSON } from "@/utils/MapHelper/help.js";
 | 
	
		
			
				|  |  |  let dataSourceList = {};
 | 
	
		
			
				|  |  |  let colors = [
 | 
	
		
			
				|  |  |    "#62ADED",
 | 
	
	
		
			
				|  | @@ -103,7 +104,7 @@ export default {
 | 
	
		
			
				|  |  |        console.log("----", this.$props.scjgObj);
 | 
	
		
			
				|  |  |        this.echarts = [];
 | 
	
		
			
				|  |  |        this.$emit("updateParent", "loading", true);
 | 
	
		
			
				|  |  | -      this.addPolygon(this.$props.scjgObj.geom, "all", "#ff0000", true);
 | 
	
		
			
				|  |  | +      this.addPolygon(this.$props.scjgObj.geom, "all", "#ff0000", "#ffffff");
 | 
	
		
			
				|  |  |        getyjjg(this.$props.scjgObj.bsm).then((res) => {
 | 
	
		
			
				|  |  |          if (res.code == 200) {
 | 
	
		
			
				|  |  |            let jdData = {
 | 
	
	
		
			
				|  | @@ -116,14 +117,29 @@ export default {
 | 
	
		
			
				|  |  |              region: "",
 | 
	
		
			
				|  |  |              result: [[], [], []],
 | 
	
		
			
				|  |  |            };
 | 
	
		
			
				|  |  | -          res.data["3D"].map((ci) => {
 | 
	
		
			
				|  |  | +          res.data["3D"].map((ci, i) => {
 | 
	
		
			
				|  |  |              jdData.x_data.push(ci.key);
 | 
	
		
			
				|  |  |              jdData.result[0].push(ci.zzq_area);
 | 
	
		
			
				|  |  |              jdData.result[1].push(ci.zzh_area);
 | 
	
		
			
				|  |  |              jdData.result[2].push(ci.ce_area);
 | 
	
		
			
				|  |  |              // zzh_geom
 | 
	
		
			
				|  |  | +            ci.name = ci.key;
 | 
	
		
			
				|  |  | +            ci.geoms = [
 | 
	
		
			
				|  |  | +              {
 | 
	
		
			
				|  |  | +                id: `zzq_${i}`,
 | 
	
		
			
				|  |  | +                geomvalue: ci.zzq_geom || "",
 | 
	
		
			
				|  |  | +                sc: colors[i],
 | 
	
		
			
				|  |  | +                fc: "#186bb8",
 | 
	
		
			
				|  |  | +              },
 | 
	
		
			
				|  |  | +              {
 | 
	
		
			
				|  |  | +                id: `zzh_${i}`,
 | 
	
		
			
				|  |  | +                geomvalue: ci.zzh_geom || "",
 | 
	
		
			
				|  |  | +                sc: colors[i],
 | 
	
		
			
				|  |  | +                fc: "#4ee1ac",
 | 
	
		
			
				|  |  | +              },
 | 
	
		
			
				|  |  | +            ];
 | 
	
		
			
				|  |  |            });
 | 
	
		
			
				|  |  | -          res.data.XZGD.map((ci) => {
 | 
	
		
			
				|  |  | +          res.data.XZGD.map((ci, i) => {
 | 
	
		
			
				|  |  |              ci.id = "XZGD" + i;
 | 
	
		
			
				|  |  |            });
 | 
	
		
			
				|  |  |            res.data.SQSX.map((ci, i) => {
 | 
	
	
		
			
				|  | @@ -131,7 +147,7 @@ export default {
 | 
	
		
			
				|  |  |              ci.value = ci.sumvalue;
 | 
	
		
			
				|  |  |              ci.id = "SQSX" + i;
 | 
	
		
			
				|  |  |            });
 | 
	
		
			
				|  |  | -          res.data.GHDK.map((ci) => {
 | 
	
		
			
				|  |  | +          res.data.GHDK.map((ci, i) => {
 | 
	
		
			
				|  |  |              ci.name = ci.groupvalue;
 | 
	
		
			
				|  |  |              ci.value = ci.sumvalue;
 | 
	
		
			
				|  |  |              ci.id = "GHDK" + i;
 | 
	
	
		
			
				|  | @@ -156,7 +172,7 @@ export default {
 | 
	
		
			
				|  |  |        if (dataSourceList[id]) {
 | 
	
		
			
				|  |  |          dataSourceList[id].show = this.isshowAll;
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  | -        this.addPolygon(this.$props.scjgObj.geom, "all", "#ff0000", true);
 | 
	
		
			
				|  |  | +        this.addPolygon(this.$props.scjgObj.geom, "all", "#ff0000", "#ffffff");
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      eyesChaneg(i) {
 | 
	
	
		
			
				|  | @@ -167,8 +183,11 @@ export default {
 | 
	
		
			
				|  |  |        let iseyes = this.echarts[i].iseyes;
 | 
	
		
			
				|  |  |        if (this.echarts[i].dataList)
 | 
	
		
			
				|  |  |          this.echarts[i].dataList.forEach((child, ci) => {
 | 
	
		
			
				|  |  | -          console.log(child, "child");
 | 
	
		
			
				|  |  | -          this.changeDataSources({ ...child, iseyes }, colors[ci]);
 | 
	
		
			
				|  |  | +          if (this.echarts[i].scxstyle == 2) {
 | 
	
		
			
				|  |  | +            let gi = child.geoms;
 | 
	
		
			
				|  |  | +            this.changeDataSources({ ...gi[0], iseyes }, colors[ci], gi[0].fc);
 | 
	
		
			
				|  |  | +            this.changeDataSources({ ...gi[1], iseyes }, colors[ci], gi[1].fc);
 | 
	
		
			
				|  |  | +          } else this.changeDataSources({ ...child, iseyes }, colors[ci]);
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |        // this.lForEach(this.echarts[i].lchildren, "sources", iseyes);
 | 
	
		
			
				|  |  |        // }
 | 
	
	
		
			
				|  | @@ -202,15 +221,15 @@ export default {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    changeDataSources({ geomvalue, id, iseyes, iszoom }, color) {
 | 
	
		
			
				|  |  | -      console.log(geomvalue, id, iseyes, iszoom, color);
 | 
	
		
			
				|  |  | +    changeDataSources({ geomvalue, id, iseyes, iszoom }, color, fcolor) {
 | 
	
		
			
				|  |  | +      console.log(id, iseyes, iszoom, color, fcolor);
 | 
	
		
			
				|  |  |        if (iszoom) {
 | 
	
		
			
				|  |  |          this.zoomTo(id, geomvalue);
 | 
	
		
			
				|  |  |        } else if (dataSourceList[id]) {
 | 
	
		
			
				|  |  |          dataSourceList[id].show = iseyes;
 | 
	
		
			
				|  |  |          this.tempdataSourcesId = null;
 | 
	
		
			
				|  |  |        } else if (geomvalue) {
 | 
	
		
			
				|  |  | -        this.addPolygon(geomvalue, id, color);
 | 
	
		
			
				|  |  | +        this.addPolygon(geomvalue, id, color, fcolor);
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      zoomTo(id, geom) {
 | 
	
	
		
			
				|  | @@ -222,7 +241,7 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      setEchart(data, id, childid) {
 | 
	
		
			
				|  |  |        this.$nextTick(() => {
 | 
	
		
			
				|  |  | -        console.log(id, this.$refs[`contentRef${id}`], "---");
 | 
	
		
			
				|  |  | +        // console.log(id, this.$refs[`contentRef${id}`], "---");
 | 
	
		
			
				|  |  |          let type = null;
 | 
	
		
			
				|  |  |          if (!data.legend_data)
 | 
	
		
			
				|  |  |            type = data.length <= 6 ? "horizontal" : "vertical";
 | 
	
	
		
			
				|  | @@ -233,50 +252,57 @@ export default {
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 加载GeoJSON数据
 | 
	
		
			
				|  |  | -    addPolygon(geom, id, colors, fillreset) {
 | 
	
		
			
				|  |  | -      let geojson = parse(geom);
 | 
	
		
			
				|  |  | -      console.log("---", geojson.type);
 | 
	
		
			
				|  |  | +    addPolygon(geom, id, colors, fillcolor) {
 | 
	
		
			
				|  |  |        let _this = this;
 | 
	
		
			
				|  |  | -      // viewer.entities.removeAll();
 | 
	
		
			
				|  |  | -      let scolor = colors
 | 
	
		
			
				|  |  | -        ? Cesium.Color.fromCssColorString(colors)
 | 
	
		
			
				|  |  | -        : Cesium.Color.RED;
 | 
	
		
			
				|  |  | -      let fcolor =
 | 
	
		
			
				|  |  | -        colors && !fillreset
 | 
	
		
			
				|  |  | -          ? Cesium.Color.fromCssColorString(colors)
 | 
	
		
			
				|  |  | -          : Cesium.Color.WHITE;
 | 
	
		
			
				|  |  | +      let fill = fillcolor || colors || "#ffffff";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      let polygon = Cesium.GeoJsonDataSource.load(geojson, {
 | 
	
		
			
				|  |  | -        clampToGround: true,
 | 
	
		
			
				|  |  | -        stroke: scolor,
 | 
	
		
			
				|  |  | -        fill: fcolor.withAlpha(0.3), //注意:颜色必须大写,即不能为blue
 | 
	
		
			
				|  |  | -        strokeWidth: 5,
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | -      polygon.then(function (dataSource) {
 | 
	
		
			
				|  |  | -        // dataSource.id = id;
 | 
	
		
			
				|  |  | -        // 将数据源添加到Cesium Viewer
 | 
	
		
			
				|  |  | -        viewer.dataSources.add(dataSource);
 | 
	
		
			
				|  |  | -        viewer.zoomTo(dataSource);
 | 
	
		
			
				|  |  | -        dataSourceList[id] = dataSource;
 | 
	
		
			
				|  |  | +      loadGeoJSON(geom, colors || "#ff0000", { isfly: true, fill }, (data) => {
 | 
	
		
			
				|  |  | +        data.name = "MultiLevelQuery_echart";
 | 
	
		
			
				|  |  | +        dataSourceList[id] = data;
 | 
	
		
			
				|  |  |          if (id == "all") _this.isshowAll = true;
 | 
	
		
			
				|  |  | -        if (!geojson.type.includes("Polygon")) {
 | 
	
		
			
				|  |  | -          dataSource.entities.values.forEach((entity, ei) => {
 | 
	
		
			
				|  |  | -            if (entity.billboard) {
 | 
	
		
			
				|  |  | -              entity.billboard = new Cesium.BillboardGraphics({
 | 
	
		
			
				|  |  | -                image: "@/.././static/images/flypng/hos_point.png",
 | 
	
		
			
				|  |  | -                height: 40,
 | 
	
		
			
				|  |  | -                width: 40,
 | 
	
		
			
				|  |  | -                scale: 1.0,
 | 
	
		
			
				|  |  | -                pixelOffset: new Cesium.Cartesian2(0, -16),
 | 
	
		
			
				|  |  | -              });
 | 
	
		
			
				|  |  | -              // entity.point = {
 | 
	
		
			
				|  |  | -              //   pixelsize: 20,
 | 
	
		
			
				|  |  | -              //   color: Cesium.Color.fromCssColorString(colors),
 | 
	
		
			
				|  |  | -              // };
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -          });
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  | +      // let geojson = parse(geom);
 | 
	
		
			
				|  |  | +      // console.log("---", geojson.type);
 | 
	
		
			
				|  |  | +      // // viewer.entities.removeAll();
 | 
	
		
			
				|  |  | +      // let scolor = colors
 | 
	
		
			
				|  |  | +      //   ? Cesium.Color.fromCssColorString(colors)
 | 
	
		
			
				|  |  | +      //   : Cesium.Color.RED;
 | 
	
		
			
				|  |  | +      // let fcolor =
 | 
	
		
			
				|  |  | +      //   colors && !fillreset
 | 
	
		
			
				|  |  | +      //     ? Cesium.Color.fromCssColorString(colors)
 | 
	
		
			
				|  |  | +      //     : Cesium.Color.WHITE;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      // let polygon = Cesium.GeoJsonDataSource.load(geojson, {
 | 
	
		
			
				|  |  | +      //   clampToGround: true,
 | 
	
		
			
				|  |  | +      //   stroke: scolor,
 | 
	
		
			
				|  |  | +      //   fill: fcolor.withAlpha(0.3), //注意:颜色必须大写,即不能为blue
 | 
	
		
			
				|  |  | +      //   strokeWidth: 5,
 | 
	
		
			
				|  |  | +      // });
 | 
	
		
			
				|  |  | +      // polygon.then(function (dataSource) {
 | 
	
		
			
				|  |  | +      //   // dataSource.id = id;
 | 
	
		
			
				|  |  | +      //   // 将数据源添加到Cesium Viewer
 | 
	
		
			
				|  |  | +      //   viewer.dataSources.add(dataSource);
 | 
	
		
			
				|  |  | +      //   viewer.zoomTo(dataSource);
 | 
	
		
			
				|  |  | +      //   dataSourceList[id] = dataSource;
 | 
	
		
			
				|  |  | +      //   if (id == "all") _this.isshowAll = true;
 | 
	
		
			
				|  |  | +      //   if (!geojson.type.includes("Polygon")) {
 | 
	
		
			
				|  |  | +      //     dataSource.entities.values.forEach((entity, ei) => {
 | 
	
		
			
				|  |  | +      //       if (entity.billboard) {
 | 
	
		
			
				|  |  | +      //         entity.billboard = new Cesium.BillboardGraphics({
 | 
	
		
			
				|  |  | +      //           image: "@/.././static/images/flypng/hos_point.png",
 | 
	
		
			
				|  |  | +      //           height: 40,
 | 
	
		
			
				|  |  | +      //           width: 40,
 | 
	
		
			
				|  |  | +      //           scale: 1.0,
 | 
	
		
			
				|  |  | +      //           pixelOffset: new Cesium.Cartesian2(0, -16),
 | 
	
		
			
				|  |  | +      //         });
 | 
	
		
			
				|  |  | +      //         // entity.point = {
 | 
	
		
			
				|  |  | +      //         //   pixelsize: 20,
 | 
	
		
			
				|  |  | +      //         //   color: Cesium.Color.fromCssColorString(colors),
 | 
	
		
			
				|  |  | +      //         // };
 | 
	
		
			
				|  |  | +      //       }
 | 
	
		
			
				|  |  | +      //     });
 | 
	
		
			
				|  |  | +      //   }
 | 
	
		
			
				|  |  | +      // });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      download() {
 |