| | |
| | | } |
| | | </style> |
| | | <script> |
| | | import Vue from "vue"; |
| | | import store from "@/utils/store"; |
| | | import poiLayer from "@/components/poplayer/main"; |
| | | import rpc from "@/assets/js/rpc"; |
| | | import mapData from "../../../../static/mapData"; |
| | | import mapMsg from "@/assets/js/mapMsg"; |
| | | import vueEvents from "@/utils/vueEvent.js"; |
| | | let PoiLayerConstructor = Vue.extend(poiLayer); |
| | | |
| | | import axios from "axios"; |
| | | import { mapState, mapMutations } from "vuex"; |
| | | import Bus from "../../tools/Bus"; |
| | | import { roman } from "../../../assets/json/index.js"; |
| | | import URLInCode from "@/assets/js/urlInCode"; |
| | | import keyName from "@/utils/poiKeys"; |
| | | import LayerField from "../../../../static/NameConf"; |
| | | let handler; |
| | | import LayerField from "@/utils/NameConf"; |
| | | |
| | | let handler, buildingPolygon, objdata, video, promiseS3M; |
| | | window.divPoint3 = null; |
| | | window.instance = null; |
| | | let tooltipHTML; |
| | | window.divPoint1 = null; |
| | | window.pickFeature = null; |
| | | window.imgUrl = null; |
| | | window.scale = null; |
| | | let buildingPolygon; |
| | | let tooltip; |
| | | let lineArr = []; |
| | | let video; |
| | | let promiseS3M; |
| | | //交通图层 |
| | | let panoramaLayer; |
| | | window.panoramaLayer = null; |
| | | export default { |
| | | name: "special", |
| | | data() { |
| | |
| | | }, |
| | | setCesuimHandle() { |
| | | var that = this; |
| | | |
| | | Bus.$on("clearSelectObject", this.clearSelectObject); |
| | | handler && handler.destroy(); |
| | | handler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas); |
| | | handler.setInputAction((event) => { |
| | | let nPickFeature = sgworld.Viewer.scene.pick(event.position); |
| | | |
| | | if (Cesium.defined(nPickFeature)) { |
| | | this.resetImg(); |
| | | if (buildingPolygon) { |
| | |
| | | ); |
| | | } |
| | | }); |
| | | } else if ( |
| | | nPickFeature.id.fid && |
| | | nPickFeature.id.fid.includes("免费住所空间0131") |
| | | ) { |
| | | let obj = nPickFeature.id.attributes; |
| | | let lon = 116.50592; |
| | | let lat = 39.798999; |
| | | if (divPoint1) { |
| | | divPoint1.deleteObject(); |
| | | } |
| | | tooltipHTML = ""; |
| | | //重置LayerField数据 |
| | | for (let item in LayerField) { |
| | | LayerField[item] = 0; |
| | | } |
| | | // 删除字段 |
| | | let { Id, ...userData } = obj; |
| | | // 直接展示 |
| | | for (let itemName in userData) { |
| | | let value = userData[itemName]; |
| | | let CnName = keyName[itemName] || itemName; |
| | | value && (tooltipHTML += `<p>${CnName}:${value || "无"}</p>`); |
| | | } |
| | | let description = ` |
| | | <div id="pointInfoBox" class="pointInfoBox" style="pointer-events:auto;"> |
| | | <span style="position: absolute; right: 12px; top: 6px;">×</span> |
| | | ${tooltipHTML} |
| | | </div> |
| | | `; |
| | | divPoint1 = sgworld.Creator.createDivPoint( |
| | | "详细信息", |
| | | { |
| | | lon: lon, |
| | | lat: lat, |
| | | height: 50, |
| | | }, |
| | | { |
| | | type: "custom", |
| | | offset: ["c", 50], |
| | | description, |
| | | onclick(data) { |
| | | divPoint1 && divPoint1.deleteObject(); |
| | | }, |
| | | } |
| | | ); |
| | | //关闭地块信息弹窗 |
| | | Bus.$emit("closeLandInfoPop", true); |
| | | layuiLayer.close(SmartEarthPopupData.layerProp); |
| | | this.$store.commit("description", obj); |
| | | } |
| | | // else if (nPickFeature.primitive instanceof Cesium.GroundPrimitive) { |
| | | // let wmsLayer = this.$store.state.selectedLayers.filter((item) => { |