| | |
| | | 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(" "); |
| | |
| | | } 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({ |
| | |
| | | lineStyle: { |
| | | normal: { |
| | | color: "#" + cl, |
| | | width: 3, |
| | | }, |
| | | }, |
| | | }); |
| | |
| | | }, |
| | | async updateMap() { |
| | | let metroData = await this.getSubwayJson(); |
| | | const { l } = this.jsonData; |
| | | |
| | | const option = { |
| | | xAxis: { |
| | | show: false, |
| | |
| | | data: this.lineList, |
| | | textStyle: { |
| | | color: '#fff' |
| | | } |
| | | }, |
| | | } |
| | | ], |
| | | series: [ |
| | |
| | | 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", |