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 | 113 | /*@Query(value = "SELECT s.b_jwpoints,s.station_name FROM (" + |
| 114 | 114 | "SELECT b.station FROM bsth_c_stationroute b where b.line =?1 and b.directions = ?2 and b.destroy=0) r " + |
| 115 | 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 | 118 | "LEFT JOIN bsth_c_station s on r.station = s.id order by r.station_route_code asc", nativeQuery=true) |
| 119 | 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 | 248 | for(int i = 0;i <stationsArray.size();i++) { |
| 249 | 249 | // 站点名称 |
| 250 | 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 | 253 | distance = distance/1000; |
| 254 | 254 | BigDecimal d = new BigDecimal(distance); |
| 255 | 255 | distance = d.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
| 256 | 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 | 259 | duration = duration/60; |
| 260 | 260 | BigDecimal t = new BigDecimal(duration); |
| ... | ... | @@ -792,9 +792,9 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem |
| 792 | 792 | Station station = repository.findOne(stationId); |
| 793 | 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 | 799 | String stationName = map.get("stationName").equals("") ? "" : map.get("stationName").toString(); |
| 800 | 800 | // 线路ID |
| ... | ... | @@ -952,8 +952,8 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem |
| 952 | 952 | stationRouteCode = stationRouteCode == null ? 100 : stationRouteCode; |
| 953 | 953 | Integer LineId = map.get("stationRouteLine").equals("") ? null : Integer.parseInt(map.get("stationRouteLine").toString()); |
| 954 | 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 | 957 | Integer directions = map.get("directions").equals("") ? null : Integer.parseInt(map.get("directions").toString()); |
| 958 | 958 | Station station = repository.findOne(stationId); |
| 959 | 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 | 3 | <div class="modal-dialog"> |
| 4 | 4 | <div class="modal-content"> |
| 5 | 5 | <div class="modal-header"> |
| ... | ... | @@ -49,7 +49,7 @@ |
| 49 | 49 | 上一路段: |
| 50 | 50 | </label> |
| 51 | 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 | 53 | <span class="help-block">说明:选择的路段将作为本路段序号的参考,成为选择路段的下一个路段。 </span> |
| 54 | 54 | </div> |
| 55 | 55 | </div> |
| ... | ... | @@ -162,7 +162,7 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect |
| 162 | 162 | var sectionRouteId = Section.sectionRouteId; |
| 163 | 163 | // 获取路段号元素,并添加下拉属性值 |
| 164 | 164 | ajaxd.getStation(lineId,dir,function(treeData) { |
| 165 | - var options = '<option value="">请选择...</option>'; | |
| 165 | + /* var options = '<option value="">请选择...</option>'; | |
| 166 | 166 | var dArray = treeData[0].children[1].children; |
| 167 | 167 | var eq_stationRouteCode = Section.sectionRouteCode; |
| 168 | 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 | 181 | }else { |
| 182 | 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 | 213 | function dirdmToName(value) { |
| ... | ... | @@ -257,6 +284,8 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect |
| 257 | 284 | // 设置日期 |
| 258 | 285 | params.createDate = moment(Section.carParkCreateDate).format(fs); |
| 259 | 286 | error.hide(); |
| 287 | + if(params.sectionrouteCode=='请选择...') | |
| 288 | + params.sectionrouteCode=''; | |
| 260 | 289 | ajaxd.sectionUpdate(params,function(resuntDate) { |
| 261 | 290 | if(resuntDate.status=='SUCCESS') { |
| 262 | 291 | // 弹出添加成功提示消息 | ... | ... |
src/main/resources/static/pages/base/station/edit.html
| 1 | 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 | 3 | <div class="modal-dialog"> |
| 4 | 4 | <div class="modal-content"> |
| 5 | 5 | <!-- 弹出层标题title容器 --> |
| ... | ... | @@ -209,6 +209,7 @@ |
| 209 | 209 | </div> |
| 210 | 210 | <script type="text/javascript"> |
| 211 | 211 | $('#editPoitsions_station_mobal').on('editStationMobal_show', function(e, map,fun,stat){ |
| 212 | + layer.closeAll(); | |
| 212 | 213 | // 获取站点对象信息 |
| 213 | 214 | var editStation = stat.getAddStation(); |
| 214 | 215 | // 初始化表单值 |
| ... | ... | @@ -297,7 +298,9 @@ $('#editPoitsions_station_mobal').on('editStationMobal_show', function(e, map,fu |
| 297 | 298 | // 站点序号值改变事件 |
| 298 | 299 | $('#stationrouteSelect').on('change',function() { |
| 299 | 300 | var stationRValue = $('#stationrouteSelect').val(); |
| 300 | - if(stationRValue) { | |
| 301 | + if(stationRValue=='请选择...') { | |
| 302 | + $('#stationMarkSelect').val('B'); | |
| 303 | + }else { | |
| 301 | 304 | var tempStr = stationRValue.split('_'); |
| 302 | 305 | if(tempStr[1] == 'E') { |
| 303 | 306 | $('#stationMarkSelect').val('E'); |
| ... | ... | @@ -318,8 +321,15 @@ $('#editPoitsions_station_mobal').on('editStationMobal_show', function(e, map,fu |
| 318 | 321 | if(g.name!='' || g.name != null) { |
| 319 | 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 | 343 | } |
| 334 | 344 | function setZdlyValue() { |
| 335 | 345 | fun.findUpStationRouteCode(editStation.stationRouteLine,editStation.stationRoutedirections,editStation.stationRouteCode,function(str) { |
| 336 | - if(str.length>0){ | |
| 346 | + /* if(str.length>0){ | |
| 337 | 347 | var upStationRouteCode = str[0].stationRouteCode + '_' + str[0].stationRouteMarke + '_' + editStation.stationRoutedirections; |
| 338 | 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 | 3 | <div class="modal-dialog"> |
| 4 | 4 | <div class="modal-content"> |
| 5 | 5 | <div class="modal-header"> |
| ... | ... | @@ -180,7 +180,7 @@ |
| 180 | 180 | |
| 181 | 181 | <!-- 描述/说明 --> |
| 182 | 182 | <div class="form-group"> |
| 183 | - <label class="control-label col-md-3"> 描述/说明 : </label> | |
| 183 | + <label class="control-label col-md-3"> 描述/说明 : </label> | |
| 184 | 184 | <div class="col-md-6"> |
| 185 | 185 | <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea> |
| 186 | 186 | </div> |
| ... | ... | @@ -243,7 +243,9 @@ $('#add_station_mobal').on('AddStationMobal.show', function(e, addMap,ajaxd,stao |
| 243 | 243 | // 站点序号值改变事件 |
| 244 | 244 | $('#stationrouteSelect').on('change',function() { |
| 245 | 245 | var stationRValue = $('#stationrouteSelect').val(); |
| 246 | - if(stationRValue) { | |
| 246 | + if(stationRValue=='请选择...') { | |
| 247 | + $('#stationMarkSelect').val('B'); | |
| 248 | + }else { | |
| 247 | 249 | var tempStr = stationRValue.split('_'); |
| 248 | 250 | if(tempStr[1] == 'E') { |
| 249 | 251 | $('#stationMarkSelect').val('E'); | ... | ... |
src/main/resources/static/pages/base/stationroute/css/bmap_base.css
| ... | ... | @@ -93,4 +93,39 @@ html,body{ |
| 93 | 93 | |
| 94 | 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 | 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 | 3 | <div class="modal-dialog"> |
| 4 | 4 | <div class="modal-content"> |
| 5 | 5 | <div class="modal-header"> |
| ... | ... | @@ -50,7 +50,7 @@ |
| 50 | 50 | <span class="required"> * </span> 站点编码 : |
| 51 | 51 | </label> |
| 52 | 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 | 54 | </div> |
| 55 | 55 | </div> |
| 56 | 56 | </div> |
| ... | ... | @@ -177,7 +177,7 @@ |
| 177 | 177 | </div> |
| 178 | 178 | <!-- 描述/说明 --> |
| 179 | 179 | <div class="form-group"> |
| 180 | - <label class="control-label col-md-3"> 描述/说明 : </label> | |
| 180 | + <label class="control-label col-md-3"> 描述/说明 : </label> | |
| 181 | 181 | <div class="col-md-6"> |
| 182 | 182 | <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea> |
| 183 | 183 | </div> |
| ... | ... | @@ -194,6 +194,7 @@ |
| 194 | 194 | <script type="text/javascript"> |
| 195 | 195 | |
| 196 | 196 | $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,station_,Line_,fun){ |
| 197 | + layer.closeAll(); | |
| 197 | 198 | var editStationParmasObj = station_.getEitdStation(); |
| 198 | 199 | var addLine = Line_.getLineObj(); |
| 199 | 200 | fun.setFormValue(editStationParmasObj); |
| ... | ... | @@ -290,7 +291,9 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati |
| 290 | 291 | // 站点序号值改变事件 |
| 291 | 292 | $('#stationrouteSelect').on('change',function() { |
| 292 | 293 | var stationRValue = $('#stationrouteSelect').val(); |
| 293 | - if(stationRValue) { | |
| 294 | + if(stationRValue=='请选择...') { | |
| 295 | + $('#stationMarkSelect').val('B'); | |
| 296 | + }else { | |
| 294 | 297 | var tempStr = stationRValue.split('_'); |
| 295 | 298 | if(tempStr[1] == 'E') { |
| 296 | 299 | $('#stationMarkSelect').val('E'); |
| ... | ... | @@ -311,8 +314,13 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati |
| 311 | 314 | if(g.name!='' || g.name != null) { |
| 312 | 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 | 335 | function setZdlyValue() { |
| 328 | 336 | ajaxd.findUpStationRouteCode(editStationParmasObj.stationRouteLine,editStationParmasObj.stationRouteDirections,editStationParmasObj.stationRouteStationRouteCode,function(str) { |
| 329 | 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 | 340 | $('#stationrouteSelect').select2('val',upStationRouteCode); |
| 332 | 341 | }else { |
| 333 | 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 | 3 | <div class="modal-dialog"> |
| 4 | 4 | <div class="modal-content"> |
| 5 | 5 | <div class="modal-header"> |
| ... | ... | @@ -49,7 +49,7 @@ |
| 49 | 49 | 上一路段: |
| 50 | 50 | </label> |
| 51 | 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 | 53 | <span class="help-block">说明:选择的路段将作为本站序号的参考,成为选择路段的下一个路段。 </span> |
| 54 | 54 | </div> |
| 55 | 55 | </div> |
| ... | ... | @@ -157,10 +157,9 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect |
| 157 | 157 | var lineId = Section.sectionrouteLine; |
| 158 | 158 | // 获取路段号元素,并添加下拉属性值 |
| 159 | 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 | 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 | 163 | var ptions_v = dArray[i].sectionrouteCode; |
| 165 | 164 | if(eq_scetionRouteCode == ptions_v){ |
| 166 | 165 | continue; |
| ... | ... | @@ -168,17 +167,32 @@ $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,sect |
| 168 | 167 | options += '<option value="'+ ptions_v +'">'+dArray[i].sectionName + ' (' + ptions_v +')' |
| 169 | 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 | 197 | // 显示mobal |
| 184 | 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 | 252 | submitHandler : function(f) { |
| 239 | 253 | var params = form.serializeJSON(); |
| 240 | 254 | error.hide(); |
| 255 | + if(params.sectionrouteCode=='请选择...') | |
| 256 | + params.sectionrouteCode=''; | |
| 241 | 257 | ajaxd.sectionUpdate(params,function(resuntDate) { |
| 242 | 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 | 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 | 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 | 354 | // 获取站点编码元素设值 |
| 355 | 355 | $('#stationCodInput').val(editStationParmas.stationStationCod); |
| 356 | 356 | // 获取站点类型元素设值 |
| 357 | - $('#stationMarkSelect').val(editStationParmas.stationRouteStationMark); | |
| 357 | + // $('#stationMarkSelect').val(editStationParmas.stationRouteStationMark); | |
| 358 | 358 | // 获取站点方向元素设值 |
| 359 | 359 | $('#stationdirSelect').val(editStationParmas.stationRouteDirections); |
| 360 | 360 | // 获取站点道路编码元素设值 | ... | ... |
src/main/resources/static/pages/base/stationroute/list.html
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | <div id="bmap_basic" class="bmaps"></div> |
| 5 | 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 | 8 | <div class="caption"> |
| 9 | 9 | <!-- 途径站点 --> |
| 10 | 10 | </div> |
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | </div> |
| 14 | 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 | 17 | <div class="row"> |
| 18 | 18 | <!-- 上下行栏 --> |
| 19 | 19 | <div class="col-md-3 col-sm-3 col-xs-3"> |
| ... | ... | @@ -83,8 +83,8 @@ |
| 83 | 83 | </div> |
| 84 | 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 | 88 | </div> |
| 89 | 89 | </div> |
| 90 | 90 | <!-- 无上行站点添加方式 --> |
| ... | ... | @@ -176,7 +176,7 @@ |
| 176 | 176 | </div> |
| 177 | 177 | <!-- 树 --> |
| 178 | 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 | 180 | </div> |
| 181 | 181 | </div> |
| 182 | 182 | <!-- 无上行站点添加方式 --> | ... | ... |