Browse Source

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

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

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

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

Loading…
Cancel
Save