北京经济技术开发区经开区虚拟城市项目-【前端】-移动端Web
lixuliang
2024-01-19 1de23a596f1457db2ea9861645a568e779d7664f
20240119
已修改10个文件
159 ■■■■ 文件已修改
src/components/leftMenu/sousuo.vue 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/login.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/rightNavigation/NavigationBar.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sideMenu/layerMenu/layerPanel.vue 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sideMenu/layerTreePanel/layerTreePanel.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sideMenu/roamPanel/roamPanel.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/map.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/store.js 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/config.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/img/image/ddrf.png 补丁 | 查看 | 原始文档 | blame | 历史
src/components/leftMenu/sousuo.vue
@@ -80,8 +80,8 @@
            <div style="font-size: 0.12rem; color: black">
              <!-- <span>地址:{{ item.address ? item.address : "暂无详细地址" }}</span><br />
              <span>电话:{{ item.telphone ? item.telphone : "暂无联系方式" }}</span> -->
              <span>区域:{{ item.area ? item.area : "暂无区域信息" }}</span
              ><br />
              <!-- <span>区域:{{ item.area ? item.area : "暂无区域信息" }}</span> -->
              <!-- <br /> -->
              <span
                >地址:{{ item.address ? item.address : "暂无详细地址" }}</span
              >
@@ -283,15 +283,26 @@
              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: "bdPoi",
                query: this.poi_text,
                request: "GdPoi",
                keywords: this.poi_text,
                output: "json",
                coord: "cgcs2000",
                page_num: 0,
                page_size: 20,
                offset: 20,
                page: 1,
              },
            }),
          ])
