2025-06-28 02:41:09 +08:00
|
|
|
import type { FormSchemaGetter } from '#/adapter/form';
|
|
|
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
2025-06-26 18:04:51 +08:00
|
|
|
|
|
|
|
export const querySchema: FormSchemaGetter = () => [
|
|
|
|
{
|
|
|
|
component: 'Input',
|
2025-06-28 02:41:09 +08:00
|
|
|
fieldName: 'communityName',
|
|
|
|
label: '社区',
|
2025-06-26 18:04:51 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Input',
|
2025-06-28 02:41:09 +08:00
|
|
|
fieldName: 'orientation',
|
|
|
|
label: '朝向',
|
2025-06-26 18:04:51 +08:00
|
|
|
},
|
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
component: 'Input',
|
|
|
|
fieldName: 'isForSale',
|
|
|
|
label: '是否可售',
|
2025-06-26 18:04:51 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Select',
|
2025-06-28 02:41:09 +08:00
|
|
|
componentProps: {},
|
2025-06-26 18:04:51 +08:00
|
|
|
fieldName: 'status',
|
2025-06-28 02:41:09 +08:00
|
|
|
label: '状态',
|
2025-06-26 18:04:51 +08:00
|
|
|
},
|
|
|
|
];
|
|
|
|
|
2025-06-28 02:41:09 +08:00
|
|
|
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
|
|
|
// export const columns: () => VxeGridProps['columns'] = () => [
|
2025-06-26 18:04:51 +08:00
|
|
|
export const columns: VxeGridProps['columns'] = [
|
|
|
|
{ type: 'checkbox', width: 60 },
|
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
title: '所属楼层ID',
|
|
|
|
field: 'floorId',
|
2025-06-26 18:04:51 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '房间号',
|
|
|
|
field: 'roomNumber',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '房间类型',
|
|
|
|
field: 'roomType',
|
|
|
|
},
|
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
title: '面积(平方米)',
|
2025-06-26 18:04:51 +08:00
|
|
|
field: 'area',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '户型',
|
|
|
|
field: 'layout',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '朝向',
|
|
|
|
field: 'orientation',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '是否可售',
|
|
|
|
field: 'isForSale',
|
|
|
|
},
|
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
title: '状态',
|
2025-06-26 18:04:51 +08:00
|
|
|
field: 'status',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'action',
|
|
|
|
fixed: 'right',
|
|
|
|
slots: { default: 'action' },
|
|
|
|
title: '操作',
|
|
|
|
width: 180,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const modalSchema: FormSchemaGetter = () => [
|
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
label: '',
|
2025-06-26 18:04:51 +08:00
|
|
|
fieldName: 'id',
|
|
|
|
component: 'Input',
|
|
|
|
dependencies: {
|
|
|
|
show: () => false,
|
|
|
|
triggerFields: [''],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
label: '所属楼层ID',
|
|
|
|
fieldName: 'floorId',
|
2025-06-26 18:04:51 +08:00
|
|
|
component: 'Input',
|
|
|
|
rules: 'required',
|
|
|
|
},
|
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
label: '房间号(如101,202)',
|
2025-06-26 18:04:51 +08:00
|
|
|
fieldName: 'roomNumber',
|
|
|
|
component: 'Input',
|
|
|
|
rules: 'required',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '房间类型',
|
|
|
|
fieldName: 'roomType',
|
|
|
|
component: 'Select',
|
2025-06-28 02:41:09 +08:00
|
|
|
componentProps: {},
|
2025-06-26 18:04:51 +08:00
|
|
|
},
|
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
label: '面积(平方米)',
|
2025-06-26 18:04:51 +08:00
|
|
|
fieldName: 'area',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
2025-06-27 15:16:06 +08:00
|
|
|
label: '户型',
|
2025-06-26 18:04:51 +08:00
|
|
|
fieldName: 'layout',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '朝向',
|
|
|
|
fieldName: 'orientation',
|
2025-06-28 02:41:09 +08:00
|
|
|
component: 'Input',
|
2025-06-26 18:04:51 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '是否可售',
|
|
|
|
fieldName: 'isForSale',
|
2025-06-28 02:41:09 +08:00
|
|
|
component: 'Input',
|
2025-06-26 18:04:51 +08:00
|
|
|
},
|
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
label: '状态',
|
2025-06-26 18:04:51 +08:00
|
|
|
fieldName: 'status',
|
|
|
|
component: 'Select',
|
2025-06-28 02:41:09 +08:00
|
|
|
componentProps: {},
|
2025-06-26 18:04:51 +08:00
|
|
|
},
|
|
|
|
];
|