北京经济技术开发区经开区虚拟城市项目-【前端】-移动端Web
lixuliang
2024-03-22 5206e7a4f4c5b71c9ddeccdbbe5e7fba5b3eeb9b
src/components/leftMenu/sousuo2.vue
@@ -5,7 +5,10 @@
      <span
        @click="ssjmxs"
        style="float: left; height: 100%; width: 80%; overflow: hidden"
        ><i class="el-icon-search" style="padding: 0px 15px 0px 20px;font-size: 0.15rem;"></i
        ><i
          class="el-icon-search"
          style="padding: 0px 15px 0px 20px; font-size: 0.15rem"
        ></i
        >{{ syssval }}</span
      >
      <span
@@ -150,7 +153,6 @@
  width: 0.8rem;
  position: relative;
  font-size: 0.14rem;
}
.el-select:after {
  content: "";
@@ -209,7 +211,7 @@
  line-height: 20px;
}
.ssjg .addressBox {
  text-indent: 27px;
  margin-left: 27px;
  margin-top: 5px;
  color: #000;
  font-weight: 500;
@@ -349,7 +351,7 @@
      rectangle.maxy > 31.182515322 && (rectangle.maxy = 31.182515322);
      return `RECT(${rectangle.minx} ${rectangle.miny},${rectangle.maxx} ${rectangle.maxy})`;
    },
    getPoi() {
    getGdPoi() {
      axios
        .get(common.poiserve, {
          params: {
@@ -362,8 +364,6 @@
          },
        })
        .then((res) => {
          // 高德
          console.log("poiserve");
          if (res.data.status == "1") {
            res.data.pois &&
              res.data.pois
@@ -395,6 +395,49 @@
                    pname: val.province,
                    type: val.type,
                    typecode: val.typecode,
                  };
                  Allresults.push(obj);
                });
          }
          this.total = Allresults.length;
          this.poiList = Allresults;
          this.showList = true;
        });
    },
    getBdPoi() {
      axios
        .get(common.poiserve, {
          params: {
            request: "bdPoi",
            query: this.poi_text,
            output: "json",
            coord: "cgcs2000",
            page_num: 1,
            page_size: 30,
          },
        })
        .then((res) => {
          console.log(res);
          if (res.data.status == 0) {
            res.data.results &&
              res.data.results
                .filter((item) => {
                  var reg = new RegExp("[\\u4E00-\\u9FFF]+", "g");
                  return (
                    item.city.includes("北京") &&
                    item.name.includes(this.poi_text)
                  );
                })
                .forEach((val) => {
                  let obj = {
                    address: val.address,
                    adname: val.area,
                    cityname: val.city,
                    id: val.uid,
                    lat: parseFloat(val.location.lat),
                    lng: parseFloat(val.location.lng),
                    name: val.name,
                    pname: val.province,
                  };
                  Allresults.push(obj);
                });
@@ -454,7 +497,7 @@
        this.poiList = [];
        switch (this.select) {
          case "全部":
            this.getPoi();
            this.getBdPoi();
            this.getData();
            // axios
            //   .all([
@@ -580,7 +623,7 @@
            //   );
            break;
          case "POI":
            this.getPoi();
            this.getBdPoi();
            break;
          case "地块":
            this.getData();