feat(系统&组织): 系统组织创建项目增加资源池默认选择全部资源池未联调
This commit is contained in:
parent
05f9e3af17
commit
b0e90384a0
|
@ -26,6 +26,7 @@ export interface CreateOrUpdateSystemProjectParams {
|
|||
// 资源池
|
||||
resourcePoolIds: string[];
|
||||
// 列表里的
|
||||
all: boolean; // 默认全部资源池
|
||||
}
|
||||
|
||||
export interface CreateOrUpdateOrgProjectParams {
|
||||
|
@ -63,4 +64,5 @@ export interface OrgProjectTableItem {
|
|||
orgAdmins: Record<string, any>;
|
||||
moduleIds: string[];
|
||||
resourcePoolList: ResourcePoolItem[];
|
||||
all: boolean;
|
||||
}
|
||||
|
|
|
@ -75,10 +75,27 @@
|
|||
</a-form-item>
|
||||
<a-form-item
|
||||
v-if="showPool"
|
||||
field="resourcePoolIds"
|
||||
field="all"
|
||||
class="!mb-0"
|
||||
:label="t('system.project.resourcePool')"
|
||||
asterisk-position="end"
|
||||
:rules="[{ required: showPool, message: t('system.project.poolIsNotNull') }]"
|
||||
>
|
||||
<!-- TOTO 等待联调 -->
|
||||
<a-radio-group v-model="form.all" class="mb-[16px]">
|
||||
<a-radio :value="true">
|
||||
{{ t('system.project.allResPool') }}
|
||||
</a-radio>
|
||||
<a-radio :value="false">{{ t('system.project.specifyResPool') }}</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-if="!form.all"
|
||||
field="resourcePoolIds"
|
||||
hide-asterisk
|
||||
hide-label
|
||||
asterisk-position="end"
|
||||
:rules="[{ required: showPool, message: t('system.project.poolIsNotNull') }]"
|
||||
>
|
||||
<MsSystemPool
|
||||
v-model:modelValue="form.resourcePoolIds"
|
||||
|
@ -199,6 +216,7 @@
|
|||
resourcePoolIds: [],
|
||||
enable: true,
|
||||
moduleIds: allModuleIds,
|
||||
all: true,
|
||||
});
|
||||
|
||||
const currentVisible = defineModel<boolean>('visible', {
|
||||
|
|
|
@ -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',
|
||||
};
|
||||
|
|
|
@ -73,4 +73,6 @@ export default {
|
|||
'system.project.removeName': '确认移除 {name} 这个用户吗?',
|
||||
'system.project.descriptionPlaceholder': '请对该项目进行描述',
|
||||
'system.project.enterProject': '进入项目',
|
||||
'system.project.allResPool': '全部资源池',
|
||||
'system.project.specifyResPool': '指定资源池',
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -73,10 +73,27 @@
|
|||
</a-form-item>
|
||||
<a-form-item
|
||||
v-if="showPool"
|
||||
field="resourcePoolIds"
|
||||
field="all"
|
||||
asterisk-position="end"
|
||||
:label="t('system.project.resourcePool')"
|
||||
:rules="[{ required: showPool, message: t('system.project.poolIsNotNull') }]"
|
||||
class="!mb-0"
|
||||
>
|
||||
<!-- TOTO 等待联调 -->
|
||||
<a-radio-group v-model="form.all" class="mb-[16px]">
|
||||
<a-radio :value="true">
|
||||
{{ t('system.project.allResPool') }}
|
||||
</a-radio>
|
||||
<a-radio :value="false">{{ t('system.project.specifyResPool') }}</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-if="!form.all"
|
||||
field="resourcePoolIds"
|
||||
hide-asterisk
|
||||
hide-label
|
||||
asterisk-position="end"
|
||||
:rules="[{ required: showPool, message: t('system.project.poolIsNotNull') }]"
|
||||
>
|
||||
<MsSystemPool
|
||||
v-model:modelValue="form.resourcePoolIds"
|
||||
|
@ -196,6 +213,7 @@
|
|||
enable: true,
|
||||
moduleIds: allModuleIds,
|
||||
resourcePoolIds: [],
|
||||
all: true,
|
||||
});
|
||||
|
||||
const currentVisible = defineModel<boolean>('visible', {
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue