diff --git a/resources/java/app/application.yml b/resources/java/app/application.yml index 7753f07..41e4c70 100644 --- a/resources/java/app/application.yml +++ b/resources/java/app/application.yml @@ -1,7 +1,7 @@ server: host: 127.0.0.1 port: 8848 - path: C:\Users\MSI\AppData\Roaming\dzsp_shijingjun_offline_Y_save + path: C:\Users\Administrator\AppData\Roaming\dzsp_shijingjun_offline_Y_save poi: global: enabled: false diff --git a/src/renderer/src/views/components/headers/components/weather/index.vue b/src/renderer/src/views/components/headers/components/weather/index.vue index b5ad5d4..23b081d 100644 --- a/src/renderer/src/views/components/headers/components/weather/index.vue +++ b/src/renderer/src/views/components/headers/components/weather/index.vue @@ -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 @@ { weatherData.softShadow = data.softShadow weatherData.darkness = data.darkness weatherData.speed = data.speed - data?.wearther.forEach((item, index) => { - list[index].status = item.status - }) + // data?.wearther.forEach((item, index) => { + // list[index].status = item.status + // }) } // list = data.wearther switchStatus.value = true sunshine = window.sunshine myData = formatTimeToBeijing() } - + let wearther = JSON.parse(localStorage.getItem('weartherSetting')) + wearther?.forEach((item, index) => { + list[index].status = item.status + }) timeline && timeline.clear() timeline = new TimeLine(window.earth, weatherData.speed, switchStatus.value, myData, initCallback) @@ -302,10 +305,11 @@ onBeforeUnmount(() => { darkness: weatherData.darkness, speed: weatherData.speed, time: weatherData.time, - timeerTime: document.getElementById('currentTime').textContent, - wearther: list + timeerTime: document.getElementById('currentTime').textContent + // wearther: list } localStorage.setItem('shineSetting', JSON.stringify(data)) + localStorage.setItem('weartherSetting', JSON.stringify(list)) // sunshine && sunshine.remove() timeline && timeline.clear() emit('isPause', document.getElementById('timePause').textContent == '播放') @@ -379,8 +383,11 @@ var getDateTimeString = () => { watch( () => weatherData.darkness, (newValue) => { + if (newValue < 0 || newValue > 1) { + return + } if (sunshine) { - sunshine.darkness = newValue + sunshine.darkness = 1 - newValue } } ) @@ -400,6 +407,9 @@ var decrementValue = () => { watch( () => weatherData.speed, (newValue) => { + if (newValue < 0 || newValue == 0 || newValue > 9999) { + return + } if (!currWeatherData) { weatherData.currWeather = false } else { @@ -410,10 +420,13 @@ watch( } ) var incrementValue2 = () => { - weatherData.speed = new Decimal(weatherData.speed).add(1).toNumber() + let val = new Decimal(weatherData.speed).add(1).toNumber() + weatherData.speed = Math.min(val, 9999) } 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 + weatherData.speed = Math.max(val, 0.1) } var getCurrentTime = () => { const now = new Date() @@ -461,7 +474,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 +547,19 @@ 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 = () => { + if (weatherData.speed < 0 || weatherData.speed == 0) { + weatherData.speed = 0.1 + } else if (weatherData.speed > 9999) { + weatherData.speed = 9999 + } weatherData.currWeather = false sunshine && (sunshine.speed = weatherData.speed) timeline.setSpeed(weatherData.speed) diff --git a/src/renderer/src/views/components/headers/components/weather/timeLIne.ts b/src/renderer/src/views/components/headers/components/weather/timeLIne.ts index de96e00..013eeec 100644 --- a/src/renderer/src/views/components/headers/components/weather/timeLIne.ts +++ b/src/renderer/src/views/components/headers/components/weather/timeLIne.ts @@ -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 {//播放 diff --git a/src/renderer/src/views/components/headers/index.vue b/src/renderer/src/views/components/headers/index.vue index 1072d45..1c19a54 100644 --- a/src/renderer/src/views/components/headers/index.vue +++ b/src/renderer/src/views/components/headers/index.vue @@ -147,33 +147,33 @@ var clickFun = (childData) => { darkness: 0.4, speed: 1, time: formattedDate, - timeerTime: '00:00:00', - wearther: [ - // 雨 - { - name: '雨', - svg: 'rain', - status: false - }, - // 雪 - { - name: '雪', - svg: 'snow', - status: false - }, - //雾 - { - name: '雾', - svg: 'fog', - status: false - }, - //星空 - { - name: '星空', - svg: 'skystarry', - status: false - } - ] + timeerTime: '00:00:00' + // wearther: [ + // // 雨 + // { + // name: '雨', + // svg: 'rain', + // status: false + // }, + // // 雪 + // { + // name: '雪', + // svg: 'snow', + // status: false + // }, + // //雾 + // { + // name: '雾', + // svg: 'fog', + // status: false + // }, + // //星空 + // { + // name: '星空', + // svg: 'skystarry', + // status: false + // } + // ] } } //光照 @@ -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, diff --git a/src/renderer/src/views/components/tree/index.vue b/src/renderer/src/views/components/tree/index.vue index 2c33d3e..646b657 100644 --- a/src/renderer/src/views/components/tree/index.vue +++ b/src/renderer/src/views/components/tree/index.vue @@ -38,8 +38,8 @@ y2="-6.678619384765625" gradientUnits="userSpaceOnUse" > - - + + - - + + - + - - - + + + - + - - + + - - + + @@ -196,7 +196,7 @@ size="small" @click="searchPlace" :loading="loading" - >{{ t('btn.search') }} + >{{ t('btn.search') }}
@@ -247,22 +247,22 @@