Commit 2818a609385413d741121de12f86e440205d1a0e

Authored by 徐烜
1 parent 350ffe9c

其他公交公司用的公交电子站牌页面组件

1、修正解析远端数据的小bug
front-end/h5/src/components/core/plugins/bsth/othergj/linechart/chart/models/eBusStopData.js
... ... @@ -52,7 +52,8 @@ class RouteData {
52 52  
53 53 get lastStationName () {
54 54 let length = this._stationDataList.length
55   - return length > 0 ? this._stationDataList[length - 1] : ''
  55 + // console.log(this._stationDataList)
  56 + return length > 0 ? this._stationDataList[length - 1].name : ''
56 57 }
57 58 }
58 59  
... ...
front-end/h5/src/components/core/plugins/bsth/othergj/linechart/chart/models/eBusStopGpsData.js
... ... @@ -154,19 +154,19 @@ class EBusStopGpsData {
154 154 let currentStopIndex = currentStopIndexList[0] // 当前站点索引(默认取第一个)
155 155 for (let i = currentStopIndex; i >= 0; i--) {
156 156 // 计算离当前站点最近的一班车的报站信息
157   - let info = info['lineRoute'][i]
158   - if (info['laststop'] && info['laststop'] === info['stationCode']) {
  157 + let lineRouteInfo = info['lineRoute'][i]
  158 + if (lineRouteInfo['laststop'] && lineRouteInfo['laststop'] === lineRouteInfo['stationCode']) {
159 159 let stops = currentStopIndex - i // 距离几站
160 160 if (stops >= 2) {
161 161 this._arrivalInfo = stops + "站"
162 162 } else if (stops === 1) {
163   - if (info['state'] === '1') { // 本站前一站进站
  163 + if (lineRouteInfo['state'] === '1') { // 本站前一站进站
164 164 this._arrivalInfo = "1站"
165 165 } else { // 本站前一站出站
166 166 this._arrivalInfo = "即将进站"
167 167 }
168 168 } else {
169   - if (info['state'] === '1') { // 本站进站
  169 + if (lineRouteInfo['state'] === '1') { // 本站进站
170 170 this._arrivalInfo = "即将进站"
171 171 } else { // 本站出站
172 172 this._arrivalInfo = "等待发车"
... ...
front-end/h5/src/components/core/plugins/bsth/othergj/linechart/chart/othergj-eBusStop-line-chart.js
... ... @@ -259,8 +259,7 @@ export default {
259 259 <stop offset="100%" stop-color={this.chart_line_gradient_color_start} />
260 260 </linearGradient>
261 261 </defs>
262   -
263   - <g class="lineInfo"></g>
  262 + s
264 263 <g class="lineRouteGpsInfo" transform={ "translate(" + this.left_part_width + ",0)" }>
265 264 <g class="line-wrap"></g>
266 265 <g class="gps-wrap"></g>
... ... @@ -269,6 +268,7 @@ export default {
269 268 <path d={downLinePathD} style={{ 'fill': this.down_line_s_color }}></path>
270 269 </g>
271 270 </g>
  271 + <g class="lineInfo"></g>
272 272 <g class="emptyInfo"></g>
273 273 </svg>
274 274 {
... ...
front-end/h5/src/components/core/plugins/index.js
... ... @@ -361,7 +361,7 @@ export const pluginsList = [
361 361 {
362 362 i18nTitle: {
363 363 'en-US': 'MhgjEBusStopLineChartList',
364   - 'zh-CN': '电子站牌单线路模拟图2list'
  364 + 'zh-CN': '电子站牌单线路模拟图列表2'
365 365 },
366 366 title: '电子站牌单线路模拟图2list',
367 367 icon: 'list',
... ... @@ -378,14 +378,14 @@ export const pluginsList = [
378 378 title: '电子站牌单线路模拟图3',
379 379 icon: 'list',
380 380 component: OthergjEBusStopLineChart,
381   - visible: true,
  381 + visible: false,
382 382 name: OthergjEBusStopLineChart.name
383 383 },
384 384  
385 385 {
386 386 i18nTitle: {
387 387 'en-US': 'OthergjEBusStopLineChartList',
388   - 'zh-CN': '电子站牌单线路模拟图3list'
  388 + 'zh-CN': '电子站牌单线路模拟图列表3'
389 389 },
390 390 title: '电子站牌单线路模拟图3list',
391 391 icon: 'list',
... ...