This commit is contained in:
张成
2025-12-18 13:43:05 +08:00
parent ce92acf5ea
commit c0c1e7f059

View File

@@ -246,9 +246,13 @@ class DeviceWorkStatusNotifier {
// 构建详细描述:包含指令/任务名称和描述 // 构建详细描述:包含指令/任务名称和描述
let activityDesc = activity.description || activity.name; let activityDesc = activity.description || activity.name;
if (activity.type === 'command' && activity.currentStep) {
// 对于指令,如果有当前步骤信息,追加到描述中 // 对于指令,显示指令类型和名称的详细信息
activityDesc = `${activityDesc} - ${activity.currentStep}`; if (activity.type === 'command') {
const cmdType = activity.commandType || '';
if (cmdType && cmdType !== activity.name) {
activityDesc = `${activityDesc} [${cmdType}]`;
}
} }
parts.push(`${typeText}: ${activityDesc} (${statusText}${activity.progress > 0 ? `, 进度: ${activity.progress}%` : ''})`); parts.push(`${typeText}: ${activityDesc} (${statusText}${activity.progress > 0 ? `, 进度: ${activity.progress}%` : ''})`);