From b0101202a7b9839b49b5d3ad6459d4a60e14747b Mon Sep 17 00:00:00 2001 From: JIANG Date: Fri, 19 Dec 2025 16:43:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4=E7=9A=84?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E5=8E=8B=E5=8A=9B=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/OlMap/Controls/HistoryDataPanel.tsx | 4 ++-- src/app/OlMap/Controls/Toolbar.tsx | 19 ++++++++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/app/OlMap/Controls/HistoryDataPanel.tsx b/src/app/OlMap/Controls/HistoryDataPanel.tsx index 8f8e22b..aa63af2 100644 --- a/src/app/OlMap/Controls/HistoryDataPanel.tsx +++ b/src/app/OlMap/Controls/HistoryDataPanel.tsx @@ -779,8 +779,8 @@ const SCADADataPanel: React.FC = ({ ref={draggableRef} sx={{ position: "absolute", - right: "2rem", - top: "2rem", + right: "1rem", + top: "1rem", width: "min(920px, calc(100vw - 2rem))", maxWidth: "100vw", height: "860px", diff --git a/src/app/OlMap/Controls/Toolbar.tsx b/src/app/OlMap/Controls/Toolbar.tsx index 2ea00aa..e3500ac 100644 --- a/src/app/OlMap/Controls/Toolbar.tsx +++ b/src/app/OlMap/Controls/Toolbar.tsx @@ -52,17 +52,26 @@ const Toolbar: React.FC = ({ { isActive: false, // 默认不激活,不显示图例 layerId: "junctions", - layerName: "节点图层", + layerName: "节点", styleConfig: { property: "pressure", classificationMethod: "custom_breaks", + customBreaks: [16, 18, 20, 22, 24, 26], + customColors: [ + "rgba(255, 0, 0, 1)", + "rgba(255, 127, 0, 1)", + "rgba(255, 215, 0, 1)", + "rgba(199, 224, 0, 1)", + "rgba(76, 175, 80, 1)", + "rgba(0, 158, 115, 1)", + ], segments: 6, minSize: 4, maxSize: 12, minStrokeWidth: 2, maxStrokeWidth: 8, fixedStrokeWidth: 3, - colorType: "gradient", + colorType: "rainbow", singlePaletteIndex: 0, gradientPaletteIndex: 0, rainbowPaletteIndex: 0, @@ -72,7 +81,7 @@ const Toolbar: React.FC = ({ }, legendConfig: { layerId: "junctions", - layerName: "节点图层", + layerName: "节点", property: "压力", // 暂时为空,等计算后更新 colors: [], type: "point", @@ -83,7 +92,7 @@ const Toolbar: React.FC = ({ { isActive: false, // 默认不激活,不显示图例 layerId: "pipes", - layerName: "管道图层", + layerName: "管道", styleConfig: { property: "flow", classificationMethod: "pretty_breaks", @@ -103,7 +112,7 @@ const Toolbar: React.FC = ({ }, legendConfig: { layerId: "pipes", - layerName: "管道图层", + layerName: "管道", property: "流量", // 暂时为空,等计算后更新 colors: [], type: "linestring",