fix: 实体详情底部tab的数值添加接口报错时置0处理

This commit is contained in:
刘洪洪
2023-07-14 18:43:52 +08:00
parent 95dc133dac
commit f486c53945
5 changed files with 14 additions and 0 deletions

View File

@@ -165,6 +165,8 @@ export default {
this.errorMsg2 = this.errorMsgHandler(res1)
}
this.$emit('checkTag', entityDetailTabsName.relatedEntity, res0.data.result.length + res1.data.result.length)
} else {
this.$emit('checkTag', entityDetailTabsName.relatedEntity, 0)
}
// ip相关显示appdomain
@@ -184,6 +186,8 @@ export default {
this.errorMsg2 = this.errorMsgHandler(res1)
}
this.$emit('checkTag', entityDetailTabsName.relatedEntity, res0.data.result.length + res1.data.result.length)
} else {
this.$emit('checkTag', entityDetailTabsName.relatedEntity, 0)
}
// domain相关显示appipdomain
@@ -217,9 +221,12 @@ export default {
this.errorMsg2 = this.errorMsgHandler(res2)
}
this.$emit('checkTag', entityDetailTabsName.relatedEntity, res0.data.result.length + res1.data.result.length + res2.data.result.length)
} else {
this.$emit('checkTag', entityDetailTabsName.relatedEntity, 0)
}
}).catch(e => {
console.log(e)
this.$emit('checkTag', entityDetailTabsName.relatedEntity, 0)
this.showError0 = true
this.showError1 = true
this.showError2 = true

View File

@@ -138,15 +138,19 @@ export default {
})
})
this.$emit('checkTag', entityDetailTabsName.informationAggregation, this.informationAggregationList.length)
} else {
this.$emit('checkTag', entityDetailTabsName.informationAggregation, 0)
}
} else {
this.showError = true
this.errorMsg = this.errorMsgHandler(res)
this.$emit('checkTag', entityDetailTabsName.informationAggregation, 0)
}
}).catch(e => {
console.error(e)
this.showError = true
this.errorMsg = this.errorMsgHandler(e)
this.$emit('checkTag', entityDetailTabsName.informationAggregation, 0)
}).finally(() => {
if (this.informationAggregationList.length > 0) {
this.isNoData = false

View File

@@ -78,6 +78,7 @@ export default {
})
},
httpError (e) {
this.$emit('checkTag', entityDetailTabsName.openPort, 0)
this.isNoData = false
this.showError = true
this.errorMsg = this.errorMsgHandler(e)

View File

@@ -122,6 +122,7 @@ export default {
this.isNoData = false
this.showError = true
this.errorMsg = this.errorMsgHandler(e)
this.$emit('checkTag', entityDetailTabsName.performanceEvent, 0)
}
}
}

View File

@@ -144,6 +144,7 @@ export default {
})
},
httpError (e) {
this.$emit('checkTag', entityDetailTabsName.securityEvent, 0)
this.isNoData = false
this.showError = true
this.errorMsg = this.errorMsgHandler(e)