fix: 解决链路图切换时间后接口无数据,界面仍保留之前数据的问题
(cherry picked from commit 82bd184bdd)
This commit is contained in:
@@ -73,11 +73,9 @@ export default {
|
|||||||
}
|
}
|
||||||
return a.egressLinkId - b.egressLinkId
|
return a.egressLinkId - b.egressLinkId
|
||||||
})
|
})
|
||||||
this.isLinkNoData = linkData.length === 0
|
|
||||||
if (this.isLinkNoData) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
|
this.isLinkNoData = linkData.length === 0
|
||||||
|
if (!this.isLinkNoData) {
|
||||||
// 链路流量数据
|
// 链路流量数据
|
||||||
const linkGridData = []
|
const linkGridData = []
|
||||||
linkData.forEach(d => {
|
linkData.forEach(d => {
|
||||||
@@ -130,6 +128,7 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
this.linkGridData = linkGridData
|
this.linkGridData = linkGridData
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.isLinkNoData = false
|
this.isLinkNoData = false
|
||||||
this.isLinkShowError = true
|
this.isLinkShowError = true
|
||||||
@@ -150,10 +149,7 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
this.isNextNoData = nextLinkData.length === 0
|
this.isNextNoData = nextLinkData.length === 0
|
||||||
if (this.isNextNoData) {
|
if (!this.isNextNoData) {
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 链路下一跳数据
|
// 链路下一跳数据
|
||||||
const nextGridData = []
|
const nextGridData = []
|
||||||
|
|
||||||
@@ -222,8 +218,9 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
this.nextGridData = nextGridData
|
this.nextGridData = nextGridData
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.isLinkNoData = false
|
this.isNextNoData = true
|
||||||
this.isNextShowError = true
|
this.isNextShowError = true
|
||||||
// todo 此时返回的是msg,后期记得改为message
|
// todo 此时返回的是msg,后期记得改为message
|
||||||
this.nextErrorMsg = res[1].msg
|
this.nextErrorMsg = res[1].msg
|
||||||
|
|||||||
Reference in New Issue
Block a user