|
@@ -273,6 +273,11 @@ const rootDeptOriginId = ref<TreeKey | undefined>(undefined)
|
|
|
const rootNodeName = ref('')
|
|
const rootNodeName = ref('')
|
|
|
const treeOriginIdMap = ref<Record<string, TreeKey | undefined>>({})
|
|
const treeOriginIdMap = ref<Record<string, TreeKey | undefined>>({})
|
|
|
|
|
|
|
|
|
|
+const filterFileListMode = (rows: FileRow[] = []) => {
|
|
|
|
|
+ if (fileViewMode.value !== 'file') return rows
|
|
|
|
|
+ return rows.filter((row) => row.fileType === 'file')
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const getCurrentListApi = () => {
|
|
const getCurrentListApi = () => {
|
|
|
return fileViewMode.value === 'folder'
|
|
return fileViewMode.value === 'folder'
|
|
|
? DataLibraryApi.DataLibraryApi.getChildContentFile
|
|
? DataLibraryApi.DataLibraryApi.getChildContentFile
|
|
@@ -317,7 +322,7 @@ const searchFolderAndFile = async () => {
|
|
|
try {
|
|
try {
|
|
|
syncSelectedTreeOriginId()
|
|
syncSelectedTreeOriginId()
|
|
|
const data = await getCurrentListApi()(queryParams)
|
|
const data = await getCurrentListApi()(queryParams)
|
|
|
- list.value = data
|
|
|
|
|
|
|
+ list.value = filterFileListMode(data)
|
|
|
} finally {
|
|
} finally {
|
|
|
formLoading.value = false
|
|
formLoading.value = false
|
|
|
queryParams.filename = ''
|
|
queryParams.filename = ''
|
|
@@ -574,7 +579,7 @@ const getList = async () => {
|
|
|
syncSelectedTreeOriginId()
|
|
syncSelectedTreeOriginId()
|
|
|
const api = getCurrentListApi()
|
|
const api = getCurrentListApi()
|
|
|
const data = await api(queryParams)
|
|
const data = await api(queryParams)
|
|
|
- list.value = data
|
|
|
|
|
|
|
+ list.value = filterFileListMode(data)
|
|
|
} finally {
|
|
} finally {
|
|
|
formLoading.value = false
|
|
formLoading.value = false
|
|
|
}
|
|
}
|