Merge branch 'cherry-pick-2c703306' into 'dev-24.04'
fix: 修复双向链路配置下,链路下钻后id不对的问题 See merge request cyber-narrator/cn-ui!81
This commit is contained in:
@@ -122,7 +122,7 @@ export default {
|
||||
watch: {
|
||||
timeFilter: {
|
||||
handler () {
|
||||
if (this.$route.path === '/panel/networkAppPerformance') {
|
||||
if (this.$route.path === '/panel/networkAppPerformance' || this.$route.path === '/panel/linkMonitor') {
|
||||
this.$store.commit('resetScoreBase')
|
||||
this.queryScoreBase()
|
||||
if (this.lineQueryCondition || this.networkOverviewBeforeTab) {
|
||||
@@ -227,7 +227,7 @@ export default {
|
||||
this.scoreCalculation()
|
||||
}
|
||||
}
|
||||
if (this.$route.path === '/panel/networkAppPerformance') {
|
||||
if (this.$route.path === '/panel/networkAppPerformance' || this.$route.path === '/panel/linkMonitor') {
|
||||
this.$store.commit('resetScoreBase')
|
||||
this.queryScoreBase()
|
||||
}
|
||||
|
||||
@@ -237,12 +237,26 @@ export default {
|
||||
}
|
||||
})
|
||||
this.linkNoData = data.length === 0
|
||||
data.forEach(item => {
|
||||
item.totalBitsRate = item.outBitsRate + item.inBitsRate
|
||||
linkConfig.filter(info => info.interfaceName === item.interfaceName).forEach(info => {
|
||||
item.linkId = info.linkId
|
||||
if (!isTwoWay) {
|
||||
data.forEach(item => {
|
||||
item.totalBitsRate = item.outBitsRate + item.inBitsRate
|
||||
linkConfig.filter(info => info.interfaceName === item.interfaceName).forEach(info => {
|
||||
item.linkId = info.linkId
|
||||
})
|
||||
})
|
||||
})
|
||||
} else {
|
||||
data.forEach(item => {
|
||||
item.totalBitsRate = item.outBitsRate + item.inBitsRate
|
||||
item.isTwoWay = true
|
||||
linkConfig.filter(info => info.interfaceName === item.interfaceName).forEach(info => {
|
||||
if (info.direction === 0) {
|
||||
item.outLinkId = info.linkId
|
||||
} else if (info.direction === 1) {
|
||||
item.inLinkId = info.linkId
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const sorted = data.sort((a, b) => b.totalBitsRate - a.totalBitsRate)
|
||||
const linkColors = colorGradientCalculation(this.gradientColor[0], this.gradientColor[1], sorted.map(s => s.totalBitsRate))
|
||||
@@ -384,7 +398,9 @@ export default {
|
||||
return width
|
||||
},
|
||||
drillLinkId (item) {
|
||||
const queryCondition = `out_link_id = ${item.linkId} or in_link_id = ${item.linkId}`
|
||||
const queryCondition = item.isTwoWay
|
||||
? `out_link_id = ${item.outLinkId} or in_link_id = ${item.inLinkId}`
|
||||
: `out_link_id = ${item.linkId} or in_link_id = ${item.linkId}`
|
||||
beforeRouterPush()
|
||||
this.$router.push({
|
||||
query: {
|
||||
|
||||
Reference in New Issue
Block a user