| | |
| | | import { showDeviceDetail, deviceDetail, className, dialogPositon } from "@/store"; |
| | | import { componentToSlot } from "element-plus/es/components/table-v2/src/utils.mjs"; |
| | | |
| | | import { useSimStore } from '@/store/simulation' |
| | | |
| | | |
| | | export function addTerrain(url) { |
| | | // console.log("加载地形"); |
| | | var terrainProvider = new Cesium.CesiumTerrainProvider({ |
| | |
| | | // 如果已经存在该 id 的 entity,则跳过创建 |
| | | if (pointEntityMap.has(id)) { |
| | | clearAllPoints() |
| | | console.log(`点 ${id} 已存在,跳过创建`); |
| | | console.log(`点 ${id} 已存在,已清除重建`); |
| | | } |
| | | |
| | | let position = Cesium.Cartesian3.fromDegrees(longitude, latitude, height || 50); |
| | |
| | | |
| | | if (Cesium.defined(picked) && id) { |
| | | const entity = picked?.id; |
| | | console.log(entity.attrs, 'attrsattrsattrs') |
| | | if (entity && entity.className) { |
| | | const simStore = useSimStore() |
| | | |
| | | if (entity && !simStore.openDia) { |
| | | let obj = { |
| | | deviceName: entity.attrs.deviceName, |
| | | latitude: entity.attrs.latitude, |
| | | longitude: entity.attrs.longitude |
| | | } |
| | | simStore.selectNWJ = obj |
| | | showDeviceDetail.value = false; |
| | | console.log(simStore.selectNWJ, 'map.js点击泥位计') |
| | | } |
| | | if (entity && entity.className && simStore.openDia) { |
| | | showDeviceDetail.value = true; |
| | | deviceDetail.value = entity.attrs; |
| | | className.value = entity.className; |