二维码生成和下载保存列表 优化 切换ws遗留的上一个在线设备数据 增加预定义路线生成 完善任务规划界面 的中英文

This commit is contained in:
mmc
2026-11-09 16:01:23 +08:00
parent 8924272656
commit 6401327522
9 changed files with 371 additions and 330 deletions

View File

@@ -824,7 +824,7 @@ export function TaskPlanningView({ selectedMachineSn, embedded = false, onStatsC
fetchTaskPoolList();
fetchTaskHistoryList();
} else {
utils.message.error(res.msg || '暂停失败');
utils.message.error(res.msg || t('devices.pauseFailed'));
}
} catch (err) {
console.error('暂停任务失败:', err);
@@ -846,7 +846,7 @@ export function TaskPlanningView({ selectedMachineSn, embedded = false, onStatsC
fetchTaskPoolList();
fetchTaskHistoryList();
} else {
utils.message.error(res.msg || '恢复失败');
utils.message.error(res.msg || t('devices.resumeFailed'));
}
} catch (err) {
console.error('恢复任务失败:', err);
@@ -1627,7 +1627,7 @@ export function TaskPlanningView({ selectedMachineSn, embedded = false, onStatsC
}}
>
<span style={{ fontSize: 14, fontWeight: 700 }}>
任务规划
{t('devices.mapEditor.taskPlan')}
</span>
@@ -2031,7 +2031,7 @@ export function TaskPlanningView({ selectedMachineSn, embedded = false, onStatsC
rowKey="id"
columns={taskHistoryColumns}
dataSource={taskHistoryList}
pagination={{ pageSize: 10, showSizeChanger: false, showQuickJumper: true, showTotal: (total) => '共 ' + total + ' 条' }}
pagination={{ pageSize: 10, showSizeChanger: false, showQuickJumper: true, showTotal: (total) => t('devices.mapEditor.totalCountWithUnit', { count: total }) }}
scroll={{ x: 800, y: 140 }}
/>
@@ -2097,7 +2097,7 @@ export function TaskPlanningView({ selectedMachineSn, embedded = false, onStatsC
]}
dataSource={consecutiveTaskList ?? []}
loading={consecutiveLoading}
pagination={{ pageSize: 10, showSizeChanger: false, showQuickJumper: true, showTotal: (total) => '共 ' + total + ' 条' }}
pagination={{ pageSize: 10, showSizeChanger: false, showQuickJumper: true, showTotal: (total) => t('devices.mapEditor.totalCountWithUnit', { count: total }) }}
scroll={{ x: 760, y: 140 }}
empty={<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />}
/>
@@ -2112,17 +2112,17 @@ export function TaskPlanningView({ selectedMachineSn, embedded = false, onStatsC
<Col xs={24} xl={8} style={{ display: "flex", flexDirection: "column" }}>
{/* 机器人任务规划:地图编辑能力入口 */}
<Card
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>机器人任务规划</span>}
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.mapEditor.robotTaskPlam')}</span>}
variant="borderless"
styles={{ body: { padding: 12 } }}
style={{ ...cardStyle, marginBottom: 10 }}
>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, minmax(0, 1fr))', gap: 8 }}>
{([
{ type: 'returnPoint' as const, label: '返航点', desc: '任务结束返回点', icon: <Navigation size={18} color="#165DFF" /> },
{ type: 'restArea' as const, label: '分区', desc: '绑定规划路线', icon: <MapPinned size={18} color="#13C2C2" /> },
{ type: 'obstaclePoint' as const, label: '障碍点', desc: '标记障碍区域', icon: <MapPinned size={18} color="#FF7D00" /> },
{ type: 'routeGen' as const, label: '路径生成', desc: '生成规划路径', icon: <Route size={18} color="#00B42A" /> },
{ type: 'returnPoint' as const, label: t('devices.mapEditor.returnPoint'), desc: t('devices.mapEditor.returnPointDesc'), icon: <Navigation size={18} color="#165DFF" /> },
{ type: 'restArea' as const, label: t('devices.mapEditor.restArea'), desc: t('devices.mapEditor.restAreaDesc'), icon: <MapPinned size={18} color="#13C2C2" /> },
{ type: 'obstaclePoint' as const, label: t('devices.mapEditor.obstaclePointLabel'), desc: t('devices.mapEditor.obstaclePointDesc'), icon: <MapPinned size={18} color="#FF7D00" /> },
{ type: 'routeGen' as const, label: t('devices.mapEditor.routeGen'), desc: t('devices.mapEditor.routeGenDesc'), icon: <Route size={18} color="#00B42A" /> },
]).map((item) => {
const selected = editorType === item.type;
return (
@@ -2258,7 +2258,7 @@ export function TaskPlanningView({ selectedMachineSn, embedded = false, onStatsC
lineHeight: '16px',
}}
>
选择需要执行任务的区域(可多选)
{t('devices.selectDispatchRegions')}
</div>
{/* 区域选择卡片 */}
@@ -2408,7 +2408,7 @@ export function TaskPlanningView({ selectedMachineSn, embedded = false, onStatsC
lineHeight: '16px',
}}
>
选择需要执行任务的路线(可多选)
{t('devices.selectDispatchRoutes')}
</div>
{/* 路线选择卡片 */}
@@ -2532,8 +2532,8 @@ export function TaskPlanningView({ selectedMachineSn, embedded = false, onStatsC
>
<div style={{ display: 'flex', alignItems: 'center', gap: 6, marginBottom: 12 }}>
<TrendingUp size={16} style={{ color: '#1677ff' }} />
<span style={{ fontWeight: 600, fontSize: 13, color: '#1d2129' }}>调节执行顺序 (拖拽排序)</span>
<Tooltip title="机器人将按照下方列表从上到下的顺序依次执行路径任务">
<span style={{ fontWeight: 600, fontSize: 13, color: '#1d2129' }}>{t('devices.adjustExecutionOrder')}</span>
<Tooltip title={t('devices.dragSortTooltip')}>
<AlertCircle size={14} style={{ color: '#86909c', cursor: 'help' }} />
</Tooltip>
</div>