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