自适应完成
This commit is contained in:
@@ -13,6 +13,8 @@ import {
|
||||
message,
|
||||
Typography,
|
||||
Space,
|
||||
TimePicker,
|
||||
Divider,
|
||||
} from 'antd';
|
||||
import {
|
||||
CloudOutlined,
|
||||
@@ -25,131 +27,150 @@ import {
|
||||
FileTextOutlined,
|
||||
DeleteOutlined,
|
||||
RestOutlined,
|
||||
SettingOutlined,
|
||||
UserOutlined,
|
||||
NotificationOutlined,
|
||||
ApiOutlined,
|
||||
SafetyCertificateOutlined,
|
||||
ToolOutlined,
|
||||
RightOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import {
|
||||
Smartphone,
|
||||
Mail,
|
||||
Send,
|
||||
MessageSquare,
|
||||
ShieldCheck,
|
||||
Users,
|
||||
LineChart,
|
||||
Wrench,
|
||||
Cpu,
|
||||
Camera,
|
||||
Wind,
|
||||
Box,
|
||||
Activity,
|
||||
Zap,
|
||||
RefreshCw,
|
||||
Shield,
|
||||
Key,
|
||||
Lock,
|
||||
} from 'lucide-react';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const { Text } = Typography;
|
||||
const { Text, Title } = Typography;
|
||||
|
||||
const BasicSettings = () => {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
// 响应式字体大小
|
||||
const fontNormal = 'clamp(12px, 0.75vw, 13px)';
|
||||
const fontSmall = 'clamp(11px, 0.7vw, 12px)';
|
||||
const fontTitle = 'clamp(14px, 0.85vw, 16px)';
|
||||
const fontLarge = 'clamp(18px, 1.1vw, 22px)';
|
||||
|
||||
const handleSave = () => {
|
||||
message.success('设置已保存');
|
||||
};
|
||||
|
||||
// 设备接入状态数据
|
||||
const deviceStatusData = [
|
||||
{ name: '逆变器', count: '5/5', status: '正常', color: '#52c41a' },
|
||||
{ name: '汇流箱', count: '20/20', status: '正常', color: '#52c41a' },
|
||||
{ name: '摄像头', count: '12/12', status: '正常', color: '#52c41a' },
|
||||
{ name: '无人机', count: '2/2', status: '正常', color: '#52c41a' },
|
||||
{ name: 'API接口', count: '正常', status: '正常', color: '#52c41a' },
|
||||
{ name: 'Modbus', count: '正常', status: '正常', color: '#52c41a' },
|
||||
];
|
||||
|
||||
// 服务配置数据
|
||||
const serviceConfigData = [
|
||||
{ name: 'MQTT配置', value: 'tcp://localhost:1883', status: '离线', statusColor: '#8c8c8c' },
|
||||
{ name: '视频服务配置', value: '待接入 RTSP / WebRTC 服务', status: '待处理', statusColor: '#fa8c16' },
|
||||
{ name: 'AI服务配置', value: 'http://ai-service.local', status: '待处理', statusColor: '#fa8c16' },
|
||||
{ name: 'API密钥管理', value: '正常', status: '正常', statusColor: '#52c41a' },
|
||||
];
|
||||
|
||||
// 视频服务配置数据
|
||||
const videoServiceData = [
|
||||
{ name: '视频服务数', value: '1' },
|
||||
{ name: '启用服务数', value: '1' },
|
||||
{ name: '摄像头总数', value: '3' },
|
||||
{ name: '离线摄像头', value: '3' },
|
||||
{ name: '在线流数量', value: '0' },
|
||||
{ name: '服务状态', value: 'ONLINE', statusColor: '#52c41a' },
|
||||
{ name: 'API地址', value: 'http://127.0.0.1:9997' },
|
||||
{ name: 'HLS地址', value: 'http://127.0.0.1:8888' },
|
||||
{ name: 'WebRTC地址', value: 'http://127.0.0.1:8889' },
|
||||
{ name: '检测结果', value: 'HTTP 401 - http://127.0.0.1...' },
|
||||
];
|
||||
|
||||
// MQTT接入状态数据
|
||||
const mqttStatusData = [
|
||||
{ name: '启用状态', value: '已启用', statusColor: '#52c41a' },
|
||||
{ name: '连接状态', value: '已连接', statusColor: '#52c41a' },
|
||||
{ name: 'Broker', value: 'tcp://localhost:1883' },
|
||||
{ name: '客户端ID', value: 'solar-platform-backend' },
|
||||
{ name: '遥测主题', value: 'pv/+/device/+/telemetry' },
|
||||
{ name: '状态主题', value: 'pv/+/device/+/status' },
|
||||
{ name: '最近连接', value: '2026-05-07 18:30:40' },
|
||||
{ name: '最近错误', value: '-' },
|
||||
];
|
||||
|
||||
// MQTT消息日志数据
|
||||
const mqttLogData = [
|
||||
{ topic: 'pv/1/device/ROBOT-01/ack', device: 'ROBOT-01', type: 'ACK', parse: 'SUCCESS' },
|
||||
{ topic: 'pv/1/device/ROBOT-01/ack', device: 'ROBOT-01', type: 'ACK', parse: 'SUCCESS' },
|
||||
{ topic: 'pv/1/device/CAM-02/status', device: 'CAM-02', type: 'STATUS', parse: 'SUCCESS' },
|
||||
{ topic: 'pv/1/device/INV-A02/telemetry', device: 'INV-A02', type: 'TELEMETRY', parse: 'SUCCESS' },
|
||||
];
|
||||
|
||||
// WebSocket状态数据
|
||||
const wsStatusData = [
|
||||
{ name: '服务状态', value: '已启用', statusColor: '#52c41a' },
|
||||
{ name: '前端连接', value: '已连接', statusColor: '#52c41a' },
|
||||
{ name: 'Endpoint', value: '/ws/pv' },
|
||||
{ name: '在线连接数', value: '2' },
|
||||
{ name: '最近推送', value: '-' },
|
||||
{ name: '推送时间', value: '-' },
|
||||
{ name: '前端端点', value: 'ws://47.100.102.7:10469/de...' },
|
||||
{ name: '最近错误', value: '-' },
|
||||
];
|
||||
|
||||
// 顶部卡片数据
|
||||
// 顶部统计卡片数据
|
||||
const topCards = [
|
||||
{
|
||||
title: '当前版本',
|
||||
value: 'v2.8.1',
|
||||
tag: '最新版',
|
||||
tagColor: 'blue',
|
||||
icon: <CloudOutlined />,
|
||||
color: '#1677ff',
|
||||
bg: '#e6f4ff'
|
||||
icon: <Cpu size={24} color="#1677ff" />,
|
||||
bg: 'linear-gradient(135deg, #e6f4ff 0%, #bae0ff 100%)'
|
||||
},
|
||||
{
|
||||
title: '在线用户',
|
||||
value: '12',
|
||||
trend: '↑ 2',
|
||||
trendColor: '#52c41a',
|
||||
icon: <TeamOutlined />,
|
||||
color: '#52c41a',
|
||||
bg: '#f6ffed'
|
||||
icon: <Users size={24} color="#52c41a" />,
|
||||
bg: 'linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%)'
|
||||
},
|
||||
{
|
||||
title: '告警通道',
|
||||
value: '3 / 4',
|
||||
trend: '正常',
|
||||
trendColor: '#52c41a',
|
||||
icon: <BellOutlined />,
|
||||
color: '#ff4d4f',
|
||||
bg: '#fff2f0'
|
||||
icon: <BellOutlined style={{ fontSize: 24, color: '#ff4d4f' }} />,
|
||||
bg: 'linear-gradient(135deg, #fff2f0 0%, #ffccc7 100%)'
|
||||
},
|
||||
{
|
||||
title: '数据备份状态',
|
||||
value: '正常',
|
||||
trend: '●',
|
||||
trendColor: '#52c41a',
|
||||
icon: <DatabaseOutlined />,
|
||||
color: '#13c2c2',
|
||||
bg: '#e6fffb'
|
||||
icon: <DatabaseOutlined style={{ fontSize: 24, color: '#13c2c2' }} />,
|
||||
bg: 'linear-gradient(135deg, #e6fffb 0%, #b5f5ec 100%)'
|
||||
},
|
||||
{
|
||||
title: '最近更新',
|
||||
value: '2025-05-20',
|
||||
icon: <CalendarOutlined />,
|
||||
color: '#722ed1',
|
||||
bg: '#f9f0ff'
|
||||
icon: <CalendarOutlined style={{ fontSize: 24, color: '#722ed1' }} />,
|
||||
bg: 'linear-gradient(135deg, #f9f0ff 0%, #efdbff 100%)'
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div style={{ padding: 24, background: '#f0f2f5', minHeight: '100vh' }}>
|
||||
// 角色权限概览
|
||||
const roleOverview = [
|
||||
{
|
||||
title: '超级管理员',
|
||||
users: 2,
|
||||
perms: 28,
|
||||
tags: ['全部权限', '系统管理'],
|
||||
color: '#1677ff',
|
||||
bg: '#e6f4ff',
|
||||
icon: <ShieldCheck size={20} color="#1677ff" />
|
||||
},
|
||||
{
|
||||
title: '运维工程师',
|
||||
users: 5,
|
||||
perms: 18,
|
||||
tags: ['设备管理', '工单管理'],
|
||||
color: '#52c41a',
|
||||
bg: '#f6ffed',
|
||||
icon: <Wrench size={20} color="#52c41a" />
|
||||
},
|
||||
{
|
||||
title: '巡检主管',
|
||||
users: 8,
|
||||
perms: 12,
|
||||
tags: ['巡检管理', '告警处理'],
|
||||
color: '#fa8c16',
|
||||
bg: '#fff7e6',
|
||||
icon: <Users size={20} color="#fa8c16" />
|
||||
},
|
||||
{
|
||||
title: '数据分析师',
|
||||
users: 3,
|
||||
perms: 15,
|
||||
tags: ['数据分析', '报表查看'],
|
||||
color: '#722ed1',
|
||||
bg: '#f9f0ff',
|
||||
icon: <LineChart size={20} color="#722ed1" />
|
||||
},
|
||||
];
|
||||
|
||||
{/* 顶部卡片 —— 统一风格 + 自动换行 + 圆角8px */}
|
||||
// 设备状态
|
||||
const deviceStatuses = [
|
||||
{ name: '逆变器', count: '5/5', status: '正常' },
|
||||
{ name: '汇流箱', count: '20/20', status: '正常' },
|
||||
{ name: '气象站', count: '1/1', status: '正常' },
|
||||
{ name: '摄像头', count: '12/12', status: '正常' },
|
||||
{ name: '无人机', count: '2/2', status: '正常' },
|
||||
{ name: '机器人', count: '5/5', status: '正常' },
|
||||
{ name: 'API接口', count: '正常', status: '正常' },
|
||||
{ name: 'Modbus', count: '正常', status: '正常' },
|
||||
];
|
||||
|
||||
return (
|
||||
<div style={{ padding: 'clamp(12px, 1.5vw, 24px)', background: '#f5f7fa', minHeight: '100vh' }}>
|
||||
|
||||
|
||||
{/* 顶部统计卡片 */}
|
||||
<Row gutter={[16, 16]} style={{ marginBottom: 24, flexWrap: 'wrap' }}>
|
||||
{topCards.map((item, idx) => (
|
||||
<Col key={idx} style={{ minWidth: '160px', flex: '1 0 auto' }}>
|
||||
@@ -181,224 +202,347 @@ const BasicSettings = () => {
|
||||
</Row>
|
||||
|
||||
<Row gutter={16}>
|
||||
{/* 左侧主内容 */}
|
||||
<Col span={16}>
|
||||
|
||||
{/* 平台参数 */}
|
||||
<AntdCard title="平台参数" style={{ marginBottom: 16, borderRadius: 8 }}>
|
||||
{/* 左侧 */}
|
||||
<Col xs={24} xl={17}>
|
||||
{/* 基础配置 */}
|
||||
<AntdCard
|
||||
title={<Space><SettingOutlined style={{ color: '#1677ff' }} /><b>基础配置</b></Space>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 12, marginBottom: 16, boxShadow: '0 2px 8px rgba(0,0,0,0.05)' }}
|
||||
>
|
||||
<Form form={form} layout="vertical">
|
||||
<Row gutter={16}>
|
||||
<Col span={12}>
|
||||
<Row gutter={24}>
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<Form.Item label="系统名称" name="systemName">
|
||||
<Input defaultValue="光伏场站智能监控与运维系统" />
|
||||
<Input defaultValue="光伏电站智能监控与运维系统" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<Form.Item label="默认电站" name="defaultSite">
|
||||
<Select defaultValue="1MW 光伏电站">
|
||||
<Select.Option value="1MW">1MW 光伏电站</Select.Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row gutter={16}>
|
||||
<Col span={12}>
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<Form.Item label="默认语言" name="defaultLang">
|
||||
<Select defaultValue="zh">
|
||||
<Select.Option value="zh">中文</Select.Option>
|
||||
<Select.Option value="en">English</Select.Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<Form.Item label="时区" name="timezone">
|
||||
<Select defaultValue="UTC+08:00">
|
||||
<Select.Option value="8">UTC+08:00</Select.Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<Form.Item label="首页默认页面" name="defaultPage">
|
||||
<Select defaultValue="dashboard">
|
||||
<Select.Option value="dashboard">总览首页</Select.Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<Form.Item label="数据刷新频率" name="refreshRate">
|
||||
<Select defaultValue="5分钟">
|
||||
<Select.Option value="5">5分钟</Select.Option>
|
||||
<Select defaultValue="5min">
|
||||
<Select.Option value="5min">5 分钟</Select.Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<Form.Item label="地图服务" name="mapService">
|
||||
<Select defaultValue="高德地图">
|
||||
<Select.Option value="amap">高德地图</Select.Option>
|
||||
<Select defaultValue="gaode">
|
||||
<Select.Option value="gaode">高德地图</Select.Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col xs={24} md={16}>
|
||||
<div style={{ display: 'flex', gap: 'clamp(8px, 1vw, 24px)', marginTop: 8, flexWrap: 'wrap' }}>
|
||||
<Space>
|
||||
<span style={{ fontSize: fontNormal }}>工单自动编号</span>
|
||||
<Switch defaultChecked />
|
||||
</Space>
|
||||
<Space>
|
||||
<span style={{ fontSize: fontNormal }}>AI建议自动生成</span>
|
||||
<Switch defaultChecked />
|
||||
</Space>
|
||||
<Space>
|
||||
<span style={{ fontSize: fontNormal }}>移动端同步</span>
|
||||
<Switch defaultChecked />
|
||||
</Space>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
<Form.Item label="AI建议自动生成" valuePropName="checked">
|
||||
<Switch defaultChecked />
|
||||
</Form.Item>
|
||||
<div style={{ marginTop: 16 }}>
|
||||
<Button type="primary" onClick={handleSave} style={{ width: 120, borderRadius: 6, height: 36 }}>保存设置</Button>
|
||||
<Button style={{ marginLeft: 12, borderRadius: 6, height: 36 }}>恢复默认</Button>
|
||||
</div>
|
||||
</Form>
|
||||
</AntdCard>
|
||||
|
||||
{/* 通知与告警策略 */}
|
||||
<AntdCard title="通知与告警策略" style={{ marginBottom: 16, borderRadius: 8 }}>
|
||||
<Row gutter={16} style={{ marginBottom: 16 }}>
|
||||
<Col span={8}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 16px', border: '1px solid #e8e8e8', borderRadius: 8 }}>
|
||||
<Text strong>短信</Text>
|
||||
<Switch defaultChecked />
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 16px', border: '1px solid #e8e8e8', borderRadius: 8 }}>
|
||||
<Text strong>邮件</Text>
|
||||
<Switch defaultChecked />
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 16px', border: '1px solid #e8e8e8', borderRadius: 8 }}>
|
||||
<Text strong>企业微信</Text>
|
||||
<Switch defaultChecked />
|
||||
</div>
|
||||
</Col>
|
||||
<AntdCard
|
||||
title={<Space><BellOutlined style={{ color: '#1677ff' }} /><b>通知与告警策略</b></Space>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 12, marginBottom: 16, boxShadow: '0 2px 8px rgba(0,0,0,0.05)' }}
|
||||
>
|
||||
<Row gutter={[16, 16]} style={{ marginBottom: 24 }}>
|
||||
{[
|
||||
{ label: '短信', icon: <Smartphone size={18} />, color: '#52c41a', status: '已启用' },
|
||||
{ label: '邮件', icon: <Mail size={18} />, color: '#1677ff', status: '已启用' },
|
||||
{ label: 'Telegram', icon: <Send size={18} />, color: '#13c2c2', status: '已启用' },
|
||||
{ label: '系统通知', icon: <BellOutlined />, color: '#fa8c16', status: '已启用' },
|
||||
].map((item, idx) => (
|
||||
<Col xs={24} sm={12} lg={6} key={idx}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', padding: '12px 16px', background: '#f8fafc', borderRadius: 10, border: '1px solid #f1f5f9' }}>
|
||||
<div style={{ width: 36, height: 36, borderRadius: '50%', background: '#fff', display: 'flex', alignItems: 'center', justifyContent: 'center', boxShadow: '0 2px 4px rgba(0,0,0,0.05)', marginRight: 12 }}>
|
||||
{React.cloneElement(item.icon as React.ReactElement, { style: { color: item.color } })}
|
||||
</div>
|
||||
<div style={{ flex: 1 }}>
|
||||
<div style={{ fontSize: fontSmall, color: '#8c8c8c' }}>{item.label}</div>
|
||||
<div style={{ fontSize: fontSmall, color: '#52c41a' }}>{item.status}</div>
|
||||
</div>
|
||||
<Switch size="small" defaultChecked />
|
||||
</div>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
<Row gutter={16}>
|
||||
<Col span={8}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 16px', border: '1px solid #e8e8e8', borderRadius: 8 }}>
|
||||
<Text strong>系统通知</Text>
|
||||
<Switch defaultChecked />
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 16px', border: '1px solid #e8e8e8', borderRadius: 8 }}>
|
||||
<Text strong>严重告警立即通知</Text>
|
||||
<Switch defaultChecked />
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 16px', border: '1px solid #e8e8e8', borderRadius: 8 }}>
|
||||
<Text strong>通信中断通知</Text>
|
||||
<Switch defaultChecked />
|
||||
</div>
|
||||
<Row gutter={[32, 16]}>
|
||||
<Col xs={24} sm={12} md={8}><Space><span>严重告警立即通知</span><Switch size="small" defaultChecked /></Space></Col>
|
||||
<Col xs={24} sm={12} md={8}><Space><span>发电下降超过 15%</span><Switch size="small" defaultChecked /></Space></Col>
|
||||
<Col xs={24} sm={12} md={8}><Space><span>通信中断通知</span><Switch size="small" defaultChecked /></Space></Col>
|
||||
<Col xs={24} sm={12} md={8}><Space><span>每日汇总推送</span><Switch size="small" defaultChecked /></Space></Col>
|
||||
<Col xs={24} md={16}>
|
||||
<Space size="middle" style={{ flexWrap: 'wrap' }}>
|
||||
<span>夜间免打扰</span>
|
||||
<TimePicker.RangePicker size="small" defaultValue={[dayjs('23:00', 'HH:mm'), dayjs('07:00', 'HH:mm')]} format="HH:mm" />
|
||||
<Switch size="small" />
|
||||
</Space>
|
||||
</Col>
|
||||
</Row>
|
||||
</AntdCard>
|
||||
|
||||
{/* 用户与权限预览 */}
|
||||
<AntdCard title="用户与权限预览" style={{ marginBottom: 16, borderRadius: 8 }}>
|
||||
<AntdCard
|
||||
title={<Space><Users size={18} style={{ color: '#1677ff' }} /><b>用户与权限预览</b></Space>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 12, boxShadow: '0 2px 8px rgba(0,0,0,0.05)', marginBottom: 16 }}
|
||||
>
|
||||
<Table
|
||||
size="small"
|
||||
pagination={false}
|
||||
scroll={{ x: 'max-content' }}
|
||||
pagination={{ size: 'small', total: 4, pageSize: 4, showTotal: (total) => `共 ${total} 条` }}
|
||||
columns={[
|
||||
{ title: '用户名', dataIndex: 'name' },
|
||||
{ title: '角色', dataIndex: 'role' },
|
||||
{ title: '手机号', dataIndex: 'phone' },
|
||||
{ title: '状态', dataIndex: 'status', render: (text) => <span style={{ color: '#52c41a' }}>{text}</span> },
|
||||
{ title: '用户名', dataIndex: 'name', key: 'name', fixed: 'left' },
|
||||
{
|
||||
title: '角色',
|
||||
dataIndex: 'role',
|
||||
key: 'role',
|
||||
render: (role) => {
|
||||
const config: any = {
|
||||
'超级管理员': { color: '#1677ff', bg: '#e6f4ff' },
|
||||
'运维工程师': { color: '#52c41a', bg: '#f6ffed' },
|
||||
'巡检主管': { color: '#fa8c16', bg: '#fff7e6' },
|
||||
'数据分析师': { color: '#722ed1', bg: '#f9f0ff' },
|
||||
};
|
||||
const s = config[role] || { color: '#8c8c8c', bg: '#f5f5f5' };
|
||||
return <Tag bordered={false} style={{ color: s.color, background: s.bg, fontSize: fontSmall }}>{role}</Tag>;
|
||||
}
|
||||
},
|
||||
{ title: '手机号', dataIndex: 'phone', key: 'phone' },
|
||||
{ title: '邮箱', dataIndex: 'email', key: 'email' },
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
render: (status) => (
|
||||
<Space size={4}>
|
||||
<div style={{ width: 6, height: 6, borderRadius: '50%', background: status === '在线' ? '#52c41a' : '#bfbfbf' }} />
|
||||
<span style={{ fontSize: fontSmall }}>{status}</span>
|
||||
</Space>
|
||||
)
|
||||
},
|
||||
{ title: '操作', key: 'action', render: () => <Button type="link" size="small">查看</Button>, fixed: 'right' },
|
||||
]}
|
||||
dataSource={[
|
||||
{ name: '张运维', role: '超级管理员', phone: '138****0001', status: '在线' },
|
||||
{ name: '李工程师', role: '运维工程师', phone: '139****0002', status: '在线' },
|
||||
{ name: '王班长', role: '巡检主管', phone: '137****0003', status: '在线' },
|
||||
{ name: '赵分析师', role: '数据分析师', phone: '136****0004', status: '在线' },
|
||||
{ name: '张运维', role: '超级管理员', phone: '138****0001', email: 'zhangyw@pvsmart.com', status: '在线' },
|
||||
{ name: '李工程师', role: '运维工程师', phone: '139****0002', email: 'li.gongcheng@pvsmart.com', status: '在线' },
|
||||
{ name: '王班长', role: '巡检主管', phone: '137****0003', email: 'wang.banzhang@pvsmart.com', status: '在线' },
|
||||
{ name: '赵分析师', role: '数据分析师', phone: '136****0004', email: 'zhao.fx@pvsmart.com', status: '在线' },
|
||||
]}
|
||||
/>
|
||||
</AntdCard>
|
||||
|
||||
{/* MQTT接入状态 */}
|
||||
<AntdCard title="MQTT接入状态" style={{ marginBottom: 16, borderRadius: 8 }}>
|
||||
<div style={{ fontSize: 13, color: '#666', marginBottom: 16 }}>来自 /pv/mqtt/status,后端未登录时显示预览兜底数据</div>
|
||||
<Row gutter={16}>
|
||||
{mqttStatusData.map((item, index) => (
|
||||
<Col span={12} key={index}>
|
||||
<div style={{ border: '1px solid #e8e8e8', borderRadius: 8, padding: 12, marginBottom: 16 }}>
|
||||
<div style={{ fontSize: 13, color: '#666', marginBottom: 4 }}>{item.name}</div>
|
||||
<div style={{ fontSize: 16, fontWeight: 600, color: item.statusColor || '#333' }}>{item.value}</div>
|
||||
</div>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
</AntdCard>
|
||||
|
||||
{/* MQTT消息日志 */}
|
||||
<AntdCard title="MQTT消息日志" style={{ marginBottom: 16, borderRadius: 8 }}>
|
||||
<div style={{ fontSize: 13, color: '#666', marginBottom: 16 }}>阶段3A用于验证遥测原始消息落库</div>
|
||||
<Table
|
||||
size="small"
|
||||
pagination={false}
|
||||
columns={[
|
||||
{ title: 'Topic', dataIndex: 'topic' },
|
||||
{ title: '设备', dataIndex: 'device' },
|
||||
{ title: '类型', dataIndex: 'type' },
|
||||
{ title: '解析', dataIndex: 'parse' },
|
||||
]}
|
||||
dataSource={mqttLogData}
|
||||
/>
|
||||
</AntdCard>
|
||||
|
||||
<AntdCard title="系统维护" style={{ marginBottom: 0, borderRadius: 8 }}>
|
||||
<Row gutter={16}>
|
||||
<Col span={12} style={{ marginBottom: 16 }}>
|
||||
<Button style={{ width: '100%' }} icon={<DeleteOutlined />}>清理缓存</Button>
|
||||
</Col>
|
||||
<Col span={12} style={{ marginBottom: 16 }}>
|
||||
<Button style={{ width: '100%' }} icon={<RestOutlined />}>重启服务</Button>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Button style={{ width: '100%' }} icon={<DownloadOutlined />}>备份下载</Button>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Button style={{ width: '100%' }} icon={<FileTextOutlined />}>日志导出</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
</AntdCard>
|
||||
|
||||
</Col>
|
||||
|
||||
{/* 右侧边栏 */}
|
||||
<Col span={8}>
|
||||
{/* 右侧 */}
|
||||
<Col xs={24} xl={7}>
|
||||
{/* 角色权限概览 */}
|
||||
<AntdCard
|
||||
title={<Space><Users size={18} style={{ color: '#1677ff' }} /><b>角色权限概览</b></Space>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 12, marginBottom: 16, boxShadow: '0 2px 8px rgba(0,0,0,0.05)' }}
|
||||
bodyStyle={{ padding: '12px' }}
|
||||
>
|
||||
<Row gutter={[12, 12]}>
|
||||
{roleOverview.map((role, idx) => (
|
||||
<Col xs={24} sm={12} key={idx}>
|
||||
<div style={{ background: role.bg, borderRadius: 10, padding: 10, height: '100%' }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 8 }}>
|
||||
{role.icon}
|
||||
<RightOutlined style={{ fontSize: 10, color: role.color }} />
|
||||
</div>
|
||||
<div style={{ fontWeight: 600, fontSize: fontSmall, color: role.color, marginBottom: 4 }}>{role.title}</div>
|
||||
<div style={{ fontSize: 10, color: '#8c8c8c', marginBottom: 8 }}>
|
||||
用户 {role.users} 人 | 权限 {role.perms} 项
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 4, flexWrap: 'wrap' }}>
|
||||
{role.tags.map((tag, tidx) => (
|
||||
<span key={tidx} style={{ fontSize: 9, padding: '1px 4px', background: '#fff', color: role.color, borderRadius: 2, border: `1px solid ${role.color}40` }}>{tag}</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
</AntdCard>
|
||||
|
||||
{/* 设备接入状态 */}
|
||||
<AntdCard title="设备接入状态" style={{ marginBottom: 16, borderRadius: 8 }}>
|
||||
<Row gutter={16}>
|
||||
{deviceStatusData.map((item, index) => (
|
||||
<Col span={12} key={index}>
|
||||
<div style={{ border: '1px solid #e8e8e8', borderRadius: 8, padding: 12, marginBottom: 16 }}>
|
||||
<div style={{ fontSize: 13, color: '#666', marginBottom: 4 }}>{item.name}</div>
|
||||
<div style={{ fontSize: 16, fontWeight: 600, marginBottom: 4 }}>{item.count}</div>
|
||||
<div style={{ color: item.color, fontSize: 13 }}>{item.status}</div>
|
||||
<AntdCard
|
||||
title={<Space><ApiOutlined style={{ color: '#1677ff' }} /><b>设备接入状态</b></Space>}
|
||||
extra={<Button type="link" size="small">查看详情 <RightOutlined /></Button>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 12, marginBottom: 16, boxShadow: '0 2px 8px rgba(0,0,0,0.05)' }}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
>
|
||||
<div style={{ display: 'flex', gap: 20 }}>
|
||||
<div style={{ flex: '0 0 100px' }}>
|
||||
{deviceStatuses.map((item, idx) => (
|
||||
<div key={idx} style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: 6 }}>
|
||||
<Space size={4}>
|
||||
<div style={{ width: 6, height: 6, borderRadius: '50%', background: '#52c41a' }} />
|
||||
<span style={{ fontSize: 11, color: '#595959' }}>{item.name}</span>
|
||||
</Space>
|
||||
<span style={{ fontSize: 11, fontWeight: 500 }}>{item.count}</span>
|
||||
</div>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
</AntdCard>
|
||||
|
||||
{/* 服务配置展示 */}
|
||||
<AntdCard title="服务配置展示" style={{ marginBottom: 16, borderRadius: 8 }}>
|
||||
{serviceConfigData.map((item, index) => (
|
||||
<div key={index} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '12px 0', borderBottom: index !== serviceConfigData.length - 1 ? '1px solid #e8e8e8' : 'none' }}>
|
||||
<div>
|
||||
<div style={{ fontWeight: 500, marginBottom: 4 }}>{item.name}</div>
|
||||
<div style={{ fontSize: 13 }}>{item.value}</div>
|
||||
</div>
|
||||
<Tag color={item.statusColor === '#52c41a' ? 'success' : item.statusColor === '#fa8c16' ? 'warning' : 'default'}>{item.status}</Tag>
|
||||
))}
|
||||
</div>
|
||||
))}
|
||||
<div style={{ flex: 1, position: 'relative', height: 160, display: 'flex', alignItems: 'center', justifyContent: 'center', background: 'rgba(22, 119, 255, 0.02)', borderRadius: 12 }}>
|
||||
{/* SVG 拓扑图:使用百分比和 viewBox 保证缩放比一致性 */}
|
||||
<svg width="100%" height="100%" viewBox="0 0 200 160" style={{ maxWidth: 240 }}>
|
||||
<defs>
|
||||
<filter id="glow" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur stdDeviation="3" result="blur" />
|
||||
<feComposite in="SourceGraphic" in2="blur" operator="over" />
|
||||
</filter>
|
||||
</defs>
|
||||
{/* 动态连线 */}
|
||||
<g stroke="#1677ff40" strokeWidth="1" strokeDasharray="4 2">
|
||||
<line x1="100" y1="80" x2="60" y2="40" />
|
||||
<line x1="100" y1="80" x2="140" y2="40" />
|
||||
<line x1="100" y1="80" x2="160" y2="80" />
|
||||
<line x1="100" y1="80" x2="140" y2="120" />
|
||||
<line x1="100" y1="80" x2="60" y2="120" />
|
||||
<line x1="100" y1="80" x2="40" y2="80" />
|
||||
</g>
|
||||
{/* 中心核心节点 */}
|
||||
<circle cx="100" cy="80" r="18" fill="#1677ff" filter="url(#glow)" />
|
||||
<rect x="91" y="71" width="18" height="18" rx="3" fill="none" stroke="#fff" strokeWidth="1.5" />
|
||||
<path d="M95 75h10M95 80h10M95 85h10" stroke="#fff" strokeWidth="1.2" />
|
||||
|
||||
{/* 周边子节点 */}
|
||||
{[
|
||||
{ x: 60, y: 40, icon: <Cpu size={12} />, label: '逆变器' },
|
||||
{ x: 140, y: 40, icon: <Box size={12} />, label: '汇流箱' },
|
||||
{ x: 160, y: 80, icon: <Wind size={12} />, label: '气象站' },
|
||||
{ x: 140, y: 120, icon: <Camera size={12} />, label: '摄像头' },
|
||||
{ x: 60, y: 120, icon: <Activity size={12} />, label: '机器人' },
|
||||
{ x: 40, y: 80, icon: <Zap size={12} />, label: '接口' },
|
||||
].map((node, i) => (
|
||||
<g key={i}>
|
||||
<circle cx={node.x} cy={node.y} r="12" fill="#fff" stroke="#e8e8e8" strokeWidth="1" />
|
||||
<foreignObject x={node.x - 6} y={node.y - 6} width="12" height="12">
|
||||
<div style={{ color: '#1677ff', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>{node.icon}</div>
|
||||
</foreignObject>
|
||||
<text x={node.x} y={node.y + 20} textAnchor="middle" style={{ fontSize: 8, fill: '#8c8c8c' }}>{node.label}</text>
|
||||
</g>
|
||||
))}
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</AntdCard>
|
||||
|
||||
{/* 视频服务配置状态 */}
|
||||
<AntdCard title="视频服务配置状态" style={{ marginBottom: 16, borderRadius: 8 }}>
|
||||
<div style={{ fontSize: 13, color: '#666', marginBottom: 16 }}>来自 /pv/video/summary 与 /pv/video/media-server/list</div>
|
||||
<Row gutter={16}>
|
||||
{videoServiceData.map((item, index) => (
|
||||
<Col span={12} key={index}>
|
||||
<div style={{ border: '1px solid #e8e8e8', borderRadius: 8, padding: 12, marginBottom: 16 }}>
|
||||
<div style={{ fontSize: 13, color: '#666', marginBottom: 4 }}>{item.name}</div>
|
||||
<div style={{ fontSize: 16, fontWeight: 600, color: item.statusColor || '#333' }}>{item.value}</div>
|
||||
{/* 数据与安全 */}
|
||||
<AntdCard
|
||||
title={<Space><Shield size={18} style={{ color: '#1677ff' }} /><b>数据与安全</b></Space>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 12, marginBottom: 16, boxShadow: '0 2px 8px rgba(0,0,0,0.05)' }}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
>
|
||||
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(140px, 1fr))', gap: '16px 24px' }}>
|
||||
{[
|
||||
{ label: '数据保留', value: '3 年', icon: <DatabaseOutlined style={{ color: '#1677ff' }} /> },
|
||||
{ label: '登录审计', value: '已开启', icon: <CheckCircleOutlined style={{ color: '#52c41a' }} />, color: '#52c41a' },
|
||||
{ label: '每日自动备份', value: '02:00', icon: <RefreshCw size={14} color="#1677ff" /> },
|
||||
{ label: 'API 密钥管理', value: '正常', icon: <Key size={14} color="#52c41a" />, color: '#52c41a' },
|
||||
{ label: '最近备份时间', value: '2025-05-24 02:00', icon: <CalendarOutlined style={{ color: '#1677ff' }} />, isFull: true },
|
||||
{ label: 'SSL 证书', value: '有效期至 2026-12-31', icon: <SafetyCertificateOutlined style={{ color: '#fa8c16' }} />, isFull: true },
|
||||
{ label: '双因素认证', value: '已开启', icon: <Lock size={14} color="#52c41a" />, color: '#52c41a' },
|
||||
].map((item, idx) => (
|
||||
<div key={idx} style={{ gridColumn: item.isFull ? '1 / -1' : 'auto', display: 'flex', alignItems: 'center', gap: 8 }}>
|
||||
<div style={{ width: 24, height: 24, borderRadius: 6, background: '#f8fafc', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
{item.icon}
|
||||
</div>
|
||||
</Col>
|
||||
<div style={{ flex: 1 }}>
|
||||
<div style={{ fontSize: fontSmall, color: '#8c8c8c' }}>{item.label}</div>
|
||||
<div style={{ fontSize: fontNormal, fontWeight: 500, color: item.color || '#262626' }}>{item.value}</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</Row>
|
||||
<Button type="primary" style={{ width: '100%' }} onClick={() => message.info('检测视频服务')}>检测视频服务</Button>
|
||||
</div>
|
||||
</AntdCard>
|
||||
|
||||
{/* WebSocket实时推送 */}
|
||||
<AntdCard title="WebSocket实时推送" style={{ marginBottom: 16, borderRadius: 8 }}>
|
||||
<div style={{ fontSize: 13, color: '#666', marginBottom: 16 }}>来自 /pv/ws/status,并显示前端本地连接状态</div>
|
||||
<Row gutter={16}>
|
||||
{wsStatusData.map((item, index) => (
|
||||
<Col span={12} key={index}>
|
||||
<div style={{ border: '1px solid #e8e8e8', borderRadius: 8, padding: 12, marginBottom: 16 }}>
|
||||
<div style={{ fontSize: 13, color: '#666', marginBottom: 4 }}>{item.name}</div>
|
||||
<div style={{ fontSize: 16, fontWeight: 600, color: item.statusColor || '#333' }}>{item.value}</div>
|
||||
</div>
|
||||
{/* 系统维护 */}
|
||||
<AntdCard
|
||||
title={<Space><Wrench size={18} style={{ color: '#1677ff' }} /><b>系统维护</b></Space>}
|
||||
extra={<Button type="link" size="small" danger style={{ fontSize: fontSmall }}>操作需管理员权限</Button>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 12, boxShadow: '0 2px 8px rgba(0,0,0,0.05)' }}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
>
|
||||
<Row gutter={[12, 12]}>
|
||||
{[
|
||||
{ label: '清理缓存', icon: <DeleteOutlined />, color: '#1677ff' },
|
||||
{ label: '重启服务', icon: <RefreshCw size={20} />, color: '#1677ff' },
|
||||
{ label: '备份下载', icon: <DownloadOutlined />, color: '#1677ff' },
|
||||
{ label: '日志导出', icon: <FileTextOutlined />, color: '#1677ff' },
|
||||
].map((btn, idx) => (
|
||||
<Col xs={12} sm={6} key={idx}>
|
||||
<Button
|
||||
style={{
|
||||
width: '100%',
|
||||
height: 'clamp(56px, 5vw, 64px)',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
borderRadius: 10,
|
||||
gap: 4,
|
||||
border: '1px solid #f0f0f0',
|
||||
background: '#fff',
|
||||
padding: '4px'
|
||||
}}
|
||||
>
|
||||
<div style={{ color: btn.color, fontSize: 'clamp(16px, 1.2vw, 20px)' }}>{btn.icon}</div>
|
||||
<div style={{ fontSize: fontSmall, color: '#595959' }}>{btn.label}</div>
|
||||
</Button>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
</AntdCard>
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
@@ -406,3 +550,4 @@ const BasicSettings = () => {
|
||||
};
|
||||
|
||||
export default BasicSettings;
|
||||
|
||||
|
||||
@@ -172,13 +172,12 @@ export default function DeviceOverviewPage({ devices, planedevices, devicesAll,
|
||||
{/*<AgoraTextTest />*/}
|
||||
<Row gutter={[16, 16]} style={{ marginBottom: 20, flexWrap: 'wrap' }}>
|
||||
{dynamicTopCards.map((card, idx) => (
|
||||
<Col key={idx} style={{ minWidth: '200px', flex: '0 0 auto' }}>
|
||||
<Col key={idx} style={{ minWidth: '200px', flex: '1 0 auto' }}>
|
||||
<Card
|
||||
bordered={false}
|
||||
style={{
|
||||
borderRadius: 12,
|
||||
boxShadow: '0 2px 8px rgba(0,0,0,0.05)',
|
||||
width: 200,
|
||||
height: 110,
|
||||
}}
|
||||
bodyStyle={{ padding: '16px', height: '100%' }}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
Row, Col, Card, Button, Tag, Table, Typography, Space, Statistic, message, Divider, Tooltip
|
||||
Row, Col, Card, Button, Tag, Table, Typography, Space, Statistic, message, Divider, Tooltip, Avatar, Empty
|
||||
} from 'antd';
|
||||
import {
|
||||
ReloadOutlined, InfoCircleOutlined, ThunderboltOutlined,
|
||||
LineChartOutlined, AppstoreOutlined, BellOutlined,
|
||||
CheckCircleOutlined, CalendarOutlined, ArrowUpOutlined,
|
||||
ArrowDownOutlined, RiseOutlined, FallOutlined, ScanOutlined,
|
||||
DatabaseOutlined, CloudOutlined, RestOutlined
|
||||
DatabaseOutlined, CloudOutlined, RestOutlined, AimOutlined,
|
||||
SelectOutlined, FireOutlined, WarningOutlined, ExclamationCircleOutlined
|
||||
} from '@ant-design/icons';
|
||||
import { Line, Area } from '@ant-design/charts';
|
||||
|
||||
@@ -31,10 +32,10 @@ const aiRecommendations = [
|
||||
];
|
||||
|
||||
const thermalImagingData = [
|
||||
{ name: '方阵 A-05', temp: '71.5℃', id: 'A05' },
|
||||
{ name: '方阵 A-12', temp: '68.3℃', id: 'A12' },
|
||||
{ name: '方阵 B-03', temp: '64.8℃', id: 'B03' },
|
||||
{ name: '方阵 C-07', temp: '67.2℃', id: 'C07' },
|
||||
{ name: '方阵 A-05', temp: '71.5℃', id: 'A05', status: 'serious' },
|
||||
{ name: '方阵 A-12', temp: '68.3℃', id: 'A12', status: 'warning' },
|
||||
{ name: '方阵 B-03', temp: '64.8℃', id: 'B03', status: 'warning' },
|
||||
{ name: '方阵 C-07', temp: '67.2℃', id: 'C07', status: 'warning' },
|
||||
];
|
||||
|
||||
// 图表配置
|
||||
@@ -115,7 +116,12 @@ const generationPerformanceConfig = {
|
||||
};
|
||||
|
||||
export default function AIDiagnosisPage() {
|
||||
const cardStyle = { borderRadius: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.05)' };
|
||||
const cardStyle = {
|
||||
borderRadius: 12,
|
||||
border: '1px solid #f0f0f0',
|
||||
boxShadow: '0 4px 12px rgba(0,0,0,0.05)',
|
||||
overflow: 'hidden'
|
||||
};
|
||||
|
||||
// 状态标签渲染
|
||||
const renderStatusTag = (status: string) => {
|
||||
@@ -124,64 +130,83 @@ export default function AIDiagnosisPage() {
|
||||
'正常': '#00B42A',
|
||||
'轻微': '#F7BA1E',
|
||||
};
|
||||
return <span style={{ color: colorMap[status] }}>{status}</span>;
|
||||
return <span style={{ color: colorMap[status], fontWeight: 600 }}>{status}</span>;
|
||||
};
|
||||
|
||||
const renderImpactTag = (impact: string) => {
|
||||
const colorMap: Record<string, string> = { '高': '#F53F3F', '中': '#FF7D00', '低': '#00B42A' };
|
||||
return <span style={{ color: colorMap[impact] }}>{impact}</span>;
|
||||
return <span style={{ color: colorMap[impact], fontWeight: 600 }}>{impact}</span>;
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '16px 24px', boxSizing: 'border-box', overflowX: 'hidden' }}>
|
||||
<div style={{ display: 'flex', paddingBottom: "12px" }}>
|
||||
<div style={{ padding: '4px 0' }}>
|
||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)' }}>AI诊断分析</Typography.Title>
|
||||
</div>
|
||||
<style>
|
||||
{`
|
||||
.compact-table .ant-table-thead > tr > th {
|
||||
background: #f8fafc;
|
||||
padding: 8px 12px !important;
|
||||
font-size: 12px;
|
||||
color: #4E5969;
|
||||
}
|
||||
.compact-table .ant-table-tbody > tr > td {
|
||||
padding: 8px 12px !important;
|
||||
font-size: 12px;
|
||||
}
|
||||
.thermal-card:hover {
|
||||
transform: translateY(-2px);
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.grid-item:hover {
|
||||
filter: brightness(0.9);
|
||||
cursor: pointer;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', paddingBottom: "16px" }}>
|
||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', fontWeight: 800, color: '#1D2129' }}>
|
||||
AI 智能诊断与分析中心
|
||||
</Typography.Title>
|
||||
<Space>
|
||||
<Button icon={<ReloadOutlined />}>刷新数据</Button>
|
||||
<Button type="primary">导出报告</Button>
|
||||
</Space>
|
||||
</div>
|
||||
|
||||
{/* 第一排:顶部统计卡片 */}
|
||||
<Row
|
||||
gutter={[12, 12]}
|
||||
style={{ marginBottom: 16 }}
|
||||
>
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
|
||||
{[
|
||||
{ title: 'PR值', value: '82.6%', trend: '较昨日 -1.3%', icon: <RiseOutlined />, color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F' },
|
||||
{ title: '发电偏差', value: '-4.35%', trend: '较昨日 -1.02%', icon: <FallOutlined />, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F' },
|
||||
{ title: '异常组串数量', value: '8', trend: '较昨日 +2 ↑', icon: <AppstoreOutlined />, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F' },
|
||||
{ title: '热斑疑似数量', value: '36', trend: '较昨日 +5 ↑', icon: <BellOutlined />, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F' },
|
||||
{ title: '健康度评分', value: '86.3', unit: '分', trend: '较昨日 -1.7', icon: <CheckCircleOutlined />, color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F' },
|
||||
{ title: '预测发电量', value: '4,821', unit: 'kWh', trend: '较昨日 +2.6% ↑', icon: <ThunderboltOutlined />, color: '#00B42A', bg: '#E8FFEA', trendColor: '#00B42A' },
|
||||
{ title: 'PR值 (性能比)', value: '82.6%', trend: '较昨日 -1.3%', icon: <RiseOutlined />, color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F', direction: 'down' },
|
||||
{ title: '发电偏差率', value: '-4.35%', trend: '较昨日 -1.02%', icon: <FallOutlined />, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F', direction: 'down' },
|
||||
{ title: '异常组串数量', value: '8', trend: '较昨日 +2 ↑', icon: <AppstoreOutlined />, color: '#1D2129', bg: '#F5F7FA', trendColor: '#F53F3F', direction: 'up' },
|
||||
{ title: '热斑疑似数量', value: '36', trend: '较昨日 +5 ↑', icon: <BellOutlined />, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F', direction: 'up' },
|
||||
{ title: '电站健康度评分', value: '86.3', unit: '分', trend: '较昨日 -1.7', icon: <CheckCircleOutlined />, color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F', direction: 'down' },
|
||||
{ title: '预测发电量', value: '4,821', unit: 'kWh', trend: '较昨日 +2.6% ↑', icon: <ThunderboltOutlined />, color: '#165DFF', bg: '#E8F3FF', trendColor: '#00B42A', direction: 'up' },
|
||||
].map((item, index) => (
|
||||
<Col key={index} xs={24} sm={12} md={8} xl={4}>
|
||||
<Card
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
style={{ borderRadius: 12, height: '100%', border: '1px solid #f0f0f0', boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
|
||||
bodyStyle={{ padding: '20px 16px' }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', height: '100%' }}>
|
||||
<div>
|
||||
<div style={{ fontSize: 'clamp(12px, 0.9vw, 14px)', color: '#4E5969', marginBottom: 8 }}>{item.title}</div>
|
||||
<div style={{ fontSize: 'clamp(20px, 1.6vw, 24px)', fontWeight: 700, color: item.color, display: 'flex', alignItems: 'baseline', gap: 4 }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start' }}>
|
||||
<div style={{ flex: 1 }}>
|
||||
<div style={{ fontSize: 'clamp(12px, 0.8vw, 13px)', color: '#86909C', marginBottom: 8, whiteSpace: 'nowrap' }}>{item.title}</div>
|
||||
<div style={{ fontSize: 'clamp(20px, 1.4vw, 24px)', fontWeight: 800, color: item.color, display: 'flex', alignItems: 'baseline', gap: 4 }}>
|
||||
{item.value}
|
||||
{item.unit && <span style={{ fontSize: 14, fontWeight: 400 }}>{item.unit}</span>}
|
||||
{item.unit && <span style={{ fontSize: 13, fontWeight: 400, color: '#86909C' }}>{item.unit}</span>}
|
||||
</div>
|
||||
<div style={{ fontSize: 'clamp(10px, 0.8vw, 12px)', color: item.trendColor || '#86909C', marginTop: 8 }}>
|
||||
{item.trend}
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginTop: 10, display: 'flex', alignItems: 'center', gap: 4 }}>
|
||||
<span style={{ color: item.trendColor }}>{item.trend}</span>
|
||||
{item.direction === 'up' ? <ArrowUpOutlined style={{ color: item.trendColor }} /> : <ArrowDownOutlined style={{ color: item.trendColor }} />}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={{
|
||||
width: 'clamp(40px, 3.5vw, 48px)',
|
||||
height: 'clamp(40px, 3.5vw, 48px)',
|
||||
background: item.bg,
|
||||
borderRadius: '50%',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
flexShrink: 0
|
||||
width: 44, height: 44, background: item.bg, borderRadius: '12px',
|
||||
display: 'flex', justifyContent: 'center', alignItems: 'center', flexShrink: 0,
|
||||
boxShadow: `0 4px 10px ${item.bg}80`
|
||||
}}>
|
||||
{React.cloneElement(item.icon, { style: { fontSize: 'clamp(20px, 1.8vw, 24px)', color: item.color } })}
|
||||
{React.cloneElement(item.icon as React.ReactElement, { style: { fontSize: 22, color: item.color === '#1D2129' ? '#4E5969' : item.color } })}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
@@ -193,72 +218,87 @@ export default function AIDiagnosisPage() {
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
|
||||
<Col xs={24} lg={10}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 'clamp(13px, 1vw, 14px)', fontWeight: 700 }}>热成像分析(无人机巡检)<InfoCircleOutlined style={{ marginLeft: 4, color: '#86909C' }} /></span>}
|
||||
extra={<Text type="secondary" style={{ fontSize: 'clamp(10px, 0.8vw, 12px)' }}>2025-05-20 09:30 <CalendarOutlined /></Text>}
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>无人机热成像巡检分析<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
|
||||
extra={<Text type="secondary" style={{ fontSize: 12 }}>巡检:2025-05-20 09:30 <CalendarOutlined style={{ marginLeft: 4 }} /></Text>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 16 }}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<Row gutter={[12, 12]}>
|
||||
{thermalImagingData.map((item, idx) => (
|
||||
<Col span={6} key={idx}>
|
||||
<div style={{ background: '#111827', borderRadius: 4, height: 'clamp(80px, 8vw, 140px)', position: 'relative', overflow: 'hidden' }}>
|
||||
<div style={{ width: '100%', height: '100%', background: 'linear-gradient(45deg, #4c0000, #ff0000, #ffff00)', opacity: 0.8 }} />
|
||||
<div style={{ position: 'absolute', bottom: 4, right: 4, background: 'rgba(0,0,0,0.6)', color: '#fff', padding: '2px 6px', borderRadius: 2, fontSize: 10 }}>
|
||||
<div className="thermal-card" style={{ background: '#000', borderRadius: 8, height: 'clamp(90px, 9vw, 120px)', position: 'relative', overflow: 'hidden', border: '1px solid #333', cursor: 'pointer' }}>
|
||||
<div style={{ width: '100%', height: '100%', background: 'linear-gradient(135deg, #1a0000 0%, #7a0000 30%, #ff4d4f 60%, #ffec3d 100%)', opacity: 0.9 }} />
|
||||
{/* 模拟热斑点 */}
|
||||
<div style={{ position: 'absolute', top: '25%', left: '35%', width: 14, height: 14, border: '2px solid #fff', borderRadius: '50%', boxShadow: '0 0 12px #ff4d4f', animation: 'pulse 2s infinite' }} />
|
||||
<div style={{ position: 'absolute', bottom: 6, right: 6, background: 'rgba(0,0,0,0.7)', color: '#fff', padding: '2px 6px', borderRadius: 4, fontSize: 10, fontWeight: 600, letterSpacing: 0.5 }}>
|
||||
{item.temp}
|
||||
</div>
|
||||
<div style={{ position: 'absolute', top: 6, left: 6 }}>
|
||||
<Tag color={item.status === 'serious' ? 'error' : 'warning'} style={{ margin: 0, fontSize: 9, padding: '0 4px', lineHeight: '14px' }}>
|
||||
{item.status === 'serious' ? '高危' : '注意'}
|
||||
</Tag>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ textAlign: 'center', marginTop: 8, fontSize: 11, color: '#4E5969' }}>{item.name}</div>
|
||||
<div style={{ textAlign: 'center', marginTop: 10, fontSize: 12, fontWeight: 500, color: '#4E5969' }}>{item.name}</div>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginTop: 20, flexWrap: 'wrap', gap: 8 }}>
|
||||
<div style={{ display: 'flex', gap: 12, fontSize: 11 }}>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 8, height: 8, borderRadius: '50%', background: '#F53F3F', marginRight: 4 }}></span>疑似点</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 8, height: 2, border: '1px dashed #F53F3F', marginRight: 4 }}></span>高温区</span>
|
||||
<div style={{ background: '#f8fafc', padding: '12px 16px', borderRadius: 8, marginTop: 20, display: 'flex', justifyContent: 'space-between', alignItems: 'center', flexWrap: 'wrap', gap: 12 }}>
|
||||
<div style={{ display: 'flex', gap: 16, fontSize: 12 }}>
|
||||
<span style={{ display: 'flex', alignItems: 'center', color: '#1D2129' }}><AimOutlined style={{ color: '#F53F3F', marginRight: 6 }} />热斑疑似点</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center', color: '#1D2129' }}><div style={{ width: 14, height: 10, border: '1.5px dashed #F53F3F', borderRadius: 2, marginRight: 6 }}></div>高温区域</span>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
|
||||
<span style={{ fontSize: 11, color: '#86909C' }}>25℃ ~ 85℃</span>
|
||||
<div style={{ width: 80, height: 6, background: 'linear-gradient(to right, #0000ff, #00ff00, #ffff00, #ff0000)', borderRadius: 3 }} />
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
|
||||
<span style={{ fontSize: 12, color: '#86909C' }}>温度分布: 25℃ ~ 85℃</span>
|
||||
<div style={{ width: 120, height: 8, background: 'linear-gradient(to right, #000080, #0000ff, #00ff00, #ffff00, #ff0000)', borderRadius: 4 }} />
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col xs={24} lg={14}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 'clamp(13px, 1vw, 14px)', fontWeight: 700 }}>组串异常定位<InfoCircleOutlined style={{ marginLeft: 4, color: '#86909C' }} /></span>}
|
||||
extra={<div style={{ fontSize: 'clamp(10px, 0.8vw, 12px)', color: '#86909C' }}>异常:<span style={{ color: '#F53F3F' }}>8</span> / 160</div>}
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>组串实时状态定位图<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
|
||||
extra={<Space split={<Divider type="vertical" />} style={{ fontSize: 12, color: '#86909C' }}>
|
||||
<span>总组串: <b style={{ color: '#1D2129' }}>160</b></span>
|
||||
<span>异常: <b style={{ color: '#F53F3F' }}>8</b></span>
|
||||
</Space>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 16 }}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<Row gutter={[16, 16]}>
|
||||
<Col xs={24} sm={24} md={18}>
|
||||
<div style={{ overflowX: 'auto' }}>
|
||||
<div style={{ minWidth: 400 }}>
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '30px repeat(20, 1fr)', gap: 4 }}>
|
||||
<Row gutter={[20, 20]}>
|
||||
<Col xs={24} md={18}>
|
||||
<div style={{ overflowX: 'auto', paddingBottom: 8 }} className="custom-scrollbar">
|
||||
<div style={{ minWidth: 500 }}>
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '40px repeat(20, 1fr)', gap: '4px' }}>
|
||||
<div></div>
|
||||
{Array.from({ length: 20 }).map((_, i) => (
|
||||
<div key={i} style={{ fontSize: 9, color: '#86909C', textAlign: 'center' }}>{String(i + 1).padStart(2, '0')}</div>
|
||||
<div key={i} style={{ fontSize: 11, color: '#86909C', textAlign: 'center', fontWeight: 500 }}>{String(i + 1).padStart(2, '0')}</div>
|
||||
))}
|
||||
{['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'].map((row) => (
|
||||
<React.Fragment key={row}>
|
||||
<div style={{ fontSize: 9, color: '#86909C', display: 'flex', alignItems: 'center' }}>{row}排</div>
|
||||
<div style={{ fontSize: 11, color: '#86909C', display: 'flex', alignItems: 'center', fontWeight: 600 }}>{row}排</div>
|
||||
{Array.from({ length: 20 }).map((_, col) => {
|
||||
let color = '#E8F3FF';
|
||||
let color = '#E8F3FF'; // 正常
|
||||
let icon = null;
|
||||
if (row === 'B' && col === 3) { color = '#F53F3F'; icon = <span style={{ color: '#fff', fontSize: 9 }}>!</span>; }
|
||||
if (row === 'B' && col === 17) { color = '#F53F3F'; icon = <span style={{ color: '#fff', fontSize: 9 }}>!</span>; }
|
||||
if (row === 'C' && col === 15) { color = '#FF7D00'; icon = <span style={{ color: '#fff', fontSize: 9 }}>!</span>; }
|
||||
if (row === 'E' && col === 4) { color = '#FF7D00'; icon = <span style={{ color: '#fff', fontSize: 9 }}>!</span>; }
|
||||
if (row === 'F' && col === 11) { color = '#FF7D00'; icon = <span style={{ color: '#fff', fontSize: 9 }}>!</span>; }
|
||||
if (row === 'G' && col === 1) { color = '#56C1FF'; }
|
||||
if (row === 'H' && col === 10) { color = '#86909C'; }
|
||||
let tooltip = `组串 ${row}-${col + 1}: 正常`;
|
||||
|
||||
// 模拟异常分布
|
||||
if (row === 'B' && col === 3) { color = '#F53F3F'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 严重异常 (热斑)`; }
|
||||
if (row === 'B' && col === 17) { color = '#F53F3F'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 严重异常 (断路)`; }
|
||||
if (row === 'C' && col === 15) { color = '#FF7D00'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 异常 (功率偏差)`; }
|
||||
if (row === 'E' && col === 4) { color = '#FF7D00'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 异常 (遮挡)`; }
|
||||
if (row === 'F' && col === 11) { color = '#F7BA1E'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 轻微异常`; }
|
||||
if (row === 'G' && col === 1) { color = '#F7BA1E'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 轻微异常`; }
|
||||
if (row === 'H' && col === 10) { color = '#86909C'; tooltip = `组串 ${row}-${col + 1}: 离线`; }
|
||||
|
||||
return (
|
||||
<div key={`${row}-${col}`} style={{ width: '100%', height: 12, background: color, borderRadius: 1, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
|
||||
{icon}
|
||||
</div>
|
||||
<Tooltip title={tooltip} key={`${row}-${col}`}>
|
||||
<div className="grid-item" style={{ width: '100%', height: 18, background: color, borderRadius: 3, display: 'flex', justifyContent: 'center', alignItems: 'center', transition: 'all 0.2s' }}>
|
||||
{icon}
|
||||
</div>
|
||||
</Tooltip>
|
||||
);
|
||||
})}
|
||||
</React.Fragment>
|
||||
@@ -266,32 +306,46 @@ export default function AIDiagnosisPage() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 12, marginTop: 16, fontSize: 11, flexWrap: 'wrap' }}>
|
||||
<div style={{ display: 'flex', gap: 16, marginTop: 20, fontSize: 11, flexWrap: 'wrap', background: '#f8fafc', padding: '8px 12px', borderRadius: 6 }}>
|
||||
{[
|
||||
{ color: '#E8F3FF', label: '正常' },
|
||||
{ color: '#56C1FF', label: '轻微' },
|
||||
{ color: '#FF7D00', label: '异常' },
|
||||
{ color: '#F53F3F', label: '严重' },
|
||||
{ color: '#86909C', label: '离线' },
|
||||
{ color: '#E8F3FF', label: '运行正常' },
|
||||
{ color: '#F7BA1E', label: '轻微异常' },
|
||||
{ color: '#FF7D00', label: '功率异常' },
|
||||
{ color: '#F53F3F', label: '严重故障' },
|
||||
{ color: '#86909C', label: '设备离线' },
|
||||
].map(item => (
|
||||
<span key={item.label} style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 10, height: 10, background: item.color, marginRight: 4 }}></span>{item.label}</span>
|
||||
<span key={item.label} style={{ display: 'flex', alignItems: 'center', color: '#4E5969' }}>
|
||||
<span style={{ width: 10, height: 10, background: item.color, marginRight: 6, borderRadius: 2 }}></span>
|
||||
{item.label}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</Col>
|
||||
<Col xs={24} sm={24} md={6}>
|
||||
<div style={{ fontSize: 12, fontWeight: 700, marginBottom: 12 }}>异常统计</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
||||
{[
|
||||
{ icon: <BellOutlined style={{ color: '#F53F3F' }} />, label: '严重异常', value: 2, color: '#F53F3F' },
|
||||
{ icon: <InfoCircleOutlined style={{ color: '#FF7D00' }} />, label: '异常', value: 4, color: '#FF7D00' },
|
||||
{ icon: <div style={{ width: 12, height: 12, background: '#56C1FF', borderRadius: 2 }} />, label: '轻微异常', value: 2, color: '#56C1FF' },
|
||||
{ icon: <div style={{ width: 12, height: 12, background: '#86909C', borderRadius: 2 }} />, label: '离线', value: 0, color: '#86909C' },
|
||||
].map(item => (
|
||||
<div key={item.label} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<Space size={4} style={{ fontSize: 11 }}>{item.icon}{item.label}</Space>
|
||||
<span style={{ fontWeight: 700, color: item.color, fontSize: 12 }}>{item.value}</span>
|
||||
</div>
|
||||
))}
|
||||
<Col xs={24} md={6}>
|
||||
<div style={{ background: '#f8fafc', padding: 16, borderRadius: 8, height: '100%' }}>
|
||||
<div style={{ fontSize: 13, fontWeight: 700, color: '#1D2129', marginBottom: 16, display: 'flex', alignItems: 'center' }}>
|
||||
<WarningOutlined style={{ marginRight: 8, color: '#F53F3F' }} />异常类型分布
|
||||
</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 14 }}>
|
||||
{[
|
||||
{ label: '严重故障', value: 2, color: '#F53F3F', percent: '25%' },
|
||||
{ label: '功率异常', value: 4, color: '#FF7D00', percent: '50%' },
|
||||
{ label: '轻微异常', value: 2, color: '#F7BA1E', percent: '25%' },
|
||||
{ label: '离线组串', value: 0, color: '#86909C', percent: '0%' },
|
||||
].map(item => (
|
||||
<div key={item.label}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 6 }}>
|
||||
<span style={{ fontSize: 12, color: '#4E5969' }}>{item.label}</span>
|
||||
<span style={{ fontWeight: 700, color: item.color, fontSize: 13 }}>{item.value}</span>
|
||||
</div>
|
||||
<div style={{ width: '100%', height: 4, background: '#E5E6EB', borderRadius: 2 }}>
|
||||
<div style={{ width: item.percent, height: '100%', background: item.color, borderRadius: 2 }}></div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<Divider style={{ margin: '16px 0' }} />
|
||||
<Button block type="dashed" size="small" style={{ fontSize: 12 }}>查看详细定位表</Button>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -299,124 +353,147 @@ export default function AIDiagnosisPage() {
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
{/* 第三排:衰减分析、发电表现、AI总结建议 */}
|
||||
{/* 第三排:三个主要分析区域 */}
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
|
||||
<Col xs={24} xl={16}>
|
||||
<Row gutter={[12, 12]}>
|
||||
<Col xs={24} md={12}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 'clamp(13px, 1vw, 14px)', fontWeight: 700 }}>组件衰减分析<InfoCircleOutlined style={{ marginLeft: 4, color: '#86909C' }} /></span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 16 }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<Line {...degradationConfig} height={220} autoFit />
|
||||
<div style={{ textAlign: 'right', marginTop: 12, fontSize: 12, color: '#4E5969' }}>
|
||||
当前平均衰减率 <span style={{ fontWeight: 700, color: '#F53F3F' }}>-5.32%</span>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
<Col xs={24} md={12}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 'clamp(13px, 1vw, 14px)', fontWeight: 700 }}>发电表现分析<InfoCircleOutlined style={{ marginLeft: 4, color: '#86909C' }} /></span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 16 }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<div style={{ display: 'flex', gap: 16, height: 220, flexWrap: "wrap" }}>
|
||||
<div style={{ flex: 1 }}>
|
||||
<Line {...generationPerformanceConfig} height={220} autoFit />
|
||||
</div>
|
||||
<div style={{ width: 100, fontSize: 11, display: 'flex', flexDirection: 'column', justifyContent: 'center', gap: 12, flexShrink: 0 }}>
|
||||
{[
|
||||
{ label: '实际发电', value: '4,752', unit: 'kWh', color: '#165DFF' },
|
||||
{ label: '预测发电', value: '4,960', unit: 'kWh', color: '#00B42A' },
|
||||
{ label: '发电偏差', value: '-4.35%', unit: '', color: '#F53F3F' },
|
||||
{ label: 'PR 值', value: '82.6%', unit: '', color: '#1D2129' },
|
||||
].map(item => (
|
||||
<div key={item.label}>
|
||||
<div style={{ color: '#86909C', marginBottom: 2 }}>{item.label}</div>
|
||||
<div style={{ fontWeight: 700, color: item.color }}>{item.value} <span style={{ fontSize: 9 }}>{item.unit}</span></div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
{/* 数据来源 */}
|
||||
<Row gutter={[12, 12]} style={{ marginTop: 12 }}>
|
||||
<Col span={24}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 13, fontWeight: 700 }}>数据来源</span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 16 }}
|
||||
style={cardStyle}
|
||||
>
|
||||
<Row gutter={[12, 12]}>
|
||||
{[
|
||||
{ title: '无人机热成像', time: '05-20 09:30', icon: <ScanOutlined /> },
|
||||
{ title: 'SCADA历史数据', time: '05-20 00:00', icon: <DatabaseOutlined /> },
|
||||
{ title: '气象实况数据', time: '05-20 09:45', icon: <CloudOutlined /> },
|
||||
{ title: '最近清洗记录', time: '05-12 14:20', icon: <RestOutlined /> },
|
||||
].map((source, idx) => (
|
||||
<Col xs={12} sm={12} md={6} key={idx}>
|
||||
<div style={{ background: '#f8fafc', padding: '12px', borderRadius: 8, display: 'flex', alignItems: 'center', gap: 10, border: '1px solid #f0f0f0' }}>
|
||||
<div style={{ fontSize: 20, color: '#165DFF', flexShrink: 0 }}>{source.icon}</div>
|
||||
<div style={{ flex: 1, minWidth: 0 }}>
|
||||
<div style={{ fontSize: 12, fontWeight: 700, color: '#1D2129', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{source.title}</div>
|
||||
<div style={{ fontSize: 10, color: '#86909C', marginTop: 2 }}>{source.time}</div>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Col xs={24} lg={7}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>组件衰减趋势分析<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 16, display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span>衰减率趋势 (%)</span>
|
||||
<span style={{ color: '#F53F3F', fontWeight: 600 }}>当前均值: -5.32%</span>
|
||||
</div>
|
||||
<Line {...degradationConfig} height={240} autoFit />
|
||||
<div style={{ marginTop: 16, padding: '12px', background: '#FFF7E8', borderRadius: 8, border: '1px solid #FFE4BA' }}>
|
||||
<div style={{ fontSize: 12, color: '#86909C', display: 'flex', alignItems: 'center' }}>
|
||||
<ExclamationCircleOutlined style={{ color: '#FF7D00', marginRight: 6 }} />
|
||||
<span style={{ color: '#1D2129', fontWeight: 600 }}>衰减预警:</span>
|
||||
<span style={{ marginLeft: 4 }}>12块组件衰减超标, 建议排查。</span>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
{/* 右侧:AI 诊断与处置 */}
|
||||
<Col xs={24} xl={8}>
|
||||
<Col xs={24} lg={10}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>实时发电表现深度分析<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<div style={{ display: 'flex', gap: 20 }}>
|
||||
<div style={{ flex: 1 }}>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 16 }}>发电量对比分析 (kWh)</div>
|
||||
<Line {...generationPerformanceConfig} height={240} autoFit />
|
||||
</div>
|
||||
<div style={{ width: 120, display: 'flex', flexDirection: 'column', justifyContent: 'center', gap: 16, flexShrink: 0, paddingLeft: 16, borderLeft: '1px solid #f0f0f0' }}>
|
||||
{[
|
||||
{ label: '当日实际发电', value: '4,752', unit: 'kWh', color: '#165DFF' },
|
||||
{ label: '当日预测发电', value: '4,960', unit: 'kWh', color: '#00B42A' },
|
||||
{ label: '发电偏差率', value: '-4.35%', unit: '', color: '#F53F3F' },
|
||||
{ label: '实时 PR 值', value: '82.6%', unit: '', color: '#1D2129' },
|
||||
].map(item => (
|
||||
<div key={item.label}>
|
||||
<div style={{ color: '#86909C', marginBottom: 4, fontSize: 11 }}>{item.label}</div>
|
||||
<div style={{ fontWeight: 800, color: item.color, fontSize: 15 }}>{item.value} <span style={{ fontSize: 10, fontWeight: 400, color: '#86909C' }}>{item.unit}</span></div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
<Col xs={24} lg={7}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 'clamp(13px, 1vw, 14px)', fontWeight: 700 }}>AI 诊断与建议措施</span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: 0 }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<div style={{ padding: '0 8px' }}>
|
||||
<div style={{ padding: '16px 20px' }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}>
|
||||
<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>AI 智能诊断总结</span>
|
||||
<Tag color="blue" style={{ margin: 0 }}>实时更新</Tag>
|
||||
</div>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: '诊断项', dataIndex: 'diagnosis', key: 'diagnosis', width: 90 },
|
||||
{ title: '状态', dataIndex: 'status', key: 'status', render: renderStatusTag, width: 50 },
|
||||
{ title: '结论', dataIndex: 'conclusion', key: 'conclusion', ellipsis: true },
|
||||
{ title: '诊断项', dataIndex: 'diagnosis', key: 'diagnosis', width: 85 },
|
||||
{ title: '状态', dataIndex: 'status', key: 'status', render: renderStatusTag, width: 60 },
|
||||
{ title: '置信度', dataIndex: 'confidence', key: 'confidence', width: 70 },
|
||||
{ title: '影响', dataIndex: 'impact', key: 'impact', render: renderImpactTag, width: 60 },
|
||||
]}
|
||||
dataSource={aiSummaryData}
|
||||
dataSource={aiSummaryData.slice(0, 4)}
|
||||
pagination={false}
|
||||
size="small"
|
||||
className="compact-table"
|
||||
/>
|
||||
<Divider style={{ margin: '12px 0' }} />
|
||||
</div>
|
||||
<Divider style={{ margin: 0 }} />
|
||||
<div style={{ padding: '16px 20px' }}>
|
||||
<div style={{ fontSize: 15, fontWeight: 700, color: '#1D2129', marginBottom: 16, display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
AI 建议与智能处置
|
||||
<Button type="link" size="small" style={{ fontSize: 12, padding: 0 }}>批量处理</Button>
|
||||
</div>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: '建议措施', dataIndex: 'measure', key: 'measure', ellipsis: true },
|
||||
{ title: '预期收益', dataIndex: 'expectedGain', key: 'expectedGain', render: (g) => <span style={{ color: '#00B42A', fontWeight: 600 }}>{g}</span>, width: 80 },
|
||||
{ title: '收益', dataIndex: 'expectedGain', key: 'expectedGain', render: (g) => <span style={{ color: '#00B42A', fontWeight: 600 }}>{g}</span>, width: 70 },
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 65,
|
||||
render: () => <Button type="primary" size="small" style={{ fontSize: 11, borderRadius: 4 }}>工单</Button>
|
||||
width: 80,
|
||||
render: (text, record) => (
|
||||
<Button type="primary" size="small" style={{ fontSize: 11, borderRadius: 6, height: 24 }}>
|
||||
{record.key === '5' ? '详情' : '派单'}
|
||||
</Button>
|
||||
)
|
||||
},
|
||||
]}
|
||||
dataSource={aiRecommendations}
|
||||
dataSource={aiRecommendations.slice(0, 4)}
|
||||
pagination={false}
|
||||
size="small"
|
||||
className="compact-table"
|
||||
/>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
{/* 底部:数据来源 */}
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>全栈数据融合来源</span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
style={cardStyle}
|
||||
>
|
||||
<Row gutter={[16, 16]}>
|
||||
{[
|
||||
{ title: '无人机载荷热成像', time: '2025-05-20 09:30', icon: <ScanOutlined />, status: '同步中' },
|
||||
{ title: 'SCADA 实时遥测数据', time: '2025-05-20 09:45:12', icon: <DatabaseOutlined />, status: '正常' },
|
||||
{ title: '云端气象分析站', time: '2025-05-20 09:45:00', icon: <CloudOutlined />, status: '正常' },
|
||||
{ title: '电站运维资产库', time: '最近更新: 2025-05-18', icon: <RestOutlined />, status: '正常' },
|
||||
].map((source, idx) => (
|
||||
<Col xs={24} sm={12} md={6} key={idx}>
|
||||
<div style={{ background: '#f8fafc', padding: '16px', borderRadius: 12, display: 'flex', alignItems: 'center', gap: 16, border: '1px solid #f0f0f0', transition: 'all 0.3s' }} className="thermal-card">
|
||||
<div style={{ width: 48, height: 48, background: '#fff', borderRadius: 12, display: 'flex', justifyContent: 'center', alignItems: 'center', fontSize: 24, color: '#165DFF', boxShadow: '0 4px 10px rgba(0,0,0,0.05)' }}>
|
||||
{source.icon}
|
||||
</div>
|
||||
<div style={{ flex: 1, minWidth: 0 }}>
|
||||
<div style={{ fontSize: 14, fontWeight: 700, color: '#1D2129' }}>{source.title}</div>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginTop: 4, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>数据点: {source.time}</div>
|
||||
<div style={{ fontSize: 11, color: source.status === '正常' ? '#00B42A' : '#165DFF', marginTop: 6, display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
<div style={{ width: 6, height: 6, background: source.status === '正常' ? '#00B42A' : '#165DFF', borderRadius: '50%' }}></div>
|
||||
状态: {source.status}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
Row, Col, Card, Button, Table, Tag, Typography, Space, Statistic, DatePicker,
|
||||
Divider, Progress, Badge, Select, Tooltip
|
||||
Divider, Progress, Badge, Select, Tooltip, Avatar
|
||||
} from 'antd';
|
||||
import {
|
||||
ReloadOutlined, PlusOutlined, ArrowUpOutlined, ArrowDownOutlined,
|
||||
CheckCircleOutlined, CloudOutlined, SunOutlined, MoneyCollectOutlined,
|
||||
CalendarOutlined, DropOutlined, DownloadOutlined, InfoCircleOutlined,
|
||||
EnvironmentOutlined, RocketOutlined, UserOutlined, WindOutlined,
|
||||
PercentageOutlined, GlobalOutlined, AimOutlined
|
||||
PercentageOutlined, GlobalOutlined, AimOutlined, FilterOutlined,
|
||||
FullscreenOutlined, ZoomInOutlined, ZoomOutOutlined
|
||||
} from '@ant-design/icons';
|
||||
import { Line, Pie, Column } from '@ant-design/charts';
|
||||
import { Line, Pie, Column, DualAxes } from '@ant-design/charts';
|
||||
import {
|
||||
Droplets,
|
||||
Zap,
|
||||
@@ -24,7 +25,9 @@ import {
|
||||
CloudRain,
|
||||
Thermometer,
|
||||
Wind,
|
||||
Info
|
||||
Info,
|
||||
ShieldCheck,
|
||||
Leaf
|
||||
} from 'lucide-react';
|
||||
|
||||
const { Title, Text } = Typography;
|
||||
@@ -57,22 +60,43 @@ const pollutionTrendData = [
|
||||
{ date: '05-22', value: 68, type: '污染指数' },
|
||||
{ date: '05-23', value: 60, type: '污染指数' },
|
||||
{ date: '05-24', value: 68.5, type: '污染指数' },
|
||||
{ date: '05-18', value: 75, type: '阈值' },
|
||||
{ date: '05-19', value: 75, type: '阈值' },
|
||||
{ date: '05-20', value: 75, type: '阈值' },
|
||||
{ date: '05-21', value: 75, type: '阈值' },
|
||||
{ date: '05-22', value: 75, type: '阈值' },
|
||||
{ date: '05-23', value: 75, type: '阈值' },
|
||||
{ date: '05-24', value: 75, type: '阈值' },
|
||||
];
|
||||
|
||||
const lossPieData = [
|
||||
{ type: '灰尘积累', value: 6120 },
|
||||
{ type: '鸟粪遮挡', value: 1480 },
|
||||
{ type: '沙尘沉积', value: 1120 },
|
||||
{ type: '其他', value: 600 },
|
||||
{ type: '灰尘积累', value: 6120, color: '#165DFF' },
|
||||
{ type: '鸟粪遮挡', value: 1480, color: '#F53F3F' },
|
||||
{ type: '沙尘沉积', value: 1120, color: '#F7BA1E' },
|
||||
{ type: '其他', value: 600, color: '#86909C' },
|
||||
];
|
||||
|
||||
const dualAxesData = [
|
||||
[
|
||||
{ date: 'D-7', value: 800, type: '清洗前发电量' },
|
||||
{ date: 'D-7', value: 1200, type: '清洗后发电量' },
|
||||
{ date: 'D-6', value: 850, type: '清洗前发电量' },
|
||||
{ date: 'D-6', value: 1250, type: '清洗后发电量' },
|
||||
{ date: 'D-5', value: 900, type: '清洗前发电量' },
|
||||
{ date: 'D-5', value: 1300, type: '清洗后发电量' },
|
||||
{ date: 'D-4', value: 880, type: '清洗前发电量' },
|
||||
{ date: 'D-4', value: 1280, type: '清洗后发电量' },
|
||||
{ date: 'D-3', value: 920, type: '清洗前发电量' },
|
||||
{ date: 'D-3', value: 1320, type: '清洗后发电量' },
|
||||
{ date: 'D-2', value: 950, type: '清洗前发电量' },
|
||||
{ date: 'D-2', value: 1350, type: '清洗后发电量' },
|
||||
{ date: 'D-1', value: 980, type: '清洗前发电量' },
|
||||
{ date: 'D-1', value: 1380, type: '清洗后发电量' },
|
||||
],
|
||||
[
|
||||
{ date: 'D-7', rate: 35 },
|
||||
{ date: 'D-6', rate: 32 },
|
||||
{ date: 'D-5', rate: 30 },
|
||||
{ date: 'D-4', rate: 28 },
|
||||
{ date: 'D-3', rate: 31 },
|
||||
{ date: 'D-2', rate: 29 },
|
||||
{ date: 'D-1', rate: 33 },
|
||||
],
|
||||
|
||||
];
|
||||
const compareBarData = [
|
||||
{ date: 'D-7', value: 800, type: '清洗前发电量(kWh)' },
|
||||
{ date: 'D-7', value: 1200, type: '清洗后发电量(kWh)' },
|
||||
@@ -90,30 +114,51 @@ const compareBarData = [
|
||||
{ date: 'D-1', value: 1380, type: '清洗后发电量(kWh)' },
|
||||
];
|
||||
|
||||
const boostRateData = [
|
||||
{ date: 'D-7', rate: 35 },
|
||||
{ date: 'D-6', rate: 32 },
|
||||
{ date: 'D-5', rate: 30 },
|
||||
{ date: 'D-4', rate: 28 },
|
||||
{ date: 'D-3', rate: 31 },
|
||||
{ date: 'D-2', rate: 29 },
|
||||
{ date: 'D-1', rate: 33 },
|
||||
];
|
||||
|
||||
export default function CleanOptimizationPage() {
|
||||
const cardStyle = {
|
||||
borderRadius: 12,
|
||||
border: '1px solid #f0f0f0',
|
||||
boxShadow: '0 4px 12px rgba(0,0,0,0.05)',
|
||||
overflow: 'hidden'
|
||||
};
|
||||
|
||||
const renderPriorityTag = (priority: string) => {
|
||||
const config: Record<string, any> = {
|
||||
'高': { color: '#ff4d4f', bg: '#fff1f0' },
|
||||
'中': { color: '#faad14', bg: '#fff7e6' },
|
||||
'低': { color: '#52c41a', bg: '#f6ffed' },
|
||||
};
|
||||
return <Tag color={config[priority]?.bg} style={{ color: config[priority]?.color, border: `1px solid ${config[priority]?.color}` }}>{priority}</Tag>;
|
||||
return <Tag color={config[priority]?.bg} style={{ color: config[priority]?.color, border: `1px solid ${config[priority]?.color}`, margin: 0, borderRadius: 4 }}>{priority}</Tag>;
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={{ background: '#f0f2f5', minHeight: '100vh', padding: '16px 24px' }}>
|
||||
{/* 顶部指标卡片 */}
|
||||
{/* 清洗建议卡片组 —— 宽高统一 + 最小168px + 自动换行 + 风格统一 */}
|
||||
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '16px 24px', boxSizing: 'border-box' }}>
|
||||
<style>
|
||||
{`
|
||||
.compact-table .ant-table-thead > tr > th {
|
||||
background: #f8fafc;
|
||||
padding: 8px 12px !important;
|
||||
font-size: 12px;
|
||||
color: #4E5969;
|
||||
}
|
||||
.compact-table .ant-table-tbody > tr > td {
|
||||
padding: 8px 12px !important;
|
||||
font-size: 12px;
|
||||
}
|
||||
.map-block {
|
||||
transition: all 0.3s;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
|
||||
}
|
||||
.map-block:hover {
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 8px 16px rgba(0,0,0,0.3);
|
||||
z-index: 10;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
|
||||
<Row
|
||||
gutter={[12, 12]}
|
||||
style={{
|
||||
@@ -234,28 +279,34 @@ export default function CleanOptimizationPage() {
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
{/* 标题栏 */}
|
||||
{/* 标题与操作栏 */}
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
|
||||
<Title level={4} style={{ margin: 0 }}>清洗优化管理</Title>
|
||||
<InfoCircleOutlined style={{ color: '#bfbfbf' }} />
|
||||
</div>
|
||||
<Space size={8}>
|
||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', fontWeight: 800 }}>清洗优化管理</Typography.Title>
|
||||
<InfoCircleOutlined style={{ color: '#86909C' }} />
|
||||
</Space>
|
||||
<Space>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>
|
||||
<ReloadOutlined style={{ marginRight: 4 }} /> 更新时间:2025-05-24 09:30
|
||||
</Text>
|
||||
<Button icon={<ReloadOutlined />}>刷新</Button>
|
||||
<Select defaultValue="7d" style={{ width: 100 }}>
|
||||
<Option value="7d">近 7 天</Option>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}><ReloadOutlined /> 更新时间:2025-05-24 09:30</Text>
|
||||
<Button icon={<ReloadOutlined />}>刷新数据</Button>
|
||||
<Select defaultValue="7d" style={{ width: 110 }}>
|
||||
<Option value="7d">最近 7 天</Option>
|
||||
<Option value="30d">最近 30 天</Option>
|
||||
</Select>
|
||||
<Button type="primary" icon={<DownloadOutlined />}>导出报告</Button>
|
||||
</Space>
|
||||
</div>
|
||||
|
||||
<Row gutter={12} style={{ display: 'flex', alignItems: 'stretch' }}>
|
||||
{/* 左侧:四个图表 */}
|
||||
<Col span={5} style={{ display: 'flex', flexDirection: 'column' }}>
|
||||
<Card title={<Text strong>污染趋势</Text>} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
|
||||
<Row gutter={[12, 12]} style={{ display: 'flex', alignItems: 'stretch' }}>
|
||||
{/* 左侧:分析图表 */}
|
||||
<Col xs={24} xl={6} style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>污染趋势分析</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 16, display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span>污染指数</span>
|
||||
<Space size={12}>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><div style={{ width: 8, height: 8, background: '#165DFF', marginRight: 4 }}></div>污染指数</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><div style={{ width: 8, height: 2, borderBottom: '1px dashed #F53F3F', marginRight: 4 }}></div>阈值</span>
|
||||
</Space>
|
||||
</div>
|
||||
<Line
|
||||
data={pollutionTrendData}
|
||||
xField="date"
|
||||
@@ -272,36 +323,32 @@ export default function CleanOptimizationPage() {
|
||||
/>
|
||||
</Card>
|
||||
|
||||
<Card title={<Text strong>发电损失分析 <Text type="secondary" style={{ fontSize: 12, fontWeight: 'normal' }}>(近 7 天)</Text></Text>} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
|
||||
<div style={{ height: 160, display: 'flex', alignItems: 'center' }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>发电损失构成 <Text type="secondary" style={{ fontWeight: 400, fontSize: 12 }}>(近 7 天)</Text></span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<div style={{ position: 'relative', height: 180 }}>
|
||||
<Pie
|
||||
data={lossPieData}
|
||||
angleField="value"
|
||||
colorField="type"
|
||||
radius={1}
|
||||
innerRadius={0.6}
|
||||
radius={0.8}
|
||||
innerRadius={0.65}
|
||||
color={['#165DFF', '#F53F3F', '#F7BA1E', '#86909C']}
|
||||
legend={{
|
||||
position: 'right',
|
||||
layout: 'vertical',
|
||||
itemValueLabel: {
|
||||
formatter: (text, item) => {
|
||||
const total = lossPieData.reduce((a, b) => a + b.value, 0);
|
||||
const percent = ((item.value / total) * 100).toFixed(1);
|
||||
return `${item.value.toLocaleString()} kWh (${percent}%)`;
|
||||
}
|
||||
}
|
||||
itemValue: { formatter: (val, item) => `${item.value} kWh` }
|
||||
}}
|
||||
height={140}
|
||||
height={180}
|
||||
autoFit
|
||||
/>
|
||||
<div style={{ position: 'absolute', left: '26%', top: '48%', textAlign: 'center', transform: 'translate(-50%, -50%)' }}>
|
||||
<div style={{ fontSize: 10, color: '#8c8c8c' }}>总损失电量</div>
|
||||
<div style={{ fontSize: 14, fontWeight: 'bold' }}>9,320</div>
|
||||
<div style={{ fontSize: 10, color: '#8c8c8c' }}>kWh</div>
|
||||
<div style={{ position: 'absolute', left: '30%', top: '50%', transform: 'translate(-50%, -50%)', textAlign: 'center' }}>
|
||||
<div style={{ fontSize: 10, color: '#86909C' }}>总损失电量</div>
|
||||
<div style={{ fontSize: 16, fontWeight: 800, color: '#1D2129' }}>9,320</div>
|
||||
<div style={{ fontSize: 10, color: '#86909C' }}>kWh</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
<Card title={<Text strong>清洗前后对比 <Text type="secondary" style={{ fontSize: 12, fontWeight: 'normal' }}>(近一次清洗)</Text></Text>} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>清洗前后对比分析 <Text type="secondary" style={{ fontWeight: 400, fontSize: 12 }}>(近一次)</Text></span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Column
|
||||
data={compareBarData}
|
||||
xField="date"
|
||||
@@ -315,269 +362,225 @@ export default function CleanOptimizationPage() {
|
||||
/>
|
||||
</Card>
|
||||
|
||||
<Card title={<Text strong>清洗收益测算 <Text type="secondary" style={{ fontSize: 12, fontWeight: 'normal' }}>(本次建议清洗)</Text></Text>} bordered={false} style={{ borderRadius: 8, flex: 1 }} bodyStyle={{ padding: '12px' }}>
|
||||
<Row gutter={[0, 12]}>
|
||||
<Col span={6}>
|
||||
<div style={{ fontSize: 10, color: '#8c8c8c' }}>预计发电提升</div>
|
||||
<div style={{ fontSize: 14, fontWeight: 'bold' }}>12,850 <Text style={{ fontSize: 10 }}>kWh</Text></div>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>清洗收益深度测算</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Row gutter={[16, 16]}>
|
||||
<Col span={12}>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>预计发电提升</div>
|
||||
<div style={{ fontSize: 15, fontWeight: 800 }}>12,850 <span style={{ fontSize: 11, fontWeight: 400 }}>kWh</span></div>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<div style={{ fontSize: 10, color: '#8c8c8c' }}>电价 (含税)</div>
|
||||
<div style={{ fontSize: 14, fontWeight: 'bold' }}>0.568 <Text style={{ fontSize: 10 }}>元/kWh</Text></div>
|
||||
<Col span={12}>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>电价 (含税)</div>
|
||||
<div style={{ fontSize: 15, fontWeight: 800 }}>0.568 <span style={{ fontSize: 11, fontWeight: 400 }}>元/kWh</span></div>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<div style={{ fontSize: 10, color: '#8c8c8c' }}>预计收益</div>
|
||||
<div style={{ fontSize: 14, fontWeight: 'bold', color: '#52c41a' }}>7,286 <Text style={{ fontSize: 10, color: '#52c41a' }}>元</Text></div>
|
||||
<Col span={12}>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>预计净收益</div>
|
||||
<div style={{ fontSize: 15, fontWeight: 800, color: '#00B42A' }}>7,286 <span style={{ fontSize: 11, fontWeight: 400 }}>元</span></div>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<div style={{ fontSize: 10, color: '#8c8c8c' }}>投资回报率 (ROI)</div>
|
||||
<div style={{ fontSize: 20, fontWeight: 'bold', color: '#52c41a' }}>227%</div>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<Divider style={{ margin: '8px 0' }} />
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 12 }}>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>回收周期</Text>
|
||||
<Text style={{ fontSize: 18, fontWeight: 'bold' }}>0.44 <Text style={{ fontSize: 12 }}>天</Text></Text>
|
||||
</div>
|
||||
<Col span={12}>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>ROI (投资回报)</div>
|
||||
<div style={{ fontSize: 20, fontWeight: 800, color: '#00B42A' }}>227%</div>
|
||||
</Col>
|
||||
</Row>
|
||||
<Divider style={{ margin: '16px 0' }} />
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', background: '#f8fafc', padding: '10px 16px', borderRadius: 8 }}>
|
||||
<span style={{ fontSize: 12, color: '#86909C' }}>回收周期</span>
|
||||
<span style={{ fontSize: 18, fontWeight: 800 }}>0.44 <Text style={{ fontSize: 12 }}>天</Text></span>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
{/* 中间:地图 + 工单表格 */}
|
||||
<Col span={12} style={{ display: 'flex', flexDirection: 'column' }}>
|
||||
{/* 中间:地图分布与工单预览 */}
|
||||
<Col xs={24} xl={11} style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
|
||||
<Card
|
||||
title={<Text strong>电站污染分布与建议清洗区块</Text>}
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700 }}>电站污染分布与建议清洗区块分布图</span>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 8, marginBottom: 12, flex: 1, display: 'flex', flexDirection: 'column' }}
|
||||
bodyStyle={{ padding: 0, flex: 1, position: 'relative' }}
|
||||
style={{ ...cardStyle, flex: 1 }}
|
||||
bodyStyle={{ padding: 0, position: 'relative', overflow: 'hidden', minHeight: 500 }}
|
||||
>
|
||||
<div style={{ padding: '8px 16px', display: 'flex', justifyContent: 'space-between', borderBottom: '1px solid #f0f0f0' }}>
|
||||
<Space size={16} style={{ fontSize: 12 }}>
|
||||
<span style={{ color: '#8c8c8c' }}>污染等级:</span>
|
||||
<Badge color="#ff4d4f" text="优先清洗 (>75)" />
|
||||
<Badge color="#faad14" text="较高 (50-75)" />
|
||||
<Badge color="#ffec3d" text="中等 (25-50)" />
|
||||
<Badge color="#b7eb8f" text="较低 (10-25)" />
|
||||
<Badge color="#52c41a" text="清洁 (<10)" />
|
||||
<div style={{ background: '#f8fafc', padding: '10px 20px', display: 'flex', justifyContent: 'space-between', borderBottom: '1px solid #f0f0f0', flexWrap: 'wrap', gap: 8 }}>
|
||||
<Space size={16} wrap style={{ fontSize: 11 }}>
|
||||
<span style={{ color: '#86909C' }}>污染等级:</span>
|
||||
<Badge color="#F53F3F" text="优先清洗 (>75)" />
|
||||
<Badge color="#FF7D00" text="较高 (50-75)" />
|
||||
<Badge color="#F7BA1E" text="中等 (25-50)" />
|
||||
<Badge color="#D1FF6B" text="较低 (10-25)" />
|
||||
<Badge color="#00B42A" text="清洁 (<10)" />
|
||||
</Space>
|
||||
</div>
|
||||
<div style={{ position: 'relative', flex: 1, background: '#e6f7ff', overflow: 'hidden', minHeight: 480 }}>
|
||||
{/* 模拟地图底图 */}
|
||||
<img src="https://api.placeholder.com/800x500?text=Power+Station+Aerial+View" style={{ width: '100%', height: '100%', objectFit: 'cover', opacity: 0.8 }} />
|
||||
|
||||
{/* 区块标记 */}
|
||||
<div style={{ position: 'absolute', top: '15%', left: '25%', padding: '4px 8px', background: 'rgba(255, 77, 79, 0.9)', color: '#fff', borderRadius: 4, textAlign: 'center', border: '1px solid #fff' }}>
|
||||
<div style={{ fontSize: 10 }}>区块 01</div>
|
||||
<div style={{ fontSize: 12, fontWeight: 'bold' }}>82.3</div>
|
||||
</div>
|
||||
<div style={{ position: 'absolute', top: '15%', left: '40%', padding: '4px 8px', background: 'rgba(255, 77, 79, 0.9)', color: '#fff', borderRadius: 4, textAlign: 'center', border: '1px solid #fff' }}>
|
||||
<div style={{ fontSize: 10 }}>区块 02</div>
|
||||
<div style={{ fontSize: 12, fontWeight: 'bold' }}>76.8</div>
|
||||
</div>
|
||||
<div style={{ position: 'absolute', top: '15%', left: '55%', padding: '4px 8px', background: 'rgba(250, 173, 20, 0.9)', color: '#fff', borderRadius: 4, textAlign: 'center', border: '1px solid #fff' }}>
|
||||
<div style={{ fontSize: 10 }}>区块 03</div>
|
||||
<div style={{ fontSize: 12, fontWeight: 'bold' }}>63.2</div>
|
||||
</div>
|
||||
<div style={{ position: 'absolute', top: '20%', left: '70%', padding: '4px 8px', background: 'rgba(82, 196, 26, 0.9)', color: '#fff', borderRadius: 4, textAlign: 'center', border: '1px solid #fff' }}>
|
||||
<div style={{ fontSize: 10 }}>区块 08</div>
|
||||
<div style={{ fontSize: 12, fontWeight: 'bold' }}>19.7</div>
|
||||
</div>
|
||||
{/* 地图背景图与浮动标签 */}
|
||||
<div style={{ position: 'relative', width: '100%', height: 'calc(100% - 40px)', background: '#e5e6eb' }}>
|
||||
<img src="https://images.unsplash.com/photo-1509391366360-2e959784a276?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80" style={{ width: '100%', height: '100%', objectFit: 'cover' }} />
|
||||
|
||||
<div style={{ position: 'absolute', top: '35%', left: '15%', padding: '4px 8px', background: 'rgba(250, 173, 20, 0.9)', color: '#fff', borderRadius: 4, textAlign: 'center', border: '1px solid #fff' }}>
|
||||
<div style={{ fontSize: 10 }}>区块 04</div>
|
||||
<div style={{ fontSize: 12, fontWeight: 'bold' }}>33.6</div>
|
||||
</div>
|
||||
<div style={{ position: 'absolute', top: '38%', left: '35%', padding: '4px 8px', background: 'rgba(255, 77, 79, 0.9)', color: '#fff', borderRadius: 4, textAlign: 'center', border: '1px solid #fff' }}>
|
||||
<div style={{ fontSize: 10 }}>区块 05</div>
|
||||
<div style={{ fontSize: 12, fontWeight: 'bold' }}>68.7</div>
|
||||
</div>
|
||||
<div style={{ position: 'absolute', top: '40%', left: '48%', padding: '4px 8px', background: 'rgba(255, 77, 79, 0.9)', color: '#fff', borderRadius: 4, textAlign: 'center', border: '1px solid #fff' }}>
|
||||
<div style={{ fontSize: 10 }}>区块 15</div>
|
||||
<div style={{ fontSize: 12, fontWeight: 'bold' }}>82.9</div>
|
||||
</div>
|
||||
{/* 模拟区块叠加层 */}
|
||||
<div style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', background: 'rgba(0,0,0,0.1)' }} />
|
||||
|
||||
{/* 地图控制按钮 */}
|
||||
<div style={{ position: 'absolute', top: 20, right: 20, display: 'flex', flexDirection: 'column', gap: 8 }}>
|
||||
<Button icon={<AimOutlined />} size="small" style={{ background: 'rgba(255,255,255,0.8)' }}>图例</Button>
|
||||
<Button icon={<RocketOutlined />} size="small" style={{ background: 'rgba(255,255,255,0.8)' }}>筛选</Button>
|
||||
<Button icon={<PlusOutlined />} size="small" style={{ background: 'rgba(255,255,255,0.8)' }}>缩放+</Button>
|
||||
<Button icon={<ReloadOutlined />} size="small" style={{ background: 'rgba(255,255,255,0.8)' }}>复位</Button>
|
||||
{/* 具体的污染区块标签 */}
|
||||
{[
|
||||
{ id: '01', score: '82.3', top: '25%', left: '30%', color: '#F53F3F' },
|
||||
{ id: '02', score: '76.8', top: '20%', left: '45%', color: '#F53F3F' },
|
||||
{ id: '03', score: '63.2', top: '22%', left: '60%', color: '#FF7D00' },
|
||||
{ id: '08', score: '19.7', top: '28%', left: '75%', color: '#00B42A' },
|
||||
{ id: '04', score: '33.6', top: '45%', left: '20%', color: '#F7BA1E' },
|
||||
{ id: '05', score: '68.7', top: '42%', left: '38%', color: '#F53F3F' },
|
||||
{ id: '15', score: '82.9', top: '48%', left: '55%', color: '#F53F3F' },
|
||||
{ id: '19', score: '44.4', top: '55%', left: '65%', color: '#F7BA1E' },
|
||||
{ id: '11', score: '44.8', top: '65%', left: '42%', color: '#F7BA1E' },
|
||||
{ id: '13', score: '28.6', top: '75%', left: '30%', color: '#F7BA1E' },
|
||||
{ id: '19', score: '24.5', top: '78%', left: '50%', color: '#D1FF6B' },
|
||||
{ id: '20', score: '17.8', top: '85%', left: '40%', color: '#00B42A' },
|
||||
].map(block => (
|
||||
<div key={block.id} className="map-block" style={{ position: 'absolute', top: block.top, left: block.left, background: block.color, color: '#fff', padding: '4px 10px', borderRadius: 6, border: '1.5px solid #fff', textAlign: 'center', minWidth: 60 }}>
|
||||
<div style={{ fontSize: 9, opacity: 0.9 }}>区块 {block.id}</div>
|
||||
<div style={{ fontSize: 13, fontWeight: 800 }}>{block.score}</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* 右侧悬浮控制按钮 */}
|
||||
<div style={{ position: 'absolute', top: 20, right: 20, display: 'flex', flexDirection: 'column', gap: 10 }}>
|
||||
<Button icon={<AimOutlined />} style={{ borderRadius: 8, width: 40, height: 40, background: 'rgba(255,255,255,0.9)', border: 'none' }} />
|
||||
<Button icon={<FilterOutlined />} style={{ borderRadius: 8, width: 40, height: 40, background: 'rgba(255,255,255,0.9)', border: 'none' }} />
|
||||
<Button icon={<ZoomInOutlined />} style={{ borderRadius: 8, width: 40, height: 40, background: 'rgba(255,255,255,0.9)', border: 'none' }} />
|
||||
<Button icon={<ZoomOutOutlined />} style={{ borderRadius: 8, width: 40, height: 40, background: 'rgba(255,255,255,0.9)', border: 'none' }} />
|
||||
<Button icon={<ReloadOutlined />} style={{ borderRadius: 8, width: 40, height: 40, background: 'rgba(255,255,255,0.9)', border: 'none' }} />
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
title={<Text strong>清洗工单预览</Text>}
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700 }}>清洗工单智能预览</span>}
|
||||
extra={<Button type="link" size="small">查看更多 <ChevronRight size={14} /></Button>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 8, flex: 'none' }}
|
||||
extra={<Button type="link" size="small">更多 <ChevronRight size={14} /></Button>}
|
||||
style={cardStyle}
|
||||
bodyStyle={{ padding: 0 }}
|
||||
>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: '区块', dataIndex: 'area', width: 100 },
|
||||
{ title: '优先级', dataIndex: 'priority', width: 80, render: renderPriorityTag },
|
||||
{ title: '预计工时', dataIndex: 'duration', width: 100 },
|
||||
{ title: '负责人', dataIndex: 'handler', width: 100 },
|
||||
{ title: '计划时间', dataIndex: 'planTime', width: 180 },
|
||||
{ title: '状态', dataIndex: 'status', width: 80, render: (s) => <Text type="secondary">{s}</Text> },
|
||||
{ title: '操作', key: 'action', width: 80, render: () => <Button type="link" size="small">创建工单</Button> },
|
||||
{ title: '区块', dataIndex: 'area', key: 'area' },
|
||||
{ title: '优先级', dataIndex: 'priority', key: 'priority', render: renderPriorityTag },
|
||||
{ title: '预计工时', dataIndex: 'duration', key: 'duration' },
|
||||
{ title: '负责人', dataIndex: 'handler', key: 'handler' },
|
||||
{ title: '计划时间', dataIndex: 'planTime', key: 'planTime' },
|
||||
{ title: '状态', dataIndex: 'status', key: 'status', render: (s) => <Tag color="blue" variant="outline" style={{ borderRadius: 4 }}>{s}</Tag> },
|
||||
{ title: '操作', key: 'action', render: () => <Button type="primary" size="small" style={{ borderRadius: 4 }}>创建工单</Button> },
|
||||
]}
|
||||
dataSource={workOrderPreviewData}
|
||||
pagination={false}
|
||||
size="small"
|
||||
className="compact-table"
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
{/* 右侧:建议 + 方案 + 天气 + 评估 */}
|
||||
<Col span={7} style={{ display: 'flex', flexDirection: 'column' }}>
|
||||
<Card title={<Text strong>智能清洗建议</Text>} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: 0 }}>
|
||||
<div style={{ padding: '8px 16px', background: '#fafafa', borderBottom: '1px solid #f0f0f0' }}>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>算法模型:多因子综合优化模型</Text>
|
||||
{/* 右侧:决策建议与参考 */}
|
||||
<Col xs={24} xl={7} style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>智能清洗策略建议</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 0 }}>
|
||||
<div style={{ background: '#f8fafc', padding: '8px 16px', borderBottom: '1px solid #f0f0f0' }}>
|
||||
<Text type="secondary" style={{ fontSize: 11 }}>算法模型:多因子加权综合优化模型 (v2.0)</Text>
|
||||
</div>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: '推荐计划', dataIndex: 'id', width: 80 },
|
||||
{ title: '优先级', dataIndex: 'priority', width: 60, render: (p) => <Text style={{ color: p === '高' ? '#ff4d4f' : p === '中' ? '#faad14' : '#52c41a' }}>{p}</Text> },
|
||||
{ title: '建议区块', dataIndex: 'area', width: 100 },
|
||||
{ title: '预计提升', dataIndex: 'boost', width: 100 },
|
||||
{ title: '天气适宜度', dataIndex: 'weather', width: 90, render: (w) => <Space size={4}>{w} <SunOutlined style={{ color: '#faad14', fontSize: 12 }} /></Space> },
|
||||
{ title: '建议时间', key: 'time', width: 100, render: (_, record, index) => <Text style={{ fontSize: 11 }}>05-{26 + index} - 05-{27 + index}</Text> },
|
||||
{ title: '推荐计划', dataIndex: 'id', key: 'id', width: 85 },
|
||||
{ title: '优先级', dataIndex: 'priority', key: 'priority', render: (p) => <span style={{ color: p === '高' ? '#F53F3F' : '#F7BA1E', fontWeight: 600 }}>{p}</span>, width: 65 },
|
||||
{ title: '建议区块', dataIndex: 'area', key: 'area' },
|
||||
{ title: '预计提升', dataIndex: 'boost', key: 'boost', render: (b) => <span style={{ color: '#00B42A', fontWeight: 600 }}>{b}</span> },
|
||||
{ title: '天气适宜度', dataIndex: 'weather', key: 'weather', render: (w) => <Space size={4}>{w} <SunOutlined style={{ color: '#F7BA1E' }} /></Space> },
|
||||
]}
|
||||
dataSource={smartCleanPlanData}
|
||||
pagination={false}
|
||||
size="small"
|
||||
className="compact-table"
|
||||
/>
|
||||
</Card>
|
||||
|
||||
<Card title={<Text strong>清洗方案建议</Text>} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>清洗技术方案推荐</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Row gutter={12}>
|
||||
<Col span={12}>
|
||||
<div style={{ border: '1px solid #f0f0f0', borderRadius: 8, padding: '12px', background: '#f9f0ff' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 8 }}>
|
||||
<div style={{ width: 32, height: 32, borderRadius: '50%', background: '#722ed1', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
<Bot size={18} color="#fff" />
|
||||
</div>
|
||||
<Text strong style={{ fontSize: 13 }}>清洗机器人方案</Text>
|
||||
</div>
|
||||
<Text type="secondary" style={{ fontSize: 11, display: 'block', marginBottom: 8 }}>自动化清洗,效率高,适合大面积、平整区域</Text>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<Text type="secondary" style={{ fontSize: 11 }}>预计用水:</Text>
|
||||
<Text strong style={{ fontSize: 11 }}>18 吨</Text>
|
||||
<div style={{ background: '#F9F0FF', borderRadius: 12, padding: 16, border: '1px solid #D3ADF7', height: '100%' }}>
|
||||
<Space align="center" style={{ marginBottom: 12 }}>
|
||||
<div style={{ width: 32, height: 32, background: '#722ED1', borderRadius: '50%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}><Bot size={18} color="#fff" /></div>
|
||||
<Text strong style={{ fontSize: 13, color: '#391085' }}>智能机器人方案</Text>
|
||||
</Space>
|
||||
<div style={{ fontSize: 11, color: '#531DAB', marginBottom: 12, lineHeight: 1.5 }}>全自动清洗,适合大面积平整区块,效率极高。</div>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', fontSize: 11 }}>
|
||||
<span style={{ color: '#8c8c8c' }}>预计用水:</span>
|
||||
<Text strong>18 吨</Text>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<div style={{ border: '1px solid #f0f0f0', borderRadius: 8, padding: '12px', background: '#e6f7ff' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 8 }}>
|
||||
<div style={{ width: 32, height: 32, borderRadius: '50%', background: '#1890ff', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
<User size={18} color="#fff" />
|
||||
</div>
|
||||
<Text strong style={{ fontSize: 13 }}>人工清洗方案</Text>
|
||||
</div>
|
||||
<Text type="secondary" style={{ fontSize: 11, display: 'block', marginBottom: 8 }}>灵活作业,适合局部、遮挡严重或复杂区域</Text>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<Text type="secondary" style={{ fontSize: 11 }}>预计用水:</Text>
|
||||
<Text strong style={{ fontSize: 11 }}>32 吨</Text>
|
||||
<div style={{ background: '#E6F7FF', borderRadius: 12, padding: 16, border: '1px solid #91D5FF', height: '100%' }}>
|
||||
<Space align="center" style={{ marginBottom: 12 }}>
|
||||
<div style={{ width: 32, height: 32, background: '#1890FF', borderRadius: '50%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}><User size={18} color="#fff" /></div>
|
||||
<Text strong style={{ fontSize: 13, color: '#003A8C' }}>人工精细化方案</Text>
|
||||
</Space>
|
||||
<div style={{ fontSize: 11, color: '#0050B3', marginBottom: 12, lineHeight: 1.5 }}>灵活处理遮挡及严重污垢区域,适合复杂地形。</div>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', fontSize: 11 }}>
|
||||
<span style={{ color: '#8c8c8c' }}>预计用水:</span>
|
||||
<Text strong>32 吨</Text>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
<Card title={<Text strong>天气与资源参考 <Text type="secondary" style={{ fontSize: 12, fontWeight: 'normal' }}>(计划 01)</Text></Text>} bordered={false} style={{ borderRadius: 8, marginBottom: 12, flex: 'none' }} bodyStyle={{ padding: '12px' }}>
|
||||
<Row gutter={16}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>天气与资源环境参考 <Text type="secondary" style={{ fontSize: 12, fontWeight: 400 }}>(计划 01)</Text></span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Row gutter={12}>
|
||||
<Col span={8}>
|
||||
<div style={{ textAlign: 'center', padding: '8px', background: '#fafafa', borderRadius: 8 }}>
|
||||
<div style={{ fontSize: 11, color: '#8c8c8c' }}>05-26</div>
|
||||
<SunOutlined style={{ fontSize: 20, color: '#faad14', margin: '4px 0' }} />
|
||||
<div style={{ fontSize: 11 }}>多云</div>
|
||||
<div style={{ fontSize: 11, fontWeight: 'bold' }}>18~28℃</div>
|
||||
<div style={{ background: '#f8fafc', padding: '10px 4px', borderRadius: 8, textAlign: 'center', border: '1px solid #f0f0f0' }}>
|
||||
<div style={{ fontSize: 11, color: '#86909C' }}>05-26 (周一)</div>
|
||||
<SunOutlined style={{ fontSize: 24, color: '#F7BA1E', margin: '8px 0' }} />
|
||||
<div style={{ fontSize: 12, fontWeight: 700 }}>多云 18~28℃</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<div style={{ textAlign: 'center', padding: '8px', background: '#fafafa', borderRadius: 8 }}>
|
||||
<div style={{ fontSize: 11, color: '#8c8c8c' }}>05-27</div>
|
||||
<SunOutlined style={{ fontSize: 20, color: '#faad14', margin: '4px 0' }} />
|
||||
<div style={{ fontSize: 11 }}>晴</div>
|
||||
<div style={{ fontSize: 11, fontWeight: 'bold' }}>19~30℃</div>
|
||||
<div style={{ background: '#f8fafc', padding: '10px 4px', borderRadius: 8, textAlign: 'center', border: '1px solid #f0f0f0' }}>
|
||||
<div style={{ fontSize: 11, color: '#86909C' }}>05-27 (周二)</div>
|
||||
<SunOutlined style={{ fontSize: 24, color: '#F7BA1E', margin: '8px 0' }} />
|
||||
<div style={{ fontSize: 12, fontWeight: 700 }}>晴 19~30℃</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
|
||||
<Wind size={14} color="#8c8c8c" />
|
||||
<div style={{ fontSize: 10 }}>风速 <Text strong>2.1 m/s</Text></div>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 10, justifyContent: 'center', height: '100%' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
<Wind size={14} style={{ color: '#86909C' }} /><span style={{ fontSize: 11 }}>风速: <b style={{ color: '#00B42A' }}>2.1m/s (适宜)</b></span>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
|
||||
<CloudRain size={14} color="#8c8c8c" />
|
||||
<div style={{ fontSize: 10 }}>降水率 <Text strong>10%</Text></div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
<CloudRain size={14} style={{ color: '#86909C' }} /><span style={{ fontSize: 11 }}>降水: <b style={{ color: '#86909C' }}>10% (低)</b></span>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
|
||||
<Droplets size={14} color="#1890ff" />
|
||||
<div style={{ fontSize: 10 }}>水源可用 <Text strong>充足</Text></div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
<Droplets size={14} style={{ color: '#165DFF' }} /><span style={{ fontSize: 11 }}>水源: <b style={{ color: '#165DFF' }}>充足 (50t)</b></span>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
<Card title={<Text strong>清洗影响评估</Text>} bordered={false} style={{ borderRadius: 8, flex: 1 }} bodyStyle={{ padding: '12px' }}>
|
||||
<Row gutter={[12, 12]}>
|
||||
<Col span={12}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
|
||||
<div style={{ width: 36, height: 36, borderRadius: 8, background: '#e6f7ff', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
<Droplets size={18} color="#1890ff" />
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>清洗作业影响综合评估</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Row gutter={[16, 16]}>
|
||||
{[
|
||||
{ icon: <Droplets size={18} color="#165DFF" />, bg: '#E8F3FF', label: '预计用水量', value: '18 吨', sub: '节水 30% (机器人)', subColor: '#00B42A' },
|
||||
{ icon: <Calendar size={18} color="#165DFF" />, bg: '#E8F3FF', label: '预计总耗时', value: '12 小时', sub: '并行作业 2 组', subColor: '#86909C' },
|
||||
{ icon: <Leaf size={18} color="#00B42A" />, bg: '#E8FFEA', label: '碳减排贡献', value: '6.85 吨', sub: 'CO₂ 减排量', subColor: '#86909C' },
|
||||
{ icon: <ShieldCheck size={18} color="#F7BA1E" />, bg: '#FFF7E8', label: '作业风险评估', value: '低风险', valueColor: '#00B42A', sub: '安全可控', subColor: '#86909C' },
|
||||
].map((item, idx) => (
|
||||
<Col span={12} key={idx}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
|
||||
<div style={{ width: 40, height: 40, background: item.bg, borderRadius: 10, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>{item.icon}</div>
|
||||
<div>
|
||||
<div style={{ fontSize: 11, color: '#86909C' }}>{item.label}</div>
|
||||
<div style={{ fontSize: 14, fontWeight: 800, color: item.valueColor || '#1D2129' }}>{item.value}</div>
|
||||
<div style={{ fontSize: 9, color: item.subColor }}>{item.sub}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style={{ fontSize: 11, color: '#8c8c8c' }}>预计用水量</div>
|
||||
<div style={{ fontSize: 14, fontWeight: 'bold' }}>18 <Text style={{ fontSize: 11 }}>吨</Text></div>
|
||||
<div style={{ fontSize: 9, color: '#52c41a' }}>节水率 30% (机器人)</div>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
|
||||
<div style={{ width: 36, height: 36, borderRadius: 8, background: '#f0f5ff', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
<Calendar size={18} color="#1890ff" />
|
||||
</div>
|
||||
<div>
|
||||
<div style={{ fontSize: 11, color: '#8c8c8c' }}>预计耗时</div>
|
||||
<div style={{ fontSize: 14, fontWeight: 'bold' }}>12 <Text style={{ fontSize: 11 }}>小时</Text></div>
|
||||
<div style={{ fontSize: 9, color: '#8c8c8c' }}>并行作业 2 组</div>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
|
||||
<div style={{ width: 36, height: 36, borderRadius: 8, background: '#f6ffed', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
<Zap size={18} color="#52c41a" />
|
||||
</div>
|
||||
<div>
|
||||
<div style={{ fontSize: 11, color: '#8c8c8c' }}>碳减排量</div>
|
||||
<div style={{ fontSize: 14, fontWeight: 'bold' }}>6.85 <Text style={{ fontSize: 11 }}>吨</Text></div>
|
||||
<div style={{ fontSize: 9, color: '#8c8c8c' }}>CO₂ 减排量</div>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
|
||||
<div style={{ width: 36, height: 36, borderRadius: 8, background: '#fff7e6', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
<Info size={18} color="#faad14" />
|
||||
</div>
|
||||
<div>
|
||||
<div style={{ fontSize: 11, color: '#8c8c8c' }}>作业风险</div>
|
||||
<div style={{ fontSize: 14, fontWeight: 'bold', color: '#52c41a' }}>低风险</div>
|
||||
<div style={{ fontSize: 9, color: '#8c8c8c' }}>安全可控</div>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
<div style={{ marginTop: 12, display: 'flex', alignItems: 'center', gap: 4 }}>
|
||||
<InfoCircleOutlined style={{ fontSize: 10, color: '#bfbfbf' }} />
|
||||
<Text type="secondary" style={{ fontSize: 9 }}>以上建议基于历史数据、实时气象及发电损失模型综合计算。实际效果可能因天气和现场情况有所差异。</Text>
|
||||
<div style={{ marginTop: 20, padding: 12, background: '#f8fafc', borderRadius: 8, display: 'flex', gap: 8, alignItems: 'flex-start' }}>
|
||||
<InfoCircleOutlined style={{ fontSize: 12, color: '#86909C', marginTop: 2 }} />
|
||||
<Text type="secondary" style={{ fontSize: 10, lineHeight: 1.5 }}>
|
||||
以上决策建议基于历史数据、实时气象及发电损失模型综合计算。实际执行效果可能受天气骤变、现场突发障碍等不确定因素影响。
|
||||
</Text>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
@@ -585,3 +588,4 @@ export default function CleanOptimizationPage() {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
Card, Row, Col, Tabs, Button, Space, Select, Table, Statistic,
|
||||
DatePicker, message, Tag, Typography,
|
||||
Radio, Checkbox, Divider
|
||||
Card, Row, Col, Tabs, Button, Space, Select, Table, Tag, Typography,
|
||||
DatePicker, Divider, Checkbox, Avatar, Badge, Tooltip, Progress,
|
||||
Statistic
|
||||
} from 'antd';
|
||||
import {
|
||||
CloudOutlined, BarChartOutlined, BellOutlined,
|
||||
CalendarOutlined, FileTextOutlined,
|
||||
BarChartOutlined, BellOutlined, CalendarOutlined, FileTextOutlined,
|
||||
DownloadOutlined, ArrowUpOutlined, CheckCircleOutlined,
|
||||
ClockCircleOutlined, WarningOutlined, FileExcelOutlined,
|
||||
FilePdfOutlined, MailOutlined, SendOutlined, SettingOutlined,
|
||||
RobotOutlined
|
||||
RobotOutlined, CloudOutlined, ThunderboltOutlined,
|
||||
PieChartOutlined, LineChartOutlined, InfoCircleOutlined,
|
||||
ReloadOutlined, MoreOutlined, FileDoneOutlined, EyeOutlined,
|
||||
EditOutlined, RiseOutlined, FallOutlined,
|
||||
CheckCircleFilled
|
||||
} from '@ant-design/icons';
|
||||
import { Line, Bar, Pie } from '@ant-design/charts';
|
||||
import { Line, Column, Pie, Area, DualAxes, Bar } from '@ant-design/charts';
|
||||
import dayjs from 'dayjs';
|
||||
import { ChevronRight } from 'lucide-react';
|
||||
|
||||
const { TabPane } = Tabs;
|
||||
const { RangePicker } = DatePicker;
|
||||
@@ -22,58 +26,74 @@ const { Text, Title } = Typography;
|
||||
|
||||
// 模拟数据(完全匹配参考图)
|
||||
const overviewCards = [
|
||||
{ title: '本月发电量', value: '138.6', unit: 'MWh', rate: '+6.2%', rateUp: true, color: '#52c41a' },
|
||||
{ title: 'PR均值', value: '82.8', unit: '%', rate: '+1.1%', rateUp: true, color: '#1890ff' },
|
||||
{ title: '运维工单完成率', value: '93.4', unit: '%', desc: '本月累计 126 单', color: '#1890ff' },
|
||||
{ title: '告警闭环率', value: '94.2', unit: '%', desc: '严重告警 8 条', color: '#faad14' },
|
||||
{ title: '清洗收益提升', value: '+7.6', unit: '%', desc: '预估增发 12,850 kWh', color: '#52c41a' },
|
||||
{ title: '自动生成报告', value: '24', unit: '份', desc: '本月累计', color: '#722ed1' },
|
||||
{ title: '本月发电量', value: '138.6', unit: 'MWh', trend: '环比 ↑ +6.2%', color: '#00B42A', bg: '#E8FFEA', icon: <RiseOutlined /> },
|
||||
{ title: 'PR均值', value: '82.8', unit: '%', trend: '环比 ↑ +1.1%', color: '#165DFF', bg: '#E8F3FF', icon: <LineChartOutlined /> },
|
||||
{ title: '运维工单完成率', value: '93.4', unit: '%', trend: '本月累计 126 单', color: '#165DFF', bg: '#E8F3FF', icon: <FileDoneOutlined /> },
|
||||
{ title: '告警闭环率', value: '94.2', unit: '%', trend: '严重告警 8 条', color: '#F53F3F', bg: '#FFF1F0', icon: <BellOutlined /> },
|
||||
{ title: '清洗收益提升', value: '+7.6', unit: '%', trend: '预估增发 12,850 kWh', color: '#00B42A', bg: '#E8FFEA', icon: <ThunderboltOutlined /> },
|
||||
{ title: '自动生成报告', value: '24', unit: '份', trend: '本月累计', color: '#722ED1', bg: '#F9F0FF', icon: <FileTextOutlined /> },
|
||||
];
|
||||
|
||||
const monthlyPowerData = [
|
||||
{ date: '05-01', generation: 6, predicted: 8, pr: 105 },
|
||||
{ date: '05-06', generation: 7, predicted: 9, pr: 108 },
|
||||
{ date: '05-11', generation: 3, predicted: 7, pr: 102 },
|
||||
{ date: '05-16', generation: 8, predicted: 10, pr: 112 },
|
||||
{ date: '05-21', generation: 9, predicted: 10, pr: 110 },
|
||||
{ date: '05-26', generation: 7, predicted: 9, pr: 108 },
|
||||
{ date: '05-31', generation: 5, predicted: 7, pr: 105 },
|
||||
{ date: '05-03', generation: 5.5, predicted: 7.8, pr: 102 },
|
||||
{ date: '05-05', generation: 6.2, predicted: 8.2, pr: 108 },
|
||||
{ date: '05-07', generation: 7, predicted: 8.5, pr: 110 },
|
||||
{ date: '05-09', generation: 6.8, predicted: 8.3, pr: 105 },
|
||||
{ date: '05-11', generation: 4, predicted: 7.5, pr: 98 },
|
||||
{ date: '05-13', generation: 3, predicted: 7, pr: 95 },
|
||||
{ date: '05-15', generation: 8, predicted: 9.5, pr: 112 },
|
||||
{ date: '05-17', generation: 8.5, predicted: 10, pr: 115 },
|
||||
{ date: '05-19', generation: 7.8, predicted: 9.2, pr: 108 },
|
||||
{ date: '05-21', generation: 9, predicted: 10.5, pr: 118 },
|
||||
{ date: '05-23', generation: 8.2, predicted: 9.8, pr: 110 },
|
||||
{ date: '05-25', generation: 7, predicted: 9, pr: 105 },
|
||||
{ date: '05-27', generation: 6.5, predicted: 8.5, pr: 102 },
|
||||
{ date: '05-29', generation: 5, predicted: 7.5, pr: 98 },
|
||||
{ date: '05-31', generation: 4.5, predicted: 7, pr: 95 },
|
||||
];
|
||||
|
||||
const powerMeteorologyData = [
|
||||
{ date: '05-05-05', generation: 70, irradiance: 60, temp: 20 },
|
||||
{ date: '05-12-05', generation: 60, irradiance: 50, temp: 22 },
|
||||
{ date: '05-19-05', generation: 65, irradiance: 65, temp: 25 },
|
||||
{ date: '05-26-05', generation: 55, irradiance: 55, temp: 23 },
|
||||
{ date: '05-05-11', generation: 70, irradiance: 60, temp: 20 },
|
||||
{ date: '05-12-18', generation: 60, irradiance: 50, temp: 22 },
|
||||
{ date: '05-19-25', generation: 65, irradiance: 65, temp: 25 },
|
||||
{ date: '05-26-31', generation: 55, irradiance: 55, temp: 23 },
|
||||
];
|
||||
|
||||
const orderAlarmData = [
|
||||
{ date: '05-05-05', newOrder: 80, completed: 60, alarmCount: 10, closedRate: 80 },
|
||||
{ date: '05-12-05', newOrder: 100, completed: 80, alarmCount: 20, closedRate: 85 },
|
||||
{ date: '05-19-05', newOrder: 70, completed: 50, alarmCount: 15, closedRate: 90 },
|
||||
{ date: '05-26-05', newOrder: 90, completed: 70, alarmCount: 18, closedRate: 92 },
|
||||
{ date: '05-05-11', newOrder: 80, completed: 60, alarmCount: 10, closedRate: 80 },
|
||||
{ date: '05-12-18', newOrder: 100, completed: 80, alarmCount: 20, closedRate: 85 },
|
||||
{ date: '05-19-25', newOrder: 70, completed: 50, alarmCount: 15, closedRate: 90 },
|
||||
{ date: '05-26-31', newOrder: 90, completed: 70, alarmCount: 18, closedRate: 92 },
|
||||
];
|
||||
|
||||
const aiAnalysisData = [
|
||||
{ type: '热斑识别', value: 36 },
|
||||
{ type: '异常组串', value: 8 },
|
||||
{ type: '推荐清洗区块', value: 8 },
|
||||
{ type: '视频异常事件', value: 6 },
|
||||
{ type: '热斑识别', value: 36, color: '#F53F3F', icon: <RiseOutlined /> },
|
||||
{ type: '异常组串', value: 8, color: '#FF7D00', icon: <WarningOutlined /> },
|
||||
{ type: '推荐清洗区块', value: 8, color: '#00B42A', icon: <ThunderboltOutlined /> },
|
||||
{ type: '视频异常事件', value: 6, color: '#722ED1', icon: <EyeOutlined /> },
|
||||
];
|
||||
|
||||
const reportFileList = [
|
||||
{ name: '电站月报', date: '2025年05月', type: '发电报表', status: '已生成', operator: '张运维', time: '2025-05-31 08:15' },
|
||||
{ name: '周运维总结', date: '2025年05月', type: '运维报表', status: '已生成', operator: '系统自动', time: '2025-05-26 09:10' },
|
||||
{ name: 'AI诊断日报', date: '2025年05月', type: 'AI分析报告', status: '生成中', operator: '系统自动', time: '2025-05-31 07:30' },
|
||||
{ name: '告警闭环周报', date: '2025年05月', type: '告警报表', status: '已生成', operator: '李工程师', time: '2025-05-31 09:00' },
|
||||
{ name: '清洗效果报告', date: '2025年05月', type: '运维报表', status: '已生成', operator: '王运维', time: '2025-05-28 10:20' },
|
||||
{ name: '2025年05月电站月报', status: '已生成' },
|
||||
{ name: '周运维总结', status: '已生成' },
|
||||
{ name: 'AI诊断日报', status: '生成中' },
|
||||
{ name: '告警闭环周报', status: '已生成' },
|
||||
];
|
||||
|
||||
const reportTemplates = [
|
||||
{ name: '月度经营报告', desc: '综合经营分析与收益评估模板', icon: <BarChartOutlined />, color: '#1890ff' },
|
||||
{ name: '设备健康分析报告', desc: '设备健康与故障分析模板', icon: <WarningOutlined />, color: '#faad14' },
|
||||
{ name: '清洗优化效果报告', desc: '清洗前后对比与收益分析模板', icon: <CloudOutlined />, color: '#52c41a' },
|
||||
{ name: '巡检与机器人作业报告', desc: '巡检与机器人作业统计模板', icon: <RobotOutlined />, color: '#722ed1' },
|
||||
{ name: '月度经营报告', desc: '综合经营分析与收益评估模板', color: '#165DFF', bg: '#E8F3FF', icon: <BarChartOutlined /> },
|
||||
{ name: '设备健康分析报告', desc: '设备健康度与故障分析模板', color: '#165DFF', bg: '#E8F3FF', icon: <FileDoneOutlined /> },
|
||||
{ name: '清洗优化效果报告', desc: '清洗前后对比与收益分析模板', color: '#165DFF', bg: '#E8F3FF', icon: <ThunderboltOutlined /> },
|
||||
{ name: '巡检与机器人作业报告', desc: '巡检与机器人作业统计模板', color: '#722ED1', bg: '#F9F0FF', icon: <RobotOutlined /> },
|
||||
];
|
||||
|
||||
const generationRecord = [
|
||||
{ name: '电站月报', time: '2025-05-31 08:15', operator: '张运维', type: '发电报表', status: '已生成' },
|
||||
{ name: '告警周报', time: '2025-05-26 09:10', operator: '系统自动', type: '告警报表', status: '已生成' },
|
||||
{ name: 'AI诊断日报', time: '2025-05-31 07:30', operator: '系统自动', type: 'AI分析报告', status: '生成中' },
|
||||
{ name: '运维汇总报表', time: '2025-05-31 09:00', operator: '李工程师', type: '运维报表', status: '已生成' },
|
||||
{ name: '清洗效果报告', time: '2025-05-28 10:20', operator: '王运维', type: '运维报表', status: '已生成' },
|
||||
];
|
||||
|
||||
export default function ReportCenterPage() {
|
||||
@@ -82,10 +102,56 @@ export default function ReportCenterPage() {
|
||||
const [reportType, setReportType] = useState('all');
|
||||
const [dateRange, setDateRange] = useState([dayjs('2025-05-01'), dayjs('2025-05-31')]);
|
||||
|
||||
const cardStyle = {
|
||||
borderRadius: 12,
|
||||
border: '1px solid #f0f0f0',
|
||||
boxShadow: '0 4px 12px rgba(0,0,0,0.05)',
|
||||
overflow: 'hidden'
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20, background: '#f5f7fa', minHeight: '100vh' }}>
|
||||
<div style={{ padding: '16px 24px', background: '#f5f7fa', minHeight: '100vh', boxSizing: 'border-box' }}>
|
||||
<style>
|
||||
{`
|
||||
.compact-table .ant-table-thead > tr > th {
|
||||
background: #f8fafc;
|
||||
padding: 8px 12px !important;
|
||||
font-size: 12px;
|
||||
color: #4E5969;
|
||||
}
|
||||
.compact-table .ant-table-tbody > tr > td {
|
||||
padding: 8px 12px !important;
|
||||
font-size: 12px;
|
||||
}
|
||||
.report-tabs .ant-tabs-nav {
|
||||
margin-bottom: 16px !important;
|
||||
}
|
||||
.report-tabs .ant-tabs-tab {
|
||||
padding: 8px 16px !important;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.filter-label {
|
||||
font-size: 12px;
|
||||
color: #86909C;
|
||||
margin-right: 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.custom-scrollbar::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
}
|
||||
.custom-scrollbar::-webkit-scrollbar-thumb {
|
||||
background: #E5E6EB;
|
||||
border-radius: 2px;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
|
||||
<Typography.Title level={4} style={{ margin: 0 }}>报表中心</Typography.Title>
|
||||
|
||||
{/* 页面头部标签 */}
|
||||
<Tabs activeKey={activeTab} onChange={setActiveTab} style={{ marginBottom: 20 }}>
|
||||
<Tabs activeKey={activeTab} onChange={setActiveTab} className="report-tabs">
|
||||
<TabPane tab="报表总览" key="overview" />
|
||||
<TabPane tab="发电报表" key="power" />
|
||||
<TabPane tab="运维报表" key="operation" />
|
||||
@@ -93,8 +159,6 @@ export default function ReportCenterPage() {
|
||||
<TabPane tab="AI分析报告" key="ai" />
|
||||
</Tabs>
|
||||
|
||||
{/* 顶部统计卡片 */}
|
||||
{/* 概览统计卡片 —— 统一风格 + 自动换行 + 宽高一致 */}
|
||||
<Row
|
||||
gutter={[16, 16]}
|
||||
style={{
|
||||
@@ -162,101 +226,130 @@ export default function ReportCenterPage() {
|
||||
</Row>
|
||||
|
||||
{/* 筛选栏 */}
|
||||
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 20, gap: 16, flexWrap: 'wrap' }}>
|
||||
<Select value={reportCycle} onChange={setReportCycle} style={{ width: 120 }}>
|
||||
<Option value="day">日报</Option>
|
||||
<Option value="week">周报</Option>
|
||||
<Option value="month">月报</Option>
|
||||
</Select>
|
||||
<Select value={reportType} onChange={setReportType} style={{ width: 120 }}>
|
||||
<Option value="all">全部</Option>
|
||||
<Option value="power">发电报表</Option>
|
||||
<Option value="operation">运维报表</Option>
|
||||
<Option value="alarm">告警报表</Option>
|
||||
<Option value="ai">AI分析报告</Option>
|
||||
</Select>
|
||||
<RangePicker
|
||||
value={dateRange}
|
||||
onChange={setDateRange}
|
||||
style={{ flex: 1, maxWidth: 300 }}
|
||||
/>
|
||||
<Space>
|
||||
<Button type="primary" icon={<FileTextOutlined />}>生成报表</Button>
|
||||
<Button icon={<FilePdfOutlined />}>导出PDF</Button>
|
||||
<Button icon={<FileExcelOutlined />}>导出Excel</Button>
|
||||
</Space>
|
||||
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 20, gap: 20, flexWrap: 'wrap' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<span className="filter-label">报表周期:</span>
|
||||
<Select value={reportCycle} onChange={setReportCycle} style={{ width: 100 }} size="small">
|
||||
<Option value="day">日报</Option>
|
||||
<Option value="week">周报</Option>
|
||||
<Option value="month">月报</Option>
|
||||
</Select>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<span className="filter-label">报表类型:</span>
|
||||
<Select value={reportType} onChange={setReportType} style={{ width: 120 }} size="small">
|
||||
<Option value="all">全部</Option>
|
||||
<Option value="power">发电报表</Option>
|
||||
<Option value="operation">运维报表</Option>
|
||||
<Option value="alarm">告警报表</Option>
|
||||
<Option value="ai">AI分析报告</Option>
|
||||
</Select>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<span className="filter-label">时间范围:</span>
|
||||
<RangePicker
|
||||
value={dateRange}
|
||||
onChange={setDateRange}
|
||||
style={{ width: 260 }}
|
||||
size="small"
|
||||
/>
|
||||
</div>
|
||||
<div style={{ marginLeft: 'auto' }}>
|
||||
<Space size={12}>
|
||||
<Button type="primary" icon={<FileTextOutlined />} size="small" style={{ borderRadius: 6, height: 32, padding: '0 16px' }}>生成报表</Button>
|
||||
<Button icon={<FilePdfOutlined />} size="small" style={{ borderRadius: 6, height: 32, color: '#F53F3F', borderColor: '#F53F3F' }}>导出PDF</Button>
|
||||
<Button icon={<FileExcelOutlined />} size="small" style={{ borderRadius: 6, height: 32, color: '#00B42A', borderColor: '#00B42A' }}>导出Excel</Button>
|
||||
</Space>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Row gutter={16}>
|
||||
<Row gutter={[12, 12]}>
|
||||
{/* 左侧主内容区 */}
|
||||
<Col span={16}>
|
||||
<Col xs={24} xl={16}>
|
||||
{/* 月度综合经营分析 */}
|
||||
<Card bordered={false} style={{ borderRadius: 8, marginBottom: 16 }} title="月度综合经营分析">
|
||||
<Line
|
||||
data={monthlyPowerData}
|
||||
xField="date"
|
||||
yField={['generation', 'predicted', 'pr']}
|
||||
seriesField="type"
|
||||
color={['#52c41a', '#1890ff', '#fa8c16']}
|
||||
lineStyle={(datum) => {
|
||||
if (datum.type === 'pr') return { lineDash: [4, 4] };
|
||||
return {};
|
||||
}}
|
||||
tooltip={{
|
||||
formatter: (datum) => {
|
||||
return {
|
||||
name: datum.date,
|
||||
data: [
|
||||
{ name: '发电量(MWh)', value: datum.generation },
|
||||
{ name: '预测发电(MWh)', value: datum.predicted },
|
||||
{ name: 'PR(%)', value: datum.pr }
|
||||
<Card bordered={false} style={cardStyle} bodyStyle={{ padding: '20px' }} title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>月度综合经营分析</span>}>
|
||||
<Row gutter={24}>
|
||||
<Col span={17}>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 16, display: 'flex', justifyContent: 'flex-start', gap: 20 }}>
|
||||
<Space size={4}><div style={{ width: 10, height: 3, background: '#00B42A' }}></div>发电量 (MWh)</Space>
|
||||
<Space size={4}><div style={{ width: 10, height: 1, borderTop: '1.5px dashed #165DFF' }}></div>预测发电 (MWh)</Space>
|
||||
<Space size={4}><div style={{ width: 10, height: 1, borderTop: '1.5px solid #FF7D00' }}></div>PR (%)</Space>
|
||||
</div>
|
||||
<Line
|
||||
data={monthlyPowerData}
|
||||
xField="date"
|
||||
yField={['generation', 'predicted', 'pr']}
|
||||
seriesField="type"
|
||||
color={['#52c41a', '#1890ff', '#fa8c16']}
|
||||
lineStyle={(datum) => {
|
||||
if (datum.type === 'pr') return { lineDash: [4, 4] };
|
||||
return {};
|
||||
}}
|
||||
tooltip={{
|
||||
formatter: (datum) => {
|
||||
return {
|
||||
name: datum.date,
|
||||
data: [
|
||||
{ name: '发电量(MWh)', value: datum.generation },
|
||||
{ name: '预测发电(MWh)', value: datum.predicted },
|
||||
{ name: 'PR(%)', value: datum.pr }
|
||||
]
|
||||
};
|
||||
}
|
||||
}}
|
||||
legend={{
|
||||
items: [
|
||||
{ name: '发电量(MWh)', marker: { symbol: 'line', style: { stroke: '#52c41a' } } },
|
||||
{ name: '预测发电(MWh)', marker: { symbol: 'line', style: { stroke: '#1890ff', lineDash: [4, 4] } } },
|
||||
{ name: 'PR(%)', marker: { symbol: 'line', style: { stroke: '#fa8c16' } } },
|
||||
]
|
||||
};
|
||||
}
|
||||
}}
|
||||
legend={{
|
||||
items: [
|
||||
{ name: '发电量(MWh)', marker: { symbol: 'line', style: { stroke: '#52c41a' } } },
|
||||
{ name: '预测发电(MWh)', marker: { symbol: 'line', style: { stroke: '#1890ff', lineDash: [4, 4] } } },
|
||||
{ name: 'PR(%)', marker: { symbol: 'line', style: { stroke: '#fa8c16' } } },
|
||||
]
|
||||
}}
|
||||
yAxis={[
|
||||
{
|
||||
label: { formatter: (v) => `${v}` },
|
||||
name: '发电量',
|
||||
},
|
||||
{
|
||||
label: { formatter: (v) => `${v}%` },
|
||||
name: 'PR',
|
||||
position: 'right',
|
||||
}
|
||||
]}
|
||||
height={200}
|
||||
/>
|
||||
<Row gutter={16} style={{ marginTop: 16 }}>
|
||||
<Col span={6}>
|
||||
<Statistic title="本月累计发电量" value={138.6} suffix="MWh" />
|
||||
}}
|
||||
yAxis={[
|
||||
{
|
||||
label: { formatter: (v) => `${v}` },
|
||||
name: '发电量',
|
||||
},
|
||||
{
|
||||
label: { formatter: (v) => `${v}%` },
|
||||
name: 'PR',
|
||||
position: 'right',
|
||||
}
|
||||
]}
|
||||
height={200}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Statistic title="理论发电量" value={166.8} suffix="MWh" />
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Statistic title="PR均值" value={82.8} suffix="%" />
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Statistic title="发电偏差" value={-3.4} suffix="%" valueStyle={{ color: '#ff4d4f' }} />
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Statistic title="平均辐照度" value={5.3} suffix="kWh/㎡/天" />
|
||||
<Col span={7}>
|
||||
<div style={{ background: '#f8fafc', padding: '16px', borderRadius: 12, height: '100%' }}>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
|
||||
{[
|
||||
{ label: '本月累计发电量', value: '138.6', unit: 'MWh' },
|
||||
{ label: '理论发电量', value: '166.8', unit: 'MWh' },
|
||||
{ label: 'PR均值', value: '82.8', unit: '%' },
|
||||
{ label: '发电偏差', value: '-3.4', unit: '%', color: '#F53F3F' },
|
||||
{ label: '平均辐照度', value: '5.3', unit: 'kWh/㎡/天' },
|
||||
].map((item, idx) => (
|
||||
<div key={idx} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<span style={{ fontSize: 12, color: '#4E5969' }}>{item.label}</span>
|
||||
<span style={{ fontSize: 14, fontWeight: 700, color: item.color || '#1D2129' }}>{item.value} <span style={{ fontSize: 10, fontWeight: 400, color: '#86909C' }}>{item.unit}</span></span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
{/* 发电与气象 + 工单与告警 */}
|
||||
<Row gutter={16} style={{ marginBottom: 16 }}>
|
||||
<Col span={12}>
|
||||
<Card bordered={false} style={{ borderRadius: 8 }} title="发电与气象统计">
|
||||
{/* 第二排:三个图表 */}
|
||||
<Row gutter={[12, 12]} style={{ marginTop: 16 }}>
|
||||
<Col span={8}>
|
||||
<Card bordered={false} style={{ ...cardStyle, height: "100%" }} bodyStyle={{ padding: '16px', }} title={<span style={{ fontSize: 14, fontWeight: 700 }}>发电与气象统计</span>}>
|
||||
<div style={{ fontSize: 10, color: '#86909C', marginBottom: 12 }}>
|
||||
<Space size={8} wrap>
|
||||
<Badge color="#165DFF" text="发电量 (MWh)" style={{ fontSize: 10 }} />
|
||||
<Badge color="#00B42A" text="辐照度 (kWh/㎡)" style={{ fontSize: 10 }} />
|
||||
<Badge color="#FF7D00" text="温度 (℃)" style={{ fontSize: 10 }} />
|
||||
</Space>
|
||||
</div>
|
||||
<Bar
|
||||
data={powerMeteorologyData}
|
||||
xField="date"
|
||||
@@ -267,8 +360,15 @@ export default function ReportCenterPage() {
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Card bordered={false} style={{ borderRadius: 8 }} title="工单与告警闭环分析">
|
||||
<Col span={8}>
|
||||
<Card bordered={false} style={{ ...cardStyle, height: "100%" }} bodyStyle={{ padding: '16px', }} title={<span style={{ fontSize: 14, fontWeight: 700 }}>工单与告警闭环分析</span>}>
|
||||
<div style={{ fontSize: 10, color: '#86909C', marginBottom: 12 }}>
|
||||
<Space size={8} wrap>
|
||||
<Badge color="#165DFF" text="新增工单" style={{ fontSize: 10 }} />
|
||||
<Badge color="#00B42A" text="完成工单" style={{ fontSize: 10 }} />
|
||||
<Badge color="#722ED1" text="闭环率 (%)" style={{ fontSize: 10 }} />
|
||||
</Space>
|
||||
</div>
|
||||
<Bar
|
||||
data={orderAlarmData}
|
||||
xField="date"
|
||||
@@ -279,118 +379,111 @@ export default function ReportCenterPage() {
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Card bordered={false} style={{ ...cardStyle, height: "100%" }} bodyStyle={{ padding: '16px', }} title={<span style={{ fontSize: 14, fontWeight: 700 }}>AI 分析成果统计</span>}>
|
||||
<Row gutter={12} align="middle">
|
||||
<Col span={11}>
|
||||
<div style={{ position: 'relative', height: 160 }}>
|
||||
<Pie
|
||||
data={aiAnalysisData}
|
||||
angleField="value"
|
||||
colorField="type"
|
||||
color={aiAnalysisData.map(d => d.color)}
|
||||
radius={1}
|
||||
innerRadius={0.7}
|
||||
legend={false}
|
||||
height={160}
|
||||
autoFit
|
||||
/>
|
||||
<div style={{ position: 'absolute', top: '50%', left: '50%', transform: 'translate(-50%, -50%)', textAlign: 'center' }}>
|
||||
<div style={{ fontSize: 10, color: '#86909C' }}>本月AI事件</div>
|
||||
<div style={{ fontSize: 10, color: '#86909C' }}>总计</div>
|
||||
<div style={{ fontSize: 20, fontWeight: 800, color: '#1D2129' }}>58</div>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={13}>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
|
||||
{aiAnalysisData.map((item, idx) => (
|
||||
<div key={idx} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<Space size={6} style={{ fontSize: 11, color: '#4E5969' }}>
|
||||
<div style={{ width: 6, height: 6, borderRadius: '50%', background: item.color }}></div>
|
||||
{item.type}
|
||||
</Space>
|
||||
<span style={{ fontSize: 12, fontWeight: 700 }}>{item.value} <Text type="secondary" style={{ fontSize: 10, fontWeight: 400 }}>个</Text></span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
{/* AI分析成果统计 */}
|
||||
<Card bordered={false} style={{ borderRadius: 8 }} title="AI分析成果统计">
|
||||
<Row gutter={16}>
|
||||
<Col span={8}>
|
||||
<Pie
|
||||
data={aiAnalysisData}
|
||||
angleField="value"
|
||||
colorField="type"
|
||||
color={['#1890ff', '#52c41a', '#fa8c16', '#722ed1']}
|
||||
radius={0.7}
|
||||
innerRadius={0.6}
|
||||
height={180}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={16}>
|
||||
<Row gutter={16}>
|
||||
{aiAnalysisData.map((item, idx) => (
|
||||
<Col span={12} key={idx}>
|
||||
<Statistic title={item.type} value={item.value} suffix="个" />
|
||||
</Col>
|
||||
{/* 订阅与分发 */}
|
||||
<Card bordered={false} style={{ ...cardStyle, marginTop: 16 }} bodyStyle={{ padding: '20px' }} title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>订阅与分发</span>}>
|
||||
<Row gutter={[16, 16]} wrap>
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 12 }}>订阅人员 (6)</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8, flexWrap: 'wrap' }}>
|
||||
{[
|
||||
{ name: '张运维', role: '运维主管', img: 'https://img.icons8.com/fluency/48/user-male-circle.png' },
|
||||
{ name: '李工程师', role: '电站工程师', img: 'https://img.icons8.com/fluency/48/user-male-circle.png' },
|
||||
{ name: '王运维', role: '设备运维', img: 'https://img.icons8.com/fluency/48/user-male-circle.png' },
|
||||
{ name: '陈经理', role: '运维经理', img: 'https://img.icons8.com/fluency/48/user-male-circle.png' },
|
||||
].map((p, idx) => (
|
||||
<Tooltip title={`${p.name} - ${p.role}`} key={idx}>
|
||||
<Avatar src={p.img} size={32} style={{ border: '2px solid #fff' }} />
|
||||
</Tooltip>
|
||||
))}
|
||||
</Row>
|
||||
<Avatar size={32} style={{ background: '#F2F3F5', color: '#165DFF', fontSize: 12, fontWeight: 700, border: '2px solid #fff' }}>+2</Avatar>
|
||||
</div>
|
||||
</Col>
|
||||
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 12 }}>分发渠道 (可多选)</div>
|
||||
<Space size={12} wrap>
|
||||
<Button size="small" icon={<MailOutlined />} style={{ borderRadius: 6, background: '#E8F3FF', border: 'none', color: '#165DFF' }}>邮件 <CheckCircleFilled style={{ fontSize: 10, marginLeft: 4 }} /></Button>
|
||||
<Button size="small" style={{ borderRadius: 6, background: '#E8F3FF', border: 'none', color: '#165DFF' }}>Telegram <CheckCircleFilled style={{ fontSize: 10, marginLeft: 4 }} /></Button>
|
||||
<Button size="small" icon={<BellOutlined />} style={{ borderRadius: 6, background: '#E8F3FF', border: 'none', color: '#165DFF' }}>系统通知 <CheckCircleFilled style={{ fontSize: 10, marginLeft: 4 }} /></Button>
|
||||
</Space>
|
||||
</Col>
|
||||
|
||||
<Col xs={24} sm={24} md={8}>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 12 }}>发送计划</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', background: '#f8fafc', padding: '8px 12px', borderRadius: 8, gap: 8 }}>
|
||||
<Space size={8} wrap>
|
||||
<CalendarOutlined style={{ color: '#165DFF' }} />
|
||||
<span style={{ fontSize: 13, fontWeight: 700 }}>每周一 09:00 自动发送</span>
|
||||
</Space>
|
||||
<Button type="link" size="small" icon={<EditOutlined />} style={{ fontSize: 12, whiteSpace: 'nowrap' }}>编辑</Button>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
{/* 右侧边栏 */}
|
||||
<Col span={8}>
|
||||
<Col xs={24} xl={8}>
|
||||
{/* 报表目录 / 快捷下载 */}
|
||||
<Card bordered={false} style={{ borderRadius: 8, marginBottom: 16 }} title={
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span>报表目录 / 快捷下载</span>
|
||||
<Button type="link">更多 </Button>
|
||||
</div>
|
||||
}>
|
||||
<Card bordered={false} style={cardStyle} bodyStyle={{ padding: 0 }} title={<span style={{ fontSize: 15, fontWeight: 700 }}>报表目录 / 快捷下载</span>} extra={<Button type="link" size="small">更多 <ChevronRight size={14} /></Button>}>
|
||||
<Table
|
||||
rowKey="name"
|
||||
columns={[
|
||||
{ title: '报表名称', dataIndex: 'name' },
|
||||
{
|
||||
title: '状态', dataIndex: 'status', render: (v) => (
|
||||
<Tag color={v === '已生成' ? 'green' : v === '生成中' ? 'orange' : 'default'}>{v}</Tag>
|
||||
)
|
||||
title: '报表名称', dataIndex: 'name',
|
||||
render: (text) => <Space size={8}><FilePdfOutlined style={{ color: '#F53F3F' }} />{text}</Space>
|
||||
},
|
||||
{
|
||||
title: '操作', render: () => (
|
||||
<Space>
|
||||
<Button type="link" size="small">查看</Button>
|
||||
<Button type="link" size="small">下载</Button>
|
||||
</Space>
|
||||
)
|
||||
}
|
||||
]}
|
||||
dataSource={reportFileList.slice(0, 4)}
|
||||
pagination={false}
|
||||
size="small"
|
||||
/>
|
||||
</Card>
|
||||
|
||||
{/* 模板中心 */}
|
||||
<Card bordered={false} style={{ borderRadius: 8, marginBottom: 16 }} title={
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span>模板中心</span>
|
||||
<Button type="link">更多 </Button>
|
||||
</div>
|
||||
}>
|
||||
<Row gutter={16}>
|
||||
{reportTemplates.map((tpl, idx) => (
|
||||
<Col span={12} key={idx}>
|
||||
<Card bordered={false} size="small" style={{ background: '#fafafa', borderRadius: 8 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
|
||||
<div style={{ width: 32, height: 32, borderRadius: 4, background: `${tpl.color}15`, color: tpl.color, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
{tpl.icon}
|
||||
</div>
|
||||
<div>
|
||||
<div style={{ fontSize: 13, fontWeight: 500 }}>{tpl.name}</div>
|
||||
<div style={{ fontSize: 11, color: '#666' }}>{tpl.desc}</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
{/* 报表生成记录 */}
|
||||
<Card bordered={false} style={{ borderRadius: 8, marginBottom: 16 }} title={
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span>报表生成记录</span>
|
||||
<Button type="link">更多 </Button>
|
||||
</div>
|
||||
}>
|
||||
<Table
|
||||
rowKey="name"
|
||||
columns={[
|
||||
{ title: '报表名称', dataIndex: 'name' },
|
||||
{ title: '生成时间', dataIndex: 'time' },
|
||||
{ title: '生成人', dataIndex: 'operator' },
|
||||
{ title: '类型', dataIndex: 'type' },
|
||||
{
|
||||
title: '状态', dataIndex: 'status', render: (v) => (
|
||||
<Tag color={v === '已生成' ? 'green' : v === '生成中' ? 'orange' : 'default'}>{v}</Tag>
|
||||
)
|
||||
title: '状态', dataIndex: 'status', width: 80,
|
||||
render: (v) => <Tag color={v === '已生成' ? 'success' : 'warning'} style={{ borderRadius: 4, fontSize: 10, margin: 0 }}>{v}</Tag>
|
||||
},
|
||||
{
|
||||
title: '操作', render: () => (
|
||||
<Space>
|
||||
<Button type="link" size="small">查看</Button>
|
||||
<Button type="link" size="small">下载</Button>
|
||||
title: '操作', width: 120,
|
||||
render: () => (
|
||||
<Space split={<Divider type="vertical" />}>
|
||||
<Button type="link" size="small" style={{ fontSize: 12, padding: 0 }}>查看</Button>
|
||||
<Button type="link" size="small" style={{ fontSize: 12, padding: 0 }}>下载</Button>
|
||||
</Space>
|
||||
)
|
||||
}
|
||||
@@ -398,52 +491,58 @@ export default function ReportCenterPage() {
|
||||
dataSource={reportFileList}
|
||||
pagination={false}
|
||||
size="small"
|
||||
className="compact-table"
|
||||
/>
|
||||
</Card>
|
||||
|
||||
{/* 订阅与分发 */}
|
||||
<Card bordered={false} style={{ borderRadius: 8 }} title="订阅与分发">
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<Text strong>订阅人员</Text>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginTop: 8 }}>
|
||||
{['张运维', '李工程师', '王运维', '陈经理'].map((name, idx) => (
|
||||
<div key={idx} style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
|
||||
<div style={{ width: 32, height: 32, borderRadius: '50%', background: '#e6f7ff', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
{name.charAt(0)}
|
||||
{/* 模板中心 */}
|
||||
<Card bordered={false} style={{ ...cardStyle, marginTop: 16 }} bodyStyle={{ padding: '16px' }} title={<span style={{ fontSize: 15, fontWeight: 700 }}>模板中心</span>} extra={<Button type="link" size="small">更多 <ChevronRight size={14} /></Button>}>
|
||||
<Row gutter={[12, 12]}>
|
||||
{reportTemplates.map((tpl, idx) => (
|
||||
<Col span={12} key={idx}>
|
||||
<div style={{ background: '#f8fafc', padding: '12px', borderRadius: 10, height: '100%', border: '1px solid #f0f0f0' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 10, marginBottom: 8 }}>
|
||||
<div style={{ width: 32, height: 32, borderRadius: 8, background: tpl.bg, color: tpl.color, display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 16 }}>
|
||||
{tpl.icon}
|
||||
</div>
|
||||
<div style={{ fontSize: 13, fontWeight: 700, color: '#1D2129' }}>{tpl.name}</div>
|
||||
</div>
|
||||
<Text style={{ fontSize: 12 }}>{name}</Text>
|
||||
<div style={{ fontSize: 11, color: '#86909C', lineHeight: 1.4 }}>{tpl.desc}</div>
|
||||
</div>
|
||||
))}
|
||||
<Text type="secondary">+2</Text>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
<Divider style={{ margin: '12px 0' }} />
|
||||
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<Text strong>分发渠道(可多选)</Text>
|
||||
<div style={{ display: 'flex', gap: 16, marginTop: 8 }}>
|
||||
<Checkbox checked>
|
||||
<MailOutlined style={{ marginRight: 4 }} /> 邮件
|
||||
</Checkbox>
|
||||
<Checkbox checked>
|
||||
<SendOutlined style={{ marginRight: 4 }} /> Telegram
|
||||
</Checkbox>
|
||||
<Checkbox checked>
|
||||
<BellOutlined style={{ marginRight: 4 }} /> 系统通知
|
||||
</Checkbox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Divider style={{ margin: '12px 0' }} />
|
||||
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<Text strong>发送计划</Text>
|
||||
<Button type="link" icon={<SettingOutlined />}>编辑</Button>
|
||||
</div>
|
||||
<Card size="small" style={{ marginTop: 8, background: '#f6ffed', borderColor: '#b7eb8f' }}>
|
||||
<Text>每周一 09:00 自动发送</Text>
|
||||
</Card>
|
||||
{/* 报表生成记录 */}
|
||||
<Card bordered={false} style={{ ...cardStyle, marginTop: 16 }} bodyStyle={{ padding: 0 }} title={<span style={{ fontSize: 15, fontWeight: 700 }}>报表生成记录</span>} extra={<Button type="link" size="small">更多 <ChevronRight size={14} /></Button>}>
|
||||
<Table
|
||||
rowKey="name"
|
||||
columns={[
|
||||
{ title: '报表名称', dataIndex: 'name', width: 100, ellipsis: true },
|
||||
{ title: '生成时间', dataIndex: 'time', width: 130 },
|
||||
{ title: '生成人', dataIndex: 'operator', width: 80 },
|
||||
{ title: '类型', dataIndex: 'type', width: 80 },
|
||||
{
|
||||
title: '状态', dataIndex: 'status', width: 70,
|
||||
render: (v) => <Tag color={v === '已生成' ? 'success' : 'warning'} style={{ borderRadius: 4, fontSize: 10, margin: 0 }}>{v}</Tag>
|
||||
},
|
||||
{
|
||||
title: '操作', width: 90,
|
||||
render: () => (
|
||||
<Space size={8}>
|
||||
<Button type="text" icon={<EyeOutlined />} size="small" />
|
||||
<Button type="text" icon={<DownloadOutlined />} size="small" />
|
||||
</Space>
|
||||
)
|
||||
}
|
||||
]}
|
||||
dataSource={generationRecord}
|
||||
pagination={false}
|
||||
size="small"
|
||||
className="compact-table"
|
||||
scroll={{ y: 240 }}
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@@ -1,60 +1,100 @@
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
Card, Row, Col, Button, Space, Input, Select, Table, Tag, Typography, Dropdown, Menu,
|
||||
Timeline
|
||||
Timeline, Badge, Divider, Tooltip
|
||||
} from 'antd';
|
||||
import {
|
||||
VideoCameraOutlined, BellOutlined, BorderOutlined, DatabaseOutlined,
|
||||
PauseOutlined, SoundOutlined, CameraOutlined, FullscreenOutlined,
|
||||
DownOutlined, AlertOutlined, UserOutlined, FireOutlined, ClockCircleOutlined,
|
||||
ScanOutlined, PlayCircleOutlined, DownloadOutlined
|
||||
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 } = Typography;
|
||||
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', 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' },
|
||||
{ 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' },
|
||||
{ title: '位置', dataIndex: 'position', key: 'position' },
|
||||
{ title: '摄像头名称', dataIndex: 'name', key: 'name', width: 200 },
|
||||
{ title: '位置', dataIndex: 'position', key: 'position', width: 120 },
|
||||
{
|
||||
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 />} />
|
||||
title: '状态', dataIndex: 'status', key: 'status', width: 100,
|
||||
render: (text: string) => (
|
||||
<Space size={4}>
|
||||
<div style={{ width: 6, height: 6, borderRadius: '50%', background: text === '在线' ? '#00B42A' : '#F53F3F' }}></div>
|
||||
<span style={{ color: text === '在线' ? '#00B42A' : '#F53F3F' }}>{text}</span>
|
||||
</Space>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '录像状态', dataIndex: 'recStatus', key: 'recStatus', width: 100,
|
||||
render: (text: string) => (
|
||||
<Space size={4}>
|
||||
<div style={{ width: 6, height: 6, borderRadius: '50%', background: text === '录制中' ? '#00B42A' : '#86909C' }}></div>
|
||||
<span style={{ color: text === '录制中' ? '#00B42A' : '#86909C' }}>{text}</span>
|
||||
</Space>
|
||||
)
|
||||
},
|
||||
{ title: '最后事件时间', dataIndex: 'time', key: 'time', width: 180 },
|
||||
{
|
||||
title: '操作', key: 'action', width: 60,
|
||||
render: () => (
|
||||
<Button type="text" icon={<PlayCircleOutlined />} size="small" />
|
||||
)
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="p-6 bg-[#f5f7fa] min-h-screen">
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<Typography.Title level={4} style={{ margin: 0 }}>视频监控</Typography.Title>
|
||||
<p style={{ color: '#666', margin: '4px 0 0' }}>实时视频监控、云台控制、录像回放与智能告警一体化管理</p>
|
||||
</div>
|
||||
{/* ========== 顶部统计卡片:统一高度 ========== */}
|
||||
{/* 视频监控统计卡片 —— 宽高统一 + 最小宽度168px + 自动换行 */}
|
||||
<div style={{ background: '#f5f7fa', minHeight: '100vh', padding: '16px 24px', boxSizing: 'border-box' }}>
|
||||
<style>
|
||||
{`
|
||||
.compact-table .ant-table-thead > tr > th {
|
||||
background: #f8fafc;
|
||||
padding: 8px 12px !important;
|
||||
font-size: 12px;
|
||||
color: #4E5969;
|
||||
}
|
||||
.compact-table .ant-table-tbody > tr > td {
|
||||
padding: 8px 12px !important;
|
||||
font-size: 12px;
|
||||
}
|
||||
.video-item:hover .video-mask {
|
||||
opacity: 1;
|
||||
}
|
||||
.video-mask {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s;
|
||||
background: rgba(0,0,0,0.4);
|
||||
}
|
||||
.timeline-item-custom .ant-timeline-item-content {
|
||||
margin-left: 50px !important;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
|
||||
{/* 顶部统计卡片 */}
|
||||
<Row
|
||||
gutter={[16, 16]}
|
||||
style={{
|
||||
@@ -149,208 +189,201 @@ export default function VideoMonitorPage() {
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
|
||||
{/* ========== 视频区域 + 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 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-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">
|
||||
<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>
|
||||
{/* 中间视频监控中心 */}
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
|
||||
<Col xs={24} xl={18}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 16, fontWeight: 800, color: '#1D2129' }}>视频监控中心</span>}
|
||||
extra={
|
||||
<Space size={16}>
|
||||
<Button type="link" size="small" icon={<ExpandOutlined />}>自定义布局</Button>
|
||||
<Button type="link" size="small" icon={<FullscreenOutlined />}>全屏</Button>
|
||||
</Space>
|
||||
}
|
||||
bordered={false}
|
||||
style={cardStyle}
|
||||
bodyStyle={{ padding: 16 }}
|
||||
>
|
||||
<Row gutter={[12, 12]}>
|
||||
<Col span={14}>
|
||||
<div style={{ position: 'relative', background: '#000', borderRadius: 8, overflow: 'hidden', height: 420 }}>
|
||||
<img src="https://images.unsplash.com/photo-1509391366360-2e959784a276?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80" style={{ width: '100%', height: '100%', objectFit: 'cover' }} />
|
||||
<div style={{ position: 'absolute', top: 0, left: 0, width: '100%', padding: '10px 16px', background: 'linear-gradient(to bottom, rgba(0,0,0,0.6), transparent)', color: '#fff', display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span style={{ fontSize: 13, fontWeight: 700 }}>主画面:1#阵列区球机</span>
|
||||
<span style={{ fontSize: 11, opacity: 0.8 }}>2025-05-20 10:24:15</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ position: 'absolute', bottom: 0, left: 0, width: '100%', padding: '12px 16px', background: 'linear-gradient(to top, rgba(0,0,0,0.6), transparent)', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<Space size={20}>
|
||||
<PauseOutlined style={{ color: '#fff', fontSize: 18, cursor: 'pointer' }} />
|
||||
<SoundOutlined style={{ color: '#fff', fontSize: 18, cursor: 'pointer' }} />
|
||||
<VideoCameraAddOutlined style={{ color: '#fff', fontSize: 18, cursor: 'pointer' }} />
|
||||
<ScissorOutlined style={{ color: '#fff', fontSize: 18, cursor: 'pointer' }} />
|
||||
<CameraOutlined style={{ color: '#fff', fontSize: 18, cursor: 'pointer' }} />
|
||||
<ExpandOutlined style={{ color: '#fff', fontSize: 18, cursor: 'pointer' }} />
|
||||
<Select defaultValue="高清" size="small" style={{ width: 80 }} bordered={false} className="video-select">
|
||||
<Option value="超清">超清</Option>
|
||||
<Option value="高清">高清</Option>
|
||||
<Option value="标清">标清</Option>
|
||||
</Select>
|
||||
</Space>
|
||||
<div style={{ color: '#fff', cursor: 'pointer' }}><MoreOutlined style={{ fontSize: 20 }} /></div>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={10}>
|
||||
<Row gutter={[8, 8]}>
|
||||
{[
|
||||
{ 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) => (
|
||||
<Col span={12} key={i}>
|
||||
<div className="video-item" style={{ position: 'relative', background: '#000', borderRadius: 6, overflow: 'hidden', height: 135 }}>
|
||||
<img src={v.img} style={{ width: '100%', height: '100%', objectFit: 'cover' }} />
|
||||
<div style={{ position: 'absolute', top: 0, left: 0, width: '100%', padding: '4px 8px', background: 'rgba(0,0,0,0.4)', color: '#fff', fontSize: 10 }}>{v.title}</div>
|
||||
<div style={{ position: 'absolute', bottom: 4, right: 8, display: 'flex', alignItems: 'center', gap: 4 }}>
|
||||
<div style={{ width: 6, height: 6, borderRadius: '50%', background: '#00B42A' }}></div>
|
||||
<span style={{ color: '#fff', fontSize: 9 }}>直播中</span>
|
||||
</div>
|
||||
<div className="video-mask" style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
<PlayCircleOutlined style={{ color: '#fff', fontSize: 32, cursor: 'pointer' }} />
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
<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">
|
||||
<AlertOutlined />
|
||||
<Col xs={24} xl={6}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 16, fontWeight: 800, color: '#1D2129' }}>AI 视频智能分析</span>}
|
||||
extra={<Button type="link" size="small">设置 <ChevronRight size={14} /></Button>}
|
||||
bordered={false}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
||||
{[
|
||||
{ icon: <img src="https://img.icons8.com/fluency/48/alarm.png" style={{ width: 24 }} />, bg: '#FFF1F0', title: '周界入侵检测', desc: '识别翻越、攀爬、破坏围栏等行为', count: 2, color: '#F53F3F' },
|
||||
{ icon: <img src="https://img.icons8.com/fluency/48/user-male-circle.png" style={{ width: 24 }} />, bg: '#E8F3FF', title: '人员闯入', desc: '识别未经授权人员进入区域', count: 1, color: '#165DFF' },
|
||||
{ icon: <svg t="1778729206689" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4980" width="24" height="24"><path d="M336.349867 969.728c42.564267 14.199467 56.746667-24.814933 39.0144-38.997333-56.746667-39.0144-85.128533-109.943467-63.829334-173.7728 21.265067-70.929067 78.011733-99.310933 78.011734-205.704534 0 0 70.929067 53.1968 56.746666 134.775467 70.929067-81.578667 39.0144-187.972267 24.814934-237.6192 180.872533 95.744 336.930133 304.9984 156.0576 482.321067-21.282133 17.749333 0 49.664 31.914666 39.0144 492.970667-280.1664 120.576-698.658133 56.746667-748.305067 21.282133 49.646933 24.832 127.658667-17.732267 166.673067C623.616 107.946667 442.743467 51.2 442.743467 51.2c21.282133 145.408-81.578667 301.448533-177.322667 422.0416-3.549867-60.296533-7.099733-99.310933-35.464533-152.507733-7.099733 102.843733-88.661333 187.972267-109.943467 294.365866C91.648 756.957867 141.312 859.8016 336.349867 969.728z" fill="#f33b24" p-id="4981"></path></svg>, bg: '#FFF7E8', title: '烟火识别', desc: '识别烟雾、明火等异常情况', count: 0, color: '#86909C' },
|
||||
{ icon: <svg t="1778729276274" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6131" width="24" height="24"><path d="M0 0m0 0l1024 0q0 0 0 0l0 1024q0 0 0 0l-1024 0q0 0 0 0l0-1024q0 0 0 0Z" fill="#E8EFF8" p-id="6132"></path><path d="M139.636364 558.545455a23.272727 23.272727 0 0 1 23.272727-23.272728h698.181818a23.272727 23.272727 0 0 1 23.272727 23.272728v116.363636a23.272727 23.272727 0 0 1-23.272727 23.272727H162.909091a23.272727 23.272727 0 0 1-23.272727-23.272727v-116.363636z" fill="#247ADE" p-id="6133"></path><path d="M372.363636 616.727273a58.181818 58.181818 0 1 1-116.363636 0 58.181818 58.181818 0 0 1 116.363636 0zM558.545455 616.727273a58.181818 58.181818 0 1 1-116.363637 0 58.181818 58.181818 0 0 1 116.363637 0zM744.727273 616.727273a58.181818 58.181818 0 1 1-116.363637 0 58.181818 58.181818 0 0 1 116.363637 0zM139.636364 325.818182a23.272727 23.272727 0 0 1 23.272727-23.272727h698.181818a23.272727 23.272727 0 0 1 23.272727 23.272727v116.363636a23.272727 23.272727 0 0 1-23.272727 23.272727H162.909091a23.272727 23.272727 0 0 1-23.272727-23.272727v-116.363636z" fill="#9DBCF3" p-id="6134"></path><path d="M372.363636 384a58.181818 58.181818 0 1 1-116.363636 0 58.181818 58.181818 0 0 1 116.363636 0zM558.545455 384a58.181818 58.181818 0 1 1-116.363637 0 58.181818 58.181818 0 0 1 116.363637 0zM744.727273 384a58.181818 58.181818 0 1 1-116.363637 0 58.181818 58.181818 0 0 1 116.363637 0z" fill="#2479DC" p-id="6135"></path></svg>, bg: '#FFF7E8', title: '设备区域滞留', desc: '识别人员在设备区滞留行为', count: 1, color: '#F7BA1E' },
|
||||
{ icon: <img src="https://img.icons8.com/fluency/48/motion-detector.png" style={{ width: 24 }} />, bg: '#E8FFEA', title: '运动检测', desc: '识别画面异常运动目标', count: 2, color: '#00B42A' },
|
||||
].map((item, idx) => (
|
||||
<div key={idx} style={{ display: 'flex', alignItems: 'center', gap: 16 }}>
|
||||
<div style={{ width: 44, height: 44, background: item.bg, borderRadius: 10, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 }}>
|
||||
{item.icon}
|
||||
</div>
|
||||
<div style={{ flex: 1 }}>
|
||||
<div style={{ fontSize: 13, fontWeight: 700, color: '#1D2129' }}>{item.title}</div>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginTop: 2 }}>{item.desc}</div>
|
||||
</div>
|
||||
<div style={{ fontSize: 18, fontWeight: 800, color: item.count > 0 ? '#F53F3F' : '#86909C' }}>{item.count}</div>
|
||||
</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>
|
||||
|
||||
{/* ========== 底部三张卡片:高度完全统一 ========== */}
|
||||
<Row gutter={[16, 16]}>
|
||||
<Col xs={24} lg={10}>
|
||||
<Card className="h-[500px]"
|
||||
title="摄像头设备列表"
|
||||
{/* 底部三栏 */}
|
||||
<Row gutter={[12, 12]}>
|
||||
<Col xs={24} xl={10}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 800, color: '#1D2129' }}>摄像头设备列表</span>}
|
||||
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>
|
||||
<Input placeholder="搜索摄像头名称/位置" prefix={<SearchOutlined />} style={{ width: 200 }} size="small" />
|
||||
<Select defaultValue="全部状态" size="small" style={{ width: 120 }}>
|
||||
<Option value="全部状态">全部状态</Option>
|
||||
<Option value="在线">在线</Option>
|
||||
<Option value="离线">离线</Option>
|
||||
</Select>
|
||||
</Space>
|
||||
}
|
||||
bordered={false}
|
||||
style={cardStyle}
|
||||
bodyStyle={{ padding: 0 }}
|
||||
>
|
||||
<Table
|
||||
columns={camColumns}
|
||||
dataSource={camList}
|
||||
pagination={false}
|
||||
size="small"
|
||||
scroll={{ y: 380 }}
|
||||
className="compact-table"
|
||||
scroll={{ y: 350 }}
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
<Col xs={24} lg={7}>
|
||||
<Card className="h-[500px]"
|
||||
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>
|
||||
}
|
||||
<Col xs={24} xl={7}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 800, color: '#1D2129' }}>事件时间线</span>}
|
||||
extra={<Select defaultValue="全部类型" size="small" style={{ width: 100 }}><Option value="全部类型">全部类型</Option></Select>}
|
||||
bordered={false}
|
||||
style={cardStyle}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
>
|
||||
<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 style={{ marginTop: 8 }}>
|
||||
{[
|
||||
{ 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) => (
|
||||
<Timeline.Item key={idx} label={<span style={{ fontSize: 11, color: '#86909C' }}>{item.time}</span>} dot={<div style={{ width: 8, height: 8, borderRadius: '50%', background: item.color }}></div>}>
|
||||
<div style={{ marginLeft: 8 }}>
|
||||
<div style={{ fontSize: 13, fontWeight: 700, color: '#1D2129' }}>{item.title}</div>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginTop: 4 }}>{item.desc}</div>
|
||||
</div>
|
||||
</Timeline.Item>
|
||||
))}
|
||||
</Timeline>
|
||||
<div className="text-center mt-4">
|
||||
<Button type="link">查看更多</Button>
|
||||
<div style={{ textAlign: 'center', marginTop: 16 }}>
|
||||
<Button type="link" size="small">查看更多</Button>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
<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">
|
||||
<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>
|
||||
<Col xs={24} xl={7}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 800, color: '#1D2129' }}>最近告警快照</span>}
|
||||
extra={<Button type="link" size="small">查看更多 <ChevronRight size={14} /></Button>}
|
||||
bordered={false}
|
||||
style={cardStyle}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
>
|
||||
<div style={{ display: 'flex', flexWrap: "wrap", gap: 12, paddingBottom: 8 }} >
|
||||
{[
|
||||
{ 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) => (
|
||||
<div key={idx} style={{ minWidth: 140, flex: '0 0 140px' }}>
|
||||
<div style={{ position: 'relative', borderRadius: 8, overflow: 'hidden', height: 160 }}>
|
||||
<img src={item.img} style={{ width: '100%', height: '100%', objectFit: 'cover' }} />
|
||||
{/* 模拟检测框 */}
|
||||
<div style={{ position: 'absolute', top: '30%', left: '30%', width: '40%', height: '50%', border: `2px solid ${item.boxColor}`, borderRadius: 2 }}>
|
||||
<div style={{ position: 'absolute', top: -18, left: -2, background: item.boxColor, color: '#fff', fontSize: 9, padding: '0 4px', borderRadius: '2px 2px 0 0', whiteSpace: 'nowrap' }}>{item.type}</div>
|
||||
</div>
|
||||
<div style={{ position: 'absolute', bottom: 0, left: 0, width: '100%', background: 'rgba(0,0,0,0.5)', color: '#fff', padding: '4px 8px', fontSize: 10 }}>
|
||||
<div style={{ fontWeight: 700 }}>{item.time}</div>
|
||||
<div style={{ opacity: 0.8 }}>{item.title}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: 'flex', justifyContent: 'center', gap: 8, marginTop: 10 }}>
|
||||
<Tooltip title="播放"><Button type="text" icon={<PlayCircleOutlined />} size="small" /></Tooltip>
|
||||
<Tooltip title="下载"><Button type="text" icon={<DownloadOutlined />} size="small" /></Tooltip>
|
||||
<Tooltip title="详情"><Button type="text" icon={<Eye />} size="small" /></Tooltip>
|
||||
</div>
|
||||
<Space>
|
||||
<Button type="text" icon={<PlayCircleOutlined />} />
|
||||
<Button type="text" icon={<DownloadOutlined />} />
|
||||
</Space>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,8 @@ import {
|
||||
EyeOutlined, CommentOutlined, PauseOutlined, FormOutlined,
|
||||
ReloadOutlined, FilterOutlined, MoreOutlined,
|
||||
CheckCircleFilled, PlayCircleFilled, InfoCircleFilled,
|
||||
RobotOutlined, ThunderboltOutlined, AlertOutlined
|
||||
RobotOutlined, ThunderboltOutlined, AlertOutlined,
|
||||
CheckCircleOutlined
|
||||
} from '@ant-design/icons';
|
||||
import { Pie, Line } from '@ant-design/charts';
|
||||
import {
|
||||
@@ -82,55 +83,6 @@ const WorkOrderPage = () => {
|
||||
{ title: 'AI建议生成', value: 7, unit: '单', subValue: '', subText: '今日自动生成', icon: <Cpu size={24} color="#722ed1" />, bg: '#f9f0ff' },
|
||||
];
|
||||
|
||||
// 表格列【已适配后端真实字段】
|
||||
const columns = [
|
||||
{ title: '工单编号', dataIndex: 'orderNo', key: 'orderNo', width: 130 },
|
||||
{ title: '工单标题', dataIndex: 'orderTitle', key: 'orderTitle', width: 180, ellipsis: true },
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'orderType',
|
||||
key: 'orderType',
|
||||
width: 80,
|
||||
render: (val) => orderTypeConfig[val] || '未知'
|
||||
},
|
||||
{
|
||||
title: '优先级',
|
||||
dataIndex: 'priorityLevel',
|
||||
key: 'priorityLevel',
|
||||
width: 80,
|
||||
render: (p) => (
|
||||
<Tag
|
||||
style={{
|
||||
color: priorityConfig[p]?.color,
|
||||
background: priorityConfig[p]?.bg,
|
||||
border: `1px solid ${priorityConfig[p]?.border}`,
|
||||
borderRadius: 4
|
||||
}}
|
||||
>
|
||||
{priorityConfig[p]?.label}
|
||||
</Tag>
|
||||
)
|
||||
},
|
||||
{ title: '负责人', dataIndex: 'assigneeName', key: 'assigneeName', width: 80 },
|
||||
{ title: '截止时间', dataIndex: 'deadlineTime', key: 'deadlineTime', width: 150 },
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'orderStatus',
|
||||
key: 'orderStatus',
|
||||
width: 90,
|
||||
render: (s) => (
|
||||
<span style={{ color: orderStatusConfig[s]?.textColor }}>{orderStatusConfig[s]?.label}</span>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 60,
|
||||
fixed: "right",
|
||||
render: () => <Button type="link" size="small">查看</Button>
|
||||
},
|
||||
];
|
||||
|
||||
// 图表模拟数据保留不变
|
||||
const pieData = [
|
||||
{ type: '待处理', value: 12 },
|
||||
@@ -259,11 +211,101 @@ const WorkOrderPage = () => {
|
||||
getWorkOrderList();
|
||||
}, []);
|
||||
|
||||
const cardStyle = {
|
||||
borderRadius: 12,
|
||||
border: '1px solid #f0f0f0',
|
||||
boxShadow: '0 4px 12px rgba(0,0,0,0.05)',
|
||||
overflow: 'hidden'
|
||||
};
|
||||
|
||||
// 表格列【已适配后端真实字段】
|
||||
const columns = [
|
||||
{ title: '工单编号', dataIndex: 'orderNo', key: 'orderNo', width: 130 },
|
||||
{ title: '工单标题', dataIndex: 'orderTitle', key: 'orderTitle', width: 180, ellipsis: true },
|
||||
{ title: '来源', dataIndex: 'sourceType', key: 'sourceType', width: 100 },
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'orderType',
|
||||
key: 'orderType',
|
||||
width: 80,
|
||||
render: (val) => orderTypeConfig[val] || '未知'
|
||||
},
|
||||
{
|
||||
title: '优先级',
|
||||
dataIndex: 'priorityLevel',
|
||||
key: 'priorityLevel',
|
||||
width: 80,
|
||||
render: (p) => (
|
||||
<Tag
|
||||
style={{
|
||||
color: priorityConfig[p]?.color,
|
||||
background: priorityConfig[p]?.bg,
|
||||
border: `1px solid ${priorityConfig[p]?.color}`,
|
||||
borderRadius: 4,
|
||||
margin: 0
|
||||
}}
|
||||
>
|
||||
{priorityConfig[p]?.label}
|
||||
</Tag>
|
||||
)
|
||||
},
|
||||
{ title: '负责人', dataIndex: 'assigneeName', key: 'assigneeName', width: 80 },
|
||||
{ title: '截止时间', dataIndex: 'deadlineTime', key: 'deadlineTime', width: 150 },
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'orderStatus',
|
||||
key: 'orderStatus',
|
||||
width: 90,
|
||||
render: (s) => (
|
||||
<Space size={6}>
|
||||
<div style={{ width: 6, height: 6, borderRadius: '50%', background: orderStatusConfig[s]?.textColor }}></div>
|
||||
<span style={{ color: orderStatusConfig[s]?.textColor, fontWeight: 500 }}>{orderStatusConfig[s]?.label}</span>
|
||||
</Space>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 60,
|
||||
fixed: "right",
|
||||
render: () => <Button type="link" size="small">查看</Button>
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div style={{ padding: '16px 24px', background: '#f0f2f5', minHeight: '100vh' }}>
|
||||
<div style={{ padding: '16px 24px', background: '#f5f7fa', minHeight: '100vh', boxSizing: 'border-box' }}>
|
||||
<style>
|
||||
{`
|
||||
.compact-table .ant-table-thead > tr > th {
|
||||
background: #f8fafc;
|
||||
padding: 10px 12px !important;
|
||||
font-size: 12px;
|
||||
color: #4E5969;
|
||||
}
|
||||
.compact-table .ant-table-tbody > tr > td {
|
||||
padding: 10px 12px !important;
|
||||
font-size: 12px;
|
||||
}
|
||||
.filter-label {
|
||||
font-size: 12px;
|
||||
color: #4E5969;
|
||||
white-space: nowrap;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.schedule-item {
|
||||
transition: all 0.3s;
|
||||
cursor: pointer;
|
||||
}
|
||||
.schedule-item:hover {
|
||||
filter: brightness(0.95);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
|
||||
{/* 顶部标题和页签 */}
|
||||
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 16 }}>
|
||||
<Title level={4} style={{ margin: '0 32px 0 0' }}>工单任务</Title>
|
||||
<Title level={4} style={{ margin: '0 32px 0 0', fontWeight: 800 }}>工单任务管理</Title>
|
||||
<Tabs
|
||||
activeKey={activeTab}
|
||||
onChange={setActiveTab}
|
||||
@@ -279,62 +321,33 @@ const WorkOrderPage = () => {
|
||||
</div>
|
||||
|
||||
{/* 统计卡片 */}
|
||||
{/* 统一风格统计卡片 —— 宽高一致 + 自动换行 + 最小宽度168px */}
|
||||
<Row
|
||||
gutter={[16, 16]}
|
||||
style={{
|
||||
marginBottom: 16,
|
||||
flexWrap: 'wrap',
|
||||
}}
|
||||
>
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
|
||||
{stats.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', height: '100%' }}>
|
||||
{/* 左侧文字 */}
|
||||
<div style={{ display: 'flex', flexDirection: 'column', justifyContent: 'center' }}>
|
||||
<div style={{ fontSize: 13, color: '#86909C' }}>{item.title}</div>
|
||||
|
||||
<div style={{ display: 'flex', alignItems: 'baseline', gap: 4, margin: '4px 0' }}>
|
||||
<span style={{ fontSize: 24, fontWeight: 700, color: '#333' }}>{item.value}</span>
|
||||
{item.unit && <span style={{ fontSize: 14, color: '#666' }}>{item.unit}</span>}
|
||||
<Col key={index} xs={24} sm={12} md={8} xl={4}>
|
||||
<Card bordered={false} bodyStyle={{ padding: '20px 16px' }} style={cardStyle}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<div>
|
||||
<div style={{ fontSize: 'clamp(12px, 0.8vw, 13px)', color: '#86909C', marginBottom: 8 }}>{item.title}</div>
|
||||
<div style={{ display: 'flex', alignItems: 'baseline', gap: 6, marginBottom: 8 }}>
|
||||
<div style={{ fontSize: 'clamp(20px, 1.4vw, 24px)', fontWeight: 800, color: '#1D2129' }}>{item.value}</div>
|
||||
{item.unit && <span style={{ fontSize: 13, color: '#1D2129', fontWeight: 600 }}>{item.unit}</span>}
|
||||
</div>
|
||||
|
||||
<div style={{ fontSize: 12 }}>
|
||||
<span style={{ color: '#86909C' }}>{item.subText}</span>
|
||||
<span
|
||||
style={{
|
||||
marginLeft: 4,
|
||||
fontWeight: 'bold',
|
||||
color: item.subValue.startsWith('+')
|
||||
? '#52c41a'
|
||||
: item.subValue.startsWith('-')
|
||||
? '#ff4d4f'
|
||||
: '#1890ff',
|
||||
}}
|
||||
>
|
||||
<div style={{ fontSize: 11, color: '#86909C' }}>
|
||||
{item.subText}
|
||||
<span style={{
|
||||
marginLeft: 4,
|
||||
fontWeight: 700,
|
||||
color: item.subValue.includes('+') ? '#00B42A' : (item.subValue.includes('-') ? '#F53F3F' : '#165DFF')
|
||||
}}>
|
||||
{item.subValue}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 右侧图标 */}
|
||||
<div
|
||||
style={{
|
||||
width: 48,
|
||||
height: 48,
|
||||
borderRadius: '50%',
|
||||
background: item.bg,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
<div style={{
|
||||
width: 52, height: 52, borderRadius: 14, background: item.bg,
|
||||
display: 'flex', alignItems: 'center', justifyContent: 'center',
|
||||
boxShadow: `0 4px 10px ${item.bg}80`
|
||||
}}>
|
||||
{item.icon}
|
||||
</div>
|
||||
</div>
|
||||
@@ -342,78 +355,80 @@ const WorkOrderPage = () => {
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
|
||||
{/* 筛选栏 */}
|
||||
<Card bordered={false} bodyStyle={{ padding: '12px 16px' }} style={{ borderRadius: 8, marginBottom: 16 }}>
|
||||
<Row gutter={16} align="middle">
|
||||
<Col span={3}>
|
||||
<Card bordered={false} bodyStyle={{ padding: '12px 16px' }} style={{ ...cardStyle, marginBottom: 16 }}>
|
||||
<Row gutter={[16, 12]} align="middle">
|
||||
<Col xs={12} sm={8} md={4} xl={3}>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>工单类型</Text>
|
||||
<Select defaultValue="all" style={{ width: '100%' }}>
|
||||
<span className="filter-label">工单类型</span>
|
||||
<Select defaultValue="all" style={{ width: '100%' }} size="small">
|
||||
<Option value="all">全部</Option>
|
||||
</Select>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={3}>
|
||||
<Col xs={12} sm={8} md={4} xl={3}>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>优先级</Text>
|
||||
<Select defaultValue="all" style={{ width: '100%' }}>
|
||||
<span className="filter-label">优先级</span>
|
||||
<Select defaultValue="all" style={{ width: '100%' }} size="small">
|
||||
<Option value="all">全部</Option>
|
||||
</Select>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={3}>
|
||||
<Col xs={12} sm={8} md={4} xl={3}>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>负责人</Text>
|
||||
<Select defaultValue="all" style={{ width: '100%' }}>
|
||||
<span className="filter-label">负责人</span>
|
||||
<Select defaultValue="all" style={{ width: '100%' }} size="small">
|
||||
<Option value="all">全部</Option>
|
||||
</Select>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={5}>
|
||||
<Col xs={24} sm={16} md={8} xl={5}>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>时间范围</Text>
|
||||
<RangePicker style={{ width: '100%' }} />
|
||||
<span className="filter-label">时间范围</span>
|
||||
<RangePicker style={{ width: '100%' }} size="small" />
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={3}>
|
||||
<Col xs={12} sm={8} md={4} xl={3}>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>状态</Text>
|
||||
<Select defaultValue="all" style={{ width: '100%' }}>
|
||||
<span className="filter-label">状态</span>
|
||||
<Select defaultValue="all" style={{ width: '100%' }} size="small">
|
||||
<Option value="all">全部</Option>
|
||||
</Select>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={4}>
|
||||
<Col xs={24} sm={16} md={10} xl={4}>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>关键词</Text>
|
||||
<Input placeholder="请输入工单编号/标题" suffix={<SearchOutlined />} />
|
||||
<span className="filter-label">关键词</span>
|
||||
<Input placeholder="请输入工单编号/标题" prefix={<SearchOutlined />} size="small" />
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={3} style={{ textAlign: 'right' }}>
|
||||
<Col xs={24} sm={8} md={4} xl={3} style={{ textAlign: 'right' }}>
|
||||
<Space>
|
||||
<Button>重置</Button>
|
||||
<Button type="primary">查询</Button>
|
||||
<Button size="small">重置</Button>
|
||||
<Button type="primary" size="small" icon={<SearchOutlined />}>查询</Button>
|
||||
</Space>
|
||||
</Col>
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
<Row gutter={16}>
|
||||
<Row gutter={[12, 12]}>
|
||||
{/* 左侧:列表 + 底部图表 */}
|
||||
<Col span={15}>
|
||||
<Col xs={24} xl={15}>
|
||||
<Card
|
||||
bordered={false}
|
||||
title={<div style={{ display: 'flex', alignItems: 'center' }}><Text strong style={{ fontSize: 16 }}>工单列表</Text><Text type="secondary" style={{ fontSize: 12, marginLeft: 8 }}>(共 {workOrderTotal} 条)</Text></div>}
|
||||
title={<Space size={8}><Text strong style={{ fontSize: 15, color: '#1D2129' }}>工单列表</Text><Text type="secondary" style={{ fontSize: 12 }}>(共 {workOrderTotal} 条)</Text></Space>}
|
||||
bodyStyle={{ padding: 0 }}
|
||||
style={{ borderRadius: 8, marginBottom: 16 }}
|
||||
style={{ ...cardStyle, marginBottom: 16 }}
|
||||
>
|
||||
<Table
|
||||
dataSource={workOrderList}
|
||||
columns={columns}
|
||||
pagination={false}
|
||||
loading={loading}
|
||||
size="middle"
|
||||
size="small"
|
||||
rowKey="id"
|
||||
className="compact-table"
|
||||
scroll={{ x: 'max-content' }}
|
||||
rowSelection={{
|
||||
type: 'radio',
|
||||
@@ -421,74 +436,76 @@ const WorkOrderPage = () => {
|
||||
onChange: handleRowSelect
|
||||
}}
|
||||
/>
|
||||
<div style={{ padding: '16px', textAlign: 'right' }}>
|
||||
<div style={{ padding: '12px 16px', textAlign: 'right' }}>
|
||||
<Pagination size="small" total={workOrderTotal} showSizeChanger showQuickJumper />
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
<Row gutter={16}>
|
||||
<Col span={10}>
|
||||
<Card bordered={false} title="工单状态分布" style={{ borderRadius: 8, height: 360 }}>
|
||||
<div style={{ height: 280, position: 'relative' }}>
|
||||
<Row gutter={[12, 12]}>
|
||||
<Col xs={24} md={9}>
|
||||
<Card bordered={false} title={<Text strong style={{ fontSize: 14 }}>工单状态分布</Text>} style={{ ...cardStyle, height: 380 }}>
|
||||
<div style={{ height: 300, position: 'relative' }}>
|
||||
<Pie
|
||||
data={pieData}
|
||||
angleField="value"
|
||||
colorField="type"
|
||||
radius={1}
|
||||
innerRadius={0.6}
|
||||
innerRadius={0.65}
|
||||
label={false}
|
||||
color={['#1890ff', '#165DFF', '#00B42A', '#F53F3F']}
|
||||
legend={{
|
||||
position: 'right',
|
||||
layout: 'vertical',
|
||||
itemValueLabel: {
|
||||
formatter: (text, item) => {
|
||||
const total = pieData.reduce((a, b) => a + b.value, 0);
|
||||
const percent = ((item.value / total) * 100).toFixed(2);
|
||||
const percent = ((item.value / total) * 100).toFixed(1);
|
||||
return `${item.value} (${percent}%)`;
|
||||
}
|
||||
}
|
||||
}}
|
||||
height={240}
|
||||
height={260}
|
||||
/>
|
||||
<div style={{ position: 'absolute', top: '42%', left: '30%', textAlign: 'center', transform: 'translate(-50%, -50%)' }}>
|
||||
<div style={{ fontSize: 14, color: '#8c8c8c' }}>总数</div>
|
||||
<div style={{ fontSize: 24, fontWeight: 'bold' }}>{workOrderTotal}</div>
|
||||
<div style={{ fontSize: 12, color: '#86909C' }}>总数</div>
|
||||
<div style={{ fontSize: 28, fontWeight: 800, color: '#1D2129' }}>{workOrderTotal}</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={14}>
|
||||
<Col xs={24} md={15}>
|
||||
<Card
|
||||
bordered={false}
|
||||
title="任务排班 / 日历视图"
|
||||
title={<Text strong style={{ fontSize: 14 }}>任务排班 / 日历视图</Text>}
|
||||
extra={<Button type="link" size="small">更多 <ChevronRight size={14} /></Button>}
|
||||
style={{ borderRadius: 8, height: 360 }}
|
||||
style={{ ...cardStyle, height: 380 }}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
>
|
||||
<div style={{ marginBottom: 12 }}>
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<Space>
|
||||
<Button size="small" icon={<ChevronRight style={{ transform: 'rotate(180deg)' }} size={14} />} />
|
||||
<Text strong>2025-05-24 (今天)</Text>
|
||||
<Text strong style={{ fontSize: 13 }}>2025-05-24 (今天)</Text>
|
||||
<Button size="small" icon={<ChevronRight size={14} />} />
|
||||
</Space>
|
||||
</div>
|
||||
<div style={{ border: '1px solid #f0f0f0', borderRadius: 4, overflow: 'hidden' }}>
|
||||
<div style={{ display: 'flex', background: '#fafafa', borderBottom: '1px solid #f0f0f0' }}>
|
||||
<div style={{ width: 60, padding: '8px', borderRight: '1px solid #f0f0f0' }}></div>
|
||||
<div style={{ border: '1px solid #f0f0f0', borderRadius: 8, overflow: 'hidden' }}>
|
||||
<div style={{ display: 'flex', background: '#f8fafc', borderBottom: '1px solid #f0f0f0' }}>
|
||||
<div style={{ width: 60, padding: '10px 0', borderRight: '1px solid #f0f0f0' }}></div>
|
||||
{['08:00', '10:00', '12:00', '14:00', '16:00', '18:00'].map(t => (
|
||||
<div key={t} style={{ flex: 1, padding: '8px', textAlign: 'center', fontSize: 12 }}>{t}</div>
|
||||
<div key={t} style={{ flex: 1, padding: '10px 0', textAlign: 'center', fontSize: 11, color: '#86909C', fontWeight: 500 }}>{t}</div>
|
||||
))}
|
||||
</div>
|
||||
{['李工', '王工', '赵工', '陈工'].map((name, idx) => (
|
||||
<div key={name} style={{ display: 'flex', borderBottom: idx === 3 ? 'none' : '1px solid #f0f0f0', height: 50, position: 'relative' }}>
|
||||
<div style={{ width: 60, padding: '8px', borderRight: '1px solid #f0f0f0', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 12 }}>{name}</div>
|
||||
<div key={name} style={{ display: 'flex', borderBottom: idx === 3 ? 'none' : '1px solid #f0f0f0', height: 56, position: 'relative' }}>
|
||||
<div style={{ width: 60, padding: '8px 0', borderRight: '1px solid #f0f0f0', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 12, fontWeight: 600, color: '#4E5969' }}>{name}</div>
|
||||
<div style={{ flex: 1, position: 'relative' }}>
|
||||
{idx === 0 && <div style={{ position: 'absolute', left: '10%', top: 5, width: '40%', height: 40, background: '#f6ffed', border: '1px solid #b7eb8f', borderRadius: 4, padding: '2px 8px', fontSize: 10 }}>INV-05 告警排查<br />08:30 - 12:00</div>}
|
||||
{idx === 1 && <div style={{ position: 'absolute', left: '55%', top: 5, width: '30%', height: 40, background: '#e6f7ff', border: '1px solid #91d5ff', borderRadius: 4, padding: '2px 8px', fontSize: 10 }}>B-12 热斑复检<br />13:30 - 15:00</div>}
|
||||
{idx === 1 && <div style={{ position: 'absolute', left: '86%', top: 5, width: '12%', height: 40, background: '#f0f5ff', border: '1px solid #adc6ff', borderRadius: 4, borderStyle: 'dashed', padding: '2px 4px', fontSize: 10 }}>无人机巡检<br />16:00-18:00</div>}
|
||||
{idx === 2 && <div style={{ position: 'absolute', left: '20%', top: 5, width: '35%', height: 40, background: '#f9f0ff', border: '1px solid #d3adf7', borderRadius: 4, padding: '2px 8px', fontSize: 10 }}>组件清洗 C-05<br />09:00 - 12:00</div>}
|
||||
{idx === 2 && <div style={{ position: 'absolute', left: '70%', top: 5, width: '25%', height: 40, background: '#fff7e6', border: '1px solid #ffe7ba', borderRadius: 4, padding: '2px 8px', fontSize: 10 }}>清洗效果复检<br />15:00 - 17:00</div>}
|
||||
{idx === 3 && <div style={{ position: 'absolute', left: '30%', top: 5, width: '30%', height: 40, background: '#fff2e8', border: '1px solid #ffbb96', borderRadius: 4, padding: '2px 8px', fontSize: 10 }}>周界摄像头修复<br />10:00 - 12:30</div>}
|
||||
{idx === 3 && <div style={{ position: 'absolute', left: '75%', top: 5, width: '20%', height: 40, background: '#fffbe6', border: '1px solid #ffe58f', borderRadius: 4, padding: '2px 8px', fontSize: 10 }}>设备巡检<br />15:30 - 17:30</div>}
|
||||
{idx === 0 && <div className="schedule-item" style={{ position: 'absolute', left: '5%', top: 8, width: '45%', height: 40, background: '#E8FFEA', border: '1px solid #00B42A', borderRadius: 6, padding: '4px 10px', fontSize: 10, color: '#00B42A' }}><b>INV-05 告警排查</b><br />08:30 - 12:00</div>}
|
||||
{idx === 1 && <div className="schedule-item" style={{ position: 'absolute', left: '55%', top: 8, width: '25%', height: 40, background: '#E8F3FF', border: '1px solid #165DFF', borderRadius: 6, padding: '4px 10px', fontSize: 10, color: '#165DFF' }}><b>B-12 热斑复检</b><br />13:30 - 15:00</div>}
|
||||
{idx === 1 && <div className="schedule-item" style={{ position: 'absolute', left: '82%', top: 8, width: '15%', height: 40, background: '#F5F8FF', border: '1px dashed #2F54EB', borderRadius: 6, padding: '4px 8px', fontSize: 10, color: '#2F54EB' }}><b>无人机巡检</b><br />16:00-18:00</div>}
|
||||
{idx === 2 && <div className="schedule-item" style={{ position: 'absolute', left: '15%', top: 8, width: '35%', height: 40, background: '#F9F0FF', border: '1px solid #722ED1', borderRadius: 6, padding: '4px 10px', fontSize: 10, color: '#722ED1' }}><b>组件清洗 C-05</b><br />09:00 - 12:00</div>}
|
||||
{idx === 2 && <div className="schedule-item" style={{ position: 'absolute', left: '70%', top: 8, width: '25%', height: 40, background: '#FFF7E8', border: '1px solid #F7BA1E', borderRadius: 6, padding: '4px 10px', fontSize: 10, color: '#F7BA1E' }}><b>清洗效果复检</b><br />15:00 - 17:00</div>}
|
||||
{idx === 3 && <div className="schedule-item" style={{ position: 'absolute', left: '25%', top: 8, width: '30%', height: 40, background: '#FFF1F0', border: '1px solid #F53F3F', borderRadius: 6, padding: '4px 10px', fontSize: 10, color: '#F53F3F' }}><b>周界摄像头修复</b><br />10:00 - 12:30</div>}
|
||||
{idx === 3 && <div className="schedule-item" style={{ position: 'absolute', left: '75%', top: 8, width: '22%', height: 40, background: '#EFFFF4', border: '1px solid #00B42A', borderRadius: 6, padding: '4px 10px', fontSize: 10, color: '#00B42A' }}><b>设备巡检</b><br />15:30 - 17:30</div>}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
@@ -499,26 +516,29 @@ const WorkOrderPage = () => {
|
||||
</Col>
|
||||
|
||||
{/* 右侧:详情 + AI + 告警 */}
|
||||
<Col span={9}>
|
||||
<Col xs={24} xl={9}>
|
||||
<Card
|
||||
bordered={false}
|
||||
style={{ borderRadius: 8, marginBottom: 16 }}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
style={cardStyle}
|
||||
bodyStyle={{ padding: '20px' }}
|
||||
>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 16 }}>
|
||||
<Text strong style={{ fontSize: 16 }}>工单详情</Text>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>工单编号: {currentDetail?.orderNo || '--'}</Text>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20 }}>
|
||||
<Text strong style={{ fontSize: 16, color: '#1D2129' }}>工单详情</Text>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>工单编号: <span style={{ color: '#4E5969', fontWeight: 600 }}>{currentDetail?.orderNo || '--'}</span></Text>
|
||||
</div>
|
||||
|
||||
<div style={{ marginBottom: 20 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 8 }}>
|
||||
<Title level={4} style={{ margin: '0 12px 0 0' }}>{currentDetail?.orderTitle || '暂无标题'}</Title>
|
||||
<div style={{ marginBottom: 24 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 16, flexWrap: 'wrap', gap: 12 }}>
|
||||
<Title level={4} style={{ margin: 0, fontSize: 18, fontWeight: 800 }}>{currentDetail?.orderTitle || '暂无标题'}</Title>
|
||||
{currentDetail?.priorityLevel && (
|
||||
<Tag
|
||||
style={{
|
||||
color: priorityConfig[currentDetail.priorityLevel]?.color,
|
||||
background: priorityConfig[currentDetail.priorityLevel]?.bg,
|
||||
border: `1px solid ${priorityConfig[currentDetail.priorityLevel]?.border}`
|
||||
border: `1px solid ${priorityConfig[currentDetail.priorityLevel]?.color}`,
|
||||
borderRadius: 4,
|
||||
fontWeight: 600,
|
||||
margin: 0
|
||||
}}
|
||||
>
|
||||
{priorityConfig[currentDetail.priorityLevel].label}优先级
|
||||
@@ -526,126 +546,133 @@ const WorkOrderPage = () => {
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Row gutter={[0, 12]}>
|
||||
<Col span={12}><Text type="secondary">来源:</Text><Text>{currentDetail?.sourceType || '--'}</Text></Col>
|
||||
<Col span={12}><Text type="secondary">工单类型:</Text><Text>{orderTypeConfig[currentDetail?.orderType] || '--'}</Text></Col>
|
||||
<Col span={12}><Text type="secondary">负责人:</Text><Text>{currentDetail?.assigneeName || '--'}</Text></Col>
|
||||
<Col span={12}><Text type="secondary">协同人员:</Text><Text>{currentDetail?.collaboratorNames || '无'}</Text></Col>
|
||||
<Col span={24}><Text type="secondary">计划时间:</Text><Text>{currentDetail?.planStartTime ? `${currentDetail.planStartTime} ~ ${currentDetail.planEndTime}` : '--'}</Text></Col>
|
||||
<Col span={12}><Text type="secondary">关联设备:</Text><Text style={{ color: '#1890ff' }}>{currentDetail?.deviceName || '无'}</Text></Col>
|
||||
<Col span={12}><Text type="secondary">关联电站:</Text><Text>{currentDetail?.siteName || '无'}</Text></Col>
|
||||
<Row gutter={[16, 16]} style={{ background: '#f8fafc', padding: 16, borderRadius: 12, marginBottom: 20 }}>
|
||||
<Col span={12}><Text type="secondary" style={{ fontSize: 12 }}>来源:</Text><Text style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.sourceType || '--'}</Text></Col>
|
||||
<Col span={12}><Text type="secondary" style={{ fontSize: 12 }}>工单类型:</Text><Text style={{ fontSize: 12, fontWeight: 500 }}>{orderTypeConfig[currentDetail?.orderType] || '--'}</Text></Col>
|
||||
<Col span={12}><Text type="secondary" style={{ fontSize: 12 }}>负责人:</Text><Text style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.assigneeName || '--'}</Text></Col>
|
||||
<Col span={12}><Text type="secondary" style={{ fontSize: 12 }}>协同人员:</Text><Text style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.collaboratorNames || '无'}</Text></Col>
|
||||
<Col span={24}><Text type="secondary" style={{ fontSize: 12 }}>计划时间:</Text><Text style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.planStartTime ? `${currentDetail.planStartTime} ~ ${currentDetail.planEndTime}` : '--'}</Text></Col>
|
||||
<Col span={12}><Text type="secondary" style={{ fontSize: 12 }}>关联设备:</Text><Text style={{ fontSize: 12, color: '#165DFF', fontWeight: 600 }}>{currentDetail?.deviceName || '无'}</Text></Col>
|
||||
<Col span={12}><Text type="secondary" style={{ fontSize: 12 }}>关联区域:</Text><Text style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.siteName || '无'}</Text></Col>
|
||||
<Col span={24}>
|
||||
<Text type="secondary">当前状态:</Text>
|
||||
<Tag color="blue" style={{ borderRadius: 10 }}>{orderStatusConfig[currentDetail?.orderStatus]?.label || '--'}</Tag>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>当前状态:</Text>
|
||||
<Tag color="blue" style={{ borderRadius: 4, fontWeight: 600, border: 'none', background: '#E8F3FF', color: '#165DFF' }}>{orderStatusConfig[currentDetail?.orderStatus]?.label || '--'}</Tag>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<Text type="secondary">任务描述:</Text>
|
||||
<Text>{currentDetail?.taskDescription || '暂无描述'}</Text>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>任务描述:</Text>
|
||||
<div style={{ fontSize: 12, color: '#4E5969', marginTop: 4, lineHeight: 1.6 }}>{currentDetail?.taskDescription || '暂无描述'}</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
<div style={{ marginBottom: 24 }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', padding: '0 10px', marginBottom: 8 }}>
|
||||
<div style={{ textAlign: 'center' }}>
|
||||
<CheckCircleFilled style={{ color: '#52c41a', fontSize: 20 }} />
|
||||
<div style={{ fontSize: 12, marginTop: 4 }}>已创建</div>
|
||||
</div>
|
||||
<div style={{ flex: 1, height: 2, background: '#52c41a', marginTop: 10 }}></div>
|
||||
<div style={{ textAlign: 'center' }}>
|
||||
<CheckCircleFilled style={{ color: '#52c41a', fontSize: 20 }} />
|
||||
<div style={{ fontSize: 12, marginTop: 4 }}>已派发</div>
|
||||
</div>
|
||||
<div style={{ flex: 1, height: 2, background: '#1890ff', marginTop: 10 }}></div>
|
||||
<div style={{ textAlign: 'center' }}>
|
||||
<div style={{ width: 20, height: 20, borderRadius: '50%', background: '#1890ff', color: '#fff', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 12 }}>3</div>
|
||||
<div style={{ fontSize: 12, marginTop: 4 }}>执行中</div>
|
||||
</div>
|
||||
<div style={{ flex: 1, height: 2, background: '#f0f0f0', marginTop: 10 }}></div>
|
||||
<div style={{ textAlign: 'center' }}>
|
||||
<div style={{ width: 20, height: 20, borderRadius: '50%', border: '1px solid #d9d9d9', color: '#d9d9d9', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 12 }}>4</div>
|
||||
<div style={{ fontSize: 12, marginTop: 4, color: '#d9d9d9' }}>已完成</div>
|
||||
<div style={{ marginBottom: 32 }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', padding: '0 10px', position: 'relative' }}>
|
||||
{/* 连线 */}
|
||||
<div style={{ position: 'absolute', top: 11, left: '15%', right: '15%', height: 2, background: '#f0f0f0', zIndex: 1 }}>
|
||||
<div style={{ width: currentDetail?.orderStatus >= 3 ? '100%' : (currentDetail?.orderStatus === 2 ? '66%' : '33%'), height: '100%', background: '#00B42A' }}></div>
|
||||
</div>
|
||||
|
||||
{[
|
||||
{ label: '已创建', step: 1, active: currentDetail?.orderStatus >= 1 },
|
||||
{ label: '已派发', step: 2, active: currentDetail?.orderStatus >= 2 },
|
||||
{ label: '执行中', step: 3, active: currentDetail?.orderStatus >= 2 },
|
||||
{ label: '已完成', step: 4, active: currentDetail?.orderStatus >= 4 },
|
||||
].map(item => (
|
||||
<div key={item.step} style={{ textAlign: 'center', zIndex: 2, position: 'relative' }}>
|
||||
<div style={{
|
||||
width: 24, height: 24, borderRadius: '50%', background: item.active ? '#00B42A' : '#fff',
|
||||
border: item.active ? 'none' : '2px solid #E5E6EB', color: item.active ? '#fff' : '#86909C',
|
||||
display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 11, fontWeight: 700, margin: '0 auto'
|
||||
}}>
|
||||
{item.active ? <CheckOutlined /> : item.step}
|
||||
</div>
|
||||
<div style={{ fontSize: 11, marginTop: 8, color: item.active ? '#1D2129' : '#86909C', fontWeight: item.active ? 600 : 400 }}>{item.label}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Row gutter={8}>
|
||||
<Col span={6}><Button type="primary" block onClick={openDispatchModal}>派发工单</Button></Col>
|
||||
<Col span={6}><Button icon={<ReloadOutlined />} block onClick={openEditModal}>转派</Button></Col>
|
||||
<Col span={6}><Button icon={<PauseOutlined />} danger ghost block>挂起</Button></Col>
|
||||
<Col span={6}><Button icon={<CheckOutlined />} style={{ background: '#52c41a', color: '#fff', border: 'none' }} block>完成工单</Button></Col>
|
||||
<Row gutter={12}>
|
||||
<Col span={6}><Button type="primary" block onClick={openDispatchModal} style={{ borderRadius: 8, height: 36, fontWeight: 600 }}>派发工单</Button></Col>
|
||||
<Col span={6}><Button icon={<ReloadOutlined />} block onClick={openEditModal} style={{ borderRadius: 8, height: 36, fontWeight: 600 }}>转派</Button></Col>
|
||||
<Col span={6}><Button icon={<PauseOutlined />} danger ghost block style={{ borderRadius: 8, height: 36, fontWeight: 600 }}>挂起</Button></Col>
|
||||
<Col span={6}><Button icon={<CheckCircleOutlined />} style={{ background: '#00B42A', color: '#fff', border: 'none', borderRadius: 8, height: 36, fontWeight: 600 }} block>完成工单</Button></Col>
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
bordered={false}
|
||||
title={<div style={{ display: 'flex', alignItems: 'center' }}><Text strong>AI 建议与关联信息</Text></div>}
|
||||
style={{ borderRadius: 8, marginBottom: 16 }}
|
||||
bodyStyle={{ padding: '12px' }}
|
||||
title={<Text strong style={{ fontSize: 14, color: '#1D2129' }}>AI 建议与关联信息</Text>}
|
||||
style={{ ...cardStyle, marginTop: 16 }}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
>
|
||||
<Row gutter={8}>
|
||||
<Row gutter={12} style={{ marginBottom: 16 }}>
|
||||
<Col span={8}>
|
||||
<div style={{ background: '#f9f0ff', padding: '12px 8px', borderRadius: 8, textAlign: 'center' }}>
|
||||
<RobotOutlined style={{ fontSize: 20, color: '#722ed1', marginBottom: 8 }} />
|
||||
<div style={{ fontSize: 12 }}>建议携带</div>
|
||||
<div style={{ fontSize: 12, fontWeight: 'bold' }}>{currentDetail?.requiredEquipment || '无'}</div>
|
||||
<div style={{ background: '#F9F0FF', padding: '16px 8px', borderRadius: 12, textAlign: 'center', height: '100%', border: '1px solid #F3E8FF' }}>
|
||||
<div style={{ width: 32, height: 32, background: '#fff', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'center', margin: '0 auto 10px', boxShadow: '0 2px 6px rgba(114,46,209,0.1)' }}>
|
||||
<RobotOutlined style={{ fontSize: 18, color: '#722ED1' }} />
|
||||
</div>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>建议携带</div>
|
||||
<div style={{ fontSize: 12, fontWeight: 700, color: '#1D2129' }}>红外热像设备</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<div style={{ background: '#f6ffed', padding: '12px 8px', borderRadius: 8, textAlign: 'center' }}>
|
||||
<ThunderboltOutlined style={{ fontSize: 20, color: '#52c41a', marginBottom: 8 }} />
|
||||
<div style={{ fontSize: 12 }}>AI建议方案</div>
|
||||
<div style={{ fontSize: 10, fontWeight: 'bold' }}>{currentDetail?.aiSuggestion || '无'}</div>
|
||||
<div style={{ background: '#E8FFEA', padding: '16px 8px', borderRadius: 12, textAlign: 'center', height: '100%', border: '1px solid #D1FFD6' }}>
|
||||
<div style={{ width: 32, height: 32, background: '#fff', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'center', margin: '0 auto 10px', boxShadow: '0 2px 6px rgba(0,180,42,0.1)' }}>
|
||||
<ThunderboltOutlined style={{ fontSize: 18, color: '#00B42A' }} />
|
||||
</div>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>优先复检组件</div>
|
||||
<div style={{ fontSize: 12, fontWeight: 700, color: '#1D2129' }}>B-12-03 / B-12-05</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<div style={{ background: '#fff7e6', padding: '12px 8px', borderRadius: 8, textAlign: 'center' }}>
|
||||
<RiseOutlined style={{ fontSize: 20, color: '#faad14', marginBottom: 8 }} />
|
||||
<div style={{ fontSize: 12 }}>预计发电影响</div>
|
||||
<div style={{ fontSize: 12, fontWeight: 'bold' }}>{currentDetail?.estimatedImpact ?? 0}%</div>
|
||||
<div style={{ background: '#FFF7E8', padding: '16px 8px', borderRadius: 12, textAlign: 'center', height: '100%', border: '1px solid #FFE4BA' }}>
|
||||
<div style={{ width: 32, height: 32, background: '#fff', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'center', margin: '0 auto 10px', boxShadow: '0 2px 6px rgba(247,186,30,0.1)' }}>
|
||||
<RiseOutlined style={{ fontSize: 18, color: '#F7BA1E' }} />
|
||||
</div>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>预计影响发电</div>
|
||||
<div style={{ fontSize: 13, fontWeight: 800, color: '#1D2129' }}>2.1%</div>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
<Row gutter={16}>
|
||||
<Col span={12}>
|
||||
<Card bordered={false} title="关联告警趋势 (近 7 天)" style={{ borderRadius: 8 }}>
|
||||
<Row gutter={12}>
|
||||
<Col span={13}>
|
||||
<div style={{ fontSize: 12, fontWeight: 700, color: '#1D2129', marginBottom: 12 }}>关联告警趋势 <Text type="secondary" style={{ fontSize: 11, fontWeight: 400 }}>(近 7 天)</Text></div>
|
||||
<Line
|
||||
data={alarmTrendData}
|
||||
xField="date"
|
||||
yField="value"
|
||||
smooth
|
||||
point={{ size: 4, shape: 'circle' }}
|
||||
height={120}
|
||||
padding="auto"
|
||||
xAxis={{ label: { style: { fontSize: 10 } } }}
|
||||
yAxis={{ label: { style: { fontSize: 10 } } }}
|
||||
point={{ size: 3, shape: 'circle', style: { fill: '#165DFF', stroke: '#fff', lineWidth: 1 } }}
|
||||
height={130}
|
||||
color="#165DFF"
|
||||
padding={[10, 10, 20, 20]}
|
||||
xAxis={{ label: { style: { fontSize: 9, fill: '#86909C' } } }}
|
||||
yAxis={{ label: { style: { fontSize: 9, fill: '#86909C' } }, grid: { line: { style: { stroke: '#f0f0f0', lineDash: [3, 3] } } } }}
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Card bordered={false} title="关联告警列表 (近 3 条)" extra={<Button type="link" size="small" style={{ fontSize: 12 }}>查看全部 <ChevronRight size={12} /></Button>} style={{ borderRadius: 8 }}>
|
||||
<div style={{ fontSize: 12 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 8 }}>
|
||||
<Badge status="error" style={{ marginRight: 8 }} />
|
||||
<Text ellipsis style={{ flex: 1 }}>INV-05 逆变器告警</Text>
|
||||
<Text type="secondary" style={{ fontSize: 10 }}>05-24 10:24</Text>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 8 }}>
|
||||
<Badge status="warning" style={{ marginRight: 8 }} />
|
||||
<Text ellipsis style={{ flex: 1 }}>B-12 区块热斑告警</Text>
|
||||
<Text type="secondary" style={{ fontSize: 10 }}>05-24 09:56</Text>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<Badge status="warning" style={{ marginRight: 8 }} />
|
||||
<Text ellipsis style={{ flex: 1 }}>B-12 组件温度异常</Text>
|
||||
<Text type="secondary" style={{ fontSize: 10 }}>05-24 09:32</Text>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={11}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 12 }}>
|
||||
<div style={{ fontSize: 12, fontWeight: 700, color: '#1D2129' }}>关联告警列表 <Text type="secondary" style={{ fontSize: 11, fontWeight: 400 }}>(近 3 条)</Text></div>
|
||||
<Button type="link" size="small" style={{ fontSize: 11, padding: 0 }}>查看全部</Button>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
|
||||
{[
|
||||
{ title: 'INV-05 逆变器告警', time: '05-24 10:24', status: 'error' },
|
||||
{ title: 'B-12 区块热斑告警', time: '05-24 09:56', status: 'warning' },
|
||||
{ title: 'B-12 组件温度异常', time: '05-24 09:32', status: 'warning' },
|
||||
].map((item, idx) => (
|
||||
<div key={idx} style={{ display: 'flex', alignItems: 'center', gap: 8, padding: '6px 8px', background: '#f8fafc', borderRadius: 6 }}>
|
||||
<div style={{ width: 6, height: 6, borderRadius: '50%', background: item.status === 'error' ? '#F53F3F' : '#F7BA1E' }}></div>
|
||||
<Text ellipsis style={{ flex: 1, fontSize: 11, fontWeight: 500, color: '#4E5969' }}>{item.title}</Text>
|
||||
<Text type="secondary" style={{ fontSize: 10, flexShrink: 0 }}>{item.time}</Text>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user