feat: 搜索内容调整
This commit is contained in:
@@ -192,6 +192,58 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
/** 列表的搜索表单 */
|
||||
export function useGridFormSchema(): VbenFormSchema[] {
|
||||
return [
|
||||
{
|
||||
fieldName: 'serialNo',
|
||||
label: 'SN',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'customerId',
|
||||
label: $t('project.belongCustomer'),
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: async () => {
|
||||
const data = await getCustomerList();
|
||||
return data.map((item) => ({
|
||||
// label: `${item.name}(${item.code})`,
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) =>
|
||||
option.label.toLowerCase().includes(input.toLowerCase()),
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'status',
|
||||
label: $t('project.status'),
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
options: getDictOptions(DICT_TYPE.LIC_PROJECT_STATUS, 'number'),
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'technicalOwner',
|
||||
label: $t('project.technicalOwner'),
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'businessStatus',
|
||||
label: $t('project.businessStatus'),
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
options: getDictOptions(DICT_TYPE.LIC_BUSINESS_STATUS, 'number'),
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'name',
|
||||
label: $t('project.name'),
|
||||
@@ -216,15 +268,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'businessStatus',
|
||||
label: $t('project.businessStatus'),
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
options: getDictOptions(DICT_TYPE.LIC_BUSINESS_STATUS, 'number'),
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'businessOwner',
|
||||
label: $t('project.businessOwner'),
|
||||
@@ -241,30 +284,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'technicalOwnerA',
|
||||
label: $t('project.technicalOwnerA'),
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'technicalOwnerB',
|
||||
label: $t('project.technicalOwnerB'),
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'technicalOwnerC',
|
||||
label: $t('project.technicalOwnerC'),
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
// {
|
||||
// fieldName: 'startTime',
|
||||
// label: $t('project.startTime'),
|
||||
@@ -283,23 +302,14 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
// allowClear: true,
|
||||
// },
|
||||
// },
|
||||
{
|
||||
fieldName: 'status',
|
||||
label: $t('project.status'),
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
options: getDictOptions(DICT_TYPE.LIC_PROJECT_STATUS, 'number'),
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'envInfo',
|
||||
label: $t('project.envInfo'),
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
// {
|
||||
// fieldName: 'envInfo',
|
||||
// label: $t('project.envInfo'),
|
||||
// component: 'Input',
|
||||
// componentProps: {
|
||||
// allowClear: true,
|
||||
// },
|
||||
// },
|
||||
{
|
||||
fieldName: 'createTime',
|
||||
label: $t('project.creationTime'),
|
||||
@@ -345,7 +355,7 @@ export function useGridColumns(
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
field: 'sn',
|
||||
field: 'serialNo',
|
||||
title: 'SN',
|
||||
minWidth: 120,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user