控制模式 割刀速度 加入 支持删除 返航点和障碍物点

This commit is contained in:
mmc
2026-10-30 11:01:31 +08:00
parent e8cb77a6bc
commit 2602ef4a57
6 changed files with 368 additions and 22 deletions

View File

@@ -1596,11 +1596,41 @@ export default function RobotTaskPage() {
<span>
{t('devices.controlMode')}
{robotRealtimePosition?.controlMode == '1' ? (
<span style={{ color: '#ff6f6f' }}>{t('devices.localMode')}</span>
) : (
<span style={{ color: '#9eff9e' }}>{t('devices.remoteMode')}</span>
)}
{(() => {
const mode = robotRealtimePosition?.controlMode || robotRealtimePosition?.control_mode;
const modeConfig: Record<string, { label: string; color: string }> = {
'0': {
label: t('devices.controlOff'),
color: '#999999',
},
'1': {
label: t('devices.localCpntrol'),
color: '#ff6f6f',
},
'2': {
label: t('devices.autoTask'),
color: '#9eff9e',
},
'3': {
label: t('devices.remoteControl'),
color: '#9eff9e',
},
};
const config =
mode !== undefined && mode !== null
? modeConfig[String(mode)]
: undefined;
return config ? (
<span style={{ color: config.color }}>{config.label}</span>
) : (
<span style={{ color: '#999999' }}>
-
</span>
);
})()}
</span>