2026-02-28 13:20:07 +08:00
|
|
|
|
enum WorkMode {
|
2026-09-04 08:43:43 +08:00
|
|
|
|
bow(0, 'coverage'), // 作业模式:bow,值为0;后端 mode="coverage"(覆盖/区域)
|
|
|
|
|
|
custom(2, 'single_point'); // 作业模式:custom,值为2;后端 mode="single_point"(自定义/单点)
|
2026-02-28 13:20:07 +08:00
|
|
|
|
|
|
|
|
|
|
// 定义枚举的数值属性
|
2026-03-01 16:13:37 +08:00
|
|
|
|
final int value;
|
2026-09-04 08:43:43 +08:00
|
|
|
|
// 🔥 对齐 Web 端:workRecord.mode 字段(Web 注释"区域还是单点")
|
|
|
|
|
|
final String modeCode;
|
2026-02-28 13:20:07 +08:00
|
|
|
|
// 枚举构造函数(必须是const)
|
2026-09-04 08:43:43 +08:00
|
|
|
|
const WorkMode(this.value, this.modeCode);
|
2026-02-28 13:20:07 +08:00
|
|
|
|
}
|
2026-02-25 17:22:59 +08:00
|
|
|
|
|
|
|
|
|
|
enum RobotMode { point, robot }
|
|
|
|
|
|
|
|
|
|
|
|
enum AreaMode { work, obstacle }
|
2026-03-02 09:31:46 +08:00
|
|
|
|
|
|
|
|
|
|
enum WorkStatus {
|
|
|
|
|
|
idle, // 未开始
|
|
|
|
|
|
working, // 作业中
|
|
|
|
|
|
paused, // 暂停中
|
|
|
|
|
|
}
|