Commit 86b601a4d525460e76af62dfb3a4e9bc2406dd4e
1 parent
95ed690a
线路-站点路由 查询内容预加载
Showing
5 changed files
with
25 additions
and
10 deletions
src/main/java/com/bsth/repository/LsStationRouteRepository.java
| ... | ... | @@ -244,12 +244,14 @@ public interface LsStationRouteRepository extends BaseRepository<LsStationRoute, |
| 244 | 244 | " b.update_by AS stationUpdateBy," + |
| 245 | 245 | " b.update_date AS stationUpdateDate," + |
| 246 | 246 | " a.stationRouteId,b.station_name as zdmc, " + |
| 247 | - " a.industryCode "+ | |
| 247 | + " a.industryCode, "+ | |
| 248 | + " a.stationNameEn "+ | |
| 248 | 249 | " FROM " + |
| 249 | 250 | "( SELECT s.id AS stationRouteId," + |
| 250 | 251 | " s.line AS stationRouteLine," + |
| 251 | 252 | " s.station as stationRouteStation," + |
| 252 | 253 | " s.station_name AS stationRouteName," + |
| 254 | + " s.station_name_en AS stationNameEn," + | |
| 253 | 255 | " s.station_route_code as stationRouteCode," + |
| 254 | 256 | " s.industry_code as industryCode," + |
| 255 | 257 | " s.line_code AS stationRouteLIneCode," + | ... | ... |
src/main/resources/static/pages/base/stationroute/edit.html
| ... | ... | @@ -312,6 +312,10 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati |
| 312 | 312 | } |
| 313 | 313 | }); |
| 314 | 314 | function initSelect(p){ |
| 315 | + | |
| 316 | + var prevObj = {'id':'请选择...','text':'请选择...'}; | |
| 317 | + var obj = {}; | |
| 318 | + | |
| 315 | 319 | ajaxd.getzdlyInfo(p,function(array) { |
| 316 | 320 | // 定义路段路由长度、渲染拼音检索下拉框格式数据. |
| 317 | 321 | var len_ = array.length,paramsD = new Array(); |
| ... | ... | @@ -324,24 +328,33 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati |
| 324 | 328 | if(g.stationRouteCode != editStationParmasObj.stationRouteCode) { |
| 325 | 329 | // 添加拼音检索下拉框格式数据数组. |
| 326 | 330 | if(editStationParmasObj.stationRouteStationMark=='E' && i == (len_-2)){ |
| 327 | - paramsD.push({'id':g.stationRouteCode + '_' + 'E' + '_' + g.directions, | |
| 328 | - 'text':g.stationName + ' (' + g.stationRouteCode + ')' + ' --' + fun.dirdmToName(g.directions)}); | |
| 331 | + obj = {'id':g.stationRouteCode + '_' + 'E' + '_' + g.directions, | |
| 332 | + 'text':g.stationName + ' (' + g.stationRouteCode + ')' + ' --' + fun.dirdmToName(g.directions)}; | |
| 333 | + paramsD.push(obj); | |
| 329 | 334 | }else { |
| 330 | - paramsD.push({'id':g.stationRouteCode + '_' + g.stationMark + '_' + g.directions, | |
| 331 | - 'text':g.stationName + ' (' + g.stationRouteCode + ')' + ' --' + fun.dirdmToName(g.directions)}); | |
| 335 | + obj = {'id':g.stationRouteCode + '_' + g.stationMark + '_' + g.directions, | |
| 336 | + 'text':g.stationName + ' (' + g.stationRouteCode + ')' + ' --' + fun.dirdmToName(g.directions)}; | |
| 337 | + paramsD.push(obj); | |
| 332 | 338 | } |
| 339 | + }else{ | |
| 340 | + prevObj = obj ; | |
| 333 | 341 | } |
| 334 | 342 | } |
| 335 | 343 | }); |
| 336 | 344 | $('#stationrouteSelect').empty(); |
| 337 | 345 | // 初始化上一个路段拼音检索下拉框. |
| 338 | 346 | initPinYinSelect2($('#stationrouteSelect'),paramsD,function(selector) { |
| 347 | + | |
| 348 | + $('#stationrouteSelect').val(prevObj.id).select2(); | |
| 349 | + | |
| 339 | 350 | setZdlyValue(); |
| 340 | 351 | }); |
| 352 | + | |
| 341 | 353 | } |
| 342 | 354 | }); |
| 343 | 355 | } |
| 344 | 356 | function setZdlyValue() { |
| 357 | + | |
| 345 | 358 | ajaxd.findUpStationRouteCode(editStationParmasObj.stationRouteLine,editStationParmasObj.stationRoutedirections,editStationParmasObj.stationRouteCode,function(str) { |
| 346 | 359 | if(str.length>0){ |
| 347 | 360 | var upStationRouteCode; | ... | ... |
src/main/resources/static/pages/base/stationroute/js/stationroute-ajax-getdata.js
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
| ... | ... | @@ -441,7 +441,7 @@ var PublicFunctions = function () { |
| 441 | 441 | // 弹出是否撤销提示框 |
| 442 | 442 | layer.confirm('你确定要撤销【'+obj[0].text+'】站点吗?', {btn : [ '确定撤销','返回' ],icon: 3, title:'提示' }, function(index){ |
| 443 | 443 | |
| 444 | - debugger; | |
| 444 | + | |
| 445 | 445 | // 站点路由ID |
| 446 | 446 | var stationRouteId = obj[0].original.stationRouteId; |
| 447 | 447 | |
| ... | ... | @@ -509,6 +509,8 @@ var PublicFunctions = function () { |
| 509 | 509 | $('#lineCodeInput').val(editStationParmas.stationRouteLIneCode); |
| 510 | 510 | // 行业标准 |
| 511 | 511 | $('#industryCodeInput').val(editStationParmas.industryCode); |
| 512 | + | |
| 513 | + $('#stationMarkSelect').val(editStationParmas.stationRouteStationMark); | |
| 512 | 514 | // 百度坐标点图形集合 |
| 513 | 515 | $('#bPolygonGridInput').val(editStationParmas.stationBPolygonGrid); |
| 514 | 516 | // 获取站点名称元素设值 |
| ... | ... | @@ -583,7 +585,7 @@ var PublicFunctions = function () { |
| 583 | 585 | /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */ |
| 584 | 586 | linePanlThree : function(lineId,data,direction,version,callback) { |
| 585 | 587 | /** 获取站点路由信息 @param:<Line.id:线路Id;0:上行> @return:<resultdata:站点路由数据> */ |
| 586 | - debugger | |
| 588 | + | |
| 587 | 589 | var polyline_center; |
| 588 | 590 | GetAjaxData.getStationRoutePoint(lineId,direction,version,function(resultdata) { |
| 589 | 591 | WorldsBMap.clearMarkAndOverlays(); |
| ... | ... | @@ -659,7 +661,7 @@ var PublicFunctions = function () { |
| 659 | 661 | }, |
| 660 | 662 | // 地图处于编辑状态 |
| 661 | 663 | editMapStatus : function (dir) { |
| 662 | - debugger | |
| 664 | + | |
| 663 | 665 | WorldsBMap.setMap_status(1); |
| 664 | 666 | // 有方向就显示退出编辑模式按钮 |
| 665 | 667 | if(dir!=null && dir!='null'){ | ... | ... |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-map.js
| ... | ... | @@ -1547,7 +1547,6 @@ window.WorldsBMap = function () { |
| 1547 | 1547 | }, |
| 1548 | 1548 | |
| 1549 | 1549 | drawPolyLine: function (points, data, start, end) { |
| 1550 | - debugger | |
| 1551 | 1550 | let bdPoints = new Array(), i = 0, point, polyline; |
| 1552 | 1551 | for (i = 0;i < points.length;i++) { |
| 1553 | 1552 | point = points[i].split(' '); | ... | ... |