| | |
| | | // let pois = [0, 0,0] |
| | | let holdingPosition; |
| | | let rightKeyMove = false |
| | | let distance = 100; |
| | | let distance = 25; |
| | | export default { |
| | | props: { |
| | | towerUrl: { |
| | |
| | | default() { |
| | | return '' |
| | | } |
| | | }, |
| | | deviceData: { |
| | | type: Object, |
| | | }, |
| | | }, |
| | | data(){ |
| | |
| | | }, |
| | | mounted(){ |
| | | this.initCesium(); |
| | | console.log(this.deviceData) |
| | | }, |
| | | computed: { |
| | | boxWidth() { |
| | |
| | | "longitude": Cesium.Math.toDegrees(Cesium.Cartographic.fromCartesian(tagert).longitude), |
| | | } |
| | | //塔的距离和观测点的距离 |
| | | const point1 = Cesium.Cartesian3.fromDegrees(0, 0, 50); |
| | | console.log(_this.deviceData) |
| | | const point1 = Cesium.Cartesian3.fromDegrees(0, 0, _this.deviceData?.modelHeight || 45); |
| | | // const point1 = Cesium.Cartesian3.fromDegrees(0, 0, 45); |
| | | const point2 = Cesium.Cartesian3.fromDegrees(Cesium.Math.toDegrees(Cesium.Cartographic.fromCartesian(tagert).longitude), Cesium.Math.toDegrees(Cesium.Cartographic.fromCartesian(tagert).latitude), Cesium.Cartographic.fromCartesian(tagert).height); |
| | | |
| | | // 计算距离(单位:米) |
| | |
| | | const heading = Cesium.Math.toDegrees(camera.heading); |
| | | const pitch = Cesium.Math.toDegrees(camera.pitch); |
| | | const roll = Cesium.Math.toDegrees(camera.roll); |
| | | const point1 = Cesium.Cartesian3.fromDegrees(0, 0, 50); |
| | | const point1 = Cesium.Cartesian3.fromDegrees(0, 0, this.deviceData?.modelHeight || 45); |
| | | const point2 = Cesium.Cartesian3.fromDegrees(Cesium.Math.toDegrees(position.longitude),Cesium.Math.toDegrees(position.latitude),position.height) |
| | | |
| | | var camResult = |
| | |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <InitMap v-if="showMap" @mergePoint="mergePoint" :towerUrl="towerUrl"></InitMap> |
| | | <InitMap v-if="showMap" @mergePoint="mergePoint" :towerUrl="towerUrl" :deviceData="deviceData"></InitMap> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | |
| | | <el-button type="primary" @click="submit()" >确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <ChooseModelDialog v-if="showModel" @cancel ='cancel' @getRowData="getRowData" ></ChooseModelDialog> |
| | | <ChooseModelDialog v-if="showModel" @cancel ='cancel' @getRowData="getRowData"></ChooseModelDialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { compileToFunctions } from "vue-template-compiler"; |
| | | import CesiumMap from "../../../../utils/components/cesium-map.vue"; |
| | | import InitMap from "../../../../utils/components/init-map.vue"; |
| | | import ChooseModelDialog from './chooseModelDialog.vue'; |
| | | import { addPoint , getPointInfo} from "@/api/system/template" |
| | | let globalon = 0 |
| | | let globalat = 0 |
| | | let towerHeight = 47.47 |
| | | let towerHeight = 45 |
| | | //塔的朝向算法所用到的 旋转度数 |
| | | let rotationAngle = Cesium.Math.toRadians(0) |
| | | export default{ |
| | |
| | | chooseModelId:null, |
| | | modelName:null, |
| | | templateType:null, |
| | | form:{} |
| | | form:{}, |
| | | deviceData:null |
| | | } |
| | | }, |
| | | mounted(){ |
| | |
| | | console.log(row) |
| | | this.modelName = row.modelName |
| | | this.templateType = row.modelType |
| | | this.deviceData = row |
| | | if(this.templateId){ |
| | | this.form.templateName = row.templateName || '' |
| | | } |
| | | this.chooseModelId = row.id |
| | | towerHeight = row.towerHeight || 47.47 |
| | | towerHeight = row.modelHeight || 45 |
| | | this.showMap =false |
| | | this.$nextTick(()=>{ |
| | | // this.towerUrl = row.modelRoute |
| | | |
| | | if(this.templateId){ |
| | | this.towerUrl = row.ardTowerModel.modelRoute |
| | | }else { |