Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export { default as BatchEmbeddingAction } from './embedding/BatchEmbeddingAction.vue'
export { default as BatchCancelTaskAction } from './BatchCancelTaskAction.vue'
export { default as DeleteDocumentAction } from './DeleteDocumentAction.vue'
export { default as DocumentTagsAction } from './DocumentTagsAction.vue'
export { default as DocumentTagsAction } from './setting-tags/DocumentTagsAction.vue'
export { default as EmbeddingDocumentAction } from './embedding/EmbeddingDocumentAction.vue'
export { default as GenerateQuestionsAction } from './generate-questions/GenerateQuestionsAction.vue'
export { default as BatchGenerateQuestionsAction } from './generate-questions/BatchGenerateQuestionsAction.vue'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({ name: 'DocumentTagsAction' })
defineProps<{ label: string; icon?: string; disabled?: boolean }>()
</script>

<template>
<!-- 文档标签设置入口 -->
<MkAction :label="label" :icon="icon" :disabled="disabled" />
</template>
16 changes: 5 additions & 11 deletions ui/src/views/knowledge-detail/library/document/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
BatchEmbeddingAction,
BatchCancelTaskAction,
DeleteDocumentAction,
DocumentTagsAction,
EmbeddingDocumentAction,
GenerateQuestionsAction,
BatchGenerateQuestionsAction,
Expand Down Expand Up @@ -364,7 +365,7 @@ onBeforeUnmount(() => {
v-loading="loading || operationLoading"
:data="documentData"
v-model:pagination-config="paginationConfig"
:max-table-height="210"
:max-table-height="240"
@current-change="loadDocuments()"
@size-change="loadDocuments()"
@selection-change="handleSelectionChange"
Expand Down Expand Up @@ -514,15 +515,8 @@ onBeforeUnmount(() => {
:document="row"
@refresh="refreshAfterOperation"
/>
<!-- 设置文档标签 -->
<!-- <DocumentTagsAction
:api="DocumentApi"
:knowledge-id="knowledgeId"
:document-ids="[row.id]"
manage-tags
:disabled="operationLoading"
@refresh="refreshAfterOperation"
/> -->
<!-- TODO: 设置文档标签 -->
<DocumentTagsAction label="标签设置" icon="icon_tag" :disabled="operationLoading" />
<!-- 同步 -->
<SyncDocumentAction
v-if="
Expand Down Expand Up @@ -625,7 +619,7 @@ onBeforeUnmount(() => {
@refresh="refreshAfterOperation"
/>

<!-- 批量添加标签 -->
<!-- // TODO 批量添加标签 -->
<!-- <el-button>添加标签</el-button> -->

<!-- 更多批量操作 -->
Expand Down
Loading