From b7ecd38f593e2c00142f4ecc556d2c554188c4f3 Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Thu, 31 Jul 2025 11:40:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=88=BF=E9=97=B4=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E9=87=8D=E8=A6=81=E3=80=81=E6=88=BF=E9=97=B4?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web-antd/src/api/property/room/model.d.ts | 4 +- apps/web-antd/src/views/property/room/data.ts | 80 ++++++++----------- .../src/views/property/room/room-modal.vue | 2 + 3 files changed, 37 insertions(+), 49 deletions(-) diff --git a/apps/web-antd/src/api/property/room/model.d.ts b/apps/web-antd/src/api/property/room/model.d.ts index a01052ac..cb62110d 100644 --- a/apps/web-antd/src/api/property/room/model.d.ts +++ b/apps/web-antd/src/api/property/room/model.d.ts @@ -19,7 +19,7 @@ export interface RoomVO { /** * 房间类型('住宅','商铺','办公室','设备间','公共区域') */ - roomType: number; + roomType: string; /** * 建筑面积(平方米) @@ -49,7 +49,7 @@ export interface RoomVO { /** * 状态('空置','已售','已租','自用') */ - status: number; + status: string; } diff --git a/apps/web-antd/src/views/property/room/data.ts b/apps/web-antd/src/views/property/room/data.ts index 15c165e0..08d35b5b 100644 --- a/apps/web-antd/src/views/property/room/data.ts +++ b/apps/web-antd/src/views/property/room/data.ts @@ -10,15 +10,6 @@ export const querySchema: FormSchemaGetter = () => [ fieldName: 'communityName', label: '社区', }, - { - component: 'Input', - fieldName: 'orientation', - label: '朝向', - componentProps: { - getPopupContainer, - options: getDictOptions(DictEnum.wy_direction_towards), - }, - }, { component: 'Select', componentProps: { @@ -47,30 +38,22 @@ export const columns: VxeGridProps['columns'] = [ field: 'area', }, { - title: '套内面积', + title: '使用面积', field: 'insideInArea', }, { - title: '户型', - field: 'layout', - }, - { - title: '朝向', - field: 'orientationName', - }, - { - title: '是否可售', - field: 'isForSale', - slots: { - default: ({ row }) => { - return renderDict(row.isForSale, DictEnum.wy_sf); - }, - }, + title: '是否重要', + field: 'isMatter', + slots:{ + default:({row})=>{ + return renderDict(row.isMatter,'wy_fjzydj') + } + } }, + { title: '状态', field: 'statusName', - }, { field: 'action', @@ -97,6 +80,7 @@ export const modalSchema: FormSchemaGetter = () => [ defaultValue: undefined, label: '社区建筑', rules: 'selectRequired', + formItemClass: 'col-span-2', }, { label: '房间号', @@ -112,42 +96,34 @@ export const modalSchema: FormSchemaGetter = () => [ getPopupContainer, options: getDictOptions(DictEnum.wy_room_type), }, + rules:'selectRequired' }, { label: '建筑面积', fieldName: 'area', - component: 'Input', + component: 'InputNumber', + componentProps:{ + min:0, + }, + rules:'required' }, { - label: '套内面积', + label: '使用面积', fieldName: 'insideInArea', component: 'InputNumber', componentProps:{ min:0, - } + }, + rules:'required' }, { - label: '户型', - fieldName: 'layout', - component: 'Input', - }, - { - label: '朝向', - fieldName: 'orientation', + label: '是否重要', + fieldName: 'isMatter', component: 'Select', componentProps: { - getPopupContainer, - options: getDictOptions(DictEnum.wy_direction_towards), - }, - }, - { - label: '是否可售', - fieldName: 'isForSale', - component: 'Select', - componentProps: { - getPopupContainer, - options: getDictOptions(DictEnum.wy_sf), + options: getDictOptions('wy_fjzydj'), }, + rules:'selectRequired' }, { label: '状态', @@ -157,5 +133,15 @@ export const modalSchema: FormSchemaGetter = () => [ getPopupContainer, options: getDictOptions(DictEnum.wy_fjzt), }, + rules:'selectRequired' + }, + { + label: '房间图片', + fieldName: 'imgUrl', + component: 'ImageUpload', + componentProps: { + maxCount: 1, // 最大上传文件数 默认为1 为1会绑定为string而非string[]类型 + }, + formItemClass: 'col-span-2', }, ]; diff --git a/apps/web-antd/src/views/property/room/room-modal.vue b/apps/web-antd/src/views/property/room/room-modal.vue index 98e84f43..93c534d8 100644 --- a/apps/web-antd/src/views/property/room/room-modal.vue +++ b/apps/web-antd/src/views/property/room/room-modal.vue @@ -59,6 +59,8 @@ const [BasicModal, modalApi] = useVbenModal({ await formApi.setValues({ ...record, isForSale: String(record.isForSale), + status:String(record.status), + roomType:String(record.roomType), }); } await markInitialized();