Files
admin-vben5/apps/web-antd/src/views/property/factory/data.ts
2025-06-19 09:50:46 +08:00

104 lines
2.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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',
},
];