@@ -311,22 +322,43 @@
                  });
              }
              // 市级平台
              if (data[1].data.status == 0) {
                data[1].data.results.forEach((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.forEach((val) => {
                  let poiarr = val.location.split(",");
                  let poi = {
                    lon: parseFloat(poiarr[0]),
                    lat: parseFloat(poiarr[1]),
                  };
                  let obj = {
                    address: val.address,
                    adname: val.area,
                    cityname: val.city,
                    id: val.uid,
                    lat: val.location.lat,
                    lng: val.location.lng,
                    lat: poi.lat,
                    lng: poi.lon,
                    name: val.name,
                    pname: val.province,
                  };
                  Allresults.push(obj);
                });
              }
              this.total = Allresults.length;
              this.poiList = Allresults;
              this.showList = true;
@@ -363,11 +395,11 @@
        billboard: {
          verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
          scale: 1,
          // image: window.SmartEarthRootUrl + "/Workers/image/mark.png",
          image: window.SmartEarthRootUrl + "/Workers/image/mark.png",
          heightReference: 1,
          disableDepthTestDistance: Number.POSITIVE_INFINITY,
        },
        properties:item
      });
      // 如果是地块,添加范围线
      if (item.type == "大兴用地") {
src/components/login.vue
@@ -16,8 +16,7 @@
    // ) {
    //   this.passFree();
    // }
    // console.log(1);
    // // 京办免密登录(url带参"focus-open-code")
    // if (this.$route.query["focus-open-code"]) {
    //   this.passJBFree();
src/components/rightNavigation/NavigationBar.vue
@@ -107,7 +107,12 @@
  },
  methods: {
    handleMenuListShow() {
      //清除点
      // 清除定点绕飞
      if (window.pointerFly) {
        window.pointerFly && window.pointerFly.end();
        window.pointerFly = null;
      }
      //清除搜索点
      flyPoint && Viewer.entities.remove(flyPoint);
      flyPoint = undefined;
      this.showMenuList.show = !this.showMenuList.show;
src/components/sideMenu/layerMenu/layerPanel.vue
@@ -117,7 +117,6 @@
</template>
<script>
let tdglLayer;
import {
  loadHXQ,
  loadJKQ,
@@ -252,6 +251,7 @@
      curFuncIndex: -1,
      curZTIndex: -1,
      state: store.thematicLayer,
      basicMapChecked: store.basicMapChecked.val,
    };
  },
  mounted() {
@@ -268,10 +268,14 @@
          1
        );
        loadEnterprise();
      }, 1000);
      }, 2000);
    });
  },
  methods: {
    changeLayerView(max, enableTilt) {
      window.Viewer.scene.screenSpaceCameraController.maximumZoomDistance = max;
      window.Viewer.scene.screenSpaceCameraController.enableTilt = enableTilt;
    },
    handleMapClick(result, index) {
      const val = layers.filter((res) => {
        if (res.name == result.name) {
@@ -300,6 +304,13 @@
    },
    // 二维底图选择
    handleEMapClick(result, index) {
      // 设置相机
      if (result.name == "二维地图") {
        this.changeLayerView(25000, false);
      } else if (result.name == "影像地图") {
        this.changeLayerView(50000, false);
      }
      // 切换图层
      const val = layers.filter((res) => {
        if (res.name == result.name) {
          return res;
@@ -325,6 +336,13 @@
    },
    // 三维模型选择
    handleSMapClick(result, index) {
      // 设置相机
      if (result.name == "3D城市") {
        this.changeLayerView(45000, true);
      } else if (result.name == "三维模型") {
        this.changeLayerView(80000, true);
      }
      // 切换图层
      const val = layers.filter((res) => {
        if (res.name == result.name) {
          return res;
@@ -468,8 +486,8 @@
        }
        this.curFuncIndex = -1;
        window.clusterLayer && window.clusterLayer.clear();
        if (tdglLayer) {
          sgworld.Creator.DeleteObject(tdglLayer);
        if (window.tdglLayer) {
          sgworld.Creator.DeleteObject(window.tdglLayer);
        }
      } else {
        // 隐藏底部图层面版
@@ -481,7 +499,7 @@
        this.curFuncIndex = index;
        switch (index) {
          case 0:
            tdglLayer = sgworld.Creator.createImageryProvider(
            window.tdglLayer = sgworld.Creator.createImageryProvider(
              layers[8].name,
              "tms",
              {
@@ -504,12 +522,13 @@
              ""
            );
            store.setTdglFlag(true);
            break;
          case 1:
            this.curFuncIndex = -1;
            store.setTdglFlag(false);
            if (tdglLayer) {
              sgworld.Creator.DeleteObject(tdglLayer);
            if (window.tdglLayer) {
              sgworld.Creator.DeleteObject(window.tdglLayer);
            }
            store.setHistoryShow(true);
            break;
@@ -523,7 +542,6 @@
  watch: {
    "state.itemId": {
      handler: function (newVal, oldVal) {
        debugger;
        let that = this;
        if (newVal == "") {
          this.curAreaTypeIndex = -1;
@@ -542,6 +560,25 @@
        }
      },
    },
    // 基础图层
    "basicMapChecked.val": {
      handler: function (newVal, oldVal) {
        if (newVal == "三维模型") {
          this.handleSMapClick(
            {
              id: "swmx",
              name: "三维模型",
              active: false,
              type: "san",
              src: require("@/assets/img/layer/swmx.png"),
            },
            1
          );
        }
      },
      immediate: true, //刷新加载 立马触发一次handler
      deep: true, // 可以深度检测到 obj 对象的属性值的变化
    },
  },
};
</script>
src/components/sideMenu/layerTreePanel/layerTreePanel.vue
@@ -2064,7 +2064,7 @@
    qiyeCluster(treeNode) {
      let dataSource;
      if (treeNode.layer == "企业链企业") {
        console.log(store.qiyeJsonInfo);
        // console.log(store.qiyeJsonInfo);
        dataSource = store.qiyeJsonInfo;
      }
      Viewer.dataSources.add(dataSource);
src/components/sideMenu/roamPanel/roamPanel.vue
@@ -68,6 +68,7 @@
    };
  },
  methods: {
    // 定点绕飞
    handleAroundClick() {
      this.closeCurrentOperator();
      store.setRoamPanelShow(false);
@@ -82,9 +83,18 @@
      //     //结束路径漫游
      //     this.ljmy();
      // }
      sgworld.drawObj = window.currentOperator = sgworld.Analysis.setPointFly();
      window.pointerFly=sgworld.drawObj = window.currentOperator = sgworld.Analysis.setPointFly();
    },
    // 结束顶点绕飞
     setClearPointFly() {
        if (this.pointerFly) {
            this.pointerFly && this.pointerFly.end();
            this.pointerFly = null;
        }
    },
    // 漫游
    handleRoamClick(result) {
      store.setBasicMap("三维影像");
      store.setRoamPanelShow(false);
      store.setSearchPanelShow(false);
      const val = roman.filter((res) => {
src/utils/map.js
@@ -614,7 +614,7 @@
                    })
            }
            let nPickFeature = sgworld.Viewer.scene.pick(event.position);
            // console.log(nPickFeature);
            console.log(nPickFeature);
            // console.log(event.position);//屏幕位置
            if (!nPickFeature || !nPickFeature.id) {
                return
@@ -660,11 +660,10 @@
                nPickFeature.primitive.scale = 1;
                nPickFeature.primitive.image =
                    window.SmartEarthRootUrl + "Workers/image/point.png";
                //点击弹框
                //点击弹框(部件、企业、监控)
                if (nPickFeature.id.tag) {
                    let properties = nPickFeature.id.properties;
                    let propertyNames = nPickFeature.id.properties.propertyNames;
                    if (propertyNames.indexOf("监控名") !== -1) {
                        // objdata = {
                        //     POITYPE: "SPJK",
@@ -742,8 +741,6 @@
                            lat: lat,
                        }
                    }
                    divPoint3 && divPoint3.deleteObject();
                    store.setPoplayerShowAction(false);
                    store.setPoplayerListAction({});
@@ -782,6 +779,7 @@
                    });
                    return;
                }
                //
            }
            // if (nPickFeature.id && nPickFeature.id.name.indexOf('YINJ') != -1) {
            //     divPoint3 && divPoint3.deleteObject();
src/utils/store.js
@@ -38,7 +38,7 @@
    MenuList: {
        show: false
    },
    setMenuListShow(val){
    setMenuListShow(val) {
        this.MenuList.show = val;
    },
    /**图层页面 */
@@ -151,8 +151,16 @@
    setHistoryShow(val) {
        this.history.show = val;
    },
    qiyeJsonInfo:{}
    qiyeJsonInfo: {},
    /*
        基础图层选择情况
    */
    basicMapChecked: {
        val: "",
    },
    setBasicMap(val) {
        this.basicMapChecked.val = val;
    }
};
export default store;
static/config.json
@@ -6,7 +6,7 @@
  "traffic": "http://www.map.zj.cn:8899/geoserver/zjplatform/wms",
  "poi_search11": "http://10.10.4.116:8085/yzAdapter/Navigation",
  "poi_search22": "http://10.10.4.115:8022/poisearch/qgpoi/POIQuery",
  "poi_search": "https://skyzt.bda.gov.cn/yzAdapter/Navigation",
  "poi_search": "https://skyzt.bda.gov.cn/service/NavigationService",
  "poi_search2": "https://skyzt.bda.gov.cn/yzxncsApi/poisearch/qgpoi/POIQuery",
  "space_query": "http://10.20.55.133:3866/zjchys/query/list",
  "gis_base_url": "https://skyzt.bda.gov.cn/"
static/img/image/ddrf.png