| | |
| | | <el-form-item> |
| | | <el-button |
| | | size="small" |
| | | v-if="$store.state.previewLayer.type =='mpt'" |
| | | @click="setcropping" |
| | | >裁剪</el-button> |
| | | <el-button |
| | | size="small" |
| | | v-if="$store.state.previewLayer.type !='mpt'" |
| | | @click="locateTo" |
| | | >定位</el-button> |
| | | <el-button |
| | | size="small" |
| | | v-if="$store.state.previewLayer.type !='mpt'" |
| | | @click="showTileset" |
| | | >显隐</el-button> |
| | | <el-button |
| | | size="small" |
| | | v-if="$store.state.previewLayer.type !='mpt'" |
| | | @click="setUndergroundMode" |
| | | >地下</el-button> |
| | | <el-button |
| | | v-if="$store.state.previewLayer.type != '3dml' && |
| | | $store.state.previewLayer.type !='cpt'" |
| | | $store.state.previewLayer.type !='cpt'&& |
| | | $store.state.previewLayer.type !='mpt'" |
| | | size="small" |
| | | @click="pickupCoords" |
| | | >拾取</el-button> |
| | | <el-button |
| | | v-if="$store.state.previewLayer.type != '3dml' && |
| | | $store.state.previewLayer.type !='cpt'" |
| | | $store.state.previewLayer.type !='cpt'&& |
| | | $store.state.previewLayer.type !='mpt'" |
| | | size="small" |
| | | @click="reload" |
| | | > |
| | |
| | | </el-button> |
| | | <el-button |
| | | v-if="modelForm.modelid == null && $store.state.previewLayer.type != '3dml'&& |
| | | $store.state.previewLayer.type !='cpt'" |
| | | $store.state.previewLayer.type !='cpt'&& |
| | | $store.state.previewLayer.type !='mpt'" |
| | | size="small" |
| | | @click="getModeKeyId" |
| | | >模型主键</el-button> |
| | | <el-button |
| | | v-if="$store.state.previewLayer.type != '3dml'&& |
| | | $store.state.previewLayer.type !='cpt'" |
| | | $store.state.previewLayer.type !='cpt' |
| | | " |
| | | size="small" |
| | | @click="resave" |
| | | >保存</el-button> |
| | |
| | | <el-form-item |
| | | label="经度:" |
| | | v-if="$store.state.previewLayer.type != '3dml'&& |
| | | $store.state.previewLayer.type !='cpt'" |
| | | $store.state.previewLayer.type !='cpt'&& |
| | | $store.state.previewLayer.type !='mpt'" |
| | | > |
| | | <el-input |
| | | size="small" |
| | |
| | | <el-form-item |
| | | label="纬度:" |
| | | v-if="$store.state.previewLayer.type != '3dml'&& |
| | | $store.state.previewLayer.type !='cpt'" |
| | | $store.state.previewLayer.type !='cpt'&& |
| | | $store.state.previewLayer.type !='mpt'" |
| | | > |
| | | <el-input |
| | | size="small" |
| | |
| | | <el-form-item |
| | | label="高度:" |
| | | v-if="$store.state.previewLayer.type != '3dml'&& |
| | | $store.state.previewLayer.type !='cpt'" |
| | | $store.state.previewLayer.type !='cpt'&& |
| | | $store.state.previewLayer.type !='mpt'" |
| | | > |
| | | <el-input |
| | | size="small" |
| | |
| | | <el-form-item |
| | | label="角度:" |
| | | v-if="$store.state.previewLayer.type != '3dml'&& |
| | | $store.state.previewLayer.type !='cpt'" |
| | | $store.state.previewLayer.type !='cpt'&& |
| | | $store.state.previewLayer.type !='mpt'" |
| | | > |
| | | <el-input |
| | | size="small" |
| | |
| | | info: '', |
| | | icon: '', |
| | | bak: '', |
| | | Id: '' |
| | | Id: '', |
| | | |
| | | }, |
| | | options: [ |
| | | { |
| | |
| | | yaw: 0, |
| | | alpha: 1, |
| | | modelid: null, |
| | | west: null, |
| | | south: null, |
| | | east: null, |
| | | north: null, |
| | | }, |
| | | app: { |
| | | tileset: null, |
| | |
| | | this.init3DMap(); |
| | | }, |
| | | methods: { |
| | | //裁剪 |
| | | setcropping() { |
| | | var that = this; |
| | | sgworld.Creator.SimpleGraphic.clear() |
| | | sgworld.Creator.SimpleGraphic.edit(false, { editProp: false }); |
| | | sgworld.Creator.createSimpleGraphic( |
| | | "rectangle", {}, |
| | | function (entity) { |
| | | that.modelForm.east = Cesium.Math.toDegrees( |
| | | entity.rectangle.coordinates.getValue().east |
| | | ); |
| | | that.modelForm.north = Cesium.Math.toDegrees( |
| | | entity.rectangle.coordinates.getValue().north |
| | | ); |
| | | that.modelForm.west = Cesium.Math.toDegrees( |
| | | entity.rectangle.coordinates.getValue().west |
| | | ); |
| | | that.modelForm.south = Cesium.Math.toDegrees( |
| | | entity.rectangle.coordinates.getValue().south |
| | | ); |
| | | |
| | | } |
| | | ); |
| | | }, |
| | | setUndergroundMode() { |
| | | if (window.UndergroundMode) { |
| | | this.$refs && |
| | |
| | | }); |
| | | |
| | | } else if (res.url.indexOf('.mpt') != -1) { |
| | | this.editModelFlag = true; |
| | | |
| | | Viewer.imageryLayers.removeAll(); |
| | | var url = res.url.split(';') |
| | | sgworld.Creator.createImageryProvider('mpt影像', "wms", { |
| | | |
| | | var ops = { |
| | | url: url[0], |
| | | layers: url[1] |
| | | }, "0", undefined, true, ""); |
| | | } |
| | | if (res.json && JSON.parse(res.json).west) { |
| | | var val = JSON.parse(res.json) |
| | | |
| | | ops.rectangle = Cesium.Rectangle.fromDegrees(val.west, val.south, val.east, val.north) |
| | | } |
| | | sgworld.Creator.createImageryProvider('mpt影像', "wms", ops, "0", undefined, true, ""); |
| | | |
| | | |
| | | |
| | | |
| | | } else if (res.url.indexOf('menuLayer') != -1) { |
| | | this.setShowModelLayer(); |
| | | } |
| | |
| | | }, |
| | | |
| | | async resave() { |
| | | if (!this.modelForm.modelid) { |
| | | return this.$message('未选择模型主键ID'); |
| | | |
| | | if (this.$store.state.previewLayer.type != "mpt") { |
| | | if (!this.modelForm.modelid) { |
| | | return this.$message('未选择模型主键ID'); |
| | | } |
| | | } else { |
| | | sgworld.Creator.SimpleGraphic.clear() |
| | | } |
| | | |
| | | this.$store.state.previewLayer.json = JSON.stringify(this.modelForm); |
| | | |
| | | if (this.$store.state.previewLayer.url) { |