2026-05-14 09:37:15 +08:00
|
|
|
|
import React, { useState } from 'react';
|
2026-05-06 17:17:36 +08:00
|
|
|
|
import {
|
|
|
|
|
|
Card, Row, Col, Button, Space, Input, Select, Table, Tag, Typography, Dropdown, Menu,
|
|
|
|
|
|
Timeline
|
|
|
|
|
|
} from 'antd';
|
|
|
|
|
|
import {
|
|
|
|
|
|
VideoCameraOutlined, BellOutlined, BorderOutlined, DatabaseOutlined,
|
|
|
|
|
|
PauseOutlined, SoundOutlined, CameraOutlined, FullscreenOutlined,
|
|
|
|
|
|
DownOutlined, AlertOutlined, UserOutlined, FireOutlined, ClockCircleOutlined,
|
|
|
|
|
|
ScanOutlined, PlayCircleOutlined, DownloadOutlined
|
|
|
|
|
|
} from '@ant-design/icons';
|
|
|
|
|
|
|
|
|
|
|
|
const { Text } = Typography;
|
|
|
|
|
|
const { Option } = Select;
|
|
|
|
|
|
|
|
|
|
|
|
export default function VideoMonitorPage() {
|
|
|
|
|
|
const [camList] = useState([
|
|
|
|
|
|
{ key: '1', name: 'CAM-01', position: '1#阵列区', status: '在线', recStatus: '录制中', time: '2025-05-20 10:23:45' },
|
|
|
|
|
|
{ key: '2', name: 'CAM-02', position: '逆变器室', status: '在线', recStatus: '录制中', time: '2025-05-20 10:24:10' },
|
|
|
|
|
|
{ key: '3', name: 'CAM-03', position: '电站大门', status: '在线', recStatus: '录制中', time: '2025-05-20 10:23:58' },
|
|
|
|
|
|
{ key: '4', name: 'CAM-04', position: '周界北侧', status: '在线', recStatus: '录制中', time: '2025-05-20 10:24:01' },
|
|
|
|
|
|
{ key: '5', name: 'CAM-05', position: '气象站', status: '在线', recStatus: '录制中', time: '2025-05-20 10:24:05' },
|
|
|
|
|
|
{ key: '6', name: 'CAM-06', position: '设备区', status: '在线', recStatus: '录制中', time: '2025-05-20 10:23:50' },
|
|
|
|
|
|
{ key: '7', name: 'CAM-07', position: '储能区', status: '在线', recStatus: '录制中', time: '2025-05-20 10:23:47' },
|
|
|
|
|
|
{ key: '8', name: 'CAM-08', position: '周界南侧', status: '离线', recStatus: '停止', time: '2025-05-20 09:12:31' },
|
|
|
|
|
|
{ key: '9', name: 'CAM-09', position: '1#阵列区西侧', status: '离线', recStatus: '停止', time: '2025-05-20 08:55:02' },
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
const camColumns = [
|
|
|
|
|
|
{ title: '摄像头名称', dataIndex: 'name', key: 'name' },
|
|
|
|
|
|
{ title: '位置', dataIndex: 'position', key: 'position' },
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '状态', dataIndex: 'status', key: 'status',
|
|
|
|
|
|
render: (text) => text === '在线'
|
|
|
|
|
|
? <Tag color="green">在线</Tag>
|
|
|
|
|
|
: <Tag color="red">离线</Tag>
|
|
|
|
|
|
},
|
|
|
|
|
|
{ title: '录像状态', dataIndex: 'recStatus', key: 'recStatus' },
|
|
|
|
|
|
{ title: '最后事件时间', dataIndex: 'time', key: 'time' },
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '操作', key: 'action',
|
|
|
|
|
|
render: () => (
|
|
|
|
|
|
<Space size="small">
|
|
|
|
|
|
<Button type="text" icon={<CameraOutlined />} />
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
)
|
|
|
|
|
|
}
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
2026-05-06 17:28:29 +08:00
|
|
|
|
<div className="p-6 bg-[#f5f7fa] min-h-screen">
|
2026-05-08 13:28:27 +08:00
|
|
|
|
<div style={{ marginBottom: 16 }}>
|
|
|
|
|
|
<Typography.Title level={4} style={{ margin: 0 }}>视频监控</Typography.Title>
|
|
|
|
|
|
<p style={{ color: '#666', margin: '4px 0 0' }}>实时视频监控、云台控制、录像回放与智能告警一体化管理</p>
|
|
|
|
|
|
</div>
|
2026-05-06 17:28:29 +08:00
|
|
|
|
{/* ========== 顶部统计卡片:统一高度 ========== */}
|
2026-05-14 09:37:15 +08:00
|
|
|
|
{/* 视频监控统计卡片 —— 宽高统一 + 最小宽度168px + 自动换行 */}
|
|
|
|
|
|
<Row
|
|
|
|
|
|
gutter={[16, 16]}
|
|
|
|
|
|
style={{
|
|
|
|
|
|
marginBottom: 16,
|
|
|
|
|
|
flexWrap: 'wrap',
|
|
|
|
|
|
}}
|
|
|
|
|
|
>
|
|
|
|
|
|
{[
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '在线摄像头',
|
|
|
|
|
|
value: '32',
|
|
|
|
|
|
unit: '台',
|
|
|
|
|
|
sub: '在线率 ↑ 4.1%',
|
|
|
|
|
|
subColor: '#52c41a',
|
|
|
|
|
|
icon: <VideoCameraOutlined />,
|
|
|
|
|
|
color: '#1890ff',
|
|
|
|
|
|
bg: '#E8F3FF'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '离线摄像头',
|
|
|
|
|
|
value: '2',
|
|
|
|
|
|
unit: '台',
|
|
|
|
|
|
sub: '离线率 ↑ 5.9%',
|
|
|
|
|
|
subColor: '#ff4d4f',
|
|
|
|
|
|
icon: <VideoCameraOutlined />,
|
|
|
|
|
|
color: '#999',
|
|
|
|
|
|
bg: '#F5F7FA'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '今日告警事件',
|
|
|
|
|
|
value: '6',
|
|
|
|
|
|
unit: '起',
|
|
|
|
|
|
sub: '较昨日 ↑ 50%',
|
|
|
|
|
|
subColor: '#ff4d4f',
|
|
|
|
|
|
icon: <BellOutlined />,
|
|
|
|
|
|
color: '#faad14',
|
|
|
|
|
|
bg: '#FFF7E8'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '周界告警',
|
|
|
|
|
|
value: '2',
|
|
|
|
|
|
unit: '起',
|
|
|
|
|
|
sub: '较昨日 ↑ 100%',
|
|
|
|
|
|
subColor: '#ff4d4f',
|
|
|
|
|
|
icon: <BorderOutlined />,
|
|
|
|
|
|
color: '#ff4d4f',
|
|
|
|
|
|
bg: '#FFF1F0'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '存储使用率',
|
|
|
|
|
|
value: '78.6',
|
|
|
|
|
|
unit: 'TB',
|
|
|
|
|
|
sub: '使用率 65.5%',
|
|
|
|
|
|
subColor: '#52c41a',
|
|
|
|
|
|
icon: <DatabaseOutlined />,
|
|
|
|
|
|
color: '#1890ff',
|
|
|
|
|
|
bg: '#E8F3FF'
|
|
|
|
|
|
},
|
|
|
|
|
|
].map((item, index) => (
|
|
|
|
|
|
<Col key={index} style={{ minWidth: '168px', flex: '1 0 auto' }}>
|
|
|
|
|
|
<Card
|
|
|
|
|
|
bordered={false}
|
|
|
|
|
|
bodyStyle={{ padding: '16px' }}
|
|
|
|
|
|
style={{ borderRadius: 8, height: 120 }}
|
|
|
|
|
|
>
|
|
|
|
|
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', height: '100%' }}>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<div style={{ fontSize: 14, color: '#0837A8', marginBottom: 4 }}>{item.title}</div>
|
|
|
|
|
|
<div style={{ display: 'flex', alignItems: 'baseline', marginBottom: 4 }}>
|
|
|
|
|
|
<span style={{ fontSize: 24, fontWeight: 700, color: '#333' }}>{item.value}</span>
|
|
|
|
|
|
<span style={{ fontSize: 14, marginLeft: 4, color: '#333' }}>{item.unit}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div style={{ fontSize: 12, color: '#999' }}>
|
|
|
|
|
|
在线率 <span style={{ color: item.subColor }}>{item.sub.replace('在线率 ', '')}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-05-06 17:17:36 +08:00
|
|
|
|
|
2026-05-14 09:37:15 +08:00
|
|
|
|
<div style={{
|
|
|
|
|
|
width: 48,
|
|
|
|
|
|
height: 48,
|
|
|
|
|
|
borderRadius: '50%',
|
|
|
|
|
|
background: item.bg,
|
|
|
|
|
|
display: 'flex',
|
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
|
flexShrink: 0
|
|
|
|
|
|
}}>
|
|
|
|
|
|
{React.cloneElement(item.icon, { style: { fontSize: 24, color: item.color } })}
|
|
|
|
|
|
</div>
|
2026-05-06 17:17:36 +08:00
|
|
|
|
</div>
|
2026-05-14 09:37:15 +08:00
|
|
|
|
</Card>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
))}
|
2026-05-06 17:17:36 +08:00
|
|
|
|
</Row>
|
|
|
|
|
|
|
2026-05-06 17:28:29 +08:00
|
|
|
|
{/* ========== 视频区域 + AI:高度对齐 ========== */}
|
|
|
|
|
|
<Row gutter={[16, 16]} className="mb-6">
|
|
|
|
|
|
<Col xs={24} lg={18}>
|
|
|
|
|
|
<Card title="视频监控中心" className="h-[520px]" extra={
|
2026-05-06 17:17:36 +08:00
|
|
|
|
<Space>
|
|
|
|
|
|
<Button type="link">自定义布局</Button>
|
|
|
|
|
|
<Button type="link">全屏</Button>
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
}>
|
2026-05-06 17:28:29 +08:00
|
|
|
|
<div className="flex gap-4 h-full">
|
|
|
|
|
|
<div className="flex-1 relative rounded overflow-hidden h-[420px]">
|
2026-05-06 17:17:36 +08:00
|
|
|
|
<img
|
|
|
|
|
|
src="https://picsum.photos/id/10/1200/500"
|
2026-05-06 17:28:29 +08:00
|
|
|
|
className="w-full h-full object-cover"
|
2026-05-06 17:17:36 +08:00
|
|
|
|
alt="video"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<div className="absolute top-0 left-0 w-full p-2 bg-gradient-to-b from-black/60 to-transparent text-white">
|
|
|
|
|
|
<div className="font-bold">主画面:1#阵列区球机</div>
|
|
|
|
|
|
<div className="text-xs opacity-80">2025-05-20 10:24:15</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="absolute bottom-0 w-full p-2 bg-gradient-to-t from-black/60 to-transparent">
|
|
|
|
|
|
<Space>
|
|
|
|
|
|
<Button type="text" icon={<PauseOutlined />} className="text-white" />
|
|
|
|
|
|
<Button type="text" icon={<SoundOutlined />} className="text-white" />
|
|
|
|
|
|
<Button type="text" icon={<CameraOutlined />} className="text-white" />
|
|
|
|
|
|
<Button type="text" icon={<FullscreenOutlined />} className="text-white" />
|
|
|
|
|
|
<Dropdown overlay={
|
|
|
|
|
|
<Menu>
|
|
|
|
|
|
<Menu.Item>超清</Menu.Item>
|
|
|
|
|
|
<Menu.Item>高清</Menu.Item>
|
|
|
|
|
|
<Menu.Item>标清</Menu.Item>
|
|
|
|
|
|
</Menu>
|
|
|
|
|
|
}>
|
|
|
|
|
|
<Button type="text" className="text-white">高清 <DownOutlined /></Button>
|
|
|
|
|
|
</Dropdown>
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className="w-[220px] grid grid-cols-2 gap-2">
|
|
|
|
|
|
{[11, 12, 13, 14, 15, 16].map((id) => (
|
|
|
|
|
|
<div key={id} className="relative rounded overflow-hidden">
|
|
|
|
|
|
<img src={`https://picsum.photos/id/${id}/200/100`} className="w-full h-[70px] object-cover" />
|
|
|
|
|
|
<div className="absolute bottom-1 right-1 text-xs bg-black/60 text-white px-1 rounded">直播中</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
))}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Card>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
2026-05-06 17:28:29 +08:00
|
|
|
|
<Col xs={24} lg={6}>
|
|
|
|
|
|
<Card title="AI视频智能分析" className="h-[520px]" extra={<Button type="link">设置</Button>}>
|
2026-05-06 17:17:36 +08:00
|
|
|
|
<div className="space-y-4">
|
|
|
|
|
|
<div className="flex items-center gap-3">
|
|
|
|
|
|
<div className="w-8 h-8 rounded-full bg-red-100 flex items-center justify-center text-red-500">
|
|
|
|
|
|
<AlertOutlined />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="flex-1">
|
|
|
|
|
|
<div className="font-medium">周界入侵检测</div>
|
|
|
|
|
|
<div className="text-xs text-gray-500">识别翻越、攀爬、破坏围栏</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="text-red-500 font-bold">2</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className="flex items-center gap-3">
|
|
|
|
|
|
<div className="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center text-blue-500">
|
|
|
|
|
|
<UserOutlined />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="flex-1">
|
|
|
|
|
|
<div className="font-medium">人员闯入</div>
|
|
|
|
|
|
<div className="text-xs text-gray-500">识别未经授权人员进入</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="text-red-500 font-bold">1</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className="flex items-center gap-3">
|
|
|
|
|
|
<div className="w-8 h-8 rounded-full bg-orange-100 flex items-center justify-center text-orange-500">
|
|
|
|
|
|
<FireOutlined />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="flex-1">
|
|
|
|
|
|
<div className="font-medium">烟火识别</div>
|
|
|
|
|
|
<div className="text-xs text-gray-500">识别烟雾、明火等异常</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="text-green-500 font-bold">0</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className="flex items-center gap-3">
|
|
|
|
|
|
<div className="w-8 h-8 rounded-full bg-yellow-100 flex items-center justify-center text-yellow-600">
|
|
|
|
|
|
<ClockCircleOutlined />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="flex-1">
|
|
|
|
|
|
<div className="font-medium">设备区域滞留</div>
|
|
|
|
|
|
<div className="text-xs text-gray-500">识别人员超时停留</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="text-red-500 font-bold">1</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className="flex items-center gap-3">
|
|
|
|
|
|
<div className="w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center text-purple-500">
|
|
|
|
|
|
<ScanOutlined />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="flex-1">
|
|
|
|
|
|
<div className="font-medium">运动检测</div>
|
|
|
|
|
|
<div className="text-xs text-gray-500">识别画面异常运动</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="text-red-500 font-bold">2</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Card>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
2026-05-06 17:28:29 +08:00
|
|
|
|
{/* ========== 底部三张卡片:高度完全统一 ========== */}
|
|
|
|
|
|
<Row gutter={[16, 16]}>
|
|
|
|
|
|
<Col xs={24} lg={10}>
|
|
|
|
|
|
<Card className="h-[500px]"
|
2026-05-06 17:17:36 +08:00
|
|
|
|
title="摄像头设备列表"
|
|
|
|
|
|
extra={
|
|
|
|
|
|
<Space>
|
|
|
|
|
|
<Input.Search placeholder="搜索摄像头" style={{ width: 200 }} />
|
|
|
|
|
|
<Select defaultValue="all" style={{ width: 120 }}>
|
|
|
|
|
|
<Option value="all">全部状态</Option>
|
|
|
|
|
|
<Option value="online">在线</Option>
|
|
|
|
|
|
<Option value="offline">离线</Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
}
|
|
|
|
|
|
>
|
|
|
|
|
|
<Table
|
|
|
|
|
|
columns={camColumns}
|
|
|
|
|
|
dataSource={camList}
|
|
|
|
|
|
pagination={false}
|
|
|
|
|
|
size="small"
|
2026-05-06 17:28:29 +08:00
|
|
|
|
scroll={{ y: 380 }}
|
2026-05-06 17:17:36 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</Card>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
2026-05-06 17:28:29 +08:00
|
|
|
|
<Col xs={24} lg={7}>
|
|
|
|
|
|
<Card className="h-[500px]"
|
2026-05-06 17:17:36 +08:00
|
|
|
|
title="事件时间线"
|
|
|
|
|
|
extra={
|
|
|
|
|
|
<Select defaultValue="all" style={{ width: 120 }}>
|
|
|
|
|
|
<Select.Option value="all">全部类型</Select.Option>
|
|
|
|
|
|
<Select.Option value="perimeter">周界入侵</Select.Option>
|
|
|
|
|
|
<Select.Option value="intrusion">人员闯入</Select.Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
}
|
|
|
|
|
|
>
|
|
|
|
|
|
<Timeline mode="alternate" style={{ marginTop: 10 }}>
|
|
|
|
|
|
<Timeline.Item color="red">
|
|
|
|
|
|
<div className="text-xs text-gray-500">10:23:41</div>
|
|
|
|
|
|
<div className="font-medium text-sm mt-1">周界入侵检测</div>
|
|
|
|
|
|
<div className="text-xs text-gray-500 mt-1">周界北侧区域检测到翻越围栏事件</div>
|
|
|
|
|
|
</Timeline.Item>
|
|
|
|
|
|
|
|
|
|
|
|
<Timeline.Item color="orange">
|
|
|
|
|
|
<div className="text-xs text-gray-500">10:18:09</div>
|
|
|
|
|
|
<div className="font-medium text-sm mt-1">人员闯入</div>
|
|
|
|
|
|
<div className="text-xs text-gray-500 mt-1">设备区检测到人员闯入</div>
|
|
|
|
|
|
</Timeline.Item>
|
|
|
|
|
|
|
|
|
|
|
|
<Timeline.Item color="orange">
|
|
|
|
|
|
<div className="text-xs text-gray-500">10:05:33</div>
|
|
|
|
|
|
<div className="font-medium text-sm mt-1">设备区域滞留</div>
|
|
|
|
|
|
<div className="text-xs text-gray-500 mt-1">逆变器区人员滞留超过5分钟</div>
|
|
|
|
|
|
</Timeline.Item>
|
|
|
|
|
|
|
|
|
|
|
|
<Timeline.Item color="blue">
|
|
|
|
|
|
<div className="text-xs text-gray-500">09:52:17</div>
|
|
|
|
|
|
<div className="font-medium text-sm mt-1">运动检测</div>
|
|
|
|
|
|
<div className="text-xs text-gray-500 mt-1">气象站区域检测到异常运动</div>
|
|
|
|
|
|
</Timeline.Item>
|
|
|
|
|
|
|
|
|
|
|
|
<Timeline.Item color="red">
|
|
|
|
|
|
<div className="text-xs text-gray-500">09:41:28</div>
|
|
|
|
|
|
<div className="font-medium text-sm mt-1">周界入侵检测</div>
|
|
|
|
|
|
<div className="text-xs text-gray-500 mt-1">周界南侧区域检测到攀爬事件</div>
|
|
|
|
|
|
</Timeline.Item>
|
|
|
|
|
|
</Timeline>
|
|
|
|
|
|
<div className="text-center mt-4">
|
|
|
|
|
|
<Button type="link">查看更多</Button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Card>
|
|
|
|
|
|
</Col>
|
2026-05-06 17:28:29 +08:00
|
|
|
|
|
|
|
|
|
|
<Col xs={24} lg={7}>
|
|
|
|
|
|
<Card className="h-[500px]" title="最近告警快照" extra={<Button type="link">查看更多</Button>}>
|
2026-05-06 17:17:36 +08:00
|
|
|
|
<div className="space-y-3">
|
|
|
|
|
|
{[20, 21, 22, 23].map((id) => (
|
|
|
|
|
|
<div key={id} className="flex gap-2 items-center">
|
|
|
|
|
|
<img src={`https://picsum.photos/id/${id}/120/70`} className="w-[120px] h-[70px] object-cover rounded" />
|
|
|
|
|
|
<div className="flex-1">
|
|
|
|
|
|
<div className="font-medium text-sm">告警事件</div>
|
|
|
|
|
|
<div className="text-xs text-gray-500">2025-05-20 10:23</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<Space>
|
|
|
|
|
|
<Button type="text" icon={<PlayCircleOutlined />} />
|
|
|
|
|
|
<Button type="text" icon={<DownloadOutlined />} />
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
))}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Card>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|