房屋管理功能完成,接下来储藏室
This commit is contained in:
63
src/api/system/resident/index.ts
Normal file
63
src/api/system/resident/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ResidentVO, ResidentForm, ResidentQuery } from '@/api/system/resident/type';
|
||||
|
||||
/**
|
||||
* 查询住户管理列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listResident = (query?: ResidentQuery): AxiosPromise<ResidentVO[]> => {
|
||||
return request({
|
||||
url: '/resident/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询住户管理详细
|
||||
* @param id
|
||||
*/
|
||||
export const getResident = (id: string | number): AxiosPromise<ResidentVO> => {
|
||||
return request({
|
||||
url: '/resident/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增住户管理
|
||||
* @param data
|
||||
*/
|
||||
export const addResident = (data: ResidentForm) => {
|
||||
return request({
|
||||
url: '////resident',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改住户管理
|
||||
* @param data
|
||||
*/
|
||||
export const updateResident = (data: ResidentForm) => {
|
||||
return request({
|
||||
url: '/resident',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除住户管理
|
||||
* @param id
|
||||
*/
|
||||
export const delResident = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/resident/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
210
src/api/system/resident/type.ts
Normal file
210
src/api/system/resident/type.ts
Normal file
@@ -0,0 +1,210 @@
|
||||
export interface ResidentVO {
|
||||
/**
|
||||
* 主键 住户管理id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 住户编号
|
||||
*/
|
||||
code: number;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 0业主 1租户
|
||||
*/
|
||||
type: number;
|
||||
|
||||
/**
|
||||
* 0 男性 1女性
|
||||
*/
|
||||
gender: number;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
idCard: string | number;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
phone: number;
|
||||
|
||||
/**
|
||||
* 小区id
|
||||
*/
|
||||
villageId: string | number;
|
||||
|
||||
/**
|
||||
* 楼栋id
|
||||
*/
|
||||
buildingId: string | number;
|
||||
|
||||
/**
|
||||
* 房屋表id
|
||||
*/
|
||||
houseId: string | number;
|
||||
|
||||
/**
|
||||
* 0审核中 1 已认证
|
||||
*/
|
||||
status: number;
|
||||
|
||||
/**
|
||||
* 身份证正面照url
|
||||
*/
|
||||
cardImageFront: string;
|
||||
|
||||
/**
|
||||
* 身份证背面照url
|
||||
*/
|
||||
cardImageBack: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface ResidentForm extends BaseEntity {
|
||||
/**
|
||||
* 主键 住户管理id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 住户编号
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 0业主 1租户
|
||||
*/
|
||||
type?: number;
|
||||
|
||||
/**
|
||||
* 0 男性 1女性
|
||||
*/
|
||||
gender?: number;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
idCard?: string | number;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
phone?: number;
|
||||
|
||||
/**
|
||||
* 小区id
|
||||
*/
|
||||
villageId?: string | number;
|
||||
|
||||
/**
|
||||
* 楼栋id
|
||||
*/
|
||||
buildingId?: string | number;
|
||||
|
||||
/**
|
||||
* 房屋表id
|
||||
*/
|
||||
houseId?: string | number;
|
||||
|
||||
/**
|
||||
* 0审核中 1 已认证
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 身份证正面照url
|
||||
*/
|
||||
cardImageFront?: string;
|
||||
|
||||
/**
|
||||
* 身份证背面照url
|
||||
*/
|
||||
cardImageBack?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface ResidentQuery extends PageQuery {
|
||||
/**
|
||||
* 住户编号
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 0业主 1租户
|
||||
*/
|
||||
type?: number;
|
||||
|
||||
/**
|
||||
* 0 男性 1女性
|
||||
*/
|
||||
gender?: number;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
idCard?: string | number;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
phone?: number;
|
||||
|
||||
/**
|
||||
* 小区id
|
||||
*/
|
||||
villageId?: string | number;
|
||||
|
||||
/**
|
||||
* 楼栋id
|
||||
*/
|
||||
buildingId?: string | number;
|
||||
|
||||
/**
|
||||
* 房屋表id
|
||||
*/
|
||||
houseId?: string | number;
|
||||
|
||||
/**
|
||||
* 0审核中 1 已认证
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 身份证正面照url
|
||||
*/
|
||||
cardImageFront?: string;
|
||||
|
||||
/**
|
||||
* 身份证背面照url
|
||||
*/
|
||||
cardImageBack?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
Reference in New Issue
Block a user