From 314f2a58b571ee3aa6ba07c83d025b62b8b5866a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E5=A4=A7=E8=83=86?= <1101282782@qq.com> Date: Thu, 17 Jul 2025 10:45:42 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=94=E5=92=8C?= =?UTF-8?q?=E9=83=BD=E6=95=B0=E5=AD=97=E8=B6=85=E8=BF=87=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E5=80=BCbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Global/efflect/Sunshine/index.js | 4 ++++ src/Obj/Element/Dialog/eventBinding.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Global/efflect/Sunshine/index.js b/src/Global/efflect/Sunshine/index.js index a069c6d..515556c 100644 --- a/src/Global/efflect/Sunshine/index.js +++ b/src/Global/efflect/Sunshine/index.js @@ -61,6 +61,10 @@ export default class Sunshine { set darkness(v) { this.options.darkness = v this.viewer.shadowMap.darkness = 1.0 - this.options.darkness + this._elms.darkness && + this._elms.darkness.forEach(item => { + item.value = v + }) } get speed() { diff --git a/src/Obj/Element/Dialog/eventBinding.js b/src/Obj/Element/Dialog/eventBinding.js index 5f64edc..70cecf8 100644 --- a/src/Obj/Element/Dialog/eventBinding.js +++ b/src/Obj/Element/Dialog/eventBinding.js @@ -61,7 +61,7 @@ class EventBinding { if ((e.target.min) && value < Number(e.target.min)) { value = Number(e.target.min) } - if((e.target.dataset.min) && value Date: Thu, 17 Jul 2025 11:04:14 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=85=89=E7=85=A7?= =?UTF-8?q?=E7=A1=AE=E5=AE=9A=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Global/efflect/Sunshine/index.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Global/efflect/Sunshine/index.js b/src/Global/efflect/Sunshine/index.js index 515556c..4e37fee 100644 --- a/src/Global/efflect/Sunshine/index.js +++ b/src/Global/efflect/Sunshine/index.js @@ -105,14 +105,14 @@ export default class Sunshine { let _this = this this._DialogObject = await new Dialog(this.sdk, this.originalOptions, { title: '光照属性', left: '180px', top: '100px', - confirmCallBack: (options) => { - this.originalOptions = tools.deepCopyObj(this.options) - this._DialogObject.close() - this.Dialog.confirmCallBack && this.Dialog.confirmCallBack(this.originalOptions) - syncData(this.sdk, this.options.id) - syncSplitData(this.sdk, this.options.id) - this.remove() - }, + // confirmCallBack: (options) => { + // this.originalOptions = tools.deepCopyObj(this.options) + // this._DialogObject.close() + // this.Dialog.confirmCallBack && this.Dialog.confirmCallBack(this.originalOptions) + // syncData(this.sdk, this.options.id) + // syncSplitData(this.sdk, this.options.id) + // this.remove() + // }, resetCallBack: () => { this.reset() this.Dialog.resetCallBack && this.Dialog.resetCallBack() From 4bf05f109e24abaad85f681a5121faa1f672b7bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E5=A4=A7=E8=83=86?= <1101282782@qq.com> Date: Thu, 17 Jul 2025 11:04:47 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E6=8E=89=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/custom/css/index.css | 215 +++++++++++++++++++++++++++++++++++- 1 file changed, 214 insertions(+), 1 deletion(-) diff --git a/static/custom/css/index.css b/static/custom/css/index.css index 1ce7a5d..fc4b55b 100644 --- a/static/custom/css/index.css +++ b/static/custom/css/index.css @@ -1665,6 +1665,7 @@ display: flex; align-items: center; height: 32px; + line-height: 32px; } .YJ-custom-base-dialog>.content .cy_datalist dl dd:hover { @@ -1934,6 +1935,89 @@ .YJ-custom-base-dialog.water-surface>.content>div .row .label { flex: 0 0 60px; } +/* 流光飞线 */ +.YJ-custom-base-dialog.flow-line-surface>.content { + width: 586px; +} + +.YJ-custom-base-dialog.flow-line-surface>.content>div .row .label { + flex: 0 0 60px; +} + +/* 光照 */ +.YJ-custom-base-dialog.sun-shine-surface>.content { + width: 586px; +} + +.YJ-custom-base-dialog.sun-shine-surface>.content>div .row .label { + flex: 0 0 60px; +} + +.YJ-custom-base-dialog.sun-shine-surface>.content>div .timeline-container { + width: 100%; + padding: 20px 0; + position: relative; +} + +.YJ-custom-base-dialog.sun-shine-surface>.content>div .timeline { + height: 8px; + background: #f0f0f0; + border-radius: 15px; + position: relative; + cursor: pointer; +} + +.YJ-custom-base-dialog.sun-shine-surface>.content>div .progress { + height: 100%; + width: 0; + background: rgba(var(--color-sdk-base-rgb), 1); + border-radius: 15px; + position: relative; +} + +.YJ-custom-base-dialog.sun-shine-surface>.content>div .handle { + width: 16px; + height: 16px; + background: white; + /* border: 3px solid #4285f4; */ + background: rgba(var(--color-sdk-base-rgb), 1); + border-radius: 50%; + position: absolute; + right: -8px; + top: 50%; + transform: translateY(-50%); + cursor: grab; +} + +.YJ-custom-base-dialog.sun-shine-surface>.content>div .time-marks { + display: flex; + justify-content: space-between; + margin-top: 5px; +} + +.YJ-custom-base-dialog.sun-shine-surface>.content>div .time-mark { + font-size: 12px; + color: #fff; +} + +.YJ-custom-base-dialog.sun-shine-surface>.content>div .controls { + margin: 15px 0; +} + + +.YJ-custom-base-dialog.sun-shine-surface>.content>div .current-time { + font-size: 12px; + position: absolute; + width: 50px; + text-align: center; + right: -25px; + top: -200%; + transform: translateY(-50%); +} + +.YJ-custom-base-dialog.sun-shine-surface>.content>div #timePause { + margin-top: 10px; +} /* 电子围墙 */ .YJ-custom-base-dialog.wall-stereoscopic>.content { @@ -2665,6 +2749,9 @@ .YJ-custom-base-dialog.polyline>.content { width: 580px; } +.YJ-custom-base-dialog.polyline>.content>div #dashTextureDom { + display: none; +} .YJ-custom-base-dialog.polyline>.content>div .row .col { margin: 0 10px; @@ -2713,6 +2800,132 @@ .YJ-custom-base-dialog.polyline>.content>div .spatial-info-table .table-body { max-height: 185px; } +.YJ-custom-base-dialog.polyline>.content>div .input-select-unit-box textarea { + border-radius: unset !important; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-unit .datalist { + background-color: rgba(var(--color-sdk-base-rgb), 0.1) !important; + border-radius: 4px 0px 0px 4px !important; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-unit:nth-of-type(1) .datalist { + background-color: rgba(var(--color-sdk-base-rgb), 0.1) !important; + border-radius: 4px 0px, 0px, 4px !important; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-unit:nth-of-type(2) .datalist { + background-color: rgba(var(--color-sdk-base-rgb), 0.1) !important; + border-radius: 0px 4px 4px 0px !important; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-unit:nth-of-type(1) input { + border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5) !important; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-unit:nth-of-type(2) input { + border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5) !important; +} + +.YJ-custom-base-dialog.polyline>.content input.input-text { + background-color: rgba(0, 0, 0, 0.5) !important; + border-radius: unset !important; + border-top: 1px solid rgba(var(--color-sdk-base-rgb), 0.5) !important; + border-bottom: 1px solid rgba(var(--color-sdk-base-rgb), 0.5) !important; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist input { + padding-left: 35px; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .icon-active { + position: absolute; + top: 11px; + left: 10px; + -webkit-pointer-events: none; + -moz-pointer-events: none; + -ms-pointer-events: none; + -o-pointer-events: none; + pointer-events: none; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.icon { + display: inline-block; + width: 22px; + height: 10px; + margin-right: 5px; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.line { + border: 1px solid rgba(255, 255, 255, 1); + height: 0px; + margin-top: 4px; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.dash-line { + border: 1px dashed rgba(255, 255, 255, 1); + height: 0px; + margin-top: 4px; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.light-line { + border: 1px solid rgba(255, 255, 255, 1); + height: 0px; + margin-top: 4px; + box-shadow: 0 0 3px #fff +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.tail-line { + background: url(../../img/arrow/tail.png) 100% 100% no-repeat; + background-size: 100% 100%; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.mult-tail-line { + background: url(../../img/arrow/tail.png) 100% 100% no-repeat; + background-size: 100% 100%; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.flow-dash-line1 { + border: 1px dashed rgba(255, 255, 255, 1); + height: 0px; + margin-top: 4px; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.flow-dash-line2 { + border: 1px dashed rgba(255, 255, 255, 1); + height: 0px; + margin-top: 4px; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.pic-line1 { + background: url(../../img/arrow/1.png) 100% 100% no-repeat; + background-size: 100% 100%; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.pic-line2 { + background: url(../../img/arrow/2.png) 100% 100% no-repeat; + background-size: 100% 100%; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.pic-line3 { + background: url(../../img/arrow/3.png) 100% 100% no-repeat; + background-size: 100% 100%; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.pic-line4 { + background: url(../../img/arrow/4.png) 100% 100% no-repeat; + background-size: 100% 100%; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.pic-line5 { + background: url(../../img/arrow/5.png) 100% 100% no-repeat; + background-size: 100% 100%; +} + +.YJ-custom-base-dialog.polyline>.content>div .input-select-line-type-box .cy_datalist i.pic-line6 { + background: url(../../img/arrow/6.png) 100% 100% no-repeat; + background-size: 100% 100%; +} .YJ-custom-base-dialog.polyline>.content>div .input-select-unit-box textarea { border-radius: unset!important; @@ -3253,4 +3466,4 @@ .YJ-custom-base-dialog.contour>.content .label { flex: unset; -} \ No newline at end of file +} From 294e38ed31a0ba5fc6d91a685875ef02d1a13555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E5=A4=A7=E8=83=86?= <1101282782@qq.com> Date: Thu, 17 Jul 2025 16:25:36 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=89=E7=85=A7?= =?UTF-8?q?=E5=88=86=E6=9E=90=E5=88=87=E6=8D=A2=E6=97=A5=E6=9C=9F=20?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1bug=20=E5=92=8C=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=80=9F=E5=BA=A6=20=E8=BF=9B=E5=BA=A6=E6=9D=A1bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Global/efflect/Sunshine/timeLIne.js | 63 +++++++++++++++++++------ 1 file changed, 48 insertions(+), 15 deletions(-) diff --git a/src/Global/efflect/Sunshine/timeLIne.js b/src/Global/efflect/Sunshine/timeLIne.js index a012f69..4801a04 100644 --- a/src/Global/efflect/Sunshine/timeLIne.js +++ b/src/Global/efflect/Sunshine/timeLIne.js @@ -53,17 +53,25 @@ export default class TimeLine { document.getElementById('timePause').addEventListener('click', function () { that.pauseed = !that.pauseed; - if (that.pauseed) { + if (that.pauseed) {//暂停 document.getElementById('timePause').textContent = '播放'; that.animationId && cancelAnimationFrame(that.animationId); that.pausedTime = Date.now(); // 记录暂停时刻 that.sdk.viewer.clock.shouldAnimate = false - } else { + } else {//播放 document.getElementById('timePause').textContent = '暂停'; that.manualPosition = null - const pausedDuration = Date.now() - that.pausedTime; that.startTime += pausedDuration; // 补偿暂停期间的时间差 + + if (that.changeDate) {//切换日期后让时间从0开始 + if (that.changeDateGrag) { + that.changeDateGrag = undefined + } else { + that.startTime = Date.now() + } + that.changeDate = undefined + } that.sdk.viewer.clock.shouldAnimate = true that.update(); // 重启动画循环 } @@ -77,7 +85,7 @@ export default class TimeLine { // that.sdk.viewer.clock.shouldAnimate = true that.startTime = Date.now() - (that.manualPosition * 86400 * 1000 / that.speed); that.manualPosition = null; - + that.changeDate && (that.changeDateGrag = true) if (!that.pauseed) { that.update() func(that.time) @@ -98,30 +106,55 @@ export default class TimeLine { update() { if (this.manualPosition !== null) return; - - const elapsed = (Date.now() - this.startTime) * this.speed; - const totalSeconds = elapsed / 1000; - const daySeconds = totalSeconds % 86400; + if (this.changeDate) {//切换日期后让时间从0开始 + this.startTime = Date.now() + } + let elapsed = (Date.now() - this.startTime) * this.speed; + // if (this.elapsed) { + // elapsed = elapsed + this.elapsed + // this.elapsed = undefined + // } + const totalSeconds = elapsed / 1000;//秒 + const daySeconds = totalSeconds % 86400;//天 const percentage = daySeconds / 86400; this.progress.style.width = `${percentage * 100}%`; this.time = this.formatTime(daySeconds) this.currentTime.textContent = this.time; - this.animationId = requestAnimationFrame(this.update); + if (!this.pauseed) { + this.animationId && cancelAnimationFrame(this.animationId); + this.animationId = requestAnimationFrame(this.update); + } } setSpeed(v) { - const currentProgress = this.manualPosition ?? - (Date.now() - this.startTime) * this.speed / (86400 * 1000); + if (!this.pauseed) { + const currentProgress = this.manualPosition ?? + (Date.now() - this.startTime) * this.speed / (86400 * 1000); + this.speed = v; + this.startTime = Date.now() - (currentProgress * 86400 * 1000 / this.speed); - this.speed = v; - this.startTime = Date.now() - (currentProgress * 86400 * 1000 / this.speed); + } else { + let pausedDuration = Date.now() - this.pausedTime; + this.startTime += pausedDuration; // 补偿暂停期间的时间差 + + const currentProgress = this.manualPosition ?? + (Date.now() - this.startTime) * this.speed / (86400 * 1000); + this.speed = v; + this.startTime = Date.now() - (currentProgress * 86400 * 1000 / this.speed); + + this.pausedTime = Date.now(); // 记录切换speed暂停时刻 + this.speed = v; + } this.manualPosition = null; - this.update(); + + // this.update(); } updateTime() { - this.startTime = Date.now() - (this.manualPosition * 86400 * 1000 / this.speed); this.manualPosition = null; + this.startTime = Date.now() - ((this.manualPosition || 0) * 86400 * 1000 / this.speed); + this.pauseed && (this.changeDate = true) + this.changeDateGrag = undefined this.update(); } clear() { From 8b00dcd56e21478c765343ce030f5a955a573d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E5=A4=A7=E8=83=86?= <1101282782@qq.com> Date: Thu, 17 Jul 2025 16:32:11 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=89=E7=85=A7?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1=E6=8B=96=E6=8B=BD=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Global/efflect/Sunshine/timeLIne.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Global/efflect/Sunshine/timeLIne.js b/src/Global/efflect/Sunshine/timeLIne.js index 4801a04..082a999 100644 --- a/src/Global/efflect/Sunshine/timeLIne.js +++ b/src/Global/efflect/Sunshine/timeLIne.js @@ -3,7 +3,8 @@ export default class TimeLine { this.sdk = { ...sdk }; this.progress = document.getElementById('progress'); this.handle = document.getElementById('handle'); - this.timeline = document.getElementById('timeline'); + // this.timeline = document.getElementById('timeline'); + this.timeline = document.getElementsByClassName('timeline-container')[0]; this.currentTime = document.getElementById('currentTime'); this.timelineCon = document.getElementsByClassName('timeline-container')[0]; this.speed = speed; From 3b5b026d43835a82a9e922d18b7b64ece4506211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E5=A4=A7=E8=83=86?= <1101282782@qq.com> Date: Thu, 17 Jul 2025 17:32:55 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A3=9E=E7=BA=BF?= =?UTF-8?q?=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Obj/Base/FlowLine/index.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Obj/Base/FlowLine/index.js b/src/Obj/Base/FlowLine/index.js index d742203..c631284 100644 --- a/src/Obj/Base/FlowLine/index.js +++ b/src/Obj/Base/FlowLine/index.js @@ -89,6 +89,7 @@ class FlowLine extends Base { const minLat = Math.min(...lats), maxLat = Math.max(...lats); const points = []; + let that = this while (points.length < count) { const lon = minLon + Math.random() * (maxLon - minLon); const lat = minLat + Math.random() * (maxLat - minLat); @@ -100,9 +101,14 @@ class FlowLine extends Base { const isInside = turf.booleanPointInPolygon(point, polygon); if (isInside) { + let posi = Cesium.Cartesian3.fromDegrees(lon, lat); + const cartographic = that.viewer.scene.globe.ellipsoid.cartesianToCartographic(posi); + const height = cartographic.height; + points.push([ lon, - lat + lat, + height ]); } } @@ -126,9 +132,10 @@ class FlowLine extends Base { positions.forEach((item, index) => { let point = item //根据点设置起始点位置 - let start = Cesium.Cartesian3.fromDegrees(point[0], point[1], 0) + // let start = Cesium.Cartesian3.fromDegrees(point[0], point[1], 0) + let start = Cesium.Cartesian3.fromDegrees(point[0], point[1], point[2]) //根据点设置结束点位置 - let end = Cesium.Cartesian3.fromDegrees(point[0], point[1], that.options.height + Math.random() * that.options.heightDifference) + let end = Cesium.Cartesian3.fromDegrees(point[0], point[1], point[2] + that.options.height + Math.random() * that.options.heightDifference) //创建线 that.viewer.entities.add({ parent: celiangEntity, @@ -425,7 +432,7 @@ class FlowLine extends Base { let a = Cesium.Cartesian3.fromDegrees( this.positions[i][0], this.positions[i][1], - this.options.height + this.options.heightDifference / 2 + this.positions[i][2] + this.options.height + this.options.heightDifference / 2 ) positionArray.push(a.x, a.y, a.z) } From 01b07a6fa2041e24005f50e17de6095021157017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E5=A4=A7=E8=83=86?= <1101282782@qq.com> Date: Thu, 17 Jul 2025 17:40:48 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A3=9E=E7=BA=BF?= =?UTF-8?q?=E5=AE=BD=E5=BA=A6bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Obj/Base/FlowLine/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Obj/Base/FlowLine/index.js b/src/Obj/Base/FlowLine/index.js index c631284..9e15936 100644 --- a/src/Obj/Base/FlowLine/index.js +++ b/src/Obj/Base/FlowLine/index.js @@ -141,7 +141,7 @@ class FlowLine extends Base { parent: celiangEntity, polyline: { positions: [start, end], - width: 2, + width: that.options.width, // material:Cesium.Color.RED material: new Cesium.FlowLineMaterialProperty({ color: that.options.color,