房屋管理功能完成,接下来储藏室
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { addBuildingType, BuildingUnit, BuildingVo } from './type';
|
||||
import { addBuildingType, addHouseType, BuildingUnit, BuildingVo } from './type';
|
||||
import { number } from 'vue-types';
|
||||
|
||||
// 楼栋---------------------------------------------------------------------------------------
|
||||
// 根据 小区id 和 类型 查询楼栋信息
|
||||
|
||||
/** 根据 小区id 和 类型 查询楼栋信息 */
|
||||
export function getBuildinglistAPI(villageId: number, buildingUse: number): AxiosPromise<BuildingVo[]> {
|
||||
return request({
|
||||
url: '/building/byVillage',
|
||||
@@ -15,6 +16,20 @@ export function getBuildinglistAPI(villageId: number, buildingUse: number): Axio
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 获取所有楼栋 */
|
||||
export function getBuildinglists(): AxiosPromise<BuildingVo[]> {
|
||||
return request({
|
||||
url: '/building/list',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 获取单一楼栋 */
|
||||
export function getBuildingOnly(buildingId: string): AxiosPromise<BuildingVo> {
|
||||
return request({
|
||||
url: `/building/${buildingId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 添加楼栋 */
|
||||
export function addBuildingApi(data: addBuildingType) {
|
||||
@@ -25,7 +40,7 @@ export function addBuildingApi(data: addBuildingType) {
|
||||
});
|
||||
}
|
||||
/** 编辑楼栋 */
|
||||
export function editBuildingApi(data: addBuildingType & { id: number }) {
|
||||
export function editBuildingApi(data: addBuildingType & { id: string }) {
|
||||
return request({
|
||||
url: '/building',
|
||||
method: 'PUT',
|
||||
@@ -41,24 +56,42 @@ export function deleteBuildingApi(id: number) {
|
||||
}
|
||||
|
||||
// 房屋----------------------------------------------------------------------------------------------
|
||||
// 根据 楼栋id 查询房屋信息
|
||||
export function getHouselistAPI(buildingId: number): AxiosPromise<BuildingUnit> {
|
||||
/** 根据 楼栋id 查询房屋信息 */
|
||||
export function getHouselistAPI(buildingId: string): AxiosPromise<BuildingUnit> {
|
||||
return request({
|
||||
url: `/house/groupByUnitTree/${buildingId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
// 添加房屋
|
||||
export function addHouseAPI() {
|
||||
/** 添加房屋 */
|
||||
export function addHouseAPI(data: addHouseType) {
|
||||
return request({
|
||||
url: `/house`,
|
||||
method: 'POST'
|
||||
method: 'POST',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 删除房屋
|
||||
export function deleteHouseApi() {
|
||||
export function deleteHouseApi(houseIds: string) {
|
||||
return request({
|
||||
url: `/house/{houseIds}`,
|
||||
url: `/house/${houseIds}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
// 查询 房屋信息
|
||||
export function getHouseApi(houseId: string) {
|
||||
return request({
|
||||
url: `/house/${houseId}`,
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
// 编辑房屋信息
|
||||
export function EditHouseApi(data: addHouseType) {
|
||||
return request({
|
||||
url: `/house`,
|
||||
method: 'PUT',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export interface BuildingVo {
|
||||
/**
|
||||
* 楼栋ID
|
||||
*/
|
||||
id: number;
|
||||
id: string;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@@ -46,6 +46,8 @@ export interface BuildingVo {
|
||||
export interface BuildingUnit {
|
||||
buildingId: number;
|
||||
buildingName: string;
|
||||
floorCount: number;
|
||||
unitCount: number;
|
||||
units: BuildingUnitlist[];
|
||||
}
|
||||
// 单元
|
||||
@@ -73,3 +75,16 @@ export interface addBuildingType {
|
||||
floorCount?: number;
|
||||
unitCount?: number;
|
||||
}
|
||||
|
||||
export interface addHouseType {
|
||||
'houseId'?: string;
|
||||
'buildingId'?: string;
|
||||
'villageId'?: number;
|
||||
'unitNo': string;
|
||||
'floorNo': string;
|
||||
'houseNo': string;
|
||||
'houseArea': string;
|
||||
'internalArea': string;
|
||||
'shareArea': string;
|
||||
'houseType': string;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
63
src/api/system/storeroom/index.ts
Normal file
63
src/api/system/storeroom/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { StoreroomVO, StoreroomForm, StoreroomQuery } from '@/api/system/storeroom/types';
|
||||
|
||||
/**
|
||||
* 查询储藏室管理列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listStoreroom = (query?: StoreroomQuery): AxiosPromise<StoreroomVO[]> => {
|
||||
return request({
|
||||
url: '/storeroom/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询储藏室管理详细
|
||||
* @param id
|
||||
*/
|
||||
export const getStoreroom = (id: string | number): AxiosPromise<StoreroomVO> => {
|
||||
return request({
|
||||
url: '/storeroom/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增储藏室管理
|
||||
* @param data
|
||||
*/
|
||||
export const addStoreroom = (data: StoreroomForm) => {
|
||||
return request({
|
||||
url: '/storeroom',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改储藏室管理
|
||||
* @param data
|
||||
*/
|
||||
export const updateStoreroom = (data: StoreroomForm) => {
|
||||
return request({
|
||||
url: '/storeroom',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除储藏室管理
|
||||
* @param id
|
||||
*/
|
||||
export const delStoreroom = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/storeroom/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
150
src/api/system/storeroom/types.ts
Normal file
150
src/api/system/storeroom/types.ts
Normal file
@@ -0,0 +1,150 @@
|
||||
export interface StoreroomVO {
|
||||
/**
|
||||
* 储藏室ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 所属楼栋ID
|
||||
*/
|
||||
buildingId: string | number;
|
||||
|
||||
/**
|
||||
* 单元号
|
||||
*/
|
||||
unitNo: string | number;
|
||||
|
||||
/**
|
||||
* 储藏室号
|
||||
*/
|
||||
storeroomNo: string;
|
||||
|
||||
/**
|
||||
* 建筑面积(㎡)
|
||||
*/
|
||||
houseArea: number;
|
||||
|
||||
/**
|
||||
* 公摊面积(㎡)
|
||||
*/
|
||||
shareArea: number;
|
||||
|
||||
/**
|
||||
* 实用面积(㎡)
|
||||
*/
|
||||
internalArea: number;
|
||||
|
||||
/**
|
||||
* 关联房屋ID
|
||||
*/
|
||||
houseId: string | number;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface StoreroomForm extends BaseEntity {
|
||||
/**
|
||||
* 储藏室ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 所属楼栋ID
|
||||
*/
|
||||
buildingId?: string | number;
|
||||
|
||||
/**
|
||||
* 单元号
|
||||
*/
|
||||
unitNo?: string | number;
|
||||
|
||||
/**
|
||||
* 储藏室号
|
||||
*/
|
||||
storeroomNo?: string;
|
||||
|
||||
/**
|
||||
* 建筑面积(㎡)
|
||||
*/
|
||||
houseArea?: number;
|
||||
|
||||
/**
|
||||
* 公摊面积(㎡)
|
||||
*/
|
||||
shareArea?: number;
|
||||
|
||||
/**
|
||||
* 实用面积(㎡)
|
||||
*/
|
||||
internalArea?: number;
|
||||
|
||||
/**
|
||||
* 关联房屋ID
|
||||
*/
|
||||
houseId?: string | number;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface StoreroomQuery extends PageQuery {
|
||||
/**
|
||||
* 所属楼栋ID
|
||||
*/
|
||||
buildingId?: string | number;
|
||||
|
||||
/**
|
||||
* 单元号
|
||||
*/
|
||||
unitNo?: string;
|
||||
|
||||
/**
|
||||
* 储藏室号
|
||||
*/
|
||||
storeroomNo?: string;
|
||||
|
||||
/**
|
||||
* 建筑面积(㎡)
|
||||
*/
|
||||
houseArea?: number;
|
||||
|
||||
/**
|
||||
* 公摊面积(㎡)
|
||||
*/
|
||||
shareArea?: number;
|
||||
|
||||
/**
|
||||
* 实用面积(㎡)
|
||||
*/
|
||||
internalArea?: number;
|
||||
|
||||
/**
|
||||
* 关联房屋ID
|
||||
*/
|
||||
houseId?: string | number;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
Reference in New Issue
Block a user