feat:房间添加是否重要、房间图片字段
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
2025-07-31 11:40:57 +08:00
parent ea9eda3973
commit b7ecd38f59
3 changed files with 37 additions and 49 deletions

View File

@@ -19,7 +19,7 @@ export interface RoomVO {
/** /**
* 房间类型('住宅','商铺','办公室','设备间','公共区域') * 房间类型('住宅','商铺','办公室','设备间','公共区域')
*/ */
roomType: number; roomType: string;
/** /**
* 建筑面积(平方米) * 建筑面积(平方米)
@@ -49,7 +49,7 @@ export interface RoomVO {
/** /**
* 状态('空置','已售','已租','自用' * 状态('空置','已售','已租','自用'
*/ */
status: number; status: string;
} }

View File

@@ -10,15 +10,6 @@ export const querySchema: FormSchemaGetter = () => [
fieldName: 'communityName', fieldName: 'communityName',
label: '社区', label: '社区',
}, },
{
component: 'Input',
fieldName: 'orientation',
label: '朝向',
componentProps: {
getPopupContainer,
options: getDictOptions(DictEnum.wy_direction_towards),
},
},
{ {
component: 'Select', component: 'Select',
componentProps: { componentProps: {
@@ -47,30 +38,22 @@ export const columns: VxeGridProps['columns'] = [
field: 'area', field: 'area',
}, },
{ {
title: '套内面积', title: '使用面积',
field: 'insideInArea', field: 'insideInArea',
}, },
{ {
title: '户型', title: '是否重要',
field: 'layout', field: 'isMatter',
}, slots:{
{ default:({row})=>{
title: '朝向', return renderDict(row.isMatter,'wy_fjzydj')
field: 'orientationName', }
}, }
{
title: '是否可售',
field: 'isForSale',
slots: {
default: ({ row }) => {
return renderDict(row.isForSale, DictEnum.wy_sf);
},
},
}, },
{ {
title: '状态', title: '状态',
field: 'statusName', field: 'statusName',
}, },
{ {
field: 'action', field: 'action',
@@ -97,6 +80,7 @@ export const modalSchema: FormSchemaGetter = () => [
defaultValue: undefined, defaultValue: undefined,
label: '社区建筑', label: '社区建筑',
rules: 'selectRequired', rules: 'selectRequired',
formItemClass: 'col-span-2',
}, },
{ {
label: '房间号', label: '房间号',
@@ -112,42 +96,34 @@ export const modalSchema: FormSchemaGetter = () => [
getPopupContainer, getPopupContainer,
options: getDictOptions(DictEnum.wy_room_type), options: getDictOptions(DictEnum.wy_room_type),
}, },
rules:'selectRequired'
}, },
{ {
label: '建筑面积', label: '建筑面积',
fieldName: 'area', fieldName: 'area',
component: 'Input', component: 'InputNumber',
componentProps:{
min:0,
},
rules:'required'
}, },
{ {
label: '套内面积', label: '使用面积',
fieldName: 'insideInArea', fieldName: 'insideInArea',
component: 'InputNumber', component: 'InputNumber',
componentProps:{ componentProps:{
min:0, min:0,
} },
rules:'required'
}, },
{ {
label: '户型', label: '是否重要',
fieldName: 'layout', fieldName: 'isMatter',
component: 'Input',
},
{
label: '朝向',
fieldName: 'orientation',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
getPopupContainer, options: getDictOptions('wy_fjzydj'),
options: getDictOptions(DictEnum.wy_direction_towards),
},
},
{
label: '是否可售',
fieldName: 'isForSale',
component: 'Select',
componentProps: {
getPopupContainer,
options: getDictOptions(DictEnum.wy_sf),
}, },
rules:'selectRequired'
}, },
{ {
label: '状态', label: '状态',
@@ -157,5 +133,15 @@ export const modalSchema: FormSchemaGetter = () => [
getPopupContainer, getPopupContainer,
options: getDictOptions(DictEnum.wy_fjzt), options: getDictOptions(DictEnum.wy_fjzt),
}, },
rules:'selectRequired'
},
{
label: '房间图片',
fieldName: 'imgUrl',
component: 'ImageUpload',
componentProps: {
maxCount: 1, // 最大上传文件数 默认为1 为1会绑定为string而非string[]类型
},
formItemClass: 'col-span-2',
}, },
]; ];

View File

@@ -59,6 +59,8 @@ const [BasicModal, modalApi] = useVbenModal({
await formApi.setValues({ await formApi.setValues({
...record, ...record,
isForSale: String(record.isForSale), isForSale: String(record.isForSale),
status:String(record.status),
roomType:String(record.roomType),
}); });
} }
await markInitialized(); await markInitialized();