feat: 搜索内容调整
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
"technicalOwnerC": "Technical Owner 3",
|
||||
"technicalOwnerB": "Technical Owner 2",
|
||||
"technicalOwnerA": "Technical Owner 1",
|
||||
"technicalOwner": "Technical Owner",
|
||||
"customerOwner": "Customer Contact",
|
||||
"businessOwner": "Business Owner",
|
||||
"businessStatus": "Business Status",
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"technicalOwnerC": "技术负责人3",
|
||||
"technicalOwnerB": "技术负责人2",
|
||||
"technicalOwnerA": "技术负责人1",
|
||||
"technicalOwner": "技术负责人",
|
||||
"customerOwner": "客户对接人",
|
||||
"businessOwner": "业务负责人",
|
||||
"businessStatus": "商务状态",
|
||||
|
||||
@@ -47,10 +47,11 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
customerList.value = await getCustomerList();
|
||||
return customerList.value;
|
||||
},
|
||||
allowClear: true,
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) =>
|
||||
option.label.toLowerCase().includes(input.toLowerCase()),
|
||||
option.name.toLowerCase().includes(input.toLowerCase()),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -60,10 +61,11 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: projectList,
|
||||
allowClear: true,
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) =>
|
||||
option.label.toLowerCase().includes(input.toLowerCase()),
|
||||
option.name.toLowerCase().includes(input.toLowerCase()),
|
||||
},
|
||||
dependencies: {
|
||||
componentProps: async (values) => {
|
||||
@@ -214,22 +216,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
/** 列表的搜索表单 */
|
||||
export function useGridFormSchema(): VbenFormSchema[] {
|
||||
return [
|
||||
{
|
||||
fieldName: 'customerId',
|
||||
label: $t('license.customer'),
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'projectId',
|
||||
label: $t('license.project'),
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'serialNo',
|
||||
label: 'SN',
|
||||
@@ -238,6 +224,75 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'customerId',
|
||||
label: $t('license.customer'),
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: async () => {
|
||||
customerList.value = await getCustomerList();
|
||||
return customerList.value;
|
||||
},
|
||||
allowClear: true,
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) =>
|
||||
option.name.toLowerCase().includes(input.toLowerCase()),
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'applicant',
|
||||
label: $t('license.applicant'),
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
api: async () => {
|
||||
const data = await getSimpleUserList();
|
||||
return data.map((item) => ({
|
||||
label: item.nickname,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) =>
|
||||
option.label.toLowerCase().includes(input.toLowerCase()),
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'approver',
|
||||
label: $t('license.approver'),
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
api: async () => {
|
||||
const data = await getLicenseAdminList();
|
||||
return data.map((item) => ({
|
||||
label: item.nickname,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) =>
|
||||
option.label.toLowerCase().includes(input.toLowerCase()),
|
||||
},
|
||||
},
|
||||
// {
|
||||
// fieldName: 'projectId',
|
||||
// label: $t('license.project'),
|
||||
// component: 'Input',
|
||||
// componentProps: {
|
||||
// allowClear: true,
|
||||
// },
|
||||
// },
|
||||
{
|
||||
fieldName: 'status',
|
||||
label: $t('license.status'),
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
options: getDictOptions(DICT_TYPE.LIC_LICENSE_STATUS, 'number'),
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'expiryDate',
|
||||
label: $t('license.expiryDate'),
|
||||
@@ -292,24 +347,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
// allowClear: true,
|
||||
// },
|
||||
// },
|
||||
{
|
||||
fieldName: 'applicant',
|
||||
label: $t('license.applicant'),
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
api: async () => {
|
||||
const data = await getSimpleUserList();
|
||||
return data.map((item) => ({
|
||||
label: item.nickname,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) =>
|
||||
option.label.toLowerCase().includes(input.toLowerCase()),
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'applicationTime',
|
||||
label: $t('license.applicationTime'),
|
||||
@@ -319,33 +356,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'approver',
|
||||
label: $t('license.approver'),
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
api: async () => {
|
||||
const data = await getLicenseAdminList();
|
||||
return data.map((item) => ({
|
||||
label: item.nickname,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) =>
|
||||
option.label.toLowerCase().includes(input.toLowerCase()),
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'status',
|
||||
label: $t('license.status'),
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
options: getDictOptions(DICT_TYPE.LIC_LICENSE_STATUS, 'number'),
|
||||
},
|
||||
},
|
||||
// {
|
||||
// fieldName: 'remark',
|
||||
// label: $t('license.remark'),
|
||||
|
||||
@@ -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