统一流量单位为 m³/h,优化相关组件
This commit is contained in:
@@ -21,6 +21,7 @@ import { useNotification } from "@refinedev/core";
|
||||
|
||||
import { config } from "@/config/config";
|
||||
import { apiFetch } from "@/lib/apiFetch";
|
||||
import { FLOW_DISPLAY_UNIT } from "@components/olmap/DMALeakDetection/utils";
|
||||
|
||||
// 添加接口定义隐藏按钮的props
|
||||
interface ToolbarProps {
|
||||
@@ -427,7 +428,7 @@ const Toolbar: React.FC<ToolbarProps> = ({
|
||||
const properties = highlightFeature.getProperties();
|
||||
// 计算属性字段,增加 key 字段
|
||||
const pipeComputedFields = [
|
||||
{ key: "flow", label: "流量", unit: "m³/h" },
|
||||
{ key: "flow", label: "流量", unit: `${FLOW_DISPLAY_UNIT}` },
|
||||
{ key: "friction", label: "摩阻", unit: "" },
|
||||
{ key: "headloss", label: "水头损失", unit: "m" },
|
||||
{ key: "unit_headloss", label: "单位水头损失", unit: "m/km" },
|
||||
@@ -438,7 +439,7 @@ const Toolbar: React.FC<ToolbarProps> = ({
|
||||
{ key: "velocity", label: "流速", unit: "m/s" },
|
||||
];
|
||||
const nodeComputedFields = [
|
||||
{ key: "actual_demand", label: "实际需水量", unit: "m³/h" },
|
||||
{ key: "actual_demand", label: "实际需水量", unit: `${FLOW_DISPLAY_UNIT}` },
|
||||
{ key: "total_head", label: "水头", unit: "m" },
|
||||
{ key: "pressure", label: "压力", unit: "m" },
|
||||
{ key: "quality", label: "水质", unit: "mg/L" },
|
||||
|
||||
Reference in New Issue
Block a user