xx
This commit is contained in:
@@ -1,120 +1,119 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {
|
import {
|
||||||
Table,
|
Table,
|
||||||
Button,
|
Button,
|
||||||
DatePicker,
|
DatePicker,
|
||||||
Space,
|
Space,
|
||||||
Typography,
|
Typography,
|
||||||
Card,
|
Card,
|
||||||
Segmented,
|
Segmented,
|
||||||
Row,
|
Row,
|
||||||
Col,
|
Col,
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import {
|
import {
|
||||||
DownloadOutlined,
|
DownloadOutlined,
|
||||||
VideoCameraOutlined,
|
VideoCameraOutlined,
|
||||||
CalendarOutlined,
|
CalendarOutlined,
|
||||||
SearchOutlined
|
SearchOutlined
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { VIDEOS } from '../constants';
|
|
||||||
|
|
||||||
const { Text, Title } = Typography;
|
const { Text, Title } = Typography;
|
||||||
const { RangePicker } = DatePicker;
|
const { RangePicker } = DatePicker;
|
||||||
|
|
||||||
export default function Downloads() {
|
export default function Downloads() {
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '文件详情',
|
title: '文件详情',
|
||||||
key: 'file',
|
key: 'file',
|
||||||
render: (record: any) => (
|
render: (record: any) => (
|
||||||
<Space size="middle">
|
<Space size="middle">
|
||||||
<div className="w-8 h-8 bg-blue-50 text-blue-500 rounded flex items-center justify-center border border-blue-100">
|
<div className="w-8 h-8 bg-blue-50 text-blue-500 rounded flex items-center justify-center border border-blue-100">
|
||||||
<VideoCameraOutlined style={{ fontSize: 16 }} />
|
<VideoCameraOutlined style={{ fontSize: 16 }} />
|
||||||
</div>
|
</div>
|
||||||
<Space direction="vertical" size={0}>
|
<Space direction="vertical" size={0}>
|
||||||
<Text strong style={{ fontSize: 13 }}>ROB_{record.id}_RAW.mp4</Text>
|
<Text strong style={{ fontSize: 13 }}>ROB_{record.id}_RAW.mp4</Text>
|
||||||
<Text type="secondary" style={{ fontSize: 10, fontFamily: 'monospace', fontStyle: 'italic' }}>Cloud-Storage-01</Text>
|
<Text type="secondary" style={{ fontSize: 10, fontFamily: 'monospace', fontStyle: 'italic' }}>Cloud-Storage-01</Text>
|
||||||
</Space>
|
</Space>
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '源设备',
|
title: '源设备',
|
||||||
dataIndex: 'deviceName',
|
dataIndex: 'deviceName',
|
||||||
key: 'deviceName',
|
key: 'deviceName',
|
||||||
render: (text: string) => <Text style={{ fontSize: 13 }}>{text}</Text>,
|
render: (text: string) => <Text style={{ fontSize: 13 }}>{text}</Text>,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '起止时间',
|
title: '起止时间',
|
||||||
key: 'duration',
|
key: 'duration',
|
||||||
render: (record: any) => (
|
render: (record: any) => (
|
||||||
<Space direction="vertical" size={0}>
|
<Space direction="vertical" size={0}>
|
||||||
<Text type="secondary" style={{ fontSize: 11, fontFamily: 'monospace' }}>{record.startTime.split(' ')[1]}</Text>
|
<Text type="secondary" style={{ fontSize: 11, fontFamily: 'monospace' }}>{record.startTime.split(' ')[1]}</Text>
|
||||||
<div className="h-[1px] w-4 bg-gray-200" />
|
<div className="h-[1px] w-4 bg-gray-200" />
|
||||||
<Text type="secondary" style={{ fontSize: 11, fontFamily: 'monospace' }}>{record.endTime.split(' ')[1]}</Text>
|
<Text type="secondary" style={{ fontSize: 11, fontFamily: 'monospace' }}>{record.endTime.split(' ')[1]}</Text>
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '容量',
|
title: '容量',
|
||||||
dataIndex: 'size',
|
dataIndex: 'size',
|
||||||
key: 'size',
|
key: 'size',
|
||||||
render: (text: string) => <Text type="secondary" style={{ fontSize: 12 }}>{text}</Text>,
|
render: (text: string) => <Text type="secondary" style={{ fontSize: 12 }}>{text}</Text>,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
key: 'action',
|
key: 'action',
|
||||||
align: 'right' as const,
|
align: 'right' as const,
|
||||||
render: () => (
|
render: () => (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
icon={<DownloadOutlined />}
|
icon={<DownloadOutlined />}
|
||||||
style={{ fontSize: 11, fontWeight: 'bold' }}
|
style={{ fontSize: 11, fontWeight: 'bold' }}
|
||||||
>
|
>
|
||||||
下载
|
下载
|
||||||
</Button>
|
</Button>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<Title level={5} style={{ margin: 0 }}>视频回放中心</Title>
|
<Title level={5} style={{ margin: 0 }}>视频回放中心</Title>
|
||||||
<Segmented
|
<Segmented
|
||||||
options={['全部录像', '今日录像']}
|
options={['全部录像', '今日录像']}
|
||||||
defaultValue="全部录像"
|
defaultValue="全部录像"
|
||||||
style={{ borderRadius: 2 }}
|
style={{ borderRadius: 2 }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Card size="small" style={{ backgroundColor: '#fafafa', borderRadius: 2 }}>
|
<Card size="small" style={{ backgroundColor: '#fafafa', borderRadius: 2 }}>
|
||||||
<Row gutter={16} align="middle">
|
<Row gutter={16} align="middle">
|
||||||
<Col>
|
<Col>
|
||||||
<Space>
|
<Space>
|
||||||
<CalendarOutlined style={{ color: 'rgba(0,0,0,0.45)' }} />
|
<CalendarOutlined style={{ color: 'rgba(0,0,0,0.45)' }} />
|
||||||
<Text strong type="secondary" style={{ fontSize: 11, textTransform: 'uppercase' }}>时间跨度</Text>
|
<Text strong type="secondary" style={{ fontSize: 11, textTransform: 'uppercase' }}>时间跨度</Text>
|
||||||
</Space>
|
</Space>
|
||||||
</Col>
|
</Col>
|
||||||
<Col>
|
<Col>
|
||||||
<RangePicker size="small" style={{ borderRadius: 2 }} />
|
<RangePicker size="small" style={{ borderRadius: 2 }} />
|
||||||
</Col>
|
</Col>
|
||||||
<Col flex="auto" className="text-right">
|
<Col flex="auto" className="text-right">
|
||||||
<Button type="primary" size="small" icon={<SearchOutlined />} style={{ borderRadius: 2 }}>
|
<Button type="primary" size="small" icon={<SearchOutlined />} style={{ borderRadius: 2 }}>
|
||||||
联机检索
|
联机检索
|
||||||
</Button>
|
</Button>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card styles={{ body: { padding: 0 } }} className="overflow-hidden">
|
<Card styles={{ body: { padding: 0 } }} className="overflow-hidden">
|
||||||
<Table
|
<Table
|
||||||
size="small"
|
size="small"
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={VIDEOS.map(v => ({ ...v, key: v.id }))}
|
dataSource={VIDEOS.map(v => ({ ...v, key: v.id }))}
|
||||||
pagination={{ pageSize: 12, size: 'small' }}
|
pagination={{ pageSize: 12, size: 'small' }}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import {
|
|||||||
AlertOutlined,
|
AlertOutlined,
|
||||||
EyeOutlined
|
EyeOutlined
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { DEVICES } from '../constants';
|
|
||||||
|
|
||||||
const { Text, Title } = Typography;
|
const { Text, Title } = Typography;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user