feat(ui): 统一面板空状态引导
This commit is contained in:
@@ -68,6 +68,7 @@ import dayjs, { Dayjs } from "dayjs";
|
||||
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
|
||||
import { DateTimePicker, LocalizationProvider } from "@mui/x-date-pickers";
|
||||
import { zhCN as pickerZhCN } from "@mui/x-date-pickers/locales";
|
||||
import PanelEmptyState from "@components/olmap/common/PanelEmptyState";
|
||||
|
||||
const STATUS_OPTIONS: {
|
||||
value: "online" | "offline" | "warning" | "error";
|
||||
@@ -1067,22 +1068,23 @@ const SCADADeviceList: React.FC<SCADADeviceListProps> = ({
|
||||
<CircularProgress />
|
||||
</Box>
|
||||
) : filteredDevices.length === 0 ? (
|
||||
<Box
|
||||
sx={{
|
||||
p: 4,
|
||||
textAlign: "center",
|
||||
color: "text.secondary",
|
||||
}}
|
||||
>
|
||||
<DeviceHub sx={{ fontSize: 48, mb: 2, opacity: 0.5 }} />
|
||||
<Typography variant="body2">
|
||||
{searchQuery ||
|
||||
<PanelEmptyState
|
||||
icon={<DeviceHub />}
|
||||
title={
|
||||
searchQuery ||
|
||||
selectedType !== "all" ||
|
||||
selectedStatus !== "all"
|
||||
? "未找到匹配的设备"
|
||||
: "暂无 SCADA 设备"}
|
||||
</Typography>
|
||||
</Box>
|
||||
? "未找到匹配设备"
|
||||
: "暂无 SCADA 设备"
|
||||
}
|
||||
description={
|
||||
searchQuery ||
|
||||
selectedType !== "all" ||
|
||||
selectedStatus !== "all"
|
||||
? "请清除关键词,或调整设备类型和状态筛选条件。"
|
||||
: "请确认设备已接入当前管网后刷新列表。"
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<FixedSizeList
|
||||
height={listHeight}
|
||||
|
||||
Reference in New Issue
Block a user