diff --git a/frontend/src/views/scheduler/useSchedulerLogic.ts b/frontend/src/views/scheduler/useSchedulerLogic.ts index b4b30be..bf68ff5 100644 --- a/frontend/src/views/scheduler/useSchedulerLogic.ts +++ b/frontend/src/views/scheduler/useSchedulerLogic.ts @@ -312,27 +312,26 @@ export function useSchedulerLogic() { } const handleUpdateMessage = (tab: SchedulerTab, data: any) => { - // 直接使用所有状态信息,不进行额外初始化操作 - // 按照层级结构处理任务和用户队列 + // 处理task_dict初始化消息 if (data.task_dict && Array.isArray(data.task_dict)) { - // 处理任务队列 + // 初始化任务队列 const newTaskQueue = data.task_dict.map((item: any) => ({ name: item.name || '未知任务', - status: item.status || '未知', + status: '等待', })); - // 处理用户队列,按照层级结构处理 - // 用户是任务的子级,需要保留任务与用户之间的关联关系 + // 初始化用户队列(仅包含运行状态下的用户) const newUserQueue: QueueItem[] = []; data.task_dict.forEach((taskItem: any) => { if (taskItem.user_list && Array.isArray(taskItem.user_list)) { taskItem.user_list.forEach((user: any) => { - // 用户作为任务的子级,使用"任务名-用户名"格式保持关联关系 - // 这样TaskOverviewPanel组件可以通过前缀匹配正确构建树形结构 - newUserQueue.push({ - name: `${taskItem.name}-${user.name}`, - status: user.status || '未知', - }); + // 只有在用户状态为运行时才添加到用户队列中 + if (user.status === '运行') { + newUserQueue.push({ + name: `${taskItem.name}-${user.name}`, + status: user.status, + }); + } }); } }); diff --git a/res/sounds/both/添加调度队列.wav b/res/sounds/both/add_queue.wav similarity index 100% rename from res/sounds/both/添加调度队列.wav rename to res/sounds/both/add_queue.wav diff --git a/res/sounds/both/添加计划表.wav b/res/sounds/both/add_schedule.wav similarity index 100% rename from res/sounds/both/添加计划表.wav rename to res/sounds/both/add_schedule.wav diff --git a/res/sounds/both/添加脚本实例.wav b/res/sounds/both/add_script_instance.wav similarity index 100% rename from res/sounds/both/添加脚本实例.wav rename to res/sounds/both/add_script_instance.wav diff --git a/res/sounds/both/添加用户.wav b/res/sounds/both/add_user.wav similarity index 100% rename from res/sounds/both/添加用户.wav rename to res/sounds/both/add_user.wav diff --git a/res/sounds/both/删除调度队列.wav b/res/sounds/both/delete_queue.wav similarity index 100% rename from res/sounds/both/删除调度队列.wav rename to res/sounds/both/delete_queue.wav diff --git a/res/sounds/both/删除计划表.wav b/res/sounds/both/delete_schedule.wav similarity index 100% rename from res/sounds/both/删除计划表.wav rename to res/sounds/both/delete_schedule.wav diff --git a/res/sounds/both/删除脚本实例.wav b/res/sounds/both/delete_script_instance.wav similarity index 100% rename from res/sounds/both/删除脚本实例.wav rename to res/sounds/both/delete_script_instance.wav diff --git a/res/sounds/both/删除用户.wav b/res/sounds/both/delete_user.wav similarity index 100% rename from res/sounds/both/删除用户.wav rename to res/sounds/both/delete_user.wav diff --git a/res/sounds/both/欢迎回来.wav b/res/sounds/both/welcome_back.wav similarity index 100% rename from res/sounds/both/欢迎回来.wav rename to res/sounds/both/welcome_back.wav diff --git a/res/sounds/noisy/ADB失败.wav b/res/sounds/noisy/adb_failed.wav similarity index 100% rename from res/sounds/noisy/ADB失败.wav rename to res/sounds/noisy/adb_failed.wav diff --git a/res/sounds/noisy/ADB成功.wav b/res/sounds/noisy/adb_success.wav similarity index 100% rename from res/sounds/noisy/ADB成功.wav rename to res/sounds/noisy/adb_success.wav diff --git a/res/sounds/noisy/公告展示.wav b/res/sounds/noisy/announcement_display.wav similarity index 100% rename from res/sounds/noisy/公告展示.wav rename to res/sounds/noisy/announcement_display.wav diff --git a/res/sounds/noisy/公告通知.wav b/res/sounds/noisy/announcement_notification.wav similarity index 100% rename from res/sounds/noisy/公告通知.wav rename to res/sounds/noisy/announcement_notification.wav diff --git a/res/sounds/noisy/发生错误.wav b/res/sounds/noisy/error_occurred.wav similarity index 100% rename from res/sounds/noisy/发生错误.wav rename to res/sounds/noisy/error_occurred.wav diff --git a/res/sounds/noisy/发生异常.wav b/res/sounds/noisy/exception_occurred.wav similarity index 100% rename from res/sounds/noisy/发生异常.wav rename to res/sounds/noisy/exception_occurred.wav diff --git a/res/sounds/noisy/历史记录查询.wav b/res/sounds/noisy/history_query.wav similarity index 100% rename from res/sounds/noisy/历史记录查询.wav rename to res/sounds/noisy/history_query.wav diff --git a/res/sounds/noisy/MAA的ADB连接异常.wav b/res/sounds/noisy/maa_adb_connection_error.wav similarity index 100% rename from res/sounds/noisy/MAA的ADB连接异常.wav rename to res/sounds/noisy/maa_adb_connection_error.wav diff --git a/res/sounds/noisy/MAA未检测到任何模拟器.wav b/res/sounds/noisy/maa_no_emulator_detected.wav similarity index 100% rename from res/sounds/noisy/MAA未检测到任何模拟器.wav rename to res/sounds/noisy/maa_no_emulator_detected.wav diff --git a/res/sounds/noisy/MAA部分任务执行失败.wav b/res/sounds/noisy/maa_partial_task_failed.wav similarity index 100% rename from res/sounds/noisy/MAA部分任务执行失败.wav rename to res/sounds/noisy/maa_partial_task_failed.wav diff --git a/res/sounds/noisy/MAA进程超时.wav b/res/sounds/noisy/maa_process_timeout.wav similarity index 100% rename from res/sounds/noisy/MAA进程超时.wav rename to res/sounds/noisy/maa_process_timeout.wav diff --git a/res/sounds/noisy/MAA未能正确登录PRTS.wav b/res/sounds/noisy/maa_prts_login_failed.wav similarity index 100% rename from res/sounds/noisy/MAA未能正确登录PRTS.wav rename to res/sounds/noisy/maa_prts_login_failed.wav diff --git a/res/sounds/noisy/MAA在完成任务前中止.wav b/res/sounds/noisy/maa_task_aborted.wav similarity index 100% rename from res/sounds/noisy/MAA在完成任务前中止.wav rename to res/sounds/noisy/maa_task_aborted.wav diff --git a/res/sounds/noisy/MAA在完成任务前退出.wav b/res/sounds/noisy/maa_task_exited.wav similarity index 100% rename from res/sounds/noisy/MAA在完成任务前退出.wav rename to res/sounds/noisy/maa_task_exited.wav diff --git a/res/sounds/noisy/MAA更新.wav b/res/sounds/noisy/maa_update.wav similarity index 100% rename from res/sounds/noisy/MAA更新.wav rename to res/sounds/noisy/maa_update.wav diff --git a/res/sounds/noisy/有新版本.wav b/res/sounds/noisy/new_version_available.wav similarity index 100% rename from res/sounds/noisy/有新版本.wav rename to res/sounds/noisy/new_version_available.wav diff --git a/res/sounds/noisy/无新版本.wav b/res/sounds/noisy/no_new_version.wav similarity index 100% rename from res/sounds/noisy/无新版本.wav rename to res/sounds/noisy/no_new_version.wav diff --git a/res/sounds/noisy/六星喜报.wav b/res/sounds/noisy/six_star_report.wav similarity index 100% rename from res/sounds/noisy/六星喜报.wav rename to res/sounds/noisy/six_star_report.wav diff --git a/res/sounds/noisy/森空岛签到失败.wav b/res/sounds/noisy/skland_checkin_failed.wav similarity index 100% rename from res/sounds/noisy/森空岛签到失败.wav rename to res/sounds/noisy/skland_checkin_failed.wav diff --git a/res/sounds/noisy/森空岛签到成功.wav b/res/sounds/noisy/skland_checkin_success.wav similarity index 100% rename from res/sounds/noisy/森空岛签到成功.wav rename to res/sounds/noisy/skland_checkin_success.wav diff --git a/res/sounds/noisy/子任务失败.wav b/res/sounds/noisy/subtask_failed.wav similarity index 100% rename from res/sounds/noisy/子任务失败.wav rename to res/sounds/noisy/subtask_failed.wav diff --git a/res/sounds/noisy/任务结束.wav b/res/sounds/noisy/task_completed.wav similarity index 100% rename from res/sounds/noisy/任务结束.wav rename to res/sounds/noisy/task_completed.wav diff --git a/res/sounds/noisy/任务开始.wav b/res/sounds/noisy/task_started.wav similarity index 100% rename from res/sounds/noisy/任务开始.wav rename to res/sounds/noisy/task_started.wav diff --git a/res/sounds/noisy/排查录入.wav b/res/sounds/noisy/troubleshooting_record.wav similarity index 100% rename from res/sounds/noisy/排查录入.wav rename to res/sounds/noisy/troubleshooting_record.wav diff --git a/res/sounds/noisy/排查重试.wav b/res/sounds/noisy/troubleshooting_retry.wav similarity index 100% rename from res/sounds/noisy/排查重试.wav rename to res/sounds/noisy/troubleshooting_retry.wav diff --git a/res/sounds/simple/公告展示.wav b/res/sounds/simple/announcement_display.wav similarity index 100% rename from res/sounds/simple/公告展示.wav rename to res/sounds/simple/announcement_display.wav diff --git a/res/sounds/simple/公告通知.wav b/res/sounds/simple/announcement_notification.wav similarity index 100% rename from res/sounds/simple/公告通知.wav rename to res/sounds/simple/announcement_notification.wav diff --git a/res/sounds/simple/发生错误.wav b/res/sounds/simple/error_occurred.wav similarity index 100% rename from res/sounds/simple/发生错误.wav rename to res/sounds/simple/error_occurred.wav diff --git a/res/sounds/simple/发生异常.wav b/res/sounds/simple/exception_occurred.wav similarity index 100% rename from res/sounds/simple/发生异常.wav rename to res/sounds/simple/exception_occurred.wav diff --git a/res/sounds/simple/历史记录查询.wav b/res/sounds/simple/history_query.wav similarity index 100% rename from res/sounds/simple/历史记录查询.wav rename to res/sounds/simple/history_query.wav diff --git a/res/sounds/simple/有新版本.wav b/res/sounds/simple/new_version_available.wav similarity index 100% rename from res/sounds/simple/有新版本.wav rename to res/sounds/simple/new_version_available.wav diff --git a/res/sounds/simple/无新版本.wav b/res/sounds/simple/no_new_version.wav similarity index 100% rename from res/sounds/simple/无新版本.wav rename to res/sounds/simple/no_new_version.wav diff --git a/res/sounds/simple/任务结束.wav b/res/sounds/simple/task_completed.wav similarity index 100% rename from res/sounds/simple/任务结束.wav rename to res/sounds/simple/task_completed.wav diff --git a/res/sounds/simple/任务开始.wav b/res/sounds/simple/task_started.wav similarity index 100% rename from res/sounds/simple/任务开始.wav rename to res/sounds/simple/task_started.wav