diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/index.vue index 8f02ba4c..7da2a2bf 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/index.vue @@ -301,14 +301,27 @@ export default { }, methods: { getLabelName(index) { - if (this.upsList.length <= 2) { + const length = this.upsList.length; + if (length <= 2) { // 如果 upsList 长度 ≤ 2,全部显示为 UPS 格式 return `UPS${index + 1}`; - } else { + } else if(length == 3){ // 如果 upsList 长度 > 2,前两个显示为 UPS,后续显示为分中心 return index < 2 ? `UPS${index + 1}` - : `分中心${index - 1}`; + : `局端机`; + }else if(length === 4){ + return index < 2 + ? `UPS${index + 1}` + : `局端机${index - 1}`; + }else if(length === 5){ + if (index < 2) { + return `UPS${index + 1}`; + } else if (index < 4) { + return `分中心${index - 1}`; + } else { + return `局端机`; + } } }, bindNearLoad(e) {