feat: 搜索内容调整
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
"technicalOwnerC": "Technical Owner 3",
|
"technicalOwnerC": "Technical Owner 3",
|
||||||
"technicalOwnerB": "Technical Owner 2",
|
"technicalOwnerB": "Technical Owner 2",
|
||||||
"technicalOwnerA": "Technical Owner 1",
|
"technicalOwnerA": "Technical Owner 1",
|
||||||
|
"technicalOwner": "Technical Owner",
|
||||||
"customerOwner": "Customer Contact",
|
"customerOwner": "Customer Contact",
|
||||||
"businessOwner": "Business Owner",
|
"businessOwner": "Business Owner",
|
||||||
"businessStatus": "Business Status",
|
"businessStatus": "Business Status",
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
"technicalOwnerC": "技术负责人3",
|
"technicalOwnerC": "技术负责人3",
|
||||||
"technicalOwnerB": "技术负责人2",
|
"technicalOwnerB": "技术负责人2",
|
||||||
"technicalOwnerA": "技术负责人1",
|
"technicalOwnerA": "技术负责人1",
|
||||||
|
"technicalOwner": "技术负责人",
|
||||||
"customerOwner": "客户对接人",
|
"customerOwner": "客户对接人",
|
||||||
"businessOwner": "业务负责人",
|
"businessOwner": "业务负责人",
|
||||||
"businessStatus": "商务状态",
|
"businessStatus": "商务状态",
|
||||||
|
|||||||
@@ -47,10 +47,11 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
customerList.value = await getCustomerList();
|
customerList.value = await getCustomerList();
|
||||||
return customerList.value;
|
return customerList.value;
|
||||||
},
|
},
|
||||||
|
allowClear: true,
|
||||||
fieldNames: { label: 'name', value: 'id' },
|
fieldNames: { label: 'name', value: 'id' },
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
filterOption: (input: string, option: any) =>
|
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',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: projectList,
|
options: projectList,
|
||||||
|
allowClear: true,
|
||||||
fieldNames: { label: 'name', value: 'id' },
|
fieldNames: { label: 'name', value: 'id' },
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
filterOption: (input: string, option: any) =>
|
filterOption: (input: string, option: any) =>
|
||||||
option.label.toLowerCase().includes(input.toLowerCase()),
|
option.name.toLowerCase().includes(input.toLowerCase()),
|
||||||
},
|
},
|
||||||
dependencies: {
|
dependencies: {
|
||||||
componentProps: async (values) => {
|
componentProps: async (values) => {
|
||||||
@@ -214,22 +216,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
/** 列表的搜索表单 */
|
/** 列表的搜索表单 */
|
||||||
export function useGridFormSchema(): VbenFormSchema[] {
|
export function useGridFormSchema(): VbenFormSchema[] {
|
||||||
return [
|
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',
|
fieldName: 'serialNo',
|
||||||
label: 'SN',
|
label: 'SN',
|
||||||
@@ -238,6 +224,75 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
allowClear: true,
|
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',
|
fieldName: 'expiryDate',
|
||||||
label: $t('license.expiryDate'),
|
label: $t('license.expiryDate'),
|
||||||
@@ -292,24 +347,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
// allowClear: true,
|
// 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',
|
fieldName: 'applicationTime',
|
||||||
label: $t('license.applicationTime'),
|
label: $t('license.applicationTime'),
|
||||||
@@ -319,33 +356,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
allowClear: true,
|
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',
|
// fieldName: 'remark',
|
||||||
// label: $t('license.remark'),
|
// label: $t('license.remark'),
|
||||||
|
|||||||
@@ -192,6 +192,58 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
/** 列表的搜索表单 */
|
/** 列表的搜索表单 */
|
||||||
export function useGridFormSchema(): VbenFormSchema[] {
|
export function useGridFormSchema(): VbenFormSchema[] {
|
||||||
return [
|
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',
|
fieldName: 'name',
|
||||||
label: $t('project.name'),
|
label: $t('project.name'),
|
||||||
@@ -216,15 +268,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
allowClear: true,
|
allowClear: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
fieldName: 'businessStatus',
|
|
||||||
label: $t('project.businessStatus'),
|
|
||||||
component: 'Select',
|
|
||||||
componentProps: {
|
|
||||||
allowClear: true,
|
|
||||||
options: getDictOptions(DICT_TYPE.LIC_BUSINESS_STATUS, 'number'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
fieldName: 'businessOwner',
|
fieldName: 'businessOwner',
|
||||||
label: $t('project.businessOwner'),
|
label: $t('project.businessOwner'),
|
||||||
@@ -241,30 +284,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
allowClear: true,
|
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',
|
// fieldName: 'startTime',
|
||||||
// label: $t('project.startTime'),
|
// label: $t('project.startTime'),
|
||||||
@@ -283,23 +302,14 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
// allowClear: true,
|
// allowClear: true,
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
{
|
// {
|
||||||
fieldName: 'status',
|
// fieldName: 'envInfo',
|
||||||
label: $t('project.status'),
|
// label: $t('project.envInfo'),
|
||||||
component: 'Select',
|
// component: 'Input',
|
||||||
componentProps: {
|
// componentProps: {
|
||||||
allowClear: true,
|
// allowClear: true,
|
||||||
options: getDictOptions(DICT_TYPE.LIC_PROJECT_STATUS, 'number'),
|
// },
|
||||||
},
|
// },
|
||||||
},
|
|
||||||
{
|
|
||||||
fieldName: 'envInfo',
|
|
||||||
label: $t('project.envInfo'),
|
|
||||||
component: 'Input',
|
|
||||||
componentProps: {
|
|
||||||
allowClear: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
fieldName: 'createTime',
|
fieldName: 'createTime',
|
||||||
label: $t('project.creationTime'),
|
label: $t('project.creationTime'),
|
||||||
@@ -345,7 +355,7 @@ export function useGridColumns(
|
|||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'sn',
|
field: 'serialNo',
|
||||||
title: 'SN',
|
title: 'SN',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user