This commit is contained in:
zh
2025-10-28 16:33:08 +08:00
parent 8fa6b6155f
commit 12b08cf243
18 changed files with 433 additions and 164 deletions

View File

@ -26,7 +26,6 @@ declare module 'vue' {
ElPagination: typeof import('element-plus/es')['ElPagination']
ElRow: typeof import('element-plus/es')['ElRow']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSelectV2: typeof import('element-plus/es')['ElSelectV2']
ElSlider: typeof import('element-plus/es')['ElSlider']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable']

File diff suppressed because one or more lines are too long

View File

@ -56,9 +56,29 @@ export const initMapData = async (type, data, cd) => {
break
case 'layer':
data.host = baseURL
console.log('data', data)
console.log('layer', data)
entityObject = new YJ.Obj.Layer(window.earth, data)
break
case 'gdslImagery':
data.host = baseURL
console.log('gdslImagery', data)
entityObject = new YJ.Obj.GDSLImagery(window.earth, data)
break
case 'gdlwImagery':
data.host = baseURL
console.log('gdlwImagery', data)
entityObject = new YJ.Obj.GDLWImagery(window.earth, data)
break
case 'arcgisBlueImagery':
data.host = baseURL
console.log('arcgisBlueImagery', data)
entityObject = new YJ.Obj.ArcgisBLUEImagery(window.earth, data)
break
case 'arcgisWximagery':
data.host = baseURL
console.log('arcgisWximagery', data)
entityObject = new YJ.Obj.ArcgisWXImagery(window.earth, data)
break
case 'tileset':
data.host = baseURL
entityObject = new YJ.Obj.Tileset(window.earth, data)

View File

@ -1,7 +1,7 @@
<template>
<div
class="YJ-custom-base-dialog"
:class="className"
:class="{'dialog-en': isEN, [className]: className}"
ref="baseDialog"
:id="id"
v-if="dialogVisible"
@ -23,8 +23,9 @@
</template>
<script setup>
import { ref, watch, onMounted, nextTick } from 'vue'
import { ref, watch, onMounted, nextTick, computed } from 'vue'
import { useI18n } from 'vue-i18n'
const { t, locale } = useI18n()
const props = defineProps({
title: {
type: String,
@ -96,6 +97,7 @@ const baseDialog = ref(null)
const titleBox = ref(null)
const dialogContent = ref(null)
const tableData = ref([])
const isEN = ref(false)
// 监听show属性变化
watch(
@ -109,6 +111,12 @@ watch(
// 组件挂载后执行
onMounted(() => {
// 可以在这里添加初始化逻辑
if(locale.value === 'zh-EN') {
isEN.value = true
}
else {
isEN.value = false
}
})
// 方法定义

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.2 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="13.9600830078125" height="8.92999267578125" viewBox="0 0 15.9600830078125 8.92999267578125" fill="none"><path d="M12.8301 8.92999L1.25006 8.92999L15.2101 -1.62125e-05L12.8301 8.92999Z" fill="#00FFFF" ></path></svg>

After

Width:  |  Height:  |  Size: 306 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="13.0001220703125" height="6" viewBox="0 0 13.0001220703125 6" fill="none"><path d="M6.84619 6L13.0001 0L0 0L6.84619 6Z" fill="#CCCCCC" ></path></svg>

After

Width:  |  Height:  |  Size: 241 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1,19 +1,19 @@
import './assets/main.css'
import {createApp} from 'vue'
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 引入中文语言包
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import App from './App.vue'
import router from './router'
import {createI18n} from 'vue-i18n'
import {setupStore} from './store'
import { createI18n } from 'vue-i18n'
import { setupStore } from './store'
import zhCN from './I18n/zh-CN'
import zhTW from './I18n/zh-TW'
import zhEN from './I18n/zh-EN'
import 'virtual:svg-icons-register'
import {setupSvgIcon} from './icons'
import {EventBusPlugin} from './utils/bus'
import { setupSvgIcon } from './icons'
import { EventBusPlugin } from './utils/bus'
import './assets/styles/font.css'
import './assets/iconfont/font_4587902_y4fhjyq8fxn'
// import './assets/styles/dhtmlxgantt.css'
@ -75,11 +75,14 @@ const i18n = createI18n({
});
let systemSetting = JSON.parse(localStorage.getItem("systemSetting") || '{}')
let skin = systemSetting.skinInfo ? systemSetting.skinInfo : "color1";
let colorVariable = Array.from(theme[skin].keys());
colorVariable.forEach((key:any) => {
console.log('key', key)
document.documentElement.style.setProperty(key, theme[skin].get(key));
});
if(!theme[skin]) {
skin = 'color1'
}
let colorVariable = Array.from(theme[skin].keys());
colorVariable.forEach((key: any) => {
console.log('key', key)
document.documentElement.style.setProperty(key, theme[skin].get(key));
});
document.title = i18n.global.t('title');

View File

@ -1,40 +1,92 @@
<template>
<div class="bottomMenuBox zIndex9">
<div class="bottomMenuBox zIndex9" ref="bottomMenuBox">
<div class="animate__animated bottomMenu">
<div class="bottom_box" v-for="(item, i) of bottomMenuList" :key="i" :title="t('bottomMenu.' + item.sourceType)"
@click="addMarker(item)">
<svg class="bottom_box_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="117.030029296875" height="44" viewBox="0 0 117.030029296875 44" fill="none" preserveAspectRatio="none">
<path fill="#000000" fill-opacity="0.5"
d="M117.03 12.08L109.78 44L7.18002 44L1.52588e-05 31.57L7.18002 0L109.78 0L117.03 12.08" />
<path fill-rule="evenodd" fill="url(#linear_border_2442_315_0)"
d="M117.03 12.08L109.78 44L7.18002 44L1.52588e-05 31.57L7.18002 0L109.78 0L117.03 12.08ZM108.931 1.5L115.434 12.3353L108.583 42.5L8.04583 42.5L1.59311 31.3291L8.37717 1.5L108.931 1.5Z" />
<defs>
<linearGradient id="linear_border_2442_315_0" x1="117.030029296875" y1="-1.7520751953125"
x2="15.7401123046875" y2="40.47381591796875" gradientUnits="userSpaceOnUse">
<stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" />
<stop offset="1" stop-color="var(--color-border1)" />
</linearGradient>
</defs>
</svg>
<svg class="bottom_box_bg bottom_box_bg_hover" style="opacity: 0;" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="118.09130859375" height="45"
viewBox="0 0 118.09130859375 45" fill="none" preserveAspectRatio="none">
<path fill="url(#linear_fill_2442_2996_1)"
d="M117.559 12.58L110.309 44.5L7.70906 44.5L0.529053 32.07L7.70906 0.5L110.309 0.5L117.559 12.58" />
<defs>
<linearGradient id="linear_fill_2442_2996_1" x1="56.548828125" y1="44.5" x2="56.54931640625" y2="0.5"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.25" />
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
</linearGradient>
</defs>
</svg>
<svg-icon :name="item.sourceType" :size="20" color="rgba(var(--color-base1), 1)"></svg-icon>
<div class="span">
{{ t('bottomMenu.' + item.sourceType) }}
<div class="bottom_box" v-for="(item, i) of bottomMenuList" :key="i" :title="t('bottomMenu.' + item.sourceType)">
<div class="bottom_box_content" @click="addMarker(item, $event)">
<svg class="bottom_box_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="117.030029296875" height="44" viewBox="0 0 117.030029296875 44" fill="none"
preserveAspectRatio="none">
<path fill="#000000" fill-opacity="0.5"
d="M117.03 12.08L109.78 44L7.18002 44L1.52588e-05 31.57L7.18002 0L109.78 0L117.03 12.08" />
<path fill-rule="evenodd" fill="url(#linear_border_2442_315_0)"
d="M117.03 12.08L109.78 44L7.18002 44L1.52588e-05 31.57L7.18002 0L109.78 0L117.03 12.08ZM108.931 1.5L115.434 12.3353L108.583 42.5L8.04583 42.5L1.59311 31.3291L8.37717 1.5L108.931 1.5Z" />
<defs>
<linearGradient id="linear_border_2442_315_0" x1="117.030029296875" y1="-1.7520751953125"
x2="15.7401123046875" y2="40.47381591796875" gradientUnits="userSpaceOnUse">
<stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" />
<stop offset="1" stop-color="var(--color-border1)" />
</linearGradient>
</defs>
</svg>
<svg class="bottom_box_bg bottom_box_bg_hover" style="opacity: 0;" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="118.09130859375" height="45"
viewBox="0 0 118.09130859375 45" fill="none" preserveAspectRatio="none">
<path fill="url(#linear_fill_2442_2996_1)"
d="M117.559 12.58L110.309 44.5L7.70906 44.5L0.529053 32.07L7.70906 0.5L110.309 0.5L117.559 12.58" />
<defs>
<linearGradient id="linear_fill_2442_2996_1" x1="56.548828125" y1="44.5" x2="56.54931640625" y2="0.5"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.25" />
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
</linearGradient>
</defs>
</svg>
<svg-icon :name="item.sourceType" :size="20" color="rgba(var(--color-base1), 1)"></svg-icon>
<svg-icon class="subscript1" v-if="item.children" name="subscript1" :size="18"
color="rgba(var(--color-base1), 1)"></svg-icon>
<div class="span">
{{ t('bottomMenu.' + item.sourceType) }}
</div>
</div>
<div class="bottom_children" v-if="item.children" v-show="item.childrenShow">
<div class="bottom_childre_box" v-for="(item2, m) of item.children" :key="m"
@click="addMarker(item2, $event)">
<svg class="bottom_childre_box_bg" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="6vw" height="44.5" viewBox="0 0 119 35.5" fill="none"
preserveAspectRatio="none">
<path d="M11 0.5L108 0.5L118 35.5L1 35.5L11 0.5Z" stroke="url(#linear_border_2485_3)" stroke-width="1"
fill="#000000" fill-opacity="0.5" />
<path d="M118 34.5L1 34.5L0 36.5L119 36.5L118 34.5Z" fill-rule="evenodd"
fill="url(#linear_fill_2485_4)" />
</svg>
<svg class="bottom_childre_box_bg bottom_childre_box_bg_hover" style="opacity: 0;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="118.32568359375"
height="36" viewBox="0 0 118.32568359375 36" fill="none" preserveAspectRatio="none">
<path fill="url(#linear_fill_2253_24_1)"
d="M10.6628 0.5L107.663 0.5L117.663 35.5L0.662842 35.5L10.6628 0.5Z" />
</svg>
<svg-icon :name="item2.sourceType" :size="20" color="rgba(var(--color-base1), 1)"
:strokeWidth="item2.sourceType == 'ellipse' ? 1.5 : 0.1"></svg-icon>
<div class="span">
{{ t('bottomMenu.' + item2.sourceType) }}
</div>
</div>
<svg-icon class="subscript2" name="subscript2" :size="14" color="rgba(var(--color-base1), 1)"></svg-icon>
</div>
</div>
<svg>
<defs>
<linearGradient id="linear_border_2485_3" x1="59.5" y1="35.5" x2="59.5" y2="0.5"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="rgb(var(--color-base1))" />
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
</linearGradient>
<linearGradient id="linear_fill_2485_4" x1="0" y1="34.101806640625" x2="102.996826171875"
y2="43.6986083984375" gradientUnits="userSpaceOnUse">
<stop offset="0.0625" stop-color="rgb(var(--color-base1))" />
<stop offset="1" stop-color="var(--color-border1)" />
</linearGradient>
</defs>
</svg>
<svg>
<defs>
<linearGradient id="linear_fill_2253_24_1" x1="61.658447265625" y1="35.5" x2="61.6580810546875" y2="0.5"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="rgba(var(--color-base1), 1)" stop-opacity="0.25" />
<stop offset="1" stop-color="rgba(var(--color-base1), 1)" stop-opacity="0" />
</linearGradient>
</defs>
</svg>
</div>
<div class="bottom_left" @click="fold">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"
@ -84,13 +136,22 @@
import { useI18n } from 'vue-i18n'
import { inject } from 'vue'
import { addMapSource } from '../../../common/addMapSource'
const { ipcRenderer } = require('electron')
const { t } = useI18n()
const eventBus: any = inject('bus')
ipcRenderer.invoke('get-available-port').then((port) => {
availablePort.value = port
})
const bottomMenuBox = ref()
const availablePort = ref(55110)
const isFolded: any = ref(false) // 添加折叠状态
const initialPositions: any = ref({}) // 保存初始位置
const isAnimating: any = ref(false) // 添加动画状态
onMounted(() => {
for (let i = 0; i < bottomMenuList.value.length; i++) {
bottomMenuList.value[i].ref = bottomMenuBox.value.getElementsByClassName('bottom_box')[i].getElementsByClassName('subscript1')[0]
}
// 保存初始位置
const items = document.querySelectorAll('.bottom_box')
items.forEach((item: any, index) => {
@ -103,6 +164,7 @@ const bottomMenuList = ref([
key: 'groundText',
sourceType: 'groundText',
className: 'public',
ref: ref(null),
fun: () => {
eventBus.emit('openDialog', 'addGroundText')
}
@ -112,6 +174,7 @@ const bottomMenuList = ref([
key: 'standText',
sourceType: 'standText',
className: 'public',
ref: ref(null),
fun: () => {
eventBus.emit('openDialog', 'addStandText')
// eventBus.emit("openDialog", 'standText');
@ -122,6 +185,7 @@ const bottomMenuList = ref([
key: 'DrawPoint',
sourceType: 'point',
className: 'public',
ref: ref(null),
fun: () => {
let Draw = new YJ.Draw.DrawPoint(window.earth)
Draw.start(async (a, position) => {
@ -139,6 +203,15 @@ const bottomMenuList = ref([
id: id,
name: name,
position: position,
billboard: {
show: true,
image:
YJ.Global.getBillboardDefaultUrl() ||
"http://localhost:" +
availablePort.value +
"/" +
"GEMarker1/A-ablu-blank.png",
},
attribute: {
goods: {
content: [
@ -170,6 +243,7 @@ const bottomMenuList = ref([
key: 'DrawPolyline',
sourceType: 'line',
className: 'public',
ref: ref(null),
fun: () => {
// eventBus.emit("openDialog", 'line', 'aaa');
// return
@ -191,39 +265,43 @@ const bottomMenuList = ref([
}
})
})
}
},
{
sourceName: '曲线标注',
key: 'DrawPolyline',
sourceType: 'curve',
className: 'public',
fun: () => {
let Draw = new YJ.Draw.DrawPolyline(window.earth, { curve: true })
Draw.start(async (a, positions) => {
if (!positions || positions.length < 2) {
return
},
childrenShow: false,
children: [
{
sourceName: '曲线标注',
key: 'DrawPolyline',
sourceType: 'curve',
className: 'public',
fun: () => {
let Draw = new YJ.Draw.DrawPolyline(window.earth, { curve: true })
Draw.start(async (a, positions) => {
if (!positions || positions.length < 2) {
return
}
let id = new YJ.Tools().randomString()
let name = '曲线标注'
await addMapSource({
type: 'curve',
id: id,
sourceName: name,
opt: {
id: id,
name: name,
positions: positions
}
})
})
}
let id = new YJ.Tools().randomString()
let name = '曲线标注'
await addMapSource({
type: 'curve',
id: id,
sourceName: name,
opt: {
id: id,
name: name,
positions: positions
}
})
})
}
},
]
},
{
sourceName: '面标注',
key: 'DrawPolygon',
sourceType: 'panel',
className: 'public',
ref: ref(null),
fun: () => {
let Draw = new YJ.Draw.DrawPolygon(window.earth)
Draw.start(async (a, positions) => {
@ -255,11 +333,15 @@ const bottomMenuList = ref([
key: 'DrawCircle',
sourceType: 'circle',
className: 'public',
ref: ref(null),
fun: () => {
let Draw = new YJ.Draw.DrawCircle(window.earth)
Draw.start(async (a, opt) => {
if (!opt) {
return
}
let id = new YJ.Tools().randomString()
let name = '圆'
let name = '圆'
await addMapSource({
type: 'circle',
id: id,
@ -272,13 +354,45 @@ const bottomMenuList = ref([
}
})
})
}
},
children: [
{
sourceName: '椭圆标注',
key: 'DrawElliptic',
sourceType: 'ellipse',
className: 'public',
fun: () => {
let Draw = new YJ.Draw.DrawElliptic(window.earth)
Draw.start(async (a, opt) => {
if (!opt) {
return
}
let id = new YJ.Tools().randomString()
let name = '椭圆'
await addMapSource({
type: 'ellipse',
id: id,
sourceName: name,
opt: {
id: id,
name: name,
center: opt.center,
bearing: opt.bearing,
semiMinorAxis: opt.semiMinorAxis,
semiMajorAxis: opt.semiMajorAxis,
}
})
})
}
}
]
},
{
sourceName: '矩形',
key: 'DrawRect',
sourceType: 'rectangle',
className: 'public',
ref: ref(null),
fun: () => {
let Draw = new YJ.Draw.DrawRect(window.earth)
Draw.start(async (a, positions) => {
@ -309,6 +423,7 @@ const bottomMenuList = ref([
key: 'DrawAssemble',
sourceType: 'rendezvous',
className: 'public',
ref: ref(null),
fun: () => {
let Draw = new YJ.Draw.DrawAssemble(window.earth)
Draw.start(async (a, positions) => {
@ -339,6 +454,7 @@ const bottomMenuList = ref([
key: 'DrawAttackArrow',
sourceType: 'attackArrow',
className: 'public',
ref: ref(null),
fun: () => {
let Draw = new YJ.Draw.DrawAttackArrow(window.earth)
Draw.start(async (a, positions) => {
@ -370,6 +486,7 @@ const bottomMenuList = ref([
key: 'DrawPincerArrow',
sourceType: 'pincerArrow',
className: 'public',
ref: ref(null),
fun: () => {
let Draw = new YJ.Draw.DrawPincerArrow(window.earth)
Draw.start(async (a, positions) => {
@ -449,9 +566,25 @@ const fold = () => {
(itemCount - 1) * itemDelay + itemDuration
)
}
const addMarker = (item: any) => {
item.fun()
const addMarker = (item: any, event) => {
if (item.children && event.target.classList.contains('subscript1')) {
item.childrenShow = true
}
else {
item.fun()
}
}
document.addEventListener('click', (e: any) => {
bottomMenuList.value.forEach((item: any) => {
if (!e.target || !item.ref || e.target !== item.ref) {
item.childrenShow = false
}
})
if (e.target && !e.target.classList.contains('subscript1')) {
}
})
</script>
<style scoped lang="scss">
@ -482,7 +615,23 @@ const addMarker = (item: any) => {
cursor: pointer;
position: relative;
>.bottom_box_bg {
.bottom_box_content {
display: flex;
justify-content: center;
align-items: center;
width: 6vw;
height: 100%;
cursor: pointer;
position: relative;
&:hover {
>.bottom_box_bg {
opacity: 1 !important;
}
}
}
.bottom_box_bg {
width: 100%;
height: 100%;
position: absolute;
@ -501,19 +650,72 @@ const addMarker = (item: any) => {
transform: scale(0.8);
}
>.span {
color: #fff;
font-family: 黑体;
font-size: 1rem;
max-width: 4.5vw;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-family: 'alimamashuheiti';
font-weight: 400;
text-shadow: 0px 0px 9px var(--color-text-shadow);
box-sizing: border-box;
padding-left: 0.5rem;
.subscript1 {
position: absolute;
bottom: 1px;
right: 0.4vw;
pointer-events: all;
::v-deep use {
pointer-events: none;
}
}
.bottom_children {
position: absolute;
bottom: 58px;
right: -1px;
.bottom_childre_box {
display: flex;
justify-content: center;
align-items: center;
width: 6vw;
height: 44px;
cursor: pointer;
position: relative;
.bottom_childre_box_bg {
width: 100%;
height: 100%;
position: absolute;
z-index: -1;
}
&:hover {
>.bottom_childre_box_bg_hover {
opacity: 1 !important;
}
}
* {
pointer-events: none;
}
}
.subscript2 {
position: absolute;
left: calc(50% - 7px);
bottom: -12px;
}
}
.bottom_childre_box,
.bottom_box_content {
>.span {
color: #fff;
font-family: 黑体;
font-size: 1rem;
max-width: 4.5vw;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-family: 'alimamashuheiti';
font-weight: 400;
text-shadow: 0px 0px 9px var(--color-text-shadow);
box-sizing: border-box;
padding-left: 0.5rem;
}
}
@media screen and (max-width: 1550px) {
@ -538,15 +740,6 @@ const addMarker = (item: any) => {
}
}
}
.bottom_box:hover {
// background: url('../../../assets/images/hongse/bottom1.png') no-repeat;
// background-size: 100% 100%;
>.bottom_box_bg_hover {
opacity: 1 !important;
}
}
}
.bottom_left {

View File

@ -36,11 +36,24 @@ const date = ref({
hms: '',
week: 0
})
window.addEventListener("setItemEvent", (e:any) => {
window.addEventListener("setItemEvent", (e: any) => {
console.log('e', e)
if (e.key == "systemSetting") {
let obj = JSON.parse(e.newValue);
skinInfo.value = obj.skinInfo;
let setting = JSON.parse(e.newValue)
let dialogElm: any = document.getElementsByClassName('YJ-custom-base-dialog')
if (setting.language === 'zh-EN') {
for (let i = 0; i < dialogElm.length; i++) {
dialogElm[i].classList.add('dialog-en');
}
}
else {
for (let i = 0; i < dialogElm.length; i++) {
dialogElm[i].classList.remove('dialog-en');
}
}
}
});
var weatherClick = ref(false)
@ -90,9 +103,10 @@ var clickFun = () => {
position: fixed;
top: 0;
left: 0;
z-index: 19;
z-index: 999;
pointer-events: none;
> * {
>* {
pointer-events: all;
}

View File

@ -1,5 +1,5 @@
<template>
<Dialog ref="baseDialog" :title="title+'属性'" left="180px" top="100px" className="polygon" :closeCallback="closeCallback">
<Dialog ref="baseDialog" :title="title+'属性'" left="180px" top="100px" className="circle" :closeCallback="closeCallback">
<template #content>
<span class="custom-divider"></span>
<div class="div-item">
@ -184,6 +184,12 @@ let originalOptions: any
let that: any
const open = async (id: any, type: any) => {
if(type && type === 'circle') {
title.value = '圆'
}
else if(type && type === 'ellipse') {
title.value = '椭圆'
}
that = window.earth.entityMap.get(id)
originalOptions = structuredClone(that.options)
entityOptions.value = that

View File

@ -571,12 +571,12 @@ export const useRightOperate = () => {
);
let layers: any = [];
let arr = [
"ArcgisWXImagery",
"ArcgisBLUEImagery",
"ArcgisLWImagery",
"GDLWImagery",
"GDWXImagery",
"GDSLImagery",
"arcgisWximagery",
"arcgisBlueImagery",
"arcgisLwImagery",
"gdlwImagery",
"gdwxImagery",
"gdslImagery",
"layer",
];
nodes.forEach((item) => {

View File

@ -253,6 +253,7 @@ export const useTree = () => {
*/
const onCheck = async (event: any, treeId: any, treeNode: any) => {
console.log(treeNode, 'treeNode')
let p_ids: any = []
let parentNode = treeNode.getParentNode();
// if(treeNode.sourceType == 'directory') {}
@ -281,23 +282,31 @@ export const useTree = () => {
// 如果所有子节点都未被选中,且父节点当前是选中状态,则取消父节点选择
if (allUnchecked && parentNode.isShow) {
p_ids.push(
{
id: parentNode.id,
isShow: 0
}
)
window.treeObj.checkNode(parentNode, false, true);
// 递归检查上一级父节点
var grandParent = parentNode.getParentNode();
if (grandParent) {
checkChildNodes(grandParent);
}
}
else {
p_ids.push(
{
id: parentNode.id,
isShow: 1
}
)
}
// 递归检查上一级父节点
var grandParent = parentNode.getParentNode();
if (grandParent) {
checkChildNodes(grandParent);
}
}
let ids = [
{
id: treeNode.id,
isShow: treeNode.isShow ? 1 : 0
}
]
let ids = [...p_ids]
// 更新节点状态修改地图资源状态
function sourceStatus(node) {
ids.push({ id: node.id, isShow: node.isShow ? 1 : 0 })
@ -335,7 +344,7 @@ export const useTree = () => {
let params2 = {
"id": node.id,
"params": params,
"sourceName":node.sourceName,
"sourceName": node.sourceName,
"isShow": node.isShow ? 1 : 0,
}
cusUpdateNode({ id: node.id, sourceName: node.sourceName, params: JSON.stringify(params) })
@ -552,13 +561,12 @@ export const useTree = () => {
// console.log("获取图层指挥舱数据");
//初始化高德地图
let arr = [
"ArcgisWXImagery",
"ArcgisBLUEImagery",
"arcgisWximagery",
"arcgisBlueImagery",
"ArcgisLWImagery",
"GDLWImagery",
"GDWXImagery",
"GDSLImagery",
"layer",
"gdlwImagery",
"gdwxImagery",
"gdslImagery"
];
let res = await TreeApi.getTreeList()
@ -587,6 +595,15 @@ export const useTree = () => {
const obj = JSON.parse(res.data[i].params);
(window as any).pressModelMap.set(res.data[i].id + "_" + obj.modelId, res.data[i]);
}
if (arr.includes(res.data[i].sourceType) && !res.data[i].params) {
res.data[i].params = JSON.stringify({
id: res.data[i].id,
name: res.data[i].sourceName,
show: res.data[i].isShow,
alpha: 1,
brightness: 1
})
}
res.data[i].svg = await cusNodeIcon(res.data[i]);
}
}
@ -632,12 +649,12 @@ export const useTree = () => {
const initTreeCallBack = () => {
let arr = [
"ArcgisWXImagery",
"ArcgisBLUEImagery",
"arcgisWximagery",
"arcgisBlueImagery",
"ArcgisLWImagery",
"GDLWImagery",
"GDWXImagery",
"GDSLImagery",
"gdlwImagery",
"gdwxImagery",
"gdslImagery",
"layer",
];
let layers: any = []

View File

@ -168,12 +168,6 @@ export const useTreeNode = () => {
// detailFun: get_detail_layer,
// allowChildren: false,
},
picture: {
rightMenus: ['edit', 'del']
// render: renderPicture,
// detailFun: get_detail_picture,
// allowChildren: false,
},
model: {
rightMenus: ['edit', 'del', 'setView', 'resetView']
// detailFun: get_detail_glb,
@ -266,22 +260,22 @@ export const useTreeNode = () => {
// detailFun: get_detail_czml,
// allowChildren: true,
},
ArcgisWXImagery: {
arcgisWximagery: {
// render: renderArcgisWXImagery,
rightMenus: ['edit', 'del', 'layerRaise', 'layerLower', 'layerToTop', 'layerToBottom']
// detailFun: get_detail_null,
},
ArcgisBLUEImagery: {
arcgisBlueImagery: {
// render: renderArcgisBLUEImagery,
rightMenus: ['edit', 'del', 'layerRaise', 'layerLower', 'layerToTop', 'layerToBottom']
// detailFun: get_detail_null,
},
GDLWImagery: {
gdlwImagery: {
// render: renderGDLWImagery,
rightMenus: ['edit', 'del', 'layerRaise', 'layerLower', 'layerToTop', 'layerToBottom']
// detailFun: get_detail_null,
},
GDSLImagery: {
gdslImagery: {
// render: renderGDSLImagery,
rightMenus: ['edit', 'del', 'layerRaise', 'layerLower', 'layerToTop', 'layerToBottom']
// detailFun: get_detail_null,
@ -463,19 +457,25 @@ export const useTreeNode = () => {
}
console.log("----------", type);
let name = [
"GDSLImagery",
"GDLWImagery",
"ArcgisBLUEImagery",
"ArcgisWXImagery",
"gdslImagery",
"gdlwImagery",
"arcgisBlueImagery",
"arcgisWximagery",
].includes(type)
? "layer"
: type;
if (type == "Terrain") name = "terrain";
if (type == "road" && node.detail.imageType == "arrowRoad")
name = "lineDrawing";
let strokeWidth = 0.1
if(type === 'ellipse') {
strokeWidth = 1.5;
}
// return (type === 'directory' || type === 'FeatureCollection') ? undefined : `http://localhost:${availablePort}/icon/${name}.png`;
return (type === 'directory' || type === 'FeatureCollection') ? undefined : `
<svg class="svg-icon" style="color: rgba(var(--color-base2), 1);margin-top: 1px;width:100%;height:100%;fill: currentColor !important;stroke: currentColor !important;stroke-width: 0.1 !important;shape-rendering: geometricPrecision;">
<svg class="svg-icon" style="color: rgba(var(--color-base2), 1);margin-top: 1px;width:100%;height:100%;fill: currentColor !important;stroke: currentColor !important;stroke-width: ${strokeWidth} !important;shape-rendering: geometricPrecision;">
<use xlink:href="#icon-${name}" />
</svg>
`;

View File

@ -11,14 +11,8 @@
<firstMenu class="absolute zIndex9" ref="firstMenuRef"></firstMenu>
<!--底部菜单-->
<bottomMenu class="absolute zIndex9" ref="bottomMenuRef"></bottomMenu>
<input
type="file"
id="fileInputlink"
style="display: none"
multiple
accept=".jpeg,.png,.jpg,.mp4,.pdf"
@input="uploadFile"
/>
<input type="file" id="fileInputlink" style="display: none" multiple accept=".jpeg,.png,.jpg,.mp4,.pdf"
@input="uploadFile" />
<!-- 多点视线分析 -->
<!-- <Visibility ref="visibility"></Visibility> -->
@ -199,6 +193,11 @@ eventBus.on('openDialog', async (sourceType: any, id: any) => {
await nextTick()
dynamicComponentRef.value?.open(id, 'circle')
break
case 'ellipse':
currentComponent.value = circleObject
await nextTick()
dynamicComponentRef.value?.open(id, 'ellipse')
break
case 'rectangle':
currentComponent.value = polygonObject
await nextTick()
@ -230,6 +229,10 @@ eventBus.on('openDialog', async (sourceType: any, id: any) => {
dynamicComponentRef.value?.open(id)
break
case 'layer':
case 'gdslImagery':
case 'gdlwImagery':
case 'arcgisBlueImagery':
case 'arcgisWximagery':
currentComponent.value = layer
await nextTick()
dynamicComponentRef.value?.open(id)
@ -529,9 +532,9 @@ const getStatus = (time) => {
const currentTimestamp = Date.now()
if (timestamp > currentTimestamp) {
;(window as any).checkAuthIsValid = true
; (window as any).checkAuthIsValid = true
} else {
;(window as any).checkAuthIsValid = false
; (window as any).checkAuthIsValid = false
}
}