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