From 28bd61701bb409257ea0dd3c78f32bd0b45ebbd5 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期一, 06 三月 2023 09:16:35 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.20.39:8989/r/LFWEB_NEW --- src/views/Synthesis/LeftMenu.vue | 110 +++++++++++++++++++++++++++++++++---------------------- 1 files changed, 66 insertions(+), 44 deletions(-) diff --git a/src/views/Synthesis/LeftMenu.vue b/src/views/Synthesis/LeftMenu.vue index 0df451e..baf9642 100644 --- a/src/views/Synthesis/LeftMenu.vue +++ b/src/views/Synthesis/LeftMenu.vue @@ -15,6 +15,7 @@ <mapinfo ref="mapinfo" /> <maplayer ref="maplayer" /> <queryinfo ref="queryinfo" /> + <terrainDig ref="terrainDig" /> <input type="file" accept=".kml" @@ -39,6 +40,7 @@ import mapinfo from "../Tools/mapinfo.vue"; import maplayer from "../Tools/maplayer.vue"; import queryinfo from "../Tools/queryinfo.vue"; +import terrainDig from "../Tools/terrainDig.vue"; import $ from "jquery"; import { getToken } from "@/utils/auth"; import ImageWMS from "ol/source/ImageWMS"; @@ -58,7 +60,7 @@ import { geometry } from "@turf/turf"; export default { - components: { mapinfo, maplayer, queryinfo }, + components: { mapinfo, maplayer, queryinfo, terrainDig }, data() { return { showTwoMenuFlag: false, @@ -1171,6 +1173,12 @@ break; case "d2": //鍧″害鍒嗘瀽 that.isslopeFlag = !that.isslopeFlag; + var val = { + name: "Lengend", + id: res, + vshow: that.isslopeFlag + }; + this.$bus.$emit("mapChangeBox", val); window.PDelevationTool = new SmartEarth.ElevationTool(sgworld); //鍏ㄥ眬鍙橀噺 if (that.isslopeFlag == true) { PDelevationTool.type = "slope"; @@ -1179,6 +1187,7 @@ PDelevationTool.type = "none"; } PDelevationTool.render(); + break; case "d3": //璺緞鍒嗘瀽 @@ -1298,52 +1307,64 @@ } break; case "d10": //鍦伴潰鏁村钩 - if (this.DXZPState != null) { - this.DXZPState.drawHandler && this.DXZPState.drawHandler.destroy(); - Viewer._container.style.cursor = "default"; - this.DXZPState.tooltip && this.DXZPState.tooltip.show(false); - if (window.DXTerrainFlattening != null) { - DXTerrainFlattening.remove(); - } - window.DXTerrainFlattening = null; - this.DXZPState = null; - } else { - this.DXZPState = sgworld.Creator.createSimpleGraphic( - "polygon", - { - clampToGround: true, - }, - function (entity) { - let positions = entity.polygon.hierarchy.getValue().positions; - sgworld.Creator.SimpleGraphic.remove(entity.id); - window.DXTerrainFlattening = - sgworld.Creator.createTerrainModifier( - "鍦板舰鍘嬪钩", - positions, - 10, - {} - ); - } - ); - } + var val = { + name: "Trrain", + id: res, + }; + this.$bus.$emit("mapChangeBox", val); + // if (this.DXZPState != null) { + // this.DXZPState.drawHandler && this.DXZPState.drawHandler.destroy(); + // Viewer._container.style.cursor = "default"; + // this.DXZPState.tooltip && this.DXZPState.tooltip.show(false); + // if (window.DXTerrainFlattening != null) { + // DXTerrainFlattening.remove(); + // } + // window.DXTerrainFlattening = null; + // this.DXZPState = null; + // } else { + // this.DXZPState = sgworld.Creator.createSimpleGraphic( + // "polygon", + // { + // clampToGround: true, + // }, + // function (entity) { + // let positions = entity.polygon.hierarchy.getValue().positions; + // sgworld.Creator.SimpleGraphic.remove(entity.id); + // window.DXTerrainFlattening = + // sgworld.Creator.createTerrainModifier( + // "鍦板舰鍘嬪钩", + // positions, + // 10, + // {} + // ); + // } + // ); + // } break; case "d11": //鍦板舰寮�鎸� - if (window.Excavation) { - window.Excavation.drawHandler && - window.Excavation.drawHandler.destroy(); - Viewer._container.style.cursor = "default"; - window.Excavation.tooltip && window.Excavation.tooltip.show(false); - window.Excavation.clear(); - window.Excavation = null; - } else { - window.Excavation = sgworld.Analysis.TerrainExcavation( - 10, - {}, - function () { } - ); - } + this.$refs && + this.$refs.terrainDig && + this.$refs.terrainDig.open("绠¢亾绌洪棿鍒嗘瀽", null, { + close: () => { + + }, + }); + // if (window.Excavation) { + // window.Excavation.drawHandler && + // window.Excavation.drawHandler.destroy(); + // Viewer._container.style.cursor = "default"; + // window.Excavation.tooltip && window.Excavation.tooltip.show(false); + // window.Excavation.clear(); + // window.Excavation = null; + // } else { + // window.Excavation = sgworld.Analysis.TerrainExcavation( + // 10, + // {}, + // function () { } + // ); + // } break; case "d12": //閫氳鍒嗘瀽 @@ -1438,7 +1459,7 @@ pointSelect: true, spood: 20, GroupID: 0, - url: "/SmartEarthSDK/Workers/image/waterNormals.jpg", + url: "/SmartEarthSDK/Workers/image/33.gif", }; window.AnalysisFlood = sgworld.Command.execute( 2, @@ -1794,6 +1815,7 @@ .menu_Box { width: 100%; height: 100%; + margin: 0; padding: 0; overflow-y: auto; -- Gitblit v1.9.3