Commit be1f24f1480b25a34ebddf6607af9dad49daf799
update...
Showing
69 changed files
with
3065 additions
and
558 deletions
Too many changes to show.
To preserve performance only 69 of 77 files are displayed.
src/main/java/com/bsth/controller/LineController.java
| @@ -90,7 +90,7 @@ public class LineController extends BaseController<Line, Integer> { | @@ -90,7 +90,7 @@ public class LineController extends BaseController<Line, Integer> { | ||
| 90 | lineVersions.setName("原始版本"); | 90 | lineVersions.setName("原始版本"); |
| 91 | lineVersions.setLine(t); | 91 | lineVersions.setLine(t); |
| 92 | lineVersions.setLineCode(t.getLineCode()); | 92 | lineVersions.setLineCode(t.getLineCode()); |
| 93 | - lineVersions.setStartDate(t.getCreateDate()); | 93 | + lineVersions.setStartDate(new java.sql.Date(new Date().getTime())); |
| 94 | lineVersions.setEndDate(new java.sql.Date(endDate.getTime()));// 2088-8-8 00:00:00 | 94 | lineVersions.setEndDate(new java.sql.Date(endDate.getTime()));// 2088-8-8 00:00:00 |
| 95 | lineVersions.setVersions(1); | 95 | lineVersions.setVersions(1); |
| 96 | lineVersions.setStatus(1); | 96 | lineVersions.setStatus(1); |
src/main/java/com/bsth/controller/LineVersionsController.java
| @@ -85,4 +85,12 @@ public class LineVersionsController extends BaseController<LineVersions, Integer | @@ -85,4 +85,12 @@ public class LineVersionsController extends BaseController<LineVersions, Integer | ||
| 85 | return service.findCurrentVersion(lineId); | 85 | return service.findCurrentVersion(lineId); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | + /** | ||
| 89 | + * 根据id发布版本号(修改isupdate字段) | ||
| 90 | + */ | ||
| 91 | + @RequestMapping(value = "issueVersion", method = RequestMethod.POST) | ||
| 92 | + public Map<String, Object> issueVersion(@RequestParam(defaultValue = "id") int id) { | ||
| 93 | + return service.issueVersion(id); | ||
| 94 | + } | ||
| 95 | + | ||
| 88 | } | 96 | } |
src/main/java/com/bsth/controller/SectionRouteController.java
| @@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam; | @@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam; | ||
| 10 | import org.springframework.web.bind.annotation.RestController; | 10 | import org.springframework.web.bind.annotation.RestController; |
| 11 | 11 | ||
| 12 | import com.bsth.entity.SectionRoute; | 12 | import com.bsth.entity.SectionRoute; |
| 13 | +import com.bsth.entity.StationRouteCache; | ||
| 13 | import com.bsth.service.SectionRouteService; | 14 | import com.bsth.service.SectionRouteService; |
| 14 | 15 | ||
| 15 | /** | 16 | /** |
| @@ -55,6 +56,12 @@ public class SectionRouteController extends BaseController<SectionRoute, Integer | @@ -55,6 +56,12 @@ public class SectionRouteController extends BaseController<SectionRoute, Integer | ||
| 55 | public Iterable<SectionRoute> list(@RequestParam Map<String, Object> map) { | 56 | public Iterable<SectionRoute> list(@RequestParam Map<String, Object> map) { |
| 56 | return routeService.list(map); | 57 | return routeService.list(map); |
| 57 | } | 58 | } |
| 59 | + | ||
| 60 | + @RequestMapping(value = "/cacheList", method = RequestMethod.GET) | ||
| 61 | + public List<StationRouteCache> cacheList(@RequestParam Map<String, Object> map) { | ||
| 62 | +// routeService.cacheList(map) | ||
| 63 | + return null; | ||
| 64 | + } | ||
| 58 | 65 | ||
| 59 | /** | 66 | /** |
| 60 | * @Description :TODO(查询路段信息) | 67 | * @Description :TODO(查询路段信息) |
| @@ -76,8 +83,8 @@ public class SectionRouteController extends BaseController<SectionRoute, Integer | @@ -76,8 +83,8 @@ public class SectionRouteController extends BaseController<SectionRoute, Integer | ||
| 76 | * | 83 | * |
| 77 | * @return Map<String, Object> | 84 | * @return Map<String, Object> |
| 78 | */ | 85 | */ |
| 79 | - @RequestMapping(value = "/findSectionCache" , method = RequestMethod.GET) | ||
| 80 | - public List<Map<String, Object>> findPointsCache(@RequestParam Map<String, Object> map) { | 86 | + @RequestMapping(value = "/findCacheSection" , method = RequestMethod.GET) |
| 87 | + public List<Map<String, Object>> getSectionRouteCache(@RequestParam Map<String, Object> map) { | ||
| 81 | return routeService.getSectionRouteCache(map); | 88 | return routeService.getSectionRouteCache(map); |
| 82 | } | 89 | } |
| 83 | 90 | ||
| @@ -105,6 +112,11 @@ public class SectionRouteController extends BaseController<SectionRoute, Integer | @@ -105,6 +112,11 @@ public class SectionRouteController extends BaseController<SectionRoute, Integer | ||
| 105 | return routeService.findUpSectionRouteCode(map); | 112 | return routeService.findUpSectionRouteCode(map); |
| 106 | } | 113 | } |
| 107 | 114 | ||
| 115 | + @RequestMapping(value = "/findCacheUpSectionRouteCode" , method = RequestMethod.GET) | ||
| 116 | + public List<Map<String, Object>> findCacheUpSectionRouteCode(@RequestParam Map<String, Object> map) { | ||
| 117 | + return routeService.findCacheUpSectionRouteCode(map); | ||
| 118 | + } | ||
| 119 | + | ||
| 108 | /** | 120 | /** |
| 109 | * @Description :TODO(引用路段) | 121 | * @Description :TODO(引用路段) |
| 110 | * | 122 | * |
src/main/java/com/bsth/controller/StationController.java
| @@ -157,4 +157,15 @@ public class StationController extends BaseController<Station, Integer> { | @@ -157,4 +157,15 @@ public class StationController extends BaseController<Station, Integer> { | ||
| 157 | return GetUIDAndCode.getStationId(); | 157 | return GetUIDAndCode.getStationId(); |
| 158 | 158 | ||
| 159 | } | 159 | } |
| 160 | + /** | ||
| 161 | + * @Description :TODO(查询站点编码) | ||
| 162 | + * | ||
| 163 | + * @return int <stationCode站点编码> | ||
| 164 | + */ | ||
| 165 | + @RequestMapping(value="stationCacheSave" , method = RequestMethod.POST) | ||
| 166 | + public Map<String, Object> stationCacheSave(@RequestParam Map<String, Object> map) { | ||
| 167 | + map.put("createBy", ""); | ||
| 168 | + map.put("updateBy", ""); | ||
| 169 | + return service.stationCacheSave(map); | ||
| 170 | + } | ||
| 160 | } | 171 | } |
src/main/java/com/bsth/controller/geo_data/GeoDataController.java
| @@ -40,4 +40,4 @@ public class GeoDataController { | @@ -40,4 +40,4 @@ public class GeoDataController { | ||
| 40 | public Map<String, Object> updateStationName(@RequestParam Map<String, Object> map){ | 40 | public Map<String, Object> updateStationName(@RequestParam Map<String, Object> map){ |
| 41 | return geoDataService.updateStationName(map); | 41 | return geoDataService.updateStationName(map); |
| 42 | } | 42 | } |
| 43 | -} | 43 | -} |
| 44 | +} | ||
| 44 | \ No newline at end of file | 45 | \ No newline at end of file |
src/main/java/com/bsth/controller/oil/DlbController.java
| @@ -224,4 +224,9 @@ public class DlbController extends BaseController<Dlb, Integer>{ | @@ -224,4 +224,9 @@ public class DlbController extends BaseController<Dlb, Integer>{ | ||
| 224 | // Ylb t=new Ylb(); | 224 | // Ylb t=new Ylb(); |
| 225 | return service.saveDlb(t); | 225 | return service.saveDlb(t); |
| 226 | } | 226 | } |
| 227 | + | ||
| 228 | + @RequestMapping(value = "/updateJsy",method = RequestMethod.GET) | ||
| 229 | + public Map<String, Object> updateJsy(@RequestParam Map<String, Object> map){ | ||
| 230 | + return service.update(map); | ||
| 231 | + } | ||
| 227 | } | 232 | } |
src/main/java/com/bsth/entity/LineVersions.java
| @@ -69,6 +69,12 @@ public class LineVersions{ | @@ -69,6 +69,12 @@ public class LineVersions{ | ||
| 69 | */ | 69 | */ |
| 70 | private int status; | 70 | private int status; |
| 71 | 71 | ||
| 72 | + /** | ||
| 73 | + * 是否发布 int length(1) | ||
| 74 | + * 0(没有),1(发布) | ||
| 75 | + */ | ||
| 76 | + private int isupdate; | ||
| 77 | + | ||
| 72 | public Integer getId() { | 78 | public Integer getId() { |
| 73 | return id; | 79 | return id; |
| 74 | } | 80 | } |
| @@ -156,5 +162,13 @@ public class LineVersions{ | @@ -156,5 +162,13 @@ public class LineVersions{ | ||
| 156 | public void setStatus(int status) { | 162 | public void setStatus(int status) { |
| 157 | this.status = status; | 163 | this.status = status; |
| 158 | } | 164 | } |
| 165 | + | ||
| 166 | + public int getIsupdate() { | ||
| 167 | + return isupdate; | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | + public void setIsupdate(int isupdate) { | ||
| 171 | + this.isupdate = isupdate; | ||
| 172 | + } | ||
| 159 | 173 | ||
| 160 | } | 174 | } |
| 161 | \ No newline at end of file | 175 | \ No newline at end of file |
src/main/java/com/bsth/entity/geo_data/GeoRoad.java
| 1 | -package com.bsth.entity.geo_data; | ||
| 2 | - | ||
| 3 | -import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| 4 | - | ||
| 5 | -import java.util.List; | ||
| 6 | - | ||
| 7 | -/** | ||
| 8 | - * Created by panzhao on 2017/12/8. | ||
| 9 | - */ | ||
| 10 | -public class GeoRoad { | ||
| 11 | - | ||
| 12 | - private int id; | ||
| 13 | - | ||
| 14 | - private Integer sectionrouteCode; | ||
| 15 | - | ||
| 16 | - private Integer directions; | ||
| 17 | - | ||
| 18 | - private String lineCode; | ||
| 19 | - | ||
| 20 | - private String sectionCode; | ||
| 21 | - | ||
| 22 | - private Integer versions; | ||
| 23 | - | ||
| 24 | - private String sectionName; | ||
| 25 | - | ||
| 26 | - private String crosesRoad; | ||
| 27 | - | ||
| 28 | - @JsonIgnore | ||
| 29 | - private String gsectionVector; | ||
| 30 | - | ||
| 31 | - private List<String> bdCoords; | ||
| 32 | - | ||
| 33 | - public int getId() { | ||
| 34 | - return id; | ||
| 35 | - } | ||
| 36 | - | ||
| 37 | - public void setId(int id) { | ||
| 38 | - this.id = id; | ||
| 39 | - } | ||
| 40 | - | ||
| 41 | - public Integer getSectionrouteCode() { | ||
| 42 | - return sectionrouteCode; | ||
| 43 | - } | ||
| 44 | - | ||
| 45 | - public void setSectionrouteCode(Integer sectionrouteCode) { | ||
| 46 | - this.sectionrouteCode = sectionrouteCode; | ||
| 47 | - } | ||
| 48 | - | ||
| 49 | - public Integer getDirections() { | ||
| 50 | - return directions; | ||
| 51 | - } | ||
| 52 | - | ||
| 53 | - public void setDirections(Integer directions) { | ||
| 54 | - this.directions = directions; | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - public String getLineCode() { | ||
| 58 | - return lineCode; | ||
| 59 | - } | ||
| 60 | - | ||
| 61 | - public void setLineCode(String lineCode) { | ||
| 62 | - this.lineCode = lineCode; | ||
| 63 | - } | ||
| 64 | - | ||
| 65 | - public String getSectionCode() { | ||
| 66 | - return sectionCode; | ||
| 67 | - } | ||
| 68 | - | ||
| 69 | - public void setSectionCode(String sectionCode) { | ||
| 70 | - this.sectionCode = sectionCode; | ||
| 71 | - } | ||
| 72 | - | ||
| 73 | - public Integer getVersions() { | ||
| 74 | - return versions; | ||
| 75 | - } | ||
| 76 | - | ||
| 77 | - public void setVersions(Integer versions) { | ||
| 78 | - this.versions = versions; | ||
| 79 | - } | ||
| 80 | - | ||
| 81 | - public String getSectionName() { | ||
| 82 | - return sectionName; | ||
| 83 | - } | ||
| 84 | - | ||
| 85 | - public void setSectionName(String sectionName) { | ||
| 86 | - this.sectionName = sectionName; | ||
| 87 | - } | ||
| 88 | - | ||
| 89 | - public String getCrosesRoad() { | ||
| 90 | - return crosesRoad; | ||
| 91 | - } | ||
| 92 | - | ||
| 93 | - public void setCrosesRoad(String crosesRoad) { | ||
| 94 | - this.crosesRoad = crosesRoad; | ||
| 95 | - } | ||
| 96 | - | ||
| 97 | - public String getGsectionVector() { | ||
| 98 | - return gsectionVector; | ||
| 99 | - } | ||
| 100 | - | ||
| 101 | - public void setGsectionVector(String gsectionVector) { | ||
| 102 | - this.gsectionVector = gsectionVector; | ||
| 103 | - } | ||
| 104 | - | ||
| 105 | - public List<String> getBdCoords() { | ||
| 106 | - return bdCoords; | ||
| 107 | - } | ||
| 108 | - | ||
| 109 | - public void setBdCoords(List<String> bdCoords) { | ||
| 110 | - this.bdCoords = bdCoords; | ||
| 111 | - } | ||
| 112 | -} | 1 | +package com.bsth.entity.geo_data; |
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| 4 | + | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * Created by panzhao on 2017/12/8. | ||
| 9 | + */ | ||
| 10 | +public class GeoRoad { | ||
| 11 | + | ||
| 12 | + private int id; | ||
| 13 | + | ||
| 14 | + private Integer sectionrouteCode; | ||
| 15 | + | ||
| 16 | + private Integer directions; | ||
| 17 | + | ||
| 18 | + private String lineCode; | ||
| 19 | + | ||
| 20 | + private String sectionCode; | ||
| 21 | + | ||
| 22 | + private Integer versions; | ||
| 23 | + | ||
| 24 | + private String sectionName; | ||
| 25 | + | ||
| 26 | + private String crosesRoad; | ||
| 27 | + | ||
| 28 | + @JsonIgnore | ||
| 29 | + private String gsectionVector; | ||
| 30 | + | ||
| 31 | + private List<String> bdCoords; | ||
| 32 | + | ||
| 33 | + public int getId() { | ||
| 34 | + return id; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + public void setId(int id) { | ||
| 38 | + this.id = id; | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + public Integer getSectionrouteCode() { | ||
| 42 | + return sectionrouteCode; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + public void setSectionrouteCode(Integer sectionrouteCode) { | ||
| 46 | + this.sectionrouteCode = sectionrouteCode; | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + public Integer getDirections() { | ||
| 50 | + return directions; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + public void setDirections(Integer directions) { | ||
| 54 | + this.directions = directions; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + public String getLineCode() { | ||
| 58 | + return lineCode; | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + public void setLineCode(String lineCode) { | ||
| 62 | + this.lineCode = lineCode; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + public String getSectionCode() { | ||
| 66 | + return sectionCode; | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + public void setSectionCode(String sectionCode) { | ||
| 70 | + this.sectionCode = sectionCode; | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + public Integer getVersions() { | ||
| 74 | + return versions; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + public void setVersions(Integer versions) { | ||
| 78 | + this.versions = versions; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + public String getSectionName() { | ||
| 82 | + return sectionName; | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + public void setSectionName(String sectionName) { | ||
| 86 | + this.sectionName = sectionName; | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + public String getCrosesRoad() { | ||
| 90 | + return crosesRoad; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + public void setCrosesRoad(String crosesRoad) { | ||
| 94 | + this.crosesRoad = crosesRoad; | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + public String getGsectionVector() { | ||
| 98 | + return gsectionVector; | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + public void setGsectionVector(String gsectionVector) { | ||
| 102 | + this.gsectionVector = gsectionVector; | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + public List<String> getBdCoords() { | ||
| 106 | + return bdCoords; | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + public void setBdCoords(List<String> bdCoords) { | ||
| 110 | + this.bdCoords = bdCoords; | ||
| 111 | + } | ||
| 112 | +} |
src/main/java/com/bsth/entity/geo_data/GeoStation.java
| @@ -149,4 +149,4 @@ public class GeoStation { | @@ -149,4 +149,4 @@ public class GeoStation { | ||
| 149 | public void setBdCoords(List<String> bdCoords) { | 149 | public void setBdCoords(List<String> bdCoords) { |
| 150 | this.bdCoords = bdCoords; | 150 | this.bdCoords = bdCoords; |
| 151 | } | 151 | } |
| 152 | -} | 152 | -} |
| 153 | +} | ||
| 153 | \ No newline at end of file | 154 | \ No newline at end of file |
src/main/java/com/bsth/repository/LineVersionsRepository.java
| @@ -79,4 +79,12 @@ public interface LineVersionsRepository extends BaseRepository<LineVersions, Int | @@ -79,4 +79,12 @@ public interface LineVersionsRepository extends BaseRepository<LineVersions, Int | ||
| 79 | */ | 79 | */ |
| 80 | @Query(value = " SELECT lv.versions FROM LineVersions lv where lv.line.id = ?1 and lv.status=1") | 80 | @Query(value = " SELECT lv.versions FROM LineVersions lv where lv.line.id = ?1 and lv.status=1") |
| 81 | public Integer findCurrentVersion(Integer id); | 81 | public Integer findCurrentVersion(Integer id); |
| 82 | + | ||
| 83 | + /** | ||
| 84 | + * 发布版本 | ||
| 85 | + */ | ||
| 86 | + @Transactional | ||
| 87 | + @Modifying | ||
| 88 | + @Query(value = "UPDATE LineVersions lv set lv.isupdate=1 where lv.id=?1 ") | ||
| 89 | + public int issueVersion(int id); | ||
| 82 | } | 90 | } |
src/main/java/com/bsth/repository/LsSectionRouteRepository.java
| @@ -37,4 +37,11 @@ public interface LsSectionRouteRepository extends BaseRepository<LsSectionRoute, | @@ -37,4 +37,11 @@ public interface LsSectionRouteRepository extends BaseRepository<LsSectionRoute, | ||
| 37 | @Modifying | 37 | @Modifying |
| 38 | @Query(value="DELETE from bsth_c_ls_sectionroute where line = ?1 and directions = ?2 and versions=?3", nativeQuery=true) | 38 | @Query(value="DELETE from bsth_c_ls_sectionroute where line = ?1 and directions = ?2 and versions=?3", nativeQuery=true) |
| 39 | public void batchDelete(Integer line, Integer dir, Integer versions); | 39 | public void batchDelete(Integer line, Integer dir, Integer versions); |
| 40 | + | ||
| 41 | + /** | ||
| 42 | + * 更新路线前撤销线路版本下历史原有路段路由 | ||
| 43 | + */ | ||
| 44 | + @Modifying | ||
| 45 | + @Query(value="UPDATE bsth_c_ls_sectionroute set destroy = 1 where line = ?1 and directions = ?2 and versions=?3", nativeQuery=true) | ||
| 46 | + public void batchDestroy(Integer sectionRouteLine, Integer directions, Integer versions); | ||
| 40 | } | 47 | } |
src/main/java/com/bsth/repository/LsStationRouteRepository.java
| @@ -42,4 +42,14 @@ public interface LsStationRouteRepository extends BaseRepository<LsStationRoute, | @@ -42,4 +42,14 @@ public interface LsStationRouteRepository extends BaseRepository<LsStationRoute, | ||
| 42 | @Modifying | 42 | @Modifying |
| 43 | @Query(value="DELETE from bsth_c_ls_stationroute where line = ?1 and directions = ?2 and versions = ?3", nativeQuery=true) | 43 | @Query(value="DELETE from bsth_c_ls_stationroute where line = ?1 and directions = ?2 and versions = ?3", nativeQuery=true) |
| 44 | public void batchDelete(Integer line,Integer dir, Integer versions); | 44 | public void batchDelete(Integer line,Integer dir, Integer versions); |
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 更新路线前撤销线路版本号历史原有站点路由 | ||
| 48 | + * | ||
| 49 | + * @param line | ||
| 50 | + * @param dir | ||
| 51 | + */ | ||
| 52 | + @Modifying | ||
| 53 | + @Query(value="UPDATE bsth_c_ls_stationroute set destroy = 1 where line = ?1 and directions = ?2 and versions = ?3", nativeQuery=true) | ||
| 54 | + public void batchDestroy(Integer sectionRouteLine, Integer directions, Integer versions); | ||
| 45 | } | 55 | } |
src/main/java/com/bsth/repository/SectionRouteCacheRepository.java
| @@ -139,4 +139,18 @@ public interface SectionRouteCacheRepository extends BaseRepository<SectionRoute | @@ -139,4 +139,18 @@ public interface SectionRouteCacheRepository extends BaseRepository<SectionRoute | ||
| 139 | @Modifying | 139 | @Modifying |
| 140 | @Query(value="delete from bsth_c_sectionroute_cache where line_code = ?1 and directions = ?2", nativeQuery=true) | 140 | @Query(value="delete from bsth_c_sectionroute_cache where line_code = ?1 and directions = ?2", nativeQuery=true) |
| 141 | public void sectionRouteCacheDel(String lineCode,Integer dir); | 141 | public void sectionRouteCacheDel(String lineCode,Integer dir); |
| 142 | -} | 142 | + |
| 143 | + @Modifying | ||
| 144 | + @Query(value="delete from bsth_c_sectionroute_cache where line = ?1 and directions = ?2", nativeQuery=true) | ||
| 145 | + public void sectionRouteCacheDel(Integer lineId,Integer dir); | ||
| 146 | + | ||
| 147 | + /** | ||
| 148 | + * @Description :TODO(查询线路某方向下的上一个路段序号) | ||
| 149 | + * | ||
| 150 | + * @param map <lineId:线路ID; direction:方向;sectionRouteCode:路段编码> | ||
| 151 | + * | ||
| 152 | + * @return List<Map<String, Object>> | ||
| 153 | + */ | ||
| 154 | + @Query(value = " select MAX(r.sectionroute_code) as sectionrouteCode from bsth_c_sectionroute_cache r WHERE r.line=?1 and r.directions =?2 and r.sectionroute_code< ?3 and r.destroy = 0", nativeQuery=true) | ||
| 155 | + List<Object[]> findCacheUpSectionRouteCode(Integer lineId,Integer direction,Integer stationRouteCode); | ||
| 156 | +} | ||
| 143 | \ No newline at end of file | 157 | \ No newline at end of file |
src/main/java/com/bsth/repository/SectionRouteRepository.java
| @@ -202,4 +202,7 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | @@ -202,4 +202,7 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | ||
| 202 | @Modifying | 202 | @Modifying |
| 203 | @Query(value="delete from SectionRoute sr where sr.line.id = ?1 and sr.lineCode = ?2") | 203 | @Query(value="delete from SectionRoute sr where sr.line.id = ?1 and sr.lineCode = ?2") |
| 204 | public void batchDelete(Integer lineId, String lineCode); | 204 | public void batchDelete(Integer lineId, String lineCode); |
| 205 | + | ||
| 206 | + @Query("select r from SectionRoute r where r.line.id=?1 and r.directions=?2 and r.destroy=0 order by r.sectionrouteCode") | ||
| 207 | + public List<SectionRoute> findByLine(Integer lineId, Integer dir); | ||
| 205 | } | 208 | } |
src/main/java/com/bsth/repository/StationRouteCacheRepository.java
| 1 | package com.bsth.repository; | 1 | package com.bsth.repository; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | -import java.util.Map; | ||
| 5 | 4 | ||
| 6 | -import org.springframework.data.domain.Sort; | ||
| 7 | -import org.springframework.data.jpa.domain.Specification; | ||
| 8 | import org.springframework.data.jpa.repository.EntityGraph; | 5 | import org.springframework.data.jpa.repository.EntityGraph; |
| 9 | import org.springframework.data.jpa.repository.Modifying; | 6 | import org.springframework.data.jpa.repository.Modifying; |
| 10 | import org.springframework.data.jpa.repository.Query; | 7 | import org.springframework.data.jpa.repository.Query; |
| 11 | import org.springframework.stereotype.Repository; | 8 | import org.springframework.stereotype.Repository; |
| 12 | 9 | ||
| 13 | -import com.bsth.entity.StationRoute; | ||
| 14 | import com.bsth.entity.StationRouteCache; | 10 | import com.bsth.entity.StationRouteCache; |
| 15 | -import com.bsth.entity.search.CustomerSpecs; | ||
| 16 | 11 | ||
| 17 | /** | 12 | /** |
| 18 | * | 13 | * |
| @@ -57,12 +52,16 @@ public interface StationRouteCacheRepository extends BaseRepository<StationRoute | @@ -57,12 +52,16 @@ public interface StationRouteCacheRepository extends BaseRepository<StationRoute | ||
| 57 | /** | 52 | /** |
| 58 | * 更新路线删除线路缓存站点 | 53 | * 更新路线删除线路缓存站点 |
| 59 | * | 54 | * |
| 60 | - * @param line | 55 | + * @param lineCode |
| 61 | * @param dir | 56 | * @param dir |
| 62 | */ | 57 | */ |
| 63 | @Modifying | 58 | @Modifying |
| 64 | @Query(value="delete from bsth_c_stationroute_cache where line_code = ?1 and directions = ?2 ", nativeQuery=true) | 59 | @Query(value="delete from bsth_c_stationroute_cache where line_code = ?1 and directions = ?2 ", nativeQuery=true) |
| 65 | public void stationRouteCacheDel(String lineCode,Integer dir); | 60 | public void stationRouteCacheDel(String lineCode,Integer dir); |
| 61 | + | ||
| 62 | + @Modifying | ||
| 63 | + @Query(value="delete from bsth_c_stationroute_cache where line = ?1 and directions = ?2 ", nativeQuery=true) | ||
| 64 | + public void stationRouteCacheDel(Integer lineId,Integer dir); | ||
| 66 | 65 | ||
| 67 | 66 | ||
| 68 | @Query(value = "SELECT a.`stationRoute.id`," + | 67 | @Query(value = "SELECT a.`stationRoute.id`," + |
| @@ -137,4 +136,7 @@ public interface StationRouteCacheRepository extends BaseRepository<StationRoute | @@ -137,4 +136,7 @@ public interface StationRouteCacheRepository extends BaseRepository<StationRoute | ||
| 137 | "r.line=?1 and r.directions =?2 and station_route_code< ?3 and r.destroy = 0 ) and t.line=?1 and t.directions = ?2 AND t.destroy = 0", nativeQuery=true) | 136 | "r.line=?1 and r.directions =?2 and station_route_code< ?3 and r.destroy = 0 ) and t.line=?1 and t.directions = ?2 AND t.destroy = 0", nativeQuery=true) |
| 138 | List<Object[]> findUpStationRouteCode(Integer lineId,Integer direction,Integer stationRouteCode); | 137 | List<Object[]> findUpStationRouteCode(Integer lineId,Integer direction,Integer stationRouteCode); |
| 139 | 138 | ||
| 139 | + @Modifying | ||
| 140 | + @Query(value="UPDATE bsth_c_stationroute_cache set station_route_code = (station_route_code+10) where line = ?1 and directions = ?2 and station_route_code >=?3 and destroy = 0", nativeQuery=true) | ||
| 141 | + public void stationUpdStationRouteCode(Integer line,Integer dir,Integer routeCod); | ||
| 140 | } | 142 | } |
src/main/java/com/bsth/repository/StationRouteRepository.java
| @@ -188,7 +188,7 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | @@ -188,7 +188,7 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | ||
| 188 | " a.stationRouteUpdateDate," + | 188 | " a.stationRouteUpdateDate," + |
| 189 | " b.id AS stationId," + | 189 | " b.id AS stationId," + |
| 190 | " b.station_cod AS stationCode," + | 190 | " b.station_cod AS stationCode," + |
| 191 | - " b.station_name AS stationName," + | 191 | + " a.stationRouteName," + |
| 192 | " b.road_coding AS stationRoadCoding," + | 192 | " b.road_coding AS stationRoadCoding," + |
| 193 | " b.db_type AS stationDbType," + | 193 | " b.db_type AS stationDbType," + |
| 194 | " b.b_jwpoints AS stationJwpoints," + | 194 | " b.b_jwpoints AS stationJwpoints," + |
| @@ -211,6 +211,7 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | @@ -211,6 +211,7 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | ||
| 211 | " FROM ( SELECT s.id AS stationRouteId," + | 211 | " FROM ( SELECT s.id AS stationRouteId," + |
| 212 | " s.line AS stationRouteLine," + | 212 | " s.line AS stationRouteLine," + |
| 213 | " s.station as stationRouteStation," + | 213 | " s.station as stationRouteStation," + |
| 214 | + " s.station_name AS stationRouteName," + | ||
| 214 | " s.station_route_code as stationRouteCode," + | 215 | " s.station_route_code as stationRouteCode," + |
| 215 | " s.line_code AS stationRouteLIneCode," + | 216 | " s.line_code AS stationRouteLIneCode," + |
| 216 | " s.station_mark AS stationRouteStationMark," + | 217 | " s.station_mark AS stationRouteStationMark," + |
| @@ -258,6 +259,9 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | @@ -258,6 +259,9 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | ||
| 258 | @Query("select r from StationRoute r where r.lineCode=?1 and r.directions=?2 and r.destroy=0 order by r.stationRouteCode") | 259 | @Query("select r from StationRoute r where r.lineCode=?1 and r.directions=?2 and r.destroy=0 order by r.stationRouteCode") |
| 259 | List<StationRoute> findByLine(String lineCode, int updown); | 260 | List<StationRoute> findByLine(String lineCode, int updown); |
| 260 | 261 | ||
| 262 | + @Query("select r from StationRoute r where r.line.id=?1 and r.directions=?2 and r.destroy=0 order by r.stationRouteCode") | ||
| 263 | + List<StationRoute> findByLine(Integer lineId, Integer dir); | ||
| 264 | + | ||
| 261 | @EntityGraph(value = "stationRoute_station", type = EntityGraph.EntityGraphType.FETCH) | 265 | @EntityGraph(value = "stationRoute_station", type = EntityGraph.EntityGraphType.FETCH) |
| 262 | @Query("select s from StationRoute s where s.destroy=0 and s.lineCode=?1") | 266 | @Query("select s from StationRoute s where s.destroy=0 and s.lineCode=?1") |
| 263 | List<StationRoute> findByLineCode(String lineCode); | 267 | List<StationRoute> findByLineCode(String lineCode); |
src/main/java/com/bsth/service/LineVersionsService.java
| @@ -39,4 +39,6 @@ public interface LineVersionsService extends BaseService<LineVersions, Integer> | @@ -39,4 +39,6 @@ public interface LineVersionsService extends BaseService<LineVersions, Integer> | ||
| 39 | 39 | ||
| 40 | Map<String, Object> add(Map<String, Object> map); | 40 | Map<String, Object> add(Map<String, Object> map); |
| 41 | 41 | ||
| 42 | + Map<String, Object> issueVersion(int id); | ||
| 43 | + | ||
| 42 | } | 44 | } |
src/main/java/com/bsth/service/SectionRouteService.java
| @@ -61,8 +61,11 @@ public interface SectionRouteService extends BaseService<SectionRoute, Integer> | @@ -61,8 +61,11 @@ public interface SectionRouteService extends BaseService<SectionRoute, Integer> | ||
| 61 | */ | 61 | */ |
| 62 | List<Map<String, Object>> findUpSectionRouteCode(Map<String, Object> map); | 62 | List<Map<String, Object>> findUpSectionRouteCode(Map<String, Object> map); |
| 63 | 63 | ||
| 64 | + List<Map<String, Object>> findCacheUpSectionRouteCode(Map<String, Object> map); | ||
| 65 | + | ||
| 64 | Map<String, Object> quoteSection(Map<String, Object> map); | 66 | Map<String, Object> quoteSection(Map<String, Object> map); |
| 65 | 67 | ||
| 66 | void batchUpdate(Integer lineId, String lineCode); | 68 | void batchUpdate(Integer lineId, String lineCode); |
| 69 | + | ||
| 67 | 70 | ||
| 68 | } | 71 | } |
src/main/java/com/bsth/service/StationService.java
| @@ -52,6 +52,8 @@ public interface StationService extends BaseService<Station, Integer> { | @@ -52,6 +52,8 @@ public interface StationService extends BaseService<Station, Integer> { | ||
| 52 | */ | 52 | */ |
| 53 | Map<String, Object> stationSaveMap(Map<String, Object> map); | 53 | Map<String, Object> stationSaveMap(Map<String, Object> map); |
| 54 | 54 | ||
| 55 | + Map<String, Object> stationCacheSave(Map<String, Object> map); | ||
| 56 | + | ||
| 55 | /** | 57 | /** |
| 56 | * @Description :TODO(更新站点保存) | 58 | * @Description :TODO(更新站点保存) |
| 57 | * | 59 | * |
| @@ -83,5 +85,8 @@ public interface StationService extends BaseService<Station, Integer> { | @@ -83,5 +85,8 @@ public interface StationService extends BaseService<Station, Integer> { | ||
| 83 | Map<String, Object> cacheSave(Map<String, Object> map); | 85 | Map<String, Object> cacheSave(Map<String, Object> map); |
| 84 | 86 | ||
| 85 | Map<String, Object> stationCacheUpdate(Map<String, Object> map); | 87 | Map<String, Object> stationCacheUpdate(Map<String, Object> map); |
| 88 | + | ||
| 89 | + Map<String, Object> referenceCurrentVersion(Map<String, Object> map); | ||
| 90 | + | ||
| 86 | 91 | ||
| 87 | } | 92 | } |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| @@ -473,7 +473,8 @@ public class FormsServiceImpl implements FormsService { | @@ -473,7 +473,8 @@ public class FormsServiceImpl implements FormsService { | ||
| 473 | Shifday d=list.get(i); | 473 | Shifday d=list.get(i); |
| 474 | for (int j = 0; j < lists.size(); j++) { | 474 | for (int j = 0; j < lists.size(); j++) { |
| 475 | ScheduleRealInfo s=lists.get(j); | 475 | ScheduleRealInfo s=lists.get(j); |
| 476 | - if(d.getJgh().equals(s.getjGh()) && d.getCarPlate().equals(s.getClZbh())){ | 476 | + if(d.getJgh().equals(s.getjGh()) && d.getCarPlate().equals(s.getClZbh()) |
| 477 | + &&d.getLpName().equals(s.getLpName())){ | ||
| 477 | sList.add(s); | 478 | sList.add(s); |
| 478 | Set<ChildTaskPlan> cts = s.getcTasks(); | 479 | Set<ChildTaskPlan> cts = s.getcTasks(); |
| 479 | if(cts != null && cts.size() > 0){ | 480 | if(cts != null && cts.size() > 0){ |
| @@ -492,7 +493,10 @@ public class FormsServiceImpl implements FormsService { | @@ -492,7 +493,10 @@ public class FormsServiceImpl implements FormsService { | ||
| 492 | double ljgl=culateMileageService.culateLjgl(list_s); | 493 | double ljgl=culateMileageService.culateLjgl(list_s); |
| 493 | double sjgl=culateMileageService.culateSjgl(list_s); | 494 | double sjgl=culateMileageService.culateSjgl(list_s); |
| 494 | double zyygl=Arith.add(ljgl, sjgl); | 495 | double zyygl=Arith.add(ljgl, sjgl); |
| 495 | - double jhgl=culateMileageService.culateJhgl(sList); | 496 | + double jhyygl=culateMileageService.culateJhgl(sList); |
| 497 | + double jhjccgl=culateMileageService.culateJhJccgl(sList); | ||
| 498 | + double jhzgl=Arith.add(jhyygl, jhjccgl); | ||
| 499 | + | ||
| 496 | double cjgl=culateMileageService.culateLbgl(sList); | 500 | double cjgl=culateMileageService.culateLbgl(sList); |
| 497 | int jhbc=culateMileageService.culateJhbc(sList,""); | 501 | int jhbc=culateMileageService.culateJhbc(sList,""); |
| 498 | int cjbc=culateMileageService.culateLbbc(sList); | 502 | int cjbc=culateMileageService.culateLbbc(sList); |
| @@ -502,9 +506,9 @@ public class FormsServiceImpl implements FormsService { | @@ -502,9 +506,9 @@ public class FormsServiceImpl implements FormsService { | ||
| 502 | d.setEmptMileage(String.valueOf(zksgl));//空驶公里 | 506 | d.setEmptMileage(String.valueOf(zksgl));//空驶公里 |
| 503 | d.setTotalm(String.valueOf(Arith.add(zksgl, zyygl)));//总公里 | 507 | d.setTotalm(String.valueOf(Arith.add(zksgl, zyygl)));//总公里 |
| 504 | d.setSjbc(String.valueOf(sjbc+ljbc)); | 508 | d.setSjbc(String.valueOf(sjbc+ljbc)); |
| 505 | - d.setJhlc(String.valueOf(jhgl));//计划里程 | 509 | + d.setJhlc(String.valueOf(jhzgl));//计划里程 |
| 506 | d.setYygl(String.valueOf(zyygl));//运营公里 | 510 | d.setYygl(String.valueOf(zyygl));//运营公里 |
| 507 | - d.setSjjhlc(String.valueOf(sjgl));//实际计划里程 | 511 | + d.setSjjhlc(String.valueOf(jhyygl));//实际计划里程 |
| 508 | d.setRemMileage(String.valueOf(cjgl));//抽减里程 | 512 | d.setRemMileage(String.valueOf(cjgl));//抽减里程 |
| 509 | d.setJhbc(String.valueOf(jhbc));//计划班次 | 513 | d.setJhbc(String.valueOf(jhbc));//计划班次 |
| 510 | d.setCjbc(String.valueOf(cjbc));//抽检班次 | 514 | d.setCjbc(String.valueOf(cjbc));//抽检班次 |
src/main/java/com/bsth/service/geo_data/GeoDataService.java
| @@ -15,7 +15,7 @@ public interface GeoDataService { | @@ -15,7 +15,7 @@ public interface GeoDataService { | ||
| 15 | 15 | ||
| 16 | Map<String, Object> findGeoRoad(String lineCode); | 16 | Map<String, Object> findGeoRoad(String lineCode); |
| 17 | 17 | ||
| 18 | - Map<String,Object> updateBufferInfo(GeoStation station); | 18 | + Map<String, Object> updateBufferInfo(GeoStation station); |
| 19 | 19 | ||
| 20 | - Map<String,Object> updateStationName(Map<String, Object> map); | 20 | + Map<String, Object> updateStationName(Map<String, Object> map); |
| 21 | } | 21 | } |
src/main/java/com/bsth/service/geo_data/impl/GeoDataServiceImpl.java
| @@ -37,19 +37,19 @@ public class GeoDataServiceImpl implements GeoDataService { | @@ -37,19 +37,19 @@ public class GeoDataServiceImpl implements GeoDataService { | ||
| 37 | public Map<String, Object> findGeoStations(String lineCode) { | 37 | public Map<String, Object> findGeoStations(String lineCode) { |
| 38 | 38 | ||
| 39 | Map<String, Object> map = new HashMap(); | 39 | Map<String, Object> map = new HashMap(); |
| 40 | - try{ | ||
| 41 | - String sql = "select t1.*,t2.g_lonx,g_laty,ST_AsText(g_polygon_grid) as g_polygon_grid,radius,shapes_type from (select id,station_name,station_route_code,line_code,station_code,station_mark,versions,directions from bsth_c_ls_stationroute where line="+lineCode+" and destroy=0 and versions in (select DISTINCT versions from bsth_c_stationroute where line="+lineCode+" and destroy=0)) t1 LEFT JOIN bsth_c_station t2 on t1.station_code=t2.station_cod"; | 40 | + try { |
| 41 | + String sql = "select t1.*,t2.g_lonx,g_laty,ST_AsText(g_polygon_grid) as g_polygon_grid,radius,shapes_type from (select id,station_name,station_route_code,line_code,station_code,station_mark,versions,directions from bsth_c_ls_stationroute where line=" + lineCode + " and destroy=0 and versions in (select DISTINCT versions from bsth_c_stationroute where line=" + lineCode + " and destroy=0)) t1 LEFT JOIN bsth_c_station t2 on t1.station_code=t2.station_cod"; | ||
| 42 | 42 | ||
| 43 | 43 | ||
| 44 | List<GeoStation> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoStation.class)); | 44 | List<GeoStation> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoStation.class)); |
| 45 | 45 | ||
| 46 | - for(GeoStation station : list){ | ||
| 47 | - if(station.getShapesType().equals("d")) | 46 | + for (GeoStation station : list) { |
| 47 | + if (station.getShapesType().equals("d")) | ||
| 48 | station.setBdCoords(multiWgsToBd(station.getgPolygonGrid(), 9, 3)); | 48 | station.setBdCoords(multiWgsToBd(station.getgPolygonGrid(), 9, 3)); |
| 49 | } | 49 | } |
| 50 | map.put("status", ResponseCode.SUCCESS); | 50 | map.put("status", ResponseCode.SUCCESS); |
| 51 | map.put("list", list); | 51 | map.put("list", list); |
| 52 | - }catch (Exception e){ | 52 | + } catch (Exception e) { |
| 53 | logger.error("", e); | 53 | logger.error("", e); |
| 54 | map.put("status", ResponseCode.ERROR); | 54 | map.put("status", ResponseCode.ERROR); |
| 55 | map.put("msg", "服务器出现异常"); | 55 | map.put("msg", "服务器出现异常"); |
| @@ -60,18 +60,18 @@ public class GeoDataServiceImpl implements GeoDataService { | @@ -60,18 +60,18 @@ public class GeoDataServiceImpl implements GeoDataService { | ||
| 60 | @Override | 60 | @Override |
| 61 | public Map<String, Object> findGeoRoad(String lineCode) { | 61 | public Map<String, Object> findGeoRoad(String lineCode) { |
| 62 | Map<String, Object> map = new HashMap(); | 62 | Map<String, Object> map = new HashMap(); |
| 63 | - try{ | ||
| 64 | - String sql = "select t1.*,t2.section_name,t2.croses_road,ST_AsText(t2.gsection_vector) as gsection_vector from (select id,sectionroute_code,directions,line_code,section_code,versions from bsth_c_ls_sectionroute where line="+lineCode+" and destroy=0 and versions in (select DISTINCT versions from bsth_c_sectionroute where line="+lineCode+" and destroy=0)) t1 LEFT JOIN bsth_c_section t2 on t1.section_code=t2.section_code"; | 63 | + try { |
| 64 | + String sql = "select t1.*,t2.section_name,t2.croses_road,ST_AsText(t2.gsection_vector) as gsection_vector from (select id,sectionroute_code,directions,line_code,section_code,versions from bsth_c_ls_sectionroute where line=" + lineCode + " and destroy=0 and versions in (select DISTINCT versions from bsth_c_sectionroute where line=" + lineCode + " and destroy=0)) t1 LEFT JOIN bsth_c_section t2 on t1.section_code=t2.section_code"; | ||
| 65 | 65 | ||
| 66 | 66 | ||
| 67 | List<GeoRoad> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoRoad.class)); | 67 | List<GeoRoad> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoRoad.class)); |
| 68 | 68 | ||
| 69 | - for(GeoRoad road : list){ | 69 | + for (GeoRoad road : list) { |
| 70 | road.setBdCoords(multiWgsToBd(road.getGsectionVector(), 11, 2)); | 70 | road.setBdCoords(multiWgsToBd(road.getGsectionVector(), 11, 2)); |
| 71 | } | 71 | } |
| 72 | map.put("status", ResponseCode.SUCCESS); | 72 | map.put("status", ResponseCode.SUCCESS); |
| 73 | map.put("list", list); | 73 | map.put("list", list); |
| 74 | - }catch (Exception e){ | 74 | + } catch (Exception e) { |
| 75 | logger.error("", e); | 75 | logger.error("", e); |
| 76 | map.put("status", ResponseCode.ERROR); | 76 | map.put("status", ResponseCode.ERROR); |
| 77 | map.put("msg", "服务器出现异常"); | 77 | map.put("msg", "服务器出现异常"); |
| @@ -81,13 +81,14 @@ public class GeoDataServiceImpl implements GeoDataService { | @@ -81,13 +81,14 @@ public class GeoDataServiceImpl implements GeoDataService { | ||
| 81 | 81 | ||
| 82 | /** | 82 | /** |
| 83 | * 编辑缓冲区信息 | 83 | * 编辑缓冲区信息 |
| 84 | + * | ||
| 84 | * @param station | 85 | * @param station |
| 85 | * @return | 86 | * @return |
| 86 | */ | 87 | */ |
| 87 | @Override | 88 | @Override |
| 88 | public Map<String, Object> updateBufferInfo(GeoStation station) { | 89 | public Map<String, Object> updateBufferInfo(GeoStation station) { |
| 89 | Map<String, Object> rs = new HashMap<>(); | 90 | Map<String, Object> rs = new HashMap<>(); |
| 90 | - try{ | 91 | + try { |
| 91 | //坐标转换 | 92 | //坐标转换 |
| 92 | TransGPS.Location loc = TransGPS.LocationMake(station.getgLonx(), station.getgLaty()); | 93 | TransGPS.Location loc = TransGPS.LocationMake(station.getgLonx(), station.getgLaty()); |
| 93 | loc = TransGPS.bd_decrypt(loc); | 94 | loc = TransGPS.bd_decrypt(loc); |
| @@ -98,26 +99,25 @@ public class GeoDataServiceImpl implements GeoDataService { | @@ -98,26 +99,25 @@ public class GeoDataServiceImpl implements GeoDataService { | ||
| 98 | String sql; | 99 | String sql; |
| 99 | String shapesType = station.getShapesType(); | 100 | String shapesType = station.getShapesType(); |
| 100 | int rsCount = -1; | 101 | int rsCount = -1; |
| 101 | - if(shapesType.equals("r")){ | 102 | + if (shapesType.equals("r")) { |
| 102 | sql = "update bsth_c_station set g_lonx=?, g_laty=?, radius=?,shapes_type='r' where station_cod=?"; | 103 | sql = "update bsth_c_station set g_lonx=?, g_laty=?, radius=?,shapes_type='r' where station_cod=?"; |
| 103 | rsCount = jdbcTemplate.update(sql, station.getgLonx(), station.getgLaty(), station.getRadius(), station.getStationCode()); | 104 | rsCount = jdbcTemplate.update(sql, station.getgLonx(), station.getgLaty(), station.getRadius(), station.getStationCode()); |
| 104 | - } | ||
| 105 | - else if(shapesType.equals("d")){ | 105 | + } else if (shapesType.equals("d")) { |
| 106 | //多边形坐标转换 | 106 | //多边形坐标转换 |
| 107 | - String bdPolygon = "POLYGON((" + station.getgPolygonGrid() +"))"; | ||
| 108 | - String wgsPolygon = "POLYGON((" + bdPolygon2Wgs(station.getgPolygonGrid()) +"))"; | ||
| 109 | - sql = "update bsth_c_station set g_lonx=?, g_laty=?,shapes_type='d', radius=null,b_polygon_grid=ST_GeomFromText('"+bdPolygon+"'),g_polygon_grid=ST_GeomFromText('"+wgsPolygon+"') where station_cod=?"; | 107 | + String bdPolygon = "POLYGON((" + station.getgPolygonGrid() + "))"; |
| 108 | + String wgsPolygon = "POLYGON((" + bdPolygon2Wgs(station.getgPolygonGrid()) + "))"; | ||
| 109 | + sql = "update bsth_c_station set g_lonx=?, g_laty=?,shapes_type='d', radius=null,b_polygon_grid=ST_GeomFromText('" + bdPolygon + "'),g_polygon_grid=ST_GeomFromText('" + wgsPolygon + "') where station_cod=?"; | ||
| 110 | 110 | ||
| 111 | rsCount = jdbcTemplate.update(sql, station.getgLonx(), station.getgLaty(), station.getStationCode()); | 111 | rsCount = jdbcTemplate.update(sql, station.getgLonx(), station.getgLaty(), station.getStationCode()); |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | //从数据库里重新查询对象 | 114 | //从数据库里重新查询对象 |
| 115 | - if(rsCount > 0){ | 115 | + if (rsCount > 0) { |
| 116 | rs.put("station", findOne(station.getId())); | 116 | rs.put("station", findOne(station.getId())); |
| 117 | rs.put("status", ResponseCode.SUCCESS); | 117 | rs.put("status", ResponseCode.SUCCESS); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | - }catch (Exception e){ | 120 | + } catch (Exception e) { |
| 121 | logger.error("", e); | 121 | logger.error("", e); |
| 122 | rs.put("status", ResponseCode.ERROR); | 122 | rs.put("status", ResponseCode.ERROR); |
| 123 | rs.put("msg", "服务器出现异常"); | 123 | rs.put("msg", "服务器出现异常"); |
| @@ -127,6 +127,7 @@ public class GeoDataServiceImpl implements GeoDataService { | @@ -127,6 +127,7 @@ public class GeoDataServiceImpl implements GeoDataService { | ||
| 127 | 127 | ||
| 128 | /** | 128 | /** |
| 129 | * 修改站点路由和站点名称 | 129 | * 修改站点路由和站点名称 |
| 130 | + * | ||
| 130 | * @param map | 131 | * @param map |
| 131 | * @return | 132 | * @return |
| 132 | */ | 133 | */ |
| @@ -139,7 +140,7 @@ public class GeoDataServiceImpl implements GeoDataService { | @@ -139,7 +140,7 @@ public class GeoDataServiceImpl implements GeoDataService { | ||
| 139 | DefaultTransactionDefinition def = new DefaultTransactionDefinition(); | 140 | DefaultTransactionDefinition def = new DefaultTransactionDefinition(); |
| 140 | def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED); | 141 | def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED); |
| 141 | TransactionStatus status = tran.getTransaction(def); | 142 | TransactionStatus status = tran.getTransaction(def); |
| 142 | - try{ | 143 | + try { |
| 143 | 144 | ||
| 144 | int id = Integer.parseInt(map.get("id").toString()); | 145 | int id = Integer.parseInt(map.get("id").toString()); |
| 145 | String name = map.get("stationName").toString(); | 146 | String name = map.get("stationName").toString(); |
| @@ -156,7 +157,7 @@ public class GeoDataServiceImpl implements GeoDataService { | @@ -156,7 +157,7 @@ public class GeoDataServiceImpl implements GeoDataService { | ||
| 156 | 157 | ||
| 157 | rs.put("station", findOne(id)); | 158 | rs.put("station", findOne(id)); |
| 158 | rs.put("status", ResponseCode.SUCCESS); | 159 | rs.put("status", ResponseCode.SUCCESS); |
| 159 | - }catch (Exception e){ | 160 | + } catch (Exception e) { |
| 160 | tran.rollback(status); | 161 | tran.rollback(status); |
| 161 | logger.error("", e); | 162 | logger.error("", e); |
| 162 | rs.put("status", ResponseCode.ERROR); | 163 | rs.put("status", ResponseCode.ERROR); |
| @@ -168,34 +169,35 @@ public class GeoDataServiceImpl implements GeoDataService { | @@ -168,34 +169,35 @@ public class GeoDataServiceImpl implements GeoDataService { | ||
| 168 | 169 | ||
| 169 | /** | 170 | /** |
| 170 | * 根据路由ID 获取站点 | 171 | * 根据路由ID 获取站点 |
| 172 | + * | ||
| 171 | * @param id | 173 | * @param id |
| 172 | * @return | 174 | * @return |
| 173 | */ | 175 | */ |
| 174 | - private GeoStation findOne(int id){ | ||
| 175 | - String sql = "SELECT t1.*, t2.g_lonx,g_laty,ST_AsText (g_polygon_grid) AS g_polygon_grid,radius,shapes_type FROM (SELECT id,station_name,station_route_code,line_code,station_code,station_mark,versions,directions FROM bsth_c_ls_stationroute WHERE id="+id+" AND destroy = 0) t1 LEFT JOIN bsth_c_station t2 ON t1.station_code = t2.station_cod"; | 176 | + private GeoStation findOne(int id) { |
| 177 | + String sql = "SELECT t1.*, t2.g_lonx,g_laty,ST_AsText (g_polygon_grid) AS g_polygon_grid,radius,shapes_type FROM (SELECT id,station_name,station_route_code,line_code,station_code,station_mark,versions,directions FROM bsth_c_ls_stationroute WHERE id=" + id + " AND destroy = 0) t1 LEFT JOIN bsth_c_station t2 ON t1.station_code = t2.station_cod"; | ||
| 176 | List<GeoStation> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoStation.class)); | 178 | List<GeoStation> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoStation.class)); |
| 177 | 179 | ||
| 178 | GeoStation s = list.get(0); | 180 | GeoStation s = list.get(0); |
| 179 | - if(s.getShapesType().equals("d")) | 181 | + if (s.getShapesType().equals("d")) |
| 180 | s.setBdCoords(multiWgsToBd(s.getgPolygonGrid(), 9, 3)); | 182 | s.setBdCoords(multiWgsToBd(s.getgPolygonGrid(), 9, 3)); |
| 181 | 183 | ||
| 182 | return s; | 184 | return s; |
| 183 | } | 185 | } |
| 184 | 186 | ||
| 185 | - private String bdPolygon2Wgs(String bdPolygon){ | 187 | + private String bdPolygon2Wgs(String bdPolygon) { |
| 186 | StringBuilder wgsPolygon = new StringBuilder(); | 188 | StringBuilder wgsPolygon = new StringBuilder(); |
| 187 | List<String> list = Splitter.on(",").splitToList(bdPolygon); | 189 | List<String> list = Splitter.on(",").splitToList(bdPolygon); |
| 188 | String[] array; | 190 | String[] array; |
| 189 | 191 | ||
| 190 | TransGPS.Location location; | 192 | TransGPS.Location location; |
| 191 | - for(String p : list){ | 193 | + for (String p : list) { |
| 192 | array = p.split(" "); | 194 | array = p.split(" "); |
| 193 | - location =TransGPS.transformFromGCJToWGS(TransGPS.bd_decrypt(TransGPS.LocationMake(Double.parseDouble(array[0]), Double.parseDouble(array[1])))); | 195 | + location = TransGPS.transformFromGCJToWGS(TransGPS.bd_decrypt(TransGPS.LocationMake(Double.parseDouble(array[0]), Double.parseDouble(array[1])))); |
| 194 | 196 | ||
| 195 | wgsPolygon.append(location.getLng() + " " + location.getLat() + ","); | 197 | wgsPolygon.append(location.getLng() + " " + location.getLat() + ","); |
| 196 | } | 198 | } |
| 197 | 199 | ||
| 198 | - if(wgsPolygon.length() > 0){ | 200 | + if (wgsPolygon.length() > 0) { |
| 199 | wgsPolygon.deleteCharAt(wgsPolygon.length() - 1); | 201 | wgsPolygon.deleteCharAt(wgsPolygon.length() - 1); |
| 200 | } | 202 | } |
| 201 | return wgsPolygon.toString(); | 203 | return wgsPolygon.toString(); |
| @@ -212,7 +214,7 @@ public class GeoDataServiceImpl implements GeoDataService { | @@ -212,7 +214,7 @@ public class GeoDataServiceImpl implements GeoDataService { | ||
| 212 | List<String> gList = Splitter.on(",").splitToList(crdStr.substring(si, crdStr.length() - ei)); | 214 | List<String> gList = Splitter.on(",").splitToList(crdStr.substring(si, crdStr.length() - ei)); |
| 213 | TransGPS.Location location; | 215 | TransGPS.Location location; |
| 214 | String[] cds; | 216 | String[] cds; |
| 215 | - for(String gs : gList){ | 217 | + for (String gs : gList) { |
| 216 | cds = gs.split(" "); | 218 | cds = gs.split(" "); |
| 217 | location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(TransGPS.LocationMake(Double.parseDouble(cds[0]), Double.parseDouble(cds[1])))); | 219 | location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(TransGPS.LocationMake(Double.parseDouble(cds[0]), Double.parseDouble(cds[1])))); |
| 218 | 220 | ||
| @@ -220,4 +222,5 @@ public class GeoDataServiceImpl implements GeoDataService { | @@ -220,4 +222,5 @@ public class GeoDataServiceImpl implements GeoDataService { | ||
| 220 | } | 222 | } |
| 221 | return bdList; | 223 | return bdList; |
| 222 | } | 224 | } |
| 223 | -} | 225 | + |
| 226 | +} | ||
| 224 | \ No newline at end of file | 227 | \ No newline at end of file |
src/main/java/com/bsth/service/impl/LineVersionsServiceImpl.java
| @@ -258,5 +258,16 @@ public class LineVersionsServiceImpl extends BaseServiceImpl<LineVersions, Integ | @@ -258,5 +258,16 @@ public class LineVersionsServiceImpl extends BaseServiceImpl<LineVersions, Integ | ||
| 258 | public Integer findCurrentVersion(int lineId) { | 258 | public Integer findCurrentVersion(int lineId) { |
| 259 | return repository.findCurrentVersion(lineId); | 259 | return repository.findCurrentVersion(lineId); |
| 260 | } | 260 | } |
| 261 | - | 261 | + |
| 262 | + @Override | ||
| 263 | + public Map<String, Object> issueVersion(int id) { | ||
| 264 | + Map<String, Object> resultMap = new HashMap<>(); | ||
| 265 | + | ||
| 266 | + int statu = repository.issueVersion(id); | ||
| 267 | + if (statu == 1) | ||
| 268 | + resultMap.put("status", ResponseCode.SUCCESS); | ||
| 269 | + else | ||
| 270 | + resultMap.put("status", ResponseCode.ERROR); | ||
| 271 | + return resultMap; | ||
| 272 | + } | ||
| 262 | } | 273 | } |
src/main/java/com/bsth/service/impl/SectionRouteServiceImpl.java
| @@ -131,8 +131,8 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | @@ -131,8 +131,8 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | ||
| 131 | @Transactional | 131 | @Transactional |
| 132 | @Override | 132 | @Override |
| 133 | public List<Map<String, Object>> getSectionRouteCache(Map<String, Object> map) { | 133 | public List<Map<String, Object>> getSectionRouteCache(Map<String, Object> map) { |
| 134 | - int lineId = map.get("line.id_eq").equals("") ? 0 : Integer.parseInt(map.get("line.id_eq").toString()); | ||
| 135 | - int directions = map.get("directions_eq").equals("") ? 0 : Integer.parseInt(map.get("directions_eq").toString()); | 134 | + int lineId = map.get("lineId").equals("") ? 0 : Integer.parseInt(map.get("lineId").toString()); |
| 135 | + int directions = map.get("dir").equals("") ? 0 : Integer.parseInt(map.get("dir").toString()); | ||
| 136 | List<Object[]> listObjArray = Cacherepository.getSectionRouteCache(lineId, directions); | 136 | List<Object[]> listObjArray = Cacherepository.getSectionRouteCache(lineId, directions); |
| 137 | List<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>(); | 137 | List<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>(); |
| 138 | if(listObjArray.size()>0) { | 138 | if(listObjArray.size()>0) { |
| @@ -297,6 +297,23 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | @@ -297,6 +297,23 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | ||
| 297 | } | 297 | } |
| 298 | return list; | 298 | return list; |
| 299 | } | 299 | } |
| 300 | + | ||
| 301 | + @Override | ||
| 302 | + public List<Map<String, Object>> findCacheUpSectionRouteCode(Map<String, Object> map) { | ||
| 303 | + Integer lineId = map.get("lineId").equals("") ? null : Integer.parseInt(map.get("lineId").toString()); | ||
| 304 | + Integer direction = map.get("direction").equals("") ? null : Integer.parseInt(map.get("direction").toString()); | ||
| 305 | + Integer stationRouteCode = map.get("sectionRouteCode").equals("") ? null : Integer.parseInt(map.get("sectionRouteCode").toString()); | ||
| 306 | + List<Object[]> reslutList = Cacherepository.findCacheUpSectionRouteCode(lineId, direction, stationRouteCode); | ||
| 307 | + List<Map<String, Object>> list = new ArrayList<Map<String,Object>>(); | ||
| 308 | + if(reslutList.get(0)!=null) { | ||
| 309 | + for(int i = 0 ; i <reslutList.size() ;i++){ | ||
| 310 | + Map<String, Object> tempM = new HashMap<String, Object>(); | ||
| 311 | + tempM.put("sectionrouteCode", reslutList.get(i)); | ||
| 312 | + list.add(tempM); | ||
| 313 | + } | ||
| 314 | + } | ||
| 315 | + return list; | ||
| 316 | + } | ||
| 300 | 317 | ||
| 301 | @Override | 318 | @Override |
| 302 | public Map<String, Object> quoteSection(Map<String, Object> map) { | 319 | public Map<String, Object> quoteSection(Map<String, Object> map) { |
src/main/java/com/bsth/service/impl/SectionServiceImpl.java
| @@ -7,9 +7,7 @@ import java.util.HashMap; | @@ -7,9 +7,7 @@ import java.util.HashMap; | ||
| 7 | import java.util.List; | 7 | import java.util.List; |
| 8 | import java.util.Map; | 8 | import java.util.Map; |
| 9 | 9 | ||
| 10 | -import org.mozilla.javascript.ObjArray; | ||
| 11 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 12 | -import org.springframework.data.jpa.domain.Specification; | ||
| 13 | import org.springframework.stereotype.Service; | 11 | import org.springframework.stereotype.Service; |
| 14 | import org.springframework.transaction.annotation.Transactional; | 12 | import org.springframework.transaction.annotation.Transactional; |
| 15 | 13 | ||
| @@ -17,7 +15,6 @@ import com.alibaba.fastjson.JSONArray; | @@ -17,7 +15,6 @@ import com.alibaba.fastjson.JSONArray; | ||
| 17 | import com.alibaba.fastjson.JSONObject; | 15 | import com.alibaba.fastjson.JSONObject; |
| 18 | import com.bsth.common.ResponseCode; | 16 | import com.bsth.common.ResponseCode; |
| 19 | import com.bsth.entity.Line; | 17 | import com.bsth.entity.Line; |
| 20 | -import com.bsth.entity.LineVersions; | ||
| 21 | import com.bsth.entity.LsSectionRoute; | 18 | import com.bsth.entity.LsSectionRoute; |
| 22 | import com.bsth.entity.LsStationRoute; | 19 | import com.bsth.entity.LsStationRoute; |
| 23 | import com.bsth.entity.Section; | 20 | import com.bsth.entity.Section; |
| @@ -40,7 +37,6 @@ import com.bsth.util.TransGPS; | @@ -40,7 +37,6 @@ import com.bsth.util.TransGPS; | ||
| 40 | import com.bsth.util.TransGPS.Location; | 37 | import com.bsth.util.TransGPS.Location; |
| 41 | import com.bsth.util.Geo.GeoUtils; | 38 | import com.bsth.util.Geo.GeoUtils; |
| 42 | import com.bsth.util.Geo.Point; | 39 | import com.bsth.util.Geo.Point; |
| 43 | -import com.google.gson.JsonObject; | ||
| 44 | 40 | ||
| 45 | /** | 41 | /** |
| 46 | * | 42 | * |
| @@ -171,7 +167,7 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | @@ -171,7 +167,7 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | ||
| 171 | String bsectionVectorS = null; | 167 | String bsectionVectorS = null; |
| 172 | if(!sectionsBpoints.equals("")) | 168 | if(!sectionsBpoints.equals("")) |
| 173 | bsectionVectorS = "LINESTRING(" + sectionsBpoints + ")"; | 169 | bsectionVectorS = "LINESTRING(" + sectionsBpoints + ")"; |
| 174 | - repository.systemSave(sectionCode, sectionName, crosesRoad, endNode, startNode, middleNode, gsectionVector, bsectionVectorS, sectionType, csectionVector, roadCoding, sectionDistance, sectionTime, dbType, speedLimit, descriptions, versions, sectionId); | 170 | + repository.systemSave(sectionCode, sectionName, crosesRoad, endNode, startNode, middleNode, gsectionVector, bsectionVectorS, sectionType, csectionVector, roadCoding, sectionDistance, sectionTime, dbType, speedLimit, descriptions, 1, sectionId); |
| 175 | SectionRoute route = new SectionRoute(); | 171 | SectionRoute route = new SectionRoute(); |
| 176 | Line line = lineRepository.findOne(sectionRouteLine); | 172 | Line line = lineRepository.findOne(sectionRouteLine); |
| 177 | Section section = repository.findOne(sectionId); | 173 | Section section = repository.findOne(sectionId); |
| @@ -663,7 +659,8 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | @@ -663,7 +659,8 @@ public class SectionServiceImpl extends BaseServiceImpl<Section, Integer> implem | ||
| 663 | // 路段时长 | 659 | // 路段时长 |
| 664 | Double sectionTime = map.get("sectionTime").equals("") ? null : Double.valueOf(map.get("sectionTime").toString()); | 660 | Double sectionTime = map.get("sectionTime").equals("") ? null : Double.valueOf(map.get("sectionTime").toString()); |
| 665 | // 路段路由 | 661 | // 路段路由 |
| 666 | - Integer sectionrouteCode = map.get("sectionrouteCode").equals("") ? null : Integer.valueOf(map.get("sectionrouteCode").toString()); | 662 | +// Integer sectionrouteCode = map.get("sectionrouteCode").equals("") ? null : Integer.valueOf(map.get("sectionrouteCode").toString()); |
| 663 | + Integer sectionrouteCode = 100; | ||
| 667 | SectionRouteCache resultS = routeCacheRepository.findOne(sectionRouteId); | 664 | SectionRouteCache resultS = routeCacheRepository.findOne(sectionRouteId); |
| 668 | int old_code = resultS.getSectionrouteCode(); | 665 | int old_code = resultS.getSectionrouteCode(); |
| 669 | if(sectionrouteCode!=null) { | 666 | if(sectionrouteCode!=null) { |
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
| @@ -1172,7 +1172,7 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -1172,7 +1172,7 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 1172 | 1172 | ||
| 1173 | tempM.put("stationCode", objects.get(i)[19]); | 1173 | tempM.put("stationCode", objects.get(i)[19]); |
| 1174 | 1174 | ||
| 1175 | - tempM.put("stationName", objects.get(i)[20]); | 1175 | + tempM.put("stationRouteName", objects.get(i)[20]); |
| 1176 | 1176 | ||
| 1177 | tempM.put("stationRoadCoding", objects.get(i)[21]); | 1177 | tempM.put("stationRoadCoding", objects.get(i)[21]); |
| 1178 | 1178 |
src/main/java/com/bsth/service/impl/StationServiceImpl.java
| @@ -18,7 +18,6 @@ import com.alibaba.fastjson.JSONObject; | @@ -18,7 +18,6 @@ import com.alibaba.fastjson.JSONObject; | ||
| 18 | import com.bsth.common.ResponseCode; | 18 | import com.bsth.common.ResponseCode; |
| 19 | import com.bsth.entity.Line; | 19 | import com.bsth.entity.Line; |
| 20 | import com.bsth.entity.LineInformation; | 20 | import com.bsth.entity.LineInformation; |
| 21 | -import com.bsth.entity.LineVersions; | ||
| 22 | import com.bsth.entity.Section; | 21 | import com.bsth.entity.Section; |
| 23 | import com.bsth.entity.SectionRoute; | 22 | import com.bsth.entity.SectionRoute; |
| 24 | import com.bsth.entity.SectionRouteCache; | 23 | import com.bsth.entity.SectionRouteCache; |
| @@ -34,7 +33,6 @@ import com.bsth.repository.SectionRouteRepository; | @@ -34,7 +33,6 @@ import com.bsth.repository.SectionRouteRepository; | ||
| 34 | import com.bsth.repository.StationRepository; | 33 | import com.bsth.repository.StationRepository; |
| 35 | import com.bsth.repository.StationRouteCacheRepository; | 34 | import com.bsth.repository.StationRouteCacheRepository; |
| 36 | import com.bsth.repository.StationRouteRepository; | 35 | import com.bsth.repository.StationRouteRepository; |
| 37 | -import com.bsth.service.LineVersionsService; | ||
| 38 | import com.bsth.service.StationService; | 36 | import com.bsth.service.StationService; |
| 39 | import com.bsth.util.GetUIDAndCode; | 37 | import com.bsth.util.GetUIDAndCode; |
| 40 | import com.bsth.util.TransGPS; | 38 | import com.bsth.util.TransGPS; |
| @@ -89,8 +87,6 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -89,8 +87,6 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 89 | @Autowired | 87 | @Autowired |
| 90 | LineVersionsRepository lineVersionsRepository; | 88 | LineVersionsRepository lineVersionsRepository; |
| 91 | 89 | ||
| 92 | - private GeoUtils geoUtils; | ||
| 93 | - | ||
| 94 | Logger logger = LoggerFactory.getLogger(this.getClass()); | 90 | Logger logger = LoggerFactory.getLogger(this.getClass()); |
| 95 | 91 | ||
| 96 | /** | 92 | /** |
| @@ -895,6 +891,156 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -895,6 +891,156 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 895 | } | 891 | } |
| 896 | 892 | ||
| 897 | /** | 893 | /** |
| 894 | + * @Description :TODO(新增缓存站点保存) | ||
| 895 | + */ | ||
| 896 | + @Transactional | ||
| 897 | + @Override | ||
| 898 | + public Map<String, Object> stationCacheSave(Map<String, Object> map) { | ||
| 899 | + Map<String, Object> resultMap = new HashMap<String, Object>(); | ||
| 900 | + try { | ||
| 901 | + // 站点编码 | ||
| 902 | + String stationCod = ""; | ||
| 903 | + // 站点ID | ||
| 904 | + Integer stationId = null; | ||
| 905 | + // 站点名称 | ||
| 906 | + String zdmc = map.get("zdmc").equals("") ? "" : map.get("zdmc").toString(); | ||
| 907 | + // 方向 | ||
| 908 | + Integer directions = map.get("directions").equals("") ? null : Integer.parseInt(map.get("directions").toString()); | ||
| 909 | + // 原坐标点 | ||
| 910 | + String bJwpoints = map.get("bJwpoints").equals("") ? "" : map.get("bJwpoints").toString(); | ||
| 911 | + String bJwpointsArray[] = null; | ||
| 912 | + if(bJwpoints!=null) { | ||
| 913 | + bJwpointsArray = bJwpoints.split(" "); | ||
| 914 | + } | ||
| 915 | + List<Object[]> stationNameList = repository.findStationName(directions,zdmc); | ||
| 916 | + Map<String, Object> isHaveMap = isHaveStationname(bJwpointsArray[0],bJwpointsArray[1],stationNameList); | ||
| 917 | + // 是否撤销 | ||
| 918 | + Integer destroy = map.get("destroy").equals("") ? null : Integer.parseInt(map.get("destroy").toString()); | ||
| 919 | + // 版本 | ||
| 920 | + Integer versions = map.get("versions").equals("") ? null : Integer.parseInt(map.get("versions").toString()); | ||
| 921 | + // 说明 | ||
| 922 | + String descriptions = map.get("descriptions").equals("") ? "" : map.get("descriptions").toString(); | ||
| 923 | + if(Boolean.parseBoolean(isHaveMap.get("isHave").toString())) { | ||
| 924 | + stationId = Integer.parseInt(isHaveMap.get("id").toString()); | ||
| 925 | + }else { | ||
| 926 | + // 站点编码 | ||
| 927 | + stationCod = map.get("stationCod").equals("") ? "" : map.get("stationCod").toString(); | ||
| 928 | + // 站点ID | ||
| 929 | + stationId = Integer.valueOf(stationCod); | ||
| 930 | + // 圆半径 | ||
| 931 | + Integer radius = map.get("radius").equals("") ? null : Integer.parseInt(map.get("radius").toString()); | ||
| 932 | + // 图形类型 | ||
| 933 | + String shapesType = map.get("shapesType").equals("") ? "" : map.get("shapesType").toString(); | ||
| 934 | + // 创建人 | ||
| 935 | + Integer createBy = map.get("createBy").equals("") ? null : Integer.parseInt(map.get("createBy").toString()); | ||
| 936 | + // 修改人 | ||
| 937 | + Integer updateBy = map.get("updateBy").equals("") ? null : Integer.parseInt(map.get("updateBy").toString()); | ||
| 938 | + // 城建坐标经度 | ||
| 939 | + Float x = map.get("x").equals("") ? null : Float.parseFloat(map.get("x").toString()); | ||
| 940 | + // 城建坐标纬度 | ||
| 941 | + Float y = map.get("y").equals("") ? null : Float.parseFloat(map.get("y").toString()); | ||
| 942 | + // 道路编码 | ||
| 943 | + String roadCoding = map.get("roadCoding").equals("") ? "" : map.get("roadCoding").toString(); | ||
| 944 | + // 原坐标类型 | ||
| 945 | + String dbType = map.get("dbType").equals("") ? "" : map.get("dbType").toString(); | ||
| 946 | + // WGS经纬度 | ||
| 947 | + Float gLonx = null; | ||
| 948 | + // WGS纬度 | ||
| 949 | + Float gLaty = null; | ||
| 950 | + if(bJwpointsArray.length>0) { | ||
| 951 | + Location resultPoint = FromBDPointToWGSPoint(bJwpointsArray[0],bJwpointsArray[1]); | ||
| 952 | + gLonx = (float)resultPoint.getLng(); | ||
| 953 | + gLaty = (float)resultPoint.getLat(); | ||
| 954 | + } | ||
| 955 | + // 多边形原坐标点集合 | ||
| 956 | + String bPloygonGrid = map.get("bPolygonGrid").equals("") ? "" : map.get("bPolygonGrid").toString(); | ||
| 957 | + // 多边形WGS坐标点集合 | ||
| 958 | + String gPloygonGrid =""; | ||
| 959 | + if(!bPloygonGrid.equals("")) { | ||
| 960 | + String bPloygonGridArray[] = bPloygonGrid.split(","); | ||
| 961 | + int bLen_ = bPloygonGridArray.length; | ||
| 962 | + for(int b = 0 ;b<bLen_;b++) { | ||
| 963 | + String tempArray[]= bPloygonGridArray[b].split(" "); | ||
| 964 | + Location resultPoint = FromBDPointToWGSPoint(tempArray[0],tempArray[1]); | ||
| 965 | + if(b==0) { | ||
| 966 | + gPloygonGrid = String.valueOf(resultPoint.getLng()) + " " + String.valueOf(resultPoint.getLat()); | ||
| 967 | + }else { | ||
| 968 | + gPloygonGrid = gPloygonGrid + ',' + String.valueOf(resultPoint.getLng()) + " " + String.valueOf(resultPoint.getLat()); | ||
| 969 | + } | ||
| 970 | + } | ||
| 971 | + } | ||
| 972 | + if(bPloygonGrid.equals("")) | ||
| 973 | + bPloygonGrid = null; | ||
| 974 | + else | ||
| 975 | + bPloygonGrid = "POLYGON((" + bPloygonGrid +"))"; | ||
| 976 | + if(gPloygonGrid.equals("")) | ||
| 977 | + gPloygonGrid = null; | ||
| 978 | + else | ||
| 979 | + gPloygonGrid = "POLYGON((" + gPloygonGrid +"))"; | ||
| 980 | + // 保存站点 | ||
| 981 | + repository.stationSave(stationCod, zdmc, roadCoding, dbType, bJwpoints, | ||
| 982 | + gLonx, gLaty, x, y, gPloygonGrid,bPloygonGrid, destroy, radius, | ||
| 983 | + shapesType, versions, descriptions, createBy, updateBy,stationId); | ||
| 984 | + } | ||
| 985 | + Station station = repository.findOne(stationId); | ||
| 986 | + StationRouteCache arg0 = new StationRouteCache(); | ||
| 987 | + // 距离 | ||
| 988 | + Double distances = map.get("distances").equals("") ? 0.0d : Double.parseDouble(map.get("distances").toString()); | ||
| 989 | + // 时间 | ||
| 990 | + Double toTime = map.get("toTime").equals("") ? 0.0d : Double.parseDouble(map.get("toTime").toString()); | ||
| 991 | + // 站点路由名称 | ||
| 992 | + String stationName = map.get("stationName").equals("") ? "" : map.get("stationName").toString(); | ||
| 993 | + // 线路ID | ||
| 994 | + int line = map.get("lineId").equals("") ? 0 : Integer.parseInt(map.get("lineId").toString()); | ||
| 995 | + // 线路信息 | ||
| 996 | + Line resultLine = lineRepository.findOne(line); | ||
| 997 | + // 站点路由序号 | ||
| 998 | + String stationRouteCodeStr = map.get("stationRouteCode").equals("") ? "" : map.get("stationRouteCode").toString(); | ||
| 999 | + // 站点类型 | ||
| 1000 | + String stationMark = map.get("stationMark").equals("") ? "" : map.get("stationMark").toString(); | ||
| 1001 | + Integer stationRouteCode = null; | ||
| 1002 | + if(stationRouteCodeStr!="") { | ||
| 1003 | + String stationRouteCodeArray [] = stationRouteCodeStr.split("_"); | ||
| 1004 | + stationRouteCode = Integer.parseInt(stationRouteCodeArray[0].toString())+1; | ||
| 1005 | + }else { | ||
| 1006 | + stationRouteCode = 100; | ||
| 1007 | + } | ||
| 1008 | + // 线路 | ||
| 1009 | + arg0.setLine(resultLine); | ||
| 1010 | + arg0.setLineCode(resultLine.getLineCode()); | ||
| 1011 | + // 站点 | ||
| 1012 | + arg0.setStation(station); | ||
| 1013 | + // 站点路由名称 | ||
| 1014 | + arg0.setStationName(stationName); | ||
| 1015 | + // 站点路由编码 | ||
| 1016 | + arg0.setStationCode(station.getStationCod()); | ||
| 1017 | + // 站点路由序号 | ||
| 1018 | + arg0.setStationRouteCode(stationRouteCode); | ||
| 1019 | + // 站点路由类型 | ||
| 1020 | + arg0.setStationMark(stationMark); | ||
| 1021 | + // 站点路由站点方向 | ||
| 1022 | + arg0.setDirections(directions); | ||
| 1023 | + // 站点路由到站距离 | ||
| 1024 | + arg0.setDistances(distances); | ||
| 1025 | + // 站点路由到站时间 | ||
| 1026 | + arg0.setToTime(toTime); | ||
| 1027 | + // 站点版本号 | ||
| 1028 | + arg0.setVersions(versions); | ||
| 1029 | + // 是否撤销 | ||
| 1030 | + arg0.setDestroy(destroy); | ||
| 1031 | + // 站点路由说明 | ||
| 1032 | + arg0.setDescriptions(descriptions); | ||
| 1033 | + routeCacheRepository.stationUpdStationRouteCode(line, directions, stationRouteCode); | ||
| 1034 | + routeCacheRepository.save(arg0); | ||
| 1035 | + resultMap.put("status", ResponseCode.SUCCESS); | ||
| 1036 | + } catch (Exception e) { | ||
| 1037 | + resultMap.put("status", ResponseCode.ERROR); | ||
| 1038 | + logger.error("save erro.", e); | ||
| 1039 | + } | ||
| 1040 | + return resultMap; | ||
| 1041 | + } | ||
| 1042 | + | ||
| 1043 | + /** | ||
| 898 | * @Description :TODO(更新站点保存) | 1044 | * @Description :TODO(更新站点保存) |
| 899 | * | 1045 | * |
| 900 | * @param map <bJwpoints:中心点百度坐标;bPolygonGrid:多边形图形百度坐标;dbType:原坐标类型; | 1046 | * @param map <bJwpoints:中心点百度坐标;bPolygonGrid:多边形图形百度坐标;dbType:原坐标类型; |
| @@ -918,7 +1064,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -918,7 +1064,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 918 | String stationCod = map.get("stationCod").equals("") ? "" : map.get("stationCod").toString(); | 1064 | String stationCod = map.get("stationCod").equals("") ? "" : map.get("stationCod").toString(); |
| 919 | String zdmc = map.get("zdmc").equals("") ? "" : map.get("zdmc").toString(); | 1065 | String zdmc = map.get("zdmc").equals("") ? "" : map.get("zdmc").toString(); |
| 920 | // 站点名称 | 1066 | // 站点名称 |
| 921 | - String stationName = map.get("stationName").equals("") ? "" : map.get("stationName").toString(); | 1067 | + String stationRouteName = map.get("stationName").equals("") ? "" : map.get("stationName").toString(); |
| 922 | // 所在道路编码 | 1068 | // 所在道路编码 |
| 923 | String roadCoding = map.get("roadCoding").equals("") ? "" : map.get("roadCoding").toString(); | 1069 | String roadCoding = map.get("roadCoding").equals("") ? "" : map.get("roadCoding").toString(); |
| 924 | // 经纬坐标类型 | 1070 | // 经纬坐标类型 |
| @@ -1005,7 +1151,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -1005,7 +1151,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 1005 | Station station = repository.findOne(stationId); | 1151 | Station station = repository.findOne(stationId); |
| 1006 | Line line = lineRepository.findOne(LineId); | 1152 | Line line = lineRepository.findOne(LineId); |
| 1007 | StationRoute stationRoute = new StationRoute(); | 1153 | StationRoute stationRoute = new StationRoute(); |
| 1008 | - stationRoute.setStationName(stationName); | 1154 | + stationRoute.setStationName(stationRouteName); |
| 1009 | stationRoute.setId(stationRouteId); | 1155 | stationRoute.setId(stationRouteId); |
| 1010 | stationRoute.setStationRouteCode(stationRouteCode); | 1156 | stationRoute.setStationRouteCode(stationRouteCode); |
| 1011 | stationRoute.setStation(station); | 1157 | stationRoute.setStation(station); |
| @@ -1201,7 +1347,6 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -1201,7 +1347,6 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 1201 | // 保存路段 | 1347 | // 保存路段 |
| 1202 | sectionRouteRepository.save(sectionRoute); | 1348 | sectionRouteRepository.save(sectionRoute); |
| 1203 | } | 1349 | } |
| 1204 | - | ||
| 1205 | } | 1350 | } |
| 1206 | 1351 | ||
| 1207 | /** | 1352 | /** |
| @@ -1222,10 +1367,10 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -1222,10 +1367,10 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 1222 | String libraryPointstr = s.getbJwpoints(); | 1367 | String libraryPointstr = s.getbJwpoints(); |
| 1223 | String points[] = libraryPointstr.toString().split(" "); | 1368 | String points[] = libraryPointstr.toString().split(" "); |
| 1224 | Point center = new Point(Double.parseDouble(points[0]), Double.parseDouble(points[1])); | 1369 | Point center = new Point(Double.parseDouble(points[0]), Double.parseDouble(points[1])); |
| 1225 | - // 在40m内认为是同一个站点 | ||
| 1226 | - Circle circle = new Circle(center, 40); | 1370 | + // 在60m内认为是同一个站点 |
| 1371 | + Circle circle = new Circle(center, 60); | ||
| 1227 | // 匹配到了用数据库中的点替换 | 1372 | // 匹配到了用数据库中的点替换 |
| 1228 | - if (geoUtils.isPointInCircle(point, circle)) { | 1373 | + if (GeoUtils.isPointInCircle(point, circle)) { |
| 1229 | map.put("name", s.getStationName().toString()); | 1374 | map.put("name", s.getStationName().toString()); |
| 1230 | map.put("potion_lng", points[0]); | 1375 | map.put("potion_lng", points[0]); |
| 1231 | map.put("potion_lat", points[1]); | 1376 | map.put("potion_lat", points[1]); |
| @@ -1716,4 +1861,36 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -1716,4 +1861,36 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 1716 | } | 1861 | } |
| 1717 | return resultMap; | 1862 | return resultMap; |
| 1718 | } | 1863 | } |
| 1864 | + | ||
| 1865 | + /** | ||
| 1866 | + * @Description :TODO(引用当前版本) | ||
| 1867 | + */ | ||
| 1868 | + @Override | ||
| 1869 | + @Transactional | ||
| 1870 | + public Map<String, Object> referenceCurrentVersion(Map<String, Object> map) { | ||
| 1871 | + Map<String, Object> resultMap = new HashMap<String, Object>(); | ||
| 1872 | + try { | ||
| 1873 | + Integer lineId = Integer.parseInt(map.get("lineId").toString()); | ||
| 1874 | + Integer dir = Integer.parseInt(map.get("directions").toString()); | ||
| 1875 | + List<StationRoute> stationRoutes = routeRepository.findByLine(lineId, dir); | ||
| 1876 | + List<SectionRoute> sectionRoutes = sectionRouteRepository.findByLine(lineId, dir); | ||
| 1877 | + // 删除缓存路由数据 | ||
| 1878 | + routeCacheRepository.stationRouteCacheDel(lineId, dir); | ||
| 1879 | + sectionRouteCacheRepository.sectionRouteCacheDel(lineId, dir); | ||
| 1880 | + // 当前版本路由保存到缓存路由 | ||
| 1881 | + List<StationRouteCache> stationRouteCaches = JSONArray.parseArray(JSON.toJSONString(stationRoutes), StationRouteCache.class); | ||
| 1882 | + List<SectionRouteCache> sectionRouteCaches = JSONArray.parseArray(JSON.toJSONString(sectionRoutes), SectionRouteCache.class); | ||
| 1883 | + for(StationRouteCache sr:stationRouteCaches) { | ||
| 1884 | + routeCacheRepository.save(sr); | ||
| 1885 | + } | ||
| 1886 | + for(SectionRouteCache sr:sectionRouteCaches) { | ||
| 1887 | + sectionRouteCacheRepository.save(sr); | ||
| 1888 | + } | ||
| 1889 | + resultMap.put("status", ResponseCode.SUCCESS); | ||
| 1890 | + } catch (Exception e) { | ||
| 1891 | + resultMap.put("status", ResponseCode.ERROR); | ||
| 1892 | + logger.error("save erro.", e); | ||
| 1893 | + } | ||
| 1894 | + return resultMap; | ||
| 1895 | + } | ||
| 1719 | } | 1896 | } |
| 1720 | \ No newline at end of file | 1897 | \ No newline at end of file |
src/main/java/com/bsth/service/oil/DlbService.java
| @@ -29,5 +29,8 @@ public interface DlbService extends BaseService<Dlb, Integer>{ | @@ -29,5 +29,8 @@ public interface DlbService extends BaseService<Dlb, Integer>{ | ||
| 29 | 29 | ||
| 30 | Map<String, List<Dlb>> updeteHistory(List<Map<String, Object>> list,String date, | 30 | Map<String, List<Dlb>> updeteHistory(List<Map<String, Object>> list,String date, |
| 31 | String gsdm,String fgsdm,String line) ; | 31 | String gsdm,String fgsdm,String line) ; |
| 32 | + | ||
| 33 | + Map<String, Object> update(Map<String, Object> map); | ||
| 34 | + | ||
| 32 | 35 | ||
| 33 | } | 36 | } |
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java
| @@ -40,7 +40,6 @@ import com.bsth.entity.oil.Cyl; | @@ -40,7 +40,6 @@ import com.bsth.entity.oil.Cyl; | ||
| 40 | import com.bsth.entity.oil.Dlb; | 40 | import com.bsth.entity.oil.Dlb; |
| 41 | import com.bsth.entity.oil.Jdl; | 41 | import com.bsth.entity.oil.Jdl; |
| 42 | import com.bsth.entity.oil.Nylog; | 42 | import com.bsth.entity.oil.Nylog; |
| 43 | -import com.bsth.entity.oil.Ylb; | ||
| 44 | import com.bsth.entity.oil.Ylxxb; | 43 | import com.bsth.entity.oil.Ylxxb; |
| 45 | import com.bsth.entity.search.CustomerSpecs; | 44 | import com.bsth.entity.search.CustomerSpecs; |
| 46 | import com.bsth.entity.sys.SysUser; | 45 | import com.bsth.entity.sys.SysUser; |
| @@ -489,7 +488,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -489,7 +488,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 489 | new BatchSaveUtils<Dlb>().saveList2(addList, Dlb.class); | 488 | new BatchSaveUtils<Dlb>().saveList2(addList, Dlb.class); |
| 490 | } catch (Exception e) { | 489 | } catch (Exception e) { |
| 491 | // TODO: handle exception | 490 | // TODO: handle exception |
| 492 | - if(e.getMessage().indexOf("PK_YLB_UK")>0){ | 491 | + if(e.getMessage().indexOf("PK_DLB_UK")>0){ |
| 493 | newMap.put("fage", "存在相同数据,数据已经过滤"); | 492 | newMap.put("fage", "存在相同数据,数据已经过滤"); |
| 494 | logger.info("获取:存在相同数据,数据已经过滤"); | 493 | logger.info("获取:存在相同数据,数据已经过滤"); |
| 495 | } | 494 | } |
| @@ -1217,6 +1216,21 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -1217,6 +1216,21 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 1217 | return mapList; | 1216 | return mapList; |
| 1218 | } | 1217 | } |
| 1219 | 1218 | ||
| 1219 | + @Override | ||
| 1220 | + public Map<String, Object> update(Map<String, Object> map) { | ||
| 1221 | + if(map.get("id")!=null){ | ||
| 1222 | + if(map.get("id").toString().length()>0){ | ||
| 1223 | + Integer id=Integer.parseInt(map.get("id").toString()); | ||
| 1224 | + String jsy=map.get("jsy").toString(); | ||
| 1225 | + Dlb t=repository.findOne(id); | ||
| 1226 | + t.setJsy(jsy); | ||
| 1227 | + repository.save(t); | ||
| 1228 | + map.put("status", ResponseCode.SUCCESS); | ||
| 1229 | + } | ||
| 1230 | + } | ||
| 1231 | + return map; | ||
| 1232 | + } | ||
| 1233 | + | ||
| 1220 | } | 1234 | } |
| 1221 | 1235 | ||
| 1222 | class NbbmJcsxMap implements Comparator<Map<String, Object>>{ | 1236 | class NbbmJcsxMap implements Comparator<Map<String, Object>>{ |
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
| @@ -1643,7 +1643,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -1643,7 +1643,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 1643 | Map<String, Object> ylMap=new HashMap<String, Object>(); | 1643 | Map<String, Object> ylMap=new HashMap<String, Object>(); |
| 1644 | for (int x = 0; x < listpbYc.size(); x++) { | 1644 | for (int x = 0; x < listpbYc.size(); x++) { |
| 1645 | String type = "add"; | 1645 | String type = "add"; |
| 1646 | - Map<String, Object> maps = listpb.get(x); | 1646 | + Map<String, Object> maps = listpbYc.get(x); |
| 1647 | // 判断驾驶员驾驶的该车辆是否已经存入了(查出的结果集中日期是相同的,根据驾驶员、内部编号、线路编码判断) | 1647 | // 判断驾驶员驾驶的该车辆是否已经存入了(查出的结果集中日期是相同的,根据驾驶员、内部编号、线路编码判断) |
| 1648 | Ylb t = new Ylb(); | 1648 | Ylb t = new Ylb(); |
| 1649 | for (int k = 0; k < ylbList_upd.size(); k++) { | 1649 | for (int k = 0; k < ylbList_upd.size(); k++) { |
src/main/resources/static/pages/base/geo_data_edit/css/mian.css
| 1 | +<<<<<<< HEAD | ||
| 1 | /* ^_^ baidu map hide logo */ | 2 | /* ^_^ baidu map hide logo */ |
| 2 | .anchorBL, .anchorBL, .amap-logo, .amap-copyright { | 3 | .anchorBL, .anchorBL, .amap-logo, .amap-copyright { |
| 3 | display: none; | 4 | display: none; |
| @@ -479,4 +480,428 @@ ul.context-menu-list.station-route-ct-menu.context-menu-root { | @@ -479,4 +480,428 @@ ul.context-menu-list.station-route-ct-menu.context-menu-root { | ||
| 479 | 480 | ||
| 480 | .add_station_search_point_wrap .buffer_edit_body .ct_row { | 481 | .add_station_search_point_wrap .buffer_edit_body .ct_row { |
| 481 | margin-top: 8px; | 482 | margin-top: 8px; |
| 483 | +======= | ||
| 484 | +/* ^_^ baidu map hide logo */ | ||
| 485 | +.anchorBL, .anchorBL, .amap-logo, .amap-copyright { | ||
| 486 | + display: none; | ||
| 487 | +} | ||
| 488 | + | ||
| 489 | +html,body{ | ||
| 490 | + height: 100%; | ||
| 491 | +} | ||
| 492 | +.ct_page{ | ||
| 493 | + padding: 0; | ||
| 494 | + height: 100%; | ||
| 495 | +} | ||
| 496 | + | ||
| 497 | +div#map_wrap{ | ||
| 498 | + height: 100%; | ||
| 499 | +} | ||
| 500 | + | ||
| 501 | +.main_left_panel{ | ||
| 502 | + position: absolute; | ||
| 503 | + z-index: 999; | ||
| 504 | + height: calc(100% - 20px); | ||
| 505 | + width: 300px; | ||
| 506 | + background: #fffffff5; | ||
| 507 | + top: 7px; | ||
| 508 | + left: 5px; | ||
| 509 | + box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48); | ||
| 510 | +} | ||
| 511 | +.main_lt_search_panel{ | ||
| 512 | + position: absolute; | ||
| 513 | + z-index: 99; | ||
| 514 | + top: 10px; | ||
| 515 | + left: 330px; | ||
| 516 | + background: #fffffff5; | ||
| 517 | + box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48); | ||
| 518 | +} | ||
| 519 | +.main_rt_tools_panel{ | ||
| 520 | + position: absolute; | ||
| 521 | + z-index: 99; | ||
| 522 | + top: 7px; | ||
| 523 | + right: 7px; | ||
| 524 | + background: #ffffff; | ||
| 525 | + box-shadow: -5px 4px 15px rgba(90, 90, 90, 0.48); | ||
| 526 | + padding: 0 12px; | ||
| 527 | + text-align: center; | ||
| 528 | + border-radius: 7px; | ||
| 529 | + height: 28px; | ||
| 530 | +} | ||
| 531 | + | ||
| 532 | +.main_rt_tools_panel>._icon{ | ||
| 533 | + margin: 0 9px; | ||
| 534 | +} | ||
| 535 | +.search_input{ | ||
| 536 | + width: 250px; | ||
| 537 | + height: 42px; | ||
| 538 | +} | ||
| 539 | + | ||
| 540 | +.search_input::placeholder{ | ||
| 541 | + color: grey; | ||
| 542 | + font-size: 12px; | ||
| 543 | +} | ||
| 544 | + | ||
| 545 | +._line_info{ | ||
| 546 | + width: 100%; | ||
| 547 | + height: 90px; | ||
| 548 | + background: white; | ||
| 549 | + box-shadow: 0px -2px 15px rgba(90, 90, 90, 0.48); | ||
| 550 | +} | ||
| 551 | + | ||
| 552 | +._line_name{ | ||
| 553 | + padding: 10px 0 0 15px; | ||
| 554 | + font-weight: 600; | ||
| 555 | + font-family: 微软雅黑; | ||
| 556 | + font-size: 18px; | ||
| 557 | + color: #484848; | ||
| 558 | + position: relative; | ||
| 559 | +} | ||
| 560 | + | ||
| 561 | +._version_dropdown_wrap{ | ||
| 562 | + padding: 4px 0 0 15px; | ||
| 563 | +} | ||
| 564 | +._version_text{ | ||
| 565 | + font-size: 14px; | ||
| 566 | + color: #0aae0a; | ||
| 567 | +} | ||
| 568 | +._version_dropdown_wrap li.uk-active>a{ | ||
| 569 | + color: #0aae0a; | ||
| 570 | +} | ||
| 571 | +.uk-nav-header:not(:first-child) { | ||
| 572 | + margin-top: 10px; | ||
| 573 | +} | ||
| 574 | +.add_line_version_icon{ | ||
| 575 | + position: absolute; | ||
| 576 | + right: 18px; | ||
| 577 | + top: 10px; | ||
| 578 | +} | ||
| 579 | +.clock_enable_version{ | ||
| 580 | + padding: 4px 0 0 15px; | ||
| 581 | + font-size: 13px; | ||
| 582 | + color: #ef4f4f; | ||
| 583 | +} | ||
| 584 | + | ||
| 585 | +.clock_enable_version>a.uk-icon{ | ||
| 586 | + vertical-align: top; | ||
| 587 | + margin-top: 6px; | ||
| 588 | +} | ||
| 589 | +._route_info_wrap{ | ||
| 590 | + height: calc(100% - 100px); | ||
| 591 | + padding-top: 10px; | ||
| 592 | +} | ||
| 593 | + | ||
| 594 | +._route_info_wrap .uk-tab>li>a{ | ||
| 595 | + padding: 9px 5px; | ||
| 596 | +} | ||
| 597 | +._route_info_wrap>ul.uk-tab{ | ||
| 598 | + padding-left: 10px; | ||
| 599 | + margin-bottom: 0; | ||
| 600 | +} | ||
| 601 | +.rt_show_version_txt{ | ||
| 602 | + position: absolute; | ||
| 603 | + right: 7px; | ||
| 604 | + bottom: 7px; | ||
| 605 | + font-size: 12px; | ||
| 606 | +} | ||
| 607 | +.rt_show_version_txt{ | ||
| 608 | + position: absolute; | ||
| 609 | + right: 7px; | ||
| 610 | + bottom: 7px; | ||
| 611 | + font-size: 12px; | ||
| 612 | + padding: 5px 8px; | ||
| 613 | +} | ||
| 614 | +.station_route>ul{ | ||
| 615 | + padding: 0 0 0 30px; | ||
| 616 | + font-size: 14px; | ||
| 617 | + width: calc(100% - 38px); | ||
| 618 | +} | ||
| 619 | + | ||
| 620 | +.station_route>ul.uk-list>li:nth-child(n+2), .uk-list>li>ul { | ||
| 621 | + margin-top: 0; | ||
| 622 | +} | ||
| 623 | + | ||
| 624 | +.station_route>ul>li>a{ | ||
| 625 | + color: #434343; | ||
| 626 | + overflow: hidden; | ||
| 627 | + text-overflow: ellipsis; | ||
| 628 | + white-space: nowrap; | ||
| 629 | + display: inline-block; | ||
| 630 | + width: calc(100% - 53px); | ||
| 631 | + padding: 4px 0; | ||
| 632 | + vertical-align: middle;+0982/ | ||
| 633 | +} | ||
| 634 | + | ||
| 635 | +.ct_route_badge{ | ||
| 636 | + font-size: 11px; | ||
| 637 | + height: 18px; | ||
| 638 | + border-radius: 5px; | ||
| 639 | + vertical-align: top; | ||
| 640 | + margin-top: 1px; | ||
| 641 | + padding: 0 4px; | ||
| 642 | + margin-right: 3px; | ||
| 643 | + min-width: 18px; | ||
| 644 | +} | ||
| 645 | + | ||
| 646 | +.up_down_route_list>li:nth-of-type(2) .ct_route_badge{ | ||
| 647 | + background: #fb6464; | ||
| 648 | +} | ||
| 649 | + | ||
| 650 | +.ct_route_badge.start{ | ||
| 651 | + margin-left: 0px; | ||
| 652 | +} | ||
| 653 | +.ct_route_badge.end{ | ||
| 654 | + margin-left: 0px; | ||
| 655 | +} | ||
| 656 | +.road_route{ | ||
| 657 | + padding-left: 30px; | ||
| 658 | + width: calc(100% - 25px); | ||
| 659 | + font-size: 14px; | ||
| 660 | + color: #242424; | ||
| 661 | + border-top: 1px solid #d5d5d5; | ||
| 662 | + padding-top: 0; | ||
| 663 | +} | ||
| 664 | +._route_info_wrap>ul.uk-switcher{ | ||
| 665 | + overflow: auto; | ||
| 666 | + height: calc(100% - 62px); | ||
| 667 | + margin-bottom: 0; | ||
| 668 | + position: relative; | ||
| 669 | + padding-top: 20px; | ||
| 670 | + margin-top: 0 !important; | ||
| 671 | +} | ||
| 672 | + | ||
| 673 | +.pos_tb_icon{ | ||
| 674 | + position: absolute; | ||
| 675 | + bottom: 15px; | ||
| 676 | + right: 15px; | ||
| 677 | +} | ||
| 678 | +.ct_route_badge_wrap{ | ||
| 679 | + display: inline-block; | ||
| 680 | + width: 48px; | ||
| 681 | + text-align: right; | ||
| 682 | + vertical-align: top; | ||
| 683 | + margin-top: 3px; | ||
| 684 | +} | ||
| 685 | + | ||
| 686 | +.road_route>ul li a{ | ||
| 687 | + color: #242424; | ||
| 688 | + width: 100%; | ||
| 689 | + display: block; | ||
| 690 | + padding-left: 8px; | ||
| 691 | +} | ||
| 692 | + | ||
| 693 | +.road_route>ul{ | ||
| 694 | + border-left: 1px solid #cbcbcb; | ||
| 695 | + padding-left: 0; | ||
| 696 | + padding-top: 10px; | ||
| 697 | +} | ||
| 698 | + | ||
| 699 | +span.sub_name { | ||
| 700 | + font-size: 12px; | ||
| 701 | + color: #777676; | ||
| 702 | + margin-left: 5px; | ||
| 703 | +} | ||
| 704 | + | ||
| 705 | +.road_route>ul>li{ | ||
| 706 | + width: calc(100% - 10px); | ||
| 707 | + overflow: hidden; | ||
| 708 | + text-overflow: ellipsis; | ||
| 709 | + white-space: nowrap; | ||
| 710 | + display: inline-block; | ||
| 711 | +} | ||
| 712 | + | ||
| 713 | +#map_wrap img { | ||
| 714 | + max-width: none; | ||
| 715 | +} | ||
| 716 | + | ||
| 717 | +ul.uk-list.station_info_win { | ||
| 718 | + font-size: 14px; | ||
| 719 | + padding-left: 5px; | ||
| 720 | +} | ||
| 721 | + | ||
| 722 | +.uk-list.station_info_win>li:nth-child(n+2), .uk-list.station_info_win>li>ul { | ||
| 723 | + margin-top: 7px; | ||
| 724 | +} | ||
| 725 | + | ||
| 726 | +ul.uk-list.station_info_win>li.s_name{ | ||
| 727 | + font-size: 16px; | ||
| 728 | + font-weight: 600; | ||
| 729 | + color: #e15428; | ||
| 730 | +} | ||
| 731 | + | ||
| 732 | +.up_down_route_list li.ct_active{ | ||
| 733 | + background: #91d9fa; | ||
| 734 | +} | ||
| 735 | + | ||
| 736 | +.up_down_route_list li.ct_active.first_road_active{ | ||
| 737 | + background: #fff; | ||
| 738 | +} | ||
| 739 | + | ||
| 740 | +.up_down_route_list li.ct_active.first_road_active>a{ | ||
| 741 | + background: #91d9fa; | ||
| 742 | +} | ||
| 743 | + | ||
| 744 | +.road_route .uk-list ul{ | ||
| 745 | + padding-left: 22px; | ||
| 746 | +} | ||
| 747 | + | ||
| 748 | +.road_route>ul>li>ul>li{ | ||
| 749 | + padding-left: 8px; | ||
| 750 | +} | ||
| 751 | + | ||
| 752 | +.ct_coord_str{ | ||
| 753 | + max-height: 300px; | ||
| 754 | + overflow: auto; | ||
| 755 | +} | ||
| 756 | + | ||
| 757 | +ul.context-menu-list.station-route-ct-menu.context-menu-root { | ||
| 758 | + font-size: 14px; | ||
| 759 | + width: 170px !important; | ||
| 760 | + min-width: 70px; | ||
| 761 | + border: 1px solid #d2d2d2; | ||
| 762 | + overflow: hidden; | ||
| 763 | + border-radius: 0; | ||
| 764 | + background: #fff; | ||
| 765 | + color: #666; | ||
| 766 | + box-shadow: 0 5px 12px rgba(0,0,0,.15); | ||
| 767 | +} | ||
| 768 | + | ||
| 769 | +.main_left_panel_m_layer{ | ||
| 770 | + position: absolute; | ||
| 771 | + z-index: 10000; | ||
| 772 | + height: calc(100% - 20px); | ||
| 773 | + width: 300px; | ||
| 774 | + background: #ffffff85; | ||
| 775 | + top: 7px; | ||
| 776 | + left: 5px; | ||
| 777 | + display: none; | ||
| 778 | +} | ||
| 779 | + | ||
| 780 | +.buffer_edit_panel{ | ||
| 781 | + position: absolute; | ||
| 782 | + top: 5px; | ||
| 783 | + width: 360px; | ||
| 784 | + height: 120px; | ||
| 785 | + background: #ffffff; | ||
| 786 | + left: calc(50% - 170px); | ||
| 787 | + z-index: 999; | ||
| 788 | + box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48); | ||
| 789 | + display: none; | ||
| 790 | +} | ||
| 791 | +.buffer_edit_body{ | ||
| 792 | + padding: 5px; | ||
| 793 | +} | ||
| 794 | + | ||
| 795 | +.buffer_edit_body>.name{ | ||
| 796 | + font-weight: 600; | ||
| 797 | + color: #E91E63; | ||
| 798 | + margin-bottom: 0; | ||
| 799 | +} | ||
| 800 | + | ||
| 801 | +.buffer_edit_body .ct_row .uk-inline{ | ||
| 802 | + width: 167px; | ||
| 803 | + height: 30px; | ||
| 804 | + margin-right: 7px; | ||
| 805 | +} | ||
| 806 | + | ||
| 807 | +.buffer_edit_body .ct_row{ | ||
| 808 | + margin-top: 12px; | ||
| 809 | +} | ||
| 810 | + | ||
| 811 | +.buffer_edit_body .ct_row .uk-inline:last-child{ | ||
| 812 | + margin-right: 0; | ||
| 813 | +} | ||
| 814 | + | ||
| 815 | +.buffer_edit_body .ct_row .uk-inline input{ | ||
| 816 | + height: 30px; | ||
| 817 | +} | ||
| 818 | + | ||
| 819 | +.buffer_edit_body .ct_row .uk-form-icon-flip { | ||
| 820 | + font-size: 12px; | ||
| 821 | +} | ||
| 822 | + | ||
| 823 | +.buffer_edit_body .ct_row .uk-inline.btns{ | ||
| 824 | + text-align: right; | ||
| 825 | +} | ||
| 826 | +.buffer_edit_body .ct_row .uk-inline.btns .uk-button{ | ||
| 827 | + padding: 0 15px; | ||
| 828 | + height: 28px; | ||
| 829 | + line-height: 28px; | ||
| 830 | + vertical-align: top; | ||
| 831 | + margin-top: 2px; | ||
| 832 | +} | ||
| 833 | + | ||
| 834 | +.loading{ | ||
| 835 | + height: 100%; | ||
| 836 | + text-align: center; | ||
| 837 | + position: absolute; | ||
| 838 | + z-index: 10000; | ||
| 839 | + top: 0; | ||
| 840 | + left: 0; | ||
| 841 | + width: 100%; | ||
| 842 | + background: #ffffff78; | ||
| 843 | + display: flex; | ||
| 844 | +} | ||
| 845 | + | ||
| 846 | +.loading>div{ | ||
| 847 | + margin: auto; | ||
| 848 | + margin-top: calc(25% - 100px); | ||
| 849 | + background: #f9d56c; | ||
| 850 | + padding: 12px; | ||
| 851 | + box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48); | ||
| 852 | +} | ||
| 853 | + | ||
| 854 | +.loading>div>span{ | ||
| 855 | + vertical-align: top; | ||
| 856 | + margin-top: -6px; | ||
| 857 | + margin-right: 5px; | ||
| 858 | + font-size: 14px; | ||
| 859 | +} | ||
| 860 | +.uk-modal{ | ||
| 861 | + z-index: 10001; | ||
| 862 | +} | ||
| 863 | + | ||
| 864 | +.ct_route_badge.polygon{ | ||
| 865 | + | ||
| 866 | +} | ||
| 867 | + | ||
| 868 | +.shapes_type>div.uk-inline:nth-of-type(2){ | ||
| 869 | + width: 80px; | ||
| 870 | + margin-right: 0; | ||
| 871 | +} | ||
| 872 | + | ||
| 873 | +.shapes_type>div.uk-inline:first-child{ | ||
| 874 | + width: 84px; | ||
| 875 | +} | ||
| 876 | + | ||
| 877 | +.shapes_type>div.uk-inline:first-child select{ | ||
| 878 | + height: 30px; | ||
| 879 | +} | ||
| 880 | + | ||
| 881 | +.shapes_type.st_d>div.uk-inline:nth-of-type(2){ | ||
| 882 | + display: none; | ||
| 883 | +} | ||
| 884 | + | ||
| 885 | +.shapes_type.st_d>div.uk-inline:first-child{ | ||
| 886 | + width: 167px; | ||
| 887 | +} | ||
| 888 | + | ||
| 889 | +.draw_polygon_switch{ | ||
| 890 | + display: none; | ||
| 891 | +} | ||
| 892 | + | ||
| 893 | +.shapes_type.st_d>div.uk-inline:first-child select{ | ||
| 894 | + width: 107px; | ||
| 895 | +} | ||
| 896 | + | ||
| 897 | +.shapes_type.st_d .draw_polygon_switch{ | ||
| 898 | + display: inline-block; | ||
| 899 | + font-size: 12px; | ||
| 900 | + vertical-align: bottom; | ||
| 901 | + margin-left: 5px; | ||
| 902 | +} | ||
| 903 | + | ||
| 904 | +.shapes_type.st_d .draw_polygon_switch>a{ | ||
| 905 | + color: red; | ||
| 906 | +>>>>>>> 5330d6cb797891dcb6c8a000004d51964e2bb71f | ||
| 482 | } | 907 | } |
| 483 | \ No newline at end of file | 908 | \ No newline at end of file |
src/main/resources/static/pages/base/geo_data_edit/fragments/f_road_route.html
| 1 | -<div> | ||
| 2 | - <script id="geo_d_e_road_route-temp" type="text/html"> | ||
| 3 | - <ul class="uk-list"> | ||
| 4 | - {{each list as subArr i}} | ||
| 5 | - <li class="road_li_{{subArr[0].sectionCode}} first_road_active"> | ||
| 6 | - <a data-code="{{subArr[0].sectionCode}}" data-updown="{{subArr[0].directions}}">{{subArr[0].sectionName}}<span class="sub_name">{{subArr[0].crosesRoad}}</span></a> | ||
| 7 | - | ||
| 8 | - {{if subArr.length > 1}} | ||
| 9 | - {{each subArr as obj j}} | ||
| 10 | - <ul class="uk-list"> | ||
| 11 | - {{if j > 0}} | ||
| 12 | - <li class="road_li_{{obj.sectionCode}}"> | ||
| 13 | - <a data-code="{{obj.sectionCode}}" data-updown="{{obj.directions}}">{{obj.sectionName}}<span class="sub_name">{{obj.crosesRoad}}</span></a></li> | ||
| 14 | - {{/if}} | ||
| 15 | - </ul> | ||
| 16 | - {{/each}} | ||
| 17 | - {{/if}} | ||
| 18 | - </li> | ||
| 19 | - {{/each}} | ||
| 20 | - </ul> | ||
| 21 | - </script> | ||
| 22 | - | ||
| 23 | - <script id="geo_d_e_road_info_win-temp" type="text/html"> | ||
| 24 | - <ul class="uk-list station_info_win"> | ||
| 25 | - <li class="s_name">{{sectionName}}</li> | ||
| 26 | - <li>交叉路名: {{crosesRoad}}</li> | ||
| 27 | - <li>路段编号:{{sectionCode}}</li> | ||
| 28 | - <li>路由序号:{{sectionrouteCode}}</li> | ||
| 29 | - <li>坐标: | ||
| 30 | - <div class="ct_coord_str"> | ||
| 31 | - {{each bdCoords as coord i}} | ||
| 32 | - <code>{{coord}}</code><br> | ||
| 33 | - {{/each}} | ||
| 34 | - </div> | ||
| 35 | - </li> | ||
| 36 | - </ul> | ||
| 37 | - </script> | 1 | +<div> |
| 2 | + <script id="geo_d_e_road_route-temp" type="text/html"> | ||
| 3 | + <ul class="uk-list"> | ||
| 4 | + {{each list as subArr i}} | ||
| 5 | + <li class="road_li_{{subArr[0].sectionCode}} first_road_active"> | ||
| 6 | + <a data-code="{{subArr[0].sectionCode}}" data-updown="{{subArr[0].directions}}">{{subArr[0].sectionName}}<span class="sub_name">{{subArr[0].crosesRoad}}</span></a> | ||
| 7 | + | ||
| 8 | + {{if subArr.length > 1}} | ||
| 9 | + {{each subArr as obj j}} | ||
| 10 | + <ul class="uk-list"> | ||
| 11 | + {{if j > 0}} | ||
| 12 | + <li class="road_li_{{obj.sectionCode}}"> | ||
| 13 | + <a data-code="{{obj.sectionCode}}" data-updown="{{obj.directions}}">{{obj.sectionName}}<span class="sub_name">{{obj.crosesRoad}}</span></a></li> | ||
| 14 | + {{/if}} | ||
| 15 | + </ul> | ||
| 16 | + {{/each}} | ||
| 17 | + {{/if}} | ||
| 18 | + </li> | ||
| 19 | + {{/each}} | ||
| 20 | + </ul> | ||
| 21 | + </script> | ||
| 22 | + | ||
| 23 | + <script id="geo_d_e_road_info_win-temp" type="text/html"> | ||
| 24 | + <ul class="uk-list station_info_win"> | ||
| 25 | + <li class="s_name">{{sectionName}}</li> | ||
| 26 | + <li>交叉路名: {{crosesRoad}}</li> | ||
| 27 | + <li>路段编号:{{sectionCode}}</li> | ||
| 28 | + <li>路由序号:{{sectionrouteCode}}</li> | ||
| 29 | + <li>坐标: | ||
| 30 | + <div class="ct_coord_str"> | ||
| 31 | + {{each bdCoords as coord i}} | ||
| 32 | + <code>{{coord}}</code><br> | ||
| 33 | + {{/each}} | ||
| 34 | + </div> | ||
| 35 | + </li> | ||
| 36 | + </ul> | ||
| 37 | + </script> | ||
| 38 | </div> | 38 | </div> |
| 39 | \ No newline at end of file | 39 | \ No newline at end of file |
src/main/resources/static/pages/base/geo_data_edit/fragments/f_station_route.html
| 1 | +<<<<<<< HEAD | ||
| 1 | <div> | 2 | <div> |
| 2 | <script id="geo_d_e_station_route-temp" type="text/html"> | 3 | <script id="geo_d_e_station_route-temp" type="text/html"> |
| 3 | <ul class="uk-list"> | 4 | <ul class="uk-list"> |
| @@ -170,4 +171,98 @@ | @@ -170,4 +171,98 @@ | ||
| 170 | </div> | 171 | </div> |
| 171 | </div> | 172 | </div> |
| 172 | </script> | 173 | </script> |
| 174 | +======= | ||
| 175 | +<div> | ||
| 176 | + <script id="geo_d_e_station_route-temp" type="text/html"> | ||
| 177 | + <ul class="uk-list"> | ||
| 178 | + {{each list as s i}} | ||
| 179 | + <li class="station_li_{{s.stationCode}}"> | ||
| 180 | + <div class="ct_route_badge_wrap"> | ||
| 181 | + <span class="uk-badge ct_route_badge {{if s.stationMark=='B'}}start{{else if s.stationMark=='E'}}end{{/if}} {{if shapesType=='d'}}polygon{{/if}}"> | ||
| 182 | + {{if s.stationMark=='B'}}起点站{{else if s.stationMark=='E'}}终点站{{else}}{{i + 1}}{{/if}}</span> | ||
| 183 | + </div> | ||
| 184 | + <a data-code="{{s.stationCode}}" data-updown="{{s.directions}}">{{s.stationName}}</a> | ||
| 185 | + </li> | ||
| 186 | + {{/each}} | ||
| 187 | + </ul> | ||
| 188 | + </script> | ||
| 189 | + | ||
| 190 | + | ||
| 191 | + <script id="geo_d_e_station_info_win-temp" type="text/html"> | ||
| 192 | + <ul class="uk-list station_info_win"> | ||
| 193 | + <li class="s_name">{{stationName}}</li> | ||
| 194 | + <li>站点编码: {{stationCode}}</li> | ||
| 195 | + <li>站点类型: | ||
| 196 | + {{if stationMark=='B'}} | ||
| 197 | + 起点站 | ||
| 198 | + {{else if stationMark=='E'}} | ||
| 199 | + 终点站 | ||
| 200 | + {{else if stationMark=='Z'}} | ||
| 201 | + 中途站 | ||
| 202 | + {{/if}} | ||
| 203 | + </li> | ||
| 204 | + <li> | ||
| 205 | + 经度: {{gLaty}} | ||
| 206 | + </li> | ||
| 207 | + <li>纬度: {{gLonx}}</li> | ||
| 208 | + <li> | ||
| 209 | + 电子围栏类型: | ||
| 210 | + {{if shapesType=='r'}} | ||
| 211 | + 圆形 | ||
| 212 | + {{else if shapesType=='d'}} | ||
| 213 | + 多边形 | ||
| 214 | + {{/if}} | ||
| 215 | + </li> | ||
| 216 | + <li> | ||
| 217 | + {{if shapesType=='r'}} | ||
| 218 | + 半径:{{radius}} | ||
| 219 | + {{/if}} | ||
| 220 | + </li> | ||
| 221 | + <li>站序:{{index + 1}}</li> | ||
| 222 | + <li>路由序号:{{stationRouteCode}}</li> | ||
| 223 | + </ul> | ||
| 224 | + </script> | ||
| 225 | + | ||
| 226 | + <script id="geo_d_e_map_edit_buffer_panel-temp" type="text/html"> | ||
| 227 | + <div class="buffer_edit_panel uk-animation-slide-top-small"> | ||
| 228 | + <div class="buffer_edit_body" > | ||
| 229 | + <h6 class="name">{{stationName}}(缓冲区编辑)</h6> | ||
| 230 | + <form> | ||
| 231 | + <input type="hidden" value="{{id}}" name="id"> | ||
| 232 | + <input type="hidden" value="{{directions}}" name="directions"> | ||
| 233 | + <input type="hidden" value="{{stationCode}}" name="stationCode"> | ||
| 234 | + <input type="hidden" value="{{stationName}}" name="stationName"> | ||
| 235 | + <div class="ct_row"> | ||
| 236 | + <div class="uk-inline"> | ||
| 237 | + <span class="uk-form-icon uk-form-icon-flip" >经度</span> | ||
| 238 | + <input class="uk-input" name="gLaty" type="text" value="{{bd_lat}}" readonly> | ||
| 239 | + </div> | ||
| 240 | + <div class="uk-inline"> | ||
| 241 | + <span class="uk-form-icon uk-form-icon-flip" >纬度</span> | ||
| 242 | + <input class="uk-input" name="gLonx" type="text" value="{{bd_lon}}" readonly> | ||
| 243 | + </div> | ||
| 244 | + </div> | ||
| 245 | + | ||
| 246 | + <div class="ct_row shapes_type {{shapesType=='d'?'st_d':''}}"> | ||
| 247 | + <div class="uk-inline" > | ||
| 248 | + <select name="shapesType" class="uk-select"> | ||
| 249 | + <option value="r" {{shapesType=='r'?'selected':''}}>圆形</option> | ||
| 250 | + <option value="d" {{shapesType=='d'?'selected':''}}>多边形</option> | ||
| 251 | + </select> | ||
| 252 | + <span class="draw_polygon_switch" data-type="1"><a>暂停绘制</a></span> | ||
| 253 | + </div> | ||
| 254 | + <div class="uk-inline"> | ||
| 255 | + <span class="uk-form-icon uk-form-icon-flip" >半径</span> | ||
| 256 | + <input class="uk-input" name="radius" type="text" value="{{radius}}"> | ||
| 257 | + </div> | ||
| 258 | + <div class="uk-inline btns"> | ||
| 259 | + <button class="uk-button uk-button-primary submit">确定</button> | ||
| 260 | + <button class="uk-button uk-button-default cancel">取消</button> | ||
| 261 | + </div> | ||
| 262 | + </div> | ||
| 263 | + </form> | ||
| 264 | + </div> | ||
| 265 | + </div> | ||
| 266 | + </script> | ||
| 267 | +>>>>>>> 5330d6cb797891dcb6c8a000004d51964e2bb71f | ||
| 173 | </div> | 268 | </div> |
| 174 | \ No newline at end of file | 269 | \ No newline at end of file |
src/main/resources/static/pages/base/geo_data_edit/js/common_data.js
| 1 | -<!-- 数据 --> | ||
| 2 | -var gb_common_data = function () { | ||
| 3 | - | ||
| 4 | - | ||
| 5 | - res_load_ep.emitLater('load_common_data'); | ||
| 6 | - return {}; | 1 | +<!-- 数据 --> |
| 2 | +var gb_common_data = function () { | ||
| 3 | + | ||
| 4 | + | ||
| 5 | + res_load_ep.emitLater('load_common_data'); | ||
| 6 | + return {}; | ||
| 7 | }(); | 7 | }(); |
| 8 | \ No newline at end of file | 8 | \ No newline at end of file |
src/main/resources/static/pages/base/geo_data_edit/js/history_edit_logs.js
| 1 | -<!-- 历史编辑日志 --> | ||
| 2 | - | ||
| 3 | -var gb_history_edit_logs = function () { | ||
| 4 | - | ||
| 5 | - | ||
| 6 | - res_load_ep.emitLater('load_history_edit_logs'); | ||
| 7 | - return {}; | 1 | +<!-- 历史编辑日志 --> |
| 2 | + | ||
| 3 | +var gb_history_edit_logs = function () { | ||
| 4 | + | ||
| 5 | + | ||
| 6 | + res_load_ep.emitLater('load_history_edit_logs'); | ||
| 7 | + return {}; | ||
| 8 | }(); | 8 | }(); |
| 9 | \ No newline at end of file | 9 | \ No newline at end of file |
src/main/resources/static/pages/base/geo_data_edit/js/map.js
| 1 | +<<<<<<< HEAD | ||
| 1 | <!-- 地图操作 --> | 2 | <!-- 地图操作 --> |
| 2 | 3 | ||
| 3 | var gb_ct_map = function () { | 4 | var gb_ct_map = function () { |
| @@ -574,4 +575,440 @@ var gb_ct_map = function () { | @@ -574,4 +575,440 @@ var gb_ct_map = function () { | ||
| 574 | map_status = 0; | 575 | map_status = 0; |
| 575 | } | 576 | } |
| 576 | }; | 577 | }; |
| 578 | +======= | ||
| 579 | +<!-- 地图操作 --> | ||
| 580 | + | ||
| 581 | +var gb_ct_map = function () { | ||
| 582 | + | ||
| 583 | + //初始化地图 | ||
| 584 | + if(!window.BMap){ | ||
| 585 | + alert('地图没有加载成功,请确认是否能正常连接外网!!'); | ||
| 586 | + } | ||
| 587 | + var gb_map_consts = { | ||
| 588 | + mapContainer: '#map_wrap', | ||
| 589 | + center_point: { | ||
| 590 | + lng: 121.544336, | ||
| 591 | + lat: 31.221315 | ||
| 592 | + } | ||
| 593 | + }; | ||
| 594 | + | ||
| 595 | + /** | ||
| 596 | + * 地图状态 | ||
| 597 | + * 1: 站点缓冲区编辑 | ||
| 598 | + */ | ||
| 599 | + var map_status=0; | ||
| 600 | + var editCircle; | ||
| 601 | + var editPolygon; | ||
| 602 | + | ||
| 603 | + map = new BMap.Map($(gb_map_consts.mapContainer)[0], {enableMapClick: false}); | ||
| 604 | + //中心点和缩放级别 | ||
| 605 | + map.centerAndZoom(new BMap.Point(gb_map_consts.center_point.lng, gb_map_consts.center_point.lat), 14); | ||
| 606 | + map.enableScrollWheelZoom(); | ||
| 607 | + | ||
| 608 | + var roadPolylines = [], stationMarkers=[]; | ||
| 609 | + var _render = function (cb) { | ||
| 610 | + //绘制路段 | ||
| 611 | + _renderRoads(gb_road_route.getData()); | ||
| 612 | + //绘制站点 | ||
| 613 | + _renderStation(gb_station_route.getData()); | ||
| 614 | + | ||
| 615 | + changeUpDown(); | ||
| 616 | + | ||
| 617 | + //居中至上行中间站点 | ||
| 618 | + var cm = stationMarkers[0][parseInt(stationMarkers[0].length / 2)]; | ||
| 619 | + map.setCenter(cm.point); | ||
| 620 | + | ||
| 621 | + cb && cb(); | ||
| 622 | + }; | ||
| 623 | + | ||
| 624 | + var updownColor = function (updown) { | ||
| 625 | + return updown==0?'blue':'red'; | ||
| 626 | + }; | ||
| 627 | + var _renderRoads = function (data) { | ||
| 628 | + _renderPolyline(data[0], updownColor(0));//上行路段 | ||
| 629 | + _renderPolyline(data[1], updownColor(1));//下行路段 | ||
| 630 | + }; | ||
| 631 | + | ||
| 632 | + var _renderStation = function (data) { | ||
| 633 | + _renderStationMarket(data[0]);//上行站点 | ||
| 634 | + _renderStationMarket(data[1]);//下行站点 | ||
| 635 | + }; | ||
| 636 | + | ||
| 637 | + var _renderStationMarket = function (routes, color) { | ||
| 638 | + var marker; | ||
| 639 | + var array=[]; | ||
| 640 | + $.each(routes, function (i) { | ||
| 641 | + this.index = i; | ||
| 642 | + transCoord(this); | ||
| 643 | + marker=createStationMark(this); | ||
| 644 | + marker.stationCode = this.stationCode; | ||
| 645 | + marker.ct_data = this; | ||
| 646 | + map.addOverlay(marker); | ||
| 647 | + | ||
| 648 | + array.push(marker); | ||
| 649 | + }); | ||
| 650 | + | ||
| 651 | + stationMarkers.push(array); | ||
| 652 | + }; | ||
| 653 | + | ||
| 654 | + function transCoord(obj) { | ||
| 655 | + var coord = TransGPS.wgsToBD(obj.gLaty, obj.gLonx); | ||
| 656 | + obj.bd_lat = coord.lat; | ||
| 657 | + obj.bd_lon = coord.lng; | ||
| 658 | + } | ||
| 659 | + | ||
| 660 | + var _renderPolyline = function (routes, color) { | ||
| 661 | + var pos, temps; | ||
| 662 | + var polyline, _pLines=[]; | ||
| 663 | + var style = {strokeWeight:7, strokeColor: color, strokeOpacity: .7}; | ||
| 664 | + $.each(routes, function (i, item) { | ||
| 665 | + | ||
| 666 | + pos = []; | ||
| 667 | + $.each(item.bdCoords, function () { | ||
| 668 | + temps = this.split(' '); | ||
| 669 | + pos.push(new BMap.Point(temps[0], temps[1])); | ||
| 670 | + }); | ||
| 671 | + polyline = new BMap.Polyline(pos, style); | ||
| 672 | + polyline.ct_data = item; | ||
| 673 | + polyline.ct_data.oldColor = color; | ||
| 674 | + map.addOverlay(polyline); | ||
| 675 | + | ||
| 676 | + polyline.addEventListener('mouseover', function(){ | ||
| 677 | + this.setStrokeColor('#20bd26'); | ||
| 678 | + }); | ||
| 679 | + polyline.addEventListener('mouseout', function(){ | ||
| 680 | + if(this!=road_win_show_p) | ||
| 681 | + this.setStrokeColor(color); | ||
| 682 | + }); | ||
| 683 | + polyline.addEventListener('click', function(e){ | ||
| 684 | + if(map_status!=1) | ||
| 685 | + openRoadInfoWin(this, e.point); | ||
| 686 | + }); | ||
| 687 | + _pLines.push(polyline); | ||
| 688 | + }); | ||
| 689 | + | ||
| 690 | + roadPolylines.push(_pLines); | ||
| 691 | + }; | ||
| 692 | + | ||
| 693 | + var road_win_show_p; | ||
| 694 | + function openRoadInfoWin(p, point) { | ||
| 695 | + var data = p.ct_data; | ||
| 696 | + var win = new BMap.InfoWindow(gb_road_route.getTemps()['geo_d_e_road_info_win-temp'](data)); | ||
| 697 | + | ||
| 698 | + //close event | ||
| 699 | + win.addEventListener('close', function (e) { | ||
| 700 | + p.setStrokeColor(p.ct_data.oldColor); | ||
| 701 | + gb_road_route.clearFocus(); | ||
| 702 | + road_win_show_p = null; | ||
| 703 | + }); | ||
| 704 | + //open event | ||
| 705 | + win.addEventListener('open', function (e) { | ||
| 706 | + gb_road_route.focus(data); | ||
| 707 | + p.setStrokeColor('#20bd26'); | ||
| 708 | + road_win_show_p = p; | ||
| 709 | + }); | ||
| 710 | + | ||
| 711 | + map.openInfoWindow(win, point); | ||
| 712 | + } | ||
| 713 | + | ||
| 714 | + function createStationMark(statio) { | ||
| 715 | + var point = new BMap.Point(statio.bd_lon, statio.bd_lat); | ||
| 716 | + var marker = new BMap.Marker(point); | ||
| 717 | + | ||
| 718 | + //根据站点名称 计算marker 宽度 | ||
| 719 | + var w = statio.stationName.length * 12 + 38 | ||
| 720 | + ,iw=w-2; | ||
| 721 | + var icon = new BMap.Icon(createStationIcon(statio, w), new BMap.Size(iw,24), {anchor: new BMap.Size(iw/2,25)}) | ||
| 722 | + marker.setIcon(icon); | ||
| 723 | + marker.setShadow(null); | ||
| 724 | + //信息窗口 | ||
| 725 | + //var infoWin=new BMap.InfoWindow(gb_station_route.getTemps()['geo_d_e_station_info_win-temp'](statio), {offset: new BMap.Size(0,-13)}); | ||
| 726 | + //infoWin.ct_data = statio;//绑定数据 | ||
| 727 | + //marker.infoWin = infoWin; | ||
| 728 | + marker.addEventListener('click', function(){ | ||
| 729 | + if(map_status!=1) | ||
| 730 | + openStationInfoWin(this); | ||
| 731 | + //map.openInfoWindow(this.infoWin, this.point); | ||
| 732 | + }); | ||
| 733 | + //close event | ||
| 734 | + /*infoWin.addEventListener('close', function (e) { | ||
| 735 | + //if(map_status!=1) | ||
| 736 | + gb_station_route.clearFocus(); | ||
| 737 | + }); | ||
| 738 | + //open event | ||
| 739 | + infoWin.addEventListener('open', function (e) { | ||
| 740 | + gb_station_route.focus(this.ct_data); | ||
| 741 | + });*/ | ||
| 742 | + | ||
| 743 | + //mouseover | ||
| 744 | + marker.addEventListener('mouseover', function(){ | ||
| 745 | + setTop(this); | ||
| 746 | + }); | ||
| 747 | + return marker; | ||
| 748 | + } | ||
| 749 | + | ||
| 750 | + var openStationInfoWin = function (m) { | ||
| 751 | + //ct_data | ||
| 752 | + var win=new BMap.InfoWindow(gb_station_route.getTemps()['geo_d_e_station_info_win-temp'](m.ct_data), {offset: new BMap.Size(0,-13)}); | ||
| 753 | + //close event | ||
| 754 | + win.addEventListener('close', function (e) { | ||
| 755 | + gb_station_route.clearFocus(); | ||
| 756 | + }); | ||
| 757 | + //open event | ||
| 758 | + win.addEventListener('open', function (e) { | ||
| 759 | + gb_station_route.focus(m.ct_data); | ||
| 760 | + }); | ||
| 761 | + | ||
| 762 | + map.openInfoWindow(win, m.point); | ||
| 763 | + }; | ||
| 764 | + | ||
| 765 | + //绘制站点icon | ||
| 766 | + function createStationIcon(station, w) { | ||
| 767 | + var canvas = $('<canvas></canvas>')[0]; | ||
| 768 | + var ctx = canvas.getContext('2d'); | ||
| 769 | + | ||
| 770 | + var bg = station.directions == 0 ? '#5757fc' : '#fc4c4c'; | ||
| 771 | + //矩形 | ||
| 772 | + //ctx.roundRect(0, 0, w, 17, 1).stroke(); | ||
| 773 | + ctx.lineWidth="3"; | ||
| 774 | + ctx.rect(0, 0, w - 2, 19); | ||
| 775 | + ctx.fillStyle = '#fff'; | ||
| 776 | + ctx.fill(); | ||
| 777 | + ctx.strokeStyle = bg; | ||
| 778 | + ctx.stroke(); | ||
| 779 | + ctx.lineWidth="1"; | ||
| 780 | + | ||
| 781 | + //文字 | ||
| 782 | + ctx.font = "12px arial"; | ||
| 783 | + ctx.fillStyle = '#000'; | ||
| 784 | + ctx.fillText(station.stationName, 27, 14); | ||
| 785 | + | ||
| 786 | + //序号 | ||
| 787 | + ctx.beginPath(); | ||
| 788 | + ctx.rect(0, 0, 20, 19); | ||
| 789 | + ctx.fillStyle = bg; | ||
| 790 | + ctx.fill(); | ||
| 791 | + | ||
| 792 | + ctx.font = "12px arial"; | ||
| 793 | + ctx.fillStyle = '#fff'; | ||
| 794 | + var i = station.index + 1; | ||
| 795 | + var left = (i + '').length > 1?3:7; | ||
| 796 | + ctx.fillText(i, left, 14); | ||
| 797 | + | ||
| 798 | + //角 | ||
| 799 | + var c = w / 2; | ||
| 800 | + ctx.beginPath(); | ||
| 801 | + ctx.moveTo(c - 7, 16); | ||
| 802 | + ctx.lineTo(c, 24); | ||
| 803 | + ctx.lineTo(c + 7, 16); | ||
| 804 | + ctx.closePath(); | ||
| 805 | + | ||
| 806 | + ctx.fillStyle = bg; | ||
| 807 | + ctx.fill(); | ||
| 808 | + ctx.strokeStyle = '#fff'; | ||
| 809 | + ctx.stroke(); | ||
| 810 | + return canvas.toDataURL(); | ||
| 811 | + } | ||
| 812 | + | ||
| 813 | + var changeUpDown = function () { | ||
| 814 | + var upDown = getUpDown(); | ||
| 815 | + $.each(roadPolylines[upDown==0?1:0], function () { | ||
| 816 | + this.hide(); | ||
| 817 | + }); | ||
| 818 | + $.each(roadPolylines[upDown], function () { | ||
| 819 | + this.show(); | ||
| 820 | + }); | ||
| 821 | + | ||
| 822 | + | ||
| 823 | + $.each(stationMarkers[upDown==0?1:0], function () { | ||
| 824 | + this.hide(); | ||
| 825 | + }); | ||
| 826 | + $.each(stationMarkers[upDown], function () { | ||
| 827 | + this.show(); | ||
| 828 | + }); | ||
| 829 | + }; | ||
| 830 | + | ||
| 831 | + /** | ||
| 832 | + * 定位到站点 | ||
| 833 | + * @param code | ||
| 834 | + */ | ||
| 835 | + var focusStation = function (code, updown) { | ||
| 836 | + var marker = getStationMarker(code, updown); | ||
| 837 | + if(marker){ | ||
| 838 | + openStationInfoWin(marker); | ||
| 839 | + } | ||
| 840 | + }; | ||
| 841 | + | ||
| 842 | + var getStationMarker = function (code, updown) { | ||
| 843 | + var array = stationMarkers[updown], | ||
| 844 | + marker; | ||
| 845 | + for(var i=0,m;m=array[i++];){ | ||
| 846 | + if(m.stationCode==code){ | ||
| 847 | + marker = m; | ||
| 848 | + break; | ||
| 849 | + } | ||
| 850 | + } | ||
| 851 | + return marker; | ||
| 852 | + } | ||
| 853 | + | ||
| 854 | + /** | ||
| 855 | + * 定位到路段 | ||
| 856 | + * @param code | ||
| 857 | + * @param updown | ||
| 858 | + */ | ||
| 859 | + var focusRoad = function (code, updown) { | ||
| 860 | + var array = roadPolylines[updown], | ||
| 861 | + polyline; | ||
| 862 | + for(var i=0,p;p=array[i++];){ | ||
| 863 | + if(p.ct_data.sectionCode==code){ | ||
| 864 | + polyline = p; | ||
| 865 | + break; | ||
| 866 | + } | ||
| 867 | + } | ||
| 868 | + | ||
| 869 | + var cp = calcCenterPoint(p.ct_data.bdCoords); | ||
| 870 | + openRoadInfoWin(p, new BMap.Point(cp.longitude, cp.latitude)); | ||
| 871 | + } | ||
| 872 | + | ||
| 873 | + var calcCenterPoint = function (coords) { | ||
| 874 | + var array = [], strs; | ||
| 875 | + for(var i=0,item;item=coords[i++];){ | ||
| 876 | + strs = item.split(' '); | ||
| 877 | + array.push({latitude: strs[1], longitude: strs[0]}); | ||
| 878 | + } | ||
| 879 | + | ||
| 880 | + return geolib.getCenter(array); | ||
| 881 | + } | ||
| 882 | + | ||
| 883 | + var exitEditBufferStatus = function (s) { | ||
| 884 | + map_status = 0; | ||
| 885 | + enabledOtherElem(); | ||
| 886 | + gb_station_route.hideEditPanel(); | ||
| 887 | + | ||
| 888 | + map.removeOverlay(editCircle); | ||
| 889 | + | ||
| 890 | + openStationInfoWin(getStationMarker(s.stationCode, s.directions)); | ||
| 891 | + }; | ||
| 892 | + | ||
| 893 | + /** | ||
| 894 | + * 编辑站点缓冲区 | ||
| 895 | + * @param station | ||
| 896 | + */ | ||
| 897 | + var editStationBuffer = function (s) { | ||
| 898 | + map_status = 1; | ||
| 899 | + map.closeInfoWindow();//关闭infoWindow | ||
| 900 | + gb_station_route.clearFocus(); | ||
| 901 | + gb_station_route.focus(s); | ||
| 902 | + clearOldOverlay(); | ||
| 903 | + disabledOtherElem(); | ||
| 904 | + gb_station_route.showEditPanel(s); | ||
| 905 | + | ||
| 906 | + var marker = getStationMarker(s.stationCode, s.directions); | ||
| 907 | + map.centerAndZoom(marker.point, 18); | ||
| 908 | + var bElem = openBufferOverlay(marker); | ||
| 909 | + | ||
| 910 | + if(s.shapesType=='r'){ | ||
| 911 | + //lineupdate | ||
| 912 | + bElem.addEventListener('lineupdate', function (e) { | ||
| 913 | + //console.log('lineupdatelineupdate', e); | ||
| 914 | + //var ec = e.target; | ||
| 915 | + //var radius = ec.getRadius().toFixed(2); | ||
| 916 | + //console.log('getRadius', ec.getRadius(), radius); | ||
| 917 | + gb_station_route.reWriteEditPanel(e.target); | ||
| 918 | + }); | ||
| 919 | + } | ||
| 920 | + }; | ||
| 921 | + | ||
| 922 | + var clearOldOverlay = function () { | ||
| 923 | + map.removeOverlay(editCircle); | ||
| 924 | + map.removeOverlay(editPolygon); | ||
| 925 | + } | ||
| 926 | + | ||
| 927 | + /** | ||
| 928 | + * 禁用其他元素 | ||
| 929 | + */ | ||
| 930 | + var disabledOtherElem = function () { | ||
| 931 | + $('.main_left_panel_m_layer').show(); | ||
| 932 | + } | ||
| 933 | + | ||
| 934 | + var enabledOtherElem = function () { | ||
| 935 | + $('.main_left_panel_m_layer').hide(); | ||
| 936 | + } | ||
| 937 | + | ||
| 938 | + var openBufferOverlay = function (m) { | ||
| 939 | + var elem; | ||
| 940 | + var data = m.ct_data; | ||
| 941 | + if(data.shapesType=='r'){ | ||
| 942 | + var circle = new BMap.Circle(m.point,data.radius, {strokeColor: '#E91E63'/*updownColor(data.directions)*/}); | ||
| 943 | + map.addOverlay(circle); | ||
| 944 | + circle.enableEditing(); | ||
| 945 | + } | ||
| 946 | + editCircle = circle; | ||
| 947 | + return circle; | ||
| 948 | + }; | ||
| 949 | + | ||
| 950 | + /** | ||
| 951 | + * 更新站点 | ||
| 952 | + * @param s | ||
| 953 | + */ | ||
| 954 | + function updateStation(s) { | ||
| 955 | + var m = getStationMarker(s.stationCode, s.directions); | ||
| 956 | + //更新位置 | ||
| 957 | + transCoord(s); | ||
| 958 | + m.ct_data = s; | ||
| 959 | + m.setPosition(new BMap.Point(s.bd_lon, s.bd_lat)); | ||
| 960 | + } | ||
| 961 | + | ||
| 962 | + var topOverlay; | ||
| 963 | + function setTop(overlay){ | ||
| 964 | + if(topOverlay) | ||
| 965 | + topOverlay.setTop(false); | ||
| 966 | + overlay.setTop(true); | ||
| 967 | + topOverlay = overlay; | ||
| 968 | + } | ||
| 969 | + | ||
| 970 | + /** | ||
| 971 | + * 切换缓冲区类型 | ||
| 972 | + * @param v | ||
| 973 | + */ | ||
| 974 | + var _drawingManager; | ||
| 975 | + var changeShapeType = function (v) { | ||
| 976 | + if(v == 'd'){ | ||
| 977 | + map.removeOverlay(editCircle); | ||
| 978 | + | ||
| 979 | + _drawingManager = new BMapLib.DrawingManager(map,{}); | ||
| 980 | + _drawingManager.open(); | ||
| 981 | + _drawingManager.setDrawingMode('polygon'); | ||
| 982 | + | ||
| 983 | + //绘制结束事件 | ||
| 984 | + _drawingManager.addEventListener('polygoncomplete', function (e) { | ||
| 985 | + console.log('end ', e); | ||
| 986 | + gb_station_route.drawEnd(); | ||
| 987 | + }); | ||
| 988 | + } | ||
| 989 | + }; | ||
| 990 | + | ||
| 991 | + var exitDrawStatus = function () { | ||
| 992 | + if(_drawingManager) | ||
| 993 | + _drawingManager.close(); | ||
| 994 | + }; | ||
| 995 | + | ||
| 996 | + var openDrawStatus = function () { | ||
| 997 | + if(_drawingManager) | ||
| 998 | + _drawingManager.open(); | ||
| 999 | + }; | ||
| 1000 | + res_load_ep.emitLater('load_map'); | ||
| 1001 | + return { | ||
| 1002 | + _render: _render, | ||
| 1003 | + changeUpDown:changeUpDown, | ||
| 1004 | + focusStation: focusStation, | ||
| 1005 | + focusRoad: focusRoad, | ||
| 1006 | + editStationBuffer: editStationBuffer, | ||
| 1007 | + updateStation: updateStation, | ||
| 1008 | + exitEditBufferStatus: exitEditBufferStatus, | ||
| 1009 | + changeShapeType: changeShapeType, | ||
| 1010 | + exitDrawStatus: exitDrawStatus, | ||
| 1011 | + openDrawStatus: openDrawStatus | ||
| 1012 | + }; | ||
| 1013 | +>>>>>>> 5330d6cb797891dcb6c8a000004d51964e2bb71f | ||
| 577 | }(); | 1014 | }(); |
| 578 | \ No newline at end of file | 1015 | \ No newline at end of file |
src/main/resources/static/pages/base/geo_data_edit/js/road_route.js
| 1 | -<!-- 路段路由 --> | ||
| 2 | -var gb_road_route = function () { | ||
| 3 | - | ||
| 4 | - var temps; | ||
| 5 | - var road_maps; | ||
| 6 | - //绘制线路路由 | ||
| 7 | - var init = function (cb) { | ||
| 8 | - var lineCode = storage.getItem("geo_data_edit_line_code"); | ||
| 9 | - | ||
| 10 | - var ep = EventProxy.create("data", "temp", function (data, temp) { | ||
| 11 | - road_maps = data; | ||
| 12 | - temps = temp; | ||
| 13 | - console.log('roads', road_maps); | ||
| 14 | - | ||
| 15 | - //按顺序,名称分组 | ||
| 16 | - var ups = _group(road_maps[0]); | ||
| 17 | - var downs = _group(road_maps[1]); | ||
| 18 | - console.log('upsupsups', ups, 'downsdownsdowns', downs); | ||
| 19 | - //渲染 | ||
| 20 | - var upHtmlStr = temps['geo_d_e_road_route-temp']({list: ups}); | ||
| 21 | - $('.up_down_route_list>li:first>.road_route').html(upHtmlStr); | ||
| 22 | - var downHtmlStr = temps['geo_d_e_road_route-temp']({list: downs}); | ||
| 23 | - $('.up_down_route_list>li:last>.road_route').html(downHtmlStr); | ||
| 24 | - | ||
| 25 | - cb && cb(); | ||
| 26 | - }); | ||
| 27 | - | ||
| 28 | - //加载数据 | ||
| 29 | - gb_common.$get('/_geo_data/findGeoRoad', {lineCode: lineCode}, function (rs) { | ||
| 30 | - rs.list.sort(function (a, b) { | ||
| 31 | - return parseInt(a.sectionrouteCode) - parseInt(b.sectionrouteCode); | ||
| 32 | - }); | ||
| 33 | - ep.emit('data', gb_common.groupBy(rs.list, 'directions')); | ||
| 34 | - }); | ||
| 35 | - | ||
| 36 | - //加载模板片段 | ||
| 37 | - $.get('/pages/base/geo_data_edit/fragments/f_road_route.html', function (dom) { | ||
| 38 | - ep.emit('temp', gb_common.compileTempByDom(dom, { | ||
| 39 | - compress: true | ||
| 40 | - })); | ||
| 41 | - }); | ||
| 42 | - }; | ||
| 43 | - | ||
| 44 | - //路段单击 | ||
| 45 | - $('.up_down_route_list>li>.road_route').on('click', 'a[data-code]', function () { | ||
| 46 | - var code = $(this).data('code'), | ||
| 47 | - updown = $(this).data('updown'); | ||
| 48 | - | ||
| 49 | - clearFocus(); | ||
| 50 | - gb_ct_map.focusRoad(code, updown); | ||
| 51 | - }); | ||
| 52 | - | ||
| 53 | - var _group = function (list) { | ||
| 54 | - var rs = [], tempArr = []; | ||
| 55 | - | ||
| 56 | - var name; | ||
| 57 | - for (var i = 0, obj; obj = list[i++];) { | ||
| 58 | - if (name && name != obj.sectionName) { | ||
| 59 | - rs.push(tempArr); | ||
| 60 | - tempArr = []; | ||
| 61 | - } | ||
| 62 | - tempArr.push(obj); | ||
| 63 | - name = obj.sectionName | ||
| 64 | - } | ||
| 65 | - return rs; | ||
| 66 | - }; | ||
| 67 | - | ||
| 68 | - var clearFocus = function () { | ||
| 69 | - $('.up_down_route_list>li>.road_route li.ct_active').removeClass('ct_active'); | ||
| 70 | - }; | ||
| 71 | - | ||
| 72 | - var focus = function (data) { | ||
| 73 | - //sectionCode | ||
| 74 | - var elem = $('.up_down_route_list>li>.road_route .road_li_' + data.sectionCode); | ||
| 75 | - elem.addClass('ct_active'); | ||
| 76 | - | ||
| 77 | - if (!isShow(elem)) { | ||
| 78 | - //定位滚动条 | ||
| 79 | - var cont = $('.up_down_route_list'), | ||
| 80 | - diff = cont.height() / 2; | ||
| 81 | - cont.animate({ | ||
| 82 | - scrollTop: elem.offset().top - cont.offset().top + cont.scrollTop() - diff | ||
| 83 | - }, 500); | ||
| 84 | - } | ||
| 85 | - }; | ||
| 86 | - | ||
| 87 | - var isShow = function (elem) { | ||
| 88 | - var wrap = $('.up_down_route_list'); | ||
| 89 | - return elem.offset().top < wrap.height() + 122 && elem.offset().top > 122; | ||
| 90 | - }; | ||
| 91 | - | ||
| 92 | - res_load_ep.emitLater('load_road_route'); | ||
| 93 | - return { | ||
| 94 | - init: init, getData: function () { | ||
| 95 | - return road_maps; | ||
| 96 | - }, | ||
| 97 | - getTemps: function () { | ||
| 98 | - return temps; | ||
| 99 | - }, | ||
| 100 | - clearFocus: clearFocus, | ||
| 101 | - focus: focus | ||
| 102 | - }; | 1 | +<!-- 路段路由 --> |
| 2 | +var gb_road_route = function () { | ||
| 3 | + | ||
| 4 | + var temps; | ||
| 5 | + var road_maps; | ||
| 6 | + //绘制线路路由 | ||
| 7 | + var init = function (cb) { | ||
| 8 | + var lineCode = storage.getItem("geo_data_edit_line_code"); | ||
| 9 | + | ||
| 10 | + var ep = EventProxy.create("data", "temp", function (data, temp) { | ||
| 11 | + road_maps = data; | ||
| 12 | + temps = temp; | ||
| 13 | + console.log('roads', road_maps); | ||
| 14 | + | ||
| 15 | + //按顺序,名称分组 | ||
| 16 | + var ups = _group(road_maps[0]); | ||
| 17 | + var downs = _group(road_maps[1]); | ||
| 18 | + console.log('upsupsups', ups, 'downsdownsdowns', downs); | ||
| 19 | + //渲染 | ||
| 20 | + var upHtmlStr = temps['geo_d_e_road_route-temp']({list: ups}); | ||
| 21 | + $('.up_down_route_list>li:first>.road_route').html(upHtmlStr); | ||
| 22 | + var downHtmlStr = temps['geo_d_e_road_route-temp']({list: downs}); | ||
| 23 | + $('.up_down_route_list>li:last>.road_route').html(downHtmlStr); | ||
| 24 | + | ||
| 25 | + cb && cb(); | ||
| 26 | + }); | ||
| 27 | + | ||
| 28 | + //加载数据 | ||
| 29 | + gb_common.$get('/_geo_data/findGeoRoad', {lineCode: lineCode}, function (rs) { | ||
| 30 | + rs.list.sort(function (a, b) { | ||
| 31 | + return parseInt(a.sectionrouteCode) - parseInt(b.sectionrouteCode); | ||
| 32 | + }); | ||
| 33 | + ep.emit('data', gb_common.groupBy(rs.list, 'directions')); | ||
| 34 | + }); | ||
| 35 | + | ||
| 36 | + //加载模板片段 | ||
| 37 | + $.get('/pages/base/geo_data_edit/fragments/f_road_route.html', function (dom) { | ||
| 38 | + ep.emit('temp', gb_common.compileTempByDom(dom, { | ||
| 39 | + compress: true | ||
| 40 | + })); | ||
| 41 | + }); | ||
| 42 | + }; | ||
| 43 | + | ||
| 44 | + //路段单击 | ||
| 45 | + $('.up_down_route_list>li>.road_route').on('click', 'a[data-code]', function () { | ||
| 46 | + var code = $(this).data('code'), | ||
| 47 | + updown = $(this).data('updown'); | ||
| 48 | + | ||
| 49 | + clearFocus(); | ||
| 50 | + gb_ct_map.focusRoad(code, updown); | ||
| 51 | + }); | ||
| 52 | + | ||
| 53 | + var _group = function (list) { | ||
| 54 | + var rs = [], tempArr = []; | ||
| 55 | + | ||
| 56 | + var name; | ||
| 57 | + for (var i = 0, obj; obj = list[i++];) { | ||
| 58 | + if (name && name != obj.sectionName) { | ||
| 59 | + rs.push(tempArr); | ||
| 60 | + tempArr = []; | ||
| 61 | + } | ||
| 62 | + tempArr.push(obj); | ||
| 63 | + name = obj.sectionName | ||
| 64 | + } | ||
| 65 | + return rs; | ||
| 66 | + }; | ||
| 67 | + | ||
| 68 | + var clearFocus = function () { | ||
| 69 | + $('.up_down_route_list>li>.road_route li.ct_active').removeClass('ct_active'); | ||
| 70 | + }; | ||
| 71 | + | ||
| 72 | + var focus = function (data) { | ||
| 73 | + //sectionCode | ||
| 74 | + var elem = $('.up_down_route_list>li>.road_route .road_li_' + data.sectionCode); | ||
| 75 | + elem.addClass('ct_active'); | ||
| 76 | + | ||
| 77 | + if (!isShow(elem)) { | ||
| 78 | + //定位滚动条 | ||
| 79 | + var cont = $('.up_down_route_list'), | ||
| 80 | + diff = cont.height() / 2; | ||
| 81 | + cont.animate({ | ||
| 82 | + scrollTop: elem.offset().top - cont.offset().top + cont.scrollTop() - diff | ||
| 83 | + }, 500); | ||
| 84 | + } | ||
| 85 | + }; | ||
| 86 | + | ||
| 87 | + var isShow = function (elem) { | ||
| 88 | + var wrap = $('.up_down_route_list'); | ||
| 89 | + return elem.offset().top < wrap.height() + 122 && elem.offset().top > 122; | ||
| 90 | + }; | ||
| 91 | + | ||
| 92 | + res_load_ep.emitLater('load_road_route'); | ||
| 93 | + return { | ||
| 94 | + init: init, getData: function () { | ||
| 95 | + return road_maps; | ||
| 96 | + }, | ||
| 97 | + getTemps: function () { | ||
| 98 | + return temps; | ||
| 99 | + }, | ||
| 100 | + clearFocus: clearFocus, | ||
| 101 | + focus: focus | ||
| 102 | + }; | ||
| 103 | }(); | 103 | }(); |
| 104 | \ No newline at end of file | 104 | \ No newline at end of file |
src/main/resources/static/pages/base/geo_data_edit/js/station_route.js
| 1 | +<<<<<<< HEAD | ||
| 1 | <!-- 站点路由 --> | 2 | <!-- 站点路由 --> |
| 2 | var gb_station_route = function () { | 3 | var gb_station_route = function () { |
| 3 | 4 | ||
| @@ -312,4 +313,231 @@ var gb_station_route = function () { | @@ -312,4 +313,231 @@ var gb_station_route = function () { | ||
| 312 | return realEditStation; | 313 | return realEditStation; |
| 313 | } | 314 | } |
| 314 | }; | 315 | }; |
| 316 | +======= | ||
| 317 | +<!-- 站点路由 --> | ||
| 318 | +var gb_station_route = function () { | ||
| 319 | + | ||
| 320 | + var temps; | ||
| 321 | + var station_maps; | ||
| 322 | + //绘制线路路由 | ||
| 323 | + var init = function (cb) { | ||
| 324 | + var lineCode = storage.getItem("geo_data_edit_line_code"); | ||
| 325 | + | ||
| 326 | + var ep = EventProxy.create("data", "temp", function (data, temp) { | ||
| 327 | + station_maps = data; | ||
| 328 | + temps = temp; | ||
| 329 | + console.log('station', station_maps); | ||
| 330 | + //渲染页面 | ||
| 331 | + var upHtmlStr = temps['geo_d_e_station_route-temp']({list: station_maps[0]}); | ||
| 332 | + $('.up_down_route_list>li:first>.station_route').html(upHtmlStr); | ||
| 333 | + var downHtmlStr = temps['geo_d_e_station_route-temp']({list: station_maps[1]}); | ||
| 334 | + $('.up_down_route_list>li:last>.station_route').html(downHtmlStr); | ||
| 335 | + | ||
| 336 | + cb && cb(); | ||
| 337 | + }); | ||
| 338 | + | ||
| 339 | + //加载数据 | ||
| 340 | + gb_common.$get('/_geo_data/findGeoStations', {lineCode: lineCode}, function (rs) { | ||
| 341 | + rs.list.sort(function (a, b) { | ||
| 342 | + return parseInt(a.stationRouteCode) - parseInt(b.stationRouteCode); | ||
| 343 | + }); | ||
| 344 | + ep.emit('data', gb_common.groupBy(rs.list, 'directions')); | ||
| 345 | + }); | ||
| 346 | + | ||
| 347 | + //加载模板片段 | ||
| 348 | + $.get('/pages/base/geo_data_edit/fragments/f_station_route.html', function (dom) { | ||
| 349 | + ep.emit('temp', gb_common.compileTempByDom(dom, { | ||
| 350 | + compress: true | ||
| 351 | + })); | ||
| 352 | + }); | ||
| 353 | + }; | ||
| 354 | + | ||
| 355 | + //站点单击 | ||
| 356 | + $('.up_down_route_list>li>.station_route').on('click', 'a[data-code]', function () { | ||
| 357 | + var code = $(this).data('code'), | ||
| 358 | + updown = $(this).data('updown'); | ||
| 359 | + | ||
| 360 | + clearFocus(); | ||
| 361 | + gb_ct_map.focusStation(code, updown); | ||
| 362 | + }); | ||
| 363 | + | ||
| 364 | + var clearFocus = function () { | ||
| 365 | + $('.up_down_route_list>li>.station_route li.ct_active').removeClass('ct_active'); | ||
| 366 | + }; | ||
| 367 | + | ||
| 368 | + var focus = function (s) { | ||
| 369 | + var elem = $('.up_down_route_list>li>.station_route .station_li_' + s.stationCode); | ||
| 370 | + elem.addClass('ct_active'); | ||
| 371 | + | ||
| 372 | + if (!isShow(elem)) { | ||
| 373 | + //定位滚动条 | ||
| 374 | + var cont = $('.up_down_route_list'), | ||
| 375 | + diff = cont.height() / 2; | ||
| 376 | + cont.animate({ | ||
| 377 | + scrollTop: elem.offset().top - cont.offset().top + cont.scrollTop() - diff | ||
| 378 | + }, 500); | ||
| 379 | + } | ||
| 380 | + }; | ||
| 381 | + | ||
| 382 | + var isShow = function (elem) { | ||
| 383 | + var wrap = $('.up_down_route_list'); | ||
| 384 | + return elem.offset().top < wrap.height() + 122 && elem.offset().top > 122; | ||
| 385 | + }; | ||
| 386 | + | ||
| 387 | + var getStation = function (code, updown) { | ||
| 388 | + var array = station_maps[updown]; | ||
| 389 | + for(var i=0,s;s=array[i++];){ | ||
| 390 | + if(s.stationCode==code) | ||
| 391 | + return s; | ||
| 392 | + } | ||
| 393 | + return null; | ||
| 394 | + }; | ||
| 395 | + | ||
| 396 | + var callbackHandler = { | ||
| 397 | + edit_buffer: function (station) { | ||
| 398 | + //编辑缓冲区 | ||
| 399 | + gb_ct_map.editStationBuffer(station); | ||
| 400 | + } | ||
| 401 | + }; | ||
| 402 | + | ||
| 403 | + $.contextMenu({ | ||
| 404 | + selector: '._route_info_wrap .up_down_route_list .station_route>ul>li', | ||
| 405 | + className: 'station-route-ct-menu', | ||
| 406 | + callback: function (key, options) { | ||
| 407 | + var aLink = options.$trigger.find('a[data-code]'); | ||
| 408 | + var code = aLink.data('code'), | ||
| 409 | + updown = aLink.data('updown'); | ||
| 410 | + var station = getStation(code, updown); | ||
| 411 | + callbackHandler[key] && callbackHandler[key](station); | ||
| 412 | + }, | ||
| 413 | + items: { | ||
| 414 | + 'edit_buffer': { | ||
| 415 | + name: '编辑缓冲区' | ||
| 416 | + }, | ||
| 417 | + 'sep1': '---------', | ||
| 418 | + 'edit': { | ||
| 419 | + name: '编辑基础信息' | ||
| 420 | + }, | ||
| 421 | + 'insert_before': { | ||
| 422 | + name: '新增站点(前)' | ||
| 423 | + }, | ||
| 424 | + 'insert_after': { | ||
| 425 | + name: '新增站点(后)' | ||
| 426 | + } | ||
| 427 | + } | ||
| 428 | + }); | ||
| 429 | + | ||
| 430 | + var showEditPanel = function (s) { | ||
| 431 | + var htmlStr = temps['geo_d_e_map_edit_buffer_panel-temp'](s); | ||
| 432 | + $('.ct_page').append(htmlStr); | ||
| 433 | + $('.buffer_edit_panel').show(); | ||
| 434 | + }; | ||
| 435 | + | ||
| 436 | + var hideEditPanel = function () { | ||
| 437 | + $('.buffer_edit_panel').remove(); | ||
| 438 | + }; | ||
| 439 | + | ||
| 440 | + var edPanelRunFlag; | ||
| 441 | + var ecObj; | ||
| 442 | + var reWriteEditPanel = function (ec) { | ||
| 443 | + if(edPanelRunFlag){ | ||
| 444 | + ecObj = ec; | ||
| 445 | + return; | ||
| 446 | + } | ||
| 447 | + | ||
| 448 | + edPanelRunFlag = true; | ||
| 449 | + setTimeout(function () { | ||
| 450 | + var panel = $('.buffer_edit_panel'); | ||
| 451 | + $('[name=radius]', panel).val(parseInt(ecObj.getRadius()));//半径 | ||
| 452 | + | ||
| 453 | + var p = ecObj.getCenter(); | ||
| 454 | + $('[name=gLaty]', panel).val(p.lat); | ||
| 455 | + $('[name=gLonx]', panel).val(p.lng); | ||
| 456 | + edPanelRunFlag = false; | ||
| 457 | + }, 170); | ||
| 458 | + }; | ||
| 459 | + | ||
| 460 | + var update = function (s) { | ||
| 461 | + var array = station_maps[s.directions]; | ||
| 462 | + for(var i=0,item; item=array[i++];){ | ||
| 463 | + if(item.stationCode==s.stationCode){ | ||
| 464 | + s.index = i; | ||
| 465 | + array.splice(i, 1, s); | ||
| 466 | + break; | ||
| 467 | + } | ||
| 468 | + } | ||
| 469 | + }; | ||
| 470 | + | ||
| 471 | + /** | ||
| 472 | + * 缓冲区编辑 取消 | ||
| 473 | + */ | ||
| 474 | + $(document).on('click', '.buffer_edit_panel>.buffer_edit_body button.cancel', function (e) { | ||
| 475 | + var f = $(this).parents('form'); | ||
| 476 | + var data = f.serializeJSON(); | ||
| 477 | + | ||
| 478 | + gb_ct_map.exitEditBufferStatus(data); | ||
| 479 | + }); | ||
| 480 | + | ||
| 481 | + /** | ||
| 482 | + * 缓冲区编辑 切换缓冲区类型(圆形,多边形) | ||
| 483 | + */ | ||
| 484 | + $(document).on('click', '.buffer_edit_panel>.buffer_edit_body select[name=shapesType]', function (e) { | ||
| 485 | + var v = $(this).val(); | ||
| 486 | + | ||
| 487 | + gb_ct_map.changeShapeType(v); | ||
| 488 | + if(v=='d'){ | ||
| 489 | + $('.buffer_edit_panel .shapes_type').addClass('st_d'); | ||
| 490 | + | ||
| 491 | + | ||
| 492 | + // | ||
| 493 | + //UIkit.notification("使用鼠标在地图上绘制多边形,可点击上发“暂停绘制”链接,退出绘制模式,以拖拽地图", {status: 'primary', pos: 'bottom-center'}) | ||
| 494 | + } | ||
| 495 | + else{ | ||
| 496 | + $('.buffer_edit_panel .shapes_type').removeClass('st_d'); | ||
| 497 | + } | ||
| 498 | + }); | ||
| 499 | + | ||
| 500 | + /** | ||
| 501 | + * 缓冲区编辑 切换绘制模式 | ||
| 502 | + */ | ||
| 503 | + var drawPolygonSwitch = '.buffer_edit_panel>.buffer_edit_body .draw_polygon_switch'; | ||
| 504 | + $(document).on('click', drawPolygonSwitch, function (e) { | ||
| 505 | + var type = $(this).data('type'); | ||
| 506 | + if(type==1){ | ||
| 507 | + //退出绘制状态 | ||
| 508 | + gb_ct_map.exitDrawStatus(); | ||
| 509 | + $(this).data('type', 0).find('a').text('开始绘制'); | ||
| 510 | + } | ||
| 511 | + else if(type==0 || type==2){ | ||
| 512 | + gb_ct_map.openDrawStatus(); | ||
| 513 | + $(this).data('type', 1).find('a').text('暂停绘制'); | ||
| 514 | + } | ||
| 515 | + }); | ||
| 516 | + | ||
| 517 | + /** | ||
| 518 | + * 绘制结束 | ||
| 519 | + */ | ||
| 520 | + var drawEnd = function () { | ||
| 521 | + $(drawPolygonSwitch).data('type', 2).find('a').text('重新绘制'); | ||
| 522 | + }; | ||
| 523 | + | ||
| 524 | + | ||
| 525 | + res_load_ep.emitLater('load_station_route'); | ||
| 526 | + return { | ||
| 527 | + init: init, | ||
| 528 | + getData: function () { | ||
| 529 | + return station_maps; | ||
| 530 | + }, | ||
| 531 | + getTemps: function () { | ||
| 532 | + return temps; | ||
| 533 | + }, | ||
| 534 | + clearFocus: clearFocus, | ||
| 535 | + focus: focus, | ||
| 536 | + showEditPanel: showEditPanel, | ||
| 537 | + hideEditPanel: hideEditPanel, | ||
| 538 | + reWriteEditPanel: reWriteEditPanel, | ||
| 539 | + update: update, | ||
| 540 | + drawEnd: drawEnd | ||
| 541 | + }; | ||
| 542 | +>>>>>>> 5330d6cb797891dcb6c8a000004d51964e2bb71f | ||
| 315 | }(); | 543 | }(); |
| 316 | \ No newline at end of file | 544 | \ No newline at end of file |
src/main/resources/static/pages/base/geo_data_edit/js/submit.js
| 1 | +<<<<<<< HEAD | ||
| 1 | /** | 2 | /** |
| 2 | * 事件代理,提交数据 | 3 | * 事件代理,提交数据 |
| 3 | */ | 4 | */ |
| @@ -70,4 +71,48 @@ var gb_data_submit = function () { | @@ -70,4 +71,48 @@ var gb_data_submit = function () { | ||
| 70 | $loadPanel.hide(); | 71 | $loadPanel.hide(); |
| 71 | }; | 72 | }; |
| 72 | return {}; | 73 | return {}; |
| 74 | +======= | ||
| 75 | +/** | ||
| 76 | + * 事件代理,提交数据 | ||
| 77 | + */ | ||
| 78 | +var gb_data_submit = function () { | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * 缓冲区编辑提交 | ||
| 82 | + */ | ||
| 83 | + $(document).on('click', '.buffer_edit_panel>.buffer_edit_body button.submit', function (e) { | ||
| 84 | + var f = $(this).parents('form'); | ||
| 85 | + var data = f.serializeJSON(); | ||
| 86 | + UIkit.modal.confirm('确定保存【'+data.stationName+'】的缓冲区信息?').then(function() { | ||
| 87 | + | ||
| 88 | + //console.log('aaa',f, f.serializeJSON()); | ||
| 89 | + show_run_text('正在提交缓冲区信息'); | ||
| 90 | + gb_common.$post('/_geo_data/updateBufferInfo', data, function (rs) { | ||
| 91 | + hide_run_text(); | ||
| 92 | + UIkit.notification("提交成功!", {status: 'success'}); | ||
| 93 | + | ||
| 94 | + //更新前端数据 | ||
| 95 | + gb_station_route.update(rs.station); | ||
| 96 | + gb_ct_map.updateStation(rs.station); | ||
| 97 | + | ||
| 98 | + //退出编辑模式 | ||
| 99 | + gb_ct_map.exitEditBufferStatus(rs.station); | ||
| 100 | + }); | ||
| 101 | + }, function () { | ||
| 102 | + console.log('Rejected.') | ||
| 103 | + }); | ||
| 104 | + return false; | ||
| 105 | + }); | ||
| 106 | + | ||
| 107 | + var show_run_text = function (t) { | ||
| 108 | + $('.text', $loadPanel).text(t); | ||
| 109 | + $loadPanel.show(); | ||
| 110 | + }; | ||
| 111 | + | ||
| 112 | + var hide_run_text = function () { | ||
| 113 | + $('.text', $loadPanel).text(''); | ||
| 114 | + $loadPanel.hide(); | ||
| 115 | + }; | ||
| 116 | + return {}; | ||
| 117 | +>>>>>>> 5330d6cb797891dcb6c8a000004d51964e2bb71f | ||
| 73 | }(); | 118 | }(); |
| 74 | \ No newline at end of file | 119 | \ No newline at end of file |
src/main/resources/static/pages/base/geo_data_edit/js/version_manage.js
| 1 | -<!-- 版本管理 --> | ||
| 2 | - | ||
| 3 | -var gb_version_manage = function () { | ||
| 4 | - | ||
| 5 | - res_load_ep.emitLater('load_version_manage'); | ||
| 6 | - return {}; | 1 | +<!-- 版本管理 --> |
| 2 | + | ||
| 3 | +var gb_version_manage = function () { | ||
| 4 | + | ||
| 5 | + res_load_ep.emitLater('load_version_manage'); | ||
| 6 | + return {}; | ||
| 7 | }(); | 7 | }(); |
| 8 | \ No newline at end of file | 8 | \ No newline at end of file |
src/main/resources/static/pages/base/geo_data_edit/uk3_wrap.html
| 1 | -<style> | ||
| 2 | - iframe.full_screen{ | ||
| 3 | - width: 100%; | ||
| 4 | - height: 100%; | ||
| 5 | - position: fixed; | ||
| 6 | - z-index: 9999999; | ||
| 7 | - top: 0; | ||
| 8 | - left: 0; | ||
| 9 | - margin-left: 0 !important; | ||
| 10 | - padding-left: 0; | ||
| 11 | - padding-top: 0; | ||
| 12 | - } | ||
| 13 | -</style> | 1 | +<style> |
| 2 | + iframe.full_screen{ | ||
| 3 | + width: 100%; | ||
| 4 | + height: 100%; | ||
| 5 | + position: fixed; | ||
| 6 | + z-index: 9999999; | ||
| 7 | + top: 0; | ||
| 8 | + left: 0; | ||
| 9 | + margin-left: 0 !important; | ||
| 10 | + padding-left: 0; | ||
| 11 | + padding-top: 0; | ||
| 12 | + } | ||
| 13 | +</style> | ||
| 14 | <iframe id="geo_edit_wrap_iframe" src="/pages/base/geo_data_edit/main.html?origin=real_control_iframe" frameborder="0" style="height: 100%;width: 100%;"></iframe> | 14 | <iframe id="geo_edit_wrap_iframe" src="/pages/base/geo_data_edit/main.html?origin=real_control_iframe" frameborder="0" style="height: 100%;width: 100%;"></iframe> |
| 15 | \ No newline at end of file | 15 | \ No newline at end of file |
src/main/resources/static/pages/base/line/addstation.html
0 → 100644
| 1 | +<!-- 新增站点 --> | ||
| 2 | +<div class="modal fade" id="add_station_mobal" role="basic" aria-hidden="true"> | ||
| 3 | + <div class="modal-dialog"> | ||
| 4 | + <div class="modal-content"> | ||
| 5 | + <div class="modal-header"> | ||
| 6 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> | ||
| 7 | + <h4 class="modal-title">新增站点</h4> | ||
| 8 | + </div> | ||
| 9 | + <div class="modal-body"> | ||
| 10 | + <form class="form-horizontal" role="form" id="add_station_form" action="/module" method="post"> | ||
| 11 | + <div class="alert alert-danger display-hide"> <button class="close" data-close="alert"></button> | ||
| 12 | + 您的输入有误,请检查下面的输入项 | ||
| 13 | + </div> | ||
| 14 | + <!-- 线路ID --> | ||
| 15 | + <input type="hidden" name="lineId" id="lineIdInput" value="" /> | ||
| 16 | + <input type="hidden" name="bPolygonGrid" id="bPolygonGridInput" value="" /> | ||
| 17 | + <input type="hidden" name="gPolygonGrid" id="gPolygonGridInput" value="" /> | ||
| 18 | + <input type="hidden" name="gJwpoints" id="gJwpointsInput"> | ||
| 19 | + <input type="hidden" name="dbType" id="dbTypeInput" value="b"/> | ||
| 20 | + <input type="hidden" name="x" id="xInput" value=""/> | ||
| 21 | + <input type="hidden" name="y" id="yInput" value=""/> | ||
| 22 | + <!-- 站点名称 --> | ||
| 23 | + <div class="form-body"> | ||
| 24 | + <div class="form-group"> | ||
| 25 | + <label class="control-label col-md-3"> | ||
| 26 | + <span class="required"> * </span> 站点名称 : | ||
| 27 | + </label> | ||
| 28 | + <div class="col-md-6"> | ||
| 29 | + <input type="text" class="form-control" name="zdmc" id="zdmcInput" placeholder="站点名称" readonly="readonly"> | ||
| 30 | + </div> | ||
| 31 | + </div> | ||
| 32 | + </div> | ||
| 33 | + <!-- 站点路由名称 --> | ||
| 34 | + <div class="form-body"> | ||
| 35 | + <div class="form-group"> | ||
| 36 | + <label class="control-label col-md-3"> | ||
| 37 | + <span class="required"> * </span> 站点路由名称: | ||
| 38 | + </label> | ||
| 39 | + <div class="col-md-6"> | ||
| 40 | + <input type="text" class="form-control" name="stationName" id="stationNameInput" placeholder="站点路由名称"> | ||
| 41 | + </div> | ||
| 42 | + </div> | ||
| 43 | + </div> | ||
| 44 | + <!-- 站点编码 --> | ||
| 45 | + <div class="form-body"> | ||
| 46 | + <div class="form-group"> | ||
| 47 | + <label class="control-label col-md-3"> | ||
| 48 | + <span class="required"> * </span>站点编码 : | ||
| 49 | + </label> | ||
| 50 | + <div class="col-md-6"> | ||
| 51 | + <input type="text" class="form-control" name="stationCod" id="stationCodInput" readonly="readonly"> | ||
| 52 | + </div> | ||
| 53 | + </div> | ||
| 54 | + </div> | ||
| 55 | + <!-- 站点方向 --> | ||
| 56 | + <div class="form-body"> | ||
| 57 | + <div class="form-group"> | ||
| 58 | + <label class="control-label col-md-3"> | ||
| 59 | + <span class="required"> * </span>站点方向 : | ||
| 60 | + </label> | ||
| 61 | + <div class="col-md-6"> | ||
| 62 | + <select name="directions" class="form-control" id="stationdirSelect"> | ||
| 63 | + <option value="">-- 请选择站点类型 --</option> | ||
| 64 | + <option value="0">上行</option> | ||
| 65 | + <option value="1">下行</option> | ||
| 66 | + </select> | ||
| 67 | + </div> | ||
| 68 | + </div> | ||
| 69 | + </div> | ||
| 70 | + | ||
| 71 | + <!-- 站点序号 --> | ||
| 72 | + <div class="form-body"> | ||
| 73 | + <div class="form-group"> | ||
| 74 | + <label class="control-label col-md-3"> | ||
| 75 | + <span class="required"> * </span>站点序号 : | ||
| 76 | + </label> | ||
| 77 | + <div class="col-md-6"> | ||
| 78 | + <select name="stationRouteCode" class="form-control" id="stationrouteSelect" style="width:100%"></select> | ||
| 79 | + <span class="help-block">说明:选择的站点将作为本站序号的参考,成为选择站点的下一站。 </span> | ||
| 80 | + </div> | ||
| 81 | + </div> | ||
| 82 | + </div> | ||
| 83 | + | ||
| 84 | + <!-- 站点类型 --> | ||
| 85 | + <div class="form-body"> | ||
| 86 | + <div class="form-group"> | ||
| 87 | + <label class="control-label col-md-3"> | ||
| 88 | + <span class="required"> * </span>站点类型 : | ||
| 89 | + </label> | ||
| 90 | + <div class="col-md-6"> | ||
| 91 | + <select name="stationMark" class="form-control" id="stationMarkSelect"> | ||
| 92 | + <option value="">-- 请选择站点类型 --</option> | ||
| 93 | + <option value="B">起点站</option> | ||
| 94 | + <option value="Z">中途站</option> | ||
| 95 | + <option value="E">终点站</option> | ||
| 96 | + <option value="T">停车场</option> | ||
| 97 | + </select> | ||
| 98 | + </div> | ||
| 99 | + </div> | ||
| 100 | + </div> | ||
| 101 | + <!-- 中心位置坐标点 --> | ||
| 102 | + <div class="form-body"> | ||
| 103 | + <div class="form-group"> | ||
| 104 | + <label class="col-md-3 control-label"><span class="required"> * </span>经纬度坐标点:</label> | ||
| 105 | + <div class="col-md-6"> | ||
| 106 | + <input type="text" class="form-control" name="bJwpoints" id="bJwpointsInput"> | ||
| 107 | + </div> | ||
| 108 | + </div> | ||
| 109 | + </div> | ||
| 110 | + <!-- 几何图形类型 --> | ||
| 111 | + <div class="form-body"> | ||
| 112 | + <div class="form-group"> | ||
| 113 | + <label class="col-md-3 control-label"><span class="required"> * </span>几何图形类型:</label> | ||
| 114 | + <div class="col-md-6"> | ||
| 115 | + <input type="text" class="form-control" name="shapesType" id="shapesTypeSelect" placeholder="几何图形类型" readonly="readonly"> | ||
| 116 | + </div> | ||
| 117 | + </div> | ||
| 118 | + </div> | ||
| 119 | + <!-- 圆形半径 --> | ||
| 120 | + <div class="form-body" id="radiusGroup"> | ||
| 121 | + <div class="form-group"> | ||
| 122 | + <label class="col-md-3 control-label"><span class="required"> * </span>圆形半径 :</label> | ||
| 123 | + <div class="col-md-6"> | ||
| 124 | + <input type="text" class="form-control" name="radius" id="radiusInput" placeholder="圆形半径"> | ||
| 125 | + </div> | ||
| 126 | + </div> | ||
| 127 | + </div> | ||
| 128 | + <!-- 是否撤销 --> | ||
| 129 | + <div class="form-body"> | ||
| 130 | + <div class="form-group"> | ||
| 131 | + <label class="col-md-3 control-label"><span class="required"> * </span>是否撤销 :</label> | ||
| 132 | + <div class="col-md-6"> | ||
| 133 | + <select name="destroy" class="form-control" id="destroySelect"> | ||
| 134 | + <option value="">-- 请选择撤销类型 --</option> | ||
| 135 | + <option value="0">否</option> | ||
| 136 | + <option value="1">是</option> | ||
| 137 | + </select> | ||
| 138 | + </div> | ||
| 139 | + </div> | ||
| 140 | + </div> | ||
| 141 | + | ||
| 142 | + <!-- 道路编码--> | ||
| 143 | + <div class="form-body"> | ||
| 144 | + <div class="form-group"> | ||
| 145 | + <label class="control-label col-md-3">道路编码 :</label> | ||
| 146 | + <div class="col-md-6"> | ||
| 147 | + <input type="text" class="form-control" name="roadCoding" id="roadCodingCodInput"> | ||
| 148 | + </div> | ||
| 149 | + </div> | ||
| 150 | + </div> | ||
| 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="toTime" id="toTimeInput" > | ||
| 157 | + <span class="help-block">单位:分钟(min)</span> | ||
| 158 | + </div> | ||
| 159 | + </div> | ||
| 160 | + </div> | ||
| 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 | + <input type="text" class="form-control" name="distances" id="distancesInput" > | ||
| 167 | + <span class="help-block">单位:公里(km)</span> | ||
| 168 | + </div> | ||
| 169 | + </div> | ||
| 170 | + </div> | ||
| 171 | + <!-- 版本号 --> | ||
| 172 | + <div class="form-body"> | ||
| 173 | + <div class="form-group"> | ||
| 174 | + <label class="col-md-3 control-label">版本号 :</label> | ||
| 175 | + <div class="col-md-6"> | ||
| 176 | + <input type="text" class="form-control" name="versions" id='versionsInput' Readonly> | ||
| 177 | + </div> | ||
| 178 | + </div> | ||
| 179 | + </div> | ||
| 180 | + | ||
| 181 | + <!-- 描述/说明 --> | ||
| 182 | + <div class="form-group"> | ||
| 183 | + <label class="control-label col-md-3"> 描述/说明 : </label> | ||
| 184 | + <div class="col-md-6"> | ||
| 185 | + <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea> | ||
| 186 | + </div> | ||
| 187 | + </div> | ||
| 188 | + </form> | ||
| 189 | + </div> | ||
| 190 | + <div class="modal-footer"> | ||
| 191 | + <button type="button" class="btn default" data-dismiss="modal" id="addMobalHiden">取消</button> | ||
| 192 | + <button type="button" class="btn btn-primary" id="addStationButton">提交数据</button> | ||
| 193 | + </div> | ||
| 194 | + </div> | ||
| 195 | + </div> | ||
| 196 | +</div> | ||
| 197 | +<script type="text/javascript"> | ||
| 198 | +$('#add_station_mobal').on('AddStationMobal.show', function(e, addMap,ajaxd,staobj,editRoute,fun){ | ||
| 199 | + var Station = staobj; | ||
| 200 | + var Line = editRoute.getLineObj(); | ||
| 201 | + // 延迟加载 | ||
| 202 | + setTimeout(function(){ | ||
| 203 | + // 显示mobal | ||
| 204 | + $('#add_station_mobal').modal({show : true,backdrop: 'static', keyboard: false}); | ||
| 205 | + },200); | ||
| 206 | + // 当调用 hide 实例方法时触发 | ||
| 207 | + $('#add_station_mobal').on('hide.bs.modal', function () { | ||
| 208 | + closeMobleSetClean(); | ||
| 209 | + }); | ||
| 210 | + // 当模态框对用户可见时触发(将等待 CSS 过渡效果完成)。 | ||
| 211 | + $('#add_station_mobal').on('show.bs.modal', function () { | ||
| 212 | + // 获取站点编码元素,添加站点编码值 | ||
| 213 | + ajaxd.getStationCode(function(stationCode) { | ||
| 214 | + // 线路ID. | ||
| 215 | + $('#lineIdInput').val(Line.id); | ||
| 216 | + // 获取站点名称元素设值. | ||
| 217 | + $('#zdmcInput').val(Station.stationNamebootbox); | ||
| 218 | + // 获取站点路由名称元素设值. | ||
| 219 | + $('#stationNameInput').val(Station.stationNamebootbox); | ||
| 220 | + // 站点编码. | ||
| 221 | + $('#stationCodInput').val(stationCode).attr('Readonly','Readonly'); | ||
| 222 | + // 获取方向元素,并添加值. | ||
| 223 | + $('#stationdirSelect').val(Line.dir).attr('Readonly','Readonly'); | ||
| 224 | + // 百度地图经纬度坐标中心点. | ||
| 225 | + $('#bJwpointsInput').val(Station.bJwpoints).attr('Readonly','Readonly'); | ||
| 226 | + // 百度坐标点图形集合. | ||
| 227 | + $('#bPolygonGridInput').val(Station.bPolygonGrid); | ||
| 228 | + // 获取图形类型元素,并添加值 | ||
| 229 | + if(Station.shapesType=='r') | ||
| 230 | + $('#shapesTypeSelect').val('圆形'); | ||
| 231 | + else if(Station.shapesType=='d') { | ||
| 232 | + $('#radiusGroup').hide(); | ||
| 233 | + $('#shapesTypeSelect').val('多边形'); | ||
| 234 | + } | ||
| 235 | + // 获取圆形半径元素,并添加值 | ||
| 236 | + $('#radiusInput').val(Station.radius); | ||
| 237 | + // 是否撤销 | ||
| 238 | + $('#destroySelect').val(0); | ||
| 239 | + | ||
| 240 | + var initzdlyP = {'lineId':Line.id,'destroy':0,'direction':Line.dir}; | ||
| 241 | + initSelect(initzdlyP); | ||
| 242 | + }); | ||
| 243 | + }); | ||
| 244 | + // 站点序号值改变事件 | ||
| 245 | + $('#stationrouteSelect').on('change',function() { | ||
| 246 | + var stationRValue = $('#stationrouteSelect').val(); | ||
| 247 | + if(stationRValue=='请选择...') { | ||
| 248 | + $('#stationMarkSelect').val('B'); | ||
| 249 | + }else { | ||
| 250 | + var tempStr = stationRValue.split('_'); | ||
| 251 | + if(tempStr[1] == 'E') { | ||
| 252 | + $('#stationMarkSelect').val('E'); | ||
| 253 | + }else { | ||
| 254 | + $('#stationMarkSelect').val('Z'); | ||
| 255 | + } | ||
| 256 | + } | ||
| 257 | + }); | ||
| 258 | + // 获取表单元素 | ||
| 259 | + var form = $('#add_station_form'); | ||
| 260 | + // 获取错误提示信息元素 | ||
| 261 | + var error = $('.alert-danger', form); | ||
| 262 | + //提交 | ||
| 263 | + $('#addStationButton').on('click', function() { | ||
| 264 | + // 表单提交 | ||
| 265 | + form.submit(); | ||
| 266 | + }); | ||
| 267 | + // 表单验证 | ||
| 268 | + form.validate({ | ||
| 269 | + errorElement : 'span', | ||
| 270 | + errorClass : 'help-block help-block-error', | ||
| 271 | + focusInvalid : true, | ||
| 272 | + rules : { | ||
| 273 | + 'stationName' : {required : true,maxlength : 50,},// 站点名称 必填项 | ||
| 274 | + 'stationCod': {required : true,},// 站点编码 必填项 必须输入合法的数字(负数,小数)。 | ||
| 275 | + 'directions' : {required : true,dirIs : true},// 站点方向 必填项 必填项 | ||
| 276 | + 'stationRouteCode' : {isStart : true},// 站点序号 | ||
| 277 | + 'stationMark' : {required : true,},// 站点类型 必填项. | ||
| 278 | + 'bJwpoints' : {required : true,},// 经纬度坐标点 必填项. | ||
| 279 | + 'shapesType' : {required : true,},// 几何图形类型 必填项. | ||
| 280 | + 'radius' : {required : true,},// 几何图形类型 必填项. | ||
| 281 | + 'destroy' : {required : true,},// 是否撤销 必填项. | ||
| 282 | + 'toTime' : {number : true},// 到站时间 必须输入合法的数字(负数,小数)。 | ||
| 283 | + 'distances' : {number : true},// 到站距离 必须输入合法的数字(负数,小数)。 | ||
| 284 | + 'descriptions' : {maxlength: 150}// 描述与说明 // 描述与说明 | ||
| 285 | + | ||
| 286 | + }, | ||
| 287 | + invalidHandler : function(event, validator) { | ||
| 288 | + error.show(); | ||
| 289 | + App.scrollTo(error, -200); | ||
| 290 | + }, | ||
| 291 | + highlight : function(element) { | ||
| 292 | + $(element).closest('.form-group').addClass('has-error'); | ||
| 293 | + }, | ||
| 294 | + unhighlight : function(element) { | ||
| 295 | + $(element).closest('.form-group').removeClass('has-error'); | ||
| 296 | + }, | ||
| 297 | + success : function(label) { | ||
| 298 | + label.closest('.form-group').removeClass('has-error'); | ||
| 299 | + }, | ||
| 300 | + submitHandler : function(f) { | ||
| 301 | + var params = form.serializeJSON(); | ||
| 302 | + error.hide(); | ||
| 303 | + if(params.shapesType=='圆形') | ||
| 304 | + params.shapesType='r'; | ||
| 305 | + else if(params.shapesType=='多边形') | ||
| 306 | + params.shapesType='d'; | ||
| 307 | + if(params.stationRouteCode=='请选择...') | ||
| 308 | + params.stationRouteCode=''; | ||
| 309 | + // 保存 | ||
| 310 | + ajaxd.stationCacheSave(params,function(data) { | ||
| 311 | + if(data.status=='SUCCESS') { | ||
| 312 | + // 弹出添加成功提示消息 | ||
| 313 | + layer.msg('添加成功...'); | ||
| 314 | + }else { | ||
| 315 | + // 弹出添加失败提示消息 | ||
| 316 | + layer.msg('添加失败...'); | ||
| 317 | + } | ||
| 318 | + closeMobleSetClean(); | ||
| 319 | + // 隐藏moble | ||
| 320 | + hideMoble(); | ||
| 321 | + }); | ||
| 322 | + } | ||
| 323 | + }); | ||
| 324 | + function initSelect(p){ | ||
| 325 | + ajaxd.getzdlyInfo(p,function(array) { | ||
| 326 | + // 定义路段路由长度、渲染拼音检索下拉框格式数据. | ||
| 327 | + var len_ = array.length,paramsD = new Array(); | ||
| 328 | + if(len_>0) { | ||
| 329 | + paramsD.push({'id':'请选择...','text':'请选择...'}); | ||
| 330 | + // 遍历. | ||
| 331 | + $.each(array, function(i, g){ | ||
| 332 | + // 判断. | ||
| 333 | + if(g.name!='' || g.name != null) { | ||
| 334 | + // 添加拼音检索下拉框格式数据数组. | ||
| 335 | + paramsD.push({'id':g.stationRouteCode + '_' + g.stationMark + '_' + g.directions, | ||
| 336 | + 'text':g.stationName + ' (' + g.stationRouteCode + ')' + ' --' + fun.dirdmToName(g.directions)}); | ||
| 337 | + } | ||
| 338 | + }); | ||
| 339 | + $('#stationrouteSelect').empty(); | ||
| 340 | + // 初始化上一个路段拼音检索下拉框. | ||
| 341 | + initPinYinSelect2($('#stationrouteSelect'),paramsD,function(selector) { | ||
| 342 | + }); | ||
| 343 | + } | ||
| 344 | + }); | ||
| 345 | + } | ||
| 346 | + function closeMobleSetClean() { | ||
| 347 | + // 清除地图覆盖物 | ||
| 348 | + addMap.clearMarkAndOverlays(); | ||
| 349 | + // 刷新站点列表 | ||
| 350 | + $('#station').click(); | ||
| 351 | + } | ||
| 352 | + function hideMoble() { | ||
| 353 | + // 隐藏mobal | ||
| 354 | + $('#add_station_mobal').modal('hide'); | ||
| 355 | + } | ||
| 356 | + // 当站点类型为中途站或者终点站时,上一站点为必填项! | ||
| 357 | + $.validator.addMethod("isStart", function(value,element) { | ||
| 358 | + var tel = false; | ||
| 359 | + var stationMarkV = $('#stationMarkSelect').val(); | ||
| 360 | + var stationrouteSelectV = $('#stationrouteSelect').val(); | ||
| 361 | + if(stationMarkV =='B'){ | ||
| 362 | + tel = true; | ||
| 363 | + return tel; | ||
| 364 | + }else if(stationMarkV =='Z' || stationMarkV =='E'){ | ||
| 365 | + if(stationrouteSelectV!='' && stationrouteSelectV!='请选择...' && stationrouteSelectV!=null){ | ||
| 366 | + tel = true; | ||
| 367 | + return tel; | ||
| 368 | + } | ||
| 369 | + } | ||
| 370 | + return tel; | ||
| 371 | + }, '当站点类型为中途站或者终点站时,上一站点为必填项!'); | ||
| 372 | + // 方向 | ||
| 373 | + $.validator.addMethod("dirIs", function(value,element) { | ||
| 374 | + var tel = true; | ||
| 375 | + var stationMarkV = $('#stationdirSelect').val(); | ||
| 376 | + if(stationMarkV!=Line.dir){ | ||
| 377 | + tel = false; | ||
| 378 | + } | ||
| 379 | + return tel; | ||
| 380 | + }, '方向必须一致!'); | ||
| 381 | +}); | ||
| 382 | +</script> | ||
| 0 | \ No newline at end of file | 383 | \ No newline at end of file |
src/main/resources/static/pages/base/line/addstation_select.html
0 → 100644
| 1 | +<!-- 选择站点新增方式 --> | ||
| 2 | +<div class="modal fade" id="addstation_select_mobal" tabindex="-1" role="basic" aria-hidden="true"> | ||
| 3 | + <div class="modal-dialog"> | ||
| 4 | + <div class="modal-content"> | ||
| 5 | + <div class="modal-header"> | ||
| 6 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> | ||
| 7 | + <h4 class="modal-title">站点新增方式 | ||
| 8 | + <i class="fa fa-question-circle tipso-animation" style="color: rgba(158, 158, 158, 0.49);"></i> | ||
| 9 | + </h4> | ||
| 10 | + </div> | ||
| 11 | + <div class="modal-body"> | ||
| 12 | + <form class="form-horizontal" action="/" method="post" id="formBootbox" role="form"> | ||
| 13 | + <div class="alert alert-danger display-hide" id="requiredname"> | ||
| 14 | + <button class="close" data-close="alert"></button> | ||
| 15 | + 站点名称为必填项 | ||
| 16 | + </div> | ||
| 17 | + <!-- 站点名称 --> | ||
| 18 | + <div class="form-group" id="formRequ"> | ||
| 19 | + <label class="col-md-3 control-label"><span class="required"> * </span>站点名称:</label> | ||
| 20 | + <div class="col-md-9"> | ||
| 21 | + <input type="text" class="form-control input-medium" id="stationNamebootboxInput" name="stationNamebootbox"> | ||
| 22 | + </div> | ||
| 23 | + </div> | ||
| 24 | + <!-- 新增方式 --> | ||
| 25 | + <div class="form-group"> | ||
| 26 | + <label class="col-md-3 control-label">新增方式:</label> | ||
| 27 | + <div class="col-md-9"> | ||
| 28 | + <div class="icheck-list"> | ||
| 29 | + <label> | ||
| 30 | + <input type="radio" class="icheck" name="baseRes" value=0 checked> 系统生成 | ||
| 31 | + </label> | ||
| 32 | + <label > | ||
| 33 | + <input type="radio" class="icheck" name="baseRes" value=1 > 手动添加 | ||
| 34 | + </label> | ||
| 35 | + </div> | ||
| 36 | + </div> | ||
| 37 | + </div> | ||
| 38 | + </form> | ||
| 39 | + </div> | ||
| 40 | + <div class="modal-footer"> | ||
| 41 | + <button type="button" class="btn default" data-dismiss="modal">取消</button> | ||
| 42 | + <button type="button" class="btn btn-primary" id="addSelectnextButton">下一步</button> | ||
| 43 | + </div> | ||
| 44 | + </div> | ||
| 45 | + </div> | ||
| 46 | +</div> | ||
| 47 | +<script type="text/javascript"> | ||
| 48 | +$('#addstation_select_mobal').on('AddSelectMobal.show', function(e,map_,drw,ajaxd_,editRoute,fun){ | ||
| 49 | + var stationObj = {}; | ||
| 50 | + // 加载显示mobal | ||
| 51 | + $('#addstation_select_mobal').modal({show : true,backdrop: 'static', keyboard: false}); | ||
| 52 | + setTimeout(function(){ | ||
| 53 | + var offsetY = $('.modal-dialog').offset().top-3 , | ||
| 54 | + offsetX = $('.modal-dialog').offset().left-10 ; | ||
| 55 | + $('.tipso-animation').tipso({ | ||
| 56 | + speed : 100, | ||
| 57 | + background : '#0ed0e8', | ||
| 58 | + color : '#ffffff', | ||
| 59 | + position :'right', | ||
| 60 | + width : 390, | ||
| 61 | + delay : 400, | ||
| 62 | + animationIn : 'bounceIn', | ||
| 63 | + animationOut : 'bounceOut', | ||
| 64 | + offsetX : -(offsetX), | ||
| 65 | + offsetY : -(offsetY), | ||
| 66 | + content :'<span style="display:block; float:left;font-size:x-small;line-height:10px">A)系统生成:根据站点名称自动生成以150米为半径范围的圆.</span></br>'+ | ||
| 67 | + '<span style="display:block; float:left;font-size:x-small">B)手动添加:手动在地图上画出站点范围,然后双击鼠标右键保存.</span>', | ||
| 68 | + | ||
| 69 | + }); | ||
| 70 | + $('.tipso-animation').tipso('show'); | ||
| 71 | + setTimeout(function(){$('.tipso-animation').tipso('hide');},4000); | ||
| 72 | + },500); | ||
| 73 | + // 获取表单元素 | ||
| 74 | + var form = $('#formBootbox'); | ||
| 75 | + // 错误提示元素 | ||
| 76 | + var requiredname = $('#requiredname', form); | ||
| 77 | + // 下一步点击事件 | ||
| 78 | + $('#addSelectnextButton').on('click', function() { | ||
| 79 | + // 表单提交 | ||
| 80 | + form.submit(); | ||
| 81 | + }); | ||
| 82 | + // 表单验证 | ||
| 83 | + form.validate({ | ||
| 84 | + errorElement : 'span', | ||
| 85 | + errorClass : 'help-block help-block-error', | ||
| 86 | + focusInvalid : false, | ||
| 87 | + rules : { | ||
| 88 | + 'stationNamebootbox' : {required : true,maxlength : 50}// 必填项 最大长度为50 | ||
| 89 | + }, | ||
| 90 | + invalidHandler : function(event, validator) { | ||
| 91 | + requiredname.show(); | ||
| 92 | + App.scrollTo(requiredname, -200); | ||
| 93 | + }, | ||
| 94 | + highlight : function(element) { | ||
| 95 | + $(element).closest('.form-group').addClass('has-error'); | ||
| 96 | + }, | ||
| 97 | + unhighlight : function(element) { | ||
| 98 | + $(element).closest('.form-group').removeClass('has-error'); | ||
| 99 | + }, | ||
| 100 | + success : function(label) { | ||
| 101 | + label.closest('.form-group').removeClass('has-error'); | ||
| 102 | + }, | ||
| 103 | + submitHandler : function(f) { | ||
| 104 | + // 隐藏错误提示 | ||
| 105 | + requiredname.hide(); | ||
| 106 | + // 表单序列化 | ||
| 107 | + var params = form.serializeJSON(); | ||
| 108 | + var stationName = params.stationNamebootbox; | ||
| 109 | + // 获取新增站点方式 | ||
| 110 | + var baseRes = params.baseRes; | ||
| 111 | + /** 设置新增站点对象站点名称属性值 @param:<stationName:站点名称)> */ | ||
| 112 | + stationObj.stationNamebootbox = stationName; | ||
| 113 | + // 系统生成 | ||
| 114 | + if(baseRes == 0) { | ||
| 115 | + /** 根据站点位置获取坐标 @parma:<stationName:站点名称;callback:返回函数> */ | ||
| 116 | + map_.localSearchFromAdreesToPoint(stationName,function(Points) { | ||
| 117 | + if(Points) { | ||
| 118 | + /** 设置新增站点集合对象站点中心点百度坐标属性值 @param:<bJwpoints:中心点百度坐标) */ | ||
| 119 | + stationObj.bJwpoints = Points; | ||
| 120 | + /** 设置新增站点集合对象范围图形类型属性值 @param:<shapesType:范围图形类型) */ | ||
| 121 | + stationObj.shapesType = 'r'; | ||
| 122 | + /** 设置新增站点集合对象圆形半径属性值 @param:<radius:圆形半径) */ | ||
| 123 | + stationObj.radius = 100; | ||
| 124 | + /** 设置新增站点集合对象图形百度坐标集合属性值 @param:<bPolygonGrid:图形百度坐标集合) */ | ||
| 125 | + stationObj.bPolygonGrid = ''; | ||
| 126 | + // 以藏站点新增方式mobal | ||
| 127 | + $('#addstation_select_mobal').modal('hide'); | ||
| 128 | + // 加载add页面 | ||
| 129 | + $.get('addstation.html', function(m){ | ||
| 130 | + $(pjaxContainer).append(m); | ||
| 131 | + $('#add_station_mobal').trigger('AddStationMobal.show', [map_,ajaxd_,stationObj,editRoute,fun]); | ||
| 132 | + }); | ||
| 133 | + }else { | ||
| 134 | + // 返回坐标为空 | ||
| 135 | + layer.confirm('【系统无法生成,请选择其他方式新增】', {btn : [ '返回' ],icon: 3, title:'提示' }, function(index){ | ||
| 136 | + layer.close(index); | ||
| 137 | + }); | ||
| 138 | + } | ||
| 139 | + }); | ||
| 140 | + }else if(baseRes==1) { | ||
| 141 | + // 关闭按钮事件 | ||
| 142 | + fun.addAChangeCssAddDisabled(); | ||
| 143 | + map_.clearMarkAndOverlays(); | ||
| 144 | + // 以藏站点新增方式mobal | ||
| 145 | + $('#addstation_select_mobal').modal('hide'); | ||
| 146 | + // 打开绘制工具 | ||
| 147 | + $('.leftUtils').removeClass('hidden'); | ||
| 148 | + drw.openPointDrawingManager(stationObj,'add'); | ||
| 149 | + drw.drawingManagerClose(); | ||
| 150 | + map_.localtionPoint(stationName); | ||
| 151 | + } | ||
| 152 | + } | ||
| 153 | + }); | ||
| 154 | +}); | ||
| 155 | +</script> | ||
| 0 | \ No newline at end of file | 156 | \ No newline at end of file |
src/main/resources/static/pages/base/line/css/bmap_base.css
| @@ -12,6 +12,17 @@ html,body{ | @@ -12,6 +12,17 @@ html,body{ | ||
| 12 | overflow:hidden; | 12 | overflow:hidden; |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | +/* 绘画工具栏 */ | ||
| 16 | +.leftUtils{ | ||
| 17 | + position: absolute; | ||
| 18 | + padding-right: 100px; | ||
| 19 | + width: 100%; | ||
| 20 | + height: 40px; | ||
| 21 | + z-index: 9999; | ||
| 22 | + padding-top: 7px; | ||
| 23 | + top: 40px; | ||
| 24 | +} | ||
| 25 | + | ||
| 15 | .caption { | 26 | .caption { |
| 16 | color: white; | 27 | color: white; |
| 17 | font-size: 18px; | 28 | font-size: 18px; |
src/main/resources/static/pages/base/line/editRoute.html
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | 4 | ||
| 5 | <div class="modal-dialog"> | 5 | <div class="modal-dialog"> |
| 6 | 6 | ||
| 7 | - <div class="modal-content"> | 7 | + <div class="modal-content" > |
| 8 | 8 | ||
| 9 | <div class="modal-header"> | 9 | <div class="modal-header"> |
| 10 | <button type="button" class="close" data-dismiss="modal" | 10 | <button type="button" class="close" data-dismiss="modal" |
| @@ -74,6 +74,7 @@ | @@ -74,6 +74,7 @@ | ||
| 74 | <div class="modal-footer"> | 74 | <div class="modal-footer"> |
| 75 | <button type="button" class="btn default" data-dismiss="modal" | 75 | <button type="button" class="btn default" data-dismiss="modal" |
| 76 | id="addMobalHiden">取消</button> | 76 | id="addMobalHiden">取消</button> |
| 77 | +<!-- <button type="button" class="btn btn-primary hidden" id="referenceCurrentVersion">引用当前版本</button> --> | ||
| 77 | <button type="button" class="btn btn-primary" id="templateSaveData">提交数据</button> | 78 | <button type="button" class="btn btn-primary" id="templateSaveData">提交数据</button> |
| 78 | </div> | 79 | </div> |
| 79 | </div> | 80 | </div> |
| @@ -139,7 +140,7 @@ $('#edit_route_mobal').on('editRouteMobal.show', function(e,transGPS,editRoute,m | @@ -139,7 +140,7 @@ $('#edit_route_mobal').on('editRouteMobal.show', function(e,transGPS,editRoute,m | ||
| 139 | 140 | ||
| 140 | }, | 141 | }, |
| 141 | submitHandler : function(f) { | 142 | submitHandler : function(f) { |
| 142 | - // 隐藏手动规划弹出层 | 143 | + // 隐藏弹出层 |
| 143 | $('#edit_route_mobal').modal('hide'); | 144 | $('#edit_route_mobal').modal('hide'); |
| 144 | // 获取线路对象 | 145 | // 获取线路对象 |
| 145 | var line = editRoute.getLineObj(); | 146 | var line = editRoute.getLineObj(); |
| @@ -151,6 +152,8 @@ $('#edit_route_mobal').on('editRouteMobal.show', function(e,transGPS,editRoute,m | @@ -151,6 +152,8 @@ $('#edit_route_mobal').on('editRouteMobal.show', function(e,transGPS,editRoute,m | ||
| 151 | // 路线方向 | 152 | // 路线方向 |
| 152 | var directionData = $("input[name='dirCheck']:checked").val(); | 153 | var directionData = $("input[name='dirCheck']:checked").val(); |
| 153 | editRoute.setLineDir(directionData); | 154 | editRoute.setLineDir(directionData); |
| 155 | + // 设置线路对象生成方式 | ||
| 156 | + editRoute.setLineGenerationType('uploadGPS'); | ||
| 154 | // 弹出正在加载层 | 157 | // 弹出正在加载层 |
| 155 | var i = layer.load(2); | 158 | var i = layer.load(2); |
| 156 | // 表单序列化 | 159 | // 表单序列化 |
| @@ -256,6 +259,44 @@ $('#edit_route_mobal').on('editRouteMobal.show', function(e,transGPS,editRoute,m | @@ -256,6 +259,44 @@ $('#edit_route_mobal').on('editRouteMobal.show', function(e,transGPS,editRoute,m | ||
| 256 | return bdEn; | 259 | return bdEn; |
| 257 | } | 260 | } |
| 258 | 261 | ||
| 262 | + /** 引用当前版本站点和走向*/ | ||
| 263 | + /* $("#referenceCurrentVersion").on('click',function() { | ||
| 264 | + // 获取线路对象 | ||
| 265 | + var line = editRoute.getLineObj(); | ||
| 266 | + // 路线方向 | ||
| 267 | + var direction = $("input[name='dirCheck']:checked").val(); | ||
| 268 | + // 设置线路对象方向 | ||
| 269 | + editRoute.setLineDir(direction); | ||
| 270 | + // 设置线路对象生成方式 | ||
| 271 | + editRoute.setLineGenerationType('cite'); | ||
| 272 | + $.post("/station/referenceCurrentVersion",{'lineId' : line.id , 'directions' : direction},function(rd){ | ||
| 273 | + // 隐藏弹出层 | ||
| 274 | + $('#edit_route_mobal').modal('hide'); | ||
| 275 | + // 关闭弹出层 | ||
| 276 | + layer.closeAll(); | ||
| 277 | + if(rd.status='SUCCESS') { | ||
| 278 | + // 清除地图覆盖物 | ||
| 279 | + map.clearMarkAndOverlays(); | ||
| 280 | + // 查询路段信息 | ||
| 281 | + var params = {}; | ||
| 282 | + params.lineId=line.id; | ||
| 283 | + params.dir = direction; | ||
| 284 | + // 查询路段信息 | ||
| 285 | + $get('/sectionroute/findCacheSection',params,function(data) { | ||
| 286 | + // 在地图上画出线路走向 | ||
| 287 | + fun.linePanlThree(line.id,data,direction); | ||
| 288 | + }); | ||
| 289 | + $('#route_show').removeClass('hidden'); | ||
| 290 | + $('#generationRoute_div').addClass('hidden'); | ||
| 291 | + // 刷新路段列表 | ||
| 292 | + $('#section').click(); | ||
| 293 | + layer.msg('引用当前版本成功!'); | ||
| 294 | + }else { | ||
| 295 | + layer.msg('引用当前版本失败,请重新引用或选择其他方式!'); | ||
| 296 | + } | ||
| 297 | + }) | ||
| 298 | + }); */ | ||
| 299 | + | ||
| 259 | function addSave(params,lineid,directionData) { | 300 | function addSave(params,lineid,directionData) { |
| 260 | // 保存 | 301 | // 保存 |
| 261 | $post("/station/cacheSave",params,function(rd) { | 302 | $post("/station/cacheSave",params,function(rd) { |
| @@ -276,14 +317,20 @@ $('#edit_route_mobal').on('editRouteMobal.show', function(e,transGPS,editRoute,m | @@ -276,14 +317,20 @@ $('#edit_route_mobal').on('editRouteMobal.show', function(e,transGPS,editRoute,m | ||
| 276 | } | 317 | } |
| 277 | // 清除地图覆盖物 | 318 | // 清除地图覆盖物 |
| 278 | map.clearMarkAndOverlays(); | 319 | map.clearMarkAndOverlays(); |
| 320 | + var params = {}; | ||
| 321 | + params.lineId = lineid; | ||
| 322 | + params.dir = directionData; | ||
| 279 | // 查询路段信息 | 323 | // 查询路段信息 |
| 280 | - $get('/sectionroute/findSectionCache',{'line.id_eq' : lineid , 'directions_eq' : directionData},function(data) { | 324 | + $get('/sectionroute/findCacheSection',params,function(data) { |
| 281 | // 在地图上画出线路走向 | 325 | // 在地图上画出线路走向 |
| 282 | fun.linePanlThree(lineid,data,directionData); | 326 | fun.linePanlThree(lineid,data,directionData); |
| 283 | }); | 327 | }); |
| 284 | - $('#upload_show').removeClass('hidden'); | ||
| 285 | - $('#upload').addClass('hidden'); | ||
| 286 | - layer.msg('请先编辑路段,并保存!!!'); | 328 | + $('#route_show').removeClass('hidden'); |
| 329 | + $('#generationRoute_div').addClass('hidden'); | ||
| 330 | + // 刷新路段列表 | ||
| 331 | + $('#section').click(); | ||
| 332 | + layer.open({title: '友情提示' | ||
| 333 | + ,content: '生成路线成功,生成的线路可能会有误差。请先单击路段,拖动编辑、然后双击保存!'}); | ||
| 287 | }else { | 334 | }else { |
| 288 | layer.msg('生成路线失败!'); | 335 | layer.msg('生成路线失败!'); |
| 289 | } | 336 | } |
src/main/resources/static/pages/base/line/editsection.html
| @@ -156,8 +156,8 @@ $('#edit_section_mobal_cache').on('editSectionMobalCache_show', function(e, map_ | @@ -156,8 +156,8 @@ $('#edit_section_mobal_cache').on('editSectionMobalCache_show', function(e, map_ | ||
| 156 | var dir = Section.sectionrouteDirections; | 156 | var dir = Section.sectionrouteDirections; |
| 157 | var lineId = Section.sectionrouteLine; | 157 | var lineId = Section.sectionrouteLine; |
| 158 | // 获取路段号元素,并添加下拉属性值 | 158 | // 获取路段号元素,并添加下拉属性值 |
| 159 | - ajaxd.getStation(lineId,dir,function(treeData) { | ||
| 160 | - var array = treeData[0].children[1].children,paramsD =new Array(); | 159 | + ajaxd.getSectionCacheList(lineId,dir,function(array) { |
| 160 | + paramsD =new Array(); | ||
| 161 | var eq_scetionRouteCode = Section.sectionrouteCode; | 161 | var eq_scetionRouteCode = Section.sectionrouteCode; |
| 162 | paramsD.push({'id':'请选择...','text':'请选择...'}); | 162 | paramsD.push({'id':'请选择...','text':'请选择...'}); |
| 163 | // 遍历. | 163 | // 遍历. |
| @@ -175,7 +175,7 @@ $('#edit_section_mobal_cache').on('editSectionMobalCache_show', function(e, map_ | @@ -175,7 +175,7 @@ $('#edit_section_mobal_cache').on('editSectionMobalCache_show', function(e, map_ | ||
| 175 | // 初始化上一个路段拼音检索下拉框. | 175 | // 初始化上一个路段拼音检索下拉框. |
| 176 | initPinYinSelect2($('#sectionrouteCodeSelect'),paramsD,function(selector) { | 176 | initPinYinSelect2($('#sectionrouteCodeSelect'),paramsD,function(selector) { |
| 177 | $('#sectionDirSelect').val('');// 设值方向. | 177 | $('#sectionDirSelect').val('');// 设值方向. |
| 178 | - ajaxd.findUpSectionRouteCode(lineId,dir,eq_scetionRouteCode,function(str) { | 178 | + ajaxd.findCacheUpSectionRouteCode(lineId,dir,eq_scetionRouteCode,function(str) { |
| 179 | if(str.length>0){ | 179 | if(str.length>0){ |
| 180 | var upStationRouteCode = str[0].sectionrouteCode; | 180 | var upStationRouteCode = str[0].sectionrouteCode; |
| 181 | $('#sectionrouteCodeSelect').select2('val',upStationRouteCode); | 181 | $('#sectionrouteCodeSelect').select2('val',upStationRouteCode); |
| @@ -196,10 +196,11 @@ $('#edit_section_mobal_cache').on('editSectionMobalCache_show', function(e, map_ | @@ -196,10 +196,11 @@ $('#edit_section_mobal_cache').on('editSectionMobalCache_show', function(e, map_ | ||
| 196 | map_.clearMarkAndOverlays(); | 196 | map_.clearMarkAndOverlays(); |
| 197 | /** 设置修改路段集合对象为空 */ | 197 | /** 设置修改路段集合对象为空 */ |
| 198 | section.setEitdSection({}); | 198 | section.setEitdSection({}); |
| 199 | - // fun.editAChangeCssRemoveDisabled(); | ||
| 200 | - $get('/sectionroute/findSectionCache',{'line.id_eq' : lineId , 'directions_eq' : dir},function(data) { | 199 | + ajaxd.getSectionCacheList(lineId,dir,function(data) { |
| 201 | fun.linePanlThree(lineId,data,dir); | 200 | fun.linePanlThree(lineId,data,dir); |
| 202 | }); | 201 | }); |
| 202 | + // 刷新路段列表 | ||
| 203 | + $('#section').click(); | ||
| 203 | } | 204 | } |
| 204 | 205 | ||
| 205 | // 编辑表单元素 | 206 | // 编辑表单元素 |
| @@ -249,7 +250,7 @@ $('#edit_section_mobal_cache').on('editSectionMobalCache_show', function(e, map_ | @@ -249,7 +250,7 @@ $('#edit_section_mobal_cache').on('editSectionMobalCache_show', function(e, map_ | ||
| 249 | $post('/section/sectionCacheUpdate',params,function(resuntDate) { | 250 | $post('/section/sectionCacheUpdate',params,function(resuntDate) { |
| 250 | if(resuntDate.status=='SUCCESS') { | 251 | if(resuntDate.status=='SUCCESS') { |
| 251 | // 弹出添加成功提示消息 | 252 | // 弹出添加成功提示消息 |
| 252 | - layer.msg('路段保存成功,将地图放到最大,用右击路段进行截取,确认截取完毕后提交!!!'); | 253 | + layer.msg('路段保存成功!'); |
| 253 | }else { | 254 | }else { |
| 254 | // 弹出添加失败提示消息 | 255 | // 弹出添加失败提示消息 |
| 255 | layer.msg('路段保存失败,请重新编辑路段!!!'); | 256 | layer.msg('路段保存失败,请重新编辑路段!!!'); |
src/main/resources/static/pages/base/line/editstation.html
| @@ -193,7 +193,7 @@ | @@ -193,7 +193,7 @@ | ||
| 193 | </div> | 193 | </div> |
| 194 | <script type="text/javascript"> | 194 | <script type="text/javascript"> |
| 195 | 195 | ||
| 196 | -$('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,station,fun){ | 196 | +$('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,fun,station){ |
| 197 | layer.closeAll(); | 197 | layer.closeAll(); |
| 198 | fun.setFormValue(station); | 198 | fun.setFormValue(station); |
| 199 | var initzdlyP = {'lineId':station.stationRouteLine,'destroy':0,'direction':station.stationRouteDirections}; | 199 | var initzdlyP = {'lineId':station.stationRouteLine,'destroy':0,'direction':station.stationRouteDirections}; |
| @@ -228,7 +228,7 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,station,fun | @@ -228,7 +228,7 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,station,fun | ||
| 228 | 'zdmc' : { required : true,maxlength : 50,},// 站点名称 必填项 | 228 | 'zdmc' : { required : true,maxlength : 50,},// 站点名称 必填项 |
| 229 | 'stationName' : { required : true,maxlength : 50,},// 站点名称 必填项 | 229 | 'stationName' : { required : true,maxlength : 50,},// 站点名称 必填项 |
| 230 | 'stationCod': {required : true,},// 站点编码 必填项 | 230 | 'stationCod': {required : true,},// 站点编码 必填项 |
| 231 | - 'directions' : {required : true,dirIs : true},// 站点方向 必填项 必填项 | 231 | + 'directions' : {required : true,dirIs : true},// 站点方向 必填项 必填项 |
| 232 | 'stationRouteCode' : {isStart : true},// 站点序号 | 232 | 'stationRouteCode' : {isStart : true},// 站点序号 |
| 233 | 'stationMark' : {required : true},// 站点类型 必填项 | 233 | 'stationMark' : {required : true},// 站点类型 必填项 |
| 234 | 'bJwpoints' : {required : true},// 经纬度坐标点 必填项 | 234 | 'bJwpoints' : {required : true},// 经纬度坐标点 必填项 |
| @@ -265,8 +265,6 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,station,fun | @@ -265,8 +265,6 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,station,fun | ||
| 265 | if(resuntDate.status=='SUCCESS') { | 265 | if(resuntDate.status=='SUCCESS') { |
| 266 | // 弹出添加成功提示消息 | 266 | // 弹出添加成功提示消息 |
| 267 | layer.msg('修改成功...'); | 267 | layer.msg('修改成功...'); |
| 268 | - /** 通知更新缓存区 */ | ||
| 269 | - $.post('http://192.168.168.171:8800/transport_server/basic/refresh',function(rs){console.log(rs)}) | ||
| 270 | }else { | 268 | }else { |
| 271 | // 弹出添加失败提示消息 | 269 | // 弹出添加失败提示消息 |
| 272 | layer.msg('修改失败...'); | 270 | layer.msg('修改失败...'); |
| @@ -279,7 +277,6 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,station,fun | @@ -279,7 +277,6 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,station,fun | ||
| 279 | // 站点序号值改变事件 | 277 | // 站点序号值改变事件 |
| 280 | $('#stationrouteSelect').on('change',function() { | 278 | $('#stationrouteSelect').on('change',function() { |
| 281 | var stationRValue = $('#stationrouteSelect').val(); | 279 | var stationRValue = $('#stationrouteSelect').val(); |
| 282 | - debugger | ||
| 283 | if(stationRValue=='请选择...') { | 280 | if(stationRValue=='请选择...') { |
| 284 | $('#stationMarkSelect').val('B'); | 281 | $('#stationMarkSelect').val('B'); |
| 285 | }else { | 282 | }else { |
| @@ -292,7 +289,7 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,station,fun | @@ -292,7 +289,7 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,station,fun | ||
| 292 | } | 289 | } |
| 293 | }); | 290 | }); |
| 294 | function initSelect(p){ | 291 | function initSelect(p){ |
| 295 | - $get('/stationroute/cacheList',p,function(array) { | 292 | + ajaxd.getzdlyInfo(p,function(array) { |
| 296 | // 定义路段路由长度、渲染拼音检索下拉框格式数据. | 293 | // 定义路段路由长度、渲染拼音检索下拉框格式数据. |
| 297 | var len_ = array.length,paramsD = new Array(); | 294 | var len_ = array.length,paramsD = new Array(); |
| 298 | if(len_>0) { | 295 | if(len_>0) { |
| @@ -326,10 +323,14 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,station,fun | @@ -326,10 +323,14 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,station,fun | ||
| 326 | params.lineId = station.stationRouteLine; | 323 | params.lineId = station.stationRouteLine; |
| 327 | params.direction = station.stationRouteDirections; | 324 | params.direction = station.stationRouteDirections; |
| 328 | params.stationRouteCode = station.stationRouteStationRouteCode; | 325 | params.stationRouteCode = station.stationRouteStationRouteCode; |
| 329 | - $get('/stationroute/findCacheUpStationRouteCode',params , function(str) { | ||
| 330 | - debugger | 326 | + ajaxd.findCacheUpStationRouteCode(params, function(str) { |
| 331 | if(str.length>0){ | 327 | if(str.length>0){ |
| 332 | - var upStationRouteCode = str[0].stationRouteCode + '_' + str[0].stationRouteMarke + '_' + station.stationRouteDirections; | 328 | + var upStationRouteCode; |
| 329 | + if (station.stationRouteStationMark == 'E') { | ||
| 330 | + upStationRouteCode = str[0].stationRouteCode + '_' + 'E' + '_' + station.stationRouteDirections; | ||
| 331 | + } else{ | ||
| 332 | + upStationRouteCode = str[0].stationRouteCode + '_' + str[0].stationRouteMarke + '_' + station.stationRouteDirections; | ||
| 333 | + } | ||
| 333 | $('#stationrouteSelect').select2('val',upStationRouteCode); | 334 | $('#stationrouteSelect').select2('val',upStationRouteCode); |
| 334 | }else { | 335 | }else { |
| 335 | $('#stationrouteSelect').select2('val','请选择...'); | 336 | $('#stationrouteSelect').select2('val','请选择...'); |
src/main/resources/static/pages/base/line/editstation_select.html
| @@ -47,7 +47,7 @@ | @@ -47,7 +47,7 @@ | ||
| 47 | </div> | 47 | </div> |
| 48 | </div> | 48 | </div> |
| 49 | <script type="text/javascript"> | 49 | <script type="text/javascript"> |
| 50 | -$('#editstation_select_mobal').on('editStationSelectMobal_show', function(e, map_,drw,stationRoute){ | 50 | +$('#editstation_select_mobal').on('editStationSelectMobal_show', function(e, map_,fun,drw,stationRoute){ |
| 51 | // var sel = fun.getCurrSelNode(dir_); | 51 | // var sel = fun.getCurrSelNode(dir_); |
| 52 | // var Station = sel[0].original; | 52 | // var Station = sel[0].original; |
| 53 | // 显示选择修改方式弹出层 | 53 | // 显示选择修改方式弹出层 |
| @@ -112,20 +112,20 @@ $('#editstation_select_mobal').on('editStationSelectMobal_show', function(e, map | @@ -112,20 +112,20 @@ $('#editstation_select_mobal').on('editStationSelectMobal_show', function(e, map | ||
| 112 | var params = form.serializeJSON(); | 112 | var params = form.serializeJSON(); |
| 113 | // 站点名称 | 113 | // 站点名称 |
| 114 | stationRoute.zdmc = params.stationNamebootbox; | 114 | stationRoute.zdmc = params.stationNamebootbox; |
| 115 | - | 115 | + // 关闭按钮事件 |
| 116 | + fun.addAChangeCssAddDisabled(); | ||
| 116 | if(params.editselect==0){ | 117 | if(params.editselect==0){ |
| 117 | - layer.confirm('重绘站点,会修改站点编码,影响已做好的排班和线路文件。请谨慎使用,谢谢!', { | ||
| 118 | - btn: ['绘制','取消'] //按钮 | ||
| 119 | - }, function(index){ | ||
| 120 | - // 站点形状 | ||
| 121 | - stationRoute.stationShapesType = 'd'; | ||
| 122 | - | ||
| 123 | - map_.clearMarkAndOverlays(); | ||
| 124 | - // 打开绘制工具 | ||
| 125 | - drw.openPointDrawingManager(stationRoute); | ||
| 126 | - map_.localtionPoint(stationRoute.zdmc); | ||
| 127 | - layer.close(index); | ||
| 128 | - }); | 118 | + // 站点形状 |
| 119 | + stationRoute.stationShapesType = 'd'; | ||
| 120 | + | ||
| 121 | + map_.clearMarkAndOverlays(); | ||
| 122 | + // 打开绘制工具 | ||
| 123 | + drw.openPointDrawingManager(stationRoute,'edit'); | ||
| 124 | + $('.leftUtils').removeClass('hidden'); | ||
| 125 | + $('.leftUtils').addClass('active'); | ||
| 126 | + drw.drawingManagerClose(); | ||
| 127 | + map_.localtionPoint(stationRoute.zdmc); | ||
| 128 | + layer.close(index); | ||
| 129 | }else if(params.editselect==1){ | 129 | }else if(params.editselect==1){ |
| 130 | // 弹出添加失败提示消息,2秒关闭(如果不配置,默认是3秒) | 130 | // 弹出添加失败提示消息,2秒关闭(如果不配置,默认是3秒) |
| 131 | var mindex = layer.msg('编辑完图形后,请双击图形区域保存',{ offset: '126px', | 131 | var mindex = layer.msg('编辑完图形后,请双击图形区域保存',{ offset: '126px', |
src/main/resources/static/pages/base/line/js/drawingManager.js
| @@ -40,87 +40,97 @@ var DrawingManagerObj = function () { | @@ -40,87 +40,97 @@ var DrawingManagerObj = function () { | ||
| 40 | 40 | ||
| 41 | }, | 41 | }, |
| 42 | 42 | ||
| 43 | - openPointDrawingManager : function(objStation) { | 43 | + openPointDrawingManager : function(objStation, type) { |
| 44 | 44 | ||
| 45 | // 打开鼠标绘画工具 | 45 | // 打开鼠标绘画工具 |
| 46 | - drawingManager.open(); | ||
| 47 | - | ||
| 48 | - // 设置属性 | ||
| 49 | - drawingManager.setDrawingMode(BMAP_DRAWING_POLYGON); | 46 | + DrawingManagerObj.drawingManagerOpen(); |
| 50 | 47 | ||
| 51 | // 添加绘画完成事件 | 48 | // 添加绘画完成事件 |
| 52 | drawingManager.addEventListener('polygoncomplete', function(e) { | 49 | drawingManager.addEventListener('polygoncomplete', function(e) { |
| 53 | - | ||
| 54 | - drawingManager.close; | 50 | + // 关闭绘画 |
| 51 | + DrawingManagerObj.drawingManagerClose(); | ||
| 52 | + // 隐藏绘画工具栏 | ||
| 53 | + $('.leftUtils').addClass('hidden'); | ||
| 55 | 54 | ||
| 56 | if (e.getPath().length <= 2) { | 55 | if (e.getPath().length <= 2) { |
| 57 | - | ||
| 58 | WorldsBMapLine.clearMarkAndOverlays(); | 56 | WorldsBMapLine.clearMarkAndOverlays(); |
| 59 | - openPointDrawingManager(); | ||
| 60 | 57 | ||
| 61 | // 弹出提示消息 | 58 | // 弹出提示消息 |
| 62 | - layer.msg('坐标点不能小于等于两个,请重新绘画!'); | ||
| 63 | - | ||
| 64 | - return; | ||
| 65 | - | ||
| 66 | - }else { | 59 | + layer.msg('坐标点不能小于三个,请重新操作!'); |
| 67 | 60 | ||
| 61 | + }else { | ||
| 68 | // 获取编辑的多边形对象 | 62 | // 获取编辑的多边形对象 |
| 69 | - var edit_pointE = e; | 63 | + var pointE = e; |
| 70 | 64 | ||
| 71 | - var edit_bPloygonGrid = ""; | 65 | + var bPloygonGrid = ""; |
| 72 | 66 | ||
| 73 | - var editPolyGonLen_ = edit_pointE.getPath().length; | 67 | + var editPolyGonLen_ = pointE.getPath().length; |
| 74 | 68 | ||
| 75 | for(var k =0;k<editPolyGonLen_;k++) { | 69 | for(var k =0;k<editPolyGonLen_;k++) { |
| 76 | 70 | ||
| 77 | if(k==0) { | 71 | if(k==0) { |
| 78 | 72 | ||
| 79 | - edit_bPloygonGrid = edit_pointE.getPath()[k].lng + ' ' + edit_pointE.getPath()[k].lat; | 73 | + bPloygonGrid = pointE.getPath()[k].lng + ' ' + pointE.getPath()[k].lat; |
| 80 | 74 | ||
| 81 | }else { | 75 | }else { |
| 82 | 76 | ||
| 83 | - edit_bPloygonGrid = edit_bPloygonGrid + ',' + edit_pointE.getPath()[k].lng + ' ' + edit_pointE.getPath()[k].lat; | 77 | + bPloygonGrid = bPloygonGrid + ',' + pointE.getPath()[k].lng + ' ' + pointE.getPath()[k].lat; |
| 84 | 78 | ||
| 85 | } | 79 | } |
| 86 | 80 | ||
| 87 | } | 81 | } |
| 88 | 82 | ||
| 89 | - edit_bPloygonGrid = edit_bPloygonGrid + ',' + edit_pointE.getPath()[0].lng + ' ' + edit_pointE.getPath()[0].lat; | ||
| 90 | - | 83 | + bPloygonGrid = bPloygonGrid + ',' + pointE.getPath()[0].lng + ' ' + pointE.getPath()[0].lat; |
| 91 | // 多边形中心点 | 84 | // 多边形中心点 |
| 92 | - var centre_points = edit_pointE.getBounds().getCenter().lng + ' ' + edit_pointE.getBounds().getCenter().lat; | ||
| 93 | - | ||
| 94 | - /** 设置修改站点集合对象站点中心点百度坐标属性值 @param:<bJwpoints:中心点百度坐标) */ | ||
| 95 | - objStation.stationBJwpoints = centre_points; | ||
| 96 | - | ||
| 97 | - /** 设置修改站点集合对象范围图形类型属性值 @param:<shapesType:范围图形类型) */ | ||
| 98 | - objStation.stationShapesType = 'd';; | ||
| 99 | - | ||
| 100 | - /** 设置修改站点集合对象圆形半径属性值 @param:<radius:圆形半径) */ | ||
| 101 | - objStation.stationRadius = ''; | ||
| 102 | - | ||
| 103 | - /** 设置修改站点集合对象图形百度坐标集合属性值 @param:<bPolygonGrid:图形百度坐标集合) */ | ||
| 104 | - objStation.stationBPolygonGrid = edit_bPloygonGrid; | ||
| 105 | - | ||
| 106 | - $.get('editstation.html', function(m){ | ||
| 107 | - | ||
| 108 | - $(pjaxContainer).append(m); | ||
| 109 | - | ||
| 110 | - $('#edit_station_mobal').trigger('editSelectMobal_show', [WorldsBMapLine,objStation,PublicFunctions]); | ||
| 111 | - | ||
| 112 | - }); | 85 | + var centre_points = pointE.getBounds().getCenter().lng + ' ' + pointE.getBounds().getCenter().lat; |
| 86 | + if(type == 'edit') { | ||
| 87 | + /** 设置修改站点集合对象站点中心点百度坐标属性值 @param:<bJwpoints:中心点百度坐标) */ | ||
| 88 | + objStation.stationBJwpoints = centre_points; | ||
| 89 | + /** 设置修改站点集合对象范围图形类型属性值 @param:<shapesType:范围图形类型) */ | ||
| 90 | + objStation.stationShapesType = 'd';; | ||
| 91 | + /** 设置修改站点集合对象圆形半径属性值 @param:<radius:圆形半径) */ | ||
| 92 | + objStation.stationRadius = ''; | ||
| 93 | + /** 设置修改站点集合对象图形百度坐标集合属性值 @param:<bPolygonGrid:图形百度坐标集合) */ | ||
| 94 | + objStation.stationBPolygonGrid = bPloygonGrid; | ||
| 95 | + $.get('editstation.html', function(m){ | ||
| 96 | + | ||
| 97 | + $(pjaxContainer).append(m); | ||
| 98 | + | ||
| 99 | + $('#edit_station_mobal').trigger('editSelectMobal_show', [WorldsBMapLine, MapGetAjaxData, PublicFunctions, objStation]); | ||
| 100 | + | ||
| 101 | + }); | ||
| 102 | + } else if(type == 'add') { | ||
| 103 | + /** 设置新增站点集合对象站点中心点百度坐标属性值 @param:<bJwpoints:中心点百度坐标) */ | ||
| 104 | + objStation.bJwpoints = centre_points; | ||
| 105 | + /** 设置新增站点集合对象范围图形类型属性值 @param:<shapesType:范围图形类型) */ | ||
| 106 | + objStation.shapesType = 'd'; | ||
| 107 | + /** 设置新增站点集合对象圆形半径属性值 @param:<radius:圆形半径) */ | ||
| 108 | + objStation.radius = ''; | ||
| 109 | + /** 设置新增站点集合对象图形百度坐标集合属性值 @param:<bPolygonGrid:图形百度坐标集合) */ | ||
| 110 | + objStation.bPolygonGrid = bPloygonGrid; | ||
| 111 | + // 加载add页面 | ||
| 112 | + $.get('addstation.html', function(m){ | ||
| 113 | + $(pjaxContainer).append(m); | ||
| 114 | + $('#add_station_mobal').trigger('AddStationMobal.show', [WorldsBMapLine, MapGetAjaxData, objStation, EditRoute, PublicFunctions]); | ||
| 115 | + }); | ||
| 116 | + } | ||
| 113 | 117 | ||
| 114 | } | 118 | } |
| 115 | - | 119 | + // 打开按钮事件 |
| 120 | + PublicFunctions.editAChangeCssRemoveDisabled(); | ||
| 116 | }); | 121 | }); |
| 117 | 122 | ||
| 118 | }, | 123 | }, |
| 119 | - | ||
| 120 | - closeDrawingManager : function() { | ||
| 121 | - | 124 | + // 打开绘画工具 |
| 125 | + drawingManagerOpen : function() { | ||
| 126 | + // 打开鼠标绘画工具 | ||
| 127 | + drawingManager.open(); | ||
| 128 | + // 设置属性 | ||
| 129 | + drawingManager.setDrawingMode(BMAP_DRAWING_POLYGON); | ||
| 130 | + }, | ||
| 131 | + drawingManagerClose : function() { | ||
| 122 | drawingManager.close(); | 132 | drawingManager.close(); |
| 123 | - } | 133 | + }, |
| 124 | } | 134 | } |
| 125 | 135 | ||
| 126 | return draMangerObj; | 136 | return draMangerObj; |
src/main/resources/static/pages/base/line/js/editRoute.js
| @@ -12,10 +12,23 @@ var EditRoute = function(){ | @@ -12,10 +12,23 @@ var EditRoute = function(){ | ||
| 12 | setLineId : function(id) { | 12 | setLineId : function(id) { |
| 13 | line.id = id; | 13 | line.id = id; |
| 14 | }, | 14 | }, |
| 15 | + getLineId : function() { | ||
| 16 | + return line.id; | ||
| 17 | + }, | ||
| 15 | setLineDir : function(dir) { | 18 | setLineDir : function(dir) { |
| 16 | 19 | ||
| 17 | line.dir = dir; | 20 | line.dir = dir; |
| 18 | }, | 21 | }, |
| 22 | + getLineDir : function() { | ||
| 23 | + | ||
| 24 | + return line.dir; | ||
| 25 | + }, | ||
| 26 | + setLineGenerationType : function(generationType) {// 生成类型(uploadGPS:上传gps/cite:引用当前版本) | ||
| 27 | + line.generationType = generationType; | ||
| 28 | + }, | ||
| 29 | + getLineGenerationType : function() {// 生成类型(uploadGPS:上传gps/cite:引用当前版本) | ||
| 30 | + return line.generationType; | ||
| 31 | + }, | ||
| 19 | }; | 32 | }; |
| 20 | 33 | ||
| 21 | return editRoute; | 34 | return editRoute; |
src/main/resources/static/pages/base/line/js/line-add-form.js
| @@ -246,7 +246,7 @@ $(function(){ | @@ -246,7 +246,7 @@ $(function(){ | ||
| 246 | if(result.status=='SUCCESS') { | 246 | if(result.status=='SUCCESS') { |
| 247 | 247 | ||
| 248 | // 弹出添加成功提示消息 | 248 | // 弹出添加成功提示消息 |
| 249 | - layer.msg('添加成功...'); | 249 | + layer.msg('添加成功,并已自动为您生成线路原始版本,可以在线路版本信息下查看!', {time: 7000}); |
| 250 | 250 | ||
| 251 | } else if(result.status=='ERROR') { | 251 | } else if(result.status=='ERROR') { |
| 252 | 252 |
src/main/resources/static/pages/base/line/js/map-ajax-getdata.js
0 → 100644
| 1 | +/** | ||
| 2 | + * MapGetAjaxData :ajax异步请求 | ||
| 3 | + * | ||
| 4 | + * - - - - - -》 getSectionCacheList :获取路段列表 | ||
| 5 | + * | ||
| 6 | + * - - - - - -》 getzdlyInfo :获取站点列表 | ||
| 7 | + * | ||
| 8 | + * - - - - - -》 getLikeStationName :查询是否有已存在站点名称 | ||
| 9 | + * | ||
| 10 | + * - - - - - -》 getStationCode:查询站点编码 | ||
| 11 | + * | ||
| 12 | + * - - - - - -》 findCacheUpStationRouteCode:查询上一个缓存站点的序号 | ||
| 13 | + * | ||
| 14 | + * - - - - - -》 findCacheUpSectionRouteCode:查询上一个缓存路段的序号 | ||
| 15 | + * | ||
| 16 | + * - - - - - -》 stationCacheSave:新增缓存站点保存 | ||
| 17 | + * | ||
| 18 | + * - - - - - -》 stationCacheUpdate:站点缓存更新 | ||
| 19 | + * | ||
| 20 | + * - - - - - -》 sectionUpdate : 编辑线路走向保存 | ||
| 21 | + * | ||
| 22 | + * - - - - - -》 getIdLineName:获取线路名称 | ||
| 23 | + */ | ||
| 24 | + | ||
| 25 | +var MapGetAjaxData = function(){ | ||
| 26 | + | ||
| 27 | + var ajaxData = { | ||
| 28 | + // 获取路段列表 | ||
| 29 | + getSectionCacheList : function(lineId,dir,callback) { | ||
| 30 | + $get('/sectionroute/findCacheSection',{'lineId' : lineId , 'dir' : dir},function(resultdata) { | ||
| 31 | + callback && callback(resultdata); | ||
| 32 | + }); | ||
| 33 | + }, | ||
| 34 | + getzdlyInfo : function(params,callback) { | ||
| 35 | + $get('/stationroute/cacheList',params,function(array) { | ||
| 36 | + callback && callback(array); | ||
| 37 | + }); | ||
| 38 | + }, | ||
| 39 | + // 查询是否有已存在站点名称 | ||
| 40 | + getLikeStationName : function (stationName,callback) { | ||
| 41 | + $get('/station/all', {stationName_eq: stationName}, function(array){ | ||
| 42 | + callback && callback(array); | ||
| 43 | + }); | ||
| 44 | + }, | ||
| 45 | + // 查询站点编码 | ||
| 46 | + getStationCode : function(callback) { | ||
| 47 | + $get('/station/getStationCode',null,function(stationCode) { | ||
| 48 | + if(stationCode>0) { | ||
| 49 | + callback && callback(stationCode); | ||
| 50 | + } | ||
| 51 | + }); | ||
| 52 | + }, | ||
| 53 | + findCacheUpStationRouteCode : function(params,callback) { | ||
| 54 | + $get('/stationroute/findCacheUpStationRouteCode',params,function(result) { | ||
| 55 | + callback && callback(result); | ||
| 56 | + }); | ||
| 57 | + }, | ||
| 58 | + findCacheUpSectionRouteCode : function(lineId,dir,sectionRouteCode,callback) { | ||
| 59 | + $get('/sectionroute/findCacheUpSectionRouteCode',{'lineId' : lineId , 'direction' : dir, 'sectionRouteCode':sectionRouteCode},function(result) { | ||
| 60 | + callback && callback(result); | ||
| 61 | + }); | ||
| 62 | + }, | ||
| 63 | + // 新增缓存站点保存 | ||
| 64 | + stationCacheSave : function(station,callback) { | ||
| 65 | + $post('/station/stationCacheSave',station,function(data) { | ||
| 66 | + debugger | ||
| 67 | + callback && callback(data); | ||
| 68 | + }); | ||
| 69 | + }, | ||
| 70 | + // 缓存站点更新 | ||
| 71 | + stationCacheUpdate : function(station,callback) { | ||
| 72 | + $post('/station/stationCacheUpdate',station,function(data) { | ||
| 73 | + callback && callback(data); | ||
| 74 | + }); | ||
| 75 | + }, | ||
| 76 | + // 获取线路名称 | ||
| 77 | + getIdLineName : function (id,callback) { | ||
| 78 | + | ||
| 79 | + $get('/line/' + id ,null, function(result){ | ||
| 80 | + | ||
| 81 | + callback && callback(result); | ||
| 82 | + | ||
| 83 | + }); | ||
| 84 | + | ||
| 85 | + }, | ||
| 86 | + } | ||
| 87 | + return ajaxData; | ||
| 88 | +}(); | ||
| 0 | \ No newline at end of file | 89 | \ No newline at end of file |
src/main/resources/static/pages/base/line/js/line-map-function.js renamed to src/main/resources/static/pages/base/line/js/map-function.js
| @@ -3,7 +3,7 @@ var PublicFunctions = function () { | @@ -3,7 +3,7 @@ var PublicFunctions = function () { | ||
| 3 | /** 初始化线路标题与ID */ | 3 | /** 初始化线路标题与ID */ |
| 4 | setTiteText : function(lineId) { | 4 | setTiteText : function(lineId) { |
| 5 | // 根据线路ID获取线路名称 | 5 | // 根据线路ID获取线路名称 |
| 6 | - GetAjaxData.getIdLineName(lineId,function(data) { | 6 | + MapGetAjaxData.getIdLineName(lineId,function(data) { |
| 7 | // 定义线路名称 | 7 | // 定义线路名称 |
| 8 | var lineNameV = data.name; | 8 | var lineNameV = data.name; |
| 9 | $('.portlet-title .caption').text(lineNameV); | 9 | $('.portlet-title .caption').text(lineNameV); |
| @@ -40,7 +40,7 @@ var PublicFunctions = function () { | @@ -40,7 +40,7 @@ var PublicFunctions = function () { | ||
| 40 | // 版本号 | 40 | // 版本号 |
| 41 | $('#versionsInput').val(Section.versions); | 41 | $('#versionsInput').val(Section.versions); |
| 42 | // 是否撤销 | 42 | // 是否撤销 |
| 43 | - $('#destroySelect').val(Section.destroy); | 43 | + $('#destroySelect').val(0); |
| 44 | // 描述/说明 | 44 | // 描述/说明 |
| 45 | $('#descriptionsTextarea').val(Section.descriptions); | 45 | $('#descriptionsTextarea').val(Section.descriptions); |
| 46 | }, | 46 | }, |
| @@ -113,7 +113,6 @@ var PublicFunctions = function () { | @@ -113,7 +113,6 @@ var PublicFunctions = function () { | ||
| 113 | /** 在地图上画点 @param:<point_center:中心坐标点> */ | 113 | /** 在地图上画点 @param:<point_center:中心坐标点> */ |
| 114 | WorldsBMapLine.drawingUpStationPoint(point_center,stationName,s+1); | 114 | WorldsBMapLine.drawingUpStationPoint(point_center,stationName,s+1); |
| 115 | } | 115 | } |
| 116 | - | ||
| 117 | } | 116 | } |
| 118 | // 路段数据长度 | 117 | // 路段数据长度 |
| 119 | var dataLen = data.length; | 118 | var dataLen = data.length; |
src/main/resources/static/pages/base/line/js/map.js
| @@ -206,7 +206,50 @@ var WorldsBMapLine = function () { | @@ -206,7 +206,50 @@ var WorldsBMapLine = function () { | ||
| 206 | })(); | 206 | })(); |
| 207 | 207 | ||
| 208 | }, | 208 | }, |
| 209 | - // 在地图上画出上行线路走向 | 209 | + drawingSection: function(data){ |
| 210 | + /** 获取站点路由信息 @param:<Line.id:线路Id;0:上行> @return:<resultdata:站点路由数据> */ | ||
| 211 | + WorldsBMapLine.clearMarkAndOverlays(); | ||
| 212 | + // 编辑路段数据 | ||
| 213 | + if(data) { | ||
| 214 | + // 地图折线坐标点集合 | ||
| 215 | + var polylineArray = []; | ||
| 216 | + // 获取路段折线坐标字符串 | ||
| 217 | + var sectionBsectionVectorStr = data.sectionBsectionVector; | ||
| 218 | + if(sectionBsectionVectorStr==null) { | ||
| 219 | + return; | ||
| 220 | + } | ||
| 221 | + // 切割段折线坐标字符串 | ||
| 222 | + var tempStr = sectionBsectionVectorStr.substring(11,sectionBsectionVectorStr.length-1); | ||
| 223 | + // 分割折线坐标字符串 | ||
| 224 | + var lineArray = tempStr.split(','); | ||
| 225 | + for(var i = 0;i<lineArray.length;i++) { | ||
| 226 | + polylineArray.push(new BMap.Point(lineArray[i].split(' ')[0],lineArray[i].split(' ')[1])); | ||
| 227 | + } | ||
| 228 | + var index = parseInt(polylineArray.length/2); | ||
| 229 | + var center = polylineArray[index]; | ||
| 230 | + /** 在地图上画出线路走向 @param:<polylineArray:地图折线坐标点集合;resultdata:站点路由数据> */ | ||
| 231 | + WorldsBMapLine.drawingUpline(polylineArray,center); | ||
| 232 | + /** 在地图上画点 @param:<point_center:中心坐标点> */ | ||
| 233 | + WorldsBMapLine.drawingUpStationPoint(center,data.sectionName,1); | ||
| 234 | + } | ||
| 235 | + }, | ||
| 236 | + // 在地图上画出上行线路走向(单路段) | ||
| 237 | + drawingUpline : function (polylineArray,polyline_center,data) { | ||
| 238 | + /*WorldsBMap.clearMarkAndOverlays();*/ | ||
| 239 | + polyUpline = ''; | ||
| 240 | + // 创建线路走向 | ||
| 241 | + polyUpline = new BMap.Polyline(polylineArray, {strokeColor : "blue",strokeWeight : 6,strokeOpacity : 0.5}); | ||
| 242 | + // polyUpline.data = data; | ||
| 243 | + // 把折线添加到地图上 | ||
| 244 | + mapBValue.addOverlay(polyUpline); | ||
| 245 | + var PanOptions_ ={noAnimation :true}; | ||
| 246 | + mapBValue.reset(); | ||
| 247 | + mapBValue.panTo(polyline_center,PanOptions_); | ||
| 248 | + mapBValue.panBy(500,-510,PanOptions_); | ||
| 249 | + mapBValue.setZoom(14); | ||
| 250 | + }, | ||
| 251 | + | ||
| 252 | + // 在地图上画出上行线路走向(多路段) | ||
| 210 | drawingUpline01 : function (polylineArray,polyline_center,data) { | 253 | drawingUpline01 : function (polylineArray,polyline_center,data) { |
| 211 | var polyUpline01 = 'polyline' + '_' + data.sectionrouteId; | 254 | var polyUpline01 = 'polyline' + '_' + data.sectionrouteId; |
| 212 | // 创建线路走向 | 255 | // 创建线路走向 |
| @@ -252,7 +295,7 @@ var WorldsBMapLine = function () { | @@ -252,7 +295,7 @@ var WorldsBMapLine = function () { | ||
| 252 | // 加载修改路段弹出层mobal页面 | 295 | // 加载修改路段弹出层mobal页面 |
| 253 | $.get('editsection.html', function(m){ | 296 | $.get('editsection.html', function(m){ |
| 254 | $(pjaxContainer).append(m); | 297 | $(pjaxContainer).append(m); |
| 255 | - $('#edit_section_mobal_cache').trigger('editSectionMobalCache_show', [WorldsBMapLine,GetAjaxData,EditSectionObj,PublicFunctions]); | 298 | + $('#edit_section_mobal_cache').trigger('editSectionMobalCache_show', [WorldsBMapLine,MapGetAjaxData,EditSectionObj,PublicFunctions]); |
| 256 | }); | 299 | }); |
| 257 | // 打开按钮事件 | 300 | // 打开按钮事件 |
| 258 | PublicFunctions.editAChangeCssRemoveDisabled(); | 301 | PublicFunctions.editAChangeCssRemoveDisabled(); |
| @@ -300,9 +343,12 @@ var WorldsBMapLine = function () { | @@ -300,9 +343,12 @@ var WorldsBMapLine = function () { | ||
| 300 | } | 343 | } |
| 301 | WorldsBMapLine.setIsCutSection(true); | 344 | WorldsBMapLine.setIsCutSection(true); |
| 302 | } | 345 | } |
| 303 | - var markerMenu=new BMap.ContextMenu(); | ||
| 304 | - markerMenu.addItem(new BMap.MenuItem('切路段',editSection.bind(polyUpline01))); | ||
| 305 | - polyUpline01.addContextMenu(markerMenu); | 346 | + // 路段生成类型位gps上传时才开启右击事件 |
| 347 | + if(EditRoute.getLineGenerationType() == 'uploadGPS') { | ||
| 348 | + var markerMenu=new BMap.ContextMenu(); | ||
| 349 | + markerMenu.addItem(new BMap.MenuItem('切路段',editSection.bind(polyUpline01))); | ||
| 350 | + polyUpline01.addContextMenu(markerMenu); | ||
| 351 | + } | ||
| 306 | 352 | ||
| 307 | 353 | ||
| 308 | var PanOptions_ ={noAnimation :true}; | 354 | var PanOptions_ ={noAnimation :true}; |
| @@ -387,7 +433,7 @@ var WorldsBMapLine = function () { | @@ -387,7 +433,7 @@ var WorldsBMapLine = function () { | ||
| 387 | mapBValue.addOverlay(marker); | 433 | mapBValue.addOverlay(marker); |
| 388 | }, | 434 | }, |
| 389 | 435 | ||
| 390 | - // 根据站点坐标匹配库中的公交站点(手动规划) | 436 | + // 根据站点坐标匹配库中的公交站点 |
| 391 | stationsPointsToLibraryPoint : function(arra,callback) { | 437 | stationsPointsToLibraryPoint : function(arra,callback) { |
| 392 | // 获取长度 | 438 | // 获取长度 |
| 393 | var len = arra.length; | 439 | var len = arra.length; |
| @@ -710,9 +756,6 @@ var WorldsBMapLine = function () { | @@ -710,9 +756,6 @@ var WorldsBMapLine = function () { | ||
| 710 | mapBValue.panTo(point,PanOptions_); | 756 | mapBValue.panTo(point,PanOptions_); |
| 711 | 757 | ||
| 712 | mapBValue.panBy(10,-200,PanOptions_); | 758 | mapBValue.panBy(10,-200,PanOptions_); |
| 713 | - | ||
| 714 | - // 关闭按钮事件 | ||
| 715 | - PublicFunctions.addAChangeCssAddDisabled(); | ||
| 716 | 759 | ||
| 717 | // 编辑圆监听事件 | 760 | // 编辑圆监听事件 |
| 718 | circle.addEventListener('dblclick',function() { | 761 | circle.addEventListener('dblclick',function() { |
| @@ -740,7 +783,7 @@ var WorldsBMapLine = function () { | @@ -740,7 +783,7 @@ var WorldsBMapLine = function () { | ||
| 740 | 783 | ||
| 741 | $(pjaxContainer).append(m); | 784 | $(pjaxContainer).append(m); |
| 742 | 785 | ||
| 743 | - $('#edit_station_mobal').trigger('editSelectMobal_show', [WorldsBMapLine,objStation,PublicFunctions]); | 786 | + $('#edit_station_mobal').trigger('editSelectMobal_show', [WorldsBMapLine,MapGetAjaxData,PublicFunctions,objStation]); |
| 744 | 787 | ||
| 745 | }); | 788 | }); |
| 746 | 789 | ||
| @@ -748,7 +791,7 @@ var WorldsBMapLine = function () { | @@ -748,7 +791,7 @@ var WorldsBMapLine = function () { | ||
| 748 | PublicFunctions.editAChangeCssRemoveDisabled(); | 791 | PublicFunctions.editAChangeCssRemoveDisabled(); |
| 749 | }); | 792 | }); |
| 750 | 793 | ||
| 751 | - // 编辑多变行 | 794 | + // 编辑多边行 |
| 752 | }else if(stationShapesType =='d') { | 795 | }else if(stationShapesType =='d') { |
| 753 | 796 | ||
| 754 | // 清除地图覆盖物 | 797 | // 清除地图覆盖物 |
| @@ -808,9 +851,6 @@ var WorldsBMapLine = function () { | @@ -808,9 +851,6 @@ var WorldsBMapLine = function () { | ||
| 808 | 851 | ||
| 809 | // 将地图在水平位置上移动x像素,垂直位置上移动y像素。 | 852 | // 将地图在水平位置上移动x像素,垂直位置上移动y像素。 |
| 810 | mapBValue.panBy(10,-150,PanOptions_); | 853 | mapBValue.panBy(10,-150,PanOptions_); |
| 811 | - | ||
| 812 | - // 关闭按钮事件(图形编辑中) | ||
| 813 | - PublicFunctions.addAChangeCssAddDisabled(); | ||
| 814 | 854 | ||
| 815 | // 添加多变行编辑事件 | 855 | // 添加多变行编辑事件 |
| 816 | polygon.addEventListener('dblclick',function(e) { | 856 | polygon.addEventListener('dblclick',function(e) { |
| @@ -857,14 +897,14 @@ var WorldsBMapLine = function () { | @@ -857,14 +897,14 @@ var WorldsBMapLine = function () { | ||
| 857 | 897 | ||
| 858 | $(pjaxContainer).append(m); | 898 | $(pjaxContainer).append(m); |
| 859 | 899 | ||
| 860 | - $('#edit_station_mobal').trigger('editSelectMobal_show', [WorldsBMapLine,objStation,PublicFunctions]); | 900 | + $('#edit_station_mobal').trigger('editSelectMobal_show', [WorldsBMapLine,MapGetAjaxData,PublicFunctions,objStation]); |
| 861 | 901 | ||
| 862 | }); | 902 | }); |
| 863 | 903 | ||
| 904 | + // 打开按钮事件 | ||
| 905 | + PublicFunctions.editAChangeCssRemoveDisabled(); | ||
| 864 | }); | 906 | }); |
| 865 | 907 | ||
| 866 | - // 打开按钮事件 | ||
| 867 | - PublicFunctions.editAChangeCssRemoveDisabled(); | ||
| 868 | } | 908 | } |
| 869 | } | 909 | } |
| 870 | }, | 910 | }, |
src/main/resources/static/pages/base/line/list.html
| @@ -244,7 +244,7 @@ | @@ -244,7 +244,7 @@ | ||
| 244 | 闵行公司 | 244 | 闵行公司 |
| 245 | {{/if}} | 245 | {{/if}} |
| 246 | </td> | 246 | </td> |
| 247 | -<td> | 247 | + <td> |
| 248 | {{if obj.company == '55'}} | 248 | {{if obj.company == '55'}} |
| 249 | 249 | ||
| 250 | {{if obj.brancheCompany == '1'}} | 250 | {{if obj.brancheCompany == '1'}} |
| @@ -295,6 +295,8 @@ | @@ -295,6 +295,8 @@ | ||
| 295 | 南汇维修公司 | 295 | 南汇维修公司 |
| 296 | {{else if obj.brancheCompany == '5'}} | 296 | {{else if obj.brancheCompany == '5'}} |
| 297 | 南汇公司 | 297 | 南汇公司 |
| 298 | + {{else if obj.brancheCompany == '6'}} | ||
| 299 | + 航头枢纽站 | ||
| 298 | {{/if}} | 300 | {{/if}} |
| 299 | 301 | ||
| 300 | {{/if}} | 302 | {{/if}} |
src/main/resources/static/pages/base/line/map.html
| @@ -3,44 +3,75 @@ | @@ -3,44 +3,75 @@ | ||
| 3 | <div class="portlet-body"> | 3 | <div class="portlet-body"> |
| 4 | <!-- 地图 --> | 4 | <!-- 地图 --> |
| 5 | <div id="bmap_basic" class="bmaps"></div> | 5 | <div id="bmap_basic" class="bmaps"></div> |
| 6 | + <!-- 绘画工具栏 --> | ||
| 7 | + <div class="leftUtils hidden"> | ||
| 8 | + <div class="btn-group" style="left: 100px;"> | ||
| 9 | + <a class="btn btn-sm green-seagreen dropdown-toggle" style="width: 98px;" href="javascript:;" data-toggle="dropdown" aria-expanded="false"> 绘制工具 | ||
| 10 | + <i class="fa fa-angle-down"></i> | ||
| 11 | + </a> | ||
| 12 | + <ul class="dropdown-menu pull-right" style="min-width:100px"> | ||
| 13 | + <li> | ||
| 14 | + <a href="javascript:;" id="oppenDrawingManager"><i class="fa fa-pencil"></i> 打开 </a> | ||
| 15 | + </li> | ||
| 16 | + <li> | ||
| 17 | + <a href="javascript:;" id = "closeDrawingManager"> <i class="fa fa-reply"></i> 关闭 </a> | ||
| 18 | + </li> | ||
| 19 | + </ul> | ||
| 20 | + </div> | ||
| 21 | + </div> | ||
| 6 | <!-- 右边显示栏 --> | 22 | <!-- 右边显示栏 --> |
| 7 | <div class="cut-section" id="scrllmouseEvent_div"> | 23 | <div class="cut-section" id="scrllmouseEvent_div"> |
| 8 | <div class="portlet-title"> | 24 | <div class="portlet-title"> |
| 9 | <div class="caption">途径站点</div> | 25 | <div class="caption">途径站点</div> |
| 10 | </div> | 26 | </div> |
| 11 | <div class="portlet-body"> | 27 | <div class="portlet-body"> |
| 12 | - <div class="table-toolbar" style="text-align: center;" id="upload"> | ||
| 13 | - <button class="btn btn-circle blue" id="uploadRoute"> | 28 | + <div class="table-toolbar" style="text-align: center;" id="generationRoute_div"> |
| 29 | + <button class="btn btn-circle blue" id="generationRoute"> | ||
| 14 | <i class="fa fa-plus"></i> 生成路线 | 30 | <i class="fa fa-plus"></i> 生成路线 |
| 15 | </button> | 31 | </button> |
| 16 | </div> | 32 | </div> |
| 17 | - <div class="portlet-body hidden" id="upload_show"> | 33 | + <!-- 生成走向跳转的div --> |
| 34 | + <div class="portlet-body hidden" id="route_show"> | ||
| 18 | <div> | 35 | <div> |
| 19 | <ul class="nav nav-pills nav-justified steps"> | 36 | <ul class="nav nav-pills nav-justified steps"> |
| 20 | <li class="active"> | 37 | <li class="active"> |
| 21 | <a id="section"><span>路段</span></a> | 38 | <a id="section"><span>路段</span></a> |
| 22 | </li> | 39 | </li> |
| 23 | <li> | 40 | <li> |
| 24 | - <a id="station"><span>站点</span></a> | 41 | + <a class="station" id="station"><span>站点</span></a> |
| 25 | </li> | 42 | </li> |
| 26 | </ul> | 43 | </ul> |
| 27 | </div> | 44 | </div> |
| 28 | <div id="section_list_div" class="active" style="margin: 5px;"> | 45 | <div id="section_list_div" class="active" style="margin: 5px;"> |
| 29 | - <div class="defeat-scroll" | ||
| 30 | - style="height: 400px; overflow-y: auto; "> | ||
| 31 | - <table class="table table-bordered table-hover table-checkable " | ||
| 32 | - id="section_table" style="color: white;"> | ||
| 33 | - <thead> | ||
| 34 | - <tr role="row" class="heading"> | ||
| 35 | - <th>截取路段的名称</th> | ||
| 36 | - </tr> | ||
| 37 | - </thead> | ||
| 38 | - <tbody></tbody> | ||
| 39 | - </table> | 46 | + <!-- 上传gps生成路段div --> |
| 47 | + <div id="gpsSection"> | ||
| 48 | + <div class="defeat-scroll" | ||
| 49 | + style="height: 400px; overflow-y: auto; "> | ||
| 50 | + <table class="table table-bordered table-hover table-checkable " | ||
| 51 | + id="section_table" style="color: white;"> | ||
| 52 | + <thead> | ||
| 53 | + <tr role="row" class="heading"> | ||
| 54 | + <th>截取路段的名称</th> | ||
| 55 | + </tr> | ||
| 56 | + </thead> | ||
| 57 | + <tbody></tbody> | ||
| 58 | + </table> | ||
| 59 | + </div> | ||
| 60 | + <div class="table-toolbar"> | ||
| 61 | + <a class="btn btn-circle blue" id="Undo">撤销切点</a> | ||
| 62 | + <a class="btn btn-circle blue" id="cutSection">提交选项</a> | ||
| 63 | + </div> | ||
| 40 | </div> | 64 | </div> |
| 41 | - <div class="table-toolbar"> | ||
| 42 | - <a class="btn btn-circle blue" id="Undo">撤销切点</a> | ||
| 43 | - <a class="btn btn-circle blue" id="cutSection">提交选项</a> | 65 | + <!-- 引用当前版本路段div --> |
| 66 | + <div id="citeSection"> | ||
| 67 | + <div class="defeat-scroll" | ||
| 68 | + style="height: 400px; overflow-y: auto; "> | ||
| 69 | + </div> | ||
| 70 | + <div class="table-toolbar"> | ||
| 71 | + <a class="btn btn-circle blue" id="findSection">查看路段</a> | ||
| 72 | + <a class="btn btn-circle blue" id="addSection">添加路段</a> | ||
| 73 | + <a class="btn btn-circle blue" id="submitOptions">提交选项</a> | ||
| 74 | + </div> | ||
| 44 | </div> | 75 | </div> |
| 45 | </div> | 76 | </div> |
| 46 | <div id="station_list_div" class="hidden"> | 77 | <div id="station_list_div" class="hidden"> |
| @@ -48,6 +79,7 @@ | @@ -48,6 +79,7 @@ | ||
| 48 | style="height: 400px; overflow-y: auto; "> | 79 | style="height: 400px; overflow-y: auto; "> |
| 49 | </div> | 80 | </div> |
| 50 | <div class="table-toolbar"> | 81 | <div class="table-toolbar"> |
| 82 | + <a class="btn btn-circle blue" id="addStation">添加站点</a> | ||
| 51 | <a class="btn btn-circle blue" id="findStation">查看站点</a> | 83 | <a class="btn btn-circle blue" id="findStation">查看站点</a> |
| 52 | <a class="btn btn-circle blue" id="updateStation">修改站点</a> | 84 | <a class="btn btn-circle blue" id="updateStation">修改站点</a> |
| 53 | </div> | 85 | </div> |
| @@ -81,6 +113,8 @@ $(function(){ | @@ -81,6 +113,8 @@ $(function(){ | ||
| 81 | var direction = 0; | 113 | var direction = 0; |
| 82 | // 站点Map | 114 | // 站点Map |
| 83 | var stationRouteMap = new Map(); | 115 | var stationRouteMap = new Map(); |
| 116 | + // 路段Map | ||
| 117 | + var sectionRouteMap = new Map(); | ||
| 84 | // 如果线路ID不为空 | 118 | // 如果线路ID不为空 |
| 85 | if(id) { | 119 | if(id) { |
| 86 | var styleOptions = { | 120 | var styleOptions = { |
| @@ -102,7 +136,7 @@ $(function(){ | @@ -102,7 +136,7 @@ $(function(){ | ||
| 102 | var map_ = WorldsBMapLine.init(); | 136 | var map_ = WorldsBMapLine.init(); |
| 103 | 137 | ||
| 104 | /** 初始化绘图工具类 @param:<map_:map对象;styleOptions:绘图样式对象> @return:DrawingManager对象 */ | 138 | /** 初始化绘图工具类 @param:<map_:map对象;styleOptions:绘图样式对象> @return:DrawingManager对象 */ |
| 105 | -// DrawingManagerObj.init(map_,styleOptions); | 139 | + DrawingManagerObj.init(map_,styleOptions); |
| 106 | 140 | ||
| 107 | layer.msg('请生成路线!!!'); | 141 | layer.msg('请生成路线!!!'); |
| 108 | 142 | ||
| @@ -123,12 +157,12 @@ $(function(){ | @@ -123,12 +157,12 @@ $(function(){ | ||
| 123 | } | 157 | } |
| 124 | 158 | ||
| 125 | // 上传GPS坐标生成路线事件 | 159 | // 上传GPS坐标生成路线事件 |
| 126 | - $('#uploadRoute').on('click', function() { | 160 | + $('#generationRoute').on('click', function() { |
| 127 | EditRoute.setLineId(id); | 161 | EditRoute.setLineId(id); |
| 128 | - EditRoute.setLineDir(direction); | 162 | +// EditRoute.setLineDir(direction); |
| 129 | $.get('editRoute.html', function(m){ | 163 | $.get('editRoute.html', function(m){ |
| 130 | $(pjaxContainer).append(m); | 164 | $(pjaxContainer).append(m); |
| 131 | - $('#edit_route_mobal').trigger('editRouteMobal.show',[TransGPS,EditRoute,WorldsBMapLine,DrawingManagerObj,GetAjaxData,PublicFunctions]); | 165 | + $('#edit_route_mobal').trigger('editRouteMobal.show',[TransGPS,EditRoute,WorldsBMapLine,DrawingManagerObj,MapGetAjaxData,PublicFunctions]); |
| 132 | }); | 166 | }); |
| 133 | // 更新section_table 和缓存中的切点 | 167 | // 更新section_table 和缓存中的切点 |
| 134 | WorldsBMapLine.initCutSectionPoint(); | 168 | WorldsBMapLine.initCutSectionPoint(); |
| @@ -144,10 +178,29 @@ $(function(){ | @@ -144,10 +178,29 @@ $(function(){ | ||
| 144 | var section = EditSectionObj.getEitdSection(); | 178 | var section = EditSectionObj.getEitdSection(); |
| 145 | var josnSectionList = JSON.stringify(sectionList); | 179 | var josnSectionList = JSON.stringify(sectionList); |
| 146 | section.cutSectionList = josnSectionList; | 180 | section.cutSectionList = josnSectionList; |
| 147 | - $.get('submit_select.html', function(m){ | ||
| 148 | - $(pjaxContainer).append(m); | ||
| 149 | - $('#submit_select_mobal').trigger('submitSelectMobal.show',[section,EditRoute]); | 181 | + // 版本号 |
| 182 | + $.get('/lineVersions/findCurrentVersion',{'lineId':id},function(versions){ | ||
| 183 | + section.versions = versions; | ||
| 184 | + layer.confirm('提交马上会把原有的站点和路段覆盖,您确定要提交吗?', { | ||
| 185 | + btn: ['提交','取消'] //按钮 | ||
| 186 | + }, function(index){ | ||
| 187 | + layer.close(index); | ||
| 188 | + $.post('/section/sectionCut', section, function(resuntDate){ | ||
| 189 | + if(resuntDate.status=='SUCCESS') { | ||
| 190 | + // 弹出添加成功提示消息 | ||
| 191 | + layer.msg('提交成功,跳转到线路详情页面!'); | ||
| 192 | + window.location.href = "/pages/base/stationroute/list.html?no="+section.sectionrouteLine+","+section.sectionrouteDirections; | ||
| 193 | + }else { | ||
| 194 | + // 弹出添加失败提示消息 | ||
| 195 | + layer.msg('提交失败...'); | ||
| 196 | + } | ||
| 197 | + }); | ||
| 198 | + }); | ||
| 150 | }); | 199 | }); |
| 200 | +// $.get('submit_select.html', function(m){ | ||
| 201 | +// $(pjaxContainer).append(m); | ||
| 202 | +// $('#submit_select_mobal').trigger('submitSelectMobal.show',[section,EditRoute]); | ||
| 203 | +// }); | ||
| 151 | } else { | 204 | } else { |
| 152 | layer.msg("请先截取路段!!!"); | 205 | layer.msg("请先截取路段!!!"); |
| 153 | } | 206 | } |
| @@ -179,7 +232,47 @@ $(function(){ | @@ -179,7 +232,47 @@ $(function(){ | ||
| 179 | } else { | 232 | } else { |
| 180 | layer.msg("没有截取路段,不可以撤销!!!"); | 233 | layer.msg("没有截取路段,不可以撤销!!!"); |
| 181 | } | 234 | } |
| 182 | - }); | 235 | + }); |
| 236 | + | ||
| 237 | + // 监听右侧悬浮框导航栏事件 | ||
| 238 | + $('#section').on('click',function(){ | ||
| 239 | + $('#station').parent().removeClass('active'); | ||
| 240 | + $('#section').parent().addClass('active'); | ||
| 241 | + $('#station_list_div').removeClass('active'); | ||
| 242 | + $('#station_list_div').addClass('hidden'); | ||
| 243 | + $('#section_list_div').removeClass('hidden'); | ||
| 244 | + $('#section_list_div').addClass('active'); | ||
| 245 | + var generationType = EditRoute.getLineGenerationType(); | ||
| 246 | + // 更具生成类型展示不同页面 | ||
| 247 | + if(generationType == 'cite'){ | ||
| 248 | + $('#gpsSection').addClass('hidden'); | ||
| 249 | + | ||
| 250 | + } else if(generationType == 'uploadGPS') { | ||
| 251 | + $('#citeSection').addClass('hidden'); | ||
| 252 | + } | ||
| 253 | + // 清除地图覆盖物 | ||
| 254 | + WorldsBMapLine.clearMarkAndOverlays(); | ||
| 255 | + var params = {}; | ||
| 256 | + var line = EditRoute.getLineObj(); | ||
| 257 | + params.lineId=line.id; | ||
| 258 | + params.dir = line.dir; | ||
| 259 | + // 查询路段信息 | ||
| 260 | + $get('/sectionroute/findCacheSection',params,function(data) { | ||
| 261 | + var section_radio_html = '<div id="section_radio">'; | ||
| 262 | + var cont = 1; | ||
| 263 | + var check = 'checked="checked"'; | ||
| 264 | + $.each(data,function(){ | ||
| 265 | + sectionRouteMap[this.sectionrouteId] = this; | ||
| 266 | + section_radio_html += '<div class="radio"><label class="radio_label section"><input name="sectionRadio" type="radio" class="radioclass" value="'+this.sectionrouteId+'" '+(cont==1?check:"")+' />'+this.sectionName+"</label></div>"; | ||
| 267 | + cont++; | ||
| 268 | + }); | ||
| 269 | + section_radio_html += '</div>'; | ||
| 270 | + $("#section_list_div #citeSection .defeat-scroll").html(section_radio_html); | ||
| 271 | + // 在地图上画出线路走向 | ||
| 272 | + PublicFunctions.linePanlThree(line.id,data,line.dir); | ||
| 273 | + }); | ||
| 274 | + }); | ||
| 275 | + | ||
| 183 | // 监听右侧悬浮框导航栏事件 | 276 | // 监听右侧悬浮框导航栏事件 |
| 184 | $('#station').on('click',function(){ | 277 | $('#station').on('click',function(){ |
| 185 | $('#section').parent().removeClass('active'); | 278 | $('#section').parent().removeClass('active'); |
| @@ -196,12 +289,12 @@ $(function(){ | @@ -196,12 +289,12 @@ $(function(){ | ||
| 196 | params.lineId=line.id; | 289 | params.lineId=line.id; |
| 197 | params.dir = line.dir; | 290 | params.dir = line.dir; |
| 198 | $.get('/stationroute/findCachePoint',params,function(data){ | 291 | $.get('/stationroute/findCachePoint',params,function(data){ |
| 199 | - var station_radio_html = '<div id="station_radio" >'; | 292 | + var station_radio_html = '<div id="station_radio">'; |
| 200 | var cont = 1; | 293 | var cont = 1; |
| 201 | var check = 'checked="checked"'; | 294 | var check = 'checked="checked"'; |
| 202 | $.each(data,function(){ | 295 | $.each(data,function(){ |
| 203 | stationRouteMap[this.stationRouteId] = this; | 296 | stationRouteMap[this.stationRouteId] = this; |
| 204 | - station_radio_html += '<div class="radio" ><label class="radio_label on"><input name="stationRadio" type="radio" class="radioclass" value="'+this.stationRouteId+'" '+(cont==1?check:"")+' />'+this.stationRouteStationName+"</label></div>"; | 297 | + station_radio_html += '<div class="radio"><label class="radio_label station"><input name="stationRadio" type="radio" class="radioclass" value="'+this.stationRouteId+'" '+(cont==1?check:"")+' />'+this.stationRouteStationName+"</label></div>"; |
| 205 | cont++; | 298 | cont++; |
| 206 | }); | 299 | }); |
| 207 | station_radio_html += '</div>'; | 300 | station_radio_html += '</div>'; |
| @@ -209,33 +302,61 @@ $(function(){ | @@ -209,33 +302,61 @@ $(function(){ | ||
| 209 | }); | 302 | }); |
| 210 | }); | 303 | }); |
| 211 | 304 | ||
| 305 | + // 查询路段 | ||
| 306 | + $('#findSection').on('click', function(){ | ||
| 307 | + var id = $(".section input[type='radio']:checked").val(); | ||
| 308 | + var sectionRoute = sectionRouteMap[id]; | ||
| 309 | + if(id && sectionRoute){ | ||
| 310 | + WorldsBMapLine.drawingSection(sectionRoute); | ||
| 311 | + } else if(id && !sectionRoute){ | ||
| 312 | + layer.msg('您选择的路段不存在,请重新选择!'); | ||
| 313 | + }else{ | ||
| 314 | + layer.msg('请先选择要查看的路段!'); | ||
| 315 | + } | ||
| 316 | + }); | ||
| 317 | + | ||
| 318 | + // 添加站点 | ||
| 319 | + $('#addStation').on('click', function(){ | ||
| 320 | + $.get('addstation_select.html', function(m){ | ||
| 321 | + $(pjaxContainer).append(m); | ||
| 322 | + $('#addstation_select_mobal').trigger('AddSelectMobal.show', [WorldsBMapLine, DrawingManagerObj, MapGetAjaxData, EditRoute, PublicFunctions]); | ||
| 323 | + }); | ||
| 324 | + }); | ||
| 325 | + | ||
| 326 | + // 查询站点 | ||
| 212 | $('#findStation').on('click', function(){ | 327 | $('#findStation').on('click', function(){ |
| 213 | - var id = $("input[type='radio']:checked").val(); | 328 | + var id = $(".station input[type='radio']:checked").val(); |
| 214 | var stationRoute = stationRouteMap[id]; | 329 | var stationRoute = stationRouteMap[id]; |
| 215 | - // 站点形状 | ||
| 216 | - var shapesType = stationRoute.stationShapesType; | ||
| 217 | - // 如果是圆 | ||
| 218 | - if(shapesType =='r') { | ||
| 219 | - | ||
| 220 | - // 百度地图画圆 | ||
| 221 | - WorldsBMapLine.pointsCircle(stationRoute); | ||
| 222 | - | ||
| 223 | - // 如果是多变行 | ||
| 224 | - }else if(shapesType == 'd') { | ||
| 225 | - | ||
| 226 | - // 百度地图画多边形 | ||
| 227 | - WorldsBMapLine.pointsPolygon(stationRoute); | ||
| 228 | - } | 330 | + if(id && stationRoute){ |
| 331 | + // 站点形状 | ||
| 332 | + var shapesType = stationRoute.stationShapesType; | ||
| 333 | + // 如果是圆 | ||
| 334 | + if(shapesType =='r') { | ||
| 335 | + | ||
| 336 | + // 百度地图画圆 | ||
| 337 | + WorldsBMapLine.pointsCircle(stationRoute); | ||
| 229 | 338 | ||
| 339 | + // 如果是多变行 | ||
| 340 | + }else if(shapesType == 'd') { | ||
| 341 | + | ||
| 342 | + // 百度地图画多边形 | ||
| 343 | + WorldsBMapLine.pointsPolygon(stationRoute); | ||
| 344 | + } | ||
| 345 | + } else if(id && !stationRoute){ | ||
| 346 | + layer.msg('您选择的站点不存在,请重新选择!'); | ||
| 347 | + }else{ | ||
| 348 | + layer.msg('请先选择要查看的站点!'); | ||
| 349 | + } | ||
| 230 | }); | 350 | }); |
| 351 | + | ||
| 352 | + // 修改站点 | ||
| 231 | $('#updateStation').on('click', function(){ | 353 | $('#updateStation').on('click', function(){ |
| 232 | - var id = $("input[type='radio']:checked").val(); | 354 | + var id = $(".station input[type='radio']:checked").val(); |
| 233 | var stationRoute = stationRouteMap[id]; | 355 | var stationRoute = stationRouteMap[id]; |
| 234 | - | ||
| 235 | if(id && stationRoute){ | 356 | if(id && stationRoute){ |
| 236 | $.get('editstation_select.html', function(m){ | 357 | $.get('editstation_select.html', function(m){ |
| 237 | $(pjaxContainer).append(m); | 358 | $(pjaxContainer).append(m); |
| 238 | - $('#editstation_select_mobal').trigger('editStationSelectMobal_show', [WorldsBMapLine, DrawingManagerObj, stationRoute]); | 359 | + $('#editstation_select_mobal').trigger('editStationSelectMobal_show', [WorldsBMapLine, PublicFunctions, DrawingManagerObj, stationRoute]); |
| 239 | }); | 360 | }); |
| 240 | } else if(id && !stationRoute){ | 361 | } else if(id && !stationRoute){ |
| 241 | layer.msg('您选择的站点不存在,请重新选择!'); | 362 | layer.msg('您选择的站点不存在,请重新选择!'); |
| @@ -243,25 +364,16 @@ $(function(){ | @@ -243,25 +364,16 @@ $(function(){ | ||
| 243 | layer.msg('请先选择要编辑的站点!'); | 364 | layer.msg('请先选择要编辑的站点!'); |
| 244 | } | 365 | } |
| 245 | }); | 366 | }); |
| 246 | - $('#section').on('click',function(){ | ||
| 247 | - $('#station').parent().removeClass('active'); | ||
| 248 | - $('#section').parent().addClass('active'); | ||
| 249 | - $('#section_list_div').removeClass('hidden'); | ||
| 250 | - $('#section_list_div').addClass('active'); | ||
| 251 | - $('#station_list_div').removeClass('active'); | ||
| 252 | - $('#station_list_div').addClass('hidden'); | ||
| 253 | - // 清除地图覆盖物 | ||
| 254 | - WorldsBMapLine.clearMarkAndOverlays(); | ||
| 255 | - | ||
| 256 | - var line = EditRoute.getLineObj(); | ||
| 257 | - lineid=line.id; | ||
| 258 | - directions = line.dir; | ||
| 259 | - // 查询路段信息 | ||
| 260 | - $get('/sectionroute/findSectionCache',{'line.id_eq' : lineid , 'directions_eq' : directions},function(data) { | ||
| 261 | - // 在地图上画出线路走向 | ||
| 262 | - PublicFunctions.linePanlThree(lineid,data,directions); | ||
| 263 | - }); | 367 | + |
| 368 | + // 监听打开鼠标绘制工具按钮事件. | ||
| 369 | + $('#oppenDrawingManager').on('click',function() { | ||
| 370 | + DrawingManagerObj.drawingManagerOpen(); | ||
| 371 | + }); | ||
| 372 | + // 监听关闭鼠标绘制工具按钮事件. | ||
| 373 | + $('#closeDrawingManager').on('click',function() { | ||
| 374 | + DrawingManagerObj.drawingManagerClose(); | ||
| 264 | }); | 375 | }); |
| 376 | + | ||
| 265 | // 滚动轴监听事件 | 377 | // 滚动轴监听事件 |
| 266 | $('#scrllmouseEvent_div').on('mousemove',function() { | 378 | $('#scrllmouseEvent_div').on('mousemove',function() { |
| 267 | $('.defeat-scroll').css('overflow','auto'); | 379 | $('.defeat-scroll').css('overflow','auto'); |
| @@ -277,10 +389,12 @@ $(function(){ | @@ -277,10 +389,12 @@ $(function(){ | ||
| 277 | <!-- 地图类 --> | 389 | <!-- 地图类 --> |
| 278 | <script src="/pages/base/line/js/map.js"></script> | 390 | <script src="/pages/base/line/js/map.js"></script> |
| 279 | <!-- 函数与方法 --> | 391 | <!-- 函数与方法 --> |
| 280 | -<script src="/pages/base/line/js/line-map-function.js"></script> | 392 | +<script src="/pages/base/line/js/map-function.js"></script> |
| 281 | <!-- 修改路段对象类 --> | 393 | <!-- 修改路段对象类 --> |
| 282 | <script src="/pages/base/stationroute/js/editsection.js"></script> | 394 | <script src="/pages/base/stationroute/js/editsection.js"></script> |
| 283 | <!-- 绘图类 --> | 395 | <!-- 绘图类 --> |
| 284 | <script src="/pages/base/line/js/drawingManager.js"></script> | 396 | <script src="/pages/base/line/js/drawingManager.js"></script> |
| 285 | <!-- ajax请求类 --> | 397 | <!-- ajax请求类 --> |
| 286 | -<script src="/pages/base/stationroute/js/stationroute-ajax-getdata.js"></script> | ||
| 287 | \ No newline at end of file | 398 | \ No newline at end of file |
| 399 | +<!-- <script src="/pages/base/stationroute/js/stationroute-ajax-getdata.js"></script> --> | ||
| 400 | +<!-- ajax请求类 --> | ||
| 401 | +<script src="/pages/base/line/js/map-ajax-getdata.js"></script> | ||
| 288 | \ No newline at end of file | 402 | \ No newline at end of file |
src/main/resources/static/pages/base/lineversions/add.html
| @@ -44,6 +44,7 @@ | @@ -44,6 +44,7 @@ | ||
| 44 | <div class="form-body"> | 44 | <div class="form-body"> |
| 45 | <input type="hidden" name="lineId" id="lineIdInput" /> | 45 | <input type="hidden" name="lineId" id="lineIdInput" /> |
| 46 | <input type="hidden" name="lineCode" id="lineCodeInput" /> | 46 | <input type="hidden" name="lineCode" id="lineCodeInput" /> |
| 47 | + <input type="hidden" name="lineCode" id="statusInput" /> | ||
| 47 | 48 | ||
| 48 | <!-- 表单分组组件 form-group START --> | 49 | <!-- 表单分组组件 form-group START --> |
| 49 | <div class="form-group"> | 50 | <div class="form-group"> |
| @@ -100,7 +101,7 @@ | @@ -100,7 +101,7 @@ | ||
| 100 | </div> | 101 | </div> |
| 101 | <!-- 表单分组组件 form-group END --> | 102 | <!-- 表单分组组件 form-group END --> |
| 102 | 103 | ||
| 103 | - <div class="form-group"> | 104 | + <!-- <div class="form-group"> |
| 104 | <label class="control-label col-md-5"> | 105 | <label class="control-label col-md-5"> |
| 105 | <span class="required"> * </span>线路版本状态 : | 106 | <span class="required"> * </span>线路版本状态 : |
| 106 | </label> | 107 | </label> |
| @@ -112,7 +113,7 @@ | @@ -112,7 +113,7 @@ | ||
| 112 | <option value="0">历史版本</option> | 113 | <option value="0">历史版本</option> |
| 113 | </select> | 114 | </select> |
| 114 | </div> | 115 | </div> |
| 115 | - </div> | 116 | + </div> --> |
| 116 | 117 | ||
| 117 | <!-- 表单分组组件 form-group START --> | 118 | <!-- 表单分组组件 form-group START --> |
| 118 | <div class="form-group"> | 119 | <div class="form-group"> |
src/main/resources/static/pages/base/lineversions/edit.html
| @@ -44,6 +44,7 @@ | @@ -44,6 +44,7 @@ | ||
| 44 | <div class="form-body"> | 44 | <div class="form-body"> |
| 45 | <input type="hidden" name="lineId" id="lineIdInput" /> | 45 | <input type="hidden" name="lineId" id="lineIdInput" /> |
| 46 | <input type="hidden" name="lineCode" id="lineCodeInput" /> | 46 | <input type="hidden" name="lineCode" id="lineCodeInput" /> |
| 47 | + <input type="hidden" name="lineCode" id="statusInput" /> | ||
| 47 | 48 | ||
| 48 | <!-- 表单分组组件 form-group START --> | 49 | <!-- 表单分组组件 form-group START --> |
| 49 | <div class="form-group"> | 50 | <div class="form-group"> |
| @@ -100,7 +101,7 @@ | @@ -100,7 +101,7 @@ | ||
| 100 | </div> | 101 | </div> |
| 101 | <!-- 表单分组组件 form-group END --> | 102 | <!-- 表单分组组件 form-group END --> |
| 102 | 103 | ||
| 103 | - <div class="form-group"> | 104 | + <!-- <div class="form-group"> |
| 104 | <label class="control-label col-md-5"> | 105 | <label class="control-label col-md-5"> |
| 105 | <span class="required"> * </span>线路版本状态 : | 106 | <span class="required"> * </span>线路版本状态 : |
| 106 | </label> | 107 | </label> |
| @@ -112,7 +113,7 @@ | @@ -112,7 +113,7 @@ | ||
| 112 | <option value="0">历史版本</option> | 113 | <option value="0">历史版本</option> |
| 113 | </select> | 114 | </select> |
| 114 | </div> | 115 | </div> |
| 115 | - </div> | 116 | + </div> --> |
| 116 | 117 | ||
| 117 | <!-- 表单分组组件 form-group START --> | 118 | <!-- 表单分组组件 form-group START --> |
| 118 | <div class="form-group"> | 119 | <div class="form-group"> |
src/main/resources/static/pages/base/lineversions/js/lineversions-add-from.js
| @@ -37,13 +37,14 @@ | @@ -37,13 +37,14 @@ | ||
| 37 | }); | 37 | }); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | - // 填充公司下拉框选择值 | 40 | + // 填充线路下拉框选择值 |
| 41 | function lineAllInfo(){ | 41 | function lineAllInfo(){ |
| 42 | getComp(function(params) { | 42 | getComp(function(params) { |
| 43 | $get('/line/all', params, function(array){ | 43 | $get('/line/all', params, function(array){ |
| 44 | // get请求获取公司 | 44 | // get请求获取公司 |
| 45 | $get('/business/all', {upCode_eq: '88'}, function(compD){ | 45 | $get('/business/all', {upCode_eq: '88'}, function(compD){ |
| 46 | var len_ = array.length,paramsD = new Array(); | 46 | var len_ = array.length,paramsD = new Array(); |
| 47 | + paramsD.push({'id':'请选择...','text':'请选择...'}); | ||
| 47 | if(len_>0) { | 48 | if(len_>0) { |
| 48 | $.each(array, function(i, g){ | 49 | $.each(array, function(i, g){ |
| 49 | if(g.name!='' || g.name != null) { | 50 | if(g.name!='' || g.name != null) { |
| @@ -54,7 +55,7 @@ | @@ -54,7 +55,7 @@ | ||
| 54 | if($('span').hasClass('select2-selection')) | 55 | if($('span').hasClass('select2-selection')) |
| 55 | $('span .select2-selection').remove(); | 56 | $('span .select2-selection').remove(); |
| 56 | initPinYinSelect2($('#lineSelect'),paramsD,function(selector) { | 57 | initPinYinSelect2($('#lineSelect'),paramsD,function(selector) { |
| 57 | - selector.select2("val", splitxlName(window.localStorage.xlName_AgursData)); | 58 | + selector.select2("val", "请选择..."); |
| 58 | }); | 59 | }); |
| 59 | } | 60 | } |
| 60 | }); | 61 | }); |
| @@ -65,16 +66,30 @@ | @@ -65,16 +66,30 @@ | ||
| 65 | // 监听线路名称下拉框值改变事件. | 66 | // 监听线路名称下拉框值改变事件. |
| 66 | $('#lineSelect').on("change", function (e) { | 67 | $('#lineSelect').on("change", function (e) { |
| 67 | var lineSelectValue = $('#lineSelect').val();// 获取线路名称值. | 68 | var lineSelectValue = $('#lineSelect').val();// 获取线路名称值. |
| 68 | - if(lineSelectValue=='' || lineSelectValue==null) { | 69 | + if(lineSelectValue=='' || lineSelectValue==null || lineSelectValue=="请选择...") { |
| 69 | $('#lineCodeInput').val('');// 设值线路编码. | 70 | $('#lineCodeInput').val('');// 设值线路编码. |
| 70 | $('#lineIdInput').val('');// 设值线路ID. | 71 | $('#lineIdInput').val('');// 设值线路ID. |
| 71 | }else { | 72 | }else { |
| 72 | var lineSelectValueArray = lineSelectValue.split('_');// 切割线路名称值. | 73 | var lineSelectValueArray = lineSelectValue.split('_');// 切割线路名称值. |
| 73 | - $.get('/lineVersions/findLineVersionsMax',{'lineId':lineSelectValueArray[1]}, function(lineVersionsMax){ | ||
| 74 | - $('#versionsInput').val(++lineVersionsMax.versions);// 设值线路编码. | ||
| 75 | - }); | ||
| 76 | - $('#lineIdInput').val(lineSelectValueArray[0]);// 设值线路编码. | ||
| 77 | - $('#lineCodeInput').val(lineSelectValueArray[1]);// 设值线路ID. | 74 | + $.get('/lineVersions/findByLineId',{'lineId':lineSelectValueArray[1]}, function(array){ |
| 75 | + var type = true; | ||
| 76 | + $.each(array, function(){ | ||
| 77 | + if(this.status == 2) { | ||
| 78 | + type = false; | ||
| 79 | + return; | ||
| 80 | + } | ||
| 81 | + }); | ||
| 82 | + if(type) { | ||
| 83 | + $.get('/lineVersions/findLineVersionsMax',{'lineId':lineSelectValueArray[1]}, function(lineVersionsMax){ | ||
| 84 | + $('#versionsInput').val(++lineVersionsMax.versions);// 设值线路编码. | ||
| 85 | + }); | ||
| 86 | + $('#lineIdInput').val(lineSelectValueArray[0]);// 设值线路编码. | ||
| 87 | + $('#lineCodeInput').val(lineSelectValueArray[1]);// 设值线路ID. | ||
| 88 | + } else { | ||
| 89 | + swal("每条线路只能有一个待更新版本,你选择的线路已有待更新版本,版本多了忙不过来,快去选择其他线路吧!"); | ||
| 90 | + $('#lineSelect').select2("val", "请选择..."); | ||
| 91 | + } | ||
| 92 | + }); | ||
| 78 | } | 93 | } |
| 79 | }); | 94 | }); |
| 80 | 95 | ||
| @@ -118,7 +133,7 @@ | @@ -118,7 +133,7 @@ | ||
| 118 | 'startDate' : {required : true},// 启用时间 不为空. | 133 | 'startDate' : {required : true},// 启用时间 不为空. |
| 119 | 'endDate' : {required : true},// 结束时间. | 134 | 'endDate' : {required : true},// 结束时间. |
| 120 | 'versions' : {required : true, digits : true, maxlength: 10},// 版本号 必填项、数字、最大长度10. | 135 | 'versions' : {required : true, digits : true, maxlength: 10},// 版本号 必填项、数字、最大长度10. |
| 121 | - 'status' : {required : true, digits : true, maxlength: 10},// 版本状态 必填项、数字、最大长度10. | 136 | +// 'status' : {required : true, digits : true, maxlength: 10},// 版本状态 必填项、数字、最大长度10. |
| 122 | }, | 137 | }, |
| 123 | 138 | ||
| 124 | /** | 139 | /** |
src/main/resources/static/pages/base/lineversions/js/lineversions-edit-from.js
| @@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
| 37 | }); | 37 | }); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | - // 填充公司下拉框选择值 | 40 | + // 填充线路下拉框选择值 |
| 41 | function lineAllInfo(){ | 41 | function lineAllInfo(){ |
| 42 | getComp(function(params) { | 42 | getComp(function(params) { |
| 43 | $get('/line/all', params, function(array){ | 43 | $get('/line/all', params, function(array){ |
src/main/resources/static/pages/base/lineversions/js/lineversions-list-table.js
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | * @Description : TOOD(线路信息list.html页面js) | 4 | * @Description : TOOD(线路信息list.html页面js) |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | -(function(){ | 7 | + |
| 8 | // 关闭左侧栏 | 8 | // 关闭左侧栏 |
| 9 | if (!$('body').hasClass('page-sidebar-closed')) {$('.menu-toggler.sidebar-toggler').click();} | 9 | if (!$('body').hasClass('page-sidebar-closed')) {$('.menu-toggler.sidebar-toggler').click();} |
| 10 | // 定义 page : 当前页;initPag ; icheckOptions:选择框 | 10 | // 定义 page : 当前页;initPag ; icheckOptions:选择框 |
| @@ -269,6 +269,7 @@ | @@ -269,6 +269,7 @@ | ||
| 269 | return rsStr; | 269 | return rsStr; |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | + | ||
| 272 | /** 搜索按钮事件 */ | 273 | /** 搜索按钮事件 */ |
| 273 | $('tr.filter .filter-submit').on('click',function(){ | 274 | $('tr.filter .filter-submit').on('click',function(){ |
| 274 | var params = getParams(); | 275 | var params = getParams(); |
| @@ -280,5 +281,54 @@ | @@ -280,5 +281,54 @@ | ||
| 280 | /** 表格数据分页加载 @param:<params:搜索参数;true:是否重新分页> */ | 281 | /** 表格数据分页加载 @param:<params:搜索参数;true:是否重新分页> */ |
| 281 | loadTableDate(params,true); | 282 | loadTableDate(params,true); |
| 282 | }); | 283 | }); |
| 283 | - | ||
| 284 | -})(); | ||
| 285 | \ No newline at end of file | 284 | \ No newline at end of file |
| 285 | + | ||
| 286 | + | ||
| 287 | +function updateVersionsRoute(obj){ | ||
| 288 | + var lineId = obj.dataset.lineid; | ||
| 289 | + swal({ | ||
| 290 | + title: "操作须知", | ||
| 291 | + text: "每周会更新数据,请在本周内做完线路走向并发布,不然您做的走向有可能会被覆盖!", | ||
| 292 | + type: "warning", | ||
| 293 | + showCancelButton: true, | ||
| 294 | + confirmButtonColor: "#DD6B55", | ||
| 295 | + confirmButtonText: "知道了!", | ||
| 296 | + cancelButtonText: "不懂!", | ||
| 297 | + closeOnConfirm: false }, | ||
| 298 | + function(isConfirm){ | ||
| 299 | + if(isConfirm){ | ||
| 300 | + var win1 = window.open("http://114.80.178.12:29088/login2.html","线路信息编辑","false"); | ||
| 301 | + setTimeout(function(){ | ||
| 302 | + window.open("http://114.80.178.12:29088/pages/base/stationroute/list.html?no="+lineId,"线路信息编辑","false"); | ||
| 303 | + },1500); | ||
| 304 | + swal.close(); | ||
| 305 | + } | ||
| 306 | + }); | ||
| 307 | +} | ||
| 308 | + | ||
| 309 | +function issueBnt(id){ | ||
| 310 | + swal({ | ||
| 311 | + title: "发布说明", | ||
| 312 | + text: "重复发布会覆盖已有的数据,请确认线路信息正确后发布,发布后需要几分钟后才能再次发布!", | ||
| 313 | + type: "warning", | ||
| 314 | + showCancelButton: true, | ||
| 315 | + confirmButtonColor: "#DD6B55", | ||
| 316 | + confirmButtonText: "确定发布!", | ||
| 317 | + cancelButtonText: "取消发布!", | ||
| 318 | + closeOnConfirm: false }, | ||
| 319 | + function(){ | ||
| 320 | + $.post('/lineVersions/issueVersion',{'id':id},function(result){ | ||
| 321 | + if(result.status=='SUCCESS') { | ||
| 322 | + // 弹出添加成功提示消息 | ||
| 323 | + swal("发布!", "线路站点及走向已发布至历史库,待到版本启用时间自动更新。", "success"); | ||
| 324 | + } else if(result.status=='ERROR') { | ||
| 325 | + // 弹出添加失败提示消息 | ||
| 326 | + swal("发布失败!", "您发布的信息可能有误,请检查!", "ERROR"); | ||
| 327 | + } | ||
| 328 | +// loadPage('list.html'); | ||
| 329 | + // 发布后刷新页面 | ||
| 330 | + var pData = getParams(); | ||
| 331 | + pData['line.name_like'] = splitxlName(pData['line.name_like']); | ||
| 332 | + loadTableDate(pData, false); | ||
| 333 | + }); | ||
| 334 | + }); | ||
| 335 | +} | ||
| 286 | \ No newline at end of file | 336 | \ No newline at end of file |
src/main/resources/static/pages/base/lineversions/list.html
| @@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
| 26 | </div> | 26 | </div> |
| 27 | <div class="actions"> | 27 | <div class="actions"> |
| 28 | <div class="btn-group btn-group-devided" data-toggle="buttons"> | 28 | <div class="btn-group btn-group-devided" data-toggle="buttons"> |
| 29 | - <a class="btn btn-circle blue" href="add.html" data-pjax><i class="fa fa-plus"></i> 添加线路版本</a> | 29 | + <a class="btn btn-circle blue" href="add.html" data-pjax><i class="fa fa-plus"></i> 添加待更新版本</a> |
| 30 | </div> | 30 | </div> |
| 31 | </div> | 31 | </div> |
| 32 | </div> | 32 | </div> |
| @@ -37,9 +37,9 @@ | @@ -37,9 +37,9 @@ | ||
| 37 | <tr role="row" class="heading"> | 37 | <tr role="row" class="heading"> |
| 38 | <th width="4%">序号</th> | 38 | <th width="4%">序号</th> |
| 39 | <th width="5%">线路编码</th> | 39 | <th width="5%">线路编码</th> |
| 40 | - <th width="8%">线路名称</th> | ||
| 41 | - <th width="8%">所属公司</th> | ||
| 42 | - <th width="9%">所属分公司</th> | 40 | + <th width="6%">线路名称</th> |
| 41 | + <th width="6%">所属公司</th> | ||
| 42 | + <th width="6%">所属分公司</th> | ||
| 43 | <th width="8%">启用时间</th> | 43 | <th width="8%">启用时间</th> |
| 44 | <th width="8%">终止时间</th> | 44 | <th width="8%">终止时间</th> |
| 45 | <th width="6%">版本号</th> | 45 | <th width="6%">版本号</th> |
| @@ -181,6 +181,8 @@ | @@ -181,6 +181,8 @@ | ||
| 181 | 南汇维修公司 | 181 | 南汇维修公司 |
| 182 | {{else if obj.line.brancheCompany == '5'}} | 182 | {{else if obj.line.brancheCompany == '5'}} |
| 183 | 南汇公司 | 183 | 南汇公司 |
| 184 | + {{else if obj.brancheCompany == '6'}} | ||
| 185 | + 航头枢纽站 | ||
| 184 | {{/if}} | 186 | {{/if}} |
| 185 | 187 | ||
| 186 | {{/if}} | 188 | {{/if}} |
| @@ -208,6 +210,14 @@ | @@ -208,6 +210,14 @@ | ||
| 208 | </td> | 210 | </td> |
| 209 | <td> | 211 | <td> |
| 210 | <a href="edit.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 修改 </a> | 212 | <a href="edit.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 修改 </a> |
| 213 | + {{if obj.status == '2'}} | ||
| 214 | + <a class="btn default blue-stripe btn-sm" data-lineid="{{obj.line.id}}" onclick="updateVersionsRoute(this)" data-pjax> 编辑版本路线 </a> | ||
| 215 | + {{/if}} | ||
| 216 | + {{if obj.status == '2' && obj.isupdate!=1}} | ||
| 217 | + <a class="btn btn-danger btn-sm" onclick = "issueBnt({{obj.id}})" data-pjax>发布</a> | ||
| 218 | + {{else if obj.status == '2' && obj.isupdate==1}} | ||
| 219 | + <a class="btn btn-danger btn-sm disabled">数据同步中</a> | ||
| 220 | + {{/if}} | ||
| 211 | </td> | 221 | </td> |
| 212 | </tr> | 222 | </tr> |
| 213 | {{/each}} | 223 | {{/each}} |
src/main/resources/static/pages/base/station/edit.html
| @@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
| 52 | <span class="required"> * </span> 站点路由名称: | 52 | <span class="required"> * </span> 站点路由名称: |
| 53 | </label> | 53 | </label> |
| 54 | <div class="col-md-6"> | 54 | <div class="col-md-6"> |
| 55 | - <input type="text" class="form-control" name="stationName" id="stationNameInput" placeholder="站点路由名称"> | 55 | + <input type="text" class="form-control" name="stationRouteName" id="stationRouteNameInput" placeholder="站点路由名称"> |
| 56 | </div> | 56 | </div> |
| 57 | </div> | 57 | </div> |
| 58 | </div> | 58 | </div> |
| @@ -246,7 +246,7 @@ $('#editPoitsions_station_mobal').on('editStationMobal_show', function(e, map,fu | @@ -246,7 +246,7 @@ $('#editPoitsions_station_mobal').on('editStationMobal_show', function(e, map,fu | ||
| 246 | errorClass : 'help-block help-block-error', | 246 | errorClass : 'help-block help-block-error', |
| 247 | focusInvalid : false, | 247 | focusInvalid : false, |
| 248 | rules : { | 248 | rules : { |
| 249 | - 'stationName' : {required : true},// 站点路由名称 必填项 | 249 | + 'stationRouteName' : {required : true},// 站点路由名称 必填项 |
| 250 | 'stationCod': {required : true,},// 站点编码 必填项 | 250 | 'stationCod': {required : true,},// 站点编码 必填项 |
| 251 | 'directions' : {required : true,dirIs : true},// 站点方向 必填项 必填项 | 251 | 'directions' : {required : true,dirIs : true},// 站点方向 必填项 必填项 |
| 252 | 'stationRouteCode' : {isStart : true},// 站点序号 | 252 | 'stationRouteCode' : {isStart : true},// 站点序号 |
src/main/resources/static/pages/base/station/js/add-vmap-world.js
| @@ -140,7 +140,7 @@ var StationPVmapWorlds = function() { | @@ -140,7 +140,7 @@ var StationPVmapWorlds = function() { | ||
| 140 | }); | 140 | }); |
| 141 | }, | 141 | }, |
| 142 | // 打开绘画工具 | 142 | // 打开绘画工具 |
| 143 | - drawingManagerOpen : function(map) { | 143 | + drawingManagerOpen : function() { |
| 144 | // 打开鼠标绘画工具 | 144 | // 打开鼠标绘画工具 |
| 145 | drawingManager.open(); | 145 | drawingManager.open(); |
| 146 | // 设置属性 | 146 | // 设置属性 |
src/main/resources/static/pages/base/station/js/station-positions-function.js
| @@ -26,7 +26,7 @@ var PositionsPublicFunctions = function () { | @@ -26,7 +26,7 @@ var PositionsPublicFunctions = function () { | ||
| 26 | // 中心坐标点 | 26 | // 中心坐标点 |
| 27 | var point = new BMap.Point(BJwpoints[0], BJwpoints[1]); | 27 | var point = new BMap.Point(BJwpoints[0], BJwpoints[1]); |
| 28 | var htm = '<HR style="border:1 dashed #987cb9" width="100%" color=#987cb9 SIZE=1>'+ | 28 | var htm = '<HR style="border:1 dashed #987cb9" width="100%" color=#987cb9 SIZE=1>'+ |
| 29 | - '<span style="color:#DDD;font-size: 15px;">站点名称:' + r[0].stationName + '</span>' + | 29 | + '<span style="color:#DDD;font-size: 15px;">站点名称:' + r[0].zdmc + '</span>' + |
| 30 | '<span class="help-block" style="color:#DDD;font-size: 15px;">站点编码:' + r[0].stationCode + '</span>' + | 30 | '<span class="help-block" style="color:#DDD;font-size: 15px;">站点编码:' + r[0].stationCode + '</span>' + |
| 31 | '<span class="help-block" style="color:#DDD;font-size: 15px;">站点序号:' + r[0].stationRouteCode + '</span>' + | 31 | '<span class="help-block" style="color:#DDD;font-size: 15px;">站点序号:' + r[0].stationRouteCode + '</span>' + |
| 32 | '<span class="help-block" style="color:#DDD;font-size: 15px;">站点类型:' + markTypeStr + '</span>' + | 32 | '<span class="help-block" style="color:#DDD;font-size: 15px;">站点类型:' + markTypeStr + '</span>' + |
| @@ -47,7 +47,7 @@ var PositionsPublicFunctions = function () { | @@ -47,7 +47,7 @@ var PositionsPublicFunctions = function () { | ||
| 47 | // 信息窗位置偏移值。 | 47 | // 信息窗位置偏移值。 |
| 48 | offset: new BMap.Size(500,80), | 48 | offset: new BMap.Size(500,80), |
| 49 | //标题 | 49 | //标题 |
| 50 | - title : '<h4 style="color:#FFFFFF">'+r[0].stationName+'站详情</h4>', | 50 | + title : '<h4 style="color:#FFFFFF">'+r[0].zdmc+'站详情</h4>', |
| 51 | //设置不允许信窗发送短息 | 51 | //设置不允许信窗发送短息 |
| 52 | enableMessage : false, | 52 | enableMessage : false, |
| 53 | //是否开启点击地图关闭信息窗口 | 53 | //是否开启点击地图关闭信息窗口 |
| @@ -123,7 +123,7 @@ var PositionsPublicFunctions = function () { | @@ -123,7 +123,7 @@ var PositionsPublicFunctions = function () { | ||
| 123 | // 获取站点名称元素设值 | 123 | // 获取站点名称元素设值 |
| 124 | $('#zdmcInput').val(stationObj.zdmc); | 124 | $('#zdmcInput').val(stationObj.zdmc); |
| 125 | // 获取站点名称元素设值 | 125 | // 获取站点名称元素设值 |
| 126 | - $('#stationNameInput').val(stationObj.stationName); | 126 | + $('#stationRouteNameInput').val(stationObj.stationRouteName); |
| 127 | // 获取站点编码元素设值 | 127 | // 获取站点编码元素设值 |
| 128 | $('#stationCodInput').val(stationObj.stationCode); | 128 | $('#stationCodInput').val(stationObj.stationCode); |
| 129 | // 获取站点类型元素设值 | 129 | // 获取站点类型元素设值 |
| @@ -183,7 +183,7 @@ var PositionsPublicFunctions = function () { | @@ -183,7 +183,7 @@ var PositionsPublicFunctions = function () { | ||
| 183 | // 站点名称 | 183 | // 站点名称 |
| 184 | $('#zdmcInput').val(stationObj.zdmc); | 184 | $('#zdmcInput').val(stationObj.zdmc); |
| 185 | // 站点路由线路名称 | 185 | // 站点路由线路名称 |
| 186 | - $('#stationNameInput').val(stationObj.stationName); | 186 | + $('#stationRouteNameInput').val(stationObj.stationRouteName); |
| 187 | // 获取站点类型元素设值 | 187 | // 获取站点类型元素设值 |
| 188 | $('#stationMarkSelect').val(stationObj.stationRouteStationMark); | 188 | $('#stationMarkSelect').val(stationObj.stationRouteStationMark); |
| 189 | // 获取站点方向元素设值 | 189 | // 获取站点方向元素设值 |
src/main/resources/static/pages/base/station/js/station-positions-map.js
| @@ -136,11 +136,11 @@ var StationPositionsWorldsBMap = function () { | @@ -136,11 +136,11 @@ var StationPositionsWorldsBMap = function () { | ||
| 136 | $('#editPoitsions_station_mobal').trigger('editStationMobal_show', [StationPositionsWorldsBMap,PositionsPublicFunctions,PositionsStationObj]); | 136 | $('#editPoitsions_station_mobal').trigger('editStationMobal_show', [StationPositionsWorldsBMap,PositionsPublicFunctions,PositionsStationObj]); |
| 137 | }); | 137 | }); |
| 138 | }); | 138 | }); |
| 139 | - // 编辑多变行 | 139 | + // 编辑多边行 |
| 140 | }else if(stationShapesTypeV =='d') { | 140 | }else if(stationShapesTypeV =='d') { |
| 141 | // 开启编辑功能(自 1.1 新增) | 141 | // 开启编辑功能(自 1.1 新增) |
| 142 | polygon.enableEditing(); | 142 | polygon.enableEditing(); |
| 143 | - // 添加多变行编辑事件 | 143 | + // 添加多边行编辑事件 |
| 144 | polygon.addEventListener('dblclick',function(e) { | 144 | polygon.addEventListener('dblclick',function(e) { |
| 145 | // 获取编辑的多边形对象 | 145 | // 获取编辑的多边形对象 |
| 146 | var edit_pointE = polygon; | 146 | var edit_pointE = polygon; |
src/main/resources/static/pages/base/station/list_edit.html
| @@ -278,7 +278,5 @@ | @@ -278,7 +278,5 @@ | ||
| 278 | <!-- 表单组件 END --> | 278 | <!-- 表单组件 END --> |
| 279 | </div> | 279 | </div> |
| 280 | <!-- 信息容器组件 END --> | 280 | <!-- 信息容器组件 END --> |
| 281 | - | ||
| 282 | -<script src="/pages/base/station/js/positionstation.js"></script> | ||
| 283 | <script src="/pages/base/station/js/station-positions-function.js"></script> | 281 | <script src="/pages/base/station/js/station-positions-function.js"></script> |
| 284 | <script src="/pages/base/station/js/station-list-edit.js"></script> | 282 | <script src="/pages/base/station/js/station-list-edit.js"></script> |
| 285 | \ No newline at end of file | 283 | \ No newline at end of file |
src/main/resources/static/pages/base/stationroute/edit.html
| @@ -197,7 +197,6 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati | @@ -197,7 +197,6 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati | ||
| 197 | layer.closeAll(); | 197 | layer.closeAll(); |
| 198 | var editStationParmasObj = station_.getEitdStation(); | 198 | var editStationParmasObj = station_.getEitdStation(); |
| 199 | var addLine = Line_.getLineObj(); | 199 | var addLine = Line_.getLineObj(); |
| 200 | - debugger | ||
| 201 | fun.setFormValue(editStationParmasObj); | 200 | fun.setFormValue(editStationParmasObj); |
| 202 | var initzdlyP = {'lineCode_eq':editStationParmasObj.stationRouteLineCode,'destroy_eq':0,'directions_eq':editStationParmasObj.stationRouteDirections}; | 201 | var initzdlyP = {'lineCode_eq':editStationParmasObj.stationRouteLineCode,'destroy_eq':0,'directions_eq':editStationParmasObj.stationRouteDirections}; |
| 203 | initSelect(initzdlyP); | 202 | initSelect(initzdlyP); |
| @@ -336,8 +335,12 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati | @@ -336,8 +335,12 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati | ||
| 336 | function setZdlyValue() { | 335 | function setZdlyValue() { |
| 337 | ajaxd.findUpStationRouteCode(editStationParmasObj.stationRouteLine,editStationParmasObj.stationRouteDirections,editStationParmasObj.stationRouteStationRouteCode,function(str) { | 336 | ajaxd.findUpStationRouteCode(editStationParmasObj.stationRouteLine,editStationParmasObj.stationRouteDirections,editStationParmasObj.stationRouteStationRouteCode,function(str) { |
| 338 | if(str.length>0){ | 337 | if(str.length>0){ |
| 339 | - /* var upStationRouteCode = str[0].stationRouteCode + '_' + str[0].stationRouteMarke + '_' + editStationParmasObj.stationRouteDirections; */ | ||
| 340 | - var upStationRouteCode = str[0].stationRouteCode + '_' + editStationParmasObj.stationRouteStationMark + '_' + editStationParmasObj.stationRouteDirections; | 338 | + var upStationRouteCode; |
| 339 | + if (editStationParmasObj.stationRouteStationMark == 'E') { | ||
| 340 | + upStationRouteCode = str[0].stationRouteCode + '_' + 'E' + '_' + editStationParmasObj.stationRouteDirections; | ||
| 341 | + } else{ | ||
| 342 | + upStationRouteCode = str[0].stationRouteCode + '_' + str[0].stationRouteMarke + '_' + editStationParmasObj.stationRouteDirections; | ||
| 343 | + } | ||
| 341 | $('#stationrouteSelect').select2('val',upStationRouteCode); | 344 | $('#stationrouteSelect').select2('val',upStationRouteCode); |
| 342 | }else { | 345 | }else { |
| 343 | $('#stationrouteSelect').select2('val','请选择...'); | 346 | $('#stationrouteSelect').select2('val','请选择...'); |
src/main/resources/static/pages/base/stationroute/js/stationroute-ajax-getdata.js
| @@ -130,7 +130,7 @@ var GetAjaxData = function(){ | @@ -130,7 +130,7 @@ var GetAjaxData = function(){ | ||
| 130 | 130 | ||
| 131 | }, | 131 | }, |
| 132 | 132 | ||
| 133 | - // 查询路段信息 | 133 | + // 查询站点信息 |
| 134 | getStationRouteInfo : function(lineId,direction,callback) { | 134 | getStationRouteInfo : function(lineId,direction,callback) { |
| 135 | $get('/stationroute/all',{'line.id_eq' : lineId , 'directions_eq' : direction},function(resultdata) { | 135 | $get('/stationroute/all',{'line.id_eq' : lineId , 'directions_eq' : direction},function(resultdata) { |
| 136 | callback && callback(resultdata); | 136 | callback && callback(resultdata); |