2026-05-14 08:45:14 +08:00
|
|
|
|
import React, { useState, useEffect } from 'react';
|
2026-05-08 11:00:11 +08:00
|
|
|
|
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,
|
2026-05-14 12:44:18 +08:00
|
|
|
|
RobotOutlined, ThunderboltOutlined, AlertOutlined,
|
|
|
|
|
|
CheckCircleOutlined
|
2026-05-08 11:00:11 +08:00
|
|
|
|
} from '@ant-design/icons';
|
2026-05-14 13:30:29 +08:00
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
|
|
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-14 08:45:14 +08:00
|
|
|
|
// 导入工单接口
|
2026-05-14 13:30:29 +08:00
|
|
|
|
import { getWorkOrderApi, getWorkOrderDetailApi, updateWorkOrder, dispatchWorkOrder, completeWorkOrder } from '../api/workOrder';
|
2026-05-14 15:15:50 +08:00
|
|
|
|
import { UniversalLineChart } from '../components/recharts';
|
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-14 08:45:14 +08:00
|
|
|
|
const FormItem = Form.Item;
|
2026-05-08 11:00:11 +08:00
|
|
|
|
|
2026-05-14 08:45:14 +08:00
|
|
|
|
// 优先级数字映射 1高 2中 3低
|
|
|
|
|
|
const priorityConfig = {
|
|
|
|
|
|
1: { label: '高', color: '#ff4d4f', bg: '#fff1f0', border: '#ff4d4f' },
|
|
|
|
|
|
2: { label: '中', color: '#faad14', bg: '#fff7e6', border: '#faad14' },
|
|
|
|
|
|
3: { label: '低', color: '#52c41a', bg: '#f6ffed', border: '#52c41a' }
|
2026-05-08 11:00:11 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2026-05-14 08:45:14 +08:00
|
|
|
|
// 工单状态数字映射
|
|
|
|
|
|
const orderStatusConfig = {
|
|
|
|
|
|
1: { label: '待处理', textColor: '#1890ff' },
|
|
|
|
|
|
2: { label: '执行中', textColor: '#1890ff' },
|
|
|
|
|
|
3: { label: '挂起', textColor: '#faad14' },
|
|
|
|
|
|
4: { label: '已完成', textColor: '#52c41a' },
|
|
|
|
|
|
5: { label: '处理中', textColor: '#722ed1' }
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 工单类型映射
|
|
|
|
|
|
const orderTypeConfig = {
|
|
|
|
|
|
1: '巡检',
|
|
|
|
|
|
2: '检修',
|
|
|
|
|
|
3: '清洗',
|
|
|
|
|
|
4: '维修',
|
|
|
|
|
|
5: '运维'
|
2026-05-08 11:00:11 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2026-05-11 12:40:31 +08:00
|
|
|
|
const WorkOrderPage = () => {
|
|
|
|
|
|
const [activeTab, setActiveTab] = useState('1');
|
2026-05-14 08:45:14 +08:00
|
|
|
|
const [selectedRowKey, setSelectedRowKey] = useState('');
|
|
|
|
|
|
// 接口相关状态
|
|
|
|
|
|
const [loading, setLoading] = useState(false);
|
|
|
|
|
|
const [workOrderList, setWorkOrderList] = useState([]);
|
|
|
|
|
|
const [workOrderTotal, setWorkOrderTotal] = useState(0);
|
|
|
|
|
|
const [currentDetail, setCurrentDetail] = useState(null);
|
|
|
|
|
|
// 弹窗表单
|
|
|
|
|
|
const [form] = Form.useForm();
|
|
|
|
|
|
const [editModalVisible, setEditModalVisible] = useState(false);
|
|
|
|
|
|
const [dispatchModalVisible, setDispatchModalVisible] = useState(false);
|
2026-05-08 11:00:11 +08:00
|
|
|
|
|
2026-05-14 13:30:29 +08:00
|
|
|
|
const [completeModalVisible, setCompleteModalVisible] = useState(false);
|
|
|
|
|
|
const [completeForm] = Form.useForm(); // 完成工单表单
|
2026-05-15 15:39:28 +08:00
|
|
|
|
const [messageApi, contextHolder] = message.useMessage();
|
|
|
|
|
|
|
2026-05-14 13:30:29 +08:00
|
|
|
|
|
2026-05-14 08:45:14 +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-14 08:45:14 +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
|
|
|
|
];
|
|
|
|
|
|
|
2026-05-14 08:45:14 +08:00
|
|
|
|
// ========== 接口请求方法 ==========
|
|
|
|
|
|
// 获取工单列表
|
|
|
|
|
|
const getWorkOrderList = async () => {
|
|
|
|
|
|
setLoading(true);
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res = await getWorkOrderApi();
|
|
|
|
|
|
if (res.code == 0) {
|
|
|
|
|
|
setWorkOrderList(res.rows || []);
|
|
|
|
|
|
setWorkOrderTotal(res.total || 0);
|
|
|
|
|
|
if (res.rows && res.rows.length > 0) {
|
|
|
|
|
|
setSelectedRowKey(res.rows[0].id);
|
|
|
|
|
|
getWorkOrderDetail(res.rows[0].id);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (error) {
|
2026-05-15 15:39:28 +08:00
|
|
|
|
messageApi.error('获取工单列表失败');
|
2026-05-14 08:45:14 +08:00
|
|
|
|
} finally {
|
|
|
|
|
|
setLoading(false);
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2026-05-14 13:30:29 +08:00
|
|
|
|
// 打开完成工单弹窗
|
|
|
|
|
|
const openCompleteModal = () => {
|
2026-05-15 15:39:28 +08:00
|
|
|
|
if (!selectedRowKey) return messageApi.warning('请先选择工单');
|
2026-05-14 13:30:29 +08:00
|
|
|
|
completeForm.setFieldsValue({
|
|
|
|
|
|
id: currentDetail?.id,
|
|
|
|
|
|
orderNo: currentDetail?.orderNo,
|
|
|
|
|
|
handleResult: '已处理完成',
|
|
|
|
|
|
handleRemark: '',
|
|
|
|
|
|
});
|
|
|
|
|
|
setCompleteModalVisible(true);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 提交完成工单
|
|
|
|
|
|
const submitComplete = async (values) => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
// 构造后端需要的参数(只需要传 id + 处理信息)
|
|
|
|
|
|
const params = {
|
|
|
|
|
|
id: values.id,
|
|
|
|
|
|
handleResult: values.handleResult,
|
|
|
|
|
|
handleRemark: values.handleRemark,
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
await completeWorkOrder(params);
|
2026-05-15 15:39:28 +08:00
|
|
|
|
messageApi.success('工单已完成');
|
2026-05-14 13:30:29 +08:00
|
|
|
|
setCompleteModalVisible(false);
|
|
|
|
|
|
// 刷新列表 + 详情
|
|
|
|
|
|
getWorkOrderList();
|
|
|
|
|
|
getWorkOrderDetail(selectedRowKey);
|
|
|
|
|
|
} catch (err) {
|
2026-05-15 15:39:28 +08:00
|
|
|
|
messageApi.error('工单完成失败');
|
2026-05-14 13:30:29 +08:00
|
|
|
|
console.error(err);
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2026-05-14 08:45:14 +08:00
|
|
|
|
// 获取工单详情
|
|
|
|
|
|
const getWorkOrderDetail = async (id) => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res = await getWorkOrderDetailApi(id);
|
2026-05-14 13:30:29 +08:00
|
|
|
|
if (res.code == 200) {
|
2026-05-14 08:45:14 +08:00
|
|
|
|
setCurrentDetail(res.data);
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (error) {
|
2026-05-15 15:39:28 +08:00
|
|
|
|
messageApi.error('获取工单详情失败');
|
2026-05-14 08:45:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 选中表格行
|
|
|
|
|
|
const handleRowSelect = (keys) => {
|
|
|
|
|
|
if (keys.length > 0) {
|
|
|
|
|
|
setSelectedRowKey(keys[0]);
|
|
|
|
|
|
getWorkOrderDetail(keys[0]);
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 打开修改工单弹窗
|
|
|
|
|
|
const openEditModal = () => {
|
2026-05-15 15:39:28 +08:00
|
|
|
|
if (!selectedRowKey) return messageApi.warning('请先选择一条工单');
|
2026-05-14 08:45:14 +08:00
|
|
|
|
form.setFieldsValue({
|
2026-05-15 15:39:28 +08:00
|
|
|
|
orderTitle: currentDetail?.orderTitle,
|
|
|
|
|
|
orderType: currentDetail?.orderType,
|
|
|
|
|
|
priorityLevel: currentDetail?.priorityLevel,
|
|
|
|
|
|
taskDescription: currentDetail?.taskDescription,
|
2026-05-14 08:45:14 +08:00
|
|
|
|
});
|
|
|
|
|
|
setEditModalVisible(true);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2026-05-14 13:30:29 +08:00
|
|
|
|
// 打开派发工单弹窗
|
2026-05-14 08:45:14 +08:00
|
|
|
|
// 打开派发工单弹窗
|
|
|
|
|
|
const openDispatchModal = () => {
|
2026-05-15 15:39:28 +08:00
|
|
|
|
if (!selectedRowKey) return messageApi.warning('请先选择一条工单');
|
2026-05-14 08:45:14 +08:00
|
|
|
|
form.setFieldsValue({
|
2026-05-14 13:30:29 +08:00
|
|
|
|
orderId: selectedRowKey, // 自动回填工单ID
|
|
|
|
|
|
assigneeName: currentDetail?.assigneeName || '',
|
|
|
|
|
|
planStartTime: currentDetail?.planStartTime ? dayjs(currentDetail.planStartTime) : null,
|
|
|
|
|
|
planEndTime: currentDetail?.planEndTime ? dayjs(currentDetail.planEndTime) : null,
|
|
|
|
|
|
deadlineTime: currentDetail?.deadlineTime ? dayjs(currentDetail.deadlineTime) : null,
|
2026-05-14 08:45:14 +08:00
|
|
|
|
});
|
|
|
|
|
|
setDispatchModalVisible(true);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 提交修改工单
|
2026-05-15 15:39:28 +08:00
|
|
|
|
// 提交修改工单(完整匹配后端参数)
|
2026-05-14 08:45:14 +08:00
|
|
|
|
const submitEdit = async (values) => {
|
|
|
|
|
|
try {
|
2026-05-15 15:39:28 +08:00
|
|
|
|
// 拼接你给的所有工单参数(1:1 匹配)
|
|
|
|
|
|
const params = {
|
|
|
|
|
|
id: selectedRowKey, // 主键ID
|
|
|
|
|
|
orderNo: currentDetail?.orderNo, // 工单编号
|
|
|
|
|
|
orderTitle: values.orderTitle, // 工单标题
|
|
|
|
|
|
sourceType: currentDetail?.sourceType, // 来源(保持不变)
|
|
|
|
|
|
orderType: values.orderType, // 类型
|
|
|
|
|
|
priorityLevel: values.priorityLevel, // 优先级
|
|
|
|
|
|
deviceId: currentDetail?.deviceId, // 设备ID
|
|
|
|
|
|
deviceName: currentDetail?.deviceName, // 设备名称
|
|
|
|
|
|
deviceType: currentDetail?.deviceType,
|
|
|
|
|
|
siteId: currentDetail?.siteId,
|
|
|
|
|
|
siteName: currentDetail?.siteName,
|
|
|
|
|
|
orgId: currentDetail?.orgId,
|
|
|
|
|
|
assigneeId: currentDetail?.assigneeId,
|
|
|
|
|
|
assigneeName: currentDetail?.assigneeName,
|
|
|
|
|
|
collaboratorIds: currentDetail?.collaboratorIds,
|
|
|
|
|
|
collaboratorNames: currentDetail?.collaboratorNames,
|
|
|
|
|
|
planStartTime: currentDetail?.planStartTime,
|
|
|
|
|
|
planEndTime: currentDetail?.planEndTime,
|
|
|
|
|
|
deadlineTime: currentDetail?.deadlineTime,
|
|
|
|
|
|
actualStartTime: currentDetail?.actualStartTime,
|
|
|
|
|
|
actualEndTime: currentDetail?.actualEndTime,
|
|
|
|
|
|
orderStatus: currentDetail?.orderStatus,
|
|
|
|
|
|
alarmId: currentDetail?.alarmId,
|
|
|
|
|
|
alarmNo: currentDetail?.alarmNo,
|
|
|
|
|
|
taskDescription: values.taskDescription, // 任务描述
|
|
|
|
|
|
aiSuggestion: currentDetail?.aiSuggestion,
|
|
|
|
|
|
requiredEquipment: currentDetail?.requiredEquipment,
|
|
|
|
|
|
estimatedImpact: currentDetail?.estimatedImpact,
|
|
|
|
|
|
handleResult: currentDetail?.handleResult,
|
|
|
|
|
|
handleRemark: currentDetail?.handleRemark,
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 调用你提供的接口
|
|
|
|
|
|
await updateWorkOrder(params);
|
|
|
|
|
|
|
|
|
|
|
|
messageApi.success('修改工单成功');
|
2026-05-14 08:45:14 +08:00
|
|
|
|
setEditModalVisible(false);
|
2026-05-15 15:39:28 +08:00
|
|
|
|
// 刷新列表和详情
|
2026-05-14 08:45:14 +08:00
|
|
|
|
getWorkOrderList();
|
2026-05-15 15:39:28 +08:00
|
|
|
|
getWorkOrderDetail(selectedRowKey);
|
2026-05-14 08:45:14 +08:00
|
|
|
|
} catch (error) {
|
2026-05-15 15:39:28 +08:00
|
|
|
|
messageApi.error('修改工单失败');
|
|
|
|
|
|
console.error(error);
|
2026-05-14 08:45:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2026-05-14 13:30:29 +08:00
|
|
|
|
// 提交派发工单
|
2026-05-14 08:45:14 +08:00
|
|
|
|
// 提交派发工单
|
|
|
|
|
|
const submitDispatch = async (values) => {
|
|
|
|
|
|
try {
|
2026-05-14 13:30:29 +08:00
|
|
|
|
// 拼接接口需要的参数(完全按你给的格式)
|
|
|
|
|
|
const params = {
|
|
|
|
|
|
orderId: values.orderId,
|
|
|
|
|
|
assigneeId: values.assigneeName === '王工' ? 1003 : '', // 你可以自己映射ID
|
|
|
|
|
|
assigneeName: values.assigneeName,
|
|
|
|
|
|
collaboratorIds: '',
|
|
|
|
|
|
collaboratorNames: values.collaboratorNames?.join(',') || '',
|
|
|
|
|
|
planStartTime: values.planStartTime ? values.planStartTime.format('YYYY-MM-DDTHH:mm:ss') : '',
|
|
|
|
|
|
planEndTime: values.planEndTime ? values.planEndTime.format('YYYY-MM-DDTHH:mm:ss') : '',
|
|
|
|
|
|
deadlineTime: values.deadlineTime ? values.deadlineTime.format('YYYY-MM-DDTHH:mm:ss') : '',
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
await dispatchWorkOrder(params);
|
|
|
|
|
|
|
2026-05-15 15:39:28 +08:00
|
|
|
|
messageApi.success('工单派发成功');
|
2026-05-14 08:45:14 +08:00
|
|
|
|
setDispatchModalVisible(false);
|
2026-05-14 13:30:29 +08:00
|
|
|
|
getWorkOrderList(); // 刷新列表
|
2026-05-14 08:45:14 +08:00
|
|
|
|
} catch (error) {
|
2026-05-15 15:39:28 +08:00
|
|
|
|
messageApi.error('工单派发失败');
|
2026-05-14 13:30:29 +08:00
|
|
|
|
console.error(error);
|
2026-05-14 08:45:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
|
getWorkOrderList();
|
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
2026-05-14 12:44:18 +08:00
|
|
|
|
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",
|
2026-05-14 13:30:29 +08:00
|
|
|
|
render: (_, record) => (
|
|
|
|
|
|
<Button
|
|
|
|
|
|
type="link"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
onClick={() => {
|
|
|
|
|
|
setSelectedRowKey(record.id);
|
|
|
|
|
|
getWorkOrderDetail(record.id);
|
|
|
|
|
|
}}
|
|
|
|
|
|
>
|
|
|
|
|
|
查看
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
)
|
2026-05-14 12:44:18 +08:00
|
|
|
|
},
|
|
|
|
|
|
];
|
|
|
|
|
|
|
2026-05-08 11:00:11 +08:00
|
|
|
|
return (
|
2026-05-15 15:39:28 +08:00
|
|
|
|
<div style={{ padding: '0px 0px', background: '#f5f7fa', minHeight: '100vh', boxSizing: 'border-box' }}>
|
|
|
|
|
|
{contextHolder}
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<style>
|
|
|
|
|
|
{`
|
|
|
|
|
|
.compact-table .ant-table-thead > tr > th {
|
|
|
|
|
|
background: #f8fafc;
|
2026-05-14 17:23:12 +08:00
|
|
|
|
padding: 2px 4px !important;
|
2026-05-14 12:44:18 +08:00
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
color: #4E5969;
|
|
|
|
|
|
}
|
|
|
|
|
|
.compact-table .ant-table-tbody > tr > td {
|
2026-05-14 17:23:12 +08:00
|
|
|
|
padding: 2px 4px !important;
|
2026-05-14 12:44:18 +08:00
|
|
|
|
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>
|
|
|
|
|
|
|
2026-05-11 12:40:31 +08:00
|
|
|
|
{/* 顶部标题和页签 */}
|
2026-05-15 15:39:28 +08:00
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 8 }}>
|
|
|
|
|
|
<Title level={4} style={{ margin: '0 32px 0 0', }}>工单任务管理</Title>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
|
|
{/* 统计卡片 */}
|
2026-05-14 17:23:12 +08:00
|
|
|
|
<Row gutter={[8, 8]} style={{ marginBottom: 8 }}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
{stats.map((item, index) => (
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<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>}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</div>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<div style={{ fontSize: 11, color: '#86909C' }}>
|
|
|
|
|
|
{item.subText}
|
|
|
|
|
|
<span style={{
|
|
|
|
|
|
marginLeft: 4,
|
|
|
|
|
|
fontWeight: 700,
|
|
|
|
|
|
color: item.subValue.includes('+') ? '#00B42A' : (item.subValue.includes('-') ? '#F53F3F' : '#165DFF')
|
|
|
|
|
|
}}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
{item.subValue}
|
2026-05-14 09:37:15 +08:00
|
|
|
|
</span>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<div style={{
|
|
|
|
|
|
width: 52, height: 52, borderRadius: 14, background: item.bg,
|
|
|
|
|
|
display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
|
|
|
|
boxShadow: `0 4px 10px ${item.bg}80`
|
|
|
|
|
|
}}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
{item.icon}
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Card>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
))}
|
|
|
|
|
|
</Row>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
|
2026-05-11 11:59:17 +08:00
|
|
|
|
{/* 筛选栏 */}
|
2026-05-14 17:23:12 +08:00
|
|
|
|
<Card bordered={false} bodyStyle={{ padding: '12px 16px' }} style={{ ...cardStyle, marginBottom: 8 }}>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Row gutter={[16, 12]} align="middle">
|
|
|
|
|
|
<Col xs={12} sm={8} md={4} xl={3}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<span className="filter-label">工单类型</span>
|
|
|
|
|
|
<Select defaultValue="all" style={{ width: '100%' }} size="small">
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Option value="all">全部</Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Col xs={12} sm={8} md={4} xl={3}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<span className="filter-label">优先级</span>
|
|
|
|
|
|
<Select defaultValue="all" style={{ width: '100%' }} size="small">
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Option value="all">全部</Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Col xs={12} sm={8} md={4} xl={3}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<span className="filter-label">负责人</span>
|
|
|
|
|
|
<Select defaultValue="all" style={{ width: '100%' }} size="small">
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Option value="all">全部</Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Col xs={24} sm={16} md={8} xl={5}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<span className="filter-label">时间范围</span>
|
|
|
|
|
|
<RangePicker style={{ width: '100%' }} size="small" />
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Col xs={12} sm={8} md={4} xl={3}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<span className="filter-label">状态</span>
|
|
|
|
|
|
<Select defaultValue="all" style={{ width: '100%' }} size="small">
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Option value="all">全部</Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Col xs={24} sm={16} md={10} xl={4}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<span className="filter-label">关键词</span>
|
|
|
|
|
|
<Input placeholder="请输入工单编号/标题" prefix={<SearchOutlined />} size="small" />
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</Col>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Col xs={24} sm={8} md={4} xl={3} style={{ textAlign: 'right' }}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Space>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Button size="small">重置</Button>
|
|
|
|
|
|
<Button type="primary" size="small" icon={<SearchOutlined />}>查询</Button>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</Space>
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
</Card>
|
2026-05-08 11:00:11 +08:00
|
|
|
|
|
2026-05-14 17:23:12 +08:00
|
|
|
|
<Row gutter={[8, 8]}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
{/* 左侧:列表 + 底部图表 */}
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Col xs={24} xl={15}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Card
|
|
|
|
|
|
bordered={false}
|
2026-05-14 12:44:18 +08:00
|
|
|
|
title={<Space size={8}><Text strong style={{ fontSize: 15, color: '#1D2129' }}>工单列表</Text><Text type="secondary" style={{ fontSize: 12 }}>(共 {workOrderTotal} 条)</Text></Space>}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
bodyStyle={{ padding: 0 }}
|
2026-05-14 17:23:12 +08:00
|
|
|
|
style={{ ...cardStyle, marginBottom: 8 }}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
<Table
|
2026-05-14 08:45:14 +08:00
|
|
|
|
dataSource={workOrderList}
|
2026-05-11 11:59:17 +08:00
|
|
|
|
columns={columns}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
pagination={false}
|
2026-05-14 08:45:14 +08:00
|
|
|
|
loading={loading}
|
2026-05-14 12:44:18 +08:00
|
|
|
|
size="small"
|
2026-05-11 12:40:31 +08:00
|
|
|
|
rowKey="id"
|
2026-05-14 12:44:18 +08:00
|
|
|
|
className="compact-table"
|
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],
|
2026-05-14 08:45:14 +08:00
|
|
|
|
onChange: handleRowSelect
|
2026-05-11 12:40:31 +08:00
|
|
|
|
}}
|
2026-05-08 11:00:11 +08:00
|
|
|
|
/>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<div style={{ padding: '12px 16px', textAlign: 'right' }}>
|
2026-05-14 08:45:14 +08:00
|
|
|
|
<Pagination size="small" total={workOrderTotal} showSizeChanger showQuickJumper />
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</div>
|
2026-05-08 11:00:11 +08:00
|
|
|
|
</Card>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<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' }}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Pie
|
|
|
|
|
|
data={pieData}
|
|
|
|
|
|
angleField="value"
|
|
|
|
|
|
colorField="type"
|
|
|
|
|
|
radius={1}
|
2026-05-14 12:44:18 +08:00
|
|
|
|
innerRadius={0.65}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
label={false}
|
2026-05-14 12:44:18 +08:00
|
|
|
|
color={['#1890ff', '#165DFF', '#00B42A', '#F53F3F']}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
legend={{
|
|
|
|
|
|
position: 'right',
|
|
|
|
|
|
layout: 'vertical',
|
|
|
|
|
|
itemValueLabel: {
|
|
|
|
|
|
formatter: (text, item) => {
|
|
|
|
|
|
const total = pieData.reduce((a, b) => a + b.value, 0);
|
2026-05-14 12:44:18 +08:00
|
|
|
|
const percent = ((item.value / total) * 100).toFixed(1);
|
2026-05-11 12:40:31 +08:00
|
|
|
|
return `${item.value} (${percent}%)`;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}}
|
2026-05-14 12:44:18 +08:00
|
|
|
|
height={260}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
/>
|
|
|
|
|
|
<div style={{ position: 'absolute', top: '42%', left: '30%', textAlign: 'center', transform: 'translate(-50%, -50%)' }}>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<div style={{ fontSize: 12, color: '#86909C' }}>总数</div>
|
|
|
|
|
|
<div style={{ fontSize: 28, fontWeight: 800, color: '#1D2129' }}>{workOrderTotal}</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</div>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</Card>
|
|
|
|
|
|
</Col>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Col xs={24} md={15}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Card
|
|
|
|
|
|
bordered={false}
|
2026-05-14 12:44:18 +08:00
|
|
|
|
title={<Text strong style={{ fontSize: 14 }}>任务排班 / 日历视图</Text>}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
extra={<Button type="link" size="small">更多 <ChevronRight size={14} /></Button>}
|
2026-05-14 12:44:18 +08:00
|
|
|
|
style={{ ...cardStyle, height: 380 }}
|
|
|
|
|
|
bodyStyle={{ padding: '16px' }}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<div style={{ marginBottom: 16 }}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Space>
|
|
|
|
|
|
<Button size="small" icon={<ChevronRight style={{ transform: 'rotate(180deg)' }} size={14} />} />
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Text strong style={{ fontSize: 13 }}>2025-05-24 (今天)</Text>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Button size="small" icon={<ChevronRight size={14} />} />
|
|
|
|
|
|
</Space>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<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>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
{['08:00', '10:00', '12:00', '14:00', '16:00', '18:00'].map(t => (
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<div key={t} style={{ flex: 1, padding: '10px 0', textAlign: 'center', fontSize: 11, color: '#86909C', fontWeight: 500 }}>{t}</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
))}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{['李工', '王工', '赵工', '陈工'].map((name, idx) => (
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<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>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<div style={{ flex: 1, position: 'relative' }}>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
{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>}
|
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 + 告警 */}
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Col xs={24} xl={9}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Card
|
|
|
|
|
|
bordered={false}
|
2026-05-14 12:44:18 +08:00
|
|
|
|
style={cardStyle}
|
|
|
|
|
|
bodyStyle={{ padding: '20px' }}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<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>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-08 11:00:11 +08:00
|
|
|
|
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<div style={{ marginBottom: 24 }}>
|
|
|
|
|
|
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 16, flexWrap: 'wrap', gap: 12 }}>
|
2026-05-15 15:39:28 +08:00
|
|
|
|
<span level={4} style={{ margin: 0, fontSize: 18, fontWeight: 800 }}>{currentDetail?.orderTitle || '暂无标题'}</span>
|
2026-05-14 08:45:14 +08:00
|
|
|
|
{currentDetail?.priorityLevel && (
|
|
|
|
|
|
<Tag
|
|
|
|
|
|
style={{
|
|
|
|
|
|
color: priorityConfig[currentDetail.priorityLevel]?.color,
|
|
|
|
|
|
background: priorityConfig[currentDetail.priorityLevel]?.bg,
|
2026-05-14 12:44:18 +08:00
|
|
|
|
border: `1px solid ${priorityConfig[currentDetail.priorityLevel]?.color}`,
|
|
|
|
|
|
borderRadius: 4,
|
|
|
|
|
|
fontWeight: 600,
|
|
|
|
|
|
margin: 0
|
2026-05-14 08:45:14 +08:00
|
|
|
|
}}
|
|
|
|
|
|
>
|
|
|
|
|
|
{priorityConfig[currentDetail.priorityLevel].label}优先级
|
|
|
|
|
|
</Tag>
|
|
|
|
|
|
)}
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Row gutter={[16, 16]} style={{ background: '#f8fafc', padding: 16, borderRadius: 12, marginBottom: 20 }}>
|
2026-05-15 15:39:28 +08:00
|
|
|
|
<Col span={12}><span style={{ fontSize: 12 }}>来源:</span><span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.sourceType || '--'}</span></Col>
|
|
|
|
|
|
<Col span={12}><span style={{ fontSize: 12 }}>工单类型:</span><span style={{ fontSize: 12, fontWeight: 500 }}>{orderTypeConfig[currentDetail?.orderType] || '--'}</span></Col>
|
|
|
|
|
|
<Col span={12}><span style={{ fontSize: 12 }}>负责人:</span><span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.assigneeName || '--'}</span></Col>
|
|
|
|
|
|
<Col span={12}><span style={{ fontSize: 12 }}>协同人员:</span><span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.collaboratorNames || '无'}</span></Col>
|
|
|
|
|
|
<Col span={24}><span style={{ fontSize: 12 }}>计划时间:</span><span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.planStartTime ? `${currentDetail.planStartTime} ~ ${currentDetail.planEndTime}` : '--'}</span></Col>
|
|
|
|
|
|
<Col span={12}><span style={{ fontSize: 12 }}>关联设备:</span><span style={{ fontSize: 12, color: '#165DFF', fontWeight: 600 }}>{currentDetail?.deviceName || '无'}</span></Col>
|
|
|
|
|
|
<Col span={12}><span style={{ fontSize: 12 }}>关联区域:</span><span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.siteName || '无'}</span></Col>
|
2026-05-14 08:45:14 +08:00
|
|
|
|
<Col span={24}>
|
2026-05-15 15:39:28 +08:00
|
|
|
|
<span style={{ fontSize: 12 }}>当前状态:</span>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Tag color="blue" style={{ borderRadius: 4, fontWeight: 600, border: 'none', background: '#E8F3FF', color: '#165DFF' }}>{orderStatusConfig[currentDetail?.orderStatus]?.label || '--'}</Tag>
|
2026-05-14 08:45:14 +08:00
|
|
|
|
</Col>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Col span={24}>
|
2026-05-15 15:39:28 +08:00
|
|
|
|
<span style={{ fontSize: 12 }}>任务描述:</span>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<div style={{ fontSize: 12, color: '#4E5969', marginTop: 4, lineHeight: 1.6 }}>{currentDetail?.taskDescription || '暂无描述'}</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<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>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
|
|
|
|
|
|
{[
|
|
|
|
|
|
{ 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>
|
|
|
|
|
|
))}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</div>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<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>
|
2026-05-14 13:30:29 +08:00
|
|
|
|
<Col span={6}><Button
|
|
|
|
|
|
icon={<CheckCircleOutlined />}
|
|
|
|
|
|
style={{ background: '#00B42A', color: '#fff', border: 'none', borderRadius: 8, height: 36, fontWeight: 600 }}
|
|
|
|
|
|
block
|
|
|
|
|
|
onClick={openCompleteModal}
|
|
|
|
|
|
>
|
|
|
|
|
|
完成工单
|
|
|
|
|
|
</Button></Col>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</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}
|
2026-05-14 12:44:18 +08:00
|
|
|
|
title={<Text strong style={{ fontSize: 14, color: '#1D2129' }}>AI 建议与关联信息</Text>}
|
|
|
|
|
|
style={{ ...cardStyle, marginTop: 16 }}
|
|
|
|
|
|
bodyStyle={{ padding: '16px' }}
|
2026-05-11 12:40:31 +08:00
|
|
|
|
>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<Row gutter={12} style={{ marginBottom: 16 }}>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
<Col span={8}>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<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>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={8}>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<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>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</Col>
|
|
|
|
|
|
<Col span={8}>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<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>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-11 12:40:31 +08:00
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<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>
|
2026-05-14 15:15:50 +08:00
|
|
|
|
<UniversalLineChart
|
2026-05-11 11:59:17 +08:00
|
|
|
|
data={alarmTrendData}
|
2026-05-14 15:15:50 +08:00
|
|
|
|
xKey="date"
|
2026-05-14 12:44:18 +08:00
|
|
|
|
height={130}
|
2026-05-14 15:15:50 +08:00
|
|
|
|
backgroundColor="transparent"
|
|
|
|
|
|
showLegend={false}
|
|
|
|
|
|
showTooltip={true}
|
|
|
|
|
|
showGrid={true}
|
|
|
|
|
|
smooth
|
|
|
|
|
|
dot
|
|
|
|
|
|
series={[
|
|
|
|
|
|
{
|
|
|
|
|
|
key: 'value',
|
|
|
|
|
|
name: '告警数量',
|
|
|
|
|
|
color: '#165DFF',
|
|
|
|
|
|
strokeWidth: 2,
|
|
|
|
|
|
},
|
|
|
|
|
|
]}
|
2026-05-11 11:59:17 +08:00
|
|
|
|
/>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
</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>
|
2026-05-11 11:59:17 +08:00
|
|
|
|
</div>
|
2026-05-14 12:44:18 +08:00
|
|
|
|
<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>
|
2026-05-08 11:00:11 +08:00
|
|
|
|
</Col>
|
|
|
|
|
|
</Row>
|
2026-05-14 08:45:14 +08:00
|
|
|
|
|
2026-05-15 15:39:28 +08:00
|
|
|
|
{/* 修改工单弹窗 */}
|
2026-05-14 08:45:14 +08:00
|
|
|
|
{/* 修改工单弹窗 */}
|
|
|
|
|
|
<Modal title="修改工单" open={editModalVisible} onCancel={() => setEditModalVisible(false)} footer={null} width={520}>
|
|
|
|
|
|
<Form form={form} layout="vertical" onFinish={submitEdit}>
|
2026-05-15 15:39:28 +08:00
|
|
|
|
<FormItem
|
|
|
|
|
|
name="orderTitle"
|
|
|
|
|
|
label="工单标题"
|
|
|
|
|
|
rules={[{ required: true, message: '请输入工单标题' }]}
|
|
|
|
|
|
>
|
2026-05-14 08:45:14 +08:00
|
|
|
|
<Input placeholder="请输入工单标题" />
|
|
|
|
|
|
</FormItem>
|
2026-05-15 15:39:28 +08:00
|
|
|
|
|
|
|
|
|
|
<FormItem
|
|
|
|
|
|
name="orderType"
|
|
|
|
|
|
label="工单类型"
|
|
|
|
|
|
rules={[{ required: true, message: '请选择工单类型' }]}
|
|
|
|
|
|
>
|
|
|
|
|
|
<Select placeholder="请选择工单类型">
|
|
|
|
|
|
<Option value={1}>巡检</Option>
|
|
|
|
|
|
<Option value={2}>检修</Option>
|
|
|
|
|
|
<Option value={3}>清洗</Option>
|
|
|
|
|
|
<Option value={4}>维修</Option>
|
|
|
|
|
|
<Option value={5}>运维</Option>
|
|
|
|
|
|
</Select>
|
2026-05-14 08:45:14 +08:00
|
|
|
|
</FormItem>
|
2026-05-15 15:39:28 +08:00
|
|
|
|
|
|
|
|
|
|
<FormItem
|
|
|
|
|
|
name="priorityLevel"
|
|
|
|
|
|
label="优先级"
|
|
|
|
|
|
rules={[{ required: true, message: '请选择优先级' }]}
|
|
|
|
|
|
>
|
2026-05-14 08:45:14 +08:00
|
|
|
|
<Select placeholder="请选择优先级">
|
|
|
|
|
|
<Option value={1}>高</Option>
|
|
|
|
|
|
<Option value={2}>中</Option>
|
|
|
|
|
|
<Option value={3}>低</Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
</FormItem>
|
2026-05-15 15:39:28 +08:00
|
|
|
|
|
|
|
|
|
|
<FormItem
|
|
|
|
|
|
name="taskDescription"
|
|
|
|
|
|
label="任务描述"
|
|
|
|
|
|
rules={[{ required: true, message: '请输入任务描述' }]}
|
|
|
|
|
|
>
|
|
|
|
|
|
<Input.TextArea rows={4} placeholder="请输入任务描述" />
|
2026-05-14 08:45:14 +08:00
|
|
|
|
</FormItem>
|
2026-05-15 15:39:28 +08:00
|
|
|
|
|
2026-05-14 08:45:14 +08:00
|
|
|
|
<FormItem style={{ textAlign: 'right', marginBottom: 0 }}>
|
|
|
|
|
|
<Button onClick={() => setEditModalVisible(false)}>取消</Button>
|
2026-05-15 15:39:28 +08:00
|
|
|
|
<Button type="primary" htmlType="submit" style={{ marginLeft: 8 }}>
|
|
|
|
|
|
确认修改
|
|
|
|
|
|
</Button>
|
2026-05-14 08:45:14 +08:00
|
|
|
|
</FormItem>
|
|
|
|
|
|
</Form>
|
|
|
|
|
|
</Modal>
|
|
|
|
|
|
|
2026-05-14 13:30:29 +08:00
|
|
|
|
|
2026-05-14 08:45:14 +08:00
|
|
|
|
{/* 派发工单弹窗 */}
|
2026-05-14 13:30:29 +08:00
|
|
|
|
<Modal title="派发工单" open={dispatchModalVisible} onCancel={() => setDispatchModalVisible(false)} footer={null} width={550}>
|
2026-05-14 08:45:14 +08:00
|
|
|
|
<Form form={form} layout="vertical" onFinish={submitDispatch}>
|
2026-05-14 13:30:29 +08:00
|
|
|
|
<FormItem name="orderId" label="工单ID" hidden>
|
|
|
|
|
|
<Input />
|
2026-05-14 08:45:14 +08:00
|
|
|
|
</FormItem>
|
2026-05-14 13:30:29 +08:00
|
|
|
|
|
|
|
|
|
|
<FormItem
|
|
|
|
|
|
name="assigneeName"
|
|
|
|
|
|
label="负责人"
|
|
|
|
|
|
rules={[{ required: true, message: '请选择负责人' }]}
|
|
|
|
|
|
>
|
|
|
|
|
|
<Select placeholder="请选择负责人">
|
|
|
|
|
|
<Option value="王工">王工</Option>
|
|
|
|
|
|
<Option value="李工">李工</Option>
|
|
|
|
|
|
<Option value="张工">张工</Option>
|
|
|
|
|
|
<Option value="陈工">陈工</Option>
|
2026-05-14 08:45:14 +08:00
|
|
|
|
</Select>
|
|
|
|
|
|
</FormItem>
|
2026-05-14 13:30:29 +08:00
|
|
|
|
|
|
|
|
|
|
<FormItem name="collaboratorNames" label="协同人员">
|
|
|
|
|
|
<Select mode="tags" placeholder="可输入多个,回车确认" />
|
2026-05-14 08:45:14 +08:00
|
|
|
|
</FormItem>
|
2026-05-14 13:30:29 +08:00
|
|
|
|
|
|
|
|
|
|
<FormItem name="planStartTime" label="计划开始时间">
|
|
|
|
|
|
<DatePicker showTime style={{ width: '100%' }} />
|
|
|
|
|
|
</FormItem>
|
|
|
|
|
|
|
|
|
|
|
|
<FormItem name="planEndTime" label="计划结束时间">
|
|
|
|
|
|
<DatePicker showTime style={{ width: '100%' }} />
|
|
|
|
|
|
</FormItem>
|
|
|
|
|
|
|
|
|
|
|
|
<FormItem name="deadlineTime" label="截止时间">
|
|
|
|
|
|
<DatePicker showTime style={{ width: '100%' }} />
|
2026-05-14 08:45:14 +08:00
|
|
|
|
</FormItem>
|
2026-05-14 13:30:29 +08:00
|
|
|
|
|
2026-05-14 08:45:14 +08:00
|
|
|
|
<FormItem style={{ textAlign: 'right', marginBottom: 0 }}>
|
|
|
|
|
|
<Button onClick={() => setDispatchModalVisible(false)}>取消</Button>
|
|
|
|
|
|
<Button type="primary" htmlType="submit" style={{ marginLeft: 8 }}>确认派发</Button>
|
|
|
|
|
|
</FormItem>
|
|
|
|
|
|
</Form>
|
|
|
|
|
|
</Modal>
|
2026-05-14 13:30:29 +08:00
|
|
|
|
|
|
|
|
|
|
{/* 完成工单弹窗 */}
|
|
|
|
|
|
<Modal
|
|
|
|
|
|
title="完成工单"
|
|
|
|
|
|
open={completeModalVisible}
|
|
|
|
|
|
onCancel={() => setCompleteModalVisible(false)}
|
|
|
|
|
|
footer={null}
|
|
|
|
|
|
width={500}
|
|
|
|
|
|
>
|
|
|
|
|
|
<Form form={completeForm} layout="vertical" onFinish={submitComplete}>
|
|
|
|
|
|
<Form.Item name="id" hidden>
|
|
|
|
|
|
<Input />
|
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
|
|
<Form.Item name="orderNo" label="工单编号">
|
|
|
|
|
|
<Input disabled />
|
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
|
|
<Form.Item
|
|
|
|
|
|
name="handleResult"
|
|
|
|
|
|
label="处理结果"
|
|
|
|
|
|
rules={[{ required: true, message: '请输入处理结果' }]}
|
|
|
|
|
|
>
|
|
|
|
|
|
<Select placeholder="请选择处理结果">
|
|
|
|
|
|
<Option value="已处理完成">已处理完成</Option>
|
|
|
|
|
|
<Option value="已修复">已修复</Option>
|
|
|
|
|
|
<Option value="无需处理">无需处理</Option>
|
|
|
|
|
|
<Option value="问题已闭环">问题已闭环</Option>
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
|
|
<Form.Item name="handleRemark" label="处理备注">
|
|
|
|
|
|
<Input.TextArea rows={4} placeholder="请填写处理详情、备注信息" />
|
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
|
|
<Form.Item style={{ textAlign: 'right', marginBottom: 0 }}>
|
|
|
|
|
|
<Button onClick={() => setCompleteModalVisible(false)}>取消</Button>
|
|
|
|
|
|
<Button type="primary" htmlType="submit" style={{ marginLeft: 8 }}>
|
|
|
|
|
|
确认完成
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
</Form>
|
|
|
|
|
|
</Modal>
|
2026-05-08 11:00:11 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
);
|
2026-05-11 12:40:31 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export default WorkOrderPage;
|