+
{
- folderList.value = res.data
- currentFolder.value = res.data?.[0] || {}
- getList()
- })
-}
-
-function folderClickHandel(row: any) {
- currentFolder.value = row
- applicationList.value = []
- getList()
-}
-
function clickFolder(item: any) {
currentFolder.value.id = item.id
applicationList.value = []
@@ -482,15 +471,6 @@ const exportApplication = (application: any) => {
})
}
-const CreateFolderDialogRef = ref()
-function openCreateFolder() {
- CreateFolderDialogRef.value.open(FolderSource.APPLICATION, currentFolder.value.parent_id)
-}
-function refreshFolder() {
- applicationList.value = []
- getFolder()
- getList()
-}
const elUploadRef = ref()
const importApplication = (file: any) => {
const formData = new FormData()
@@ -515,8 +495,34 @@ const importApplication = (file: any) => {
})
}
-onMounted(() => {
+// 文件夹相关
+const CreateFolderDialogRef = ref()
+function openCreateFolder() {
+ CreateFolderDialogRef.value.open(FolderSource.APPLICATION, currentFolder.value.id)
+}
+
+function getFolder(bool?: boolean) {
+ const params = {}
+ folder.asyncGetFolder(FolderSource.APPLICATION, params, loading).then((res: any) => {
+ folderList.value = res.data
+ if (bool) {
+ // 初始化刷新
+ currentFolder.value = res.data?.[0] || {}
+ }
+ getList()
+ })
+}
+function folderClickHandel(row: any) {
+ currentFolder.value = row
+ applicationList.value = []
+ getList()
+}
+function refreshFolder() {
+ applicationList.value = []
getFolder()
+}
+onMounted(() => {
+ getFolder(true)
})
diff --git a/ui/src/views/chat-log/component/ChatRecordDrawer.vue b/ui/src/views/chat-log/component/ChatRecordDrawer.vue
index 95193881f..369d1e2c9 100644
--- a/ui/src/views/chat-log/component/ChatRecordDrawer.vue
+++ b/ui/src/views/chat-log/component/ChatRecordDrawer.vue
@@ -61,14 +61,14 @@ const props = withDefaults(
next_disable: boolean
}>(),
- {}
+ {},
)
const emit = defineEmits(['update:chatId', 'update:currentAbstract', 'refresh'])
const route = useRoute()
const {
- params: { id }
+ params: { id },
} = route
const loading = ref(false)
const visible = ref(false)
@@ -77,7 +77,7 @@ const recordList = ref([])
const paginationConfig = reactive({
current_page: 1,
page_size: 20,
- total: 0
+ total: 0,
})
function closeHandle() {
@@ -93,7 +93,7 @@ function getChatRecord() {
paginationConfig.total = res.data.total
const list = res.data.records
recordList.value = [...list, ...recordList.value].sort((a, b) =>
- a.create_time.localeCompare(b.create_time)
+ a.create_time.localeCompare(b.create_time),
)
if (paginationConfig.current_page === 1) {
nextTick(() => {
@@ -113,7 +113,7 @@ watch(
if (props.chatId) {
getChatRecord()
}
- }
+ },
)
watch(visible, (bool) => {
@@ -143,7 +143,7 @@ const open = () => {
}
defineExpose({
- open
+ open,
})
diff --git a/ui/src/views/knowledge/index.vue b/ui/src/views/knowledge/index.vue
index c37a2f5a7..aa5aab016 100644
--- a/ui/src/views/knowledge/index.vue
+++ b/ui/src/views/knowledge/index.vue
@@ -146,7 +146,11 @@
-
+
+
{
- folderList.value = res.data
- currentFolder.value = res.data?.[0] || {}
- getList()
- })
-}
-
-function folderClickHandel(row: any) {
- currentFolder.value = row
- knowledgeList.value = []
- if (currentFolder.value.id === 'share') return
- getList()
-}
-
function clickFolder(item: any) {
currentFolder.value.id = item.id
knowledgeList.value = []
getList()
}
-const CreateFolderDialogRef = ref()
-
-function openCreateFolder() {
- CreateFolderDialogRef.value.open(FolderSource.KNOWLEDGE, currentFolder.value.parent_id)
-}
-
const GenerateRelatedDialogRef = ref>()
function openGenerateDialog(row: any) {
if (GenerateRelatedDialogRef.value) {
@@ -521,14 +503,36 @@ function deleteKnowledge(row: any) {
.catch(() => {})
}
+// 文件夹相关
+const CreateFolderDialogRef = ref()
+function openCreateFolder() {
+ CreateFolderDialogRef.value.open(FolderSource.KNOWLEDGE, currentFolder.value.id)
+}
+function getFolder(bool?: boolean) {
+ const params = {}
+ folder.asyncGetFolder(FolderSource.KNOWLEDGE, params, loading).then((res: any) => {
+ folderList.value = res.data
+ if (bool) {
+ // 初始化刷新
+ currentFolder.value = res.data?.[0] || {}
+ }
+ getList()
+ })
+}
+function folderClickHandel(row: any) {
+ currentFolder.value = row
+ knowledgeList.value = []
+ if (currentFolder.value.id === 'share') return
+ getList()
+}
function refreshFolder() {
+ console.log(currentFolder.value)
knowledgeList.value = []
getFolder()
- getList()
}
onMounted(() => {
- getFolder()
+ getFolder(true)
})
diff --git a/ui/src/views/resource-management/knowledge/index.vue b/ui/src/views/resource-management/knowledge/index.vue
index cd5d3630e..eb015bf33 100644
--- a/ui/src/views/resource-management/knowledge/index.vue
+++ b/ui/src/views/resource-management/knowledge/index.vue
@@ -324,7 +324,7 @@ function clickFolder(item: any) {
const CreateFolderDialogRef = ref()
function openCreateFolder() {
- CreateFolderDialogRef.value.open('KNOWLEDGE', currentFolder.value.parent_id)
+ CreateFolderDialogRef.value.open('KNOWLEDGE', currentFolder.value.id)
}
const GenerateRelatedDialogRef = ref>()
diff --git a/ui/src/views/resource-management/tool/index.vue b/ui/src/views/resource-management/tool/index.vue
index 9953b8702..2416129ff 100644
--- a/ui/src/views/resource-management/tool/index.vue
+++ b/ui/src/views/resource-management/tool/index.vue
@@ -426,7 +426,7 @@ function configInitParams(item: any) {
const CreateFolderDialogRef = ref()
function openCreateFolder() {
- CreateFolderDialogRef.value.open('TOOL', currentFolder.value.parent_id)
+ CreateFolderDialogRef.value.open('TOOL', currentFolder.value.id)
}
const elUploadRef = ref()
diff --git a/ui/src/views/shared/knowledge-shared/SharedWorkspace.vue b/ui/src/views/shared/knowledge-shared/SharedWorkspace.vue
index 407b9d208..d6692be07 100644
--- a/ui/src/views/shared/knowledge-shared/SharedWorkspace.vue
+++ b/ui/src/views/shared/knowledge-shared/SharedWorkspace.vue
@@ -242,7 +242,7 @@ function folderClickHandel(row: any) {
const CreateFolderDialogRef = ref()
function openCreateFolder() {
- CreateFolderDialogRef.value.open('KNOWLEDGE', currentFolder.value.parent_id)
+ CreateFolderDialogRef.value.open('KNOWLEDGE', currentFolder.value.id)
}
const GenerateRelatedDialogRef = ref>()
diff --git a/ui/src/views/shared/knowledge-shared/index.vue b/ui/src/views/shared/knowledge-shared/index.vue
index 2dded9988..478a09922 100644
--- a/ui/src/views/shared/knowledge-shared/index.vue
+++ b/ui/src/views/shared/knowledge-shared/index.vue
@@ -386,7 +386,7 @@ function folderClickHandel(row: any) {
const CreateFolderDialogRef = ref()
function openCreateFolder() {
- CreateFolderDialogRef.value.open('KNOWLEDGE', currentFolder.value.parent_id)
+ CreateFolderDialogRef.value.open('KNOWLEDGE', currentFolder.value.id)
}
const GenerateRelatedDialogRef = ref>()
diff --git a/ui/src/views/tool/index.vue b/ui/src/views/tool/index.vue
index f493306c5..6fd77c345 100644
--- a/ui/src/views/tool/index.vue
+++ b/ui/src/views/tool/index.vue
@@ -7,6 +7,7 @@
:data="folderList"
:currentNodeKey="currentFolder?.id"
@handleNodeClick="folderClickHandel"
+ @refreshTree ="refreshFolder"
shareTitle="views.system.share_tool"
isShared
class="p-8"
@@ -109,183 +110,195 @@
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
- {{ $t('common.creator') }}: {{ item.nick_name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('common.creator') }}: {{ item.nick_name }}
-
-
+
+
+
+
+
+
+
+
+ {{ $t('common.creator') }}: {{ item.nick_name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('common.creator') }}: {{ item.nick_name }}
+
+
-
-
-
-
-
-
- {{ $t('common.status.enabled') }}
-
-
-
-
-
- {{ $t('common.status.disabled') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('common.edit') }}
-
-
-
- {{ $t('common.copy') }}
-
-
-
- {{ $t('common.param.initParam') }}
-
-
-
- {{ $t('common.export') }}
-
-
-
- {{ $t('common.delete') }}
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{ $t('common.status.enabled') }}
+
+
+
+
+
+ {{ $t('common.status.disabled') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('common.edit') }}
+
+
+
+ {{ $t('common.copy') }}
+
+
+
+ {{ $t('common.param.initParam') }}
+
+
+
+ {{ $t('common.export') }}
+
+
+
+ {{ $t('common.delete') }}
+
+
+
+
+
+
+
+
+
+
+
+
@@ -373,15 +386,11 @@ function getList() {
})
}
-function getFolder() {
- const params = {}
- folder.asyncGetFolder(FolderSource.TOOL, params, loading).then((res: any) => {
- folderList.value = res.data
- currentFolder.value = res.data?.[0] || {}
- getList()
- })
+function clickFolder(item: any) {
+ currentFolder.value.id = item.id
+ toolList.value = []
+ getList()
}
-
async function changeState(row: any) {
if (row.is_active) {
MsgConfirm(
@@ -444,24 +453,6 @@ function refresh(data: any) {
getList()
}
-function refreshFolder() {
- toolList.value = []
- getFolder()
- getList()
-}
-
-function folderClickHandel(row: any) {
- currentFolder.value = row
- toolList.value = []
- getList()
-}
-
-function clickFolder(item: any) {
- currentFolder.value.id = item.id
- toolList.value = []
- getList()
-}
-
function copyTool(row: any) {
ToolDrawertitle.value = t('views.tool.copyTool')
const obj = cloneDeep(row)
@@ -506,11 +497,6 @@ function configInitParams(item: any) {
})
}
-const CreateFolderDialogRef = ref()
-function openCreateFolder() {
- CreateFolderDialogRef.value.open(FolderSource.TOOL, currentFolder.value.parent_id)
-}
-
const elUploadRef = ref()
function importTool(file: any) {
const formData = new FormData()
@@ -535,8 +521,36 @@ function importTool(file: any) {
})
}
-onMounted(() => {
+// 文件夹相关
+const CreateFolderDialogRef = ref()
+function openCreateFolder() {
+ CreateFolderDialogRef.value.open(FolderSource.TOOL, currentFolder.value.id)
+}
+function getFolder(bool?: boolean) {
+ const params = {}
+ folder.asyncGetFolder(FolderSource.TOOL, params, loading).then((res: any) => {
+ folderList.value = res.data
+ if (bool) {
+ // 初始化刷新
+ currentFolder.value = res.data?.[0] || {}
+ }
+ getList()
+ })
+}
+function refreshFolder() {
+ toolList.value = []
getFolder()
+}
+
+function folderClickHandel(row: any) {
+ currentFolder.value = row
+ toolList.value = []
+ getList()
+}
+
+
+onMounted(() => {
+ getFolder(true)
})