Browse Source

fix(文件模块): 文件列表优化排序、优化存储器查询

shizhongming 2 years ago
parent
commit
7206519e44
  1. 24
      src/modules/smart-file/views/SmartFile/SmartFileListView.config.ts
  2. 2
      src/modules/smart-file/views/SmartFile/SmartFileListView.vue

24
src/modules/smart-file/views/SmartFile/SmartFileListView.config.ts

@ -1,6 +1,8 @@
import type { SmartColumn, SmartSearchFormSchema } from '@/components/SmartTable';
import type { FormSchema } from '@/components/Form';
import { listApi } from '../SmartFileStorage/SmartFileStorageListView.api';
/**
*
*/
@ -158,21 +160,21 @@ export const getSearchFormSchemas = (t: Function): SmartSearchFormSchema[] => {
{
field: 'fileStorageId',
label: t('system.views.file.title.fileStorageId'),
component: 'SmartApiSelectTable',
component: 'ApiSelect',
componentProps: {
style: {
width: '150px',
},
modelClassName: 'com.smart.file.manager.model.SmartFileStoragePO',
valueFieldName: 'id',
labelFieldName: 'storageName',
params: {
sortName: 'seq',
parameter: {
'deleteYn@<>': true,
'useYn@=': true,
},
},
api: () =>
listApi({
sortName: 'seq',
parameter: {
'deleteYn@<>': true,
'useYn@=': true,
},
}),
labelField: 'storageName',
valueField: 'id',
},
searchSymbol: '=',
},

2
src/modules/smart-file/views/SmartFile/SmartFileListView.vue

@ -66,6 +66,7 @@
border: true,
pagerConfig: true,
useSearchForm: true,
showOverflow: 'tooltip',
rowConfig: {
keyField: 'fileId',
isCurrent: true,
@ -76,6 +77,7 @@
columnConfig: {
resizable: true,
},
sortConfig: { remote: true, defaultSort: { field: 'createTime', order: 'desc' } },
searchFormConfig: {
schemas: getSearchFormSchemas(t),
searchWithSymbol: true,

Loading…
Cancel
Save