2025-06-27 15:16:06 +08:00
|
|
|
import type {FormSchemaGetter} from '#/adapter/form';
|
|
|
|
import type {VxeGridProps} from '#/adapter/vxe-table';
|
2025-06-26 18:04:51 +08:00
|
|
|
import {getDictOptions} from "#/utils/dict";
|
|
|
|
|
|
|
|
export const querySchema: FormSchemaGetter = () => [
|
|
|
|
{
|
|
|
|
component: 'Select',
|
|
|
|
fieldName: 'floorCode',
|
2025-06-27 15:16:06 +08:00
|
|
|
label: '所属社区',
|
2025-06-26 18:04:51 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Select',
|
|
|
|
fieldName: 'floorCode1',
|
|
|
|
label: '所属建筑',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Select',
|
|
|
|
fieldName: 'floorCode2',
|
|
|
|
label: '所属单元',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Select',
|
|
|
|
fieldName: 'floorCode3',
|
|
|
|
label: '所属楼层',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Input',
|
2025-06-27 15:16:06 +08:00
|
|
|
fieldName: 'roomNumber',
|
|
|
|
label: '房间号',
|
2025-06-26 18:04:51 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Input',
|
2025-06-27 15:16:06 +08:00
|
|
|
fieldName: 'roomCode',
|
|
|
|
label: '房间编码',
|
2025-06-26 18:04:51 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
options: getDictOptions('room_type'),
|
|
|
|
},
|
|
|
|
fieldName: 'roomType',
|
|
|
|
label: '房间类型',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
options: getDictOptions('wy_fjzt'),
|
|
|
|
},
|
|
|
|
fieldName: 'status',
|
|
|
|
label: '房间状态',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const columns: VxeGridProps['columns'] = [
|
|
|
|
{ type: 'checkbox', width: 60 },
|
|
|
|
{
|
2025-06-27 15:16:06 +08:00
|
|
|
title: '序号',
|
|
|
|
field: 'id',
|
|
|
|
slots: {
|
|
|
|
default: ({ rowIndex }) => {
|
|
|
|
return (rowIndex + 1).toString();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '所属楼层',
|
2025-06-26 18:04:51 +08:00
|
|
|
field: 'floorCode',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '房间编码',
|
|
|
|
field: 'roomCode',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '房间号',
|
|
|
|
field: 'roomNumber',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '房间类型',
|
|
|
|
field: 'roomType',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '面积(㎡)',
|
|
|
|
field: 'area',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '户型',
|
|
|
|
field: 'layout',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '朝向',
|
|
|
|
field: 'orientation',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '是否可售',
|
|
|
|
field: 'isForSale',
|
|
|
|
},
|
|
|
|
{
|
2025-06-27 15:16:06 +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 = () => [
|
|
|
|
{
|
|
|
|
label: '主键',
|
|
|
|
fieldName: 'id',
|
|
|
|
component: 'Input',
|
|
|
|
dependencies: {
|
|
|
|
show: () => false,
|
|
|
|
triggerFields: [''],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2025-06-27 15:16:06 +08:00
|
|
|
label: '所属社区',
|
2025-06-26 18:04:51 +08:00
|
|
|
fieldName: 'floorCode',
|
|
|
|
component: 'Input',
|
|
|
|
rules: 'required',
|
|
|
|
},
|
|
|
|
{
|
2025-06-27 15:16:06 +08:00
|
|
|
label: '所属建筑',
|
|
|
|
fieldName: 'floorCode',
|
2025-06-26 18:04:51 +08:00
|
|
|
component: 'Input',
|
|
|
|
rules: 'required',
|
|
|
|
},
|
|
|
|
{
|
2025-06-27 15:16:06 +08:00
|
|
|
label: '所属单元',
|
|
|
|
fieldName: 'floorCode',
|
|
|
|
component: 'Input',
|
|
|
|
rules: 'required',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '所属楼层',
|
|
|
|
fieldName: 'floorCode',
|
|
|
|
component: 'Input',
|
|
|
|
rules: 'required',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '房间号',
|
2025-06-26 18:04:51 +08:00
|
|
|
fieldName: 'roomNumber',
|
|
|
|
component: 'Input',
|
|
|
|
rules: 'required',
|
|
|
|
},
|
2025-06-27 15:16:06 +08:00
|
|
|
{
|
|
|
|
label: '房间编码',
|
|
|
|
fieldName: 'roomCode',
|
|
|
|
component: 'Input',
|
|
|
|
rules: 'required',
|
|
|
|
},
|
2025-06-26 18:04:51 +08:00
|
|
|
{
|
|
|
|
label: '房间类型',
|
|
|
|
fieldName: 'roomType',
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
options: getDictOptions('room_type'),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2025-06-27 15:16:06 +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',
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
options: getDictOptions('direction_towards'),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '是否可售',
|
|
|
|
fieldName: 'isForSale',
|
2025-06-27 15:16:06 +08:00
|
|
|
component: 'Select',
|
2025-06-26 18:04:51 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '房间状态',
|
|
|
|
fieldName: 'status',
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
options: getDictOptions('wy_fjzt'),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|