From 24a0078eea7ba85012a0dfe0bcb4224f8c9250b1 Mon Sep 17 00:00:00 2001 From: zh <972939975@qq.com> Date: Mon, 25 Aug 2025 10:43:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Global/FlyRoam/index.js | 1 + src/Obj/Base/CircleDiffuse/index.js | 2 +- src/Obj/Base/CurvelineObject/index.js | 6 +- src/Obj/Base/FlyRoam/index.js | 1 + src/Obj/Base/PolylineObject/index.js | 6 +- src/Obj/Base/RadarScan/index.js | 2 +- .../Materail/CircleRippleMaterialProperty.js | 3 +- src/Tools/index.js | 17 ++++ static/custom/css/index.css | 84 ++++++++++++++++--- 9 files changed, 101 insertions(+), 21 deletions(-) diff --git a/src/Global/FlyRoam/index.js b/src/Global/FlyRoam/index.js index 0175fa1..c1a1819 100644 --- a/src/Global/FlyRoam/index.js +++ b/src/Global/FlyRoam/index.js @@ -135,6 +135,7 @@ const open = async (sdk, options = {}, _Dialog = {}) => { pitch: viewer.camera.pitch, roll: viewer.camera.roll } + tools.message({text: '操作成功'}) }) let totalTimeElm = contentElm.querySelector("input[name='totalTime']") diff --git a/src/Obj/Base/CircleDiffuse/index.js b/src/Obj/Base/CircleDiffuse/index.js index 36acfa4..0820d3b 100644 --- a/src/Obj/Base/CircleDiffuse/index.js +++ b/src/Obj/Base/CircleDiffuse/index.js @@ -181,7 +181,7 @@ class CircleDiffuse extends Base { } that.sdk._entityZIndex++ if (that.sdk.viewer._element.className === 'cesium-viewer 2d') { - that.entity.ellipse.height = 1000000 + that.entity.ellipse.height = 1 } CircleDiffuse.createLabel(that) syncData(that.sdk, that.options.id) diff --git a/src/Obj/Base/CurvelineObject/index.js b/src/Obj/Base/CurvelineObject/index.js index f6ea05f..8180261 100644 --- a/src/Obj/Base/CurvelineObject/index.js +++ b/src/Obj/Base/CurvelineObject/index.js @@ -1384,10 +1384,10 @@ class CurvelineObject extends Base { that.options.lengthByMeter = res that.lengthUnit = that.options['length-unit'] syncData(that.sdk, that.options.id) - if (that.options.show) { - setSplitDirection(0, that.options.id) - } }) + if (that.options.show) { + setSplitDirection(0, that.options.id) + } // if (this.options['nose-to-tail']) { // let array = [] diff --git a/src/Obj/Base/FlyRoam/index.js b/src/Obj/Base/FlyRoam/index.js index 31640b4..671259d 100644 --- a/src/Obj/Base/FlyRoam/index.js +++ b/src/Obj/Base/FlyRoam/index.js @@ -162,6 +162,7 @@ class FlyRoam extends Base { pitch: viewer.camera.pitch, roll: viewer.camera.roll } + this.message({text: '操作成功'}) }) let totalTimeElm = contentElm.querySelector("input[name='totalTime']") diff --git a/src/Obj/Base/PolylineObject/index.js b/src/Obj/Base/PolylineObject/index.js index 35273d8..8f3dc6a 100644 --- a/src/Obj/Base/PolylineObject/index.js +++ b/src/Obj/Base/PolylineObject/index.js @@ -1411,10 +1411,10 @@ class PolylineObject extends Base { that.options.lengthByMeter = res that.lengthUnit = that.options['length-unit'] syncData(that.sdk, that.options.id) - if (that.options.show) { - setSplitDirection(0, that.options.id) - } }) + if (that.options.show) { + setSplitDirection(0, that.options.id) + } // if (this.options['nose-to-tail']) { diff --git a/src/Obj/Base/RadarScan/index.js b/src/Obj/Base/RadarScan/index.js index 3959c72..59e1787 100644 --- a/src/Obj/Base/RadarScan/index.js +++ b/src/Obj/Base/RadarScan/index.js @@ -138,7 +138,7 @@ class RadarScan extends Base { }) that.sdk._entityZIndex++ if (that.sdk.viewer._element.className === 'cesium-viewer 2d') { - that.entity.ellipse.height = 1000000 + that.entity.ellipse.height = 1 } RadarScan.createLabel(that) syncData(that.sdk, that.options.id) diff --git a/src/Obj/Materail/CircleRippleMaterialProperty.js b/src/Obj/Materail/CircleRippleMaterialProperty.js index f663808..af58f2e 100644 --- a/src/Obj/Materail/CircleRippleMaterialProperty.js +++ b/src/Obj/Materail/CircleRippleMaterialProperty.js @@ -50,7 +50,8 @@ export default class CircleDiffuseMaterialProperty { let color = this.colors[ratio[i]] _sourceColor = _sourceColor + ` if(dis < float(${Number(ratio[i]) / 2})) { - material.diffuse = 1.5 * vec4(${color.red},${color.green},${color.blue},${color.alpha}).rgb; + material.diffuse = vec4(0.0,0.0,0.0,0.0).rgb; + material.emission = 1.0 * vec4(${color.red},${color.green},${color.blue},${color.alpha}).rgb; } ` } diff --git a/src/Tools/index.js b/src/Tools/index.js index fe1f38c..7bb0c14 100644 --- a/src/Tools/index.js +++ b/src/Tools/index.js @@ -1493,6 +1493,23 @@ class Tools { } } + message(option={}) { + let type = option.type || 'success' + let text = option.text || '' + let duration = option.duration || 1500 + + let message = document.getElementById('YJ-custom-message'); + if (message) { + document.body.removeChild(message) + } + message = document.createElement('div') + message.id = 'YJ-custom-message' + message.innerHTML = ` + ${text} + ` + document.body.appendChild(message) + message.classList.add(type) + } } diff --git a/static/custom/css/index.css b/static/custom/css/index.css index 6a18b7a..ed413e2 100644 --- a/static/custom/css/index.css +++ b/static/custom/css/index.css @@ -3095,7 +3095,7 @@ } /* 文本框 */ -.popup-textarea{ +.popup-textarea { /* width: 212px; */ width: 161.6px; /* height: 154px; */ @@ -3108,26 +3108,28 @@ background-size: 100% 100%; padding: 5px 5px 0px 5px; } -.popup-textarea textarea{ - background-color: unset!important; - border: unset!important; + +.popup-textarea textarea { + background-color: unset !important; + border: unset !important; color: #fff; } + .popup-textarea textarea::-webkit-scrollbar { - width: 8px!important; + width: 8px !important; /* height: 8px!important; */ } .popup-textarea textarea::-webkit-scrollbar-thumb { - border-radius: 5px!important; - -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2)!important; - background-color: rgba(var(--color-sdk-base-rgb))!important; + border-radius: 5px !important; + -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important; + background-color: rgba(var(--color-sdk-base-rgb)) !important; } .popup-textarea textarea::-webkit-scrollbar-track { - -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2)!important; - border-radius: 5px!important; - background-color: rgba(var(--color-sdk-base-rgb), 0.1)!important; + -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important; + border-radius: 5px !important; + background-color: rgba(var(--color-sdk-base-rgb), 0.1) !important; } /* 贴地图片 */ @@ -3587,21 +3589,26 @@ border-image: linear-gradient(to bottom, var(--color-sdk-gradual)) 1; color: #fff; } + .billboard-attribute-box .DIV-cy-tabs { height: 100%; display: flex; flex-direction: column; } + .billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-top .DIV-cy-tab-pane-title { padding: 0 2px; } + .billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-top .DIV-cy-tab-pane-title:first-child { padding-left: 0; } + .billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-top .DIV-cy-tab-pane-title:last-child { padding-right: 0; } -.billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-top .DIV-cy-tab-pane-title span{ + +.billboard-attribute-box .DIV-cy-tabs .DIV-cy-tab-top .DIV-cy-tab-pane-title span { margin: 0 5px; } @@ -3609,4 +3616,57 @@ padding: 0 5px 5px 5px; box-sizing: border-box; flex: 1; +} + +/* 自定义提示 */ +#YJ-custom-message { + /* 固定在顶部中央 */ + position: fixed; + top: 0; + left: 50%; + transform: translate(-50%, 0%); + /* 初始位置在屏幕顶部外 */ + + /* 样式美化 */ + display: flex; + border-radius: 4px; + font-size: 14px; + padding: 15px 20px; + width: 380px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + z-index: 9999999; + + + /* 动画定义 */ + animation: YJ-custom-message-slideDown 0.5s forwards, + YJ-custom-message-fadeOut 0.5s 1500ms forwards; +} + +#YJ-custom-message i { + margin: 2px 10px 0 0; + display: flex; + align-items: center; + width: 16px; +} + +#YJ-custom-message.success { + background-color: #f0f9eb; + color: rgb(82, 196, 26); +} + +/* 滑入动画 */ +@keyframes YJ-custom-message-slideDown { + to { + top: 20px; + /* 移动到屏幕顶部 */ + } +} + +/* 淡出动画 - 1500ms后执行 */ +@keyframes YJ-custom-message-fadeOut { + to { + opacity: 0; + top: -200px + /* 移回顶部外 */ + } } \ No newline at end of file