| | |
| | | label-width="50px" |
| | | > |
| | | <el-form-item label="经度:"> |
| | | <el-input v-model="coordFrom.lon"></el-input> |
| | | <el-input |
| | | v-model="coordFrom.lon" |
| | | placeholder="请输入经度" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="纬度:"> |
| | | <el-input v-model="coordFrom.lat"></el-input> |
| | | <el-input |
| | | v-model="coordFrom.lat" |
| | | placeholder="请输入维度" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="高度:"> |
| | | <el-input v-model="coordFrom.height"></el-input> |
| | | <el-input |
| | | v-model="coordFrom.height" |
| | | placeholder="请输入高度" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | |
| | | <el-input |
| | | style="width: 160px" |
| | | v-model="comprehensive.name" |
| | | placeholder="请输入地名...." |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | |
| | | <td>中砂</td> |
| | | <td> |
| | | <div style="width:100px;height:20px;background:rgba(164,140,21,1)"> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>淤泥质土</td> |
| | | <td> |
| | | <div style="width:100px;height:20px;background:rgba(75,74,78,1)"> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>其他</td> |
| | | <td> |
| | | <div style="width:100px;height:20px;background:rgba(225,225,225,1)"> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | |
| | | val: 50, |
| | | }, |
| | | coordFrom: { |
| | | lon: 116.3911, |
| | | lat: 39.9115, |
| | | height: 100000, |
| | | lon: "", |
| | | lat: "", |
| | | height: "", |
| | | }, |
| | | listData: { |
| | | name: null, |
| | |
| | | window.pickedColor; |
| | | window.modeCatchHandler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas); |
| | | window.modeCatchHandler.setInputAction((event) => { |
| | | window.pickedFeature && (window.pickedFeature.color = window.pickedColor); |
| | | if (window.pickedColor) { window.pickedFeature && (window.pickedFeature.color = window.pickedColor); } |
| | | // window.pickedFeature && (window.pickedFeature.color = window.pickedColor); |
| | | window.pickedFeature = sgworld.Viewer.scene.pick(event.position); |
| | | if (Cesium.defined(window.pickedFeature)) { |
| | | if (window.pickedFeature.primitive instanceof Cesium.Cesium3DTileset) { |
| | | if (window.pickedFeature && window.pickedFeature.getProperty) { |
| | | if (window.pickedFeature) { |
| | | window.pickedColor = window.pickedFeature.color |
| | | window.pickedFeature.color = Cesium.Color.RED.withAlpha(0.3); |
| | | |
| | |
| | | }, Cesium.ScreenSpaceEventType.LEFT_CLICK) |
| | | }, |
| | | async setModelInfoData(result) { |
| | | var modelKey = 'id' |
| | | if (result.tileset.pubid > 0) { |
| | | const data = await comprehensive_selectPubById({ id: result.tileset.pubid }) |
| | | if (data.code != 200) { |
| | | return |
| | | } else { |
| | | var modelKey = 'id'; |
| | | |
| | | modelKey = JSON.parse(data.result.json).modelid |
| | | var modelid; |
| | | debugger |
| | | if (result.tileset) { |
| | | if (result.tileset.pubid && parseInt(result.tileset.pubid) > 0) { |
| | | |
| | | const data = await comprehensive_selectPubById({ id: result.tileset.pubid }) |
| | | if (data.code != 200) { |
| | | return |
| | | } else { |
| | | |
| | | modelKey = JSON.parse(data.result.json).modelid |
| | | } |
| | | if (!modelKey) { |
| | | return this.$message('没有模型主键ID,无法查询数据'); |
| | | } |
| | | modelid = pickedFeature.getProperty(modelKey); |
| | | |
| | | } |
| | | if (!modelKey) { |
| | | return this.$message('没有模型主键ID,无法查询数据'); |
| | | } |
| | | } else { |
| | | modelid = '3dml' + result.primitive.id; |
| | | } |
| | | var that = this |
| | | |
| | | if (!modelid) { |
| | | modelid = "noAuto_" + pickedFeature.primitive.layerId; |
| | | } |
| | | var obj = { |
| | | layerid: pickedFeature.primitive.layerId, |
| | | modelid: pickedFeature.getProperty(modelKey) |
| | | modelid: modelid |
| | | } |
| | | |
| | | const data1 = await comprehensive_selectModelByGuid(obj); |
| | |
| | | } |
| | | |
| | | that.$store.state.catModelInfo = { |
| | | id: pickedFeature.getProperty(modelKey), |
| | | id: modelid, |
| | | name: name, |
| | | type: type, |
| | | bak: bak, |
| | |
| | | |
| | | licenseServer: window.sceneConfig.licenseServer, |
| | | }); |
| | | |
| | | |
| | | window.Viewer = window.sgworld._Viewer; |
| | | |
| | | if (is_production) { |
| | | Viewer.imageryLayers.removeAll(); |
| | | } |
| | | //定位 |
| | | // sgworld.Navigate.jumpTo({ |
| | | // //跳转视角 |
| | |
| | | //开启深度检测 |
| | | // sgworld.Analysis.depthTestAgainstTerrain(true) |
| | | Viewer.scene.globe.depthTestAgainstTerrain = true; |
| | | if (is_production) { |
| | | var base_ulr = window.sceneConfig.baseUrl; |
| | | if (base_ulr.indexOf('{host}') > -1) { |
| | | base_ulr = base_ulr.replace("{host}", iisHost) |
| | | } |
| | | Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | | url: base_ulr, |
| | | maximumLevel: 9 |
| | | }) |
| | | ); |
| | | window.BaseMapLayer = Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | | url: base_ulr, |
| | | }) |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | var option = { |
| | | url: window.sceneConfig.SGUrl, |
| | |
| | | requestVertexNormals: true, |
| | | }; |
| | | window.terrainLayer = sgworld.Creator.sfsterrainprovider("", option, "", true, ""); |
| | | |
| | | window.terrainFlag = 'MPT' |
| | | window.elevationTool = new SmartEarth.ElevationTool(window.sgworld); |
| | | elevationTool.setContourColor("#F1D487"); |
| | | |
| | |
| | | window.terrainLayer = null; |
| | | |
| | | window.terrainLayer = new Cesium.CesiumTerrainProvider({ |
| | | url: LFData + '/3d/terrain/dem20230321' |
| | | // url: LFData + '/3d/terrain/dem20230321' |
| | | url: demLayer |
| | | }); |
| | | Viewer.terrainProvider = window.terrainLayer |
| | | Viewer.camera.flyTo({ |
| | |
| | | }, |
| | | //定位 |
| | | setCoordLocal() { |
| | | var lon = parseFloat(this.coordFrom.lon); |
| | | var lat = parseFloat(this.coordFrom.lat); |
| | | var height = parseFloat(this.coordFrom.height); |
| | | if (!this.coordFrom.lon) { |
| | | return this.$message('请输入经度'); |
| | | } |
| | | if (!this.coordFrom.lat) { |
| | | return this.$message('请输入纬度'); |
| | | } |
| | | var lon = parseFloat(this.coordFrom.lon) |
| | | var lat = parseFloat(this.coordFrom.lat) |
| | | var height = parseFloat(this.coordFrom.height) == NaN ? parseFloat(this.coordFrom.height) : 100; |
| | | |
| | | var position = { |
| | | X: lon, |
| | | Y: lat, |
| | | Altitude: 2000, |
| | | Altitude: height, |
| | | }; |
| | | if (this.imagePoint != null) { |
| | | sgworld.Creator.DeleteObject(this.imagePoint); |
| | |
| | | return |
| | | } |
| | | if (res.result.length <= 0) { |
| | | this.$message.error('暂无附件'); |
| | | this.$message('暂无附件'); |
| | | return |
| | | } |
| | | |