重构消息通知弹窗

This commit is contained in:
dengqichen 2025-11-28 11:24:20 +08:00
parent 7bf536cb41
commit 46fb8fb5de
2 changed files with 8 additions and 3 deletions

View File

@ -46,12 +46,14 @@ const DeploymentFormModal: React.FC<DeploymentFormModalProps> = ({
// ✅ 使用 useMemo 缓存预填充数据,避免每次渲染都创建新对象
const prefillData = React.useMemo(() => {
return {
// Jenkins 配置
jenkins: {
// 构建类型
buildType: app.buildType || 'JENKINS',
// Jenkins 配置(仅当 buildType 为 JENKINS 时需要)
jenkins: app.buildType === 'JENKINS' ? {
serverId: app.deploySystemId?.toString() || '',
jobName: app.deployJob || '',
branch: app.branch || 'master',
},
} : undefined,
// 团队信息
teamId: teamId?.toString() || '',
// 应用信息

View File

@ -38,12 +38,15 @@ export interface DeployRecord {
duration?: number; // 持续时间(毫秒)
}
export type BuildType = 'JENKINS' | 'NATIVE';
export interface ApplicationConfig {
teamApplicationId: number;
applicationId: number;
applicationCode: string;
applicationName: string;
applicationDesc?: string;
buildType?: BuildType; // 构建类型
branch: string;
deployBranch?: string; // 🆕 部署分支
deploySystemId?: number;