liuyg
2022-01-20 fb297000f87e23236742b75e2db9fe1747f0dade
+地图点击  掉接口
3 files modified
1 files added
90 ■■■■ changed files
src/api/mobile/buildsClock/buildsClock.js 16 ●●●●● patch | view | raw | blame | history
src/components/mobileCortrol/index.vue 2 ●●● patch | view | raw | blame | history
src/components/mobileLeftNav/index.vue 14 ●●●● patch | view | raw | blame | history
src/components/mobilemap/index.vue 58 ●●●● patch | view | raw | blame | history
src/api/mobile/buildsClock/buildsClock.js
New file
@@ -0,0 +1,16 @@
/*
 * @Author: Morpheus
 * @Date: 2021-05-09 15:17:44
 * @Last Modified by: liu
 * @Last Modified time: 2022-01-20 16:47:43
 */
// 党群机构
import request from "@/router/axios";
export const getBuildClock = (params) => {
  return request({
    url: `/blade-architecture/architecture/detail`,
    method: "get",
    params: params,
  });
};
src/components/mobileCortrol/index.vue
@@ -15,7 +15,7 @@
      :class="{ active: dimension == '2.5D' }"
      @click="zoomIn('2.5D')"
    >
      2.5维
      3D
    </div>
  </div>
</template>
src/components/mobileLeftNav/index.vue
@@ -58,9 +58,10 @@
      },
      leftNavData: [
        {
          flag: false,
          flag: true,
          label: "标签",
          img: "/img/leftnav/tag.png",
          // img: "/img/leftnav/tag.png",
          img: "/img/leftnav/tag-checked.png",
          normal: "/img/leftnav/tag.png",
          checked: "/img/leftnav/tag-checked.png",
          layer: "tagLayer",
@@ -377,9 +378,16 @@
            that[that.leftNavData[n].layer].addOverlay(divIcon); //加入图标
          }
          that[that.leftNavData[n].layer]["positions"] = position;
          that[that.leftNavData[n].layer].show = false;
          if (that.leftNavData[n].layer == "tagLayer") {
            // that.leftNavData[n].img = that.leftNavData[n].checked;
          } else {
            that[that.leftNavData[n].layer].show = false;
          }
        });
      }
      // setTimeout(() => {
      //   this.tagLayer.show = false;
      // }, 500);
    },
    changePoiton(data) {
      // console.log(data);
src/components/mobilemap/index.vue
@@ -34,6 +34,7 @@
</template>
<script>
import axios from "axios";
import { getBuildClock } from "@/api/mobile/buildsClock/buildsClock"; // 楼栋详情
import { mapGetters } from "vuex";
export default {
  name: "mobilemapBox",
@@ -560,20 +561,49 @@
              ),
            });
          }
          // 定制化窗体
          that.openPopupS(
            {},
            [e.wgs84SurfacePosition.lng, e.wgs84SurfacePosition.lat],
            {
              name: "楼栋号:" + e.overlay.attr["楼栋号"],
              bgImg:
                "http://223.82.109.183:2081/zhxy/upload/20220105/3c05dd70a9eac17b7e49afbfc7b1b68e.png",
              address: "",
              introduce: "",
              data: e,
              lntLat: [e.wgs84SurfacePosition.lng, e.wgs84SurfacePosition.lat],
            }
          );
          //如果是地图点击建筑,调用接口查详情
          let ids =
            e.overlay.attr["楼栋号"] == "8栋"
              ? "9栋"
              : e.overlay.attr["楼栋号"] == "9栋"
              ? "8栋"
              : e.overlay.attr["楼栋号"];
          let eIntlat = [
            e.wgs84SurfacePosition.lng,
            e.wgs84SurfacePosition.lat,
          ];
          getBuildClock({
            mechanismname: "香琴湾" + ids,
          }).then((res) => {
            const item = res.data.data;
            // data.query.bgImg = ds.mechanismname;
            // data.query.name = ds.tpurl;
            // data.query.panoramaurl = ds.panoramaurl;
            // data.query.bgImg = ds.tpurl;
            // data.query.bgImg = ds.tpurl;
            let useData = {
              name: item.mechanismname,
              lntLat: eIntlat,
              alt: item.gd,
              heading: item.heading,
              pitch: item.pitch,
              roll: item.roll,
              bgImg: item.tpurl,
              QRImg: item.codeurl,
              websiteUrl: item.websiteurl,
              telePhone: item.telephone,
              address: item.address,
              introduce: item.introduce,
              video: item.videourl,
              buts: ["定位", "实景", "图集"],
              panoramaurl: item.panoramaurl, //全景
            };
            // 定制化窗体
            // console.log(item, useData, "111111");
            // return;
            that.openPopupS({}, eIntlat, useData);
          });
        } else {
          if (that.areaLayerSelect.overlay != undefined) {
            that.areaLayerSelect.overlay.setStyle({