feat: 注释AI助教和智能体编排功能模块
This commit is contained in:
parent
41cccd9f7a
commit
cb0de218fa
@ -96,18 +96,18 @@
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
<!-- ai助教 -->
|
||||
<div class="ai-container">
|
||||
<!-- ai助教 - 已注释 -->
|
||||
<!-- <div class="ai-container">
|
||||
<router-link to="/teacher/ai-assistant" class="ai-tab" @mouseenter="isAiHovered = true"
|
||||
@mouseleave="isAiHovered = false">
|
||||
<img :src="(isAiActive || isAiHovered) ? '/images/aiAssistant/AI助教1.png' : '/images/aiAssistant/AI助教2.png'"
|
||||
alt="ai" />
|
||||
<span>AI助教</span>
|
||||
</router-link>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- 智能体编排 - 可展开菜单 -->
|
||||
<div class="nav-container orchestration-nav">
|
||||
<!-- 智能体编排 - 可展开菜单 - 已注释 -->
|
||||
<!-- <div class="nav-container orchestration-nav">
|
||||
<div class="nav-item" :class="{ active: activeNavItem === 6 }" @click="toggleOrchestrationMenu">
|
||||
<img :src="activeNavItem === 6 ? '/images/aiAssistant/AI助教1.png' : '/images/aiAssistant/AI助教2.png'" alt="">
|
||||
<span>智能体编排</span>
|
||||
@ -116,7 +116,6 @@
|
||||
</n-icon>
|
||||
</div>
|
||||
|
||||
<!-- 智能体编排子菜单 -->
|
||||
<div class="submenu-container" :class="{ expanded: orchestrationMenuExpanded }">
|
||||
<router-link to="/teacher/airag/aiapp" class="submenu-item"
|
||||
:class="{ active: activeSubNavItem === 'app-management' }" @click="setActiveSubNavItem('app-management')">
|
||||
@ -140,7 +139,7 @@
|
||||
<span>OCR识别</span>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- 右侧路由视图 -->
|
||||
@ -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';
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user