统一流量单位为 m³/h,优化相关组件
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
} from "@mui/material";
|
||||
import { FormatListBulleted } from "@mui/icons-material";
|
||||
import dayjs from "dayjs";
|
||||
import { DMA_FLOW_DISPLAY_UNIT, getAreaColor, toM3h } from "./utils";
|
||||
import { FLOW_DISPLAY_UNIT, getAreaColor, toM3h } from "./utils";
|
||||
import { LeakageResultDetail } from "./types";
|
||||
|
||||
interface Props {
|
||||
@@ -131,7 +131,7 @@ const RecognitionResults: React.FC<Props> = ({ result }) => {
|
||||
);
|
||||
const qSumM3h = toM3h(Number(val), unit);
|
||||
return Number.isFinite(qSumM3h)
|
||||
? `${qSumM3h.toFixed(3)} ${DMA_FLOW_DISPLAY_UNIT}`
|
||||
? `${qSumM3h.toFixed(3)} ${FLOW_DISPLAY_UNIT}`
|
||||
: "-";
|
||||
})()}
|
||||
</Typography>
|
||||
@@ -167,7 +167,7 @@ const RecognitionResults: React.FC<Props> = ({ result }) => {
|
||||
?.max_leakage;
|
||||
const maxLeakageM3h = toM3h(Number(maxL), "m3/s");
|
||||
return Number.isFinite(maxLeakageM3h)
|
||||
? `${maxLeakageM3h.toFixed(3)} ${DMA_FLOW_DISPLAY_UNIT}`
|
||||
? `${maxLeakageM3h.toFixed(3)} ${FLOW_DISPLAY_UNIT}`
|
||||
: "-";
|
||||
})()}
|
||||
</Typography>
|
||||
@@ -215,7 +215,7 @@ const RecognitionResults: React.FC<Props> = ({ result }) => {
|
||||
align="right"
|
||||
sx={{ fontWeight: 600, color: "#64748b", py: 1.5, pr: 3 }}
|
||||
>
|
||||
漏损量 ({DMA_FLOW_DISPLAY_UNIT})
|
||||
漏损量 ({FLOW_DISPLAY_UNIT})
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
|
||||
Reference in New Issue
Block a user