From ea2bd0aa5a145ff63c0f8dca00e6a0f40d71b449 Mon Sep 17 00:00:00 2001 From: fmk1023 Date: Fri, 12 Dec 2025 15:14:50 +0800 Subject: [PATCH] =?UTF-8?q?Tcode=E5=B9=B3=E5=8F=B0=E6=94=B9=E9=80=A0?= =?UTF-8?q?=E5=8D=87=E7=BA=A7-AI=E5=8A=A9=E6=89=8B=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/config/home.ts | 13 + .../ViewHistoryAside/ViewHistoryAsideNew.vue | 15 +- src/views/Jyh/ModelChat/index.vue | 318 ++++++++++++++++++ 3 files changed, 343 insertions(+), 3 deletions(-) create mode 100644 src/views/Jyh/ModelChat/index.vue diff --git a/src/router/config/home.ts b/src/router/config/home.ts index 6808c8b..30cc9da 100644 --- a/src/router/config/home.ts +++ b/src/router/config/home.ts @@ -345,6 +345,19 @@ export default [ asideMenu: 'drawer' // 左侧菜单抽屉模式 } }, + { + path: '/model-chat', + name: 'ModelChat', + component: () => import('@/views/Jyh/ModelChat/index.vue'), + meta: { + title: 'ModelChat', + reportTitle: 'ModelChat', + className: 'w-full min-w-full', + hiddenFooter: true, + hasMobile: true, + asideMenu: 'drawer' // 左侧菜单抽屉模式 + } + }, { path: '/LinePage', name: 'LinePage', diff --git a/src/views/Jyh/AI/Home/components/ViewHistoryAside/ViewHistoryAsideNew.vue b/src/views/Jyh/AI/Home/components/ViewHistoryAside/ViewHistoryAsideNew.vue index e43edcc..cf783ff 100644 --- a/src/views/Jyh/AI/Home/components/ViewHistoryAside/ViewHistoryAsideNew.vue +++ b/src/views/Jyh/AI/Home/components/ViewHistoryAside/ViewHistoryAsideNew.vue @@ -131,6 +131,7 @@ import { fetchDeleteConversation, fetchToggleConversationCollect } from '@/api/jyh'; +import {useRouter} from "vue-router"; // --- Props & Emits --- const props = defineProps(['username', 'CONV_ID']); @@ -200,11 +201,19 @@ const handleSelect = (item) => { if (item.isEditing) return; // 编辑中不触发选中 emit('select-conv', item.conversationId); }; - -// 4. 菜单点击 +const router = useRouter(); +// 4. 菜单点击 - 修改为跳转逻辑 const handleMenuClick = (menu) => { console.log('点击菜单:', menu.title); - // 路由跳转或功能触发逻辑 + + // 使用 router.push 跳转,并通过 query 传递参数 + router.push({ + path: '/model-chat', // 对应路由中的 path + query: { + id: menu.id, + title: menu.title + } + }); }; // 5. 编辑/重命名逻辑 diff --git a/src/views/Jyh/ModelChat/index.vue b/src/views/Jyh/ModelChat/index.vue new file mode 100644 index 0000000..d268ba9 --- /dev/null +++ b/src/views/Jyh/ModelChat/index.vue @@ -0,0 +1,318 @@ + + + + +