错误管理页面完成
This commit is contained in:
@@ -320,3 +320,57 @@ export function delteCodesApi(ids) {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== 错误管理 ====================
|
||||
|
||||
// 分页查询错误列表
|
||||
export function getErrorListApi(params) {
|
||||
return request({
|
||||
url: '/system/error/page',
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 查询错误列表(不分页)
|
||||
export function getErrorListAllApi(params) {
|
||||
return request({
|
||||
url: '/system/error/list',
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 查询错误详情
|
||||
export function getErrorDetailApi(id) {
|
||||
return request({
|
||||
url: `/system/error/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增错误
|
||||
export function addErrorApi(data) {
|
||||
return request({
|
||||
url: '/system/error',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改错误
|
||||
export function updateErrorApi(data) {
|
||||
return request({
|
||||
url: '/system/error',
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除错误
|
||||
export function deleteErrorApi(ids) {
|
||||
return request({
|
||||
url: `/system/error/${ids}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
649
src/components/SystemSetting/ErrorManagement.tsx
Normal file
649
src/components/SystemSetting/ErrorManagement.tsx
Normal file
@@ -0,0 +1,649 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import {
|
||||
Table,
|
||||
Input,
|
||||
Button,
|
||||
Form,
|
||||
Select,
|
||||
Space,
|
||||
Tag,
|
||||
Modal,
|
||||
Card,
|
||||
Typography,
|
||||
InputNumber,
|
||||
Row,
|
||||
Col,
|
||||
App,
|
||||
Divider,
|
||||
} from 'antd';
|
||||
import {
|
||||
SearchOutlined,
|
||||
ReloadOutlined,
|
||||
PlusOutlined,
|
||||
EditOutlined,
|
||||
DeleteOutlined,
|
||||
EyeOutlined,
|
||||
ExclamationCircleOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import {
|
||||
getErrorListApi,
|
||||
addErrorApi,
|
||||
updateErrorApi,
|
||||
deleteErrorApi,
|
||||
getErrorDetailApi,
|
||||
} from '@/api/systemSetting';
|
||||
import utils from '@/lib/utils';
|
||||
|
||||
const { TextArea } = Input;
|
||||
const { Text, Title } = Typography;
|
||||
const { Option } = Select;
|
||||
|
||||
// 错误类型选项
|
||||
const errorTypeOptions = [
|
||||
{ label: '机器人故障', value: 'ROBOT' },
|
||||
{ label: '设备故障', value: 'DEVICE' },
|
||||
{ label: '系统异常', value: 'SYSTEM' },
|
||||
{ label: '通信故障', value: 'COMMUNICATION' },
|
||||
{ label: '传感器故障', value: 'SENSOR' },
|
||||
{ label: '其他', value: 'OTHER' },
|
||||
];
|
||||
|
||||
// 严重程度选项
|
||||
const severityOptions = [
|
||||
{ label: '轻微', value: 'MINOR' },
|
||||
{ label: '一般', value: 'NORMAL' },
|
||||
{ label: '严重', value: 'SERIOUS' },
|
||||
{ label: '紧急', value: 'CRITICAL' },
|
||||
];
|
||||
|
||||
// 错误状态选项
|
||||
const statusOptions = [
|
||||
{ label: '未处理', value: 'PENDING' },
|
||||
{ label: '处理中', value: 'PROCESSING' },
|
||||
{ label: '已解决', value: 'RESOLVED' },
|
||||
{ label: '已忽略', value: 'IGNORED' },
|
||||
];
|
||||
|
||||
// 模拟错误数据
|
||||
const mockErrorList = [
|
||||
{
|
||||
id: 1,
|
||||
errorCode: 'ERR-ROBOT-001',
|
||||
errorName: '机器人运动异常',
|
||||
errorType: 'ROBOT',
|
||||
severity: 'SERIOUS',
|
||||
status: 'PROCESSING',
|
||||
deviceCode: 'ROBOT-001',
|
||||
description: '机器人在运动过程中出现卡顿现象,无法正常完成导航任务',
|
||||
solution: '检查电机驱动模块,重新校准导航传感器',
|
||||
createTime: '2025-05-20 14:30:00',
|
||||
updateTime: '2025-05-21 09:15:00',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
errorCode: 'ERR-CAM-002',
|
||||
errorName: '摄像头连接失败',
|
||||
errorType: 'DEVICE',
|
||||
severity: 'NORMAL',
|
||||
status: 'PENDING',
|
||||
deviceCode: 'CAM-002',
|
||||
description: '摄像头无法正常连接到系统,视频流中断',
|
||||
solution: '检查摄像头电源和网络连接,重启摄像头设备',
|
||||
createTime: '2025-05-21 10:20:00',
|
||||
updateTime: '2025-05-21 10:20:00',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
errorCode: 'ERR-SYS-001',
|
||||
errorName: '数据库连接超时',
|
||||
errorType: 'SYSTEM',
|
||||
severity: 'CRITICAL',
|
||||
status: 'RESOLVED',
|
||||
deviceCode: 'SERVER-01',
|
||||
description: '系统与数据库的连接出现超时,导致部分功能无法正常使用',
|
||||
solution: '优化数据库连接池配置,增加连接数量',
|
||||
createTime: '2025-05-19 08:45:00',
|
||||
updateTime: '2025-05-19 10:30:00',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
errorCode: 'ERR-SENSOR-003',
|
||||
errorName: '激光雷达数据异常',
|
||||
errorType: 'SENSOR',
|
||||
severity: 'SERIOUS',
|
||||
status: 'PENDING',
|
||||
deviceCode: 'LIDAR-001',
|
||||
description: '激光雷达返回的数据出现异常波动,影响建图精度',
|
||||
solution: '清洁激光雷达镜头,检查传感器安装位置',
|
||||
createTime: '2025-05-21 15:00:00',
|
||||
updateTime: '2025-05-21 15:00:00',
|
||||
},
|
||||
];
|
||||
const AntdCard = Card as any;
|
||||
|
||||
|
||||
export default function ErrorManagement() {
|
||||
const { modal } = App.useApp();
|
||||
const [form] = Form.useForm();
|
||||
const [searchForm] = Form.useForm();
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [errorList, setErrorList] = useState(mockErrorList);
|
||||
const [total, setTotal] = useState(mockErrorList.length);
|
||||
const [params, setParams] = useState({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
errorCode: '',
|
||||
errorName: '',
|
||||
errorType: '',
|
||||
status: '',
|
||||
});
|
||||
|
||||
const [modalVisible, setModalVisible] = useState(false);
|
||||
const [modalType, setModalType] = useState<'add' | 'edit' | 'view'>('add');
|
||||
const [currentRecord, setCurrentRecord] = useState<any>(null);
|
||||
|
||||
// 获取错误列表
|
||||
const fetchErrorList = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
// 真实 API 调用
|
||||
// const res = await getErrorListApi(params);
|
||||
// if (res.code === 200) {
|
||||
// setErrorList(res.rows || []);
|
||||
// setTotal(res.total || res.rows?.length || 0);
|
||||
// }
|
||||
|
||||
// 模拟数据
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
let filteredList = [...mockErrorList];
|
||||
|
||||
if (params.errorCode) {
|
||||
filteredList = filteredList.filter(item =>
|
||||
item.errorCode.toLowerCase().includes(params.errorCode.toLowerCase())
|
||||
);
|
||||
}
|
||||
if (params.errorName) {
|
||||
filteredList = filteredList.filter(item =>
|
||||
item.errorName.toLowerCase().includes(params.errorName.toLowerCase())
|
||||
);
|
||||
}
|
||||
if (params.errorType) {
|
||||
filteredList = filteredList.filter(item => item.errorType === params.errorType);
|
||||
}
|
||||
if (params.status) {
|
||||
filteredList = filteredList.filter(item => item.status === params.status);
|
||||
}
|
||||
|
||||
setErrorList(filteredList);
|
||||
setTotal(filteredList.length);
|
||||
} catch (err) {
|
||||
utils.message.error('获取错误列表失败');
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
fetchErrorList();
|
||||
}, [params]);
|
||||
|
||||
// 打开弹窗
|
||||
const openModal = (type: 'add' | 'edit' | 'view', record?: any) => {
|
||||
setModalType(type);
|
||||
setCurrentRecord(record);
|
||||
setModalVisible(true);
|
||||
|
||||
if (type === 'edit' || type === 'view') {
|
||||
form.setFieldsValue(record);
|
||||
} else {
|
||||
form.resetFields();
|
||||
}
|
||||
};
|
||||
|
||||
// 保存错误
|
||||
const handleSave = async (values: any) => {
|
||||
try {
|
||||
if (modalType === 'add') {
|
||||
// 真实 API 调用
|
||||
// const res = await addErrorApi(values);
|
||||
// if (res.code === 200) {
|
||||
// utils.message.success('新增成功');
|
||||
// setModalVisible(false);
|
||||
// fetchErrorList();
|
||||
// }
|
||||
|
||||
// 模拟新增
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
const newError = {
|
||||
...values,
|
||||
id: Date.now(),
|
||||
createTime: new Date().toLocaleString(),
|
||||
updateTime: new Date().toLocaleString(),
|
||||
};
|
||||
setErrorList([newError, ...errorList]);
|
||||
setTotal(total + 1);
|
||||
utils.message.success('新增成功');
|
||||
setModalVisible(false);
|
||||
} else if (modalType === 'edit') {
|
||||
// 真实 API 调用
|
||||
// const res = await updateErrorApi({ ...values, id: currentRecord.id });
|
||||
// if (res.code === 200) {
|
||||
// utils.message.success('更新成功');
|
||||
// setModalVisible(false);
|
||||
// fetchErrorList();
|
||||
// }
|
||||
|
||||
// 模拟更新
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
setErrorList(errorList.map(item =>
|
||||
item.id === currentRecord.id
|
||||
? { ...item, ...values, updateTime: new Date().toLocaleString() }
|
||||
: item
|
||||
));
|
||||
utils.message.success('更新成功');
|
||||
setModalVisible(false);
|
||||
}
|
||||
} catch (err) {
|
||||
utils.message.error('操作失败');
|
||||
}
|
||||
};
|
||||
|
||||
// 删除错误
|
||||
const handleDelete = (record: any) => {
|
||||
modal.confirm({
|
||||
title: '确认删除',
|
||||
content: `确定要删除错误 "${record.errorName}" 吗?`,
|
||||
icon: <ExclamationCircleOutlined />,
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
onOk: async () => {
|
||||
try {
|
||||
// 真实 API 调用
|
||||
// const res = await deleteErrorApi(record.id);
|
||||
// if (res.code === 200) {
|
||||
// utils.message.success('删除成功');
|
||||
// fetchErrorList();
|
||||
// }
|
||||
|
||||
// 模拟删除
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
setErrorList(errorList.filter(item => item.id !== record.id));
|
||||
setTotal(total - 1);
|
||||
utils.message.success('删除成功');
|
||||
} catch (err) {
|
||||
utils.message.error('删除失败');
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
// 搜索
|
||||
const handleSearch = () => {
|
||||
searchForm.validateFields().then(values => {
|
||||
setParams({
|
||||
...params,
|
||||
pageNum: 1,
|
||||
...values,
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// 重置
|
||||
const handleReset = () => {
|
||||
searchForm.resetFields();
|
||||
setParams({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
errorCode: '',
|
||||
errorName: '',
|
||||
errorType: '',
|
||||
status: '',
|
||||
});
|
||||
};
|
||||
|
||||
// 获取类型标签颜色
|
||||
const getTypeColor = (type: string) => {
|
||||
const colorMap: Record<string, string> = {
|
||||
ROBOT: 'blue',
|
||||
DEVICE: 'green',
|
||||
SYSTEM: 'purple',
|
||||
COMMUNICATION: 'orange',
|
||||
SENSOR: 'cyan',
|
||||
OTHER: 'default',
|
||||
};
|
||||
return colorMap[type] || 'default';
|
||||
};
|
||||
|
||||
// 获取严重程度标签颜色
|
||||
const getSeverityColor = (severity: string) => {
|
||||
const colorMap: Record<string, string> = {
|
||||
MINOR: 'default',
|
||||
NORMAL: 'blue',
|
||||
SERIOUS: 'orange',
|
||||
CRITICAL: 'red',
|
||||
};
|
||||
return colorMap[severity] || 'default';
|
||||
};
|
||||
|
||||
// 获取状态标签颜色
|
||||
const getStatusColor = (status: string) => {
|
||||
const colorMap: Record<string, string> = {
|
||||
PENDING: 'orange',
|
||||
PROCESSING: 'blue',
|
||||
RESOLVED: 'green',
|
||||
IGNORED: 'default',
|
||||
};
|
||||
return colorMap[status] || 'default';
|
||||
};
|
||||
|
||||
// 表格列定义
|
||||
const columns = [
|
||||
{
|
||||
title: '错误编码',
|
||||
dataIndex: 'errorCode',
|
||||
key: 'errorCode',
|
||||
width: 150,
|
||||
fixed: 'left' as const,
|
||||
},
|
||||
{
|
||||
title: '错误名称',
|
||||
dataIndex: 'errorName',
|
||||
key: 'errorName',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'errorType',
|
||||
key: 'errorType',
|
||||
width: 120,
|
||||
render: (text: string) => {
|
||||
const typeObj = errorTypeOptions.find(t => t.value === text);
|
||||
return <Tag color={getTypeColor(text)}>{typeObj?.label || text}</Tag>;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '严重程度',
|
||||
dataIndex: 'severity',
|
||||
key: 'severity',
|
||||
width: 100,
|
||||
render: (text: string) => {
|
||||
const severityObj = severityOptions.find(t => t.value === text);
|
||||
return <Tag color={getSeverityColor(text)}>{severityObj?.label || text}</Tag>;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
width: 100,
|
||||
render: (text: string) => {
|
||||
const statusObj = statusOptions.find(t => t.value === text);
|
||||
return <Tag color={getStatusColor(text)}>{statusObj?.label || text}</Tag>;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '关联设备',
|
||||
dataIndex: 'deviceCode',
|
||||
key: 'deviceCode',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
dataIndex: 'description',
|
||||
key: 'description',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
key: 'createTime',
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 300,
|
||||
fixed: 'right' as const,
|
||||
render: (_: any, record: any) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
icon={<EyeOutlined />}
|
||||
onClick={() => openModal('view', record)}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
icon={<EditOutlined />}
|
||||
onClick={() => openModal('edit', record)}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
danger
|
||||
icon={<DeleteOutlined />}
|
||||
onClick={() => handleDelete(record)}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div style={{ padding: '8px 0px', paddingTop: 8, background: '#f5f7fa', minHeight: 'calc(100vh - 120px)' }}>
|
||||
|
||||
<AntdCard title="错误管理" style={{ borderRadius: 8 }}>
|
||||
<Form form={searchForm} layout="inline" style={{ marginBottom: 0 }}>
|
||||
<Form.Item name="errorCode" label="错误编码">
|
||||
<Input
|
||||
placeholder="请输入错误编码"
|
||||
style={{ width: 150 }}
|
||||
allowClear
|
||||
|
||||
size="small"
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item name="errorName" label="错误名称">
|
||||
<Input
|
||||
placeholder="请输入错误名称"
|
||||
style={{ width: 150 }}
|
||||
allowClear
|
||||
size="small"
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item name="errorType" label="类型">
|
||||
<Select
|
||||
placeholder="请选择类型"
|
||||
style={{ width: 120 }}
|
||||
allowClear
|
||||
size="small"
|
||||
>
|
||||
{errorTypeOptions.map(option => (
|
||||
<Option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item name="status" label="状态">
|
||||
<Select
|
||||
placeholder="请选择状态"
|
||||
style={{ width: 120 }}
|
||||
allowClear
|
||||
size="small"
|
||||
>
|
||||
{statusOptions.map(option => (
|
||||
<Option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Space>
|
||||
<Button type="primary" icon={<SearchOutlined />} onClick={handleSearch} size="small">
|
||||
查询
|
||||
</Button>
|
||||
<Button icon={<ReloadOutlined />} onClick={handleReset} size="small">
|
||||
重置
|
||||
</Button>
|
||||
<Button type="primary" icon={<PlusOutlined />} onClick={() => openModal('add')} size="small">
|
||||
新增
|
||||
</Button>
|
||||
</Space>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
<Table
|
||||
rowKey="id"
|
||||
columns={columns}
|
||||
dataSource={errorList}
|
||||
loading={loading}
|
||||
scroll={{ x: 1400, y: 'calc(100vh - 380px)' }}
|
||||
pagination={{
|
||||
current: params.pageNum,
|
||||
pageSize: params.pageSize,
|
||||
total: total,
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
showTotal: (t) => `共 ${t} 条`,
|
||||
onChange: (page, pageSize) => {
|
||||
setParams({ ...params, pageNum: page, pageSize });
|
||||
},
|
||||
}}
|
||||
/>
|
||||
|
||||
|
||||
</AntdCard>
|
||||
|
||||
{/* 新增/编辑/查看弹窗 */}
|
||||
<Modal
|
||||
title={
|
||||
modalType === 'add'
|
||||
? '新增错误'
|
||||
: modalType === 'edit'
|
||||
? '编辑错误'
|
||||
: '查看错误详情'
|
||||
}
|
||||
open={modalVisible}
|
||||
onCancel={() => {
|
||||
setModalVisible(false);
|
||||
form.resetFields();
|
||||
}}
|
||||
onOk={() => modalType !== 'view' && form.submit()}
|
||||
width={700}
|
||||
footer={
|
||||
modalType === 'view'
|
||||
? [
|
||||
<Button key="close" onClick={() => setModalVisible(false)}>
|
||||
关闭
|
||||
</Button>,
|
||||
]
|
||||
: null
|
||||
}
|
||||
>
|
||||
<Divider style={{ margin: '8px 0 16px 0' }} />
|
||||
<Form
|
||||
form={form}
|
||||
layout="vertical"
|
||||
onFinish={handleSave}
|
||||
disabled={modalType === 'view'}
|
||||
>
|
||||
<Row gutter={16}>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="错误编码"
|
||||
name="errorCode"
|
||||
rules={[{ required: true, message: '请输入错误编码' }]}
|
||||
>
|
||||
<Input placeholder="例如:ERR-ROBOT-001" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
label="错误名称"
|
||||
name="errorName"
|
||||
rules={[{ required: true, message: '请输入错误名称' }]}
|
||||
>
|
||||
<Input placeholder="请输入错误名称" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row gutter={16}>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
label="错误类型"
|
||||
name="errorType"
|
||||
rules={[{ required: true, message: '请选择错误类型' }]}
|
||||
>
|
||||
<Select placeholder="请选择错误类型">
|
||||
{errorTypeOptions.map(option => (
|
||||
<Option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
label="严重程度"
|
||||
name="severity"
|
||||
rules={[{ required: true, message: '请选择严重程度' }]}
|
||||
>
|
||||
<Select placeholder="请选择严重程度">
|
||||
{severityOptions.map(option => (
|
||||
<Option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
label="状态"
|
||||
name="status"
|
||||
rules={[{ required: true, message: '请选择状态' }]}
|
||||
>
|
||||
<Select placeholder="请选择状态">
|
||||
{statusOptions.map(option => (
|
||||
<Option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
<Form.Item label="关联设备" name="deviceCode">
|
||||
<Input placeholder="请输入关联设备编码" />
|
||||
</Form.Item>
|
||||
<Form.Item label="错误描述" name="description">
|
||||
<TextArea
|
||||
placeholder="请输入错误描述"
|
||||
rows={4}
|
||||
showCount
|
||||
maxLength={500}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="建议处理方案" name="solution">
|
||||
<TextArea
|
||||
placeholder="请输入建议处理方案"
|
||||
rows={4}
|
||||
showCount
|
||||
maxLength={500}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -804,7 +804,7 @@ export default function RobotTaskPage() {
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: 100,
|
||||
width: 300,
|
||||
fixed: 'right',
|
||||
render: (_, record) => (
|
||||
<Space size="small">
|
||||
|
||||
@@ -21,6 +21,7 @@ import DeviceAccessPage from '../components/SystemSetting/DeviceAccessPage';
|
||||
import OnlineUserPage from '../components/SystemSetting/OnlineUser';
|
||||
import DeviceManagementPage from '../components/SystemSetting/DeviceManagement';
|
||||
import BasicSettings from '../components/SystemSetting/BasicSettings';
|
||||
import ErrorManagement from '../components/SystemSetting/ErrorManagement';
|
||||
|
||||
const { Header, Content } = Layout;
|
||||
const { Text } = Typography;
|
||||
@@ -135,7 +136,6 @@ export default function SystemSettings() {
|
||||
const NoticePage = () => <div style={{ padding: 20 }}><h2>通知策略页面</h2></div>;
|
||||
const DataSafetyPage = () => <div style={{ padding: 20 }}><h2>数据与安全页面</h2></div>;
|
||||
const SystemMaintenancePage = () => <div style={{ padding: 20 }}><h2>系统维护页面</h2></div>;
|
||||
const ErrorManager = () => <div style={{ padding: 20 }}><h2>错误管理页面</h2></div>;
|
||||
const DefaultPage = () => <div style={{ padding: 20 }}><h2>请选择菜单</h2></div>;
|
||||
const renderTabContent = () => {
|
||||
switch (activeTab) {
|
||||
@@ -162,7 +162,7 @@ export default function SystemSettings() {
|
||||
case 'devices':
|
||||
return <DeviceManagementPage />;
|
||||
case "errorManager":
|
||||
return <ErrorManager />;
|
||||
return <ErrorManagement />;
|
||||
default:
|
||||
return <DefaultPage />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user