feat: add robot's target point

This commit is contained in:
chndfang 2025-06-17 22:28:12 +08:00
parent 21225161da
commit cfd1bdee16
3 changed files with 7 additions and 1 deletions

View File

@ -378,6 +378,7 @@ interface RobotInfo {
canOrder?: boolean; // 接单状态
canStop?: boolean; // 急停状态
canControl?: boolean; // 控制状态
targetPoint?: string; // 目标点位(名称)
}
export interface RobotDetail extends RobotInfo {
isSimulative?: 0 | 1; // 是否仿真机器人

View File

@ -22,6 +22,7 @@ export interface RobotInfo {
canOrder?: boolean; // 接单状态
canStop?: boolean; // 急停状态
canControl?: boolean; // 控制状态
targetPoint?: string; // 目标点位(名称)
}
export interface RobotDetail extends RobotInfo {

View File

@ -50,7 +50,7 @@ const stateDot = computed<string>(() => `state-${robot.value?.state}`);
<a-tag>
<i class="icon size-18 mr-4" :class="batteryIcon" />
<span>{{ robot.battery ?? 0 }}%</span>
<span>{{ robot.battery?.toFixed() ?? 0 }}%</span>
</a-tag>
<a-tag v-if="robot.state">
@ -74,6 +74,10 @@ const stateDot = computed<string>(() => `state-${robot.value?.state}`);
<a-typography-text type="secondary">{{ $t('控制权') }}</a-typography-text>
<a-typography-text>{{ $t(robot.canControl ? '已抢占' : '当前无控制权') }}</a-typography-text>
</a-list-item>
<a-list-item>
<a-typography-text style="flex: none" type="secondary">{{ $t('目的地') }}</a-typography-text>
<a-typography-text :content="$t(robot.targetPoint ?? '-')" ellipsis />
</a-list-item>
</a-list>
</template>
<a-empty v-else :image="sTheme.empty" />