he wei
2025-05-14 90f6e71942aebdc6050a63d9d21af64bc704608f
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",