From 90f6e71942aebdc6050a63d9d21af64bc704608f Mon Sep 17 00:00:00 2001
From: he wei <858544502@qq.com>
Date: 星期三, 14 五月 2025 10:17:12 +0800
Subject: [PATCH] U 苏州地铁首页相关修改

---
 src/views/home/components/SubwayView.vue |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/views/home/components/SubwayView.vue b/src/views/home/components/SubwayView.vue
index 0c7ee50..afdd588 100644
--- a/src/views/home/components/SubwayView.vue
+++ b/src/views/home/components/SubwayView.vue
@@ -93,8 +93,8 @@
         lines: [],
       };
       for (let i = 0; i < subwayList.length; i++) {
-        const { cl, st, ln } = subwayList[i];
-        let lineNum = ln.replace('鍙风嚎', '');
+        const { cl, st, ln, x } = subwayList[i];
+        let lineNum = x;
         for (let k = 0; k < st.length; k++) {
           const { n, p, lg } = st[k];
           const point = p.split(" ");
@@ -122,7 +122,7 @@
             } else {
               p = position[lg];
             }
-            let stations = statusList[lineNum].filter(v => v.stationName8 == k + 1);
+            let stations = statusList[lineNum].filter(v => v.stationName8 == n);
 
             let status = stations.length ? stations[0].note == 1 : false;
             list.nodes.push({
@@ -143,6 +143,7 @@
               lineStyle: {
                 normal: {
                   color: "#" + cl,
+                  width: 3,
                 },
               },
             });
@@ -161,6 +162,8 @@
     },
     async updateMap() {
       let metroData = await this.getSubwayJson();
+      const { l } = this.jsonData;
+      
       const option = {
         xAxis: {
           show: false,
@@ -180,7 +183,7 @@
             data: this.lineList,
             textStyle: {
               color: '#fff'
-            }
+            },
           }
         ],
         series: [
@@ -191,7 +194,7 @@
             labelLayout: {
               hideOverlap: true,
             },
-            categories: this.lineList.map(v=>({name: v})),
+            categories: this.lineList.map(v=>({name: v, itemStyle: {color: '#' + l.filter(item => item.ln == v)[0].cl}})),
             data: metroData.nodes.map((node) => ({
               name: node.name,
               symbol: "circle",

--
Gitblit v1.9.1