diff --git a/src/api/ai-chat.ts b/src/api/ai-chat.ts index c6ebd55..03ae1bf 100644 --- a/src/api/ai-chat.ts +++ b/src/api/ai-chat.ts @@ -49,8 +49,8 @@ export interface ChatMessageVO { /** 知识库文档 */ export interface KbDocumentVO { - id: number; - docId: string; // UUID格式 + id: string; // UUID格式 + docId?: string; // 可能为空 title: string; docType: string; // report/document/text/data/other fileType: string; // pdf/doc/txt/md等 diff --git a/src/views/knowledge-base/index.vue b/src/views/knowledge-base/index.vue index dd2047b..db92290 100644 --- a/src/views/knowledge-base/index.vue +++ b/src/views/knowledge-base/index.vue @@ -182,7 +182,7 @@ async function handleDelete(doc: KbDocumentVO) { } ); - const res = await deleteDocument(doc.docId); + const res = await deleteDocument(doc.id); if (res.code === 200) { ElMessage.success("删除成功"); loadDocuments(); @@ -197,7 +197,7 @@ async function handleDelete(doc: KbDocumentVO) { // 重新索引文档 async function handleReindex(doc: KbDocumentVO) { try { - const res = await reindexDocument(doc.docId); + const res = await reindexDocument(doc.id); if (res.code === 200) { ElMessage.success("重新索引已启动"); loadDocuments(); @@ -216,7 +216,7 @@ async function handleViewChunks(doc: KbDocumentVO) { selectedChunk.value = null; try { - const res = await getDocumentChunks(doc.docId); + const res = await getDocumentChunks(doc.id); if (res.code === 200) { currentDocChunks.value = res.data || []; } diff --git a/src/views/system/user/utils/hook.tsx b/src/views/system/user/utils/hook.tsx index d86605a..fabdb6e 100644 --- a/src/views/system/user/utils/hook.tsx +++ b/src/views/system/user/utils/hook.tsx @@ -96,10 +96,12 @@ export function useUser(tableRef: Ref) { cellRenderer: ({ row, props }) => ( - {row.gender === 1 ? "男" : "女"} + {row.gender === 0 ? "未知" : row.gender === 1 ? "男" : "女"} ) },