| | |
| | | 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> |
| | |
| | | <div |
| | | class="changeTerrain" |
| | | @click="changeTerrainLayer" |
| | | style=" position: absolute; |
| | | bottom: 84px; |
| | | right: 46px; |
| | | height: 30px; |
| | | width: 30px; |
| | | z-index: 101; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | cursor: pointer; |
| | | border: 1px solid rgba(255, 255, 255, 0.5);" |
| | | > |
| | | <div |
| | | title="地形切换" |
| | |
| | | <div |
| | | @click="changeMenulayer" |
| | | class="changeLayer" |
| | | style=" position: absolute; |
| | | bottom: 116px; |
| | | right: 46px; |
| | | height: 30px; |
| | | width: 30px; |
| | | z-index: 101; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | cursor: pointer; |
| | | border: 1px solid rgba(255, 255, 255, 0.5);" |
| | | > |
| | | <div |
| | | title="底图切换" |
| | |
| | | <div |
| | | @click="changeMapType" |
| | | class="changeMapType" |
| | | style=" position: absolute; |
| | | bottom: 52px; |
| | | right: 46px; |
| | | height: 30px; |
| | | width: 30px; |
| | | z-index: 101; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | cursor: pointer; |
| | | border: 1px solid rgba(255, 255, 255, 0.5);" |
| | | > |
| | | <div |
| | | title="2/3维切换" |
| | |
| | | <!-- v-bind:class="{ active: isActive, menuLayer: isMenuLayer }"--> |
| | | <!-- ></div>--> |
| | | <!-- </div>--> |
| | | |
| | | <el-dialog |
| | | title="瓦片下载" |
| | | :append-to-body="false" |
| | | :visible.sync="downTitleFlag" |
| | | :close-on-click-modal="false" |
| | | :show-close="false" |
| | | width="30%" |
| | | > |
| | | <el-form |
| | | :model="ruleForm" |
| | | status-icon |
| | | :rules="rules" |
| | | ref="ruleForm" |
| | | label-width="100px" |
| | | class="demo-ruleForm" |
| | | > |
| | | <el-form-item |
| | | label="名称" |
| | | prop="title" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.title" |
| | | size="small" |
| | | placeholder="请输入数据名称..." |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="密码" |
| | | prop="pass" |
| | | > |
| | | <el-input |
| | | show-password |
| | | type="password" |
| | | v-model="ruleForm.pass" |
| | | autocomplete="off" |
| | | size="small" |
| | | placeholder="请输入密码..." |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="确认密码" |
| | | prop="checkPass" |
| | | > |
| | | <el-input |
| | | show-password |
| | | type="password" |
| | | v-model="ruleForm.checkPass" |
| | | autocomplete="off" |
| | | size="small" |
| | | placeholder="确认密码..." |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | @click='submitTitleDown("ruleForm")' |
| | | >提交</el-button> |
| | | <el-button |
| | | size="small" |
| | | @click='cannelTitleDown("ruleForm")' |
| | | >取消</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-dialog> |
| | | </div> |
| | | <model-property ref='modelProperty'></model-property> |
| | | <iframe |
| | | id="downFrame" |
| | | src="" |
| | | style="display: none; border: 0; padding: 0; height: 0; width: 0" |
| | | ></iframe> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | select_Comprehensive_SelectWktById, |
| | | comprehensive_selectRoute, |
| | | dataLib_selectFiles, dataQuery_selectFields, dataQuery_selectDomains, |
| | | dataQuery_selectByPage, |
| | | dataQuery_selectByPage, sign_getPublicKey, inquiry_downloadTiles, |
| | | comprehensive_selectPubById, comprehensive_selectModelByGuid |
| | | } from '../api/api' |
| | | import { getToken } from '@/utils/auth' |
| | |
| | | val: 50, |
| | | }, |
| | | coordFrom: { |
| | | lon: 116.3911, |
| | | lat: 39.9115, |
| | | height: 100000, |
| | | lon: "", |
| | | lat: "", |
| | | height: "", |
| | | }, |
| | | listData: { |
| | | name: null, |
| | |
| | | valueX: 0, |
| | | valueY: 0, |
| | | terrainflag: false, |
| | | downTitleFlag: false, |
| | | downTitleData: null, |
| | | ruleForm: { |
| | | pass: '', |
| | | checkPass: '', |
| | | title: '' |
| | | }, |
| | | loadingText: '', |
| | | loading: false |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | } |
| | | }); |
| | | //模型捕捉 |
| | | this.catchmodel() |
| | | this.catchmodel(); |
| | | this.$bus.$on("titleDown", res => { |
| | | this.setDownLoadTitle(res); |
| | | }); |
| | | |
| | | window.localStorage.setItem('slider_x', this.valueX); |
| | | window.localStorage.setItem('slider_y', this.valueY); |
| | | window.localStorage.setItem('slider_z', this.valueZ); |
| | | }, |
| | | methods: { |
| | | |
| | | setDownLoadTitle(res) { |
| | | this.signGetPublicKey() |
| | | this.downTitleFlag = true; |
| | | this.downTitleData = res; |
| | | }, |
| | | async signGetPublicKey() { |
| | | const res = await sign_getPublicKey() |
| | | if (res && res.code == 200) { |
| | | window.encrypt = new JSEncrypt(); |
| | | encrypt.setPublicKey(res.result); |
| | | } |
| | | }, |
| | | submitTitleDown(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.downTitleData.title = this.ruleForm.title |
| | | // this.downTitleData.pwd = encr(this.ruleForm.pass) |
| | | this.downTitleData.pwd = encrypt.encrypt(this.ruleForm.pass) |
| | | this.getDownLoadTile(this.downTitleData); |
| | | this.cannelTitleDown(); |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | async getDownLoadTile(res) { |
| | | this.loading = true; |
| | | this.loadingText = "数据下载中,请稍等..." |
| | | $.ajax({ |
| | | url: BASE_URL + "/inquiry/downloadTiles?token=" + getToken(), |
| | | type: "POST", |
| | | data: JSON.stringify(res), |
| | | dataType: 'json', // html、json、jsonp、script、text |
| | | contentType: "application/json", // "application/x-www-form-urlencoded" |
| | | success: (data) => { |
| | | var token = getToken() |
| | | var url = BASE_URL + "/dataLib/downloadFile?token=" + token + "&guid=" + data.result + "&pwd=" + res.pwd; |
| | | $("#downFrame").attr("src", url).click(); |
| | | this.loading = false; |
| | | this.loadingText = "" |
| | | }, |
| | | error: function (e) { |
| | | } |
| | | }); |
| | | }, |
| | | cannelTitleDown(formName) { |
| | | this.downTitleFlag = false; |
| | | // this.$refs[formName].resetFields(); |
| | | this.ruleForm = { |
| | | pass: '', |
| | | checkPass: '', |
| | | title: '' |
| | | } |
| | | }, |
| | | catchmodel() { |
| | | var that = this; |
| | | window.pickedFeature; |
| | | 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'; |
| | | var modelid; |
| | | if (result.tileset) { |
| | | if (result.tileset.pubid && parseInt(result.tileset.pubid) > 0) { |
| | | |
| | | modelKey = JSON.parse(data.result.json).modelid |
| | | 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, |
| | |
| | | layerName: pickedFeature.primitive.id |
| | | }; |
| | | that.$refs && that.$refs.modelProperty && that.$refs.modelProperty.open(); |
| | | |
| | | }, |
| | | |
| | | |
| | | drawTerrainLevel() { |
| | | this.clearTerrainLevel() |
| | | var deep = parseFloat(this.terrainFrom.height) |
| | |
| | | |
| | | licenseServer: window.sceneConfig.licenseServer, |
| | | }); |
| | | |
| | | |
| | | window.Viewer = window.sgworld._Viewer; |
| | | |
| | | if (is_production) { |
| | |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | var option = { |
| | | url: window.sceneConfig.SGUrl, |
| | | layerName: window.sceneConfig.mptName, |
| | | requestVertexNormals: true, |
| | | }; |
| | | window.terrainLayer = sgworld.Creator.sfsterrainprovider("", option, "", true, ""); |
| | | |
| | | window.terrainFlag = 'MPT' |
| | | window.elevationTool = new SmartEarth.ElevationTool(window.sgworld); |
| | | elevationTool.setContourColor("#F1D487"); |
| | | |
| | | |
| | | }, |
| | | //dem切换 |
| | | changeTerrainLayer() { |
| | |
| | | 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({ |
| | |
| | | roll: 0.0 |
| | | } |
| | | }); |
| | | |
| | | } |
| | | this.terrainflag = !this.terrainflag |
| | | }, |
| | |
| | | }, |
| | | //定位 |
| | | 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); |
| | |
| | | } |
| | | |
| | | if (!data.result.length) { |
| | | this.$message.error("未查询到勘探信息数据"); |
| | | this.$message("未查询到勘探信息数据"); |
| | | return |
| | | } |
| | | this.showAttribute = !this.showAttribute; |
| | |
| | | // cursor: pointer; |
| | | //} |
| | | .changeTerrain { |
| | | position: absolute; |
| | | bottom: 84px; |
| | | right: 46px; |
| | | height: 30px; |
| | | width: 30px; |
| | | z-index: 101; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | cursor: pointer; |
| | | border: 1px solid rgba(255, 255, 255, 0.5); |
| | | } |
| | | .changeLayer { |
| | | position: absolute; |
| | | bottom: 116px; |
| | | right: 46px; |
| | | height: 30px; |
| | | width: 30px; |
| | | z-index: 101; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | cursor: pointer; |
| | | border: 1px solid rgba(255, 255, 255, 0.5); |
| | | } |
| | | .changeMapType { |
| | | position: absolute; |
| | | bottom: 52px; |
| | | right: 46px; |
| | | height: 30px; |
| | | width: 30px; |
| | | z-index: 101; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | cursor: pointer; |
| | | border: 1px solid rgba(255, 255, 255, 0.5); |
| | | } |
| | | //.changeTerrain { |
| | | // position: absolute; |