fix: 修复link下钻带宽不显示问题

This commit is contained in:
chenjinsong
2022-10-13 20:06:54 +08:00
parent c9ae7a4998
commit ffce3f8609
2 changed files with 6 additions and 7 deletions

View File

@@ -94,9 +94,9 @@ export default {
const condition = this.queryCondition.toLowerCase().split(' or ') const condition = this.queryCondition.toLowerCase().split(' or ')
if (condition.length > 1) { if (condition.length > 1) {
if (n == 0) { if (n == 0) {
params.q = condition.find(c => c.indexOf('common_ingress_link_id') > -1) params.q = condition.find(c => c.indexOf('common_ingress_link_id') > -1 || c.indexOf('ingress_link_direction') > -1)
} else { } else {
params.q = condition.find(c => c.indexOf('common_egress_link_id') > -1) params.q = condition.find(c => c.indexOf('common_egress_link_id') > -1 || c.indexOf('egress_link_direction') > -1)
} }
} }
if (n == 0) { if (n == 0) {

View File

@@ -103,19 +103,18 @@ export default {
const condition1 = condition[1].split('=') const condition1 = condition[1].split('=')
let ingressLinkId = null let ingressLinkId = null
let egressLinkId = null let egressLinkId = null
if (condition0[0] && condition0[0].trim() === 'common_egress_link_id') { if (condition0[0] && (condition0[0].trim() === 'common_egress_link_id' || condition0[0].trim() === 'egress_link_direction')) {
egressLinkId = condition0[1].trim() egressLinkId = condition0[1].trim()
} }
if (condition0[0] && condition0[0].trim() === 'common_ingress_link_id') { if (condition0[0] && (condition0[0].trim() === 'common_ingress_link_id' || condition0[0].trim() === 'ingress_link_direction')) {
ingressLinkId = condition0[1].trim() ingressLinkId = condition0[1].trim()
} }
if (condition1[0] && condition1[0].trim() === 'common_egress_link_id') { if (condition1[0] && (condition1[0].trim() === 'common_egress_link_id' || condition1[0].trim() === 'egress_link_direction')) {
egressLinkId = condition1[1].trim() egressLinkId = condition1[1].trim()
} }
if (condition1[0] && condition1[0].trim() === 'common_ingress_link_id') { if (condition1[0] && (condition1[0].trim() === 'common_ingress_link_id' || condition1[0].trim() === 'ingress_link_direction')) {
ingressLinkId = condition1[1].trim() ingressLinkId = condition1[1].trim()
} }
console.info(condition0, condition1, ingressLinkId, egressLinkId)
this.cnLinkInfo.forEach(e => { this.cnLinkInfo.forEach(e => {
if (ingressLinkId === e.originalLinkId) { if (ingressLinkId === e.originalLinkId) {
bandwidthAll += e.bandwidth bandwidthAll += e.bandwidth