This commit is contained in:
chndfang 2025-04-29 20:08:08 +08:00
parent 3edd781bde
commit 0c9a59a98c
4 changed files with 53 additions and 5 deletions

View File

@ -1,3 +1,16 @@
export enum RobotType {
= 1,
export enum RobotBrand {
'先工' = 1,
}
export enum RobotType {
= 1,
AMR机器人,
,
}
export enum RobotState {
'任务执行中' = 1,
'充电中',
'停靠中',
'故障中',
}

View File

@ -1,8 +1,30 @@
import type { RobotType } from './constant';
import type { RobotBrand, RobotState, RobotType } from './constant';
export interface RobotGroup {
id: number; // 机器人组id
label: string; // 机器人组名称
robotIds: number[]; // 机器人id列表
}
export interface RobotInfo {
group?: number; // 机器人组id
id: number; // 机器人id
name: string; // 机器人名称
brand?: string; // 机器人品牌
label: string; // 机器人名称
brand: RobotBrand; // 机器人品牌
type: RobotType; // 机器人类型
ip: string; // 机器人ip
isConnected?: boolean; // 机器人连接状态
battery?: number; // 机器人电量
state?: RobotState; // 机器人状态
canOrder?: boolean; // 接单状态
canStop?: boolean; // 急停状态
canControl?: boolean; // 控制状态
}
export interface RobotDetail extends RobotInfo {
isSimulative?: boolean; // 是否仿真机器人
minBattery?: number; // 最小电量
maxBattery?: number; // 最大电量
chargeBattery?: number; // 充电电量
swapBattery?: number; // 交换电量
}

View File

@ -0,0 +1,5 @@
const enum API {
= '/scene/getById',
}
export function getSceneById(id: number) {}

View File

@ -0,0 +1,8 @@
import type { RobotGroup } from '@api/robot';
export interface SceneInfo {
id: number; // 场景id
label: string; // 场景名称
robotGrroups?: RobotGroup[]; // 机器人组列表
map?: string; // 地图JSON
}