Compare commits

...

3 Commits

Author SHA1 Message Date
zh
50ef8e1f05 合并 2025-09-08 09:10:10 +08:00
zh
6629775367 Merge branch 'zyl' of http://xny.yj-3d.com:3000/zhouyulong/electron-4 into zyl 2025-09-05 19:45:55 +08:00
zh
41bffc2e83 合并 2025-09-05 19:45:46 +08:00
19 changed files with 88 additions and 138 deletions

View File

@ -25,7 +25,6 @@ declare module 'vue' {
ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs'] ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag']
ElUpload: typeof import('element-plus/es')['ElUpload'] ElUpload: typeof import('element-plus/es')['ElUpload']
Index_b: typeof import('./src/components/SvgIcon/index_b.vue')['default'] Index_b: typeof import('./src/components/SvgIcon/index_b.vue')['default']
Pagination: typeof import('./src/components/Pagination/index.vue')['default'] Pagination: typeof import('./src/components/Pagination/index.vue')['default']

View File

@ -1,63 +0,0 @@
import { ipcRenderer, remote } from "electron";
import Vue from "vue";
import { Loading } from "element-ui";
let bus = new Vue();
// let bus = window.$root_home;
let $sendChanel = (chanel, arg = {}) => {
// let bus = new Vue();
bus.$emit(chanel, arg);
};
let $recvChanel = (chanel, cb) => {
bus.$on(chanel, cb);
};
let $offChanel = (chanel, cb) => {
bus.$off(chanel);
};
let $removeChanel = (chanel) => {
bus.$off(chanel);
};
let $sendElectronChanel = (chanel, arg = null) => {
ipcRenderer.send(chanel, arg);
};
let $removeElectronChanel = (chanel, cb) => {
ipcRenderer.removeListener(chanel, cb);
};
let $recvElectronChanel = (chanel, cb) => {
ipcRenderer.once(chanel, cb);
};
let $changeComponentShow = (selector, state, styleStr = false) => {
$(selector).css({ display: state ? "block" : "none" });
if (styleStr) {
console.log(123);
let str = styleStr.split(":");
if (str[0] === "top") $(selector).css({ top: str[1] });
if (str[0] === "z-index") $(selector).css({ zIndex: str[1] });
}
};
let openLoading = (
text = "拼命加载中...",
option = {
fullscreen: true,
background: "rgba(0,0,0,0.63)",
lock: true,
// spinner: 'el-icon-loading'
}
) => {
option.text = text;
let loadingInstance = Loading.service(option);
return loadingInstance;
};
let $remote = remote;
export {
openLoading,
$sendElectronChanel,
$removeElectronChanel,
$recvElectronChanel,
$sendChanel,
$recvChanel,
$offChanel,
$removeChanel,
$changeComponentShow,
$remote,
};

View File

