| | |
| | | // 打开保存方案对话框 |
| | | const openSaveDialog = async () => { |
| | | // 在 setup 内部更新 geom 的值 |
| | | printDamEntities(); |
| | | try { |
| | | forms.geom = props.selectedArea; |
| | | await simStore.addSimCheme(forms); |
| | | // 打印拦挡坝所需要的数据 |
| | | // printDamEntities(); |
| | | resetForm(); |
| | | EventBus.emit("close-selectArea"); |
| | | } catch (err) {} |
| | |
| | | const entity = entities[i]; |
| | | |
| | | if (entity.name && (entity.name === '栏档坝1' || entity.name === '栏档坝2')) { |
| | | let position = entity.position?._value; |
| | | |
| | | // 如果有位置信息,就将其从笛卡尔坐标转为经纬度和高度 |
| | | let cartographic = undefined; |
| | | if (position) { |
| | | cartographic = Cesium.Cartographic.fromCartesian(position); |
| | | } |
| | | |
| | | damDataList.push({ |
| | | name: entity.name, |
| | | position: entity.position?._value, |
| | | position: position ? { |
| | | x: position.x, |
| | | y: position.y, |
| | | z: position.z |
| | | } : null, |
| | | cartographic: cartographic ? { |
| | | longitude: Cesium.Math.toDegrees(cartographic.longitude), // 经度(度) |
| | | latitude: Cesium.Math.toDegrees(cartographic.latitude), // 纬度(度) |
| | | height: cartographic.height // 高度(米) |
| | | } : null, |
| | | heading: entity.heading?._value ?? entity.heading, |
| | | pitch: entity.pitch?._value ?? entity.pitch, |
| | | roll: entity.roll?._value ?? entity.roll, |
| | |
| | | }); |
| | | } |
| | | } |
| | | |
| | | if (damDataList.length > 0) { |
| | | console.log("【栏档坝实体数据列表】:", damDataList); |
| | | deleteDamEntitiesAfterDelay(); |