From ec7b0aa67cfa3b6be42c1ceaf4d64f6521e83f14 Mon Sep 17 00:00:00 2001 From: dengqichen Date: Mon, 10 Nov 2025 11:09:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E5=89=8D=E7=AB=AF=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../List/components/ApplicationModal.tsx | 33 ++++++++++++++++--- .../pages/Deploy/Application/List/types.ts | 2 ++ .../TeamEnvironmentConfigDialog.tsx | 18 +++++++--- .../TeamEnvironmentManageDialog.tsx | 4 +++ 4 files changed, 47 insertions(+), 10 deletions(-) diff --git a/frontend/src/pages/Deploy/Application/List/components/ApplicationModal.tsx b/frontend/src/pages/Deploy/Application/List/components/ApplicationModal.tsx index 8905f14c..de6018ed 100644 --- a/frontend/src/pages/Deploy/Application/List/components/ApplicationModal.tsx +++ b/frontend/src/pages/Deploy/Application/List/components/ApplicationModal.tsx @@ -366,9 +366,23 @@ const ApplicationModal: React.FC = ({ )} > {field.value - ? repositoryProjects.find( - (project) => project.repoProjectId === field.value - )?.name + ? (() => { + const project = repositoryProjects.find( + (p) => p.repoProjectId === field.value + ); + if (!project) return ''; + + // 如果有组别名称,显示组别/项目名 + if (project.repoGroupName) { + return ( + <> + {project.repoGroupName}/ + {project.name} + + ); + } + return project.name; + })() : !form.watch('externalSystemId') ? "请先选择Gitlab" : "请选择项目"} @@ -413,9 +427,18 @@ const ApplicationModal: React.FC = ({ } }} > - {project.name} +
+ {project.repoGroupName ? ( + <> + {project.repoGroupName}/ + {project.name} + + ) : ( + project.name + )} +
{project.repoProjectId === field.value && ( - + )} )) diff --git a/frontend/src/pages/Deploy/Application/List/types.ts b/frontend/src/pages/Deploy/Application/List/types.ts index 07ba9b11..bb8f4725 100644 --- a/frontend/src/pages/Deploy/Application/List/types.ts +++ b/frontend/src/pages/Deploy/Application/List/types.ts @@ -54,7 +54,9 @@ export interface RepositoryProject extends BaseResponse { externalSystemId: number; projectId: number; repoGroupId: number; + repoGroupName?: string; // 组别名称 repoProjectId: number; + branchCount?: number; } export type CreateApplicationRequest = Omit; diff --git a/frontend/src/pages/Deploy/Team/List/components/TeamEnvironmentConfigDialog.tsx b/frontend/src/pages/Deploy/Team/List/components/TeamEnvironmentConfigDialog.tsx index ad55d55c..650905f0 100644 --- a/frontend/src/pages/Deploy/Team/List/components/TeamEnvironmentConfigDialog.tsx +++ b/frontend/src/pages/Deploy/Team/List/components/TeamEnvironmentConfigDialog.tsx @@ -7,6 +7,7 @@ import { DialogContent, DialogHeader, DialogTitle, + DialogDescription, DialogFooter, DialogBody, } from '@/components/ui/dialog'; @@ -313,6 +314,11 @@ export const TeamEnvironmentConfigDialog: React.FC< {editEnvironmentId ? '编辑环境配置' : '配置环境'} + + {editEnvironmentId + ? '修改环境的审批流程、通知设置等配置信息' + : '为环境配置审批流程、通知设置等信息'} + {loading ? ( @@ -408,11 +414,13 @@ export const TeamEnvironmentConfigDialog: React.FC< className="mr-1" > {user.realName || user.username} - + ))} diff --git a/frontend/src/pages/Deploy/Team/List/components/TeamEnvironmentManageDialog.tsx b/frontend/src/pages/Deploy/Team/List/components/TeamEnvironmentManageDialog.tsx index c76020cd..c412adb8 100644 --- a/frontend/src/pages/Deploy/Team/List/components/TeamEnvironmentManageDialog.tsx +++ b/frontend/src/pages/Deploy/Team/List/components/TeamEnvironmentManageDialog.tsx @@ -4,6 +4,7 @@ import { DialogContent, DialogHeader, DialogTitle, + DialogDescription, DialogBody, DialogFooter, } from '@/components/ui/dialog'; @@ -143,6 +144,9 @@ export const TeamEnvironmentManageDialog: React.FC< 环境管理 - {teamName} + + 管理团队的环境配置,包括审批流程、通知设置和应用配置 +