2026-05-08 11:00:11 +08:00
|
|
|
|
import React, { useState } from 'react';
|
|
|
|
|
|
import {
|
|
|
|
|
|
Layout, Card, Row, Col, Button, Table, Tag, Select, Input, Typography, Space,
|
2026-05-11 12:40:31 +08:00
|
|
|
|
Statistic, Modal, message, Empty, Drawer, Descriptions, Timeline, Divider, Form, Tabs, Progress, Badge, DatePicker, Pagination
|
2026-05-08 11:00:11 +08:00
|
|
|
|
} from 'antd';
|
|
|
|
|
|
import {
|
2026-05-11 12:40:31 +08:00
|
|
|
|
CheckOutlined, ClockCircleOutlined, ControlOutlined,
|
|
|
|
|
|
BarChartOutlined, RiseOutlined, ArrowUpOutlined,
|
|
|
|
|
|
SearchOutlined, PlusOutlined, EditOutlined, DeleteOutlined,
|
|
|
|
|
|
EyeOutlined, CommentOutlined, PauseOutlined, FormOutlined,
|
|
|
|
|
|
ReloadOutlined, FilterOutlined, MoreOutlined,
|
|
|
|
|
|
CheckCircleFilled, PlayCircleFilled, InfoCircleFilled,
|
|
|
|
|
|
RobotOutlined, ThunderboltOutlined, AlertOutlined
|
2026-05-08 11:00:11 +08:00
|
|
|
|
} from '@ant-design/icons';
|
2026-05-11 12:40:31 +08:00
|
|
|
|
import { Pie, Line } from '@ant-design/charts';
|
|
|
|
|
|
import {
|
|
|
|
|
|
ClipboardList,
|
|
|
|
|
|
Clock,
|
|
|
|
|
|
Play,
|
|
|
|
|
|
CheckCircle,
|
|
|
|
|
|
Timer,
|
|
|
|
|
|
Cpu,
|
|
|
|
|
|
Calendar as CalendarIcon,
|
|
|
|
|
|
ChevronRight,
|
|
|
|
|
|
History,
|
|
|
|
|
|
ExternalLink
|
|
|
|
|
|
} from 'lucide-react';
|
2026-05-08 11:00:11 +08:00
|
|
|
|
|
|
|
|
|
|
const { Option } = Select;
|
|
|
|
|
|
const { Search } = Input;
|
|
|
|
|
|
const { Text, Title } = Typography;
|
2026-05-11 12:40:31 +08:00
|
|
|
|
const { RangePicker } = DatePicker;
|
2026-05-08 11:00:11 +08:00
|
|
|
|
|
2026-05-11 12:40:31 +08:00
|
|
|
|
// 模拟数据
|
|
|
|
|
|
const workOrderData = [
|
2026-05-08 11:00:11 +08:00
|
|
|
|
{
|
2026-05-11 11:59:17 +08:00
|
|
|
|
id: 'WO20250524001',
|
|
|
|
|
|
title: '逆变器 INV-05 告警排查',
|
|
|
|
|
|
source: 'AI诊断',
|
|
|
|
|
|
type: '检修',
|
|
|
|
|
|
priority: 'high',
|
2026-05-11 12:40:31 +08:00
|
|
|
|
status: 'pending',
|
2026-05-11 11:59:17 +08:00
|
|
|
|
handler: '李工',
|
|
|
|
|
|
deadline: '2025-05-24 14:30',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 'WO20250524002',
|
|
|
|
|
|
title: '区块 B-12 热斑复检',
|
|
|
|
|
|
source: '无人机巡检',
|
2026-05-08 11:00:11 +08:00
|
|
|
|
type: '巡检',
|
2026-05-11 11:59:17 +08:00
|
|
|
|
priority: 'high',
|
2026-05-11 12:40:31 +08:00
|
|
|
|
status: 'processing',
|
2026-05-11 11:59:17 +08:00
|
|
|
|
handler: '王工',
|
|
|
|
|
|
deadline: '2025-05-24 15:00',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 'WO20250524003',
|
|
|
|
|
|
title: '组件清洗任务 C-05',
|
|
|
|
|
|
source: '清洗优化',
|
|
|
|
|
|
type: '清洗',
|
|
|
|
|
|
priority: 'medium',
|
2026-05-11 12:40:31 +08:00
|
|
|
|
status: 'dispatched',
|
2026-05-11 11:59:17 +08:00
|
|
|
|
handler: '赵工',
|
|
|
|
|
|
deadline: '2025-05-24 16:00',
|
2026-05-08 11:00:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2026-05-11 11:59:17 +08:00
|
|
|
|
id: 'WO20250524004',
|
|
|
|
|
|
title: '周界摄像头 CAM-08 离线修复',
|
|
|
|
|
|
source: '视频监控',
|
|
|
|
|
|
type: '维修',
|
2026-05-08 11:00:11 +08:00
|
|
|
|
priority: 'medium',
|
2026-05-11 12:40:31 +08:00
|
|
|
|
status: 'processing',
|
2026-05-11 11:59:17 +08:00
|
|
|
|
handler: '陈工',
|
|
|
|
|
|
deadline: '2025-05-24 17:30',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 'WO20250524005',
|
|
|
|
|
|
title: '除草机器人补给',
|
|
|
|
|
|
source: '装备控制',
|
|
|
|
|
|
type: '运维',
|
|
|
|
|
|
priority: 'low',
|
2026-05-11 12:40:31 +08:00
|
|
|
|
status: 'pending',
|
2026-05-11 11:59:17 +08:00
|
|
|
|
handler: '刘工',
|
|
|
|
|
|
deadline: '2025-05-24 18:00',
|
2026-05-08 11:00:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2026-05-11 11:59:17 +08:00
|
|
|
|
id: 'WO20250524006',
|
|
|
|
|
|
title: '逆变器室夜间巡检',
|
|
|
|
|
|
source: '人工创建',
|
|
|
|
|
|
type: '巡检',
|
|
|
|
|
|
priority: 'medium',
|
2026-05-11 12:40:31 +08:00
|
|
|
|
status: 'completed',
|
2026-05-08 11:00:11 +08:00
|
|
|
|
handler: '张运维',
|
2026-05-11 11:59:17 +08:00
|
|
|
|
deadline: '2025-05-24 21:00',
|
2026-05-08 11:00:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
// 工单状态配置
|
|
|
|
|
|
const statusConfig = {
|
2026-05-11 12:40:31 +08:00
|
|
|
|
pending: { label: '待处理', color: '#52c41a', textColor: '#1890ff', bg: '#e6f7ff', border: '#91d5ff' },
|
|
|
|
|
|
dispatched: { label: '已派发', color: '#52c41a', textColor: '#52c41a', bg: '#f6ffed', border: '#b7eb8f' },
|
|
|
|
|
|
processing: { label: '执行中', color: '#1890ff', textColor: '#1890ff', bg: '#e6f7ff', border: '#91d5ff' },
|
|
|
|
|
|
completed: { label: '已完成', color: '#52c41a', textColor: '#52c41a', bg: '#f6ffed', border: '#b7eb8f' },
|
|
|
|
|
|
suspended: { label: '已挂起', color: '#faad14', textColor: '#faad14', bg: '#fff7e6', border: '#ffe7ba' }
|
2026-05-08 11:00:11 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 优先级配置
|
|
|
|
|
|
const priorityConfig = {
|
2026-05-11 12:40:31 +08:00
|
|
|
|
low: { label: '低', color: '#52c41a', bg: '#f6ffed' },
|
|
|
|
|
|
medium: { label: '中', color: '#faad14', bg: '#fff7e6' },
|
|
|
|
|
|
high: { label: '高', color: '#ff4d4f', bg: '#fff1f0' }
|
2026-05-08 11:00:11 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2026-05-11 12:40:31 +08:00
|
|
|
|
const WorkOrderPage = () => {
|
|
|
|
|
|
const [activeTab, setActiveTab] = useState('1');
|
|
|
|
|
|
const [selectedRowKey, setSelectedRowKey] = useState('WO20250524002');
|
2026-05-08 11:00:11 +08:00
|
|
|
|
|
2026-05-11 12:40:31 +08:00
|
|
|
|
// 统计数据
|
|
|
|
|
|
const stats = [
|
|
|
|
|
|
{ title: '今日新增工单', value: 18, subValue: '+3', subText: '较昨日', icon: <ClipboardList size={24} color="#1890ff" />, bg: '#e6f7ff' },
|
|
|
|
|
|
{ title: '待处理工单', value: 12, subValue: '5', subText: '高优先级', icon: <Clock size={24} color="#ff4d4f" />, bg: '#fff1f0' },
|
|
|
|
|
|
{ title: '执行中工单', value: 9, subValue: '92%', subText: '按时率', icon: <Play size={24} color="#52c41a" />, bg: '#f6ffed' },
|
|
|
|
|
|
{ title: '已完成工单', value: 126, subValue: '', subText: '本月累计', icon: <CheckCircle size={24} color="#52c41a" />, bg: '#f6ffed' },
|
|
|
|
|
|
{ title: '平均处理时长', value: 4.3, unit: '小时', subValue: '-12%', subText: '较上周', icon: <Timer size={24} color="#1890ff" />, bg: '#e6f7ff' },
|
|
|
|
|
|
{ title: 'AI建议生成', value: 7, unit: '单', subValue: '', subText: '今日自动生成', icon: <Cpu size={24} color="#722ed1" />, bg: '#f9f0ff' },
|
|
|
|
|
|
];
|
2026-05-08 11:00:11 +08:00
|
|
|
|
|
2026-05-11 12:40:31 +08:00
|
|
|
|
// 表格列
|
2026-05-08 11:00:11 +08:00
|
|
|
|
const columns = [
|
2026-05-11 12:40:31 +08:00
|
|
|
|
{ title: '工单编号', dataIndex: 'id', key: 'id', width: 130 },
|
|
|
|
|
|
{ title: '工单标题', dataIndex: 'title', key: 'title', width: 180, ellipsis: true },
|
2026-05-11 11:59:17 +08:00
|
|
|
|
{ title: '来源', dataIndex: 'source', key: 'source', width: 100 },
|
|
|
|
|
|
{ title: '类型', dataIndex: 'type', key: 'type', width: 80 },
|
2026-05-08 11:00:11 +08:00
|
|
|
|
{
|
|
|
|
|
|
title: '优先级',
|
|
|
|
|
|
dataIndex: 'priority',
|
|
|
|
|
|
key: 'priority',
|
|
|
|
|
|
width: 80,
|
2026-05-11 12:40:31 +08:00
|
|
|
|
render: (p) => (
|
|
|
|
|
|
<Tag color={priorityConfig[p].bg} style={{ color: priorityConfig[p].color, border: `1px solid ${priorityConfig[p].color}`, borderRadius: 4 }}>
|
|
|
|
|
|
{priorityConfig[p].label}
|
2026-05-08 11:00:11 +08:00
|
|
|
|
</Tag>
|
|
|
|
|
|
)
|
|
|
|
|
|
},
|
2026-05-11 11:59:17 +08:00
|
|
|
|
{ title: '负责人', dataIndex: 'handler', key: 'handler', width: 80 },
|
2026-05-11 12:40:31 +08:00
|
|
|
|
{ title: '截止时间', dataIndex: 'deadline', key: 'deadline', width: 150 },
|
2026-05-08 11:00:11 +08:00
|
|
|
|
{
|
|
|
|
|
|
title: '状态',
|
|
|
|
|
|
dataIndex: 'status',
|
|
|
|
|
|
key: 'status',
|
2026-05-11 12:40:31 +08:00
|
|
|
|
width: 90,
|
|
|
|
|
|
render: (s) => (
|
|
|
|
|
|
<span style={{ color: statusConfig[s].textColor }}>{statusConfig[s].label}</span>
|
2026-05-08 11:00:11 +08:00
|
|
|
|
)
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '操作',
|
|
|
|
|
|
key: 'action',
|
2026-05-11 12:40:31 +08:00
|
|
|
|
width: 60,
|
|
|
|
|
|
render: () => <Button type="link" size="small">查看</Button>
|
|
|
|
|
|
},
|
2026-05-08 11:00:11 +08:00
|
|
|
|
];
|
|
|
|
|
|
|
2026-05-11 12:40:31 +08:00
|
|
|
|
// 图表数据
|
2026-05-08 11:00:11 +08:00
|
|
|
|
const pieData = [
|
2026-05-11 12:40:31 +08:00
|
|
|
|
{ type: '待处理', value: 12 },
|
|
|
|
|
|
{ type: '执行中', value: 9 },
|
|
|
|
|
|
{ type: '已完成', value: 126 },
|
|
|
|
|
|
{ type: '已挂起', value: 4 },
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
const alarmTrendData = [
|
|
|
|
|
|
{ date: '05-18', value: 5 },
|
|
|
|
|
|
{ date: '05-19', value: 10 },
|
|
|
|
|
|
{ date: '05-20', value: 7 },
|
|
|
|
|
|
{ date: '05-21', value: 12 },
|
|
|
|
|
|
{ date: '05-22', value: 8 },
|
|
|
|
|
|
{ date: '05-23', value: 15 },
|
|
|
|
|
|
{ date: '05-24', value: 11 },
|
2026-05-08 11:00:11 +08:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<div style={{ padding: '16px 24px', background: '#f0f2f5', minHeight: '100vh' }}>
|
|
|
|
|
|
{/* 顶部标题和页签 */}
|
|
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 16 }}>
|
|
|
|
|
|
<Title level={4} style={{ margin: '0 32px 0 0' }}>工单任务</Title>
|
|
|
|
|
|
<Tabs
|
|
|
|
|
|
activeKey={activeTab}
|
|
|
|
|
|
onChange={setActiveTab}
|
|
|
|
|
|
items={[
|
|
|
|
|
|
{ key: '1', label: '工单总览' },
|
|
|
|
|
|
{ key: '2', label: '待处理工单' },
|
|
|
|
|
|
{ key: '3', label: '执行中' },
|
|
|
|
|
|
{ key: '4', label: '已完成' },
|
|
|
|
|
|
{ key: '5', label: '工单模板' },
|
|
|
|
|
|
]}
|
|
|
|
|
|
tabBarStyle={{ marginBottom: 0 }}
|
|
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{/* 统计卡片 */}
|
|
|
|
|
|
<Row gutter={16} style={{ marginBottom: 16 }}>
|
|
|
|
|
|
{stats.map((item, index) => (
|
|
|
|
|
|
<Col span={4} key={index}>
|
|
|
|
|
|
<Card bordered={false} bodyStyle={{ padding: '16px' }} style={{ borderRadius: 8 }}>
|
|
|
|
|
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
<div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Text type="secondary" style={{ fontSize: 13 }}>{item.title}</Text>
|
|
|
|
|
|
<div style={{ margin: '4px 0' }}>
|
|
|
|
|
|
<Text style={{ fontSize: 24, fontWeight: 'bold' }}>{item.value}</Text>
|
|
|
|
|
|
{item.unit && <Text style={{ fontSize: 14, marginLeft: 4 }}>{item.unit}</Text>}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div style={{ fontSize: 12 }}>
|
|
|
|
|
|
<Text type="secondary">{item.subText}</Text>
|
|
|
|
|
|
<Text style={{ marginLeft: 4, color: item.subValue.startsWith('+') ? '#52c41a' : item.subValue.startsWith('-') ? '#ff4d4f' : '#1890ff', fontWeight: 'bold' }}>
|
|
|
|
|
|
{item.subValue}
|
|
|
|
|
|
</Text>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<div style={{ width: 48, height: 48, borderRadius: '50%', background: item.bg, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
|
|
|
|
|
{item.icon}
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Card>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
))}
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
|
|
{/* 筛选栏 */}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Card bordered={false} bodyStyle={{ padding: '12px 16px' }} style={{ borderRadius: 8, marginBottom: 16 }}>
|
|
|
|
|
|
<Row gutter={16} align="middle">
|
|
|
|
|
|
<Col span={3}>
|
|
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
|
|
|
|
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>工单类型</Text>
|
|
|
|
|
|
<Select defaultValue="all" style={{ width: '100%' }}>
|
|
|
|
|
|
<Option value="all">全部</Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={3}>
|
|
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
|
|
|
|
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>优先级</Text>
|
|
|
|
|
|
<Select defaultValue="all" style={{ width: '100%' }}>
|
|
|
|
|
|
<Option value="all">全部</Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={3}>
|
|
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
|
|
|
|
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>负责人</Text>
|
|
|
|
|
|
<Select defaultValue="all" style={{ width: '100%' }}>
|
|
|
|
|
|
<Option value="all">全部</Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={5}>
|
|
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
|
|
|
|
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>时间范围</Text>
|
|
|
|
|
|
<RangePicker style={{ width: '100%' }} />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={3}>
|
|
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
|
|
|
|
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>状态</Text>
|
|
|
|
|
|
<Select defaultValue="all" style={{ width: '100%' }}>
|
|
|
|
|
|
<Option value="all">全部</Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={4}>
|
|
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
|
|
|
|
<Text style={{ marginRight: 8, whiteSpace: 'nowrap' }}>关键词</Text>
|
|
|
|
|
|
<Input placeholder="请输入工单编号/标题" suffix={<SearchOutlined />} />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={3} style={{ textAlign: 'right' }}>
|
|
|
|
|
|
<Space>
|
|
|
|
|
|
<Button>重置</Button>
|
|
|
|
|
|
<Button type="primary">查询</Button>
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
</Card>
|
2026-05-08 11:00:11 +08:00
|
|
|
|
|
2026-05-11 11:59:17 +08:00
|
|
|
|
<Row gutter={16}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
{/* 左侧:列表 + 底部图表 */}
|
|
|
|
|
|
<Col span={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 }}>(共 147 条)</Text></div>}
|
|
|
|
|
|
bodyStyle={{ padding: 0 }}
|
|
|
|
|
|
style={{ borderRadius: 8, marginBottom: 16 }}
|
|
|
|
|
|
>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
<Table
|
2026-05-11 12:40:31 +08:00
|
|
|
|
dataSource={workOrderData}
|
2026-05-11 11:59:17 +08:00
|
|
|
|
columns={columns}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
pagination={false}
|
|
|
|
|
|
size="middle"
|
|
|
|
|
|
rowKey="id"
|
2026-05-11 11:59:17 +08:00
|
|
|
|
scroll={{ x: 'max-content' }}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
rowSelection={{
|
|
|
|
|
|
type: 'radio',
|
|
|
|
|
|
selectedRowKeys: [selectedRowKey],
|
|
|
|
|
|
onChange: (keys) => setSelectedRowKey(keys[0] as string)
|
|
|
|
|
|
}}
|
2026-05-08 11:00:11 +08:00
|
|
|
|
/>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<div style={{ padding: '16px', textAlign: 'right' }}>
|
|
|
|
|
|
<Pagination size="small" total={147} showSizeChanger showQuickJumper />
|
|
|
|
|
|
</div>
|
2026-05-08 11:00:11 +08:00
|
|
|
|
</Card>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
|
|
|
|
|
|
<Row gutter={16}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Col span={10}>
|
|
|
|
|
|
<Card bordered={false} title="工单状态分布" style={{ borderRadius: 8, height: 360 }}>
|
|
|
|
|
|
<div style={{ height: 280, position: 'relative' }}>
|
|
|
|
|
|
<Pie
|
|
|
|
|
|
data={pieData}
|
|
|
|
|
|
angleField="value"
|
|
|
|
|
|
colorField="type"
|
|
|
|
|
|
radius={1}
|
|
|
|
|
|
innerRadius={0.6}
|
|
|
|
|
|
label={false}
|
|
|
|
|
|
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);
|
|
|
|
|
|
return `${item.value} (${percent}%)`;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}}
|
|
|
|
|
|
height={240}
|
|
|
|
|
|
/>
|
|
|
|
|
|
<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' }}>147</div>
|
|
|
|
|
|
</div>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</Card>
|
|
|
|
|
|
</Col>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Col span={14}>
|
|
|
|
|
|
<Card
|
|
|
|
|
|
bordered={false}
|
|
|
|
|
|
title="任务排班 / 日历视图"
|
|
|
|
|
|
extra={<Button type="link" size="small">更多 <ChevronRight size={14} /></Button>}
|
|
|
|
|
|
style={{ borderRadius: 8, height: 360 }}
|
|
|
|
|
|
>
|
|
|
|
|
|
<div style={{ marginBottom: 12 }}>
|
|
|
|
|
|
<Space>
|
|
|
|
|
|
<Button size="small" icon={<ChevronRight style={{ transform: 'rotate(180deg)' }} size={14} />} />
|
|
|
|
|
|
<Text strong>2025-05-24 (今天)</Text>
|
|
|
|
|
|
<Button size="small" icon={<ChevronRight size={14} />} />
|
|
|
|
|
|
</Space>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<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>
|
|
|
|
|
|
{['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>
|
|
|
|
|
|
{['李工', '王工', '赵工', '陈工'].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 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>}
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
))}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Card>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
2026-05-08 11:00:11 +08:00
|
|
|
|
</Col>
|
|
|
|
|
|
|
2026-05-11 12:40:31 +08:00
|
|
|
|
{/* 右侧:详情 + AI + 告警 */}
|
|
|
|
|
|
<Col span={9}>
|
|
|
|
|
|
<Card
|
|
|
|
|
|
bordered={false}
|
|
|
|
|
|
style={{ borderRadius: 8, marginBottom: 16 }}
|
|
|
|
|
|
bodyStyle={{ padding: '16px' }}
|
|
|
|
|
|
>
|
|
|
|
|
|
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 16 }}>
|
|
|
|
|
|
<Text strong style={{ fontSize: 16 }}>工单详情</Text>
|
|
|
|
|
|
<Text type="secondary" style={{ fontSize: 12 }}>工单编号: WO20250524002</Text>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-08 11:00:11 +08:00
|
|
|
|
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<div style={{ marginBottom: 20 }}>
|
|
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 8 }}>
|
|
|
|
|
|
<Title level={4} style={{ margin: '0 12px 0 0' }}>区块 B-12 热斑复检</Title>
|
|
|
|
|
|
<Tag color="#fff1f0" style={{ color: '#ff4d4f', border: '1px solid #ff4d4f' }}>高优先级</Tag>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
|
|
|
|
|
|
<Row gutter={[0, 12]}>
|
|
|
|
|
|
<Col span={12}><Text type="secondary">来源:</Text><Text>无人机巡检</Text></Col>
|
|
|
|
|
|
<Col span={12}><Text type="secondary">工单类型:</Text><Text>巡检</Text></Col>
|
|
|
|
|
|
<Col span={12}><Text type="secondary">负责人:</Text><Text>王工</Text></Col>
|
|
|
|
|
|
<Col span={12}><Text type="secondary">协同人员:</Text><Text>无人机 A01 / 张运维</Text></Col>
|
|
|
|
|
|
<Col span={24}><Text type="secondary">计划时间:</Text><Text>2025-05-24 13:30 - 15:00</Text></Col>
|
|
|
|
|
|
<Col span={12}><Text type="secondary">关联设备:</Text><Text style={{ color: '#1890ff' }}>UAV-A01</Text></Col>
|
|
|
|
|
|
<Col span={12}><Text type="secondary">关联区域:</Text><Text>B-12</Text></Col>
|
|
|
|
|
|
<Col span={24}><Text type="secondary">当前状态:</Text><Tag color="blue" style={{ borderRadius: 10 }}>执行中</Tag></Col>
|
|
|
|
|
|
<Col span={24}>
|
|
|
|
|
|
<Text type="secondary">任务描述:</Text>
|
|
|
|
|
|
<Text>对 AI 识别热斑区域进行复检与红外复核,确认是否需要更换组件。</Text>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<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>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</div>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Row gutter={8}>
|
|
|
|
|
|
<Col span={6}><Button type="primary" block>派发工单</Button></Col>
|
|
|
|
|
|
<Col span={6}><Button icon={<ReloadOutlined />} block>转派</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>
|
2026-05-08 11:00:11 +08:00
|
|
|
|
</Card>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Card
|
|
|
|
|
|
bordered={false}
|
|
|
|
|
|
title={<div style={{ display: 'flex', alignItems: 'center' }}><Text strong>AI 建议与关联信息</Text></div>}
|
|
|
|
|
|
style={{ borderRadius: 8, marginBottom: 16 }}
|
|
|
|
|
|
bodyStyle={{ padding: '12px' }}
|
|
|
|
|
|
>
|
|
|
|
|
|
<Row gutter={8}>
|
|
|
|
|
|
<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' }}>红外热像设备</div>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</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 }}>优先复检组件</div>
|
|
|
|
|
|
<div style={{ fontSize: 10, fontWeight: 'bold' }}>B-12-03 / B-12-05</div>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</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' }}>2.1%</div>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
</Card>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Row gutter={16}>
|
|
|
|
|
|
<Col span={12}>
|
|
|
|
|
|
<Card bordered={false} title="关联告警趋势 (近 7 天)" style={{ borderRadius: 8 }}>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
<Line
|
|
|
|
|
|
data={alarmTrendData}
|
|
|
|
|
|
xField="date"
|
2026-05-11 12:40:31 +08:00
|
|
|
|
yField="value"
|
2026-05-11 11:59:17 +08:00
|
|
|
|
smooth
|
2026-05-11 12:40:31 +08:00
|
|
|
|
point={{ size: 4, shape: 'circle' }}
|
|
|
|
|
|
height={120}
|
|
|
|
|
|
padding="auto"
|
|
|
|
|
|
xAxis={{ label: { style: { fontSize: 10 } } }}
|
|
|
|
|
|
yAxis={{ label: { style: { fontSize: 10 } } }}
|
2026-05-11 11:59:17 +08:00
|
|
|
|
/>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</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>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</Card>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
2026-05-08 11:00:11 +08:00
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
);
|
2026-05-11 12:40:31 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export default WorkOrderPage;
|