添加方案记录缓存支持到爆管和漏损检测面板

This commit is contained in:
2026-04-15 18:42:50 +08:00
parent ff5cbfde9c
commit 6410df0cb7
12 changed files with 85 additions and 63 deletions
@@ -19,6 +19,7 @@ import {
import { MdCleaningServices } from "react-icons/md";
import AnalysisParameters from "./AnalysisParameters";
import SchemeQuery from "./SchemeQuery";
import { SchemeRecord } from "./types";
interface TabPanelProps {
children?: React.ReactNode;
@@ -51,6 +52,7 @@ const FlushingAnalysisPanel: React.FC<FlushingAnalysisPanelProps> = ({
}) => {
const [internalOpen, setInternalOpen] = useState(true);
const [currentTab, setCurrentTab] = useState(0);
const [schemes, setSchemes] = useState<SchemeRecord[]>([]);
// Using controlled or uncontrolled state
const isOpen = controlledOpen !== undefined ? controlledOpen : internalOpen;
@@ -183,7 +185,7 @@ const FlushingAnalysisPanel: React.FC<FlushingAnalysisPanelProps> = ({
</TabPanel>
<TabPanel value={currentTab} index={1}>
<SchemeQuery />
<SchemeQuery schemes={schemes} onSchemesChange={setSchemes} />
</TabPanel>
</Box>
</Drawer>