diff --git a/.claude/skills/design-system/SKILL.md b/.claude/skills/design-system/SKILL.md new file mode 100644 index 0000000..d7b7dc3 --- /dev/null +++ b/.claude/skills/design-system/SKILL.md @@ -0,0 +1,437 @@ +--- +name: design-system +description: "比赛管理系统设计规范。当用户提出页面开发需求时自动应用。主色: #0958d9 蓝色主题。包含: 颜色系统、间距、圆角、阴影、字体、组件规范(按钮、卡片、表单、标签)、页面布局、动画效果。适用: 新增页面、修改样式、组件开发、UI调整。" +--- + +# 比赛管理系统 - 设计规范 Skill + +当用户提出页面开发、UI修改、组件创建等需求时,**必须遵循以下设计规范**。 + +--- + +## 快速开始 + +每个新页面的 ` diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 9864a94..26e0176 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -19,18 +19,6 @@ const baseRoutes: RouteRecordRaw[] = [ component: () => import("@/views/auth/Login.vue"), meta: { requiresAuth: false }, }, - { - path: "/model-viewer", - name: "ModelViewer", - component: () => import("@/views/model/ModelViewer.vue"), - meta: { requiresAuth: false }, - }, - { - path: "/:tenantCode/3d-lab-fullscreen", - name: "3DLabFullscreen", - component: () => import("@/views/workbench/ai-3d/Index.vue"), - meta: { requiresAuth: true }, - }, { path: "/:tenantCode", name: "Main", @@ -187,6 +175,7 @@ const baseRoutes: RouteRecordRaw[] = [ meta: { title: "3D建模实验室", requiresAuth: true, + hideSidebar: true, }, }, // 3D模型生成页面 @@ -197,6 +186,29 @@ const baseRoutes: RouteRecordRaw[] = [ meta: { title: "3D模型生成", requiresAuth: true, + hideSidebar: true, + }, + }, + // 3D创作历史页面 + { + path: "workbench/3d-lab/history", + name: "AI3DHistory", + component: () => import("@/views/workbench/ai-3d/History.vue"), + meta: { + title: "创作历史", + requiresAuth: true, + hideSidebar: true, + }, + }, + // 3D模型预览页面 + { + path: "workbench/model-viewer", + name: "ModelViewer", + component: () => import("@/views/model/ModelViewer.vue"), + meta: { + title: "3D模型预览", + requiresAuth: true, + hideSidebar: true, }, }, // 动态路由将在这里添加 @@ -474,7 +486,7 @@ router.beforeEach(async (to, _from, next) => { return } // 如果URL中没有租户编码,添加租户编码(排除不需要认证的特殊路由) - const skipTenantCodePaths = ["/login", "/model-viewer", "/403"] + const skipTenantCodePaths = ["/login", "/403"] const shouldSkipTenantCode = skipTenantCodePaths.some(p => to.path.startsWith(p)) if (!tenantCodeFromUrl && !shouldSkipTenantCode) { const correctedPath = buildPathWithTenantCode(userTenantCode, to.path) diff --git a/frontend/src/types/router.ts b/frontend/src/types/router.ts index c1d9461..2633463 100644 --- a/frontend/src/types/router.ts +++ b/frontend/src/types/router.ts @@ -6,5 +6,6 @@ declare module "vue-router" { requiresAuth?: boolean; roles?: string[]; // 需要的角色列表 permissions?: string[]; // 需要的权限列表 + hideSidebar?: boolean; // 是否隐藏侧边栏(全屏模式) } } diff --git a/frontend/src/views/contests/Guidance.vue b/frontend/src/views/contests/Guidance.vue index 3e3e16d..398854e 100644 --- a/frontend/src/views/contests/Guidance.vue +++ b/frontend/src/views/contests/Guidance.vue @@ -409,9 +409,12 @@ const handlePreview3DModel = (fileUrl: string) => { } const fullUrl = getFileUrl(fileUrl) console.log("预览3D模型,原始URL:", fileUrl, "完整URL:", fullUrl) - // 直接在新标签页打开模型查看器 - const viewerUrl = `/model-viewer?url=${encodeURIComponent(fullUrl)}` - window.open(viewerUrl, "_blank") + // 跳转到模型查看器页面 + const tenantCode = route.params.tenantCode as string + router.push({ + path: `/${tenantCode}/workbench/model-viewer`, + query: { url: fullUrl }, + }) } // 表格列定义 diff --git a/frontend/src/views/contests/components/ViewWorkDrawer.vue b/frontend/src/views/contests/components/ViewWorkDrawer.vue index 9558c7f..9759904 100644 --- a/frontend/src/views/contests/components/ViewWorkDrawer.vue +++ b/frontend/src/views/contests/components/ViewWorkDrawer.vue @@ -159,6 +159,7 @@ + + diff --git a/frontend/src/views/workbench/ai-3d/Index.vue b/frontend/src/views/workbench/ai-3d/Index.vue index deb29b4..7aed67b 100644 --- a/frontend/src/views/workbench/ai-3d/Index.vue +++ b/frontend/src/views/workbench/ai-3d/Index.vue @@ -5,13 +5,15 @@
-