From 4db49e0bb9abf7a336c5728522e7749c4921acec Mon Sep 17 00:00:00 2001 From: DLmaster361 Date: Fri, 19 Sep 2025 00:12:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=9D=E6=AD=A5=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=B0=83=E5=BA=A6=E9=98=9F=E5=88=97=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/dispatch.py | 6 +- app/core/config.py | 6 +- app/core/task_manager.py | 2 +- .../src/components/queue/QueueItemManager.vue | 508 +++++++---- .../src/components/queue/TimeSetManager.vue | 831 ++++++++++++++---- 5 files changed, 1020 insertions(+), 333 deletions(-) diff --git a/app/api/dispatch.py b/app/api/dispatch.py index 756306f..3370771 100644 --- a/app/api/dispatch.py +++ b/app/api/dispatch.py @@ -20,11 +20,9 @@ # Contact: DLmaster_361@163.com -import uuid -import asyncio -from fastapi import APIRouter, WebSocket, WebSocketDisconnect, Body, Path +from fastapi import APIRouter, Body -from app.core import TaskManager, Broadcast +from app.core import TaskManager from app.services import System from app.models.schema import * diff --git a/app/core/config.py b/app/core/config.py index db86f36..2d404b3 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -170,8 +170,8 @@ class QueueItem(ConfigBase): self.Info_ScriptId = ConfigItem( "Info", "ScriptId", - None, - MultipleUIDValidator(None, self.related_config, "ScriptConfig"), + "-", + MultipleUIDValidator("-", self.related_config, "ScriptConfig"), ) @@ -928,7 +928,7 @@ class AppConfig(GlobalConfig): { "Info": { "ScriptId": script_dict.get( - queue_config["Queue"][f"Script_{i}"], None + queue_config["Queue"][f"Script_{i}"], "-" ) } } diff --git a/app/core/task_manager.py b/app/core/task_manager.py index de0be98..5a87fde 100644 --- a/app/core/task_manager.py +++ b/app/core/task_manager.py @@ -133,7 +133,7 @@ class _TaskManager: task_list = [] for queue_item in queue.QueueItem.values(): - if queue_item.get("Info", "ScriptId") is None: + if queue_item.get("Info", "ScriptId") == "-": continue script_id = uuid.UUID(queue_item.get("Info", "ScriptId")) script = Config.ScriptConfig[script_id] diff --git a/frontend/src/components/queue/QueueItemManager.vue b/frontend/src/components/queue/QueueItemManager.vue index 638e441..8a2ff04 100644 --- a/frontend/src/components/queue/QueueItemManager.vue +++ b/frontend/src/components/queue/QueueItemManager.vue @@ -1,12 +1,12 @@