小细节优化和派单逻辑
This commit is contained in:
@@ -37,19 +37,21 @@ const { Option } = Select;
|
|||||||
// 告警模型管理子组件
|
// 告警模型管理子组件
|
||||||
const AlarmModelManagement: React.FC = () => {
|
const AlarmModelManagement: React.FC = () => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [list, setList] = useState<any[]>([]);
|
const [list, setList] = useState([]);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [modalVisible, setModalVisible] = useState(false);
|
const [modalVisible, setModalVisible] = useState(false);
|
||||||
const [editingItem, setEditingItem] = useState<any>(null);
|
const [editingItem, setEditingItem] = useState(null);
|
||||||
const { stationId } = useSelector((state: RootState) => state.station);
|
const { stationId } = useSelector((state: RootState) => state.station);
|
||||||
const { modal } = App.useApp();
|
const { modal } = App.useApp();
|
||||||
|
|
||||||
// 批量多选
|
// 批量多选
|
||||||
const [selectedRowKeys, setSelectedRowKeys] = useState<(string | number)[]>([]);
|
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||||
|
|
||||||
// 下拉数据源:错误编码列表、工单模型列表
|
// 下拉数据源:错误编码列表、工单模型列表
|
||||||
const [errorCodeOptions, setErrorCodeOptions] = useState<{ label: string; value: string }[]>([]);
|
const [errorCodeOptions, setErrorCodeOptions] = useState([]);
|
||||||
const [modelOptions, setModelOptions] = useState<{ label: string; value: number }[]>([]);
|
const [modelOptions, setModelOptions] = useState([]);
|
||||||
|
const { userInfo } = useSelector((state: RootState) => state.user);
|
||||||
|
|
||||||
|
|
||||||
// 获取告警模型列表
|
// 获取告警模型列表
|
||||||
const fetchList = async () => {
|
const fetchList = async () => {
|
||||||
@@ -185,7 +187,8 @@ const AlarmModelManagement: React.FC = () => {
|
|||||||
errorCode: values.errorCode,
|
errorCode: values.errorCode,
|
||||||
modelId: values.modelId,
|
modelId: values.modelId,
|
||||||
autoGenerateOrder: values.autoGenerateOrder ?? false,
|
autoGenerateOrder: values.autoGenerateOrder ?? false,
|
||||||
sourceType: values.sourceType ?? 1
|
sourceType: values.sourceType ?? 1,
|
||||||
|
orgId: userInfo?.orgId || '',
|
||||||
};
|
};
|
||||||
const res = await saveAlarmOrderConfigApi(submitParams);
|
const res = await saveAlarmOrderConfigApi(submitParams);
|
||||||
if (res.code === 200 && res.data === true) {
|
if (res.code === 200 && res.data === true) {
|
||||||
|
|||||||
@@ -807,7 +807,7 @@ export default function DeviceManagementPage() {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="负责人" name="userId" >
|
<Form.Item label="负责人" name="userId" >
|
||||||
<Select
|
<Select
|
||||||
placeholder="请先选择场站"
|
placeholder="请先选择负责人"
|
||||||
disabled={!userOptions.length}
|
disabled={!userOptions.length}
|
||||||
>
|
>
|
||||||
{userOptions.map(user => (
|
{userOptions.map(user => (
|
||||||
|
|||||||
@@ -144,6 +144,9 @@ export default function ErrorManagement() {
|
|||||||
// 新增校验规则字段
|
// 新增校验规则字段
|
||||||
field: values.field,
|
field: values.field,
|
||||||
compareType: values.compareType,
|
compareType: values.compareType,
|
||||||
|
orgId: userInfo?.orgId || '',
|
||||||
|
siteId: stationId || '',
|
||||||
|
|
||||||
// 区间/普通值统一拼接逗号字符串传给 compareValues
|
// 区间/普通值统一拼接逗号字符串传给 compareValues
|
||||||
compareValues: values.rangeMin && values.rangeMax
|
compareValues: values.rangeMin && values.rangeMax
|
||||||
? `${values.rangeMin},${values.rangeMax}`
|
? `${values.rangeMin},${values.rangeMax}`
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ export default function StationManage() {
|
|||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
...record,
|
...record,
|
||||||
status: record.status === 1,
|
status: record.status === 1,
|
||||||
dingTalkOrderPush: record.dingTalkOrderPush === 1,
|
dingTalkOrderPush: record.dingTalkOrderPush == true,
|
||||||
dingTalkPush: record.dingTalkPush === 1,
|
dingTalkPush: record.dingTalkPush === 1,
|
||||||
emailPush: record.emailPush === 1,
|
emailPush: record.emailPush === 1,
|
||||||
alertPush: record.alertPush === 1,
|
alertPush: record.alertPush === 1,
|
||||||
|
|||||||
@@ -262,6 +262,8 @@ const WorkOrderModelManagement: React.FC = () => {
|
|||||||
// 根据设备类型设置对应的路径字段
|
// 根据设备类型设置对应的路径字段
|
||||||
routeId: selectedDeviceType === 'robot' ? values.routeId : undefined,
|
routeId: selectedDeviceType === 'robot' ? values.routeId : undefined,
|
||||||
waylineId: selectedDeviceType === 'uav' ? values.waylineId : undefined,
|
waylineId: selectedDeviceType === 'uav' ? values.waylineId : undefined,
|
||||||
|
orgId: userInfo?.orgId || '',
|
||||||
|
|
||||||
};
|
};
|
||||||
if (editingItem) {
|
if (editingItem) {
|
||||||
res = await addWorkOrderModelApi({ ...payload, id: editingItem.id });
|
res = await addWorkOrderModelApi({ ...payload, id: editingItem.id });
|
||||||
|
|||||||
@@ -294,6 +294,11 @@ export default function AlarmCenterPage() {
|
|||||||
dataIndex: 'alarmContent',
|
dataIndex: 'alarmContent',
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '上报值',
|
||||||
|
dataIndex: 'time_values',
|
||||||
|
ellipsis: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '设备名称',
|
title: '设备名称',
|
||||||
dataIndex: 'deviceName',
|
dataIndex: 'deviceName',
|
||||||
|
|||||||
@@ -266,6 +266,18 @@ export const errorLevelOptions = [
|
|||||||
{ label: '警告', value: 'WARNING' },
|
{ label: '警告', value: 'WARNING' },
|
||||||
{ label: '错误', value: 'ERROR' },
|
{ label: '错误', value: 'ERROR' },
|
||||||
];
|
];
|
||||||
|
// 文本 → 数字(提交接口用)
|
||||||
|
export const levelText2Num = {
|
||||||
|
ERROR: 1,
|
||||||
|
WARNING: 2,
|
||||||
|
INFO: 3
|
||||||
|
};
|
||||||
|
// 数字 → 文本(回填、详情展示用)
|
||||||
|
export const levelNum2Text = {
|
||||||
|
1: 'ERROR',
|
||||||
|
2: 'WARNING',
|
||||||
|
3: 'INFO'
|
||||||
|
};
|
||||||
|
|
||||||
export const LEVEL_TAG_COLOR = {
|
export const LEVEL_TAG_COLOR = {
|
||||||
1: 'success',
|
1: 'success',
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import {
|
import {
|
||||||
Layout, Card, Row, Col, Button, Table, Tag, Select, Input, Typography, Space,
|
Layout, Card, Row, Col, Button, Table, Tag, Select, Input, Typography, Space,
|
||||||
Statistic, Modal, message, Empty, Drawer, Descriptions, Timeline, Divider, Form, Tabs, Progress, Badge, DatePicker, Pagination, Popconfirm, Image
|
Statistic, Modal, message, Empty, Drawer, Descriptions, Timeline, Divider, Form, Tabs, Progress, Badge, DatePicker, Pagination, Popconfirm, Image,
|
||||||
|
Tooltip
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import {
|
import {
|
||||||
CheckOutlined, ClockCircleOutlined, ControlOutlined,
|
CheckOutlined, ClockCircleOutlined, ControlOutlined,
|
||||||
@@ -36,7 +37,8 @@ import {
|
|||||||
startWorkOrder,
|
startWorkOrder,
|
||||||
completeWorkOrder,
|
completeWorkOrder,
|
||||||
suspendWorkOrder,
|
suspendWorkOrder,
|
||||||
deleteWorkOrder
|
deleteWorkOrder,
|
||||||
|
dispatchWorkOrder
|
||||||
} from '../api/workOrder';
|
} from '../api/workOrder';
|
||||||
import { getSiteDevice, getSiteUAVList } from '../api/device';
|
import { getSiteDevice, getSiteUAVList } from '../api/device';
|
||||||
import { UniversalLineChart } from '../components/recharts';
|
import { UniversalLineChart } from '../components/recharts';
|
||||||
@@ -45,7 +47,7 @@ import { orderTypeConfig, sourceTypeMap } from '../constants';
|
|||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import { RootState } from '../store';
|
import { RootState } from '../store';
|
||||||
import { getUser } from '../api/user';
|
import { getUser } from '../api/user';
|
||||||
import utils, { errorLevelOptions, getWorkOrderTypeText, levelColorMap, workOrderTypeOptions } from '../lib/utils';
|
import utils, { errorLevelOptions, getWorkOrderTypeText, levelColorMap, levelNum2Text, levelText2Num, workOrderTypeOptions } from '../lib/utils';
|
||||||
import { getAlarmList } from '../api/alarmApi';
|
import { getAlarmList } from '../api/alarmApi';
|
||||||
|
|
||||||
const { Option } = Select;
|
const { Option } = Select;
|
||||||
@@ -80,8 +82,6 @@ const WorkOrderPage = () => {
|
|||||||
const [workOrderList, setWorkOrderList] = useState([]);
|
const [workOrderList, setWorkOrderList] = useState([]);
|
||||||
const [workOrderTotal, setWorkOrderTotal] = useState(0);
|
const [workOrderTotal, setWorkOrderTotal] = useState(0);
|
||||||
const [currentDetail, setCurrentDetail] = useState(null);
|
const [currentDetail, setCurrentDetail] = useState(null);
|
||||||
const [userList, setUserList] = useState([]);
|
|
||||||
const [deviceList, setDeviceList] = useState([]);
|
|
||||||
const [orderStat, setOrderStat] = useState({
|
const [orderStat, setOrderStat] = useState({
|
||||||
todayAdd: 0, // 今日新增工单
|
todayAdd: 0, // 今日新增工单
|
||||||
pending: 0, // 待处理总数
|
pending: 0, // 待处理总数
|
||||||
@@ -97,6 +97,9 @@ const WorkOrderPage = () => {
|
|||||||
|
|
||||||
// 从 redux 获取用户信息
|
// 从 redux 获取用户信息
|
||||||
const { userInfo } = useSelector((state: RootState) => state.user);
|
const { userInfo } = useSelector((state: RootState) => state.user);
|
||||||
|
console.log(userInfo, 434234);
|
||||||
|
|
||||||
|
const isShowDispatch = userInfo?.roleId !== 26; //普通用户
|
||||||
const { stationId } = useSelector((state: RootState) => state.station);
|
const { stationId } = useSelector((state: RootState) => state.station);
|
||||||
const [deviceAll, setDevicesAll] = useState([]);
|
const [deviceAll, setDevicesAll] = useState([]);
|
||||||
|
|
||||||
@@ -145,6 +148,8 @@ const WorkOrderPage = () => {
|
|||||||
const [alarmChartData, setAlarmChartData] = useState([]);
|
const [alarmChartData, setAlarmChartData] = useState([]);
|
||||||
const [latestThreeAlarm, setLatestThreeAlarm] = useState([]);
|
const [latestThreeAlarm, setLatestThreeAlarm] = useState([]);
|
||||||
const [alarmAllModalVisible, setAlarmAllModalVisible] = useState(false);
|
const [alarmAllModalVisible, setAlarmAllModalVisible] = useState(false);
|
||||||
|
const [userList, setUserList] = useState([]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -195,6 +200,21 @@ const WorkOrderPage = () => {
|
|||||||
const nextScheduleDay = () => {
|
const nextScheduleDay = () => {
|
||||||
setScheduleDate(dayjs(scheduleDate).add(1, 'day').format('YYYY-MM-DD'));
|
setScheduleDate(dayjs(scheduleDate).add(1, 'day').format('YYYY-MM-DD'));
|
||||||
};
|
};
|
||||||
|
const getUserData = () => {
|
||||||
|
const params = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 99999,
|
||||||
|
orgId: userInfo?.orgId,
|
||||||
|
siteId: userInfo?.siteId,
|
||||||
|
};
|
||||||
|
getUser(params).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
setUserList(res.rows || []);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取工单配色(优先级)
|
// 获取工单配色(优先级)
|
||||||
@@ -230,7 +250,7 @@ const WorkOrderPage = () => {
|
|||||||
// 今日新增
|
// 今日新增
|
||||||
if (createDay === today) todayAdd++;
|
if (createDay === today) todayAdd++;
|
||||||
// 本月已完成
|
// 本月已完成
|
||||||
if (item.orderStatus === 4 && createDay >= monthStart) finishedMonth++;
|
if (item.orderStatus === 3 && createDay >= monthStart) finishedMonth++;
|
||||||
// AI生成工单 sourceType=7 告警自动生成
|
// AI生成工单 sourceType=7 告警自动生成
|
||||||
if (item.sourceType === 7) aiCreate++;
|
if (item.sourceType === 7) aiCreate++;
|
||||||
|
|
||||||
@@ -540,11 +560,18 @@ const WorkOrderPage = () => {
|
|||||||
});
|
});
|
||||||
setCompleteModalVisible(true);
|
setCompleteModalVisible(true);
|
||||||
};
|
};
|
||||||
|
const getRelatedAlarmInfo = (alarmId) => {
|
||||||
|
if (!alarmId || !weekAlarmList?.length) return null;
|
||||||
|
// 匹配规则:工单alarmId 对应告警 alarmNo,按需改成 alarm.id
|
||||||
|
const alarm = weekAlarmList.find(item => String(item.id) == String(alarmId));
|
||||||
|
return alarm?.alarmContent || null;
|
||||||
|
};
|
||||||
|
|
||||||
// 提交完成工单(参数完全对齐你的JSON)
|
// 提交完成工单(参数完全对齐你的JSON)
|
||||||
const submitComplete = async (values) => {
|
const submitComplete = async (values) => {
|
||||||
try {
|
try {
|
||||||
const now = dayjs().format('YYYY-MM-DDTHH:mm:ss');
|
// 1. 组装后端需要的 IOTWorkOrder JSON 对象
|
||||||
|
const now = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||||
// 1. 组装后端需要的 IOTWorkOrder JSON 对象
|
// 1. 组装后端需要的 IOTWorkOrder JSON 对象
|
||||||
const workOrderObj = {
|
const workOrderObj = {
|
||||||
...currentDetail,
|
...currentDetail,
|
||||||
@@ -557,6 +584,8 @@ const WorkOrderPage = () => {
|
|||||||
handleRemark: values.handleRemark,
|
handleRemark: values.handleRemark,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log('workOrderObj', workOrderObj);
|
||||||
|
|
||||||
// 2. 新建 FormData,适配 @RequestPart 混合参数
|
// 2. 新建 FormData,适配 @RequestPart 混合参数
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
// workOrder 字段:转JSON字符串
|
// workOrder 字段:转JSON字符串
|
||||||
@@ -611,6 +640,7 @@ const WorkOrderPage = () => {
|
|||||||
// 打开修改工单弹窗
|
// 打开修改工单弹窗
|
||||||
const openEditModal = () => {
|
const openEditModal = () => {
|
||||||
if (!selectedRowKey) return messageApi.warning('请先选择一条工单');
|
if (!selectedRowKey) return messageApi.warning('请先选择一条工单');
|
||||||
|
const levelText = levelNum2Text[currentDetail?.priorityLevel]; //数字转字符串
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
orderTitle: currentDetail?.orderTitle,
|
orderTitle: currentDetail?.orderTitle,
|
||||||
orderType: currentDetail?.orderType,
|
orderType: currentDetail?.orderType,
|
||||||
@@ -648,6 +678,7 @@ const WorkOrderPage = () => {
|
|||||||
orderTitle: values.orderTitle,
|
orderTitle: values.orderTitle,
|
||||||
orderType: values.orderType,
|
orderType: values.orderType,
|
||||||
priorityLevel: values.priorityLevel,
|
priorityLevel: values.priorityLevel,
|
||||||
|
//priorityLevel: levelText2Num[values.priorityLevel],
|
||||||
taskDescription: values.taskDescription,
|
taskDescription: values.taskDescription,
|
||||||
};
|
};
|
||||||
await updateWorkOrder(params);
|
await updateWorkOrder(params);
|
||||||
@@ -731,10 +762,19 @@ const WorkOrderPage = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetchAllData();
|
fetchAllData();
|
||||||
getWorkOrderList();
|
|
||||||
fetchWeekAlarmData(); // 新增加载7天告警
|
fetchWeekAlarmData(); // 新增加载7天告警
|
||||||
|
const initQuery = async () => {
|
||||||
|
const values = queryForm.getFieldsValue();
|
||||||
|
await getWorkOrderList(values);
|
||||||
|
};
|
||||||
|
initQuery();
|
||||||
}, [stationId]);
|
}, [stationId]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getUserData();
|
||||||
|
|
||||||
|
}, []);
|
||||||
|
|
||||||
const cardStyle = {
|
const cardStyle = {
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
border: '1px solid #f0f0f0',
|
border: '1px solid #f0f0f0',
|
||||||
@@ -771,8 +811,7 @@ const WorkOrderPage = () => {
|
|||||||
</Tag>
|
</Tag>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{ title: '设备名称', dataIndex: 'deviceName', key: 'deviceName', width: 160, ellipsis: true },
|
{ title: '设备', dataIndex: 'deviceId', key: 'deviceId', width: 160, ellipsis: true },
|
||||||
{ title: '站点', dataIndex: 'siteName', key: 'siteName', width: 130 },
|
|
||||||
{ title: '创建时间', dataIndex: 'createTime', key: 'createTime', width: 160 },
|
{ title: '创建时间', dataIndex: 'createTime', key: 'createTime', width: 160 },
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
@@ -832,8 +871,7 @@ const WorkOrderPage = () => {
|
|||||||
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 8 }}>
|
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 8 }}>
|
||||||
<Title level={4} style={{ margin: '0 32px 0 0' }}>工单任务管理</Title>
|
<Title level={4} style={{ margin: '0 32px 0 0' }}>工单任务管理</Title>
|
||||||
<Tabs activeKey={activeTab} onChange={setActiveTab} items={[
|
<Tabs activeKey={activeTab} onChange={setActiveTab} items={[
|
||||||
{ key: '1', label: '工单总览' }, { key: '2', label: '待处理工单' }, { key: '3', label: '执行中' },
|
{ key: '1', label: '工单总览' },
|
||||||
{ key: '4', label: '已完成' }, { key: '5', label: '工单模板' },
|
|
||||||
]} tabBarStyle={{ marginBottom: 0 }} />
|
]} tabBarStyle={{ marginBottom: 0 }} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -867,7 +905,9 @@ const WorkOrderPage = () => {
|
|||||||
|
|
||||||
{/* 筛选栏 */}
|
{/* 筛选栏 */}
|
||||||
<Card bordered={false} bodyStyle={{ padding: '8px 16px 0px 16px' }} style={{ ...cardStyle, marginBottom: 8 }}>
|
<Card bordered={false} bodyStyle={{ padding: '8px 16px 0px 16px' }} style={{ ...cardStyle, marginBottom: 8 }}>
|
||||||
<Form form={queryForm} layout="inline">
|
<Form form={queryForm} layout="inline" initialValues={{
|
||||||
|
orderStatus: 1
|
||||||
|
}}>
|
||||||
<Form.Item name="orderType" label="工单类型">
|
<Form.Item name="orderType" label="工单类型">
|
||||||
<Select style={{ width: 120 }} size="small" options={workOrderTypeOptions} allowClear showSearch optionFilterProp="label" filterOption={(input, option) => option.label.toLowerCase().includes(input.toLowerCase())} />
|
<Select style={{ width: 120 }} size="small" options={workOrderTypeOptions} allowClear showSearch optionFilterProp="label" filterOption={(input, option) => option.label.toLowerCase().includes(input.toLowerCase())} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -1056,9 +1096,19 @@ const WorkOrderPage = () => {
|
|||||||
zIndex: 2
|
zIndex: 2
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<b style={{ display: 'block', whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }}>
|
<Tooltip title={order.orderTitle}>
|
||||||
|
<b
|
||||||
|
style={{
|
||||||
|
display: 'block',
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
overflow: "hidden",
|
||||||
|
textOverflow: "ellipsis"
|
||||||
|
}}
|
||||||
|
>
|
||||||
{order.orderTitle}
|
{order.orderTitle}
|
||||||
</b>
|
</b>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
<span style={{ fontSize: 9 }}>
|
<span style={{ fontSize: 9 }}>
|
||||||
{dayjs(order.planStartTime).format('HH:mm')}
|
{dayjs(order.planStartTime).format('HH:mm')}
|
||||||
</span>
|
</span>
|
||||||
@@ -1171,7 +1221,8 @@ const WorkOrderPage = () => {
|
|||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<span style={{ fontSize: 12 }}>任务描述:</span>
|
<span style={{ fontSize: 12 }}>任务描述:</span>
|
||||||
<div style={{ fontSize: 12, color: '#4E5969', marginTop: 4, lineHeight: 1.6 }}>
|
<div style={{ fontSize: 12, color: '#4E5969', marginTop: 4, lineHeight: 1.6 }}>
|
||||||
{currentDetail?.taskDescription || '暂无描述'}
|
{getRelatedAlarmInfo(currentDetail?.alarmId)}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
@@ -1335,8 +1386,8 @@ const WorkOrderPage = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Row gutter={12}>
|
<Row style={{ display: 'flex', gap: 12 }}>
|
||||||
<Col span={6}>
|
<div style={{ flex: 1 }}>
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
block
|
block
|
||||||
@@ -1346,16 +1397,39 @@ const WorkOrderPage = () => {
|
|||||||
>
|
>
|
||||||
执行工单
|
执行工单
|
||||||
</Button>
|
</Button>
|
||||||
</Col>
|
</div>
|
||||||
<Col span={6}><Button icon={<EditOutlined />} block onClick={openEditModal} style={{ borderRadius: 8, height: 36, fontWeight: 600 }}>修改</Button></Col>
|
<div style={{ flex: 1 }}>
|
||||||
<Col span={6}><Popconfirm title="确定挂起?" onConfirm={handleSuspend}><Button icon={<PauseOutlined />} danger ghost block style={{ borderRadius: 8, height: 36, fontWeight: 600 }}>挂起</Button></Popconfirm></Col>
|
<Button icon={<EditOutlined />} block onClick={openEditModal} style={{ borderRadius: 8, height: 36, fontWeight: 600 }}>修改</Button>
|
||||||
<Col span={6}><Button
|
</div>
|
||||||
|
<div style={{ flex: 1 }}>
|
||||||
|
<Popconfirm title="确定挂起?" onConfirm={handleSuspend}>
|
||||||
|
<Button icon={<PauseOutlined />} danger ghost block style={{ borderRadius: 8, height: 36, fontWeight: 600 }}>挂起</Button>
|
||||||
|
</Popconfirm>
|
||||||
|
</div>
|
||||||
|
<div style={{ flex: 1 }}>
|
||||||
|
<Button
|
||||||
icon={<CheckCircleOutlined />}
|
icon={<CheckCircleOutlined />}
|
||||||
style={{ background: '#00B42A', color: '#fff', border: 'none', borderRadius: 8, height: 36, fontWeight: 600 }}
|
style={{ background: '#00B42A', color: '#fff', border: 'none', borderRadius: 8, height: 36, fontWeight: 600 }}
|
||||||
block
|
block
|
||||||
onClick={openCompleteModal}
|
onClick={openCompleteModal}
|
||||||
>完成</Button></Col>
|
>完成</Button>
|
||||||
|
</div>
|
||||||
|
{isShowDispatch && (
|
||||||
|
<div style={{ flex: 1 }}>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
block
|
||||||
|
onClick={openExecuteModal}
|
||||||
|
style={{ borderRadius: 8, height: 36, fontWeight: 600 }}
|
||||||
|
icon={<PlayCircleFilled />}
|
||||||
|
>
|
||||||
|
派单
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
|
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card bordered={false} title={<Text strong style={{ fontSize: 14, color: '#1D2129' }}>AI 建议与关联信息</Text>}
|
<Card bordered={false} title={<Text strong style={{ fontSize: 14, color: '#1D2129' }}>AI 建议与关联信息</Text>}
|
||||||
@@ -1491,9 +1565,12 @@ const WorkOrderPage = () => {
|
|||||||
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem name="priorityLevel" label="优先级" rules={[{ required: true, message: '请选择优先级' }]}>
|
<FormItem name="priorityLevel" label="优先级" rules={[{ required: true, message: '请选择优先级' }]}>
|
||||||
<Select placeholder="请选择优先级">
|
{/*<Select placeholder="请选择优先级">
|
||||||
<Option value={1}>高</Option><Option value={2}>中</Option><Option value={3}>低</Option>
|
<Option value={1}>ERROR(高)</Option><Option value={2}>WARNING</Option><Option value={3}>INFO</Option>
|
||||||
</Select>
|
</Select>*/}
|
||||||
|
<Form.Item name="priorityLevel" label="优先级">
|
||||||
|
<Select options={errorLevelOptions} allowClear />
|
||||||
|
</Form.Item>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem name="taskDescription" label="任务描述" rules={[{ required: true, message: '请输入任务描述' }]}>
|
<FormItem name="taskDescription" label="任务描述" rules={[{ required: true, message: '请输入任务描述' }]}>
|
||||||
<Input.TextArea rows={4} placeholder="请输入任务描述" />
|
<Input.TextArea rows={4} placeholder="请输入任务描述" />
|
||||||
|
|||||||
Reference in New Issue
Block a user