From b3157216bbad99231a239364575d20bee64a8bf0 Mon Sep 17 00:00:00 2001 From: simonkoson <28867558@qq.com> Date: Wed, 27 May 2026 13:21:04 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E7=9F=A5=E8=AF=86=E5=BA=93=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=B8=89=E5=A4=84=E6=A0=B7=E5=BC=8F=E6=94=B6=E5=B0=BE?= =?UTF-8?q?=EF=BC=9A=E5=86=85=E5=AE=B9=E5=8C=BA=E6=89=A9=E5=B1=95=E3=80=81?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E5=85=A5=E5=BA=93=E6=97=B6=E9=97=B4=E5=88=97?= =?UTF-8?q?=E3=80=81=E4=B8=8A=E4=BC=A0=E5=8C=BA=E6=94=B6=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/KnowledgeBase/KnowledgeBase.jsx | 52 +++++++------------ 1 file changed, 20 insertions(+), 32 deletions(-) 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() { {/* 筛选栏 */} - 筛选: + 筛选: