修改
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
server:
|
server:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
port: 8849
|
port: 8845
|
||||||
path: C:\Users\Administrator\AppData\Roaming\dzsp_shijingjun_offline_Y_save
|
path: C:\Users\Administrator\AppData\Roaming\dzsp_shijingjun_offline_Y_save
|
||||||
poi:
|
poi:
|
||||||
global:
|
global:
|
||||||
|
|||||||
Binary file not shown.
18
src/renderer/public/sdk/YJEarth.min.js
vendored
18
src/renderer/public/sdk/YJEarth.min.js
vendored
File diff suppressed because one or more lines are too long
@ -88,8 +88,8 @@
|
|||||||
class="input height custom-number-input with-arrows"
|
class="input height custom-number-input with-arrows"
|
||||||
type="number"
|
type="number"
|
||||||
step="0.1"
|
step="0.1"
|
||||||
min="0"
|
:min="0"
|
||||||
max="1"
|
:max="1"
|
||||||
v-model="weatherData.darkness"
|
v-model="weatherData.darkness"
|
||||||
@change="changDarkness"
|
@change="changDarkness"
|
||||||
>
|
>
|
||||||
@ -108,8 +108,8 @@
|
|||||||
<el-input
|
<el-input
|
||||||
class="input height custom-number-input with-arrows arrows2"
|
class="input height custom-number-input with-arrows arrows2"
|
||||||
type="number"
|
type="number"
|
||||||
min="-9999999"
|
:min="0.1"
|
||||||
max="999999999"
|
:max="999999999"
|
||||||
v-model="weatherData.speed"
|
v-model="weatherData.speed"
|
||||||
@change="changSpeed"
|
@change="changSpeed"
|
||||||
size="small"
|
size="small"
|
||||||
@ -379,8 +379,11 @@ var getDateTimeString = () => {
|
|||||||
watch(
|
watch(
|
||||||
() => weatherData.darkness,
|
() => weatherData.darkness,
|
||||||
(newValue) => {
|
(newValue) => {
|
||||||
|
if (newValue < 0 || newValue > 1) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (sunshine) {
|
if (sunshine) {
|
||||||
sunshine.darkness = newValue
|
sunshine.darkness = 1 - newValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -400,6 +403,9 @@ var decrementValue = () => {
|
|||||||
watch(
|
watch(
|
||||||
() => weatherData.speed,
|
() => weatherData.speed,
|
||||||
(newValue) => {
|
(newValue) => {
|
||||||
|
if (newValue < 0 || newValue == 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (!currWeatherData) {
|
if (!currWeatherData) {
|
||||||
weatherData.currWeather = false
|
weatherData.currWeather = false
|
||||||
} else {
|
} else {
|
||||||
@ -413,7 +419,8 @@ var incrementValue2 = () => {
|
|||||||
weatherData.speed = new Decimal(weatherData.speed).add(1).toNumber()
|
weatherData.speed = new Decimal(weatherData.speed).add(1).toNumber()
|
||||||
}
|
}
|
||||||
var decrementValue2 = () => {
|
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 = () => {
|
var getCurrentTime = () => {
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
@ -461,7 +468,7 @@ var switchFunc = () => {
|
|||||||
sunshine = window.sunshine
|
sunshine = window.sunshine
|
||||||
sunshine.timeBar(document.getElementById('currentTime').textContent)
|
sunshine.timeBar(document.getElementById('currentTime').textContent)
|
||||||
if (weatherData) {
|
if (weatherData) {
|
||||||
sunshine.darkness = weatherData.darkness
|
sunshine.darkness = 1 - weatherData.darkness
|
||||||
sunshine.speed = weatherData.speed
|
sunshine.speed = weatherData.speed
|
||||||
sunshine.softShadow = weatherData.softShadow
|
sunshine.softShadow = weatherData.softShadow
|
||||||
}
|
}
|
||||||
@ -534,9 +541,15 @@ var clickTimeIcon = (item: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var changDarkness = () => {
|
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 = () => {
|
var changSpeed = () => {
|
||||||
|
weatherData.speed = weatherData.speed < 0 || weatherData.speed == 0 ? 0.1 : weatherData.speed
|
||||||
weatherData.currWeather = false
|
weatherData.currWeather = false
|
||||||
sunshine && (sunshine.speed = weatherData.speed)
|
sunshine && (sunshine.speed = weatherData.speed)
|
||||||
timeline.setSpeed(weatherData.speed)
|
timeline.setSpeed(weatherData.speed)
|
||||||
|
|||||||
@ -81,6 +81,7 @@ export default class TimeLine {
|
|||||||
// })
|
// })
|
||||||
// } else {
|
// } else {
|
||||||
that.pauseed = !that.pauseed;
|
that.pauseed = !that.pauseed;
|
||||||
|
|
||||||
if (that.pauseed) {//暂停
|
if (that.pauseed) {//暂停
|
||||||
that.pausedTime = performance.now(); // 记录暂停时刻
|
that.pausedTime = performance.now(); // 记录暂停时刻
|
||||||
document.getElementById('timePause').textContent = '播放';
|
document.getElementById('timePause').textContent = '播放';
|
||||||
@ -88,7 +89,7 @@ export default class TimeLine {
|
|||||||
that.sdk.viewer && (that.sdk.viewer.clock.shouldAnimate = false)
|
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)
|
callback(false)
|
||||||
}
|
}
|
||||||
} else {//播放
|
} else {//播放
|
||||||
|
|||||||
@ -186,22 +186,22 @@ var clickFun = (childData) => {
|
|||||||
hour: data.currWeather ? new Date().toLocaleTimeString() : data.timeerTime
|
hour: data.currWeather ? new Date().toLocaleTimeString() : data.timeerTime
|
||||||
})
|
})
|
||||||
window.sunshine = sunshine
|
window.sunshine = sunshine
|
||||||
sunshine.darkness = data.darkness
|
sunshine.darkness = 1 - data.darkness
|
||||||
sunshine.softShadow = data.softShadow
|
sunshine.softShadow = data.softShadow
|
||||||
|
|
||||||
//天气效果
|
//天气效果
|
||||||
if ((window as any).checkAuthIsValid) {
|
// if ((window as any).checkAuthIsValid) {
|
||||||
data.wearther.forEach((item) => {
|
data.wearther.forEach((item) => {
|
||||||
if (item.status) {
|
if (item.status) {
|
||||||
func[item.svg](item)
|
func[item.svg](item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
// } else {
|
||||||
// ElMessage({
|
// // ElMessage({
|
||||||
// message: '您没有该功能的权限',
|
// // message: '您没有该功能的权限',
|
||||||
// type: 'warning'
|
// // type: 'warning'
|
||||||
// })
|
// // })
|
||||||
}
|
// }
|
||||||
} else if (weatherClickPop.value === false) {
|
} else if (weatherClickPop.value === false) {
|
||||||
sunshine = new YJ.Global.efflect.Sunshine(window.earth, {
|
sunshine = new YJ.Global.efflect.Sunshine(window.earth, {
|
||||||
id: 123,
|
id: 123,
|
||||||
|
|||||||
@ -372,8 +372,7 @@ var key =
|
|||||||
(localStorage.getItem('AMapKey') && localStorage.getItem('AMapKey').split('|')[0]) ||
|
(localStorage.getItem('AMapKey') && localStorage.getItem('AMapKey').split('|')[0]) ||
|
||||||
'd88fcc689d1aa99866b2d0d83fd36677'
|
'd88fcc689d1aa99866b2d0d83fd36677'
|
||||||
var isOnline = false
|
var isOnline = false
|
||||||
var loadAmp = (cb = () => {
|
var loadAmp = (cb = () => {}) => {
|
||||||
}) => {
|
|
||||||
AMapLoader.reset()
|
AMapLoader.reset()
|
||||||
AMapLoader.load({
|
AMapLoader.load({
|
||||||
key: key, // 申请好的Web端开发者Key,首次调用 load 时必填
|
key: key, // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||||
@ -841,4 +840,9 @@ defineExpose({
|
|||||||
.el-select-dropdown__loading {
|
.el-select-dropdown__loading {
|
||||||
margin-top: -150px !important;
|
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>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user