北京经济技术开发区经开区虚拟城市项目-【前端】-移动端Web
少年
2024-01-23 490bce6c43f82bef6da1b4cc79827e6f61b30c2e
src/components/sideMenu/roamPanel/roamPanel.vue
@@ -35,6 +35,7 @@
window.currentOperator = null;
import store from "@/utils/store.js";
import { roman } from "../../../../static/json/roam.js";
import { layers } from '../../../../static/json/layer.js';
export default {
  name: "LayerPanel",
  data() {
@@ -67,6 +68,39 @@
      ],
    };
  },
  mounted() {
    let newDom = document.createElement("div");
    newDom.className = "dropUp";
    newDom.id = 'drop'
    newDom.innerHTML = "︿";
    newDom.style.position = "absolute";
    newDom.style.left = "43%";
    newDom.style.bottom = "190px";
    newDom.style.width = "60px";
    newDom.style.height = "20px";
    newDom.style.background = "#ffffff";
    newDom.style.color = "black";
    newDom.style.borderRadius = "20px 20px 0px 0px";
    newDom.style.textAlign = "center";
    newDom.style.display = "none";
    newDom.style.zIndex = "999999999";
    document.querySelector("body").appendChild(newDom);
    newDom.onclick = function () {
      if (newDom.className == "dropDown") {
        newDom.className = "dropUp";
        newDom.innerHTML = "︿";
        newDom.style.bottom = "190px";
        document.querySelector(".layui-layer-iframe").style.height = '200px';
        document.querySelector("iframe").style.height = '100%';
      } else {
        newDom.className = "dropDown";
        newDom.innerHTML = "﹀";
        newDom.style.bottom = "495px";
        document.querySelector(".layui-layer-iframe").style.height = '500px';
      }
    };
  },
  methods: {
    // 定点绕飞
    handleAroundClick() {
@@ -83,14 +117,17 @@
      //     //结束路径漫游
      //     this.ljmy();
      // }
      window.pointerFly=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;
        }
    setClearPointFly() {
      if (this.pointerFly) {
        this.pointerFly && this.pointerFly.end();
        this.pointerFly = null;
      }
    },
    // 漫游
    handleRoamClick(result) {
@@ -115,16 +152,19 @@
          type: 2,
          title: result.name,
          shade: false,
          area: ["100%", "200px"],
          area: ["100%", 'auto'],
          offset: "r",
          skin: "other-class",
          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);
          },
        });
      });
      });
        document.querySelector("#drop").style.display = "block";
    },
    closeCurrentOperator() {
      if (window.currentOperator) {