完成时间轴前后端数据连通

This commit is contained in:
JIANG
2025-10-10 15:12:23 +08:00
parent 5d54ad11d4
commit fa0970bd79
13 changed files with 416 additions and 285 deletions

View File

@@ -294,6 +294,7 @@ const SCADADataPanel: React.FC<SCADADataPanelProps> = ({
justifyContent: "center",
py: 6,
color: "text.secondary",
height: 376,
}}
>
<Typography variant="h6" gutterBottom>
@@ -307,7 +308,7 @@ const SCADADataPanel: React.FC<SCADADataPanelProps> = ({
const chartSection = hasData ? (
<LineChart
dataset={dataset}
height={360}
height={376}
margin={{ left: 50, right: 50, top: 20, bottom: 80 }}
xAxis={[
{
@@ -354,8 +355,8 @@ const SCADADataPanel: React.FC<SCADADataPanelProps> = ({
return (
<Paper
className={clsx(
"absolute right-4 top-20 w-4xl h-2xl bg-white/95 backdrop-blur-[10px] rounded-xl shadow-lg overflow-hidden flex flex-col transition-opacity duration-300",
visible ? "opacity-95" : "opacity-0"
"absolute right-4 top-20 w-4xl h-2xl bg-white rounded-xl shadow-lg overflow-hidden flex flex-col transition-opacity duration-300",
visible ? "opacity-95 hover:opacity-100" : "opacity-0 -z-10"
)}
>
{/* Header */}

View File

@@ -178,7 +178,7 @@ const SCADADeviceList: React.FC<SCADADeviceListProps> = ({
};
return (
<Paper className="absolute left-4 top-20 w-90 max-h-[calc(100vh-100px)] bg-white/95 backdrop-blur-[10px] rounded-xl shadow-lg overflow-hidden flex flex-col opacity-95 transition-opacity duration-200 ease-in-out hover:opacity-100">
<Paper className="absolute left-4 top-20 w-90 max-h-[calc(100vh-100px)] bg-white rounded-xl shadow-lg overflow-hidden flex flex-col opacity-95 transition-opacity duration-200 ease-in-out hover:opacity-100">
{/* 头部控制栏 */}
<Box
sx={{
@@ -228,7 +228,7 @@ const SCADADeviceList: React.FC<SCADADeviceListProps> = ({
<Box sx={{ p: 2, backgroundColor: "grey.50" }}>
<Stack spacing={2}>
{/* 搜索框 */}
<Box className="h-10 flex items-center border border-gray-300 rounded-lg p-0.5">
<Box className="h-10 flex items-center border border-gray-300 rounded-md p-0.5">
<InputBase
sx={{ ml: 1, flex: 1 }}
placeholder="搜索设备名称、ID 或类型..."
@@ -395,6 +395,11 @@ const SCADADeviceList: React.FC<SCADADeviceListProps> = ({
</Typography>
</Stack>
}
slotProps={{
secondary: {
component: "div", // 使其支持多行
},
}}
/>
<Tooltip title="缩放到设备位置">