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