北京经济技术开发区经开区虚拟城市项目-【前端】-移动端Web
ZhAkps
2024-02-02 5a56e66be3532e97436ac6d54bd8d66b84203e06
Merge branch 'master' of http://106.120.22.35:48888/r/PM20221203225_MobileWeb
已修改8个文件
507 ■■■■ 文件已修改
src/assets/GLOBAL.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/leftMenu/sousuo.vue 433 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/login.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sideMenu/layerMenu/layerPanel.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sideMenu/roamPanel/roamPanel.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sideMenu/sliderAlpha/alpha.vue 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/viewer.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/map.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/GLOBAL.vue
@@ -1,6 +1,8 @@
<script>
const layers = [];
const alpha = 1;
export default {
  layers, //收集器
  alpha,
};
</script>
src/components/leftMenu/sousuo.vue
@@ -136,7 +136,7 @@
  height: 100%;
  top: 0;
  background-color: #f3f3f3;
  z-index: 99;
  z-index: 99999;
}
.el-select {
  width: 80px;
@@ -282,6 +282,100 @@
      rectangle.maxy > 31.182515322 && (rectangle.maxy = 31.182515322);
      return `RECT(${rectangle.minx} ${rectangle.miny},${rectangle.maxx} ${rectangle.maxy})`;
    },
    getPoi() {
      axios
        .get(common.poiserve, {
          params: {
            request: "GdPoi",
            keywords: this.poi_text,
            output: "json",
            coord: "cgcs2000",
            offset: 20,
            page: 1,
          },
        })
        .then((res) => {
          // 高德
          if (res.data.status == 1) {
            res.data.pois &&
              res.data.pois
                .filter((item) => {
                  var reg = new RegExp("[\\u4E00-\\u9FFF]+", "g");
                  return (
                    item.pname.includes("北京") &&
                    item.name.includes(this.poi_text) &&
                    !reg.test(item.typecode)
                  );
                })
                .forEach((val) => {
                  let poiarr = val.location.split(",");
                  let poi = {
                    lon: parseFloat(poiarr[0]),
                    lat: parseFloat(poiarr[1]),
                  };
                  let obj = {
                    adcode: val.adcode,
                    address: val.address,
                    adname: val.area,
                    citycode: val.citycode,
                    cityname: val.cityname,
                    id: val.uid,
                    lat: poi.lat,
                    lng: poi.lon,
                    name: val.name,
                    pcode: val.pcode,
                    pname: val.province,
                    type: val.type,
                    typecode: val.typecode,
                  };
                  Allresults.push(obj);
                });
          }
          this.total = Allresults.length;
          this.poiList = Allresults;
          this.showList = true;
        });
    },
    getData() {
      axios
        .post(common.poiserve2, {
          adcode: "110115",
          address: {
            name: "",
            type: "",
          },
          adname: "大兴区",
          cityname: "北京市",
          name: {
            name: this.poi_text,
            type: "",
          },
          page: 1,
          perPageCount: 20,
          pcode: "110000",
          pname: "",
          resType: "",
        })
        .then((res) => {
          if (res.status == 200) {
            res.data.data.res &&
              res.data.data.res
                .filter((item) => {
                  // 判断地块是否有汉字
                  var reg = new RegExp("[\\u4E00-\\u9FFF]+", "g");
                  return (
                    item.name.includes(this.poi_text) && reg.test(item.typecode)
                  );
                })
                .forEach((val) => {
                  Allresults.push(val);
                });
          }
          this.total = Allresults.length;
          this.poiList = Allresults;
          this.showList = true;
        });
    },
    search() {
      if (this.poi_text === "") {
        this.poiList = [];
@@ -292,221 +386,136 @@
        this.poiList = [];
        switch (this.select) {
          case "全部":
            axios
              .all([
                // 115接口(可查地块名)
                axios.post(common.poiserve2, {
                  adcode: "110115",
                  address: {
                    name: "",
                    type: "",
                  },
                  adname: "大兴区",
                  cityname: "北京市",
                  name: {
                    name: this.poi_text,
                    type: "",
                  },
                  page: 1,
                  perPageCount: 20,
                  pcode: "110000",
                  pname: "",
                  resType: "",
                }),
                // // 市级平台(百度:会查到外地)
                // axios.get(common.poiserve, {
                //   params: {
                //     request: "bdPoi",
                //     query: this.poi_text,
                //     output: "json",
                //     coord: "cgcs2000",
                //     page_num: 0,
                //     page_size: 20,
                //   },
                // }),
                //  市级平台(高德)
                axios.get(common.poiserve, {
                  params: {
                    request: "GdPoi",
                    keywords: this.poi_text,
                    output: "json",
                    coord: "cgcs2000",
                    offset: 20,
                    page: 1,
                  },
                }),
              ])
              .then(
                (data) => {
                  // this.total = data.data.pois.length;
                  // this.poiList =
                  //   data.data && data.data.pois;
                  //115接口
                  if (data[0].status == 200) {
                    data[0].data.data.res &&
                      data[0].data.data.res
                        .filter((item) => {
                          return item.name.includes(this.poi_text);
                        })
                        .forEach((val) => {
                          Allresults.push(val);
                        });
                  }
                  // 市级平台
                  // // 百度
                  // if (data[1].data.status == 0) {
                  //   data[1].data.results.forEach((val) => {
                  //     let obj = {
                  //       address: val.address,
                  //       adname: val.area,
                  //       cityname: val.city,
                  //       id: val.uid,
                  //       lat: val.location.lat,
                  //       lng: val.location.lng,
                  //       name: val.name,
                  //       pname: val.province,
                  //     };
                  //     Allresults.push(obj);
                  //   });
                  // }
                  // 高德
                  if (data[1].data.status == 1) {
                    data[1].data.pois &&
                      data[1].data.pois
                        .filter((item) => {
                          return (
                            item.pname.includes("北京") &&
                            item.name.includes(this.poi_text)
                          );
                        })
                        .forEach((val) => {
                          let poiarr = val.location.split(",");
                          let poi = {
                            lon: parseFloat(poiarr[0]),
                            lat: parseFloat(poiarr[1]),
                          };
                          let obj = {
                            adcode: val.adcode,
                            address: val.address,
                            adname: val.area,
                            citycode: val.citycode,
                            cityname: val.cityname,
                            id: val.uid,
                            lat: poi.lat,
                            lng: poi.lon,
                            name: val.name,
                            pcode: val.pcode,
                            pname: val.province,
                            type: val.type,
                            typecode: val.typecode,
                          };
                          Allresults.push(obj);
                        });
                  }
                  this.total = Allresults.length;
                  this.poiList = Allresults;
                  this.showList = true;
                  console.log(Allresults);
                },
                (response) => {
                  console.log("error");
                }
              );
            this.getPoi();
            this.getData();
            // axios
            //   .all([
            //     // 115接口(可查地块名)
            //     axios.post(common.poiserve2, {
            //       adcode: "110115",
            //       address: {
            //         name: "",
            //         type: "",
            //       },
            //       adname: "大兴区",
            //       cityname: "北京市",
            //       name: {
            //         name: this.poi_text,
            //         type: "",
            //       },
            //       page: 1,
            //       perPageCount: 20,
            //       pcode: "110000",
            //       pname: "",
            //       resType: "",
            //     }),
            //     // // 市级平台(百度:会查到外地)
            //     // axios.get(common.poiserve, {
            //     //   params: {
            //     //     request: "bdPoi",
            //     //     query: this.poi_text,
            //     //     output: "json",
            //     //     coord: "cgcs2000",
            //     //     page_num: 0,
            //     //     page_size: 20,
            //     //   },
            //     // }),
            //     //  市级平台(高德)
            //     axios.get(common.poiserve, {
            //       params: {
            //         request: "GdPoi",
            //         keywords: this.poi_text,
            //         output: "json",
            //         coord: "cgcs2000",
            //         offset: 20,
            //         page: 1,
            //       },
            //     }),
            //   ])
            //   .then(
            //     (data) => {
            //       // this.total = data.data.pois.length;
            //       // this.poiList =
            //       //   data.data && data.data.pois;
            //       //115接口
            //       if (data[0].status == 200) {
            //         data[0].data.data.res &&
            //           data[0].data.data.res
            //             .filter((item) => {
            //               return item.name.includes(this.poi_text);
            //             })
            //             .forEach((val) => {
            //               Allresults.push(val);
            //             });
            //       }
            //       // 市级平台
            //       // // 百度
            //       // if (data[1].data.status == 0) {
            //       //   data[1].data.results.forEach((val) => {
            //       //     let obj = {
            //       //       address: val.address,
            //       //       adname: val.area,
            //       //       cityname: val.city,
            //       //       id: val.uid,
            //       //       lat: val.location.lat,
            //       //       lng: val.location.lng,
            //       //       name: val.name,
            //       //       pname: val.province,
            //       //     };
            //       //     Allresults.push(obj);
            //       //   });
            //       // }
            //       // 高德
            //       console.log(data, "数据");
            //       if (data[0].data.status == 1) {
            //         data[0].data.pois &&
            //           data[0].data.pois
            //             .filter((item) => {
            //               return (
            //                 item.pname.includes("北京") &&
            //                 item.name.includes(this.poi_text)
            //               );
            //             })
            //             .forEach((val) => {
            //               let poiarr = val.location.split(",");
            //               let poi = {
            //                 lon: parseFloat(poiarr[0]),
            //                 lat: parseFloat(poiarr[1]),
            //               };
            //               let obj = {
            //                 adcode: val.adcode,
            //                 address: val.address,
            //                 adname: val.area,
            //                 citycode: val.citycode,
            //                 cityname: val.cityname,
            //                 id: val.uid,
            //                 lat: poi.lat,
            //                 lng: poi.lon,
            //                 name: val.name,
            //                 pcode: val.pcode,
            //                 pname: val.province,
            //                 type: val.type,
            //                 typecode: val.typecode,
            //               };
            //               Allresults.push(obj);
            //             });
            //       }
            //       this.total = Allresults.length;
            //       this.poiList = Allresults;
            //       this.showList = true;
            //       console.log(Allresults);
            //     },
            //     (response) => {
            //       console.log("error");
            //     }
            //   );
            break;
          case "POI":
            axios
              .get(common.poiserve, {
                params: {
                  request: "GdPoi",
                  keywords: this.poi_text,
                  output: "json",
                  coord: "cgcs2000",
                  offset: 20,
                  page: 1,
                },
              })
              .then((res) => {
                // 高德
                if (res.data.status == 1) {
                  res.data.pois &&
                    res.data.pois
                      .filter((item) => {
                        var reg = new RegExp("[\\u4E00-\\u9FFF]+", "g");
                        return (
                          item.pname.includes("北京") &&
                          item.name.includes(this.poi_text) &&
                          !reg.test(item.typecode)
                        );
                      })
                      .forEach((val) => {
                        let poiarr = val.location.split(",");
                        let poi = {
                          lon: parseFloat(poiarr[0]),
                          lat: parseFloat(poiarr[1]),
                        };
                        let obj = {
                          adcode: val.adcode,
                          address: val.address,
                          adname: val.area,
                          citycode: val.citycode,
                          cityname: val.cityname,
                          id: val.uid,
                          lat: poi.lat,
                          lng: poi.lon,
                          name: val.name,
                          pcode: val.pcode,
                          pname: val.province,
                          type: val.type,
                          typecode: val.typecode,
                        };
                        Allresults.push(obj);
                      });
                }
                this.total = Allresults.length;
                this.poiList = Allresults;
                this.showList = true;
              });
            this.getPoi();
            break;
          case "地块":
            axios
              .post(common.poiserve2, {
                adcode: "110115",
                address: {
                  name: "",
                  type: "",
                },
                adname: "大兴区",
                cityname: "北京市",
                name: {
                  name: this.poi_text,
                  type: "",
                },
                page: 1,
                perPageCount: 20,
                pcode: "110000",
                pname: "",
                resType: "",
              })
              .then((res) => {
                if (res.status == 200) {
                  res.data.data.res &&
                    res.data.data.res
                      .filter((item) => {
                        // 判断地块是否有汉字
                        var reg = new RegExp("[\\u4E00-\\u9FFF]+", "g");
                        return (
                          item.name.includes(this.poi_text) &&
                          reg.test(item.typecode)
                        );
                      })
                      .forEach((val) => {
                        Allresults.push(val);
                      });
                }
                this.total = Allresults.length;
                this.poiList = Allresults;
                this.showList = true;
              });
            this.getData();
            break;
        }
      }
src/components/login.vue
@@ -26,13 +26,12 @@
  methods: {
    getQueryString(name) {
      this.$router.push("/index");
      // var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
      // var r = window.location.search.substr(1).match(reg);
      // if (r != null) {
      //   this.$router.push("/index");
      // }
      // return null;
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
      var r = window.location.search.substr(1).match(reg);
      if (r != null) {
        this.$router.push("/index");
      }
      return null;
    },
    // 京办免密登录
    // passJBFree() {
src/components/sideMenu/layerMenu/layerPanel.vue
@@ -513,7 +513,7 @@
          sgworld.Creator.DeleteObject(window.tdglLayer);
        }
      } else {
        // 隐藏底部图层面版
        // 隐藏底部图层面版tdglLayer
        store.setLayerPanelShow(false);
        // 隐藏右上角菜单面板
        store.setMenuListShow(false);
@@ -538,15 +538,13 @@
                  layers[8].children[0].tileType === "Geo"
                    ? new Cesium.GeographicTilingScheme()
                    : new Cesium.WebMercatorTilingScheme(),
                // alpha: layers[8].children[0].alpha,
                alpha: this.alpha,
                alpha: layers[8].children[0].alpha,
              },
              "0",
              layers[8].children[0].zIndex,
              true,
              ""
            );
            //显示滑动条
            store.setTdglFlag(true);
            break;
          case 1:
