diff --git a/apps/web-antd/src/api/ops/area/index.ts b/apps/web-antd/src/api/ops/area/index.ts index cd4b14c82..dd014f9aa 100644 --- a/apps/web-antd/src/api/ops/area/index.ts +++ b/apps/web-antd/src/api/ops/area/index.ts @@ -1,21 +1,21 @@ import { requestClient } from '#/api/request'; /** 区域类型 */ -export type AreaType = 'PARK' | 'BUILDING' | 'FLOOR' | 'FUNCTION'; +export type AreaType = 'BUILDING' | 'FLOOR' | 'FUNCTION' | 'PARK'; /** 功能类型 */ export type FunctionType = - | 'MALE_TOILET' - | 'FEMALE_TOILET' - | 'PUBLIC' | 'ELEVATOR' + | 'FEMALE_TOILET' + | 'MALE_TOILET' + | 'PUBLIC' | string; /** 区域等级 */ -export type AreaLevel = 'HIGH' | 'MEDIUM' | 'LOW'; +export type AreaLevel = 'HIGH' | 'LOW' | 'MEDIUM'; /** 关联类型 */ -export type RelationType = 'TRAFFIC_COUNTER' | 'BEACON' | 'BADGE' | string; +export type RelationType = 'BADGE' | 'BEACON' | 'TRAFFIC_COUNTER' | string; export namespace OpsAreaApi { /** 业务区域 */ diff --git a/apps/web-antd/src/api/ops/cleaning/index.ts b/apps/web-antd/src/api/ops/cleaning/index.ts index faf812ad0..4d003a40d 100644 --- a/apps/web-antd/src/api/ops/cleaning/index.ts +++ b/apps/web-antd/src/api/ops/cleaning/index.ts @@ -74,12 +74,12 @@ export namespace OpsCleaningApi { deviceId: number; // 设备ID deviceKey: string; // 设备Key status: BadgeStatus | string; // 设备状态(兼容大小写) - batteryLevel: number | null; // 电量(可能为空) + batteryLevel: null | number; // 电量(可能为空) lastHeartbeatTime: string; // 最后心跳时间 - rssi?: number | null; // 信号强度(可能为空) + rssi?: null | number; // 信号强度(可能为空) isInArea: boolean; // 是否在区域内 areaId?: number; // 当前区域ID - areaName?: string | null; // 当前区域名称(可能为空) + areaName?: null | string; // 当前区域名称(可能为空) } /** 业务日志类型 */ @@ -117,22 +117,28 @@ export interface IotDeviceStatus { /** 获取 IoT 设备状态 */ export function getIotDeviceStatus(deviceId: number) { return requestClient.get(`/iot/device/status/get-status`, { - params: { deviceId } + params: { deviceId }, }); } /** 批量获取 IoT 设备状态 */ export function batchGetIotDeviceStatus(deviceIds: number[]) { - return requestClient.get(`/iot/device/status/batch-get-status`, { - params: { deviceIds } - }); + return requestClient.get( + `/iot/device/status/batch-get-status`, + { + params: { deviceIds }, + }, + ); } /** 获取 IoT 设备最新属性(含电量、RSSI等) */ export function getIotDeviceProperties(deviceId: number) { - return requestClient.get>(`/iot/device/property/get-latest`, { - params: { deviceId } - }); + return requestClient.get>( + `/iot/device/property/get-latest`, + { + params: { deviceId }, + }, + ); } // ==================== 保洁专属接口 ==================== diff --git a/apps/web-antd/src/api/ops/order-center/index.ts b/apps/web-antd/src/api/ops/order-center/index.ts index 84719f538..157fa6a26 100644 --- a/apps/web-antd/src/api/ops/order-center/index.ts +++ b/apps/web-antd/src/api/ops/order-center/index.ts @@ -40,9 +40,9 @@ export namespace OpsOrderCenterApi { export enum TriggerSource { IOT_BEACON = 'IOT_BEACON', // 蓝牙信标 IOT_TRAFFIC = 'IOT_TRAFFIC', // 客流阈值(IoT设备) - TRAFFIC = 'TRAFFIC', // 客流阈值 - PEOPLE_FLOW = 'PEOPLE_FLOW', // 客流阈值(旧版) MANUAL = 'MANUAL', // 手动创建 + PEOPLE_FLOW = 'PEOPLE_FLOW', // 客流阈值(旧版) + TRAFFIC = 'TRAFFIC', // 客流阈值 } /** 工单查询参数 */ @@ -78,8 +78,8 @@ export namespace OpsOrderCenterApi { areaId?: number; // 区域ID location?: string; // 位置描述 assigneeId?: number; // 执行人ID - assigneeName?: string | null; // 执行人姓名(可能为空) - createTime: string | number; // 创建时间(支持时间戳或字符串) + assigneeName?: null | string; // 执行人姓名(可能为空) + createTime: number | string; // 创建时间(支持时间戳或字符串) sourceType?: TriggerSource; // 触发来源 extInfo?: CleaningExtInfo; // 保洁扩展信息 } @@ -91,9 +91,9 @@ export namespace OpsOrderCenterApi { triggerDeviceId?: number; // 触发设备ID triggerDeviceKey?: string; // 触发设备Key triggerRule?: string; // 触发规则 - startTime?: string | number | null; // 开始时间(到岗时间,支持时间戳或字符串) - endTime?: string | number | null; // 结束时间(支持时间戳或字符串) - updateTime?: string | number; // 更新时间(支持时间戳或字符串) + startTime?: null | number | string; // 开始时间(到岗时间,支持时间戳或字符串) + endTime?: null | number | string; // 结束时间(支持时间戳或字符串) + updateTime?: number | string; // 更新时间(支持时间戳或字符串) remark?: string; // 备注 }