From ca23b12fa8577de29fb6bec1d4c4bd5702cc51a4 Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Tue, 27 May 2025 09:36:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=80=E7=AB=AF=E6=9C=BA=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dialogs/RoadNetworkFacilities/index.vue | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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) {