mirror of https://github.com/veops/cmdb.git
fix: ci topo expand error
This commit is contained in:
parent
104d163db8
commit
5033c539de
|
@ -269,7 +269,7 @@ export default {
|
||||||
return { nodes, edges }
|
return { nodes, edges }
|
||||||
},
|
},
|
||||||
exsited_ci() {
|
exsited_ci() {
|
||||||
const _exsited_ci = [this.typeId]
|
const _exsited_ci = [this.ciId]
|
||||||
this.parentCITypes.forEach((parent) => {
|
this.parentCITypes.forEach((parent) => {
|
||||||
if (this.firstCIs[parent.name]) {
|
if (this.firstCIs[parent.name]) {
|
||||||
this.firstCIs[parent.name].forEach((parentCi) => {
|
this.firstCIs[parent.name].forEach((parentCi) => {
|
||||||
|
|
|
@ -100,6 +100,7 @@ export default {
|
||||||
const r = res.result[i]
|
const r = res.result[i]
|
||||||
if (!this.exsited_ci.includes(r._id)) {
|
if (!this.exsited_ci.includes(r._id)) {
|
||||||
const _findCiType = ci_types_list.find((item) => item.id === r._type)
|
const _findCiType = ci_types_list.find((item) => item.id === r._type)
|
||||||
|
if (_findCiType) {
|
||||||
const { attributes } = await getCITypeAttributesById(_findCiType.id)
|
const { attributes } = await getCITypeAttributesById(_findCiType.id)
|
||||||
const unique_id = _findCiType.show_id || _findCiType.unique_id
|
const unique_id = _findCiType.show_id || _findCiType.unique_id
|
||||||
const _findUnique = attributes.find((attr) => attr.id === unique_id)
|
const _findUnique = attributes.find((attr) => attr.id === unique_id)
|
||||||
|
@ -130,6 +131,7 @@ export default {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
newEdges.push({
|
newEdges.push({
|
||||||
id: `${r._id}`,
|
id: `${r._id}`,
|
||||||
source: 'right',
|
source: 'right',
|
||||||
|
|
Loading…
Reference in New Issue