-
-
- {project.projectGroupName}
-
- {typeInfo.label}
-
-
-
- {project.projectGroupDesc || '暂无描述'}
-
+
+ {project.projectGroupName}
+
+
+
+ {typeInfo.icon} {typeInfo.label}
+
+
+
+
+
+ {project.projectGroupDesc || '暂无描述'}
+
+
+
+
+ 项目组编码
-
- {Icon}
+
+ {project.projectGroupCode}
+ {project.environments && project.environments.length > 0 && (
+
+
+
+ 关联环境
+
+ {project.environments.length} 个环境
+
+
+
+
+
+
+
+ {project.environments.map(env => {
+ const buildType = buildTypeMap[env.buildType];
+ const deployType = deployTypeMap[env.deployType];
+
+ return (
+
+
+
+
{env.envName}
+
+
+
+ {buildType.icon}
+
+
+
+
+ {deployType.icon}
+
+
+
+
+
+
+
+ {env.envCode}
+
+
+ {env.envDesc && (
+
+
+ {env.envDesc}
+
+
+ )}
+
+
+
+
+
+
+ 最近部署:2小时前
+
+
+
+ 部署次数:12次
+
+
+
+
+ );
+ })}
+
+
+ )}
+
-
-
项目组编码
-
- {project.projectGroupCode}
-
-
-
-
-
- 环境数量}
- value={2}
- prefix={}
- valueStyle={{ fontSize: '16px', color: typeInfo.color }}
- />
-
-
- 成员数量}
- value={5}
- prefix={}
- valueStyle={{ fontSize: '16px', color: typeInfo.color }}
- />
-
-
-
-
-
-
-
排序
-
- {project.sort}
-
-
-
-
-
-
- }
- onClick={() => handleEdit(project)}
- style={{
- borderRadius: '6px',
- background: typeInfo.color,
- border: 'none'
- }}
- >
- 编辑
-
- handleDelete(project.id)}
- >
- }
- style={{ borderRadius: '6px' }}
- >
- 删除
-
-
- }
- style={{ borderRadius: '6px' }}
- >
- 成员
-
+
+
+ 2小时前
+ 排序: {project.sort}
@@ -307,9 +316,10 @@ const ProjectList: React.FC = () => {
onClick={handleAdd}
style={{
borderRadius: '8px',
- boxShadow: '0 2px 0 rgba(0,0,0,0.045)',
- height: '40px',
padding: '0 24px',
+ height: '40px',
+ boxShadow: '0 2px 0 rgba(0,0,0,0.045)',
+ transition: 'all 0.3s ease',
}}
>
新建项目组
@@ -350,47 +360,39 @@ const ProjectList: React.FC = () => {
- {filteredProjects.map(project => (
-
-
+ {filteredProjects.length > 0 ? (
+ filteredProjects.map((project) => (
+
+
+
+ ))
+ ) : (
+
+
+
+
- ))}
-
-
-
-
-
+ )}
-
setModalVisible(false)}
- onSuccess={fetchProjects}
+ onSuccess={() => {
+ setModalVisible(false);
+ fetchProjects();
+ }}
initialValues={currentProject}
/>
diff --git a/frontend/src/pages/Deploy/ProjectGroup/List/types.ts b/frontend/src/pages/Deploy/ProjectGroup/List/types.ts
index a534628a..d7325471 100644
--- a/frontend/src/pages/Deploy/ProjectGroup/List/types.ts
+++ b/frontend/src/pages/Deploy/ProjectGroup/List/types.ts
@@ -1,4 +1,5 @@
import { BaseResponse, BaseRequest, BaseQuery } from '@/types/base';
+import { Environment } from '../../Environment/List/types';
// 项目基础信息
export interface ProjectGroup extends BaseResponse {
@@ -6,7 +7,8 @@ export interface ProjectGroup extends BaseResponse {
projectGroupCode: string;
projectGroupName: string;
projectGroupDesc?: string;
- projectGroupStatus: string;
+ projectGroupStatus: 'ENABLE' | 'DISABLE';
+ environments: Environment[];
sort: number;
}