统一流量单位为 m³/h,优化相关组件

This commit is contained in:
JIANG
2026-03-07 17:21:01 +08:00
parent 6b68b7d081
commit ddb02cc688
10 changed files with 61 additions and 35 deletions
@@ -20,7 +20,7 @@ import { useNotification } from "@refinedev/core";
import { api } from "@/lib/api";
import { NETWORK_NAME, config } from "@config/config";
import { LeakageResultDetail } from "./types";
import { DMA_FLOW_DISPLAY_UNIT, toM3s } from "./utils";
import { FLOW_DISPLAY_UNIT, toM3s } from "./utils";
interface Props {
onResult: (result: LeakageResultDetail) => void;
@@ -68,9 +68,9 @@ const AnalysisParameters: React.FC<Props> = ({ onResult }) => {
scada_end: endTime.toISOString(),
pop_size: popSize,
max_gen: maxGen,
q_sum: toM3s(qSum, DMA_FLOW_DISPLAY_UNIT),
q_sum: toM3s(qSum, FLOW_DISPLAY_UNIT),
q_sum_unit: "m3/s",
output_flow_unit: DMA_FLOW_DISPLAY_UNIT,
output_flow_unit: FLOW_DISPLAY_UNIT,
},
);
onResult(response.data as LeakageResultDetail);
@@ -172,7 +172,7 @@ const AnalysisParameters: React.FC<Props> = ({ onResult }) => {
<Box className="flex flex-col gap-2">
<Typography variant="subtitle2" className="mb-1 font-medium">
({DMA_FLOW_DISPLAY_UNIT})
({FLOW_DISPLAY_UNIT})
</Typography>
<TextField
type="number"