Commit 943d4fb24224192bacebe2485bddc84f1fea68c9
1 parent
140f34b3
基础数据功能完善
Showing
33 changed files
with
1727 additions
and
1664 deletions
src/main/java/com/bsth/controller/SectionRouteController.java
| ... | ... | @@ -60,4 +60,16 @@ public class SectionRouteController extends BaseController<SectionRoute, Integer |
| 60 | 60 | |
| 61 | 61 | return routeService.findSectionRouteInfoFormId(map); |
| 62 | 62 | } |
| 63 | + | |
| 64 | + /** | |
| 65 | + * @Description :TODO(查询线路某方向下的上一个路段序号) | |
| 66 | + * | |
| 67 | + * @param map <lineId:线路ID; direction:方向;sectionRouteCode:路段编码> | |
| 68 | + * | |
| 69 | + * @return List<Map<String, Object>> | |
| 70 | + */ | |
| 71 | + @RequestMapping(value = "/findUpStationRouteCode" , method = RequestMethod.GET) | |
| 72 | + public List<Map<String, Object>> findUpStationRouteCode(@RequestParam Map<String, Object> map) { | |
| 73 | + return routeService.findUpSectionRouteCode(map); | |
| 74 | + } | |
| 63 | 75 | } | ... | ... |
src/main/java/com/bsth/repository/SectionRouteRepository.java
| ... | ... | @@ -57,15 +57,18 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int |
| 57 | 57 | " b.section_distance AS sectionDistance," + |
| 58 | 58 | " b.section_time AS sectionTime," + |
| 59 | 59 | " b.db_type AS sectiondbType," + |
| 60 | - " b.speed_limit AS sectionSpeedLimet FROM (" + | |
| 60 | + " b.speed_limit AS sectionSpeedLimet ,a.destroy,a.versions,a.descriptions FROM (" + | |
| 61 | 61 | "SELECT r.id AS sectionrouteId," + |
| 62 | 62 | "r.line AS sectionrouteLine," + |
| 63 | 63 | "r.line_code AS sectionrouteLineCode," + |
| 64 | 64 | "r.section AS sectionrouteSection," + |
| 65 | 65 | "r.section_code AS sectionrouteSectionCode," + |
| 66 | 66 | "r.sectionroute_code AS sectionrouteCode," + |
| 67 | - "r.directions AS sectionrouteDirections" + | |
| 68 | - " FROM bsth_c_sectionroute r where r.line = ?1 and r.directions = ?2 and r.destroy=0 ) a " + | |
| 67 | + "r.directions AS sectionrouteDirections," + | |
| 68 | + "r.destroy AS destroy," + | |
| 69 | + "r.versions AS versions," + | |
| 70 | + "r.descriptions AS descriptions" + | |
| 71 | + " FROM bsth_c_sectionroute r where r.line = ?1 and r.directions = ?2 and r.destroy=0 ) a " + | |
| 69 | 72 | " LEFT JOIN bsth_c_section b ON a.sectionrouteSection = b.id", nativeQuery=true) |
| 70 | 73 | List<Object[]> getSectionRoute(int lineId, int directions); |
| 71 | 74 | |
| ... | ... | @@ -128,4 +131,14 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int |
| 128 | 131 | " LEFT JOIN bsth_c_section b on a.sectionRouteSection = b.id", nativeQuery=true) |
| 129 | 132 | List<Object[]> findSectionRouteInfoFormId(int id); |
| 130 | 133 | |
| 134 | + | |
| 135 | + /** | |
| 136 | + * @Description :TODO(查询线路某方向下的上一个路段序号) | |
| 137 | + * | |
| 138 | + * @param map <lineId:线路ID; direction:方向;sectionRouteCode:路段编码> | |
| 139 | + * | |
| 140 | + * @return List<Map<String, Object>> | |
| 141 | + */ | |
| 142 | + @Query(value = " select MAX(r.sectionroute_code) as sectionrouteCode from bsth_c_sectionroute r WHERE r.line=?1 and r.directions =?2 and r.sectionroute_code< ?3", nativeQuery=true) | |
| 143 | + List<Object[]> findUpSectionRouteCode(Integer lineId,Integer direction,Integer stationRouteCode); | |
| 131 | 144 | } | ... | ... |
src/main/java/com/bsth/repository/StationRepository.java
| ... | ... | @@ -103,7 +103,7 @@ public interface StationRepository extends BaseRepository<Station, Integer> { |
| 103 | 103 | " WHERE id = ?17 ", nativeQuery=true) |
| 104 | 104 | public void stationUpdate(String stationCod,String stationName,String roadCoding,String dbType,String bJwpoints, |
| 105 | 105 | |
| 106 | - String gLonx,String gLaty,Float x,Float y, String bPolygonGrid,String gPolygonGrid, | |
| 106 | + Float gLonx,Float gLaty,Float x,Float y, String bPolygonGrid,String gPolygonGrid, | |
| 107 | 107 | |
| 108 | 108 | Integer destroy, Integer radius,String shapesType, Integer versions,String descriptions,Integer stationId); |
| 109 | 109 | ... | ... |
src/main/java/com/bsth/service/SectionRouteService.java
| ... | ... | @@ -32,4 +32,13 @@ public interface SectionRouteService extends BaseService<SectionRoute, Integer> |
| 32 | 32 | * @return List<Map<String, Object>> |
| 33 | 33 | */ |
| 34 | 34 | List<Map<String, Object>> findSectionRouteInfoFormId(Map<String, Object> map); |
| 35 | + | |
| 36 | + /** | |
| 37 | + * @Description :TODO(查询线路某方向下的上一个路段序号) | |
| 38 | + * | |
| 39 | + * @param map <lineId:线路ID; direction:方向;sectionRouteCode:路段编码> | |
| 40 | + * | |
| 41 | + * @return List<Map<String, Object>> | |
| 42 | + */ | |
| 43 | + List<Map<String, Object>> findUpSectionRouteCode(Map<String, Object> map); | |
| 35 | 44 | } | ... | ... |
src/main/java/com/bsth/service/impl/SectionRouteServiceImpl.java
| ... | ... | @@ -8,7 +8,6 @@ import java.util.Map; |
| 8 | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 9 | 9 | import org.springframework.stereotype.Service; |
| 10 | 10 | |
| 11 | -import com.bsth.common.ResponseCode; | |
| 12 | 11 | import com.bsth.entity.SectionRoute; |
| 13 | 12 | import com.bsth.repository.SectionRouteRepository; |
| 14 | 13 | import com.bsth.service.SectionRouteService; |
| ... | ... | @@ -191,4 +190,43 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ |
| 191 | 190 | return resultList; |
| 192 | 191 | } |
| 193 | 192 | |
| 193 | + | |
| 194 | + /** | |
| 195 | + * @Description :TODO(查询线路某方向下的上一个路段序号) | |
| 196 | + * | |
| 197 | + * @param map <lineId:线路ID; direction:方向;sectionRouteCode:路段编码> | |
| 198 | + * | |
| 199 | + * @return List<Map<String, Object>> | |
| 200 | + */ | |
| 201 | + @Override | |
| 202 | + public List<Map<String, Object>> findUpSectionRouteCode(Map<String, Object> map) { | |
| 203 | + | |
| 204 | + Integer lineId = map.get("lineId").equals("") ? null : Integer.parseInt(map.get("lineId").toString()); | |
| 205 | + | |
| 206 | + Integer direction = map.get("direction").equals("") ? null : Integer.parseInt(map.get("direction").toString()); | |
| 207 | + | |
| 208 | + Integer stationRouteCode = map.get("sectionRouteCode").equals("") ? null : Integer.parseInt(map.get("sectionRouteCode").toString()); | |
| 209 | + | |
| 210 | + List<Object[]> reslutList = repository.findUpSectionRouteCode(lineId, direction, stationRouteCode); | |
| 211 | + | |
| 212 | + List<Map<String, Object>> list = new ArrayList<Map<String,Object>>(); | |
| 213 | + | |
| 214 | + if(reslutList.get(0)!=null) { | |
| 215 | + | |
| 216 | + for(int i = 0 ; i <reslutList.size() ;i++){ | |
| 217 | + | |
| 218 | + Map<String, Object> tempM = new HashMap<String, Object>(); | |
| 219 | + | |
| 220 | + System.out.println(reslutList.get(i)); | |
| 221 | + | |
| 222 | + tempM.put("sectionrouteCode", reslutList.get(i)); | |
| 223 | + | |
| 224 | + list.add(tempM); | |
| 225 | + | |
| 226 | + } | |
| 227 | + } | |
| 228 | + | |
| 229 | + return list; | |
| 230 | + } | |
| 231 | + | |
| 194 | 232 | } | ... | ... |
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
| ... | ... | @@ -282,6 +282,15 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ |
| 282 | 282 | // 限速 |
| 283 | 283 | tempM.put("sectionSpeedLimet",sectionList.get(i)[22]); |
| 284 | 284 | |
| 285 | + // 是否撤销 | |
| 286 | + tempM.put("destroy",sectionList.get(i)[23]); | |
| 287 | + | |
| 288 | + // 版本号 | |
| 289 | + tempM.put("versions",sectionList.get(i)[24]); | |
| 290 | + | |
| 291 | + // 说明 | |
| 292 | + tempM.put("descriptions",sectionList.get(i)[25]); | |
| 293 | + | |
| 285 | 294 | tempM.put("name", sectionList.get(i)[9]); |
| 286 | 295 | |
| 287 | 296 | tempM.put("text", sectionList.get(i)[9]); | ... | ... |
src/main/java/com/bsth/service/impl/StationServiceImpl.java
| ... | ... | @@ -822,11 +822,11 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem |
| 822 | 822 | |
| 823 | 823 | if(b==0) { |
| 824 | 824 | |
| 825 | - gPloygonGrid = resultPoint.getLng() + " " + resultPoint.getLat(); | |
| 825 | + gPloygonGrid = String.valueOf(resultPoint.getLng()) + " " + String.valueOf(resultPoint.getLat()); | |
| 826 | 826 | |
| 827 | 827 | }else { |
| 828 | 828 | |
| 829 | - gPloygonGrid = gPloygonGrid + ',' + resultPoint.getLng() + " " + resultPoint.getLat(); | |
| 829 | + gPloygonGrid = gPloygonGrid + ',' + String.valueOf(resultPoint.getLng()) + " " + String.valueOf(resultPoint.getLat()); | |
| 830 | 830 | |
| 831 | 831 | } |
| 832 | 832 | |
| ... | ... | @@ -896,6 +896,8 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem |
| 896 | 896 | // 线路 |
| 897 | 897 | arg0.setLine(resultLine); |
| 898 | 898 | |
| 899 | + arg0.setLineCode(resultLine.getLineCode()); | |
| 900 | + | |
| 899 | 901 | // 站点 |
| 900 | 902 | arg0.setStation(station); |
| 901 | 903 | |
| ... | ... | @@ -984,9 +986,33 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem |
| 984 | 986 | String bJwpoints = map.get("bJwpoints").equals("") ? "" : map.get("bJwpoints").toString(); |
| 985 | 987 | |
| 986 | 988 | // WGS经纬度坐标 |
| 987 | - String gJwpoints = map.get("gJwpoints").equals("") ? "" : map.get("gJwpoints").toString(); | |
| 989 | + // String gJwpoints = map.get("gJwpoints").equals("") ? "" : map.get("gJwpoints").toString(); | |
| 990 | + | |
| 991 | + String bJwpointsArray[] =null; | |
| 992 | + | |
| 993 | + if(bJwpoints!=null) { | |
| 994 | + | |
| 995 | + bJwpointsArray = bJwpoints.split(" "); | |
| 996 | + | |
| 997 | + } | |
| 998 | + | |
| 999 | + // WGS经纬度 | |
| 1000 | + Float gLonx = null; | |
| 1001 | + | |
| 1002 | + // WGS纬度 | |
| 1003 | + Float gLaty = null; | |
| 988 | 1004 | |
| 989 | - // 站点地理位置WGS坐标经度 | |
| 1005 | + if(bJwpointsArray.length>0) { | |
| 1006 | + | |
| 1007 | + Location resultPoint = FromBDPointToWGSPoint(bJwpointsArray[0],bJwpointsArray[1]); | |
| 1008 | + | |
| 1009 | + gLonx = (float)resultPoint.getLng(); | |
| 1010 | + | |
| 1011 | + gLaty = (float)resultPoint.getLat(); | |
| 1012 | + | |
| 1013 | + } | |
| 1014 | + | |
| 1015 | + /*// 站点地理位置WGS坐标经度 | |
| 990 | 1016 | String gLonx = ""; |
| 991 | 1017 | |
| 992 | 1018 | // 站点地理位置WGS坐标纬度 |
| ... | ... | @@ -1000,7 +1026,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem |
| 1000 | 1026 | |
| 1001 | 1027 | gLaty = gJwpointsArray[1]; |
| 1002 | 1028 | |
| 1003 | - } | |
| 1029 | + }*/ | |
| 1004 | 1030 | |
| 1005 | 1031 | // 图形类型 |
| 1006 | 1032 | String shapesType = map.get("shapesType").equals("") ? "" : map.get("shapesType").toString(); |
| ... | ... | @@ -1009,10 +1035,43 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem |
| 1009 | 1035 | Integer radius = map.get("radius").equals("") ? null : Integer.parseInt(map.get("radius").toString()); |
| 1010 | 1036 | |
| 1011 | 1037 | // 多边形空间WGS坐标点集合 |
| 1012 | - String gPolygonGrid = map.get("gPolygonGrid").equals("") ? "" : map.get("gPolygonGrid").toString(); | |
| 1038 | + /*String gPolygonGrid = map.get("gPolygonGrid").equals("") ? "" : map.get("gPolygonGrid").toString();*/ | |
| 1013 | 1039 | |
| 1014 | 1040 | // 多边形空间原坐标坐标点集合 |
| 1015 | - String bPolygonGrid = map.get("bPolygonGrid").equals("") ? "" : map.get("bPolygonGrid").toString(); | |
| 1041 | + String bPloygonGrid = map.get("bPolygonGrid").equals("") ? "" : map.get("bPolygonGrid").toString(); | |
| 1042 | + | |
| 1043 | + // 多边形WGS坐标点集合 | |
| 1044 | + String gPloygonGrid =""; | |
| 1045 | + | |
| 1046 | + if(!bPloygonGrid.equals("")) { | |
| 1047 | + | |
| 1048 | + String bPloygonGridArray[] = bPloygonGrid.split(","); | |
| 1049 | + | |
| 1050 | + int bLen_ = bPloygonGridArray.length; | |
| 1051 | + | |
| 1052 | + for(int b = 0 ;b<bLen_;b++) { | |
| 1053 | + | |
| 1054 | + String tempArray[]= bPloygonGridArray[b].split(" "); | |
| 1055 | + | |
| 1056 | + Location resultPoint = FromBDPointToWGSPoint(tempArray[0],tempArray[1]); | |
| 1057 | + | |
| 1058 | + if(b==0) { | |
| 1059 | + | |
| 1060 | + gPloygonGrid = resultPoint.getLng() + " " + resultPoint.getLat(); | |
| 1061 | + | |
| 1062 | + }else { | |
| 1063 | + | |
| 1064 | + gPloygonGrid = gPloygonGrid + ',' + resultPoint.getLng() + " " + resultPoint.getLat(); | |
| 1065 | + | |
| 1066 | + } | |
| 1067 | + | |
| 1068 | + } | |
| 1069 | + | |
| 1070 | + } | |
| 1071 | + | |
| 1072 | + bPloygonGrid = "POLYGON((" + bPloygonGrid +"))"; | |
| 1073 | + | |
| 1074 | + gPloygonGrid = "POLYGON((" + gPloygonGrid +"))"; | |
| 1016 | 1075 | |
| 1017 | 1076 | // 是否撤销 |
| 1018 | 1077 | Integer destroy = map.get("destroy").equals("") ? null : Integer.parseInt(map.get("destroy").toString()); |
| ... | ... | @@ -1028,7 +1087,8 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem |
| 1028 | 1087 | Float y = map.get("y").equals("") ? null : Float.parseFloat(map.get("y").toString()); |
| 1029 | 1088 | |
| 1030 | 1089 | // 更新 |
| 1031 | - repository.stationUpdate(stationCod, stationName, roadCoding, dbType, bJwpoints, gLonx, gLaty, x, y, bPolygonGrid, gPolygonGrid, destroy, radius, shapesType, versions, descriptions, stationId); | |
| 1090 | + repository.stationUpdate(stationCod, stationName, roadCoding, dbType, bJwpoints, gLonx, gLaty, x, y, bPloygonGrid, gPloygonGrid, destroy, radius, shapesType, versions, descriptions, stationId); | |
| 1091 | + | |
| 1032 | 1092 | |
| 1033 | 1093 | // 站点路由Id |
| 1034 | 1094 | Integer stationRouteId = map.get("stationRouteId").equals("") ? null : Integer.parseInt(map.get("stationRouteId").toString()); | ... | ... |
src/main/resources/application.properties
| ... | ... | @@ -9,12 +9,9 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy |
| 9 | 9 | spring.jpa.database= MYSQL |
| 10 | 10 | spring.jpa.show-sql= true |
| 11 | 11 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 12 | -#spring.datasource.url= jdbc:mysql://192.168.168.201:3306/control | |
| 13 | -spring.datasource.url= jdbc:mysql://192.168.168.201:3306/test | |
| 14 | -#spring.datasource.url= jdbc:mysql://localhost:3306/test | |
| 12 | +spring.datasource.url= jdbc:mysql://192.168.168.201:3306/control | |
| 15 | 13 | spring.datasource.username= root |
| 16 | 14 | spring.datasource.password= 123456 |
| 17 | -#spring.datasource.password= | |
| 18 | 15 | |
| 19 | 16 | #DATASOURCE |
| 20 | 17 | spring.datasource.max-active=100 | ... | ... |
src/main/resources/static/pages/base/station/edit.html
| 1 | 1 | <!-- 编辑站点弹出层mobal --> |
| 2 | -<div class="modal fade" id="edit_station_mobal" tabindex="-1" role="basic" aria-hidden="true"> | |
| 2 | +<div class="modal fade" id="editPoitsions_station_mobal" tabindex="-1" role="basic" aria-hidden="true"> | |
| 3 | 3 | |
| 4 | 4 | <div class="modal-dialog"> |
| 5 | 5 | <div class="modal-content"> |
| ... | ... | @@ -36,6 +36,9 @@ |
| 36 | 36 | <!-- 图形坐标点集合(百度坐标) --> |
| 37 | 37 | <input type="hidden" name="bPolygonGrid" id="bPolygonGridInput" /> |
| 38 | 38 | |
| 39 | + | |
| 40 | + <input type="hidden" name="gJwpoints" id="gJwpointsInput"> | |
| 41 | + | |
| 39 | 42 | <!-- 图形坐标点集合(WGS坐标) --> |
| 40 | 43 | <input type="hidden" name="gPolygonGrid" id="gPolygonGridInput" /> |
| 41 | 44 | |
| ... | ... | @@ -139,14 +142,14 @@ |
| 139 | 142 | </div> |
| 140 | 143 | |
| 141 | 144 | <!-- 站点WGS经纬度 --> |
| 142 | - <div class="form-body"> | |
| 145 | + <!-- <div class="form-body"> | |
| 143 | 146 | <div class="form-group"> |
| 144 | 147 | <label class="col-md-3 control-label">站点WGS经纬度:</label> |
| 145 | 148 | <div class="col-md-6"> |
| 146 | 149 | <input type="text" class="form-control" name="gJwpoints" id="gJwpointsInput" placeholder="站点WGS经纬度"> |
| 147 | 150 | </div> |
| 148 | 151 | </div> |
| 149 | - </div> | |
| 152 | + </div> --> | |
| 150 | 153 | |
| 151 | 154 | <!-- 范围图形类型 --> |
| 152 | 155 | <div class="form-body"> |
| ... | ... | @@ -240,29 +243,30 @@ |
| 240 | 243 | </div> |
| 241 | 244 | </div> |
| 242 | 245 | </div> |
| 243 | -<script type="text/javascript"> | |
| 244 | -$(function(){ | |
| 245 | - | |
| 246 | - // 初始化表单值 | |
| 247 | - PublicFunctions.setFormValue(); | |
| 246 | +<script type="text/javascript"> | |
| 247 | + | |
| 248 | +$('#editPoitsions_station_mobal').on('editStationMobal_show', function(e, map,fun,stat){ | |
| 248 | 249 | |
| 249 | 250 | // 获取站点对象信息 |
| 250 | - var stationObjEidtArray = PublicFunctions.getstationObjData(); | |
| 251 | + var editStation = stat.getAddStation(); | |
| 252 | + | |
| 253 | + // 初始化表单值 | |
| 254 | + fun.setFormValue(editStation); | |
| 251 | 255 | |
| 252 | 256 | // 方向 |
| 253 | - var edit_direction_v = stationObjEidtArray[0].stationRoutedirections; | |
| 257 | + var edit_direction_v = editStation.stationRoutedirections; | |
| 254 | 258 | |
| 255 | 259 | // 线路ID |
| 256 | - var lineId = stationObjEidtArray[0].stationRouteLine; | |
| 260 | + var lineId = editStation.stationRouteLine; | |
| 257 | 261 | |
| 258 | 262 | // 获取站点序号元素,并添加下拉属性值 |
| 259 | - PublicFunctions.getStation(lineId,edit_direction_v,function(treeData) { | |
| 263 | + fun.getStation(lineId,edit_direction_v,function(treeData) { | |
| 260 | 264 | |
| 261 | 265 | var options = '<option value="">请选择...</option>'; |
| 262 | 266 | |
| 263 | 267 | var dArray = treeData[0].children[0].children; |
| 264 | 268 | |
| 265 | - var eq_stationRouteCode = stationObjEidtArray[0].stationRouteCode + '_' + stationObjEidtArray[0].stationRouteStationMark; | |
| 269 | + var eq_stationRouteCode = editStation.stationRouteCode + '_' + editStation.stationRouteStationMark; | |
| 266 | 270 | |
| 267 | 271 | for(var i = 0 ; i<dArray.length; i++){ |
| 268 | 272 | |
| ... | ... | @@ -281,7 +285,7 @@ $(function(){ |
| 281 | 285 | |
| 282 | 286 | $('#stationrouteSelect').html(options); |
| 283 | 287 | |
| 284 | - PublicFunctions.findUpStationRouteCode(lineId,edit_direction_v,stationObjEidtArray[0].stationRouteCode,function(str) { | |
| 288 | + fun.findUpStationRouteCode(lineId,edit_direction_v,editStation.stationRouteCode,function(str) { | |
| 285 | 289 | |
| 286 | 290 | if(str.length>0){ |
| 287 | 291 | |
| ... | ... | @@ -296,15 +300,31 @@ $(function(){ |
| 296 | 300 | }); |
| 297 | 301 | |
| 298 | 302 | // 显示mobal |
| 299 | - $('#edit_station_mobal').modal({show : true,backdrop: 'static',keyboard: false}); | |
| 303 | + $('#editPoitsions_station_mobal').modal({show : true,backdrop: 'static',keyboard: false}); | |
| 300 | 304 | |
| 301 | 305 | // 当调用 hide 实例方法时触发 |
| 302 | - $('#edit_station_mobal').on('hide.bs.modal', function () { | |
| 306 | + $('#editPoitsions_station_mobal').on('hide.bs.modal', function () { | |
| 303 | 307 | |
| 304 | - PublicFunctions.clearRefresh(); | |
| 308 | + closeMobleSetClean(); | |
| 305 | 309 | |
| 306 | 310 | }); |
| 307 | 311 | |
| 312 | + function closeMobleSetClean() { | |
| 313 | + | |
| 314 | + $('#eidt').attr("disabled",false); | |
| 315 | + | |
| 316 | + $('#eidt').removeClass('btn disabled'); | |
| 317 | + | |
| 318 | + $('#eidt').addClass('btn'); | |
| 319 | + | |
| 320 | + // 清除地图覆盖物 | |
| 321 | + map.clearMarkAndOverlays(); | |
| 322 | + | |
| 323 | + var stationId = editStation.stationRouteId; | |
| 324 | + | |
| 325 | + fun.initStationInfo(stationId); | |
| 326 | + | |
| 327 | + } | |
| 308 | 328 | |
| 309 | 329 | // 编辑表单元素 |
| 310 | 330 | var form = $('#edit_station_form'); |
| ... | ... | @@ -434,7 +454,7 @@ $(function(){ |
| 434 | 454 | error.hide(); |
| 435 | 455 | console.log(params); |
| 436 | 456 | return ; |
| 437 | - PublicFunctions.stationUpdate(params,function(resuntDate) { | |
| 457 | + fun.stationUpdate(params,function(resuntDate) { | |
| 438 | 458 | |
| 439 | 459 | if(resuntDate.status=='SUCCESS') { |
| 440 | 460 | |
| ... | ... | @@ -449,10 +469,12 @@ $(function(){ |
| 449 | 469 | } |
| 450 | 470 | |
| 451 | 471 | // 隐藏弹出层mobal |
| 452 | - $('#edit_station_mobal').modal('hide'); | |
| 472 | + $('#editPoitsions_station_mobal').modal('hide'); | |
| 473 | + | |
| 474 | + closeMobleSetClean(); | |
| 453 | 475 | |
| 454 | 476 | // 刷新站点数据 |
| 455 | - PublicFunctions.clearRefresh(); | |
| 477 | + /* PublicFunctions.clearRefresh(); */ | |
| 456 | 478 | }); |
| 457 | 479 | } |
| 458 | 480 | }); |
| ... | ... | @@ -466,8 +488,6 @@ $(function(){ |
| 466 | 488 | |
| 467 | 489 | var tempStr = stationRValue.split('_'); |
| 468 | 490 | |
| 469 | - console.log(tempStr); | |
| 470 | - | |
| 471 | 491 | if(tempStr[1] == 'E') { |
| 472 | 492 | |
| 473 | 493 | $('#stationMarkSelect').val('E'); |
| ... | ... | @@ -521,7 +541,7 @@ $(function(){ |
| 521 | 541 | |
| 522 | 542 | var stationMarkV = $('#stationdirSelect').val(); |
| 523 | 543 | |
| 524 | - if(stationMarkV!=stationObjEidtArray[0].stationRoutedirections){ | |
| 544 | + if(stationMarkV!=editStation.stationRoutedirections){ | |
| 525 | 545 | |
| 526 | 546 | tel = false; |
| 527 | 547 | |
| ... | ... | @@ -530,5 +550,5 @@ $(function(){ |
| 530 | 550 | return tel; |
| 531 | 551 | }, '方向必须一致!'); |
| 532 | 552 | |
| 533 | -}); | |
| 553 | +}); | |
| 534 | 554 | </script> |
| 535 | 555 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/station/edit_select.html
| 1 | 1 | <!-- 选择编辑站点方式弹出层mobal --> |
| 2 | -<div class="modal fade" id="edit_select_mobal" tabindex="-1" role="basic" aria-hidden="true"> | |
| 2 | +<div class="modal fade" id="editPositions_select_mobal" tabindex="-1" role="basic" aria-hidden="true"> | |
| 3 | 3 | |
| 4 | 4 | <div class="modal-dialog"> |
| 5 | 5 | |
| ... | ... | @@ -75,22 +75,18 @@ |
| 75 | 75 | </div> |
| 76 | 76 | <script type="text/javascript"> |
| 77 | 77 | |
| 78 | -$(function(){ | |
| 78 | +$('#editPositions_select_mobal').on('editSelectMobal_show', function(e, map,drm,fun,statn){ | |
| 79 | 79 | |
| 80 | - var stationObjEditSelect = PublicFunctions.getstationObjData(); | |
| 81 | - | |
| 82 | - var editSelectMapB = WorldsBMap.getMapBValue(); | |
| 83 | - | |
| 84 | - var editSelectDrawingManager = WorldsBMap.getDrawingManagerValue(); | |
| 80 | + var EditStation = statn.getAddStation(); | |
| 85 | 81 | |
| 86 | 82 | // 显示选择修改方式弹出层 |
| 87 | - $('#edit_select_mobal').modal({show : true,backdrop: 'static',keyboard: false}); | |
| 83 | + $('#editPositions_select_mobal').modal({show : true,backdrop: 'static',keyboard: false}); | |
| 88 | 84 | |
| 89 | 85 | // 获取站点名称元素并赋值 |
| 90 | - $('#stationNamebootboxInput').val(stationObjEditSelect[0].stationName); | |
| 86 | + $('#stationNamebootboxInput').val(EditStation.stationName); | |
| 91 | 87 | |
| 92 | 88 | // 定义站点图形类型 |
| 93 | - var stationShapesTypeV = stationObjEditSelect[0].stationShapesType; | |
| 89 | + var stationShapesTypeV = EditStation.stationShapesType; | |
| 94 | 90 | |
| 95 | 91 | // 获取表单元素 |
| 96 | 92 | var form = $('#edit_select'); |
| ... | ... | @@ -158,7 +154,7 @@ $(function(){ |
| 158 | 154 | submitHandler : function(f) { |
| 159 | 155 | |
| 160 | 156 | // 隐藏弹出层 |
| 161 | - $('#edit_select_mobal').modal('hide'); | |
| 157 | + $('#editPositions_select_mobal').modal('hide'); | |
| 162 | 158 | |
| 163 | 159 | $('#eidt').attr("disabled",true); |
| 164 | 160 | |
| ... | ... | @@ -170,47 +166,19 @@ $(function(){ |
| 170 | 166 | // 站点名称 |
| 171 | 167 | var editStationName = params.stationNamebootbox; |
| 172 | 168 | |
| 173 | - WorldsBMap.localSearchFromAdreesToPoint(editStationName,editSelectMapB,function(Points) { | |
| 174 | - | |
| 175 | - if(Points) { | |
| 176 | - | |
| 177 | - var BJwpointsArray = Points.split(' '); | |
| 178 | - | |
| 179 | - var stationNameChangePoint = new BMap.Point(BJwpointsArray[0], BJwpointsArray[1]); | |
| 180 | - | |
| 181 | - var marker_stargt2 = new BMap.Marker(stationNameChangePoint); | |
| 182 | - | |
| 183 | - var PanOptions ={noAnimation :true}; | |
| 184 | - | |
| 185 | - editSelectMapB.panTo(stationNameChangePoint,PanOptions); | |
| 186 | - | |
| 187 | - editSelectMapB.panBy(0,-200); | |
| 188 | - | |
| 189 | - // 将标注添加到地图中 | |
| 190 | - editSelectMapB.addOverlay(marker_stargt2); | |
| 191 | - | |
| 192 | - //跳动的动画 | |
| 193 | - marker_stargt2.setAnimation(BMAP_ANIMATION_BOUNCE); | |
| 194 | - | |
| 195 | - } | |
| 196 | - | |
| 197 | - }); | |
| 198 | - | |
| 199 | 169 | // 设置站点名称 |
| 200 | - PublicFunctions.setStationNameValue(editStationName); | |
| 170 | + statn.setEitdStationName(editStationName); | |
| 201 | 171 | |
| 202 | 172 | var eidtselect_ = params.editselect; |
| 203 | 173 | |
| 204 | 174 | if(eidtselect_==0){ |
| 205 | 175 | |
| 206 | - // 清楚地图覆盖物 | |
| 207 | - editSelectMapB.clearOverlays(); | |
| 176 | + StationPositionsWorldsBMap.clearMarkAndOverlays(); | |
| 208 | 177 | |
| 209 | - // 打开鼠标绘画工具 | |
| 210 | - editSelectDrawingManager.open(); | |
| 178 | + // 打开绘制工具 | |
| 179 | + PositionsDrawingManagerObj.openDrawingManager(); | |
| 211 | 180 | |
| 212 | - // 设置属性 | |
| 213 | - editSelectDrawingManager.setDrawingMode(BMAP_DRAWING_POLYGON); | |
| 181 | + StationPositionsWorldsBMap.localtionPoint(editStationName); | |
| 214 | 182 | |
| 215 | 183 | |
| 216 | 184 | }else if(eidtselect_==1){ |
| ... | ... | @@ -219,21 +187,13 @@ $(function(){ |
| 219 | 187 | var mindex = layer.msg('编辑完图形后,请双击图形区域保存',{ offset: '126px', |
| 220 | 188 | shift: 0,time: 10000}); |
| 221 | 189 | |
| 222 | - var markerEidtSelect = PublicFunctions.getMarkerObj(); | |
| 223 | - | |
| 224 | - // 关闭信息窗口 | |
| 225 | - markerEidtSelect.closeInfoWindow(); | |
| 226 | - | |
| 227 | - // 清除marker | |
| 228 | - editSelectMapB.removeOverlay(markerEidtSelect); | |
| 229 | - | |
| 230 | 190 | // 编辑图形 |
| 231 | - WorldsBMap.editShapes(stationShapesTypeV,mindex); | |
| 191 | + StationPositionsWorldsBMap.editShapes(stationShapesTypeV,mindex); | |
| 232 | 192 | |
| 233 | 193 | }else if(eidtselect_==2){ |
| 234 | 194 | |
| 235 | 195 | // 系统引用 |
| 236 | - $('#edit_select_mobal').modal('hide'); | |
| 196 | + $('#editPositions_select_mobal').modal('hide'); | |
| 237 | 197 | |
| 238 | 198 | $.get('station_tabledate.html', function(m){$(pjaxContainer).append(m);}); |
| 239 | 199 | ... | ... |
src/main/resources/static/pages/base/station/js/positionsdrwmager.js
0 → 100644
| 1 | +var PositionsDrawingManagerObj = function () { | |
| 2 | + | |
| 3 | + // 创建鼠标绘制管理类 | |
| 4 | + var drawingManager = ''; | |
| 5 | + | |
| 6 | + var draMangerObj = { | |
| 7 | + | |
| 8 | + /** 初始化绘制工具类 */ | |
| 9 | + init : function(map,styleOptions) { | |
| 10 | + | |
| 11 | + drawingManager = new BMapLib.DrawingManager(map, { | |
| 12 | + | |
| 13 | + //是否开启绘制模式 | |
| 14 | + isOpen : false, | |
| 15 | + | |
| 16 | + //是否显示工具栏 | |
| 17 | + enableDrawingTool : false, | |
| 18 | + | |
| 19 | + drawingToolOptions : { | |
| 20 | + | |
| 21 | + //位置 | |
| 22 | + anchor : BMAP_ANCHOR_TOP_RIGHT, | |
| 23 | + | |
| 24 | + //偏离值 | |
| 25 | + offset : new BMap.Size(5, 5), | |
| 26 | + | |
| 27 | + //工具栏缩放比例 | |
| 28 | + scale : 0.8 | |
| 29 | + | |
| 30 | + }, | |
| 31 | + | |
| 32 | + //线的样式 | |
| 33 | + polygonOptions : styleOptions | |
| 34 | + | |
| 35 | + }); | |
| 36 | + | |
| 37 | + // 添加绘画完成事件 | |
| 38 | + drawingManager.addEventListener('polygoncomplete', function(e) { | |
| 39 | + | |
| 40 | + drawingManager.close; | |
| 41 | + | |
| 42 | + if (e.getPath().length <= 2) { | |
| 43 | + | |
| 44 | + // 弹出提示消息 | |
| 45 | + layer.msg('坐标点不能小于等于两个...'); | |
| 46 | + | |
| 47 | + // 清除地图覆盖物 | |
| 48 | + StationPositionsWorldsBMap.clearMarkAndOverlays(); | |
| 49 | + | |
| 50 | + var addStation = PositionsStationObj.getAddStation(); | |
| 51 | + | |
| 52 | + var stationId = addStation.stationId; | |
| 53 | + | |
| 54 | + PositionsPublicFunctions.initStationInfo(stationId); | |
| 55 | + | |
| 56 | + PositionsStationObj.setAddStation({}); | |
| 57 | + | |
| 58 | + return false; | |
| 59 | + | |
| 60 | + }else { | |
| 61 | + | |
| 62 | + var pointE = e; | |
| 63 | + | |
| 64 | + // 多变行质心点 | |
| 65 | + var addSttationPoints_ = pointE.getBounds().getCenter().lng+ ' ' + pointE.getBounds().getCenter().lat; | |
| 66 | + | |
| 67 | + var addPolyGonLen_ = pointE.getPath().length; | |
| 68 | + | |
| 69 | + for(var k =0;k<addPolyGonLen_;k++) { | |
| 70 | + | |
| 71 | + if(k==0) { | |
| 72 | + | |
| 73 | + bPloygonGrid = pointE.getPath()[k].lng + ' ' + pointE.getPath()[k].lat; | |
| 74 | + | |
| 75 | + }else { | |
| 76 | + | |
| 77 | + bPloygonGrid = bPloygonGrid + ',' + pointE.getPath()[k].lng + ' ' + pointE.getPath()[k].lat; | |
| 78 | + | |
| 79 | + } | |
| 80 | + | |
| 81 | + } | |
| 82 | + | |
| 83 | + bPloygonGrid = bPloygonGrid + ',' + pointE.getPath()[0].lng + ' ' + pointE.getPath()[0].lat; | |
| 84 | + | |
| 85 | + /** 设置修改站点集合对象站点中心点百度坐标属性值 @param:<bJwpoints:中心点百度坐标) */ | |
| 86 | + PositionsStationObj.setEitdStationBJwpoints(addSttationPoints_); | |
| 87 | + | |
| 88 | + /** 设置修改站点集合对象范围图形类型属性值 @param:<shapesType:范围图形类型) */ | |
| 89 | + PositionsStationObj.setEitdStationShapesType('d'); | |
| 90 | + | |
| 91 | + /** 设置修改站点集合对象圆形半径属性值 @param:<radius:圆形半径) */ | |
| 92 | + PositionsStationObj.setEitdStationRadius(''); | |
| 93 | + | |
| 94 | + /** 设置修改站点集合对象图形百度坐标集合属性值 @param:<bPolygonGrid:图形百度坐标集合) */ | |
| 95 | + PositionsStationObj.setEitdBPolygonGrid(bPloygonGrid); | |
| 96 | + | |
| 97 | + $.get('edit.html', function(m){ | |
| 98 | + | |
| 99 | + $(pjaxContainer).append(m); | |
| 100 | + | |
| 101 | + $('#editPoitsions_station_mobal').trigger('editStationMobal_show', [StationPositionsWorldsBMap,PositionsPublicFunctions,PositionsStationObj]); | |
| 102 | + | |
| 103 | + }); | |
| 104 | + } | |
| 105 | + | |
| 106 | + }); | |
| 107 | + | |
| 108 | + return drawingManager; | |
| 109 | + | |
| 110 | + }, | |
| 111 | + | |
| 112 | + openDrawingManager : function() { | |
| 113 | + | |
| 114 | + // 打开鼠标绘画工具 | |
| 115 | + drawingManager.open(); | |
| 116 | + | |
| 117 | + // 设置属性 | |
| 118 | + drawingManager.setDrawingMode(BMAP_DRAWING_POLYGON); | |
| 119 | + | |
| 120 | + } | |
| 121 | + } | |
| 122 | + | |
| 123 | + return draMangerObj; | |
| 124 | + | |
| 125 | +}(); | |
| 0 | 126 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/station/js/positionstation.js
0 → 100644
| 1 | +var PositionsStationObj = function () { | |
| 2 | + | |
| 3 | + /** 定义新增站点对象 */ | |
| 4 | + var station={}; | |
| 5 | + | |
| 6 | + var stationObj = { | |
| 7 | + | |
| 8 | + /** 获取新增站点集合对象 @return:<station:新增站点对象> */ | |
| 9 | + getAddStation : function() { | |
| 10 | + | |
| 11 | + return station; | |
| 12 | + }, | |
| 13 | + | |
| 14 | + /** 设置新增站点集合对象为空 */ | |
| 15 | + setAddStation : function(r) { | |
| 16 | + | |
| 17 | + station = r; | |
| 18 | + | |
| 19 | + }, | |
| 20 | + | |
| 21 | + /** 设置新增站点集合对象方向属性值 @param:<dir:方向(0:上行;1:下行)> */ | |
| 22 | + setAddStationDiraction : function(dir) { | |
| 23 | + | |
| 24 | + station.dir = dir; | |
| 25 | + }, | |
| 26 | + | |
| 27 | + /** 设置新增站点集合对象站点名称属性值 @param:<name:站点名称) */ | |
| 28 | + setEitdStationName : function(name) { | |
| 29 | + | |
| 30 | + station.stationName = name; | |
| 31 | + | |
| 32 | + }, | |
| 33 | + | |
| 34 | + /** 设置新增站点集合对象站点中心点百度坐标属性值 @param:<bJwpoints:中心点百度坐标) */ | |
| 35 | + setEitdStationBJwpoints : function(bJwpoints) { | |
| 36 | + | |
| 37 | + station.stationJwpoints = bJwpoints; | |
| 38 | + }, | |
| 39 | + | |
| 40 | + /** 设置新增站点集合对象范围图形类型属性值 @param:<shapesType:范围图形类型) */ | |
| 41 | + setEitdStationShapesType : function(shapesType) { | |
| 42 | + | |
| 43 | + station.stationShapesType = shapesType; | |
| 44 | + }, | |
| 45 | + | |
| 46 | + /** 设置新增站点集合对象圆形半径属性值 @param:<radius:圆形半径) */ | |
| 47 | + setEitdStationRadius : function(radius) { | |
| 48 | + | |
| 49 | + station.stationRadius = radius; | |
| 50 | + }, | |
| 51 | + | |
| 52 | + /** 设置新增站点集合对象图形百度坐标集合属性值 @param:<bPolygonGrid:图形百度坐标集合) */ | |
| 53 | + setEitdBPolygonGrid : function(bPolygonGrid) { | |
| 54 | + | |
| 55 | + station.stationBPolyonGrid = bPolygonGrid; | |
| 56 | + } | |
| 57 | + } | |
| 58 | + | |
| 59 | + return stationObj; | |
| 60 | + | |
| 61 | +}(); | |
| 0 | 62 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/station/js/station-positions-events.js
| ... | ... | @@ -11,7 +11,13 @@ $(function(){ |
| 11 | 11 | // 修改上行站点mobal页面 |
| 12 | 12 | $('.dropdown-menu #eidt').on('click', function(){ |
| 13 | 13 | |
| 14 | - $.get('edit_select.html', function(m){$(pjaxContainer).append(m);}); | |
| 14 | + $.get('edit_select.html', function(m){ | |
| 15 | + | |
| 16 | + $(pjaxContainer).append(m); | |
| 17 | + | |
| 18 | + $('#editPositions_select_mobal').trigger('editSelectMobal_show', [StationPositionsWorldsBMap,PositionsDrawingManagerObj,PositionsPublicFunctions,PositionsStationObj]); | |
| 19 | + | |
| 20 | + }); | |
| 15 | 21 | |
| 16 | 22 | }); |
| 17 | 23 | ... | ... |
src/main/resources/static/pages/base/station/js/station-positions-function.js
| ... | ... | @@ -2,31 +2,17 @@ |
| 2 | 2 | * 函数 |
| 3 | 3 | */ |
| 4 | 4 | |
| 5 | -var PublicFunctions = function () { | |
| 6 | - | |
| 7 | - var stationObj = ''; | |
| 8 | - | |
| 9 | - var stationId = ''; | |
| 10 | - | |
| 11 | - var mapB = ''; | |
| 12 | - | |
| 13 | - var circle = ''; | |
| 14 | - | |
| 15 | - var polygon = ''; | |
| 16 | - | |
| 17 | - var marker =''; | |
| 18 | - | |
| 5 | +var PositionsPublicFunctions = function () { | |
| 6 | + | |
| 19 | 7 | var PubFun = { |
| 20 | 8 | |
| 21 | - initStationInfo : function(id,map_) { | |
| 22 | - | |
| 23 | - stationId = id; | |
| 9 | + initStationInfo : function(id) { | |
| 24 | 10 | |
| 25 | - mapB = map_; | |
| 26 | - | |
| 27 | - PublicFunctions.getStationRouteInfo(stationId,function(r) { | |
| 11 | + PositionsPublicFunctions.getStationRouteInfo(id,function(r) { | |
| 12 | + | |
| 13 | + var Station = r[0]; | |
| 28 | 14 | |
| 29 | - stationObj = r; | |
| 15 | + PositionsStationObj.setAddStation(Station); | |
| 30 | 16 | |
| 31 | 17 | var len = r.length; |
| 32 | 18 | |
| ... | ... | @@ -41,13 +27,13 @@ var PublicFunctions = function () { |
| 41 | 27 | var point = new BMap.Point(BJwpoints[0], BJwpoints[1]); |
| 42 | 28 | |
| 43 | 29 | var htm = '<HR style="border:1 dashed #987cb9" width="100%" color=#987cb9 SIZE=1>'+ |
| 44 | - '<span style="color:#DDD;font-size: 15px;">站点名称:' + r[0].stationName + '</span>' + | |
| 45 | - '<span class="help-block" style="color:#DDD;font-size: 15px;">站点编码:' + r[0].stationCode + '</span>' + | |
| 46 | - '<span class="help-block" style="color:#DDD;font-size: 15px;">站点序号:' + r[0].stationRouteCode + '</span>' + | |
| 47 | - '<span class="help-block" style="color:#DDD;font-size: 15px;">纬度坐标:' + r[0].stationJwpoints + '</span>' + | |
| 48 | - '<span class="help-block" style="color:#DDD;font-size: 15px;">范围半径:' + r[0].stationRadius + '</span>' + | |
| 49 | - '<span class="help-block" style="color:#DDD;font-size: 15px;">版本 号:' + r[0].stationRouteVersions + '</span>' + | |
| 50 | - '<span class="help-block" style="width: 100%;font-size: 15px;;color:#DDD; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; " title="'+ 'ddd' +'" >说明/描述:' + 'ddd' + '</span>' ; | |
| 30 | + '<span style="color:#DDD;font-size: 15px;">站点名称:' + r[0].stationName + '</span>' + | |
| 31 | + '<span class="help-block" style="color:#DDD;font-size: 15px;">站点编码:' + r[0].stationCode + '</span>' + | |
| 32 | + '<span class="help-block" style="color:#DDD;font-size: 15px;">站点序号:' + r[0].stationRouteCode + '</span>' + | |
| 33 | + '<span class="help-block" style="color:#DDD;font-size: 15px;">纬度坐标:' + r[0].stationJwpoints + '</span>' + | |
| 34 | + '<span class="help-block" style="color:#DDD;font-size: 15px;">范围半径:' + r[0].stationRadius + '</span>' + | |
| 35 | + '<span class="help-block" style="color:#DDD;font-size: 15px;">版本 号:' + r[0].stationRouteVersions + '</span>' + | |
| 36 | + '<span class="help-block" style="width: 100%;font-size: 15px;;color:#DDD; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; " title="'+ 'ddd' +'" >说明/描述:' + 'ddd' + '</span>' ; | |
| 51 | 37 | |
| 52 | 38 | // 信息窗口参数属性 |
| 53 | 39 | var opts = { |
| ... | ... | @@ -59,7 +45,7 @@ var PublicFunctions = function () { |
| 59 | 45 | height : 450, |
| 60 | 46 | |
| 61 | 47 | // 信息窗位置偏移值。 |
| 62 | - offset: new BMap.Size(500,-80), | |
| 48 | + offset: new BMap.Size(500,80), | |
| 63 | 49 | |
| 64 | 50 | //标题 |
| 65 | 51 | title : '<h4 style="color:#FFFFFF">'+r[0].stationName+'站详情</h4>', |
| ... | ... | @@ -77,12 +63,12 @@ var PublicFunctions = function () { |
| 77 | 63 | if(stationShapesType == 'r') { |
| 78 | 64 | |
| 79 | 65 | // 画圆 |
| 80 | - PublicFunctions.pointsCircle(r,point,htm,opts,mapB); | |
| 66 | + StationPositionsWorldsBMap.pointsCircle(r,point,htm,opts); | |
| 81 | 67 | |
| 82 | 68 | }else if(stationShapesType == 'd'){ |
| 83 | 69 | |
| 84 | 70 | // 画多边形 |
| 85 | - PublicFunctions.pointsPolygon(r,point,htm,opts,mapB); | |
| 71 | + StationPositionsWorldsBMap.pointsPolygon(r,point,htm,opts); | |
| 86 | 72 | |
| 87 | 73 | } |
| 88 | 74 | |
| ... | ... | @@ -167,64 +153,58 @@ var PublicFunctions = function () { |
| 167 | 153 | |
| 168 | 154 | }, |
| 169 | 155 | |
| 170 | - setFormValue : function() { | |
| 156 | + setFormValue : function(stationObj) { | |
| 171 | 157 | |
| 172 | 158 | // 站点ID |
| 173 | - $('#stationIdInput').val(stationObj[0].stationId); | |
| 159 | + $('#stationIdInput').val(stationObj.stationId); | |
| 174 | 160 | |
| 175 | 161 | // 站点路由ID |
| 176 | - $('#stationRouteIdInput').val(stationObj[0].stationRouteId); | |
| 162 | + $('#stationRouteIdInput').val(stationObj.stationRouteId); | |
| 177 | 163 | |
| 178 | 164 | // 站点路由线路Id |
| 179 | - $('#stationRouteLineInput').val(stationObj[0].stationRouteLine); | |
| 165 | + $('#stationRouteLineInput').val(stationObj.stationRouteLine); | |
| 180 | 166 | |
| 181 | 167 | // 线路编码 |
| 182 | - $('#lineCodeInput').val(stationObj[0].stationRouteLIneCode); | |
| 168 | + $('#lineCodeInput').val(stationObj.stationRouteLIneCode); | |
| 183 | 169 | |
| 184 | 170 | // WGS坐标点图形集合 |
| 185 | - $('#bPolygonGridInput').val(stationObj[0].stationBPolyonGrid); | |
| 186 | - | |
| 187 | - // 百度坐标点图形集合 | |
| 188 | - /*$('#gPolygonGridInput').val(stationObj[0].stationGPloyonGrid);*/ | |
| 171 | + $('#bPolygonGridInput').val(stationObj.stationBPolyonGrid); | |
| 189 | 172 | |
| 190 | 173 | // 获取站点名称元素设值 |
| 191 | - $('#stationNameInput').val(stationObj[0].stationName); | |
| 174 | + $('#stationNameInput').val(stationObj.stationName); | |
| 192 | 175 | |
| 193 | 176 | // 获取站点编码元素设值 |
| 194 | - $('#stationCodInput').val(stationObj[0].stationCode); | |
| 177 | + $('#stationCodInput').val(stationObj.stationCode); | |
| 195 | 178 | |
| 196 | 179 | // 获取站点类型元素设值 |
| 197 | - $('#stationMarkSelect').val(stationObj[0].stationRouteStationMark); | |
| 180 | + $('#stationMarkSelect').val(stationObj.stationRouteStationMark); | |
| 198 | 181 | |
| 199 | 182 | // 获取站点方向元素设值 |
| 200 | - $('#stationdirSelect').val(stationObj[0].stationRoutedirections); | |
| 183 | + $('#stationdirSelect').val(stationObj.stationRoutedirections); | |
| 201 | 184 | |
| 202 | 185 | // 获取站点道路编码元素设值 |
| 203 | - $('#roadCodingCodInput').val(stationObj[0].stationRoadCoding); | |
| 186 | + $('#roadCodingCodInput').val(stationObj.stationRoadCoding); | |
| 204 | 187 | |
| 205 | 188 | // 百度地图经纬度坐标中心点 |
| 206 | - $('#bJwpointsInput').val(stationObj[0].stationJwpoints); | |
| 207 | - | |
| 208 | - // WGS经纬度 | |
| 209 | - /*$('#gJwpointsInput').val(stationObj[0].stationGlonx + ' ' + stationObj[0].stationGlaty);*/ | |
| 189 | + $('#bJwpointsInput').val(stationObj.stationJwpoints); | |
| 210 | 190 | |
| 211 | 191 | // 获取图形类型元素,并添加值 |
| 212 | - $('#shapesTypeSelect').val(stationObj[0].stationShapesType); | |
| 192 | + $('#shapesTypeSelect').val(stationObj.stationShapesType); | |
| 213 | 193 | |
| 214 | 194 | // 获取半径元素,并添加值 |
| 215 | - $('#radiusInput').val(stationObj[0].stationRadius); | |
| 195 | + $('#radiusInput').val(stationObj.stationRadius); | |
| 216 | 196 | |
| 217 | 197 | // 是否撤销 |
| 218 | - $('#destroySelect').val(stationObj[0].stationRouteDestroy); | |
| 198 | + $('#destroySelect').val(stationObj.stationRouteDestroy); | |
| 219 | 199 | |
| 220 | 200 | // 到站时间 |
| 221 | - $('#toTimeInput').val(stationObj[0].stationRouteToTime); | |
| 201 | + $('#toTimeInput').val(stationObj.stationRouteToTime); | |
| 222 | 202 | |
| 223 | 203 | // 到站距离 |
| 224 | - $('#distancesInput').val(stationObj[0].stationRouteDistances); | |
| 204 | + $('#distancesInput').val(stationObj.stationRouteDistances); | |
| 225 | 205 | |
| 226 | 206 | // 描述/说明 |
| 227 | - $('#descriptionsTextarea').val(stationObj[0].stationRouteDescriptions); | |
| 207 | + $('#descriptionsTextarea').val(stationObj.stationRouteDescriptions); | |
| 228 | 208 | |
| 229 | 209 | }, |
| 230 | 210 | |
| ... | ... | @@ -263,114 +243,6 @@ var PublicFunctions = function () { |
| 263 | 243 | |
| 264 | 244 | }, |
| 265 | 245 | |
| 266 | - pointsPolygon : function(r,pointPolygon,htm,opts_polygon,map) { | |
| 267 | - | |
| 268 | - // 获取多边形坐标字符串 | |
| 269 | - var stationBPolygonGrid = r[0].stationBPolyonGrid; | |
| 270 | - | |
| 271 | - // 截取多边形坐标字符串 | |
| 272 | - var stationBPolygonGridStr = stationBPolygonGrid.substring(9,stationBPolygonGrid.length-2); | |
| 273 | - | |
| 274 | - // 按逗号切割 | |
| 275 | - var pointPolygonArray = stationBPolygonGridStr.split(','); | |
| 276 | - | |
| 277 | - // 多边形坐标集合 | |
| 278 | - var polygonP = []; | |
| 279 | - | |
| 280 | - for(var v = 0;v<pointPolygonArray.length;v++) { | |
| 281 | - | |
| 282 | - polygonP.push(new BMap.Point(pointPolygonArray[v].split(" ")[0],pointPolygonArray[v].split(" ")[1])); | |
| 283 | - | |
| 284 | - } | |
| 285 | - | |
| 286 | - // 画多边形 | |
| 287 | - polygon = new BMap.Polygon(polygonP, { | |
| 288 | - | |
| 289 | - // 线条显色 | |
| 290 | - strokeColor : "blue", | |
| 291 | - | |
| 292 | - // 边线的宽度,以像素为单位。 | |
| 293 | - strokeWeight : 2, | |
| 294 | - | |
| 295 | - // 边线透明度,取值范围0 - 1。 | |
| 296 | - strokeOpacity : 0.5 | |
| 297 | - }); | |
| 298 | - | |
| 299 | - // 增加地图覆盖物多边形 | |
| 300 | - map.addOverlay(polygon); | |
| 301 | - | |
| 302 | - // 创建信息窗口 | |
| 303 | - infoWindow = new BMap.InfoWindow(htm, opts_polygon); | |
| 304 | - | |
| 305 | - // 自定义标注物图片 | |
| 306 | - var icon_target = new BMap.Icon('/pages/base/stationroute/css/img/cz.png',new BMap.Size(20, 20)); | |
| 307 | - | |
| 308 | - // 创建点 | |
| 309 | - marker = new BMap.Marker(pointPolygon,{icon : icon_target}); | |
| 310 | - | |
| 311 | - // 把标注添物加到地图上 | |
| 312 | - map.addOverlay(marker); | |
| 313 | - | |
| 314 | - // 是否在平移过程中禁止动画。(自1.2新增) | |
| 315 | - var PanOptions_ ={noAnimation :true}; | |
| 316 | - | |
| 317 | - // 将地图的中心点更改为给定的点。 | |
| 318 | - map.panTo(pointPolygon,PanOptions_); | |
| 319 | - | |
| 320 | - // 将地图在水平位置上移动x像素,垂直位置上移动y像素。 | |
| 321 | - map.panBy(10,110,PanOptions_); | |
| 322 | - | |
| 323 | - //开启信息窗口 | |
| 324 | - marker.openInfoWindow(infoWindow,pointPolygon); | |
| 325 | - | |
| 326 | - }, | |
| 327 | - | |
| 328 | - pointsCircle : function(r,point,htm,opts,map) { | |
| 329 | - | |
| 330 | - //创建圆 | |
| 331 | - circle = new BMap.Circle(point,r[0].stationRadius,{strokeColor:"blue", strokeWeight:2, strokeOpacity:0.5}); | |
| 332 | - | |
| 333 | - // 允许覆盖物在map.clearOverlays方法中被清除 | |
| 334 | - circle.enableMassClear(); | |
| 335 | - | |
| 336 | - // 百度地图添加覆盖物圆 | |
| 337 | - map.addOverlay(circle); | |
| 338 | - | |
| 339 | - // 创建信息窗口 | |
| 340 | - infoWindow = new BMap.InfoWindow(htm, opts); | |
| 341 | - | |
| 342 | - // 自定义标注物图片 | |
| 343 | - var icon_target = new BMap.Icon('/pages/base/stationroute/css/img/cz.png',new BMap.Size(20, 20)); | |
| 344 | - | |
| 345 | - // 创建点 | |
| 346 | - marker = new BMap.Marker(point,{icon : icon_target}); | |
| 347 | - | |
| 348 | - // 把标注添物加到地图上 | |
| 349 | - map.addOverlay(marker); | |
| 350 | - | |
| 351 | - setTimeout(function(){ | |
| 352 | - //开启信息窗口 | |
| 353 | - marker.openInfoWindow(infoWindow,point); | |
| 354 | - | |
| 355 | - },100); | |
| 356 | - | |
| 357 | - // 是否在平移过程中禁止动画。(自1.2新增) | |
| 358 | - var PanOptions_ ={noAnimation :true}; | |
| 359 | - | |
| 360 | - // 将地图的中心点更改为给定的点。 | |
| 361 | - map.panTo(point,PanOptions_); | |
| 362 | - | |
| 363 | - //map.panBy(10,-50,PanOptions_); | |
| 364 | - | |
| 365 | - // 添加标志物监听事件 | |
| 366 | - marker.addEventListener("click",function() { | |
| 367 | - | |
| 368 | - //开启信息窗口 | |
| 369 | - marker.openInfoWindow(infoWindow,point); | |
| 370 | - | |
| 371 | - }); | |
| 372 | - }, | |
| 373 | - | |
| 374 | 246 | // 站点更新 |
| 375 | 247 | stationUpdate : function(station,callback) { |
| 376 | 248 | ... | ... |
src/main/resources/static/pages/base/station/js/station-positions-map.js
| ... | ... | @@ -3,9 +3,9 @@ |
| 3 | 3 | * |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | -var WorldsBMap = function () { | |
| 6 | +var StationPositionsWorldsBMap = function () { | |
| 7 | 7 | |
| 8 | - var mapBValue = '',drawingManagerInit=''; | |
| 8 | + var mapBValue = '',marker='',polygon=''; | |
| 9 | 9 | |
| 10 | 10 | var Bmap = { |
| 11 | 11 | |
| ... | ... | @@ -51,322 +51,234 @@ var WorldsBMap = function () { |
| 51 | 51 | return mapBValue; |
| 52 | 52 | }, |
| 53 | 53 | |
| 54 | - initDrawingManager : function(map,styleOptions) { | |
| 54 | + pointsCircle : function(r,point,htm,opts) { | |
| 55 | 55 | |
| 56 | - // 创建鼠标绘制管理类 | |
| 57 | - drawingManagerInit = new BMapLib.DrawingManager(map, { | |
| 58 | - | |
| 59 | - //是否开启绘制模式 | |
| 60 | - isOpen : false, | |
| 61 | - | |
| 62 | - //是否显示工具栏 | |
| 63 | - enableDrawingTool : false, | |
| 64 | - | |
| 65 | - drawingToolOptions : { | |
| 66 | - | |
| 67 | - //位置 | |
| 68 | - anchor : BMAP_ANCHOR_TOP_RIGHT, | |
| 69 | - | |
| 70 | - //偏离值 | |
| 71 | - offset : new BMap.Size(5, 5), | |
| 72 | - | |
| 73 | - //工具栏缩放比例 | |
| 74 | - scale : 0.8 | |
| 75 | - | |
| 76 | - }, | |
| 77 | - | |
| 78 | - //线的样式 | |
| 79 | - polygonOptions : styleOptions | |
| 80 | - | |
| 81 | - }); | |
| 56 | + // 将视图切换到指定的缩放等级,中心点坐标不变。注意:当有信息窗口在地图上打开时,地图缩放将保证信息窗口所在的坐标位置不动。(自1.2新增) | |
| 57 | + mapBValue.setZoom(17); | |
| 82 | 58 | |
| 83 | - // 添加绘画完成事件 | |
| 84 | - drawingManagerInit.addEventListener('polygoncomplete', function(e) { | |
| 59 | + //创建圆 | |
| 60 | + circle = new BMap.Circle(point,r[0].stationRadius,{strokeColor:"blue", strokeWeight:2, strokeOpacity:0.5}); | |
| 61 | + | |
| 62 | + // 允许覆盖物在map.clearOverlays方法中被清除 | |
| 63 | + circle.enableMassClear(); | |
| 64 | + | |
| 65 | + // 百度地图添加覆盖物圆 | |
| 66 | + mapBValue.addOverlay(circle); | |
| 67 | + | |
| 68 | + // 创建信息窗口 | |
| 69 | + infoWindow = new BMap.InfoWindow(htm, opts); | |
| 70 | + | |
| 71 | + // 自定义标注物图片 | |
| 72 | + var icon_target = new BMap.Icon('/pages/base/stationroute/css/img/cz.png',new BMap.Size(20, 20)); | |
| 73 | + | |
| 74 | + // 创建点 | |
| 75 | + marker = new BMap.Marker(point,{icon : icon_target}); | |
| 85 | 76 | |
| 86 | - drawingManagerInit.close(); | |
| 87 | - | |
| 88 | - if (e.getPath().length <= 2) { | |
| 89 | - | |
| 90 | - // 弹出提示消息 | |
| 91 | - layer.msg('坐标点不能小于等于两个...'); | |
| 92 | - | |
| 93 | - // 清除地图覆盖物 | |
| 94 | - map.clearOverlays(); | |
| 95 | - | |
| 96 | - // 加载该线路下所有站点位置添加到地图上 | |
| 97 | - return false; | |
| 98 | - | |
| 99 | - }else { | |
| 100 | - | |
| 101 | - var pointE = e; | |
| 102 | - | |
| 103 | - // 多变行质心点 | |
| 104 | - var addSttationPoints_ = pointE.getBounds().getCenter().lng+ ' ' + pointE.getBounds().getCenter().lat; | |
| 105 | - | |
| 106 | - var PointsList = []; | |
| 107 | - | |
| 108 | - for ( var i = 0; i < pointE.getPath().length; i++) { | |
| 109 | - | |
| 110 | - PointsList.push({potion: {lng: pointE.getPath()[i].lng, lat: pointE.getPath()[i].lat}}); | |
| 111 | - | |
| 112 | - } | |
| 113 | - | |
| 114 | - PointsList.push({potion: {lng: pointE.getPath()[0].lng, lat: pointE.getPath()[0].lat}}); | |
| 115 | - | |
| 116 | - var centre = [{potion:{lng:pointE.getBounds().getCenter().lng,lat:pointE.getBounds().getCenter().lat}}]; | |
| 117 | - | |
| 118 | - var gPloygonGrid = ''; | |
| 119 | - | |
| 120 | - var bPloygonGrid = ''; | |
| 121 | - | |
| 122 | - var pointsListLen_ = PointsList.length; | |
| 123 | - | |
| 124 | - for(var k =0;k<pointsListLen_;k++) { | |
| 125 | - | |
| 126 | - if(k==0) { | |
| 127 | - | |
| 128 | - bPloygonGrid = PointsList[k].potion.lng + ' ' +PointsList[k].potion.lat; | |
| 129 | - | |
| 130 | - }else { | |
| 131 | - | |
| 132 | - bPloygonGrid = bPloygonGrid + ',' + PointsList[k].potion.lng + ' ' +PointsList[k].potion.lat; | |
| 133 | - | |
| 134 | - } | |
| 135 | - | |
| 136 | - } | |
| 137 | - | |
| 138 | - PublicFunctions.editSeteditStationParmasValue(addSttationPoints_,'','',bPloygonGrid,'','d',''); | |
| 139 | - | |
| 140 | - $.get('edit.html', function(m){$(pjaxContainer).append(m);}); | |
| 141 | - | |
| 142 | - /*PublicFunctions.getFormPointEToWGS(PointsList,function(resultdata) { | |
| 143 | - | |
| 144 | - var gPloygonGrid = ''; | |
| 145 | - | |
| 146 | - var bPloygonGrid = ''; | |
| 147 | - | |
| 148 | - for(var k =0;k<resultdata.length;k++) { | |
| 149 | - | |
| 150 | - if(k==0) { | |
| 151 | - | |
| 152 | - gPloygonGrid = resultdata[k].WGSpotion.Lng + ' ' +resultdata[k].WGSpotion.Lat; | |
| 153 | - | |
| 154 | - bPloygonGrid = resultdata[k].potion.lng + ' ' +resultdata[k].potion.lat; | |
| 155 | - | |
| 156 | - }else { | |
| 157 | - | |
| 158 | - gPloygonGrid = gPloygonGrid + ',' + resultdata[k].WGSpotion.Lng + ' ' +resultdata[k].WGSpotion.Lat; | |
| 159 | - | |
| 160 | - bPloygonGrid = bPloygonGrid + ',' + resultdata[k].potion.lng + ' ' +resultdata[k].potion.lat; | |
| 161 | - | |
| 162 | - } | |
| 163 | - | |
| 164 | - } | |
| 165 | - | |
| 166 | - gPloygonGrid = 'POLYGON((' + gPloygonGrid + '))'; | |
| 167 | - | |
| 168 | - bPloygonGrid = 'POLYGON((' + bPloygonGrid + '))'; | |
| 169 | - | |
| 170 | - PublicFunctions.getFormPointEToWGS(centre,function(p) { | |
| 171 | - | |
| 172 | - var gLonx = p[0].WGSpotion.Lng; | |
| 173 | - | |
| 174 | - var gLaty = p[0].WGSpotion.Lat; | |
| 175 | - | |
| 176 | - PublicFunctions.editSeteditStationParmasValue(addSttationPoints_,gLonx,gLaty,bPloygonGrid,gPloygonGrid,'d',''); | |
| 177 | - | |
| 178 | - $.get('edit.html', function(m){$(pjaxContainer).append(m);}); | |
| 179 | - | |
| 180 | - }); | |
| 181 | - | |
| 182 | - });*/ | |
| 183 | - } | |
| 184 | - | |
| 185 | - }); | |
| 186 | - | |
| 187 | - return drawingManagerInit; | |
| 77 | + // 把标注添物加到地图上 | |
| 78 | + mapBValue.addOverlay(marker); | |
| 79 | + | |
| 80 | + setTimeout(function(){ | |
| 81 | + //开启信息窗口 | |
| 82 | + marker.openInfoWindow(infoWindow,point); | |
| 83 | + | |
| 84 | + },100); | |
| 85 | + | |
| 86 | + // 是否在平移过程中禁止动画。(自1.2新增) | |
| 87 | + var PanOptions_ ={noAnimation :true}; | |
| 88 | + | |
| 89 | + // 将地图的中心点更改为给定的点。 | |
| 90 | + mapBValue.panTo(point,PanOptions_); | |
| 91 | + | |
| 92 | + mapBValue.panBy(10,-250,PanOptions_); | |
| 93 | + | |
| 94 | + // 添加标志物监听事件 | |
| 95 | + marker.addEventListener("click",function() { | |
| 96 | + | |
| 97 | + //开启信息窗口 | |
| 98 | + marker.openInfoWindow(infoWindow,point); | |
| 99 | + | |
| 100 | + }); | |
| 188 | 101 | }, |
| 189 | 102 | |
| 190 | - // 获取绘制工具类 | |
| 191 | - getDrawingManagerValue : function() { | |
| 103 | + pointsPolygon : function(r,pointPolygon,htm,opts_polygon) { | |
| 192 | 104 | |
| 193 | - return drawingManagerInit; | |
| 194 | - }, | |
| 195 | - | |
| 196 | - // 打开绘画工具 | |
| 197 | - /*drawingManagerOpen : function() { | |
| 105 | + // 获取多边形坐标字符串 | |
| 106 | + var stationBPolygonGrid = r[0].stationBPolyonGrid; | |
| 198 | 107 | |
| 199 | - // 清楚地图覆盖物 | |
| 200 | - mapB.clearOverlays(); | |
| 108 | + // 截取多边形坐标字符串 | |
| 109 | + var stationBPolygonGridStr = stationBPolygonGrid.substring(9,stationBPolygonGrid.length-2); | |
| 110 | + | |
| 111 | + // 按逗号切割 | |
| 112 | + var pointPolygonArray = stationBPolygonGridStr.split(','); | |
| 113 | + | |
| 114 | + // 多边形坐标集合 | |
| 115 | + var polygonP = []; | |
| 201 | 116 | |
| 202 | - // 打开鼠标绘画工具 | |
| 203 | - drawingManager.open(); | |
| 117 | + for(var v = 0;v<pointPolygonArray.length;v++) { | |
| 118 | + | |
| 119 | + polygonP.push(new BMap.Point(pointPolygonArray[v].split(" ")[0],pointPolygonArray[v].split(" ")[1])); | |
| 120 | + | |
| 121 | + } | |
| 122 | + | |
| 123 | + // 画多边形 | |
| 124 | + polygon = new BMap.Polygon(polygonP, { | |
| 125 | + | |
| 126 | + // 线条显色 | |
| 127 | + strokeColor : "blue", | |
| 128 | + | |
| 129 | + // 边线的宽度,以像素为单位。 | |
| 130 | + strokeWeight : 2, | |
| 131 | + | |
| 132 | + // 边线透明度,取值范围0 - 1。 | |
| 133 | + strokeOpacity : 0.5 | |
| 134 | + }); | |
| 135 | + | |
| 136 | + // 增加地图覆盖物多边形 | |
| 137 | + mapBValue.addOverlay(polygon); | |
| 138 | + | |
| 139 | + // 创建信息窗口 | |
| 140 | + infoWindow = new BMap.InfoWindow(htm, opts_polygon); | |
| 204 | 141 | |
| 205 | - // 设置属性 | |
| 206 | - drawingManager.setDrawingMode(BMAP_DRAWING_POLYGON); | |
| 142 | + // 自定义标注物图片 | |
| 143 | + var icon_target = new BMap.Icon('/pages/base/stationroute/css/img/cz.png',new BMap.Size(20, 20)); | |
| 144 | + | |
| 145 | + // 创建点 | |
| 146 | + marker = new BMap.Marker(pointPolygon,{icon : icon_target}); | |
| 147 | + | |
| 148 | + // 把标注添物加到地图上 | |
| 149 | + mapBValue.addOverlay(marker); | |
| 150 | + | |
| 151 | + // 是否在平移过程中禁止动画。(自1.2新增) | |
| 152 | + var PanOptions_ ={noAnimation :true}; | |
| 153 | + | |
| 154 | + // 将地图的中心点更改为给定的点。 | |
| 155 | + mapBValue.panTo(pointPolygon,PanOptions_); | |
| 156 | + | |
| 157 | + // 将地图在水平位置上移动x像素,垂直位置上移动y像素。 | |
| 158 | + mapBValue.panBy(10,110,PanOptions_); | |
| 159 | + | |
| 160 | + //开启信息窗口 | |
| 161 | + marker.openInfoWindow(infoWindow,pointPolygon); | |
| 207 | 162 | |
| 208 | - },*/ | |
| 163 | + }, | |
| 209 | 164 | |
| 210 | 165 | // 编辑图形 |
| 211 | 166 | editShapes : function(stationShapesTypeV,mindex) { |
| 212 | 167 | |
| 168 | + // 关闭信息窗口 | |
| 169 | + marker.closeInfoWindow(); | |
| 170 | + | |
| 171 | + // 清除marker | |
| 172 | + mapBValue.removeOverlay(marker); | |
| 173 | + | |
| 213 | 174 | // 编辑圆 |
| 214 | 175 | if(stationShapesTypeV =='r') { |
| 215 | 176 | |
| 216 | - var enCircle = PublicFunctions.getCircleObj(); | |
| 217 | - | |
| 218 | 177 | // 开启编辑功能 |
| 219 | - enCircle.enableEditing(); | |
| 178 | + circle.enableEditing(); | |
| 220 | 179 | |
| 221 | 180 | // 编辑圆监听事件 |
| 222 | - enCircle.addEventListener('dblclick',function() { | |
| 181 | + circle.addEventListener('dblclick',function() { | |
| 223 | 182 | |
| 224 | 183 | // 关闭提示弹出层 |
| 225 | 184 | layer.close(mindex); |
| 226 | 185 | |
| 227 | 186 | // 返回圆形的半径,单位为米。 |
| 228 | - var newRadius = enCircle.getRadius(); | |
| 187 | + var newRadius = circle.getRadius(); | |
| 229 | 188 | |
| 230 | 189 | // 返回圆形的中心点坐标。 |
| 231 | - var newCenter = enCircle.getCenter().lng + ' ' + enCircle.getCenter().lat; | |
| 190 | + var newCenter = circle.getCenter().lng + ' ' + circle.getCenter().lat; | |
| 232 | 191 | |
| 233 | - var centre_New = [{potion:{lng:enCircle.getCenter().lng,lat:enCircle.getCenter().lat}}]; | |
| 192 | + var centre_New = [{potion:{lng:circle.getCenter().lng,lat:circle.getCenter().lat}}]; | |
| 234 | 193 | |
| 235 | - // 设置修改站点参数集合 | |
| 236 | - PublicFunctions.editSeteditStationParmasValue(newCenter, '', '','','','r',Math.round(newRadius)); | |
| 194 | + /** 设置修改站点集合对象站点中心点百度坐标属性值 @param:<bJwpoints:中心点百度坐标) */ | |
| 195 | + PositionsStationObj.setEitdStationBJwpoints(newCenter); | |
| 196 | + | |
| 197 | + /** 设置修改站点集合对象范围图形类型属性值 @param:<shapesType:范围图形类型) */ | |
| 198 | + PositionsStationObj.setEitdStationShapesType('r'); | |
| 199 | + | |
| 200 | + /** 设置修改站点集合对象圆形半径属性值 @param:<radius:圆形半径) */ | |
| 201 | + PositionsStationObj.setEitdStationRadius(Math.round(newRadius)); | |
| 202 | + | |
| 203 | + /** 设置修改站点集合对象图形百度坐标集合属性值 @param:<bPolygonGrid:图形百度坐标集合) */ | |
| 204 | + PositionsStationObj.setEitdBPolygonGrid(''); | |
| 237 | 205 | |
| 238 | 206 | // 加载编辑页面 |
| 239 | - $.get('edit.html', function(m){$(pjaxContainer).append(m);}); | |
| 240 | - | |
| 241 | - // 中心百度坐标转WGS坐标 | |
| 242 | - /*PublicFunctions.getFormPointEToWGS(centre_New,function(p) { | |
| 243 | - | |
| 244 | - // 设置修改站点参数集合 | |
| 245 | - PublicFunctions.editSeteditStationParmasValue(newCenter, p[0].WGSpotion.Lng , p[0].WGSpotion.Lat,'','','r',Math.round(newRadius)); | |
| 207 | + $.get('edit.html', function(m){ | |
| 246 | 208 | |
| 247 | - // 加载编辑页面 | |
| 248 | - $.get('edit.html', function(m){$(pjaxContainer).append(m);}); | |
| 209 | + $(pjaxContainer).append(m); | |
| 249 | 210 | |
| 250 | - });*/ | |
| 211 | + $('#editPoitsions_station_mobal').trigger('editStationMobal_show', [StationPositionsWorldsBMap,PositionsPublicFunctions,PositionsStationObj]); | |
| 212 | + | |
| 213 | + }); | |
| 251 | 214 | |
| 252 | 215 | }); |
| 253 | 216 | |
| 254 | 217 | // 编辑多变行 |
| 255 | 218 | }else if(stationShapesTypeV =='d') { |
| 256 | 219 | |
| 257 | - var enPolygon = PublicFunctions.getCircleObj(); | |
| 258 | - | |
| 259 | 220 | // 开启编辑功能(自 1.1 新增) |
| 260 | - enPolygon.enableEditing(); | |
| 221 | + polygon.enableEditing(); | |
| 261 | 222 | |
| 262 | 223 | // 添加多变行编辑事件 |
| 263 | - enPolygon.addEventListener('dblclick',function(e) { | |
| 224 | + polygon.addEventListener('dblclick',function(e) { | |
| 264 | 225 | |
| 265 | 226 | // 获取编辑的多边形对象 |
| 266 | - var edit_pointE = enPolygon; | |
| 267 | - | |
| 268 | - // 多边形坐标点集合 | |
| 269 | - var eidt_PointsList = []; | |
| 270 | - | |
| 271 | - for ( var i = 0; i < edit_pointE.getPath().length; i++) { | |
| 272 | - | |
| 273 | - eidt_PointsList.push({potion: {lng: edit_pointE.getPath()[i].lng, lat: edit_pointE.getPath()[i].lat}}); | |
| 274 | - | |
| 275 | - } | |
| 227 | + var edit_pointE = polygon; | |
| 276 | 228 | |
| 277 | - eidt_PointsList.push({potion: {lng: edit_pointE.getPath()[0].lng, lat: edit_pointE.getPath()[0].lat}}); | |
| 229 | + var edit_bPloygonGrid = ""; | |
| 278 | 230 | |
| 279 | - var edit_centre = [{potion:{lng:edit_pointE.getBounds().getCenter().lng,lat:edit_pointE.getBounds().getCenter().lat}}]; | |
| 231 | + var editPolyGonLen_ = edit_pointE.getPath().length; | |
| 280 | 232 | |
| 281 | - // 多边形中心点 | |
| 282 | - var centre_points = edit_pointE.getBounds().getCenter().lng + ' ' + edit_pointE.getBounds().getCenter().lat; | |
| 283 | - | |
| 284 | - // 多边形WGS坐标字符串 | |
| 285 | - var eidt_gPloygonGrid = ''; | |
| 286 | - | |
| 287 | - // 百度坐标字符串 | |
| 288 | - var edit_bPloygonGrid = ''; | |
| 289 | - | |
| 290 | - var eidt_PointsListLen_ = eidt_PointsList.length; | |
| 291 | - | |
| 292 | - for(var k =0;k<eidt_PointsListLen_;k++) { | |
| 233 | + for(var k =0;k<editPolyGonLen_;k++) { | |
| 293 | 234 | |
| 294 | 235 | if(k==0) { |
| 295 | 236 | |
| 296 | - edit_bPloygonGrid = eidt_PointsList[k].potion.lng + ' ' +eidt_PointsList[k].potion.lat; | |
| 237 | + edit_bPloygonGrid = edit_pointE.getPath()[k].lng + ' ' + edit_pointE.getPath()[k].lat; | |
| 297 | 238 | |
| 298 | 239 | }else { |
| 299 | 240 | |
| 300 | - edit_bPloygonGrid = edit_bPloygonGrid + ',' + eidt_PointsList[k].potion.lng + ' ' +eidt_PointsList[k].potion.lat; | |
| 241 | + edit_bPloygonGrid = edit_bPloygonGrid + ',' + edit_pointE.getPath()[k].lng + ' ' + edit_pointE.getPath()[k].lat; | |
| 301 | 242 | |
| 302 | 243 | } |
| 303 | 244 | |
| 304 | 245 | } |
| 305 | 246 | |
| 306 | - // 设置编辑站点参宿集合 | |
| 307 | - PublicFunctions.editSeteditStationParmasValue(centre_points,'','',edit_bPloygonGrid,'','d',''); | |
| 247 | + edit_bPloygonGrid = edit_bPloygonGrid + ',' + edit_pointE.getPath()[0].lng + ' ' + edit_pointE.getPath()[0].lat; | |
| 308 | 248 | |
| 309 | - // 加载编辑页面 | |
| 310 | - $.get('edit.html', function(m){$(pjaxContainer).append(m);}); | |
| 249 | + // 多边形中心点 | |
| 250 | + var centre_points = edit_pointE.getBounds().getCenter().lng + ' ' + edit_pointE.getBounds().getCenter().lat; | |
| 311 | 251 | |
| 312 | - // 多边形坐标点集合转WGS坐标 | |
| 313 | - /*PublicFunctions.getFormPointEToWGS(eidt_PointsList,function(resultdata) { | |
| 314 | - | |
| 315 | - // 多边形WGS坐标字符串 | |
| 316 | - var eidt_gPloygonGrid = ''; | |
| 317 | - | |
| 318 | - // 百度坐标字符串 | |
| 319 | - var edit_bPloygonGrid = ''; | |
| 320 | - | |
| 321 | - for(var k =0;k<resultdata.length;k++) { | |
| 322 | - | |
| 323 | - if(k==0) { | |
| 324 | - | |
| 325 | - eidt_gPloygonGrid = resultdata[k].WGSpotion.Lng + ' ' +resultdata[k].WGSpotion.Lat; | |
| 326 | - | |
| 327 | - edit_bPloygonGrid = resultdata[k].potion.lng + ' ' +resultdata[k].potion.lat; | |
| 328 | - | |
| 329 | - }else { | |
| 330 | - | |
| 331 | - eidt_gPloygonGrid = eidt_gPloygonGrid + ',' + resultdata[k].WGSpotion.Lng + ' ' +resultdata[k].WGSpotion.Lat; | |
| 332 | - | |
| 333 | - edit_bPloygonGrid = edit_bPloygonGrid + ',' + resultdata[k].potion.lng + ' ' +resultdata[k].potion.lat; | |
| 334 | - | |
| 335 | - } | |
| 336 | - | |
| 337 | - } | |
| 338 | - | |
| 339 | - eidt_gPloygonGrid = 'POLYGON((' + eidt_gPloygonGrid + '))'; | |
| 252 | + /** 设置修改站点集合对象站点中心点百度坐标属性值 @param:<bJwpoints:中心点百度坐标) */ | |
| 253 | + PositionsStationObj.setEitdStationBJwpoints(centre_points); | |
| 254 | + | |
| 255 | + /** 设置修改站点集合对象范围图形类型属性值 @param:<shapesType:范围图形类型) */ | |
| 256 | + PositionsStationObj.setEitdStationShapesType('d'); | |
| 257 | + | |
| 258 | + /** 设置修改站点集合对象圆形半径属性值 @param:<radius:圆形半径) */ | |
| 259 | + PositionsStationObj.setEitdStationRadius(''); | |
| 260 | + | |
| 261 | + /** 设置修改站点集合对象图形百度坐标集合属性值 @param:<bPolygonGrid:图形百度坐标集合) */ | |
| 262 | + PositionsStationObj.setEitdBPolygonGrid(edit_bPloygonGrid); | |
| 263 | + | |
| 264 | + $.get('edit.html', function(m){ | |
| 340 | 265 | |
| 341 | - edit_bPloygonGrid = 'POLYGON((' + edit_bPloygonGrid + '))'; | |
| 266 | + $(pjaxContainer).append(m); | |
| 342 | 267 | |
| 343 | - // 中心点坐标转WGS坐标 | |
| 344 | - PublicFunctions.getFormPointEToWGS(edit_centre,function(p) { | |
| 345 | - | |
| 346 | - var edit_gLonx = p[0].WGSpotion.Lng; | |
| 347 | - | |
| 348 | - var edit_gLaty = p[0].WGSpotion.Lat; | |
| 349 | - | |
| 350 | - // 设置编辑站点参宿集合 | |
| 351 | - PublicFunctions.editSeteditStationParmasValue(centre_points,edit_gLonx,edit_gLaty,edit_bPloygonGrid,eidt_gPloygonGrid,'d',''); | |
| 352 | - | |
| 353 | - // 加载编辑页面 | |
| 354 | - $.get('edit.html', function(m){$(pjaxContainer).append(m);}); | |
| 355 | - | |
| 356 | - }); | |
| 268 | + $('#editPoitsions_station_mobal').trigger('editStationMobal_show', [StationPositionsWorldsBMap,PositionsPublicFunctions,PositionsStationObj]); | |
| 357 | 269 | |
| 358 | - });*/ | |
| 270 | + }); | |
| 359 | 271 | |
| 360 | 272 | }); |
| 361 | 273 | |
| 362 | 274 | } |
| 363 | 275 | |
| 364 | - }, | |
| 276 | + }, | |
| 365 | 277 | |
| 366 | - localSearchFromAdreesToPoint: function(Address,map,callback) { | |
| 278 | + localSearchFromAdreesToPoint: function(Address,callback) { | |
| 367 | 279 | |
| 368 | 280 | // 创建一个搜索类实例 |
| 369 | - var localSearch = new BMap.LocalSearch(map); | |
| 281 | + var localSearch = new BMap.LocalSearch(mapBValue); | |
| 370 | 282 | |
| 371 | 283 | // 检索完成后的回调函数。 |
| 372 | 284 | localSearch.setSearchCompleteCallback(function (searchResult) { |
| ... | ... | @@ -401,6 +313,43 @@ var WorldsBMap = function () { |
| 401 | 313 | // 根据检索词发起检索。 |
| 402 | 314 | localSearch.search(Address); |
| 403 | 315 | |
| 316 | + }, | |
| 317 | + | |
| 318 | + localtionPoint : function(stationNameV) { | |
| 319 | + | |
| 320 | + StationPositionsWorldsBMap.localSearchFromAdreesToPoint(stationNameV,function(Points) { | |
| 321 | + | |
| 322 | + if(Points) { | |
| 323 | + | |
| 324 | + var BJwpointsArray = Points.split(' '); | |
| 325 | + | |
| 326 | + var stationNameChangePoint = new BMap.Point(BJwpointsArray[0], BJwpointsArray[1]); | |
| 327 | + | |
| 328 | + var marker_stargt2 = new BMap.Marker(stationNameChangePoint); | |
| 329 | + | |
| 330 | + var PanOptions ={noAnimation :true}; | |
| 331 | + | |
| 332 | + mapBValue.panTo(stationNameChangePoint,PanOptions); | |
| 333 | + | |
| 334 | + mapBValue.panBy(0,-100); | |
| 335 | + | |
| 336 | + // 将标注添加到地图中 | |
| 337 | + mapBValue.addOverlay(marker_stargt2); | |
| 338 | + | |
| 339 | + //跳动的动画 | |
| 340 | + marker_stargt2.setAnimation(BMAP_ANIMATION_BOUNCE); | |
| 341 | + | |
| 342 | + } | |
| 343 | + | |
| 344 | + }); | |
| 345 | + | |
| 346 | + }, | |
| 347 | + | |
| 348 | + clearMarkAndOverlays : function() { | |
| 349 | + | |
| 350 | + // 清楚地图覆盖物 | |
| 351 | + mapBValue.clearOverlays(); | |
| 352 | + | |
| 404 | 353 | } |
| 405 | 354 | |
| 406 | 355 | } | ... | ... |
src/main/resources/static/pages/base/station/js/station-positions-reload.js
| ... | ... | @@ -43,12 +43,12 @@ |
| 43 | 43 | setTimeout(function(){ |
| 44 | 44 | |
| 45 | 45 | // 地图初始化 |
| 46 | - var map_ = WorldsBMap.init(); | |
| 46 | + var map_ = StationPositionsWorldsBMap.init(); | |
| 47 | 47 | |
| 48 | 48 | // 初始化绘制工具类 |
| 49 | - var drawingManager_ = WorldsBMap.initDrawingManager(map_,styleOptions); | |
| 49 | + var drawingManager_ = PositionsDrawingManagerObj.init(map_,styleOptions); | |
| 50 | 50 | |
| 51 | - PublicFunctions.initStationInfo(id,map_); | |
| 51 | + PositionsPublicFunctions.initStationInfo(id); | |
| 52 | 52 | |
| 53 | 53 | },200); |
| 54 | 54 | ... | ... |
src/main/resources/static/pages/base/station/positions.html
| ... | ... | @@ -20,22 +20,17 @@ |
| 20 | 20 | </ul> |
| 21 | 21 | </div> |
| 22 | 22 | </div> |
| 23 | -<script type="text/javascript"> | |
| 24 | - | |
| 25 | - /** 定义全局变量 */ | |
| 26 | - | |
| 27 | - /** stationObj:站点信息对象;drawingManager:绘制工具对象;mapB:地图对象:circle:圆对象;polygon:多边形对象 */ | |
| 28 | - /* var stationObj = '', drawingManager= '', mapB = '',circle = '',polygon = ''; */ | |
| 29 | - | |
| 30 | - /** marker:覆盖物对象;infoWindow:信息窗口对象;Id:站点ID */ | |
| 31 | - /* var marker = '',infoWindow = '',id = ''; */ | |
| 32 | - | |
| 33 | -</script> | |
| 23 | + | |
| 24 | +<!-- 站点对象类 --> | |
| 25 | +<script src="/pages/base/station/js/positionstation.js"></script> | |
| 26 | + | |
| 27 | +<!-- 绘制工具类 --> | |
| 28 | +<script src="/pages/base/station/js/positionsdrwmager.js"></script> | |
| 34 | 29 | |
| 35 | 30 | <!-- 地图JS类库 --> |
| 36 | 31 | <script src="/pages/base/station/js/station-positions-map.js"></script> |
| 37 | 32 | |
| 38 | -<!-- 方法JS类库 --> | |
| 33 | +<!-- 方法函数JS类库 --> | |
| 39 | 34 | <script src="/pages/base/station/js/station-positions-function.js"></script> |
| 40 | 35 | |
| 41 | 36 | <!-- reloadJS类库 --> | ... | ... |
src/main/resources/static/pages/base/stationroute/add.html
| ... | ... | @@ -25,6 +25,8 @@ |
| 25 | 25 | |
| 26 | 26 | <input type="hidden" name="gPolygonGrid" id="gPolygonGridInput" value="" /> |
| 27 | 27 | |
| 28 | + <input type="hidden" name="gJwpoints" id="gJwpointsInput"> | |
| 29 | + | |
| 28 | 30 | <input type="hidden" name="dbType" id="dbTypeInput" value="b"/> |
| 29 | 31 | |
| 30 | 32 | <input type="hidden" name="x" id="xInput" value=""/> |
| ... | ... | @@ -123,14 +125,14 @@ |
| 123 | 125 | </div> |
| 124 | 126 | |
| 125 | 127 | <!-- 站点WGS经纬度 --> |
| 126 | - <div class="form-body"> | |
| 128 | + <!-- <div class="form-body"> | |
| 127 | 129 | <div class="form-group"> |
| 128 | 130 | <label class="col-md-3 control-label">站点WGS经纬度:</label> |
| 129 | 131 | <div class="col-md-6"> |
| 130 | 132 | <input type="text" class="form-control" name="gJwpoints" id="gJwpointsInput"> |
| 131 | 133 | </div> |
| 132 | 134 | </div> |
| 133 | - </div> | |
| 135 | + </div> --> | |
| 134 | 136 | |
| 135 | 137 | <!-- 范围图形类型 --> |
| 136 | 138 | <div class="form-body"> |
| ... | ... | @@ -151,7 +153,8 @@ |
| 151 | 153 | <div class="form-group"> |
| 152 | 154 | <label class="col-md-3 control-label">圆形半径:</label> |
| 153 | 155 | <div class="col-md-6"> |
| 154 | - <select name="radius" class="form-control" id="radiusSelect"> | |
| 156 | + <input type="text" class="form-control" name=radius id="radiusInput"> | |
| 157 | + <!-- <select name="radius" class="form-control" id="radiusSelect"> | |
| 155 | 158 | <option value="">-- 请选择圆形半径 --</option> |
| 156 | 159 | <option value="50">50</option> |
| 157 | 160 | <option value="100">100</option> |
| ... | ... | @@ -162,7 +165,7 @@ |
| 162 | 165 | <option value="350">350</option> |
| 163 | 166 | <option value="400">400</option> |
| 164 | 167 | <option value="450">450</option> |
| 165 | - </select> | |
| 168 | + </select> --> | |
| 166 | 169 | </div> |
| 167 | 170 | </div> |
| 168 | 171 | </div> |
| ... | ... | @@ -230,11 +233,12 @@ |
| 230 | 233 | </div> |
| 231 | 234 | </div> |
| 232 | 235 | <script type="text/javascript"> |
| 233 | -$(function(){ | |
| 236 | + | |
| 237 | +$('#add_station_mobal').on('AddStationMobal.show', function(e, addMap,ajaxd,addStationObj,lineObj,fun){ | |
| 234 | 238 | |
| 235 | - var addLine = LineObj.getLineObj(); | |
| 239 | + var Station = addStationObj.getAddStation(); | |
| 236 | 240 | |
| 237 | - var addStation = AddStationObj.getAddStation(); | |
| 241 | + var Line = lineObj.getLineObj(); | |
| 238 | 242 | |
| 239 | 243 | // 延迟加载 |
| 240 | 244 | setTimeout(function(){ |
| ... | ... | @@ -255,61 +259,31 @@ $(function(){ |
| 255 | 259 | $('#add_station_mobal').on('show.bs.modal', function () { |
| 256 | 260 | |
| 257 | 261 | // 线路ID |
| 258 | - $('#lineIdInput').val(addLine.id); | |
| 262 | + $('#lineIdInput').val(Line.id); | |
| 259 | 263 | |
| 260 | 264 | // 获取站点名称元素设值 |
| 261 | - $('#stationNameInput').val(addStation.stationNamebootbox).attr('Readonly','Readonly'); | |
| 265 | + $('#stationNameInput').val(Station.stationNamebootbox).attr('Readonly','Readonly'); | |
| 262 | 266 | |
| 263 | 267 | // 获取方向元素,并添加值 |
| 264 | - $('#stationdirSelect').val(addStation.dir).attr('Readonly','Readonly'); | |
| 268 | + $('#stationdirSelect').val(Station.dir).attr('Readonly','Readonly'); | |
| 265 | 269 | |
| 266 | 270 | // 百度地图经纬度坐标中心点 |
| 267 | - $('#bJwpointsInput').val(addStation.bJwpoints).attr('Readonly','Readonly'); | |
| 271 | + $('#bJwpointsInput').val(Station.bJwpoints).attr('Readonly','Readonly'); | |
| 268 | 272 | |
| 269 | 273 | // 百度坐标点图形集合 |
| 270 | - $('#bPolygonGridInput').val(addStation.bPolygonGrid); | |
| 274 | + $('#bPolygonGridInput').val(Station.bPolygonGrid); | |
| 271 | 275 | |
| 272 | 276 | // 获取图形类型元素,并添加值 |
| 273 | - $('#shapesTypeSelect').val(addStation.shapesType).attr('Readonly','Readonly'); | |
| 277 | + $('#shapesTypeSelect').val(Station.shapesType).attr('Readonly','Readonly'); | |
| 274 | 278 | |
| 275 | 279 | // 获取圆形半径元素,并添加值 |
| 276 | - $('#radiusSelect').val(addStation.radius).attr('Readonly','Readonly'); | |
| 280 | + $('#radiusInput').val(Station.radius).attr('Readonly','Readonly'); | |
| 277 | 281 | |
| 278 | 282 | // 是否撤销 |
| 279 | 283 | $('#destroySelect').val(0).attr('Readonly','Readonly'); |
| 280 | 284 | |
| 281 | - /* // WGS坐标点图形集合 | |
| 282 | - $('#bPolygonGridInput').val(addStaitonParmas.bPolygonGridInput); | |
| 283 | - | |
| 284 | - // 百度坐标点图形集合 | |
| 285 | - $('#gPolygonGridInput').val(addStaitonParmas.gPolygonGridInput); | |
| 286 | - | |
| 287 | - // 获取站点名称元素设值 | |
| 288 | - $('#stationNameInput').val(addStaitonParmas.stationNamebootbox).attr('Readonly','Readonly'); | |
| 289 | - | |
| 290 | - // 选择系统生成方式新增站点时的站点坐标 | |
| 291 | - //$('#pointsInput').val(addStaitonParmas.stationPointInput).attr('Readonly','Readonly'); | |
| 292 | - | |
| 293 | - // 百度地图经纬度坐标中心点 | |
| 294 | - $('#bJwpointsInput').val(addStaitonParmas.stationPointInput).attr('Readonly','Readonly'); | |
| 295 | - | |
| 296 | - // WGS经纬度 | |
| 297 | - $('#gJwpointsInput').val(addStaitonParmas.gLonx + ' '+ addStaitonParmas.gLaty).attr('Readonly','Readonly'); | |
| 298 | - | |
| 299 | - // 获取图形类型元素,并添加值 | |
| 300 | - $('#shapesTypeSelect').val(addStaitonParmas.shapesTypeInput).attr('Readonly','Readonly'); | |
| 301 | - | |
| 302 | - // 获取方向元素,并添加值 | |
| 303 | - $('#stationdirSelect').val(addStaitonParmas.dir).attr('Readonly','Readonly'); | |
| 304 | - | |
| 305 | - // 获取方向元素,并添加值 | |
| 306 | - $('#radiusSelect').val(addStaitonParmas.radiusInput).attr('Readonly','Readonly'); | |
| 307 | - | |
| 308 | - // 是否撤销 | |
| 309 | - $('#destroySelect').val(addStaitonParmas.destroyInput).attr('Readonly','Readonly'); */ | |
| 310 | - | |
| 311 | 285 | // 获取站点序号元素,并添加下拉属性值 |
| 312 | - GetAjaxData.getStation(addLine.id,addStation.dir,function(treeData) { | |
| 286 | + ajaxd.getStation(Line.id,Station.dir,function(treeData) { | |
| 313 | 287 | |
| 314 | 288 | var options = '<option value="">请选择...</option>'; |
| 315 | 289 | |
| ... | ... | @@ -326,7 +300,7 @@ $(function(){ |
| 326 | 300 | }); |
| 327 | 301 | |
| 328 | 302 | // 获取站点编码元素,添加站点编码值 |
| 329 | - GetAjaxData.getStationCode(function(stationCode) { | |
| 303 | + ajaxd.getStationCode(function(stationCode) { | |
| 330 | 304 | |
| 331 | 305 | $('#stationCodInput').val(stationCode).attr('Readonly','Readonly'); |
| 332 | 306 | |
| ... | ... | @@ -483,7 +457,7 @@ $(function(){ |
| 483 | 457 | error.hide(); |
| 484 | 458 | |
| 485 | 459 | // 保存 |
| 486 | - GetAjaxData.stationSave(params,function(data) { | |
| 460 | + ajaxd.stationSave(params,function(data) { | |
| 487 | 461 | |
| 488 | 462 | if(data.status=='SUCCESS') { |
| 489 | 463 | |
| ... | ... | @@ -497,12 +471,12 @@ $(function(){ |
| 497 | 471 | |
| 498 | 472 | } |
| 499 | 473 | |
| 500 | - var id =addLine.id; | |
| 474 | + var id =Line.id; | |
| 501 | 475 | |
| 502 | 476 | var dir = params.directions |
| 503 | 477 | |
| 504 | 478 | // 刷行左边树 |
| 505 | - PublicFunctions.resjtreeDate(id,dir); | |
| 479 | + fun.resjtreeDate(id,dir); | |
| 506 | 480 | |
| 507 | 481 | closeMobleSetClean(); |
| 508 | 482 | |
| ... | ... | @@ -517,16 +491,16 @@ $(function(){ |
| 517 | 491 | function closeMobleSetClean() { |
| 518 | 492 | |
| 519 | 493 | // 清除地图覆盖物 |
| 520 | - WorldsBMap.clearMarkAndOverlays(); | |
| 494 | + addMap.clearMarkAndOverlays(); | |
| 521 | 495 | |
| 522 | 496 | /** 设置新增站点集合对象为空 */ |
| 523 | - AddStationObj.setAddStation(); | |
| 497 | + addStationObj.setAddStation({}); | |
| 524 | 498 | |
| 525 | 499 | var add_direction_v = $('#stationdirSelect').val(); |
| 526 | 500 | |
| 527 | - GetAjaxData.getSectionRouteInfo(addLine.id,add_direction_v,function(data) { | |
| 501 | + ajaxd.getSectionRouteInfo(Line.id,add_direction_v,function(data) { | |
| 528 | 502 | |
| 529 | - PublicFunctions.linePanlThree(addLine.id,data,add_direction_v); | |
| 503 | + fun.linePanlThree(Line.id,data,add_direction_v); | |
| 530 | 504 | |
| 531 | 505 | }); |
| 532 | 506 | ... | ... |
src/main/resources/static/pages/base/stationroute/add_manual_select.html
| ... | ... | @@ -38,7 +38,8 @@ |
| 38 | 38 | </div> |
| 39 | 39 | </div> |
| 40 | 40 | <script type="text/javascript"> |
| 41 | -$(function(){ | |
| 41 | + | |
| 42 | +$('#add_manual_mobal').on('AddManualMobal.show', function(e,map,ajaxd,dir,line,fun){ | |
| 42 | 43 | |
| 43 | 44 | // 显示其他规划方式弹出层 |
| 44 | 45 | $('#add_manual_mobal').modal({show : true,backdrop: 'static', keyboard: false}); |
| ... | ... | @@ -61,7 +62,13 @@ $(function(){ |
| 61 | 62 | if(addManualRadioV==0){ |
| 62 | 63 | |
| 63 | 64 | // 加载模板手动添加站点页面 |
| 64 | - $.get('addstationstemplate.html', function(m){$(pjaxContainer).append(m);}); | |
| 65 | + $.get('addstationstemplate.html', function(m){ | |
| 66 | + | |
| 67 | + $(pjaxContainer).append(m); | |
| 68 | + | |
| 69 | + $('#add_station_template_mobal').trigger('AddStationTempMobal.show', [map,ajaxd,dir,line,fun]); | |
| 70 | + | |
| 71 | + }); | |
| 65 | 72 | |
| 66 | 73 | }else if(addManualRadioV==1) { |
| 67 | 74 | ... | ... |
src/main/resources/static/pages/base/stationroute/add_select.html
| ... | ... | @@ -63,7 +63,8 @@ |
| 63 | 63 | </div> |
| 64 | 64 | </div> |
| 65 | 65 | <script type="text/javascript"> |
| 66 | -$(function(){ | |
| 66 | + | |
| 67 | +$('#add_select_mobal').on('AddSelectMobal.show', function(e,map_,drw,ajaxd_,stationObj,lineObj,fun){ | |
| 67 | 68 | |
| 68 | 69 | // 加载显示mobal |
| 69 | 70 | $('#add_select_mobal').modal({show : true,backdrop: 'static', keyboard: false}); |
| ... | ... | @@ -75,7 +76,7 @@ $(function(){ |
| 75 | 76 | var stationNamebootbox = $('#stationNamebootboxInput').val(); |
| 76 | 77 | |
| 77 | 78 | /** 根据站点名称获取坐标在地图上标注 @param :<stationNamebootbox:站点名称> */ |
| 78 | - WorldsBMap.localtionPoint(stationNamebootbox); | |
| 79 | + map_.localtionPoint(stationNamebootbox); | |
| 79 | 80 | |
| 80 | 81 | }); |
| 81 | 82 | |
| ... | ... | @@ -156,41 +157,49 @@ $(function(){ |
| 156 | 157 | var baseRes = params.baseRes; |
| 157 | 158 | |
| 158 | 159 | // 查询是否存在输入的站点名称 |
| 159 | - GetAjaxData.getLikeStationName(stationName,function(data) { | |
| 160 | + ajaxd_.getLikeStationName(stationName,function(data) { | |
| 160 | 161 | |
| 161 | 162 | // 验证系统是存在该站点名称 |
| 162 | - var tempblm = PublicFunctions.isHaveStationName(data); | |
| 163 | + var tempblm = fun.isHaveStationName(data); | |
| 163 | 164 | |
| 164 | 165 | if(tempblm) { |
| 165 | 166 | |
| 166 | 167 | /** 设置新增站点对象站点名称属性值 @param:<stationName:站点名称)> */ |
| 167 | - AddStationObj.setAddStationName(stationName); | |
| 168 | + stationObj.setAddStationName(stationName); | |
| 168 | 169 | |
| 169 | 170 | // 系统生成 |
| 170 | 171 | if(baseRes == 0) { |
| 171 | 172 | |
| 172 | 173 | /** 根据站点位置获取坐标 @parma:<stationName:站点名称;callback:返回函数> */ |
| 173 | - WorldsBMap.localSearchFromAdreesToPoint(stationName,function(Points) { | |
| 174 | + map_.localSearchFromAdreesToPoint(stationName,function(Points) { | |
| 174 | 175 | |
| 175 | 176 | if(Points) { |
| 176 | 177 | |
| 177 | 178 | /** 设置新增站点集合对象站点中心点百度坐标属性值 @param:<bJwpoints:中心点百度坐标) */ |
| 178 | - AddStationObj.setAddStationBJwpoints(Points); | |
| 179 | + stationObj.setAddStationBJwpoints(Points); | |
| 179 | 180 | |
| 180 | 181 | /** 设置新增站点集合对象范围图形类型属性值 @param:<shapesType:范围图形类型) */ |
| 181 | - AddStationObj.setAddStationShapesType('r'); | |
| 182 | + stationObj.setAddStationShapesType('r'); | |
| 182 | 183 | |
| 183 | 184 | /** 设置新增站点集合对象圆形半径属性值 @param:<radius:圆形半径) */ |
| 184 | - AddStationObj.setAddStationRadius(100); | |
| 185 | + stationObj.setAddStationRadius(100); | |
| 185 | 186 | |
| 186 | 187 | /** 设置新增站点集合对象图形百度坐标集合属性值 @param:<bPolygonGrid:图形百度坐标集合) */ |
| 187 | - AddStationObj.setBPolygonGrid(''); | |
| 188 | + stationObj.setBPolygonGrid(''); | |
| 188 | 189 | |
| 189 | 190 | // 以藏站点新增方式mobal |
| 190 | 191 | $('#add_select_mobal').modal('hide'); |
| 191 | 192 | |
| 192 | 193 | // 加载add页面 |
| 193 | - $.get('add.html', function(m){$(pjaxContainer).append(m);}); | |
| 194 | + $.get('add.html', function(m){ | |
| 195 | + | |
| 196 | + $(pjaxContainer).append(m); | |
| 197 | + | |
| 198 | + var Station = stationObj.getAddStation(); | |
| 199 | + | |
| 200 | + $('#add_station_mobal').trigger('AddStationMobal.show', [map_,ajaxd_,stationObj,lineObj,fun]); | |
| 201 | + | |
| 202 | + }); | |
| 194 | 203 | |
| 195 | 204 | }else { |
| 196 | 205 | |
| ... | ... | @@ -207,15 +216,23 @@ $(function(){ |
| 207 | 216 | |
| 208 | 217 | }else if(baseRes==1) { |
| 209 | 218 | |
| 210 | - WorldsBMap.clearMarkAndOverlays(); | |
| 219 | + map_.clearMarkAndOverlays(); | |
| 211 | 220 | |
| 212 | 221 | // 以藏站点新增方式mobal |
| 213 | 222 | $('#add_select_mobal').modal('hide'); |
| 214 | 223 | |
| 215 | 224 | // 打开绘制工具 |
| 216 | - DrawingManagerObj.openDrawingManager(); | |
| 225 | + drw.openDrawingManager(); | |
| 217 | 226 | |
| 218 | - WorldsBMap.localtionPoint(stationName); | |
| 227 | + map_.localtionPoint(stationName); | |
| 228 | + | |
| 229 | + }else if(baseRes==2) { | |
| 230 | + | |
| 231 | + // 系统引用 | |
| 232 | + | |
| 233 | + $('#add_select_mobal').modal('hide'); | |
| 234 | + | |
| 235 | + $.get('station_tabledate.html', function(m){$(pjaxContainer).append(m);}); | |
| 219 | 236 | |
| 220 | 237 | } |
| 221 | 238 | |
| ... | ... | @@ -229,88 +246,9 @@ $(function(){ |
| 229 | 246 | }); |
| 230 | 247 | |
| 231 | 248 | } |
| 232 | - | |
| 233 | - /* | |
| 234 | - // 系统生成 | |
| 235 | - if(baseRes == 0) { | |
| 236 | - | |
| 237 | - if(tempblm) { | |
| 238 | - | |
| 239 | - WorldsBMap.localSearchFromAdreesToPoint(stationNamebootbox,mapB,function(Points) { | |
| 240 | - | |
| 241 | - if(Points) { | |
| 242 | - | |
| 243 | - var pointsArray = Points.split(' '); | |
| 244 | - | |
| 245 | - var paramCentre = [{potion:{lng:pointsArray[0],lat:pointsArray[1]}}]; | |
| 246 | - | |
| 247 | - // 设置值 | |
| 248 | - PublicFunctions.setFormInputValue(Points, '','','','','r',100); | |
| 249 | - | |
| 250 | - // 以藏站点新增方式mobal | |
| 251 | - $('#add_select_mobal').modal('hide'); | |
| 252 | - | |
| 253 | - // 加载add页面 | |
| 254 | - $.get('add.html', function(m){$(pjaxContainer).append(m);}); | |
| 255 | - | |
| 256 | - // GetAjaxData.getFormPointEToWGS(paramCentre,function(p) { | |
| 257 | - | |
| 258 | - // 设置值 | |
| 259 | - // PublicFunctions.setFormInputValue(Points, p[0].WGSpotion.Lng,p[0].WGSpotion.Lat,'','','r',150); | |
| 260 | - | |
| 261 | - // 以藏站点新增方式mobal | |
| 262 | - // $('#add_select_mobal').modal('hide'); | |
| 263 | - | |
| 264 | - // 加载add页面 | |
| 265 | - $.get('add.html', function(m){$(pjaxContainer).append(m);}); | |
| 266 | - | |
| 267 | - }); | |
| 268 | - | |
| 269 | - } else { | |
| 270 | - | |
| 271 | - // 返回坐标为空 | |
| 272 | - layer.confirm('【系统无法生成,请选择其他方式新增】', {btn : [ '返回' ],icon: 3, title:'提示' }, function(index){ | |
| 273 | - | |
| 274 | - layer.close(index); | |
| 275 | - | |
| 276 | - }); | |
| 277 | - | |
| 278 | - } | |
| 279 | - | |
| 280 | - }); | |
| 281 | - | |
| 282 | - } | |
| 283 | - | |
| 284 | - // 手动添加 | |
| 285 | - }else if(baseRes==1) { | |
| 286 | - | |
| 287 | - // 验证系统是存在该站点名称 | |
| 288 | - var tempblm = PublicFunctions.isHaveStationName(data); | |
| 289 | - | |
| 290 | - if(tempblm) { | |
| 291 | - | |
| 292 | - // 以藏站点新增方式mobal | |
| 293 | - $('#add_select_mobal').modal('hide'); | |
| 294 | - | |
| 295 | - status = 'add'; | |
| 296 | - | |
| 297 | - WorldsBMap.drawingManagerOpen(); | |
| 298 | - WorldsBMap.localtionPoint(stationNamebootbox); | |
| 299 | - | |
| 300 | - } | |
| 301 | - | |
| 302 | - | |
| 303 | - }else if(baseRes==2) { | |
| 304 | - | |
| 305 | - // 系统引用 | |
| 306 | - | |
| 307 | - $('#add_select_mobal').modal('hide'); | |
| 308 | - | |
| 309 | - $.get('station_tabledate.html', function(m){$(pjaxContainer).append(m);}); | |
| 310 | - }*/ | |
| 249 | + | |
| 311 | 250 | }); |
| 312 | 251 | } |
| 313 | 252 | }); |
| 314 | - | |
| 315 | 253 | }); |
| 316 | 254 | </script> |
| 317 | 255 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/stationroute/addstationstemplate.html
| ... | ... | @@ -34,8 +34,8 @@ |
| 34 | 34 | |
| 35 | 35 | <div class="form-group"> |
| 36 | 36 | <div class="alert alert-info font-blue-chambray" style="background-color: #2C3E50"> |
| 37 | - <h5 class="block"><span class="help-block" style="color:#eee;"> * 手动添加站点规划说明: </span></h5> | |
| 38 | - <p><span class="help-block" style="color:#eee;"> 请在文本域中按站点顺序依次输入站点名称,每输入完一个站名时请按回车键(Enter)换行.</span> </p> | |
| 37 | + <h5 class="block"><span class="help-block" style="color:#1bbc9b;"> * 手动添加站点规划说明: </span></h5> | |
| 38 | + <p><span class="help-block" style="color:#1bbc9b;"> 请在文本域中按站点顺序依次输入站点名称,每输入完一个站名时请按回车键(Enter)换行.</span> </p> | |
| 39 | 39 | </div> |
| 40 | 40 | </div> |
| 41 | 41 | </form> |
| ... | ... | @@ -48,7 +48,8 @@ |
| 48 | 48 | </div> |
| 49 | 49 | </div> |
| 50 | 50 | <script type="text/javascript"> |
| 51 | -$(function(){ | |
| 51 | + | |
| 52 | +$('#add_station_template_mobal').on('AddStationTempMobal.show', function(e,map,ajaxd,dir,line,fun){ | |
| 52 | 53 | |
| 53 | 54 | // 延迟加载显示mobal |
| 54 | 55 | setTimeout(function(){$('#add_station_template_mobal').modal({show : true,backdrop: 'static', keyboard: false});},200); |
| ... | ... | @@ -117,7 +118,7 @@ $(function(){ |
| 117 | 118 | // 隐藏手动规划弹出层 |
| 118 | 119 | $('#add_station_template_mobal').modal('hide'); |
| 119 | 120 | |
| 120 | - var directionData = manualPararms.dir; | |
| 121 | + var directionData = dir; | |
| 121 | 122 | |
| 122 | 123 | // 上行 |
| 123 | 124 | if(directionData==0){ |
| ... | ... | @@ -143,13 +144,15 @@ $(function(){ |
| 143 | 144 | var paramsStationsArray = params.stations.split('\r\n'); |
| 144 | 145 | |
| 145 | 146 | // 根据站点名称获取百度坐标 |
| 146 | - WorldsBMap.stationsNameToPoints(paramsStationsArray,function(resultJson) { | |
| 147 | + map.stationsNameToPoints(paramsStationsArray,function(resultJson) { | |
| 147 | 148 | |
| 148 | 149 | // 根据坐标点获取两点之间的时间与距离 |
| 149 | - WorldsBMap.getDistanceAndDuration(resultJson,function(stationdataList) { | |
| 150 | + map.getDistanceAndDuration(resultJson,function(stationdataList) { | |
| 150 | 151 | |
| 151 | 152 | // 根据坐标点获取两点之间的折线路段 |
| 152 | - WorldsBMap.getSectionListPlonly(stationdataList,function(sectiondata) { | |
| 153 | + map.getSectionListPlonly(stationdataList,function(sectiondata) { | |
| 154 | + | |
| 155 | + var addLine = LineObj.getLineObj(); | |
| 153 | 156 | |
| 154 | 157 | // 设置第一个站的距离 |
| 155 | 158 | stationdataList[0].distance = ''; |
| ... | ... | @@ -170,7 +173,7 @@ $(function(){ |
| 170 | 173 | params.stationJSON = stationJSON; |
| 171 | 174 | |
| 172 | 175 | // 线路ID |
| 173 | - params.lineId = id; | |
| 176 | + params.lineId = addLine.id; | |
| 174 | 177 | |
| 175 | 178 | // 方向 |
| 176 | 179 | params.directions = directionData; |
| ... | ... | @@ -197,120 +200,37 @@ $(function(){ |
| 197 | 200 | params.sectionJSON = sectionJSON; |
| 198 | 201 | |
| 199 | 202 | // 保存 |
| 200 | - GetAjaxData.manualSave(params,function(rd) { | |
| 203 | + ajaxd.manualSave(params,function(rd) { | |
| 201 | 204 | |
| 202 | - // 关闭弹出层 | |
| 203 | - layer.closeAll(); | |
| 204 | - | |
| 205 | 205 | if(rd.status='SUCCESS') { |
| 206 | 206 | |
| 207 | - // 清除地图覆盖物 | |
| 208 | - mapB.clearOverlays(); | |
| 209 | - | |
| 210 | 207 | layer.msg('保存成功!'); |
| 211 | 208 | |
| 212 | - // 刷新树 | |
| 213 | - PublicFunctions.resjtreeDate(id,directionData); | |
| 214 | - | |
| 215 | - // 查询上行路段信息 | |
| 216 | - GetAjaxData.getSectionRouteInfo(id,directionData,function(data) { | |
| 217 | - | |
| 218 | - // 在地图上画出线路走向 | |
| 219 | - PublicFunctions.linePanlThree(data,directionData); | |
| 220 | - | |
| 221 | - }); | |
| 222 | - | |
| 223 | 209 | }else { |
| 224 | 210 | |
| 225 | 211 | layer.msg('保存失败!'); |
| 226 | 212 | |
| 227 | 213 | } |
| 228 | 214 | |
| 229 | - }); | |
| 230 | - /* | |
| 231 | - // 路段折线百度坐标转WGS坐标 | |
| 232 | - PublicFunctions.eachSectionList(sectiondata,function(successdata) { | |
| 215 | + // 关闭弹出层 | |
| 216 | + layer.closeAll(); | |
| 233 | 217 | |
| 234 | - // 站点坐标转WGS坐标 | |
| 235 | - GetAjaxData.getFormPointEToWGS(stationdataList,function(stationdata) { | |
| 236 | - | |
| 237 | - // 定义站点信息JSON字符串 | |
| 238 | - var stationJSON = JSON.stringify(stationdata); | |
| 239 | - | |
| 240 | - // 定义路段信息字符串 | |
| 241 | - var sectionJSON = JSON.stringify(successdata); | |
| 242 | - | |
| 243 | - // 参数集合 | |
| 244 | - var params = {}; | |
| 245 | - | |
| 246 | - // 站点信息JSON字符串 | |
| 247 | - params.stationJSON = stationJSON; | |
| 248 | - | |
| 249 | - // 线路ID | |
| 250 | - params.lineId = id; | |
| 251 | - | |
| 252 | - // 方向 | |
| 253 | - params.directions = directionData; | |
| 254 | - | |
| 255 | - // 原始坐标类型 | |
| 256 | - params.dbType = 'b'; | |
| 257 | - | |
| 258 | - // 圆形半径 | |
| 259 | - params.radius = '300'; | |
| 260 | - | |
| 261 | - // 限速 | |
| 262 | - params.speedLimit = '60'; | |
| 263 | - | |
| 264 | - // 图形类型(r:圆形;p:多边形) | |
| 265 | - params.shapesType = 'r'; | |
| 266 | - | |
| 267 | - // destroy:是否撤销 | |
| 268 | - params.destroy = '0'; | |
| 269 | - | |
| 270 | - // versions:版本号 | |
| 271 | - params.versions = '1'; | |
| 272 | - | |
| 273 | - // 路段信息JSON字符串 | |
| 274 | - params.sectionJSON = sectionJSON; | |
| 218 | + // 清除地图覆盖物 | |
| 219 | + map.clearOverlays(); | |
| 220 | + | |
| 221 | + // 刷新树 | |
| 222 | + fun.resjtreeDate(addLine.id,directionData); | |
| 223 | + | |
| 224 | + // 查询上行路段信息 | |
| 225 | + ajaxd.getSectionRouteInfo(addLine.id,directionData,function(data) { | |
| 275 | 226 | |
| 276 | - console.log(params); | |
| 227 | + // 在地图上画出线路走向 | |
| 228 | + fun.linePanlThree(data,directionData); | |
| 277 | 229 | |
| 278 | - // 保存 | |
| 279 | - GetAjaxData.manualSave(params,function(rd) { | |
| 280 | - | |
| 281 | - // 关闭弹出层 | |
| 282 | - layer.closeAll(); | |
| 283 | - | |
| 284 | - if(rd.status='SUCCESS') { | |
| 285 | - | |
| 286 | - // 清除地图覆盖物 | |
| 287 | - map.clearOverlays(); | |
| 288 | - | |
| 289 | - layer.msg('保存成功!'); | |
| 290 | - | |
| 291 | - // 刷新树 | |
| 292 | - PublicFunctions.resjtreeDate(id,directionData); | |
| 293 | - | |
| 294 | - // 查询上行路段信息 | |
| 295 | - GetAjaxData.getSectionRouteInfo(id,directionData,function(data) { | |
| 296 | - | |
| 297 | - // 在地图上画出线路走向 | |
| 298 | - PublicFunctions.linePanlThree(data,directionData); | |
| 299 | - | |
| 300 | - }); | |
| 301 | - | |
| 302 | - }else { | |
| 303 | - | |
| 304 | - layer.msg('保存失败!'); | |
| 305 | - | |
| 306 | - } | |
| 307 | - | |
| 308 | - }); | |
| 309 | - | |
| 310 | - }); | |
| 230 | + }); | |
| 311 | 231 | |
| 312 | - });*/ | |
| 313 | - | |
| 232 | + }); | |
| 233 | + | |
| 314 | 234 | }); |
| 315 | 235 | |
| 316 | 236 | }); | ... | ... |
src/main/resources/static/pages/base/stationroute/edit.html
| ... | ... | @@ -225,19 +225,20 @@ |
| 225 | 225 | </div> |
| 226 | 226 | </div> |
| 227 | 227 | </div> |
| 228 | -<script type="text/javascript"> | |
| 229 | -$(function(){ | |
| 228 | +<script type="text/javascript"> | |
| 229 | + | |
| 230 | +$('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,station_,Line_,fun){ | |
| 230 | 231 | |
| 231 | - var editStationParmasObj = EditStationObj.getEitdStation(); | |
| 232 | + var editStationParmasObj = station_.getEitdStation(); | |
| 232 | 233 | |
| 233 | - var addLine = LineObj.getLineObj(); | |
| 234 | + var addLine = Line_.getLineObj(); | |
| 234 | 235 | |
| 235 | - PublicFunctions.setFormValue(editStationParmasObj); | |
| 236 | + fun.setFormValue(editStationParmasObj); | |
| 236 | 237 | |
| 237 | 238 | var edit_direction_v = editStationParmasObj.stationRouteDirections; |
| 238 | 239 | |
| 239 | 240 | // 获取站点序号元素,并添加下拉属性值 |
| 240 | - GetAjaxData.getStation(addLine.id,edit_direction_v,function(treeData) { | |
| 241 | + ajaxd.getStation(addLine.id,edit_direction_v,function(treeData) { | |
| 241 | 242 | |
| 242 | 243 | var options = '<option value="">请选择...</option>'; |
| 243 | 244 | |
| ... | ... | @@ -262,7 +263,7 @@ $(function(){ |
| 262 | 263 | |
| 263 | 264 | $('#stationrouteSelect').html(options); |
| 264 | 265 | |
| 265 | - GetAjaxData.findUpStationRouteCode(addLine.id,edit_direction_v,editStationParmasObj.stationRouteStationRouteCode,function(str) { | |
| 266 | + ajaxd.findUpStationRouteCode(addLine.id,edit_direction_v,editStationParmasObj.stationRouteStationRouteCode,function(str) { | |
| 266 | 267 | |
| 267 | 268 | if(str.length>0){ |
| 268 | 269 | |
| ... | ... | @@ -289,16 +290,20 @@ $(function(){ |
| 289 | 290 | function closeMobleSetClean() { |
| 290 | 291 | |
| 291 | 292 | // 清除地图覆盖物 |
| 292 | - WorldsBMap.clearMarkAndOverlays(); | |
| 293 | + map_.clearMarkAndOverlays(); | |
| 293 | 294 | |
| 294 | 295 | /** 设置新增站点集合对象为空 */ |
| 295 | - EditStationObj.setEitdStation({}); | |
| 296 | + station_.setEitdStation({}); | |
| 296 | 297 | |
| 297 | 298 | var add_direction_v = $('#stationdirSelect').val(); |
| 298 | 299 | |
| 299 | - GetAjaxData.getSectionRouteInfo(addLine.id,add_direction_v,function(data) { | |
| 300 | + fun.resjtreeDate(addLine.id,add_direction_v); | |
| 301 | + | |
| 302 | + fun.editAChangeCssRemoveDisabled(); | |
| 303 | + | |
| 304 | + ajaxd.getSectionRouteInfo(addLine.id,add_direction_v,function(data) { | |
| 300 | 305 | |
| 301 | - PublicFunctions.linePanlThree(addLine.id,data,add_direction_v); | |
| 306 | + fun.linePanlThree(addLine.id,data,add_direction_v); | |
| 302 | 307 | |
| 303 | 308 | }); |
| 304 | 309 | |
| ... | ... | @@ -431,7 +436,7 @@ $(function(){ |
| 431 | 436 | |
| 432 | 437 | error.hide(); |
| 433 | 438 | |
| 434 | - GetAjaxData.stationUpdate(params,function(resuntDate) { | |
| 439 | + ajaxd.stationUpdate(params,function(resuntDate) { | |
| 435 | 440 | |
| 436 | 441 | if(resuntDate.status=='SUCCESS') { |
| 437 | 442 | |
| ... | ... | @@ -446,17 +451,17 @@ $(function(){ |
| 446 | 451 | |
| 447 | 452 | } |
| 448 | 453 | |
| 454 | + $('#edit_station_mobal').modal('hide'); | |
| 455 | + | |
| 449 | 456 | var id = addLine.id; |
| 450 | 457 | |
| 451 | 458 | var dir = params.directions |
| 452 | 459 | |
| 453 | 460 | // 刷行左边树 |
| 454 | - PublicFunctions.resjtreeDate(id,dir); | |
| 461 | + fun.resjtreeDate(id,dir); | |
| 455 | 462 | |
| 456 | 463 | closeMobleSetClean(); |
| 457 | 464 | |
| 458 | - $('#edit_station_mobal').modal('hide'); | |
| 459 | - | |
| 460 | 465 | }); |
| 461 | 466 | |
| 462 | 467 | } |
| ... | ... | @@ -471,8 +476,6 @@ $(function(){ |
| 471 | 476 | |
| 472 | 477 | var tempStr = stationRValue.split('_'); |
| 473 | 478 | |
| 474 | - console.log(tempStr); | |
| 475 | - | |
| 476 | 479 | if(tempStr[1] == 'E') { |
| 477 | 480 | |
| 478 | 481 | $('#stationMarkSelect').val('E'); |
| ... | ... | @@ -487,7 +490,6 @@ $(function(){ |
| 487 | 490 | |
| 488 | 491 | }); |
| 489 | 492 | |
| 490 | - | |
| 491 | 493 | // 当站点类型为中途站或者终点站时,上一站点为必填项! |
| 492 | 494 | $.validator.addMethod("isStart", function(value,element) { |
| 493 | 495 | ... | ... |
src/main/resources/static/pages/base/stationroute/edit_select.html
| ... | ... | @@ -36,14 +36,14 @@ |
| 36 | 36 | <div class="col-md-9"> |
| 37 | 37 | <div class="icheck-list"> |
| 38 | 38 | <label> |
| 39 | - <input type="radio" class="icheck" name="editselect" value=0> 手动规划 | |
| 39 | + <input type="radio" class="icheck" name="editselect" value=0> 重新绘制位置 | |
| 40 | 40 | </label> |
| 41 | 41 | <label> |
| 42 | - <input type="radio" class="icheck" name="editselect" value=1 checked> 重新编辑 | |
| 42 | + <input type="radio" class="icheck" name="editselect" value=1 checked> 编辑原始位置 | |
| 43 | 43 | </label> |
| 44 | - <label > | |
| 44 | + <!-- <label > | |
| 45 | 45 | <input type="radio" class="icheck" name="editselect" value=2 > 选择引用 |
| 46 | - </label> | |
| 46 | + </label> --> | |
| 47 | 47 | </div> |
| 48 | 48 | </div> |
| 49 | 49 | </div> |
| ... | ... | @@ -68,19 +68,23 @@ |
| 68 | 68 | </div> |
| 69 | 69 | <script type="text/javascript"> |
| 70 | 70 | |
| 71 | -$(function(){ | |
| 71 | +$('#edit_select_mobal').on('editSelectMobal_show', function(e, map_,drw,ajaxd,editStationObj,lineObj,fun,dir_){ | |
| 72 | + | |
| 73 | + var sel = fun.getCurrSelNode(dir_); | |
| 74 | + | |
| 75 | + var Station = sel[0].original; | |
| 72 | 76 | |
| 73 | 77 | // 获取修改站点对象 |
| 74 | - var editStationParmas = EditStationObj.getEitdStation(); | |
| 78 | + /* var Station = editStationObj.getEitdStation(); */ | |
| 75 | 79 | |
| 76 | 80 | // 显示选择修改方式弹出层 |
| 77 | 81 | $('#edit_select_mobal').modal({show : true,backdrop: 'static',keyboard: false}); |
| 78 | 82 | |
| 79 | 83 | // 获取站点名称元素并赋值 |
| 80 | - $('#stationNamebootbox').val(editStationParmas.stationStationName); | |
| 84 | + $('#stationNamebootbox').val(Station.stationStationName); | |
| 81 | 85 | |
| 82 | 86 | // 定义站点图形 |
| 83 | - var stationShapesTypeV = editStationParmas.stationShapesType; | |
| 87 | + var stationShapesTypeV = Station.stationShapesType; | |
| 84 | 88 | |
| 85 | 89 | // 获取表单元素 |
| 86 | 90 | var form = $('#edit_select'); |
| ... | ... | @@ -147,33 +151,33 @@ $(function(){ |
| 147 | 151 | |
| 148 | 152 | submitHandler : function(f) { |
| 149 | 153 | |
| 154 | + editStationObj.setEitdStation(Station); | |
| 155 | + | |
| 150 | 156 | // 隐藏弹出层 |
| 151 | 157 | $('#edit_select_mobal').modal('hide'); |
| 152 | 158 | |
| 159 | + $('#downLine').addClass('btn disabled'); | |
| 160 | + | |
| 161 | + $('.btn-circle').addClass('disabled'); | |
| 162 | + | |
| 163 | + $('#upLine').addClass('btn disabled'); | |
| 164 | + | |
| 153 | 165 | // 表单序列 |
| 154 | 166 | var params = form.serializeJSON(); |
| 155 | 167 | |
| 156 | 168 | // 站点名称 |
| 157 | 169 | var editStationName = params.stationNamebootbox; |
| 158 | 170 | |
| 159 | - EditStationObj.setEitdStationName(editStationName); | |
| 171 | + editStationObj.setEitdStationName(editStationName); | |
| 160 | 172 | |
| 161 | 173 | if(params.editselect==0){ |
| 162 | 174 | |
| 163 | - WorldsBMap.clearMarkAndOverlays(); | |
| 175 | + map_.clearMarkAndOverlays(); | |
| 164 | 176 | |
| 165 | 177 | // 打开绘制工具 |
| 166 | - DrawingManagerObj.openDrawingManager(); | |
| 167 | - | |
| 168 | - WorldsBMap.localtionPoint(editStationName); | |
| 169 | - | |
| 170 | - /* status = 'edit'; | |
| 171 | - | |
| 172 | - // 站点名称 | |
| 173 | - editStationParmas.stationNamebootbox = editStationName; | |
| 174 | - | |
| 175 | - WorldsBMap.drawingManagerOpen(); */ | |
| 178 | + drw.openDrawingManager(); | |
| 176 | 179 | |
| 180 | + map_.localtionPoint(editStationName); | |
| 177 | 181 | |
| 178 | 182 | }else if(params.editselect==1){ |
| 179 | 183 | |
| ... | ... | @@ -182,7 +186,7 @@ $(function(){ |
| 182 | 186 | shift: 0,time: 10000}); |
| 183 | 187 | |
| 184 | 188 | // 编辑图形 |
| 185 | - WorldsBMap.editShapes(editStationName,stationShapesTypeV,mindex); | |
| 189 | + map_.editShapes(editStationName,stationShapesTypeV,mindex); | |
| 186 | 190 | |
| 187 | 191 | }else if(params.editselect==2){ |
| 188 | 192 | |
| ... | ... | @@ -191,11 +195,9 @@ $(function(){ |
| 191 | 195 | |
| 192 | 196 | $.get('station_tabledate.html', function(m){$(pjaxContainer).append(m);}); |
| 193 | 197 | |
| 194 | - | |
| 195 | 198 | } |
| 196 | 199 | |
| 197 | 200 | } |
| 198 | 201 | }); |
| 199 | - | |
| 200 | -}); | |
| 202 | +}) | |
| 201 | 203 | </script> |
| 202 | 204 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/stationroute/editsection.html
0 → 100644
| 1 | +<!-- 编辑路段 --> | |
| 2 | +<div class="modal fade" id="edit_section_mobal" tabindex="-1" role="basic" aria-hidden="true"> | |
| 3 | + | |
| 4 | + <div class="modal-dialog"> | |
| 5 | + | |
| 6 | + <div class="modal-content"> | |
| 7 | + | |
| 8 | + <div class="modal-header"> | |
| 9 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> | |
| 10 | + <h4 class="modal-title">路段路段</h4> | |
| 11 | + </div> | |
| 12 | + | |
| 13 | + <div class="modal-body"> | |
| 14 | + | |
| 15 | + <form class="form-horizontal" role="form" id="edit_section__form" action="/module" method="post"> | |
| 16 | + | |
| 17 | + <div class="alert alert-danger display-hide"> <button class="close" data-close="alert"></button> | |
| 18 | + 您的输入有误,请检查下面的输入项 | |
| 19 | + </div> | |
| 20 | + | |
| 21 | + <!-- 线路ID --> | |
| 22 | + | |
| 23 | + <input type="hidden" name="sectionId" id="sectionIdInput"> | |
| 24 | + | |
| 25 | + <input type="hidden" name="sectionRouteId" id="sectionRouteIdInput"> | |
| 26 | + | |
| 27 | + <input type="hidden" name="sectionRouteLine" id="sectionRouteLineInput"> | |
| 28 | + | |
| 29 | + <input type="hidden" name="lineCode" id="lineCodeInput"> | |
| 30 | + | |
| 31 | + <input type="hidden" name="bsectionVector" id="bsectionVectorInput" /> | |
| 32 | + | |
| 33 | + <input type="hidden" name="csectionVector" id="csectionVectorInput" value=""/> | |
| 34 | + | |
| 35 | + <input type="hidden" name="dbType" id="dbTypeInput" value="b"/> | |
| 36 | + | |
| 37 | + <!-- 路段名称 --> | |
| 38 | + <div class="form-body"> | |
| 39 | + <div class="form-group"> | |
| 40 | + <label class="control-label col-md-3"> | |
| 41 | + <span class="required"> * </span> 路段名称: | |
| 42 | + </label> | |
| 43 | + <div class="col-md-6"> | |
| 44 | + <input type="text" class="form-control" name="sectionName" id="sectionNameInput" placeholder="路段名称"> | |
| 45 | + </div> | |
| 46 | + </div> | |
| 47 | + </div> | |
| 48 | + | |
| 49 | + <!-- 路段编码 --> | |
| 50 | + <div class="form-body"> | |
| 51 | + <div class="form-group"> | |
| 52 | + <label class="control-label col-md-3"> | |
| 53 | + <span class="required"> * </span> 路段编码: | |
| 54 | + </label> | |
| 55 | + <div class="col-md-6"> | |
| 56 | + <input type="text" class="form-control" name="sectionCode" id="sectionCodeInput" placeholder="路段编码"> | |
| 57 | + </div> | |
| 58 | + </div> | |
| 59 | + </div> | |
| 60 | + | |
| 61 | + <!-- 路段序号 --> | |
| 62 | + <div class="form-body"> | |
| 63 | + <div class="form-group"> | |
| 64 | + <label class="control-label col-md-3"> | |
| 65 | + <span class="required"> * </span>上一路段: | |
| 66 | + </label> | |
| 67 | + <div class="col-md-6"> | |
| 68 | + <select name="sectionrouteCode" class="form-control" id="sectionrouteCodeSelect"></select> | |
| 69 | + <span class="help-block"> *说明:选择的路段将作为本站序号的参考,成为选择路段的下一个路段。 </span> | |
| 70 | + </div> | |
| 71 | + </div> | |
| 72 | + </div> | |
| 73 | + | |
| 74 | + <!-- 路段类型 --> | |
| 75 | + <!-- <div class="form-body"> | |
| 76 | + <div class="form-group"> | |
| 77 | + <label class="control-label col-md-3"> | |
| 78 | + <span class="required"> * </span>路段类型: | |
| 79 | + </label> | |
| 80 | + <div class="col-md-6"> | |
| 81 | + <select name="sectionType" class="form-control" id="sectionTypeSelect"> | |
| 82 | + <option value="">-- 请选择路段类型 --</option> | |
| 83 | + <option value="B">起点站</option> | |
| 84 | + <option value="Z">中途站</option> | |
| 85 | + <option value="E">终点站</option> | |
| 86 | + </select> | |
| 87 | + </div> | |
| 88 | + </div> | |
| 89 | + </div> --> | |
| 90 | + | |
| 91 | + <!-- 路段方向 --> | |
| 92 | + <div class="form-body"> | |
| 93 | + <div class="form-group"> | |
| 94 | + <label class="control-label col-md-3"> | |
| 95 | + <span class="required"> * </span>路段方向: | |
| 96 | + </label> | |
| 97 | + <div class="col-md-6"> | |
| 98 | + <select name="directions" class="form-control" id="directionsSection"> | |
| 99 | + <option value="">-- 请选择路段类型 --</option> | |
| 100 | + <option value="0">上行</option> | |
| 101 | + <option value="1">下行</option> | |
| 102 | + </select> | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + </div> | |
| 106 | + | |
| 107 | + <!-- 道路编码--> | |
| 108 | + <div class="form-body"> | |
| 109 | + <div class="form-group"> | |
| 110 | + <label class="control-label col-md-3">道路编码:</label> | |
| 111 | + <div class="col-md-6"> | |
| 112 | + <input type="text" class="form-control" name="roadCoding" id="roadCodingCodInput" placeholder="道路编码"> | |
| 113 | + </div> | |
| 114 | + </div> | |
| 115 | + </div> | |
| 116 | + | |
| 117 | + <!-- 路段限速 --> | |
| 118 | + <div class="form-body"> | |
| 119 | + <div class="form-group"> | |
| 120 | + <label class="control-label col-md-3"> | |
| 121 | + <span class="required"> * </span> 路段限速: | |
| 122 | + </label> | |
| 123 | + <div class="col-md-6"> | |
| 124 | + <input type="text" class="form-control" name="speedLimit" id="speedLimitInput" placeholder="路段限速"> | |
| 125 | + </div> | |
| 126 | + </div> | |
| 127 | + </div> | |
| 128 | + | |
| 129 | + <!-- 路段时长 --> | |
| 130 | + <div class="form-body"> | |
| 131 | + <div class="form-group"> | |
| 132 | + <label class="col-md-3 control-label">路段时长:</label> | |
| 133 | + <div class="col-md-6"> | |
| 134 | + <input type="text" class="form-control" name="sectionTime" id="sectionTimeInput" placeholder="路段时长"> | |
| 135 | + <span class="help-block">单位:分钟</span> | |
| 136 | + </div> | |
| 137 | + </div> | |
| 138 | + </div> | |
| 139 | + | |
| 140 | + <!-- 路段长度 --> | |
| 141 | + <div class="form-body"> | |
| 142 | + <div class="form-group"> | |
| 143 | + <label class="col-md-3 control-label">路段长度:</label> | |
| 144 | + <div class="col-md-6"> | |
| 145 | + <input type="text" class="form-control" name="sectionDistance" id="sectionDistanceInput" placeholder="路段长度"> | |
| 146 | + <span class="help-block">单位:公里</span> | |
| 147 | + </div> | |
| 148 | + </div> | |
| 149 | + </div> | |
| 150 | + | |
| 151 | + <!-- 版本号 --> | |
| 152 | + <div class="form-body"> | |
| 153 | + <div class="form-group"> | |
| 154 | + <label class="col-md-3 control-label">版本号:</label> | |
| 155 | + <div class="col-md-6"> | |
| 156 | + <input type="text" class="form-control" name="versions" id="versionsInput" Readonly> | |
| 157 | + </div> | |
| 158 | + </div> | |
| 159 | + </div> | |
| 160 | + | |
| 161 | + <!-- 范围图形类型 --> | |
| 162 | + <div class="form-body"> | |
| 163 | + <div class="form-group"> | |
| 164 | + <label class="col-md-3 control-label">是否撤销:</label> | |
| 165 | + <div class="col-md-6"> | |
| 166 | + <select name="destroy" class="form-control" id="destroySelect"> | |
| 167 | + <option value="">-- 请选择撤销类型 --</option> | |
| 168 | + <option value="0">否</option> | |
| 169 | + <option value="1">是</option> | |
| 170 | + </select> | |
| 171 | + </div> | |
| 172 | + </div> | |
| 173 | + </div> | |
| 174 | + | |
| 175 | + <!-- 描述/说明 --> | |
| 176 | + <div class="form-group"> | |
| 177 | + <label class="control-label col-md-3"> 描述/说明: </label> | |
| 178 | + <div class="col-md-6"> | |
| 179 | + <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea> | |
| 180 | + </div> | |
| 181 | + </div> | |
| 182 | + </form> | |
| 183 | + </div> | |
| 184 | + <div class="modal-footer"> | |
| 185 | + <button type="button" class="btn default" data-dismiss="modal">取消</button> | |
| 186 | + <button type="button" class="btn btn-primary" id="editSectionButton">提交数据</button> | |
| 187 | + </div> | |
| 188 | + </div> | |
| 189 | + </div> | |
| 190 | +</div> | |
| 191 | +<script type="text/javascript"> | |
| 192 | + | |
| 193 | +$('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,section,fun){ | |
| 194 | + | |
| 195 | + var Section = section.getEitdSection(); | |
| 196 | + | |
| 197 | + fun.setSectionFormValue(Section); | |
| 198 | + | |
| 199 | + // 方向 | |
| 200 | + var dir = Section.sectionrouteDirections; | |
| 201 | + | |
| 202 | + var lineId = Section.sectionrouteLine; | |
| 203 | + | |
| 204 | + // 获取路段号元素,并添加下拉属性值 | |
| 205 | + ajaxd.getStation(lineId,dir,function(treeData) { | |
| 206 | + | |
| 207 | + var options = '<option value="">请选择...</option>'; | |
| 208 | + | |
| 209 | + var dArray = treeData[0].children[1].children; | |
| 210 | + | |
| 211 | + var eq_stationRouteCode = Section.sectionrouteCode; | |
| 212 | + | |
| 213 | + for(var i = 0 ; i<dArray.length; i++){ | |
| 214 | + | |
| 215 | + var ptions_v = dArray[i].sectionrouteCode; | |
| 216 | + | |
| 217 | + // 排除本站 | |
| 218 | + if(eq_stationRouteCode == ptions_v){ | |
| 219 | + | |
| 220 | + continue; | |
| 221 | + | |
| 222 | + } | |
| 223 | + | |
| 224 | + options += '<option value="'+ ptions_v +'">'+dArray[i].sectionName+'</option>' | |
| 225 | + | |
| 226 | + } | |
| 227 | + | |
| 228 | + $('#sectionrouteCodeSelect').html(options); | |
| 229 | + | |
| 230 | + ajaxd.findUpStationRouteCode(lineId,dir,eq_stationRouteCode,function(str) { | |
| 231 | + | |
| 232 | + if(str.length>0){ | |
| 233 | + | |
| 234 | + var upStationRouteCode = str[0].sectionrouteCode | |
| 235 | + | |
| 236 | + $('#sectionrouteCodeSelect').val(upStationRouteCode); | |
| 237 | + | |
| 238 | + } | |
| 239 | + | |
| 240 | + }); | |
| 241 | + | |
| 242 | + }); | |
| 243 | + | |
| 244 | + // 显示mobal | |
| 245 | + $('#edit_section_mobal').modal({show : true,backdrop: 'static',keyboard: false}); | |
| 246 | + | |
| 247 | + // 当调用 hide 实例方法时触发 | |
| 248 | + $('#edit_section_mobal').on('hide.bs.modal', function () { | |
| 249 | + | |
| 250 | + closeMobleSetClean(); | |
| 251 | + | |
| 252 | + }); | |
| 253 | + | |
| 254 | + function closeMobleSetClean() { | |
| 255 | + | |
| 256 | + // 清除地图覆盖物 | |
| 257 | + map_.clearMarkAndOverlays(); | |
| 258 | + | |
| 259 | + /** 设置修改路段集合对象为空 */ | |
| 260 | + section.setEitdSection({}); | |
| 261 | + | |
| 262 | + fun.resjtreeDate(lineId,dir); | |
| 263 | + | |
| 264 | + fun.editAChangeCssRemoveDisabled(); | |
| 265 | + | |
| 266 | + ajaxd.getSectionRouteInfo(lineId,dir,function(data) { | |
| 267 | + | |
| 268 | + fun.linePanlThree(lineId,data,dir); | |
| 269 | + | |
| 270 | + }); | |
| 271 | + | |
| 272 | + } | |
| 273 | + | |
| 274 | + // 编辑表单元素 | |
| 275 | + var form = $('#edit_section__form'); | |
| 276 | + | |
| 277 | + // 获取错误提示元素 | |
| 278 | + var error = $('.alert-danger', form); | |
| 279 | + | |
| 280 | + // 提交数据按钮事件 | |
| 281 | + $('#editSectionButton').on('click', function() { | |
| 282 | + | |
| 283 | + | |
| 284 | + // 表单提交 | |
| 285 | + form.submit(); | |
| 286 | + | |
| 287 | + }); | |
| 288 | + | |
| 289 | + // 表单验证 | |
| 290 | + form.validate({ | |
| 291 | + | |
| 292 | + errorElement : 'span', | |
| 293 | + | |
| 294 | + errorClass : 'help-block help-block-error', | |
| 295 | + | |
| 296 | + focusInvalid : false, | |
| 297 | + | |
| 298 | + rules : { | |
| 299 | + | |
| 300 | + // 路段名称 | |
| 301 | + 'sectionName' : { | |
| 302 | + | |
| 303 | + // 必填项 | |
| 304 | + required : true | |
| 305 | + | |
| 306 | + }, | |
| 307 | + | |
| 308 | + /* // 路段序号 | |
| 309 | + 'sectionrouteCode' : { | |
| 310 | + | |
| 311 | + isStart : true | |
| 312 | + | |
| 313 | + }, */ | |
| 314 | + | |
| 315 | + // 路段编码 | |
| 316 | + 'sectionCode': { | |
| 317 | + | |
| 318 | + // 必填项 | |
| 319 | + required : true, | |
| 320 | + | |
| 321 | + }, | |
| 322 | + | |
| 323 | + // 路段方向 | |
| 324 | + 'directions' : { | |
| 325 | + | |
| 326 | + // 必填项 | |
| 327 | + required : true, | |
| 328 | + | |
| 329 | + // 方向选择限制 | |
| 330 | + /* dirIs : true */ | |
| 331 | + | |
| 332 | + }, | |
| 333 | + | |
| 334 | + | |
| 335 | + // 路段限速 | |
| 336 | + 'speedLimit' : { | |
| 337 | + | |
| 338 | + // 必须输入合法的数字(负数,小数)。 | |
| 339 | + number : true | |
| 340 | + | |
| 341 | + }, | |
| 342 | + | |
| 343 | + // 路段长度 | |
| 344 | + 'sectionTime' : { | |
| 345 | + | |
| 346 | + // 必须输入合法的数字(负数,小数)。 | |
| 347 | + number : true | |
| 348 | + | |
| 349 | + }, | |
| 350 | + | |
| 351 | + // 路段时长 | |
| 352 | + 'sectionDistance' : { | |
| 353 | + | |
| 354 | + // 必须输入合法的数字(负数,小数)。 | |
| 355 | + number : true | |
| 356 | + | |
| 357 | + }, | |
| 358 | + | |
| 359 | + // 描述与说明 | |
| 360 | + 'descriptions' : { | |
| 361 | + | |
| 362 | + // 最大长度 | |
| 363 | + maxlength: 150 | |
| 364 | + | |
| 365 | + } | |
| 366 | + }, | |
| 367 | + | |
| 368 | + invalidHandler : function(event, validator) { | |
| 369 | + | |
| 370 | + error.show(); | |
| 371 | + | |
| 372 | + App.scrollTo(error, -200); | |
| 373 | + | |
| 374 | + }, | |
| 375 | + | |
| 376 | + highlight : function(element) { | |
| 377 | + | |
| 378 | + $(element).closest('.form-group').addClass('has-error'); | |
| 379 | + | |
| 380 | + }, | |
| 381 | + | |
| 382 | + unhighlight : function(element) { | |
| 383 | + | |
| 384 | + $(element).closest('.form-group').removeClass('has-error'); | |
| 385 | + | |
| 386 | + }, | |
| 387 | + | |
| 388 | + success : function(label) { | |
| 389 | + | |
| 390 | + label.closest('.form-group').removeClass('has-error'); | |
| 391 | + | |
| 392 | + }, | |
| 393 | + | |
| 394 | + submitHandler : function(f) { | |
| 395 | + | |
| 396 | + var params = form.serializeJSON(); | |
| 397 | + | |
| 398 | + error.hide(); | |
| 399 | + | |
| 400 | + console.log(params); | |
| 401 | + | |
| 402 | + return; | |
| 403 | + | |
| 404 | + ajaxd.sectionUpdata(params,function(resuntDate) { | |
| 405 | + | |
| 406 | + if(resuntDate.status=='SUCCESS') { | |
| 407 | + | |
| 408 | + // 弹出添加成功提示消息 | |
| 409 | + layer.msg('修改成功...'); | |
| 410 | + | |
| 411 | + | |
| 412 | + }else { | |
| 413 | + | |
| 414 | + // 弹出添加失败提示消息 | |
| 415 | + layer.msg('修改失败...'); | |
| 416 | + | |
| 417 | + } | |
| 418 | + | |
| 419 | + $('#edit_section_mobal').modal('hide'); | |
| 420 | + | |
| 421 | + var dir = params.directions | |
| 422 | + | |
| 423 | + // 刷行左边树 | |
| 424 | + fun.resjtreeDate(lineId,dir); | |
| 425 | + | |
| 426 | + closeMobleSetClean(); | |
| 427 | + | |
| 428 | + }); | |
| 429 | + | |
| 430 | + } | |
| 431 | + }); | |
| 432 | + | |
| 433 | + | |
| 434 | +}); | |
| 435 | +</script> | |
| 0 | 436 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/stationroute/js/drawingManager.js
| ... | ... | @@ -71,36 +71,24 @@ var DrawingManagerObj = function () { |
| 71 | 71 | // 多变行质心点 |
| 72 | 72 | var addSttationPoints_ = pointE.getBounds().getCenter().lng+ ' ' + pointE.getBounds().getCenter().lat; |
| 73 | 73 | |
| 74 | - var PointsList = []; | |
| 74 | + var addPolyGonLen_ = pointE.getPath().length; | |
| 75 | 75 | |
| 76 | - for ( var i = 0; i < pointE.getPath().length; i++) { | |
| 77 | - | |
| 78 | - PointsList.push({potion: {lng: pointE.getPath()[i].lng, lat: pointE.getPath()[i].lat}}); | |
| 79 | - | |
| 80 | - } | |
| 81 | - | |
| 82 | - PointsList.push({potion: {lng: pointE.getPath()[0].lng, lat: pointE.getPath()[0].lat}}); | |
| 83 | - | |
| 84 | - var centre = [{potion:{lng:pointE.getBounds().getCenter().lng,lat:pointE.getBounds().getCenter().lat}}]; | |
| 85 | - | |
| 86 | - var pointsListLen_ = PointsList.length; | |
| 87 | - | |
| 88 | - var bPloygonGrid = ''; | |
| 89 | - | |
| 90 | - for(var k =0;k<pointsListLen_;k++) { | |
| 76 | + for(var k =0;k<addPolyGonLen_;k++) { | |
| 91 | 77 | |
| 92 | 78 | if(k==0) { |
| 93 | 79 | |
| 94 | - bPloygonGrid = PointsList[k].potion.lng + ' ' +PointsList[k].potion.lat; | |
| 80 | + bPloygonGrid = pointE.getPath()[k].lng + ' ' + pointE.getPath()[k].lat; | |
| 95 | 81 | |
| 96 | 82 | }else { |
| 97 | 83 | |
| 98 | - bPloygonGrid = bPloygonGrid + ',' + PointsList[k].potion.lng + ' ' +PointsList[k].potion.lat; | |
| 84 | + bPloygonGrid = bPloygonGrid + ',' + pointE.getPath()[k].lng + ' ' + pointE.getPath()[k].lat; | |
| 99 | 85 | |
| 100 | 86 | } |
| 101 | 87 | |
| 102 | 88 | } |
| 103 | 89 | |
| 90 | + bPloygonGrid = bPloygonGrid + ',' + pointE.getPath()[0].lng + ' ' + pointE.getPath()[0].lat; | |
| 91 | + | |
| 104 | 92 | var add = AddStationObj.getAddStation(); |
| 105 | 93 | |
| 106 | 94 | var edit = EditStationObj.getEitdStation(); |
| ... | ... | @@ -119,7 +107,13 @@ var DrawingManagerObj = function () { |
| 119 | 107 | /** 设置新增站点集合对象图形百度坐标集合属性值 @param:<bPolygonGrid:图形百度坐标集合) */ |
| 120 | 108 | AddStationObj.setBPolygonGrid(bPloygonGrid); |
| 121 | 109 | |
| 122 | - $.get('add.html', function(m){$(pjaxContainer).append(m);}); | |
| 110 | + $.get('add.html', function(m){ | |
| 111 | + | |
| 112 | + $(pjaxContainer).append(m); | |
| 113 | + | |
| 114 | + $('#add_station_mobal').trigger('AddStationMobal.show', [WorldsBMap,GetAjaxData,AddStationObj,LineObj,PublicFunctions]); | |
| 115 | + | |
| 116 | + }); | |
| 123 | 117 | } |
| 124 | 118 | |
| 125 | 119 | if(!$.isEmptyObject(edit)){ | ... | ... |
src/main/resources/static/pages/base/stationroute/js/editsection.js
0 → 100644
| 1 | +var EditSectionObj = function () { | |
| 2 | + | |
| 3 | + /** 定义修改路段对象 */ | |
| 4 | + var Section={}; | |
| 5 | + | |
| 6 | + var SectionObj = { | |
| 7 | + | |
| 8 | + /** 获取修改路段集合对象 @return:<Section:修改路段对象> */ | |
| 9 | + getEitdSection : function() { | |
| 10 | + | |
| 11 | + return Section; | |
| 12 | + }, | |
| 13 | + | |
| 14 | + /** 设置修改路段集合对象为空 */ | |
| 15 | + setEitdSection : function(sc) { | |
| 16 | + | |
| 17 | + Section = sc; | |
| 18 | + }, | |
| 19 | + | |
| 20 | + | |
| 21 | + /** 设置修改路段集合对象折线百度坐标集合属性值 @param:<bsectionVector:折线百度坐标集合) */ | |
| 22 | + setEitdBsectionVector : function(bsectionVector) { | |
| 23 | + | |
| 24 | + Section.sectionBsectionVector = bsectionVector; | |
| 25 | + } | |
| 26 | + } | |
| 27 | + | |
| 28 | + return SectionObj; | |
| 29 | + | |
| 30 | +}(); | ... | ... |
src/main/resources/static/pages/base/stationroute/js/editstationobj.js
src/main/resources/static/pages/base/stationroute/js/stationroute-ajax-getdata.js
| ... | ... | @@ -11,8 +11,6 @@ |
| 11 | 11 | * |
| 12 | 12 | * - - - - - -》 getStationCode:查询站点编码 |
| 13 | 13 | * |
| 14 | - * - - - - - -》 getFormPointEToWGS :原百度坐标转WGS坐标 | |
| 15 | - * | |
| 16 | 14 | * - - - - - -》 stationSave:新增站点保存 |
| 17 | 15 | * |
| 18 | 16 | * - - - - - -》 stationUpdate:站点更新 |
| ... | ... | @@ -23,10 +21,6 @@ |
| 23 | 21 | * |
| 24 | 22 | * - - - - - -》 getIdLineName:获取线路名称 |
| 25 | 23 | * |
| 26 | - * - - - - - -》 BpolyGonArrayToWGS:折线百度坐标转WGS坐标 | |
| 27 | - * | |
| 28 | - * - - - - - -》 MuneBpointsArrayToWGS:手动规划百度坐标转WGS坐标 | |
| 29 | - * | |
| 30 | 24 | * - - - - - -》 getSectionRouteInfo:查询路段信息 |
| 31 | 25 | */ |
| 32 | 26 | |
| ... | ... | @@ -107,56 +101,16 @@ var GetAjaxData = function(){ |
| 107 | 101 | |
| 108 | 102 | }, |
| 109 | 103 | |
| 110 | - // 原百度坐标转WGS坐标 | |
| 111 | - getFormPointEToWGS: function(points,callback) { | |
| 112 | - | |
| 113 | - // 获取长度 | |
| 114 | - var len = points.length; | |
| 104 | + | |
| 105 | + findUpStationRouteCode : function(lineId,diraction,sectionRouteCode,callback) { | |
| 115 | 106 | |
| 116 | - (function(){ | |
| 107 | + $get('/sectionroute/findUpStationRouteCode',{lineId:lineId,direction:diraction,sectionRouteCode:sectionRouteCode},function(result) { | |
| 117 | 108 | |
| 118 | - if (!arguments.callee.count) { | |
| 119 | - | |
| 120 | - arguments.callee.count = 0; | |
| 121 | - | |
| 122 | - } | |
| 123 | - | |
| 124 | - arguments.callee.count++; | |
| 125 | - | |
| 126 | - var index = parseInt(arguments.callee.count) - 1; | |
| 127 | - | |
| 128 | - if (index >= len) { | |
| 129 | - | |
| 130 | - callback && callback(points); | |
| 131 | - | |
| 132 | - return; | |
| 133 | - } | |
| 134 | - | |
| 135 | - var f = arguments.callee; | |
| 136 | - | |
| 137 | - $.ajax({ | |
| 138 | - | |
| 139 | - url: 'http://api.zdoz.net/bd2wgs.aspx', | |
| 140 | - | |
| 141 | - data: {lat: points[index].potion.lat , lng: points[index].potion.lng}, | |
| 142 | - | |
| 143 | - dataType: 'jsonp', | |
| 144 | - | |
| 145 | - success: function(r){ | |
| 146 | - | |
| 147 | - if(r) { | |
| 148 | - | |
| 149 | - points[index].WGSpotion = r; | |
| 150 | - | |
| 151 | - } | |
| 152 | - | |
| 153 | - f(); | |
| 154 | - } | |
| 155 | - }); | |
| 109 | + callback && callback(result); | |
| 156 | 110 | |
| 157 | - })(); | |
| 111 | + }); | |
| 158 | 112 | |
| 159 | - }, | |
| 113 | + }, | |
| 160 | 114 | |
| 161 | 115 | // 新增站点保存 |
| 162 | 116 | stationSave : function(station,callback) { |
| ... | ... | @@ -213,127 +167,6 @@ var GetAjaxData = function(){ |
| 213 | 167 | |
| 214 | 168 | }, |
| 215 | 169 | |
| 216 | - // 折线百度坐标转WGS坐标 | |
| 217 | - BpolyGonArrayToWGS : function(polyGonArray,callback) { | |
| 218 | - | |
| 219 | - if(polyGonArray) { | |
| 220 | - | |
| 221 | - // 获取长度 | |
| 222 | - var len = polyGonArray.length; | |
| 223 | - | |
| 224 | - (function(){ | |
| 225 | - | |
| 226 | - if (!arguments.callee.count) { | |
| 227 | - | |
| 228 | - arguments.callee.count = 0; | |
| 229 | - | |
| 230 | - } | |
| 231 | - | |
| 232 | - arguments.callee.count++; | |
| 233 | - | |
| 234 | - var index = parseInt(arguments.callee.count) - 1; | |
| 235 | - | |
| 236 | - if (index >= len) { | |
| 237 | - | |
| 238 | - callback && callback(polyGonArray); | |
| 239 | - | |
| 240 | - return; | |
| 241 | - } | |
| 242 | - | |
| 243 | - var f = arguments.callee; | |
| 244 | - | |
| 245 | - $.ajax({ | |
| 246 | - | |
| 247 | - url: 'http://api.zdoz.net/bd2wgs.aspx', | |
| 248 | - | |
| 249 | - data: {lat: polyGonArray[index].lat , lng: polyGonArray[index].lng}, | |
| 250 | - | |
| 251 | - dataType: 'jsonp', | |
| 252 | - | |
| 253 | - success: function(r){ | |
| 254 | - | |
| 255 | - if(r) { | |
| 256 | - | |
| 257 | - polyGonArray[index].WGSpotion = r; | |
| 258 | - | |
| 259 | - } | |
| 260 | - | |
| 261 | - f(); | |
| 262 | - } | |
| 263 | - }); | |
| 264 | - | |
| 265 | - })(); | |
| 266 | - | |
| 267 | - }else { | |
| 268 | - | |
| 269 | - callback && callback(false); | |
| 270 | - | |
| 271 | - } | |
| 272 | - | |
| 273 | - | |
| 274 | - }, | |
| 275 | - | |
| 276 | - // 手动规划百度坐标转WGS坐标 | |
| 277 | - MuneBpointsArrayToWGS : function(polyGonArray,callback) { | |
| 278 | - | |
| 279 | - if(polyGonArray) { | |
| 280 | - | |
| 281 | - // 获取长度 | |
| 282 | - var len = polyGonArray.length; | |
| 283 | - | |
| 284 | - (function(){ | |
| 285 | - | |
| 286 | - if (!arguments.callee.count) { | |
| 287 | - | |
| 288 | - arguments.callee.count = 0; | |
| 289 | - | |
| 290 | - } | |
| 291 | - | |
| 292 | - arguments.callee.count++; | |
| 293 | - | |
| 294 | - var index = parseInt(arguments.callee.count) - 1; | |
| 295 | - | |
| 296 | - if (index >= len) { | |
| 297 | - | |
| 298 | - callback && callback(polyGonArray); | |
| 299 | - | |
| 300 | - return; | |
| 301 | - } | |
| 302 | - | |
| 303 | - var f = arguments.callee; | |
| 304 | - | |
| 305 | - $.ajax({ | |
| 306 | - | |
| 307 | - // 百度坐标获取WGS坐标 | |
| 308 | - url: 'http://api.zdoz.net/bd2wgs.aspx', | |
| 309 | - | |
| 310 | - data: {lat: polyGonArray[index].lat , lng: polyGonArray[index].lng}, | |
| 311 | - | |
| 312 | - dataType: 'jsonp', | |
| 313 | - | |
| 314 | - success: function(r){ | |
| 315 | - | |
| 316 | - if(r) { | |
| 317 | - | |
| 318 | - polyGonArray[index].WGSpotion = r; | |
| 319 | - | |
| 320 | - } | |
| 321 | - | |
| 322 | - f(); | |
| 323 | - } | |
| 324 | - }); | |
| 325 | - | |
| 326 | - })(); | |
| 327 | - | |
| 328 | - }else { | |
| 329 | - | |
| 330 | - callback && callback(''); | |
| 331 | - | |
| 332 | - } | |
| 333 | - | |
| 334 | - | |
| 335 | - }, | |
| 336 | - | |
| 337 | 170 | // 查询路段信息 |
| 338 | 171 | getSectionRouteInfo : function(lineId,direction,callback) { |
| 339 | 172 | |
| ... | ... | @@ -348,8 +181,6 @@ var GetAjaxData = function(){ |
| 348 | 181 | // 手动规划线路保存 |
| 349 | 182 | manualSave : function(params,callback) { |
| 350 | 183 | |
| 351 | - console.log(params); | |
| 352 | - | |
| 353 | 184 | // 保存 |
| 354 | 185 | $post('/station/manualSave',params,function(rd) { |
| 355 | 186 | ... | ... |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-events.js
| ... | ... | @@ -23,10 +23,14 @@ $(function(){ |
| 23 | 23 | // 上行站点其它规划点击事件 |
| 24 | 24 | $('.upManual').on('click',function() { |
| 25 | 25 | |
| 26 | - manualPararms.dir = directionUpValue; | |
| 27 | - | |
| 28 | 26 | // 加载其它规划选择弹出层mobal页面 |
| 29 | - $.get('add_manual_select.html', function(m){$(pjaxContainer).append(m);}); | |
| 27 | + $.get('add_manual_select.html', function(m){ | |
| 28 | + | |
| 29 | + $(pjaxContainer).append(m); | |
| 30 | + | |
| 31 | + $('#add_manual_mobal').trigger('AddManualMobal.show', [WorldsBMap,GetAjaxData,directionUpValue,LineObj,PublicFunctions]); | |
| 32 | + | |
| 33 | + }); | |
| 30 | 34 | |
| 31 | 35 | }); |
| 32 | 36 | |
| ... | ... | @@ -37,7 +41,13 @@ $(function(){ |
| 37 | 41 | AddStationObj.setAddStationDiraction(directionUpValue); |
| 38 | 42 | |
| 39 | 43 | // 加载选择新增方式mobal |
| 40 | - $.get('add_select.html', function(m){$(pjaxContainer).append(m);}); | |
| 44 | + $.get('add_select.html', function(m){ | |
| 45 | + | |
| 46 | + $(pjaxContainer).append(m); | |
| 47 | + | |
| 48 | + $('#add_select_mobal').trigger('AddSelectMobal.show', [WorldsBMap,DrawingManagerObj,GetAjaxData,AddStationObj,LineObj,PublicFunctions]); | |
| 49 | + | |
| 50 | + }); | |
| 41 | 51 | |
| 42 | 52 | }); |
| 43 | 53 | |
| ... | ... | @@ -53,9 +63,12 @@ $(function(){ |
| 53 | 63 | return; |
| 54 | 64 | } |
| 55 | 65 | |
| 56 | - EditStationObj.setEitdStation(sel[0].original); | |
| 57 | - | |
| 58 | - $.get('edit_select.html', function(m){$(pjaxContainer).append(m);}); | |
| 66 | + $.get('edit_select.html', function(m){ | |
| 67 | + | |
| 68 | + $(pjaxContainer).append(m); | |
| 69 | + | |
| 70 | + $('#edit_select_mobal').trigger('editSelectMobal_show', [WorldsBMap,DrawingManagerObj,GetAjaxData,EditStationObj,LineObj,PublicFunctions,directionUpValue]); | |
| 71 | + }); | |
| 59 | 72 | |
| 60 | 73 | }); |
| 61 | 74 | |
| ... | ... | @@ -95,7 +108,7 @@ $(function(){ |
| 95 | 108 | // 弹出正在加载层 |
| 96 | 109 | var i = layer.load(0,{offset:['200px', '280px']}); |
| 97 | 110 | |
| 98 | - // 线路名称是否为区间 | |
| 111 | + /** 修正线路名称 @param:<directionUpValue:方向(上行)> */ | |
| 99 | 112 | PublicFunctions.lineNameIsHaveInterval(directionDownValue); |
| 100 | 113 | |
| 101 | 114 | }); |
| ... | ... | @@ -103,38 +116,52 @@ $(function(){ |
| 103 | 116 | // 下行站点其它规划点击事件 |
| 104 | 117 | $('.downManual').on('click',function() { |
| 105 | 118 | |
| 106 | - manualPararms.dir = directionDownValue; | |
| 107 | - | |
| 108 | 119 | // 加载其它规划选择弹出层mobal页面 |
| 109 | - $.get('add_manual_select.html', function(m){$(pjaxContainer).append(m);}); | |
| 120 | + $.get('add_manual_select.html', function(m){ | |
| 121 | + | |
| 122 | + $(pjaxContainer).append(m); | |
| 123 | + | |
| 124 | + $('#add_manual_mobal').trigger('AddManualMobal.show', [WorldsBMap,GetAjaxData,directionDownValue,LineObj,PublicFunctions]); | |
| 125 | + | |
| 126 | + }); | |
| 110 | 127 | |
| 111 | 128 | }); |
| 112 | 129 | |
| 113 | 130 | // 下行站点新增事件 |
| 114 | 131 | $('.module_tools #addDownStation').on('click', function() { |
| 115 | 132 | |
| 116 | - // 设置方向 | |
| 117 | - addStaitonParmas.dir = directionDownValue; | |
| 133 | + /** 设置新增站点对象方向属性值 @param:<directionUpValue:方向(0:上行;1:下行)> */ | |
| 134 | + AddStationObj.setAddStationDiraction(directionDownValue); | |
| 118 | 135 | |
| 119 | 136 | // 加载选择新增方式mobal |
| 120 | - $.get('add_select.html', function(m){$(pjaxContainer).append(m);}); | |
| 137 | + $.get('add_select.html', function(m){ | |
| 138 | + | |
| 139 | + $(pjaxContainer).append(m); | |
| 140 | + | |
| 141 | + $('#add_select_mobal').trigger('AddSelectMobal.show', [WorldsBMap,DrawingManagerObj,GetAjaxData,AddStationObj,LineObj,PublicFunctions]); | |
| 142 | + | |
| 143 | + }); | |
| 121 | 144 | |
| 122 | 145 | }); |
| 123 | 146 | |
| 124 | 147 | // 修改下行站点mobal页面 |
| 125 | 148 | $('.module_tools #editDownStation').on('click', function(){ |
| 126 | 149 | |
| 127 | - var sel = PublicFunctions.getCurrSelNode(directionDownValue); | |
| 150 | + var sel = PublicFunctions.getCurrSelNode(directionUpValue); | |
| 128 | 151 | |
| 129 | 152 | if(sel.length==0 || sel[0].original.chaildredType !='station'){ |
| 130 | 153 | |
| 131 | - layer.msg('请先选择要编辑的下行站点!'); | |
| 154 | + layer.msg('请先选择要编辑的上行站点!'); | |
| 132 | 155 | |
| 133 | 156 | return; |
| 134 | 157 | } |
| 135 | - PublicFunctions.editSetStationParmas(sel); | |
| 136 | 158 | |
| 137 | - $.get('edit_select.html', function(m){$(pjaxContainer).append(m);}); | |
| 159 | + $.get('edit_select.html', function(m){ | |
| 160 | + | |
| 161 | + $(pjaxContainer).append(m); | |
| 162 | + | |
| 163 | + $('#edit_select_mobal').trigger('editSelectMobal_show', [WorldsBMap,DrawingManagerObj,GetAjaxData,EditStationObj,LineObj,PublicFunctions,directionUpValue]); | |
| 164 | + }); | |
| 138 | 165 | |
| 139 | 166 | }); |
| 140 | 167 | |
| ... | ... | @@ -168,13 +195,25 @@ $(function(){ |
| 168 | 195 | // 生成行单 |
| 169 | 196 | $('.module_tools #createUsingSingle').on('click', function() { |
| 170 | 197 | |
| 171 | - var params = {lineId:id}; | |
| 198 | + var lineIdEvents = LineObj.getLineObj(); | |
| 199 | + | |
| 200 | + var params = {lineId:lineIdEvents.id}; | |
| 172 | 201 | |
| 173 | - GetAjaxData.createUsingSingle(params,function(p) { | |
| 202 | + GetAjaxData.createUsingSingle(params,function(data) { | |
| 174 | 203 | |
| 175 | - console.log(p); | |
| 204 | + if(data.status=='SUCCESS') { | |
| 205 | + | |
| 206 | + // 弹出添加成功提示消息 | |
| 207 | + layer.msg('添加成功...'); | |
| 208 | + | |
| 209 | + }else { | |
| 210 | + | |
| 211 | + // 弹出添加失败提示消息 | |
| 212 | + layer.msg('添加失败...'); | |
| 213 | + | |
| 214 | + } | |
| 176 | 215 | |
| 177 | - }) | |
| 216 | + }); | |
| 178 | 217 | |
| 179 | 218 | }); |
| 180 | 219 | ... | ... |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | * |
| 12 | 12 | * - - - - - - - 》 editSeteditStationParmasValue:编辑站点范围图形参数集合赋值函数 |
| 13 | 13 | * |
| 14 | - * - - - - - - - 》 lineNameIsHaveInterval : 系统规划时线路名称是否为区间 | |
| 14 | + * - - - - - - - 》 lineNameIsHaveInterval : 系统规划时修正线路名称 | |
| 15 | 15 | * |
| 16 | 16 | * - - - - - - - 》 systemLineStation:系统规划保存函数 |
| 17 | 17 | * |
| ... | ... | @@ -26,9 +26,6 @@ |
| 26 | 26 | |
| 27 | 27 | var PublicFunctions = function () { |
| 28 | 28 | |
| 29 | - /*var lineIdInitValue = '',addStaitonParmas = '';*/ | |
| 30 | - | |
| 31 | - | |
| 32 | 29 | var PubFun = { |
| 33 | 30 | |
| 34 | 31 | /** 初始化线路标题与ID */ |
| ... | ... | @@ -47,28 +44,6 @@ var PublicFunctions = function () { |
| 47 | 44 | |
| 48 | 45 | }, |
| 49 | 46 | |
| 50 | - /** 获取线路ID */ | |
| 51 | - getLineIdValue : function() { | |
| 52 | - | |
| 53 | - return lineIdInitValue; | |
| 54 | - }, | |
| 55 | - | |
| 56 | - /** 获取新增站点参数集合 */ | |
| 57 | - getAddStaitonParmasObj : function() { | |
| 58 | - | |
| 59 | - return addStaitonParmas; | |
| 60 | - | |
| 61 | - }, | |
| 62 | - | |
| 63 | - /** 设置新增站点参数集合站点名称 */ | |
| 64 | - setAddStationPararmsObjName : function(stationNamebootbox) { | |
| 65 | - | |
| 66 | - // 站点名称 | |
| 67 | - addStaitonParmas.stationNamebootbox = stationNamebootbox; | |
| 68 | - }, | |
| 69 | - | |
| 70 | - | |
| 71 | - | |
| 72 | 47 | /** @param diraction 方向 @return array */ |
| 73 | 48 | getCurrSelNode : function(diraction){ |
| 74 | 49 | |
| ... | ... | @@ -166,156 +141,6 @@ var PublicFunctions = function () { |
| 166 | 141 | }); |
| 167 | 142 | |
| 168 | 143 | }, |
| 169 | - | |
| 170 | - /** @param sel 编辑树节点站点Obj */ | |
| 171 | - editSetStationParmas : function(sel) { | |
| 172 | - | |
| 173 | - // 站点名称 | |
| 174 | - editStationParmas.stationNamebootbox = sel[0].original.stationStationName; | |
| 175 | - | |
| 176 | - // 百度地图经纬度坐标中心点 | |
| 177 | - editStationParmas.stationPointInput = sel[0].original.stationBJwpoints; | |
| 178 | - | |
| 179 | - // 站点WGS经度 | |
| 180 | - editStationParmas.gLonx = sel[0].original.stationGLonx; | |
| 181 | - | |
| 182 | - // WGS纬度 | |
| 183 | - editStationParmas.gLaty = sel[0].original.stationGLaty; | |
| 184 | - | |
| 185 | - // WGS图形坐标 | |
| 186 | - editStationParmas.gPolygonGridInput = sel[0].original.stationGPolygonGrid; | |
| 187 | - | |
| 188 | - // 百度图形坐标 | |
| 189 | - editStationParmas.bPolygonGridInput = sel[0].original.stationBPolygonGrid; | |
| 190 | - | |
| 191 | - // 站点图形类型 | |
| 192 | - editStationParmas.shapesTypeInput = sel[0].original.stationShapesType; | |
| 193 | - | |
| 194 | - // 半径 | |
| 195 | - editStationParmas.radiusInput = sel[0].original.stationRadius; | |
| 196 | - | |
| 197 | - // 是否撤销 | |
| 198 | - editStationParmas.destroyInput = sel[0].original.stationDestroy; | |
| 199 | - | |
| 200 | - // 站点ID | |
| 201 | - editStationParmas.editUp_stationId = sel[0].original.stationId; | |
| 202 | - | |
| 203 | - // 站点编码 | |
| 204 | - editStationParmas.editUp_stationStationCod = sel[0].original.stationStationCod; | |
| 205 | - | |
| 206 | - // 坐标类型 | |
| 207 | - editStationParmas.editUp_stationDbType = sel[0].original.stationDbType; | |
| 208 | - | |
| 209 | - // 站点描述说明 | |
| 210 | - editStationParmas.editUp_stationDescriptions = sel[0].original.stationDescriptions; | |
| 211 | - | |
| 212 | - // 站点是否撤销 | |
| 213 | - editStationParmas.editUp_stationDestroy = sel[0].original.stationDestroy; | |
| 214 | - | |
| 215 | - // 站点道路编码 | |
| 216 | - editStationParmas.stationRoadCoding = sel[0].original.stationRoadCoding; | |
| 217 | - | |
| 218 | - // 站点路由方向 | |
| 219 | - editStationParmas.stationRouteDirections = sel[0].original.stationRouteDirections; | |
| 220 | - | |
| 221 | - // 站点路由距离 | |
| 222 | - editStationParmas.stationRouteDistances = sel[0].original.stationRouteDistances; | |
| 223 | - | |
| 224 | - // 站点路由时间 | |
| 225 | - editStationParmas.stationRouteToTime = sel[0].original.stationRouteToTime; | |
| 226 | - | |
| 227 | - // 站点路由ID | |
| 228 | - editStationParmas.stationRouteId = sel[0].original.stationRouteId; | |
| 229 | - | |
| 230 | - // 站点路由线路ID | |
| 231 | - editStationParmas.stationRouteLine = sel[0].original.stationRouteLine; | |
| 232 | - | |
| 233 | - // 站点路由线路编码 | |
| 234 | - editStationParmas.stationRouteLineCode = sel[0].original.stationRouteLineCode; | |
| 235 | - | |
| 236 | - // 站点路由站点Id | |
| 237 | - editStationParmas.stationRouteStation = sel[0].original.stationRouteStation; | |
| 238 | - | |
| 239 | - // 站点路由类型 | |
| 240 | - editStationParmas.stationRouteStationMark = sel[0].original.stationRouteStationMark; | |
| 241 | - | |
| 242 | - // 站点路由站点名称 | |
| 243 | - editStationParmas.stationRouteStationName = sel[0].original.stationRouteStationName; | |
| 244 | - | |
| 245 | - // 站点路由序号 | |
| 246 | - editStationParmas.stationRouteStationRouteCode = sel[0].original.stationRouteStationRouteCode; | |
| 247 | - | |
| 248 | - // 站点路由版本 | |
| 249 | - editStationParmas.stationRouteVersions = sel[0].original.stationRouteVersions; | |
| 250 | - | |
| 251 | - // 站点编码 | |
| 252 | - editStationParmas.stationStationCod = sel[0].original.stationStationCod; | |
| 253 | - | |
| 254 | - // 站点版本 | |
| 255 | - editStationParmas.stationVersions = sel[0].original.stationVersions; | |
| 256 | - | |
| 257 | - // 站点路由说明 | |
| 258 | - editStationParmas.stationRouteDescriptions = sel[0].original.stationRouteDescriptions; | |
| 259 | - | |
| 260 | - }, | |
| 261 | - | |
| 262 | - /** @param points:中心点 ;gLonx:中心点WGS经度;gLaty:中心点WGS纬度;bPolygonGridValue:百度坐标点图形集合;gPolygonGridVlaue:WGS坐标点图形集合;shapesTypeValue:范围图形类型;radiusValue:圆半径 */ | |
| 263 | - setFormInputValue: function(points,gLonx,gLaty,bPolygonGridValue,gPolygonGridVlaue,shapesTypeValue,radiusValue) { | |
| 264 | - | |
| 265 | - // 百度地图经纬度坐标中心点 | |
| 266 | - addStaitonParmas.stationPointInput = points; | |
| 267 | - | |
| 268 | - // WGS经度 | |
| 269 | - addStaitonParmas.gLonx = gLonx; | |
| 270 | - | |
| 271 | - // WGS经度 | |
| 272 | - addStaitonParmas.gLaty = gLaty; | |
| 273 | - | |
| 274 | - // 百度坐标点图形集合 | |
| 275 | - addStaitonParmas.bPolygonGridInput = bPolygonGridValue; | |
| 276 | - | |
| 277 | - // WGS坐标点图形集合 | |
| 278 | - addStaitonParmas.gPolygonGridInput = gPolygonGridVlaue; | |
| 279 | - | |
| 280 | - // 图形类型 | |
| 281 | - addStaitonParmas.shapesTypeInput = shapesTypeValue; | |
| 282 | - | |
| 283 | - // 圆形半径 | |
| 284 | - addStaitonParmas.radiusInput = radiusValue; | |
| 285 | - | |
| 286 | - // 是否撤销 | |
| 287 | - addStaitonParmas.destroyInput = 0; | |
| 288 | - | |
| 289 | - }, | |
| 290 | - | |
| 291 | - | |
| 292 | - /** @param points:中心点 ;gLonx:中心点WGS经度;gLaty:中心点WGS纬度;bPolygonGridValue:百度坐标点图形集合;gPolygonGridVlaue:WGS坐标点图形集合;shapesTypeValue:范围图形类型;radiusValue:圆半径 */ | |
| 293 | - editSeteditStationParmasValue : function(points,gLonx,gLaty,bPolygonGridValue,gPolygonGridVlaue,shapesTypeValue,radiusValue) { | |
| 294 | - | |
| 295 | - // 百度地图经纬度坐标中心点 | |
| 296 | - editStationParmas.stationPointInput = points; | |
| 297 | - | |
| 298 | - // WGS经度 | |
| 299 | - editStationParmas.gLonx = gLonx; | |
| 300 | - | |
| 301 | - // WGS经度 | |
| 302 | - editStationParmas.gLaty = gLaty; | |
| 303 | - | |
| 304 | - // 百度坐标点图形集合 | |
| 305 | - editStationParmas.bPolygonGridInput = bPolygonGridValue; | |
| 306 | - | |
| 307 | - // WGS坐标点图形集合 | |
| 308 | - editStationParmas.gPolygonGridInput = gPolygonGridVlaue; | |
| 309 | - | |
| 310 | - // 图形类型 | |
| 311 | - editStationParmas.shapesTypeInput = shapesTypeValue; | |
| 312 | - | |
| 313 | - // 圆形半径 | |
| 314 | - editStationParmas.radiusInput = radiusValue; | |
| 315 | - | |
| 316 | - // 是否撤销 | |
| 317 | - editStationParmas.destroyInput = 0; | |
| 318 | - }, | |
| 319 | 144 | |
| 320 | 145 | /** 修正线路名称 @param:<directionUpValue:方向(0:上行;1:下行)> */ |
| 321 | 146 | lineNameIsHaveInterval : function(directionData) { |
| ... | ... | @@ -424,7 +249,6 @@ var PublicFunctions = function () { |
| 424 | 249 | // 如果线路信息不为空 |
| 425 | 250 | if(BusLine) { |
| 426 | 251 | |
| 427 | - // | |
| 428 | 252 | if(BusLine.yB.length == 0){ |
| 429 | 253 | |
| 430 | 254 | layer.confirm('系统生成该线路【'+lineNameV+'】时获取站点与路段异常!请联系管理员或者检查网络连接是否异常!', { |
| ... | ... | @@ -554,23 +378,6 @@ var PublicFunctions = function () { |
| 554 | 378 | }); |
| 555 | 379 | |
| 556 | 380 | }); |
| 557 | - | |
| 558 | - /*// 百度站点坐标获取WGS坐标 | |
| 559 | - GetAjaxData.getFormPointEToWGS(stationInfo,function(result) { | |
| 560 | - | |
| 561 | - // 如果不为空 | |
| 562 | - if(result) { | |
| 563 | - | |
| 564 | - // 折线覆盖物对象坐标点集合转WGS坐标 | |
| 565 | - GetAjaxData.BpolyGonArrayToWGS(polyGonArray,function(arraydata) { | |
| 566 | - | |
| 567 | - | |
| 568 | - }); | |
| 569 | - | |
| 570 | - } | |
| 571 | - | |
| 572 | - });*/ | |
| 573 | - | |
| 574 | 381 | } |
| 575 | 382 | |
| 576 | 383 | }); |
| ... | ... | @@ -612,25 +419,26 @@ var PublicFunctions = function () { |
| 612 | 419 | |
| 613 | 420 | if(result.status=='SUCCESS'){ |
| 614 | 421 | |
| 615 | - layer.msg('撤销上行站点【'+obj[0].text+'】成功!'); | |
| 616 | - | |
| 617 | - functionMapB.clearOverlays(); | |
| 618 | - GetAjaxData.getSectionRouteInfo(id,stationRouteDirections,function(data) { | |
| 619 | - | |
| 620 | - // 刷新树 | |
| 621 | - PublicFunctions.resjtreeDate(id,stationRouteDirections); | |
| 622 | - | |
| 623 | - PublicFunctions.linePanlThree(data,stationRouteDirections); | |
| 624 | - | |
| 625 | - }); | |
| 626 | - | |
| 627 | - | |
| 422 | + layer.msg('撤销上行站点【'+obj[0].text+'】成功!'); | |
| 423 | + | |
| 628 | 424 | }else{ |
| 629 | 425 | |
| 630 | 426 | layer.msg('撤销上行站点【'+obj[0].text+'】失败!'); |
| 631 | 427 | |
| 632 | 428 | } |
| 633 | 429 | |
| 430 | + WorldsBMap.clearMarkAndOverlays(); | |
| 431 | + | |
| 432 | + var Line = LineObj.getLineObj(); | |
| 433 | + | |
| 434 | + /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:上行路段数据 */ | |
| 435 | + GetAjaxData.getSectionRouteInfo(Line.id,stationRouteDirections,function(data) { | |
| 436 | + | |
| 437 | + /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:上行路段数据> */ | |
| 438 | + PublicFunctions.linePanlThree(Line.id,data,stationRouteDirections); | |
| 439 | + | |
| 440 | + }); | |
| 441 | + | |
| 634 | 442 | }); |
| 635 | 443 | |
| 636 | 444 | }); |
| ... | ... | @@ -649,65 +457,20 @@ var PublicFunctions = function () { |
| 649 | 457 | return; |
| 650 | 458 | } |
| 651 | 459 | |
| 652 | - var sectionId = sel[0].original.sectionId; | |
| 460 | + $('#downLine').addClass('btn disabled'); | |
| 653 | 461 | |
| 654 | - var sectionrouteDirections = sel[0].original.sectionrouteDirections; | |
| 462 | + $('.btn-circle').addClass('disabled'); | |
| 655 | 463 | |
| 656 | - // 开启线路编辑 | |
| 657 | - polyUpline.enableEditing(); | |
| 464 | + $('#upLine').addClass('btn disabled'); | |
| 465 | + | |
| 466 | + var editSectionV = sel[0].original; | |
| 467 | + | |
| 468 | + EditSectionObj.setEitdSection(editSectionV); | |
| 658 | 469 | |
| 659 | 470 | // 弹出添加失败提示消息,2秒关闭(如果不配置,默认是3秒) |
| 660 | 471 | var yindex = layer.msg('编辑完线路走向后,请双击线路走向区域保存',{ offset: '126px',shift: 0,time: 10000}); |
| 661 | 472 | |
| 662 | - // 添加双击折线保存事件 | |
| 663 | - polyUpline.addEventListener('dblclick',function(e) { | |
| 664 | - | |
| 665 | - // 关闭 | |
| 666 | - layer.close(yindex); | |
| 667 | - | |
| 668 | - polyUpline.disableEditing(); | |
| 669 | - | |
| 670 | - // 弹出正在加载层 | |
| 671 | - var i = layer.load(0,{title :'我是标题'}); | |
| 672 | - | |
| 673 | - // 获取折线坐标集合 | |
| 674 | - var editPloyLineArray = polyUpline.getPath(); | |
| 675 | - | |
| 676 | - // 坐标转换WGS坐标 | |
| 677 | - GetAjaxData.BpolyGonArrayToWGS(editPloyLineArray,function(arraydata) { | |
| 678 | - | |
| 679 | - // 定义路段信息字符串 | |
| 680 | - var sectionJSON = JSON.stringify(arraydata); | |
| 681 | - | |
| 682 | - var params = {sectionId:sectionId,sectionJSON:sectionJSON} | |
| 683 | - | |
| 684 | - GetAjaxData.sectionUpdate(params,function(result) { | |
| 685 | - | |
| 686 | - layer.close(i); | |
| 687 | - | |
| 688 | - if(result.status=='SUCCESS'){ | |
| 689 | - | |
| 690 | - layer.msg('修改上行路段成功!'); | |
| 691 | - | |
| 692 | - }else{ | |
| 693 | - | |
| 694 | - layer.msg('修改上行路段失败!'); | |
| 695 | - | |
| 696 | - } | |
| 697 | - functionMapB.clearOverlays(); | |
| 698 | - GetAjaxData.getSectionRouteInfo(id,sectionrouteDirections,function(data) { | |
| 699 | - | |
| 700 | - // 刷新树 | |
| 701 | - PublicFunctions.resjtreeDate(id,sectionrouteDirections); | |
| 702 | - | |
| 703 | - PublicFunctions.linePanlThree(data,sectionrouteDirections); | |
| 704 | - | |
| 705 | - }); | |
| 706 | - }); | |
| 707 | - | |
| 708 | - }); | |
| 709 | - | |
| 710 | - }); | |
| 473 | + WorldsBMap.editPolyUpline(); | |
| 711 | 474 | }, |
| 712 | 475 | |
| 713 | 476 | setFormValue : function(editStationParmas) { |
| ... | ... | @@ -727,9 +490,6 @@ var PublicFunctions = function () { |
| 727 | 490 | // 百度坐标点图形集合 |
| 728 | 491 | $('#bPolygonGridInput').val(editStationParmas.stationBPolygonGrid); |
| 729 | 492 | |
| 730 | - // WGS坐标点图形集合 | |
| 731 | - /*$('#gPolygonGridInput').val(editStationParmas.gPolygonGridInput);*/ | |
| 732 | - | |
| 733 | 493 | // 获取站点名称元素设值 |
| 734 | 494 | $('#stationNameInput').val(editStationParmas.stationStationName); |
| 735 | 495 | |
| ... | ... | @@ -748,15 +508,9 @@ var PublicFunctions = function () { |
| 748 | 508 | // 百度地图经纬度坐标中心点 |
| 749 | 509 | $('#bJwpointsInput').val(editStationParmas.stationBJwpoints); |
| 750 | 510 | |
| 751 | - // WGS经纬度 | |
| 752 | - /*$('#gJwpointsInput').val(editStationParmas.gLonx + ' ' + editStationParmas.gLaty);*/ | |
| 753 | - | |
| 754 | 511 | // 获取图形类型元素,并添加值 |
| 755 | 512 | $('#shapesTypeSelect').val(editStationParmas.stationShapesType); |
| 756 | 513 | |
| 757 | - // 获取方向元素,并添加值 | |
| 758 | - /*$('#stationdirSelect').val(editStationParmas.stationRouteDirections);*/ | |
| 759 | - | |
| 760 | 514 | // 获取半径元素,并添加值 |
| 761 | 515 | $('#radiusInput').val(editStationParmas.stationRadius); |
| 762 | 516 | |
| ... | ... | @@ -775,18 +529,75 @@ var PublicFunctions = function () { |
| 775 | 529 | }, |
| 776 | 530 | |
| 777 | 531 | |
| 532 | + setSectionFormValue : function(Section) { | |
| 533 | + | |
| 534 | + // 路段ID | |
| 535 | + $('#sectionIdInput').val(Section.sectionId); | |
| 536 | + | |
| 537 | + // 路段路由ID | |
| 538 | + $('#sectionRouteIdInput').val(Section.sectionrouteId); | |
| 539 | + | |
| 540 | + // 线路ID | |
| 541 | + $('#sectionRouteLineInput').val(Section.sectionrouteLine); | |
| 542 | + | |
| 543 | + // 线路编码 | |
| 544 | + $('#lineCodeInput').val(Section.sectionrouteLineCode); | |
| 545 | + | |
| 546 | + // 折线坐标集合 | |
| 547 | + $('#bsectionVectorInput').val(Section.sectionBsectionVector); | |
| 548 | + | |
| 549 | + // 路段名称 | |
| 550 | + $('#sectionNameInput').val(Section.sectionName); | |
| 551 | + | |
| 552 | + // 路段编码 | |
| 553 | + $('#sectionCodeInput').val(Section.sectionCode); | |
| 554 | + | |
| 555 | + // 路段序号 | |
| 556 | + $('#sectionrouteCodeSelect').val(Section.sectionrouteCode); | |
| 557 | + | |
| 558 | + // 路段方向 | |
| 559 | + $('#directionsSection').val(Section.sectionrouteDirections); | |
| 560 | + | |
| 561 | + // 道路编码 | |
| 562 | + $('#roadCodingCodInput').val(Section.sectionRoadCoding); | |
| 563 | + | |
| 564 | + // 道路限速 | |
| 565 | + $('#speedLimitInput').val(Section.sectionSpeedLimet); | |
| 566 | + | |
| 567 | + // 路段长度 | |
| 568 | + $('#sectionDistanceInput').val(Section.sectionDistance); | |
| 569 | + | |
| 570 | + // 时长 | |
| 571 | + $('#sectionTimeInput').val(Section.sectionTime); | |
| 572 | + | |
| 573 | + // 版本号 | |
| 574 | + $('#versionsInput').val(Section.versions); | |
| 575 | + | |
| 576 | + // 是否撤销 | |
| 577 | + $('#destroySelect').val(Section.destroy); | |
| 578 | + | |
| 579 | + // 描述/说明 | |
| 580 | + $('#descriptionsTextarea').val(Section.descriptions); | |
| 581 | + | |
| 582 | + }, | |
| 583 | + | |
| 778 | 584 | /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:上行路段数据> */ |
| 779 | 585 | linePanlThree : function(lineId,data,direction) { |
| 780 | 586 | |
| 781 | 587 | /** 获取站点路由信息 @param:<Line.id:线路Id;0:上行> @return:<resultdata:站点路由数据> */ |
| 782 | 588 | GetAjaxData.getStationRoutePoint(lineId,direction,function(resultdata) { |
| 783 | 589 | |
| 590 | + WorldsBMap.clearMarkAndOverlays(); | |
| 591 | + | |
| 784 | 592 | // 路段数据长度 |
| 785 | 593 | var dataLen = data.length; |
| 786 | 594 | |
| 787 | 595 | // 如果大于零 |
| 788 | 596 | if(dataLen>0) { |
| 789 | 597 | |
| 598 | + // 地图折线坐标点集合 | |
| 599 | + var polylineArray = []; | |
| 600 | + | |
| 790 | 601 | // 编辑路段数据 |
| 791 | 602 | for(var d= 0; d<dataLen;d++){ |
| 792 | 603 | |
| ... | ... | @@ -805,20 +616,17 @@ var PublicFunctions = function () { |
| 805 | 616 | // 分割折线坐标字符串 |
| 806 | 617 | var lineArray = tempStr.split(','); |
| 807 | 618 | |
| 808 | - // 地图折线坐标点集合 | |
| 809 | - var polylineArray = []; | |
| 810 | - | |
| 811 | 619 | for(var i = 0;i<lineArray.length;i++) { |
| 812 | 620 | |
| 813 | 621 | polylineArray.push(new BMap.Point(lineArray[i].split(' ')[0],lineArray[i].split(' ')[1])); |
| 814 | 622 | |
| 815 | 623 | } |
| 816 | 624 | |
| 817 | - /** 在地图上画出线路走向 @param:<polylineArray:地图折线坐标点集合;resultdata:站点路由数据> */ | |
| 818 | - WorldsBMap.drawingUpline(polylineArray,resultdata); | |
| 819 | - | |
| 820 | 625 | } |
| 821 | 626 | |
| 627 | + /** 在地图上画出线路走向 @param:<polylineArray:地图折线坐标点集合;resultdata:站点路由数据> */ | |
| 628 | + WorldsBMap.drawingUpline(polylineArray,resultdata); | |
| 629 | + | |
| 822 | 630 | // 如果站点路由数据不为空 |
| 823 | 631 | if(resultdata.length>0) { |
| 824 | 632 | |
| ... | ... | @@ -923,41 +731,13 @@ var PublicFunctions = function () { |
| 923 | 731 | |
| 924 | 732 | }, |
| 925 | 733 | |
| 926 | - // 路段折线百度坐标转WGS坐标 | |
| 927 | - eachSectionList : function(sectiondata,cb) { | |
| 734 | + editAChangeCssRemoveDisabled : function() { | |
| 928 | 735 | |
| 929 | - var dataLen_ = sectiondata.length; | |
| 736 | + $('#downLine').removeClass('btn disabled'); | |
| 930 | 737 | |
| 931 | - (function(){ | |
| 932 | - | |
| 933 | - if (!arguments.callee.count) { | |
| 934 | - | |
| 935 | - arguments.callee.count = 0; | |
| 936 | - | |
| 937 | - } | |
| 938 | - | |
| 939 | - arguments.callee.count++; | |
| 940 | - | |
| 941 | - var index_ = parseInt(arguments.callee.count) - 1; | |
| 942 | - | |
| 943 | - if (index_ > dataLen_ -1) { | |
| 944 | - | |
| 945 | - cb && cb(sectiondata); | |
| 946 | - return; | |
| 947 | - | |
| 948 | - } | |
| 949 | - | |
| 950 | - var p = arguments.callee; | |
| 951 | - | |
| 952 | - GetAjaxData.MuneBpointsArrayToWGS(sectiondata[index_].points,function(polyGonArray_) { | |
| 953 | - | |
| 954 | - sectiondata[index_].points = polyGonArray_; | |
| 955 | - | |
| 956 | - p(); | |
| 957 | - }); | |
| 958 | - | |
| 959 | - })(); | |
| 738 | + $('.btn-circle').removeClass('disabled'); | |
| 960 | 739 | |
| 740 | + $('#upLine').removeClass('btn disabled'); | |
| 961 | 741 | } |
| 962 | 742 | |
| 963 | 743 | } | ... | ... |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-map.js
| ... | ... | @@ -24,8 +24,8 @@ |
| 24 | 24 | |
| 25 | 25 | var WorldsBMap = function () { |
| 26 | 26 | |
| 27 | - /** WorldsBMap 全局变量定义 mapBVvalue:地图对象 */ | |
| 28 | - var mapBVvalue = ''; | |
| 27 | + /** WorldsBMap 全局变量定义 mapBValue:地图对象;polygon:多边形;polyUpline:走向折线;circle:圆 */ | |
| 28 | + var mapBValue = '';polygon='',polyUpline='',circle=''; | |
| 29 | 29 | |
| 30 | 30 | var Bmap = { |
| 31 | 31 | |
| ... | ... | @@ -38,34 +38,48 @@ var WorldsBMap = function () { |
| 38 | 38 | var bdKey = 'IGGrr4UjwIYzatoCRFKEL8sT'; |
| 39 | 39 | |
| 40 | 40 | // 初始化百度地图 |
| 41 | - mapBVvalue = new BMap.Map("bmap_basic"); | |
| 41 | + mapBValue = new BMap.Map("bmap_basic"); | |
| 42 | 42 | |
| 43 | 43 | //中心点和缩放级别 |
| 44 | - mapBVvalue.centerAndZoom(new BMap.Point(CENTER_POINT.lng,CENTER_POINT.lat), 15); | |
| 44 | + mapBValue.centerAndZoom(new BMap.Point(CENTER_POINT.lng,CENTER_POINT.lat), 15); | |
| 45 | 45 | |
| 46 | 46 | //启用地图拖拽事件,默认启用(可不写) |
| 47 | - mapBVvalue.enableDragging(); | |
| 47 | + mapBValue.enableDragging(); | |
| 48 | 48 | |
| 49 | 49 | //启用地图滚轮放大缩小 |
| 50 | - mapBVvalue.enableScrollWheelZoom(); | |
| 50 | + mapBValue.enableScrollWheelZoom(); | |
| 51 | 51 | |
| 52 | 52 | //禁用鼠标双击放大 |
| 53 | - mapBVvalue.disableDoubleClickZoom(); | |
| 53 | + mapBValue.disableDoubleClickZoom(); | |
| 54 | 54 | |
| 55 | 55 | //启用键盘上下左右键移动地图 |
| 56 | - mapBVvalue.enableKeyboard(); | |
| 57 | - /*PublicFunctions.setMapEvent(map);*/ | |
| 56 | + mapBValue.enableKeyboard(); | |
| 58 | 57 | |
| 59 | - return mapBVvalue; | |
| 58 | + return mapBValue; | |
| 60 | 59 | }, |
| 61 | 60 | |
| 62 | 61 | /** 获取地图对象 @return 地图对象map */ |
| 63 | 62 | getmapBValue : function() { |
| 64 | 63 | |
| 65 | - return mapBVvalue; | |
| 64 | + return mapBValue; | |
| 66 | 65 | |
| 67 | 66 | }, |
| 68 | 67 | |
| 68 | + getPolygon : function(){ | |
| 69 | + | |
| 70 | + return polygon; | |
| 71 | + }, | |
| 72 | + | |
| 73 | + getPolyUpline : function() { | |
| 74 | + | |
| 75 | + return polyUpline; | |
| 76 | + }, | |
| 77 | + | |
| 78 | + getCircle : function() { | |
| 79 | + | |
| 80 | + return circle; | |
| 81 | + }, | |
| 82 | + | |
| 69 | 83 | initDrawingManager: function(map,styleOptions) { |
| 70 | 84 | |
| 71 | 85 | }, |
| ... | ... | @@ -183,14 +197,11 @@ var WorldsBMap = function () { |
| 183 | 197 | pointsPolygon : function(objStation) { |
| 184 | 198 | |
| 185 | 199 | // 将视图切换到指定的缩放等级,中心点坐标不变。注意:当有信息窗口在地图上打开时,地图缩放将保证信息窗口所在的坐标位置不动。(自1.2新增) |
| 186 | - mapBVvalue.setZoom(16); | |
| 200 | + mapBValue.setZoom(15); | |
| 187 | 201 | |
| 188 | 202 | // 如果不为空 |
| 189 | 203 | if(objStation) { |
| 190 | 204 | |
| 191 | - // 清除地图覆盖物 | |
| 192 | - mapBVvalue.clearOverlays(); | |
| 193 | - | |
| 194 | 205 | // 获取中心点坐标字符串 |
| 195 | 206 | var testpointStr = objStation.stationBJwpoints; |
| 196 | 207 | |
| ... | ... | @@ -232,7 +243,7 @@ var WorldsBMap = function () { |
| 232 | 243 | }); |
| 233 | 244 | |
| 234 | 245 | // 增加地图覆盖物多边形 |
| 235 | - mapBVvalue.addOverlay(polygon); | |
| 246 | + mapBValue.addOverlay(polygon); | |
| 236 | 247 | |
| 237 | 248 | // 信息窗口属性 |
| 238 | 249 | var opts_polygon = { |
| ... | ... | @@ -243,6 +254,9 @@ var WorldsBMap = function () { |
| 243 | 254 | // 信息窗口高度 |
| 244 | 255 | height : 400, |
| 245 | 256 | |
| 257 | + // 信息窗位置偏移值。 | |
| 258 | + offset: new BMap.Size(500,20), | |
| 259 | + | |
| 246 | 260 | //标题 |
| 247 | 261 | title : '<h4 style="color:#FFFFFF">'+objStation.stationStationName+'站详情</h4>', |
| 248 | 262 | |
| ... | ... | @@ -269,74 +283,73 @@ var WorldsBMap = function () { |
| 269 | 283 | marker = new BMap.Marker(pointPolygon,{icon : icon_target}); |
| 270 | 284 | |
| 271 | 285 | // 把标注添物加到地图上 |
| 272 | - mapBVvalue.addOverlay(marker); | |
| 286 | + mapBValue.addOverlay(marker); | |
| 273 | 287 | |
| 274 | 288 | // 是否在平移过程中禁止动画。(自1.2新增) |
| 275 | 289 | var PanOptions_ ={noAnimation :true}; |
| 276 | 290 | |
| 277 | 291 | // 将地图的中心点更改为给定的点。 |
| 278 | - mapBVvalue.panTo(pointPolygon,PanOptions_); | |
| 292 | + mapBValue.panTo(pointPolygon,PanOptions_); | |
| 279 | 293 | |
| 280 | 294 | // 将地图在水平位置上移动x像素,垂直位置上移动y像素。 |
| 281 | - mapBVvalue.panBy(10,110,PanOptions_); | |
| 295 | + mapBValue.panBy(10,-150,PanOptions_); | |
| 282 | 296 | |
| 283 | 297 | //开启信息窗口 |
| 284 | - mapBVvalue.openInfoWindow(infoWindow_target,pointPolygon); | |
| 298 | + mapBValue.openInfoWindow(infoWindow_target,pointPolygon); | |
| 285 | 299 | |
| 286 | 300 | } |
| 287 | 301 | |
| 288 | 302 | }, |
| 289 | 303 | |
| 290 | - pointsThread : function(obj) { | |
| 304 | + editPolyUpline : function() { | |
| 305 | + | |
| 306 | + // 禁止覆盖物在map.clearOverlays方法中被清除。(自 1.1 新增) | |
| 307 | + polyUpline.disableMassClear(); | |
| 308 | + | |
| 309 | + WorldsBMap.clearMarkAndOverlays(); | |
| 310 | + | |
| 311 | + // 允许覆盖物在map.clearOverlays方法中被清除。(自 1.1 新增) | |
| 312 | + polyUpline.enableMassClear(); | |
| 291 | 313 | |
| 292 | - mapBVvalue.clearOverlays(); | |
| 314 | + // 开启线路编辑 | |
| 315 | + polyUpline.enableEditing(); | |
| 293 | 316 | |
| 294 | - if(obj) { | |
| 317 | + // 添加双击折线保存事件 | |
| 318 | + polyUpline.addEventListener('dblclick',function(e) { | |
| 295 | 319 | |
| 296 | - var tempStr = obj.substring(11,obj.length-1); | |
| 320 | + // 关闭 | |
| 321 | + layer.closeAll(); | |
| 297 | 322 | |
| 298 | - var lineArray = tempStr.split(','); | |
| 323 | + polyUpline.disableEditing(); | |
| 299 | 324 | |
| 300 | - var polylineArray = []; | |
| 325 | + // 获取折线坐标集合 | |
| 326 | + var editPloyLineArray = polyUpline.getPath(); | |
| 301 | 327 | |
| 302 | - for(var i = 0;i<lineArray.length;i++) { | |
| 303 | - | |
| 304 | - polylineArray.push(new BMap.Point(lineArray[i].split(' ')[0],lineArray[i].split(' ')[1])); | |
| 305 | - | |
| 306 | - } | |
| 328 | + EditSectionObj.setEitdBsectionVector(JSON.stringify(editPloyLineArray)); | |
| 307 | 329 | |
| 308 | - // 创建线路走向 | |
| 309 | - polyUpline = new BMap.Polyline(polylineArray, {strokeColor : "blue",strokeWeight : 4,strokeOpacity : 0.5}); | |
| 310 | - | |
| 311 | - // 把折线添加到地图上 | |
| 312 | - mapBVvalue.addOverlay(polyUpline); | |
| 313 | - | |
| 314 | - // 自定义标注物图片 | |
| 315 | - var icon_target = new BMap.Icon('/pages/base/stationroute/css/img/cz.png',new BMap.Size(20, 20)); | |
| 316 | - | |
| 317 | - // 创建标注物 | |
| 318 | - var markers_target = new BMap.Marker(polylineArray[0],{icon : icon_target}); | |
| 319 | - | |
| 320 | - // 把标注添物加到地图上 | |
| 321 | - mapBVvalue.addOverlay(markers_target); | |
| 322 | - | |
| 323 | - //设置中心点 | |
| 324 | - mapBVvalue.centerAndZoom(polylineArray[0],16); | |
| 330 | + polyUpline= ''; | |
| 325 | 331 | |
| 326 | - } | |
| 327 | - | |
| 332 | + // 加载修改路段弹出层mobal页面 | |
| 333 | + $.get('editsection.html', function(m){ | |
| 334 | + | |
| 335 | + $(pjaxContainer).append(m); | |
| 336 | + | |
| 337 | + $('#edit_section_mobal').trigger('editSectionMobal_show', [WorldsBMap,GetAjaxData,EditSectionObj,PublicFunctions]); | |
| 338 | + | |
| 339 | + }); | |
| 340 | + }); | |
| 328 | 341 | }, |
| 329 | 342 | |
| 330 | 343 | // 画圆 |
| 331 | 344 | pointsCircle : function(objStation) { |
| 332 | 345 | |
| 333 | 346 | // 将视图切换到指定的缩放等级,中心点坐标不变。注意:当有信息窗口在地图上打开时,地图缩放将保证信息窗口所在的坐标位置不动。(自1.2新增) |
| 334 | - mapBVvalue.setZoom(16); | |
| 347 | + mapBValue.setZoom(16); | |
| 335 | 348 | |
| 336 | 349 | if(objStation) { |
| 337 | 350 | |
| 338 | 351 | // 清除地图覆盖物 |
| 339 | - mapBVvalue.clearOverlays(); | |
| 352 | + mapBValue.clearOverlays(); | |
| 340 | 353 | |
| 341 | 354 | // 获取中心坐标点字符串分割 |
| 342 | 355 | var BJwpoints = objStation.stationBJwpoints.split(' '); |
| ... | ... | @@ -351,7 +364,7 @@ var WorldsBMap = function () { |
| 351 | 364 | circle.enableMassClear(); |
| 352 | 365 | |
| 353 | 366 | // 百度地图添加覆盖物圆 |
| 354 | - mapBVvalue.addOverlay(circle); | |
| 367 | + mapBValue.addOverlay(circle); | |
| 355 | 368 | |
| 356 | 369 | // 信息窗口参数属性 |
| 357 | 370 | var opts = { |
| ... | ... | @@ -394,7 +407,7 @@ var WorldsBMap = function () { |
| 394 | 407 | marker = new BMap.Marker(point,{icon : icon_target}); |
| 395 | 408 | |
| 396 | 409 | // 把标注添物加到地图上 |
| 397 | - mapBVvalue.addOverlay(marker); | |
| 410 | + mapBValue.addOverlay(marker); | |
| 398 | 411 | |
| 399 | 412 | setTimeout(function(){ |
| 400 | 413 | //开启信息窗口 |
| ... | ... | @@ -406,9 +419,9 @@ var WorldsBMap = function () { |
| 406 | 419 | var PanOptions_ ={noAnimation :true}; |
| 407 | 420 | |
| 408 | 421 | // 将地图的中心点更改为给定的点。 |
| 409 | - mapBVvalue.panTo(point,PanOptions_); | |
| 422 | + mapBValue.panTo(point,PanOptions_); | |
| 410 | 423 | |
| 411 | - //map.panBy(10,-50,PanOptions_); | |
| 424 | + mapBValue.panBy(10,-200,PanOptions_); | |
| 412 | 425 | |
| 413 | 426 | // 添加标志物监听事件 |
| 414 | 427 | marker.addEventListener("click",function() { |
| ... | ... | @@ -426,7 +439,7 @@ var WorldsBMap = function () { |
| 426 | 439 | localSearchFromAdreesToPoint: function(Address,callback) { |
| 427 | 440 | |
| 428 | 441 | // 创建一个搜索类实例 |
| 429 | - var localSearch = new BMap.LocalSearch(mapBVvalue); | |
| 442 | + var localSearch = new BMap.LocalSearch(mapBValue); | |
| 430 | 443 | |
| 431 | 444 | // 检索完成后的回调函数。 |
| 432 | 445 | localSearch.setSearchCompleteCallback(function (searchResult) { |
| ... | ... | @@ -470,7 +483,7 @@ var WorldsBMap = function () { |
| 470 | 483 | marker.closeInfoWindow(); |
| 471 | 484 | |
| 472 | 485 | // 清除marker |
| 473 | - mapBVvalue.removeOverlay(marker); | |
| 486 | + mapBValue.removeOverlay(marker); | |
| 474 | 487 | |
| 475 | 488 | // 编辑圆 |
| 476 | 489 | if(stationShapesTypeV =='r') { |
| ... | ... | @@ -492,16 +505,26 @@ var WorldsBMap = function () { |
| 492 | 505 | |
| 493 | 506 | var centre_New = [{potion:{lng:circle.getCenter().lng,lat:circle.getCenter().lat}}]; |
| 494 | 507 | |
| 495 | - // 中心百度坐标转WGS坐标 | |
| 496 | - GetAjaxData.getFormPointEToWGS(centre_New,function(p) { | |
| 497 | - | |
| 498 | - // 设置修改站点参数集合 | |
| 499 | - PublicFunctions.editSeteditStationParmasValue(newCenter, p[0].WGSpotion.Lng , p[0].WGSpotion.Lat,'','','r',Math.round(newRadius)); | |
| 508 | + /** 设置修改站点集合对象站点中心点百度坐标属性值 @param:<bJwpoints:中心点百度坐标) */ | |
| 509 | + EditStationObj.setEitdStationBJwpoints(newCenter); | |
| 510 | + | |
| 511 | + /** 设置修改站点集合对象范围图形类型属性值 @param:<shapesType:范围图形类型) */ | |
| 512 | + EditStationObj.setEitdStationShapesType('r'); | |
| 513 | + | |
| 514 | + /** 设置修改站点集合对象圆形半径属性值 @param:<radius:圆形半径) */ | |
| 515 | + EditStationObj.setEitdStationRadius(Math.round(newRadius)); | |
| 516 | + | |
| 517 | + /** 设置修改站点集合对象图形百度坐标集合属性值 @param:<bPolygonGrid:图形百度坐标集合) */ | |
| 518 | + EditStationObj.setEitdBPolygonGrid(''); | |
| 519 | + | |
| 520 | + // 加载编辑页面 | |
| 521 | + $.get('edit.html', function(m){ | |
| 500 | 522 | |
| 501 | - // 加载编辑页面 | |
| 502 | - $.get('edit.html', function(m){$(pjaxContainer).append(m);}); | |
| 523 | + $(pjaxContainer).append(m); | |
| 503 | 524 | |
| 504 | - }); | |
| 525 | + $('#edit_station_mobal').trigger('editSelectMobal_show', [WorldsBMap,GetAjaxData,EditStationObj,LineObj,PublicFunctions]); | |
| 526 | + | |
| 527 | + }); | |
| 505 | 528 | |
| 506 | 529 | }); |
| 507 | 530 | |
| ... | ... | @@ -517,70 +540,48 @@ var WorldsBMap = function () { |
| 517 | 540 | // 获取编辑的多边形对象 |
| 518 | 541 | var edit_pointE = polygon; |
| 519 | 542 | |
| 520 | - // 多边形坐标点集合 | |
| 521 | - var eidt_PointsList = []; | |
| 522 | - | |
| 523 | - for ( var i = 0; i < edit_pointE.getPath().length; i++) { | |
| 524 | - | |
| 525 | - eidt_PointsList.push({potion: {lng: edit_pointE.getPath()[i].lng, lat: edit_pointE.getPath()[i].lat}}); | |
| 526 | - | |
| 527 | - } | |
| 528 | - | |
| 529 | - eidt_PointsList.push({potion: {lng: edit_pointE.getPath()[0].lng, lat: edit_pointE.getPath()[0].lat}}); | |
| 530 | - | |
| 531 | - var edit_centre = [{potion:{lng:edit_pointE.getBounds().getCenter().lng,lat:edit_pointE.getBounds().getCenter().lat}}]; | |
| 543 | + var edit_bPloygonGrid = ""; | |
| 532 | 544 | |
| 533 | - // 多边形中心点 | |
| 534 | - var centre_points = edit_pointE.getBounds().getCenter().lng + ' ' + edit_pointE.getBounds().getCenter().lat; | |
| 545 | + var editPolyGonLen_ = edit_pointE.getPath().length; | |
| 535 | 546 | |
| 536 | - // 多边形坐标点集合转WGS坐标 | |
| 537 | - GetAjaxData.getFormPointEToWGS(eidt_PointsList,function(resultdata) { | |
| 538 | - | |
| 539 | - // 多边形WGS坐标字符串 | |
| 540 | - var eidt_gPloygonGrid = ''; | |
| 541 | - | |
| 542 | - // 百度坐标字符串 | |
| 543 | - var edit_bPloygonGrid = ''; | |
| 547 | + for(var k =0;k<editPolyGonLen_;k++) { | |
| 544 | 548 | |
| 545 | - for(var k =0;k<resultdata.length;k++) { | |
| 549 | + if(k==0) { | |
| 546 | 550 | |
| 547 | - if(k==0) { | |
| 548 | - | |
| 549 | - eidt_gPloygonGrid = resultdata[k].WGSpotion.Lng + ' ' +resultdata[k].WGSpotion.Lat; | |
| 550 | - | |
| 551 | - edit_bPloygonGrid = resultdata[k].potion.lng + ' ' +resultdata[k].potion.lat; | |
| 552 | - | |
| 553 | - }else { | |
| 554 | - | |
| 555 | - eidt_gPloygonGrid = eidt_gPloygonGrid + ',' + resultdata[k].WGSpotion.Lng + ' ' +resultdata[k].WGSpotion.Lat; | |
| 556 | - | |
| 557 | - edit_bPloygonGrid = edit_bPloygonGrid + ',' + resultdata[k].potion.lng + ' ' +resultdata[k].potion.lat; | |
| 558 | - | |
| 559 | - } | |
| 551 | + edit_bPloygonGrid = edit_pointE.getPath()[k].lng + ' ' + edit_pointE.getPath()[k].lat; | |
| 552 | + | |
| 553 | + }else { | |
| 554 | + | |
| 555 | + edit_bPloygonGrid = edit_bPloygonGrid + ',' + edit_pointE.getPath()[k].lng + ' ' + edit_pointE.getPath()[k].lat; | |
| 560 | 556 | |
| 561 | 557 | } |
| 558 | + | |
| 559 | + } | |
| 560 | + | |
| 561 | + edit_bPloygonGrid = edit_bPloygonGrid + ',' + edit_pointE.getPath()[0].lng + ' ' + edit_pointE.getPath()[0].lat; | |
| 562 | + | |
| 563 | + // 多边形中心点 | |
| 564 | + var centre_points = edit_pointE.getBounds().getCenter().lng + ' ' + edit_pointE.getBounds().getCenter().lat; | |
| 565 | + | |
| 566 | + /** 设置修改站点集合对象站点中心点百度坐标属性值 @param:<bJwpoints:中心点百度坐标) */ | |
| 567 | + EditStationObj.setEitdStationBJwpoints(centre_points); | |
| 568 | + | |
| 569 | + /** 设置修改站点集合对象范围图形类型属性值 @param:<shapesType:范围图形类型) */ | |
| 570 | + EditStationObj.setEitdStationShapesType('d'); | |
| 571 | + | |
| 572 | + /** 设置修改站点集合对象圆形半径属性值 @param:<radius:圆形半径) */ | |
| 573 | + EditStationObj.setEitdStationRadius(''); | |
| 574 | + | |
| 575 | + /** 设置修改站点集合对象图形百度坐标集合属性值 @param:<bPolygonGrid:图形百度坐标集合) */ | |
| 576 | + EditStationObj.setEitdBPolygonGrid(edit_bPloygonGrid); | |
| 577 | + | |
| 578 | + $.get('edit.html', function(m){ | |
| 562 | 579 | |
| 563 | - eidt_gPloygonGrid = 'POLYGON((' + eidt_gPloygonGrid + '))'; | |
| 564 | - | |
| 565 | - edit_bPloygonGrid = 'POLYGON((' + edit_bPloygonGrid + '))'; | |
| 580 | + $(pjaxContainer).append(m); | |
| 566 | 581 | |
| 567 | - // 中心点坐标转WGS坐标 | |
| 568 | - GetAjaxData.getFormPointEToWGS(edit_centre,function(p) { | |
| 569 | - | |
| 570 | - var edit_gLonx = p[0].WGSpotion.Lng; | |
| 571 | - | |
| 572 | - var edit_gLaty = p[0].WGSpotion.Lat; | |
| 573 | - | |
| 574 | - // 设置编辑站点参宿集合 | |
| 575 | - PublicFunctions.editSeteditStationParmasValue(centre_points,edit_gLonx,edit_gLaty,edit_bPloygonGrid,eidt_gPloygonGrid,'d',''); | |
| 576 | - | |
| 577 | - // 加载编辑页面 | |
| 578 | - $.get('edit.html', function(m){$(pjaxContainer).append(m);}); | |
| 579 | - | |
| 580 | - }); | |
| 582 | + $('#edit_station_mobal').trigger('editSelectMobal_show', [WorldsBMap,GetAjaxData,EditStationObj,LineObj,PublicFunctions]); | |
| 581 | 583 | |
| 582 | - }); | |
| 583 | - | |
| 584 | + }); | |
| 584 | 585 | |
| 585 | 586 | }); |
| 586 | 587 | |
| ... | ... | @@ -591,14 +592,15 @@ var WorldsBMap = function () { |
| 591 | 592 | // 在地图上画出上行线路走向 |
| 592 | 593 | drawingUpline : function (polylineArray,resultdata) { |
| 593 | 594 | |
| 594 | - // 清除地图覆盖物 | |
| 595 | - mapBVvalue.clearOverlays(); | |
| 595 | + WorldsBMap.clearMarkAndOverlays(); | |
| 596 | + | |
| 597 | + polyUpline = ''; | |
| 596 | 598 | |
| 597 | 599 | // 创建线路走向 |
| 598 | 600 | polyUpline = new BMap.Polyline(polylineArray, {strokeColor : "blue",strokeWeight : 6,strokeOpacity : 0.5}); |
| 599 | 601 | |
| 600 | 602 | // 把折线添加到地图上 |
| 601 | - mapBVvalue.addOverlay(polyUpline); | |
| 603 | + mapBValue.addOverlay(polyUpline); | |
| 602 | 604 | |
| 603 | 605 | var ceter_index = Math.round(resultdata.length / 2); |
| 604 | 606 | |
| ... | ... | @@ -610,13 +612,13 @@ var WorldsBMap = function () { |
| 610 | 612 | |
| 611 | 613 | var PanOptions_ ={noAnimation :true}; |
| 612 | 614 | |
| 613 | - mapBVvalue.reset(); | |
| 615 | + mapBValue.reset(); | |
| 614 | 616 | |
| 615 | - mapBVvalue.panTo(polyline_center,PanOptions_); | |
| 617 | + mapBValue.panTo(polyline_center,PanOptions_); | |
| 616 | 618 | |
| 617 | - mapBVvalue.panBy(500,-510,PanOptions_); | |
| 619 | + mapBValue.panBy(500,-510,PanOptions_); | |
| 618 | 620 | |
| 619 | - mapBVvalue.setZoom(14); | |
| 621 | + mapBValue.setZoom(14); | |
| 620 | 622 | |
| 621 | 623 | }, |
| 622 | 624 | |
| ... | ... | @@ -627,24 +629,12 @@ var WorldsBMap = function () { |
| 627 | 629 | var icon_target = new BMap.Icon('/pages/base/stationroute/css/img/cz.png',new BMap.Size(20, 20)); |
| 628 | 630 | |
| 629 | 631 | // 创建标注物 |
| 630 | - var markers_thread = new BMap.Marker(point_center,{icon : icon_target}); | |
| 632 | + marker = new BMap.Marker(point_center,{icon : icon_target}); | |
| 631 | 633 | |
| 632 | 634 | // 允许覆盖物在map.clearOverlays方法中被清除。 |
| 633 | - markers_thread.enableMassClear(); | |
| 634 | - | |
| 635 | - // 清除marker | |
| 636 | - mapBVvalue.removeOverlay(markers_thread); | |
| 635 | + marker.enableMassClear(); | |
| 637 | 636 | |
| 638 | - mapBVvalue.addOverlay(markers_thread); | |
| 639 | - }, | |
| 640 | - | |
| 641 | - // 打开绘画工具 | |
| 642 | - drawingManagerOpen : function() { | |
| 643 | - | |
| 644 | - // 清楚地图覆盖物 | |
| 645 | - mapBVvalue.clearOverlays(); | |
| 646 | - | |
| 647 | - | |
| 637 | + mapBValue.addOverlay(marker); | |
| 648 | 638 | }, |
| 649 | 639 | |
| 650 | 640 | // 站点名称获取百度坐标(手动规划) |
| ... | ... | @@ -678,7 +668,7 @@ var WorldsBMap = function () { |
| 678 | 668 | |
| 679 | 669 | if(arra[index]!=''){ |
| 680 | 670 | |
| 681 | - var localSearch = new BMap.LocalSearch(mapBVvalue); | |
| 671 | + var localSearch = new BMap.LocalSearch(mapBValue); | |
| 682 | 672 | |
| 683 | 673 | localSearch.search(arra[index]); |
| 684 | 674 | |
| ... | ... | @@ -742,7 +732,7 @@ var WorldsBMap = function () { |
| 742 | 732 | |
| 743 | 733 | var poiTwo = new BMap.Point(stationList[index+1].potion.lng,stationList[index+1].potion.lat); |
| 744 | 734 | |
| 745 | - var transit = new BMap.TransitRoute(mapBVvalue, {renderOptions: {map: mapBVvalue},onSearchComplete: searchComplete}); | |
| 735 | + var transit = new BMap.TransitRoute(mapBValue, {renderOptions: {map: mapBValue},onSearchComplete: searchComplete}); | |
| 746 | 736 | |
| 747 | 737 | transit.search(poiOne,poiTwo); |
| 748 | 738 | |
| ... | ... | @@ -810,7 +800,7 @@ var WorldsBMap = function () { |
| 810 | 800 | |
| 811 | 801 | /* var transit = new BMap.TransitRoute(mapB, {renderOptions: {map: mapB},onPolylinesSet: searchPolylinesSet});*/ |
| 812 | 802 | |
| 813 | - var transit = new BMap.DrivingRoute(mapBVvalue, {renderOptions: {map: mapBVvalue},onPolylinesSet: searchPolylinesSet}); | |
| 803 | + var transit = new BMap.DrivingRoute(mapBValue, {renderOptions: {map: mapBValue},onPolylinesSet: searchPolylinesSet}); | |
| 814 | 804 | |
| 815 | 805 | function searchPolylinesSet(results){ |
| 816 | 806 | |
| ... | ... | @@ -856,12 +846,12 @@ var WorldsBMap = function () { |
| 856 | 846 | |
| 857 | 847 | var PanOptions ={noAnimation :true}; |
| 858 | 848 | |
| 859 | - mapBVvalue.panTo(stationNameChangePoint,PanOptions); | |
| 849 | + mapBValue.panTo(stationNameChangePoint,PanOptions); | |
| 860 | 850 | |
| 861 | - mapBVvalue.panBy(0,-100); | |
| 851 | + mapBValue.panBy(0,-100); | |
| 862 | 852 | |
| 863 | 853 | // 将标注添加到地图中 |
| 864 | - mapBVvalue.addOverlay(marker_stargt2); | |
| 854 | + mapBValue.addOverlay(marker_stargt2); | |
| 865 | 855 | |
| 866 | 856 | //跳动的动画 |
| 867 | 857 | marker_stargt2.setAnimation(BMAP_ANIMATION_BOUNCE); |
| ... | ... | @@ -875,7 +865,7 @@ var WorldsBMap = function () { |
| 875 | 865 | /** 系统规划抓去数据 @param lineNameValue:线路名称;i:方向*/ |
| 876 | 866 | getBmapStationNames : function(lineNameValue,i,callback) { |
| 877 | 867 | |
| 878 | - var busline = new BMap.BusLineSearch(mapBVvalue,{ | |
| 868 | + var busline = new BMap.BusLineSearch(mapBValue,{ | |
| 879 | 869 | |
| 880 | 870 | // 设置公交列表查询后的回调函数。参数:rs: BusListResult类型 |
| 881 | 871 | onGetBusListComplete:function(BusListResult) { |
| ... | ... | @@ -934,7 +924,9 @@ var WorldsBMap = function () { |
| 934 | 924 | clearMarkAndOverlays : function() { |
| 935 | 925 | |
| 936 | 926 | // 清楚地图覆盖物 |
| 937 | - mapBVvalue.clearOverlays(); | |
| 927 | + mapBValue.clearOverlays(); | |
| 928 | + | |
| 929 | + mapBValue.removeOverlay(); | |
| 938 | 930 | |
| 939 | 931 | } |
| 940 | 932 | ... | ... |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-treedata.js
| ... | ... | @@ -13,6 +13,160 @@ |
| 13 | 13 | |
| 14 | 14 | var StationTreeData = function(){ |
| 15 | 15 | |
| 16 | + function parmasObj() { | |
| 17 | + | |
| 18 | + AddStationObj.setAddStation({}); | |
| 19 | + | |
| 20 | + EditStationObj.setEitdStation({}); | |
| 21 | + | |
| 22 | + EditSectionObj.setEitdSection({}); | |
| 23 | + | |
| 24 | + } | |
| 25 | + | |
| 26 | + function upIsEidtStauts(shapesTypeT,chaildredType,data) { | |
| 27 | + | |
| 28 | + // 关闭弹出层 | |
| 29 | + layer.closeAll(); | |
| 30 | + | |
| 31 | + // 选中的是站点 | |
| 32 | + if(chaildredType =='station') { | |
| 33 | + | |
| 34 | + // 如果是圆 | |
| 35 | + if(shapesTypeT =='r') { | |
| 36 | + | |
| 37 | + // 百度地图画圆 | |
| 38 | + WorldsBMap.pointsCircle(data); | |
| 39 | + | |
| 40 | + // 如果是多变行 | |
| 41 | + }else if(shapesTypeT == 'd') { | |
| 42 | + | |
| 43 | + // 百度地图画多边形 | |
| 44 | + WorldsBMap.pointsPolygon(objStation); | |
| 45 | + | |
| 46 | + } | |
| 47 | + | |
| 48 | + // 选中的是路段 | |
| 49 | + }else if(chaildredType =='section'){ | |
| 50 | + | |
| 51 | + // 路段矢量坐标点 | |
| 52 | + var polylineArray = [data]; | |
| 53 | + | |
| 54 | + // 路段方向 | |
| 55 | + var dire_ = data.sectionrouteDirections; | |
| 56 | + | |
| 57 | + // 线路ID | |
| 58 | + var Line = LineObj.getLineObj(); | |
| 59 | + | |
| 60 | + // 百度地图画路段 | |
| 61 | + PublicFunctions.linePanlThree(Line.id,polylineArray,dire_); | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + } | |
| 66 | + | |
| 67 | + function TreeOnclickEvent(treeOjb) { | |
| 68 | + | |
| 69 | + // 节点个数 | |
| 70 | + var len = treeOjb.length; | |
| 71 | + | |
| 72 | + if(len<0) { | |
| 73 | + | |
| 74 | + return; | |
| 75 | + } | |
| 76 | + | |
| 77 | + // 获取数据 | |
| 78 | + var stationData = treeOjb[0].original; | |
| 79 | + | |
| 80 | + // 站点范围类型 | |
| 81 | + var shapesType_ = stationData.stationShapesType; | |
| 82 | + | |
| 83 | + // 选中的节点类型 | |
| 84 | + var chaildredType_ = stationData.chaildredType; | |
| 85 | + | |
| 86 | + // 选中的其它节点 | |
| 87 | + if(chaildredType_ ==null){ | |
| 88 | + | |
| 89 | + return; | |
| 90 | + } | |
| 91 | + | |
| 92 | + var edtsta = EditStationObj.getEitdStation(); | |
| 93 | + | |
| 94 | + var edtste = EditSectionObj.getEitdSection(); | |
| 95 | + | |
| 96 | + if(!$.isEmptyObject(edtsta)){ | |
| 97 | + | |
| 98 | + var stationName = edtsta.stationStationName; | |
| 99 | + | |
| 100 | + var txType = edtsta.stationShapesType; | |
| 101 | + | |
| 102 | + // 是否继续弹出层 | |
| 103 | + layer.confirm('您正处于站点【'+stationName+'】的编辑状态!是否退出!', { | |
| 104 | + btn : [ '确认并退出', '返回并继续' ] | |
| 105 | + }, function(index) { | |
| 106 | + | |
| 107 | + PublicFunctions.editAChangeCssRemoveDisabled(); | |
| 108 | + | |
| 109 | + // 关闭弹出层 | |
| 110 | + layer.close(index); | |
| 111 | + | |
| 112 | + if(txType=='r'){ | |
| 113 | + | |
| 114 | + WorldsBMap.pointsCircle(edtsta); | |
| 115 | + | |
| 116 | + }else if(txType=='d') { | |
| 117 | + | |
| 118 | + // 百度地图画多边形 | |
| 119 | + WorldsBMap.pointsPolygon(edtsta); | |
| 120 | + } | |
| 121 | + | |
| 122 | + parmasObj(); | |
| 123 | + | |
| 124 | + // upIsEidtStauts(objStation,chaildredType,len); | |
| 125 | + | |
| 126 | + },function(){ | |
| 127 | + | |
| 128 | + // 关闭弹出层 | |
| 129 | + layer.closeAll(); | |
| 130 | + | |
| 131 | + return false; | |
| 132 | + }); | |
| 133 | + | |
| 134 | + }else if(!$.isEmptyObject(edtste)) { | |
| 135 | + | |
| 136 | + var sectionName = edtste.sectionName; | |
| 137 | + | |
| 138 | + // 是否继续弹出层 | |
| 139 | + layer.confirm('您正处于路段【'+sectionName+'】的编辑状态!是否退出!', { | |
| 140 | + btn : [ '确认并退出', '返回并继续' ] | |
| 141 | + }, function(index) { | |
| 142 | + | |
| 143 | + // 关闭弹出层 | |
| 144 | + layer.close(index); | |
| 145 | + | |
| 146 | + PublicFunctions.editAChangeCssRemoveDisabled(); | |
| 147 | + | |
| 148 | + var polylineArray_ = [edtste]; | |
| 149 | + | |
| 150 | + // 百度地图画路段 | |
| 151 | + PublicFunctions.linePanlThree(edtste.sectionrouteLine,polylineArray_,edtste.sectionrouteDirections); | |
| 152 | + | |
| 153 | + // upIsEidtStauts(objStation,chaildredType,len); | |
| 154 | + | |
| 155 | + },function(){ | |
| 156 | + | |
| 157 | + // 关闭弹出层 | |
| 158 | + layer.closeAll(); | |
| 159 | + return false; | |
| 160 | + }); | |
| 161 | + | |
| 162 | + }else { | |
| 163 | + | |
| 164 | + upIsEidtStauts(shapesType_,chaildredType_,stationData); | |
| 165 | + | |
| 166 | + } | |
| 167 | + | |
| 168 | + } | |
| 169 | + | |
| 16 | 170 | var stationTree = { |
| 17 | 171 | |
| 18 | 172 | upInit : function(treeDateJson) { |
| ... | ... | @@ -74,74 +228,10 @@ var StationTreeData = function(){ |
| 74 | 228 | // 树节点单击事件 |
| 75 | 229 | }).bind('click.jstree', function(event) { |
| 76 | 230 | |
| 77 | - // 关闭弹出层 | |
| 78 | - layer.closeAll(); | |
| 79 | - | |
| 80 | - // 获取选中树节点 | |
| 231 | + // 获取上行选中树节点 | |
| 81 | 232 | var treeOjb = $.jstree.reference("#station_Up_tree").get_selected(true); |
| 82 | 233 | |
| 83 | - // 节点个数 | |
| 84 | - var len = treeOjb.length; | |
| 85 | - | |
| 86 | - // 如果选中 | |
| 87 | - if(len>0) { | |
| 88 | - | |
| 89 | - // 获取数据 | |
| 90 | - var objStation = treeOjb[0].original; | |
| 91 | - | |
| 92 | - // 选中的节点类型 | |
| 93 | - var chaildredType = objStation.chaildredType; | |
| 94 | - | |
| 95 | - // 选中的是站点 | |
| 96 | - if(chaildredType =='station') { | |
| 97 | - | |
| 98 | - // 站点范围类型 | |
| 99 | - var shapesTypeT = treeOjb[0].original.stationShapesType; | |
| 100 | - | |
| 101 | - // 节点数据 | |
| 102 | - var objStation = treeOjb[0].original; | |
| 103 | - | |
| 104 | - // 如果是圆 | |
| 105 | - if(shapesTypeT =='r') { | |
| 106 | - | |
| 107 | - // 百度地图画圆 | |
| 108 | - WorldsBMap.pointsCircle(objStation); | |
| 109 | - | |
| 110 | - // 如果是多变行 | |
| 111 | - }else if(shapesTypeT == 'd') { | |
| 112 | - | |
| 113 | - // 百度地图画多边形 | |
| 114 | - WorldsBMap.pointsPolygon(objStation); | |
| 115 | - | |
| 116 | - } | |
| 117 | - | |
| 118 | - // 选中的是路段 | |
| 119 | - }else if(chaildredType =='section'){ | |
| 120 | - | |
| 121 | - // 选中节点数据 | |
| 122 | - var objSection = treeOjb[0].original.sectionBsectionVector; | |
| 123 | - | |
| 124 | - // 路段矢量坐标点 | |
| 125 | - var polylineArray = []; | |
| 126 | - | |
| 127 | - polylineArray.push(treeOjb[0].original); | |
| 128 | - | |
| 129 | - // 路段方向 | |
| 130 | - var dire_ = treeOjb[0].original.sectionrouteDirections; | |
| 131 | - | |
| 132 | - var lineIdPanlThree = PublicFunctions.getLineIdValue(); | |
| 133 | - | |
| 134 | - // 百度地图画路段 | |
| 135 | - PublicFunctions.linePanlThree(lineIdPanlThree,polylineArray,dire_); | |
| 136 | - | |
| 137 | - // 选中的其它节点 | |
| 138 | - }else if(chaildredType ==null){ | |
| 139 | - | |
| 140 | - return; | |
| 141 | - | |
| 142 | - } | |
| 143 | - | |
| 144 | - } | |
| 234 | + TreeOnclickEvent(treeOjb); | |
| 145 | 235 | |
| 146 | 236 | }); |
| 147 | 237 | } |
| ... | ... | @@ -206,80 +296,11 @@ var StationTreeData = function(){ |
| 206 | 296 | // 树节点单击事件 |
| 207 | 297 | }).bind('click.jstree', function(event) { |
| 208 | 298 | |
| 209 | - // 关闭弹出层 | |
| 210 | - layer.closeAll(); | |
| 211 | - | |
| 212 | - // 获取选中节点 | |
| 299 | + // 获取下行选中树节点 | |
| 213 | 300 | var treeOjb = $.jstree.reference("#station_Down_tree").get_selected(true); |
| 214 | 301 | |
| 215 | - // 选择节点个数 | |
| 216 | - var len = treeOjb.length; | |
| 217 | - | |
| 218 | - // 如果选中 | |
| 219 | - if(len>0) { | |
| 220 | - | |
| 221 | - // 获取数据 | |
| 222 | - var objStation = treeOjb[0].original; | |
| 223 | - | |
| 224 | - // 选中的节点类型 | |
| 225 | - var chaildredType = objStation.chaildredType; | |
| 226 | - | |
| 227 | - // 选中的是站点 | |
| 228 | - if(chaildredType =='station') { | |
| 229 | - | |
| 230 | - // 将视图切换到指定的缩放等级,中心点坐标不变。注意:当有信息窗口在地图上打开时,地图缩放将保证信息窗口所在的坐标位置不动。(自1.2新增) | |
| 231 | - mapB.setZoom(16); | |
| 232 | - | |
| 233 | - // 站点范围类型 | |
| 234 | - var shapesTypeT = treeOjb[0].original.stationShapesType; | |
| 235 | - | |
| 236 | - // 节点数据 | |
| 237 | - var objStation = treeOjb[0].original; | |
| 238 | - | |
| 239 | - // 如果是圆 | |
| 240 | - if(shapesTypeT =='r') { | |
| 241 | - | |
| 242 | - // 百度地图画圆 | |
| 243 | - WorldsBMap.pointsCircle(objStation,mapB); | |
| 244 | - | |
| 245 | - // 如果是多变行 | |
| 246 | - }else if(shapesTypeT == 'd') { | |
| 247 | - | |
| 248 | - // 百度地图画多边形 | |
| 249 | - WorldsBMap.pointsPolygon(objStation,mapB); | |
| 250 | - | |
| 251 | - } | |
| 252 | - | |
| 253 | - // 选中的是路段 | |
| 254 | - }else if(chaildredType =='section'){ | |
| 255 | - | |
| 256 | - // 选中节点数据 | |
| 257 | - var objSection = treeOjb[0].original.sectionBsectionVector; | |
| 258 | - | |
| 259 | - // 路段矢量坐标点 | |
| 260 | - var polylineArray = []; | |
| 261 | - | |
| 262 | - polylineArray.push(treeOjb[0].original); | |
| 263 | - | |
| 264 | - // 路段方向 | |
| 265 | - var dire_ = treeOjb[0].original.sectionrouteDirections; | |
| 266 | - | |
| 267 | - /*// 清除地图覆盖物 | |
| 268 | - mapB.clearOverlays();*/ | |
| 269 | - | |
| 270 | - var lineIdPanlThree = PublicFunctions.getLineIdValue(); | |
| 271 | - | |
| 272 | - // 百度地图画路段 | |
| 273 | - PublicFunctions.linePanlThree(lineIdPanlThree,polylineArray,dire_); | |
| 274 | - | |
| 275 | - // 选中的其它节点 | |
| 276 | - }else if(chaildredType ==null){ | |
| 277 | - | |
| 278 | - return; | |
| 279 | - | |
| 280 | - } | |
| 281 | - | |
| 282 | - } | |
| 302 | + TreeOnclickEvent(treeOjb); | |
| 303 | + | |
| 283 | 304 | }); |
| 284 | 305 | } |
| 285 | 306 | }, | ... | ... |
src/main/resources/static/pages/base/stationroute/list.html
| ... | ... | @@ -211,46 +211,18 @@ |
| 211 | 211 | </div> |
| 212 | 212 | </div> |
| 213 | 213 | </div> |
| 214 | -<script type="text/javascript"> | |
| 215 | - | |
| 216 | -/** | |
| 217 | - * 全局变量 | |
| 218 | - * - - - - - > id:线路ID | |
| 219 | - * | |
| 220 | - * - - - - - > dir:方向 | |
| 221 | - * | |
| 222 | - * - - - - - > map :地图 | |
| 223 | - * | |
| 224 | - * - - - - - > drawingManager:鼠标绘制完成返回数据 | |
| 225 | - * | |
| 226 | - * - - - - - > addStationNameValue:新增选择系统生成新增方式的站点名称 | |
| 227 | - * | |
| 228 | - * - - - - - > circle:圆 | |
| 229 | - * | |
| 230 | - * - - - - - > polygon:多边形 | |
| 231 | - * | |
| 232 | - * - - - - - > polyUpline 线路上行走向 | |
| 233 | - * | |
| 234 | - * - - - - - > addStaitonParmas 新增站点保存参数集合 | |
| 235 | - * | |
| 236 | - * - - - - - > editStationParmas 编辑站点保存参数集合 | |
| 237 | - * | |
| 238 | - * - - - - - > status 绘画状态:新增与编辑 | |
| 239 | - */ | |
| 240 | -/* var id = '',dir = '',map = '', drawingManager = '',addStationNameValue = '', | |
| 241 | - circle='',marker = '',polyUpline='',addStaitonParmas = {},editStationParmas={},status='',manualPararms={}; */ | |
| 242 | - | |
| 243 | - | |
| 244 | -</script> | |
| 245 | 214 | <!-- 线路类 --> |
| 246 | 215 | <script src="/pages/base/stationroute/js/line.js"></script> |
| 247 | 216 | |
| 248 | 217 | <!-- 新增站点对象类 --> |
| 249 | 218 | <script src="/pages/base/stationroute/js/addstationobj.js"></script> |
| 250 | 219 | |
| 251 | -<!-- 新增站点对象类 --> | |
| 220 | +<!-- 修改站点对象类 --> | |
| 252 | 221 | <script src="/pages/base/stationroute/js/editstationobj.js"></script> |
| 253 | 222 | |
| 223 | +<!-- 修改路段对象类 --> | |
| 224 | +<script src="/pages/base/stationroute/js/editsection.js"></script> | |
| 225 | + | |
| 254 | 226 | <!-- 绘图类 --> |
| 255 | 227 | <script src="/pages/base/stationroute/js/drawingManager.js"></script> |
| 256 | 228 | ... | ... |