车位区域管理完成
This commit is contained in:
83
src/api/system/houseRental/index.ts
Normal file
83
src/api/system/houseRental/index.ts
Normal file
@@ -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<HouseRentalVO[]> => {
|
||||
return request({
|
||||
url: '/houseRental/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询房屋租赁管理详细
|
||||
* @param id
|
||||
*/
|
||||
export const getHouseRental = (id: string | number): AxiosPromise<HouseRentalVO> => {
|
||||
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<string | number>) => {
|
||||
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<uploadHouseImagetype> => {
|
||||
return request({
|
||||
url: '/houseRental/uploadImages',
|
||||
method: 'POST',
|
||||
data: formdata
|
||||
});
|
||||
};
|
||||
242
src/api/system/houseRental/type.ts
Normal file
242
src/api/system/houseRental/type.ts
Normal file
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user