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'] ElPagination: typeof import('element-plus/es')['ElPagination']
ElRow: typeof import('element-plus/es')['ElRow'] ElRow: typeof import('element-plus/es')['ElRow']
ElSelect: typeof import('element-plus/es')['ElSelect'] ElSelect: typeof import('element-plus/es')['ElSelect']
ElSelectV2: typeof import('element-plus/es')['ElSelectV2']
ElSlider: typeof import('element-plus/es')['ElSlider'] ElSlider: typeof import('element-plus/es')['ElSlider']
ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable'] 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 break
case 'layer': case 'layer':
data.host = baseURL data.host = baseURL
console.log('data', data) console.log('layer', data)
entityObject = new YJ.Obj.Layer(window.earth, data) entityObject = new YJ.Obj.Layer(window.earth, data)
break 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': case 'tileset':
data.host = baseURL data.host = baseURL
entityObject = new YJ.Obj.Tileset(window.earth, data) entityObject = new YJ.Obj.Tileset(window.earth, data)

View File

@ -1,7 +1,7 @@
<template> <template>
<div <div
class="YJ-custom-base-dialog" class="YJ-custom-base-dialog"
:class="className" :class="{'dialog-en': isEN, [className]: className}"
ref="baseDialog" ref="baseDialog"
:id="id" :id="id"
v-if="dialogVisible" v-if="dialogVisible"
@ -23,8 +23,9 @@
</template> </template>
<script setup> <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({ const props = defineProps({
title: { title: {
type: String, type: String,
@ -96,6 +97,7 @@ const baseDialog = ref(null)
const titleBox = ref(null) const titleBox = ref(null)
const dialogContent = ref(null) const dialogContent = ref(null)
const tableData = ref([]) const tableData = ref([])
const isEN = ref(false)
// 监听show属性变化 // 监听show属性变化
watch( watch(
@ -109,6 +111,12 @@ watch(
// 组件挂载后执行 // 组件挂载后执行
onMounted(() => { 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 './assets/main.css'
import {createApp} from 'vue' import { createApp } from 'vue'
import ElementPlus from 'element-plus' import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css' import 'element-plus/dist/index.css'
// 引入中文语言包 // 引入中文语言包
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
import {createI18n} from 'vue-i18n' import { createI18n } from 'vue-i18n'
import {setupStore} from './store' import { setupStore } from './store'
import zhCN from './I18n/zh-CN' import zhCN from './I18n/zh-CN'
import zhTW from './I18n/zh-TW' import zhTW from './I18n/zh-TW'
import zhEN from './I18n/zh-EN' import zhEN from './I18n/zh-EN'
import 'virtual:svg-icons-register' import 'virtual:svg-icons-register'
import {setupSvgIcon} from './icons' import { setupSvgIcon } from './icons'
import {EventBusPlugin} from './utils/bus' import { EventBusPlugin } from './utils/bus'
import './assets/styles/font.css' import './assets/styles/font.css'
import './assets/iconfont/font_4587902_y4fhjyq8fxn' import './assets/iconfont/font_4587902_y4fhjyq8fxn'
// import './assets/styles/dhtmlxgantt.css' // import './assets/styles/dhtmlxgantt.css'
@ -75,11 +75,14 @@ const i18n = createI18n({
}); });
let systemSetting = JSON.parse(localStorage.getItem("systemSetting") || '{}') let systemSetting = JSON.parse(localStorage.getItem("systemSetting") || '{}')
let skin = systemSetting.skinInfo ? systemSetting.skinInfo : "color1"; let skin = systemSetting.skinInfo ? systemSetting.skinInfo : "color1";
let colorVariable = Array.from(theme[skin].keys()); if(!theme[skin]) {
colorVariable.forEach((key:any) => { skin = 'color1'
console.log('key', key) }
document.documentElement.style.setProperty(key, theme[skin].get(key)); 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'); document.title = i18n.global.t('title');

View File

@ -1,40 +1,92 @@
<template> <template>
<div class="bottomMenuBox zIndex9"> <div class="bottomMenuBox zIndex9" ref="bottomMenuBox">
<div class="animate__animated bottomMenu"> <div class="animate__animated bottomMenu">
<div class="bottom_box" v-for="(item, i) of bottomMenuList" :key="i" :title="t('bottomMenu.' + item.sourceType)" <div class="bottom_box" v-for="(item, i) of bottomMenuList" :key="i" :title="t('bottomMenu.' + item.sourceType)">
@click="addMarker(item)"> <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" <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"> width="117.030029296875" height="44" viewBox="0 0 117.030029296875 44" fill="none"
<path fill="#000000" fill-opacity="0.5" preserveAspectRatio="none">
d="M117.03 12.08L109.78 44L7.18002 44L1.52588e-05 31.57L7.18002 0L109.78 0L117.03 12.08" /> <path fill="#000000" fill-opacity="0.5"
<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.08" />
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" /> <path fill-rule="evenodd" fill="url(#linear_border_2442_315_0)"
<defs> 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" />
<linearGradient id="linear_border_2442_315_0" x1="117.030029296875" y1="-1.7520751953125" <defs>
x2="15.7401123046875" y2="40.47381591796875" gradientUnits="userSpaceOnUse"> <linearGradient id="linear_border_2442_315_0" x1="117.030029296875" y1="-1.7520751953125"
<stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" /> x2="15.7401123046875" y2="40.47381591796875" gradientUnits="userSpaceOnUse">
<stop offset="1" stop-color="var(--color-border1)" /> <stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" />
</linearGradient> <stop offset="1" stop-color="var(--color-border1)" />
</defs> </linearGradient>
</svg> </defs>
<svg class="bottom_box_bg bottom_box_bg_hover" style="opacity: 0;" xmlns="http://www.w3.org/2000/svg" </svg>
xmlns:xlink="http://www.w3.org/1999/xlink" width="118.09130859375" height="45" <svg class="bottom_box_bg bottom_box_bg_hover" style="opacity: 0;" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 118.09130859375 45" fill="none" preserveAspectRatio="none"> xmlns:xlink="http://www.w3.org/1999/xlink" width="118.09130859375" height="45"
<path fill="url(#linear_fill_2442_2996_1)" viewBox="0 0 118.09130859375 45" fill="none" preserveAspectRatio="none">
d="M117.559 12.58L110.309 44.5L7.70906 44.5L0.529053 32.07L7.70906 0.5L110.309 0.5L117.559 12.58" /> <path fill="url(#linear_fill_2442_2996_1)"
<defs> d="M117.559 12.58L110.309 44.5L7.70906 44.5L0.529053 32.07L7.70906 0.5L110.309 0.5L117.559 12.58" />
<linearGradient id="linear_fill_2442_2996_1" x1="56.548828125" y1="44.5" x2="56.54931640625" y2="0.5" <defs>
gradientUnits="userSpaceOnUse"> <linearGradient id="linear_fill_2442_2996_1" x1="56.548828125" y1="44.5" x2="56.54931640625" y2="0.5"
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.25" /> gradientUnits="userSpaceOnUse">
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" /> <stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.25" />
</linearGradient> <stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
</defs> </linearGradient>
</svg> </defs>
<svg-icon :name="item.sourceType" :size="20" color="rgba(var(--color-base1), 1)"></svg-icon> </svg>
<div class="span"> <svg-icon :name="item.sourceType" :size="20" color="rgba(var(--color-base1), 1)"></svg-icon>
{{ t('bottomMenu.' + item.sourceType) }} <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>
</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>
<div class="bottom_left" @click="fold"> <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" <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 { useI18n } from 'vue-i18n'
import { inject } from 'vue' import { inject } from 'vue'
import { addMapSource } from '../../../common/addMapSource' import { addMapSource } from '../../../common/addMapSource'
const { ipcRenderer } = require('electron')
const { t } = useI18n() const { t } = useI18n()
const eventBus: any = inject('bus') 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 isFolded: any = ref(false) // 添加折叠状态
const initialPositions: any = ref({}) // 保存初始位置 const initialPositions: any = ref({}) // 保存初始位置
const isAnimating: any = ref(false) // 添加动画状态 const isAnimating: any = ref(false) // 添加动画状态
onMounted(() => { 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') const items = document.querySelectorAll('.bottom_box')
items.forEach((item: any, index) => { items.forEach((item: any, index) => {
@ -103,6 +164,7 @@ const bottomMenuList = ref([
key: 'groundText', key: 'groundText',
sourceType: 'groundText', sourceType: 'groundText',
className: 'public', className: 'public',
ref: ref(null),
fun: () => { fun: () => {
eventBus.emit('openDialog', 'addGroundText') eventBus.emit('openDialog', 'addGroundText')
} }
@ -112,6 +174,7 @@ const bottomMenuList = ref([
key: 'standText', key: 'standText',
sourceType: 'standText', sourceType: 'standText',
className: 'public', className: 'public',
ref: ref(null),
fun: () => { fun: () => {
eventBus.emit('openDialog', 'addStandText') eventBus.emit('openDialog', 'addStandText')
// eventBus.emit("openDialog", 'standText'); // eventBus.emit("openDialog", 'standText');
@ -122,6 +185,7 @@ const bottomMenuList = ref([
key: 'DrawPoint', key: 'DrawPoint',
sourceType: 'point', sourceType: 'point',
className: 'public', className: 'public',
ref: ref(null),
fun: () => { fun: () => {
let Draw = new YJ.Draw.DrawPoint(window.earth) let Draw = new YJ.Draw.DrawPoint(window.earth)
Draw.start(async (a, position) => { Draw.start(async (a, position) => {
@ -139,6 +203,15 @@ const bottomMenuList = ref([
id: id, id: id,
name: name, name: name,
position: position, position: position,
billboard: {
show: true,
image:
YJ.Global.getBillboardDefaultUrl() ||
"http://localhost:" +
availablePort.value +
"/" +
"GEMarker1/A-ablu-blank.png",
},
attribute: { attribute: {
goods: { goods: {
content: [ content: [
@ -170,6 +243,7 @@ const bottomMenuList = ref([
key: 'DrawPolyline', key: 'DrawPolyline',
sourceType: 'line', sourceType: 'line',
className: 'public', className: 'public',
ref: ref(null),
fun: () => { fun: () => {
// eventBus.emit("openDialog", 'line', 'aaa'); // eventBus.emit("openDialog", 'line', 'aaa');
// return // return
@ -191,39 +265,43 @@ const bottomMenuList = ref([
} }
}) })
}) })
} },
}, childrenShow: false,
{ children: [
sourceName: '曲线标注', {
key: 'DrawPolyline', sourceName: '曲线标注',
sourceType: 'curve', key: 'DrawPolyline',
className: 'public', sourceType: 'curve',
fun: () => { className: 'public',
let Draw = new YJ.Draw.DrawPolyline(window.earth, { curve: true }) fun: () => {
Draw.start(async (a, positions) => { let Draw = new YJ.Draw.DrawPolyline(window.earth, { curve: true })
if (!positions || positions.length < 2) { Draw.start(async (a, positions) => {
return 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: '面标注', sourceName: '面标注',
key: 'DrawPolygon', key: 'DrawPolygon',
sourceType: 'panel', sourceType: 'panel',
className: 'public', className: 'public',
ref: ref(null),
fun: () => { fun: () => {
let Draw = new YJ.Draw.DrawPolygon(window.earth) let Draw = new YJ.Draw.DrawPolygon(window.earth)
Draw.start(async (a, positions) => { Draw.start(async (a, positions) => {
@ -255,11 +333,15 @@ const bottomMenuList = ref([
key: 'DrawCircle', key: 'DrawCircle',
sourceType: 'circle', sourceType: 'circle',
className: 'public', className: 'public',
ref: ref(null),
fun: () => { fun: () => {
let Draw = new YJ.Draw.DrawCircle(window.earth) let Draw = new YJ.Draw.DrawCircle(window.earth)
Draw.start(async (a, opt) => { Draw.start(async (a, opt) => {
if (!opt) {
return
}
let id = new YJ.Tools().randomString() let id = new YJ.Tools().randomString()
let name = '圆' let name = '圆'
await addMapSource({ await addMapSource({
type: 'circle', type: 'circle',
id: id, 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: '矩形', sourceName: '矩形',
key: 'DrawRect', key: 'DrawRect',
sourceType: 'rectangle', sourceType: 'rectangle',
className: 'public', className: 'public',
ref: ref(null),
fun: () => { fun: () => {
let Draw = new YJ.Draw.DrawRect(window.earth) let Draw = new YJ.Draw.DrawRect(window.earth)
Draw.start(async (a, positions) => { Draw.start(async (a, positions) => {
@ -309,6 +423,7 @@ const bottomMenuList = ref([
key: 'DrawAssemble', key: 'DrawAssemble',
sourceType: 'rendezvous', sourceType: 'rendezvous',
className: 'public', className: 'public',
ref: ref(null),
fun: () => { fun: () => {
let Draw = new YJ.Draw.DrawAssemble(window.earth) let Draw = new YJ.Draw.DrawAssemble(window.earth)
Draw.start(async (a, positions) => { Draw.start(async (a, positions) => {
@ -339,6 +454,7 @@ const bottomMenuList = ref([
key: 'DrawAttackArrow', key: 'DrawAttackArrow',
sourceType: 'attackArrow', sourceType: 'attackArrow',
className: 'public', className: 'public',
ref: ref(null),
fun: () => { fun: () => {
let Draw = new YJ.Draw.DrawAttackArrow(window.earth) let Draw = new YJ.Draw.DrawAttackArrow(window.earth)
Draw.start(async (a, positions) => { Draw.start(async (a, positions) => {
@ -370,6 +486,7 @@ const bottomMenuList = ref([
key: 'DrawPincerArrow', key: 'DrawPincerArrow',
sourceType: 'pincerArrow', sourceType: 'pincerArrow',
className: 'public', className: 'public',
ref: ref(null),
fun: () => { fun: () => {
let Draw = new YJ.Draw.DrawPincerArrow(window.earth) let Draw = new YJ.Draw.DrawPincerArrow(window.earth)
Draw.start(async (a, positions) => { Draw.start(async (a, positions) => {
@ -449,9 +566,25 @@ const fold = () => {
(itemCount - 1) * itemDelay + itemDuration (itemCount - 1) * itemDelay + itemDuration
) )
} }
const addMarker = (item: any) => { const addMarker = (item: any, event) => {
item.fun() 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> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -482,7 +615,23 @@ const addMarker = (item: any) => {
cursor: pointer; cursor: pointer;
position: relative; 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%; width: 100%;
height: 100%; height: 100%;
position: absolute; position: absolute;
@ -501,19 +650,72 @@ const addMarker = (item: any) => {
transform: scale(0.8); transform: scale(0.8);
} }
>.span { .subscript1 {
color: #fff; position: absolute;
font-family: 黑体; bottom: 1px;
font-size: 1rem; right: 0.4vw;
max-width: 4.5vw; pointer-events: all;
overflow: hidden;
white-space: nowrap; ::v-deep use {
text-overflow: ellipsis; pointer-events: none;
font-family: 'alimamashuheiti'; }
font-weight: 400; }
text-shadow: 0px 0px 9px var(--color-text-shadow);
box-sizing: border-box; .bottom_children {
padding-left: 0.5rem; 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) { @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 { .bottom_left {

View File

@ -36,11 +36,24 @@ const date = ref({
hms: '', hms: '',
week: 0 week: 0
}) })
window.addEventListener("setItemEvent", (e:any) => { window.addEventListener("setItemEvent", (e: any) => {
console.log('e', e) console.log('e', e)
if (e.key == "systemSetting") { if (e.key == "systemSetting") {
let obj = JSON.parse(e.newValue); let obj = JSON.parse(e.newValue);
skinInfo.value = obj.skinInfo; 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) var weatherClick = ref(false)
@ -90,9 +103,10 @@ var clickFun = () => {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 19; z-index: 999;
pointer-events: none; pointer-events: none;
> * {
>* {
pointer-events: all; pointer-events: all;
} }

View File

@ -1,5 +1,5 @@
<template> <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> <template #content>
<span class="custom-divider"></span> <span class="custom-divider"></span>
<div class="div-item"> <div class="div-item">
@ -184,6 +184,12 @@ let originalOptions: any
let that: any let that: any
const open = async (id: any, type: 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) that = window.earth.entityMap.get(id)
originalOptions = structuredClone(that.options) originalOptions = structuredClone(that.options)
entityOptions.value = that entityOptions.value = that

View File

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

View File

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

View File

@ -168,12 +168,6 @@ export const useTreeNode = () => {
// detailFun: get_detail_layer, // detailFun: get_detail_layer,
// allowChildren: false, // allowChildren: false,
}, },
picture: {
rightMenus: ['edit', 'del']
// render: renderPicture,
// detailFun: get_detail_picture,
// allowChildren: false,
},
model: { model: {
rightMenus: ['edit', 'del', 'setView', 'resetView'] rightMenus: ['edit', 'del', 'setView', 'resetView']
// detailFun: get_detail_glb, // detailFun: get_detail_glb,
@ -266,22 +260,22 @@ export const useTreeNode = () => {
// detailFun: get_detail_czml, // detailFun: get_detail_czml,
// allowChildren: true, // allowChildren: true,
}, },
ArcgisWXImagery: { arcgisWximagery: {
// render: renderArcgisWXImagery, // render: renderArcgisWXImagery,
rightMenus: ['edit', 'del', 'layerRaise', 'layerLower', 'layerToTop', 'layerToBottom'] rightMenus: ['edit', 'del', 'layerRaise', 'layerLower', 'layerToTop', 'layerToBottom']
// detailFun: get_detail_null, // detailFun: get_detail_null,
}, },
ArcgisBLUEImagery: { arcgisBlueImagery: {
// render: renderArcgisBLUEImagery, // render: renderArcgisBLUEImagery,
rightMenus: ['edit', 'del', 'layerRaise', 'layerLower', 'layerToTop', 'layerToBottom'] rightMenus: ['edit', 'del', 'layerRaise', 'layerLower', 'layerToTop', 'layerToBottom']
// detailFun: get_detail_null, // detailFun: get_detail_null,
}, },
GDLWImagery: { gdlwImagery: {
// render: renderGDLWImagery, // render: renderGDLWImagery,
rightMenus: ['edit', 'del', 'layerRaise', 'layerLower', 'layerToTop', 'layerToBottom'] rightMenus: ['edit', 'del', 'layerRaise', 'layerLower', 'layerToTop', 'layerToBottom']
// detailFun: get_detail_null, // detailFun: get_detail_null,
}, },
GDSLImagery: { gdslImagery: {
// render: renderGDSLImagery, // render: renderGDSLImagery,
rightMenus: ['edit', 'del', 'layerRaise', 'layerLower', 'layerToTop', 'layerToBottom'] rightMenus: ['edit', 'del', 'layerRaise', 'layerLower', 'layerToTop', 'layerToBottom']
// detailFun: get_detail_null, // detailFun: get_detail_null,
@ -463,19 +457,25 @@ export const useTreeNode = () => {
} }
console.log("----------", type); console.log("----------", type);
let name = [ let name = [
"GDSLImagery", "gdslImagery",
"GDLWImagery", "gdlwImagery",
"ArcgisBLUEImagery", "arcgisBlueImagery",
"ArcgisWXImagery", "arcgisWximagery",
].includes(type) ].includes(type)
? "layer" ? "layer"
: type; : type;
if (type == "Terrain") name = "terrain"; if (type == "Terrain") name = "terrain";
if (type == "road" && node.detail.imageType == "arrowRoad") if (type == "road" && node.detail.imageType == "arrowRoad")
name = "lineDrawing"; 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 : `http://localhost:${availablePort}/icon/${name}.png`;
return (type === 'directory' || type === 'FeatureCollection') ? undefined : ` 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}" /> <use xlink:href="#icon-${name}" />
</svg> </svg>
`; `;

View File

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