Skip to content

Commit 62f1180

Browse files
feat: setting tag button
1 parent b34c3c0 commit 62f1180

5 files changed

Lines changed: 16 additions & 150 deletions

File tree

‎ui/src/views/VIEW_README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ Web 来源地址与选择器仅在单项设置中编辑,批量设置不展示
797797
文档任务是否排队或执行中通过其中的 `isDocumentTaskRunning(document, taskType)` 判断,
798798
页面及 Action 不重复解析状态字符串;文档或任务状态缺失时返回 `false`。
799799
`EmbeddingDocumentAction` 负责单项向量化与取消向量化,`BatchEmbeddingAction` 负责批量向量化按钮,`GenerateQuestionsAction` 负责单项生成问题与取消生成,`BatchGenerateQuestionsAction` 负责批量生成问题,`SettingDocumentAction` 负责召回及来源设置,
800-
`MigrateDocumentAction` 选择目标知识库,`DocumentTagsAction` 添加已有标签和移除文档标签关联;
800+
`MigrateDocumentAction` 选择目标知识库;`setting-tags/DocumentTagsAction.vue` 暂仅提供“标签设置”入口按钮。
801801
生成问题复用公共配置弹窗,其余 Action 按下文维护各自专属弹窗。组件接收完整 Document API、知识库 ID、文档 ID 或文档数组及禁用状态,
802802
点击时快照本次操作对象,内部管理弹窗和请求,成功后通过 `refresh` 通知页面刷新,失败保留输入。
803803
迁移操作集中在 `document/action-dropdown/migrate/`,`MigrateDocumentAction.vue` 负责入口与弹窗按需挂载,

‎ui/src/views/knowledge-detail/library/document/action-dropdown/DocumentTagsAction.vue‎

Lines changed: 0 additions & 137 deletions
This file was deleted.

‎ui/src/views/knowledge-detail/library/document/action-dropdown/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export { default as BatchEmbeddingAction } from './embedding/BatchEmbeddingAction.vue'
22
export { default as BatchCancelTaskAction } from './BatchCancelTaskAction.vue'
33
export { default as DeleteDocumentAction } from './DeleteDocumentAction.vue'
4-
export { default as DocumentTagsAction } from './DocumentTagsAction.vue'
4+
export { default as DocumentTagsAction } from './setting-tags/DocumentTagsAction.vue'
55
export { default as EmbeddingDocumentAction } from './embedding/EmbeddingDocumentAction.vue'
66
export { default as GenerateQuestionsAction } from './generate-questions/GenerateQuestionsAction.vue'
77
export { default as BatchGenerateQuestionsAction } from './generate-questions/BatchGenerateQuestionsAction.vue'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<script setup lang="ts">
2+
defineOptions({ name: 'DocumentTagsAction' })
3+
defineProps<{ label: string; icon?: string; disabled?: boolean }>()
4+
</script>
5+
6+
<template>
7+
<!-- 文档标签设置入口 -->
8+
<MkAction :label="label" :icon="icon" :disabled="disabled" />
9+
</template>

‎ui/src/views/knowledge-detail/library/document/index.vue‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
BatchEmbeddingAction,
3333
BatchCancelTaskAction,
3434
DeleteDocumentAction,
35+
DocumentTagsAction,
3536
EmbeddingDocumentAction,
3637
GenerateQuestionsAction,
3738
BatchGenerateQuestionsAction,
@@ -364,7 +365,7 @@ onBeforeUnmount(() => {
364365
v-loading="loading || operationLoading"
365366
:data="documentData"
366367
v-model:pagination-config="paginationConfig"
367-
:max-table-height="210"
368+
:max-table-height="240"
368369
@current-change="loadDocuments()"
369370
@size-change="loadDocuments()"
370371
@selection-change="handleSelectionChange"
@@ -514,15 +515,8 @@ onBeforeUnmount(() => {
514515
:document="row"
515516
@refresh="refreshAfterOperation"
516517
/>
517-
<!-- 设置文档标签 -->
518-
<!-- <DocumentTagsAction
519-
:api="DocumentApi"
520-
:knowledge-id="knowledgeId"
521-
:document-ids="[row.id]"
522-
manage-tags
523-
:disabled="operationLoading"
524-
@refresh="refreshAfterOperation"
525-
/> -->
518+
<!-- TODO: 设置文档标签 -->
519+
<DocumentTagsAction label="标签设置" icon="icon_tag" :disabled="operationLoading" />
526520
<!-- 同步 -->
527521
<SyncDocumentAction
528522
v-if="
@@ -625,7 +619,7 @@ onBeforeUnmount(() => {
625619
@refresh="refreshAfterOperation"
626620
/>
627621

628-
<!-- 批量添加标签 -->
622+
<!-- // TODO 批量添加标签 -->
629623
<!-- <el-button>添加标签</el-button> -->
630624

631625
<!-- 更多批量操作 -->

0 commit comments

Comments
 (0)