修改默认的节点压力样式

This commit is contained in:
JIANG
2025-12-19 16:43:13 +08:00
parent e5cf750754
commit b0101202a7
2 changed files with 16 additions and 7 deletions

View File

@@ -779,8 +779,8 @@ const SCADADataPanel: React.FC<SCADADataPanelProps> = ({
ref={draggableRef}
sx={{
position: "absolute",
right: "2rem",
top: "2rem",
right: "1rem",
top: "1rem",
width: "min(920px, calc(100vw - 2rem))",
maxWidth: "100vw",
height: "860px",

View File

@@ -52,17 +52,26 @@ const Toolbar: React.FC<ToolbarProps> = ({
{
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<ToolbarProps> = ({
},
legendConfig: {
layerId: "junctions",
layerName: "节点图层",
layerName: "节点",
property: "压力", // 暂时为空,等计算后更新
colors: [],
type: "point",
@@ -83,7 +92,7 @@ const Toolbar: React.FC<ToolbarProps> = ({
{
isActive: false, // 默认不激活,不显示图例
layerId: "pipes",
layerName: "管道图层",
layerName: "管道",
styleConfig: {
property: "flow",
classificationMethod: "pretty_breaks",
@@ -103,7 +112,7 @@ const Toolbar: React.FC<ToolbarProps> = ({
},
legendConfig: {
layerId: "pipes",
layerName: "管道图层",
layerName: "管道",
property: "流量", // 暂时为空,等计算后更新
colors: [],
type: "linestring",