视频监控 UI优化

This commit is contained in:
mmc
2026-05-06 17:28:29 +08:00
parent a7026ad690
commit 0fd80642e5

View File

@@ -48,12 +48,11 @@ export default function VideoMonitorPage() {
];
return (
<div className="p-4 bg-[#f5f7fa] min-h-screen">
{/* 顶部统计卡片 */}
<Row gutter={16} className="mb-4">
<Col span={4}>
<Card>
<div className="p-6 bg-[#f5f7fa] min-h-screen">
{/* ========== 顶部统计卡片:统一高度 ========== */}
<Row gutter={[16, 16]} className="mb-6">
<Col xs={24} sm={12} md={8} lg={4}>
<Card className="h-full">
<div className="flex justify-between items-center">
<div>
<div className="text-2xl font-bold">32 台</div>
@@ -65,8 +64,8 @@ export default function VideoMonitorPage() {
</Card>
</Col>
<Col span={4}>
<Card>
<Col xs={24} sm={12} md={8} lg={4}>
<Card className="h-full">
<div className="flex justify-between items-center">
<div>
<div className="text-2xl font-bold">2 台</div>
@@ -78,8 +77,8 @@ export default function VideoMonitorPage() {
</Card>
</Col>
<Col span={4}>
<Card>
<Col xs={24} sm={12} md={8} lg={4}>
<Card className="h-full">
<div className="flex justify-between items-center">
<div>
<div className="text-2xl font-bold">6 起</div>
@@ -91,8 +90,8 @@ export default function VideoMonitorPage() {
</Card>
</Col>
<Col span={4}>
<Card>
<Col xs={24} sm={12} md={8} lg={4}>
<Card className="h-full">
<div className="flex justify-between items-center">
<div>
<div className="text-2xl font-bold">2 起</div>
@@ -104,8 +103,8 @@ export default function VideoMonitorPage() {
</Card>
</Col>
<Col span={4}>
<Card>
<Col xs={24} sm={12} md={8} lg={4}>
<Card className="h-full">
<div className="flex justify-between items-center">
<div>
<div className="text-2xl font-bold">78.6TB</div>
@@ -118,20 +117,20 @@ export default function VideoMonitorPage() {
</Col>
</Row>
{/* 视频区域 + AI分析 */}
<Row gutter={16} className="mb-4">
<Col span={18}>
<Card title="视频监控中心" extra={
{/* ========== 视频区域 + AI:高度对齐 ========== */}
<Row gutter={[16, 16]} className="mb-6">
<Col xs={24} lg={18}>
<Card title="视频监控中心" className="h-[520px]" extra={
<Space>
<Button type="link">自定义布局</Button>
<Button type="link">全屏</Button>
</Space>
}>
<div className="flex gap-4">
<div className="flex-1 relative rounded overflow-hidden">
<div className="flex gap-4 h-full">
<div className="flex-1 relative rounded overflow-hidden h-[420px]">
<img
src="https://picsum.photos/id/10/1200/500"
className="w-full h-[400px] object-cover"
className="w-full h-full object-cover"
alt="video"
/>
<div className="absolute top-0 left-0 w-full p-2 bg-gradient-to-b from-black/60 to-transparent text-white">
@@ -142,7 +141,6 @@ export default function VideoMonitorPage() {
<Space>
<Button type="text" icon={<PauseOutlined />} className="text-white" />
<Button type="text" icon={<SoundOutlined />} className="text-white" />
{/* 这里也换成 CameraOutlined */}
<Button type="text" icon={<CameraOutlined />} className="text-white" />
<Button type="text" icon={<FullscreenOutlined />} className="text-white" />
<Dropdown overlay={
@@ -170,8 +168,8 @@ export default function VideoMonitorPage() {
</Card>
</Col>
<Col span={6}>
<Card title="AI视频智能分析" extra={<Button type="link">设置</Button>}>
<Col xs={24} lg={6}>
<Card title="AI视频智能分析" className="h-[520px]" extra={<Button type="link">设置</Button>}>
<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">
@@ -232,10 +230,10 @@ export default function VideoMonitorPage() {
</Col>
</Row>
{/* 底部:摄像头列表 + 时间线 + 告警快照 */}
<Row gutter={16}>
<Col span={10}>
<Card
{/* ========== 底部三张卡片:高度完全统一 ========== */}
<Row gutter={[16, 16]}>
<Col xs={24} lg={10}>
<Card className="h-[500px]"
title="摄像头设备列表"
extra={
<Space>
@@ -253,13 +251,13 @@ export default function VideoMonitorPage() {
dataSource={camList}
pagination={false}
size="small"
scroll={{ y: 320 }}
scroll={{ y: 380 }}
/>
</Card>
</Col>
<Col span={7}>
<Card
<Col xs={24} lg={7}>
<Card className="h-[500px]"
title="事件时间线"
extra={
<Select defaultValue="all" style={{ width: 120 }}>
@@ -269,7 +267,6 @@ export default function VideoMonitorPage() {
</Select>
}
>
{/* 左右交替时间轴 */}
<Timeline mode="alternate" style={{ marginTop: 10 }}>
<Timeline.Item color="red">
<div className="text-xs text-gray-500">10:23:41</div>
@@ -301,14 +298,14 @@ export default function VideoMonitorPage() {
<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>
<Col span={7}>
<Card title="最近告警快照" extra={<Button type="link">查看更多</Button>}>
<Col xs={24} lg={7}>
<Card className="h-[500px]" title="最近告警快照" extra={<Button type="link">查看更多</Button>}>
<div className="space-y-3">
{[20, 21, 22, 23].map((id) => (
<div key={id} className="flex gap-2 items-center">