This commit is contained in:
2025-12-17 14:46:07 +08:00
parent 1be2ef7a6e
commit 436cc9c764
7 changed files with 77 additions and 75 deletions

View File

@ -1,6 +1,6 @@
server:
host: 127.0.0.1
port: 8849
port: 8845
path: C:\Users\Administrator\AppData\Roaming\dzsp_shijingjun_offline_Y_save
poi:
global:

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -88,8 +88,8 @@
class="input height custom-number-input with-arrows"
type="number"
step="0.1"
min="0"
max="1"
:min="0"
:max="1"
v-model="weatherData.darkness"
@change="changDarkness"
>
@ -108,8 +108,8 @@
<el-input
class="input height custom-number-input with-arrows arrows2"
type="number"
min="-9999999"
max="999999999"
:min="0.1"
:max="999999999"
v-model="weatherData.speed"
@change="changSpeed"
size="small"
@ -379,8 +379,11 @@ var getDateTimeString = () => {
watch(
() => weatherData.darkness,
(newValue) => {
if (newValue < 0 || newValue > 1) {
return
}
if (sunshine) {
sunshine.darkness = newValue
sunshine.darkness = 1 - newValue
}
}
)
@ -400,6 +403,9 @@ var decrementValue = () => {
watch(
() => weatherData.speed,
(newValue) => {
if (newValue < 0 || newValue == 0) {
return
}
if (!currWeatherData) {
weatherData.currWeather = false
} else {
@ -413,7 +419,8 @@ var incrementValue2 = () => {
weatherData.speed = new Decimal(weatherData.speed).add(1).toNumber()
}
var decrementValue2 = () => {
weatherData.speed = new Decimal(weatherData.speed).sub(1).toNumber()
let val = new Decimal(weatherData.speed).sub(1).toNumber()
weatherData.speed = val < 0 || val == 0 ? 0.1 : val
}
var getCurrentTime = () => {
const now = new Date()
@ -461,7 +468,7 @@ var switchFunc = () => {
sunshine = window.sunshine
sunshine.timeBar(document.getElementById('currentTime').textContent)
if (weatherData) {
sunshine.darkness = weatherData.darkness
sunshine.darkness = 1 - weatherData.darkness
sunshine.speed = weatherData.speed
sunshine.softShadow = weatherData.softShadow
}
@ -534,9 +541,15 @@ var clickTimeIcon = (item: any) => {
}
var changDarkness = () => {
sunshine && (sunshine.darkness = weatherData.darkness)
if (weatherData.darkness < 0) {
weatherData.darkness = 0
} else if (weatherData.darkness > 1) {
weatherData.darkness = 1
}
sunshine && (sunshine.darkness = 1 - weatherData.darkness)
}
var changSpeed = () => {
weatherData.speed = weatherData.speed < 0 || weatherData.speed == 0 ? 0.1 : weatherData.speed
weatherData.currWeather = false
sunshine && (sunshine.speed = weatherData.speed)
timeline.setSpeed(weatherData.speed)

View File

@ -81,6 +81,7 @@ export default class TimeLine {
// })
// } else {
that.pauseed = !that.pauseed;
if (that.pauseed) {//暂停
that.pausedTime = performance.now(); // 记录暂停时刻
document.getElementById('timePause').textContent = '播放';
@ -88,7 +89,7 @@ export default class TimeLine {
that.sdk.viewer && (that.sdk.viewer.clock.shouldAnimate = false)
//判断当没有开启光照时,点击停止播放时关闭实时光照按钮
if (document.getElementById('weatherSwitch').style.color == 'rgba(var(--color-base1), 1)') {
if (document.getElementById('weatherSwitch').style.color == 'rgba(var(--color-base1), 1)' || document.getElementById('weatherSwitch').style.color == 'rgb(255, 255, 255)') {
callback(false)
}
} else {//播放

View File

@ -186,22 +186,22 @@ var clickFun = (childData) => {
hour: data.currWeather ? new Date().toLocaleTimeString() : data.timeerTime
})
window.sunshine = sunshine
sunshine.darkness = data.darkness
sunshine.darkness = 1 - data.darkness
sunshine.softShadow = data.softShadow
//天气效果
if ((window as any).checkAuthIsValid) {
data.wearther.forEach((item) => {
if (item.status) {
func[item.svg](item)
}
})
} else {
// ElMessage({
// message: '您没有该功能的权限',
// type: 'warning'
// })
}
// if ((window as any).checkAuthIsValid) {
data.wearther.forEach((item) => {
if (item.status) {
func[item.svg](item)
}
})
// } else {
// // ElMessage({
// // message: '您没有该功能的权限',
// // type: 'warning'
// // })
// }
} else if (weatherClickPop.value === false) {
sunshine = new YJ.Global.efflect.Sunshine(window.earth, {
id: 123,

View File

@ -38,8 +38,8 @@
y2="-6.678619384765625"
gradientUnits="userSpaceOnUse"
>
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.2"/>
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0"/>
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.2" />
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
</linearGradient>
<linearGradient
id="linear_border_2442_491_0"
@ -49,8 +49,8 @@
y2="29.435516357421875"
gradientUnits="userSpaceOnUse"
>
<stop offset="0.0625" stop-color="rgb(var(--color-base1))"/>
<stop offset="1" stop-color="var(--color-border1)"/>
<stop offset="0.0625" stop-color="rgb(var(--color-base1))" />
<stop offset="1" stop-color="var(--color-border1)" />
</linearGradient>
<filter
id="filter_2442_492"
@ -61,21 +61,21 @@
filterUnits="userSpaceOnUse"
color-interpolation-filters="sRGB"
>
<feFlood flood-opacity="0" result="feFloodId_2442_492"/>
<feFlood flood-opacity="0" result="feFloodId_2442_492" />
<feColorMatrix
in="SourceAlpha"
type="matrix"
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
result="hardAlpha_2442_492"
/>
<feOffset dx="0" dy="0"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha_2442_492" operator="out"/>
<feOffset dx="0" dy="0" />
<feGaussianBlur stdDeviation="2" />
<feComposite in2="hardAlpha_2442_492" operator="out" />
<feColorMatrix
type="matrix"
values="0 0 0 0 0.1450980392156863 0 0 0 0 0.7686274509803922 0 0 0 0 0.7686274509803922 0 0 0 1 0"
/>
<feBlend mode="normal" in2="feFloodId_2442_492" result="dropShadow_1_2442_492"/>
<feBlend mode="normal" in2="feFloodId_2442_492" result="dropShadow_1_2442_492" />
<feBlend
mode="normal"
in="SourceGraphic"
@ -132,8 +132,8 @@
y2="-131.6942138671875"
gradientUnits="userSpaceOnUse"
>
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.2"/>
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0"/>
<stop offset="0" stop-color="rgb(var(--color-base1))" stop-opacity="0.2" />
<stop offset="1" stop-color="rgb(var(--color-base1))" stop-opacity="0" />
</linearGradient>
<linearGradient
id="linear_border_2409_300_0"
@ -143,8 +143,8 @@
y2="580.431640625"
gradientUnits="userSpaceOnUse"
>
<stop offset="0.0625" stop-color="rgb(var(--color-base1))"/>
<stop offset="1" stop-color="var(--color-border1)"/>
<stop offset="0.0625" stop-color="rgb(var(--color-base1))" />
<stop offset="1" stop-color="var(--color-border1)" />
</linearGradient>
</defs>
</svg>
@ -196,7 +196,7 @@
size="small"
@click="searchPlace"
:loading="loading"
>{{ t('btn.search') }}
>{{ t('btn.search') }}
</el-button>
</div>
<div id="selectorBox">
@ -247,22 +247,22 @@
<script setup lang="ts">
// @ts-nocheck
import {debounce} from '@/utils'
import {useI18n} from 'vue-i18n'
import {useTree} from './hooks/tree'
import { debounce } from '@/utils'
import { useI18n } from 'vue-i18n'
import { useTree } from './hooks/tree'
import AMapLoader from '@amap/amap-jsapi-loader'
import rightMenu from './components/rightMenu.vue'
import {$changeComponentShow} from '@/utils/communication'
import {ref, nextTick} from 'vue'
import {ElMessage} from 'element-plus'
import {bus} from '@/utils/bus'
import {TreeApi} from '@/api/tree'
import {PoiApi} from '@/api/poi'
import {get} from 'jquery'
import { $changeComponentShow } from '@/utils/communication'
import { ref, nextTick } from 'vue'
import { ElMessage } from 'element-plus'
import { bus } from '@/utils/bus'
import { TreeApi } from '@/api/tree'
import { PoiApi } from '@/api/poi'
import { get } from 'jquery'
const {initTree, rightMenuRef, initTreeCallBack} = useTree()
const { initTree, rightMenuRef, initTreeCallBack } = useTree()
const {t} = useI18n()
const { t } = useI18n()
const isShow = ref(false)
const select = ref('poi')
const searchKey: any = ref('')
@ -372,8 +372,7 @@ var key =
(localStorage.getItem('AMapKey') && localStorage.getItem('AMapKey').split('|')[0]) ||
'd88fcc689d1aa99866b2d0d83fd36677'
var isOnline = false
var loadAmp = (cb = () => {
}) => {
var loadAmp = (cb = () => {}) => {
AMapLoader.reset()
AMapLoader.load({
key: key, // 申请好的Web端开发者Key首次调用 load 时必填
@ -474,7 +473,7 @@ const searchPlace = debounce(function () {
let string = searchKey.value.trim()
if (string) {
// TreeApi.queryPOI({ name: string, pageNum: 1, pageSize: 1000 }).then((res) => {
PoiApi.searchPoi({name: string, pageNum: 1, pageSize: 1000}).then((res) => {
PoiApi.searchPoi({ name: string, pageNum: 1, pageSize: 1000 }).then((res) => {
console.log(res, 'resres')
poiOptions.value = res.data
if (poiOptions.value.length) {
@ -527,7 +526,7 @@ const locationChange = () => {
// let sg84 = YJ.Global.CoordTransform.GCJ02ToWGS84(item.lng, item.lat);
let params = {
id,
position: {lng: item.lng, lat: item.lat, alt: item.alt ? item.alt : 0},
position: { lng: item.lng, lat: item.lat, alt: item.alt ? item.alt : 0 },
billboard: {
show: true,
image: 'http://localhost:' + availablePort.value + '/' + 'GEMarker1/A-ablu-blank.png',
@ -659,10 +658,10 @@ defineExpose({
text-shadow: 0px 0px 9px var(--color-text-shadow);
font-weight: 700;
background: linear-gradient(
90deg,
rgba(var(--color-base1), 0) 0%,
rgba(var(--color-base1), 0.5) 55.55%,
rgba(var(--color-base1), 0) 100%
90deg,
rgba(var(--color-base1), 0) 0%,
rgba(var(--color-base1), 0.5) 55.55%,
rgba(var(--color-base1), 0) 100%
);
> svg {
@ -841,4 +840,9 @@ defineExpose({
.el-select-dropdown__loading {
margin-top: -150px !important;
}
::v-deep .el-select-dropdown {
background: linear-gradient(180deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 255, 255, 0) 100%),
rgba(0, 0, 0, 0.6) !important;
border: 1px solid rgba(0, 255, 255, 0.5) !important;
}
</style>