修改弹框类型
This commit is contained in:
@ -490,23 +490,28 @@ const methodMap = {
|
|||||||
},
|
},
|
||||||
//淹没分析
|
//淹没分析
|
||||||
inundationAnalysis() {
|
inundationAnalysis() {
|
||||||
eventBus.emit('submergeDialog')
|
// eventBus.emit('submergeDialog')
|
||||||
|
eventBus.emit('openDialog', 'submergeDialog')
|
||||||
},
|
},
|
||||||
//剖面分析
|
//剖面分析
|
||||||
profileAnalysis() {
|
profileAnalysis() {
|
||||||
eventBus.emit('profileDialog')
|
// eventBus.emit('profileDialog')
|
||||||
|
eventBus.emit('openDialog', 'profileDialog')
|
||||||
},
|
},
|
||||||
// 视线分析
|
// 视线分析
|
||||||
sightAnalysis() {
|
sightAnalysis() {
|
||||||
eventBus.emit('analysisDialog')
|
// eventBus.emit('analysisDialog')
|
||||||
|
eventBus.emit('openDialog', 'analysisDialog')
|
||||||
},
|
},
|
||||||
//视域分析
|
//视域分析
|
||||||
kenAnalysis() {
|
kenAnalysis() {
|
||||||
eventBus.emit('viewShedDialog')
|
// eventBus.emit('viewShedDialog')
|
||||||
|
eventBus.emit('openDialog', 'viewShedDialog')
|
||||||
},
|
},
|
||||||
//圆形视域分析
|
//圆形视域分析
|
||||||
circleKen() {
|
circleKen() {
|
||||||
eventBus.emit('circleViewShedDialog')
|
// eventBus.emit('circleViewShedDialog')
|
||||||
|
eventBus.emit('openDialog', 'circleViewShedDialog')
|
||||||
},
|
},
|
||||||
//坡向分析
|
//坡向分析
|
||||||
slopeDirection() {
|
slopeDirection() {
|
||||||
@ -514,11 +519,13 @@ const methodMap = {
|
|||||||
},
|
},
|
||||||
// 填挖方分析
|
// 填挖方分析
|
||||||
cutFill() {
|
cutFill() {
|
||||||
eventBus.emit('cutFillDialog')
|
// eventBus.emit('cutFillDialog')
|
||||||
|
eventBus.emit('openDialog', 'cutFillDialog')
|
||||||
},
|
},
|
||||||
//全局等高线分析
|
//全局等高线分析
|
||||||
globalContour() {
|
globalContour() {
|
||||||
eventBus.emit('contourDialog')
|
// eventBus.emit('contourDialog')
|
||||||
|
eventBus.emit('openDialog', 'contourDialog')
|
||||||
},
|
},
|
||||||
//等高线分析
|
//等高线分析
|
||||||
contour() {
|
contour() {
|
||||||
@ -536,7 +543,8 @@ const methodMap = {
|
|||||||
//----------------工具------------------
|
//----------------工具------------------
|
||||||
//路径规划
|
//路径规划
|
||||||
routePlan() {
|
routePlan() {
|
||||||
eventBus.emit('routePlanningDialog')
|
// eventBus.emit('routePlanningDialog')
|
||||||
|
eventBus.emit('openDialog', 'routePlanningDialog')
|
||||||
},
|
},
|
||||||
//路径清除
|
//路径清除
|
||||||
clearRoute() {
|
clearRoute() {
|
||||||
@ -544,7 +552,8 @@ const methodMap = {
|
|||||||
},
|
},
|
||||||
//涂鸦
|
//涂鸦
|
||||||
graffiti() {
|
graffiti() {
|
||||||
eventBus.emit('graffitiDialog')
|
// eventBus.emit('graffitiDialog')
|
||||||
|
eventBus.emit('openDialog', 'graffitiDialog')
|
||||||
},
|
},
|
||||||
//涂鸦清除
|
//涂鸦清除
|
||||||
clearGraffiti() {
|
clearGraffiti() {
|
||||||
@ -554,11 +563,13 @@ const methodMap = {
|
|||||||
},
|
},
|
||||||
//漫游
|
//漫游
|
||||||
roam() {
|
roam() {
|
||||||
eventBus.emit('flyRoamDialog')
|
// eventBus.emit('flyRoamDialog')
|
||||||
|
eventBus.emit('openDialog', 'flyRoamDialog')
|
||||||
},
|
},
|
||||||
//坐标定位
|
//坐标定位
|
||||||
coorLocation() {
|
coorLocation() {
|
||||||
eventBus.emit('coorLocationDialog')
|
// eventBus.emit('coorLocationDialog')
|
||||||
|
eventBus.emit('openDialog', 'coorLocationDialog')
|
||||||
},
|
},
|
||||||
//鼠标定位
|
//鼠标定位
|
||||||
mouseLocation() {
|
mouseLocation() {
|
||||||
@ -642,8 +653,9 @@ const methodMap = {
|
|||||||
},
|
},
|
||||||
//高清出图
|
//高清出图
|
||||||
highQuality() {
|
highQuality() {
|
||||||
eventBus.emit('screenShotDialog')
|
// eventBus.emit('screenShotDialog')
|
||||||
// YJ.Global.ScreenShotHD(window.earth)
|
// YJ.Global.ScreenShotHD(window.earth)
|
||||||
|
eventBus.emit('openDialog', 'screenShotDialog')
|
||||||
},
|
},
|
||||||
//视频录制
|
//视频录制
|
||||||
videoRecord() {
|
videoRecord() {
|
||||||
@ -757,7 +769,8 @@ const methodMap = {
|
|||||||
terrainDig() {
|
terrainDig() {
|
||||||
if ((window as any).checkAuthIsValid) {
|
if ((window as any).checkAuthIsValid) {
|
||||||
// new YJ.Analysis.TerrainExcavation(window.Earth1);
|
// new YJ.Analysis.TerrainExcavation(window.Earth1);
|
||||||
eventBus.emit('terrainExcavationDialog')
|
// eventBus.emit('terrainExcavationDialog')
|
||||||
|
eventBus.emit('openDialog', 'terrainExcavationDialog')
|
||||||
} else {
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '您没有该功能的权限',
|
message: '您没有该功能的权限',
|
||||||
@ -804,11 +817,13 @@ const methodMap = {
|
|||||||
},
|
},
|
||||||
//度分秒
|
//度分秒
|
||||||
projConvert() {
|
projConvert() {
|
||||||
eventBus.emit('projConvertDialog')
|
// eventBus.emit('projConvertDialog')
|
||||||
|
eventBus.emit('openDialog', 'projConvertDialog')
|
||||||
},
|
},
|
||||||
//投影转换
|
//投影转换
|
||||||
projectionConvert() {
|
projectionConvert() {
|
||||||
eventBus.emit('ProjectionConvertDialog')
|
// eventBus.emit('ProjectionConvertDialog')
|
||||||
|
eventBus.emit('openDialog', 'ProjectionConvertDialog')
|
||||||
},
|
},
|
||||||
//GDB导入
|
//GDB导入
|
||||||
gdbImport() {
|
gdbImport() {
|
||||||
@ -871,7 +886,8 @@ const methodMap = {
|
|||||||
//圆形统计
|
//圆形统计
|
||||||
circleStatistics() {
|
circleStatistics() {
|
||||||
if ((window as any).checkAuthIsValid) {
|
if ((window as any).checkAuthIsValid) {
|
||||||
eventBus.emit('goodsSearchCircleDialog')
|
// eventBus.emit('goodsSearchCircleDialog')
|
||||||
|
eventBus.emit('openDialog', 'goodsSearchCircleDialog')
|
||||||
} else {
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '您没有该功能的权限',
|
message: '您没有该功能的权限',
|
||||||
@ -882,7 +898,8 @@ const methodMap = {
|
|||||||
//多边形统计
|
//多边形统计
|
||||||
polygonStatistics() {
|
polygonStatistics() {
|
||||||
if ((window as any).checkAuthIsValid) {
|
if ((window as any).checkAuthIsValid) {
|
||||||
eventBus.emit('goodsSearchPolgonDialog')
|
// eventBus.emit('goodsSearchPolgonDialog')
|
||||||
|
eventBus.emit('openDialog', 'goodsSearchPolgonDialog')
|
||||||
} else {
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '您没有该功能的权限',
|
message: '您没有该功能的权限',
|
||||||
|
|||||||
@ -65,7 +65,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
|
||||||
@ -82,11 +82,21 @@ eventBus.on('circleViewShedDialog', () => {
|
|||||||
precision: precision.value
|
precision: precision.value
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
const open = () => {
|
||||||
|
baseDialog.value?.open()
|
||||||
|
visibility = new YJ.Analysis.CircleViewShed(window.earth, {
|
||||||
|
viewPointHeight: viewPointHeight.value,
|
||||||
|
precision: precision.value
|
||||||
|
})
|
||||||
|
}
|
||||||
const closeCallBack = (e) => {
|
const closeCallBack = (e) => {
|
||||||
viewPointHeight.value = 1.8
|
viewPointHeight.value = 1.8
|
||||||
precision.value = 20
|
precision.value = 20
|
||||||
YJ.Measure.SetMeasureStatus(false)
|
YJ.Measure.SetMeasureStatus(false)
|
||||||
}
|
}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
|
|
||||||
const viewPointHeightChange = () => {
|
const viewPointHeightChange = () => {
|
||||||
visibility.viewPointHeights = viewPointHeight.value
|
visibility.viewPointHeights = viewPointHeight.value
|
||||||
@ -118,6 +128,9 @@ const draw = (e) => {
|
|||||||
// !window.analysisArr && (window.analysisArr = [])
|
// !window.analysisArr && (window.analysisArr = [])
|
||||||
// window.analysisArr.push(visibility)
|
// window.analysisArr.push(visibility)
|
||||||
}
|
}
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@ -152,7 +152,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
|
||||||
@ -166,10 +166,19 @@ eventBus.on('contourDialog', () => {
|
|||||||
YJ.Global.Contour(window.earth)
|
YJ.Global.Contour(window.earth)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
const open = () => {
|
||||||
|
baseDialog.value?.open()
|
||||||
|
setTimeout(() => {
|
||||||
|
YJ.Global.Contour(window.earth)
|
||||||
|
})
|
||||||
|
}
|
||||||
const closeCallBack = (e) => {
|
const closeCallBack = (e) => {
|
||||||
YJ.Global.ContourReset()
|
YJ.Global.ContourReset()
|
||||||
show.value = true
|
show.value = true
|
||||||
}
|
}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
const close = (e) => {
|
const close = (e) => {
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
@ -177,6 +186,9 @@ const sure = (e) => {
|
|||||||
YJ.Global.ContourStartDraw(window.earth, show.value)
|
YJ.Global.ContourStartDraw(window.earth, show.value)
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@ -124,7 +124,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
import { addMapSource } from '../../../common/addMapSource'
|
import { addMapSource } from '../../../common/addMapSource'
|
||||||
@ -149,6 +149,10 @@ eventBus.on('coorLocationDialog', () => {
|
|||||||
id.value = new YJ.Tools().randomString()
|
id.value = new YJ.Tools().randomString()
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
})
|
})
|
||||||
|
const open = () => {
|
||||||
|
id.value = new YJ.Tools().randomString()
|
||||||
|
baseDialog.value?.open()
|
||||||
|
}
|
||||||
|
|
||||||
// @ts-ignore (define in dts)
|
// @ts-ignore (define in dts)
|
||||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||||
@ -168,6 +172,9 @@ const closeCallBack = (e) => {
|
|||||||
latSec.value = null
|
latSec.value = null
|
||||||
activeName.value = 'first'
|
activeName.value = 'first'
|
||||||
}
|
}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
const turnToPosition = async () => {
|
const turnToPosition = async () => {
|
||||||
let position
|
let position
|
||||||
switch (activeName.value) {
|
switch (activeName.value) {
|
||||||
@ -312,6 +319,9 @@ const draw = async (e) => {
|
|||||||
const close = (e) => {
|
const close = (e) => {
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -108,7 +108,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
|
||||||
@ -133,7 +133,13 @@ eventBus.on('cutFillDialog', () => {
|
|||||||
precision: precision.value
|
precision: precision.value
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
const open = () => {
|
||||||
|
baseDialog.value?.open()
|
||||||
|
cutFill = new YJ.Analysis.CutFillAnalysis(window.earth, {
|
||||||
|
height: height.value,
|
||||||
|
precision: precision.value
|
||||||
|
})
|
||||||
|
}
|
||||||
const heightInput = () => {
|
const heightInput = () => {
|
||||||
let dom: any = document.getElementById('height')
|
let dom: any = document.getElementById('height')
|
||||||
if (height.value < dom.min * 1) {
|
if (height.value < dom.min * 1) {
|
||||||
@ -166,6 +172,9 @@ const closeCallBack = (e) => {
|
|||||||
YJ.Measure.SetMeasureStatus(false)
|
YJ.Measure.SetMeasureStatus(false)
|
||||||
// visibility && visibility.end()
|
// visibility && visibility.end()
|
||||||
}
|
}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
function close() {
|
function close() {
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
@ -182,6 +191,9 @@ const draw = (e) => {
|
|||||||
cutVolume.value = cutFill.cutVolume
|
cutVolume.value = cutFill.cutVolume
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@ -172,7 +172,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
import { app } from 'electron'
|
import { app } from 'electron'
|
||||||
@ -184,7 +184,7 @@ const { cusAddNodes } = useTreeNode()
|
|||||||
|
|
||||||
const baseDialog: any = ref(null)
|
const baseDialog: any = ref(null)
|
||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
let viewPointHeight:any = ref(0)
|
let viewPointHeight: any = ref(0)
|
||||||
|
|
||||||
var show: any = ref(false)
|
var show: any = ref(false)
|
||||||
var flyRoam: any = reactive([])
|
var flyRoam: any = reactive([])
|
||||||
@ -195,6 +195,13 @@ eventBus.on('flyRoamDialog', () => {
|
|||||||
flyRoam = YJ.Global.FlyRoam.open(window.earth, { repeat: Infinity }, {}, draw)
|
flyRoam = YJ.Global.FlyRoam.open(window.earth, { repeat: Infinity }, {}, draw)
|
||||||
}, 100)
|
}, 100)
|
||||||
})
|
})
|
||||||
|
const open = () => {
|
||||||
|
show.value = true
|
||||||
|
baseDialog.value?.open()
|
||||||
|
setTimeout(() => {
|
||||||
|
flyRoam = YJ.Global.FlyRoam.open(window.earth, { repeat: Infinity }, {}, draw)
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
const draw = (data) => {
|
const draw = (data) => {
|
||||||
if (data.points.length != 0) {
|
if (data.points.length != 0) {
|
||||||
let selectedNodes = window.treeObj.getSelectedNodes()
|
let selectedNodes = window.treeObj.getSelectedNodes()
|
||||||
@ -233,7 +240,7 @@ const draw = (data) => {
|
|||||||
|
|
||||||
const clangeViewPointHeight = () => {}
|
const clangeViewPointHeight = () => {}
|
||||||
const viewPointHeightInput = () => {
|
const viewPointHeightInput = () => {
|
||||||
let dom:any = document.getElementById('viewPointHeight')
|
let dom: any = document.getElementById('viewPointHeight')
|
||||||
if (viewPointHeight.value < dom.min * 1) {
|
if (viewPointHeight.value < dom.min * 1) {
|
||||||
viewPointHeight.value = dom.min * 1
|
viewPointHeight.value = dom.min * 1
|
||||||
} else if (viewPointHeight.value > dom.max * 1) {
|
} else if (viewPointHeight.value > dom.max * 1) {
|
||||||
@ -244,6 +251,9 @@ const closeCallBack = (e) => {
|
|||||||
YJ.Global.FlyRoam.cease(window.earth)
|
YJ.Global.FlyRoam.cease(window.earth)
|
||||||
YJ.Global.FlyRoam.close()
|
YJ.Global.FlyRoam.close()
|
||||||
}
|
}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
const apply = (e) => {
|
const apply = (e) => {
|
||||||
YJ.Global.FlyRoam.apply()
|
YJ.Global.FlyRoam.apply()
|
||||||
}
|
}
|
||||||
@ -251,6 +261,10 @@ const close = (e) => {
|
|||||||
show.value = false
|
show.value = false
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import { nextTick } from 'vue'
|
import { nextTick } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
@ -53,7 +53,6 @@ var draw: any = reactive([])
|
|||||||
|
|
||||||
var show: any = ref(false)
|
var show: any = ref(false)
|
||||||
eventBus.on('goodsSearchCircleDialog', () => {
|
eventBus.on('goodsSearchCircleDialog', () => {
|
||||||
console.log('kkkkkk')
|
|
||||||
// baseDialog.value?.open()
|
// baseDialog.value?.open()
|
||||||
draw = new YJ.Draw.DrawCircle(window.earth)
|
draw = new YJ.Draw.DrawCircle(window.earth)
|
||||||
draw.start((err, positions) => {
|
draw.start((err, positions) => {
|
||||||
@ -67,10 +66,23 @@ 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') {
|
function booleanOverlaps(positions1, flag = 'circle') {
|
||||||
let cross = undefined
|
let cross = undefined
|
||||||
function set3Array(positions) {
|
function set3Array(positions) {
|
||||||
let arr:any = []
|
let arr: any = []
|
||||||
positions.forEach((item) => {
|
positions.forEach((item) => {
|
||||||
arr.push([item.lng, item.lat])
|
arr.push([item.lng, item.lat])
|
||||||
})
|
})
|
||||||
@ -94,19 +106,19 @@ function booleanOverlaps(positions1, flag = 'circle') {
|
|||||||
// 获取物资处(特定的标注类型)
|
// 获取物资处(特定的标注类型)
|
||||||
let allNodes = getNode(['point', 'vr', 'picture', 'Feature'])
|
let allNodes = getNode(['point', 'vr', 'picture', 'Feature'])
|
||||||
console.log('allNodes', allNodes)
|
console.log('allNodes', allNodes)
|
||||||
let itemInArea:any = [] //区域内的类型符合的标注
|
let itemInArea: any = [] //区域内的类型符合的标注
|
||||||
|
|
||||||
for (let i = 0; i < allNodes.length; i++) {
|
for (let i = 0; i < allNodes.length; i++) {
|
||||||
let item:any = allNodes[i]
|
let item: any = allNodes[i]
|
||||||
let getAllItemInArea = (lng, lat) => {
|
let getAllItemInArea = (lng, lat) => {
|
||||||
if (flag == 'circle') {
|
if (flag == 'circle') {
|
||||||
let { center, radius } = positions1
|
let { center, radius } = positions1
|
||||||
let distance = new YJ.Tools().randomString(center, { lng, lat })
|
let distance = new YJ.Tools().randomString(center, { lng, lat })
|
||||||
distance < radius && itemInArea.push(item)
|
distance < radius && itemInArea.push(item)
|
||||||
} else {
|
} else {
|
||||||
let polygon1 = (window as any).turf.polygon([set3Array(positions1)]);
|
let polygon1 = (window as any).turf.polygon([set3Array(positions1)])
|
||||||
let pt = (window as any).turf.point([lng, lat]);
|
let pt = (window as any).turf.point([lng, lat])
|
||||||
(window as any).turf.booleanPointInPolygon(pt, polygon1) && itemInArea.push(item)
|
;(window as any).turf.booleanPointInPolygon(pt, polygon1) && itemInArea.push(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(item, item.sourceType, 'ooooo')
|
console.log(item, item.sourceType, 'ooooo')
|
||||||
@ -178,8 +190,8 @@ function renderCanvas(nodes) {
|
|||||||
console.log('x,y')
|
console.log('x,y')
|
||||||
console.log(x)
|
console.log(x)
|
||||||
console.log(y)
|
console.log(y)
|
||||||
let notZeroX:any = []
|
let notZeroX: any = []
|
||||||
let notZeroY:any = []
|
let notZeroY: any = []
|
||||||
for (let i = 0; i < y.length; i++) {
|
for (let i = 0; i < y.length; i++) {
|
||||||
if (y[i] != 0) {
|
if (y[i] != 0) {
|
||||||
notZeroX.push(x[i])
|
notZeroX.push(x[i])
|
||||||
@ -193,7 +205,7 @@ function renderCanvas(nodes) {
|
|||||||
if (!x.length) show.value = false
|
if (!x.length) show.value = false
|
||||||
if (show.value) {
|
if (show.value) {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
let option:any = {
|
let option: any = {
|
||||||
grid: {
|
grid: {
|
||||||
top: '20%',
|
top: '20%',
|
||||||
left: '5%',
|
left: '5%',
|
||||||
@ -335,6 +347,12 @@ function renderCanvas(nodes) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const closeCallBack = (e) => {}
|
const closeCallBack = (e) => {}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import { nextTick } from 'vue'
|
import { nextTick } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
@ -63,11 +63,22 @@ 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') {
|
function booleanOverlaps(positions1, flag = 'circle') {
|
||||||
let cross = undefined
|
let cross = undefined
|
||||||
function set3Array(positions) {
|
function set3Array(positions) {
|
||||||
let arr:any = []
|
let arr: any = []
|
||||||
positions.forEach((item:any) => {
|
positions.forEach((item: any) => {
|
||||||
arr.push([item.lng, item.lat])
|
arr.push([item.lng, item.lat])
|
||||||
})
|
})
|
||||||
arr.push(arr[0])
|
arr.push(arr[0])
|
||||||
@ -87,19 +98,19 @@ function booleanOverlaps(positions1, flag = 'circle') {
|
|||||||
//绘制的区域
|
//绘制的区域
|
||||||
// 获取物资处(特定的标注类型)
|
// 获取物资处(特定的标注类型)
|
||||||
let allNodes = getNode(['point', 'vr', 'picture', 'Feature'])
|
let allNodes = getNode(['point', 'vr', 'picture', 'Feature'])
|
||||||
let itemInArea:any = [] //区域内的类型符合的标注
|
let itemInArea: any = [] //区域内的类型符合的标注
|
||||||
|
|
||||||
for (let i = 0; i < allNodes.length; i++) {
|
for (let i = 0; i < allNodes.length; i++) {
|
||||||
let item:any = allNodes[i]
|
let item: any = allNodes[i]
|
||||||
let getAllItemInArea = (lng, lat) => {
|
let getAllItemInArea = (lng, lat) => {
|
||||||
if (flag == 'circle') {
|
if (flag == 'circle') {
|
||||||
let { center, radius } = positions1
|
let { center, radius } = positions1
|
||||||
let distance = new YJ.Tools().randomString(center, { lng, lat })
|
let distance = new YJ.Tools().randomString(center, { lng, lat })
|
||||||
distance < radius && itemInArea.push(item)
|
distance < radius && itemInArea.push(item)
|
||||||
} else {
|
} else {
|
||||||
let polygon1 = (window as any).turf.polygon([set3Array(positions1)]);
|
let polygon1 = (window as any).turf.polygon([set3Array(positions1)])
|
||||||
let pt = (window as any).turf.point([lng, lat]);
|
let pt = (window as any).turf.point([lng, lat])
|
||||||
(window as any).turf.booleanPointInPolygon(pt, polygon1) && itemInArea.push(item)
|
;(window as any).turf.booleanPointInPolygon(pt, polygon1) && itemInArea.push(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (item.sourceType) {
|
switch (item.sourceType) {
|
||||||
@ -166,8 +177,8 @@ function renderCanvas(nodes) {
|
|||||||
console.log('x,y')
|
console.log('x,y')
|
||||||
console.log(x)
|
console.log(x)
|
||||||
console.log(y)
|
console.log(y)
|
||||||
let notZeroX:any = []
|
let notZeroX: any = []
|
||||||
let notZeroY:any = []
|
let notZeroY: any = []
|
||||||
for (let i = 0; i < y.length; i++) {
|
for (let i = 0; i < y.length; i++) {
|
||||||
if (y[i] != 0) {
|
if (y[i] != 0) {
|
||||||
notZeroX.push(x[i])
|
notZeroX.push(x[i])
|
||||||
@ -181,7 +192,7 @@ function renderCanvas(nodes) {
|
|||||||
if (!x.length) show.value = false
|
if (!x.length) show.value = false
|
||||||
if (show.value) {
|
if (show.value) {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
let option:any = {
|
let option: any = {
|
||||||
grid: {
|
grid: {
|
||||||
top: '20%',
|
top: '20%',
|
||||||
left: '5%',
|
left: '5%',
|
||||||
@ -323,6 +334,12 @@ function renderCanvas(nodes) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const closeCallBack = (e) => {}
|
const closeCallBack = (e) => {}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@ -44,7 +44,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
|
||||||
@ -61,8 +61,19 @@ eventBus.on('graffitiDialog', () => {
|
|||||||
})
|
})
|
||||||
}, 10)
|
}, 10)
|
||||||
})
|
})
|
||||||
|
const open = () => {
|
||||||
|
baseDialog.value?.open()
|
||||||
|
setTimeout(() => {
|
||||||
|
graffiti = new YJ.Obj.Graffiti(window.earth, {
|
||||||
|
width: width.value
|
||||||
|
})
|
||||||
|
}, 10)
|
||||||
|
}
|
||||||
|
|
||||||
const closeCallBack = (e) => {}
|
const closeCallBack = (e) => {}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
const widthInput = () => {
|
const widthInput = () => {
|
||||||
let dom: any = document.getElementById('width')
|
let dom: any = document.getElementById('width')
|
||||||
if (width.value < dom.min * 1) {
|
if (width.value < dom.min * 1) {
|
||||||
@ -80,6 +91,9 @@ const draw = (e) => {
|
|||||||
graffiti.start()
|
graffiti.start()
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from 'vue'
|
import { onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.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) => {
|
const closeCallBack = (e) => {
|
||||||
echartsObject && echartsObject.clear()
|
echartsObject && echartsObject.clear()
|
||||||
profile && profile.clean()
|
profile && profile.clean()
|
||||||
profile = []
|
profile = []
|
||||||
echartsObject = []
|
echartsObject = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
echartsObject && echartsObject.clear()
|
||||||
|
profile && profile.clean()
|
||||||
|
profile = []
|
||||||
|
echartsObject = []
|
||||||
|
})
|
||||||
function close() {
|
function close() {
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
@ -358,6 +374,9 @@ function initEcharts(points) {
|
|||||||
|
|
||||||
echartsObject.setOption(option)
|
echartsObject.setOption(option)
|
||||||
}
|
}
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@ -228,7 +228,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
|
||||||
@ -253,12 +253,30 @@ eventBus.on('projConvertDialog', () => {
|
|||||||
})
|
})
|
||||||
}, 10)
|
}, 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) => {
|
const closeCallBack = (e) => {
|
||||||
status1.value = false
|
status1.value = false
|
||||||
}
|
}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
let contentElm:any = document
|
let contentElm: any = document
|
||||||
.getElementsByClassName('proj-convert')[0]
|
.getElementsByClassName('proj-convert')[0]
|
||||||
.getElementsByClassName('content')[0]
|
.getElementsByClassName('content')[0]
|
||||||
contentElm.getElementsByClassName('lng-dms-d')[0].value = null
|
contentElm.getElementsByClassName('lng-dms-d')[0].value = null
|
||||||
@ -273,6 +291,9 @@ const reset = () => {
|
|||||||
const close = (e) => {
|
const close = (e) => {
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -109,7 +109,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
|
||||||
@ -134,12 +134,31 @@ eventBus.on('ProjectionConvertDialog', () => {
|
|||||||
}, 100)
|
}, 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) => {
|
const closeCallBack = (e) => {
|
||||||
status1.value = false
|
status1.value = false
|
||||||
tools && tools.projectionConvert(status1.value, () => {})
|
tools && tools.projectionConvert(status1.value, () => {})
|
||||||
}
|
}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
let contentElm:any = document
|
let contentElm: any = document
|
||||||
.getElementsByClassName('projection-convert')[0]
|
.getElementsByClassName('projection-convert')[0]
|
||||||
.getElementsByClassName('content')[0]
|
.getElementsByClassName('content')[0]
|
||||||
contentElm.getElementsByClassName('left-x')[0].value = null
|
contentElm.getElementsByClassName('left-x')[0].value = null
|
||||||
@ -150,6 +169,9 @@ const reset = () => {
|
|||||||
const close = (e) => {
|
const close = (e) => {
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -133,7 +133,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
import { RouteApi } from '@/api/route/index'
|
import { RouteApi } from '@/api/route/index'
|
||||||
@ -179,6 +179,35 @@ eventBus.on('routePlanningDialog', () => {
|
|||||||
}
|
}
|
||||||
}, 100)
|
}, 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
|
endLng.value = null
|
||||||
endLat.value = null
|
endLat.value = null
|
||||||
}
|
}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
const routeQuery = async (e) => {
|
const routeQuery = async (e) => {
|
||||||
let res = await RouteApi.queryRoute({
|
let res = await RouteApi.queryRoute({
|
||||||
startLng: startLng.value,
|
startLng: startLng.value,
|
||||||
@ -270,6 +302,9 @@ const inputEndLat = () => {
|
|||||||
endLat.value = dom.max * 1
|
endLat.value = dom.max * 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -64,7 +64,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
|
||||||
@ -91,12 +91,20 @@ eventBus.on('screenShotDialog', () => {
|
|||||||
canvasWidth.value = window.earth.viewer.canvas.width
|
canvasWidth.value = window.earth.viewer.canvas.width
|
||||||
canvasHeight.value = window.earth.viewer.canvas.height
|
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) => {
|
const closeCallBack = (e) => {
|
||||||
progressVal.value = 0
|
progressVal.value = 0
|
||||||
scale.value = 1
|
scale.value = 1
|
||||||
modify.value = false
|
modify.value = false
|
||||||
}
|
}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
const close = (e) => {
|
const close = (e) => {
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
@ -116,6 +124,9 @@ const getResultData = (data) => {
|
|||||||
// eventBus.emit('mapPrintDialog')
|
// eventBus.emit('mapPrintDialog')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -180,7 +180,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.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) => {
|
const closeCallBack = (e) => {
|
||||||
minWaterLevel.value = 0
|
minWaterLevel.value = 0
|
||||||
maxWaterLevel.value = 0
|
maxWaterLevel.value = 0
|
||||||
@ -230,6 +246,9 @@ const closeCallBack = (e) => {
|
|||||||
|
|
||||||
submerge.destroy()
|
submerge.destroy()
|
||||||
}
|
}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
function close() {
|
function close() {
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
@ -341,6 +360,9 @@ function risingSpeedInput() {
|
|||||||
submerge.risingSpeed = risingSpeed.value
|
submerge.risingSpeed = risingSpeed.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
|
||||||
@ -65,11 +65,16 @@ eventBus.on('terrainExcavationDialog', () => {
|
|||||||
excavation = new (window as any).YJ.Analysis.TerrainExcavation(window.earth, { height: 10 })
|
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 = () => {
|
const changeHeight = () => {
|
||||||
excavation.height = height.value
|
excavation.height = height.value
|
||||||
}
|
}
|
||||||
const heightInput = () => {
|
const heightInput = () => {
|
||||||
let dom:any = document.getElementById('height')
|
let dom: any = document.getElementById('height')
|
||||||
if (height.value < dom.min * 1) {
|
if (height.value < dom.min * 1) {
|
||||||
height.value = dom.min * 1
|
height.value = dom.min * 1
|
||||||
} else if (height.value > dom.max * 1) {
|
} else if (height.value > dom.max * 1) {
|
||||||
@ -79,6 +84,9 @@ const heightInput = () => {
|
|||||||
const closeCallBack = (e) => {
|
const closeCallBack = (e) => {
|
||||||
height.value = 10
|
height.value = 10
|
||||||
}
|
}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
const close = (e) => {
|
const close = (e) => {
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
@ -88,6 +96,9 @@ const draw = (e) => {
|
|||||||
const clear = (e) => {
|
const clear = (e) => {
|
||||||
excavation.clear()
|
excavation.clear()
|
||||||
}
|
}
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@ -83,7 +83,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive, onBeforeUnmount } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
|
||||||
@ -101,10 +101,10 @@ eventBus.on('viewShedDialog', () => {
|
|||||||
viewShed = new (window as any).YJ.Analysis.ViewShed((window as any).earth)
|
viewShed = new (window as any).YJ.Analysis.ViewShed((window as any).earth)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let contentElm = document.getElementsByClassName('view-shed')[0]
|
let contentElm = document.getElementsByClassName('view-shed')[0]
|
||||||
let e_horizontalViewAngle:any = contentElm.querySelector("input[name='horizontalViewAngle']")
|
let e_horizontalViewAngle: any = contentElm.querySelector("input[name='horizontalViewAngle']")
|
||||||
let rangeNodeActive:any = contentElm.getElementsByClassName('range-node-active')[0]
|
let rangeNodeActive: any = contentElm.getElementsByClassName('range-node-active')[0]
|
||||||
let rangeNodeActiveText = rangeNodeActive.getElementsByClassName('range-node-active-text')[0]
|
let rangeNodeActiveText = rangeNodeActive.getElementsByClassName('range-node-active-text')[0]
|
||||||
let rangeProcess:any = contentElm.getElementsByClassName('range-process')[0]
|
let rangeProcess: any = contentElm.getElementsByClassName('range-process')[0]
|
||||||
let percentage = (horizontalViewAngle.value / 180) * 100
|
let percentage = (horizontalViewAngle.value / 180) * 100
|
||||||
rangeNodeActive.style.left = percentage + '%'
|
rangeNodeActive.style.left = percentage + '%'
|
||||||
rangeProcess.style.width = percentage + '%'
|
rangeProcess.style.width = percentage + '%'
|
||||||
@ -115,11 +115,33 @@ eventBus.on('viewShedDialog', () => {
|
|||||||
e_horizontalViewAngle.addEventListener('change', changeFun)
|
e_horizontalViewAngle.addEventListener('change', changeFun)
|
||||||
}, 10)
|
}, 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() {
|
function inputFun() {
|
||||||
let contentElm = document.getElementsByClassName('view-shed')[0]
|
let contentElm = document.getElementsByClassName('view-shed')[0]
|
||||||
let rangeNodeActive:any = contentElm.getElementsByClassName('range-node-active')[0]
|
let rangeNodeActive: any = contentElm.getElementsByClassName('range-node-active')[0]
|
||||||
let rangeNodeActiveText:any = rangeNodeActive.getElementsByClassName('range-node-active-text')[0]
|
let rangeNodeActiveText: any = rangeNodeActive.getElementsByClassName('range-node-active-text')[0]
|
||||||
let rangeProcess:any = contentElm.getElementsByClassName('range-process')[0]
|
let rangeProcess: any = contentElm.getElementsByClassName('range-process')[0]
|
||||||
let percentage = (horizontalViewAngle.value / 180) * 100
|
let percentage = (horizontalViewAngle.value / 180) * 100
|
||||||
rangeNodeActive.style.left = percentage + '%'
|
rangeNodeActive.style.left = percentage + '%'
|
||||||
rangeProcess.style.width = percentage + '%'
|
rangeProcess.style.width = percentage + '%'
|
||||||
@ -137,8 +159,11 @@ const closeCallBack = (e) => {
|
|||||||
viewPointHeight.value = 1.8
|
viewPointHeight.value = 1.8
|
||||||
horizontalViewAngle.value = 90
|
horizontalViewAngle.value = 90
|
||||||
}
|
}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
function viewPointHeightInput(e) {
|
function viewPointHeightInput(e) {
|
||||||
let dom:any = document.getElementById('viewPointHeight')
|
let dom: any = document.getElementById('viewPointHeight')
|
||||||
if (viewPointHeight.value != '.') {
|
if (viewPointHeight.value != '.') {
|
||||||
if (viewPointHeight.value < dom.min * 1) {
|
if (viewPointHeight.value < dom.min * 1) {
|
||||||
viewPointHeight.value = dom.min * 1
|
viewPointHeight.value = dom.min * 1
|
||||||
@ -157,6 +182,9 @@ function close() {
|
|||||||
function edit() {
|
function edit() {
|
||||||
viewShed.nodeEdit()
|
viewShed.nodeEdit()
|
||||||
}
|
}
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@ -51,6 +51,10 @@ eventBus.on('analysisDialog', () => {
|
|||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const open = () => {
|
||||||
|
baseDialog.value?.open()
|
||||||
|
}
|
||||||
|
|
||||||
const clangeViewPointHeight = () => {}
|
const clangeViewPointHeight = () => {}
|
||||||
const viewPointHeightInput = () => {
|
const viewPointHeightInput = () => {
|
||||||
let dom: any = document.getElementById('viewPointHeight')
|
let dom: any = document.getElementById('viewPointHeight')
|
||||||
@ -61,18 +65,24 @@ const viewPointHeightInput = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const closeCallBack = (e) => {
|
const closeCallBack = (e) => {
|
||||||
viewPointHeight.value = 1.8;
|
viewPointHeight.value = 1.8
|
||||||
(window as any).YJ.Measure.SetMeasureStatus(false)
|
;(window as any).YJ.Measure.SetMeasureStatus(false)
|
||||||
// visibility && visibility.end()
|
// visibility && visibility.end()
|
||||||
}
|
}
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
closeCallBack('')
|
||||||
|
})
|
||||||
const draw = (e) => {
|
const draw = (e) => {
|
||||||
visibility && visibility.end && visibility.end()
|
visibility && visibility.end && visibility.end()
|
||||||
visibility = new YJ.Analysis.Visibility(window.earth, { viewPointHeight: viewPointHeight.value })
|
visibility = new YJ.Analysis.Visibility(window.earth, { viewPointHeight: viewPointHeight.value })
|
||||||
// visibility.create(this)
|
// visibility.create(this)
|
||||||
!(window as any).analysisArr && ((window as any).analysisArr = []);
|
!(window as any).analysisArr && ((window as any).analysisArr = [])
|
||||||
(window as any).analysisArr.push(visibility);
|
;(window as any).analysisArr.push(visibility)
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@ -21,23 +21,23 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 多点视线分析 -->
|
<!-- 多点视线分析 -->
|
||||||
<Visibility ref="visibility"></Visibility>
|
<!-- <Visibility ref="visibility"></Visibility> -->
|
||||||
<CircleViewShed ref="circleViewShed"></CircleViewShed>
|
<!-- <CircleViewShed ref="circleViewShed"></CircleViewShed> -->
|
||||||
<Submerge ref="submerge"></Submerge>
|
<!-- <Submerge ref="submerge"></Submerge> -->
|
||||||
<Profile ref="profile"></Profile>
|
<!-- <Profile ref="profile"></Profile> -->
|
||||||
<ViewShed ref="viewShed"></ViewShed>
|
<!-- <ViewShed ref="viewShed"></ViewShed> -->
|
||||||
<CutFill ref="cutFill"></CutFill>
|
<!-- <CutFill ref="cutFill"></CutFill> -->
|
||||||
<Contour ref="contour"></Contour>
|
<!-- <Contour ref="contour"></Contour> -->
|
||||||
<RoutePlanning ref="routePlanning"></RoutePlanning>
|
<!-- <RoutePlanning ref="routePlanning"></RoutePlanning> -->
|
||||||
<Graffiti ref="graffiti"></Graffiti>
|
<!-- <Graffiti ref="graffiti"></Graffiti> -->
|
||||||
<FlyRoam ref="flyRoam"></FlyRoam>
|
<FlyRoam ref="flyRoam"></FlyRoam>
|
||||||
<CoorLocation ref="coorLocation"></CoorLocation>
|
<!-- <CoorLocation ref="coorLocation"></CoorLocation> -->
|
||||||
<ScreenShot ref="screenShot"></ScreenShot>
|
<!-- <ScreenShot ref="screenShot"></ScreenShot> -->
|
||||||
<TerrainExcavation ref="terrainExcavation"></TerrainExcavation>
|
<!-- <TerrainExcavation ref="terrainExcavation"></TerrainExcavation> -->
|
||||||
<ProjConvert ref="projConvert"></ProjConvert>
|
<!-- <ProjConvert ref="projConvert"></ProjConvert> -->
|
||||||
<ProjectionConvert ref="projectionConvert"></ProjectionConvert>
|
<!-- <ProjectionConvert ref="projectionConvert"></ProjectionConvert> -->
|
||||||
<GoodsSearchCircle ref="goodsSearchCircle"></GoodsSearchCircle>
|
<!-- <GoodsSearchCircle ref="goodsSearchCircle"></GoodsSearchCircle> -->
|
||||||
<GoodsSearchPolgon ref="goodsSearchPolgon"></GoodsSearchPolgon>
|
<!-- <GoodsSearchPolgon ref="goodsSearchPolgon"></GoodsSearchPolgon> -->
|
||||||
<tufuSelect ref="tufuselect"></tufuSelect>
|
<tufuSelect ref="tufuselect"></tufuSelect>
|
||||||
<imagePop ref="imagepop"></imagePop>
|
<imagePop ref="imagepop"></imagePop>
|
||||||
<model ref="Model"></model>
|
<model ref="Model"></model>
|
||||||
@ -313,10 +313,97 @@ eventBus.on('openDialog', async (sourceType: any, id: any) => {
|
|||||||
await nextTick()
|
await nextTick()
|
||||||
dynamicComponentRef.value?.open(id)
|
dynamicComponentRef.value?.open(id)
|
||||||
break
|
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:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
dynamicComponentRef.value.id = id
|
id && (dynamicComponentRef.value.id = id)
|
||||||
})
|
})
|
||||||
eventBus.on('openSelectImg', (selected, entity) => {
|
eventBus.on('openSelectImg', (selected, entity) => {
|
||||||
// $sendElectronChanel("requireGEMarkerName", {
|
// $sendElectronChanel("requireGEMarkerName", {
|
||||||
|
|||||||
Reference in New Issue
Block a user