feat: 搜索栏调整

This commit is contained in:
caiyuchao
2025-09-12 09:47:09 +08:00
parent 5316506430
commit 5858d15809
9 changed files with 43 additions and 28 deletions

View File

@@ -82,6 +82,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
formOptions: {
schema: useGridFormSchema(),
submitOnEnter: true,
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-4',
},
gridOptions: {
columns: useGridColumns(),

View File

@@ -250,6 +250,14 @@ export function useGridFormSchema(): VbenFormSchema[] {
option.name.toLowerCase().includes(input.toLowerCase()),
},
},
{
fieldName: 'projectName',
label: $t('project.name'),
component: 'Input',
componentProps: {
allowClear: true,
},
},
{
fieldName: 'applicant',
label: $t('license.applicant'),

View File

@@ -135,6 +135,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
collapsedRows: 2,
schema: useGridFormSchema(),
submitOnEnter: true,
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-4',
},
gridOptions: {
columns: useGridColumns(),

View File

@@ -286,12 +286,11 @@ export function useGridFormSchema(): VbenFormSchema[] {
},
},
{
fieldName: 'status',
label: $t('project.status'),
component: 'Select',
fieldName: 'name',
label: $t('project.name'),
component: 'Input',
componentProps: {
allowClear: true,
options: getDictOptions(DICT_TYPE.LIC_PROJECT_STATUS, 'number'),
},
},
{
@@ -308,6 +307,29 @@ export function useGridFormSchema(): VbenFormSchema[] {
},
},
},
{
fieldName: 'businessOwner',
label: $t('project.businessOwner'),
component: 'Select',
componentProps: {
options: userList,
allowClear: true,
showSearch: true,
fieldNames: { label: 'nickname', value: 'id' },
filterOption: (input: string, option: any) => {
return option.nickname.toLowerCase().includes(input.toLowerCase());
},
},
},
{
fieldName: 'status',
label: $t('project.status'),
component: 'Select',
componentProps: {
allowClear: true,
options: getDictOptions(DICT_TYPE.LIC_PROJECT_STATUS, 'number'),
},
},
{
fieldName: 'businessStatus',
label: $t('project.businessStatus'),
@@ -318,8 +340,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
},
},
{
fieldName: 'name',
label: $t('project.name'),
fieldName: 'customerOwner',
label: $t('project.customerOwner'),
component: 'Input',
componentProps: {
allowClear: true,
@@ -341,28 +363,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
allowClear: true,
},
},
{
fieldName: 'businessOwner',
label: $t('project.businessOwner'),
component: 'Select',
componentProps: {
options: userList,
allowClear: true,
showSearch: true,
fieldNames: { label: 'nickname', value: 'id' },
filterOption: (input: string, option: any) => {
return option.nickname.toLowerCase().includes(input.toLowerCase());
},
},
},
{
fieldName: 'customerOwner',
label: $t('project.customerOwner'),
component: 'Input',
componentProps: {
allowClear: true,
},
},
// {
// fieldName: 'startTime',
// label: $t('project.startTime'),

View File

@@ -113,6 +113,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
collapsedRows: 2,
schema: useGridFormSchema(),
submitOnEnter: true,
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-4',
},
gridOptions: {
columns: useGridColumns(onActionClick),

View File

@@ -11,6 +11,7 @@ const [Grid] = useVbenVxeGrid({
schema: useExpiringGridFormSchema(),
submitOnEnter: true,
fieldMappingTime: [['expiryDate', ['expiryDateStart', 'expiryDateEnd']]],
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-4',
},
gridOptions: {
columns: useExpiringGridColumns(),

View File

@@ -11,6 +11,7 @@ const [Grid] = useVbenVxeGrid({
schema: useExpiredGridFormSchema(),
submitOnEnter: true,
fieldMappingTime: [['expiryDate', ['expiryDateStart', 'expiryDateEnd']]],
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-4',
},
gridOptions: {
columns: useExpiredGridColumns(),

View File

@@ -11,6 +11,7 @@ const [Grid] = useVbenVxeGrid({
schema: useStaffGridFormSchema(),
submitOnEnter: true,
fieldMappingTime: [['updateTime', ['updateTimeStart', 'updateTimeEnd']]],
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-4',
},
gridOptions: {
columns: useStaffGridColumns(),

View File

@@ -11,6 +11,7 @@ const [Grid] = useVbenVxeGrid({
schema: useProjectGridFormSchema(),
submitOnEnter: true,
fieldMappingTime: [['updateTime', ['updateTimeStart', 'updateTimeEnd']]],
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-4',
},
gridOptions: {
columns: useProjectGridColumns(),