mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-05 05:29:29 +08:00
feat(系统&组织): 替换创建项目增加默认资源池字段
This commit is contained in:
parent
ff94d2f49e
commit
1904145444
@ -26,7 +26,7 @@ export interface CreateOrUpdateSystemProjectParams {
|
||||
// 资源池
|
||||
resourcePoolIds: string[];
|
||||
// 列表里的
|
||||
all: boolean; // 默认全部资源池
|
||||
allResourcePool: boolean; // 默认全部资源池
|
||||
}
|
||||
|
||||
export interface CreateOrUpdateOrgProjectParams {
|
||||
@ -64,5 +64,5 @@ export interface OrgProjectTableItem {
|
||||
orgAdmins: Record<string, any>;
|
||||
moduleIds: string[];
|
||||
resourcePoolList: ResourcePoolItem[];
|
||||
all: boolean;
|
||||
allResourcePool: boolean;
|
||||
}
|
||||
|
@ -75,14 +75,14 @@
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-if="showPool"
|
||||
field="all"
|
||||
field="allResourcePool"
|
||||
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-group v-model="form.allResourcePool" class="mb-[16px]">
|
||||
<a-radio :value="true">
|
||||
{{ t('system.project.allResPool') }}
|
||||
</a-radio>
|
||||
@ -90,7 +90,7 @@
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-if="!form.all"
|
||||
v-if="!form.allResourcePool"
|
||||
field="resourcePoolIds"
|
||||
hide-asterisk
|
||||
hide-label
|
||||
@ -216,7 +216,7 @@
|
||||
resourcePoolIds: [],
|
||||
enable: true,
|
||||
moduleIds: allModuleIds,
|
||||
all: true,
|
||||
allResourcePool: true,
|
||||
});
|
||||
|
||||
const currentVisible = defineModel<boolean>('visible', {
|
||||
|
@ -315,7 +315,8 @@
|
||||
}
|
||||
|
||||
const showAddProjectModal = (record: OrgProjectTableItem) => {
|
||||
const { id, name, description, enable, adminList, organizationId, moduleIds, resourcePoolList, all } = record;
|
||||
const { id, name, description, enable, adminList, organizationId, moduleIds, resourcePoolList, allResourcePool } =
|
||||
record;
|
||||
currentUpdateProject.value = {
|
||||
id,
|
||||
name,
|
||||
@ -325,7 +326,7 @@
|
||||
organizationId,
|
||||
moduleIds,
|
||||
resourcePoolIds: resourcePoolList.map((item: { id: string }) => item.id),
|
||||
all,
|
||||
allResourcePool,
|
||||
};
|
||||
addProjectVisible.value = true;
|
||||
};
|
||||
|
@ -73,14 +73,14 @@
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-if="showPool"
|
||||
field="all"
|
||||
field="allResourcePool"
|
||||
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-group v-model="form.allResourcePool" class="mb-[16px]">
|
||||
<a-radio :value="true">
|
||||
{{ t('system.project.allResPool') }}
|
||||
</a-radio>
|
||||
@ -88,7 +88,7 @@
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-if="!form.all"
|
||||
v-if="!form.allResourcePool"
|
||||
field="resourcePoolIds"
|
||||
hide-asterisk
|
||||
hide-label
|
||||
@ -213,7 +213,7 @@
|
||||
enable: true,
|
||||
moduleIds: allModuleIds,
|
||||
resourcePoolIds: [],
|
||||
all: true,
|
||||
allResourcePool: true,
|
||||
});
|
||||
|
||||
const currentVisible = defineModel<boolean>('visible', {
|
||||
|
@ -265,7 +265,8 @@
|
||||
}
|
||||
|
||||
const showAddProjectModal = (record: OrgProjectTableItem) => {
|
||||
const { id, name, description, enable, adminList, organizationId, moduleIds, resourcePoolList, all } = record;
|
||||
const { id, name, description, enable, adminList, organizationId, moduleIds, resourcePoolList, allResourcePool } =
|
||||
record;
|
||||
addProjectVisible.value = true;
|
||||
currentUpdateProject.value = {
|
||||
id,
|
||||
@ -276,7 +277,7 @@
|
||||
organizationId,
|
||||
moduleIds,
|
||||
resourcePoolIds: resourcePoolList.map((item: { id: string }) => item.id),
|
||||
all,
|
||||
allResourcePool,
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user