feat: 添加载货状态字段至RobotInfo接口,并在机器人详细卡片中展示载货状态

This commit is contained in:
xudan 2025-08-08 15:08:29 +08:00
parent ace122e940
commit e2221f2139
2 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,7 @@ export interface RobotInfo {
canStop?: boolean; // 急停状态 canStop?: boolean; // 急停状态
canControl?: boolean; // 控制状态 canControl?: boolean; // 控制状态
targetPoint?: string; // 目标点位(名称) targetPoint?: string; // 目标点位(名称)
isLoading?: 0 | 1; // 载货状态1载货0空载实时数据透传
} }
export interface RobotDetail extends RobotInfo { export interface RobotDetail extends RobotInfo {

View File

@ -66,6 +66,10 @@ const stateDot = computed<string>(() => `state-${robot.value?.state}`);
<a-typography-text type="secondary">{{ $t('接单状态') }}</a-typography-text> <a-typography-text type="secondary">{{ $t('接单状态') }}</a-typography-text>
<a-typography-text>{{ $t(robot.canOrder ? '接单' : '不可接单') }}</a-typography-text> <a-typography-text>{{ $t(robot.canOrder ? '接单' : '不可接单') }}</a-typography-text>
</a-list-item> </a-list-item>
<a-list-item>
<a-typography-text type="secondary">{{ $t('载货状态') }}</a-typography-text>
<a-typography-text>{{ $t(robot.isLoading === 1 ? '载货' : '空载') }}</a-typography-text>
</a-list-item>
<a-list-item> <a-list-item>
<a-typography-text type="secondary">{{ $t('急停状态') }}</a-typography-text> <a-typography-text type="secondary">{{ $t('急停状态') }}</a-typography-text>
<a-typography-text>{{ $t(robot.canStop ? '是' : '否') }}</a-typography-text> <a-typography-text>{{ $t(robot.canStop ? '是' : '否') }}</a-typography-text>