对话、重新生成、评价完成

This commit is contained in:
2025-11-05 16:55:58 +08:00
parent 8850a06fea
commit d9d62e22de
34 changed files with 1658 additions and 965 deletions

View File

@@ -28,6 +28,7 @@
<!-- 页面内容 -->
<main class="main-content">
<AIAgent/>
<router-view />
</main>
</div>
@@ -35,6 +36,7 @@
<!-- 没有侧边栏时直接显示内容 -->
<div class="content-wrapper-full" v-else>
<main class="main-content-full">
<AIAgent/>
<router-view />
</main>
</div>
@@ -48,8 +50,9 @@ import { useRoute, useRouter } from 'vue-router';
import { useStore } from 'vuex';
import type { SysMenu } from '@/types';
import { MenuType } from '@/types/enums';
import { getMenuPath } from '@/utils/route-generator';
import { TopNavigation, MenuSidebar, Breadcrumb } from '@/components';
// import { getMenuPath } from '@/utils/route-generator';
import { TopNavigation, MenuSidebar } from '@/components';
import { AIAgent } from '@/views/public/ai';
const route = useRoute();
const router = useRouter();
@@ -89,16 +92,16 @@ const sidebarMenus = computed(() => {
// 是否有侧边栏菜单
const hasSidebarMenus = computed(() => sidebarMenus.value.length > 0);
// 面包屑数据
const breadcrumbItems = computed(() => {
if (!route.meta?.menuId) return [];
const menuPath = getMenuPath(allMenus.value, route.meta.menuId as string);
return menuPath.map((menu) => ({
title: menu.name || '',
path: menu.url || '',
}));
});
// 面包屑数据(暂时未使用)
// const breadcrumbItems = computed(() => {
// if (!route.meta?.menuId) return [];
//
// const menuPath = getMenuPath(allMenus.value, route.meta.menuId as string);
// return menuPath.map((menu) => ({
// title: menu.name || '',
// path: menu.url || '',
// }));
// });
// 判断路径是否在菜单下
function isPathUnderMenu(path: string, menu: SysMenu): boolean {