mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-25 17:22:55 +00:00
fix: Knowledge base and tool root directory transfer issue
This commit is contained in:
parent
c3c5f64d9d
commit
82cd95434b
|
|
@ -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'))
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue