Files
admin-vben5/apps/web-antd/src/views/property/factory/data.ts

104 lines
2.0 KiB
TypeScript
Raw Normal View History

2025-06-18 11:03:42 +08:00
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无效',
},
2025-06-19 09:50:46 +08:00
{
component: 'Input',
fieldName: 'searchValue',
label: '搜索值',
},
2025-06-18 11:03:42 +08:00
];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
2025-06-19 09:50:46 +08:00
{
title: '',
field: 'id',
},
2025-06-18 11:03:42 +08:00
{
title: '厂商编码',
field: 'factoryNo',
},
{
title: '设备厂商名称',
field: 'factoryName',
},
{
title: '备注',
field: 'remark',
},
{
title: '数据状态1有效0无效',
field: 'dataState',
},
2025-06-19 09:50:46 +08:00
{
title: '搜索值',
field: 'searchValue',
},
2025-06-18 11:03:42 +08:00
{
field: 'action',
fixed: 'right',
slots: { default: 'action' },
title: '操作',
width: 180,
},
];
export const modalSchema: FormSchemaGetter = () => [
{
2025-06-19 09:50:46 +08:00
label: '',
2025-06-18 11:03:42 +08:00
fieldName: 'id',
component: 'Input',
dependencies: {
show: () => false,
triggerFields: [''],
},
},
2025-06-19 09:50:46 +08:00
{
label: '厂商编码',
fieldName: 'factoryNo',
component: 'Input',
rules: 'required',
},
2025-06-18 11:03:42 +08:00
{
label: '设备厂商名称',
fieldName: 'factoryName',
component: 'Input',
rules: 'required',
},
{
label: '备注',
fieldName: 'remark',
component: 'Input',
},
{
label: '数据状态1有效0无效',
fieldName: 'dataState',
component: 'Input',
rules: 'required',
},
2025-06-19 09:50:46 +08:00
{
label: '搜索值',
fieldName: 'searchValue',
component: 'Input',
},
2025-06-18 11:03:42 +08:00
];