From 966a54fe3f90b3c522e733113833694f4a46d201 Mon Sep 17 00:00:00 2001 From: Zy <1448159279@qq.com> Date: Fri, 10 Apr 2026 15:06:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E4=BD=8D=E5=8C=BA=E5=9F=9F=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/carArea/index.ts | 63 +++ src/api/system/carArea/type.ts | 110 ++++ src/api/system/house/type.ts | 1 + src/api/system/houseRental/index.ts | 83 +++ src/api/system/houseRental/type.ts | 242 +++++++++ src/api/system/parking/index.ts | 63 +++ src/api/system/parking/type.ts | 185 +++++++ src/api/system/resident/index.ts | 20 + src/types/global.d.ts | 1 + .../resident/index.ts => utils/house.ts} | 52 +- src/utils/request.ts | 2 +- src/views/system/carArea/addCarArea.vue | 159 ++++++ src/views/system/carArea/index.vue | 175 +++++++ src/views/system/house/AddHouse.vue | 11 +- .../house/components/components/houseItem.vue | 2 +- .../system/houseRental/addhouseResident.vue | 485 ++++++++++++++++++ src/views/system/houseRental/index.vue | 245 +++++++++ src/views/system/houseRental/index2.vue | 362 +++++++++++++ src/views/system/parking/addParking.vue | 166 ++++++ src/views/system/parking/index.vue | 197 +++++++ src/views/system/parking/template.vue | 147 ++++++ src/views/system/resident/ResidentMain.vue | 179 ++++++- src/views/system/resident/addResident.vue | 2 +- src/views/system/resident/index.vue | 5 +- 24 files changed, 2925 insertions(+), 32 deletions(-) create mode 100644 src/api/system/carArea/index.ts create mode 100644 src/api/system/carArea/type.ts create mode 100644 src/api/system/houseRental/index.ts create mode 100644 src/api/system/houseRental/type.ts create mode 100644 src/api/system/parking/index.ts create mode 100644 src/api/system/parking/type.ts rename src/{views/system/resident/index.ts => utils/house.ts} (71%) create mode 100644 src/views/system/carArea/addCarArea.vue create mode 100644 src/views/system/carArea/index.vue create mode 100644 src/views/system/houseRental/addhouseResident.vue create mode 100644 src/views/system/houseRental/index.vue create mode 100644 src/views/system/houseRental/index2.vue create mode 100644 src/views/system/parking/addParking.vue create mode 100644 src/views/system/parking/index.vue create mode 100644 src/views/system/parking/template.vue diff --git a/src/api/system/carArea/index.ts b/src/api/system/carArea/index.ts new file mode 100644 index 0000000..f3f1532 --- /dev/null +++ b/src/api/system/carArea/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { AreaVO, AreaForm, AreaQuery } from '@/api/system/carArea/type'; + +/** + * 查询车位区域管理列表 + * @param query + * @returns {*} + */ + +export const listArea = (query?: AreaQuery): AxiosPromise => { + return request({ + url: '/area/list', + method: 'get', + params: query + }); +}; + +/** + * 查询车位区域管理详细 + * @param id + */ +export const getArea = (id: string | number): AxiosPromise => { + return request({ + url: '/area/' + id, + method: 'get' + }); +}; + +/** + * 新增车位区域管理 + * @param data + */ +export const addArea = (data: AreaForm) => { + return request({ + url: '/area', + method: 'post', + data: data + }); +}; + +/** + * 修改车位区域管理 + * @param data + */ +export const updateArea = (data: AreaForm) => { + return request({ + url: '/area', + method: 'put', + data: data + }); +}; + +/** + * 删除车位区域管理 + * @param id + */ +export const delArea = (id: string | number | Array) => { + return request({ + url: '/area/' + id, + method: 'delete' + }); +}; diff --git a/src/api/system/carArea/type.ts b/src/api/system/carArea/type.ts new file mode 100644 index 0000000..1b96bd1 --- /dev/null +++ b/src/api/system/carArea/type.ts @@ -0,0 +1,110 @@ +export interface AreaVO { + /** + * 区域管理表id + */ + id: string | number; + + /** + * 区域名称 + */ + areaName: string; + + /** + * 区域编号 + */ + areaCode: string; + + /** + * 面积(单位㎡) + */ + area: number; + + /** + * 车位数量 + */ + parkingCount: number; + + /** + * 备注 + */ + remark: string; +} + +export interface AreaForm extends BaseEntity { + /** + * 区域管理表id + */ + id?: string | number; + + /** + * 区域名称 + */ + areaName?: string; + + /** + * 区域编号 + */ + areaCode?: string; + + /** + * 面积(单位㎡) + */ + area?: number; + + /** + * 车位数量 + */ + parkingCount?: number; + + /** + * 备注 + */ + remark?: string; + + /** + * 创建者 + */ + createBy?: number; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 修改者 + */ + updateBy?: number; + + /** + * 修改时间 + */ + updateTime?: string; +} + +export interface AreaQuery extends PageQuery { + /** + * 区域名称 + */ + areaName?: string; + + /** + * 区域编号 + */ + areaCode?: string; + + /** + * 面积(单位㎡) + */ + area?: number; + + /** + * 车位数量 + */ + parkingCount?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/system/house/type.ts b/src/api/system/house/type.ts index 7435862..e9a1eb4 100644 --- a/src/api/system/house/type.ts +++ b/src/api/system/house/type.ts @@ -87,4 +87,5 @@ export interface addHouseType { 'internalArea': string; 'shareArea': string; 'houseType': string; + houseUse: number; } diff --git a/src/api/system/houseRental/index.ts b/src/api/system/houseRental/index.ts new file mode 100644 index 0000000..ad182f7 --- /dev/null +++ b/src/api/system/houseRental/index.ts @@ -0,0 +1,83 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { HouseRentalVO, HouseRentalForm, HouseRentalQuery } from '@/api/system/type'; + +/** + * 查询房屋租赁管理列表 + * @param query + * @returns {*} + */ + +export const listHouseRental = (query?: HouseRentalQuery): AxiosPromise => { + return request({ + url: '/houseRental/list', + method: 'get', + params: query + }); +}; + +/** + * 查询房屋租赁管理详细 + * @param id + */ +export const getHouseRental = (id: string | number): AxiosPromise => { + return request({ + url: '/houseRental/' + id, + method: 'get' + }); +}; + +/** + * 新增房屋租赁管理 + * @param data + */ +export const addHouseRental = (data: HouseRentalForm) => { + return request({ + url: '/houseRental', + method: 'post', + data: data + }); +}; + +/** + * 修改房屋租赁管理 + * @param data + */ +export const updateHouseRental = (data: HouseRentalForm) => { + return request({ + url: '/houseRental', + method: 'put', + data: data + }); +}; + +/** + * 删除房屋租赁管理 + * @param id + */ +export const delHouseRental = (id: string | number | Array) => { + return request({ + url: '/houseRental/' + id, + method: 'delete' + }); +}; + +/** + * 上传房屋图片 + * @param id + */ +interface uploadHouseImagetype { + 'success': { + 'url': 'string'; + 'fileName': 'string'; + 'ossId': 'string'; + }[]; + 'error': string[]; +} +export const uploadHouseImage = (formdata: FormData): AxiosPromise => { + return request({ + url: '/houseRental/uploadImages', + method: 'POST', + data: formdata + }); +}; diff --git a/src/api/system/houseRental/type.ts b/src/api/system/houseRental/type.ts new file mode 100644 index 0000000..48f2ccc --- /dev/null +++ b/src/api/system/houseRental/type.ts @@ -0,0 +1,242 @@ +export interface HouseRentalVO { + /** + * id 房屋租赁表id + */ + id?: string | number; + + /** + * 租户姓名 + */ + rentalName: string; + + /** + * 租金 单位元 + */ + rent: number; + + /** + * 0 整租 1 合租 + */ + rentalType: number; + + /** + * 房屋朝向 + */ + houseFace: string; + + /** + * 房屋面积 + */ + houseArea: number; + + /** + * 楼层号 + */ + floorNo: number; + + /** + * 入住时间 + */ + inTime: string; + + /** + * 房屋设施(“,”隔开) + */ + facilities: string; + + /** + * 房屋照片url( "," 隔开) + */ + houseImageUrl: string; + + /** + * 补充租房信息 + */ + supInfo: string; + + /** + * 手机号 + */ + phone: number; + + /** + * 微信 + */ + vx: string; + + /** + * 邮箱 + */ + email: string; + + /** + * 房屋id + */ + houseId: number; + /** + * 房屋用途 + */ + houseUse?: number; + /** + * 租赁状态 + */ + rentalStatus?: number; +} + +export interface HouseRentalForm extends BaseEntity { + /** + * id 房屋租赁表id + */ + id?: string | number; + + /** + * 租户姓名 + */ + rentalName?: string; + + /** + * 租金 单位元 + */ + rent?: number; + + /** + * 0 整租 1 合租 + */ + rentalType?: number; + + /** + * 房屋朝向 + */ + houseFace?: string; + + /** + * 房屋面积 + */ + houseArea?: number; + + /** + * 楼层号 + */ + floorNo?: number; + + /** + * 入住时间 + */ + inTime?: string; + + /** + * 房屋设施(“,”隔开) + */ + facilities?: string; + + /** + * 房屋照片url( "," 隔开) + */ + houseImageUrl?: string; + + /** + * 补充租房信息 + */ + supInfo?: string; + + /** + * 手机号 + */ + phone?: number; + + /** + * 微信 + */ + vx?: string; + + /** + * 邮箱 + */ + email?: string; + + /** + * 房屋id + */ + houseId?: string | number; +} + +export interface HouseRentalQuery extends PageQuery { + /** + * 房屋用途 + */ + houseUse?: number; + /** + * 租户姓名 + */ + rentalName?: string; + + /** + * 租金 单位元 + */ + rent?: number; + + /** + * 0 整租 1 合租 + */ + rentalType?: number; + + /** + * 房屋朝向 + */ + houseFace?: string; + + /** + * 房屋面积 + */ + houseArea?: number; + + /** + * 楼层号 + */ + floorNo?: number; + + /** + * 入住时间 + */ + inTime?: string; + + /** + * 房屋设施(“,”隔开) + */ + facilities?: string; + + /** + * 房屋照片url( "," 隔开) + */ + houseImageUrl?: string; + + /** + * 补充租房信息 + */ + supInfo?: string; + + /** + * 手机号 + */ + phone?: number; + + /** + * 微信 + */ + vx?: string; + + /** + * 邮箱 + */ + email?: string; + + /** + * 房屋id + */ + houseId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/system/parking/index.ts b/src/api/system/parking/index.ts new file mode 100644 index 0000000..bccf26b --- /dev/null +++ b/src/api/system/parking/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ParkingVO, ParkingForm, ParkingQuery } from '@/api/system/parking/type'; + +/** + * 查询车位管理列表 + * @param query + * @returns {*} + */ + +export const listParking = (query?: ParkingQuery): AxiosPromise => { + return request({ + url: '/parking/list', + method: 'get', + params: query + }); +}; + +/** + * 查询车位管理详细 + * @param id + */ +export const getParking = (id: string | number): AxiosPromise => { + return request({ + url: '/parking/' + id, + method: 'get' + }); +}; + +/** + * 新增车位管理 + * @param data + */ +export const addParking = (data: ParkingForm) => { + return request({ + url: '/parking', + method: 'post', + data: data + }); +}; + +/** + * 修改车位管理 + * @param data + */ +export const updateParking = (data: ParkingForm) => { + return request({ + url: '/parking', + method: 'put', + data: data + }); +}; + +/** + * 删除车位管理 + * @param id + */ +export const delParking = (id: string | number | Array) => { + return request({ + url: '/parking/' + id, + method: 'delete' + }); +}; diff --git a/src/api/system/parking/type.ts b/src/api/system/parking/type.ts new file mode 100644 index 0000000..06e4320 --- /dev/null +++ b/src/api/system/parking/type.ts @@ -0,0 +1,185 @@ +export interface ParkingVO { + /** + * id车位管理表 + */ + id: string | number; + + /** + * 区域id + */ + areaId: string | number; + + /** + * 车位编号 + */ + parkingCode: string; + + /** + * 车位面积(单位㎡) + */ + parkingArea: number; + + /** + * 车位状态 0 闲置 1自用 2出租 + */ + parkingStatus: number; + + /** + * 0产权车位 1公共停车位 + */ + type: number; + + /** + * 住户id + */ + residentId: string | number; + + /** + * 添加时间 + */ + addTime: string; + + /** + * 添加者 + */ + addBy: number; + + /** + * 0 审核中 1 审核通过 2 审核不通过 + */ + checkStatus: number; + + /** + * 备注 + */ + remark: string; +} + +export interface ParkingForm extends BaseEntity { + /** + * id车位管理表 + */ + id?: string | number; + + /** + * 区域id + */ + areaId?: string | number; + + /** + * 车位编号 + */ + parkingCode?: string; + + /** + * 车位面积(单位㎡) + */ + parkingArea?: number; + + /** + * 车位状态 0 闲置 1自用 2出租 + */ + parkingStatus?: number; + + /** + * 0产权车位 1公共停车位 + */ + type?: number; + + /** + * 住户id + */ + residentId?: string | number; + + /** + * 添加时间 + */ + addTime?: string; + + /** + * 添加者 + */ + addBy?: number; + + /** + * 0 审核中 1 审核通过 2 审核不通过 + */ + checkStatus?: number; + + /** + * 备注 + */ + remark?: string; + + /** + * 创建者 + */ + createBy?: number; + + /** + * 创建时间 + */ + createTime?: string; + + /** + * 修改者 + */ + updateBy?: number; + + /** + * 修改时间 + */ + updateTime?: string; +} + +export interface ParkingQuery extends PageQuery { + /** + * 区域id + */ + areaId?: string | number; + + /** + * 车位编号 + */ + parkingCode?: string; + + /** + * 车位面积(单位㎡) + */ + parkingArea?: number; + + /** + * 车位状态 0 闲置 1自用 2出租 + */ + parkingStatus?: number; + + /** + * 0产权车位 1公共停车位 + */ + type?: number; + + /** + * 住户id + */ + residentId?: string | number; + + /** + * 添加时间 + */ + addTime?: string; + + /** + * 添加者 + */ + addBy?: number; + + /** + * 0 审核中 1 审核通过 2 审核不通过 + */ + checkStatus?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/system/resident/index.ts b/src/api/system/resident/index.ts index efc648d..b644297 100644 --- a/src/api/system/resident/index.ts +++ b/src/api/system/resident/index.ts @@ -72,3 +72,23 @@ export const UploadidCardApi = () => { method: 'delete' }); }; + +// ! 住户审核流程-------------------------------------------------------------------------- +/** + * 获取住户审核流程列表 + */ +export const getresidentReviewlistAPI = (id: string) => { + return request({ + url: '/residentReview/list?residentId=' + id, + method: 'GET' + }); +}; +/** + * 获取单一住户审核流程列表 + */ +export const getresidentReviewByIdAPI = (id: number) => { + return request({ + url: `/residentReview/${id}`, + method: 'GET' + }); +}; diff --git a/src/types/global.d.ts b/src/types/global.d.ts index 0db890e..a39382c 100644 --- a/src/types/global.d.ts +++ b/src/types/global.d.ts @@ -80,6 +80,7 @@ declare global { declare interface PageData { form: T; queryParams: D; + rules?: ElFormRules; } /** * 分页查询参数 diff --git a/src/views/system/resident/index.ts b/src/utils/house.ts similarity index 71% rename from src/views/system/resident/index.ts rename to src/utils/house.ts index 880a2ba..86a41f2 100644 --- a/src/views/system/resident/index.ts +++ b/src/utils/house.ts @@ -59,9 +59,6 @@ export function convertBuildingToTree(buildings: any[]): Tree[] { }); } -// 证件类型 -const idCardTypelist = [{}]; - // 与业主关系 export const ownerRelationshiplist = [ { @@ -134,3 +131,52 @@ export function validateIdCard(idCard: string): boolean { const reg = /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/; return reg.test(idCard.trim()); } + +export const houseUselist = ['普通住宅', '商业用地', '商住两用', '其他']; + +// 对字符串 图片地址,处理 +export function splitStringUrl(str: string, splitLabel: string = ',') { + const list = str.split(splitLabel); + return list.map((item) => { + return { + name: item.split('/').pop(), + url: item + }; + }); +} +/** + * 判断 FormData 是否有数据 + * @param formData 要判断的 FormData 对象 + * @returns {boolean} true 有数据 false 没有数据 + */ +export function hasFormData(formData: FormData): boolean { + if (!formData || !(formData instanceof FormData)) return false; + + // 遍历一次,只要有一个字段就返回 true + for (const entry of formData.entries()) { + return true; + } + return false; +} + +/** 方法渲燃模板数据 */ +type dataType = { + 'label': string; + 'value': string; + 'elTagType': string; + 'elTagClass': string; +}; +/** + * 通用:根据 value 从字典数组中获取 label + * @param dict 字典数组 + * @param value 要匹配的值 + * @returns 匹配到的label,无则返回原value + */ +export function getDictLabel(dict: Ref, value: number): string { + // 空值直接返回 + if (value == null) return '-'; + + // 统一转字符串匹配 + const item = (dict.value || []).find((i) => String(i.value) === String(value)); + return item ? item.label : String(value); +} diff --git a/src/utils/request.ts b/src/utils/request.ts index 3f4bda6..d1ee734 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -154,7 +154,7 @@ service.interceptors.response.use( // 500 } else if (code === HttpStatus.SERVER_ERROR) { ElMessage({ message: msg, type: 'error' }); - return Promise.reject(new Error(msg)); + return Promise.reject(res.data); // 601 } else if (code === HttpStatus.WARN) { ElMessage({ message: msg, type: 'warning' }); diff --git a/src/views/system/carArea/addCarArea.vue b/src/views/system/carArea/addCarArea.vue new file mode 100644 index 0000000..0293c48 --- /dev/null +++ b/src/views/system/carArea/addCarArea.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/src/views/system/carArea/index.vue b/src/views/system/carArea/index.vue new file mode 100644 index 0000000..ccbdc26 --- /dev/null +++ b/src/views/system/carArea/index.vue @@ -0,0 +1,175 @@ + + + + + diff --git a/src/views/system/house/AddHouse.vue b/src/views/system/house/AddHouse.vue index f0b2bde..016c242 100644 --- a/src/views/system/house/AddHouse.vue +++ b/src/views/system/house/AddHouse.vue @@ -1,6 +1,6 @@
- - - - + + + + + + + + + + + + +
@@ -120,6 +147,100 @@