public/SmartEarthSDK/Workers/path/ProjectPath.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/Screen/ProjectTree.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/Screen/bottom.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/mapsdk.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/preview_map.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/Tools/LayerTree.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/Tools/ModelProperty.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/exportMap/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
public/SmartEarthSDK/Workers/path/ProjectPath.html
@@ -249,7 +249,7 @@ var fly = null; var sgworld = parent.sgworld; var routeData = parent.PathAnimationData.flyData; var url = parent.SmartEarthRootUrl + "Workers/Model/xiaoche.glb"; var url = parent.SmartEarthRootUrl + "Workers/Model/model.glb"; $('#start').hide(); $('#stop').show(); var form, element, slider; src/components/Screen/ProjectTree.vue
@@ -18,7 +18,6 @@ :data="treeData" show-checkbox node-key="id" default-expand-all :props="defaultProps" ref="tree" class="el-tree" @@ -138,6 +137,7 @@ std.push(3); this.$refs.tree.setCheckedKeys(std) } this.getWMSLayer(); }, async addImageLayer() { @@ -165,15 +165,9 @@ return str; } }) this.$refs.tree.setCheckedKeys(checkKey) var res = this.setTreeData(val); this.treeData = res this.setShowImageLayer(value) }, setTreeData(source) { @@ -215,7 +209,6 @@ // } if (data.type == 1) { this.childOption = []; this.getchilds(data); @@ -241,13 +234,13 @@ } } this.setShowWMSLayer(listWMS); this.getWMSLayer(); this.setShowTilesetLayer(listTileset); this.setShowMptLayer(listMpt); this.setShowTMSLayer(listTMS); } else if (data.type == 2) { if (data.serveType == "WMS") { this.setShowWMSLayer([data]); this.getWMSLayer(); } else if (data.serveType == "Tileset") { this.setShowTilesetLayer([data]); } else if (data.serveType == "Mpt") { @@ -494,6 +487,7 @@ setShowWMSLayer(res) { var url = []; this.setClearWmsLayer(); for (var i in res) { if (res[i].url) { url.push(res[i].url) @@ -601,6 +595,12 @@ margin: 10px; height: 85%; overflow-y: auto; /deep/ .tree-label { color: #eee !important; } /deep/ .el-tree { color: #eee !important; } } .changeBaseLayer { width: 100%; src/components/Screen/bottom.vue
@@ -208,8 +208,10 @@ }, computed: { currMenuList() { const menu = this.menuList.find(item => item.menuName == this.currMenu) const filterChildren = [] const value = this.searchName menu.children.forEach(item => { if (item.name && item.name.includes(value)) { @@ -281,7 +283,7 @@ } }, handleMenuClick(menu) { debugger this.currMenu = menu.menuName }, handlePopoverClick(child) { @@ -407,7 +409,9 @@ async getCountProjectTour() { const res = await countProjectTour() if (res.code === 200) { const menu = this.menuList.find(item => item.menuName == "工程巡视") menu.children = res.result.map(item => { return { name: item.projname, src/components/mapsdk.vue
@@ -656,7 +656,9 @@ select_Comprehensive_ByPageAndCount, select_Comprehensive_SelectWktById, comprehensive_selectRoute, dataLib_selectFiles, dataQuery_selectFields, dataQuery_selectDomains, dataQuery_selectByPage dataLib_selectFiles, dataQuery_selectFields, dataQuery_selectDomains, dataQuery_selectByPage, comprehensive_selectPubById, comprehensive_selectModelByGuid } from '../api/api' import { getToken } from '@/utils/auth' @@ -817,18 +819,50 @@ window.pickedFeature.color = Cesium.Color.RED.withAlpha(0.3); // this.$store.state.catModel = true; that.$store.state.catModelInfo = { id: pickedFeature.getProperty("id"), name: pickedFeature.getProperty("name"), layerId: pickedFeature.primitive.layerId, layerName: pickedFeature.primitive.id }; that.$refs && that.$refs.modelProperty && that.$refs.modelProperty.open(); that.setModelInfoData(window.pickedFeature); } } } }, 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 { modelKey = JSON.parse(data.result.json).modelid } if (!modelKey) { return this.$message('没有模型主键ID,无法查询数据'); } } var that = this var obj = { layerid: pickedFeature.primitive.layerId, modelid: pickedFeature.getProperty(modelKey) } const data1 = await comprehensive_selectModelByGuid(obj); if (data1.code != 200) { return; } that.$store.state.catModelInfo = { id: pickedFeature.getProperty(modelKey), name: data1.result.name, type: data1.result.type, bak: data1.result.bak, layerId: pickedFeature.primitive.layerId, layerName: pickedFeature.primitive.id }; that.$refs && that.$refs.modelProperty && that.$refs.modelProperty.open(); }, drawTerrainLevel() { this.clearTerrainLevel() var deep = parseFloat(this.terrainFrom.height) src/components/preview_map.vue
@@ -8,18 +8,29 @@ v-if="modelLayer" class="modelLayer box_divm" > <el-tree :data="treeData" show-checkbox node-key="id" ref="tree" :default-expanded-keys="[2, 3]" :default-checked-keys="[5]" :props="defaultProps" @node-click="handleNodeClick" @check="handleCheckChange" > </el-tree> <div class="modelBox"> <div style="float:right" :title="$t('synthesis.undergroundMode')" @click="setUndergroundMode" > <i class="el-icon-sunrise "></i> </div> </div> <div class="modelBox"> <el-tree :data="treeData" show-checkbox node-key="id" ref="tree" :default-expanded-keys="[2, 3]" :default-checked-keys="[5]" :props="defaultProps" @node-click="handleNodeClick" @check="handleCheckChange" > </el-tree> </div> </div> <div v-if="editModelFlag" @@ -54,9 +65,15 @@ 重载 </el-button> <el-button v-if="modelForm.modelid == null" size="small" @click="getModeKeyId" >模型主键</el-button> <el-button size="small" @click="resave" >保存</el-button> </el-form-item> <el-form-item label="经度:"> <el-input @@ -339,6 +356,37 @@ </div> </el-dialog> <div v-show="modelKeyFlag" class="modelLayer box_divm" v-drag > <el-form ref="form" :model="modelForm" label-width="80px" > <el-form-item label="主键ID"> <el-select v-model="modelLayerId"> <el-option v-for="item in optionKey" :key="item.value" :label="item.label" :value="item.value" > </el-option> </el-select> </el-form-item> <el-form-item> <el-button type="primary" size="small" @click="setSureKeyModelKey" >{{$t('common.confirm')}}</el-button> </el-form-item> </el-form> </div> <undergroundModel ref="undergroundModel" /> </div> </template> @@ -354,7 +402,12 @@ comprehensive_selectPubById } from '../api/api.js'; import { getToken } from '@/utils/auth'; import undergroundModel from '../views/Tools/undergroundModel.vue' export default { components: { undergroundModel }, data() { return { levelArray: [ @@ -420,20 +473,35 @@ lat: 39, height: 0, yaw: 0, alpha: 1 alpha: 1, modelid: null, }, app: { tileset: null, isBusy: false, under: false, handler: null } }, modelLayerId: null, optionKey: [], modelKeyFlag: false, } }, mounted() { this.init3DMap(); }, methods: { setUndergroundMode() { if (window.UndergroundMode) { this.$refs && this.$refs.undergroundModel && this.$refs.undergroundModel.close(); } else { this.$refs && this.$refs.undergroundModel && this.$refs.undergroundModel.open("地下模式", null,); } }, refreshAttatchDetail() { this.dialog.src = ""; this.dialog.dialogVisible = false; @@ -581,7 +649,7 @@ this.formInline.title = this.formInline.name that.dialogVisible = true; this.startModelData(); }, async InsertData() { var std = { @@ -605,7 +673,7 @@ that.dialogVisible = false; this.formInline.title = this.formInline.name that.dialogVisible = true; this.startModelData(); @@ -622,13 +690,30 @@ bak: '', Id: '' } this.activeName = "first" }, setShowModelInfo(result) { async setShowModelInfo(result) { var modelKey = 'id'; this.formInline.title = result.getProperty("name") this.formInline.Id = result.getProperty("id"); this.layerID = result.getProperty("id"); if (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,无法查询数据'); } } // this.formInline.title = result.getProperty("name") this.formInline.Id = result.getProperty(modelKey); this.layerID = result.getProperty(modelKey); this.formInline.layerId = result.primitive.layerId; this.formInline.layerName = result.primitive.id; this.startModelData(); @@ -697,6 +782,7 @@ tileset.readyPromise.then((tileset) => { tileset.id = res.cnName; tileset.layerId = res.id; tileset.pubid = res.pubid; that.getArgsTileset(tileset, res); }); } @@ -825,7 +911,6 @@ this.app.tileset = this.createTileset(res); var that = this; Viewer.scene.primitives.add(this.app.tileset).readyPromise.then(function (ts) { that.setModleLocatin() Viewer.flyTo(ts); }); @@ -842,7 +927,26 @@ } } }, getModeKeyId() { window.ModeKeyIdHandler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas); window.ModeKeyIdHandler.setInputAction((event) => { 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) { this.setModeLayerID(pickedFeature); } } } }, Cesium.ScreenSpaceEventType.LEFT_CLICK) }, async resave() { if (!this.modelForm.modelid) { return this.$message('未选择模型主键ID'); } this.$store.state.previewLayer.json = JSON.stringify(this.modelForm); const data = await publish_update(this.$store.state.previewLayer); @@ -980,15 +1084,37 @@ if (this.modelType.indexOf(type) != -1) { this.setEditModelLayer(res) } }, setModeLayerID(res) { var value = res.getPropertyNames(); var std = []; for (var i in value) { std.push({ value: value[i], label: value[i] }) } this.optionKey = std; this.modelLayerId = this.optionKey[0].label; this.modelKeyFlag = true; }, setSureKeyModelKey() { this.modelKeyFlag = false; this.modelForm.modelid = this.modelLayerId window.ModeKeyIdHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); //移除事件 }, getTilesetArgs() { this.app.isBusy = true; var cm = this.app.tileset._root.transform; var cartesian = new Cesium.Cartesian3(cm[12], cm[13], cm[14]); var carto = Cesium.Cartographic.fromCartesian(cartesian); this.modelForm.lon = Cesium.Math.toDegrees(carto.longitude).toFixed(7); this.modelForm.lat = Cesium.Math.toDegrees(carto.latitude).toFixed(7); this.modelForm.height = carto.height.toFixed(3); if (carto) { this.modelForm.lon = Cesium.Math.toDegrees(carto.longitude).toFixed(7); this.modelForm.lat = Cesium.Math.toDegrees(carto.latitude).toFixed(7); this.modelForm.height = carto.height.toFixed(3); } this.app.isBusy = false; }, @@ -1011,15 +1137,18 @@ this.treeData = res; this.modelLayer = true; var that = this; var pickedFeature, pickedColor; window.modeCatchHandler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas); window.modeCatchHandler.setInputAction((event) => { 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) { window.pickedColor = window.pickedFeature.color window.pickedFeature.color = Cesium.Color.RED.withAlpha(0.3); if (pickedColor) { pickedFeature && (pickedFeature.color = pickedColor); } pickedFeature = sgworld.Viewer.scene.pick(event.position); if (Cesium.defined(pickedFeature)) { if (pickedFeature.primitive instanceof Cesium.Cesium3DTileset) { if (pickedFeature && pickedFeature.getProperty) { pickedColor = pickedFeature.color pickedFeature.color = Cesium.Color.RED.withAlpha(0.3); that.setShowModelInfo(pickedFeature); } } @@ -1076,11 +1205,25 @@ margin: 10px; max-height: 600px; overflow: auto; .modelBox { width: 100%; min-height: 24px; } } .pdfClass { height: 70vh; width: 100%; position: relative; } .el-icon-sunrise { background: url("../assets/img/synthesis/images/3白底_157.png") center center no-repeat; background-size: 24px; } .el-icon-sunrise:before { content: "11"; visibility: hidden; } } </style> src/views/Tools/LayerTree.vue
@@ -837,6 +837,7 @@ tileset.readyPromise.then((tileset) => { tileset.id = res.cnName; tileset.layerId = res.id; tileset.pubid = res.pubid; this.getTilesetArgs(tileset, res); // src/views/Tools/ModelProperty.vue
@@ -130,7 +130,7 @@ <script> import Popup from "./Popup"; import { comprehensive_selectFiles } from '../../api/api.js' import { comprehensive_selectFiles, comprehensive_selectModelByGuid } from '../../api/api.js' import { getToken } from "@/utils/auth"; export default { @@ -182,13 +182,17 @@ !isCloseBtn && this.$refs.pop.close(); }, // 打开弹窗 open() { async open() { this.close(true); this.$refs.pop.open(); this.title = this.$store.state.catModelInfo.name; this.formInline = this.$store.state.catModelInfo; }, // changeToken(token) { // this.mapCollection.tokne = token; // }, src/views/exportMap/index.vue
@@ -694,14 +694,14 @@ url: "http://wprd01.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=6", }), }) var GaoDeTitle = new TileLayer({ source: new XYZ({ url: "http://wprd01.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=8", }), }) // var GaoDeTitle = new TileLayer({ // source: new XYZ({ // url: "http://wprd01.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=8", // }), // }) window.mapView = new Map({ target: "mapView", layers: [TiandiLayer, GaoDeLayer, GaoDeTitle], layers: [TiandiLayer, GaoDeLayer], view: new View({ center: transform([105.02, 34.9], "EPSG:4326", "EPSG:3857"), zoom: 4, @@ -722,11 +722,11 @@ setLayerVisible() { if (this.isActive == true) { mapView.getLayers().item(1).setVisible(false) mapView.getLayers().item(2).setVisible(false) // mapView.getLayers().item(2).setVisible(false) mapView.getLayers().item(0).setVisible(true) } else { mapView.getLayers().item(1).setVisible(true) mapView.getLayers().item(2).setVisible(true) // mapView.getLayers().item(2).setVisible(true) mapView.getLayers().item(0).setVisible(false) } },