quanyawei
2024-06-18 cb0882e7c2194c398bb998c16e86a84c1b616cb0
src/views/list/road.vue
@@ -386,16 +386,24 @@
  }
  // 显示所有矩形
  showAllPolygon() {
    console.log("this.dataSource", this.dataSource);
    this.dataSource.forEach((item: any) => {
      if (item.bdValues) {
        let pointList = item.bdValues.map((item: any) => {
          return new BMapGL.Point(item.lng, item.lat);
        });
        let polygon = new BMapGL.Polygon([...pointList]);
        console.log("polygon", polygon);
        this.map.addOverlay(polygon);
      }
    let macType = null;
    if (this.carvalue !== "请选择走航车") {
      macType = this.carvalue;
    }
    get("coordinate/selectCruiserRoad", {
      name: "",
      mac: macType,
    }).then((res) => {
      res.data.data.forEach((item: any) => {
        if (item.bdValues) {
          let pointList = item.bdValues.map((item: any) => {
            return new BMapGL.Point(item.lng, item.lat);
          });
          let polygon = new BMapGL.Polygon([...pointList]);
          console.log("polygon", polygon);
          this.map.addOverlay(polygon);
        }
      });
    });
  }
  // 显示矩形
@@ -435,7 +443,6 @@
        flylat: currentCoord[1],
      });
    });
    console.log("data", data);
    this.check = false;
    this.startstate = "batch";
    post("coordinateDetail/batch", {