diff --git a/frontend/src/pages/KnowledgeBase/KnowledgeBase.jsx b/frontend/src/pages/KnowledgeBase/KnowledgeBase.jsx index b74c2f6..3884814 100644 --- a/frontend/src/pages/KnowledgeBase/KnowledgeBase.jsx +++ b/frontend/src/pages/KnowledgeBase/KnowledgeBase.jsx @@ -1,6 +1,6 @@ import { useState, useEffect } from 'react' import { Card, Upload, Table, Button, Space, Select, Popconfirm, message, Tag } from 'antd' -import { InboxOutlined, DeleteOutlined, ReloadOutlined } from '@ant-design/icons' +import { InboxOutlined, DeleteOutlined, ReloadOutlined, UploadOutlined } from '@ant-design/icons' import useAuthStore from '../../stores/authStore' import knowledgeService from '../../services/knowledgeService' import KnowledgeTree from '../../components/KnowledgeTree/KnowledgeTree' @@ -139,7 +139,7 @@ export default function KnowledgeBase() { title: '标题', dataIndex: 'title', key: 'title', - width: 240, + width: 280, render: (text) => ( {text} ), @@ -148,45 +148,38 @@ export default function KnowledgeBase() { title: '作者', dataIndex: 'author', key: 'author', - width: 80, + width: 100, render: (val) => val || '-', }, { title: '播出/发表时间', dataIndex: 'publish_date', key: 'publish_date', - width: 156, + width: 160, render: (val) => val || '-', }, { title: '出处', dataIndex: 'source_detail', key: 'source_detail', - width: 170, + width: 200, render: (val) => val || '-', }, { title: '类型', dataIndex: 'source_type', key: 'source_type', - width: 88, + width: 96, render: (val) => ( {SOURCE_TYPE_LABEL[val] || val} ), }, - { - title: '入库时间', - dataIndex: 'created_at', - key: 'created_at', - width: 140, - render: (val) => val ? new Date(val).toLocaleString('zh-CN', { hour12: false }).replace(' ', ' ') : '-', - }, { title: '操作', key: 'action', - width: 86, + width: 90, render: (_, record) => ( -
-

知识库

-

上传 md 笔记 · 语义检索 · 报题参考

+
+ {/* 标题栏 */} +
+

知识库

+

上传 md 笔记 · 语义检索 · 报题参考

- {/* 上传区 */} - + {/* 上传区(收小为一行) */} +
-

- -

-

- {uploading ? '正在上传并生成向量…' : '点击或拖拽 .md 文件上传'} -

-

- 支持批量上传,系统自动解析 yaml frontmatter 并生成语义向量 -

+
- + 支持批量上传,系统自动解析 yaml frontmatter 并生成语义向量 +
{/* 主体:左侧树 + 右侧列表 */}
@@ -252,7 +240,7 @@ export default function KnowledgeBase() { {/* 筛选栏 */} - 筛选: + 筛选: