已完成设备管理页面的基本功能,包括设备导入导出,字段自定义,字段是否显示等功能,目前处于资产管理已基本完善

This commit is contained in:
zhang1106
2025-12-18 19:11:56 +08:00
parent 2ec02fb057
commit 072b3d593e
10 changed files with 1063 additions and 63 deletions
+17 -5
View File
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
import { Table, Button, Modal, Form, Input, Select, message, Card, Space, InputNumber } from 'antd';
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons';
import { Table, Button, Modal, Form, Input, Select, message, Card, Space, InputNumber, Upload, Progress } from 'antd';
import { PlusOutlined, EditOutlined, DeleteOutlined, UploadOutlined, DownloadOutlined } from '@ant-design/icons';
import axios from 'axios';
const { Option } = Select;
@@ -13,6 +13,8 @@ function RackManagement() {
const [editingRack, setEditingRack] = useState(null);
const [form] = Form.useForm();
// 获取所有机柜
const fetchRacks = async () => {
try {
@@ -103,6 +105,12 @@ function RackManagement() {
});
};
// 状态标签映射
const statusMap = {
active: { text: '在用', color: 'green' },
@@ -183,9 +191,11 @@ function RackManagement() {
return (
<div>
<Card title="机柜管理" extra={
<Button type="primary" icon={<PlusOutlined />} onClick={() => showModal()}>
添加机柜
</Button>
<Space>
<Button type="primary" icon={<PlusOutlined />} onClick={() => showModal()}>
添加机柜
</Button>
</Space>
}>
<Table
columns={columns}
@@ -276,6 +286,8 @@ function RackManagement() {
</Form.Item>
</Form>
</Modal>
</div>
);
}