@ -39,8 +39,8 @@ import { bus } from '@/utils/bus'
import leftSideSecond from '@/views/components/leftSide/leftSideSecond.vue' import leftSideSecond from '@/views/components/leftSide/leftSideSecond.vue'
const { t } = useI18n() const { t } = useI18n()
const eventBus = inject('bus') const eventBus: any = inject('bus')
const menuList = ref([ const menuList: any = ref([
// 方案推演 // 方案推演
{ {
name: 'situation', name: 'situation',

View File

@ -65,20 +65,20 @@
<div class="tr"> <div class="tr">
<div class="td">圆心坐标</div> <div class="td">圆心坐标</div>
<div class="td lng align-center" @dblclick="inputDblclick($event, 1, 'lng')"> <div class="td lng align-center" @dblclick="inputDblclick($event, 1, 'lng')">
<input class="input" @blur="inputBlurCallBack($event, i, 'lng', 8)" type="number" <input class="input" @blur="inputBlurCallBack($event, 1, 'lng', 8)" type="number"
v-model="entityOptions.center.lng" min="-180" max="180" v-if="activeTd.index == i && activeTd.name == 'lng'"> v-model="entityOptions.center.lng" min="-180" max="180" v-if="activeTd.index == 1 && activeTd.name == 'lng'">
<span style="pointer-events: none;" v-else>{{ (item.lng).toFixed(8) }}</span> <span style="pointer-events: none;" v-else>{{ entityOptions.center.lng.toFixed(8) }}</span>
</div> </div>
<div class="td lat align-center" @dblclick="inputDblclick($event, i, 'lat')"> <div class="td lat align-center" @dblclick="inputDblclick($event, 1, 'lat')">
<input class="input" @blur="inputBlurCallBack($event, i, 'lat', 8)" type="number" <input class="input" @blur="inputBlurCallBack($event, 1, 'lat', 8)" type="number"
v-model="entityOptions.center.lat" min="-180" max="180" v-if="activeTd.index == i && activeTd.name == 'lat'"> v-model="entityOptions.center.lat" min="-180" max="180" v-if="activeTd.index == 1 && activeTd.name == 'lat'">
<span style="pointer-events: none;" v-else>{{ (item.lat).toFixed(8) }}</span> <span style="pointer-events: none;" v-else>{{ entityOptions.center.lat.toFixed(8) }}</span>
</div> </div>
<div class="td alt align-center" @dblclick="inputDblclick($event, i, 'alt')"> <div class="td alt align-center" @dblclick="inputDblclick($event, 1, 'alt')">
<input class="input" @blur="inputBlurCallBack($event, i, 'alt', 2)" type="number" <input class="input" @blur="inputBlurCallBack($event, 1, 'alt', 2)" type="number"
v-model="entityOptions.height" min="-9999999" max="999999999" v-model="entityOptions.height" min="-9999999" max="999999999"
v-if="activeTd.index == i && activeTd.name == 'alt'"> v-if="activeTd.index == 1 && activeTd.name == 'alt'">
<span style="pointer-events: none;" v-else>{{ (entityOptions.height).toFixed(2) }}</span> <span style="pointer-events: none;" v-else>{{ entityOptions.height.toFixed(2) }}</span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -69,8 +69,8 @@ import { ref, reactive, onMounted } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog = ref(null) const baseDialog: any = ref(null)
const eventBus = inject('bus') const eventBus: any = inject('bus')
const viewPointHeight: any = ref(1.8) const viewPointHeight: any = ref(1.8)
const precision: any = ref(20) const precision: any = ref(20)
@ -92,7 +92,7 @@ const viewPointHeightChange = () => {
visibility.viewPointHeights = viewPointHeight.value visibility.viewPointHeights = viewPointHeight.value
} }
const viewPointHeightInput = () => { const viewPointHeightInput = () => {
let dom = 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) {

View File

@ -155,8 +155,8 @@ import { ref, reactive, onMounted } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog = ref(null) const baseDialog: any = ref(null)
const eventBus = inject('bus') const eventBus: any = inject('bus')
eventBus.on('contourDialog', () => { eventBus.on('contourDialog', () => {
baseDialog.value?.open() baseDialog.value?.open()

View File

@ -117,8 +117,8 @@ import { ref, reactive } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog = ref(null) const baseDialog: any = ref(null)
const eventBus = inject('bus') const eventBus: any = inject('bus')
const activeName = ref('first') const activeName = ref('first')
@ -135,6 +135,7 @@ eventBus.on('coorLocationDialog', () => {
baseDialog.value?.open() baseDialog.value?.open()
}) })
// @ts-ignore (define in dts)
const handleClick = (tab: TabsPaneContext, event: Event) => { const handleClick = (tab: TabsPaneContext, event: Event) => {
console.log(tab, event) console.log(tab, event)
longitude.value = null longitude.value = null
@ -160,9 +161,13 @@ const flyto = (e) => {
}) })
break break
case 'second': case 'second':
// @ts-ignore (define in dts)
var lng = Math.abs(longitude.value) + Math.abs(lngMin.value) / 60 var lng = Math.abs(longitude.value) + Math.abs(lngMin.value) / 60
// @ts-ignore (define in dts)
var lat = Math.abs(latitude.value) + Math.abs(latMin.value) / 60 var lat = Math.abs(latitude.value) + Math.abs(latMin.value) / 60
// @ts-ignore (define in dts)
lng = longitude.value < 0 ? -lng : lng lng = longitude.value < 0 ? -lng : lng
// @ts-ignore (define in dts)
lat = latitude.value < 0 ? -lat : lat lat = latitude.value < 0 ? -lat : lat
var position = { lng, lat, alt: 100 } var position = { lng, lat, alt: 100 }
@ -172,11 +177,15 @@ const flyto = (e) => {
break break
case 'third': case 'third':
var lng = var lng =
// @ts-ignore (define in dts)
Math.abs(longitude.value) + Math.abs(lngMin.value) / 60 + Math.abs(lngSec.value) / 3600 Math.abs(longitude.value) + Math.abs(lngMin.value) / 60 + Math.abs(lngSec.value) / 3600
var lat = var lat =
// @ts-ignore (define in dts)
Math.abs(latitude.value) + Math.abs(latMin.value) / 60 + Math.abs(latSec.value) / 3600 Math.abs(latitude.value) + Math.abs(latMin.value) / 60 + Math.abs(latSec.value) / 3600
// @ts-ignore (define in dts)
lng = longitude.value < 0 ? -lng : lng lng = longitude.value < 0 ? -lng : lng
// @ts-ignore (define in dts)
lat = latitude.value < 0 ? -lat : lat lat = latitude.value < 0 ? -lat : lat
var position = { lng, lat, alt: 100 } var position = { lng, lat, alt: 100 }

View File

@ -112,8 +112,8 @@ import { ref, reactive } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog = ref(null) const baseDialog: any = ref(null)
const eventBus = inject('bus') const eventBus: any = inject('bus')
var height: any = ref(70) var height: any = ref(70)
var precision: any = ref(125) var precision: any = ref(125)
@ -135,7 +135,7 @@ eventBus.on('cutFillDialog', () => {
}) })
const heightInput = () => { const heightInput = () => {
let dom = 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) {

View File

@ -1,4 +1,4 @@
<template> <!-- <template>
<Dialog <Dialog
ref="baseDialog" ref="baseDialog"
class="fly-roam" class="fly-roam"
@ -121,8 +121,8 @@ import { ref, reactive } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog = ref(null) const baseDialog: any = ref(null)
const eventBus = inject('bus') const eventBus: any = inject('bus')
var show: any = ref(false) var show: any = ref(false)
var flyRoam: any = reactive([]) var flyRoam: any = reactive([])
@ -154,4 +154,4 @@ const close = (e) => {
} }
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style> -->

View File

@ -48,8 +48,8 @@ import { ref, reactive } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog = ref(null) const baseDialog: any = ref(null)
const eventBus = inject('bus') const eventBus: any = inject('bus')
var width: any = ref(1) var width: any = ref(1)
var graffiti: any = reactive([]) var graffiti: any = reactive([])
@ -64,7 +64,7 @@ eventBus.on('graffitiDialog', () => {
const closeCallBack = (e) => {} const closeCallBack = (e) => {}
const widthInput = () => { const widthInput = () => {
let dom = document.getElementById('width') let dom: any = document.getElementById('width')
if (width.value < dom.min * 1) { if (width.value < dom.min * 1) {
width.value = dom.min * 1 width.value = dom.min * 1
} else if (width.value > dom.max * 1) { } else if (width.value > dom.max * 1) {

View File

@ -25,8 +25,8 @@ import { ref, reactive, onMounted } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog = ref(null) const baseDialog: any = ref(null)
const eventBus = inject('bus') const eventBus: any = inject('bus')
//属性 //属性
var profile: any = reactive([]) var profile: any = reactive([])
var echartsObject: any = reactive({}) var echartsObject: any = reactive({})
@ -50,6 +50,7 @@ function close() {
baseDialog.value?.close() baseDialog.value?.close()
} }
const draw = (e) => { const draw = (e) => {
// @ts-ignore (define in dts)
initEcharts() initEcharts()
profile.reDraw() profile.reDraw()
} }
@ -68,12 +69,14 @@ function initEcharts(points) {
continue continue
} }
const curData = [element.distance.toFixed(2), element.position.height.toFixed(2)] const curData = [element.distance.toFixed(2), element.position.height.toFixed(2)]
// @ts-ignore (define in dts)
datas.push(curData) datas.push(curData)
const curCoords = [element.position.lng, element.position.lat] const curCoords = [element.position.lng, element.position.lat]
// @ts-ignore (define in dts)
coords.push(curCoords) coords.push(curCoords)
} }
const ele = document.getElementsByClassName('profile-echarts')[0] const ele = document.getElementsByClassName('profile-echarts')[0]
echartsObject = echarts.init(ele) echartsObject = (window as any).echarts.init(ele)
option = { option = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
@ -81,7 +84,7 @@ function initEcharts(points) {
align: 'left' align: 'left'
}, },
formatter(params) { formatter(params) {
const xy = coords[params[0].dataIndex] const xy: any = coords[params[0].dataIndex]
const tipData = params[0]['data'] const tipData = params[0]['data']
profile.formatter(xy, tipData) profile.formatter(xy, tipData)
return ( return (
@ -174,7 +177,7 @@ function initEcharts(points) {
}, },
areaStyle: { areaStyle: {
normal: { normal: {
color: new echarts.graphic.LinearGradient( color: new (window as any).echarts.graphic.LinearGradient(
0, 0,
0, 0,
0, 0,
@ -222,7 +225,7 @@ function initEcharts(points) {
} }
} else { } else {
const ele = document.getElementsByClassName('profile-echarts')[0] const ele = document.getElementsByClassName('profile-echarts')[0]
echartsObject = echarts.init(ele) echartsObject = (window as any).echarts.init(ele)
option = { option = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
@ -305,7 +308,7 @@ function initEcharts(points) {
}, },
areaStyle: { areaStyle: {
normal: { normal: {
color: new echarts.graphic.LinearGradient( color: new (window as any).echarts.graphic.LinearGradient(
0, 0,
0, 0,
0, 0,

View File

@ -29,8 +29,8 @@ import { ref, reactive } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog = ref(null) const baseDialog: any = ref(null)
const eventBus = inject('bus') const eventBus: any = inject('bus')
//属性 //属性
var startLng: any = ref(null) var startLng: any = ref(null)

View File

@ -128,8 +128,8 @@ import { ref, reactive, onMounted } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog = ref(null) const baseDialog: any = ref(null)
const eventBus = inject('bus') const eventBus: any = inject('bus')
var selectType: any = ref('first') var selectType: any = ref('first')
var scale: any = ref(1) var scale: any = ref(1)
var radio: any = ref('1:500') var radio: any = ref('1:500')

View File

@ -184,8 +184,8 @@ import { ref, reactive, onMounted } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog = ref(null) const baseDialog: any = ref(null)
const eventBus = inject('bus') const eventBus: any = inject('bus')
// 属性 // 属性
var minWaterLevel: any = ref(0) var minWaterLevel: any = ref(0)
var maxWaterLevel: any = ref(0) var maxWaterLevel: any = ref(0)
@ -261,7 +261,7 @@ function analog() {
} }
function minWaterLevelInput() { function minWaterLevelInput() {
let dom = document.getElementById('minWaterLevel') let dom: any = document.getElementById('minWaterLevel')
if (minWaterLevel.value != '.') { if (minWaterLevel.value != '.') {
if (minWaterLevel.value < dom.min * 1) { if (minWaterLevel.value < dom.min * 1) {
minWaterLevel.value = dom.min * 1 minWaterLevel.value = dom.min * 1
@ -277,7 +277,7 @@ function minWaterLevelInput() {
} }
} }
function maxWaterLevelInput() { function maxWaterLevelInput() {
let dom = document.getElementById('maxWaterLevel') let dom: any = document.getElementById('maxWaterLevel')
if (minWaterLevel.value != '.') { if (minWaterLevel.value != '.') {
if (maxWaterLevel.value < dom.min * 1) { if (maxWaterLevel.value < dom.min * 1) {
maxWaterLevel.value = dom.min * 1 maxWaterLevel.value = dom.min * 1
@ -299,7 +299,7 @@ function maxWaterLevelInput() {
} }
} }
function areaInput() { function areaInput() {
let dom = document.getElementById('area') let dom: any = document.getElementById('area')
if (minWaterLevel.value != '.') { if (minWaterLevel.value != '.') {
if (area.value < dom.min * 1) { if (area.value < dom.min * 1) {
area.value = dom.min * 1 area.value = dom.min * 1
@ -315,7 +315,7 @@ function areaInput() {
} }
} }
function waterVolumeInput() { function waterVolumeInput() {
let dom = document.getElementById('waterVolume') let dom: any = document.getElementById('waterVolume')
if (waterVolume.value < dom.min * 1) { if (waterVolume.value < dom.min * 1) {
waterVolume.value = dom.min * 1 waterVolume.value = dom.min * 1
} else if (waterVolume.value > dom.max * 1) { } else if (waterVolume.value > dom.max * 1) {
@ -331,7 +331,7 @@ function waterVolumeInput() {
} }
} }
function risingSpeedInput() { function risingSpeedInput() {
let dom = document.getElementById('risingSpeed') let dom: any = document.getElementById('risingSpeed')
if (risingSpeed.value != '.') { if (risingSpeed.value != '.') {
if (risingSpeed.value < dom.min * 1) { if (risingSpeed.value < dom.min * 1) {
risingSpeed.value = dom.min * 1 risingSpeed.value = dom.min * 1

View File

@ -1,4 +1,4 @@
<template> <!-- <template>
<Dialog ref="baseDialog" title="地形开挖" left="180px" top="100px" :closeCallback="closeCallBack"> <Dialog ref="baseDialog" title="地形开挖" left="180px" top="100px" :closeCallback="closeCallBack">
<template #content> <template #content>
<span class="custom-divider"></span> <span class="custom-divider"></span>
@ -53,8 +53,8 @@ import { ref, reactive } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog = ref(null) const baseDialog: any = ref(null)
const eventBus = inject('bus') const eventBus: any = inject('bus')
var height: any = ref(10) var height: any = ref(10)
@ -62,7 +62,7 @@ var excavation: any = reactive([])
eventBus.on('terrainExcavationDialog', () => { eventBus.on('terrainExcavationDialog', () => {
baseDialog.value?.open() baseDialog.value?.open()
excavation = new YJ.Analysis.TerrainExcavation(this.sdk, { height: 10 }) excavation = new (window as any).YJ.Analysis.TerrainExcavation(this.sdk, { height: 10 })
}) })
const changeHeight = () => { const changeHeight = () => {
@ -88,4 +88,4 @@ const clear = (e) => {
} }
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style> -->

View File

@ -87,8 +87,8 @@ import { ref, reactive } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog = ref(null) const baseDialog: any = ref(null)
const eventBus = inject('bus') const eventBus: any = inject('bus')
const viewPointHeight: any = ref(1.8) const viewPointHeight: any = ref(1.8)
var horizontalViewAngle: any = ref(90) var horizontalViewAngle: any = ref(90)
@ -98,13 +98,13 @@ var timeout: any = reactive([])
eventBus.on('viewShedDialog', () => { eventBus.on('viewShedDialog', () => {
baseDialog.value?.open() baseDialog.value?.open()
viewShed && viewShed.destroy && viewShed.destroy() viewShed && viewShed.destroy && viewShed.destroy()
viewShed = new YJ.Analysis.ViewShed(window.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 = contentElm.querySelector("input[name='horizontalViewAngle']") let e_horizontalViewAngle:any = contentElm.querySelector("input[name='horizontalViewAngle']")
let rangeNodeActive = 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 = 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 + '%'
@ -117,9 +117,9 @@ eventBus.on('viewShedDialog', () => {
}) })
function inputFun() { function inputFun() {
let contentElm = document.getElementsByClassName('view-shed')[0] let contentElm = document.getElementsByClassName('view-shed')[0]
let rangeNodeActive = 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:any = rangeNodeActive.getElementsByClassName('range-node-active-text')[0]
let rangeProcess = 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 + '%'
@ -138,7 +138,7 @@ const closeCallBack = (e) => {
horizontalViewAngle.value = 90 horizontalViewAngle.value = 90
} }
function viewPointHeightInput(e) { function viewPointHeightInput(e) {
let dom = 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

View File

@ -43,8 +43,8 @@ import { ref, reactive } from 'vue'
import { inject } from 'vue' import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
const baseDialog = ref(null) const baseDialog: any = ref(null)
const eventBus = inject('bus') const eventBus: any = inject('bus')
const viewPointHeight: any = ref(1.8) const viewPointHeight: any = ref(1.8)
var visibility: any = reactive([]) var visibility: any = reactive([])
eventBus.on('analysisDialog', () => { eventBus.on('analysisDialog', () => {
@ -53,7 +53,7 @@ eventBus.on('analysisDialog', () => {
const clangeViewPointHeight = () => {} const clangeViewPointHeight = () => {}
const viewPointHeightInput = () => { const viewPointHeightInput = () => {
let dom = 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) {
@ -61,16 +61,16 @@ const viewPointHeightInput = () => {
} }
} }
const closeCallBack = (e) => { const closeCallBack = (e) => {
viewPointHeight.value = 1.8 viewPointHeight.value = 1.8;
YJ.Measure.SetMeasureStatus(false) (window as any).YJ.Measure.SetMeasureStatus(false)
// visibility && visibility.end() // visibility && visibility.end()
} }
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.analysisArr && (window.analysisArr = []) !(window as any).analysisArr && ((window as any).analysisArr = []);
window.analysisArr.push(visibility) (window as any).analysisArr.push(visibility);
baseDialog.value?.close() baseDialog.value?.close()
} }
</script> </script>

View File

@ -61,6 +61,7 @@ let originalOptions: any
let that: any let that: any
const colorRef = ref(null) const colorRef = ref(null)
const open = async (id: any) => { const open = async (id: any) => {
id = (window as any).standTextid
that = window.earth.entityMap.get(id) that = window.earth.entityMap.get(id)
originalOptions = structuredClone(that.options) originalOptions = structuredClone(that.options)
entityOptions.value = that entityOptions.value = that

View File

@ -29,10 +29,10 @@
<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> -->
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -49,6 +49,7 @@ import attackArrow from '../components/propertyBox/attackArrow.vue'
import richText from '../components/propertyBox/richText.vue' import richText from '../components/propertyBox/richText.vue'
import groundText from '../components/propertyBox/groundText.vue' import groundText from '../components/propertyBox/groundText.vue'
import standText from '../components/propertyBox/standText.vue' import standText from '../components/propertyBox/standText.vue'
import circleObject from '../components/propertyBox/circleObject.vue'
import addDirectory from '@/components/dialog/directory.vue' import addDirectory from '@/components/dialog/directory.vue'
import firstMenu from '@/views/components/leftSide/leftSideFirst.vue' import firstMenu from '@/views/components/leftSide/leftSideFirst.vue'
import bottomMenu from '@/views/components/bottomSide/bottomSide.vue' import bottomMenu from '@/views/components/bottomSide/bottomSide.vue'
@ -119,7 +120,7 @@ eventBus.on('openDialog', async (sourceType: any, id: any) => {
dynamicComponentRef.value?.open(id) dynamicComponentRef.value?.open(id)
break break
case 'circle': case 'circle':
currentComponent.value = polygonObject currentComponent.value = circleObject
await nextTick() await nextTick()
dynamicComponentRef.value?.open(id, 'circle') dynamicComponentRef.value?.open(id, 'circle')
break; break;
@ -129,7 +130,7 @@ eventBus.on('openDialog', async (sourceType: any, id: any) => {
dynamicComponentRef.value?.open(id, 'rectangle') dynamicComponentRef.value?.open(id, 'rectangle')
break break
case 'rendezvous': case 'rendezvous':
currentComponent.value = rendezvous currentComponent.value = polygonObject
await nextTick() await nextTick()
dynamicComponentRef.value?.open(id, 'rendezvous') dynamicComponentRef.value?.open(id, 'rendezvous')
break break