| | |
| | | pointGround: { lon: 0, lat: 0, height: 0 }, |
| | | pointFly: { lon: 0, lat: 0, height: 0 }, |
| | | rowData:null, |
| | | time: 10, |
| | | time: 5, |
| | | takePhoto: '默认名称', // 初始数据 |
| | | newTakePhoto: '', // 编辑时的新数据 |
| | | isEditingPhoto: false, // 控制是否处于编辑状态 |
| | |
| | | point.children[0].actions.push(action); |
| | | console.log(point) |
| | | this.$emit('dealAction',point) |
| | | this.time = 10 |
| | | this.time = 5 |
| | | this.newTakePhoto = '默认名称' |
| | | this.newTakeVideo = '默认名称' |
| | | this.takeVideo = '默认名称' |
| | |
| | | const position = Cesium.Cartesian3.fromDegrees(this.form.longitude, this.form.latitude, this.form.deviceHeight); |
| | | console.log(position) |
| | | // 设置模型方向(可选) |
| | | let viewer = window['cesiumContainer'].viewer |
| | | let model = viewer.entities.getById("MyModel"); |
| | | const heading = Cesium.Math.toRadians(this.form.face); // 朝东南方向 |
| | | const pitch = 0; |
| | |
| | | }, |
| | | gettiles3dCam(){ |
| | | console.log(this.form) |
| | | let viewer = window['cesiumContainer'].viewer |
| | | if(!this.form.face) { |
| | | return this.$message.error('请输入朝向') |
| | | } |
| | |
| | | "pitch": current.pitch, |
| | | "roll": current.roll, |
| | | "zoom":current.zoom || 1, |
| | | 'wait' : 5 |
| | | 'wait' : 3 |
| | | }); |
| | | dealArr.push({ |
| | | "lng": next.lng, |
| | |
| | | let distance = 5000 |
| | | //精度维度高度 |
| | | getScopeTower(lon,lat,distance).then(res=>{ |
| | | console.log(res) |
| | | if(res.code == 200) { |
| | | console.log(res) |
| | | res.rows.forEach((data) => { |
| | | this.createModel(data); |
| | | }); |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | createModel(data){ |
| | | console.log(data) |
| | | let viewer = window['cesiumContainer'].viewer |
| | | const heading = Cesium.Math.toRadians(data.face || 0); // 朝东南方向 |
| | | const pitch = 0; |
| | | const roll = 0; |
| | | const orientation = Cesium.Transforms.headingPitchRollQuaternion( |
| | | Cesium.Cartesian3.fromDegrees(data.longitude, data.latitude, data.altitude), |
| | | new Cesium.HeadingPitchRoll(heading, pitch, roll) |
| | | ); |
| | | viewer.entities.add({ |
| | | id: data.id, |
| | | position: Cesium.Cartesian3.fromDegrees(data.longitude, data.latitude, data.altitude), |
| | | orientation: orientation, |
| | | model: { |
| | | uri: data?.ardTowerModel?.modelRoute, |
| | | scale: 1, |
| | |
| | | window['cesiumContainerYY'].viewer.entities.add({ |
| | | id:data.id+ 'yytower', |
| | | position: Cesium.Cartesian3.fromDegrees(data.longitude, data.latitude, data.altitude), |
| | | orientation: orientation, |
| | | model: { |
| | | uri: data?.ardTowerModel?.modelRoute, |
| | | scale: 1, |
| | |
| | | }); |
| | | }, |
| | | addModel(row){ |
| | | let viewer = window['cesiumContainer'].viewer |
| | | console.log(window) |
| | | console.log(window.viewer) |
| | | const position = Cesium.Cartesian3.fromDegrees(0, 0, 0); |
| | | |
| | | // 设置模型方向(可选) |
| | |
| | | width="20%"> |
| | | <el-form ref="form" :model="form" label-width="80px" :rules="rules"> |
| | | <el-form-item label="飞行模板"> |
| | | <el-select v-model="form.modelObj" placeholder="请选择飞行模板" @change="handleChange"> |
| | | <el-select v-model="form.flyDeviceId" placeholder="请选择飞行模板" @change="handleChange"> |
| | | <el-option |
| | | v-for="item in templateArr" |
| | | :key="item.id" |
| | |
| | | }, |
| | | templateArr:[], |
| | | rules:{ |
| | | modelObj: [ |
| | | flyDeviceId: [ |
| | | { required: true, message: '请选择模板', trigger: 'change' } |
| | | ] |
| | | } |
| | |
| | | if(this.deviceId){ |
| | | flyDataInfo(this.deviceId).then(res=>{ |
| | | console.log(res) |
| | | if(res.code == 200 ) { |
| | | this.templateArr = res.rows |
| | | } |
| | | // if(res.code == 200 ) { |
| | | // this.templateArr = res.rows |
| | | // } |
| | | this.templateArr = res || [] |
| | | }) |
| | | //点击模板查询设备下的关联模型的所有模板 |
| | | } |
| | |
| | | this.$emit('cancelModel') |
| | | }, |
| | | handleChange(value){ |
| | | console.log(value) |
| | | console.log(this.templateArr) |
| | | this.form.deviceId = this.deviceId |
| | | this.form.flyDeviceId =value |
| | | this.form.modelObj =this.templateArr.find(item => item.id === value) |
| | | }, |
| | | submit(){ |
| | | // this.selectArr |
| | | // //反显参数传递option对象 |
| | | // this.form.deviceId = this.deviceId |
| | | // console.log(this.form) |
| | | console.log(this.form) |
| | | this.$emit('receiveModel',this.form) |
| | | this.$emit('cancelModel') |
| | | }, |