|  | @@ -1,7 +1,7 @@
 | 
											
												
													
														|  |  <template>
 |  |  <template>
 | 
											
												
													
														|  |    <div class="xzjg">
 |  |    <div class="xzjg">
 | 
											
												
													
														|  |      <div>项目名称XXXXXX</div>
 |  |      <div>项目名称XXXXXX</div>
 | 
											
												
													
														|  | -    <div class="box-sizing" style="height:  47%; width: 100%">
 |  | 
 | 
											
												
													
														|  | 
 |  | +    <div class="box-sizing" style="height: 47%; width: 100%">
 | 
											
												
													
														|  |        <div class="title site-title">
 |  |        <div class="title site-title">
 | 
											
												
													
														|  |          <!-- <span class="block-title"
 |  |          <!-- <span class="block-title"
 | 
											
												
													
														|  |            >意向地块{{ bgList ? bgList.length : 0 }})</span
 |  |            >意向地块{{ bgList ? bgList.length : 0 }})</span
 | 
											
										
											
												
													
														|  | @@ -28,7 +28,7 @@
 | 
											
												
													
														|  |                <span class="tools">
 |  |                <span class="tools">
 | 
											
												
													
														|  |                  <i
 |  |                  <i
 | 
											
												
													
														|  |                    class="header-icon el-icon-place"
 |  |                    class="header-icon el-icon-place"
 | 
											
												
													
														|  | -                  @click="mapview(item1)"
 |  | 
 | 
											
												
													
														|  | 
 |  | +                  @click.stop="mapview(item1)"
 | 
											
												
													
														|  |                  ></i>
 |  |                  ></i>
 | 
											
												
													
														|  |                  <i
 |  |                  <i
 | 
											
												
													
														|  |                    class="header-icon el-icon-delete"
 |  |                    class="header-icon el-icon-delete"
 | 
											
										
											
												
													
														|  | @@ -51,7 +51,7 @@
 | 
											
												
													
														|  |          </el-collapse>
 |  |          </el-collapse>
 | 
											
												
													
														|  |        </el-scrollbar>
 |  |        </el-scrollbar>
 | 
											
												
													
														|  |      </div>
 |  |      </div>
 | 
											
												
													
														|  | -    <div class="box-sizing padding-bottom-60" style="height:  47%; width: 100%">
 |  | 
 | 
											
												
													
														|  | 
 |  | +    <div class="box-sizing padding-bottom-60" style="height: 47%; width: 100%">
 | 
											
												
													
														|  |        <div class="title height-50 flex-box align-center">
 |  |        <div class="title height-50 flex-box align-center">
 | 
											
												
													
														|  |          <span class="block-title"
 |  |          <span class="block-title"
 | 
											
												
													
														|  |            >备选地块({{
 |  |            >备选地块({{
 | 
											
										
											
												
													
														|  | @@ -75,7 +75,7 @@
 | 
											
												
													
														|  |                  item.properties.ydmj.toFixed(0)
 |  |                  item.properties.ydmj.toFixed(0)
 | 
											
												
													
														|  |                }})
 |  |                }})
 | 
											
												
													
														|  |                <span class="tools">
 |  |                <span class="tools">
 | 
											
												
													
														|  | -                <i class="header-icon el-icon-place" @click="mapview(item)"></i>
 |  | 
 | 
											
												
													
														|  | 
 |  | +                <i class="header-icon el-icon-place" @click.stop="mapview(item)"></i>
 | 
											
												
													
														|  |                  <i
 |  |                  <i
 | 
											
												
													
														|  |                    class="header-icon el-icon-plus"
 |  |                    class="header-icon el-icon-plus"
 | 
											
												
													
														|  |                    @click="addprogramme($event, item)"
 |  |                    @click="addprogramme($event, item)"
 | 
											
										
											
												
													
														|  | @@ -98,13 +98,11 @@
 | 
											
												
													
														|  |        </el-scrollbar>
 |  |        </el-scrollbar>
 | 
											
												
													
														|  |      </div>
 |  |      </div>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -    <div class="xz-btn flex-box" style="justify-content: space-between">
 |  | 
 | 
											
												
													
														|  | -      <div class="max-height flex-box align-center margin-left-22"></div>
 |  | 
 | 
											
												
													
														|  | -      <div class="max-height flex-box align-center">
 |  | 
 | 
											
												
													
														|  | 
 |  | +    <!-- <div class="xz-btn flex-box" style="justify-content: space-between">
 | 
											
												
													
														|  | 
 |  | +      <div>
 | 
											
												
													
														|  |          <el-button round class="btn-style" @click="resetAll">重选</el-button>
 |  |          <el-button round class="btn-style" @click="resetAll">重选</el-button>
 | 
											
												
													
														|  |          <el-button
 |  |          <el-button
 | 
											
												
													
														|  |            round
 |  |            round
 | 
											
												
													
														|  | -          class="btn-style"
 |  | 
 | 
											
												
													
														|  |            @click="downReport"
 |  |            @click="downReport"
 | 
											
												
													
														|  |            v-if="reportText == '查看报告'"
 |  |            v-if="reportText == '查看报告'"
 | 
											
												
													
														|  |            >下载报告</el-button
 |  |            >下载报告</el-button
 | 
											
										
											
												
													
														|  | @@ -112,12 +110,11 @@
 | 
											
												
													
														|  |          <el-button
 |  |          <el-button
 | 
											
												
													
														|  |            type="primary"
 |  |            type="primary"
 | 
											
												
													
														|  |            round
 |  |            round
 | 
											
												
													
														|  | -          class="btn-style margin-right-22"
 |  | 
 | 
											
												
													
														|  |            @click="submit"
 |  |            @click="submit"
 | 
											
												
													
														|  |            >{{ reportText }}</el-button
 |  |            >{{ reportText }}</el-button
 | 
											
												
													
														|  |          >
 |  |          >
 | 
											
												
													
														|  |        </div>
 |  |        </div>
 | 
											
												
													
														|  | -    </div>
 |  | 
 | 
											
												
													
														|  | 
 |  | +    </div> -->
 | 
											
												
													
														|  |    </div>
 |  |    </div>
 | 
											
												
													
														|  |  </template>
 |  |  </template>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -160,11 +157,12 @@ export default {
 | 
											
												
													
														|  |        geoJsonEntities: null,
 |  |        geoJsonEntities: null,
 | 
											
												
													
														|  |        xzjgObj: ghjgData,
 |  |        xzjgObj: ghjgData,
 | 
											
												
													
														|  |        tempObj: ghjgData,
 |  |        tempObj: ghjgData,
 | 
											
												
													
														|  | -      copyData:null,
 |  | 
 | 
											
												
													
														|  | 
 |  | +      copyData: null,
 | 
											
												
													
														|  | 
 |  | +      arrww: [],
 | 
											
												
													
														|  |      };
 |  |      };
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    mounted() {
 |  |    mounted() {
 | 
											
												
													
														|  | -    this.copyData = JSON.parse(JSON.stringify(ghjgData))
 |  | 
 | 
											
												
													
														|  | 
 |  | +    this.copyData = JSON.parse(JSON.stringify(ghjgData));
 | 
											
												
													
														|  |      this.addPolygon("规划结果", "ghjg");
 |  |      this.addPolygon("规划结果", "ghjg");
 | 
											
												
													
														|  |      this.addPolygon("draw", "draw");
 |  |      this.addPolygon("draw", "draw");
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
										
											
												
													
														|  | @@ -229,44 +227,49 @@ export default {
 | 
											
												
													
														|  |      resetAll() {
 |  |      resetAll() {
 | 
											
												
													
														|  |        // this.xzjgObj = JSON.parse(JSON.stringify(this.tempObj))
 |  |        // this.xzjgObj = JSON.parse(JSON.stringify(this.tempObj))
 | 
											
												
													
														|  |        // parent.emit("update:xzjgObj", JSON.parse(JSON.stringify(this.tempObj)));
 |  |        // parent.emit("update:xzjgObj", JSON.parse(JSON.stringify(this.tempObj)));
 | 
											
												
													
														|  | -      this.xzjgObj = this.copyData
 |  | 
 | 
											
												
													
														|  | 
 |  | +      this.xzjgObj = this.copyData;
 | 
											
												
													
														|  |        this.reportText = "生成报告";
 |  |        this.reportText = "生成报告";
 | 
											
												
													
														|  |        this.bgList = [];
 |  |        this.bgList = [];
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      mapview(item) {
 |  |      mapview(item) {
 | 
											
												
													
														|  | 
 |  | +      this.edlARR()
 | 
											
												
													
														|  |        // e.stopPropagation()
 |  |        // e.stopPropagation()
 | 
											
												
													
														|  | -      // console.log(item, "=====");
 |  | 
 | 
											
												
													
														|  | -      // console.log(item.geometry.coordinates[0][0][0][0],'item.geometry.coordinates[0][0]');
 |  | 
 | 
											
												
													
														|  | -      // viewer.camera.flyTo({
 |  | 
 | 
											
												
													
														|  | -      //   destination: Cesium.Cartesian3.fromDegrees(
 |  | 
 | 
											
												
													
														|  | -      //     item.geometry.coordinates[0][0][0][0],
 |  | 
 | 
											
												
													
														|  | -      //     item.geometry.coordinates[0][0][0][1],
 |  | 
 | 
											
												
													
														|  | -      //     15000.0
 |  | 
 | 
											
												
													
														|  | -      //   ),
 |  | 
 | 
											
												
													
														|  | -      //   orientation: {
 |  | 
 | 
											
												
													
														|  | -      //     heading: Cesium.Math.toRadians(20.0),
 |  | 
 | 
											
												
													
														|  | -      //     pitch: Cesium.Math.toRadians(-35.0),
 |  | 
 | 
											
												
													
														|  | -      //     roll: 0.0,
 |  | 
 | 
											
												
													
														|  | -      //   },
 |  | 
 | 
											
												
													
														|  | -      // });
 |  | 
 | 
											
												
													
														|  |        let tempArr = item.geometry.coordinates[0];
 |  |        let tempArr = item.geometry.coordinates[0];
 | 
											
												
													
														|  | 
 |  | +      for (let i = 0; i < tempArr.length; i++) {
 | 
											
												
													
														|  | 
 |  | +        const oneDArray = tempArr[i].reduce(
 | 
											
												
													
														|  | 
 |  | +          (accumulator, currentValue) => accumulator.concat(currentValue),
 | 
											
												
													
														|  | 
 |  | +          []
 | 
											
												
													
														|  | 
 |  | +        );
 | 
											
												
													
														|  | 
 |  | +        console.log(i);
 | 
											
												
													
														|  | 
 |  | +        let entity = new Cesium.Entity({
 | 
											
												
													
														|  | 
 |  | +          name: "地块" + i,
 | 
											
												
													
														|  | 
 |  | +          show: true,
 | 
											
												
													
														|  | 
 |  | +          polygon: {
 | 
											
												
													
														|  | 
 |  | +            hierarchy: {
 | 
											
												
													
														|  | 
 |  | +              positions: Cesium.Cartesian3.fromDegreesArray(oneDArray),
 | 
											
												
													
														|  | 
 |  | +            },
 | 
											
												
													
														|  | 
 |  | +            material: Cesium.Color.WHITE.withAlpha(0.3),
 | 
											
												
													
														|  | 
 |  | +            clampToGround: true,
 | 
											
												
													
														|  | 
 |  | +            outline: true,
 | 
											
												
													
														|  | 
 |  | +            outlineWidth: 6,
 | 
											
												
													
														|  | 
 |  | +            outlineColor: Cesium.Color.fromCssColorString("#FF0000"),
 | 
											
												
													
														|  | 
 |  | +          },
 | 
											
												
													
														|  | 
 |  | +        });
 | 
											
												
													
														|  | 
 |  | +        viewer.entities.add(entity);
 | 
											
												
													
														|  | 
 |  | +        // 存ID
 | 
											
												
													
														|  | 
 |  | +        this.arrww.push(entity.id);
 | 
											
												
													
														|  | 
 |  | +        viewer.flyTo(entity);
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -      let entity = new Cesium.Entity({
 |  | 
 | 
											
												
													
														|  | -        name: "地块",
 |  | 
 | 
											
												
													
														|  | -        show: true,
 |  | 
 | 
											
												
													
														|  | -        position: Cesium.Cartesian3.fromDegrees(
 |  | 
 | 
											
												
													
														|  | -          obj.centroid[0],
 |  | 
 | 
											
												
													
														|  | -          res.properties.centroid[1],
 |  | 
 | 
											
												
													
														|  | -          5000
 |  | 
 | 
											
												
													
														|  | -        ),
 |  | 
 | 
											
												
													
														|  | -        clampToGround: true,
 |  | 
 | 
											
												
													
														|  | -        stroke: Cesium.Color.BLUE,
 |  | 
 | 
											
												
													
														|  | -        fill: Cesium.Color.WHITE.withAlpha(0.3), //注意:颜色必须大写,即不能为blue
 |  | 
 | 
											
												
													
														|  | -        strokeWidth: 5,
 |  | 
 | 
											
												
													
														|  | -      });
 |  | 
 | 
											
												
													
														|  | -      earth.czm.viewer.entities.add(entity);
 |  | 
 | 
											
												
													
														|  | -      // 存ID
 |  | 
 | 
											
												
													
														|  | -      this.arrww.push(entity.id);
 |  | 
 | 
											
												
													
														|  | 
 |  | +    edlARR() {
 | 
											
												
													
														|  | 
 |  | +      //删除路径
 | 
											
												
													
														|  | 
 |  | +      if (this.arrww.length != 0) {
 | 
											
												
													
														|  | 
 |  | +        this.arrww.forEach((item) => {
 | 
											
												
													
														|  | 
 |  | +          viewer.entities.removeById(item);
 | 
											
												
													
														|  | 
 |  | +        });
 | 
											
												
													
														|  | 
 |  | +        this.arrww = [];
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      submit() {
 |  |      submit() {
 | 
											
												
													
														|  |        console.log("生成报告");
 |  |        console.log("生成报告");
 | 
											
										
											
												
													
														|  | @@ -306,6 +309,7 @@ export default {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |    beforeDestroy() {
 |  |    beforeDestroy() {
 | 
											
												
													
														|  |      viewer.dataSources.removeAll();
 |  |      viewer.dataSources.removeAll();
 | 
											
												
													
														|  | 
 |  | +    this.edlARR()
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |  };
 |  |  };
 | 
											
												
													
														|  |  </script>
 |  |  </script>
 |