北京经济技术开发区经开区虚拟城市项目-【前端】-Web
lixuliang
2023-10-20 4509dd489115a499a0f63487ec90adfdc7a5cd56
src/components/menu/tools/special.vue
@@ -76,6 +76,17 @@
          <el-button> <img src="@/assets/img/left/ztfx/sjxq.png" /> </el-button
        ></el-tooltip>
      </div>
      <!-- <div class="specialTool" @click="guanxian(openGX)">
        <el-tooltip
          class="item"
          effect="dark"
          content="地下管线"
          placement="top-start"
          popper-class="item_tooltip"
        >
          <el-button> <img src="@/assets/img/left/ztfx/spl.png" /> </el-button
        ></el-tooltip>
      </div> -->
      <!-- <div class="specialTool" @click="sceneRoaming">
        <el-tooltip
          class="item"
@@ -122,7 +133,7 @@
  /* border-radius: 30px; */
  box-shadow: 0px 0px 7px rgba(76, 165, 248, 0.8) inset;
  background-color: rgba(14, 50, 143, 0.5);
  width: 460px;
  width: 350px;
}
.specialTools {
  margin-left: 20px;
@@ -207,7 +218,6 @@
import Bus from "../../tools/Bus";
import { roman } from "../../../assets/json/index.js";
import URLInCode from "@/assets/js/urlInCode";
let handler;
let pickFeature;
let tooltipHTML;
@@ -220,12 +230,14 @@
let video2;
let video3;
let video4;
let promiseS3M;
//交通图层
let panoramaLayer;
export default {
  name: "special",
  data() {
    return {
      openGX: "open",
      showPointInfo: true,
      romanOption: [
        { name: "核心区" },
@@ -547,9 +559,7 @@
      handler.setInputAction((event) => {
        let nPickFeature = sgworld.Viewer.scene.pick(event.position);
        if (Cesium.defined(nPickFeature)) {
          // console.log(nPickFeature);
          if (nPickFeature.primitive instanceof Cesium.Billboard) {
            console.log(nPickFeature.id);
            if (nPickFeature.id.length > 0) {
              return;
            }
@@ -568,7 +578,6 @@
            if (nPickFeature.id.tag) {
              let properties = nPickFeature.id.properties;
              let propertyNames = nPickFeature.id.properties.propertyNames;
              // console.log(propertyNames);
              if (propertyNames.indexOf("监控名") !== -1) {
                obj["JK名称"] = properties["JK名称"]._value;
                obj["JK类型"] = properties["JK类型"]._value;
@@ -887,6 +896,20 @@
      video && video.destroy();
      video = undefined;
    },
    guanxian(params) {
      if (params == "open") {
        promiseS3M = sgworld.coreMap.scene.open(
          "http://192.162.2.2:8090/iserver/services/3D-GX/rest/realspace"
        );
        this.openGX = "close";
      } else {
        promiseS3M.then((res) => {
          res.forEach((item) => {
            item.visible = false;
          });
        });
      }
    },
  },
};
</script>