fix: Knowledge base and tool root directory transfer issue
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run

This commit is contained in:
wangdan-fit2cloud 2025-12-17 11:58:42 +08:00 committed by shaohuzhang1
parent c3c5f64d9d
commit 82cd95434b
2 changed files with 16 additions and 14 deletions

View File

@ -404,10 +404,13 @@ function openMoveToDialog(data: any) {
}
function refreshKnowledgeList(row: any) {
const list = cloneDeep(knowledge.knowledgeList)
const index = list.findIndex((v) => v.id === row.id)
list.splice(index, 1)
knowledge.setKnowledgeList(list)
//
if (folder.currentFolder?.parent_id) {
const list = cloneDeep(knowledge.knowledgeList)
const index = list.findIndex((v) => v.id === row.id)
list.splice(index, 1)
knowledge.setKnowledgeList(list)
}
}
const CreateKnowledgeDialogRef = ref()
@ -477,6 +480,7 @@ function deleteKnowledge(row: any) {
const index = list.findIndex((v) => v.id === row.id)
list.splice(index, 1)
knowledge.setKnowledgeList(list)
MsgSuccess(t('common.deleteSuccess'))
})
})

View File

@ -171,12 +171,7 @@
:disabled="permissionPrecise.edit(item.id)"
>
<template #icon>
<el-avatar
v-if="item?.icon"
shape="square"
:size="32"
style="background: none"
>
<el-avatar v-if="item?.icon" shape="square" :size="32" style="background: none">
<img :src="resetUrl(item?.icon)" alt="" />
</el-avatar>
<ToolIcon v-else :size="32" :type="item?.tool_type" />
@ -473,10 +468,13 @@ function openMoveToDialog(data: any) {
}
function refreshToolList(row: any) {
const list = cloneDeep(tool.toolList)
const index = list.findIndex((v) => v.id === row.id)
list.splice(index, 1)
tool.setToolList(list)
//
if (folder.currentFolder?.parent_id) {
const list = cloneDeep(tool.toolList)
const index = list.findIndex((v) => v.id === row.id)
list.splice(index, 1)
tool.setToolList(list)
}
}
const AuthorizedWorkspaceDialogRef = ref()