feat(floorplan): 新增机房平面图功能模块
refactor(models): 为Room和Rack模型添加布局相关字段 feat(routes): 实现机房平面图相关API接口 feat(components): 添加平面图编辑器、画布渲染及交互组件 feat(hooks): 实现平面图数据管理和状态管理 feat(pages): 新增机房平面图页面入口 style(components): 优化平面图组件样式和交互体验
This commit is contained in:
@@ -170,6 +170,22 @@ export const deviceAPI = {
|
||||
delete: deviceId => api.delete(`/devices/${deviceId}`),
|
||||
getTickets: (deviceId, params) => api.get(`/devices/${deviceId}/tickets`, { params }),
|
||||
checkPosition: (rackId, params) => api.get(`/devices/check-position/${rackId}`, { params }),
|
||||
importPreview: file => {
|
||||
const formData = new FormData();
|
||||
formData.append('csvFile', file);
|
||||
return api.post('/devices/import-preview', formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
});
|
||||
},
|
||||
import: file => {
|
||||
const formData = new FormData();
|
||||
formData.append('csvFile', file);
|
||||
return api.post('/devices/import', formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
});
|
||||
},
|
||||
getImportTemplate: () => api.get('/devices/import-template', { responseType: 'blob' }),
|
||||
exportDevices: params => api.get('/devices/export', { params, responseType: 'blob' }),
|
||||
};
|
||||
|
||||
export const ticketAPI = {
|
||||
|
||||
Reference in New Issue
Block a user