diff --git a/frontend/src/models/setting/system/orgAndProject.ts b/frontend/src/models/setting/system/orgAndProject.ts index cf083d3d9e..65b55bc8c2 100644 --- a/frontend/src/models/setting/system/orgAndProject.ts +++ b/frontend/src/models/setting/system/orgAndProject.ts @@ -26,6 +26,7 @@ export interface CreateOrUpdateSystemProjectParams { // 资源池 resourcePoolIds: string[]; // 列表里的 + all: boolean; // 默认全部资源池 } export interface CreateOrUpdateOrgProjectParams { @@ -63,4 +64,5 @@ export interface OrgProjectTableItem { orgAdmins: Record; moduleIds: string[]; resourcePoolList: ResourcePoolItem[]; + all: boolean; } diff --git a/frontend/src/views/setting/organization/project/components/addProjectModal.vue b/frontend/src/views/setting/organization/project/components/addProjectModal.vue index 420acadb40..d6dc304baa 100644 --- a/frontend/src/views/setting/organization/project/components/addProjectModal.vue +++ b/frontend/src/views/setting/organization/project/components/addProjectModal.vue @@ -75,10 +75,27 @@ + + + + {{ t('system.project.allResPool') }} + + {{ t('system.project.specifyResPool') }} + + + ('visible', { diff --git a/frontend/src/views/setting/organization/project/locale/en-US.ts b/frontend/src/views/setting/organization/project/locale/en-US.ts index c6192ec866..b4a2aeaea9 100644 --- a/frontend/src/views/setting/organization/project/locale/en-US.ts +++ b/frontend/src/views/setting/organization/project/locale/en-US.ts @@ -80,4 +80,6 @@ export default { 'system.project.removeName': 'Confirm remove the {name}', 'system.project.descriptionPlaceholder': 'Please describe the project.', 'system.project.enterProject': 'Enter project', + 'system.project.allResPool': 'All resource pool', + 'system.project.specifyResPool': 'Specify resource pool', }; diff --git a/frontend/src/views/setting/organization/project/locale/zh-CN.ts b/frontend/src/views/setting/organization/project/locale/zh-CN.ts index 2e328b8a94..90206b4e70 100644 --- a/frontend/src/views/setting/organization/project/locale/zh-CN.ts +++ b/frontend/src/views/setting/organization/project/locale/zh-CN.ts @@ -73,4 +73,6 @@ export default { 'system.project.removeName': '确认移除 {name} 这个用户吗?', 'system.project.descriptionPlaceholder': '请对该项目进行描述', 'system.project.enterProject': '进入项目', + 'system.project.allResPool': '全部资源池', + 'system.project.specifyResPool': '指定资源池', }; diff --git a/frontend/src/views/setting/organization/project/orgProject.vue b/frontend/src/views/setting/organization/project/orgProject.vue index 53fc8b8a16..1e74b39607 100644 --- a/frontend/src/views/setting/organization/project/orgProject.vue +++ b/frontend/src/views/setting/organization/project/orgProject.vue @@ -315,7 +315,7 @@ } const showAddProjectModal = (record: OrgProjectTableItem) => { - const { id, name, description, enable, adminList, organizationId, moduleIds, resourcePoolList } = record; + const { id, name, description, enable, adminList, organizationId, moduleIds, resourcePoolList, all } = record; currentUpdateProject.value = { id, name, @@ -325,6 +325,7 @@ organizationId, moduleIds, resourcePoolIds: resourcePoolList.map((item: { id: string }) => item.id), + all, }; addProjectVisible.value = true; }; diff --git a/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue b/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue index 38e5925d5e..f666f5d9ff 100644 --- a/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue +++ b/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue @@ -73,10 +73,27 @@ + + + + {{ t('system.project.allResPool') }} + + {{ t('system.project.specifyResPool') }} + + + ('visible', { diff --git a/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue b/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue index 574009d576..542d043fb6 100644 --- a/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue +++ b/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue @@ -265,7 +265,7 @@ } const showAddProjectModal = (record: OrgProjectTableItem) => { - const { id, name, description, enable, adminList, organizationId, moduleIds, resourcePoolList } = record; + const { id, name, description, enable, adminList, organizationId, moduleIds, resourcePoolList, all } = record; addProjectVisible.value = true; currentUpdateProject.value = { id, @@ -276,6 +276,7 @@ organizationId, moduleIds, resourcePoolIds: resourcePoolList.map((item: { id: string }) => item.id), + all, }; };