fix(burst-location): clarify simulation baseline requirement
This commit is contained in:
@@ -28,6 +28,7 @@ import { NETWORK_NAME, config } from "@config/config";
|
||||
import { useControllableObjectState } from "@components/olmap/core/useControllableState";
|
||||
import { FLOW_DISPLAY_UNIT, toM3s } from "@utils/units";
|
||||
import { BurstLocationResult } from "./types";
|
||||
import { getBurstLocationErrorNotice } from "./burstLocationError";
|
||||
|
||||
interface Props {
|
||||
onResult: (result: BurstLocationResult) => void;
|
||||
@@ -262,11 +263,12 @@ const AnalysisParameters: React.FC<Props> = ({
|
||||
description: `定位到管段: ${(response.data as BurstLocationResult).located_pipe}`,
|
||||
});
|
||||
} catch (error: any) {
|
||||
const notice = getBurstLocationErrorNotice(error);
|
||||
open?.({
|
||||
key: "burst-location-analysis-error",
|
||||
type: "error",
|
||||
message: "提交分析失败",
|
||||
description: error?.response?.data?.detail ?? error?.message ?? "请求失败",
|
||||
message: notice.message,
|
||||
description: notice.description,
|
||||
});
|
||||
} finally {
|
||||
setRunning(false);
|
||||
@@ -303,22 +305,30 @@ const AnalysisParameters: React.FC<Props> = ({
|
||||
</Select>
|
||||
</FormControl>
|
||||
<Alert
|
||||
severity="info"
|
||||
severity={isSimulationMode ? "warning" : "info"}
|
||||
variant="outlined"
|
||||
sx={{
|
||||
mt: 1,
|
||||
alignItems: "flex-start",
|
||||
borderColor: "info.light",
|
||||
backgroundColor: "#eff6ff",
|
||||
borderColor: isSimulationMode ? "warning.light" : "info.light",
|
||||
backgroundColor: isSimulationMode ? "#fff8e1" : "#eff6ff",
|
||||
"& .MuiAlert-message": { width: "100%" },
|
||||
}}
|
||||
>
|
||||
<Typography variant="caption" className="block font-semibold text-blue-900">
|
||||
数据选择规则
|
||||
<Typography
|
||||
variant="caption"
|
||||
className="block font-semibold"
|
||||
sx={{ color: isSimulationMode ? "warning.dark" : "info.dark" }}
|
||||
>
|
||||
{isSimulationMode ? "模拟方案分析前置条件" : "数据选择规则"}
|
||||
</Typography>
|
||||
<Typography variant="caption" className="block leading-5 text-blue-800">
|
||||
<Typography
|
||||
variant="caption"
|
||||
className="block leading-5"
|
||||
sx={{ color: isSimulationMode ? "warning.dark" : "info.dark" }}
|
||||
>
|
||||
{isSimulationMode
|
||||
? "当前为模拟方案:爆管数据取所选方案模拟结果,正常数据取实时模拟结果,两者使用同一爆管时间窗。"
|
||||
? "爆管数据取所选方案,正常数据取同一时间窗的实时模拟结果。所选时间窗必须已有实时模拟正常基线,否则无法分析;系统不会自动补数据。"
|
||||
: "当前为监测数据:爆管数据取所选监测时间窗,正常数据默认取前一天同一时段的监测数据。"}
|
||||
</Typography>
|
||||
</Alert>
|
||||
|
||||
Reference in New Issue
Block a user