diff --git a/src/views/pages/cmdb/cientity/cientity-edit.vue b/src/views/pages/cmdb/cientity/cientity-edit.vue index 59140e78fe896bb6304736fbba1c330f2c332a1e..7d639113760800170867d61a2054ee2a89de6e7b 100644 --- a/src/views/pages/cmdb/cientity/cientity-edit.vue +++ b/src/views/pages/cmdb/cientity/cientity-edit.vue @@ -153,6 +153,7 @@ export default { uuid: this.$utils.setUuid(), _relId: relId, //记录来自哪个关系,自动填上配置项 _direction: rel.direction, //记录关系方向 + flagRelId: relId, // 标识关系id,用于ITSM判断是否是关系,关系不需要直接显示在列表中。 ciId: ciId, rootCiId: this.propRootCiId, ciName: ci.name, diff --git a/src/views/pages/cmdb/form/component/formcientitymodify/index.vue b/src/views/pages/cmdb/form/component/formcientitymodify/index.vue index 0caf6fbeb673b25ed15d1f72d7f84ab9ec8941ec..1df3a84f79aba2541e5b1c2b7bd0af71470fcd53 100644 --- a/src/views/pages/cmdb/form/component/formcientitymodify/index.vue +++ b/src/views/pages/cmdb/form/component/formcientitymodify/index.vue @@ -301,7 +301,7 @@ export default { if (index > -1) { this.$set(this.entityList, index, cientity); } else { - // this.entityList.push(cientity); // 编辑配置项时,追加自动采集里的数据,提交时,会额外新增一条数据 + this.entityList.push(cientity); } }); } @@ -482,7 +482,7 @@ export default { if (this.entityList && this.entityList.length > 0) { const returnList = []; this.entityList.forEach(cientity => { - if (cientity.rootCiId === ciId && !cientity._isnew) { + if (cientity.rootCiId === ciId && !cientity._isnew && !cientity.flagRelId) { returnList.push(cientity); } });