src/components/sideMenu/roamPanel/roamPanel.vue
@@ -156,7 +156,6 @@
          content: SmartEarthRootUrl + "Workers/path/Path.html",
          end: function () {
            document.querySelector("#drop").style.display = "none";
            document.querySelector("#drop").style.display = "none";
            PathAnimationData.fly && PathAnimationData.fly.exit();
            store.setSearchPanelShow(true);
          },
src/components/sideMenu/sliderAlpha/alpha.vue
@@ -1,12 +1,11 @@
<template>
  <div class="sliders">
    <el-slider
      v-model="alpha"
      v-model="value"
      :max="100"
      :min="0"
      vertical
      height="200px"
      :max="1"
      :min="0"
      :step="0.01"
      @input="changeSlider"
    >
    </el-slider>
@@ -14,42 +13,15 @@
</template>
<script>
import store from "@/utils/store.js";
import { layers } from "../../../../static/json/layer.js";
export default {
  data() {
    return {
      alpha: store.tdglInfo.alpha,
      value: 100,
    };
  },
  methods: {
    changeSlider(val) {
      if (window.tdglLayer) {
        sgworld.Creator.DeleteObject(window.tdglLayer);
      }
      window.tdglLayer = sgworld.Creator.createImageryProvider(
        layers[8].name,
        "tms",
        {
          id: layers[8].children[0].id,
          url: layers[8].children[0].urls,
          fileExtension: layers[8].children[0].img || "png",
          enablePickFeatures: false,
          level: layers[8].children[0].Level,
          minimumLevel: layers[8].children[0].minimumLevel,
          maximumLevel: layers[8].children[0].maximumLevel,
          tilingScheme:
            layers[8].children[0].tileType === "Geo"
              ? new Cesium.GeographicTilingScheme()
              : new Cesium.WebMercatorTilingScheme(),
          // alpha: layers[8].children[0].alpha,
          alpha:val,
        },
        "0",
        layers[8].children[0].zIndex,
        true,
        ""
      );
      window.tdglLayer.item.alpha = val / 100;
    },
  },
};
@@ -62,4 +34,7 @@
  left: 0.15rem;
  z-index: 88;
}
.el-tooltip__popper{
  z-index: 88 !important;
}
</style>
src/components/viewer.vue
@@ -168,8 +168,8 @@
      );
      window.Viewer = sgworld._Viewer;
      Viewer.shadows = false;
      viewer.scene.fxaa = false;
      viewer.scene.postProcessStages.fxaa.enabled = false;
      Viewer.scene.fxaa = false;
      Viewer.scene.postProcessStages.fxaa.enabled = false;
      window.Viewer.scene.globe.maximumScreenSpaceError = 4/3;
      that.showBottom();
      window.Viewer.scene.screenSpaceCameraController.minimumZoomDistance = 100; //相机的高度的最小值
src/utils/map.js
@@ -4,7 +4,6 @@
import poiLayer from '@/components/poplayer/main';
import store from "@/utils/store";
import { Message } from 'element-ui';
let tdglLine, qiyexinxi, qysl, ydbm, ydlx, cyfx, crzt, ydmj, crnx, crnf, rjl, jzxg, jzmd;
let objdata;
@@ -917,8 +916,8 @@
                        level: treeNode.Level,
                        minimumLevel: treeNode.minimumLevel,
                        maximumLevel: treeNode.maximumLevel,
                        minificationFilter:Cesium.TextureMinificationFilter.NEAREST_MIPMAP_LINEAR,
                        magnificationFilter:Cesium.TextureMinificationFilter.NEAREST_MIPMAP_LINEAR,
                        minificationFilter: Cesium.TextureMinificationFilter.NEAREST_MIPMAP_LINEAR,
                        magnificationFilter: Cesium.TextureMinificationFilter.NEAREST_MIPMAP_LINEAR,
                        tilingScheme:
                            treeNode.tileType === "Geo"
                                ? new Cesium.GeographicTilingScheme()
@@ -2190,4 +2189,4 @@
            clearLayerByTypeId(item);
        })
    }
}
}