- 修复 vite.config.ts 中 command 隐式 any 类型错误 - 修复 proxy 中 path 参数隐式 any 类型错误 - 将无效的 oxc.drop 配置迁移为 Vite 8 原生方式(build.rolldownOptions.output.minify.compress) - 引入 defineConfig + ConfigEnv 提供完整类型推导 - JS 文件迁移为 TypeScript(user.ts, routerGuard.ts 等) - 更新 API 层类型定义
95 lines
2.6 KiB
TypeScript
95 lines
2.6 KiB
TypeScript
import request from "@/utils/request";
|
||
import type { ApiResult, OrderItem, PageParam, PageResult } from "@/types/api";
|
||
import type { RosCar } from "./rosCar";
|
||
|
||
/**
|
||
* 告警列表查询条件,对应后端 com.haizhiyustc.ros.dto.RosInspectionRecordLineImageQueryDTO
|
||
*/
|
||
export interface RosInspectionRecordLineImageQueryDTO {
|
||
/** 识别类型 */
|
||
recognizeType?: number | string;
|
||
/** 开始时间 */
|
||
startTime?: string;
|
||
/** 结束时间 */
|
||
endTime?: string;
|
||
/** 是否预警 */
|
||
warning?: boolean;
|
||
/** 关键字 */
|
||
keyword?: string;
|
||
}
|
||
|
||
export type RosInspectionRecordLineImagePageQuery =
|
||
Partial<RosInspectionRecordLineImage> & {
|
||
keyword?: string;
|
||
};
|
||
|
||
/**
|
||
* 巡检路线抓拍图片识别记录,对应后端 com.haizhiyustc.ros.entity.RosInspectionRecordLineImage
|
||
* recognitionStatus: 0待执行 1执行中 2执行成功 3执行失败
|
||
*/
|
||
export interface RosInspectionRecordLineImage {
|
||
/** 巡检记录id */
|
||
recordId: string;
|
||
/** 巡检设备id快照 */
|
||
carId?: string;
|
||
/** 关联的小车信息 */
|
||
car?: RosCar;
|
||
/** 抓拍动作id */
|
||
recordActionId: string;
|
||
/** 所属任务id */
|
||
taskId?: string;
|
||
/** 识别类型 */
|
||
recognizeType?: number;
|
||
/** 图片访问地址 */
|
||
imageUrl?: string;
|
||
/** 抓拍时间 */
|
||
captureTime?: string;
|
||
/** 抓拍时的小车位姿x */
|
||
poseX?: number;
|
||
/** 抓拍时的小车位姿y */
|
||
poseY?: number;
|
||
/** 抓拍时的小车朝向 */
|
||
poseYaw?: number;
|
||
/** 识别状态:0待执行 1执行中 2执行成功 3执行失败 */
|
||
recognitionStatus?: number;
|
||
/** AI识别提示词 */
|
||
prompt?: string;
|
||
/** AI识别结果 */
|
||
recognitionResult?: string;
|
||
/** 是否预警 */
|
||
warning?: boolean;
|
||
/** 预警值 */
|
||
warningValue?: string;
|
||
/** 失败原因 */
|
||
failReason?: string;
|
||
/** 开始识别时间 */
|
||
startTime?: string;
|
||
/** 结束识别时间 */
|
||
endTime?: string;
|
||
/** 创建时间 */
|
||
createTime?: string;
|
||
/** 更新时间 */
|
||
updateTime?: string;
|
||
/** 主键id */
|
||
id?: string;
|
||
}
|
||
|
||
// 查询近期告警列表
|
||
// 返回告警列表,对应后端 warnList 接口
|
||
// 返回: ApiResult<List<RosInspectionRecordLineImage>>
|
||
export function getRecentAlarmList(data: RosInspectionRecordLineImageQueryDTO) {
|
||
return request<ApiResult<RosInspectionRecordLineImage[]>>({
|
||
url: "/admin/rosInspectionRecordLineImage/warnList",
|
||
data,
|
||
});
|
||
}
|
||
|
||
// 分页查询告警列表
|
||
export function getAlarmPage(data: PageParam<RosInspectionRecordLineImagePageQuery>) {
|
||
return request<ApiResult<PageResult<RosInspectionRecordLineImage>>>({
|
||
url: "/admin/rosInspectionRecordLineImage/list",
|
||
method: "POST",
|
||
data,
|
||
});
|
||
}
|