mirror of
https://github.com/veops/cmdb.git
synced 2025-08-25 20:09:00 +08:00
feat(ui): attribute association - many-to-many cannot all be multi-value
This commit is contained in:
@@ -230,6 +230,7 @@ const cmdb_en = {
|
|||||||
attributeAssociationTip6: 'Cannot be deleted again.',
|
attributeAssociationTip6: 'Cannot be deleted again.',
|
||||||
attributeAssociationTip7: '1. The attribute value types of the source model and target model must be consistent.',
|
attributeAssociationTip7: '1. The attribute value types of the source model and target model must be consistent.',
|
||||||
attributeAssociationTip8: '2. One To Many: Source model can select multiple value attributes',
|
attributeAssociationTip8: '2. One To Many: Source model can select multiple value attributes',
|
||||||
|
attributeAssociationTip9: '3. Many To Many: Either the source model or the target model can be a multi-valued attribute.',
|
||||||
show: 'show attribute',
|
show: 'show attribute',
|
||||||
setAsShow: 'Set as show attribute',
|
setAsShow: 'Set as show attribute',
|
||||||
cancelSetAsShow: 'Cancel show attribute',
|
cancelSetAsShow: 'Cancel show attribute',
|
||||||
|
@@ -230,6 +230,7 @@ const cmdb_zh = {
|
|||||||
attributeAssociationTip6: '不可再删除',
|
attributeAssociationTip6: '不可再删除',
|
||||||
attributeAssociationTip7: '1. 源模型和目标模型的属性值类型必须保持一致',
|
attributeAssociationTip7: '1. 源模型和目标模型的属性值类型必须保持一致',
|
||||||
attributeAssociationTip8: '2. 一对多:源模型可选多值属性',
|
attributeAssociationTip8: '2. 一对多:源模型可选多值属性',
|
||||||
|
attributeAssociationTip9: '3. 多对多:源模型和目标模型其中任何一个可为多值属性',
|
||||||
show: '展示属性',
|
show: '展示属性',
|
||||||
setAsShow: '设置为展示属性',
|
setAsShow: '设置为展示属性',
|
||||||
cancelSetAsShow: '取消设置为展示属性',
|
cancelSetAsShow: '取消设置为展示属性',
|
||||||
|
@@ -55,6 +55,7 @@
|
|||||||
<div>{{ $t('cmdb.ciType.attributeAssociationTip1') }}</div>
|
<div>{{ $t('cmdb.ciType.attributeAssociationTip1') }}</div>
|
||||||
<div>{{ $t('cmdb.ciType.attributeAssociationTip7') }}</div>
|
<div>{{ $t('cmdb.ciType.attributeAssociationTip7') }}</div>
|
||||||
<div>{{ $t('cmdb.ciType.attributeAssociationTip8') }}</div>
|
<div>{{ $t('cmdb.ciType.attributeAssociationTip8') }}</div>
|
||||||
|
<div>{{ $t('cmdb.ciType.attributeAssociationTip9') }}</div>
|
||||||
</template>
|
</template>
|
||||||
<a><a-icon type="question-circle"/></a>
|
<a><a-icon type="question-circle"/></a>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
@@ -228,6 +229,7 @@
|
|||||||
<template #extra>
|
<template #extra>
|
||||||
<div>{{ $t('cmdb.ciType.attributeAssociationTip7') }}</div>
|
<div>{{ $t('cmdb.ciType.attributeAssociationTip7') }}</div>
|
||||||
<div>{{ $t('cmdb.ciType.attributeAssociationTip8') }}</div>
|
<div>{{ $t('cmdb.ciType.attributeAssociationTip8') }}</div>
|
||||||
|
<div>{{ $t('cmdb.ciType.attributeAssociationTip9') }}</div>
|
||||||
</template>
|
</template>
|
||||||
<a-row
|
<a-row
|
||||||
v-for="item in modalAttrList"
|
v-for="item in modalAttrList"
|
||||||
@@ -652,7 +654,8 @@ export default {
|
|||||||
const constraintValue = Number(constraint ?? this.form.getFieldValue('constraint'))
|
const constraintValue = Number(constraint ?? this.form.getFieldValue('constraint'))
|
||||||
if (
|
if (
|
||||||
(constraintValue === 0 && type === 'child') ||
|
(constraintValue === 0 && type === 'child') ||
|
||||||
constraintValue === 1
|
constraintValue === 1 ||
|
||||||
|
(constraintValue === 2 && relationAttr?.is_list)
|
||||||
) {
|
) {
|
||||||
return filterAttrs.filter((attr) => !attr.is_list)
|
return filterAttrs.filter((attr) => !attr.is_list)
|
||||||
}
|
}
|
||||||
|
@@ -67,6 +67,7 @@
|
|||||||
<template #extra>
|
<template #extra>
|
||||||
<div>{{ $t('cmdb.ciType.attributeAssociationTip7') }}</div>
|
<div>{{ $t('cmdb.ciType.attributeAssociationTip7') }}</div>
|
||||||
<div>{{ $t('cmdb.ciType.attributeAssociationTip8') }}</div>
|
<div>{{ $t('cmdb.ciType.attributeAssociationTip8') }}</div>
|
||||||
|
<div>{{ $t('cmdb.ciType.attributeAssociationTip9') }}</div>
|
||||||
</template>
|
</template>
|
||||||
<a-row
|
<a-row
|
||||||
v-for="item in modalAttrList"
|
v-for="item in modalAttrList"
|
||||||
@@ -387,7 +388,8 @@ export default {
|
|||||||
const constraintValue = Number(this.form.getFieldValue('constraint'))
|
const constraintValue = Number(this.form.getFieldValue('constraint'))
|
||||||
if (
|
if (
|
||||||
(constraintValue === 0 && type === 'child') ||
|
(constraintValue === 0 && type === 'child') ||
|
||||||
constraintValue === 1
|
constraintValue === 1 ||
|
||||||
|
(constraintValue === 2 && relationAttr?.is_list)
|
||||||
) {
|
) {
|
||||||
return filterAttrs.filter((attr) => !attr.is_list)
|
return filterAttrs.filter((attr) => !attr.is_list)
|
||||||
}
|
}
|
||||||
|
@@ -43,6 +43,7 @@
|
|||||||
<div>{{ $t('cmdb.ciType.attributeAssociationTip1') }}</div>
|
<div>{{ $t('cmdb.ciType.attributeAssociationTip1') }}</div>
|
||||||
<div>{{ $t('cmdb.ciType.attributeAssociationTip7') }}</div>
|
<div>{{ $t('cmdb.ciType.attributeAssociationTip7') }}</div>
|
||||||
<div>{{ $t('cmdb.ciType.attributeAssociationTip8') }}</div>
|
<div>{{ $t('cmdb.ciType.attributeAssociationTip8') }}</div>
|
||||||
|
<div>{{ $t('cmdb.ciType.attributeAssociationTip9') }}</div>
|
||||||
</template>
|
</template>
|
||||||
<a><a-icon type="question-circle"/></a>
|
<a><a-icon type="question-circle"/></a>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
@@ -327,7 +328,8 @@ export default {
|
|||||||
const constraintValue = Number(constraint)
|
const constraintValue = Number(constraint)
|
||||||
if (
|
if (
|
||||||
(constraintValue === 0 && type === 'child') ||
|
(constraintValue === 0 && type === 'child') ||
|
||||||
constraintValue === 1
|
constraintValue === 1 ||
|
||||||
|
(constraintValue === 2 && relationAttr?.is_list)
|
||||||
) {
|
) {
|
||||||
return filterAttrs.filter((attr) => !attr.is_list)
|
return filterAttrs.filter((attr) => !attr.is_list)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user