修正ts类型
This commit is contained in:
@@ -61,3 +61,18 @@ export const delBanner = (id: string | number | Array<string | number>) => {
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 改变Banner图管理 状态
|
||||
* @param id
|
||||
*/
|
||||
export const switchBanner = (id: string, status: string) => {
|
||||
return request({
|
||||
url: '/banner/changeStatus',
|
||||
method: 'GET',
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -17,9 +17,9 @@ export interface BannerVO {
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
order: number;
|
||||
url: string;
|
||||
jump_link: string;
|
||||
byOrder: number;
|
||||
link: string;
|
||||
/**
|
||||
* 小区id
|
||||
*/
|
||||
@@ -45,7 +45,8 @@ export interface BannerForm extends BaseEntity {
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
order?: number;
|
||||
byOrder?: number;
|
||||
link: string;
|
||||
|
||||
/**
|
||||
* 小区id
|
||||
@@ -67,8 +68,8 @@ export interface BannerQuery extends PageQuery {
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
order?: number;
|
||||
|
||||
byOrder: number;
|
||||
link: string;
|
||||
/**
|
||||
* 小区id
|
||||
*/
|
||||
|
||||
@@ -61,3 +61,15 @@ export const delPlan = (id: string | number | Array<string | number>) => {
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 改变巡检计划状态
|
||||
* @param id
|
||||
* @param status
|
||||
*/
|
||||
export const changePlanStatus = (id: string, status: string) => {
|
||||
return request({
|
||||
url: '/inspection/plan/changeStatus',
|
||||
method: 'put',
|
||||
data: { id, status }
|
||||
});
|
||||
};
|
||||
|
||||
@@ -61,3 +61,13 @@ export const delPoint = (id: string | number | Array<string | number>) => {
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 修改巡检点状态
|
||||
* @param id
|
||||
*/
|
||||
export const changePointStatus = (id: string, status: string) => {
|
||||
return request({
|
||||
url: '/inspection/point/changeStatus?id=' + id + '&status=' + status,
|
||||
method: 'PUT'
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
export interface RecordVO {
|
||||
actualEndTime?: null;
|
||||
actualStartTime?: null;
|
||||
createByName?: null;
|
||||
actualEndTime?: string;
|
||||
actualStartTime?: string;
|
||||
createByName?: string;
|
||||
createTime?: string;
|
||||
details?: null;
|
||||
details?: [];
|
||||
id?: string;
|
||||
inspectorId?: number;
|
||||
inspectorName?: string;
|
||||
planId?: string;
|
||||
planName?: string;
|
||||
remark?: null;
|
||||
remark?: string;
|
||||
routeId?: string;
|
||||
routeName?: string;
|
||||
status?: number;
|
||||
|
||||
@@ -26,6 +26,8 @@ export interface RouteVO {
|
||||
*/
|
||||
estimatedTime: number;
|
||||
|
||||
items: { itemName: string }[];
|
||||
PointsName: string;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -22,12 +22,12 @@ export interface NoticeVO {
|
||||
/**
|
||||
* 紧急程度 0=普通 1=紧急 2=非常紧急
|
||||
*/
|
||||
urgencyLevel: string;
|
||||
urgencyLevel: number;
|
||||
|
||||
/**
|
||||
* 发布状态 0=草稿 1=已发布
|
||||
*/
|
||||
publishStatus: string;
|
||||
publishStatus: number;
|
||||
|
||||
/**
|
||||
* 发布人
|
||||
@@ -64,12 +64,12 @@ export interface NoticeForm extends BaseEntity {
|
||||
/**
|
||||
* 紧急程度 0=普通 1=紧急 2=非常紧急
|
||||
*/
|
||||
urgencyLevel?: string;
|
||||
urgencyLevel?: number;
|
||||
|
||||
/**
|
||||
* 发布状态 0=草稿 1=已发布
|
||||
*/
|
||||
publishStatus?: string;
|
||||
publishStatus?: number;
|
||||
|
||||
/**
|
||||
* 发布人
|
||||
@@ -101,12 +101,12 @@ export interface NoticeQuery extends PageQuery {
|
||||
/**
|
||||
* 紧急程度 0=普通 1=紧急 2=非常紧急
|
||||
*/
|
||||
urgencyLevel?: string;
|
||||
urgencyLevel?: number;
|
||||
|
||||
/**
|
||||
* 发布状态 0=草稿 1=已发布
|
||||
*/
|
||||
publishStatus?: string;
|
||||
publishStatus?: number;
|
||||
|
||||
/**
|
||||
* 发布人
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface ParkingCostVO {
|
||||
/**
|
||||
* 车位id
|
||||
*/
|
||||
parkingId: string | number;
|
||||
parkingId: string;
|
||||
|
||||
/**
|
||||
* 收费项目 0临时停车
|
||||
@@ -79,7 +79,7 @@ export interface ParkingCostForm extends BaseEntity {
|
||||
/**
|
||||
* 车位id
|
||||
*/
|
||||
parkingId?: string | number;
|
||||
parkingId?: string;
|
||||
|
||||
/**
|
||||
* 收费项目 0临时停车
|
||||
@@ -141,7 +141,7 @@ export interface ParkingCostQuery extends PageQuery {
|
||||
/**
|
||||
* 车位id
|
||||
*/
|
||||
parkingId?: string | number;
|
||||
parkingId?: string;
|
||||
|
||||
/**
|
||||
* 收费项目 0临时停车
|
||||
|
||||
@@ -37,7 +37,9 @@ export interface QuestionnaireVO {
|
||||
/**
|
||||
* 部分业主串 ”,“号隔开
|
||||
*/
|
||||
residents: string | number;
|
||||
residents: string;
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
@@ -69,7 +71,7 @@ export interface QuestionnaireForm extends BaseEntity {
|
||||
/**
|
||||
* 问卷题目结构(JSON数组)
|
||||
*/
|
||||
content?: string;
|
||||
content?: string | QuestionComponentItem[];
|
||||
|
||||
/**
|
||||
* 状态:0-草稿 1-已发布 2-已结束
|
||||
@@ -158,6 +160,6 @@ export interface QuestionComponentItem {
|
||||
export interface QuestionComponentnaireForm {
|
||||
id?: string | number | null;
|
||||
title: string;
|
||||
description: string;
|
||||
description?: string;
|
||||
content: QuestionComponentItem[];
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export interface RepairVO {
|
||||
/**
|
||||
* 维修人员id
|
||||
*/
|
||||
repairId: string | number;
|
||||
repairId: string;
|
||||
/** 名称(小区名-楼栋名-单元号-房间号) */
|
||||
name?: string;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ export interface RepairProjectVO {
|
||||
/**
|
||||
* 维修项目表id
|
||||
*/
|
||||
id: string | number;
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* 维修项目名
|
||||
@@ -12,7 +12,7 @@ export interface RepairProjectVO {
|
||||
/**
|
||||
* 父级项目id
|
||||
*/
|
||||
parentId: string | number;
|
||||
parentId: string;
|
||||
|
||||
/**
|
||||
* 项目类型 0公共报修 1个人报修
|
||||
@@ -23,7 +23,7 @@ export interface RepairProjectVO {
|
||||
* 项目层级 0,1
|
||||
*/
|
||||
projectLevel: number;
|
||||
|
||||
children?: [];
|
||||
/**
|
||||
* 排序 (数越小越靠前)
|
||||
*/
|
||||
@@ -39,7 +39,7 @@ export interface RepairProjectForm extends BaseEntity {
|
||||
/**
|
||||
* 维修项目表id
|
||||
*/
|
||||
id?: string | number;
|
||||
id?: string;
|
||||
|
||||
/**
|
||||
* 维修项目名
|
||||
@@ -49,7 +49,7 @@ export interface RepairProjectForm extends BaseEntity {
|
||||
/**
|
||||
* 父级项目id
|
||||
*/
|
||||
parentId?: string | number;
|
||||
parentId?: string;
|
||||
|
||||
/**
|
||||
* 项目类型 0公共报修 1个人报修
|
||||
@@ -101,7 +101,7 @@ export interface RepairProjectQuery extends PageQuery {
|
||||
/**
|
||||
* 父级项目id
|
||||
*/
|
||||
parentId?: string | number;
|
||||
parentId?: string;
|
||||
|
||||
/**
|
||||
* 项目类型 0公共报修 1个人报修
|
||||
|
||||
@@ -117,6 +117,8 @@ export interface BillQuery extends PageQuery {
|
||||
*/
|
||||
chargeItemId?: string | number;
|
||||
|
||||
// type: string;
|
||||
|
||||
/**
|
||||
* 收费范围 0全体业主 1部分业主
|
||||
*/
|
||||
|
||||
@@ -96,3 +96,14 @@ export const WaterDeviceUpdateBin = (data: { deviceCodes: string[]; urlA: string
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取设备最新的抄表记录
|
||||
* @param deviceCodes
|
||||
*/
|
||||
export const latestRecord = (deviceCodes: string) => {
|
||||
return request({
|
||||
url: `/waterDevice/latestRecord/${deviceCodes}`,
|
||||
method: 'GET'
|
||||
});
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@ export interface WarehouseVO {
|
||||
/**
|
||||
* 仓库ID
|
||||
*/
|
||||
id: string | number;
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* 仓库名称*
|
||||
@@ -12,7 +12,7 @@ export interface WarehouseVO {
|
||||
/**
|
||||
* 仓库归属id*(关联com_village)
|
||||
*/
|
||||
villageId: number;
|
||||
villageId: string;
|
||||
|
||||
/**
|
||||
* 联系人*
|
||||
@@ -44,7 +44,7 @@ export interface WarehouseForm extends BaseEntity {
|
||||
/**
|
||||
* 仓库ID
|
||||
*/
|
||||
id?: string | number;
|
||||
id?: string;
|
||||
|
||||
/**
|
||||
* 仓库名称*
|
||||
|
||||
@@ -17,7 +17,7 @@ export interface CarVO {
|
||||
/**
|
||||
* 持有人id(住户表id)
|
||||
*/
|
||||
residentId: string | number;
|
||||
residentId: string;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface DeviceCategoryVO {
|
||||
/**
|
||||
* 状态 0正常 1停用
|
||||
*/
|
||||
status: string;
|
||||
status: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
@@ -34,7 +34,7 @@ export interface DeviceCategoryForm extends BaseEntity {
|
||||
/**
|
||||
* 状态 0正常 1停用
|
||||
*/
|
||||
status?: string;
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
@@ -51,7 +51,7 @@ export interface DeviceCategoryQuery extends PageQuery {
|
||||
/**
|
||||
* 状态 0正常 1停用
|
||||
*/
|
||||
status?: string;
|
||||
status?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export interface DeviceVO {
|
||||
categoryName: string;
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
|
||||
@@ -46,7 +46,7 @@ export function editBuildingApi(data: addBuildingType & { id: string }) {
|
||||
});
|
||||
}
|
||||
/** 删除楼栋 */
|
||||
export function deleteBuildingApi(id: number) {
|
||||
export function deleteBuildingApi(id: string) {
|
||||
return request({
|
||||
url: `/building/${id}`,
|
||||
method: 'DELETE'
|
||||
@@ -55,9 +55,9 @@ export function deleteBuildingApi(id: number) {
|
||||
|
||||
// 房屋----------------------------------------------------------------------------------------------
|
||||
/** 根据 楼栋id 查询房屋信息 */
|
||||
export function getHouselistAPI(buildingId: string): AxiosPromise<BuildingUnit> {
|
||||
export function getHouselistAPI(buildingId: string, houseName: string = ''): AxiosPromise<BuildingUnit> {
|
||||
return request({
|
||||
url: `/house/groupByUnitTree/${buildingId}`,
|
||||
url: `/house/groupByUnitTree/${buildingId}?houseName=${houseName}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ export interface HouseRentalVO {
|
||||
/**
|
||||
* id 房屋租赁表id
|
||||
*/
|
||||
id?: string | number;
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 租户姓名
|
||||
@@ -109,7 +109,7 @@ export interface HouseRentalForm extends BaseEntity {
|
||||
/**
|
||||
* 0 整租 1 合租
|
||||
*/
|
||||
rentalType?: number;
|
||||
rentalType?: string;
|
||||
|
||||
/**
|
||||
* 房屋朝向
|
||||
@@ -171,7 +171,7 @@ export interface HouseRentalQuery extends PageQuery {
|
||||
/**
|
||||
* 房屋用途
|
||||
*/
|
||||
houseUse?: number;
|
||||
houseUse?: string;
|
||||
/**
|
||||
* 租户姓名
|
||||
*/
|
||||
@@ -185,7 +185,7 @@ export interface HouseRentalQuery extends PageQuery {
|
||||
/**
|
||||
* 0 整租 1 合租
|
||||
*/
|
||||
rentalType?: number;
|
||||
rentalType?: string;
|
||||
|
||||
/**
|
||||
* 房屋朝向
|
||||
|
||||
@@ -61,3 +61,26 @@ export const delParking = (id: string | number | Array<string | number>) => {
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 改变车位审核装填
|
||||
* @param id
|
||||
*/
|
||||
export const getParkingReview = (id: string) => {
|
||||
return request({
|
||||
url: '/parkingReview/checkStatus',
|
||||
method: 'POST'
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 获取车位审核信息
|
||||
* @param id
|
||||
*/
|
||||
export const getParkingReviewInfo = (id: string) => {
|
||||
return request({
|
||||
url: '/parking/checkInfo',
|
||||
method: 'POST',
|
||||
data: {
|
||||
id
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -32,7 +32,7 @@ export interface ParkingVO {
|
||||
/**
|
||||
* 住户id
|
||||
*/
|
||||
residentId: string | number;
|
||||
residentId: string;
|
||||
|
||||
/**
|
||||
* 添加时间
|
||||
@@ -88,7 +88,7 @@ export interface ParkingForm extends BaseEntity {
|
||||
/**
|
||||
* 住户id
|
||||
*/
|
||||
residentId?: string | number;
|
||||
residentId?: string;
|
||||
|
||||
/**
|
||||
* 添加时间
|
||||
@@ -160,7 +160,7 @@ export interface ParkingQuery extends PageQuery {
|
||||
/**
|
||||
* 住户id
|
||||
*/
|
||||
residentId?: string | number;
|
||||
residentId?: string;
|
||||
|
||||
/**
|
||||
* 添加时间
|
||||
|
||||
@@ -22,7 +22,7 @@ export interface ResidentVO {
|
||||
/**
|
||||
* 0 男性 1女性
|
||||
*/
|
||||
gender: number;
|
||||
gender: string;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
@@ -97,7 +97,7 @@ export interface ResidentForm extends BaseEntity {
|
||||
/**
|
||||
* 0 男性 1女性
|
||||
*/
|
||||
gender?: number;
|
||||
gender?: string;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
|
||||
@@ -29,7 +29,7 @@ export interface UserQuery extends PageQuery {
|
||||
* 用户返回对象
|
||||
*/
|
||||
export interface UserVO extends BaseEntity {
|
||||
userId: string | number;
|
||||
userId: string;
|
||||
tenantId: string;
|
||||
deptId: number;
|
||||
userName: string;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
export interface CategoryTreeVO {
|
||||
id: number | string;
|
||||
id: string;
|
||||
label: string;
|
||||
parentId: number | string;
|
||||
weight: number;
|
||||
categoryName: string;
|
||||
children: CategoryTreeVO[];
|
||||
}
|
||||
export interface CategoryVO {
|
||||
|
||||
@@ -12,6 +12,8 @@ export const workSpaceTotalListApi = (
|
||||
totalResident: number;
|
||||
totalHouse: number;
|
||||
totalParking: number;
|
||||
totalDevice: number;
|
||||
totalMaterial: number;
|
||||
totalComplaint: number;
|
||||
}> => {
|
||||
return request({
|
||||
@@ -22,3 +24,263 @@ export const workSpaceTotalListApi = (
|
||||
}
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 查询近一周报修趋势
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const workSpaceRepairTrendListApi = (
|
||||
villageId: string
|
||||
): Promise<
|
||||
{
|
||||
date: string;
|
||||
count: number;
|
||||
}[]
|
||||
> => {
|
||||
return request({
|
||||
url: '/workSpace/last7DaysRepairCount',
|
||||
method: 'GET',
|
||||
params: {
|
||||
villageId: villageId
|
||||
}
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 查询近一周收入趋势
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const workSpaceIncomeTrendListApi = (
|
||||
villageId: string,
|
||||
type: number
|
||||
): Promise<
|
||||
{
|
||||
date: string;
|
||||
income: number;
|
||||
}[]
|
||||
> => {
|
||||
return request({
|
||||
url: '/workSpace/last7DaysIncomeTrend',
|
||||
method: 'GET',
|
||||
params: {
|
||||
villageId: villageId,
|
||||
type: type
|
||||
}
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 查询当日天气
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const workSpaceWeatherApi = (city: string): Promise<reponseType> => {
|
||||
const url = 'https://uapis.cn/api/v1/misc/weather?city=' + city + '&lang=zh';
|
||||
return new Promise((resolve, reject) => {
|
||||
fetch(url, {
|
||||
method: 'GET'
|
||||
})
|
||||
.then((res) => res.json())
|
||||
.then((res) => {
|
||||
resolve(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
type reponseType = {
|
||||
// 省份
|
||||
'province': string;
|
||||
// 城市名
|
||||
'city': string;
|
||||
// 区县或更细一级的行政区名称。自动按 IP 定位时更常见。
|
||||
'district': string;
|
||||
// 行政区划代码(部分数据源可能为空)
|
||||
'adcode': string;
|
||||
// 天气状况描述。默认返回中文,传 `lang=en` 时返回英文。非固定枚举。
|
||||
'weather': string;
|
||||
// 天气图标代码。请从[天气图标代码表](#enum-list)中查看所有可能的值。
|
||||
'weather_icon': string;
|
||||
// 当前温度 °C
|
||||
'temperature': number;
|
||||
// 风向
|
||||
'wind_direction': string;
|
||||
// 风力等级
|
||||
'wind_power': string;
|
||||
// 相对湿度 %
|
||||
'humidity': number;
|
||||
// 数据更新时间
|
||||
'report_time': string;
|
||||
// 体感温度 °C(extended=true 时返回)
|
||||
'feels_like': number;
|
||||
// 能见度 km(extended=true 时返回)
|
||||
'visibility': number;
|
||||
// 气压 hPa(extended=true 时返回)
|
||||
'pressure': number;
|
||||
// 紫外线指数(extended=true 时返回)
|
||||
'uv': number;
|
||||
// 当前降水量 mm(extended=true 时返回)
|
||||
'precipitation': number;
|
||||
// 云量 %(extended=true 时返回)
|
||||
'cloud': number;
|
||||
// 空气质量指数 0-500(extended=true 时返回)
|
||||
'aqi': number;
|
||||
// AQI 等级 1-6(extended=true 时返回)
|
||||
'aqi_level': number;
|
||||
// AQI 等级描述(优/良/轻度污染/中度污染/重度污染/严重污染)(extended=true 时返回)
|
||||
'aqi_category': string;
|
||||
// 主要污染物(如 PM2.5、PM10、O3 等)(extended=true 时返回)
|
||||
'aqi_primary': string;
|
||||
// 空气污染物分项数据(extended=true 时返回,部分数据源可能不返回)
|
||||
'air_pollutants': {
|
||||
// PM2.5 μg/m³
|
||||
'pm25': number;
|
||||
// PM10 μg/m³
|
||||
'pm10': number;
|
||||
// 臭氧 μg/m³
|
||||
'o3': number;
|
||||
// 二氧化氮 μg/m³
|
||||
'no2': number;
|
||||
// 二氧化硫 μg/m³
|
||||
'so2': number;
|
||||
// 一氧化碳 mg/m³
|
||||
'co': number;
|
||||
};
|
||||
// 官方气象预警列表(存在有效预警时返回)
|
||||
'alerts': {
|
||||
// 预警标题
|
||||
'title': string;
|
||||
// 预警类型,如雷电、暴雨
|
||||
'type': string;
|
||||
// 预警级别,如蓝色、黄色、橙色、红色
|
||||
'level': string;
|
||||
// 预警正文
|
||||
'text': string;
|
||||
// 预警发布时间
|
||||
'publish_time': string;
|
||||
// 发布单位
|
||||
'publisher': string;
|
||||
// 防御指引列表
|
||||
'guidance': string[];
|
||||
}[];
|
||||
// 当天最高温 °C(forecast=true 时返回)
|
||||
'temp_max': number;
|
||||
// 当天最低温 °C(forecast=true 时返回)
|
||||
'temp_min': number;
|
||||
// 多天天气预报,最多7天(forecast=true 时返回)
|
||||
'forecast': {
|
||||
// 日期 YYYY-MM-DD
|
||||
'date': string;
|
||||
// 星期几(`lang=en` 时返回英文星期)
|
||||
'week': string;
|
||||
// 最高温度 °C
|
||||
'temp_max': number;
|
||||
// 最低温度 °C
|
||||
'temp_min': number;
|
||||
// 白天天气(`lang=en` 时返回英文)
|
||||
'weather_day': string;
|
||||
// 夜间天气(`lang=en` 时返回英文)
|
||||
'weather_night': string;
|
||||
// 白天风向(可选,`lang=en` 时返回英文)
|
||||
'wind_dir_day': string;
|
||||
// 夜间风向(可选,`lang=en` 时返回英文)
|
||||
'wind_dir_night': string;
|
||||
// 白天风力(可选,`lang=en` 时返回英文)
|
||||
'wind_scale_day': string;
|
||||
// 夜间风力(可选,`lang=en` 时返回英文)
|
||||
'wind_scale_night': string;
|
||||
// 白天风速 km/h(可选)
|
||||
'wind_speed_day': number;
|
||||
// 湿度 %(可选)
|
||||
'humidity': number;
|
||||
// 降水量 mm(可选)
|
||||
'precip': number;
|
||||
// 能见度 km(可选)
|
||||
'visibility': number;
|
||||
// 紫外线指数(可选)
|
||||
'uv_index': number;
|
||||
// 日出时间 HH:MM(可选)
|
||||
'sunrise': string;
|
||||
// 日落时间 HH:MM(可选)
|
||||
'sunset': string;
|
||||
}[];
|
||||
// 逐小时预报,最多24小时(hourly=true 时返回)
|
||||
'hourly_forecast': {
|
||||
// 预报时间(ISO8601 或 YYYY-MM-DD HH:MM)
|
||||
'time': string;
|
||||
// 温度 °C
|
||||
'temperature': number;
|
||||
// 天气状况
|
||||
'weather': string;
|
||||
// 风向(可选)
|
||||
'wind_direction': string;
|
||||
// 风速 km/h(可选)
|
||||
'wind_speed': number;
|
||||
// 风力等级(可选)
|
||||
'wind_scale': string;
|
||||
// 湿度 %(可选)
|
||||
'humidity': number;
|
||||
// 降水量 mm(可选)
|
||||
'precip': number;
|
||||
// 体感温度 °C(可选)
|
||||
'feels_like': number;
|
||||
// 能见度 km(可选)
|
||||
'visibility': number;
|
||||
// 降水概率 %(可选)
|
||||
'pop': number;
|
||||
// 紫外线指数(可选,国内城市通常不返回)
|
||||
'uv_index': number;
|
||||
}[];
|
||||
// 分钟级降水预报(minutely=true 时返回,仅国内城市可用,精确到2分钟)
|
||||
'minutely_precip': {
|
||||
// 降水描述
|
||||
'summary': string;
|
||||
// 更新时间
|
||||
'update_time': string;
|
||||
// 精确到2分钟的数据点
|
||||
'data': {
|
||||
// 预报时间 ISO8601
|
||||
'time': string;
|
||||
// 该时间点的降水量 mm
|
||||
'precip': number;
|
||||
// 降水类型:rain / snow
|
||||
'type': string;
|
||||
}[];
|
||||
};
|
||||
// 18项生活指数(indices=true 时返回),每项包含 level(等级名称)、brief(简短描述)、advice(详细建议)
|
||||
'life_indices': LifeIndices;
|
||||
};
|
||||
|
||||
// 1. 定义单个生活指数的基础结构
|
||||
type LifeIndexItem = {
|
||||
level: string;
|
||||
brief: string;
|
||||
advice: string;
|
||||
};
|
||||
|
||||
// 2. 定义所有可能的键名
|
||||
type LifeIndexKeys =
|
||||
| 'clothing'
|
||||
| 'uv'
|
||||
| 'car_wash'
|
||||
| 'drying'
|
||||
| 'air_conditioner'
|
||||
| 'cold_risk'
|
||||
| 'exercise'
|
||||
| 'comfort'
|
||||
| 'travel'
|
||||
| 'fishing'
|
||||
| 'allergy'
|
||||
| 'sunscreen'
|
||||
| 'mood'
|
||||
| 'beer'
|
||||
| 'umbrella'
|
||||
| 'traffic'
|
||||
| 'air_purifier'
|
||||
| 'pollen';
|
||||
|
||||
// 3. 使用映射类型自动生成完整结构
|
||||
type LifeIndices = {
|
||||
[K in LifeIndexKeys]: LifeIndexItem;
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@ export interface FlowInstanceQuery extends PageQuery {
|
||||
nodeName?: string;
|
||||
flowCode?: string;
|
||||
flowName?: string;
|
||||
createByIds?: string[] | number[];
|
||||
createByIds?: string[];
|
||||
businessId?: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user