* 地址转地铁线路
(address, type)
| 72 | * 地址转地铁线路 |
| 73 | */ |
| 74 | addressToLine(address, type) { |
| 75 | let addr = address.split(';'); |
| 76 | let dt = ''; |
| 77 | addr.forEach(elm => { |
| 78 | let color = '#cccccc'; |
| 79 | if (type === typecode[0].id) { |
| 80 | color = this.lineColor(elm) |
| 81 | } else if (type === typecode[1].id) { |
| 82 | color = '#4075cb' |
| 83 | } |
| 84 | let style = 'margin:5px 0;margin-right:5px;padding:0 5px;background:' + color + |
| 85 | ';font-size:12px;color:#fff;border-radius:3px;'; |
| 86 | dt += `<div style=\'${style}\'>${elm}</div>`; |
| 87 | |
| 88 | }); |
| 89 | return `<div style="display:flex;flex-wrap: wrap;">${dt}</div>`; |
| 90 | }, |
| 91 | /** |
| 92 | * 数据处理 |
| 93 | */ |
nothing calls this directly
no outgoing calls
no test coverage detected