From bc61c98804285337c44ce86c974ff76d7a474bb9 Mon Sep 17 00:00:00 2001 From: liailing1026 <1815388873@qq.com> Date: Tue, 3 Mar 2026 16:15:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=99=BA=E8=83=BD=E4=BD=93=E5=BA=93?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9=E5=92=8C=E7=BD=AE=E9=A1=B6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TaskTemplate/AgentRepo/AgentRepoList.vue | 19 +++++++++++++++++-- .../Main/TaskTemplate/AgentRepo/index.vue | 15 +++++++++++---- frontend/src/styles/theme.scss | 8 ++++++++ 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/frontend/src/layout/components/Main/TaskTemplate/AgentRepo/AgentRepoList.vue b/frontend/src/layout/components/Main/TaskTemplate/AgentRepo/AgentRepoList.vue index 599d661..2aa9e84 100644 --- a/frontend/src/layout/components/Main/TaskTemplate/AgentRepo/AgentRepoList.vue +++ b/frontend/src/layout/components/Main/TaskTemplate/AgentRepo/AgentRepoList.vue @@ -121,8 +121,17 @@ const agentsStore = useAgentsStore()
@@ -219,4 +228,10 @@ const agentsStore = useAgentsStore() right: 0 !important; margin-left: 0px; } + +// 标签悬浮样式(仅未激活状态) +.duty-info .rounded-\[9px\]:not(.bg-\[var\(--color-tab-bg-active\)\]):hover { + background: var(--color-tab-bg-hover) !important; + color: var(--color-tab-text-hover) !important; +} diff --git a/frontend/src/layout/components/Main/TaskTemplate/AgentRepo/index.vue b/frontend/src/layout/components/Main/TaskTemplate/AgentRepo/index.vue index 98ea993..0cc202e 100644 --- a/frontend/src/layout/components/Main/TaskTemplate/AgentRepo/index.vue +++ b/frontend/src/layout/components/Main/TaskTemplate/AgentRepo/index.vue @@ -119,17 +119,24 @@ const agentList = computed(() => { data: Agent[] }[] = [] const obj: Record = {} + + // 获取当前任务中参与流程的智能体名称列表 + const selectedAgentNames = agentsStore.currentTask?.AgentSelection ?? [] + if (!agentsStore.agents.length) { return { selected, unselected } } + for (const agent of agentsStore.agents) { - // if (agentsStore.currentTask?.AgentSelection?.includes(agent.Name)) { - // selected.push(agent) - // continue - // } + // 如果智能体在当前任务的AgentSelection中,则放入selected数组(置顶显示) + if (selectedAgentNames.includes(agent.Name)) { + selected.push(agent) + continue + } + // 其他智能体按数据空间分类 if (obj[agent.Classification]) { obj[agent.Classification]!.push(agent) } else { diff --git a/frontend/src/styles/theme.scss b/frontend/src/styles/theme.scss index 916bdf0..c32f864 100644 --- a/frontend/src/styles/theme.scss +++ b/frontend/src/styles/theme.scss @@ -114,10 +114,14 @@ --color-tab-bg: rgba(36, 40, 46, 0.4); // 智能体标签选中背景色 --color-tab-bg-active: #24282E; + // 智能体标签悬浮背景色 + --color-tab-bg-hover: rgba(36, 40, 46, 0.7); // 智能体标签文字颜色(选中) --color-tab-text: #FDFFFF; // 智能体标签文字颜色(未选中) --color-tab-text-inactive: rgba(253, 255, 255, 0.4); + // 智能体标签文字颜色(悬浮) + --color-tab-text-hover: rgba(253, 255, 255, 0.7); // 任务编辑框悬浮边框颜色 --color-task-edit-hover-border: #D6D6D6; // 编辑图标背景色 @@ -243,10 +247,14 @@ html.dark { --color-tab-bg: rgba(36, 40, 46, 0.4); // 智能体标签选中背景色 --color-tab-bg-active: #24282E; + // 智能体标签悬浮背景色 + --color-tab-bg-hover: rgba(36, 40, 46, 0.7); // 智能体标签文字颜色(选中) --color-tab-text: #FDFFFF; // 智能体标签文字颜色(未选中) --color-tab-text-inactive: rgba(253, 255, 255, 0.4); + // 智能体标签文字颜色(悬浮) + --color-tab-text-hover: rgba(253, 255, 255, 0.7); // 任务编辑框悬浮边框颜色 --color-task-edit-hover-border: #ADA9A7; // 编辑图标背景色