feat(机柜管理): 添加机柜导入导出功能并优化分页查询

- 添加xlsx依赖支持Excel文件处理
- 实现机柜数据的导入导出功能,包括模板下载
- 优化机柜列表的分页查询接口
- 修复机柜可视化页面U位标记位置计算问题
- 更新背景设置和渐变颜色样式
This commit is contained in:
zhang1106
2025-12-22 08:59:44 +08:00
parent 130b2ad5f7
commit c60d13a0df
11 changed files with 726 additions and 38 deletions
+4 -3
View File
@@ -195,7 +195,8 @@ function DeviceManagement() {
const fetchRacks = async () => {
try {
const response = await axios.get('/api/racks');
setRacks(response.data);
// 现在API返回的格式是 { racks: [], total: number }
setRacks(response.data.racks || []);
} catch (error) {
message.error('获取机柜列表失败');
console.error('获取机柜列表失败:', error);
@@ -1006,7 +1007,7 @@ function DeviceManagement() {
}}
footer={null}
width={600}
destroyOnClose
destroyOnHidden
>
{!isImporting && !importResult ? (
<div>
@@ -1131,7 +1132,7 @@ function DeviceManagement() {
</Button>
]}
width={800}
destroyOnClose
destroyOnHidden
>
{selectedDevice && (
<div>