import React from 'react'; import { Card, Row, Col, Statistic, Button, Space, Tag, Typography } from 'antd'; import { CloudOutlined, ThunderboltOutlined, BarChartOutlined, RiseOutlined, BellOutlined, WalletOutlined, MinusOutlined, PlusOutlined, SyncOutlined } from '@ant-design/icons'; import { Line, Bar, Pie } from '@ant-design/charts'; import { getOverflowOptions } from 'antd/es/_util/placements'; const { Text } = Typography; export default function StationDashboard() { // 模拟数据 const stationOverview = { todayEnergy: 45.9, currentPower: 66811.3, systemEfficiency: 66.8, yesterdayEfficiency: 81.3, systemAvailability: 92.31, onlineDevices: "12/13", alarmCount: 5, costSaved: 8278 }; const realtimeAlerts = [ { level: "INFO", type: "设备离线", time: "04-28 18:44" }, { level: "严重", type: "逆变器温度过高", time: "04-28 18:44" } ]; const deviceStatus = [ { name: "汇流箱", count: "2/2", status: "异常 1" }, { name: "逆变器", count: "3/3", status: "异常 1" }, { name: "电表", count: "1/1", status: "正常" }, { name: "巡检机器人", count: "1/1", status: "正常" } ]; const patrolRecords = [ { name: "升压站安防巡检任务", device: "UAV-01", status: "草稿", time: "04-29T..." }, { name: "B区清洗任务", device: "CLEAN-01", status: "待执行", time: "04-29T..." }, { name: "A区巡检任务", device: "ROBOT-01", status: "已派发", time: "04-29T..." } ]; const aiAnalysis = [ { type: "AI分析", content: "AI发现逆变器温度与组串电流存在轻微异常,建议优先复核A区设备。" }, { type: "严重", content: "INV-A02散热检修建议:建议检查INV-A02散热风扇、风道和运行负载,持续高温时转维修工单。" }, { type: "严重", content: "A05阵列热斑处置建议:建议现场复核PV-A05-018至PV-A05-020组件接线和旁路二极管状态,必要时更换异常组件。" } ]; // 图表配置 const powerTrendConfig = { data: [ { time: "00:00", actual: 2000, predict: 1800 }, { time: "08:00", actual: 35000, predict: 33000 }, { time: "16:00", actual: 55000, predict: 53000 }, { time: "24:00", actual: 2000, predict: 1800 } ], xField: 'time', yField: ['actual', 'predict'], color: ['#1890ff', '#52c41a'], areaStyle: { fillOpacity: 0.15 }, legend: { position: 'top-left' } }; const irradianceConfig = { data: [ { time: "00:00", irradiance: 50, temperature: 15 }, { time: "08:00", irradiance: 400, temperature: 20 }, { time: "16:00", irradiance: 800, temperature: 30 }, { time: "24:00", irradiance: 50, temperature: 15 } ], xField: 'time', yField: ['irradiance', 'temperature'], color: ['#1890ff', '#52c41a'], areaStyle: { fillOpacity: 0.15 }, legend: { position: 'top-left' } }; const invEfficiencyConfig = { data: [ { device: 'INV-01', efficiency: 98 }, { device: 'INV-03', efficiency: 97 }, { device: 'INV-05', efficiency: 96 }, { device: 'INV-07', efficiency: 95 }, { device: 'INV-09', efficiency: 94 } ], xField: 'device', yField: 'efficiency', color: '#1890ff', label: { position: 'top' } }; const taskProgressConfig = { data: [ { type: '已完成', value: 40 }, { type: '进行中', value: 35 }, { type: '待开始', value: 20 }, { type: '异常', value: 5 } ], angleField: 'value', colorField: 'type', color: ['#1890ff', '#52c41a', '#faad14', '#ff4d4f'], radius: 0.8, innerRadius: 0.6, legend: { position: 'right' } }; const cardStyle = { borderRadius: 8, }; return (