fix: 修复linkMonitor下一跳网格图排序错乱问题

This commit is contained in:
刘洪洪
2023-02-23 10:53:12 +08:00
parent e009142e7d
commit 4d6c444b25

View File

@@ -143,12 +143,12 @@ export default {
// 链路下一跳信息 // 链路下一跳信息
const nextLinkData = res[1].data.result const nextLinkData = res[1].data.result
// 接口数据乱序,根据方向排序,再根据同个方向下的进行排序 // 接口数据乱序,根据方向排序,再根据同个方向下的出方向进行排序
nextLinkData.sort((a, b) => { nextLinkData.sort((a, b) => {
if (a.ingressLinkDirection !== b.ingressLinkDirection) { if (a.ingressLinkDirection !== b.ingressLinkDirection) {
return a.ingressLinkDirection.localeCompare(b.ingressLinkDirection) return a.ingressLinkDirection.localeCompare(b.ingressLinkDirection, 'zh')
} }
return a.egressLinkDirection.localeCompare(b.egressLinkDirection) return a.egressLinkDirection.localeCompare(b.egressLinkDirection, 'zh')
}) })
this.isNextNoData = nextLinkData.length === 0 this.isNextNoData = nextLinkData.length === 0