Commit 8ae2ad4ee3f21ce175f2c4c9ee98f6bc51c68eff
1 parent
ce4e5383
基础信息功能修订.
Showing
11 changed files
with
161 additions
and
47 deletions
src/main/java/com/bsth/repository/StationRouteRepository.java
| @@ -113,8 +113,8 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | @@ -113,8 +113,8 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | ||
| 113 | /*@Query(value = "SELECT s.b_jwpoints,s.station_name FROM (" + | 113 | /*@Query(value = "SELECT s.b_jwpoints,s.station_name FROM (" + |
| 114 | "SELECT b.station FROM bsth_c_stationroute b where b.line =?1 and b.directions = ?2 and b.destroy=0) r " + | 114 | "SELECT b.station FROM bsth_c_stationroute b where b.line =?1 and b.directions = ?2 and b.destroy=0) r " + |
| 115 | "LEFT JOIN bsth_c_station s on r.station = s.id", nativeQuery=true)*/ | 115 | "LEFT JOIN bsth_c_station s on r.station = s.id", nativeQuery=true)*/ |
| 116 | - @Query(value = "SELECT s.b_jwpoints,s.station_name,r.station_route_code FROM (" + | ||
| 117 | - "SELECT b.station,b.station_route_code FROM bsth_c_stationroute b where b.line =?1 and b.directions = ?2 and b.destroy=0) r " + | 116 | + @Query(value = "SELECT s.b_jwpoints,r.station_name,r.station_route_code FROM (" + |
| 117 | + "SELECT b.station,b.station_route_code,b.station_name FROM bsth_c_stationroute b where b.line =?1 and b.directions = ?2 and b.destroy=0) r " + | ||
| 118 | "LEFT JOIN bsth_c_station s on r.station = s.id order by r.station_route_code asc", nativeQuery=true) | 118 | "LEFT JOIN bsth_c_station s on r.station = s.id order by r.station_route_code asc", nativeQuery=true) |
| 119 | List<Object[]> getSelectStationRouteCenterPoints(Integer lineId,Integer direction); | 119 | List<Object[]> getSelectStationRouteCenterPoints(Integer lineId,Integer direction); |
| 120 | 120 |
src/main/java/com/bsth/service/impl/StationServiceImpl.java
| @@ -248,13 +248,13 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -248,13 +248,13 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 248 | for(int i = 0;i <stationsArray.size();i++) { | 248 | for(int i = 0;i <stationsArray.size();i++) { |
| 249 | // 站点名称 | 249 | // 站点名称 |
| 250 | String stationName = stationsArray.getJSONObject(i).equals("") ? "" : stationsArray.getJSONObject(i).get("name").toString(); | 250 | String stationName = stationsArray.getJSONObject(i).equals("") ? "" : stationsArray.getJSONObject(i).get("name").toString(); |
| 251 | - Double distance = stationsArray.getJSONObject(i).get("distance").equals("") ? 0 : Double.parseDouble(stationsArray.getJSONObject(i).get("distance").toString()); | 251 | + Double distance = stationsArray.getJSONObject(i).get("distance").equals("") ? 0.0d : Double.parseDouble(stationsArray.getJSONObject(i).get("distance").toString()); |
| 252 | // 转成公里 | 252 | // 转成公里 |
| 253 | distance = distance/1000; | 253 | distance = distance/1000; |
| 254 | BigDecimal d = new BigDecimal(distance); | 254 | BigDecimal d = new BigDecimal(distance); |
| 255 | distance = d.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); | 255 | distance = d.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
| 256 | sectionDistance= distance + sectionDistance; | 256 | sectionDistance= distance + sectionDistance; |
| 257 | - Double duration = stationsArray.getJSONObject(i).get("duration").equals("") ? 0 : Double.parseDouble(stationsArray.getJSONObject(i).get("duration").toString()); | 257 | + Double duration = stationsArray.getJSONObject(i).get("duration").equals("") ? 0.0d : Double.parseDouble(stationsArray.getJSONObject(i).get("duration").toString()); |
| 258 | // 转成分钟 | 258 | // 转成分钟 |
| 259 | duration = duration/60; | 259 | duration = duration/60; |
| 260 | BigDecimal t = new BigDecimal(duration); | 260 | BigDecimal t = new BigDecimal(duration); |
| @@ -792,9 +792,9 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -792,9 +792,9 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 792 | Station station = repository.findOne(stationId); | 792 | Station station = repository.findOne(stationId); |
| 793 | StationRoute arg0 = new StationRoute(); | 793 | StationRoute arg0 = new StationRoute(); |
| 794 | // 距离 | 794 | // 距离 |
| 795 | - Double distances = map.get("distances").equals("") ? null : Double.parseDouble(map.get("distances").toString()); | 795 | + Double distances = map.get("distances").equals("") ? 0.0d : Double.parseDouble(map.get("distances").toString()); |
| 796 | // 时间 | 796 | // 时间 |
| 797 | - Double toTime = map.get("toTime").equals("") ? null : Double.parseDouble(map.get("toTime").toString()); | 797 | + Double toTime = map.get("toTime").equals("") ? 0.0d : Double.parseDouble(map.get("toTime").toString()); |
| 798 | // 站点路由名称 | 798 | // 站点路由名称 |
| 799 | String stationName = map.get("stationName").equals("") ? "" : map.get("stationName").toString(); | 799 | String stationName = map.get("stationName").equals("") ? "" : map.get("stationName").toString(); |
| 800 | // 线路ID | 800 | // 线路ID |
| @@ -952,8 +952,8 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -952,8 +952,8 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 952 | stationRouteCode = stationRouteCode == null ? 100 : stationRouteCode; | 952 | stationRouteCode = stationRouteCode == null ? 100 : stationRouteCode; |
| 953 | Integer LineId = map.get("stationRouteLine").equals("") ? null : Integer.parseInt(map.get("stationRouteLine").toString()); | 953 | Integer LineId = map.get("stationRouteLine").equals("") ? null : Integer.parseInt(map.get("stationRouteLine").toString()); |
| 954 | String stationMark = map.get("stationMark").equals("") ? null : map.get("stationMark").toString(); | 954 | String stationMark = map.get("stationMark").equals("") ? null : map.get("stationMark").toString(); |
| 955 | - Double distances = map.get("distances").equals("") ? null : Double.parseDouble(map.get("distances").toString()); | ||
| 956 | - Double toTime = map.get("toTime").equals("") ? null : Double.parseDouble(map.get("toTime").toString()); | 955 | + Double distances = map.get("distances").equals("") ? 0.0d : Double.parseDouble(map.get("distances").toString()); |
| 956 | + Double toTime = map.get("toTime").equals("") ? 0.0d : Double.parseDouble(map.get("toTime").toString()); | ||
| 957 | Integer directions = map.get("directions").equals("") ? null : Integer.parseInt(map.get("directions").toString()); | 957 | Integer directions = map.get("directions").equals("") ? null : Integer.parseInt(map.get("directions").toString()); |
| 958 | Station station = repository.findOne(stationId); | 958 | Station station = repository.findOne(stationId); |
| 959 | Line line = lineRepository.findOne(LineId); | 959 | Line line = lineRepository.findOne(LineId); |
src/main/resources/static/pages/base/section/editsection.html
| 1 | <!-- 编辑路段 --> | 1 | <!-- 编辑路段 --> |
| 2 | -<div class="modal fade" id="edit_section_mobal" tabindex="-1" role="basic" aria-hidden="true"> | 2 | +<div class="modal fade" id="edit_section_mobal" role="basic" aria-hidden="true"> |
| 3 | <div class="modal-dialog"> | 3 | <div class="modal-dialog"> |
| 4 | <div class="modal-content"> | 4 | <div class="modal-content"> |
| 5 | <div class="modal-header"> | 5 | <div class="modal-header"> |
| @@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
| 49 | 上一路段: | 49 | 上一路段: |
| 50 | </label> | 50 | </label> |
| 51 | <div class="col-md-6"> | 51 | <div class="col-md-6"> |
| 52 | - <select name="sectionrouteCode" class="form-control" id="sectionrouteCodeSelect"></select> | 52 | + <select name="sectionrouteCode" class="form-control" id="sectionrouteCodeSelect" style="width:100%"></select> |
| 53 | <span class="help-block">说明:选择的路段将作为本路段序号的参考,成为选择路段的下一个路段。 </span> | 53 | <span class="help-block">说明:选择的路段将作为本路段序号的参考,成为选择路段的下一个路段。 </span> |
| 54 | </div> | 54 | </div> |
| 55 | </div> | 55 | </div> |
| @@ -162,7 +162,7 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | @@ -162,7 +162,7 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | ||
| 162 | var sectionRouteId = Section.sectionRouteId; | 162 | var sectionRouteId = Section.sectionRouteId; |
| 163 | // 获取路段号元素,并添加下拉属性值 | 163 | // 获取路段号元素,并添加下拉属性值 |
| 164 | ajaxd.getStation(lineId,dir,function(treeData) { | 164 | ajaxd.getStation(lineId,dir,function(treeData) { |
| 165 | - var options = '<option value="">请选择...</option>'; | 165 | + /* var options = '<option value="">请选择...</option>'; |
| 166 | var dArray = treeData[0].children[1].children; | 166 | var dArray = treeData[0].children[1].children; |
| 167 | var eq_stationRouteCode = Section.sectionRouteCode; | 167 | var eq_stationRouteCode = Section.sectionRouteCode; |
| 168 | for(var i = 0 ; i<dArray.length; i++){ | 168 | for(var i = 0 ; i<dArray.length; i++){ |
| @@ -181,6 +181,33 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | @@ -181,6 +181,33 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | ||
| 181 | }else { | 181 | }else { |
| 182 | $('#sectionrouteCodeSelect').val(''); | 182 | $('#sectionrouteCodeSelect').val(''); |
| 183 | } | 183 | } |
| 184 | + }); */ | ||
| 185 | + var array = treeData[0].children[1].children,paramsD =new Array(); | ||
| 186 | + var eq_scetionRouteCode = Section.sectionRouteCode; | ||
| 187 | + paramsD.push({'id':'请选择...','text':'请选择...'}); | ||
| 188 | + // 遍历. | ||
| 189 | + $.each(array, function(i, g){ | ||
| 190 | + // 判断. | ||
| 191 | + if(g.sectionName!='' || g.sectionName != null) { | ||
| 192 | + var ptions_v = g.sectionrouteCode; | ||
| 193 | + if(eq_scetionRouteCode != ptions_v){ | ||
| 194 | + // 添加拼音检索下拉框格式数据数组. | ||
| 195 | + paramsD.push({'id':ptions_v, | ||
| 196 | + 'text':g.sectionName + '(' + ptions_v + ')' + ' --' + dirdmToName(g.sectionrouteDirections)}); | ||
| 197 | + } | ||
| 198 | + } | ||
| 199 | + }); | ||
| 200 | + // 初始化上一个路段拼音检索下拉框. | ||
| 201 | + initPinYinSelect2($('#sectionrouteCodeSelect'),paramsD,function(selector) { | ||
| 202 | + $('#sectionDirSelect').val('');// 设值方向. | ||
| 203 | + ajaxd.findUpSectionRouteCode(lineId,dir,eq_scetionRouteCode,function(str) { | ||
| 204 | + if(str.length>0){ | ||
| 205 | + var upStationRouteCode = str[0].sectionrouteCode; | ||
| 206 | + $('#sectionrouteCodeSelect').select2('val',upStationRouteCode); | ||
| 207 | + }else { | ||
| 208 | + $('#sectionrouteCodeSelect').select2('val','请选择...'); | ||
| 209 | + } | ||
| 210 | + }); | ||
| 184 | }); | 211 | }); |
| 185 | }); | 212 | }); |
| 186 | function dirdmToName(value) { | 213 | function dirdmToName(value) { |
| @@ -257,6 +284,8 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | @@ -257,6 +284,8 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | ||
| 257 | // 设置日期 | 284 | // 设置日期 |
| 258 | params.createDate = moment(Section.carParkCreateDate).format(fs); | 285 | params.createDate = moment(Section.carParkCreateDate).format(fs); |
| 259 | error.hide(); | 286 | error.hide(); |
| 287 | + if(params.sectionrouteCode=='请选择...') | ||
| 288 | + params.sectionrouteCode=''; | ||
| 260 | ajaxd.sectionUpdate(params,function(resuntDate) { | 289 | ajaxd.sectionUpdate(params,function(resuntDate) { |
| 261 | if(resuntDate.status=='SUCCESS') { | 290 | if(resuntDate.status=='SUCCESS') { |
| 262 | // 弹出添加成功提示消息 | 291 | // 弹出添加成功提示消息 |
src/main/resources/static/pages/base/station/edit.html
| 1 | <!-- 编辑站点弹出层mobal --> | 1 | <!-- 编辑站点弹出层mobal --> |
| 2 | -<div class="modal fade" id="editPoitsions_station_mobal" tabindex="-1" role="basic" aria-hidden="true"> | 2 | +<div class="modal fade" id="editPoitsions_station_mobal" role="basic" aria-hidden="true"> |
| 3 | <div class="modal-dialog"> | 3 | <div class="modal-dialog"> |
| 4 | <div class="modal-content"> | 4 | <div class="modal-content"> |
| 5 | <!-- 弹出层标题title容器 --> | 5 | <!-- 弹出层标题title容器 --> |
| @@ -209,6 +209,7 @@ | @@ -209,6 +209,7 @@ | ||
| 209 | </div> | 209 | </div> |
| 210 | <script type="text/javascript"> | 210 | <script type="text/javascript"> |
| 211 | $('#editPoitsions_station_mobal').on('editStationMobal_show', function(e, map,fun,stat){ | 211 | $('#editPoitsions_station_mobal').on('editStationMobal_show', function(e, map,fun,stat){ |
| 212 | + layer.closeAll(); | ||
| 212 | // 获取站点对象信息 | 213 | // 获取站点对象信息 |
| 213 | var editStation = stat.getAddStation(); | 214 | var editStation = stat.getAddStation(); |
| 214 | // 初始化表单值 | 215 | // 初始化表单值 |
| @@ -297,7 +298,9 @@ $('#editPoitsions_station_mobal').on('editStationMobal_show', function(e, map,fu | @@ -297,7 +298,9 @@ $('#editPoitsions_station_mobal').on('editStationMobal_show', function(e, map,fu | ||
| 297 | // 站点序号值改变事件 | 298 | // 站点序号值改变事件 |
| 298 | $('#stationrouteSelect').on('change',function() { | 299 | $('#stationrouteSelect').on('change',function() { |
| 299 | var stationRValue = $('#stationrouteSelect').val(); | 300 | var stationRValue = $('#stationrouteSelect').val(); |
| 300 | - if(stationRValue) { | 301 | + if(stationRValue=='请选择...') { |
| 302 | + $('#stationMarkSelect').val('B'); | ||
| 303 | + }else { | ||
| 301 | var tempStr = stationRValue.split('_'); | 304 | var tempStr = stationRValue.split('_'); |
| 302 | if(tempStr[1] == 'E') { | 305 | if(tempStr[1] == 'E') { |
| 303 | $('#stationMarkSelect').val('E'); | 306 | $('#stationMarkSelect').val('E'); |
| @@ -318,8 +321,15 @@ $('#editPoitsions_station_mobal').on('editStationMobal_show', function(e, map,fu | @@ -318,8 +321,15 @@ $('#editPoitsions_station_mobal').on('editStationMobal_show', function(e, map,fu | ||
| 318 | if(g.name!='' || g.name != null) { | 321 | if(g.name!='' || g.name != null) { |
| 319 | if(g.stationRouteCode != editStation.stationRouteCode) { | 322 | if(g.stationRouteCode != editStation.stationRouteCode) { |
| 320 | // 添加拼音检索下拉框格式数据数组. | 323 | // 添加拼音检索下拉框格式数据数组. |
| 321 | - paramsD.push({'id':g.stationRouteCode + '_' + g.stationMark + '_' + g.directions, | ||
| 322 | - 'text':g.stationName + ' (' + g.stationRouteCode + ')' + ' --' + fun.dirdmToName(g.directions)}); | 324 | + /* paramsD.push({'id':g.stationRouteCode + '_' + g.stationMark + '_' + g.directions, |
| 325 | + 'text':g.stationName + ' (' + g.stationRouteCode + ')' + ' --' + fun.dirdmToName(g.directions)}); */ | ||
| 326 | + if(editStation.stationRouteStationMark=='E' && i == (len_-2)){ | ||
| 327 | + paramsD.push({'id':g.stationRouteCode + '_' + 'E' + '_' + g.directions, | ||
| 328 | + 'text':g.stationName + ' (' + g.stationRouteCode + ')' + ' --' + fun.dirdmToName(g.directions)}); | ||
| 329 | + }else { | ||
| 330 | + paramsD.push({'id':g.stationRouteCode + '_' + g.stationMark + '_' + g.directions, | ||
| 331 | + 'text':g.stationName + ' (' + g.stationRouteCode + ')' + ' --' + fun.dirdmToName(g.directions)}); | ||
| 332 | + } | ||
| 323 | } | 333 | } |
| 324 | } | 334 | } |
| 325 | }); | 335 | }); |
| @@ -333,10 +343,17 @@ $('#editPoitsions_station_mobal').on('editStationMobal_show', function(e, map,fu | @@ -333,10 +343,17 @@ $('#editPoitsions_station_mobal').on('editStationMobal_show', function(e, map,fu | ||
| 333 | } | 343 | } |
| 334 | function setZdlyValue() { | 344 | function setZdlyValue() { |
| 335 | fun.findUpStationRouteCode(editStation.stationRouteLine,editStation.stationRoutedirections,editStation.stationRouteCode,function(str) { | 345 | fun.findUpStationRouteCode(editStation.stationRouteLine,editStation.stationRoutedirections,editStation.stationRouteCode,function(str) { |
| 336 | - if(str.length>0){ | 346 | + /* if(str.length>0){ |
| 337 | var upStationRouteCode = str[0].stationRouteCode + '_' + str[0].stationRouteMarke + '_' + editStation.stationRoutedirections; | 347 | var upStationRouteCode = str[0].stationRouteCode + '_' + str[0].stationRouteMarke + '_' + editStation.stationRoutedirections; |
| 338 | $('#stationrouteSelect').select2('val',upStationRouteCode); | 348 | $('#stationrouteSelect').select2('val',upStationRouteCode); |
| 349 | + } */ | ||
| 350 | + if(str.length>0){ | ||
| 351 | + var upStationRouteCode = str[0].stationRouteCode + '_' + editStation.stationRouteStationMark + '_' + editStation.stationRoutedirections; | ||
| 352 | + $('#stationrouteSelect').select2('val',upStationRouteCode); | ||
| 353 | + }else { | ||
| 354 | + $('#stationrouteSelect').select2('val','请选择...'); | ||
| 339 | } | 355 | } |
| 356 | + $('#stationMarkSelect').val(editStation.stationRouteStationMark); | ||
| 340 | }); | 357 | }); |
| 341 | } | 358 | } |
| 342 | // 当站点类型为中途站或者终点站时,上一站点为必填项! | 359 | // 当站点类型为中途站或者终点站时,上一站点为必填项! |
src/main/resources/static/pages/base/stationroute/add.html
| 1 | <!-- 新增站点 --> | 1 | <!-- 新增站点 --> |
| 2 | -<div class="modal fade" id="add_station_mobal" tabindex="-1" role="basic" aria-hidden="true"> | 2 | +<div class="modal fade" id="add_station_mobal" role="basic" aria-hidden="true"> |
| 3 | <div class="modal-dialog"> | 3 | <div class="modal-dialog"> |
| 4 | <div class="modal-content"> | 4 | <div class="modal-content"> |
| 5 | <div class="modal-header"> | 5 | <div class="modal-header"> |
| @@ -180,7 +180,7 @@ | @@ -180,7 +180,7 @@ | ||
| 180 | 180 | ||
| 181 | <!-- 描述/说明 --> | 181 | <!-- 描述/说明 --> |
| 182 | <div class="form-group"> | 182 | <div class="form-group"> |
| 183 | - <label class="control-label col-md-3"> 描述/说明 : </label> | 183 | + <label class="control-label col-md-3"> 描述/说明 : </label> |
| 184 | <div class="col-md-6"> | 184 | <div class="col-md-6"> |
| 185 | <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea> | 185 | <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea> |
| 186 | </div> | 186 | </div> |
| @@ -243,7 +243,9 @@ $('#add_station_mobal').on('AddStationMobal.show', function(e, addMap,ajaxd,stao | @@ -243,7 +243,9 @@ $('#add_station_mobal').on('AddStationMobal.show', function(e, addMap,ajaxd,stao | ||
| 243 | // 站点序号值改变事件 | 243 | // 站点序号值改变事件 |
| 244 | $('#stationrouteSelect').on('change',function() { | 244 | $('#stationrouteSelect').on('change',function() { |
| 245 | var stationRValue = $('#stationrouteSelect').val(); | 245 | var stationRValue = $('#stationrouteSelect').val(); |
| 246 | - if(stationRValue) { | 246 | + if(stationRValue=='请选择...') { |
| 247 | + $('#stationMarkSelect').val('B'); | ||
| 248 | + }else { | ||
| 247 | var tempStr = stationRValue.split('_'); | 249 | var tempStr = stationRValue.split('_'); |
| 248 | if(tempStr[1] == 'E') { | 250 | if(tempStr[1] == 'E') { |
| 249 | $('#stationMarkSelect').val('E'); | 251 | $('#stationMarkSelect').val('E'); |
src/main/resources/static/pages/base/stationroute/css/bmap_base.css
| @@ -93,4 +93,39 @@ html,body{ | @@ -93,4 +93,39 @@ html,body{ | ||
| 93 | 93 | ||
| 94 | box-shadow: 0 12px 15px 0 rgba(204, 204, 204, 0.33),0 17px 50px 0 rgba(204, 204, 204, 0.33)!important; | 94 | box-shadow: 0 12px 15px 0 rgba(204, 204, 204, 0.33),0 17px 50px 0 rgba(204, 204, 204, 0.33)!important; |
| 95 | 95 | ||
| 96 | +} | ||
| 97 | + | ||
| 98 | +.defeat-scroll { | ||
| 99 | +width: 98%; | ||
| 100 | +height:380px; | ||
| 101 | +/* overflow:auto; */ | ||
| 102 | +overflow:hidden; | ||
| 103 | +} | ||
| 104 | +.defeat-scroll::-webkit-scrollbar { | ||
| 105 | +width:6px; | ||
| 106 | +height:6px; | ||
| 107 | +} | ||
| 108 | +.defeat-scroll::-webkit-scrollbar-button { | ||
| 109 | +/* background-color:#FF7677; */ | ||
| 110 | +background:rgba(255, 255, 255, 0); | ||
| 111 | +} | ||
| 112 | +.defeat-scroll::-webkit-scrollbar-track { | ||
| 113 | +/* background:#FF66D5; */ | ||
| 114 | +background:rgba(255, 255, 255, 0); | ||
| 115 | +} | ||
| 116 | +.defeat-scroll::-webkit-scrollbar-track-piece { | ||
| 117 | +/* background:#ff0000; */ | ||
| 118 | +background:rgba(255, 255, 255, 0); | ||
| 119 | +} | ||
| 120 | +.defeat-scroll::-webkit-scrollbar-thumb{ | ||
| 121 | +background:rgba(197, 196, 196, 0.81); | ||
| 122 | +border-radius:10px !important; | ||
| 123 | +} | ||
| 124 | +.defeat-scroll::-webkit-scrollbar-corner { | ||
| 125 | +/* background:#82AFFF; */ | ||
| 126 | +background:rgba(255, 255, 255, 0); | ||
| 127 | +} | ||
| 128 | +.defeat-scroll::-webkit-scrollbar-resizer { | ||
| 129 | +/* background:#FF0BEE; */ | ||
| 130 | +background:rgba(255, 255, 255, 0); | ||
| 96 | } | 131 | } |
| 97 | \ No newline at end of file | 132 | \ No newline at end of file |
src/main/resources/static/pages/base/stationroute/edit.html
| 1 | <!-- 编辑站点 --> | 1 | <!-- 编辑站点 --> |
| 2 | -<div class="modal fade" id="edit_station_mobal" tabindex="-1" role="basic" aria-hidden="true"> | 2 | +<div class="modal fade" id="edit_station_mobal" role="basic" aria-hidden="true"> |
| 3 | <div class="modal-dialog"> | 3 | <div class="modal-dialog"> |
| 4 | <div class="modal-content"> | 4 | <div class="modal-content"> |
| 5 | <div class="modal-header"> | 5 | <div class="modal-header"> |
| @@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
| 50 | <span class="required"> * </span> 站点编码 : | 50 | <span class="required"> * </span> 站点编码 : |
| 51 | </label> | 51 | </label> |
| 52 | <div class="col-md-6"> | 52 | <div class="col-md-6"> |
| 53 | - <input type="text" class="form-control" name="stationCod" id="stationCodInput" placeholder="站点编码"> | 53 | + <input type="text" class="form-control" name="stationCod" id="stationCodInput" placeholder="站点编码" readonly="readonly"> |
| 54 | </div> | 54 | </div> |
| 55 | </div> | 55 | </div> |
| 56 | </div> | 56 | </div> |
| @@ -177,7 +177,7 @@ | @@ -177,7 +177,7 @@ | ||
| 177 | </div> | 177 | </div> |
| 178 | <!-- 描述/说明 --> | 178 | <!-- 描述/说明 --> |
| 179 | <div class="form-group"> | 179 | <div class="form-group"> |
| 180 | - <label class="control-label col-md-3"> 描述/说明 : </label> | 180 | + <label class="control-label col-md-3"> 描述/说明 : </label> |
| 181 | <div class="col-md-6"> | 181 | <div class="col-md-6"> |
| 182 | <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea> | 182 | <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea> |
| 183 | </div> | 183 | </div> |
| @@ -194,6 +194,7 @@ | @@ -194,6 +194,7 @@ | ||
| 194 | <script type="text/javascript"> | 194 | <script type="text/javascript"> |
| 195 | 195 | ||
| 196 | $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,station_,Line_,fun){ | 196 | $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,station_,Line_,fun){ |
| 197 | + layer.closeAll(); | ||
| 197 | var editStationParmasObj = station_.getEitdStation(); | 198 | var editStationParmasObj = station_.getEitdStation(); |
| 198 | var addLine = Line_.getLineObj(); | 199 | var addLine = Line_.getLineObj(); |
| 199 | fun.setFormValue(editStationParmasObj); | 200 | fun.setFormValue(editStationParmasObj); |
| @@ -290,7 +291,9 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati | @@ -290,7 +291,9 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati | ||
| 290 | // 站点序号值改变事件 | 291 | // 站点序号值改变事件 |
| 291 | $('#stationrouteSelect').on('change',function() { | 292 | $('#stationrouteSelect').on('change',function() { |
| 292 | var stationRValue = $('#stationrouteSelect').val(); | 293 | var stationRValue = $('#stationrouteSelect').val(); |
| 293 | - if(stationRValue) { | 294 | + if(stationRValue=='请选择...') { |
| 295 | + $('#stationMarkSelect').val('B'); | ||
| 296 | + }else { | ||
| 294 | var tempStr = stationRValue.split('_'); | 297 | var tempStr = stationRValue.split('_'); |
| 295 | if(tempStr[1] == 'E') { | 298 | if(tempStr[1] == 'E') { |
| 296 | $('#stationMarkSelect').val('E'); | 299 | $('#stationMarkSelect').val('E'); |
| @@ -311,8 +314,13 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati | @@ -311,8 +314,13 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati | ||
| 311 | if(g.name!='' || g.name != null) { | 314 | if(g.name!='' || g.name != null) { |
| 312 | if(g.stationRouteCode != editStationParmasObj.stationRouteStationRouteCode) { | 315 | if(g.stationRouteCode != editStationParmasObj.stationRouteStationRouteCode) { |
| 313 | // 添加拼音检索下拉框格式数据数组. | 316 | // 添加拼音检索下拉框格式数据数组. |
| 314 | - paramsD.push({'id':g.stationRouteCode + '_' + g.stationMark + '_' + g.directions, | ||
| 315 | - 'text':g.stationName + ' (' + g.stationRouteCode + ')' + ' --' + fun.dirdmToName(g.directions)}); | 317 | + if(editStationParmasObj.stationRouteStationMark=='E' && i == (len_-2)){ |
| 318 | + paramsD.push({'id':g.stationRouteCode + '_' + 'E' + '_' + g.directions, | ||
| 319 | + 'text':g.stationName + ' (' + g.stationRouteCode + ')' + ' --' + fun.dirdmToName(g.directions)}); | ||
| 320 | + }else { | ||
| 321 | + paramsD.push({'id':g.stationRouteCode + '_' + g.stationMark + '_' + g.directions, | ||
| 322 | + 'text':g.stationName + ' (' + g.stationRouteCode + ')' + ' --' + fun.dirdmToName(g.directions)}); | ||
| 323 | + } | ||
| 316 | } | 324 | } |
| 317 | } | 325 | } |
| 318 | }); | 326 | }); |
| @@ -327,12 +335,14 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati | @@ -327,12 +335,14 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati | ||
| 327 | function setZdlyValue() { | 335 | function setZdlyValue() { |
| 328 | ajaxd.findUpStationRouteCode(editStationParmasObj.stationRouteLine,editStationParmasObj.stationRouteDirections,editStationParmasObj.stationRouteStationRouteCode,function(str) { | 336 | ajaxd.findUpStationRouteCode(editStationParmasObj.stationRouteLine,editStationParmasObj.stationRouteDirections,editStationParmasObj.stationRouteStationRouteCode,function(str) { |
| 329 | if(str.length>0){ | 337 | if(str.length>0){ |
| 330 | - var upStationRouteCode = str[0].stationRouteCode + '_' + str[0].stationRouteMarke + '_' + editStationParmasObj.stationRouteDirections; | 338 | + /* var upStationRouteCode = str[0].stationRouteCode + '_' + str[0].stationRouteMarke + '_' + editStationParmasObj.stationRouteDirections; */ |
| 339 | + var upStationRouteCode = str[0].stationRouteCode + '_' + editStationParmasObj.stationRouteStationMark + '_' + editStationParmasObj.stationRouteDirections; | ||
| 331 | $('#stationrouteSelect').select2('val',upStationRouteCode); | 340 | $('#stationrouteSelect').select2('val',upStationRouteCode); |
| 332 | }else { | 341 | }else { |
| 333 | $('#stationrouteSelect').select2('val','请选择...'); | 342 | $('#stationrouteSelect').select2('val','请选择...'); |
| 334 | - $('#stationMarkSelect').val(editStationParmasObj.stationRouteStationMark); | 343 | + /* $('#stationMarkSelect').val(editStationParmasObj.stationRouteStationMark); */ |
| 335 | } | 344 | } |
| 345 | + $('#stationMarkSelect').val(editStationParmasObj.stationRouteStationMark); | ||
| 336 | }); | 346 | }); |
| 337 | } | 347 | } |
| 338 | // 当站点类型为中途站或者终点站时,上一站点为必填项! | 348 | // 当站点类型为中途站或者终点站时,上一站点为必填项! |
src/main/resources/static/pages/base/stationroute/editsection.html
| 1 | <!-- 编辑路段 --> | 1 | <!-- 编辑路段 --> |
| 2 | -<div class="modal fade" id="edit_section_mobal" tabindex="-1" role="basic" aria-hidden="true"> | 2 | +<div class="modal fade" id="edit_section_mobal" role="basic" aria-hidden="true"> |
| 3 | <div class="modal-dialog"> | 3 | <div class="modal-dialog"> |
| 4 | <div class="modal-content"> | 4 | <div class="modal-content"> |
| 5 | <div class="modal-header"> | 5 | <div class="modal-header"> |
| @@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
| 49 | 上一路段: | 49 | 上一路段: |
| 50 | </label> | 50 | </label> |
| 51 | <div class="col-md-6"> | 51 | <div class="col-md-6"> |
| 52 | - <select name="sectionrouteCode" class="form-control" id="sectionrouteCodeSelect"></select> | 52 | + <select name="sectionrouteCode" class="form-control" id="sectionrouteCodeSelect" style="width:100%"></select> |
| 53 | <span class="help-block">说明:选择的路段将作为本站序号的参考,成为选择路段的下一个路段。 </span> | 53 | <span class="help-block">说明:选择的路段将作为本站序号的参考,成为选择路段的下一个路段。 </span> |
| 54 | </div> | 54 | </div> |
| 55 | </div> | 55 | </div> |
| @@ -157,10 +157,9 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | @@ -157,10 +157,9 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | ||
| 157 | var lineId = Section.sectionrouteLine; | 157 | var lineId = Section.sectionrouteLine; |
| 158 | // 获取路段号元素,并添加下拉属性值 | 158 | // 获取路段号元素,并添加下拉属性值 |
| 159 | ajaxd.getStation(lineId,dir,function(treeData) { | 159 | ajaxd.getStation(lineId,dir,function(treeData) { |
| 160 | - var options = '<option value="">请选择...</option>'; | ||
| 161 | - var dArray = treeData[0].children[1].children; | 160 | + var array = treeData[0].children[1].children,paramsD =new Array(); |
| 162 | var eq_scetionRouteCode = Section.sectionrouteCode; | 161 | var eq_scetionRouteCode = Section.sectionrouteCode; |
| 163 | - for(var i = 0 ; i<dArray.length; i++){ | 162 | + /* for(var i = 0 ; i<dArray.length; i++){ |
| 164 | var ptions_v = dArray[i].sectionrouteCode; | 163 | var ptions_v = dArray[i].sectionrouteCode; |
| 165 | if(eq_scetionRouteCode == ptions_v){ | 164 | if(eq_scetionRouteCode == ptions_v){ |
| 166 | continue; | 165 | continue; |
| @@ -168,17 +167,32 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | @@ -168,17 +167,32 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | ||
| 168 | options += '<option value="'+ ptions_v +'">'+dArray[i].sectionName + ' (' + ptions_v +')' | 167 | options += '<option value="'+ ptions_v +'">'+dArray[i].sectionName + ' (' + ptions_v +')' |
| 169 | + ' --' + fun.dirdmToName(dArray[i].sectionrouteDirections) + '</option>' ; | 168 | + ' --' + fun.dirdmToName(dArray[i].sectionrouteDirections) + '</option>' ; |
| 170 | } | 169 | } |
| 171 | - $('#sectionrouteCodeSelect').html(options); | ||
| 172 | - ajaxd.findUpSectionRouteCode(lineId,dir,eq_scetionRouteCode,function(str) { | ||
| 173 | - debugger; | ||
| 174 | - console.log(eq_scetionRouteCode); | ||
| 175 | - if(str.length>0){ | ||
| 176 | - var upStationRouteCode = str[0].sectionrouteCode; | ||
| 177 | - $('#sectionrouteCodeSelect').val(upStationRouteCode); | ||
| 178 | - }else { | ||
| 179 | - $('#sectionrouteCodeSelect').val(''); | 170 | + $('#sectionrouteCodeSelect').html(options); */ |
| 171 | + paramsD.push({'id':'请选择...','text':'请选择...'}); | ||
| 172 | + // 遍历. | ||
| 173 | + $.each(array, function(i, g){ | ||
| 174 | + // 判断. | ||
| 175 | + if(g.sectionName!='' || g.sectionName != null) { | ||
| 176 | + var ptions_v = g.sectionrouteCode; | ||
| 177 | + if(eq_scetionRouteCode != ptions_v){ | ||
| 178 | + // 添加拼音检索下拉框格式数据数组. | ||
| 179 | + paramsD.push({'id':ptions_v, | ||
| 180 | + 'text':g.sectionName + '(' + ptions_v + ')' + ' --' + fun.dirdmToName(g.sectionrouteDirections)}); | ||
| 181 | + } | ||
| 180 | } | 182 | } |
| 181 | }); | 183 | }); |
| 184 | + // 初始化上一个路段拼音检索下拉框. | ||
| 185 | + initPinYinSelect2($('#sectionrouteCodeSelect'),paramsD,function(selector) { | ||
| 186 | + $('#sectionDirSelect').val('');// 设值方向. | ||
| 187 | + ajaxd.findUpSectionRouteCode(lineId,dir,eq_scetionRouteCode,function(str) { | ||
| 188 | + if(str.length>0){ | ||
| 189 | + var upStationRouteCode = str[0].sectionrouteCode; | ||
| 190 | + $('#sectionrouteCodeSelect').select2('val',upStationRouteCode); | ||
| 191 | + }else { | ||
| 192 | + $('#sectionrouteCodeSelect').select2('val','请选择...'); | ||
| 193 | + } | ||
| 194 | + }); | ||
| 195 | + }); | ||
| 182 | }); | 196 | }); |
| 183 | // 显示mobal | 197 | // 显示mobal |
| 184 | $('#edit_section_mobal').modal({show : true,backdrop: 'static',keyboard: false}); | 198 | $('#edit_section_mobal').modal({show : true,backdrop: 'static',keyboard: false}); |
| @@ -238,6 +252,8 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | @@ -238,6 +252,8 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect | ||
| 238 | submitHandler : function(f) { | 252 | submitHandler : function(f) { |
| 239 | var params = form.serializeJSON(); | 253 | var params = form.serializeJSON(); |
| 240 | error.hide(); | 254 | error.hide(); |
| 255 | + if(params.sectionrouteCode=='请选择...') | ||
| 256 | + params.sectionrouteCode=''; | ||
| 241 | ajaxd.sectionUpdate(params,function(resuntDate) { | 257 | ajaxd.sectionUpdate(params,function(resuntDate) { |
| 242 | if(resuntDate.status=='SUCCESS') { | 258 | if(resuntDate.status=='SUCCESS') { |
| 243 | // 弹出添加成功提示消息 | 259 | // 弹出添加成功提示消息 |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-events.js
| @@ -238,4 +238,9 @@ $(function(){ | @@ -238,4 +238,9 @@ $(function(){ | ||
| 238 | } | 238 | } |
| 239 | }); | 239 | }); |
| 240 | }); | 240 | }); |
| 241 | + $('#scrllmouseEvent').on('mousemove',function() { | ||
| 242 | + $('.defeat-scroll').css('overflow','auto'); | ||
| 243 | + }).on('mouseleave',function() { | ||
| 244 | + $('.defeat-scroll').css('overflow','hidden'); | ||
| 245 | + }); | ||
| 241 | }); | 246 | }); |
| 242 | \ No newline at end of file | 247 | \ No newline at end of file |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
| @@ -354,7 +354,7 @@ var PublicFunctions = function () { | @@ -354,7 +354,7 @@ var PublicFunctions = function () { | ||
| 354 | // 获取站点编码元素设值 | 354 | // 获取站点编码元素设值 |
| 355 | $('#stationCodInput').val(editStationParmas.stationStationCod); | 355 | $('#stationCodInput').val(editStationParmas.stationStationCod); |
| 356 | // 获取站点类型元素设值 | 356 | // 获取站点类型元素设值 |
| 357 | - $('#stationMarkSelect').val(editStationParmas.stationRouteStationMark); | 357 | + // $('#stationMarkSelect').val(editStationParmas.stationRouteStationMark); |
| 358 | // 获取站点方向元素设值 | 358 | // 获取站点方向元素设值 |
| 359 | $('#stationdirSelect').val(editStationParmas.stationRouteDirections); | 359 | $('#stationdirSelect').val(editStationParmas.stationRouteDirections); |
| 360 | // 获取站点道路编码元素设值 | 360 | // 获取站点道路编码元素设值 |
src/main/resources/static/pages/base/stationroute/list.html
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | <div id="bmap_basic" class="bmaps"></div> | 4 | <div id="bmap_basic" class="bmaps"></div> |
| 5 | <div class="portlet box protlet-box" style="top:20px;border-radius: 6px !important;box-shadow: 10px 10px 5px #888888;"> | 5 | <div class="portlet box protlet-box" style="top:20px;border-radius: 6px !important;box-shadow: 10px 10px 5px #888888;"> |
| 6 | <!-- 左边标题栏 --> | 6 | <!-- 左边标题栏 --> |
| 7 | - <div class="portlet-title" style="background-color:#3B3F51"> | 7 | + <div class="portlet-title" style="background-color:#12527f;"> |
| 8 | <div class="caption"> | 8 | <div class="caption"> |
| 9 | <!-- 途径站点 --> | 9 | <!-- 途径站点 --> |
| 10 | </div> | 10 | </div> |
| @@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
| 13 | </div> | 13 | </div> |
| 14 | </div> | 14 | </div> |
| 15 | <!-- 左边栏 --> | 15 | <!-- 左边栏 --> |
| 16 | - <div class="portlet-body" style="border: 1px solid rgb(255, 255, 255); display: block;min-height: 200px;"> | 16 | + <div class="portlet-body" id="scrllmouseEvent" style="border: 1px solid rgb(255, 255, 255); display: block;min-height: 380px;"> |
| 17 | <div class="row"> | 17 | <div class="row"> |
| 18 | <!-- 上下行栏 --> | 18 | <!-- 上下行栏 --> |
| 19 | <div class="col-md-3 col-sm-3 col-xs-3"> | 19 | <div class="col-md-3 col-sm-3 col-xs-3"> |
| @@ -83,8 +83,8 @@ | @@ -83,8 +83,8 @@ | ||
| 83 | </div> | 83 | </div> |
| 84 | </div> | 84 | </div> |
| 85 | <!-- 树 --> | 85 | <!-- 树 --> |
| 86 | - <div class="portlet-body"> | ||
| 87 | - <div id="station_Up_tree" style="height: auto;max-height: 500px;overflow-y: auto;"></div> | 86 | + <div class="portlet-body" > |
| 87 | + <div id="station_Up_tree" class="defeat-scroll" style="height: auto;max-height: 500px;"></div> | ||
| 88 | </div> | 88 | </div> |
| 89 | </div> | 89 | </div> |
| 90 | <!-- 无上行站点添加方式 --> | 90 | <!-- 无上行站点添加方式 --> |
| @@ -176,7 +176,7 @@ | @@ -176,7 +176,7 @@ | ||
| 176 | </div> | 176 | </div> |
| 177 | <!-- 树 --> | 177 | <!-- 树 --> |
| 178 | <div class="portlet-body"> | 178 | <div class="portlet-body"> |
| 179 | - <div id="station_Down_tree" style="height: auto;max-height: 500px;overflow-y: auto;"></div> | 179 | + <div id="station_Down_tree" class="defeat-scroll" style="height: auto;max-height: 500px;"></div> |
| 180 | </div> | 180 | </div> |
| 181 | </div> | 181 | </div> |
| 182 | <!-- 无上行站点添加方式 --> | 182 | <!-- 无上行站点添加方式 --> |