From a8b9f658a03da72d37da205daf55dd8686360e98 Mon Sep 17 00:00:00 2001 From: zhangxiaohua <827885272@qq.com> Date: Mon, 19 Jan 2026 11:29:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BE=A7=E8=BE=B9=E6=A0=8F?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/cmp-3d.conf | 4 +- frontend/src/layouts/BasicLayout.vue | 164 +++++++++++++++++-- frontend/src/views/workbench/ai-3d/Index.vue | 78 ++++++++- 3 files changed, 227 insertions(+), 19 deletions(-) diff --git a/frontend/cmp-3d.conf b/frontend/cmp-3d.conf index d0a272d..21c461b 100644 --- a/frontend/cmp-3d.conf +++ b/frontend/cmp-3d.conf @@ -25,7 +25,7 @@ server { # ========== 测试环境 - API 代理 ========== location /api-test/ { proxy_redirect off; - proxy_pass http://119.29.229.174:3234/; + proxy_pass http://119.29.229.174:3234/api; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -43,7 +43,7 @@ server { # ========== 生产环境 - API 代理 ========== location /api/ { proxy_redirect off; - proxy_pass http://119.29.229.174:3234/; + proxy_pass http://119.29.229.174:3234/api/; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/frontend/src/layouts/BasicLayout.vue b/frontend/src/layouts/BasicLayout.vue index bb1e6e0..9ffe0c5 100644 --- a/frontend/src/layouts/BasicLayout.vue +++ b/frontend/src/layouts/BasicLayout.vue @@ -3,22 +3,38 @@
+ +
+
+ +
+
+ 3D建模实验室 + AI智能建模 +
+
+ +
+
@@ -70,6 +86,8 @@ import { MenuFoldOutlined, MenuUnfoldOutlined, LogoutOutlined, + ExperimentOutlined, + RightOutlined, } from "@ant-design/icons-vue" import { useAuthStore } from "@/stores/auth" import { convertMenusToMenuItems } from "@/utils/menu" @@ -101,6 +119,26 @@ const menuItems = computed(() => { return [] }) +// 过滤掉3D建模实验室的菜单项(因为已经作为固定入口展示) +const filteredMenuItems = computed(() => { + const items = menuItems.value || [] + return items.filter((item: any) => { + // 检查是否是3D建模实验室菜单 + const is3DLab = + item?.key?.toLowerCase().includes("3dlab") || + item?.key?.toLowerCase().includes("3d-lab") || + item?.label?.includes("3D建模") || + item?.title?.includes("3D建模") + return !is3DLab + }) +}) + +// 打开3D建模实验室(当前窗口跳转,更快) +const open3DLab = () => { + const tenantCode = route.params.tenantCode as string + router.push(`/${tenantCode}/workbench/3d-lab`) +} + watch( () => route.name, (routeName) => { @@ -110,7 +148,7 @@ watch( const findParentKeys = ( menus: any[], targetName: string, - parentKeys: string[] = [] + parentKeys: string[] = [], ): string[] => { for (const menu of menus) { const menuKey = menu.key @@ -129,14 +167,14 @@ watch( } const parentKeys = findParentKeys( menuItems.value || [], - routeName as string + routeName as string, ) if (parentKeys.length > 0) { openKeys.value = parentKeys } } }, - { immediate: true } + { immediate: true }, ) const handleMenuClick = ({ key }: { key: string }) => { @@ -179,7 +217,7 @@ const handleMenuClick = ({ key }: { key: string }) => { "is3DLabByPath:", is3DLabByPath, "menuItem:", - menuItem + menuItem, ) if (is3DLab || is3DLabByPath) { @@ -255,7 +293,6 @@ $primary-light: #40a9ff; align-items: center; justify-content: center; padding: 16px 12px; - border-bottom: 1px solid rgba(0, 0, 0, 0.06); margin-bottom: 8px; img { @@ -273,6 +310,92 @@ $primary-light: #40a9ff; } } +// 3D建模实验室快捷入口 +.lab-entry { + display: flex; + align-items: center; + gap: 12px; + margin: 8px 0 16px 0; + padding: 12px 14px; + background: linear-gradient( + 135deg, + rgba($primary, 0.08) 0%, + rgba($primary, 0.15) 100% + ); + border: 1px solid rgba($primary, 0.2); + border-radius: 12px; + cursor: pointer; + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + + &:hover { + background: linear-gradient( + 135deg, + rgba($primary, 0.12) 0%, + rgba($primary, 0.22) 100% + ); + border-color: rgba($primary, 0.35); + transform: translateY(-1px); + box-shadow: 0 4px 12px rgba($primary, 0.15); + } + + .lab-entry-icon { + display: flex; + align-items: center; + justify-content: center; + width: 36px; + height: 36px; + background: linear-gradient(135deg, $primary 0%, $primary-dark 100%); + border-radius: 10px; + color: #fff; + font-size: 18px; + flex-shrink: 0; + } + + .lab-entry-content { + flex: 1; + min-width: 0; + display: flex; + flex-direction: column; + gap: 2px; + + .lab-entry-title { + font-size: 14px; + font-weight: 600; + color: rgba(0, 0, 0, 0.85); + line-height: 1.3; + } + + .lab-entry-desc { + font-size: 12px; + color: rgba(0, 0, 0, 0.45); + line-height: 1.2; + } + } + + .lab-entry-arrow { + color: rgba(0, 0, 0, 0.35); + font-size: 12px; + transition: all 0.3s; + } + + &:hover .lab-entry-arrow { + color: $primary; + transform: translateX(2px); + } +} + +.lab-entry-collapsed { + justify-content: center; + padding: 12px; + margin: 8px 4px 16px 4px; + + .lab-entry-icon { + width: 32px; + height: 32px; + font-size: 16px; + } +} + // 底部用户区域 .sider-bottom { padding: 12px 16px; @@ -384,13 +507,13 @@ $primary-light: #40a9ff; } &.ant-menu-item-selected { - color: #fff !important; - background: linear-gradient(135deg, $primary 0%, $primary-dark 100%) !important; + color: $primary !important; + background: rgba($primary, 0.12) !important; font-weight: 500; - box-shadow: 0 2px 8px rgba($primary, 0.3); + box-shadow: none; .anticon { - color: #fff; + color: $primary; } &::after { @@ -449,8 +572,13 @@ $primary-light: #40a9ff; margin: 2px 0; &.ant-menu-item-selected { - background: linear-gradient(135deg, $primary 0%, $primary-dark 100%) !important; - box-shadow: 0 2px 8px rgba($primary, 0.3); + color: $primary !important; + background: rgba($primary, 0.12) !important; + box-shadow: none; + + .anticon { + color: $primary; + } } } } @@ -461,8 +589,12 @@ $primary-light: #40a9ff; transition: all 0.3s; } - :deep(.ant-menu-submenu-open > .ant-menu-submenu-title > .ant-menu-submenu-arrow), - :deep(.ant-menu-submenu:hover > .ant-menu-submenu-title > .ant-menu-submenu-arrow) { + :deep( + .ant-menu-submenu-open > .ant-menu-submenu-title > .ant-menu-submenu-arrow + ), + :deep( + .ant-menu-submenu:hover > .ant-menu-submenu-title > .ant-menu-submenu-arrow + ) { color: $primary; } } diff --git a/frontend/src/views/workbench/ai-3d/Index.vue b/frontend/src/views/workbench/ai-3d/Index.vue index 00966dd..b5ad3cc 100644 --- a/frontend/src/views/workbench/ai-3d/Index.vue +++ b/frontend/src/views/workbench/ai-3d/Index.vue @@ -1,5 +1,17 @@