Compare commits
	
		
			3 Commits
		
	
	
		
			aae8ef570f
			...
			8a00eaa98c
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 8a00eaa98c | |||
| 00a82aa6e2 | |||
| a248f3ebe7 | 
										
											Binary file not shown.
										
									
								
							| @ -490,23 +490,28 @@ const methodMap = { | ||||
|   }, | ||||
|   //淹没分析 | ||||
|   inundationAnalysis() { | ||||
|     eventBus.emit('submergeDialog') | ||||
|     // eventBus.emit('submergeDialog') | ||||
|     eventBus.emit('openDialog', 'submergeDialog') | ||||
|   }, | ||||
|   //剖面分析 | ||||
|   profileAnalysis() { | ||||
|     eventBus.emit('profileDialog') | ||||
|     // eventBus.emit('profileDialog') | ||||
|     eventBus.emit('openDialog', 'profileDialog') | ||||
|   }, | ||||
|   // 视线分析 | ||||
|   sightAnalysis() { | ||||
|     eventBus.emit('analysisDialog') | ||||
|     // eventBus.emit('analysisDialog') | ||||
|     eventBus.emit('openDialog', 'analysisDialog') | ||||
|   }, | ||||
|   //视域分析 | ||||
|   kenAnalysis() { | ||||
|     eventBus.emit('viewShedDialog') | ||||
|     // eventBus.emit('viewShedDialog') | ||||
|     eventBus.emit('openDialog', 'viewShedDialog') | ||||
|   }, | ||||
|   //圆形视域分析 | ||||
|   circleKen() { | ||||
|     eventBus.emit('circleViewShedDialog') | ||||
|     // eventBus.emit('circleViewShedDialog') | ||||
|     eventBus.emit('openDialog', 'circleViewShedDialog') | ||||
|   }, | ||||
|   //坡向分析 | ||||
|   slopeDirection() { | ||||
| @ -514,11 +519,13 @@ const methodMap = { | ||||
|   }, | ||||
|   // 填挖方分析 | ||||
|   cutFill() { | ||||
|     eventBus.emit('cutFillDialog') | ||||
|     // eventBus.emit('cutFillDialog') | ||||
|     eventBus.emit('openDialog', 'cutFillDialog') | ||||
|   }, | ||||
|   //全局等高线分析 | ||||
|   globalContour() { | ||||
|     eventBus.emit('contourDialog') | ||||
|     // eventBus.emit('contourDialog') | ||||
|     eventBus.emit('openDialog', 'contourDialog') | ||||
|   }, | ||||
|   //等高线分析 | ||||
|   contour() { | ||||
| @ -536,7 +543,8 @@ const methodMap = { | ||||
|   //----------------工具------------------ | ||||
|   //路径规划 | ||||
|   routePlan() { | ||||
|     eventBus.emit('routePlanningDialog') | ||||
|     // eventBus.emit('routePlanningDialog') | ||||
|     eventBus.emit('openDialog', 'routePlanningDialog') | ||||
|   }, | ||||
|   //路径清除 | ||||
|   clearRoute() { | ||||
| @ -544,7 +552,8 @@ const methodMap = { | ||||
|   }, | ||||
|   //涂鸦 | ||||
|   graffiti() { | ||||
|     eventBus.emit('graffitiDialog') | ||||
|     // eventBus.emit('graffitiDialog') | ||||
|     eventBus.emit('openDialog', 'graffitiDialog') | ||||
|   }, | ||||
|   //涂鸦清除 | ||||
|   clearGraffiti() { | ||||
| @ -554,11 +563,13 @@ const methodMap = { | ||||
|   }, | ||||
|   //漫游 | ||||
|   roam() { | ||||
|     eventBus.emit('flyRoamDialog') | ||||
|     // eventBus.emit('flyRoamDialog') | ||||
|     eventBus.emit('openDialog', 'flyRoamDialog') | ||||
|   }, | ||||
|   //坐标定位 | ||||
|   coorLocation() { | ||||
|     eventBus.emit('coorLocationDialog') | ||||
|     // eventBus.emit('coorLocationDialog') | ||||
|     eventBus.emit('openDialog', 'coorLocationDialog') | ||||
|   }, | ||||
|   //鼠标定位 | ||||
|   mouseLocation() { | ||||
| @ -642,8 +653,9 @@ const methodMap = { | ||||
|   }, | ||||
|   //高清出图 | ||||
|   highQuality() { | ||||
|     eventBus.emit('screenShotDialog') | ||||
|     // eventBus.emit('screenShotDialog') | ||||
|     // YJ.Global.ScreenShotHD(window.earth) | ||||
|     eventBus.emit('openDialog', 'screenShotDialog') | ||||
|   }, | ||||
|   //视频录制 | ||||
|   videoRecord() { | ||||
| @ -757,7 +769,8 @@ const methodMap = { | ||||
|   terrainDig() { | ||||
|     if ((window as any).checkAuthIsValid) { | ||||
|       // new YJ.Analysis.TerrainExcavation(window.Earth1); | ||||
|       eventBus.emit('terrainExcavationDialog') | ||||
|       // eventBus.emit('terrainExcavationDialog') | ||||
|       eventBus.emit('openDialog', 'terrainExcavationDialog') | ||||
|     } else { | ||||
|       ElMessage({ | ||||
|         message: '您没有该功能的权限', | ||||
| @ -804,11 +817,13 @@ const methodMap = { | ||||
|   }, | ||||
|   //度分秒 | ||||
|   projConvert() { | ||||
|     eventBus.emit('projConvertDialog') | ||||
|     // eventBus.emit('projConvertDialog') | ||||
|     eventBus.emit('openDialog', 'projConvertDialog') | ||||
|   }, | ||||
|   //投影转换 | ||||
|   projectionConvert() { | ||||
|     eventBus.emit('ProjectionConvertDialog') | ||||
|     // eventBus.emit('ProjectionConvertDialog') | ||||
|     eventBus.emit('openDialog', 'ProjectionConvertDialog') | ||||
|   }, | ||||
|   //GDB导入 | ||||
|   gdbImport() { | ||||
| @ -871,7 +886,8 @@ const methodMap = { | ||||
|   //圆形统计 | ||||
|   circleStatistics() { | ||||
|     if ((window as any).checkAuthIsValid) { | ||||
|       eventBus.emit('goodsSearchCircleDialog') | ||||
|       // eventBus.emit('goodsSearchCircleDialog') | ||||
|       eventBus.emit('openDialog', 'goodsSearchCircleDialog') | ||||
|     } else { | ||||
|       ElMessage({ | ||||
|         message: '您没有该功能的权限', | ||||
| @ -882,7 +898,8 @@ const methodMap = { | ||||
|   //多边形统计 | ||||
|   polygonStatistics() { | ||||
|     if ((window as any).checkAuthIsValid) { | ||||
|       eventBus.emit('goodsSearchPolgonDialog') | ||||
|       // eventBus.emit('goodsSearchPolgonDialog') | ||||
|       eventBus.emit('openDialog', 'goodsSearchPolgonDialog') | ||||
|     } else { | ||||
|       ElMessage({ | ||||
|         message: '您没有该功能的权限', | ||||
|  | ||||
| @ -65,7 +65,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive, onMounted } from 'vue' | ||||
| import { ref, reactive, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import Dialog from '@/components/dialog/baseDialog.vue' | ||||
|  | ||||
| @ -82,11 +82,21 @@ eventBus.on('circleViewShedDialog', () => { | ||||
|     precision: precision.value | ||||
|   }) | ||||
| }) | ||||
| const open = () => { | ||||
|   baseDialog.value?.open() | ||||
|   visibility = new YJ.Analysis.CircleViewShed(window.earth, { | ||||
|     viewPointHeight: viewPointHeight.value, | ||||
|     precision: precision.value | ||||
|   }) | ||||
| } | ||||
| const closeCallBack = (e) => { | ||||
|   viewPointHeight.value = 1.8 | ||||
|   precision.value = 20 | ||||
|   YJ.Measure.SetMeasureStatus(false) | ||||
| } | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
|  | ||||
| const viewPointHeightChange = () => { | ||||
|   visibility.viewPointHeights = viewPointHeight.value | ||||
| @ -118,6 +128,9 @@ const draw = (e) => { | ||||
|   // !window.analysisArr && (window.analysisArr = []) | ||||
|   // window.analysisArr.push(visibility) | ||||
| } | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"></style> | ||||
|  | ||||
| @ -152,7 +152,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive, onMounted } from 'vue' | ||||
| import { ref, reactive, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import Dialog from '@/components/dialog/baseDialog.vue' | ||||
|  | ||||
| @ -166,10 +166,19 @@ eventBus.on('contourDialog', () => { | ||||
|     YJ.Global.Contour(window.earth) | ||||
|   }) | ||||
| }) | ||||
| const open = () => { | ||||
|   baseDialog.value?.open() | ||||
|   setTimeout(() => { | ||||
|     YJ.Global.Contour(window.earth) | ||||
|   }) | ||||
| } | ||||
| const closeCallBack = (e) => { | ||||
|   YJ.Global.ContourReset() | ||||
|   show.value = true | ||||
| } | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| const close = (e) => { | ||||
|   baseDialog.value?.close() | ||||
| } | ||||
| @ -177,6 +186,9 @@ const sure = (e) => { | ||||
|   YJ.Global.ContourStartDraw(window.earth, show.value) | ||||
|   baseDialog.value?.close() | ||||
| } | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"></style> | ||||
|  | ||||
| @ -124,7 +124,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive } from 'vue' | ||||
| import { ref, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import Dialog from '@/components/dialog/baseDialog.vue' | ||||
| import { addMapSource } from '../../../common/addMapSource' | ||||
| @ -149,6 +149,10 @@ eventBus.on('coorLocationDialog', () => { | ||||
|   id.value = new YJ.Tools().randomString() | ||||
|   baseDialog.value?.open() | ||||
| }) | ||||
| const open = () => { | ||||
|   id.value = new YJ.Tools().randomString() | ||||
|   baseDialog.value?.open() | ||||
| } | ||||
|  | ||||
| // @ts-ignore (define in dts) | ||||
| const handleClick = (tab: TabsPaneContext, event: Event) => { | ||||
| @ -168,6 +172,9 @@ const closeCallBack = (e) => { | ||||
|   latSec.value = null | ||||
|   activeName.value = 'first' | ||||
| } | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| const turnToPosition = async () => { | ||||
|   let position | ||||
|   switch (activeName.value) { | ||||
| @ -312,6 +319,9 @@ const draw = async (e) => { | ||||
| const close = (e) => { | ||||
|   baseDialog.value?.close() | ||||
| } | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
|  | ||||
| @ -108,7 +108,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive } from 'vue' | ||||
| import { ref, reactive, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import Dialog from '@/components/dialog/baseDialog.vue' | ||||
|  | ||||
| @ -133,7 +133,13 @@ eventBus.on('cutFillDialog', () => { | ||||
|     precision: precision.value | ||||
|   }) | ||||
| }) | ||||
|  | ||||
| const open = () => { | ||||
|   baseDialog.value?.open() | ||||
|   cutFill = new YJ.Analysis.CutFillAnalysis(window.earth, { | ||||
|     height: height.value, | ||||
|     precision: precision.value | ||||
|   }) | ||||
| } | ||||
| const heightInput = () => { | ||||
|   let dom: any = document.getElementById('height') | ||||
|   if (height.value < dom.min * 1) { | ||||
| @ -166,6 +172,9 @@ const closeCallBack = (e) => { | ||||
|   YJ.Measure.SetMeasureStatus(false) | ||||
|   // visibility && visibility.end() | ||||
| } | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| function close() { | ||||
|   baseDialog.value?.close() | ||||
| } | ||||
| @ -182,6 +191,9 @@ const draw = (e) => { | ||||
|     cutVolume.value = cutFill.cutVolume | ||||
|   } | ||||
| } | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"></style> | ||||
|  | ||||
| @ -172,7 +172,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive } from 'vue' | ||||
| import { ref, reactive, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import Dialog from '@/components/dialog/baseDialog.vue' | ||||
| import { app } from 'electron' | ||||
| @ -195,6 +195,13 @@ eventBus.on('flyRoamDialog', () => { | ||||
|     flyRoam = YJ.Global.FlyRoam.open(window.earth, { repeat: Infinity }, {}, draw) | ||||
|   }, 100) | ||||
| }) | ||||
| const open = () => { | ||||
|   show.value = true | ||||
|   baseDialog.value?.open() | ||||
|   setTimeout(() => { | ||||
|     flyRoam = YJ.Global.FlyRoam.open(window.earth, { repeat: Infinity }, {}, draw) | ||||
|   }, 100) | ||||
| } | ||||
| const draw = (data) => { | ||||
|   if (data.points.length != 0) { | ||||
|     let selectedNodes = window.treeObj.getSelectedNodes() | ||||
| @ -244,6 +251,9 @@ const closeCallBack = (e) => { | ||||
|   YJ.Global.FlyRoam.cease(window.earth) | ||||
|   YJ.Global.FlyRoam.close() | ||||
| } | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| const apply = (e) => { | ||||
|   YJ.Global.FlyRoam.apply() | ||||
| } | ||||
| @ -251,6 +261,10 @@ const close = (e) => { | ||||
|   show.value = false | ||||
|   baseDialog.value?.close() | ||||
| } | ||||
|  | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
|  | ||||
| @ -17,7 +17,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive } from 'vue' | ||||
| import { ref, reactive, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import { nextTick } from 'vue' | ||||
| import { ElMessage } from 'element-plus' | ||||
| @ -53,7 +53,6 @@ var draw: any = reactive([]) | ||||
|  | ||||
| var show: any = ref(false) | ||||
| eventBus.on('goodsSearchCircleDialog', () => { | ||||
|   console.log('kkkkkk') | ||||
|   // baseDialog.value?.open() | ||||
|   draw = new YJ.Draw.DrawCircle(window.earth) | ||||
|   draw.start((err, positions) => { | ||||
| @ -67,6 +66,19 @@ eventBus.on('goodsSearchCircleDialog', () => { | ||||
|   }) | ||||
| }) | ||||
|  | ||||
| const open = () => { | ||||
|   draw = new YJ.Draw.DrawCircle(window.earth) | ||||
|   draw.start((err, positions) => { | ||||
|     console.log('err, positions', err, positions) | ||||
|     if (!err && positions.center.lng) { | ||||
|       show.value = true | ||||
|       let nodes = booleanOverlaps(positions) | ||||
|       console.log('goodsSearchCircle', nodes) | ||||
|       renderCanvas(nodes) | ||||
|     } | ||||
|   }) | ||||
| } | ||||
|  | ||||
| function booleanOverlaps(positions1, flag = 'circle') { | ||||
|   let cross = undefined | ||||
|   function set3Array(positions) { | ||||
| @ -104,9 +116,9 @@ function booleanOverlaps(positions1, flag = 'circle') { | ||||
|         let distance = new YJ.Tools().randomString(center, { lng, lat }) | ||||
|         distance < radius && itemInArea.push(item) | ||||
|       } else { | ||||
|         let polygon1 = (window as any).turf.polygon([set3Array(positions1)]); | ||||
|         let pt = (window as any).turf.point([lng, lat]); | ||||
|         (window as any).turf.booleanPointInPolygon(pt, polygon1) && itemInArea.push(item) | ||||
|         let polygon1 = (window as any).turf.polygon([set3Array(positions1)]) | ||||
|         let pt = (window as any).turf.point([lng, lat]) | ||||
|         ;(window as any).turf.booleanPointInPolygon(pt, polygon1) && itemInArea.push(item) | ||||
|       } | ||||
|     } | ||||
|     console.log(item, item.sourceType, 'ooooo') | ||||
| @ -335,6 +347,12 @@ function renderCanvas(nodes) { | ||||
| } | ||||
|  | ||||
| const closeCallBack = (e) => {} | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"></style> | ||||
|  | ||||
| @ -17,7 +17,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive } from 'vue' | ||||
| import { ref, reactive, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import { nextTick } from 'vue' | ||||
| import { ElMessage } from 'element-plus' | ||||
| @ -63,6 +63,17 @@ eventBus.on('goodsSearchPolgonDialog', () => { | ||||
|   }) | ||||
| }) | ||||
|  | ||||
| const open = () => { | ||||
|   draw = new YJ.Draw.DrawPolygon(window.earth) | ||||
|   draw.start((err, params) => { | ||||
|     if (!err && params.length > 2) { | ||||
|       show.value = true | ||||
|       let nodes = booleanOverlaps(params, 'polygon') | ||||
|       renderCanvas(nodes) | ||||
|     } | ||||
|   }) | ||||
| } | ||||
|  | ||||
| function booleanOverlaps(positions1, flag = 'circle') { | ||||
|   let cross = undefined | ||||
|   function set3Array(positions) { | ||||
| @ -97,9 +108,9 @@ function booleanOverlaps(positions1, flag = 'circle') { | ||||
|         let distance = new YJ.Tools().randomString(center, { lng, lat }) | ||||
|         distance < radius && itemInArea.push(item) | ||||
|       } else { | ||||
|         let polygon1 = (window as any).turf.polygon([set3Array(positions1)]); | ||||
|         let pt = (window as any).turf.point([lng, lat]); | ||||
|         (window as any).turf.booleanPointInPolygon(pt, polygon1) && itemInArea.push(item) | ||||
|         let polygon1 = (window as any).turf.polygon([set3Array(positions1)]) | ||||
|         let pt = (window as any).turf.point([lng, lat]) | ||||
|         ;(window as any).turf.booleanPointInPolygon(pt, polygon1) && itemInArea.push(item) | ||||
|       } | ||||
|     } | ||||
|     switch (item.sourceType) { | ||||
| @ -323,6 +334,12 @@ function renderCanvas(nodes) { | ||||
| } | ||||
|  | ||||
| const closeCallBack = (e) => {} | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"></style> | ||||
|  | ||||
| @ -44,7 +44,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive } from 'vue' | ||||
| import { ref, reactive, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import Dialog from '@/components/dialog/baseDialog.vue' | ||||
|  | ||||
| @ -61,8 +61,19 @@ eventBus.on('graffitiDialog', () => { | ||||
|     }) | ||||
|   }, 10) | ||||
| }) | ||||
| const open = () => { | ||||
|   baseDialog.value?.open() | ||||
|   setTimeout(() => { | ||||
|     graffiti = new YJ.Obj.Graffiti(window.earth, { | ||||
|       width: width.value | ||||
|     }) | ||||
|   }, 10) | ||||
| } | ||||
|  | ||||
| const closeCallBack = (e) => {} | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| const widthInput = () => { | ||||
|   let dom: any = document.getElementById('width') | ||||
|   if (width.value < dom.min * 1) { | ||||
| @ -80,6 +91,9 @@ const draw = (e) => { | ||||
|   graffiti.start() | ||||
|   baseDialog.value?.close() | ||||
| } | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"></style> | ||||
|  | ||||
| @ -21,7 +21,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive, onMounted } from 'vue' | ||||
| import { onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import Dialog from '@/components/dialog/baseDialog.vue' | ||||
|  | ||||
| @ -40,12 +40,28 @@ eventBus.on('profileDialog', () => { | ||||
|     }) | ||||
|   } | ||||
| }) | ||||
| const open = () => { | ||||
|   profile = new YJ.Analysis.Profile(window.earth) | ||||
|   profile.onEnd = (point) => { | ||||
|     baseDialog.value?.open() | ||||
|     setTimeout(() => { | ||||
|       initEcharts(point) | ||||
|     }) | ||||
|   } | ||||
| } | ||||
| const closeCallBack = (e) => { | ||||
|   echartsObject && echartsObject.clear() | ||||
|   profile && profile.clean() | ||||
|   profile = [] | ||||
|   echartsObject = [] | ||||
| } | ||||
|  | ||||
| onBeforeUnmount(() => { | ||||
|   echartsObject && echartsObject.clear() | ||||
|   profile && profile.clean() | ||||
|   profile = [] | ||||
|   echartsObject = [] | ||||
| }) | ||||
| function close() { | ||||
|   baseDialog.value?.close() | ||||
| } | ||||
| @ -358,6 +374,9 @@ function initEcharts(points) { | ||||
|  | ||||
|   echartsObject.setOption(option) | ||||
| } | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"></style> | ||||
|  | ||||
| @ -228,7 +228,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive } from 'vue' | ||||
| import { ref, reactive, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import Dialog from '@/components/dialog/baseDialog.vue' | ||||
|  | ||||
| @ -253,10 +253,28 @@ eventBus.on('projConvertDialog', () => { | ||||
|     }) | ||||
|   }, 10) | ||||
| }) | ||||
| const open = () => { | ||||
|   baseDialog.value?.open() | ||||
|   if (status1.value) { | ||||
|     reset() | ||||
|     status1.value = false | ||||
|   } | ||||
|   status1.value = !status1.value | ||||
|   setTimeout(() => { | ||||
|     tools = new YJ.Tools(window.earth) | ||||
|     tools.projConvert(status1.value, () => { | ||||
|       status1.value = false | ||||
|       isShowing.value = true | ||||
|     }) | ||||
|   }, 10) | ||||
| } | ||||
|  | ||||
| const closeCallBack = (e) => { | ||||
|   status1.value = false | ||||
| } | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| const reset = () => { | ||||
|   let contentElm: any = document | ||||
|     .getElementsByClassName('proj-convert')[0] | ||||
| @ -273,6 +291,9 @@ const reset = () => { | ||||
| const close = (e) => { | ||||
|   baseDialog.value?.close() | ||||
| } | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
|  | ||||
| @ -109,7 +109,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive } from 'vue' | ||||
| import { ref, reactive, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import Dialog from '@/components/dialog/baseDialog.vue' | ||||
|  | ||||
| @ -134,10 +134,29 @@ eventBus.on('ProjectionConvertDialog', () => { | ||||
|   }, 100) | ||||
| }) | ||||
|  | ||||
| const open = () => { | ||||
|   baseDialog.value?.open() | ||||
|   if (status1.value) { | ||||
|     reset() | ||||
|     status1.value = false | ||||
|     tools && tools.projectionConvert(status1.value, () => {}) | ||||
|   } | ||||
|   status1.value = !status1.value | ||||
|   setTimeout(() => { | ||||
|     tools = new YJ.Tools(window.earth) | ||||
|     tools.projectionConvert(status1.value, () => { | ||||
|       status1.value = false | ||||
|     }) | ||||
|   }, 100) | ||||
| } | ||||
|  | ||||
| const closeCallBack = (e) => { | ||||
|   status1.value = false | ||||
|   tools && tools.projectionConvert(status1.value, () => {}) | ||||
| } | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| const reset = () => { | ||||
|   let contentElm: any = document | ||||
|     .getElementsByClassName('projection-convert')[0] | ||||
| @ -150,6 +169,9 @@ const reset = () => { | ||||
| const close = (e) => { | ||||
|   baseDialog.value?.close() | ||||
| } | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
|  | ||||
| @ -133,7 +133,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive } from 'vue' | ||||
| import { ref, reactive, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import Dialog from '@/components/dialog/baseDialog.vue' | ||||
| import { RouteApi } from '@/api/route/index' | ||||
| @ -179,6 +179,35 @@ eventBus.on('routePlanningDialog', () => { | ||||
|     } | ||||
|   }, 100) | ||||
| }) | ||||
| const open = () => { | ||||
|   baseDialog.value?.open() | ||||
|   setTimeout(() => { | ||||
|     //加载路网数据 | ||||
|  | ||||
|     let host = 'http://192.168.110.25:8848' | ||||
|     routePlanning = new YJ.Obj.RoutePlanning(window.earth, { | ||||
|       gps: false, | ||||
|       host | ||||
|     }) | ||||
|     routePlanning.Dialog.queryCallBack = async (v) => { | ||||
|       // await queryRoute(params, (response) => { | ||||
|       //   if (response) { | ||||
|       //     routePlanning.createRoute(response.list[0].positions) | ||||
|       //   } | ||||
|       // }) | ||||
|       let res = await RouteApi.queryRoute({ | ||||
|         startLng: startLng.value, | ||||
|         startLat: startLat.value, | ||||
|         endLng: endLng.value, | ||||
|         endLat: endLat.value, | ||||
|         waypoints: [] | ||||
|       }) | ||||
|       if (res.code === 200) { | ||||
|         routePlanning.createRoute(res.data.pathPoints) | ||||
|       } | ||||
|     } | ||||
|   }, 100) | ||||
| } | ||||
|  | ||||
| //加载路网数据 | ||||
|  | ||||
| @ -199,6 +228,9 @@ const closeCallBack = (e) => { | ||||
|   endLng.value = null | ||||
|   endLat.value = null | ||||
| } | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| const routeQuery = async (e) => { | ||||
|   let res = await RouteApi.queryRoute({ | ||||
|     startLng: startLng.value, | ||||
| @ -270,6 +302,9 @@ const inputEndLat = () => { | ||||
|     endLat.value = dom.max * 1 | ||||
|   } | ||||
| } | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
|  | ||||
| @ -64,7 +64,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive, onMounted } from 'vue' | ||||
| import { ref, reactive, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import Dialog from '@/components/dialog/baseDialog.vue' | ||||
|  | ||||
| @ -91,12 +91,20 @@ eventBus.on('screenShotDialog', () => { | ||||
|   canvasWidth.value = window.earth.viewer.canvas.width | ||||
|   canvasHeight.value = window.earth.viewer.canvas.height | ||||
| }) | ||||
| const open = () => { | ||||
|   baseDialog.value?.open() | ||||
|   canvasWidth.value = window.earth.viewer.canvas.width | ||||
|   canvasHeight.value = window.earth.viewer.canvas.height | ||||
| } | ||||
|  | ||||
| const closeCallBack = (e) => { | ||||
|   progressVal.value = 0 | ||||
|   scale.value = 1 | ||||
|   modify.value = false | ||||
| } | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| const close = (e) => { | ||||
|   baseDialog.value?.close() | ||||
| } | ||||
| @ -116,6 +124,9 @@ const getResultData = (data) => { | ||||
|     // eventBus.emit('mapPrintDialog') | ||||
|   } | ||||
| } | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
|  | ||||
| @ -180,7 +180,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive, onMounted } from 'vue' | ||||
| import { ref, reactive, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import Dialog from '@/components/dialog/baseDialog.vue' | ||||
|  | ||||
| @ -217,6 +217,22 @@ eventBus.on('submergeDialog', () => { | ||||
|   } | ||||
| }) | ||||
|  | ||||
| const open = () => { | ||||
|   baseDialog.value?.open() | ||||
|  | ||||
|   submerge = new YJ.Analysis.Submerge(window.earth) | ||||
|   submerge.onEnd = (areaV, posi) => { | ||||
|     isPausng.value = false | ||||
|     minWaterLevel.value = submerge.minWaterLevel | ||||
|     maxWaterLevel.value = submerge.maxWaterLevel | ||||
|     waterVolume.value = submerge.waterVolume | ||||
|     risingSpeed.value = submerge.risingSpeed | ||||
|     waterLevel.value = submerge.waterLevels | ||||
|     area.value = areaV * 1 | ||||
|     positions = posi | ||||
|   } | ||||
| } | ||||
|  | ||||
| const closeCallBack = (e) => { | ||||
|   minWaterLevel.value = 0 | ||||
|   maxWaterLevel.value = 0 | ||||
| @ -230,6 +246,9 @@ const closeCallBack = (e) => { | ||||
|  | ||||
|   submerge.destroy() | ||||
| } | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| function close() { | ||||
|   baseDialog.value?.close() | ||||
| } | ||||
| @ -341,6 +360,9 @@ function risingSpeedInput() { | ||||
|     submerge.risingSpeed = risingSpeed.value | ||||
|   } | ||||
| } | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
|  | ||||
| @ -49,7 +49,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive } from 'vue' | ||||
| import { ref, reactive, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import Dialog from '@/components/dialog/baseDialog.vue' | ||||
|  | ||||
| @ -65,6 +65,11 @@ eventBus.on('terrainExcavationDialog', () => { | ||||
|   excavation = new (window as any).YJ.Analysis.TerrainExcavation(window.earth, { height: 10 }) | ||||
| }) | ||||
|  | ||||
| const open = () => { | ||||
|   baseDialog.value?.open() | ||||
|  | ||||
|   excavation = new (window as any).YJ.Analysis.TerrainExcavation(window.earth, { height: 10 }) | ||||
| } | ||||
| const changeHeight = () => { | ||||
|   excavation.height = height.value | ||||
| } | ||||
| @ -79,6 +84,9 @@ const heightInput = () => { | ||||
| const closeCallBack = (e) => { | ||||
|   height.value = 10 | ||||
| } | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| const close = (e) => { | ||||
|   baseDialog.value?.close() | ||||
| } | ||||
| @ -88,6 +96,9 @@ const draw = (e) => { | ||||
| const clear = (e) => { | ||||
|   excavation.clear() | ||||
| } | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"></style> | ||||
|  | ||||
| @ -83,7 +83,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref, reactive } from 'vue' | ||||
| import { ref, reactive, onBeforeUnmount } from 'vue' | ||||
| import { inject } from 'vue' | ||||
| import Dialog from '@/components/dialog/baseDialog.vue' | ||||
|  | ||||
| @ -115,6 +115,28 @@ eventBus.on('viewShedDialog', () => { | ||||
|     e_horizontalViewAngle.addEventListener('change', changeFun) | ||||
|   }, 10) | ||||
| }) | ||||
|  | ||||
| const open = () => { | ||||
|   baseDialog.value?.open() | ||||
|   viewShed && viewShed.destroy && viewShed.destroy() | ||||
|   viewShed = new (window as any).YJ.Analysis.ViewShed((window as any).earth) | ||||
|   setTimeout(() => { | ||||
|     let contentElm = document.getElementsByClassName('view-shed')[0] | ||||
|     let e_horizontalViewAngle: any = contentElm.querySelector("input[name='horizontalViewAngle']") | ||||
|     let rangeNodeActive: any = contentElm.getElementsByClassName('range-node-active')[0] | ||||
|     let rangeNodeActiveText = rangeNodeActive.getElementsByClassName('range-node-active-text')[0] | ||||
|     let rangeProcess: any = contentElm.getElementsByClassName('range-process')[0] | ||||
|     let percentage = (horizontalViewAngle.value / 180) * 100 | ||||
|     rangeNodeActive.style.left = percentage + '%' | ||||
|     rangeProcess.style.width = percentage + '%' | ||||
|     rangeNodeActiveText.innerHTML = horizontalViewAngle.value + '°' | ||||
|     e_horizontalViewAngle.removeEventListener('input', inputFun) | ||||
|     e_horizontalViewAngle.removeEventListener('change', changeFun) | ||||
|     e_horizontalViewAngle.addEventListener('input', inputFun) | ||||
|     e_horizontalViewAngle.addEventListener('change', changeFun) | ||||
|   }, 10) | ||||
| } | ||||
|  | ||||
| function inputFun() { | ||||
|   let contentElm = document.getElementsByClassName('view-shed')[0] | ||||
|   let rangeNodeActive: any = contentElm.getElementsByClassName('range-node-active')[0] | ||||
| @ -137,6 +159,9 @@ const closeCallBack = (e) => { | ||||
|   viewPointHeight.value = 1.8 | ||||
|   horizontalViewAngle.value = 90 | ||||
| } | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| function viewPointHeightInput(e) { | ||||
|   let dom: any = document.getElementById('viewPointHeight') | ||||
|   if (viewPointHeight.value != '.') { | ||||
| @ -157,6 +182,9 @@ function close() { | ||||
| function edit() { | ||||
|   viewShed.nodeEdit() | ||||
| } | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"></style> | ||||
|  | ||||
| @ -51,6 +51,10 @@ eventBus.on('analysisDialog', () => { | ||||
|   baseDialog.value?.open() | ||||
| }) | ||||
|  | ||||
| const open = () => { | ||||
|   baseDialog.value?.open() | ||||
| } | ||||
|  | ||||
| const clangeViewPointHeight = () => {} | ||||
| const viewPointHeightInput = () => { | ||||
|   let dom: any = document.getElementById('viewPointHeight') | ||||
| @ -61,18 +65,24 @@ const viewPointHeightInput = () => { | ||||
|   } | ||||
| } | ||||
| const closeCallBack = (e) => { | ||||
|   viewPointHeight.value = 1.8; | ||||
|   (window as any).YJ.Measure.SetMeasureStatus(false) | ||||
|   viewPointHeight.value = 1.8 | ||||
|   ;(window as any).YJ.Measure.SetMeasureStatus(false) | ||||
|   // visibility && visibility.end() | ||||
| } | ||||
| onBeforeUnmount(() => { | ||||
|   closeCallBack('') | ||||
| }) | ||||
| const draw = (e) => { | ||||
|   visibility && visibility.end && visibility.end() | ||||
|   visibility = new YJ.Analysis.Visibility(window.earth, { viewPointHeight: viewPointHeight.value }) | ||||
|   // visibility.create(this) | ||||
|   !(window as any).analysisArr && ((window as any).analysisArr = []); | ||||
|   (window as any).analysisArr.push(visibility); | ||||
|   !(window as any).analysisArr && ((window as any).analysisArr = []) | ||||
|   ;(window as any).analysisArr.push(visibility) | ||||
|   baseDialog.value?.close() | ||||
| } | ||||
| defineExpose({ | ||||
|   open | ||||
| }) | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"></style> | ||||
|  | ||||
| @ -21,23 +21,23 @@ | ||||
|   /> | ||||
|  | ||||
|   <!-- 多点视线分析 --> | ||||
|   <Visibility ref="visibility"></Visibility> | ||||
|   <CircleViewShed ref="circleViewShed"></CircleViewShed> | ||||
|   <Submerge ref="submerge"></Submerge> | ||||
|   <Profile ref="profile"></Profile> | ||||
|   <ViewShed ref="viewShed"></ViewShed> | ||||
|   <CutFill ref="cutFill"></CutFill> | ||||
|   <Contour ref="contour"></Contour> | ||||
|   <RoutePlanning ref="routePlanning"></RoutePlanning> | ||||
|   <Graffiti ref="graffiti"></Graffiti> | ||||
|   <!-- <Visibility ref="visibility"></Visibility> --> | ||||
|   <!-- <CircleViewShed ref="circleViewShed"></CircleViewShed> --> | ||||
|   <!-- <Submerge ref="submerge"></Submerge> --> | ||||
|   <!-- <Profile ref="profile"></Profile> --> | ||||
|   <!-- <ViewShed ref="viewShed"></ViewShed> --> | ||||
|   <!-- <CutFill ref="cutFill"></CutFill> --> | ||||
|   <!-- <Contour ref="contour"></Contour> --> | ||||
|   <!-- <RoutePlanning ref="routePlanning"></RoutePlanning> --> | ||||
|   <!-- <Graffiti ref="graffiti"></Graffiti> --> | ||||
|   <FlyRoam ref="flyRoam"></FlyRoam> | ||||
|   <CoorLocation ref="coorLocation"></CoorLocation> | ||||
|   <ScreenShot ref="screenShot"></ScreenShot> | ||||
|   <TerrainExcavation ref="terrainExcavation"></TerrainExcavation> | ||||
|   <ProjConvert ref="projConvert"></ProjConvert> | ||||
|   <ProjectionConvert ref="projectionConvert"></ProjectionConvert> | ||||
|   <GoodsSearchCircle ref="goodsSearchCircle"></GoodsSearchCircle> | ||||
|   <GoodsSearchPolgon ref="goodsSearchPolgon"></GoodsSearchPolgon> | ||||
|   <!-- <CoorLocation ref="coorLocation"></CoorLocation> --> | ||||
|   <!-- <ScreenShot ref="screenShot"></ScreenShot> --> | ||||
|   <!-- <TerrainExcavation ref="terrainExcavation"></TerrainExcavation> --> | ||||
|   <!-- <ProjConvert ref="projConvert"></ProjConvert> --> | ||||
|   <!-- <ProjectionConvert ref="projectionConvert"></ProjectionConvert> --> | ||||
|   <!-- <GoodsSearchCircle ref="goodsSearchCircle"></GoodsSearchCircle> --> | ||||
|   <!-- <GoodsSearchPolgon ref="goodsSearchPolgon"></GoodsSearchPolgon> --> | ||||
|   <tufuSelect ref="tufuselect"></tufuSelect> | ||||
|   <imagePop ref="imagepop"></imagePop> | ||||
|   <model ref="Model"></model> | ||||
| @ -313,10 +313,97 @@ eventBus.on('openDialog', async (sourceType: any, id: any) => { | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     //分析库 | ||||
|     case 'submergeDialog': //淹没分析 | ||||
|       currentComponent.value = Submerge | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'profileDialog': //剖面分析 | ||||
|       currentComponent.value = Profile | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'analysisDialog': //视线分析 | ||||
|       currentComponent.value = Visibility | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'viewShedDialog': //视域分析 | ||||
|       currentComponent.value = ViewShed | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'circleViewShedDialog': //圆形视域分析 | ||||
|       currentComponent.value = CircleViewShed | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'cutFillDialog': //填挖方分析 | ||||
|       currentComponent.value = CutFill | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'contourDialog': //全局等高线分析 | ||||
|       currentComponent.value = Contour | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     //工具库 | ||||
|     case 'routePlanningDialog': //路径规划 | ||||
|       currentComponent.value = RoutePlanning | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'graffitiDialog': //涂鸦 | ||||
|       currentComponent.value = Graffiti | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'flyRoamDialog': //飞行漫游 | ||||
|       currentComponent.value = FlyRoam | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'coorLocationDialog': //坐标定位 | ||||
|       currentComponent.value = CoorLocation | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'screenShotDialog': //高清出图 | ||||
|       currentComponent.value = ScreenShot | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'terrainExcavationDialog': //地形开挖 | ||||
|       currentComponent.value = TerrainExcavation | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'projConvertDialog': //度分秒 | ||||
|       currentComponent.value = ProjConvert | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'ProjectionConvertDialog': //投影转换 | ||||
|       currentComponent.value = ProjectionConvert | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'goodsSearchCircleDialog': //圆形统计 | ||||
|       currentComponent.value = GoodsSearchCircle | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     case 'goodsSearchPolgonDialog': //多边形统计 | ||||
|       currentComponent.value = GoodsSearchPolgon | ||||
|       await nextTick() | ||||
|       dynamicComponentRef.value?.open(id) | ||||
|       break | ||||
|     default: | ||||
|       break | ||||
|   } | ||||
|   dynamicComponentRef.value.id = id | ||||
|   id && (dynamicComponentRef.value.id = id) | ||||
| }) | ||||
| eventBus.on('openSelectImg', (selected, entity) => { | ||||
|   // $sendElectronChanel("requireGEMarkerName", { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user