diff --git a/frontend/src/components/common/knowledge/KnowledgeDocCard.vue b/frontend/src/components/common/knowledge/KnowledgeDocCard.vue new file mode 100644 index 0000000..6a776a5 --- /dev/null +++ b/frontend/src/components/common/knowledge/KnowledgeDocCard.vue @@ -0,0 +1,36 @@ + + + diff --git a/frontend/src/components/common/knowledge/KnowledgeLibraryCard.vue b/frontend/src/components/common/knowledge/KnowledgeLibraryCard.vue new file mode 100644 index 0000000..56f77f6 --- /dev/null +++ b/frontend/src/components/common/knowledge/KnowledgeLibraryCard.vue @@ -0,0 +1,30 @@ + + + diff --git a/frontend/src/components/common/knowledge/KnowledgeStatusBadge.vue b/frontend/src/components/common/knowledge/KnowledgeStatusBadge.vue new file mode 100644 index 0000000..5821252 --- /dev/null +++ b/frontend/src/components/common/knowledge/KnowledgeStatusBadge.vue @@ -0,0 +1,37 @@ + + + diff --git a/frontend/src/components/common/knowledge/SegmentCard.vue b/frontend/src/components/common/knowledge/SegmentCard.vue new file mode 100644 index 0000000..177f83d --- /dev/null +++ b/frontend/src/components/common/knowledge/SegmentCard.vue @@ -0,0 +1,34 @@ + + + diff --git a/frontend/src/components/common/knowledge/index.ts b/frontend/src/components/common/knowledge/index.ts new file mode 100644 index 0000000..1bfbc99 --- /dev/null +++ b/frontend/src/components/common/knowledge/index.ts @@ -0,0 +1,11 @@ +import KnowledgeDocCard from "./KnowledgeDocCard.vue"; +import KnowledgeLibraryCard from "./KnowledgeLibraryCard.vue"; +import KnowledgeStatusBadge from "./KnowledgeStatusBadge.vue"; +import SegmentCard from "./SegmentCard.vue"; + +export { + KnowledgeStatusBadge, + KnowledgeDocCard, + KnowledgeLibraryCard, + SegmentCard, +}; diff --git a/frontend/src/utils/dateUtil.ts b/frontend/src/utils/dateUtil.ts index 1fc88cf..ea18120 100644 --- a/frontend/src/utils/dateUtil.ts +++ b/frontend/src/utils/dateUtil.ts @@ -13,4 +13,9 @@ const formatDate = (date?: Date) => { return dayjs(date).format("YYYY-MM-DDTHH:mm:ss.SSSZ"); }; -export { dayjs, formatDate }; +const formatDateString = (dateString?: string, format = "YYYY-MM-DD HH:mm") => { + if (!dateString) return "未知"; + return dayjs(dateString).format(format); +}; + +export { dayjs, formatDate, formatDateString }; diff --git a/frontend/src/views/KnowledgeDocManagementPage.vue b/frontend/src/views/KnowledgeDocManagementPage.vue index de84fb3..1cf017d 100644 --- a/frontend/src/views/KnowledgeDocManagementPage.vue +++ b/frontend/src/views/KnowledgeDocManagementPage.vue @@ -5,63 +5,36 @@

{{ currentLibrary?.name || '知识库' }} - 文档管理

-
-
-
-
-
-
{{ doc.name }}
-
- - {{ doc.status === DocStatus.SUCCESS ? '解析完成' : '解析中' }} - - - {{ doc.enable ? '已启用' : '已禁用' }} - -
+ +
+ + + +
-
-
暂无文档
+ + +
+
暂无文档
@@ -84,11 +57,11 @@