104 lines
2.0 KiB
TypeScript
104 lines
2.0 KiB
TypeScript
import type { FormSchemaGetter } from '#/adapter/form';
|
||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||
|
||
|
||
export const querySchema: FormSchemaGetter = () => [
|
||
{
|
||
component: 'Input',
|
||
fieldName: 'factoryNo',
|
||
label: '厂商编码',
|
||
},
|
||
{
|
||
component: 'Input',
|
||
fieldName: 'factoryName',
|
||
label: '设备厂商名称',
|
||
},
|
||
{
|
||
component: 'Input',
|
||
fieldName: 'dataState',
|
||
label: '数据状态:1有效,0无效',
|
||
},
|
||
{
|
||
component: 'Input',
|
||
fieldName: 'searchValue',
|
||
label: '搜索值',
|
||
},
|
||
];
|
||
|
||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||
// export const columns: () => VxeGridProps['columns'] = () => [
|
||
export const columns: VxeGridProps['columns'] = [
|
||
{ type: 'checkbox', width: 60 },
|
||
{
|
||
title: '',
|
||
field: 'id',
|
||
},
|
||
{
|
||
title: '厂商编码',
|
||
field: 'factoryNo',
|
||
},
|
||
{
|
||
title: '设备厂商名称',
|
||
field: 'factoryName',
|
||
},
|
||
{
|
||
title: '备注',
|
||
field: 'remark',
|
||
},
|
||
{
|
||
title: '数据状态:1有效,0无效',
|
||
field: 'dataState',
|
||
},
|
||
{
|
||
title: '搜索值',
|
||
field: 'searchValue',
|
||
},
|
||
{
|
||
field: 'action',
|
||
fixed: 'right',
|
||
slots: { default: 'action' },
|
||
title: '操作',
|
||
width: 180,
|
||
},
|
||
];
|
||
|
||
export const modalSchema: FormSchemaGetter = () => [
|
||
{
|
||
label: '',
|
||
fieldName: 'id',
|
||
component: 'Input',
|
||
dependencies: {
|
||
show: () => false,
|
||
triggerFields: [''],
|
||
},
|
||
},
|
||
{
|
||
label: '厂商编码',
|
||
fieldName: 'factoryNo',
|
||
component: 'Input',
|
||
rules: 'required',
|
||
},
|
||
{
|
||
label: '设备厂商名称',
|
||
fieldName: 'factoryName',
|
||
component: 'Input',
|
||
rules: 'required',
|
||
},
|
||
{
|
||
label: '备注',
|
||
fieldName: 'remark',
|
||
component: 'Input',
|
||
},
|
||
{
|
||
label: '数据状态:1有效,0无效',
|
||
fieldName: 'dataState',
|
||
component: 'Input',
|
||
rules: 'required',
|
||
},
|
||
{
|
||
label: '搜索值',
|
||
fieldName: 'searchValue',
|
||
component: 'Input',
|
||
},
|
||
];
|