完成小区相关的接口对接
This commit is contained in:
24
src/api/system/house/index.ts
Normal file
24
src/api/system/house/index.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { BuildingUnit, BuildingVo } from './type';
|
||||
|
||||
// 楼栋---------------------------------------------------------------------------------------
|
||||
// 根据 小区id 和 类型 查询楼栋信息
|
||||
export function getBuildinglistAPI(villageId: number, buildingUse: number): AxiosPromise<BuildingVo[]> {
|
||||
return request({
|
||||
url: '/building/byVillage',
|
||||
method: 'get',
|
||||
params: {
|
||||
villageId: villageId,
|
||||
buildingUse: buildingUse
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 房屋----------------------------------------------------------------------------------------------
|
||||
export function getHouselistAPI(buildingId: number): AxiosPromise<BuildingUnit[]> {
|
||||
return request({
|
||||
url: `/house/groupByUnitTree/${buildingId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
65
src/api/system/house/type.ts
Normal file
65
src/api/system/house/type.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
export interface BuildingVo {
|
||||
/**
|
||||
* 楼栋名称/编号
|
||||
*/
|
||||
buildingName: string;
|
||||
/**
|
||||
* 0住宅 1办公 2商用 3公寓
|
||||
*/
|
||||
buildingUse: number;
|
||||
/**
|
||||
* 楼栋结构
|
||||
*/
|
||||
buildStructure?: string;
|
||||
/**
|
||||
* 楼高
|
||||
*/
|
||||
buildTall?: string;
|
||||
/**
|
||||
* 楼栋朝向
|
||||
*/
|
||||
buildToward?: string;
|
||||
/**
|
||||
* 层数
|
||||
*/
|
||||
floorCount?: number;
|
||||
/**
|
||||
* 楼栋ID
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
/**
|
||||
* 单元数
|
||||
*/
|
||||
unitCount?: number;
|
||||
/**
|
||||
* 所属小区ID
|
||||
*/
|
||||
villageId?: number;
|
||||
villageName?: string;
|
||||
}
|
||||
|
||||
// 楼栋
|
||||
export interface BuildingUnit {
|
||||
actualFloorCount: number;
|
||||
buildingFloorCount: number;
|
||||
buildingId: number;
|
||||
buildingName: string;
|
||||
totalHouses: number;
|
||||
unitNo: string;
|
||||
floors: string;
|
||||
floors_Json?: FloorsType[];
|
||||
}
|
||||
// 楼层
|
||||
export interface FloorsType {
|
||||
floorNo: string;
|
||||
houses: HouseType[];
|
||||
}
|
||||
// 房间
|
||||
export interface HouseType {
|
||||
houseId: number;
|
||||
houseNo: string;
|
||||
}
|
||||
Reference in New Issue
Block a user