添加XML回退解析机制支持复杂Excel文件

当pandas无法解析某些包含非标准元素的Excel文件时,
添加了XML直接解析功能来提取工作表名称和数据。

- 实现了`_extract_sheet_names_from_xml`方法从XML提取工作表名称
- 实现了`_read_excel_sheet_xml`方法直接解析Excel XML数据
- 添加多种命名空间支持以处理不同Excel格式
- 在pandas解析失败时自动回退到XML解析方式

fix(excel-storage-service): 修复XML解析中的命名空间问题

改进了XML解析逻辑,添加对多种命名空间的支持,
使用通配符查找元素以兼容不同Excel文件格式。

refactor(table-rag-service): 优化XML解析逻辑提高兼容性

统一了XML解析的命名空间处理方式,
改进了元素查找逻辑以更好地支持不同Excel格式。

feat(frontend): 添加RAG向量检索和索引重建功能

- 实现了RAG状态查看、搜索和索引重建接口
- 添加了前端RAG检索界面组件
- 增加了错误处理和加载状态提示
This commit is contained in:
2026-04-08 19:21:40 +08:00
parent 41e5eaaa2d
commit 3b82103e87
6 changed files with 523 additions and 145 deletions

View File

@@ -563,6 +563,30 @@ export const backendApi = {
}
},
/**
* 重建 RAG 索引
*/
async rebuildRAGIndex(): Promise<{
success: boolean;
message: string;
}> {
const url = `${BACKEND_BASE_URL}/rag/rebuild`;
try {
const response = await fetch(url, {
method: 'POST',
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.detail || '重建索引失败');
}
return await response.json();
} catch (error) {
console.error('重建 RAG 索引失败:', error);
throw error;
}
},
// ==================== 表格填写 ====================
/**