From cb0de218fa94b485bf824d673605df35da31114d Mon Sep 17 00:00:00 2001 From: QDKF Date: Thu, 25 Sep 2025 20:55:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B3=A8=E9=87=8AAI=E5=8A=A9=E6=95=99?= =?UTF-8?q?=E5=92=8C=E6=99=BA=E8=83=BD=E4=BD=93=E7=BC=96=E6=8E=92=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/teacher/AdminDashboard.vue | 97 ++++++++++++++-------------- 1 file changed, 48 insertions(+), 49 deletions(-) diff --git a/src/views/teacher/AdminDashboard.vue b/src/views/teacher/AdminDashboard.vue index b6b6497..b4953de 100644 --- a/src/views/teacher/AdminDashboard.vue +++ b/src/views/teacher/AdminDashboard.vue @@ -96,18 +96,18 @@ - -
+ + - - +
--> @@ -198,11 +197,11 @@ const height = window.innerHeight; console.log(`当前屏幕宽度: ${width}px, 高度: ${height}px`); // 添加导航项激活状态管理 -const activeNavItem = ref(0); // 0: 课程管理, 1: 学员管理, 2: 我的资源, 3: 个人中心, 4: 考试管理, 5: 消息中心, 6: 智能体编排 +const activeNavItem = ref(0); // 0: 课程管理, 1: 学员管理, 2: 我的资源, 3: 个人中心, 4: 考试管理, 5: 消息中心 (6: 智能体编排 - 已注释) const activeSubNavItem = ref(''); // 子菜单激活状态 const examMenuExpanded = ref(false); // 考试管理菜单展开状态 const studentMenuExpanded = ref(false); // 学员中心菜单展开状态 -const orchestrationMenuExpanded = ref(false); // 智能体编排菜单展开状态 +// const orchestrationMenuExpanded = ref(false); // 智能体编排菜单展开状态 - 已注释 const showTopImage = ref(false); // 控制顶部图片显示/隐藏 // 需要隐藏顶部图片的路由路径数组 @@ -214,11 +213,11 @@ const hideTopImageRoutes = [ const route = useRoute(); const router = useRouter(); -const isAiHovered = ref(false); -const isAiActive = computed(() => route.path.includes('/teacher/ai-assistant')); +// const isAiHovered = ref(false); // AI助教悬停状态 - 已注释 +// const isAiActive = computed(() => route.path.includes('/teacher/ai-assistant')); // AI助教激活状态 - 已注释 const breadcrumbDisplay = computed(() => { const currentPath = route.path; - let arr = ['certificate/new', 'ai-assistant', 'airag']; + let arr = ['certificate/new']; // 移除 'ai-assistant', 'airag' - 已注释 let found = arr.find(item => currentPath.includes(item)); if (found) { return false; @@ -238,12 +237,12 @@ const setActiveNavItem = (index: number) => { if (index !== 1) { studentMenuExpanded.value = false; } - // 如果不是智能体编排,关闭智能体编排子菜单 - if (index !== 6) { - orchestrationMenuExpanded.value = false; - } + // 如果不是智能体编排,关闭智能体编排子菜单 - 已注释 + // if (index !== 6) { + // orchestrationMenuExpanded.value = false; + // } // 如果切换到其他菜单,清空子菜单选中状态 - if (index !== 4 && index !== 1 && index !== 6) { + if (index !== 4 && index !== 1) { // 移除 index !== 6 条件 activeSubNavItem.value = ''; } } @@ -281,16 +280,16 @@ const toggleStudentMenu = (path: string) => { } } -// 智能体编排菜单切换 -const toggleOrchestrationMenu = () => { - orchestrationMenuExpanded.value = !orchestrationMenuExpanded.value; - activeNavItem.value = 6; +// 智能体编排菜单切换 - 已注释 +// const toggleOrchestrationMenu = () => { +// orchestrationMenuExpanded.value = !orchestrationMenuExpanded.value; +// activeNavItem.value = 6; - // 如果展开且没有选中子菜单,默认选中第一个 - if (orchestrationMenuExpanded.value && !activeSubNavItem.value) { - activeSubNavItem.value = 'app-management'; - } -} +// // 如果展开且没有选中子菜单,默认选中第一个 +// if (orchestrationMenuExpanded.value && !activeSubNavItem.value) { +// activeSubNavItem.value = 'app-management'; +// } +// } // 设置子菜单激活状态 const setActiveSubNavItem = (subItem: string) => { @@ -862,30 +861,30 @@ const updateActiveNavItem = () => { activeSubNavItem.value = found || ''; } else if (path.includes('message-center')) { activeNavItem.value = 5; // 消息中心 - } else if (path.includes('ai-assistant')) { - // AI助教页面,清空所有导航项选中状态 - console.log('检测到AI助教页面,清空导航选中状态'); - activeNavItem.value = -1; - activeSubNavItem.value = ''; - examMenuExpanded.value = false; - studentMenuExpanded.value = false; - } else if (path.includes('airag')) { - // 智能体编排相关页面 - activeNavItem.value = 6; // 智能体编排 - orchestrationMenuExpanded.value = true; + // } else if (path.includes('ai-assistant')) { + // // AI助教页面,清空所有导航项选中状态 - 已注释 + // console.log('检测到AI助教页面,清空导航选中状态'); + // activeNavItem.value = -1; + // activeSubNavItem.value = ''; + // examMenuExpanded.value = false; + // studentMenuExpanded.value = false; + // } else if (path.includes('airag')) { + // // 智能体编排相关页面 - 已注释 + // activeNavItem.value = 6; // 智能体编排 + // orchestrationMenuExpanded.value = true; - // 根据路径设置子菜单激活状态 - if (path.includes('aiapp')) { - activeSubNavItem.value = 'app-management'; - } else if (path.includes('aiknowledge')) { - activeSubNavItem.value = 'knowledge-base'; - } else if (path.includes('aiflow')) { - activeSubNavItem.value = 'process-design'; - } else if (path.includes('aimodel')) { - activeSubNavItem.value = 'model-config'; - } else if (path.includes('ocr')) { - activeSubNavItem.value = 'ocr-recognition'; - } + // // 根据路径设置子菜单激活状态 + // if (path.includes('aiapp')) { + // activeSubNavItem.value = 'app-management'; + // } else if (path.includes('aiknowledge')) { + // activeSubNavItem.value = 'knowledge-base'; + // } else if (path.includes('aiflow')) { + // activeSubNavItem.value = 'process-design'; + // } else if (path.includes('aimodel')) { + // activeSubNavItem.value = 'model-config'; + // } else if (path.includes('ocr')) { + // activeSubNavItem.value = 'ocr-recognition'; + // } } }