| | |
| | | L 1100,850 |
| | | C 1100,850 1200,850 1200,750 |
| | | " |
| | | style="fill:none; stroke:blue; stroke-width:4;" /> |
| | | style="fill:none; stroke:blue; stroke-width:2;" /> |
| | | </svg> |
| | | <!-- <div v-for="station in tableDataDev" class="station" :style="{ top: station.valueY + 'px', left: station.valueX + 'px' , backgroundColor: station.modeColor}">{{ station.index }}</div>--> |
| | | <div v-for="station in tableDataDev" class="station" :style="{ |
| | |
| | | <!-- Buses --> |
| | | <!-- <div v-for="bus in tableDataRgv" class="bus" :style="{ top: bus.valueY + 'px', left: bus.valueX + 'px' , borderColor: bus.modeColor, backgroundColor: bus.statusColor}">{{ bus.index }}</div>--> |
| | | <div v-for="bus in tableDataRgv" class="bus" :style="{ |
| | | top: convertToCSSPosition(bus.valueX, bus.valueY).y + 'px', |
| | | left: convertToCSSPosition(bus.valueX, bus.valueY).x + 'px', |
| | | top: convertToCSSPositionWithOffset(bus.valueX, bus.valueY).y + 'px', |
| | | left: convertToCSSPositionWithOffset(bus.valueX, bus.valueY).x + 'px', |
| | | borderColor: bus.modeColor, backgroundColor: bus.statusColor}">{{ bus.index }}</div> |
| | | </div> |
| | | |
| | |
| | | height: mapEl.clientHeight |
| | | }; |
| | | }, |
| | | |
| | | convertToCSSPositionWithOffset(svgX, svgY, radius) { |
| | | const basePos = this.convertToCSSPosition(svgX, svgY); |
| | | // 示例:向右偏移半径的距离(可根据需求调整偏移方向) |
| | | return { |
| | | x: basePos.x -14, |
| | | y: basePos.y -14 |
| | | }; |
| | | }, |
| | | // 更新body尺寸 |
| | | updateBodySize() { |
| | | this.bodySize = getBodySize(); |