import React, { useState } from 'react';
import {
Card, Row, Col, Button, Space, Input, Select, Table, Tag, Typography, Dropdown, Menu,
Timeline, Badge, Divider, Tooltip
} from 'antd';
import {
VideoCameraOutlined, BellOutlined, BorderOutlined, DatabaseOutlined,
PauseOutlined, SoundOutlined, CameraOutlined, FullscreenOutlined,
DownOutlined, AlertOutlined, UserOutlined, FireOutlined, ClockCircleOutlined,
ScanOutlined, PlayCircleOutlined, DownloadOutlined, ReloadOutlined,
PictureOutlined, VideoCameraAddOutlined, ScissorOutlined,
ExpandOutlined, SettingOutlined, SearchOutlined, MoreOutlined
} from '@ant-design/icons';
import { Fence, Monitor, HardDrive, BellRing, History, Eye, Play, Square, Volume2, ChevronRight } from 'lucide-react';
const { Text, Title } = Typography;
const { Option } = Select;
export default function VideoMonitorPage() {
const cardStyle = {
borderRadius: 12,
border: '1px solid #f0f0f0',
boxShadow: '0 4px 12px rgba(0,0,0,0.05)',
overflow: 'hidden'
};
const [camList] = useState([
{ key: '1', name: 'CAM-01 1#阵列区球机', position: '1#阵列区', status: '在线', recStatus: '录制中', time: '2025-05-20 10:23:45' },
{ key: '2', name: 'CAM-02 2#逆变器室', position: '逆变器室', status: '在线', recStatus: '录制中', time: '2025-05-20 10:24:10' },
{ key: '3', name: 'CAM-03 3#电站大门', position: '电站大门', status: '在线', recStatus: '录制中', time: '2025-05-20 10:23:58' },
{ key: '4', name: 'CAM-04 4#周界北侧', position: '周界北侧', status: '在线', recStatus: '录制中', time: '2025-05-20 10:24:01' },
{ key: '5', name: 'CAM-05 5#气象站', position: '气象站', status: '在线', recStatus: '录制中', time: '2025-05-20 10:24:05' },
{ key: '6', name: 'CAM-06 6#设备区', position: '设备区', status: '在线', recStatus: '录制中', time: '2025-05-20 10:23:50' },
{ key: '7', name: 'CAM-07 7#储能电池舱', position: '储能区', status: '在线', recStatus: '录制中', time: '2025-05-20 10:23:47' },
{ key: '8', name: 'CAM-08 8#周界南侧', position: '周界南侧', status: '离线', recStatus: '停止', time: '2025-05-20 09:12:31' },
{ key: '9', name: 'CAM-09 9#阵列区西侧', position: '1#阵列区西侧', status: '离线', recStatus: '停止', time: '2025-05-20 08:55:02' },
]);
const camColumns = [
{ title: '摄像头名称', dataIndex: 'name', key: 'name', width: 200 },
{ title: '位置', dataIndex: 'position', key: 'position', width: 120 },
{
title: '状态', dataIndex: 'status', key: 'status', width: 100,
render: (text: string) => (
{text}
)
},
{
title: '录像状态', dataIndex: 'recStatus', key: 'recStatus', width: 100,
render: (text: string) => (
{text}
)
},
{ title: '最后事件时间', dataIndex: 'time', key: 'time', width: 180 },
{
title: '操作', key: 'action', width: 60,
render: () => (
} size="small" />
)
}
];
return (
{/* 顶部统计卡片 */}
{[
{
title: '在线摄像头',
value: '32',
unit: '台',
sub: '在线率 ↑ 4.1%',
subColor: '#52c41a',
icon: ,
color: '#1890ff',
bg: '#E8F3FF'
},
{
title: '离线摄像头',
value: '2',
unit: '台',
sub: '离线率 ↑ 5.9%',
subColor: '#ff4d4f',
icon: ,
color: '#999',
bg: '#F5F7FA'
},
{
title: '今日告警事件',
value: '6',
unit: '起',
sub: '较昨日 ↑ 50%',
subColor: '#ff4d4f',
icon: ,
color: '#faad14',
bg: '#FFF7E8'
},
{
title: '周界告警',
value: '2',
unit: '起',
sub: '较昨日 ↑ 100%',
subColor: '#ff4d4f',
icon: ,
color: '#ff4d4f',
bg: '#FFF1F0'
},
{
title: '存储使用率',
value: '78.6',
unit: 'TB',
sub: '使用率 65.5%',
subColor: '#52c41a',
icon: ,
color: '#1890ff',
bg: '#E8F3FF'
},
].map((item, index) => (
{item.title}
{item.value}
{item.unit}
在线率 {item.sub.replace('在线率 ', '')}
{React.cloneElement(item.icon, { style: { fontSize: 24, color: item.color } })}
))}
{/* 中间视频监控中心 */}
视频监控中心}
extra={
}>自定义布局
}>全屏
}
bordered={false}
style={cardStyle}
bodyStyle={{ padding: 16 }}
>
主画面:1#阵列区球机
2025-05-20 10:24:15
{[
{ title: '2#逆变器室', img: 'https://images.unsplash.com/photo-1581094794329-c8112a89af12?auto=format&fit=crop&w=400&q=60' },
{ title: '3#电站大门', img: 'https://images.unsplash.com/photo-1541888946425-d81bb19480c5?auto=format&fit=crop&w=400&q=60' },
{ title: '4#周界北侧', img: 'https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=400&q=60' },
{ title: '5#气象站', img: 'https://images.unsplash.com/photo-1534088568595-a066f7104211?auto=format&fit=crop&w=400&q=60' },
{ title: '6#设备区', img: 'https://images.unsplash.com/photo-1581092160562-40aa08e78837?auto=format&fit=crop&w=400&q=60' },
{ title: '7#储能电池舱', img: 'https://images.unsplash.com/photo-1593941707882-a5bba14938c7?auto=format&fit=crop&w=400&q=60' },
].map((v, i) => (
{v.title}
))}
AI 视频智能分析}
extra={}
bordered={false}
style={{ ...cardStyle, height: '100%' }}
bodyStyle={{ padding: '16px 20px' }}
>
{[
{ icon:

, bg: '#FFF1F0', title: '周界入侵检测', desc: '识别翻越、攀爬、破坏围栏等行为', count: 2, color: '#F53F3F' },
{ icon:

, bg: '#E8F3FF', title: '人员闯入', desc: '识别未经授权人员进入区域', count: 1, color: '#165DFF' },
{ icon:
, bg: '#FFF7E8', title: '烟火识别', desc: '识别烟雾、明火等异常情况', count: 0, color: '#86909C' },
{ icon:
, bg: '#FFF7E8', title: '设备区域滞留', desc: '识别人员在设备区滞留行为', count: 1, color: '#F7BA1E' },
{ icon:

, bg: '#E8FFEA', title: '运动检测', desc: '识别画面异常运动目标', count: 2, color: '#00B42A' },
].map((item, idx) => (
{item.icon}
0 ? '#F53F3F' : '#86909C' }}>{item.count}
))}
{/* 底部三栏 */}
摄像头设备列表}
extra={
} style={{ width: 200 }} size="small" />
}
bordered={false}
style={cardStyle}
bodyStyle={{ padding: 0 }}
>
事件时间线}
extra={}
bordered={false}
style={cardStyle}
bodyStyle={{ padding: '16px 20px' }}
>
{[
{ time: '10:23:41', title: '周界入侵检测', desc: '周界北侧区域检测到翻越围栏事件', color: '#F53F3F' },
{ time: '10:18:09', title: '人员闯入', desc: '设备区检测到人员闯入', color: '#F7BA1E' },
{ time: '10:05:33', title: '设备区域滞留', desc: '逆变器区人员滞留超过5分钟', color: '#F7BA1E' },
{ time: '09:52:17', title: '运动检测', desc: '气象站区域检测到异常运动', color: '#165DFF' },
{ time: '09:41:28', title: '周界入侵检测', desc: '周界南侧区域检测到攀爬事件', color: '#F53F3F' },
].map((item, idx) => (
{item.time}} dot={}>
))}
最近告警快照}
extra={}
bordered={false}
style={cardStyle}
bodyStyle={{ padding: '16px 20px' }}
>
{[
{ title: '周界北侧', time: '10:23:41', type: '周界入侵', img: 'https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=300&q=60', boxColor: '#F53F3F' },
{ title: '设备区', time: '10:18:09', type: '人员闯入', img: 'https://images.unsplash.com/photo-1581092160562-40aa08e78837?auto=format&fit=crop&w=300&q=60', boxColor: '#F7BA1E' },
{ title: '逆变器室', time: '10:05:33', type: '设备区域滞留', img: 'https://images.unsplash.com/photo-1581094794329-c8112a89af12?auto=format&fit=crop&w=300&q=60', boxColor: '#F7BA1E' },
//{ title: '气象站', time: '09:52:17', type: '运动检测', img: 'https://images.unsplash.com/photo-1534088568595-a066f7104211?auto=format&fit=crop&w=300&q=60', boxColor: '#165DFF' },
].map((item, idx) => (

{/* 模拟检测框 */}
} size="small" />
} size="small" />
} size="small" />
))}
);
}