fix:修改首页topology图不显示的问题
This commit is contained in:
@@ -1710,27 +1710,31 @@ export default {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.imgageLoading = true
|
this.imgageLoading = true
|
||||||
const promiseArr = []
|
this.$get('monitor/project/topo/icon').then((imageAllId) => {
|
||||||
imgidList.forEach((item, index) => {
|
const promiseArr = []
|
||||||
if (item.data.imageId) {
|
imgidList.forEach((item, index) => {
|
||||||
promiseArr.push(this.dealImg(`monitor/project/topo/icon/${item.data.imageId}/1`))
|
if (item.data.imageId && imageAllId.data.list.find(image => item.data.imageId === image.id)) {
|
||||||
} else {
|
promiseArr.push(this.dealImg(`monitor/project/topo/icon/${item.data.imageId}/1`))
|
||||||
promiseArr.push('')
|
} else if (item.data.imageId) {
|
||||||
}
|
promiseArr.push(imgDefault)
|
||||||
})
|
} else {
|
||||||
Promise.all(promiseArr).then(res2 => {
|
promiseArr.push('')
|
||||||
this.iconArray = imgidList.map(item => {
|
|
||||||
return {
|
|
||||||
id: item.data.imageId
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.iconArray.forEach((item, index) => {
|
Promise.all(promiseArr).then((res2) => {
|
||||||
if (item.id) {
|
this.iconArray = imgidList.map(item => {
|
||||||
item.image = res2[index]
|
return {
|
||||||
}
|
id: item.data.imageId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.iconArray.forEach((item, index) => {
|
||||||
|
if (item.id) {
|
||||||
|
item.image = res2[index]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.imgInit = true
|
||||||
|
this.imgageLoading = false
|
||||||
})
|
})
|
||||||
this.imgInit = true
|
|
||||||
this.imgageLoading = false
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1710,27 +1710,31 @@ export default {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.imgageLoading = true
|
this.imgageLoading = true
|
||||||
const promiseArr = []
|
this.$get('monitor/project/topo/icon').then((imageAllId) => {
|
||||||
imgidList.forEach((item, index) => {
|
const promiseArr = []
|
||||||
if (item.data.imageId) {
|
imgidList.forEach((item, index) => {
|
||||||
promiseArr.push(this.dealImg(`monitor/project/topo/icon/${item.data.imageId}/1`))
|
if (item.data.imageId && imageAllId.data.list.find(image => item.data.imageId === image.id)) {
|
||||||
} else {
|
promiseArr.push(this.dealImg(`monitor/project/topo/icon/${item.data.imageId}/1`))
|
||||||
promiseArr.push('')
|
} else if (item.data.imageId) {
|
||||||
}
|
promiseArr.push(imgDefault)
|
||||||
})
|
} else {
|
||||||
Promise.all(promiseArr).then(res2 => {
|
promiseArr.push('')
|
||||||
this.iconArray = imgidList.map(item => {
|
|
||||||
return {
|
|
||||||
id: item.data.imageId
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.iconArray.forEach((item, index) => {
|
Promise.all(promiseArr).then((res2) => {
|
||||||
if (item.id) {
|
this.iconArray = imgidList.map(item => {
|
||||||
item.image = res2[index]
|
return {
|
||||||
}
|
id: item.data.imageId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.iconArray.forEach((item, index) => {
|
||||||
|
if (item.id) {
|
||||||
|
item.image = res2[index]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.imgInit = true
|
||||||
|
this.imgageLoading = false
|
||||||
})
|
})
|
||||||
this.imgInit = true
|
|
||||||
this.imgageLoading = false
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user