From 3c3c21733c221bb9020f2346635b323859803db1 Mon Sep 17 00:00:00 2001 From: louis <869322496@qq.com> Date: Fri, 8 Mar 2024 16:24:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20minio=E5=8A=9F=E8=83=BD=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/core/dynamic-table/src/dynamic-table.ts | 1 + .../core/dynamic-table/src/hooks/useTableMethods.ts | 6 ++++-- .../netdisk/components/file-operate-button-list.vue | 2 ++ src/views/netdisk/components/file-preview-drawer.vue | 10 +++++----- src/views/netdisk/manage.vue | 10 +++++++--- 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/components/core/dynamic-table/src/dynamic-table.ts b/src/components/core/dynamic-table/src/dynamic-table.ts index 66a46d7..95789d2 100644 --- a/src/components/core/dynamic-table/src/dynamic-table.ts +++ b/src/components/core/dynamic-table/src/dynamic-table.ts @@ -129,6 +129,7 @@ export const dynamicTableEmits = { change: (...rest: OnChangeCallbackParams) => rest.length === 4, 'toggle-advanced': (isAdvanced: boolean) => isBoolean(isAdvanced), 'fetch-error': (error) => error, + 'on-fetch': (loading: boolean) => isBoolean(loading), 'update:expandedRowKeys': (keys: Key[]) => keys, 'expanded-rows-change': (keyValues: string[]) => Array.isArray(keyValues), }; diff --git a/src/components/core/dynamic-table/src/hooks/useTableMethods.ts b/src/components/core/dynamic-table/src/hooks/useTableMethods.ts index a74673a..cff7254 100644 --- a/src/components/core/dynamic-table/src/hooks/useTableMethods.ts +++ b/src/components/core/dynamic-table/src/hooks/useTableMethods.ts @@ -62,10 +62,11 @@ export const useTableMethods = ({ state, props, emit }: UseTableMethodsContext) */ const fetchData = debounce(async (params = {}) => { const { dataRequest, dataSource, fetchConfig, searchParams } = props; - + emit('on-fetch', true); if (!dataRequest || !isFunction(dataRequest) || Array.isArray(dataSource)) { return; } + try { let pageParams: Recordable = {}; const pagination = unref(paginationRef)!; @@ -132,7 +133,8 @@ export const useTableMethods = ({ state, props, emit }: UseTableMethodsContext) return tableData; } catch (error) { warn(`表格查询出错:${error}`); - emit('fetch-error', error); + + emit('on-fetch', true); tableData.value = []; updatePagination({ total: 0 }); } finally { diff --git a/src/views/netdisk/components/file-operate-button-list.vue b/src/views/netdisk/components/file-operate-button-list.vue index 7debc5e..16156f1 100644 --- a/src/views/netdisk/components/file-operate-button-list.vue +++ b/src/views/netdisk/components/file-operate-button-list.vue @@ -203,6 +203,8 @@ emit('update:searchKey', ''); return; } + message.info('全盘搜索功能暂未实现,敬请期待'); + return; await showModal({ modalProps: { title: '全盘搜索', diff --git a/src/views/netdisk/components/file-preview-drawer.vue b/src/views/netdisk/components/file-preview-drawer.vue index 36b4658..4e1a174 100644 --- a/src/views/netdisk/components/file-preview-drawer.vue +++ b/src/views/netdisk/components/file-preview-drawer.vue @@ -26,7 +26,7 @@ - + @@ -69,11 +69,11 @@ const detailInfoMap = new Map([ ['name', '文件名'], ['mimeType', '文件类型'], - ['hash', '文件Hash'], - ['md5', '文件MD5'], + // ['hash', '文件Hash'], + // ['md5', '文件MD5'], ['fsize', '文件大小'], ['putTime', '上传时间'], - ['uploader', '上传人员'], + // ['uploader', '上传人员'], ] as const); const loading = ref(false); diff --git a/src/views/netdisk/manage.vue b/src/views/netdisk/manage.vue index bf7c043..4424050 100644 --- a/src/views/netdisk/manage.vue +++ b/src/views/netdisk/manage.vue @@ -25,16 +25,17 @@ /> - + @@ -71,7 +75,7 @@ import { createContextMenu } from '@/components/basic/context-menu'; import { useTable } from '@/components/core/dynamic-table'; import { hasPermission } from '@/permission'; - + import { Button } from 'ant-design-vue'; defineOptions({ name: 'NetDiskManage', });