diff --git a/ui/src/api/admin/workspace/knowledge/document.ts b/ui/src/api/admin/workspace/knowledge/document.ts index e3499a10d21..8b73776328e 100644 --- a/ui/src/api/admin/workspace/knowledge/document.ts +++ b/ui/src/api/admin/workspace/knowledge/document.ts @@ -26,6 +26,8 @@ const putQuickCreateDocuments = (knowledgeId: string, documents: DocumentQuickCr const putDocumentActive = (knowledgeId: string, documentId: string, isActive: boolean) => put(`${getPrefix(knowledgeId)}/${documentId}`, { is_active: isActive }) + + /** 删除单个文档。 */ const deleteDocument = (knowledgeId: string, documentId: string) => del(`${getPrefix(knowledgeId)}/${documentId}`) @@ -33,6 +35,7 @@ const deleteDocument = (knowledgeId: string, documentId: string) => del(`${getPr const putBatchDeleteDocuments = (knowledgeId: string, documentIds: string[]) => put(`${getPrefix(knowledgeId)}/batch_delete`, { id_list: documentIds }) + /** 批量提交文档向量化。 */ const putBatchRefreshDocuments = (knowledgeId: string, documentIds: string[], stateList: DocumentTaskState[]) => put(`${getPrefix(knowledgeId)}/batch_refresh`, { id_list: documentIds, state_list: stateList }) diff --git a/ui/src/components/global/mk-source-card/index.vue b/ui/src/components/global/mk-source-card/index.vue index 30dc839d1be..d178abb7ac6 100644 --- a/ui/src/components/global/mk-source-card/index.vue +++ b/ui/src/components/global/mk-source-card/index.vue @@ -78,7 +78,7 @@ function handleSelectedChange(selected: boolean | string | number) { -
+
diff --git a/ui/src/components/global/mk-table/MkAction.vue b/ui/src/components/global/mk-table/MkAction.vue index b6d872a004a..d98a6f12f13 100644 --- a/ui/src/components/global/mk-table/MkAction.vue +++ b/ui/src/components/global/mk-table/MkAction.vue @@ -1,13 +1,13 @@ { @refresh="refreshAfterOperation" /> - - - - - - - - - - - - - - - - - - - - + + + + 更多操作 + + + + diff --git a/ui/src/views/system/resource-management/tool/index.vue b/ui/src/views/system/resource-management/tool/index.vue index 74820ffe766..cb89f4fdc8a 100644 --- a/ui/src/views/system/resource-management/tool/index.vue +++ b/ui/src/views/system/resource-management/tool/index.vue @@ -188,7 +188,7 @@ onMounted(() => { 工作流 - + 工作流 - + () @@ -67,7 +67,7 @@ defineExpose({ open }) diff --git a/ui/src/views/tool/tool-card/ToolStatusSwitch.vue b/ui/src/views/tool/tool-card/ToolStatusSwitch.vue index af5ef79e42e..d6834c4e983 100644 --- a/ui/src/views/tool/tool-card/ToolStatusSwitch.vue +++ b/ui/src/views/tool/tool-card/ToolStatusSwitch.vue @@ -6,7 +6,7 @@ import type SystemSharedToolApi from '@/api/admin/system/shared-resources/tool/t import { TOOL_TYPE } from '@/api/enums' import type { ToolItem } from '@/api/types' import { MsgConfirm, MsgError, MsgSuccess } from '@/utils/message' -import InitParamDialog from './InitParamDialog.vue' +import InitParamDrawer from './InitParamDrawer.vue' defineOptions({ name: 'ToolStatusSwitch', inheritAttrs: false }) @@ -16,7 +16,7 @@ const loading = defineModel('loading', { default: false }) const emit = defineEmits<{ update: [tool: ToolItem] }>() -const initParamDialogRef = useTemplateRef>('initParamDialogRef') +const initParamDrawerRef = useTemplateRef>('initParamDrawerRef') function handleToolStatusChange() { if (loading.value) return false @@ -36,7 +36,7 @@ function handleToolStatusChange() { } if (hasMissingInitParams(toolDetail)) { - initParamDialogRef.value?.open(toolDetail, true, true) + initParamDrawerRef.value?.open(toolDetail, true, true) return false } @@ -75,5 +75,5 @@ function updateToolStatus(active: boolean) { diff --git a/ui/src/views/tool/tool-card/action-dropdown/InitParamAction.vue b/ui/src/views/tool/tool-card/action-dropdown/InitParamAction.vue index bfe5ce4b3b7..9318cff3d2d 100644 --- a/ui/src/views/tool/tool-card/action-dropdown/InitParamAction.vue +++ b/ui/src/views/tool/tool-card/action-dropdown/InitParamAction.vue @@ -4,7 +4,7 @@ import type ToolApi from '@/api/admin/workspace/tool/tool' import type SystemResourceToolApi from '@/api/admin/system/resource-management/tool/tool' import type SystemSharedToolApi from '@/api/admin/system/shared-resources/tool/tool' import type { ToolItem } from '@/api/types' -import InitParamDialog from '../InitParamDialog.vue' +import InitParamDrawer from '../InitParamDrawer.vue' defineOptions({ name: 'InitParamAction' }) @@ -15,7 +15,7 @@ const loading = defineModel('loading', { default: false }) const emit = defineEmits<{ update: [tool: ToolItem] }>() const dialogMounted = ref(false) -const initParamDialogRef = useTemplateRef>('initParamDialogRef') +const initParamDrawerRef = useTemplateRef>('initParamDrawerRef') function handleOpenInitParam() { loading.value = true @@ -23,7 +23,7 @@ function handleOpenInitParam() { .getToolDetail(props.tool.id) .then((toolDetail) => { dialogMounted.value = true - return nextTick(() => initParamDialogRef.value?.open(toolDetail)) + return nextTick(() => initParamDrawerRef.value?.open(toolDetail)) }) .finally(() => { loading.value = false @@ -36,11 +36,11 @@ function handleDialogClosed() {