From a7026ad690d14eb2d98516d0eafc2549a4b71f9a Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Wed, 6 May 2026 17:17:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=9B=91=E6=8E=A7=E5=88=9D?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/UserPage.tsx | 9 +- src/pages/VideoMonitorPage.tsx | 333 +++++++++++++++++++++++++++++++++ src/router/index.tsx | 3 +- 3 files changed, 343 insertions(+), 2 deletions(-) create mode 100644 src/pages/VideoMonitorPage.tsx diff --git a/src/pages/UserPage.tsx b/src/pages/UserPage.tsx index e5d63b9..dc016b8 100644 --- a/src/pages/UserPage.tsx +++ b/src/pages/UserPage.tsx @@ -527,8 +527,15 @@ export default function UserRolePage() { pageSize={rolePagination.pageSize} total={rolePagination.total} showSizeChanger + pageSizeOptions={['12', '24', '36', '48', '60']} showTotal={(t) => `共 ${t} 条`} - onChange={(p, s) => setRolePagination({ pageNum: p, pageSize: s, total: rolePagination.total })} + onChange={(page, pageSize) => { + setRolePagination({ + ...rolePagination, + pageNum: page, + pageSize: pageSize, + }); + }} /> diff --git a/src/pages/VideoMonitorPage.tsx b/src/pages/VideoMonitorPage.tsx new file mode 100644 index 0000000..c0f4dc1 --- /dev/null +++ b/src/pages/VideoMonitorPage.tsx @@ -0,0 +1,333 @@ +import { useState } from 'react'; +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 === '在线' + ? 在线 + : 离线 + }, + { title: '录像状态', dataIndex: 'recStatus', key: 'recStatus' }, + { title: '最后事件时间', dataIndex: 'time', key: 'time' }, + { + title: '操作', key: 'action', + render: () => ( + + + + + }> +
+
+ video +
+
主画面:1#阵列区球机
+
2025-05-20 10:24:15
+
+
+ + + + +
+
+ +
+ {[11, 12, 13, 14, 15, 16].map((id) => ( +
+ +
直播中
+
+ ))} +
+
+ + + + + 设置}> +
+
+
+ +
+
+
周界入侵检测
+
识别翻越、攀爬、破坏围栏
+
+
2
+
+ +
+
+ +
+
+
人员闯入
+
识别未经授权人员进入
+
+
1
+
+ +
+
+ +
+
+
烟火识别
+
识别烟雾、明火等异常
+
+
0
+
+ +
+
+ +
+
+
设备区域滞留
+
识别人员超时停留
+
+
1
+
+ +
+
+ +
+
+
运动检测
+
识别画面异常运动
+
+
2
+
+
+
+ + + + {/* 底部:摄像头列表 + 时间线 + 告警快照 */} + + + + + + + } + > + + + + + + + 全部类型 + 周界入侵 + 人员闯入 + + } + > + {/* 左右交替时间轴 */} + + +
10:23:41
+
周界入侵检测
+
周界北侧区域检测到翻越围栏事件
+
+ + +
10:18:09
+
人员闯入
+
设备区检测到人员闯入
+
+ + +
10:05:33
+
设备区域滞留
+
逆变器区人员滞留超过5分钟
+
+ + +
09:52:17
+
运动检测
+
气象站区域检测到异常运动
+
+ + +
09:41:28
+
周界入侵检测
+
周界南侧区域检测到攀爬事件
+
+
+ +
+ +
+
+ + + 查看更多}> +
+ {[20, 21, 22, 23].map((id) => ( +
+ +
+
告警事件
+
2025-05-20 10:23
+
+ +
+ ))} +
+
+ + + + + ); +} diff --git a/src/router/index.tsx b/src/router/index.tsx index 8ba4fdd..9f3e41a 100644 --- a/src/router/index.tsx +++ b/src/router/index.tsx @@ -1,6 +1,7 @@ import React, { lazy, Suspense } from 'react'; import { createBrowserRouter } from 'react-router-dom'; import type { RouteObject } from 'react-router-dom'; +import VideoMonitorPage from '../pages/VideoMonitorPage'; const Layout = lazy(() => import('../components/Layout')); const ProtectedRoute = lazy(() => import('../components/ProtectedRoute')); @@ -79,7 +80,7 @@ const routes: RouteObject[] = [ { path: 'overview', element: }, { path: 'devices', element: }, { path: 'video', element: