车位区域管理完成
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
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user