// 机器人的具体动作,可以定义为枚举或联合类型 export type RobotAction = | 'PICKUP' | 'DROPOFF' | 'TRANSPORT' | 'WAIT' | 'CHARGE' | 'CLEAN'; // 任务的状态 export type TaskStatus = 'IDLE' | 'RUNNING' | 'COMPLETED' | 'ERROR'; // 参数选项接口 export interface ParameterOption { label: string; value: string; } // 动态参数配置接口 export interface DynamicParameter { label: string; type: 'Simple' | 'Select' | 'MultiSelect' | 'Text' | 'Number'; value: string | string[] | number; required: boolean; options?: ParameterOption[]; placeholder?: string; min?: number; max?: number; } // 任务参数 - 支持动态配置 export interface TaskParameters { startLocation: DynamicParameter; // 起点 endLocation: DynamicParameter; // 终点 waypoint?: DynamicParameter; // 途经点 (可选) robotAction: DynamicParameter; // 机器人动作 payload: DynamicParameter; // 载荷,比如 '空料架' 或具体的物料ID locationBay?: DynamicParameter; // 库位 (可选) [key: string]: DynamicParameter | undefined; // 支持扩展参数 } // 核心任务对象 export interface Task { id: string; // 唯一ID,例如使用 uuid name: string; // 任务名称, e.g., "炉前缓存区到热处理上料交接区运输" status: TaskStatus; // 任务当前状态 parameters: TaskParameters; // 任务的具体执行参数 createdAt: string; // 创建时间 }