Commit 436c3d023a531a5f67a244feec0b099a44a2a07a

Authored by 李强
1 parent 02e4c412

基础信息功能修订

Showing 36 changed files with 652 additions and 1364 deletions
src/main/java/com/bsth/controller/SectionRouteController.java
... ... @@ -78,7 +78,7 @@ public class SectionRouteController extends BaseController<SectionRoute, Integer
78 78 *
79 79 * @return List<Map<String, Object>>
80 80 */
81   - @RequestMapping(value = "/findUpStationRouteCode" , method = RequestMethod.GET)
  81 + @RequestMapping(value = "/findUpSectionRouteCode" , method = RequestMethod.GET)
82 82 public List<Map<String, Object>> findUpStationRouteCode(@RequestParam Map<String, Object> map) {
83 83 return routeService.findUpSectionRouteCode(map);
84 84 }
... ...
src/main/java/com/bsth/controller/StationController.java
... ... @@ -107,13 +107,9 @@ public class StationController extends BaseController&lt;Station, Integer&gt; {
107 107 */
108 108 @RequestMapping(value="stationUpdate" , method = RequestMethod.POST)
109 109 public Map<String, Object> stationUpdate(@RequestParam Map<String, Object> map) {
110   -
111 110 map.put("updateBy", "");
112   -
113 111 return service.stationUpdate(map);
114   -
115 112 }
116   -
117 113 /**
118 114 * @Description :TODO(查询站点编码)
119 115 *
... ...
src/main/java/com/bsth/repository/SectionRouteRepository.java
... ... @@ -65,7 +65,7 @@ public interface SectionRouteRepository extends BaseRepository&lt;SectionRoute, Int
65 65 " b.section_distance AS sectionDistance," +
66 66 " b.section_time AS sectionTime," +
67 67 " b.db_type AS sectiondbType," +
68   - " b.speed_limit AS sectionSpeedLimet ,a.destroy,a.versions,a.descriptions FROM (" +
  68 + " b.speed_limit AS sectionSpeedLimet ,a.destroy,a.versions,a.descriptions,a.isRoadeSpeed FROM (" +
69 69 "SELECT r.id AS sectionrouteId," +
70 70 "r.line AS sectionrouteLine," +
71 71 "r.line_code AS sectionrouteLineCode," +
... ... @@ -75,7 +75,7 @@ public interface SectionRouteRepository extends BaseRepository&lt;SectionRoute, Int
75 75 "r.directions AS sectionrouteDirections," +
76 76 "r.destroy AS destroy," +
77 77 "r.versions AS versions," +
78   - "r.descriptions AS descriptions" +
  78 + "r.descriptions AS descriptions, r.is_roade_speed AS isRoadeSpeed" +
79 79 " FROM bsth_c_sectionroute r where r.line = ?1 and r.directions = ?2 and r.destroy=0 ) a " +
80 80 " LEFT JOIN bsth_c_section b ON a.sectionrouteSection = b.id order by a.sectionrouteCode asc", nativeQuery=true)
81 81 List<Object[]> getSectionRoute(int lineId, int directions);
... ... @@ -147,7 +147,7 @@ public interface SectionRouteRepository extends BaseRepository&lt;SectionRoute, Int
147 147 *
148 148 * @return List<Map<String, Object>>
149 149 */
150   - @Query(value = " select MAX(r.sectionroute_code) as sectionrouteCode from bsth_c_sectionroute r WHERE r.line=?1 and r.directions =?2 and r.sectionroute_code< ?3", nativeQuery=true)
  150 + @Query(value = " select MAX(r.sectionroute_code) as sectionrouteCode from bsth_c_sectionroute r WHERE r.line=?1 and r.directions =?2 and r.sectionroute_code< ?3 and r.destroy = 0", nativeQuery=true)
151 151 List<Object[]> findUpSectionRouteCode(Integer lineId,Integer direction,Integer stationRouteCode);
152 152  
153 153 /**
... ...
src/main/java/com/bsth/repository/StationRepository.java
... ... @@ -37,9 +37,15 @@ public interface StationRepository extends BaseRepository&lt;Station, Integer&gt; {
37 37 , nativeQuery=true)
38 38 long stationMaxId();
39 39  
40   - @Query(value = "SELECT s.b_jwpoints,s.id FROM bsth_c_station s where s.station_name like ?1"
  40 + /*@Query(value = "SELECT s.b_jwpoints,s.id FROM bsth_c_station s where s.station_name like ?1"
41 41 , nativeQuery=true)
42   - List<Object[]> findStationName(String stationName);
  42 + List<Object[]> findStationName(String stationName);*/
  43 + @Query(value = " SELECT t.b_jwpoints,t.id FROM (" +
  44 + " SELECT b.id,b.b_jwpoints,b.station_name,a.directions FROM (" +
  45 + " SELECT s.station,s.station_name,s.directions FROM bsth_c_stationroute s where s.destroy = 0 and s.directions = ?1) a " +
  46 + " LEFT JOIN bsth_c_station b on a.station = b. id) t where t.station_name LIKE ?2"
  47 + , nativeQuery=true)
  48 + List<Object[]> findStationName(Integer dir , String stationName);
43 49  
44 50 /**
45 51 * @Description :TODO(站点保存)
... ...
src/main/java/com/bsth/repository/StationRouteRepository.java
... ... @@ -99,7 +99,7 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
99 99 @Query(value = "select t.station_route_code,t.station_mark from bsth_c_stationroute t where " +
100 100 " t.station_route_code =(" +
101 101 "select MAX(station_route_code) as stationRouteCode from bsth_c_stationroute r WHERE " +
102   - "r.line=?1 and r.directions =?2 and station_route_code< ?3 ) and t.line=?1 and t.directions = ?2", nativeQuery=true)
  102 + "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)
103 103 List<Object[]> findUpStationRouteCode(Integer lineId,Integer direction,Integer stationRouteCode);
104 104  
105 105  
... ... @@ -206,7 +206,7 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
206 206 " b.create_date AS stationCreateDate," +
207 207 " b.update_by AS stationUpdateBy," +
208 208 " b.update_date AS stationUpdateDate," +
209   - " a.stationRouteId"+
  209 + " a.stationRouteId,b.station_name as zdmc "+
210 210 " FROM ( SELECT s.id AS stationRouteId," +
211 211 " s.line AS stationRouteLine," +
212 212 " s.station as stationRouteStation," +
... ... @@ -276,4 +276,8 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
276 276 @Modifying
277 277 @Query(value="update bsth_c_stationroute set distances =?2 where id = ?1 ", nativeQuery=true)
278 278 public void upddis(Integer id,Double dis);
  279 +
  280 + @Modifying
  281 + @Query(value="UPDATE bsth_c_stationroute set station_route_code = (station_route_code+10) where line = ?1 and directions = ?2 and station_route_code >=?3 and destroy = 0", nativeQuery=true)
  282 + public void stationUpdStationRouteCode(Integer line,Integer dir,Integer routeCod);
279 283 }
... ...
src/main/java/com/bsth/service/impl/SectionRouteServiceImpl.java
... ... @@ -99,6 +99,7 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ
99 99 tempM.put("destroy",listObjArray.get(i)[23]);
100 100 tempM.put("versions",listObjArray.get(i)[24]);
101 101 tempM.put("descriptions",listObjArray.get(i)[25]);
  102 + tempM.put("isRoadeSpeed",listObjArray.get(i)[26]);
102 103 resultList.add(tempM);
103 104 }
104 105 }
... ...
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
... ... @@ -201,9 +201,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
201 201 // 站点说明
202 202 tempM.put("stationDescriptions", stationList.get(i)[31]);
203 203  
204   - tempM.put("name", stationList.get(i)[17]);
  204 + tempM.put("name", stationList.get(i)[3]);
205 205  
206   - tempM.put("text", stationList.get(i)[17]);
  206 + tempM.put("text", stationList.get(i)[3]);
207 207  
208 208 tempM.put("icon", "fa fa-bus");
209 209  
... ... @@ -305,6 +305,8 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
305 305  
306 306 // 说明
307 307 tempM.put("descriptions",sectionList.get(i)[25]);
  308 + // 说明
  309 + tempM.put("isRoadeSpeed",sectionList.get(i)[26]);
308 310  
309 311 tempM.put("name", sectionList.get(i)[9]);
310 312  
... ... @@ -1030,6 +1032,7 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
1030 1032 tempM.put("stationUpdateDate", objects.get(i)[38]);
1031 1033  
1032 1034 tempM.put("stationRouteId", objects.get(i)[39]);
  1035 + tempM.put("zdmc", objects.get(i)[40]);
1033 1036  
1034 1037 resultList.add(tempM);
1035 1038 }
... ...
src/main/java/com/bsth/service/impl/StationServiceImpl.java
... ... @@ -9,6 +9,7 @@ import org.slf4j.Logger;
9 9 import org.slf4j.LoggerFactory;
10 10 import org.springframework.beans.factory.annotation.Autowired;
11 11 import org.springframework.stereotype.Service;
  12 +import org.springframework.transaction.annotation.Transactional;
12 13  
13 14  
14 15  
... ... @@ -267,7 +268,7 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
267 268 // 百度坐标纬度
268 269 String bLatx = JSONObject.parseObject(stationsArray.getJSONObject(i).get("potion").toString()).get("lat").toString();
269 270 bLatx = bLatx==null || bLatx.equals("") ? "0" : bLatx;
270   - List<Object[]> stationNameList = repository.findStationName(stationName);
  271 + List<Object[]> stationNameList = repository.findStationName(directions,stationName);
271 272 Map<String, Object> isHaveMap = isHaveStationname(bLonx,bLatx,stationNameList);
272 273 // 初始化站点对象
273 274 Station arg0 = new Station();
... ... @@ -699,76 +700,103 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
699 700 *
700 701 * @return Map<String, Object> <SUCCESS ; ERROR>
701 702 */
  703 + @Transactional
702 704 @Override
703 705 public Map<String, Object> stationSaveMap(Map<String, Object> map) {
704 706 Map<String, Object> resultMap = new HashMap<String, Object>();
705 707 try {
706 708 // 站点编码
707   - String stationCod = map.get("stationCod").equals("") ? "" : map.get("stationCod").toString();
  709 + String stationCod = "";
708 710 // 站点ID
709   - int stationId = Integer.valueOf(stationCod);
  711 + Integer stationId = null;
710 712 // 站点名称
711   - String stationName = map.get("stationName").equals("") ? "" : map.get("stationName").toString();
712   - // 道路编码
713   - String roadCoding = map.get("roadCoding").equals("") ? "" : map.get("roadCoding").toString();
714   - // 原坐标类型
715   - String dbType = map.get("dbType").equals("") ? "" : map.get("dbType").toString();
  713 + String zdmc = map.get("zdmc").equals("") ? "" : map.get("zdmc").toString();
  714 + // 方向
  715 + Integer directions = map.get("directions").equals("") ? null : Integer.parseInt(map.get("directions").toString());
716 716 // 原坐标点
717 717 String bJwpoints = map.get("bJwpoints").equals("") ? "" : map.get("bJwpoints").toString();
718 718 String bJwpointsArray[] = null;
719 719 if(bJwpoints!=null) {
720 720 bJwpointsArray = bJwpoints.split(" ");
721 721 }
722   - // WGS经纬度
723   - Float gLonx = null;
724   - // WGS纬度
725   - Float gLaty = null;
726   - if(bJwpointsArray.length>0) {
727   - Location resultPoint = FromBDPointToWGSPoint(bJwpointsArray[0],bJwpointsArray[1]);
728   - gLonx = (float)resultPoint.getLng();
729   - gLaty = (float)resultPoint.getLat();
730   - }
731   - // 方向
732   - Integer directions = map.get("directions").equals("") ? null : Integer.parseInt(map.get("directions").toString());
733   - // 距离
734   - Double distances = map.get("distances").equals("") ? null : Double.parseDouble(map.get("distances").toString());
735   - // 时间
736   - Double toTime = map.get("toTime").equals("") ? null : Double.parseDouble(map.get("toTime").toString());
737   - // 城建坐标经度
738   - Float x = map.get("x").equals("") ? null : Float.parseFloat(map.get("x").toString());
739   - // 城建坐标纬度
740   - Float y = map.get("y").equals("") ? null : Float.parseFloat(map.get("y").toString());
741   - // 多边形原坐标点集合
742   - String bPloygonGrid = map.get("bPolygonGrid").equals("") ? "" : map.get("bPolygonGrid").toString();
743   - // 多边形WGS坐标点集合
744   - String gPloygonGrid ="";
745   - if(!bPloygonGrid.equals("")) {
746   - String bPloygonGridArray[] = bPloygonGrid.split(",");
747   - int bLen_ = bPloygonGridArray.length;
748   - for(int b = 0 ;b<bLen_;b++) {
749   - String tempArray[]= bPloygonGridArray[b].split(" ");
750   - Location resultPoint = FromBDPointToWGSPoint(tempArray[0],tempArray[1]);
751   - if(b==0) {
752   - gPloygonGrid = String.valueOf(resultPoint.getLng()) + " " + String.valueOf(resultPoint.getLat());
753   - }else {
754   - gPloygonGrid = gPloygonGrid + ',' + String.valueOf(resultPoint.getLng()) + " " + String.valueOf(resultPoint.getLat());
755   - }
756   - }
757   - }
  722 + List<Object[]> stationNameList = repository.findStationName(directions,zdmc);
  723 + Map<String, Object> isHaveMap = isHaveStationname(bJwpointsArray[0],bJwpointsArray[1],stationNameList);
758 724 // 是否撤销
759 725 Integer destroy = map.get("destroy").equals("") ? null : Integer.parseInt(map.get("destroy").toString());
760   - // 圆半径
761   - Integer radius = map.get("radius").equals("") ? null : Integer.parseInt(map.get("radius").toString());
762   - // 图形类型
763   - String shapesType = map.get("shapesType").equals("") ? "" : map.get("shapesType").toString();
764 726 // 版本
765 727 Integer versions = map.get("versions").equals("") ? null : Integer.parseInt(map.get("versions").toString());
766 728 // 说明
767 729 String descriptions = map.get("descriptions").equals("") ? "" : map.get("descriptions").toString();
768   - // 创建人
769   - Integer createBy = map.get("createBy").equals("") ? null : Integer.parseInt(map.get("createBy").toString());
770   - // 修改人
771   - Integer updateBy = map.get("updateBy").equals("") ? null : Integer.parseInt(map.get("updateBy").toString());
  730 + if(Boolean.parseBoolean(isHaveMap.get("isHave").toString())) {
  731 + stationId = Integer.parseInt(isHaveMap.get("id").toString());
  732 + }else {
  733 + // 站点编码
  734 + stationCod = map.get("stationCod").equals("") ? "" : map.get("stationCod").toString();
  735 + // 站点ID
  736 + stationId = Integer.valueOf(stationCod);
  737 + // 圆半径
  738 + Integer radius = map.get("radius").equals("") ? null : Integer.parseInt(map.get("radius").toString());
  739 + // 图形类型
  740 + String shapesType = map.get("shapesType").equals("") ? "" : map.get("shapesType").toString();
  741 + // 创建人
  742 + Integer createBy = map.get("createBy").equals("") ? null : Integer.parseInt(map.get("createBy").toString());
  743 + // 修改人
  744 + Integer updateBy = map.get("updateBy").equals("") ? null : Integer.parseInt(map.get("updateBy").toString());
  745 + // 城建坐标经度
  746 + Float x = map.get("x").equals("") ? null : Float.parseFloat(map.get("x").toString());
  747 + // 城建坐标纬度
  748 + Float y = map.get("y").equals("") ? null : Float.parseFloat(map.get("y").toString());
  749 + // 道路编码
  750 + String roadCoding = map.get("roadCoding").equals("") ? "" : map.get("roadCoding").toString();
  751 + // 原坐标类型
  752 + String dbType = map.get("dbType").equals("") ? "" : map.get("dbType").toString();
  753 + // WGS经纬度
  754 + Float gLonx = null;
  755 + // WGS纬度
  756 + Float gLaty = null;
  757 + if(bJwpointsArray.length>0) {
  758 + Location resultPoint = FromBDPointToWGSPoint(bJwpointsArray[0],bJwpointsArray[1]);
  759 + gLonx = (float)resultPoint.getLng();
  760 + gLaty = (float)resultPoint.getLat();
  761 + }
  762 + // 多边形原坐标点集合
  763 + String bPloygonGrid = map.get("bPolygonGrid").equals("") ? "" : map.get("bPolygonGrid").toString();
  764 + // 多边形WGS坐标点集合
  765 + String gPloygonGrid ="";
  766 + if(!bPloygonGrid.equals("")) {
  767 + String bPloygonGridArray[] = bPloygonGrid.split(",");
  768 + int bLen_ = bPloygonGridArray.length;
  769 + for(int b = 0 ;b<bLen_;b++) {
  770 + String tempArray[]= bPloygonGridArray[b].split(" ");
  771 + Location resultPoint = FromBDPointToWGSPoint(tempArray[0],tempArray[1]);
  772 + if(b==0) {
  773 + gPloygonGrid = String.valueOf(resultPoint.getLng()) + " " + String.valueOf(resultPoint.getLat());
  774 + }else {
  775 + gPloygonGrid = gPloygonGrid + ',' + String.valueOf(resultPoint.getLng()) + " " + String.valueOf(resultPoint.getLat());
  776 + }
  777 + }
  778 + }
  779 + if(bPloygonGrid.equals(""))
  780 + bPloygonGrid = null;
  781 + else
  782 + bPloygonGrid = "POLYGON((" + bPloygonGrid +"))";
  783 + if(gPloygonGrid.equals(""))
  784 + gPloygonGrid = null;
  785 + else
  786 + gPloygonGrid = "POLYGON((" + gPloygonGrid +"))";
  787 + // 保存站点
  788 + repository.stationSave(stationCod, zdmc, roadCoding, dbType, bJwpoints,
  789 + gLonx, gLaty, x, y, gPloygonGrid,bPloygonGrid, destroy, radius,
  790 + shapesType, versions, descriptions, createBy, updateBy,stationId);
  791 + }
  792 + Station station = repository.findOne(stationId);
  793 + StationRoute arg0 = new StationRoute();
  794 + // 距离
  795 + Double distances = map.get("distances").equals("") ? null : Double.parseDouble(map.get("distances").toString());
  796 + // 时间
  797 + Double toTime = map.get("toTime").equals("") ? null : Double.parseDouble(map.get("toTime").toString());
  798 + // 站点路由名称
  799 + String stationName = map.get("stationName").equals("") ? "" : map.get("stationName").toString();
772 800 // 线路ID
773 801 int line = map.get("lineId").equals("") ? 0 : Integer.parseInt(map.get("lineId").toString());
774 802 // 线路信息
... ... @@ -784,20 +812,6 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
784 812 }else {
785 813 stationRouteCode = 100;
786 814 }
787   - if(bPloygonGrid.equals(""))
788   - bPloygonGrid = null;
789   - else
790   - bPloygonGrid = "POLYGON((" + bPloygonGrid +"))";
791   - if(gPloygonGrid.equals(""))
792   - gPloygonGrid = null;
793   - else
794   - gPloygonGrid = "POLYGON((" + gPloygonGrid +"))";
795   - // 保存站点
796   - repository.stationSave(stationCod, stationName, roadCoding, dbType, bJwpoints,
797   - gLonx, gLaty, x, y, gPloygonGrid,bPloygonGrid, destroy, radius,
798   - shapesType, versions, descriptions, createBy, updateBy,stationId);
799   - Station station = repository.findOne(stationId);
800   - StationRoute arg0 = new StationRoute();
801 815 // 线路
802 816 arg0.setLine(resultLine);
803 817 arg0.setLineCode(resultLine.getLineCode());
... ... @@ -806,7 +820,7 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
806 820 // 站点路由名称
807 821 arg0.setStationName(stationName);
808 822 // 站点路由编码
809   - arg0.setStationCode(stationCod);
  823 + arg0.setStationCode(station.getStationCod());
810 824 // 站点路由序号
811 825 arg0.setStationRouteCode(stationRouteCode);
812 826 // 站点路由类型
... ... @@ -823,6 +837,7 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
823 837 arg0.setDestroy(destroy);
824 838 // 站点路由说明
825 839 arg0.setDescriptions(descriptions);
  840 + routeRepository.stationUpdStationRouteCode(line, directions, stationRouteCode);
826 841 routeRepository.save(arg0);
827 842 resultMap.put("status", ResponseCode.SUCCESS);
828 843 } catch (Exception e) {
... ... @@ -849,112 +864,54 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
849 864 */
850 865 @Override
851 866 public Map<String, Object> stationUpdate(Map<String, Object> map) {
852   -
853 867 Map<String, Object> resultMap = new HashMap<String, Object>();
854   -
855 868 try {
856   -
857 869 // 站点Id
858 870 Integer stationId = map.get("stationId").equals("") ? null : Integer.parseInt(map.get("stationId").toString());
859   -
860 871 String stationCod = map.get("stationCod").equals("") ? "" : map.get("stationCod").toString();
861   -
  872 + String zdmc = map.get("zdmc").equals("") ? "" : map.get("zdmc").toString();
862 873 // 站点名称
863 874 String stationName = map.get("stationName").equals("") ? "" : map.get("stationName").toString();
864   -
865 875 // 所在道路编码
866 876 String roadCoding = map.get("roadCoding").equals("") ? "" : map.get("roadCoding").toString();
867   -
868 877 // 经纬坐标类型
869 878 String dbType = map.get("dbType").equals("") ? "" : map.get("dbType").toString();
870   -
871 879 // 百度经纬度坐标
872 880 String bJwpoints = map.get("bJwpoints").equals("") ? "" : map.get("bJwpoints").toString();
873   -
874   - // WGS经纬度坐标
875   - // String gJwpoints = map.get("gJwpoints").equals("") ? "" : map.get("gJwpoints").toString();
876   -
877 881 String bJwpointsArray[] =null;
878   -
879 882 if(bJwpoints!=null) {
880   -
881 883 bJwpointsArray = bJwpoints.split(" ");
882   -
883 884 }
884   -
885 885 // WGS经纬度
886 886 Float gLonx = null;
887   -
888 887 // WGS纬度
889 888 Float gLaty = null;
890   -
891 889 if(bJwpointsArray.length>0) {
892   -
893 890 Location resultPoint = FromBDPointToWGSPoint(bJwpointsArray[0],bJwpointsArray[1]);
894   -
895 891 gLonx = (float)resultPoint.getLng();
896   -
897 892 gLaty = (float)resultPoint.getLat();
898   -
899 893 }
900   -
901   - /*// 站点地理位置WGS坐标经度
902   - String gLonx = "";
903   -
904   - // 站点地理位置WGS坐标纬度
905   - String gLaty = "";
906   -
907   - if(gJwpoints!=null) {
908   -
909   - String gJwpointsArray[] = gJwpoints.split(" ");
910   -
911   - gLonx = gJwpointsArray[0];
912   -
913   - gLaty = gJwpointsArray[1];
914   -
915   - }*/
916   -
917 894 // 图形类型
918 895 String shapesType = map.get("shapesType").equals("") ? "" : map.get("shapesType").toString();
919   -
920 896 // 圆形半径
921 897 Integer radius = map.get("radius").equals("") ? null : Integer.parseInt(map.get("radius").toString());
922   -
923   - // 多边形空间WGS坐标点集合
924   - /*String gPolygonGrid = map.get("gPolygonGrid").equals("") ? "" : map.get("gPolygonGrid").toString();*/
925   -
926 898 // 多边形空间原坐标坐标点集合
927 899 String bPloygonGrid = map.get("bPolygonGrid").equals("") ? "" : map.get("bPolygonGrid").toString();
928   -
929 900 // 多边形WGS坐标点集合
930 901 String gPloygonGrid ="";
931   -
932 902 if(!bPloygonGrid.equals("")) {
933   -
934 903 String bPloygonGridArray[] = bPloygonGrid.split(",");
935   -
936 904 int bLen_ = bPloygonGridArray.length;
937   -
938 905 for(int b = 0 ;b<bLen_;b++) {
939   -
940 906 String tempArray[]= bPloygonGridArray[b].split(" ");
941   -
942 907 Location resultPoint = FromBDPointToWGSPoint(tempArray[0],tempArray[1]);
943   -
944 908 if(b==0) {
945   -
946 909 gPloygonGrid = resultPoint.getLng() + " " + resultPoint.getLat();
947   -
948 910 }else {
949   -
950 911 gPloygonGrid = gPloygonGrid + ',' + resultPoint.getLng() + " " + resultPoint.getLat();
951   -
952 912 }
953   -
954 913 }
955   -
956 914 }
957   -
958 915 if(bPloygonGrid.equals(""))
959 916 bPloygonGrid = null;
960 917 else
... ... @@ -964,116 +921,62 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
964 921 gPloygonGrid = null;
965 922 else
966 923 gPloygonGrid = "POLYGON((" + gPloygonGrid +"))";
967   -
968   -
969 924 // 是否撤销
970 925 Integer destroy = map.get("destroy").equals("") ? null : Integer.parseInt(map.get("destroy").toString());
971   -
972 926 // 版本号
973 927 Integer versions = map.get("versions").equals("") ? null : Integer.parseInt(map.get("versions").toString());
974   -
975 928 // 描述与说明
976 929 String descriptions = map.get("descriptions").equals("") ? "" : map.get("descriptions").toString();
977   -
978 930 Float x = map.get("x").equals("") ? null : Float.parseFloat(map.get("x").toString());
979   -
980 931 Float y = map.get("y").equals("") ? null : Float.parseFloat(map.get("y").toString());
981   -
982 932 // 更新
983   - repository.stationUpdate(stationCod, stationName, roadCoding, dbType, bJwpoints, gLonx, gLaty, x, y, bPloygonGrid, gPloygonGrid, destroy, radius, shapesType, versions, descriptions, stationId);
984   -
985   -
  933 + repository.stationUpdate(stationCod, zdmc, roadCoding, dbType, bJwpoints, gLonx, gLaty, x, y, bPloygonGrid, gPloygonGrid, destroy, radius, shapesType, versions, descriptions, stationId);
986 934 // 站点路由Id
987 935 Integer stationRouteId = map.get("stationRouteId").equals("") ? null : Integer.parseInt(map.get("stationRouteId").toString());
988   -
989 936 StationRoute resultS = routeRepository.findOne(stationRouteId);
990   -
991 937 // 站点路由序号
992 938 String stationRouteCodeStr = map.get("stationRouteCode").equals("") ? null : map.get("stationRouteCode").toString();
993   -
994 939 Integer stationRouteCode = null;
995   -
996 940 if(stationRouteCodeStr!=null) {
997   -
998 941 String stationRouteCodeAraay[] = stationRouteCodeStr.split("_");
999   -
1000 942 int old_code = resultS.getStationRouteCode();
1001   -
1002 943 int new_code = Integer.parseInt(stationRouteCodeAraay[0].toString())+100;
1003   -
1004 944 if(new_code==old_code){
1005   -
1006 945 stationRouteCode = new_code;
1007   -
1008 946 }else {
1009   -
1010 947 stationRouteCode = new_code-100+1;
1011   -
1012 948 }
1013   -
1014 949 }else {
1015   -
1016 950 stationRouteCode = resultS.getStationRouteCode();
1017   -
1018 951 }
1019   -
1020 952 stationRouteCode = stationRouteCode == null ? 100 : stationRouteCode;
1021   -
1022 953 Integer LineId = map.get("stationRouteLine").equals("") ? null : Integer.parseInt(map.get("stationRouteLine").toString());
1023   -
1024 954 String stationMark = map.get("stationMark").equals("") ? null : map.get("stationMark").toString();
1025   -
1026 955 Double distances = map.get("distances").equals("") ? null : Double.parseDouble(map.get("distances").toString());
1027   -
1028 956 Double toTime = map.get("toTime").equals("") ? null : Double.parseDouble(map.get("toTime").toString());
1029   -
1030 957 Integer directions = map.get("directions").equals("") ? null : Integer.parseInt(map.get("directions").toString());
1031   -
1032 958 Station station = repository.findOne(stationId);
1033   -
1034 959 Line line = lineRepository.findOne(LineId);
1035   -
1036   -
1037 960 StationRoute stationRoute = new StationRoute();
1038   -
1039 961 stationRoute.setStationName(stationName);
1040   -
1041 962 stationRoute.setId(stationRouteId);
1042   -
1043 963 stationRoute.setStationRouteCode(stationRouteCode);
1044   -
1045 964 stationRoute.setStation(station);
1046   -
1047 965 stationRoute.setStationCode(station.getStationCod());
1048   -
1049 966 stationRoute.setLine(line);
1050   -
1051 967 stationRoute.setLineCode(line.getLineCode());
1052   -
1053 968 stationRoute.setStationMark(stationMark);
1054   -
1055 969 stationRoute.setDistances(distances);
1056   -
1057 970 stationRoute.setToTime(toTime);
1058   -
1059 971 stationRoute.setDirections(directions);
1060   -
1061 972 stationRoute.setVersions(versions);
1062   -
1063 973 stationRoute.setDestroy(destroy);
1064   -
1065 974 stationRoute.setDescriptions(descriptions);
1066   -
1067 975 routeRepository.save(stationRoute);
1068   -
1069 976 resultMap.put("status", ResponseCode.SUCCESS);
1070   -
1071 977 } catch (Exception e) {
1072   -
1073 978 resultMap.put("status", ResponseCode.ERROR);
1074   -
1075 979 logger.error("save erro.", e);
1076   -
1077 980 }
1078 981 return resultMap;
1079 982 }
... ...
src/main/resources/static/pages/base/line/js/line-list-table.js
... ... @@ -23,6 +23,7 @@
23 23 icheckOptions = {checkboxClass: 'icheckbox_flat-blue',increaseArea: '20%'},
24 24 storage = window.localStorage;
25 25 if(storage.xlName_AgursData!=null && storage.xlName_AgursData !='') {
  26 + $('.tipso-animation').children().remove();
26 27 // 延迟加载
27 28 setTimeout(function(){
28 29 $('.tipso-animation').tipso({
... ...
src/main/resources/static/pages/base/lineinformation/add.html
... ... @@ -85,7 +85,7 @@
85 85 </label>
86 86 <div class="col-md-4">
87 87 <input type="text" class="form-control" name="totalMileage" id="totalMileageInput" placeholder="标准总里程">
88   - <span class="help-block"> 单位:公里 </span>
  88 + <span class="help-block"> 单位:公里(km) </span>
89 89 </div>
90 90 </div>
91 91 <!-- 标准总里程 END -->
... ... @@ -97,7 +97,7 @@
97 97 </label>
98 98 <div class="col-md-4">
99 99 <input type="text" class="form-control" name="emptyMileage" id="emptyMileageInput" placeholder="空放里程">
100   - <span class="help-block"> 单位:公里 </span>
  100 + <span class="help-block"> 单位:公里(km) </span>
101 101 </div>
102 102 </div>
103 103 <!-- 空放里程 END -->
... ... @@ -113,7 +113,7 @@
113 113 </label>
114 114 <div class="col-md-4">
115 115 <input type="text" class="form-control" name="upMileage" id="upMileageInput" placeholder="上行里程">
116   - <span class="help-block"> 单位:公里 </span>
  116 + <span class="help-block"> 单位:公里(km) </span>
117 117 </div>
118 118 </div>
119 119 <!-- 上行里程 END -->
... ... @@ -125,7 +125,7 @@
125 125 </label>
126 126 <div class="col-md-4">
127 127 <input type="text" class="form-control" name="downMileage" id="downMileageInput" placeholder="下行里程">
128   - <span class="help-block"> 单位:公里 </span>
  128 + <span class="help-block"> 单位:公里(km) </span>
129 129 </div>
130 130 </div>
131 131 <!-- 下行里程 END -->
... ... @@ -141,7 +141,7 @@
141 141 </label>
142 142 <div class="col-md-4">
143 143 <input type="text" class="form-control" name="upTravelTime" id="upTravelTimeInput" placeholder="上行行驶时间">
144   - <span class="help-block"> 单位:分钟 </span>
  144 + <span class="help-block"> 单位:分钟(min) </span>
145 145 </div>
146 146 </div>
147 147 <!-- 上行行驶时间 END -->
... ... @@ -153,7 +153,7 @@
153 153 </label>
154 154 <div class="col-md-4">
155 155 <input type="text" class="form-control" name="downTravelTime" id="downTravelTimeInput" placeholder="下行行驶时间">
156   - <span class="help-block"> 单位:分钟 </span>
  156 + <span class="help-block"> 单位:分钟(min) </span>
157 157 </div>
158 158 </div>
159 159 <!-- 下行行驶时间 END -->
... ... @@ -197,7 +197,7 @@
197 197 </label>
198 198 <div class="col-md-4">
199 199 <input type="text" class="form-control" name="earlyUpTime" id="earlyUpTimeInput" placeholder="早高峰上行行驶时间">
200   - <span class="help-block"> 单位:分钟 </span>
  200 + <span class="help-block"> 单位:分钟(min) </span>
201 201 </div>
202 202 </div>
203 203 <!-- 早高峰上行行驶时间 END -->
... ... @@ -209,7 +209,7 @@
209 209 </label>
210 210 <div class="col-md-4">
211 211 <input type="text" class="form-control" name="earlyDownTime" id="earlyDownTimeInput" placeholder="早高峰下行行驶时间">
212   - <span class="help-block"> 单位:分钟 </span>
  212 + <span class="help-block"> 单位:分钟(min) </span>
213 213 </div>
214 214 </div>
215 215 <!-- 早高峰下行行驶时间 END -->
... ... @@ -251,7 +251,7 @@
251 251 <label class="control-label col-md-5"> 晚高峰上行行驶时间&nbsp;&nbsp;&nbsp;: </label>
252 252 <div class="col-md-4">
253 253 <input type="text" class="form-control" name="lateUpTime" id="lateUpTimeInput" placeholder="晚高峰上行行驶时间">
254   - <span class="help-block"> 单位:分钟 </span>
  254 + <span class="help-block"> 单位:分钟(min) </span>
255 255 </div>
256 256 </div>
257 257 <!-- 晚高峰上行行驶时间 END -->
... ... @@ -261,7 +261,7 @@
261 261 <label class="control-label col-md-5"> 晚高峰下行行驶时间&nbsp;&nbsp;&nbsp;: </label>
262 262 <div class="col-md-4">
263 263 <input type="text" class="form-control" name="lateDownTime" id="lateDownTimeInput" placeholder="晚高峰下行行驶时间">
264   - <span class="help-block"> 单位:分钟 </span>
  264 + <span class="help-block"> 单位:分钟(min) </span>
265 265 </div>
266 266 </div>
267 267 <!-- 晚高峰下行行驶时间 END -->
... ... @@ -304,7 +304,7 @@
304 304 <label class="control-label col-md-5"> 小夜高峰上行行驶时间: </label>
305 305 <div class="col-md-4">
306 306 <input type="text" class="form-control" name="nightStartTime" id="nightStartTimeInput" placeholder="小夜高峰上行行驶时间">
307   - <span class="help-block"> 单位:分钟 </span>
  307 + <span class="help-block"> 单位:分钟(min) </span>
308 308 </div>
309 309 </div>
310 310 <!-- 小夜高峰上行行驶时间 END -->
... ... @@ -314,7 +314,7 @@
314 314 <label class="control-label col-md-5"> 小夜高峰下行行驶时间: </label>
315 315 <div class="col-md-4">
316 316 <input type="text" class="form-control" name="nightEndTime" id="nightEndTimeInput" placeholder="晚高峰下行行驶时间">
317   - <span class="help-block"> 单位:分钟 </span>
  317 + <span class="help-block"> 单位:分钟(min) </span>
318 318 </div>
319 319 </div>
320 320 <!-- 小夜高峰下行行驶时间 END -->
... ... @@ -328,7 +328,7 @@
328 328 <label class="control-label col-md-5"> 低谷上行行驶时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
329 329 <div class="col-md-4">
330 330 <input type="text" class="form-control" name="troughUpTime" id="troughUpTimeInput" placeholder="低谷上行行驶时间">
331   - <span class="help-block"> 单位:分钟 </span>
  331 + <span class="help-block"> 单位:分钟(min) </span>
332 332 </div>
333 333 </div>
334 334 <!-- 低谷上行行驶时间 END -->
... ... @@ -338,7 +338,7 @@
338 338 <label class="control-label col-md-5"> 低谷下行行驶时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
339 339 <div class="col-md-4">
340 340 <input type="text" class="form-control" name="troughDownTime" id="troughDownTimeInput" placeholder="低谷下行行驶时间">
341   - <span class="help-block"> 单位:分钟 </span>
  341 + <span class="help-block"> 单位:分钟(min) </span>
342 342 </div>
343 343 </div>
344 344 <!-- 低谷下行行驶时间 END -->
... ...
src/main/resources/static/pages/base/lineinformation/details.html
... ... @@ -85,7 +85,7 @@
85 85 </label>
86 86 <div class="col-md-4">
87 87 <input type="text" class="form-control" name="totalMileage" id="totalMileageInput" placeholder="标准总里程">
88   - <span class="help-block"> 单位:公里 </span>
  88 + <span class="help-block"> 单位:公里(km) </span>
89 89 </div>
90 90 </div>
91 91 <!-- 标准总里程 END -->
... ... @@ -97,7 +97,7 @@
97 97 </label>
98 98 <div class="col-md-4">
99 99 <input type="text" class="form-control" name="emptyMileage" id="emptyMileageInput" placeholder="空放里程">
100   - <span class="help-block"> 单位:公里 </span>
  100 + <span class="help-block"> 单位:公里(km) </span>
101 101 </div>
102 102 </div>
103 103 <!-- 空放里程 END -->
... ... @@ -113,7 +113,7 @@
113 113 </label>
114 114 <div class="col-md-4">
115 115 <input type="text" class="form-control" name="upMileage" id="upMileageInput" placeholder="上行里程">
116   - <span class="help-block"> 单位:公里 </span>
  116 + <span class="help-block"> 单位:公里(km) </span>
117 117 </div>
118 118 </div>
119 119 <!-- 上行里程 END -->
... ... @@ -125,7 +125,7 @@
125 125 </label>
126 126 <div class="col-md-4">
127 127 <input type="text" class="form-control" name="downMileage" id="downMileageInput" placeholder="下行里程">
128   - <span class="help-block"> 单位:公里 </span>
  128 + <span class="help-block"> 单位:公里(km) </span>
129 129 </div>
130 130 </div>
131 131 <!-- 下行里程 END -->
... ... @@ -141,7 +141,7 @@
141 141 </label>
142 142 <div class="col-md-4">
143 143 <input type="text" class="form-control" name="upTravelTime" id="upTravelTimeInput" placeholder="上行行驶时间">
144   - <span class="help-block"> 单位:分钟 </span>
  144 + <span class="help-block"> 单位:分钟(min) </span>
145 145 </div>
146 146 </div>
147 147 <!-- 上行行驶时间 END -->
... ... @@ -153,7 +153,7 @@
153 153 </label>
154 154 <div class="col-md-4">
155 155 <input type="text" class="form-control" name="downTravelTime" id="downTravelTimeInput" placeholder="下行行驶时间">
156   - <span class="help-block"> 单位:分钟 </span>
  156 + <span class="help-block"> 单位:分钟(min) </span>
157 157 </div>
158 158 </div>
159 159 <!-- 下行行驶时间 END -->
... ... @@ -197,7 +197,7 @@
197 197 </label>
198 198 <div class="col-md-4">
199 199 <input type="text" class="form-control" name="earlyUpTime" id="earlyUpTimeInput" placeholder="早高峰上行行驶时间">
200   - <span class="help-block"> 单位:分钟 </span>
  200 + <span class="help-block"> 单位:分钟(min) </span>
201 201 </div>
202 202 </div>
203 203 <!-- 早高峰上行行驶时间 END -->
... ... @@ -209,7 +209,7 @@
209 209 </label>
210 210 <div class="col-md-4">
211 211 <input type="text" class="form-control" name="earlyDownTime" id="earlyDownTimeInput" placeholder="早高峰下行行驶时间">
212   - <span class="help-block"> 单位:分钟 </span>
  212 + <span class="help-block"> 单位:分钟(min) </span>
213 213 </div>
214 214 </div>
215 215 <!-- 早高峰下行行驶时间 END -->
... ... @@ -251,7 +251,7 @@
251 251 <label class="control-label col-md-5"> 晚高峰上行行驶时间&nbsp;&nbsp;&nbsp;: </label>
252 252 <div class="col-md-4">
253 253 <input type="text" class="form-control" name="lateUpTime" id="lateUpTimeInput" placeholder="晚高峰上行行驶时间">
254   - <span class="help-block"> 单位:分钟 </span>
  254 + <span class="help-block"> 单位:分钟(min) </span>
255 255 </div>
256 256 </div>
257 257 <!-- 晚高峰上行行驶时间 END -->
... ... @@ -261,7 +261,7 @@
261 261 <label class="control-label col-md-5"> 晚高峰下行行驶时间&nbsp;&nbsp;&nbsp;: </label>
262 262 <div class="col-md-4">
263 263 <input type="text" class="form-control" name="lateDownTime" id="lateDownTimeInput" placeholder="晚高峰下行行驶时间">
264   - <span class="help-block"> 单位:分钟 </span>
  264 + <span class="help-block"> 单位:分钟(min) </span>
265 265 </div>
266 266 </div>
267 267 <!-- 晚高峰下行行驶时间 END -->
... ... @@ -304,7 +304,7 @@
304 304 <label class="control-label col-md-5"> 小夜高峰上行行驶时间: </label>
305 305 <div class="col-md-4">
306 306 <input type="text" class="form-control" name="nightStartTime" id="nightStartTimeInput" placeholder="小夜高峰上行行驶时间">
307   - <span class="help-block"> 单位:分钟 </span>
  307 + <span class="help-block"> 单位:分钟(min) </span>
308 308 </div>
309 309 </div>
310 310 <!-- 小夜高峰上行行驶时间 END -->
... ... @@ -314,7 +314,7 @@
314 314 <label class="control-label col-md-5"> 小夜高峰下行行驶时间: </label>
315 315 <div class="col-md-4">
316 316 <input type="text" class="form-control" name="nightEndTime" id="nightEndTimeInput" placeholder="晚高峰下行行驶时间">
317   - <span class="help-block"> 单位:分钟 </span>
  317 + <span class="help-block"> 单位:分钟(min) </span>
318 318 </div>
319 319 </div>
320 320 <!-- 小夜高峰下行行驶时间 END -->
... ... @@ -328,7 +328,7 @@
328 328 <label class="control-label col-md-5"> 低谷上行行驶时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
329 329 <div class="col-md-4">
330 330 <input type="text" class="form-control" name="troughUpTime" id="troughUpTimeInput" placeholder="低谷上行行驶时间">
331   - <span class="help-block"> 单位:分钟 </span>
  331 + <span class="help-block"> 单位:分钟(min) </span>
332 332 </div>
333 333 </div>
334 334 <!-- 低谷上行行驶时间 END -->
... ... @@ -338,7 +338,7 @@
338 338 <label class="control-label col-md-5"> 低谷下行行驶时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
339 339 <div class="col-md-4">
340 340 <input type="text" class="form-control" name="troughDownTime" id="troughDownTimeInput" placeholder="低谷下行行驶时间">
341   - <span class="help-block"> 单位:分钟 </span>
  341 + <span class="help-block"> 单位:分钟(min) </span>
342 342 </div>
343 343 </div>
344 344 <!-- 低谷下行行驶时间 END -->
... ...
src/main/resources/static/pages/base/lineinformation/edit.html
... ... @@ -86,7 +86,7 @@
86 86 </label>
87 87 <div class="col-md-4">
88 88 <input type="text" class="form-control" name="totalMileage" id="totalMileageInput" placeholder="标准总里程">
89   - <span class="help-block"> 单位:公里 </span>
  89 + <span class="help-block"> 单位:公里(km) </span>
90 90 </div>
91 91 </div>
92 92 <!-- 标准总里程 END -->
... ... @@ -98,7 +98,7 @@
98 98 </label>
99 99 <div class="col-md-4">
100 100 <input type="text" class="form-control" name="emptyMileage" id="emptyMileageInput" placeholder="空放里程">
101   - <span class="help-block"> 单位:公里 </span>
  101 + <span class="help-block"> 单位:公里(km) </span>
102 102 </div>
103 103 </div>
104 104 <!-- 空放里程 END -->
... ... @@ -114,7 +114,7 @@
114 114 </label>
115 115 <div class="col-md-4">
116 116 <input type="text" class="form-control" name="upMileage" id="upMileageInput" placeholder="上行里程">
117   - <span class="help-block"> 单位:公里 </span>
  117 + <span class="help-block"> 单位:公里(km) </span>
118 118 </div>
119 119 </div>
120 120 <!-- 上行里程 END -->
... ... @@ -126,7 +126,7 @@
126 126 </label>
127 127 <div class="col-md-4">
128 128 <input type="text" class="form-control" name="downMileage" id="downMileageInput" placeholder="下行里程">
129   - <span class="help-block"> 单位:公里 </span>
  129 + <span class="help-block"> 单位:公里(km) </span>
130 130 </div>
131 131 </div>
132 132 <!-- 下行里程 END -->
... ... @@ -142,7 +142,7 @@
142 142 </label>
143 143 <div class="col-md-4">
144 144 <input type="text" class="form-control" name="upTravelTime" id="upTravelTimeInput" placeholder="上行行驶时间">
145   - <span class="help-block"> 单位:分钟 </span>
  145 + <span class="help-block"> 单位:分钟(km) </span>
146 146 </div>
147 147 </div>
148 148 <!-- 上行行驶时间 END -->
... ... @@ -154,7 +154,7 @@
154 154 </label>
155 155 <div class="col-md-4">
156 156 <input type="text" class="form-control" name="downTravelTime" id="downTravelTimeInput" placeholder="下行行驶时间">
157   - <span class="help-block"> 单位:分钟 </span>
  157 + <span class="help-block"> 单位:分钟(km) </span>
158 158 </div>
159 159 </div>
160 160 <!-- 下行行驶时间 END -->
... ... @@ -198,7 +198,7 @@
198 198 </label>
199 199 <div class="col-md-4">
200 200 <input type="text" class="form-control" name="earlyUpTime" id="earlyUpTimeInput" placeholder="早高峰上行行驶时间">
201   - <span class="help-block"> 单位:分钟 </span>
  201 + <span class="help-block"> 单位:分钟(km) </span>
202 202 </div>
203 203 </div>
204 204 <!-- 早高峰上行行驶时间 END -->
... ... @@ -210,7 +210,7 @@
210 210 </label>
211 211 <div class="col-md-4">
212 212 <input type="text" class="form-control" name="earlyDownTime" id="earlyDownTimeInput" placeholder="早高峰下行行驶时间">
213   - <span class="help-block"> 单位:分钟 </span>
  213 + <span class="help-block"> 单位:分钟(km) </span>
214 214 </div>
215 215 </div>
216 216 <!-- 早高峰下行行驶时间 END -->
... ... @@ -252,7 +252,7 @@
252 252 <label class="control-label col-md-5"> 晚高峰上行行驶时间&nbsp;&nbsp;&nbsp;: </label>
253 253 <div class="col-md-4">
254 254 <input type="text" class="form-control" name="lateUpTime" id="lateUpTimeInput" placeholder="晚高峰上行行驶时间">
255   - <span class="help-block"> 单位:分钟 </span>
  255 + <span class="help-block"> 单位:分钟(km) </span>
256 256 </div>
257 257 </div>
258 258 <!-- 晚高峰上行行驶时间 END -->
... ... @@ -262,7 +262,7 @@
262 262 <label class="control-label col-md-5"> 晚高峰下行行驶时间&nbsp;&nbsp;&nbsp;: </label>
263 263 <div class="col-md-4">
264 264 <input type="text" class="form-control" name="lateDownTime" id="lateDownTimeInput" placeholder="晚高峰下行行驶时间">
265   - <span class="help-block"> 单位:分钟 </span>
  265 + <span class="help-block"> 单位:分钟(km) </span>
266 266 </div>
267 267 </div>
268 268 <!-- 晚高峰下行行驶时间 END -->
... ... @@ -305,7 +305,7 @@
305 305 <label class="control-label col-md-5"> 小夜高峰上行行驶时间: </label>
306 306 <div class="col-md-4">
307 307 <input type="text" class="form-control" name="nightStartTime" id="nightStartTimeInput" placeholder="小夜高峰上行行驶时间">
308   - <span class="help-block"> 单位:分钟 </span>
  308 + <span class="help-block"> 单位:分钟(km) </span>
309 309 </div>
310 310 </div>
311 311 <!-- 小夜高峰上行行驶时间 END -->
... ... @@ -315,7 +315,7 @@
315 315 <label class="control-label col-md-5"> 小夜高峰下行行驶时间: </label>
316 316 <div class="col-md-4">
317 317 <input type="text" class="form-control" name="nightEndTime" id="nightEndTimeInput" placeholder="晚高峰下行行驶时间">
318   - <span class="help-block"> 单位:分钟 </span>
  318 + <span class="help-block"> 单位:分钟(km) </span>
319 319 </div>
320 320 </div>
321 321 <!-- 小夜高峰下行行驶时间 END -->
... ... @@ -329,7 +329,7 @@
329 329 <label class="control-label col-md-5"> 低谷上行行驶时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
330 330 <div class="col-md-4">
331 331 <input type="text" class="form-control" name="troughUpTime" id="troughUpTimeInput" placeholder="低谷上行行驶时间">
332   - <span class="help-block"> 单位:分钟 </span>
  332 + <span class="help-block"> 单位:分钟(km) </span>
333 333 </div>
334 334 </div>
335 335 <!-- 低谷上行行驶时间 END -->
... ... @@ -339,7 +339,7 @@
339 339 <label class="control-label col-md-5"> 低谷下行行驶时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
340 340 <div class="col-md-4">
341 341 <input type="text" class="form-control" name="troughDownTime" id="troughDownTimeInput" placeholder="低谷下行行驶时间">
342   - <span class="help-block"> 单位:分钟 </span>
  342 + <span class="help-block"> 单位:分钟(km) </span>
343 343 </div>
344 344 </div>
345 345 <!-- 低谷下行行驶时间 END -->
... ...
src/main/resources/static/pages/base/section/editsection.html
... ... @@ -174,7 +174,7 @@ $(&#39;#edit_section_mobal&#39;).on(&#39;editSectionMobal_show&#39;, function(e, map_,ajaxd,sect
174 174 + ' --' + dirdmToName(dArray[i].sectionrouteDirections) + '</option>' ;
175 175 }
176 176 $('#sectionrouteCodeSelect').html(options);
177   - ajaxd.findUpStationRouteCode(lineId,dir,eq_stationRouteCode,function(str) {
  177 + ajaxd.findUpSectionRouteCode(lineId,dir,eq_stationRouteCode,function(str) {
178 178 if(str.length>0){
179 179 var upStationRouteCode = str[0].sectionrouteCode
180 180 $('#sectionrouteCodeSelect').val(upStationRouteCode);
... ...
src/main/resources/static/pages/base/section/js/add-form-reload.js
... ... @@ -49,14 +49,14 @@
49 49 background : '#0ed0e8',
50 50 color : '#ffffff',
51 51 position :'right',
52   - width : 550,
  52 + width : 410,
53 53 delay : 400,
54 54 animationIn : 'bounceIn',
55 55 animationOut : 'bounceOut',
56   - offsetX : 8,
  56 + offsetX : 12,
57 57 offsetY : -70,
58   - content :'<span style="display:block; float:left;">a)系统生成:根据路段的起、终点站名称自动生成一条折线走向。</span></br></br>'+
59   - '<span style="display:block; float:left;">b)手动添加:手动在地图上画出路段,然后双击鼠标右键结束当前绘制。</span>',
  58 + content :'<span style="display:block; float:left;font-size:x-small;line-height:10px">a)系统生成:根据路段的起、终点站名称自动生成一条折线走向。</span></br>'+
  59 + '<span style="display:block; float:left;font-size:x-small;">b)手动添加:手动在地图上画出路段,然后双击鼠标右键结束当前绘制。</span>',
60 60  
61 61 });
62 62 $('.tipso-animation').tipso('show');
... ...
src/main/resources/static/pages/base/section/js/add-form-wizard.js
... ... @@ -86,7 +86,6 @@ var FormWizard = function() {
86 86 layer.msg('路段几何图形为空~请先在路段位置步骤中绘制出线路走向!');
87 87 return;
88 88 }
89   - console.log(params);
90 89 // 保存路段.
91 90 PublicFunctions.sectionSave(params,function(data) {
92 91 if(data.status=='SUCCESS') {
... ...
src/main/resources/static/pages/base/section/js/section-ajax-getdata.js
... ... @@ -23,12 +23,9 @@ var GetAjaxData = function(){
23 23 });
24 24 },
25 25  
26   - findUpStationRouteCode : function(lineId,diraction,sectionRouteCode,callback) {
27   -
28   - $get('/sectionroute/findUpStationRouteCode',{lineId:lineId,direction:diraction,sectionRouteCode:sectionRouteCode},function(result) {
29   -
  26 + findUpSectionRouteCode : function(lineId,diraction,sectionRouteCode,callback) {
  27 + $get('/sectionroute/findUpSectionRouteCode',{lineId:lineId,direction:diraction,sectionRouteCode:sectionRouteCode},function(result) {
30 28 callback && callback(result);
31   -
32 29 });
33 30  
34 31 },
... ...
src/main/resources/static/pages/base/section/js/section-list-table.js
... ... @@ -47,6 +47,7 @@
47 47 // page : 当前页、initPag :
48 48 var page = 0,initPag,storage = window.localStorage;
49 49 if(storage.xlName_AgursData!=null && storage.xlName_AgursData !='') {
  50 + $('.tipso-animation').children().remove();
50 51 // 延迟加载
51 52 setTimeout(function(){
52 53 $('.tipso-animation').tipso({
... ... @@ -72,7 +73,6 @@
72 73 return cb && cb(array);
73 74 });
74 75 }
75   -
76 76 function initldNameSelect(){
77 77 var lineInfo = $('#lineSelect').val(),
78 78 dirInfo = $('#dirSelect').val(),
... ... @@ -106,7 +106,6 @@
106 106 }
107 107 });
108 108 }
109   -
110 109 function cxDmToName(value){
111 110 var rsStr = '';
112 111 if(value==0)
... ... @@ -115,7 +114,6 @@
115 114 rsStr = '撤销';
116 115 return rsStr;
117 116 }
118   -
119 117 function dirDmToName(value){
120 118 var srStr = '';
121 119 if(value==0)
... ... @@ -124,7 +122,6 @@
124 122 srStr = '下行';
125 123 return srStr;
126 124 }
127   -
128 125 // 初始化是否撤销值.
129 126 $('#destroy').val(0);
130 127 getCompInfo(function(compD) {
... ...
src/main/resources/static/pages/base/station/add.html
... ... @@ -81,7 +81,7 @@
81 81 <div class="form-group" id="formRequ">
82 82 <label class="col-md-3 control-label"><span class="required"> * </span>站点名称:</label>
83 83 <div class="col-md-9">
84   - <input type="text" class="form-control input-medium" id="statinoNamebooxtInput" name="statinoNamebooxt">
  84 + <input type="text" class="form-control input-medium" id="zdmcInput" name="zdmc">
85 85 </div>
86 86 </div>
87 87 <!-- 新增方式 -->
... ... @@ -327,7 +327,7 @@
327 327 <h4 class="form-section"> 站点信息 </h4>
328 328  
329 329 <div class="form-group">
330   - <label class="control-label col-md-3">线路名称&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
  330 + <label class="control-label col-md-3">线路名称&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
331 331 <div class="col-md-4">
332 332 <p class="form-control-static" data-display="line"> </p>
333 333 </div>
... ... @@ -336,7 +336,7 @@
336 336 <div class="form-group">
337 337 <label class="control-label col-md-3">站点名称 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
338 338 <div class="col-md-4">
339   - <p class="form-control-static" data-display="statinoNamebooxt"> </p>
  339 + <p class="form-control-static" data-display="zdmc"> </p>
340 340 </div>
341 341 </div>
342 342  
... ...
src/main/resources/static/pages/base/station/edit.html
... ... @@ -38,6 +38,17 @@
38 38 <div class="form-body">
39 39 <div class="form-group">
40 40 <label class="control-label col-md-3">
  41 + <span class="required"> * </span> 站点名称&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
  42 + </label>
  43 + <div class="col-md-6">
  44 + <input type="text" class="form-control" name="zdmc" id="zdmcInput" placeholder="站点名称" readonly="readonly">
  45 + </div>
  46 + </div>
  47 + </div>
  48 + <!-- 站点名称 -->
  49 + <div class="form-body">
  50 + <div class="form-group">
  51 + <label class="control-label col-md-3">
41 52 <span class="required"> * </span> 站点路由名称:
42 53 </label>
43 54 <div class="col-md-6">
... ... @@ -267,6 +278,8 @@ $(&#39;#editPoitsions_station_mobal&#39;).on(&#39;editStationMobal_show&#39;, function(e, map,fu
267 278 params.shapesType = 'r';
268 279 else if(params.shapesType=='多边形')
269 280 params.shapesType = 'd';
  281 + if(params.stationRouteCode=='请选择...')
  282 + params.stationRouteCode='';
270 283 fun.stationUpdate(params,function(resuntDate) {
271 284 if(resuntDate.status=='SUCCESS') {
272 285 // 弹出添加成功提示消息
... ...
src/main/resources/static/pages/base/station/edit_select.html
... ... @@ -53,6 +53,7 @@
53 53 <script type="text/javascript">
54 54 $('#editPositions_select_mobal').on('editSelectMobal_show', function(e, map,drm,fun,statn){
55 55 var EditStation = statn.getAddStation();
  56 + console.log(EditStation);
56 57 // 显示选择修改方式弹出层
57 58 $('#editPositions_select_mobal').modal({show : true,backdrop: 'static',keyboard: false});
58 59 $('.tipso-animation').tipso({
... ... @@ -60,14 +61,14 @@ $(&#39;#editPositions_select_mobal&#39;).on(&#39;editSelectMobal_show&#39;, function(e, map,drm,
60 61 background : '#0ed0e8',
61 62 color : '#ffffff',
62 63 position :'right',
63   - width : 380,
  64 + width : 390,
64 65 delay : 400,
65 66 animationIn : 'bounceIn',
66 67 animationOut : 'bounceOut',
67 68 offsetX : -485,
68 69 offsetY : -25,
69   - content :'<span style="display:block; float:left;font-size:x-small">a)重新绘制位置:手动在地图上画出站点范围,然后双击鼠标右键保存.</span></br>'+
70   - '<span style="display:block; float:left;font-size:x-small">b)编辑原始位置:编辑原始位置与站点信息.</span>',
  70 + content :'<span style="display:block; float:left;font-size:x-small;line-height:12px">A)重新绘制位置:手动在地图上画出站点范围,然后双击鼠标右键保存.</span></br>'+
  71 + '<span style="display:block; float:left;font-size:x-small">B)编辑原始位置:编辑原始位置与站点信息.</span>',
71 72  
72 73 });
73 74 setTimeout(function(){
... ... @@ -75,7 +76,7 @@ $(&#39;#editPositions_select_mobal&#39;).on(&#39;editSelectMobal_show&#39;, function(e, map,drm,
75 76 setTimeout(function(){$('.tipso-animation').tipso('hide');},4000);
76 77 },500);
77 78 // 获取站点名称元素并赋值
78   - $('#stationNamebootboxInput').val(EditStation.stationName);
  79 + $('#stationNamebootboxInput').val(EditStation.zdmc);
79 80 // 定义站点图形类型
80 81 var stationShapesTypeV = EditStation.stationShapesType;
81 82 // 获取表单元素
... ...
src/main/resources/static/pages/base/station/js/add-form-reload.js
... ... @@ -46,14 +46,14 @@
46 46 background : '#0ed0e8',
47 47 color : '#ffffff',
48 48 position :'right',
49   - width : 550,
  49 + width : 410,
50 50 delay : 400,
51 51 animationIn : 'bounceIn',
52 52 animationOut : 'bounceOut',
53   - offsetX : 8,
  53 + offsetX : 12,
54 54 offsetY : -70,
55   - content :'<span style="display:block; float:left;">a)系统生成:根据站点名称自动生成以100米为半径范围的圆。</span></br></br>'+
56   - '<span style="display:block; float:left;">b)手动添加:手动在地图上画出站点范围,然后双击鼠标右键保存。</span>',
  55 + content :'<span style="display:block; float:left;font-size:x-small;line-height:10px">A)系统生成:根据站点名称自动生成以100米为半径范围的圆.</span></br>'+
  56 + '<span style="display:block; float:left;font-size:x-small;">B)手动添加:手动在地图上画出站点范围,然后双击鼠标右键保存.</span>',
57 57  
58 58 });
59 59 $('.tipso-animation').tipso('show');
... ...
src/main/resources/static/pages/base/station/js/add-form-wizard.js
... ... @@ -27,7 +27,7 @@ var FormWizard = function() {
27 27 focusInvalid : true,
28 28 // 需要验证的表单元素
29 29 rules : {
30   - 'statinoNamebooxt' : {required : true, maxlength: 50,},// 站点名称 必填项
  30 + 'zdmc' : {required : true, maxlength: 50,},// 站点名称 必填项
31 31 'line' : {required : true,},// 线路名称 必填项
32 32 'stationName' : {required : true,maxlength: 100,},// 站点名称 必填项
33 33 'stationCod' : {required : true,},// 站点编码 必填项
... ... @@ -126,32 +126,6 @@ var FormWizard = function() {
126 126 }
127 127 return tel;
128 128 }, '当站点类型为中途站或者终点站时,上一站点为必填项!');
129   - // 是否为圆
130   - /*$.validator.addMethod("isCricle", function(value,element) {
131   - var tel = false;
132   - var shapeType = $('#shapesTypeSelect').val(),
133   - radius = $('#radiusInput').val()
134   - if(shapeType =='r'){
135   - if(radius != '' && radius !=null)
136   - tel = true;
137   - }else if(shapeType =='d'){
138   - if(radius == '' || radius ==null)
139   - tel = true;
140   - }
141   - return tel;
142   - }, function() {
143   - var rsStr = '';
144   - var shapeType = $('#shapesTypeSelect').val(),
145   - radius = $('#radiusInput').val()
146   - if(shapeType =='r'){
147   - if(radius == '' || radius ==null)
148   - rsStr = '当几何图形为圆时,圆形半径为必填项!';
149   - }else if(shapeType =='d'){
150   - if(radius !='' && radius !=null)
151   - rsStr = '当几何图形为多边形时,圆形半径无须填写!';
152   - }
153   - return rsStr;
154   - });*/
155 129 // 确认提交信息
156 130 var displayConfirm = function() {
157 131 // 遍历表单元素下的tab4的class名称为form-control-static
... ... @@ -201,7 +175,6 @@ var FormWizard = function() {
201 175 // 显示返回按钮
202 176 $('#submit_station_form').find('.button-previous').show();
203 177 }
204   -
205 178 if (current == 2) {
206 179 var container = $("#stationbmap_basic");
207 180 container.children().remove();
... ... @@ -209,7 +182,7 @@ var FormWizard = function() {
209 182 setTimeout(function(){
210 183 StationPVmapWorlds.init();
211 184 var baseResValue = $('#submit_station_form input[name="baseRes"]:checked').val();
212   - var stationNameV = $('#statinoNamebooxtInput').val();
  185 + var stationNameV = $('#zdmcInput').val();
213 186 $('#stationNameInput').val(stationNameV);
214 187 if(baseResValue == 0) {
215 188 StationPVmapWorlds.localSearchFromAdreesToPoint(stationNameV+'公交车站',function(p) {
... ...
src/main/resources/static/pages/base/station/js/positionstation.js
... ... @@ -16,7 +16,8 @@ var PositionsStationObj = function () {
16 16 },
17 17 /** 设置新增站点集合对象站点名称属性值 @param:<name:站点名称) */
18 18 setEitdStationName : function(name) {
19   - station.stationName = name;
  19 + // station.stationName = name;
  20 + station.zdmc= name;
20 21 },
21 22 /** 设置新增站点集合对象站点中心点百度坐标属性值 @param:<bJwpoints:中心点百度坐标) */
22 23 setEitdStationBJwpoints : function(bJwpoints) {
... ...
src/main/resources/static/pages/base/station/js/station-list-table.js
... ... @@ -47,6 +47,7 @@
47 47 /** page : 当前页 initPag : */
48 48 var page = 0,initPag,storage = window.localStorage;
49 49 if(storage.xlName_AgursData!=null && storage.xlName_AgursData !='') {
  50 + $('.tipso-animation').children().remove();
50 51 // 延迟加载
51 52 setTimeout(function(){
52 53 $('.tipso-animation').tipso({
... ...
src/main/resources/static/pages/base/station/js/station-positions-function.js
... ... @@ -121,6 +121,8 @@ var PositionsPublicFunctions = function () {
121 121 // WGS坐标点图形集合
122 122 $('#bPolygonGridInput').val(stationObj.stationBPolyonGrid);
123 123 // 获取站点名称元素设值
  124 + $('#zdmcInput').val(stationObj.zdmc);
  125 + // 获取站点名称元素设值
124 126 $('#stationNameInput').val(stationObj.stationName);
125 127 // 获取站点编码元素设值
126 128 $('#stationCodInput').val(stationObj.stationCode);
... ...
src/main/resources/static/pages/base/station/list.html
... ... @@ -33,14 +33,16 @@
33 33 <tr role="row" class="heading">
34 34 <th width="3%">序号</th>
35 35 <th width="5%">线路编号</th>
36   - <th width="11%">线路名称</th>
  36 + <th width="8%">线路名称</th>
37 37 <th width="5%">线路方向</th>
38   - <th width="14%">站点路由名称</th>
39   - <th width="5%">站点编码</th>
  38 + <th width="8%">站点路由名称</th>
  39 + <th width="4%">站点编码</th>
40 40 <th width="4%">站点序号</th>
41   - <th width="6%">站点类型</th>
  41 + <th width="4%">站点类型</th>
  42 + <th width="6%">站点距离(km)</th>
  43 + <th width="6%">站点时长(min)</th>
42 44 <th width="4%">版本号</th>
43   - <th width="6%">是否撤销</th>
  45 + <th width="4%">是否撤销</th>
44 46 <th width="8%">操作</th>
45 47 </tr>
46 48 <tr role="row" class="filter">
... ... @@ -77,6 +79,12 @@
77 79 </select>
78 80 </td>
79 81 <td>
  82 + <input type="text" class="form-control form-filter input-sm" name="distances_eq">
  83 + </td>
  84 + <td>
  85 + <input type="text" class="form-control form-filter input-sm" name="toTime_eq">
  86 + </td>
  87 + <td>
80 88 <input type="text" class="form-control form-filter input-sm" name="versions_eq">
81 89 </td>
82 90 <td>
... ... @@ -145,6 +153,12 @@
145 153 {{/if}}
146 154 </td>
147 155 <td>
  156 + {{obj.distances}}
  157 + </td>
  158 + <td>
  159 + {{obj.toTime}}
  160 + </td>
  161 + <td>
148 162 {{obj.versions}}
149 163 </td>
150 164 <td>
... ... @@ -161,7 +175,7 @@
161 175 {{/each}}
162 176 {{if list.length == 0}}
163 177 <tr>
164   - <td colspan=11><h6 class="muted">没有找到相关数据</h6></td>
  178 + <td colspan=13><h6 class="muted">没有找到相关数据</h6></td>
165 179 </tr>
166 180 {{/if}}
167 181 </script>
... ...
src/main/resources/static/pages/base/stationroute/add.html
1 1 <!-- 新增站点 -->
2 2 <div class="modal fade" id="add_station_mobal" tabindex="-1" role="basic" aria-hidden="true">
3   -
4 3 <div class="modal-dialog">
5   -
6 4 <div class="modal-content">
7   -
8 5 <div class="modal-header">
9 6 <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
10 7 <h4 class="modal-title">新增站点</h4>
11 8 </div>
12   -
13 9 <div class="modal-body">
14   -
15 10 <form class="form-horizontal" role="form" id="add_station_form" action="/module" method="post">
16   -
17 11 <div class="alert alert-danger display-hide"> <button class="close" data-close="alert"></button>
18 12 您的输入有误,请检查下面的输入项
19 13 </div>
20   -
21 14 <!-- 线路ID -->
22 15 <input type="hidden" name="lineId" id="lineIdInput" value="" />
23   -
24 16 <input type="hidden" name="bPolygonGrid" id="bPolygonGridInput" value="" />
25   -
26 17 <input type="hidden" name="gPolygonGrid" id="gPolygonGridInput" value="" />
27   -
28 18 <input type="hidden" name="gJwpoints" id="gJwpointsInput">
29   -
30 19 <input type="hidden" name="dbType" id="dbTypeInput" value="b"/>
31   -
32 20 <input type="hidden" name="x" id="xInput" value=""/>
33   -
34 21 <input type="hidden" name="y" id="yInput" value=""/>
35   -
36 22 <!-- 站点名称 -->
37 23 <div class="form-body">
38 24 <div class="form-group">
39 25 <label class="control-label col-md-3">
40   - <span class="required"> * </span> 站点名称
  26 + <span class="required"> * </span> 站点名称&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
41 27 </label>
42 28 <div class="col-md-6">
43   - <input type="text" class="form-control" name="stationName" id="stationNameInput" placeholder="站点名称">
  29 + <input type="text" class="form-control" name="zdmc" id="zdmcInput" placeholder="站点名称" readonly="readonly">
44 30 </div>
45 31 </div>
46 32 </div>
47   -
48   - <!-- 站点编码 -->
  33 + <!-- 站点路由名称 -->
49 34 <div class="form-body">
50 35 <div class="form-group">
51 36 <label class="control-label col-md-3">
52   - <span class="required"> * </span>站点编码:
  37 + <span class="required"> * </span> 站点路由名称:
53 38 </label>
54 39 <div class="col-md-6">
55   - <input type="text" class="form-control" name="stationCod" id="stationCodInput">
  40 + <input type="text" class="form-control" name="stationName" id="stationNameInput" placeholder="站点路由名称">
56 41 </div>
57 42 </div>
58 43 </div>
59   -
60   - <!-- 站点序号 -->
  44 + <!-- 站点编码 -->
61 45 <div class="form-body">
62 46 <div class="form-group">
63 47 <label class="control-label col-md-3">
64   - <span class="required"> * </span>站点序号:
  48 + <span class="required"> * </span>站点编码&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
65 49 </label>
66 50 <div class="col-md-6">
67   - <select name="stationRouteCode" class="form-control" id="stationrouteSelect"></select>
68   - <span class="help-block"> *说明:选择的站点将作为本站序号的参考,成为选择站点的下一站。 </span>
  51 + <input type="text" class="form-control" name="stationCod" id="stationCodInput" readonly="readonly">
69 52 </div>
70 53 </div>
71 54 </div>
72   -
73   - <!-- 站点类型 -->
  55 + <!-- 站点方向 -->
74 56 <div class="form-body">
75 57 <div class="form-group">
76 58 <label class="control-label col-md-3">
77   - <span class="required"> * </span>站点类型:
  59 + <span class="required"> * </span>站点方向&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
78 60 </label>
79 61 <div class="col-md-6">
80   - <select name="stationMark" class="form-control" id="stationMarkSelect">
  62 + <select name="directions" class="form-control" id="stationdirSelect">
81 63 <option value="">-- 请选择站点类型 --</option>
82   - <option value="B">起点站</option>
83   - <option value="Z">中途站</option>
84   - <option value="E">终点站</option>
85   - <option value="T">停车场</option>
  64 + <option value="0">上行</option>
  65 + <option value="1">下行</option>
86 66 </select>
87 67 </div>
88 68 </div>
89 69 </div>
90 70  
91   - <!-- 站点方向 -->
  71 + <!-- 站点序号 -->
92 72 <div class="form-body">
93 73 <div class="form-group">
94 74 <label class="control-label col-md-3">
95   - <span class="required"> * </span>站点方向:
  75 + <span class="required"> * </span>站点序号&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
96 76 </label>
97 77 <div class="col-md-6">
98   - <select name="directions" class="form-control" id="stationdirSelect">
99   - <option value="">-- 请选择站点类型 --</option>
100   - <option value="0">上行</option>
101   - <option value="1">下行</option>
102   - </select>
  78 + <select name="stationRouteCode" class="form-control" id="stationrouteSelect" style="width:100%"></select>
  79 + <span class="help-block">说明:选择的站点将作为本站序号的参考,成为选择站点的下一站。 </span>
103 80 </div>
104 81 </div>
105 82 </div>
106 83  
107   - <!-- 道路编码-->
  84 + <!-- 站点类型 -->
108 85 <div class="form-body">
109 86 <div class="form-group">
110   - <label class="control-label col-md-3">道路编码:</label>
  87 + <label class="control-label col-md-3">
  88 + <span class="required"> * </span>站点类型&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
  89 + </label>
111 90 <div class="col-md-6">
112   - <input type="text" class="form-control" name="roadCoding" id="roadCodingCodInput">
  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>
113 98 </div>
114 99 </div>
115 100 </div>
116   -
117 101 <!-- 中心位置坐标点 -->
118 102 <div class="form-body">
119 103 <div class="form-group">
120   - <label class="col-md-3 control-label">经纬度坐标点:</label>
  104 + <label class="col-md-3 control-label"><span class="required"> * </span>经纬度坐标点:</label>
121 105 <div class="col-md-6">
122 106 <input type="text" class="form-control" name="bJwpoints" id="bJwpointsInput">
123 107 </div>
124 108 </div>
125 109 </div>
126   -
127   - <!-- 站点WGS经纬度 -->
128   - <!-- <div class="form-body">
  110 + <!-- 几何图形类型 -->
  111 + <div class="form-body">
129 112 <div class="form-group">
130   - <label class="col-md-3 control-label">站点WGS经纬度:</label>
  113 + <label class="col-md-3 control-label"><span class="required"> * </span>几何图形类型:</label>
131 114 <div class="col-md-6">
132   - <input type="text" class="form-control" name="gJwpoints" id="gJwpointsInput">
  115 + <input type="text" class="form-control" name="shapesType" id="shapesTypeSelect" placeholder="几何图形类型" readonly="readonly">
133 116 </div>
134 117 </div>
135   - </div> -->
136   -
137   - <!-- 范围图形类型 -->
  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>圆形半径&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</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 + <!-- 是否撤销 -->
138 129 <div class="form-body">
139 130 <div class="form-group">
140   - <label class="col-md-3 control-label">范围图形类型:</label>
  131 + <label class="col-md-3 control-label"><span class="required"> * </span>是否撤销&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
141 132 <div class="col-md-6">
142   - <select name="shapesType" class="form-control" id="shapesTypeSelect">
143   - <option value="">-- 请选择站点类型 --</option>
144   - <option value="r">圆形</option>
145   - <option value="d">多变形</option>
  133 + <select name="destroy" class="form-control" id="destroySelect">
  134 + <option value="">-- 请选择撤销类型 --</option>
  135 + <option value="0">否</option>
  136 + <option value="1">是</option>
146 137 </select>
147 138 </div>
148 139 </div>
149 140 </div>
150 141  
151   - <!-- 范围图形类型 -->
  142 + <!-- 道路编码-->
152 143 <div class="form-body">
153 144 <div class="form-group">
154   - <label class="col-md-3 control-label">圆形半径:</label>
  145 + <label class="control-label col-md-3">道路编码&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
155 146 <div class="col-md-6">
156   - <input type="text" class="form-control" name=radius id="radiusInput">
157   - <!-- <select name="radius" class="form-control" id="radiusSelect">
158   - <option value="">-- 请选择圆形半径 --</option>
159   - <option value="50">50</option>
160   - <option value="100">100</option>
161   - <option value="150">150</option>
162   - <option value="200">200</option>
163   - <option value="250">250</option>
164   - <option value="300">300</option>
165   - <option value="350">350</option>
166   - <option value="400">400</option>
167   - <option value="450">450</option>
168   - </select> -->
  147 + <input type="text" class="form-control" name="roadCoding" id="roadCodingCodInput">
169 148 </div>
170 149 </div>
171 150 </div>
172   -
173 151 <!-- 到站时间 -->
174 152 <div class="form-body">
175 153 <div class="form-group">
176   - <label class="col-md-3 control-label">到站时间</label>
  154 + <label class="col-md-3 control-label">到站时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
177 155 <div class="col-md-6">
178 156 <input type="text" class="form-control" name="toTime" id="toTimeInput" >
179   - <span class="help-block">单位:分钟</span>
  157 + <span class="help-block">单位:分钟(min)</span>
180 158 </div>
181 159 </div>
182 160 </div>
183   -
184 161 <!-- 到站距离 -->
185 162 <div class="form-body">
186 163 <div class="form-group">
187   - <label class="col-md-3 control-label">到站距离</label>
  164 + <label class="col-md-3 control-label">到站距离&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
188 165 <div class="col-md-6">
189 166 <input type="text" class="form-control" name="distances" id="distancesInput" >
190   - <span class="help-block">单位:公里</span>
  167 + <span class="help-block">单位:公里(km)</span>
191 168 </div>
192 169 </div>
193 170 </div>
194   -
195 171 <!-- 版本号 -->
196 172 <div class="form-body">
197 173 <div class="form-group">
198   - <label class="col-md-3 control-label">版本号</label>
  174 + <label class="col-md-3 control-label">版本号&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
199 175 <div class="col-md-6">
200 176 <input type="text" class="form-control" name="versions" value='1' Readonly>
201 177 </div>
202 178 </div>
203 179 </div>
204 180  
205   - <!-- 范围图形类型 -->
206   - <div class="form-body">
207   - <div class="form-group">
208   - <label class="col-md-3 control-label">是否撤销:</label>
209   - <div class="col-md-6">
210   - <select name="destroy" class="form-control" id="destroySelect">
211   - <option value="">-- 请选择撤销类型 --</option>
212   - <option value="0">否</option>
213   - <option value="1">是</option>
214   - </select>
215   - </div>
216   - </div>
217   - </div>
218   -
219 181 <!-- 描述/说明 -->
220 182 <div class="form-group">
221   - <label class="control-label col-md-3"> 描述/说明 </label>
  183 + <label class="control-label col-md-3"> 描述/说明&nbsp;&nbsp;&nbsp;: </label>
222 184 <div class="col-md-6">
223 185 <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea>
224 186 </div>
... ... @@ -233,285 +195,193 @@
233 195 </div>
234 196 </div>
235 197 <script type="text/javascript">
236   -
237 198 $('#add_station_mobal').on('AddStationMobal.show', function(e, addMap,ajaxd,staobj,lineObj,fun){
238   -
239 199 var Station = staobj.getAddStation();
240   -
241 200 var Line = lineObj.getLineObj();
242   -
243 201 // 延迟加载
244 202 setTimeout(function(){
245   -
246 203 // 显示mobal
247 204 $('#add_station_mobal').modal({show : true,backdrop: 'static', keyboard: false});
248   -
249 205 },200);
250   -
251 206 // 当调用 hide 实例方法时触发
252 207 $('#add_station_mobal').on('hide.bs.modal', function () {
253   -
254 208 closeMobleSetClean();
255   -
256 209 });
257   -
258 210 // 当模态框对用户可见时触发(将等待 CSS 过渡效果完成)。
259 211 $('#add_station_mobal').on('show.bs.modal', function () {
260   -
261   - // 线路ID
262   - $('#lineIdInput').val(Line.id);
263   -
264   - // 获取站点名称元素设值
265   - $('#stationNameInput').val(Station.stationNamebootbox).attr('Readonly','Readonly');
266   -
267   - // 获取方向元素,并添加值
268   - $('#stationdirSelect').val(Station.dir).attr('Readonly','Readonly');
269   -
270   - // 百度地图经纬度坐标中心点
271   - $('#bJwpointsInput').val(Station.bJwpoints).attr('Readonly','Readonly');
272   -
273   - // 百度坐标点图形集合
274   - $('#bPolygonGridInput').val(Station.bPolygonGrid);
275   -
276   - // 获取图形类型元素,并添加值
277   - $('#shapesTypeSelect').val(Station.shapesType).attr('Readonly','Readonly');
278   -
279   - // 获取圆形半径元素,并添加值
280   - $('#radiusInput').val(Station.radius).attr('Readonly','Readonly');
281   -
282   - // 是否撤销
283   - $('#destroySelect').val(0).attr('Readonly','Readonly');
284   -
285   - // 获取站点序号元素,并添加下拉属性值
286   - ajaxd.getStation(Line.id,Station.dir,function(treeData) {
287   -
288   - var options = '<option value="">请选择...</option>';
289   -
290   - var dArray = treeData[0].children[0].children;
291   -
292   - for(var i = 0 ; i<dArray.length; i++){
293   -
294   - options += '<option value="'+dArray[i].stationRouteStationRouteCode+ '_'+ dArray[i].stationRouteStationMark+'">'+dArray[i].stationRouteStationName+'</option>'
295   -
296   - }
297   -
298   - $('#stationrouteSelect').html(options);
299   -
300   - });
301   -
302 212 // 获取站点编码元素,添加站点编码值
303 213 ajaxd.getStationCode(function(stationCode) {
304   -
  214 + // 线路ID.
  215 + $('#lineIdInput').val(Line.id);
  216 + // 获取站点名称元素设值.
  217 + $('#zdmcInput').val(Station.stationNamebootbox);
  218 + // 获取站点路由名称元素设值.
  219 + $('#stationNameInput').val(Station.stationNamebootbox);
  220 + // 站点编码.
305 221 $('#stationCodInput').val(stationCode).attr('Readonly','Readonly');
306   -
  222 + // 获取方向元素,并添加值.
  223 + $('#stationdirSelect').val(Station.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 + var initzdlyP = {'line.id_eq':Line.id,'destroy_eq':0,'directions_eq':Station.dir};
  240 + initSelect(initzdlyP);
307 241 });
308   -
309 242 });
310   -
311 243 // 站点序号值改变事件
312 244 $('#stationrouteSelect').on('change',function() {
313   -
314 245 var stationRValue = $('#stationrouteSelect').val();
315   -
316 246 if(stationRValue) {
317   -
318 247 var tempStr = stationRValue.split('_');
319   -
320 248 if(tempStr[1] == 'E') {
321   -
322 249 $('#stationMarkSelect').val('E');
323   -
324 250 }else {
325   -
326 251 $('#stationMarkSelect').val('Z');
327   -
328 252 }
329   -
330 253 }
331   -
332 254 });
333   -
334 255 // 获取表单元素
335 256 var form = $('#add_station_form');
336   -
337 257 // 获取错误提示信息元素
338 258 var error = $('.alert-danger', form);
339   -
340 259 //提交
341 260 $('#addStationButton').on('click', function() {
342   -
343 261 // 表单提交
344 262 form.submit();
345   -
346 263 });
347   -
348 264 // 表单验证
349 265 form.validate({
350   -
351 266 errorElement : 'span',
352   -
353 267 errorClass : 'help-block help-block-error',
354   -
355 268 focusInvalid : true,
356   -
357 269 rules : {
358   -
359   - // 站点名称
360   - 'stationName' : {
361   -
362   - // 必填项
363   - required : true
364   -
365   - },
366   -
367   - // 站点类型
368   - 'stationMark' : {
369   -
370   - // 必填项
371   - required : true
372   -
373   - },
374   -
375   - // 站点序号
376   - 'stationRouteCode' : {
377   -
378   - // 必填项
379   - required : true,
380   -
381   - },
382   -
383   - // 站点编码
384   - 'stationCod': {
385   -
386   - // 必填项
387   - required : true,
388   -
389   - // 必须输入合法的数字(负数,小数)。
390   - number : true
391   -
392   - },
393   -
394   - // 站点方向
395   - 'directions' : {
396   -
397   - // 必填项
398   - required : true,
399   -
400   - },
401   -
402   - // 到站距离
403   - 'distances' : {
404   -
405   - // 必须输入合法的数字(负数,小数)。
406   - number : true
407   -
408   - },
409   -
410   - // 到站时间
411   - 'toTime' : {
412   -
413   - // 必须输入合法的数字(负数,小数)。
414   - number : true
415   -
416   - },
417   -
418   - // 描述与说明
419   - 'descriptions' : {
420   -
421   - // 最大长度
422   - maxlength: 150
423   -
424   - }
  270 + 'stationName' : {required : true,maxlength : 50,},// 站点名称 必填项
  271 + 'stationCod': {required : true,},// 站点编码 必填项 必须输入合法的数字(负数,小数)。
  272 + 'directions' : {required : true,dirIs : true},// 站点方向 必填项 必填项
  273 + 'stationRouteCode' : {isStart : true},// 站点序号
  274 + 'stationMark' : {required : true,},// 站点类型 必填项.
  275 + 'bJwpoints' : {required : true,},// 经纬度坐标点 必填项.
  276 + 'shapesType' : {required : true,},// 几何图形类型 必填项.
  277 + 'radius' : {required : true,},// 几何图形类型 必填项.
  278 + 'destroy' : {required : true,},// 是否撤销 必填项.
  279 + 'toTime' : {number : true},// 到站时间 必须输入合法的数字(负数,小数)。
  280 + 'distances' : {number : true},// 到站距离 必须输入合法的数字(负数,小数)。
  281 + 'descriptions' : {maxlength: 150}// 描述与说明 // 描述与说明
425 282  
426 283 },
427 284 invalidHandler : function(event, validator) {
428   -
429 285 error.show();
430   -
431 286 App.scrollTo(error, -200);
432   -
433 287 },
434   -
435 288 highlight : function(element) {
436   -
437 289 $(element).closest('.form-group').addClass('has-error');
438   -
439 290 },
440   -
441 291 unhighlight : function(element) {
442   -
443 292 $(element).closest('.form-group').removeClass('has-error');
444   -
445 293 },
446   -
447 294 success : function(label) {
448   -
449 295 label.closest('.form-group').removeClass('has-error');
450   -
451 296 },
452   -
453 297 submitHandler : function(f) {
454   -
455 298 var params = form.serializeJSON();
456   -
457 299 error.hide();
458   -
  300 + if(params.shapesType=='圆形')
  301 + params.shapesType='r';
  302 + else if(params.shapesType=='多边形')
  303 + params.shapesType='d';
  304 + if(params.stationRouteCode=='请选择...')
  305 + params.stationRouteCode='';
459 306 // 保存
460 307 ajaxd.stationSave(params,function(data) {
461   -
462 308 if(data.status=='SUCCESS') {
463   -
464 309 // 弹出添加成功提示消息
465 310 layer.msg('添加成功...');
466   -
467 311 }else {
468   -
469 312 // 弹出添加失败提示消息
470 313 layer.msg('添加失败...');
471   -
472 314 }
473   -
474 315 var id =Line.id;
475   -
476 316 var dir = params.directions
477   -
478 317 // 刷行左边树
479 318 fun.resjtreeDate(id,dir);
480   -
481 319 closeMobleSetClean();
482   -
483 320 // 隐藏moble
484 321 hideMoble();
485   -
486   -
487 322 });
488 323 }
489 324 });
490   -
  325 + function initSelect(p){
  326 + ajaxd.getzdlyInfo(p,function(array) {
  327 + // 定义路段路由长度、渲染拼音检索下拉框格式数据.
  328 + var len_ = array.length,paramsD = new Array();
  329 + if(len_>0) {
  330 + paramsD.push({'id':'请选择...','text':'请选择...'});
  331 + // 遍历.
  332 + $.each(array, function(i, g){
  333 + // 判断.
  334 + if(g.name!='' || g.name != null) {
  335 + // 添加拼音检索下拉框格式数据数组.
  336 + paramsD.push({'id':g.stationRouteCode + '_' + g.stationMark + '_' + g.directions,
  337 + 'text':g.stationName + ' (' + g.stationRouteCode + ')' + ' --' + fun.dirdmToName(g.directions)});
  338 + }
  339 + });
  340 + $('#stationrouteSelect').empty();
  341 + // 初始化上一个路段拼音检索下拉框.
  342 + initPinYinSelect2($('#stationrouteSelect'),paramsD,function(selector) {
  343 + });
  344 + }
  345 + });
  346 + }
491 347 function closeMobleSetClean() {
492   -
493 348 // 清除地图覆盖物
494 349 addMap.clearMarkAndOverlays();
495   -
496 350 /** 设置新增站点集合对象为空 */
497 351 staobj.setAddStation({});
498   -
499 352 var add_direction_v = $('#stationdirSelect').val();
500   -
501 353 ajaxd.getSectionRouteInfo(Line.id,add_direction_v,function(data) {
502   -
503 354 fun.linePanlThree(Line.id,data,add_direction_v);
504   -
505 355 });
506   -
507 356 }
508   -
509 357 function hideMoble() {
510   -
511 358 // 隐藏mobal
512 359 $('#add_station_mobal').modal('hide');
513   -
514 360 }
515   -
  361 + // 当站点类型为中途站或者终点站时,上一站点为必填项!
  362 + $.validator.addMethod("isStart", function(value,element) {
  363 + var tel = false;
  364 + var stationMarkV = $('#stationMarkSelect').val();
  365 + var stationrouteSelectV = $('#stationrouteSelect').val();
  366 + if(stationMarkV =='B'){
  367 + tel = true;
  368 + return tel;
  369 + }else if(stationMarkV =='Z' || stationMarkV =='E'){
  370 + if(stationrouteSelectV!='' && stationrouteSelectV!='请选择...' && stationrouteSelectV!=null){
  371 + tel = true;
  372 + return tel;
  373 + }
  374 + }
  375 + return tel;
  376 + }, '当站点类型为中途站或者终点站时,上一站点为必填项!');
  377 + // 方向
  378 + $.validator.addMethod("dirIs", function(value,element) {
  379 + var tel = true;
  380 + var stationMarkV = $('#stationdirSelect').val();
  381 + if(stationMarkV!=Station.dir){
  382 + tel = false;
  383 + }
  384 + return tel;
  385 + }, '方向必须一致!');
516 386 });
517 387 </script>
518 388 \ No newline at end of file
... ...
src/main/resources/static/pages/base/stationroute/add_select.html
1 1 <!-- 选择站点新增方式 -->
2 2 <div class="modal fade" id="add_select_mobal" tabindex="-1" role="basic" aria-hidden="true">
3   -
4 3 <div class="modal-dialog">
5   -
6 4 <div class="modal-content">
7   -
8 5 <div class="modal-header">
9 6 <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
10   - <h4 class="modal-title">站点新增方式</h4>
  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>
11 10 </div>
12   -
13 11 <div class="modal-body">
14   -
15 12 <form class="form-horizontal" action="/" method="post" id="formBootbox" role="form">
16   -
17 13 <div class="alert alert-danger display-hide" id="requiredname">
18 14 <button class="close" data-close="alert"></button>
19 15 站点名称为必填项
20 16 </div>
21   -
22 17 <!-- 站点名称 -->
23 18 <div class="form-group" id="formRequ">
24 19 <label class="col-md-3 control-label"><span class="required"> * </span>站点名称:</label>
... ... @@ -26,33 +21,20 @@
26 21 <input type="text" class="form-control input-medium" id="stationNamebootboxInput" name="stationNamebootbox">
27 22 </div>
28 23 </div>
29   -
30 24 <!-- 新增方式 -->
31 25 <div class="form-group">
32 26 <label class="col-md-3 control-label">新增方式:</label>
33 27 <div class="col-md-9">
34 28 <div class="icheck-list">
35 29 <label>
36   - <input type="radio" class="icheck" name="baseRes" value=0 checked> 系统生成
  30 + <input type="radio" class="icheck" name="baseRes" value=0 checked> 系统生成
37 31 </label>
38 32 <label >
39 33 <input type="radio" class="icheck" name="baseRes" value=1 > 手动添加
40 34 </label>
41   - <!-- <label>
42   - <input type="radio" class="icheck" name="baseRes" value=2> 系统引用
43   - </label> -->
44 35 </div>
45 36 </div>
46 37 </div>
47   -
48   - <div class="form-group">
49   - <div class="alert alert-info font-blue-chambray" style="background-color: #2C3E50">
50   - <h5 class="block"><span class="help-block" style="color:#1bbc9b;"> * 新增方式说明: </span></h5>
51   - <p><span class="help-block" style="color:#1bbc9b;"> a)系统生成:根据站点名称自动生成以150米为半径范围的圆.</span> </p>
52   - <p><span class="help-block" style="color:#1bbc9b;"> b)手动添加:手动在地图上画出站点范围,然后双击鼠标右键保存.</span> </p>
53   - <!-- <p><span class="help-block" style="color:#1bbc9b;"> c)选择引用:从系统中选择已有的站点进行引用.</span> </p> -->
54   - </div>
55   - </div>
56 38 </form>
57 39 </div>
58 40 <div class="modal-footer">
... ... @@ -63,191 +45,124 @@
63 45 </div>
64 46 </div>
65 47 <script type="text/javascript">
66   -
67 48 $('#add_select_mobal').on('AddSelectMobal.show', function(e,map_,drw,ajaxd_,stationObj,lineObj,fun){
68   -
69 49 // 加载显示mobal
70 50 $('#add_select_mobal').modal({show : true,backdrop: 'static', keyboard: false});
71   -
  51 + $('.tipso-animation').tipso({
  52 + speed : 100,
  53 + background : '#0ed0e8',
  54 + color : '#ffffff',
  55 + position :'right',
  56 + width : 380,
  57 + delay : 400,
  58 + animationIn : 'bounceIn',
  59 + animationOut : 'bounceOut',
  60 + offsetX : -485,
  61 + offsetY : -25,
  62 + content :'<span style="display:block; float:left;font-size:x-small;line-height:10px">A)系统生成:根据站点名称自动生成以150米为半径范围的圆.</span></br>'+
  63 + '<span style="display:block; float:left;font-size:x-small">B)手动添加:手动在地图上画出站点范围,然后双击鼠标右键保存.</span>',
  64 +
  65 + });
  66 + setTimeout(function(){
  67 + $('.tipso-animation').tipso('show');
  68 + setTimeout(function(){$('.tipso-animation').tipso('hide');},4000);
  69 + },500);
72 70 // 站点名称改变事件
73 71 $('#stationNamebootboxInput').on('change',function() {
74   -
75 72 // 获取站点名称
76 73 var stationNamebootbox = $('#stationNamebootboxInput').val();
77   -
78 74 /** 根据站点名称获取坐标在地图上标注 @param :<stationNamebootbox:站点名称> */
79 75 map_.localtionPoint(stationNamebootbox);
80   -
81 76 });
82   -
83 77 // 获取表单元素
84 78 var form = $('#formBootbox');
85   -
86 79 // 错误提示元素
87 80 var requiredname = $('#requiredname', form);
88   -
89 81 // 下一步点击事件
90 82 $('#addSelectnextButton').on('click', function() {
91   -
92 83 // 表单提交
93 84 form.submit();
94   -
95 85 });
96   -
97 86 // 表单验证
98 87 form.validate({
99   -
100 88 errorElement : 'span',
101   -
102 89 errorClass : 'help-block help-block-error',
103   -
104 90 focusInvalid : false,
105   -
106 91 rules : {
107   -
108   - 'stationNamebootbox' : {
109   -
110   - minlength : 2,
111   -
112   - required : true,
113   -
114   - maxlength : 10
115   -
116   - }
117   -
  92 + 'stationNamebootbox' : {required : true,maxlength : 50}// 必填项 最大长度为50
118 93 },
119   -
120 94 invalidHandler : function(event, validator) {
121   -
122 95 requiredname.show();
123   -
124 96 App.scrollTo(requiredname, -200);
125   -
126 97 },
127   -
128 98 highlight : function(element) {
129   -
130 99 $(element).closest('.form-group').addClass('has-error');
131   -
132 100 },
133   -
134 101 unhighlight : function(element) {
135   -
136 102 $(element).closest('.form-group').removeClass('has-error');
137   -
138 103 },
139   -
140 104 success : function(label) {
141   -
142 105 label.closest('.form-group').removeClass('has-error');
143   -
144 106 },
145   -
146 107 submitHandler : function(f) {
147   -
148 108 // 隐藏错误提示
149 109 requiredname.hide();
150   -
151 110 // 表单序列化
152 111 var params = form.serializeJSON();
153   -
154 112 var stationName = params.stationNamebootbox
155   -
156 113 // 获取新增站点方式
157 114 var baseRes = params.baseRes;
158   -
  115 + /** 设置新增站点对象站点名称属性值 @param:<stationName:站点名称)> */
  116 + stationObj.setAddStationName(stationName);
  117 + // 系统生成
  118 + if(baseRes == 0) {
  119 + /** 根据站点位置获取坐标 @parma:<stationName:站点名称;callback:返回函数> */
  120 + map_.localSearchFromAdreesToPoint(stationName,function(Points) {
  121 + if(Points) {
  122 + /** 设置新增站点集合对象站点中心点百度坐标属性值 @param:<bJwpoints:中心点百度坐标) */
  123 + stationObj.setAddStationBJwpoints(Points);
  124 + /** 设置新增站点集合对象范围图形类型属性值 @param:<shapesType:范围图形类型) */
  125 + stationObj.setAddStationShapesType('r');
  126 + /** 设置新增站点集合对象圆形半径属性值 @param:<radius:圆形半径) */
  127 + stationObj.setAddStationRadius(100);
  128 + /** 设置新增站点集合对象图形百度坐标集合属性值 @param:<bPolygonGrid:图形百度坐标集合) */
  129 + stationObj.setBPolygonGrid('');
  130 + // 以藏站点新增方式mobal
  131 + $('#add_select_mobal').modal('hide');
  132 + // 加载add页面
  133 + $.get('add.html', function(m){
  134 + $(pjaxContainer).append(m);
  135 + var Station = stationObj.getAddStation();
  136 + $('#add_station_mobal').trigger('AddStationMobal.show', [map_,ajaxd_,stationObj,lineObj,fun]);
  137 + });
  138 + }else {
  139 + // 返回坐标为空
  140 + layer.confirm('【系统无法生成,请选择其他方式新增】', {btn : [ '返回' ],icon: 3, title:'提示' }, function(index){
  141 + layer.close(index);
  142 + });
  143 + }
  144 + });
  145 + }else if(baseRes==1) {
  146 + map_.clearMarkAndOverlays();
  147 + // 以藏站点新增方式mobal
  148 + $('#add_select_mobal').modal('hide');
  149 + // 打开绘制工具
  150 + drw.openDrawingManager();
  151 + map_.localtionPoint(stationName);
  152 + }
159 153 // 查询是否存在输入的站点名称
160   - ajaxd_.getLikeStationName(stationName,function(data) {
161   -
  154 + /* ajaxd_.getLikeStationName(stationName,function(data) {
162 155 // 验证系统是存在该站点名称
163 156 var tempblm = fun.isHaveStationName(data);
164   -
165 157 if(tempblm) {
166 158  
167   - /** 设置新增站点对象站点名称属性值 @param:<stationName:站点名称)> */
168   - stationObj.setAddStationName(stationName);
169   -
170   - // 系统生成
171   - if(baseRes == 0) {
172   -
173   - /** 根据站点位置获取坐标 @parma:<stationName:站点名称;callback:返回函数> */
174   - map_.localSearchFromAdreesToPoint(stationName,function(Points) {
175   -
176   - if(Points) {
177   -
178   - /** 设置新增站点集合对象站点中心点百度坐标属性值 @param:<bJwpoints:中心点百度坐标) */
179   - stationObj.setAddStationBJwpoints(Points);
180   -
181   - /** 设置新增站点集合对象范围图形类型属性值 @param:<shapesType:范围图形类型) */
182   - stationObj.setAddStationShapesType('r');
183   -
184   - /** 设置新增站点集合对象圆形半径属性值 @param:<radius:圆形半径) */
185   - stationObj.setAddStationRadius(100);
186   -
187   - /** 设置新增站点集合对象图形百度坐标集合属性值 @param:<bPolygonGrid:图形百度坐标集合) */
188   - stationObj.setBPolygonGrid('');
189   -
190   - // 以藏站点新增方式mobal
191   - $('#add_select_mobal').modal('hide');
192   -
193   - // 加载add页面
194   - $.get('add.html', function(m){
195   -
196   - $(pjaxContainer).append(m);
197   -
198   - var Station = stationObj.getAddStation();
199   -
200   - $('#add_station_mobal').trigger('AddStationMobal.show', [map_,ajaxd_,stationObj,lineObj,fun]);
201   -
202   - });
203   -
204   - }else {
205   -
206   - // 返回坐标为空
207   - layer.confirm('【系统无法生成,请选择其他方式新增】', {btn : [ '返回' ],icon: 3, title:'提示' }, function(index){
208   -
209   - layer.close(index);
210   -
211   - });
212   -
213   - }
214   -
215   - });
216   -
217   - }else if(baseRes==1) {
218   -
219   - map_.clearMarkAndOverlays();
220   -
221   - // 以藏站点新增方式mobal
222   - $('#add_select_mobal').modal('hide');
223   -
224   - // 打开绘制工具
225   - drw.openDrawingManager();
226   -
227   - map_.localtionPoint(stationName);
228   -
229   - }else if(baseRes==2) {
230   -
231   - // 系统引用
232   -
233   - $('#add_select_mobal').modal('hide');
234   -
235   - $.get('station_tabledate.html', function(m){$(pjaxContainer).append(m);});
236   -
237   - }
238   -
239 159 }else {
240   -
241 160 // 返回坐标为空
242 161 layer.confirm('系统已存在【'+ stationName+'】站名!<br/>请选择:<br/>&nbsp;系统引用或者修改站点名进行新增.', {btn : [ '返回' ],icon: 3, title:'提示' }, function(index){
243   -
244 162 layer.close(index);
245   -
246 163 });
247   -
248 164 }
249   -
250   - });
  165 + }); */
251 166 }
252 167 });
253 168 });
... ...
src/main/resources/static/pages/base/stationroute/edit.html
1 1 <!-- 编辑站点 -->
2 2 <div class="modal fade" id="edit_station_mobal" tabindex="-1" role="basic" aria-hidden="true">
3   -
4 3 <div class="modal-dialog">
5   -
6 4 <div class="modal-content">
7   -
8 5 <div class="modal-header">
9 6 <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
10 7 <h4 class="modal-title">编辑站点</h4>
11 8 </div>
12   -
13 9 <div class="modal-body">
14   -
15 10 <form class="form-horizontal" role="form" id="edit_station_form" action="/module" method="post">
16   -
17 11 <div class="alert alert-danger display-hide"> <button class="close" data-close="alert"></button>
18 12 您的输入有误,请检查下面的输入项
19 13 </div>
20   -
21 14 <!-- 线路ID -->
22   -
23 15 <input type="hidden" name="stationId" id="stationIdInput">
24   -
25 16 <input type="hidden" name="stationRouteId" id="stationRouteIdInput">
26   -
27 17 <input type="hidden" name="stationRouteLine" id="stationRouteLineInput">
28   -
29 18 <input type="hidden" name="lineCode" id="lineCodeInput">
30   -
31 19 <input type="hidden" name="bPolygonGrid" id="bPolygonGridInput" />
32   -
33 20 <input type="hidden" name="gPolygonGrid" id="gPolygonGridInput" />
34   -
35 21 <input type="hidden" name="dbType" id="dbTypeInput" value="b"/>
36   -
37 22 <input type="hidden" name="x" id="xInput" value=""/>
38   -
39 23 <input type="hidden" name="y" id="yInput" value=""/>
40   -
41 24 <!-- 站点名称 -->
42 25 <div class="form-body">
43 26 <div class="form-group">
44 27 <label class="control-label col-md-3">
45   - <span class="required"> * </span> 站点名称
  28 + <span class="required"> * </span> 站点名称&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
46 29 </label>
47 30 <div class="col-md-6">
48   - <input type="text" class="form-control" name="stationName" id="stationNameInput" placeholder="站点名称">
  31 + <input type="text" class="form-control" name="zdmc" id="zdmcInput" placeholder="站点名称" readonly="readonly">
49 32 </div>
50 33 </div>
51 34 </div>
52   -
53   - <!-- 站点编码 -->
  35 + <!-- 站点路由名称 -->
54 36 <div class="form-body">
55 37 <div class="form-group">
56 38 <label class="control-label col-md-3">
57   - <span class="required"> * </span>站点编码:
  39 + <span class="required"> * </span> 站点路由名称:
58 40 </label>
59 41 <div class="col-md-6">
60   - <input type="text" class="form-control" name="stationCod" id="stationCodInput" placeholder="站点编码">
  42 + <input type="text" class="form-control" name="stationName" id="stationNameInput" placeholder="站点路由名称">
61 43 </div>
62 44 </div>
63 45 </div>
64   -
65   - <!-- 站点序号 -->
  46 + <!-- 站点编码 -->
66 47 <div class="form-body">
67 48 <div class="form-group">
68 49 <label class="control-label col-md-3">
69   - <span class="required"> * </span>上一站点:
  50 + <span class="required"> * </span> 站点编码&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
70 51 </label>
71 52 <div class="col-md-6">
72   - <select name="stationRouteCode" class="form-control" id="stationrouteSelect"></select>
73   - <span class="help-block"> *说明:选择的站点将作为本站序号的参考,成为选择站点的下一站。 </span>
  53 + <input type="text" class="form-control" name="stationCod" id="stationCodInput" placeholder="站点编码">
74 54 </div>
75 55 </div>
76 56 </div>
77   -
78   - <!-- 站点类型 -->
  57 + <!-- 站点方向 -->
79 58 <div class="form-body">
80 59 <div class="form-group">
81 60 <label class="control-label col-md-3">
82   - <span class="required"> * </span>站点类型:
  61 + <span class="required"> * </span>站点方向&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
83 62 </label>
84 63 <div class="col-md-6">
85   - <select name="stationMark" class="form-control" id="stationMarkSelect">
  64 + <select name="directions" class="form-control" id="stationdirSelect">
86 65 <option value="">-- 请选择站点类型 --</option>
87   - <option value="B">起点站</option>
88   - <option value="Z">中途站</option>
89   - <option value="E">终点站</option>
90   - <!-- <option value="T">停车场</option> -->
  66 + <option value="0">上行</option>
  67 + <option value="1">下行</option>
91 68 </select>
92 69 </div>
93 70 </div>
94 71 </div>
95   -
96   - <!-- 站点方向 -->
  72 + <!-- 站点序号 -->
97 73 <div class="form-body">
98 74 <div class="form-group">
99 75 <label class="control-label col-md-3">
100   - <span class="required"> * </span>站点方向:
  76 + 上一站点&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
101 77 </label>
102 78 <div class="col-md-6">
103   - <select name="directions" class="form-control" id="stationdirSelect">
  79 + <select name="stationRouteCode" class="form-control" id="stationrouteSelect" style="width:100%"></select>
  80 + <span class="help-block"> *说明:选择的站点将作为本站序号的参考,成为选择站点的下一站。 </span>
  81 + </div>
  82 + </div>
  83 + </div>
  84 + <!-- 站点类型 -->
  85 + <div class="form-body">
  86 + <div class="form-group">
  87 + <label class="control-label col-md-3">
  88 + <span class="required"> * </span>站点类型&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
  89 + </label>
  90 + <div class="col-md-6">
  91 + <select name="stationMark" class="form-control" id="stationMarkSelect">
104 92 <option value="">-- 请选择站点类型 --</option>
105   - <option value="0">上行</option>
106   - <option value="1">下行</option>
  93 + <option value="B">起点站</option>
  94 + <option value="Z">中途站</option>
  95 + <option value="E">终点站</option>
107 96 </select>
108 97 </div>
109 98 </div>
110 99 </div>
111   -
112   - <!-- 道路编码-->
  100 + <!-- 经纬度坐标点 -->
113 101 <div class="form-body">
114 102 <div class="form-group">
115   - <label class="control-label col-md-3">道路编码:</label>
  103 + <label class="col-md-3 control-label"> <span class="required"> * </span>经纬度坐标点:</label>
116 104 <div class="col-md-6">
117   - <input type="text" class="form-control" name="roadCoding" id="roadCodingCodInput" placeholder="道路编码">
  105 + <input type="text" class="form-control" name="bJwpoints" id="bJwpointsInput" placeholder="经纬度坐标点">
118 106 </div>
119 107 </div>
120 108 </div>
121   -
122   - <!-- 中心位置坐标点 -->
  109 + <!-- 几何图形类型 -->
123 110 <div class="form-body">
124 111 <div class="form-group">
125   - <label class="col-md-3 control-label">经纬度坐标点:</label>
  112 + <label class="col-md-3 control-label"><span class="required"> * </span>几何图形类型:</label>
126 113 <div class="col-md-6">
127   - <input type="text" class="form-control" name="bJwpoints" id="bJwpointsInput" placeholder="经纬度坐标点">
  114 + <input type="text" class="form-control" name="shapesType" id="shapesTypeSelect" placeholder="几何图形类型" readonly="readonly">
128 115 </div>
129 116 </div>
130 117 </div>
131   -
132   - <!-- 站点WGS经纬度 -->
133   - <!-- <div class="form-body">
  118 + <!-- 圆形半径 -->
  119 + <div class="form-body" id="radiusGroup">
134 120 <div class="form-group">
135   - <label class="col-md-3 control-label">站点WGS经纬度:</label>
  121 + <label class="col-md-3 control-label"><span class="required"> * </span>圆形半径&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
136 122 <div class="col-md-6">
137   - <input type="text" class="form-control" name="gJwpoints" id="gJwpointsInput" placeholder="站点WGS经纬度">
  123 + <input type="text" class="form-control" name="radius" id="radiusInput" placeholder="圆形半径">
138 124 </div>
139 125 </div>
140   - </div> -->
141   -
142   - <!-- 范围图形类型 -->
  126 + </div>
  127 + <!-- 是否撤销 -->
143 128 <div class="form-body">
144 129 <div class="form-group">
145   - <label class="col-md-3 control-label">范围图形类型:</label>
  130 + <label class="col-md-3 control-label"><span class="required"> * </span>是否撤销&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
146 131 <div class="col-md-6">
147   - <select name="shapesType" class="form-control" id="shapesTypeSelect">
148   - <option value="">-- 请选择站点类型 --</option>
149   - <option value="r">圆形</option>
150   - <option value="d">多变形</option>
  132 + <select name="destroy" class="form-control" id="destroySelect">
  133 + <option value="">-- 请选择撤销类型 --</option>
  134 + <option value="0">否</option>
  135 + <option value="1">是</option>
151 136 </select>
152 137 </div>
153 138 </div>
154 139 </div>
155   -
156   - <!-- 范围图形类型 -->
  140 + <!-- 道路编码-->
157 141 <div class="form-body">
158 142 <div class="form-group">
159   - <label class="col-md-3 control-label">圆形半径:</label>
  143 + <label class="control-label col-md-3">道路编码&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
160 144 <div class="col-md-6">
161   - <input type="text" class="form-control" name="radius" id="radiusInput" placeholder="圆形半径">
  145 + <input type="text" class="form-control" name="roadCoding" id="roadCodingCodInput" placeholder="道路编码">
162 146 </div>
163 147 </div>
164 148 </div>
165   -
166 149 <!-- 到站时间 -->
167 150 <div class="form-body">
168 151 <div class="form-group">
169   - <label class="col-md-3 control-label">到站时间</label>
  152 + <label class="col-md-3 control-label">到站时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
170 153 <div class="col-md-6">
171 154 <input type="text" class="form-control" name="toTime" id="toTimeInput" placeholder="到站时间">
172   - <span class="help-block">单位分钟</span>
  155 + <span class="help-block">单位:分钟</span>
173 156 </div>
174 157 </div>
175 158 </div>
176   -
177 159 <!-- 到站距离 -->
178 160 <div class="form-body">
179 161 <div class="form-group">
180   - <label class="col-md-3 control-label">到站距离</label>
  162 + <label class="col-md-3 control-label">到站距离&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
181 163 <div class="col-md-6">
182 164 <input type="text" class="form-control" name="distances" id="distancesInput" placeholder="到站距离">
183   - <span class="help-block">单位公里</span>
  165 + <span class="help-block">单位:公里</span>
184 166 </div>
185 167 </div>
186 168 </div>
187   -
188 169 <!-- 版本号 -->
189 170 <div class="form-body">
190 171 <div class="form-group">
191   - <label class="col-md-3 control-label">版本号</label>
  172 + <label class="col-md-3 control-label">版本号&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
192 173 <div class="col-md-6">
193 174 <input type="text" class="form-control" name="versions" value='1' Readonly>
194 175 </div>
195 176 </div>
196 177 </div>
197   -
198   - <!-- 范围图形类型 -->
199   - <div class="form-body">
200   - <div class="form-group">
201   - <label class="col-md-3 control-label">是否撤销:</label>
202   - <div class="col-md-6">
203   - <select name="destroy" class="form-control" id="destroySelect">
204   - <option value="">-- 请选择撤销类型 --</option>
205   - <option value="0">否</option>
206   - <option value="1">是</option>
207   - </select>
208   - </div>
209   - </div>
210   - </div>
211   -
212 178 <!-- 描述/说明 -->
213 179 <div class="form-group">
214   - <label class="control-label col-md-3"> 描述/说明 </label>
  180 + <label class="control-label col-md-3"> 描述/说明&nbsp;&nbsp;: </label>
215 181 <div class="col-md-6">
216 182 <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea>
217 183 </div>
... ... @@ -228,316 +194,171 @@
228 194 <script type="text/javascript">
229 195  
230 196 $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,station_,Line_,fun){
231   -
232 197 var editStationParmasObj = station_.getEitdStation();
233   -
234 198 var addLine = Line_.getLineObj();
235   -
236 199 fun.setFormValue(editStationParmasObj);
237   -
238   - var edit_direction_v = editStationParmasObj.stationRouteDirections;
239   -
240   - // 获取站点序号元素,并添加下拉属性值
241   - ajaxd.getStation(addLine.id,edit_direction_v,function(treeData) {
242   -
243   - var options = '<option value="">请选择...</option>';
244   -
245   - var dArray = treeData[0].children[0].children;
246   -
247   - var eq_stationRouteCode = editStationParmasObj.stationRouteStationRouteCode + '_' +editStationParmasObj.stationRouteStationMark;
248   -
249   - for(var i = 0 ; i<dArray.length; i++){
250   -
251   - var ptions_v = dArray[i].stationRouteStationRouteCode+ '_'+ dArray[i].stationRouteStationMark;
252   -
253   - // 排除本站
254   - if(eq_stationRouteCode == ptions_v){
255   -
256   - continue;
257   -
258   - }
259   -
260   - options += '<option value="'+ ptions_v +'">'+dArray[i].stationRouteStationName+'</option>'
261   -
262   - }
263   -
264   - $('#stationrouteSelect').html(options);
265   -
266   - ajaxd.findUpStationRouteCode(addLine.id,edit_direction_v,editStationParmasObj.stationRouteStationRouteCode,function(str) {
267   -
268   - if(str.length>0){
269   -
270   - var upStationRouteCode = str[0].stationRouteCode + '_' + str[0].stationRouteMarke;
271   -
272   - $('#stationrouteSelect').val(upStationRouteCode);
273   -
274   - }
275   -
276   - });
277   -
278   - });
279   -
  200 + var initzdlyP = {'lineCode_eq':editStationParmasObj.stationRouteLineCode,'destroy_eq':0,'directions_eq':editStationParmasObj.stationRouteDirections};
  201 + initSelect(initzdlyP);
280 202 // 显示mobal
281 203 $('#edit_station_mobal').modal({show : true,backdrop: 'static',keyboard: false});
282   -
283 204 // 当调用 hide 实例方法时触发
284 205 $('#edit_station_mobal').on('hide.bs.modal', function () {
285   -
286 206 closeMobleSetClean();
287   -
288 207 });
289   -
290 208 function closeMobleSetClean() {
291   -
292 209 // 清除地图覆盖物
293 210 map_.clearMarkAndOverlays();
294   -
295 211 /** 设置新增站点集合对象为空 */
296 212 station_.setEitdStation({});
297   -
298 213 var add_direction_v = $('#stationdirSelect').val();
299   -
300 214 fun.resjtreeDate(addLine.id,add_direction_v);
301   -
302 215 fun.editAChangeCssRemoveDisabled();
303   -
304 216 ajaxd.getSectionRouteInfo(addLine.id,add_direction_v,function(data) {
305   -
306 217 fun.linePanlThree(addLine.id,data,add_direction_v);
307   -
308 218 });
309   -
310 219 }
311   -
312 220 // 编辑表单元素
313 221 var form = $('#edit_station_form');
314   -
315 222 // 获取错误提示元素
316 223 var error = $('.alert-danger', form);
317   -
318 224 // 提交数据按钮事件
319 225 $('#editStationButton').on('click', function() {
320   -
321 226 // 表单提交
322 227 form.submit();
323   -
324 228 });
325   -
326 229 // 表单验证
327 230 form.validate({
328   -
329 231 errorElement : 'span',
330   -
331 232 errorClass : 'help-block help-block-error',
332   -
333 233 focusInvalid : false,
334   -
335 234 rules : {
336   -
337   - // 站点名称
338   - 'stationName' : {
339   -
340   - // 必填项
341   - required : true
342   -
343   - },
344   -
345   - // 站点类型
346   - 'stationMark' : {
347   -
348   - // 必填项
349   - required : true
350   -
351   - },
352   -
353   - // 站点序号
354   - 'stationRouteCode' : {
355   -
356   - isStart : true
357   -
358   - },
359   -
360   - // 站点编码
361   - 'stationCod': {
362   -
363   - // 必填项
364   - required : true,
365   -
366   - // 必须输入合法的数字(负数,小数)。
367   - /* number : true */
368   -
369   - },
370   -
371   - // 站点方向
372   - 'directions' : {
373   -
374   - // 必填项
375   - required : true,
376   -
377   - // 方向选择限制
378   - dirIs : true
379   -
380   - },
381   -
382   - // 到站距离
383   - 'distances' : {
384   -
385   - // 必须输入合法的数字(负数,小数)。
386   - number : true
387   -
388   - },
389   -
390   - // 到站时间
391   - 'toTime' : {
392   -
393   - // 必须输入合法的数字(负数,小数)。
394   - number : true
395   -
396   - },
397   -
398   - // 描述与说明
399   - 'descriptions' : {
400   -
401   - // 最大长度
402   - maxlength: 150
403   -
404   - }
  235 + 'zdmc' : { required : true,maxlength : 50,},// 站点名称 必填项
  236 + 'stationName' : { required : true,maxlength : 50,},// 站点名称 必填项
  237 + 'stationCod': {required : true,},// 站点编码 必填项
  238 + 'directions' : {required : true,dirIs : true},// 站点方向 必填项 必填项
  239 + 'stationRouteCode' : {isStart : true},// 站点序号
  240 + 'stationMark' : {required : true},// 站点类型 必填项
  241 + 'bJwpoints' : {required : true},// 经纬度坐标点 必填项
  242 + 'shapesType' : {required : true},// 几何图形类型 必填项
  243 + 'radius' : {required : true,number : true},// 圆形半径 必填项
  244 + 'destroy' : {required : true},// 是否撤销 必填项
  245 + 'toTime' : {number : true},// 到站时间 必须输入合法的数字(负数,小数)。
  246 + 'distances' : {number : true},// 到站距离 必须输入合法的数字(负数,小数)。
  247 + 'descriptions' : { maxlength: 150}// 描述与说明 最大长度
405 248 },
406   -
407 249 invalidHandler : function(event, validator) {
408   -
409 250 error.show();
410   -
411 251 App.scrollTo(error, -200);
412   -
413 252 },
414   -
415 253 highlight : function(element) {
416   -
417 254 $(element).closest('.form-group').addClass('has-error');
418   -
419 255 },
420   -
421 256 unhighlight : function(element) {
422   -
423 257 $(element).closest('.form-group').removeClass('has-error');
424   -
425 258 },
426   -
427 259 success : function(label) {
428   -
429 260 label.closest('.form-group').removeClass('has-error');
430   -
431 261 },
432   -
433 262 submitHandler : function(f) {
434   -
435 263 var params = form.serializeJSON();
436   -
437 264 error.hide();
438   -
  265 + if(params.shapesType=='圆形')
  266 + params.shapesType='r';
  267 + else if(params.shapesType=='多边形')
  268 + params.shapesType='d';
  269 + if(params.stationRouteCode=='请选择...')
  270 + params.stationRouteCode='';
439 271 ajaxd.stationUpdate(params,function(resuntDate) {
440   -
441 272 if(resuntDate.status=='SUCCESS') {
442   -
443 273 // 弹出添加成功提示消息
444 274 layer.msg('修改成功...');
445   -
446 275 /** 通知更新缓存区 */
447 276 $.post('http://192.168.168.171:8800/transport_server/basic/refresh',function(rs){console.log(rs)})
448   -
449 277 }else {
450   -
451 278 // 弹出添加失败提示消息
452 279 layer.msg('修改失败...');
453   -
454 280 }
455   -
456 281 $('#edit_station_mobal').modal('hide');
457   -
458 282 var id = addLine.id;
459   -
460 283 var dir = params.directions
461   -
462 284 // 刷行左边树
463 285 fun.resjtreeDate(id,dir);
464   -
465 286 closeMobleSetClean();
466   -
467 287 });
468   -
469 288 }
470 289 });
471   -
472 290 // 站点序号值改变事件
473 291 $('#stationrouteSelect').on('change',function() {
474   -
475 292 var stationRValue = $('#stationrouteSelect').val();
476   -
477 293 if(stationRValue) {
478   -
479 294 var tempStr = stationRValue.split('_');
480   -
481 295 if(tempStr[1] == 'E') {
482   -
483 296 $('#stationMarkSelect').val('E');
484   -
485 297 }else {
486   -
487 298 $('#stationMarkSelect').val('Z');
488   -
489 299 }
490   -
491 300 }
492   -
493 301 });
494   -
  302 + function initSelect(p){
  303 + ajaxd.getzdlyInfo(p,function(array) {
  304 + // 定义路段路由长度、渲染拼音检索下拉框格式数据.
  305 + var len_ = array.length,paramsD = new Array();
  306 + if(len_>0) {
  307 + paramsD.push({'id':'请选择...','text':'请选择...'});
  308 + // 遍历.
  309 + $.each(array, function(i, g){
  310 + // 判断.
  311 + if(g.name!='' || g.name != null) {
  312 + if(g.stationRouteCode != editStationParmasObj.stationRouteStationRouteCode) {
  313 + // 添加拼音检索下拉框格式数据数组.
  314 + paramsD.push({'id':g.stationRouteCode + '_' + g.stationMark + '_' + g.directions,
  315 + 'text':g.stationName + ' (' + g.stationRouteCode + ')' + ' --' + fun.dirdmToName(g.directions)});
  316 + }
  317 + }
  318 + });
  319 + $('#stationrouteSelect').empty();
  320 + // 初始化上一个路段拼音检索下拉框.
  321 + initPinYinSelect2($('#stationrouteSelect'),paramsD,function(selector) {
  322 + setZdlyValue();
  323 + });
  324 + }
  325 + });
  326 + }
  327 + function setZdlyValue() {
  328 + ajaxd.findUpStationRouteCode(editStationParmasObj.stationRouteLine,editStationParmasObj.stationRouteDirections,editStationParmasObj.stationRouteStationRouteCode,function(str) {
  329 + if(str.length>0){
  330 + var upStationRouteCode = str[0].stationRouteCode + '_' + str[0].stationRouteMarke + '_' + editStationParmasObj.stationRouteDirections;
  331 + $('#stationrouteSelect').select2('val',upStationRouteCode);
  332 + }else {
  333 + $('#stationrouteSelect').select2('val','请选择...');
  334 + $('#stationMarkSelect').val(editStationParmasObj.stationRouteStationMark);
  335 + }
  336 + });
  337 + }
495 338 // 当站点类型为中途站或者终点站时,上一站点为必填项!
496 339 $.validator.addMethod("isStart", function(value,element) {
497   -
498 340 var tel = false;
499   -
500 341 var stationMarkV = $('#stationMarkSelect').val();
501   -
502 342 var stationrouteSelectV = $('#stationrouteSelect').val();
503   -
504 343 if(stationMarkV =='B'){
505   -
506 344 tel = true;
507   -
508 345 return tel;
509   -
510 346 }else if(stationMarkV =='Z' || stationMarkV =='E'){
511   -
512   -
513 347 if(stationrouteSelectV!=''){
514   -
515 348 tel = true;
516   -
517 349 return tel;
518   -
519 350 }
520   -
521 351 }
522   -
523 352 return tel;
524 353 }, '当站点类型为中途站或者终点站时,上一站点为必填项!');
525   -
526 354 // 方向
527 355 $.validator.addMethod("dirIs", function(value,element) {
528   -
529 356 var tel = true;
530   -
531 357 var stationMarkV = $('#stationdirSelect').val();
532   -
533 358 if(stationMarkV!=editStationParmasObj.stationRouteDirections){
534   -
535 359 tel = false;
536   -
537 360 }
538   -
539 361 return tel;
540 362 }, '方向必须一致!');
541   -
542 363 });
543 364 </script>
544 365 \ No newline at end of file
... ...
src/main/resources/static/pages/base/stationroute/edit_select.html
1 1 <!-- 选择编辑站点方式 -->
2 2 <div class="modal fade" id="edit_select_mobal" tabindex="-1" role="basic" aria-hidden="true">
3   -
4 3 <div class="modal-dialog">
5   -
6   - <div class="modal-content">
7   -
  4 + <div class="modal-content" style="width: 700px;">
8 5 <div class="modal-header">
9 6 <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
10   - <h4 class="modal-title">选择修改站点方式</h4>
  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>
11 10 </div>
12   -
13 11 <div class="modal-body">
14   -
15 12 <form class="form-horizontal" action="/" method="post" id="edit_select" role="form">
16   -
17 13 <div class="alert alert-danger display-hide" id="editSelectrequired">
18 14 <button class="close" data-close="alert"></button>
19 15 站点名称为必填项
20 16 </div>
21   -
22 17 <div class="alert alert-danger display-hide" id="serchrname">
23 18 <button class="close" data-close="alert"></button>
24 19 系统无法生成,请选择其他方式新增
25 20 </div>
26   -
27 21 <div class="form-group" id="formRequ">
28 22 <label class="col-md-3 control-label"><span class="required"> * </span>站点名称:</label>
29 23 <div class="col-md-9" id="errorInfo">
30 24 <input type="text" class="form-control input-medium" id="stationNamebootbox" name="stationNamebootbox">
31 25 </div>
32 26 </div>
33   -
34 27 <div class="form-group">
35   - <label class="col-md-3 control-label">修改方式:</label>
  28 + <label class="col-md-3 control-label"><span class="required"> * </span>修改方式:</label>
36 29 <div class="col-md-9">
37 30 <div class="icheck-list">
38 31 <label>
... ... @@ -41,22 +34,9 @@
41 34 <label>
42 35 <input type="radio" class="icheck" name="editselect" value=1 checked> 编辑原始位置
43 36 </label>
44   - <!-- <label >
45   - <input type="radio" class="icheck" name="editselect" value=2 > 选择引用
46   - </label> -->
47 37 </div>
48 38 </div>
49 39 </div>
50   -
51   - <!-- 修改方式说明容器 -->
52   - <div class="form-group">
53   - <div class="alert alert-info font-blue-chambray" style="background-color: #2C3E50">
54   - <h5 class="block"><span class="help-block" style="color:#1bbc9b;"> * 修改方式说明: </span></h5>
55   - <p><span class="help-block" style="color:#1bbc9b;"> a)重新绘制位置:手动在地图上画出站点范围,然后双击鼠标右键保存.</span> </p>
56   - <p><span class="help-block" style="color:#1bbc9b;"> b)编辑原始位置:编辑原始位置与站点信息.</span> </p>
57   - <!-- <p><span class="help-block" style="color:#1bbc9b;"> c)选择引用:从系统中选择已有的站点进行引用.</span> </p> -->
58   - </div>
59   - </div>
60 40 </form>
61 41 </div>
62 42 <div class="modal-footer">
... ... @@ -67,136 +47,88 @@
67 47 </div>
68 48 </div>
69 49 <script type="text/javascript">
70   -
71 50 $('#edit_select_mobal').on('editSelectMobal_show', function(e, map_,drw,ajaxd,editStationObj,lineObj,fun,dir_){
72   -
73 51 var sel = fun.getCurrSelNode(dir_);
74   -
75 52 var Station = sel[0].original;
76   -
77   - // 获取修改站点对象
78   - /* var Station = editStationObj.getEitdStation(); */
79   -
80 53 // 显示选择修改方式弹出层
81 54 $('#edit_select_mobal').modal({show : true,backdrop: 'static',keyboard: false});
82   -
  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 : -485,
  65 + offsetY : -25,
  66 + content :'<span style="display:block; float:left;font-size:x-small;line-height:10px">A)重新绘制位置:手动在地图上画出站点范围,然后双击鼠标右键保存.</span></br>'+
  67 + '<span style="display:block; float:left;font-size:x-small">B)编辑原始位置:编辑原始位置与站点信息.</span>',
  68 +
  69 + });
  70 + setTimeout(function(){
  71 + $('.tipso-animation').tipso('show');
  72 + setTimeout(function(){$('.tipso-animation').tipso('hide');},4000);
  73 + },500);
83 74 // 获取站点名称元素并赋值
84 75 $('#stationNamebootbox').val(Station.stationStationName);
85   -
86 76 // 定义站点图形
87 77 var stationShapesTypeV = Station.stationShapesType;
88   -
89 78 // 获取表单元素
90 79 var form = $('#edit_select');
91   -
92 80 // 获取错误提示元素
93 81 var editSelectrequired = $('#editSelectrequired', form);
94   -
95 82 // 下一步操作事件
96 83 $('#editselectStationNextButton').on('click', function() {
97   -
98 84 // 表单提交
99 85 form.submit();
100   -
101 86 });
102   -
103 87 //form 表单验证
104 88 form.validate({
105   -
106 89 errorElement : 'span',
107   -
108 90 errorClass : 'help-block help-block-error',
109   -
110 91 focusInvalid : false,
111   -
112 92 rules : {
113   -
114   - 'stationNamebootbox' : {
115   -
116   - minlength : 2,
117   -
118   - required : true,
119   -
120   - maxlength : 10
121   -
122   - }
123   -
  93 + 'stationNamebootbox' : {required : true,maxlength : 50,}
124 94 },
125   -
126 95 invalidHandler : function(event, validator) {
127   -
128 96 editSelectrequired.show();
129   -
130 97 App.scrollTo(requiredname, -200);
131   -
132 98 },
133   -
134 99 highlight : function(element) {
135   -
136 100 $(element).closest('.form-group').addClass('has-error');
137   -
138 101 },
139   -
140 102 unhighlight : function(element) {
141   -
142 103 $(element).closest('.form-group').removeClass('has-error');
143   -
144 104 },
145   -
146 105 success : function(label) {
147   -
148 106 label.closest('.form-group').removeClass('has-error');
149   -
150 107 },
151   -
152 108 submitHandler : function(f) {
153   -
154 109 editStationObj.setEitdStation(Station);
155   -
156 110 // 隐藏弹出层
157 111 $('#edit_select_mobal').modal('hide');
158   -
159 112 $('#downLine').addClass('btn disabled');
160   -
161 113 $('.btn-circle').addClass('disabled');
162   -
163 114 $('#upLine').addClass('btn disabled');
164   -
165 115 // 表单序列
166 116 var params = form.serializeJSON();
167   -
168 117 // 站点名称
169 118 var editStationName = params.stationNamebootbox;
170   -
171 119 editStationObj.setEitdStationName(editStationName);
172   -
173 120 if(params.editselect==0){
174   -
175 121 map_.clearMarkAndOverlays();
176   -
177 122 // 打开绘制工具
178 123 drw.openDrawingManager();
179   -
180 124 map_.localtionPoint(editStationName);
181   -
182 125 }else if(params.editselect==1){
183   -
184 126 // 弹出添加失败提示消息,2秒关闭(如果不配置,默认是3秒)
185 127 var mindex = layer.msg('编辑完图形后,请双击图形区域保存',{ offset: '126px',
186 128 shift: 0,time: 10000});
187   -
188 129 // 编辑图形
189 130 map_.editShapes(editStationName,stationShapesTypeV,mindex);
190   -
191   - }else if(params.editselect==2){
192   -
193   - // 系统引用
194   - $('#edit_select_mobal').modal('hide');
195   -
196   - $.get('station_tabledate.html', function(m){$(pjaxContainer).append(m);});
197   -
198 131 }
199   -
200 132 }
201 133 });
202 134 })
... ...
src/main/resources/static/pages/base/stationroute/editsection.html
... ... @@ -4,7 +4,7 @@
4 4 <div class="modal-content">
5 5 <div class="modal-header">
6 6 <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
7   - <h4 class="modal-title">路段路段</h4>
  7 + <h4 class="modal-title">路段修改</h4>
8 8 </div>
9 9 <div class="modal-body">
10 10 <form class="form-horizontal" role="form" id="edit_section__form" action="/module" method="post">
... ... @@ -19,11 +19,12 @@
19 19 <input type="hidden" name="bsectionVector" id="bsectionVectorInput" />
20 20 <input type="hidden" name="csectionVector" id="csectionVectorInput" value=""/>
21 21 <input type="hidden" name="dbType" id="dbTypeInput" value="b"/>
  22 + <input type="hidden" name="isRoadeSpeed" id="isRoadeSpeedInput"/>
22 23 <!-- 路段名称 -->
23 24 <div class="form-body">
24 25 <div class="form-group">
25 26 <label class="control-label col-md-3">
26   - <span class="required"> * </span> 路段名称
  27 + <span class="required"> * </span> 路段名称:
27 28 </label>
28 29 <div class="col-md-6">
29 30 <input type="text" class="form-control" name="sectionName" id="sectionNameInput" placeholder="路段名称">
... ... @@ -34,10 +35,10 @@
34 35 <div class="form-body">
35 36 <div class="form-group">
36 37 <label class="control-label col-md-3">
37   - <span class="required"> * </span> 路段编码
  38 + <span class="required"> * </span> 路段编码:
38 39 </label>
39 40 <div class="col-md-6">
40   - <input type="text" class="form-control" name="sectionCode" id="sectionCodeInput" placeholder="路段编码">
  41 + <input type="text" class="form-control" name="sectionCode" id="sectionCodeInput" placeholder="路段编码" readonly="readonly">
41 42 </div>
42 43 </div>
43 44 </div>
... ... @@ -45,11 +46,11 @@
45 46 <div class="form-body">
46 47 <div class="form-group">
47 48 <label class="control-label col-md-3">
48   - <span class="required"> * </span>上一路段:
  49 + 上一路段:
49 50 </label>
50 51 <div class="col-md-6">
51 52 <select name="sectionrouteCode" class="form-control" id="sectionrouteCodeSelect"></select>
52   - <span class="help-block"> *说明:选择的路段将作为本站序号的参考,成为选择路段的下一个路段。 </span>
  53 + <span class="help-block">说明:选择的路段将作为本站序号的参考,成为选择路段的下一个路段。 </span>
53 54 </div>
54 55 </div>
55 56 </div>
... ... @@ -57,7 +58,7 @@
57 58 <div class="form-body">
58 59 <div class="form-group">
59 60 <label class="control-label col-md-3">
60   - <span class="required"> * </span>路段方向
  61 + <span class="required"> * </span>路段方向:
61 62 </label>
62 63 <div class="col-md-6">
63 64 <select name="directions" class="form-control" id="directionsSection">
... ... @@ -68,71 +69,71 @@
68 69 </div>
69 70 </div>
70 71 </div>
71   - <!-- 道路编码-->
  72 + <!-- 路段限速 -->
72 73 <div class="form-body">
73 74 <div class="form-group">
74   - <label class="control-label col-md-3">道路编码:</label>
  75 + <label class="control-label col-md-3">
  76 + <span class="required"> * </span> 路段限速:
  77 + </label>
75 78 <div class="col-md-6">
76   - <input type="text" class="form-control" name="roadCoding" id="roadCodingCodInput" placeholder="道路编码">
  79 + <input type="text" class="form-control" name="speedLimit" id="speedLimitInput" placeholder="路段限速">
77 80 </div>
78 81 </div>
79 82 </div>
80   - <!-- 路段限速 -->
  83 + <!-- 是否撤销 -->
81 84 <div class="form-body">
82 85 <div class="form-group">
83   - <label class="control-label col-md-3">
84   - <span class="required"> * </span> 路段限速:
85   - </label>
  86 + <label class="col-md-3 control-label"><span class="required"> * </span>是否撤销:</label>
86 87 <div class="col-md-6">
87   - <input type="text" class="form-control" name="speedLimit" id="speedLimitInput" placeholder="路段限速">
  88 + <select name="destroy" class="form-control" id="destroySelect">
  89 + <option value="">-- 请选择撤销类型 --</option>
  90 + <option value="0">否</option>
  91 + <option value="1">是</option>
  92 + </select>
88 93 </div>
89 94 </div>
90 95 </div>
91   - <!-- 路段时长 -->
  96 + <!-- 道路编码-->
92 97 <div class="form-body">
93 98 <div class="form-group">
94   - <label class="col-md-3 control-label">路段时长:</label>
  99 + <label class="control-label col-md-3">道路编码:</label>
95 100 <div class="col-md-6">
96   - <input type="text" class="form-control" name="sectionTime" id="sectionTimeInput" placeholder="路段时长">
97   - <span class="help-block">单位:分钟</span>
  101 + <input type="text" class="form-control" name="roadCoding" id="roadCodingCodInput" placeholder="道路编码">
98 102 </div>
99 103 </div>
100 104 </div>
101 105 <!-- 路段长度 -->
102 106 <div class="form-body">
103 107 <div class="form-group">
104   - <label class="col-md-3 control-label">路段长度</label>
  108 + <label class="col-md-3 control-label">路段长度:</label>
105 109 <div class="col-md-6">
106 110 <input type="text" class="form-control" name="sectionDistance" id="sectionDistanceInput" placeholder="路段长度">
107   - <span class="help-block">单位:公里</span>
  111 + <span class="help-block">单位:公里(km)</span>
108 112 </div>
109 113 </div>
110 114 </div>
111   - <!-- 版本号 -->
  115 + <!-- 路段历时 -->
112 116 <div class="form-body">
113 117 <div class="form-group">
114   - <label class="col-md-3 control-label">版本号:</label>
  118 + <label class="col-md-3 control-label">路段历时:</label>
115 119 <div class="col-md-6">
116   - <input type="text" class="form-control" name="versions" id="versionsInput" Readonly>
  120 + <input type="text" class="form-control" name="sectionTime" id="sectionTimeInput" placeholder="路段历时">
  121 + <span class="help-block">单位:分钟(min)</span>
117 122 </div>
118 123 </div>
119 124 </div>
120   - <!-- 范围图形类型 -->
  125 + <!-- 版本号 -->
121 126 <div class="form-body">
122 127 <div class="form-group">
123   - <label class="col-md-3 control-label">是否撤销:</label>
  128 + <label class="col-md-3 control-label">版本号&nbsp;&nbsp;&nbsp;:</label>
124 129 <div class="col-md-6">
125   - <select name="destroy" class="form-control" id="destroySelect">
126   - <option value="">-- 请选择撤销类型 --</option>
127   - <option value="0">否</option>
128   - <option value="1">是</option>
129   - </select>
  130 + <input type="text" class="form-control" name="versions" id="versionsInput" Readonly>
130 131 </div>
131 132 </div>
132 133 </div>
133 134 <!-- 描述/说明 -->
134 135 <div class="form-group">
135   - <label class="control-label col-md-3"> 描述/说明 </label>
  136 + <label class="control-label col-md-3"> 描述/说明: </label>
136 137 <div class="col-md-6">
137 138 <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea>
138 139 </div>
... ... @@ -158,19 +159,24 @@ $(&#39;#edit_section_mobal&#39;).on(&#39;editSectionMobal_show&#39;, function(e, map_,ajaxd,sect
158 159 ajaxd.getStation(lineId,dir,function(treeData) {
159 160 var options = '<option value="">请选择...</option>';
160 161 var dArray = treeData[0].children[1].children;
161   - var eq_stationRouteCode = Section.sectionrouteCode;
  162 + var eq_scetionRouteCode = Section.sectionrouteCode;
162 163 for(var i = 0 ; i<dArray.length; i++){
163 164 var ptions_v = dArray[i].sectionrouteCode;
164   - // 排除本站
165   - if(eq_stationRouteCode == ptions_v)
  165 + if(eq_scetionRouteCode == ptions_v){
166 166 continue;
167   - options += '<option value="'+ ptions_v +'">'+dArray[i].sectionName+'</option>'
  167 + }
  168 + options += '<option value="'+ ptions_v +'">'+dArray[i].sectionName + ' (' + ptions_v +')'
  169 + + ' --' + fun.dirdmToName(dArray[i].sectionrouteDirections) + '</option>' ;
168 170 }
169 171 $('#sectionrouteCodeSelect').html(options);
170   - ajaxd.findUpSectionRouteCode(lineId,dir,eq_stationRouteCode,function(str) {
  172 + ajaxd.findUpSectionRouteCode(lineId,dir,eq_scetionRouteCode,function(str) {
  173 + debugger;
  174 + console.log(eq_scetionRouteCode);
171 175 if(str.length>0){
172   - var upStationRouteCode = str[0].sectionrouteCode
  176 + var upStationRouteCode = str[0].sectionrouteCode;
173 177 $('#sectionrouteCodeSelect').val(upStationRouteCode);
  178 + }else {
  179 + $('#sectionrouteCodeSelect').val('');
174 180 }
175 181 });
176 182 });
... ... @@ -200,112 +206,35 @@ $(&#39;#edit_section_mobal&#39;).on(&#39;editSectionMobal_show&#39;, function(e, map_,ajaxd,sect
200 206 // 表单提交
201 207 form.submit();
202 208 });
203   -
204 209 // 表单验证
205 210 form.validate({
206   -
207 211 errorElement : 'span',
208   -
209 212 errorClass : 'help-block help-block-error',
210   -
211 213 focusInvalid : false,
212   -
213 214 rules : {
214   -
215   - // 路段名称
216   - 'sectionName' : {
217   -
218   - // 必填项
219   - required : true
220   -
221   - },
222   -
223   - /* // 路段序号
224   - 'sectionrouteCode' : {
225   -
226   - isStart : true
227   -
228   - }, */
229   -
230   - // 路段编码
231   - 'sectionCode': {
232   -
233   - // 必填项
234   - required : true,
235   -
236   - },
237   -
238   - // 路段方向
239   - 'directions' : {
240   -
241   - // 必填项
242   - required : true,
243   -
244   - // 方向选择限制
245   - /* dirIs : true */
246   -
247   - },
248   -
249   -
250   - // 路段限速
251   - 'speedLimit' : {
252   -
253   - // 必须输入合法的数字(负数,小数)。
254   - number : true
255   -
256   - },
257   -
258   - // 路段长度
259   - 'sectionTime' : {
260   -
261   - // 必须输入合法的数字(负数,小数)。
262   - number : true
263   -
264   - },
265   -
266   - // 路段时长
267   - 'sectionDistance' : {
268   -
269   - // 必须输入合法的数字(负数,小数)。
270   - number : true
271   -
272   - },
273   -
274   - // 描述与说明
275   - 'descriptions' : {
276   -
277   - // 最大长度
278   - maxlength: 150
279   -
280   - }
  215 + 'sectionName' : {required : true,maxlength:50},// 路段名称 必填项
  216 + 'sectionCode': {required : true,},// 路段编码 必填项
  217 + 'directions' : {required : true,},// 路段方向 必填项
  218 + 'speedLimit' : {required : true,number : true},// 路段限速 必须输入合法的数字(负数,小数)。
  219 + 'destroy' : {required : true,},// 是否撤销 必填项.
  220 + 'roadCoding' : {number : true},// 道路编码 必须输入合法的数字(负数,小数)。
  221 + 'sectionTime' : {number : true},// 路段时长 必须输入合法的数字(负数,小数)。
  222 + 'sectionDistance' : {number : true},// 路段长度 必须输入合法的数字(负数,小数)。
  223 + 'descriptions' : {maxlength: 150}// 描述与说明 最大长度.
281 224 },
282   -
283 225 invalidHandler : function(event, validator) {
284   -
285 226 error.show();
286   -
287 227 App.scrollTo(error, -200);
288   -
289 228 },
290   -
291 229 highlight : function(element) {
292   -
293 230 $(element).closest('.form-group').addClass('has-error');
294   -
295 231 },
296   -
297 232 unhighlight : function(element) {
298   -
299 233 $(element).closest('.form-group').removeClass('has-error');
300   -
301 234 },
302   -
303 235 success : function(label) {
304   -
305 236 label.closest('.form-group').removeClass('has-error');
306   -
307 237 },
308   -
309 238 submitHandler : function(f) {
310 239 var params = form.serializeJSON();
311 240 error.hide();
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-ajax-getdata.js
... ... @@ -41,91 +41,60 @@ var GetAjaxData = function(){
41 41  
42 42 // 树数据获取
43 43 getStation : function(id_,dir_,callback) {
44   -
45 44 var treeDateJson = [];
46   -
47 45 $get('/stationroute/findStations',{'line.id_eq' : id_ , 'directions_eq' : dir_},function(resultdata) {
48   -
49 46 treeDateJson = createTreeData(resultdata);
50   -
51 47 callback && callback(treeDateJson);
52   -
53 48 });
54   -
55 49 },
56   -
  50 + getzdlyInfo : function(params,callback) {
  51 + $get('/stationroute/all',params,function(result) {
  52 + callback && callback(result);
  53 + });
  54 + },
57 55 // 查询线路某方向下所有站点的中心百度坐标
58 56 getStationRoutePoint : function(id_,dir_,callback) {
59   -
60 57 $get('/stationroute/getStationRouteCenterPoints',{lineId:id_,direction:dir_},function(result) {
61   -
62 58 callback && callback(result);
63   -
64 59 });
65   -
66 60 },
67 61  
68 62 // 查询是否有已存在站点名称
69 63 getLikeStationName : function (stationName,callback) {
70   -
71 64 $get('/station/all', {stationName_eq: stationName}, function(array){
72   -
73 65 callback && callback(array);
74   -
75 66 });
76   -
77 67 },
78 68  
79 69 // 查询站点编码
80 70 getStationCode : function(callback) {
81 71 $get('/station/getStationCode',null,function(stationCode) {
82   - if(stationCode>0 || stationCode==0) {
  72 + if(stationCode>0) {
83 73 callback && callback(stationCode);
84 74 }
85 75 });
86 76 },
87   -
88 77 findUpStationRouteCode : function(lineId,diraction,stationRouteCode,callback) {
89   -
90 78 $get('/stationroute/findUpStationRouteCode',{lineId:lineId,direction:diraction,stationRouteCode:stationRouteCode},function(result) {
91   -
92 79 callback && callback(result);
93   -
94 80 });
95   -
96 81 },
97   -
98   -
99 82 findUpSectionRouteCode : function(lineId,diraction,sectionRouteCode,callback) {
100   -
101   - $get('/sectionroute/findUpStationRouteCode',{lineId:lineId,direction:diraction,sectionRouteCode:sectionRouteCode},function(result) {
102   -
  83 + $get('/sectionroute/findUpSectionRouteCode',{lineId:lineId,direction:diraction,sectionRouteCode:sectionRouteCode},function(result) {
103 84 callback && callback(result);
104   -
105 85 });
106   -
107 86 },
108   -
109 87 // 新增站点保存
110 88 stationSave : function(station,callback) {
111   -
112 89 $post('/station/stationSave',station,function(data) {
113   -
114 90 callback && callback(data);
115   -
116 91 });
117   -
118 92 },
119   -
120 93 // 站点更新
121 94 stationUpdate : function(station,callback) {
122   -
123 95 $post('/station/stationUpdate',station,function(data) {
124   -
125 96 callback && callback(data);
126   -
127 97 });
128   -
129 98 },
130 99  
131 100 // 撤销站点
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
... ... @@ -348,7 +348,9 @@ var PublicFunctions = function () {
348 348 // 百度坐标点图形集合
349 349 $('#bPolygonGridInput').val(editStationParmas.stationBPolygonGrid);
350 350 // 获取站点名称元素设值
351   - $('#stationNameInput').val(editStationParmas.stationStationName);
  351 + $('#zdmcInput').val(editStationParmas.stationStationName);
  352 + // 获取站点路由名称元素设值
  353 + $('#stationNameInput').val(editStationParmas.stationRouteStationName);
352 354 // 获取站点编码元素设值
353 355 $('#stationCodInput').val(editStationParmas.stationStationCod);
354 356 // 获取站点类型元素设值
... ... @@ -359,8 +361,13 @@ var PublicFunctions = function () {
359 361 $('#roadCodingCodInput').val(editStationParmas.stationRoadCoding);
360 362 // 百度地图经纬度坐标中心点
361 363 $('#bJwpointsInput').val(editStationParmas.stationBJwpoints);
362   - // 获取图形类型元素,并添加值
363   - $('#shapesTypeSelect').val(editStationParmas.stationShapesType);
  364 + if(editStationParmas.stationShapesType=='r') {
  365 + // 获取图形类型元素,并添加值
  366 + $('#shapesTypeSelect').val('圆形');
  367 + }else if(editStationParmas.stationShapesType=='d'){
  368 + $('#radiusGroup').hide();
  369 + $('#shapesTypeSelect').val('多边形');
  370 + }
364 371 // 获取半径元素,并添加值
365 372 $('#radiusInput').val(editStationParmas.stationRadius);
366 373 // 是否撤销
... ... @@ -374,6 +381,7 @@ var PublicFunctions = function () {
374 381 },
375 382  
376 383 setSectionFormValue : function(Section) {
  384 + $('#isRoadeSpeedInput').val(Section.isRoadeSpeed);
377 385 // 路段ID
378 386 $('#sectionIdInput').val(Section.sectionId);
379 387 // 路段路由ID
... ... @@ -535,7 +543,16 @@ var PublicFunctions = function () {
535 543 $('#downLine').removeClass('btn disabled');
536 544 $('.btn-circle').removeClass('disabled');
537 545 $('#upLine').removeClass('btn disabled');
538   - }
  546 + },
  547 + // 方向代码转名称.
  548 + dirdmToName : function(value){
  549 + var srStr = '';
  550 + if(value=='0')
  551 + srStr = '上行';
  552 + else if(value=='1')
  553 + srStr = '下行';
  554 + return srStr;
  555 + },
539 556 }
540 557 return PubFun ;
541 558 }();
542 559 \ No newline at end of file
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-reload.js
... ... @@ -44,7 +44,6 @@ $(function(){
44 44  
45 45 /** 查询路段信息 @param:<Line.id:线路Id;0:上行> @return:data:路段数据 */
46 46 GetAjaxData.getSectionRouteInfo(Line.id,'0',function(data) {
47   -
48 47 /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
49 48 PublicFunctions.linePanlThree(Line.id,data,'0');
50 49  
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-treedata.js
... ... @@ -47,26 +47,22 @@ var StationTreeData = function(){
47 47  
48 48 // 选中的是路段
49 49 }else if(chaildredType =='section'){
50   -
51 50 // 路段矢量坐标点
52 51 var polylineArray = [data];
53   -
54 52 // 路段方向
55 53 var dire_ = data.sectionrouteDirections;
56   -
57 54 // 线路ID
58 55 var Line = LineObj.getLineObj();
59   -
60 56 /*// 百度地图画路段
61 57 PublicFunctions.linePanlThree(Line.id,polylineArray,dire_);*/
62 58 // 百度地图画路段
63 59 PublicFunctions.treeSectionClick(Line.id,polylineArray,dire_);
64   -
65 60 }
66   -
67 61 }
68 62  
69 63 function TreeOnclickEvent(treeOjb) {
  64 + if(treeOjb==null)
  65 + return;
70 66 // 节点个数
71 67 var len = treeOjb.length;
72 68 if(len<0) {
... ... @@ -74,124 +70,78 @@ var StationTreeData = function(){
74 70 }
75 71 // 获取数据
76 72 var stationData = treeOjb[0].original;
77   -
78 73 // 站点范围类型
79 74 var shapesType_ = stationData.stationShapesType;
80   -
81 75 // 选中的节点类型
82 76 var chaildredType_ = stationData.chaildredType;
83   -
84 77 // 选中的其它节点
85 78 if(chaildredType_ ==null){
86   -
87 79 return;
88 80 }
89   -
90 81 var edtsta = EditStationObj.getEitdStation();
91   -
92 82 var edtste = EditSectionObj.getEitdSection();
93   -
94 83 if(!$.isEmptyObject(edtsta)){
95   -
96 84 var stationName = edtsta.stationStationName;
97   -
98 85 var txType = edtsta.stationShapesType;
99   -
100 86 // 是否继续弹出层
101 87 layer.confirm('您正处于站点【'+stationName+'】的编辑状态!是否退出!', {
102 88 btn : [ '确认并退出', '返回并继续' ]
103 89 }, function(index) {
104   -
105 90 DrawingManagerObj.closeDrawingManager();
106   -
107 91 PublicFunctions.editAChangeCssRemoveDisabled();
108   -
109 92 // 关闭弹出层
110 93 layer.close(index);
111   -
  94 + WorldsBMap.clearMarkAndOverlays();
112 95 if(txType=='r'){
113   -
114 96 WorldsBMap.pointsCircle(edtsta);
115   -
116   -
117 97 }else if(txType=='d') {
118   -
119 98 // 百度地图画多边形
120 99 WorldsBMap.pointsPolygon(edtsta);
121 100 }
122   -
123 101 parmasObj();
124   -
125   - // upIsEidtStauts(objStation,chaildredType,len);
126   -
127 102 },function(){
128   -
129 103 // 关闭弹出层
130 104 layer.closeAll();
131   -
132 105 return false;
133 106 });
134 107  
135 108 }else if(!$.isEmptyObject(edtste)) {
136   -
137 109 var sectionName = edtste.sectionName;
138   -
139 110 // 是否继续弹出层
140 111 layer.confirm('您正处于路段【'+sectionName+'】的编辑状态!是否退出!', {
141 112 btn : [ '确认并退出', '返回并继续' ]
142 113 }, function(index) {
143   -
144 114 // 关闭弹出层
145 115 layer.close(index);
146   -
147 116 PublicFunctions.editAChangeCssRemoveDisabled();
148   -
149 117 var polylineArray_ = [edtste];
150   -
  118 + WorldsBMap.clearMarkAndOverlays();
151 119 // 百度地图画路段
152   - // PublicFunctions.linePanlThree(edtste.sectionrouteLine,polylineArray_,edtste.sectionrouteDirections);
153 120 PublicFunctions.treeSectionClick(Line.id,polylineArray,dire_);
154   -
155 121 parmasObj();
156 122  
157   - // upIsEidtStauts(objStation,chaildredType,len);
158   -
159 123 },function(){
160   -
161 124 // 关闭弹出层
162 125 layer.closeAll();
163 126 return false;
164 127 });
165   -
166 128 }else {
167   -
  129 + WorldsBMap.clearMarkAndOverlays();
168 130 upIsEidtStauts(shapesType_,chaildredType_,stationData);
169   -
170 131 }
171   -
172 132 }
173   -
174 133 var stationTree = {
175   -
176 134 upInit : function(treeDateJson) {
177   -
178 135 // 如果不为空
179 136 if(treeDateJson) {
180   -
181 137 // 加载树load事件
182 138 $('#station_Up_tree').on('loaded.jstree', function(e, data){
183   -
184 139 // 展开树
185 140 $.jstree.reference("#station_Up_tree").open_all();
186   -
187 141 }).jstree({
188   -
189 142 'core' : {
190   -
191 143 'themes' : {
192   -
193 144 'responsive': false
194   -
195 145 },
196 146  
197 147 'data': treeDateJson,
... ... @@ -231,31 +181,22 @@ var StationTreeData = function(){
231 181  
232 182 // 树节点单击事件
233 183 }).bind('click.jstree', function(event) {
234   -
235 184 // 获取上行选中树节点
236 185 var treeOjb = $.jstree.reference("#station_Up_tree").get_selected(true);
237   -
238 186 TreeOnclickEvent(treeOjb);
239 187  
240 188 });
241 189 }
242 190 },
243   -
244 191 downInit : function(treeDateJson) {
245   -
246 192 // 如果不为空
247 193 if(treeDateJson) {
248   -
249 194 // 树初始化load事件
250 195 $('#station_Down_tree').on('loaded.jstree', function(e, data){
251   -
252 196 // 展开树
253 197 $.jstree.reference("#station_Down_tree").open_all();
254   -
255 198 }).jstree({
256   -
257 199 'core' : {
258   -
259 200 'themes' : {
260 201  
261 202 'responsive': false
... ... @@ -294,48 +235,31 @@ var StationTreeData = function(){
294 235  
295 236 }
296 237 },
297   -
298 238 'plugins': ['types']
299   -
300 239 // 树节点单击事件
301 240 }).bind('click.jstree', function(event) {
302   -
303 241 // 获取下行选中树节点
304 242 var treeOjb = $.jstree.reference("#station_Down_tree").get_selected(true);
305   -
306 243 TreeOnclickEvent(treeOjb);
307   -
308 244 });
309 245 }
310 246 },
311   -
312 247 upreloadeTree : function (treeDateJson) {
313   -
314 248 // 获取上行树
315 249 var tree = $.jstree.reference('#station_Up_tree');
316   -
317 250 // 赋值数据
318 251 tree.settings.core.data = treeDateJson;
319   -
320 252 // 刷新上行树
321 253 tree.refresh();
322   -
323   -
324 254 },
325   -
326 255 dwonreloadeTree : function (treeDateJson) {
327   -
328 256 // 获取下行树
329 257 var tree = $.jstree.reference('#station_Down_tree');
330   -
331 258 // 赋值数据
332 259 tree.settings.core.data = treeDateJson;
333   -
334 260 // 刷行下行树
335 261 tree.refresh();
336   -
337 262 }
338   -
339 263 }
340 264  
341 265 return stationTree;
... ...
src/main/resources/static/pages/base/stationroute/list.html
... ... @@ -2,7 +2,7 @@
2 2 <div class="portlet-body">
3 3 <!-- 地图 -->
4 4 <div id="bmap_basic" class="bmaps"></div>
5   - <div class="portlet box protlet-box" style="top:20px">
  5 + <div class="portlet box protlet-box" style="top:20px;border-radius: 6px !important;box-shadow: 10px 10px 5px #888888;">
6 6 <!-- 左边标题栏 -->
7 7 <div class="portlet-title" style="background-color:#3B3F51">
8 8 <div class="caption">
... ... @@ -114,7 +114,7 @@
114 114 <div class="row" style="margin-top: 10px;">
115 115 <div class="col-md-12">
116 116 <!-- 提示 -->
117   - <div class="alert alert-warning" style="background-color: #22313F;border-color: #FFFFFF;color: #2ab4c0;">
  117 + <div class="alert alert-warning" style="background-color: #3b3f51;border-color: #FFFFFF;color: #ffffff;border-radius: 6px !important;">
118 118 <strong>系统未初始化该线路上行站点!</strong> 请从上方【上行规划选择】里选择任意一种方式规划该线路上行站点.
119 119 </div>
120 120 </div>
... ... @@ -206,7 +206,7 @@
206 206 <div class="row" style="margin-top: 10px;">
207 207 <div class="col-md-12">
208 208 <!-- 提示 -->
209   - <div class="alert alert-warning" style="background-color: #22313F;border-color: #FFFFFF;color: #2ab4c0;">
  209 + <div class="alert alert-warning" style="background-color: #3b3f51;border-color: #FFFFFF;color: #ffffff;border-radius: 6px !important;">
210 210 <strong>系统未初始化该线路下行站点!</strong> 请从上方【下行规划选择】里选择任意一种方式规划该线路下行站点.
211 211 </div>
212 212 </div>
... ...