统一流量单位为 m³/h,优化相关组件
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user