Commit ccb63a54c28a3dbeb4ed5fd1ad42b2bdce047df5
Merge branch 'minhang' of 192.168.168.201:panzhaov5/bsth_control into minhang
Showing
113 changed files
with
6758 additions
and
7669 deletions
src/main/java/com/bsth/controller/realcontrol/LineConfigController.java
| 1 | 1 | package com.bsth.controller.realcontrol; |
| 2 | 2 | |
| 3 | -import java.util.Map; | |
| 4 | - | |
| 5 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 6 | -import org.springframework.web.bind.annotation.PathVariable; | |
| 7 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 8 | -import org.springframework.web.bind.annotation.RequestMethod; | |
| 9 | -import org.springframework.web.bind.annotation.RequestParam; | |
| 10 | -import org.springframework.web.bind.annotation.RestController; | |
| 11 | - | |
| 12 | 3 | import com.bsth.controller.BaseController; |
| 13 | 4 | import com.bsth.entity.realcontrol.LineConfig; |
| 14 | 5 | import com.bsth.service.realcontrol.LineConfigService; |
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 7 | +import org.springframework.web.bind.annotation.*; | |
| 8 | + | |
| 9 | +import java.util.Map; | |
| 15 | 10 | |
| 16 | 11 | @RestController |
| 17 | 12 | @RequestMapping("/lineConfig") |
| ... | ... | @@ -39,4 +34,9 @@ public class LineConfigController extends BaseController<LineConfig, Integer>{ |
| 39 | 34 | public Map<String, Object> editOutTimeType(@RequestParam String lineCode, @RequestParam int type){ |
| 40 | 35 | return lineConfigService.editOutTimeType(lineCode, type); |
| 41 | 36 | } |
| 37 | + | |
| 38 | + @RequestMapping(value = "/getByLineCode") | |
| 39 | + public LineConfig getByLineCode(@RequestParam String lineCode){ | |
| 40 | + return lineConfigService.getByLineCode(lineCode); | |
| 41 | + } | |
| 42 | 42 | } | ... | ... |
src/main/java/com/bsth/controller/realcontrol/RealMapController.java
| ... | ... | @@ -26,4 +26,13 @@ public class RealMapController { |
| 26 | 26 | public Map<String, Object> stationSpatialData(@RequestParam String idx){ |
| 27 | 27 | return realMapService.stationSpatialData(idx); |
| 28 | 28 | } |
| 29 | + | |
| 30 | + /** | |
| 31 | + * 停车场 | |
| 32 | + * @return | |
| 33 | + */ | |
| 34 | + @RequestMapping(value = "/carParkSpatialData") | |
| 35 | + public Map<String, Object> carParkSpatialData(){ | |
| 36 | + return realMapService.carParkSpatialData(); | |
| 37 | + } | |
| 29 | 38 | } | ... | ... |
src/main/java/com/bsth/controller/schedule/TrafficManageController.java
| ... | ... | @@ -3,25 +3,24 @@ package com.bsth.controller.schedule; |
| 3 | 3 | import com.bsth.service.TrafficManageService; |
| 4 | 4 | |
| 5 | 5 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | -import org.springframework.web.bind.annotation.PathVariable; | |
| 7 | 6 | import org.springframework.web.bind.annotation.RequestMapping; |
| 8 | 7 | import org.springframework.web.bind.annotation.RequestMethod; |
| 9 | 8 | import org.springframework.web.bind.annotation.RequestParam; |
| 10 | 9 | import org.springframework.web.bind.annotation.RestController; |
| 11 | 10 | |
| 12 | 11 | /** |
| 13 | - * | |
| 12 | + * | |
| 14 | 13 | * @author BSTH |
| 15 | 14 | * |
| 16 | 15 | */ |
| 17 | 16 | @RestController |
| 18 | 17 | @RequestMapping("trmg") |
| 19 | 18 | public class TrafficManageController { |
| 20 | - | |
| 19 | + | |
| 21 | 20 | @Autowired |
| 22 | - private TrafficManageService trManageService; | |
| 23 | - | |
| 24 | - | |
| 21 | + private TrafficManageService trManageService; | |
| 22 | + | |
| 23 | + | |
| 25 | 24 | @RequestMapping(value = "/setXL", method = RequestMethod.GET) |
| 26 | 25 | public String setXL() throws Exception { |
| 27 | 26 | try { |
| ... | ... | @@ -30,7 +29,7 @@ public class TrafficManageController { |
| 30 | 29 | throw new Exception(exp.getCause()); |
| 31 | 30 | } |
| 32 | 31 | } |
| 33 | - | |
| 32 | + | |
| 34 | 33 | @RequestMapping(value = "/setCL", method = RequestMethod.GET) |
| 35 | 34 | public String setCL() throws Exception { |
| 36 | 35 | try { |
| ... | ... | @@ -39,7 +38,7 @@ public class TrafficManageController { |
| 39 | 38 | throw new Exception(exp.getCause()); |
| 40 | 39 | } |
| 41 | 40 | } |
| 42 | - | |
| 41 | + | |
| 43 | 42 | @RequestMapping(value = "/setSJ", method = RequestMethod.GET) |
| 44 | 43 | public String setSJ() throws Exception { |
| 45 | 44 | try { |
| ... | ... | @@ -48,16 +47,43 @@ public class TrafficManageController { |
| 48 | 47 | throw new Exception(exp.getCause()); |
| 49 | 48 | } |
| 50 | 49 | } |
| 51 | - | |
| 52 | - @RequestMapping(value = "/setCS", method = RequestMethod.GET) | |
| 53 | - public String setCS() throws Exception { | |
| 50 | + | |
| 51 | + @RequestMapping(value = "/setLD", method = RequestMethod.GET) | |
| 52 | + public String setLD() throws Exception { | |
| 54 | 53 | try { |
| 55 | - return trManageService.setCS(); | |
| 54 | + return trManageService.setLD(); | |
| 55 | + } catch (Exception exp) { | |
| 56 | + throw new Exception(exp.getCause()); | |
| 57 | + } | |
| 58 | + } | |
| 59 | + | |
| 60 | + @RequestMapping(value = "/setLCYH", method = RequestMethod.GET) | |
| 61 | + public String setLCYH() throws Exception { | |
| 62 | + try { | |
| 63 | + return trManageService.setLCYH(); | |
| 64 | + } catch (Exception exp) { | |
| 65 | + throw new Exception(exp.getCause()); | |
| 66 | + } | |
| 67 | + } | |
| 68 | + | |
| 69 | + @RequestMapping(value = "/setDDRB", method = RequestMethod.GET) | |
| 70 | + public String setDDRB() throws Exception { | |
| 71 | + try { | |
| 72 | + return trManageService.setDDRB(); | |
| 56 | 73 | } catch (Exception exp) { |
| 57 | 74 | throw new Exception(exp.getCause()); |
| 58 | 75 | } |
| 59 | 76 | } |
| 60 | - | |
| 77 | + | |
| 78 | + @RequestMapping(value = "/setJHBC", method = RequestMethod.GET) | |
| 79 | + public String setJHBC() throws Exception { | |
| 80 | + try { | |
| 81 | + return trManageService.setJHBC(); | |
| 82 | + } catch (Exception exp) { | |
| 83 | + throw new Exception(exp.getCause()); | |
| 84 | + } | |
| 85 | + } | |
| 86 | + | |
| 61 | 87 | @RequestMapping(value = "/setSKB", method = RequestMethod.GET) |
| 62 | 88 | public String setSKB(@RequestParam("ids") String ids) throws Exception { |
| 63 | 89 | try { |
| ... | ... | @@ -66,7 +92,7 @@ public class TrafficManageController { |
| 66 | 92 | throw new Exception(exp.getCause()); |
| 67 | 93 | } |
| 68 | 94 | } |
| 69 | - | |
| 95 | + | |
| 70 | 96 | @RequestMapping(value = "/setXLPC", method = RequestMethod.GET) |
| 71 | 97 | public String setXLPC() throws Exception { |
| 72 | 98 | try { |
| ... | ... | @@ -75,13 +101,23 @@ public class TrafficManageController { |
| 75 | 101 | throw new Exception(exp.getCause()); |
| 76 | 102 | } |
| 77 | 103 | } |
| 78 | - | |
| 79 | - @RequestMapping(value = "/setJHBC", method = RequestMethod.GET) | |
| 80 | - public String setJHBC() throws Exception { | |
| 104 | + | |
| 105 | + @RequestMapping(value = "/setCS", method = RequestMethod.GET) | |
| 106 | + public String setCS() throws Exception { | |
| 81 | 107 | try { |
| 82 | - return trManageService.setDDRB(); | |
| 108 | + return trManageService.setCS(); | |
| 83 | 109 | } catch (Exception exp) { |
| 84 | 110 | throw new Exception(exp.getCause()); |
| 85 | 111 | } |
| 86 | 112 | } |
| 113 | + | |
| 114 | + @RequestMapping(value = "/getDownLoadAllDataFile", method = RequestMethod.GET) | |
| 115 | + public String getDownLoadAllDataFile() throws Exception { | |
| 116 | + try { | |
| 117 | + return trManageService.getDownLoadAllDataFile(); | |
| 118 | + } catch (Exception exp) { | |
| 119 | + throw new Exception(exp.getCause()); | |
| 120 | + } | |
| 121 | + } | |
| 122 | + | |
| 87 | 123 | } | ... | ... |
src/main/java/com/bsth/data/BasicData.java
| ... | ... | @@ -70,7 +70,7 @@ public class BasicData implements CommandLineRunner { |
| 70 | 70 | public static Map<String, String> allPerson; |
| 71 | 71 | |
| 72 | 72 | //站点名和运管处编号 对照 |
| 73 | - public static Map<String, Map<String, Map>> stationName2YgcNumber; | |
| 73 | + public static Map<String,Integer> stationName2YgcNumber; | |
| 74 | 74 | |
| 75 | 75 | |
| 76 | 76 | static Logger logger = LoggerFactory.getLogger(BasicData.class); |
| ... | ... | @@ -233,13 +233,6 @@ public class BasicData implements CommandLineRunner { |
| 233 | 233 | * @Description: TODO(加载线路相关信息) |
| 234 | 234 | */ |
| 235 | 235 | public void loadLineInfo(){ |
| 236 | - List<StationRoute> stationsList = null;// 站点路由集 | |
| 237 | - StationRoute stationRoute = null; | |
| 238 | - int size = 0; | |
| 239 | - Map<String, Integer> station2Number ; | |
| 240 | - Map<String, Map> dirs2Statioin ; | |
| 241 | - int[] dirs = {0,1};// 运行方向 上下行 | |
| 242 | - int num = 1; | |
| 243 | 236 | Iterator<Line> iterator = lineRepository.findAll().iterator(); |
| 244 | 237 | |
| 245 | 238 | Line line; |
| ... | ... | @@ -247,7 +240,7 @@ public class BasicData implements CommandLineRunner { |
| 247 | 240 | Map<String, String> code2name = new HashMap<>(); |
| 248 | 241 | Map<Integer, String> id2SHcode = new HashMap<Integer, String>(); |
| 249 | 242 | Map<String, String> code2SHcode = new HashMap<String, String>(); |
| 250 | - Map<String, Map<String, Map>> tempStationName2YgcNumber = new HashMap<String, Map<String, Map>>(); | |
| 243 | + Map<String, Integer> tempStationName2YgcNumber = new HashMap<String, Integer>(); | |
| 251 | 244 | |
| 252 | 245 | while(iterator.hasNext()){ |
| 253 | 246 | line = iterator.next(); |
| ... | ... | @@ -259,27 +252,26 @@ public class BasicData implements CommandLineRunner { |
| 259 | 252 | /** |
| 260 | 253 | * 加载运管处的站点及序号 |
| 261 | 254 | * 上行从1开始,下行顺序续编 |
| 262 | - | |
| 263 | - num = 1; | |
| 264 | - dirs2Statioin = new HashMap<String, Map>(); | |
| 265 | - for (int i = 0; i < dirs.length; i++) { | |
| 266 | - // 分别取得上下行的站点 | |
| 267 | - stationsList = stationRouteRepository.findByLine(line.getLineCode(), dirs[i]); | |
| 268 | - size = stationsList == null ? 0 :stationsList.size(); | |
| 269 | - if(size > 0 ){ | |
| 270 | - station2Number = new HashMap<String, Integer>(); | |
| 271 | - for (int j = 0; j < size; j++) { | |
| 272 | - stationRoute = stationsList.get(j); | |
| 273 | - // map保存为(站点名称 -->序号) | |
| 274 | - station2Number.put(stationRoute.getStationName(), num++); | |
| 255 | + */ | |
| 256 | + List<Object[]> ygcLines = stationRouteRepository.findAllLineWithYgc(); | |
| 257 | + if(ygcLines != null && ygcLines.size() > 0){ | |
| 258 | + int size = ygcLines.size(); | |
| 259 | + Object[] tempArray ; | |
| 260 | + int num = 1; | |
| 261 | + String key; | |
| 262 | + String lineCode = ""; | |
| 263 | + for (int i = 0; i < size; i ++){ | |
| 264 | + tempArray = ygcLines.get(i); | |
| 265 | + if(lineCode.equals("")){ | |
| 266 | + lineCode = tempArray[0]+""; | |
| 267 | + }else if(!lineCode.equals(tempArray[0]+"")){ | |
| 268 | + num = 1; | |
| 269 | + lineCode = tempArray[0]+""; | |
| 275 | 270 | } |
| 276 | - // 保存两个数据,(0 --> station2Number)(1 --> station2Number) 0上行 1 下行 | |
| 277 | - dirs2Statioin.put(dirs[i]+"", station2Number); | |
| 271 | + key = tempArray[0] + "_"+tempArray[1] + "_"+tempArray[2]; | |
| 272 | + tempStationName2YgcNumber.put(key,num++); | |
| 278 | 273 | } |
| 279 | 274 | } |
| 280 | - // 保存(站点编码 --> dirs2Statioin) | |
| 281 | - tempStationName2YgcNumber.put(line.getLineCode(), dirs2Statioin); | |
| 282 | - */ | |
| 283 | 275 | } |
| 284 | 276 | |
| 285 | 277 | lineId2CodeMap = biMap; | ... | ... |
src/main/java/com/bsth/data/gpsdata/GpsRealData.java
| ... | ... | @@ -2,6 +2,7 @@ package com.bsth.data.gpsdata; |
| 2 | 2 | |
| 3 | 3 | import com.alibaba.fastjson.JSON; |
| 4 | 4 | import com.alibaba.fastjson.JSONObject; |
| 5 | +import com.bsth.Application; | |
| 5 | 6 | import com.bsth.data.BasicData; |
| 6 | 7 | import com.bsth.data.forecast.ForecastRealServer; |
| 7 | 8 | import com.bsth.data.schedule.DayOfSchedule; |
| ... | ... | @@ -23,6 +24,7 @@ import org.springframework.stereotype.Component; |
| 23 | 24 | import java.io.BufferedReader; |
| 24 | 25 | import java.io.InputStreamReader; |
| 25 | 26 | import java.util.*; |
| 27 | +import java.util.concurrent.TimeUnit; | |
| 26 | 28 | |
| 27 | 29 | /** |
| 28 | 30 | * |
| ... | ... | @@ -65,7 +67,7 @@ public class GpsRealData implements CommandLineRunner{ |
| 65 | 67 | @Override |
| 66 | 68 | public void run(String... arg0) throws Exception { |
| 67 | 69 | logger.info("gpsDataLoader,20,6"); |
| 68 | - //Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 5, TimeUnit.SECONDS); | |
| 70 | + Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 5, TimeUnit.SECONDS); | |
| 69 | 71 | } |
| 70 | 72 | |
| 71 | 73 | public GpsEntity add(GpsEntity gps) { | ... | ... |
src/main/java/com/bsth/entity/Line.java
| ... | ... | @@ -144,6 +144,9 @@ public class Line implements Serializable { |
| 144 | 144 | /** 修改日期 timestamp */ |
| 145 | 145 | @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") |
| 146 | 146 | private Date updateDate; |
| 147 | + | |
| 148 | + /** 是否在使用 <1:是;0:否> bit length(50) */ | |
| 149 | + private Integer inUse; | |
| 147 | 150 | |
| 148 | 151 | public Integer getWarrantCar() { |
| 149 | 152 | return warrantCar; |
| ... | ... | @@ -448,4 +451,8 @@ public class Line implements Serializable { |
| 448 | 451 | public void setUpdateDate(Date updateDate) { |
| 449 | 452 | this.updateDate = updateDate; |
| 450 | 453 | } |
| 454 | + | |
| 455 | + public Integer getInUse() { return inUse; } | |
| 456 | + | |
| 457 | + public void setInUse(Integer inUse) { this.inUse = inUse; } | |
| 451 | 458 | } | ... | ... |
src/main/java/com/bsth/repository/StationRouteRepository.java
| ... | ... | @@ -257,4 +257,15 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int |
| 257 | 257 | @EntityGraph(value = "stationRoute_station", type = EntityGraph.EntityGraphType.FETCH) |
| 258 | 258 | @Query("select s from StationRoute s where s.destroy=0 and s.lineCode=?1") |
| 259 | 259 | List<StationRoute> findByLineCode(String lineCode); |
| 260 | + | |
| 261 | + @Query("SELECT " + | |
| 262 | + "lineCode,directions,stationName,stationRouteCode " + | |
| 263 | + "FROM " + | |
| 264 | + "StationRoute s " + | |
| 265 | + "WHERE " + | |
| 266 | + "s.destroy = 0 " + | |
| 267 | + "and s.lineCode in(select lineCode from Line where inUse = 1) " + | |
| 268 | + "ORDER BY " + | |
| 269 | + "lineCode,directions,stationRouteCode") | |
| 270 | + List<Object[]> findAllLineWithYgc(); | |
| 260 | 271 | } | ... | ... |
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
| 1 | 1 | package com.bsth.service.impl; |
| 2 | 2 | |
| 3 | -import java.io.BufferedOutputStream; | |
| 4 | -import java.io.File; | |
| 5 | -import java.io.FileOutputStream; | |
| 6 | -import java.io.IOException; | |
| 7 | -import java.sql.Connection; | |
| 8 | -import java.sql.PreparedStatement; | |
| 9 | -import java.sql.ResultSet; | |
| 10 | -import java.text.DecimalFormat; | |
| 11 | -import java.text.SimpleDateFormat; | |
| 12 | -import java.util.Date; | |
| 13 | -import java.util.HashMap; | |
| 14 | -import java.util.Iterator; | |
| 15 | -import java.util.List; | |
| 16 | -import java.util.Map; | |
| 17 | -import java.util.Set; | |
| 18 | - | |
| 19 | -import org.apache.commons.lang.time.DateUtils; | |
| 20 | -import org.slf4j.Logger; | |
| 21 | -import org.slf4j.LoggerFactory; | |
| 22 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 23 | -import org.springframework.data.domain.Sort; | |
| 24 | -import org.springframework.data.domain.Sort.Direction; | |
| 25 | -import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; | |
| 26 | -import org.springframework.stereotype.Service; | |
| 27 | - | |
| 28 | 3 | import com.bsth.data.BasicData; |
| 29 | -import com.bsth.entity.Cars; | |
| 30 | -import com.bsth.entity.Line; | |
| 31 | -import com.bsth.entity.LineInformation; | |
| 32 | -import com.bsth.entity.Personnel; | |
| 33 | -import com.bsth.entity.StationRoute; | |
| 4 | +import com.bsth.entity.*; | |
| 34 | 5 | import com.bsth.entity.realcontrol.ChildTaskPlan; |
| 35 | 6 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 36 | 7 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 37 | 8 | import com.bsth.entity.schedule.TTInfo; |
| 38 | 9 | import com.bsth.entity.schedule.TTInfoDetail; |
| 39 | 10 | import com.bsth.entity.search.CustomerSpecs; |
| 40 | -import com.bsth.repository.CarsRepository; | |
| 41 | -import com.bsth.repository.LineInformationRepository; | |
| 42 | -import com.bsth.repository.LineRepository; | |
| 43 | -import com.bsth.repository.PersonnelRepository; | |
| 44 | -import com.bsth.repository.StationRouteRepository; | |
| 45 | -import com.bsth.repository.schedule.CarConfigInfoRepository; | |
| 46 | -import com.bsth.repository.schedule.EmployeeConfigInfoRepository; | |
| 47 | -import com.bsth.repository.schedule.SchedulePlanInfoRepository; | |
| 48 | -import com.bsth.repository.schedule.TTInfoDetailRepository; | |
| 49 | -import com.bsth.repository.schedule.TTInfoRepository; | |
| 11 | +import com.bsth.repository.*; | |
| 12 | +import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | |
| 13 | +import com.bsth.repository.schedule.*; | |
| 50 | 14 | import com.bsth.service.TrafficManageService; |
| 51 | 15 | import com.bsth.util.TimeUtils; |
| 52 | 16 | import com.bsth.util.db.DBUtils_MS; |
| ... | ... | @@ -54,7 +18,25 @@ import com.bsth.webService.trafficManage.geotool.services.Internal; |
| 54 | 18 | import com.bsth.webService.trafficManage.geotool.services.InternalPortType; |
| 55 | 19 | import com.bsth.webService.trafficManage.org.tempuri.WebServiceLocator; |
| 56 | 20 | import com.bsth.webService.trafficManage.org.tempuri.WebServiceSoap; |
| 57 | -import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | |
| 21 | +import org.apache.commons.lang.time.DateUtils; | |
| 22 | +import org.slf4j.Logger; | |
| 23 | +import org.slf4j.LoggerFactory; | |
| 24 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 25 | +import org.springframework.data.domain.Sort; | |
| 26 | +import org.springframework.data.domain.Sort.Direction; | |
| 27 | +import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; | |
| 28 | +import org.springframework.stereotype.Service; | |
| 29 | + | |
| 30 | +import java.io.BufferedOutputStream; | |
| 31 | +import java.io.File; | |
| 32 | +import java.io.FileOutputStream; | |
| 33 | +import java.io.IOException; | |
| 34 | +import java.sql.Connection; | |
| 35 | +import java.sql.PreparedStatement; | |
| 36 | +import java.sql.ResultSet; | |
| 37 | +import java.text.DecimalFormat; | |
| 38 | +import java.text.SimpleDateFormat; | |
| 39 | +import java.util.*; | |
| 58 | 40 | /** |
| 59 | 41 | * |
| 60 | 42 | * @ClassName: TrafficManageServiceImpl(运管处接口service业务层实现类) |
| ... | ... | @@ -63,7 +45,7 @@ import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 63 | 45 | * |
| 64 | 46 | * @Description: TODO(运管处接口service业务层) |
| 65 | 47 | * |
| 66 | - * @Author bsth@z | |
| 48 | + * @Author bsth@zq | |
| 67 | 49 | * |
| 68 | 50 | * @Date 2016年10月28日 上午9:21:17 |
| 69 | 51 | * |
| ... | ... | @@ -158,8 +140,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 158 | 140 | @Override |
| 159 | 141 | public String setXL() { |
| 160 | 142 | String result = "failure"; |
| 143 | + StringBuffer sBuffer = new StringBuffer(); | |
| 161 | 144 | try { |
| 162 | - StringBuffer sBuffer = new StringBuffer(); ; | |
| 163 | 145 | Iterator<Line> lineIterator = lineRepository.findAll().iterator(); |
| 164 | 146 | Line line = null; |
| 165 | 147 | List<StationRoute> stationsList = null;// 站点路由集 |
| ... | ... | @@ -168,7 +150,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 168 | 150 | sBuffer.append("<XLs>"); |
| 169 | 151 | while(lineIterator.hasNext()){ |
| 170 | 152 | line = lineIterator.next(); |
| 171 | - if(BasicData.lineId2ShangHaiCodeMap.get(line.getId()) == null){ | |
| 153 | + if(BasicData.lineId2ShangHaiCodeMap.get(line.getId()) == null | |
| 154 | + || line.getInUse() == 0){ | |
| 172 | 155 | continue; |
| 173 | 156 | } |
| 174 | 157 | sBuffer.append("<XL>"); |
| ... | ... | @@ -208,7 +191,6 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 208 | 191 | sBuffer.append("</XLs>"); |
| 209 | 192 | System.out.println(sBuffer.toString()); |
| 210 | 193 | if(sBuffer.indexOf("<XL>") != -1){ |
| 211 | - logger.info("setXL:"+sBuffer.toString()); | |
| 212 | 194 | String portResult = portType.setXL(userNameXl, passwordXl, sBuffer.toString()); |
| 213 | 195 | String portArray[] = portResult.split("\n"); |
| 214 | 196 | if(portArray.length >= 4){ |
| ... | ... | @@ -224,8 +206,10 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 224 | 206 | } |
| 225 | 207 | } |
| 226 | 208 | } catch (Exception e) { |
| 209 | + logger.error("setXL:",e); | |
| 227 | 210 | e.printStackTrace(); |
| 228 | 211 | }finally{ |
| 212 | + logger.info("setXL:"+sBuffer.toString()); | |
| 229 | 213 | logger.info("setXL:"+result); |
| 230 | 214 | } |
| 231 | 215 | return result; |
| ... | ... | @@ -237,8 +221,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 237 | 221 | @Override |
| 238 | 222 | public String setCL() { |
| 239 | 223 | String result = "failure"; |
| 224 | + StringBuffer sBuffer =new StringBuffer(); | |
| 240 | 225 | try { |
| 241 | - StringBuffer sBuffer =new StringBuffer(); | |
| 242 | 226 | sBuffer.append("<CLs>"); |
| 243 | 227 | Cars cars = null; |
| 244 | 228 | String company; |
| ... | ... | @@ -258,13 +242,14 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 258 | 242 | sBuffer.append("</CL>"); |
| 259 | 243 | } |
| 260 | 244 | sBuffer.append("</CLs>"); |
| 261 | - logger.info("setCL:"+sBuffer.toString()); | |
| 262 | 245 | if(ssop.setCL(userNameOther, passwordOther, sBuffer.toString()).isSuccess()){ |
| 263 | 246 | result = "success"; |
| 264 | 247 | } |
| 265 | 248 | } catch (Exception e) { |
| 249 | + logger.error("setCL:",e); | |
| 266 | 250 | e.printStackTrace(); |
| 267 | 251 | }finally{ |
| 252 | + logger.info("setCL:"+sBuffer.toString()); | |
| 268 | 253 | logger.info("setCL:"+result); |
| 269 | 254 | } |
| 270 | 255 | return result; |
| ... | ... | @@ -276,8 +261,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 276 | 261 | @Override |
| 277 | 262 | public String setSJ() { |
| 278 | 263 | String result = "failure"; |
| 264 | + StringBuffer sBuffer =new StringBuffer(); | |
| 279 | 265 | try { |
| 280 | - StringBuffer sBuffer =new StringBuffer(); | |
| 281 | 266 | sBuffer.append("<SJs>"); |
| 282 | 267 | Personnel personnel = null; |
| 283 | 268 | String company; |
| ... | ... | @@ -295,13 +280,14 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 295 | 280 | sBuffer.append("</SJ>"); |
| 296 | 281 | } |
| 297 | 282 | sBuffer.append("</SJs>"); |
| 298 | - logger.info("setSJ:"+sBuffer.toString()); | |
| 299 | 283 | if(ssop.setSJ(userNameOther, passwordOther, sBuffer.toString()).isSuccess()){ |
| 300 | 284 | result = "success"; |
| 301 | 285 | }; |
| 302 | 286 | } catch (Exception e) { |
| 287 | + logger.error("setSJ:",e); | |
| 303 | 288 | e.printStackTrace(); |
| 304 | 289 | }finally{ |
| 290 | + logger.info("setSJ:"+sBuffer.toString()); | |
| 305 | 291 | logger.info("setSJ:"+result); |
| 306 | 292 | } |
| 307 | 293 | return result; |
| ... | ... | @@ -309,15 +295,14 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 309 | 295 | |
| 310 | 296 | /** |
| 311 | 297 | * 上传路单 |
| 312 | - * @param date | |
| 313 | - * @return xml格式的字符串 | |
| 298 | + * @return 上传成功标识 | |
| 314 | 299 | */ |
| 315 | 300 | public String setLD(){ |
| 316 | 301 | String result = "failure"; |
| 317 | 302 | // 取昨天 的日期 |
| 318 | 303 | String date = sdfnyr.format(DateUtils.addDays(new Date(), -1)); |
| 304 | + StringBuffer sf = new StringBuffer(); | |
| 319 | 305 | try { |
| 320 | - StringBuffer sf = new StringBuffer(); | |
| 321 | 306 | sf.append("<DLDS>"); |
| 322 | 307 | List<ScheduleRealInfo> list = scheduleRealInfoRepository.setLD(date); |
| 323 | 308 | List<ScheduleRealInfo> listGroup = scheduleRealInfoRepository.setLDGroup(date); |
| ... | ... | @@ -368,20 +353,19 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 368 | 353 | sf.append("</LD>"); |
| 369 | 354 | } |
| 370 | 355 | } |
| 371 | - | |
| 372 | 356 | sf.append("</LDList>"); |
| 373 | 357 | sf.append("</DLD>"); |
| 374 | 358 | } |
| 375 | 359 | } |
| 376 | - | |
| 377 | 360 | sf.append("</DLDS>"); |
| 378 | - logger.info("setLD:"+sf.toString()); | |
| 379 | 361 | if(ssop.setLD(userNameOther, passwordOther, sf.toString()).isSuccess()){ |
| 380 | 362 | result = "success"; |
| 381 | 363 | } |
| 382 | 364 | } catch (Exception e) { |
| 365 | + logger.error("setLD:",e); | |
| 383 | 366 | e.printStackTrace(); |
| 384 | 367 | }finally{ |
| 368 | + logger.info("setLD:"+sf.toString()); | |
| 385 | 369 | logger.info("setLD:"+result); |
| 386 | 370 | } |
| 387 | 371 | return result; |
| ... | ... | @@ -389,15 +373,14 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 389 | 373 | |
| 390 | 374 | /** |
| 391 | 375 | * 上传里程油耗 |
| 392 | - * @param date | |
| 393 | - * @return | |
| 376 | + * @return 上传成功标识 | |
| 394 | 377 | */ |
| 395 | 378 | public String setLCYH(){ |
| 396 | 379 | String result = "failure"; |
| 397 | 380 | // 取昨天 的日期 |
| 398 | 381 | String date = sdfnyr.format(DateUtils.addDays(new Date(), -1)); |
| 382 | + StringBuffer sf = new StringBuffer(); | |
| 399 | 383 | try { |
| 400 | - StringBuffer sf = new StringBuffer(); | |
| 401 | 384 | sf.append("<LCYHS>"); |
| 402 | 385 | List<ScheduleRealInfo> listGroup = scheduleRealInfoRepository.setLCYHGroup(date); |
| 403 | 386 | List<ScheduleRealInfo> list = scheduleRealInfoRepository.findByDate(date); |
| ... | ... | @@ -451,13 +434,14 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 451 | 434 | } |
| 452 | 435 | } |
| 453 | 436 | sf.append("</LCYHS>"); |
| 454 | - logger.info("setLCYH:"+sf.toString()); | |
| 455 | 437 | if(ssop.setLCYH(userNameOther, passwordOther, sf.toString()).isSuccess()){ |
| 456 | 438 | result = "success"; |
| 457 | 439 | } |
| 458 | 440 | } catch (Exception e) { |
| 441 | + logger.error("setLCYH:",e); | |
| 459 | 442 | e.printStackTrace(); |
| 460 | 443 | }finally{ |
| 444 | + logger.info("setLCYH:"+sf.toString()); | |
| 461 | 445 | logger.info("setLCYH:"+result); |
| 462 | 446 | } |
| 463 | 447 | return result; |
| ... | ... | @@ -471,8 +455,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 471 | 455 | String result = "failure"; |
| 472 | 456 | // 取昨天 的日期 |
| 473 | 457 | String date = sdfnyr.format(DateUtils.addDays(new Date(), -1)); |
| 458 | + StringBuffer sf = new StringBuffer(); | |
| 474 | 459 | try { |
| 475 | - StringBuffer sf = new StringBuffer(); | |
| 476 | 460 | sf.append("<DDRBS>"); |
| 477 | 461 | List<ScheduleRealInfo> listGroup = scheduleRealInfoRepository.setDDRBGroup(date); |
| 478 | 462 | List<ScheduleRealInfo> list = scheduleRealInfoRepository.findByDate(date); |
| ... | ... | @@ -554,13 +538,14 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 554 | 538 | } |
| 555 | 539 | } |
| 556 | 540 | sf.append("</DDRBS>"); |
| 557 | - logger.info("setDDRB:"+sf.toString()); | |
| 558 | 541 | if(ssop.setDDRB(userNameOther, passwordOther, sf.toString()).isSuccess()){ |
| 559 | 542 | result = "success"; |
| 560 | 543 | } |
| 561 | 544 | } catch (Exception e) { |
| 545 | + logger.error("setDDRB:",e); | |
| 562 | 546 | e.printStackTrace(); |
| 563 | 547 | }finally{ |
| 548 | + logger.info("setDDRB:"+sf.toString()); | |
| 564 | 549 | logger.info("setDDRB:"+result); |
| 565 | 550 | } |
| 566 | 551 | return result; |
| ... | ... | @@ -572,8 +557,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 572 | 557 | @Override |
| 573 | 558 | public String setJHBC() { |
| 574 | 559 | String result = "failure"; |
| 560 | + StringBuffer sBuffer =new StringBuffer(); | |
| 575 | 561 | try { |
| 576 | - StringBuffer sBuffer =new StringBuffer(); | |
| 577 | 562 | sBuffer.append("<JHBCs>"); |
| 578 | 563 | // 声明变量 |
| 579 | 564 | SchedulePlanInfo schedulePlanInfo = null; |
| ... | ... | @@ -633,13 +618,14 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 633 | 618 | } |
| 634 | 619 | } |
| 635 | 620 | sBuffer.append("</JHBCs>"); |
| 636 | - logger.info("setJHBC:"+sBuffer.toString()); | |
| 637 | 621 | if(ssop.setJHBC(userNameOther, passwordOther, sBuffer.toString()).isSuccess()){ |
| 638 | 622 | result = "success"; |
| 639 | 623 | } |
| 640 | 624 | } catch (Exception e) { |
| 625 | + logger.error("setJHBC:",e); | |
| 641 | 626 | e.printStackTrace(); |
| 642 | 627 | }finally{ |
| 628 | + logger.info("setJHBC:"+sBuffer.toString()); | |
| 643 | 629 | logger.info("setJHBC:"+result); |
| 644 | 630 | } |
| 645 | 631 | return result; |
| ... | ... | @@ -651,14 +637,15 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 651 | 637 | @Override |
| 652 | 638 | public String setSKB(String ids) { |
| 653 | 639 | String result = "failure"; |
| 640 | + StringBuffer sBuffer = new StringBuffer(); | |
| 654 | 641 | try { |
| 655 | 642 | String[] idArray = ids.split(","); |
| 656 | - StringBuffer sBuffer = new StringBuffer(); | |
| 643 | + StringBuffer sBufferA; | |
| 644 | + StringBuffer sBufferB; | |
| 657 | 645 | TTInfo ttInfo; |
| 658 | - TTInfoDetail ttInfoDetail; | |
| 646 | + TTInfoDetail ttInfoDetail = null; | |
| 659 | 647 | Iterator<TTInfoDetail> ttInfoDetailIterator; |
| 660 | 648 | HashMap<String,Object> param = new HashMap<String, Object>(); |
| 661 | - String ttinfoJhlc = null;//计划总里程 | |
| 662 | 649 | String lineCode ; |
| 663 | 650 | sBuffer.append("<SKBs>"); |
| 664 | 651 | for (int i = 0; i < idArray.length; i++) { |
| ... | ... | @@ -668,57 +655,61 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 668 | 655 | param.put("ttinfo.id_eq", ttInfo.getId()); |
| 669 | 656 | ttInfoDetailIterator = ttInfoDetailRepository.findAll(new CustomerSpecs<TTInfoDetail>(param), |
| 670 | 657 | new Sort(Direction.ASC, "xlDir")).iterator(); |
| 671 | - sBuffer.append("<SKB>"); | |
| 672 | - sBuffer.append("<XLBM>").append(BasicData.lineId2ShangHaiCodeMap.get(ttInfo.getXl().getId())) | |
| 673 | - .append("</XLBM>"); | |
| 674 | - ttinfoJhlc = new String(); | |
| 675 | - sBuffer.append("<JHZLC>").append(ttinfoJhlc).append("</JHZLC>"); | |
| 676 | - sBuffer.append("<JHYYLC>").append(ttinfoJhlc).append("</JHYYLC>"); | |
| 677 | - sBuffer.append("<KSRQ>").append(sdfnyr.format(ttInfo.getQyrq())).append("</KSRQ>"); | |
| 678 | - sBuffer.append("<JSRQ>").append(sdfnyr.format(ttInfo.getQyrq())).append("</JSRQ>");///////// | |
| 679 | - sBuffer.append("<ZJZX>").append(changeRuleDay(ttInfo.getRule_days())).append("</ZJZX>"); | |
| 680 | - sBuffer.append("<TBYY>").append("").append("</TBYY>"); | |
| 681 | - sBuffer.append("<UPDT>").append(sdfnyrsfm.format(new Date())).append("</UPDT>"); | |
| 682 | - int num = 1; | |
| 683 | - // 加上<BCList> | |
| 684 | 658 | if(ttInfoDetailIterator.hasNext()){ |
| 685 | - sBuffer.append("<BCList>"); | |
| 686 | - } | |
| 687 | - while (ttInfoDetailIterator.hasNext()) { | |
| 688 | - ttInfoDetail = ttInfoDetailIterator.next(); | |
| 689 | - if(ttInfoDetail.getBcType().equals("in") || ttInfoDetail.getBcType().equals("out")){ | |
| 690 | - continue; | |
| 659 | + sBuffer.append("<SKB>"); | |
| 660 | + sBuffer.append("<XLBM>").append(BasicData.lineId2ShangHaiCodeMap.get(ttInfo.getXl().getId())) | |
| 661 | + .append("</XLBM>"); | |
| 662 | + sBufferB = new StringBuffer(); | |
| 663 | + sBufferB.append("<KSRQ>").append(sdfnyr.format(ttInfo.getQyrq())).append("</KSRQ>"); | |
| 664 | + // 结束日期暂时不要,节假日的班次表才需要,如春节的班次表 | |
| 665 | + sBufferB.append("<JSRQ>").append("").append("</JSRQ>"); | |
| 666 | + sBufferB.append("<ZJZX>").append(changeRuleDay(ttInfo.getRule_days())).append("</ZJZX>"); | |
| 667 | + sBufferB.append("<TBYY>").append("").append("</TBYY>"); | |
| 668 | + sBufferB.append("<UPDT>").append(sdfnyrsfm.format(new Date())).append("</UPDT>"); | |
| 669 | + sBufferB.append("<BCList>"); | |
| 670 | + int num = 1; | |
| 671 | + while (ttInfoDetailIterator.hasNext()) { | |
| 672 | + ttInfoDetail = ttInfoDetailIterator.next(); | |
| 673 | + if(ttInfoDetail.getBcType().equals("in") || ttInfoDetail.getBcType().equals("out")){ | |
| 674 | + continue; | |
| 675 | + } | |
| 676 | + if(num++ == 1){ | |
| 677 | + sBufferA = new StringBuffer(); | |
| 678 | + sBufferA.append("<JHZLC>").append(ttInfoDetail.getJhlc()).append("</JHZLC>"); | |
| 679 | + sBufferA.append("<JHYYLC>").append(ttInfoDetail.getJhlc()).append("</JHYYLC>"); | |
| 680 | + sBuffer.append(sBufferA).append(sBufferB); | |
| 681 | + } | |
| 682 | + lineCode = ttInfoDetail.getXl().getLineCode(); | |
| 683 | + // 如果发车时间格式错误,忽略此条 | |
| 684 | + if(changeTimeFormat(ttInfoDetail) == null){ | |
| 685 | + continue; | |
| 686 | + } | |
| 687 | + sBuffer.append("<BC>"); | |
| 688 | + sBuffer.append("<LPBH>").append(ttInfoDetail.getLp().getLpNo()).append("</LPBH>"); | |
| 689 | + sBuffer.append("<SXX>").append(ttInfoDetail.getXlDir()).append("</SXX>"); | |
| 690 | + sBuffer.append("<FCZDMC>").append(ttInfoDetail.getQdz().getStationName()).append("</FCZDMC>"); | |
| 691 | + sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName( | |
| 692 | + lineCode, ttInfoDetail.getXlDir(), ttInfoDetail.getQdz().getStationName())).append("</ZDXH>"); | |
| 693 | + sBuffer.append("<JHFCSJ>").append(changeTimeFormat(ttInfoDetail)).append("</JHFCSJ>"); | |
| 694 | + sBuffer.append("<DDZDMC>").append(ttInfoDetail.getZdz().getStationName()).append("</DDZDMC>"); | |
| 695 | + sBuffer.append("<DDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName( | |
| 696 | + lineCode, ttInfoDetail.getXlDir(), ttInfoDetail.getZdz().getStationName())).append("</DDXH>"); | |
| 697 | + sBuffer.append("<JHDDSJ>").append(calcDdsj(ttInfoDetail.getFcsj(),ttInfoDetail.getBcsj())).append("</JHDDSJ>"); | |
| 698 | + sBuffer.append("</BC>"); | |
| 691 | 699 | } |
| 692 | - ttinfoJhlc = ttInfoDetail.getJhlc()+"";// 设置计划总里程 | |
| 693 | - lineCode = ttInfoDetail.getXl().getLineCode(); | |
| 694 | - sBuffer.append("<BC>"); | |
| 695 | - sBuffer.append("<LPBH>").append(ttInfoDetail.getLp().getLpNo()).append("</LPBH>"); | |
| 696 | - sBuffer.append("<SXX>").append(ttInfoDetail.getXlDir()).append("</SXX>"); | |
| 697 | - sBuffer.append("<FCZDMC>").append(ttInfoDetail.getQdz().getStationName()).append("</FCZDMC>"); | |
| 698 | - sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName( | |
| 699 | - lineCode, ttInfoDetail.getXlDir(), ttInfoDetail.getQdz().getStationName())).append("</ZDXH>"); | |
| 700 | - sBuffer.append("<JHFCSJ>").append(ttInfoDetail.getFcsj()).append("</JHFCSJ>"); | |
| 701 | - sBuffer.append("<DDZDMC>").append(ttInfoDetail.getZdz().getStationName()).append("</DDZDMC>"); | |
| 702 | - sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName( | |
| 703 | - lineCode, ttInfoDetail.getXlDir(), ttInfoDetail.getZdz().getStationName())).append("</ZDXH>"); | |
| 704 | - sBuffer.append("<JHDDSJ>").append(calcDdsj(ttInfoDetail.getFcsj(),ttInfoDetail.getBcsj())).append("</JHDDSJ>"); | |
| 705 | - sBuffer.append("</BC>"); | |
| 706 | - | |
| 707 | - num++; | |
| 708 | - } | |
| 709 | - if(sBuffer.indexOf("<BCList>") != -1){ | |
| 710 | 700 | sBuffer.append("</BCList>"); |
| 701 | + sBuffer.append("</SKB>"); | |
| 711 | 702 | } |
| 712 | - sBuffer.append("</SKB>"); | |
| 713 | 703 | } |
| 714 | 704 | sBuffer.append("</SKBs>"); |
| 715 | - logger.info("setSKB:"+sBuffer.toString()); | |
| 716 | 705 | if(ssop.setSKB(userNameOther, passwordOther, sBuffer.toString()).isSuccess()){ |
| 717 | 706 | result = "success"; |
| 718 | 707 | } |
| 719 | 708 | } catch (Exception e) { |
| 709 | + logger.error("setSKB:", e); | |
| 720 | 710 | e.printStackTrace(); |
| 721 | 711 | }finally{ |
| 712 | + logger.info("setSKB:"+sBuffer.toString()); | |
| 722 | 713 | logger.info("setSKB:"+result); |
| 723 | 714 | } |
| 724 | 715 | return result; |
| ... | ... | @@ -730,8 +721,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 730 | 721 | @Override |
| 731 | 722 | public String setXLPC() { |
| 732 | 723 | String result = "failure"; |
| 724 | + StringBuffer sBuffer =new StringBuffer(); | |
| 733 | 725 | try { |
| 734 | - StringBuffer sBuffer =new StringBuffer(); | |
| 735 | 726 | sBuffer.append("<XLPCs>"); |
| 736 | 727 | // 声明变量 |
| 737 | 728 | Line line = null; |
| ... | ... | @@ -773,13 +764,14 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 773 | 764 | sBuffer.append("</XLPC>"); |
| 774 | 765 | } |
| 775 | 766 | sBuffer.append("</XLPCs>"); |
| 776 | - logger.info("setXLPC:"+sBuffer.toString()); | |
| 777 | 767 | if(ssop.setXLPC(userNameOther, passwordOther, sBuffer.toString()).isSuccess()){ |
| 778 | 768 | result = "success"; |
| 779 | 769 | } |
| 780 | 770 | } catch (Exception e) { |
| 771 | + logger.error("setXLPC:",e); | |
| 781 | 772 | e.printStackTrace(); |
| 782 | 773 | }finally{ |
| 774 | + logger.info("setXLPC:"+sBuffer.toString()); | |
| 783 | 775 | logger.info("setXLPC:"+result); |
| 784 | 776 | } |
| 785 | 777 | return result; |
| ... | ... | @@ -832,13 +824,14 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 832 | 824 | sBuffer.append("</CS>"); |
| 833 | 825 | } |
| 834 | 826 | sBuffer.append("</CSs>"); |
| 835 | - logger.info("setCS:"+sBuffer.toString()); | |
| 836 | 827 | if(ssop.setCS(userNameOther, passwordOther, sBuffer.toString()).isSuccess()){ |
| 837 | 828 | result = "success"; |
| 838 | 829 | } |
| 839 | 830 | } catch (Exception e) { |
| 831 | + logger.error("setCS:",e); | |
| 840 | 832 | e.printStackTrace(); |
| 841 | 833 | } finally { |
| 834 | + logger.info("setCS:"+sBuffer.toString()); | |
| 842 | 835 | logger.info("setCS:"+result); |
| 843 | 836 | DBUtils_MS.close(rs, ps, conn); |
| 844 | 837 | } |
| ... | ... | @@ -949,11 +942,11 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 949 | 942 | min = fullTime % 60; |
| 950 | 943 | sumHour = Integer.valueOf(fcsjArray[0])+hour; |
| 951 | 944 | if(sumHour >= 24){ |
| 952 | - result = sumHour - 24+":"; | |
| 945 | + result = String.format("%02d",sumHour - 24); | |
| 953 | 946 | }else{ |
| 954 | - result = sumHour +":"; | |
| 947 | + result = String.format("%02d",sumHour);; | |
| 955 | 948 | } |
| 956 | - result +=String.format("%02d", min); | |
| 949 | + result +=":"+String.format("%02d", min); | |
| 957 | 950 | }else{ |
| 958 | 951 | result = fcsj; |
| 959 | 952 | } |
| ... | ... | @@ -961,6 +954,26 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 961 | 954 | } |
| 962 | 955 | |
| 963 | 956 | /** |
| 957 | + * 改变时间格式 | |
| 958 | + * @param ttInfoDetail 时刻表详细 | |
| 959 | + * @return xx:yy | |
| 960 | + */ | |
| 961 | + private String changeTimeFormat(TTInfoDetail ttInfoDetail){ | |
| 962 | + String result = "00:00"; | |
| 963 | + String fcsj = ttInfoDetail.getFcsj(); | |
| 964 | + if(fcsj.indexOf(":") != -1){ | |
| 965 | + // 时和分隔开 | |
| 966 | + String[] fcsjArray = fcsj.split(":"); | |
| 967 | + result = String.format("%02d", Integer.valueOf(fcsjArray[0]))+":"; | |
| 968 | + result +=String.format("%02d", Integer.valueOf(fcsjArray[1])); | |
| 969 | + }else{ | |
| 970 | + result = null; | |
| 971 | + logger.info("setSKB:发车时间错误:ttInfoDetail.id="+ttInfoDetail.getId()); | |
| 972 | + } | |
| 973 | + return result; | |
| 974 | + } | |
| 975 | + | |
| 976 | + /** | |
| 964 | 977 | * 拼装线路计划班次表的XML |
| 965 | 978 | * @param sBuffer |
| 966 | 979 | * @param schedulePlanInfo |
| ... | ... | @@ -993,7 +1006,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 993 | 1006 | flag = 0; |
| 994 | 1007 | } |
| 995 | 1008 | result += flag; |
| 996 | - if(i !=ruleDayArray.length ){ | |
| 1009 | + if(i !=ruleDayArray.length -1){ | |
| 997 | 1010 | result +=","; |
| 998 | 1011 | } |
| 999 | 1012 | } |
| ... | ... | @@ -1017,15 +1030,15 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 1017 | 1030 | } |
| 1018 | 1031 | } |
| 1019 | 1032 | /** |
| 1020 | - * @param stations 站点路由集 | |
| 1033 | + * @param stationsList 站点路由集 | |
| 1021 | 1034 | * @param sBuffer sBuffer |
| 1022 | - * @param StartId 站点序号起始ID | |
| 1035 | + * @param startId 站点序号起始ID | |
| 1023 | 1036 | * |
| 1024 | 1037 | * @return 站点序号累加后的ID |
| 1025 | 1038 | */ |
| 1026 | 1039 | private int packagStationXml(List<StationRoute> stationsList,StringBuffer sBuffer,int startId){ |
| 1027 | 1040 | int size = stationsList.size(); |
| 1028 | - StationRoute srRoute = null; | |
| 1041 | + StationRoute srRoute; | |
| 1029 | 1042 | String zdlx ;// 站点类型:0:起点站、1:终点站、2:中途站 |
| 1030 | 1043 | for (int i = 0; i < size; i++) { |
| 1031 | 1044 | srRoute = stationsList.get(i); |
| ... | ... | @@ -1062,9 +1075,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 1062 | 1075 | */ |
| 1063 | 1076 | private Integer getYgcStationNumByLineCodeAndDirectionAndStationName(String lineCode,String direction,String stationName){ |
| 1064 | 1077 | Integer number = 0; |
| 1065 | - Map<String, Map> dirs2Statioin = BasicData.stationName2YgcNumber.get(lineCode); | |
| 1066 | - Map<String, Integer> station2Number = dirs2Statioin.get(direction); | |
| 1067 | - number = station2Number.get(stationName); | |
| 1078 | + number = BasicData.stationName2YgcNumber.get(lineCode+"_"+direction+"_"+stationName); | |
| 1068 | 1079 | return number; |
| 1069 | 1080 | } |
| 1070 | 1081 | } | ... | ... |
src/main/java/com/bsth/service/realcontrol/LineConfigService.java
| 1 | 1 | package com.bsth.service.realcontrol; |
| 2 | 2 | |
| 3 | -import java.util.Map; | |
| 4 | - | |
| 5 | 3 | import com.bsth.entity.realcontrol.LineConfig; |
| 6 | 4 | import com.bsth.service.BaseService; |
| 7 | 5 | |
| 6 | +import java.util.Map; | |
| 7 | + | |
| 8 | 8 | public interface LineConfigService extends BaseService<LineConfig, Integer>{ |
| 9 | 9 | |
| 10 | 10 | Map<String, Object> check(String[] codeArray); |
| ... | ... | @@ -15,4 +15,5 @@ public interface LineConfigService extends BaseService<LineConfig, Integer>{ |
| 15 | 15 | |
| 16 | 16 | Map<String, Object> editOutTimeType(String lineCode, int type); |
| 17 | 17 | |
| 18 | + LineConfig getByLineCode(String lineCode); | |
| 18 | 19 | } | ... | ... |
src/main/java/com/bsth/service/realcontrol/RealMapService.java
src/main/java/com/bsth/service/realcontrol/impl/LineConfigServiceImpl.java
| 1 | 1 | package com.bsth.service.realcontrol.impl; |
| 2 | 2 | |
| 3 | -import java.util.ArrayList; | |
| 4 | -import java.util.HashMap; | |
| 5 | -import java.util.List; | |
| 6 | -import java.util.Map; | |
| 7 | - | |
| 8 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | -import org.springframework.stereotype.Service; | |
| 10 | - | |
| 11 | 3 | import com.bsth.common.ResponseCode; |
| 12 | 4 | import com.bsth.data.LineConfigData; |
| 13 | 5 | import com.bsth.entity.realcontrol.LineConfig; |
| 14 | 6 | import com.bsth.repository.realcontrol.LineConfigRepository; |
| 15 | 7 | import com.bsth.service.impl.BaseServiceImpl; |
| 16 | 8 | import com.bsth.service.realcontrol.LineConfigService; |
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 10 | +import org.springframework.stereotype.Service; | |
| 11 | + | |
| 12 | +import java.util.ArrayList; | |
| 13 | +import java.util.HashMap; | |
| 14 | +import java.util.List; | |
| 15 | +import java.util.Map; | |
| 17 | 16 | |
| 18 | 17 | @Service |
| 19 | 18 | public class LineConfigServiceImpl extends BaseServiceImpl<LineConfig, Integer> implements LineConfigService{ |
| ... | ... | @@ -78,4 +77,9 @@ public class LineConfigServiceImpl extends BaseServiceImpl<LineConfig, Integer> |
| 78 | 77 | rs.put("type", type); |
| 79 | 78 | return rs; |
| 80 | 79 | } |
| 80 | + | |
| 81 | + @Override | |
| 82 | + public LineConfig getByLineCode(String lineCode) { | |
| 83 | + return lineConfigData.get(lineCode); | |
| 84 | + } | |
| 81 | 85 | } | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/RealMapServiceImpl.java
| ... | ... | @@ -2,6 +2,7 @@ package com.bsth.service.realcontrol.impl; |
| 2 | 2 | |
| 3 | 3 | import com.bsth.common.ResponseCode; |
| 4 | 4 | import com.bsth.controller.realcontrol.dto.StationSpatialData; |
| 5 | +import com.bsth.entity.CarPark; | |
| 5 | 6 | import com.bsth.service.realcontrol.RealMapService; |
| 6 | 7 | import com.google.common.base.Splitter; |
| 7 | 8 | import org.slf4j.Logger; |
| ... | ... | @@ -52,4 +53,22 @@ public class RealMapServiceImpl implements RealMapService { |
| 52 | 53 | |
| 53 | 54 | return rs; |
| 54 | 55 | } |
| 56 | + | |
| 57 | + @Override | |
| 58 | + public Map<String, Object> carParkSpatialData() { | |
| 59 | + Map<String, Object> rs = new HashMap(); | |
| 60 | + | |
| 61 | + try { | |
| 62 | + String sql = "select ID, AREA,PARK_CODE,PARK_NAME,ST_AsText(G_PARK_POINT) as G_PARK_POINT,G_CENTER_POINT,RADIUS,SHAPES_TYPE from bsth_c_car_park WHERE destroy=0"; | |
| 63 | + | |
| 64 | + List<CarPark> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper(CarPark.class)); | |
| 65 | + rs.put("status", ResponseCode.SUCCESS); | |
| 66 | + rs.put("list", list); | |
| 67 | + } catch (Exception e) { | |
| 68 | + logger.error("", e); | |
| 69 | + rs.put("status", ResponseCode.ERROR); | |
| 70 | + rs.put("msg", "查询停车场空间数据出现异常!"); | |
| 71 | + } | |
| 72 | + return rs; | |
| 73 | + } | |
| 55 | 74 | } | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -276,8 +276,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 276 | 276 | return rs; |
| 277 | 277 | } |
| 278 | 278 | //截取工号 |
| 279 | - if(t.getsGh().indexOf("-") != -1){ | |
| 280 | - t.setsGh(t.getsGh().split("-")[1]); | |
| 279 | + if(t.getjGh().indexOf("-") != -1){ | |
| 280 | + t.setjGh(t.getjGh().split("-")[1]); | |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | t.setScheduleDateStr(schDate); |
| ... | ... | @@ -1631,7 +1631,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1631 | 1631 | */ |
| 1632 | 1632 | @Override |
| 1633 | 1633 | public Map<String, Object> multi_dftz(List<DfsjChange> dfsjcs) { |
| 1634 | - Map<String, Object> rs = new HashMap<>(); | |
| 1634 | + Map<String, Object> rs = new HashMap<>() | |
| 1635 | + ,tempMap = new HashMap<>(); | |
| 1635 | 1636 | List<ScheduleRealInfo> list = new ArrayList<>(); |
| 1636 | 1637 | |
| 1637 | 1638 | ScheduleRealInfo sch,next; |
| ... | ... | @@ -1639,20 +1640,24 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1639 | 1640 | if(StringUtils.isEmpty(dc.getOld_dfsj()) || StringUtils.isEmpty(dc.getNew_dfsj())) |
| 1640 | 1641 | continue; |
| 1641 | 1642 | |
| 1642 | - sch = dayOfSchedule.get(dc.getSchId()); | |
| 1643 | + /*sch = dayOfSchedule.get(dc.getSchId()); | |
| 1643 | 1644 | if(sch==null) |
| 1644 | 1645 | continue; |
| 1645 | 1646 | |
| 1646 | 1647 | sch.setDfsjAll(dc.getNew_dfsj()); |
| 1647 | 1648 | //重新计算终点时间 |
| 1648 | 1649 | sch.calcEndTime(); |
| 1649 | - list.add(sch); | |
| 1650 | + list.add(sch);*/ | |
| 1651 | + tempMap = outgoAdjust(dc.getSchId(),"", dc.getNew_dfsj()); | |
| 1650 | 1652 | |
| 1651 | - next=dayOfSchedule.next(sch); | |
| 1652 | - if(next.getQdzName().equals(sch.getZdzName())){ | |
| 1653 | + if(tempMap.get("status").equals(ResponseCode.SUCCESS)){ | |
| 1654 | + list.addAll((Collection<? extends ScheduleRealInfo>) tempMap.get("ts")); | |
| 1655 | + } | |
| 1656 | + //next=dayOfSchedule.next(sch); | |
| 1657 | + /*if(next.getQdzName().equals(sch.getZdzName())){ | |
| 1653 | 1658 | next.setQdzArrDateJH(sch.getZdsj()); |
| 1654 | 1659 | list.add(next); |
| 1655 | - } | |
| 1660 | + }*/ | |
| 1656 | 1661 | } |
| 1657 | 1662 | |
| 1658 | 1663 | rs.put("status", ResponseCode.SUCCESS); | ... | ... |
src/main/resources/application-dev.properties
| ... | ... | @@ -8,7 +8,7 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy |
| 8 | 8 | spring.jpa.database= MYSQL |
| 9 | 9 | spring.jpa.show-sql= false |
| 10 | 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 11 | -spring.datasource.url= jdbc:mysql://192.168.168.201/mh_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 11 | +spring.datasource.url= jdbc:mysql://192.168.168.201/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 12 | 12 | spring.datasource.username= root |
| 13 | 13 | spring.datasource.password= 123456 |
| 14 | 14 | #DATASOURCE | ... | ... |
src/main/resources/ms-jdbc.properties
| 1 | -ms.mysql.driver= com.mysql.jdbc.Driver | |
| 2 | -ms.mysql.url= jdbc:mysql://192.168.168.201:3306/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 3 | -ms.mysql.username= root | |
| 4 | -ms.mysql.password= 123456 | |
| 5 | - | |
| 6 | 1 | #ms.mysql.driver= com.mysql.jdbc.Driver |
| 7 | -#ms.mysql.url= jdbc:mysql://192.168.168.171:3306/ms?useUnicode=true&characterEncoding=utf-8 | |
| 2 | +#ms.mysql.url= jdbc:mysql://192.168.168.201:3306/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 8 | 3 | #ms.mysql.username= root |
| 9 | -#ms.mysql.password= root2jsp | |
| 10 | 4 | \ No newline at end of file |
| 5 | +#ms.mysql.password= 123456 | |
| 6 | + | |
| 7 | +ms.mysql.driver= com.mysql.jdbc.Driver | |
| 8 | +ms.mysql.url= jdbc:mysql://192.168.168.171:3306/ms?useUnicode=true&characterEncoding=utf-8 | |
| 9 | +ms.mysql.username= root | |
| 10 | +ms.mysql.password= root2jsp | |
| 11 | 11 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/Gruntfile.js
| ... | ... | @@ -11,6 +11,9 @@ module.exports = function (grunt) { |
| 11 | 11 | clean: { |
| 12 | 12 | concat_directive: { // 所有指令合并的js文件 |
| 13 | 13 | src: ['module/common/prj-common-directive.js'] |
| 14 | + }, | |
| 15 | + concat_route: { // 所有模块的route配置合并的js文件 | |
| 16 | + src: ['module/common/prj-common-ui-route-state.js'] | |
| 14 | 17 | } |
| 15 | 18 | |
| 16 | 19 | //, |
| ... | ... | @@ -79,6 +82,28 @@ module.exports = function (grunt) { |
| 79 | 82 | 'module/common/dts2/bcGroup/saBcgroup.js' // 班次选择整合指令 |
| 80 | 83 | ], |
| 81 | 84 | dest: 'module/common/prj-common-directive.js' |
| 85 | + }, | |
| 86 | + route: { | |
| 87 | + options: { | |
| 88 | + banner: '//所有模块ui route 配置' | |
| 89 | + }, | |
| 90 | + src: [ | |
| 91 | + 'module/basicInfo/busInfoManage/route.js', // 车辆基础信息管理模块 | |
| 92 | + 'module/basicInfo/deviceInfoManage/route.js', // 设备管理模块 | |
| 93 | + 'module/basicInfo/employeeInfoManage/route.js', // 人员基础信息管理模块 | |
| 94 | + 'module/core/busConfig/route.js', // 车辆配置模块 | |
| 95 | + 'module/core/busLineInfoStat/route.js', // 线路运营概览模块 | |
| 96 | + 'module/core/employeeConfig/route.js', // 人员配置模块 | |
| 97 | + 'module/core/guideboardManage/route.js', // 路牌管理模块 | |
| 98 | + 'module/core/rerunManage/route.js', // 套跑管理模块 | |
| 99 | + 'module/core/schedulePlanManage/route.js', // 排班计划管理模块 | |
| 100 | + 'module/core/schedulePlanManage/info/route.js', // 排班计划明细管理模块 | |
| 101 | + 'module/core/schedulePlanManage/report/route.js', // 排班计划明日运营模块 | |
| 102 | + 'module/core/scheduleRuleManage/route.js', // 排班规则管理模块 | |
| 103 | + 'module/core/ttInfoManage/route.js', // 时刻表管理模块 | |
| 104 | + 'module/core/ttInfoManage/detailedit/route.js' // 时刻表明细管理模块 | |
| 105 | + ], | |
| 106 | + dest: 'module/common/prj-common-ui-route-state.js' | |
| 82 | 107 | } |
| 83 | 108 | }, |
| 84 | 109 | |
| ... | ... | @@ -401,6 +426,18 @@ module.exports = function (grunt) { |
| 401 | 426 | 1、clean:concat_directive,清除合并生成的prj-common-directive.js文件 |
| 402 | 427 | 2、concat:directive,重新合并prj-common-directive.js文件 |
| 403 | 428 | */ |
| 404 | - grunt.registerTask('directive', ['clean:concat_directive', 'concat:directive']); | |
| 429 | + grunt.registerTask('directive', [ | |
| 430 | + 'clean:concat_directive', 'concat:directive' | |
| 431 | + ]); | |
| 432 | + | |
| 433 | + /* | |
| 434 | + 定义了一个route的grunt任务 | |
| 435 | + 任务组有顺序,如下说明: | |
| 436 | + 1、clean:concat_route,清除合并生成的prj-common-ui-route-state.js文件 | |
| 437 | + 2、concat:route,重新合并prj-common-ui-route-state.js文件 | |
| 438 | + */ | |
| 439 | + grunt.registerTask('route', [ | |
| 440 | + 'clean:concat_route', 'concat:route' | |
| 441 | + ]); | |
| 405 | 442 | |
| 406 | 443 | }; |
| 407 | 444 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/dist/busInfoManage.dist.html deleted
100644 → 0
| 1 | -<div class="page-head"> | |
| 2 | - <div class="page-title"> | |
| 3 | - <h1>车辆信息管理</h1> | |
| 4 | - </div> | |
| 5 | -</div> | |
| 6 | - | |
| 7 | -<ul class="page-breadcrumb breadcrumb"> | |
| 8 | - <li> | |
| 9 | - <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | - <i class="fa fa-circle"></i> | |
| 11 | - </li> | |
| 12 | - <li> | |
| 13 | - <span class="active">基础信息</span> | |
| 14 | - <i class="fa fa-circle"></i> | |
| 15 | - </li> | |
| 16 | - <li> | |
| 17 | - <span class="active">车辆信息管理</span> | |
| 18 | - </li> | |
| 19 | - | |
| 20 | -</ul> | |
| 21 | - | |
| 22 | -<div class="row"> | |
| 23 | - <div class="col-md-12"> | |
| 24 | - dfdfdfdfdf | |
| 25 | - </div> | |
| 26 | -</div> | |
| 27 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js renamed to src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/module.js
| 1 | -// 车辆基础信息维护 service controller等写在一起 | |
| 2 | - | |
| 3 | -angular.module('ScheduleApp').factory('BusInfoManageService', ['BusInfoManageService_g', function(service) { | |
| 4 | - | |
| 5 | - /** 当前的查询条件信息 */ | |
| 6 | - var currentSearchCondition = { | |
| 7 | - "carCode_like" : "", | |
| 8 | - "insideCode_like" : "", | |
| 9 | - "equipmentCode_like" : "", | |
| 10 | - "carPlate_like" : "" | |
| 11 | - }; | |
| 12 | - | |
| 13 | - /** 当前第几页 */ | |
| 14 | - var currentPageNo = 1; | |
| 15 | - return { | |
| 16 | - /** | |
| 17 | - * 获取查询条件信息, | |
| 18 | - * 用于给controller用来和页面数据绑定。 | |
| 19 | - */ | |
| 20 | - getSearchCondition: function() { | |
| 21 | - return currentSearchCondition; | |
| 22 | - }, | |
| 23 | - /** | |
| 24 | - * 重置查询条件信息。 | |
| 25 | - */ | |
| 26 | - resetSearchCondition: function() { | |
| 27 | - var key; | |
| 28 | - for (key in currentSearchCondition) { | |
| 29 | - currentSearchCondition[key] = undefined; | |
| 30 | - } | |
| 31 | - currentPageNo = 1; | |
| 32 | - }, | |
| 33 | - /** | |
| 34 | - * 设置当前页码。 | |
| 35 | - * @param cpn 从1开始,后台是从0开始的 | |
| 36 | - */ | |
| 37 | - setCurrentPageNo: function(cpn) { | |
| 38 | - currentPageNo = cpn; | |
| 39 | - }, | |
| 40 | - /** | |
| 41 | - * 组装查询参数,返回一个promise查询结果。 | |
| 42 | - * @param params 查询参数 | |
| 43 | - * @return 返回一个 promise | |
| 44 | - */ | |
| 45 | - getPage: function() { | |
| 46 | - var params = currentSearchCondition; // 查询条件 | |
| 47 | - params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 48 | - return service.rest.list(params).$promise; | |
| 49 | - }, | |
| 50 | - /** | |
| 51 | - * 获取明细信息。 | |
| 52 | - * @param id 车辆id | |
| 53 | - * @return 返回一个 promise | |
| 54 | - */ | |
| 55 | - getDetail: function(id) { | |
| 56 | - var params = {id: id}; | |
| 57 | - return service.rest.get(params).$promise; | |
| 58 | - }, | |
| 59 | - /** | |
| 60 | - * 保存信息。 | |
| 61 | - * @param obj 车辆详细信息 | |
| 62 | - * @return 返回一个 promise | |
| 63 | - */ | |
| 64 | - saveDetail: function(obj) { | |
| 65 | - return service.rest.save(obj).$promise; | |
| 66 | - }, | |
| 67 | - /** | |
| 68 | - * 数据导出。 | |
| 69 | - * @returns {*|Function|promise|n} | |
| 70 | - */ | |
| 71 | - dataExport: function() { | |
| 72 | - return service.dataTools.dataExport().$promise; | |
| 73 | - } | |
| 74 | - }; | |
| 75 | -}]); | |
| 76 | - | |
| 77 | -angular.module('ScheduleApp').controller('BusInfoManageCtrl', [ | |
| 78 | - 'BusInfoManageService','$state', '$uibModal', 'FileDownload_g', | |
| 79 | - function(busInfoManageService, $state, $uibModal, fileDownload) { | |
| 80 | - var self = this; | |
| 81 | - | |
| 82 | - // 切换到form状态 | |
| 83 | - self.goForm = function() { | |
| 84 | - //alert("切换"); | |
| 85 | - $state.go("busInfoManage_form"); | |
| 86 | - }; | |
| 87 | - | |
| 88 | - // 导入excel | |
| 89 | - self.importData = function() { | |
| 90 | - // large方式弹出模态对话框 | |
| 91 | - var modalInstance = $uibModal.open({ | |
| 92 | - templateUrl: '/pages/scheduleApp/module/basicInfo/busInfoManage/dataImport.html', | |
| 93 | - size: "lg", | |
| 94 | - animation: true, | |
| 95 | - backdrop: 'static', | |
| 96 | - resolve: { | |
| 97 | - // 可以传值给controller | |
| 98 | - }, | |
| 99 | - windowClass: 'center-modal', | |
| 100 | - controller: "BusInfoManageToolsCtrl", | |
| 101 | - controllerAs: "ctrl", | |
| 102 | - bindToController: true | |
| 103 | - }); | |
| 104 | - modalInstance.result.then( | |
| 105 | - function() { | |
| 106 | - console.log("dataImport.html打开"); | |
| 107 | - }, | |
| 108 | - function() { | |
| 109 | - console.log("dataImport.html消失"); | |
| 110 | - } | |
| 111 | - ); | |
| 112 | - }; | |
| 113 | - | |
| 114 | - // 导出excel | |
| 115 | - self.exportData = function() { | |
| 116 | - busInfoManageService.dataExport().then( | |
| 117 | - function(result) { | |
| 118 | - fileDownload.downloadFile(result.data, "application/octet-stream", "车辆基础信息.xls"); | |
| 119 | - }, | |
| 120 | - function(result) { | |
| 121 | - console.log("exportData failed:" + result); | |
| 122 | - } | |
| 123 | - ); | |
| 124 | - }; | |
| 125 | -}]); | |
| 126 | - | |
| 127 | -angular.module('ScheduleApp').controller('BusInfoManageToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | |
| 128 | - var self = this; | |
| 129 | - self.data = "TODO"; | |
| 130 | - | |
| 131 | - // 关闭窗口 | |
| 132 | - self.close = function() { | |
| 133 | - $modalInstance.dismiss("cancel"); | |
| 134 | - }; | |
| 135 | - | |
| 136 | - self.clearInputFile = function() { | |
| 137 | - angular.element("input[type='file']").val(null); | |
| 138 | - }; | |
| 139 | - | |
| 140 | - // 上传文件组件 | |
| 141 | - self.uploader = new FileUploader({ | |
| 142 | - url: "/cars/dataImport", | |
| 143 | - filters: [] // 用于过滤文件,比如只允许导入excel | |
| 144 | - }); | |
| 145 | - self.uploader.onAfterAddingFile = function(fileItem) | |
| 146 | - { | |
| 147 | - console.info('onAfterAddingFile', fileItem); | |
| 148 | - console.log(self.uploader.queue.length); | |
| 149 | - if (self.uploader.queue.length > 1) | |
| 150 | - self.uploader.removeFromQueue(0); | |
| 151 | - }; | |
| 152 | - self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 153 | - { | |
| 154 | - console.info('onSuccessItem', fileItem, response, status, headers); | |
| 155 | - }; | |
| 156 | - self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 157 | - { | |
| 158 | - console.info('onErrorItem', fileItem, response, status, headers); | |
| 159 | - }; | |
| 160 | - | |
| 161 | -}]); | |
| 162 | - | |
| 163 | - | |
| 164 | -angular.module('ScheduleApp').controller('BusInfoManageListCtrl', ['BusInfoManageService','$scope', function(busInfoManageService, $scope) { | |
| 165 | - var self = this; | |
| 166 | - self.pageInfo = { | |
| 167 | - totalItems : 0, | |
| 168 | - currentPage : 1, | |
| 169 | - infos: [] | |
| 170 | - }; | |
| 171 | - | |
| 172 | - // 初始创建的时候,获取一次列表数据 | |
| 173 | - busInfoManageService.getPage().then( | |
| 174 | - function(result) { | |
| 175 | - self.pageInfo.totalItems = result.totalElements; | |
| 176 | - self.pageInfo.currentPage = result.number + 1; | |
| 177 | - self.pageInfo.infos = result.content; | |
| 178 | - busInfoManageService.setCurrentPageNo(result.number + 1); | |
| 179 | - }, | |
| 180 | - function(result) { | |
| 181 | - alert("出错啦!"); | |
| 182 | - } | |
| 183 | - ); | |
| 184 | - | |
| 185 | - //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 186 | - // alert("dfdfdf"); | |
| 187 | - //}); | |
| 188 | - | |
| 189 | - // 翻页的时候调用 | |
| 190 | - self.pageChanaged = function() { | |
| 191 | - busInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 192 | - busInfoManageService.getPage().then( | |
| 193 | - function(result) { | |
| 194 | - self.pageInfo.totalItems = result.totalElements; | |
| 195 | - self.pageInfo.currentPage = result.number + 1; | |
| 196 | - self.pageInfo.infos = result.content; | |
| 197 | - busInfoManageService.setCurrentPageNo(result.number + 1); | |
| 198 | - }, | |
| 199 | - function(result) { | |
| 200 | - alert("出错啦!"); | |
| 201 | - } | |
| 202 | - ); | |
| 203 | - }; | |
| 204 | - // 获取查询条件数据 | |
| 205 | - self.searchCondition = function() { | |
| 206 | - return busInfoManageService.getSearchCondition(); | |
| 207 | - }; | |
| 208 | - // 重置查询条件 | |
| 209 | - self.resetSearchCondition = function() { | |
| 210 | - busInfoManageService.resetSearchCondition(); | |
| 211 | - self.pageInfo.currentPage = 1; | |
| 212 | - self.pageChanaged(); | |
| 213 | - }; | |
| 214 | -}]); | |
| 215 | - | |
| 216 | -angular.module('ScheduleApp').controller('BusInfoManageFormCtrl', ['BusInfoManageService', '$stateParams', '$state', function(busInfoManageService, $stateParams, $state) { | |
| 217 | - var self = this; | |
| 218 | - | |
| 219 | - // 报废日期 日期控件开关 | |
| 220 | - self.scrapDateOpen = false; | |
| 221 | - self.scrapDate_open = function() { | |
| 222 | - self.scrapDateOpen = true; | |
| 223 | - }; | |
| 224 | - | |
| 225 | - // 启用日期 日期控件开关 | |
| 226 | - self.openDateOpen = false; | |
| 227 | - self.openDate_open = function() { | |
| 228 | - self.openDateOpen = true; | |
| 229 | - }; | |
| 230 | - // 取消日期 日期控件开关 | |
| 231 | - self.closeDateOpen = false; | |
| 232 | - self.closeDate_open = function() { | |
| 233 | - self.closeDateOpen = true; | |
| 234 | - }; | |
| 235 | - | |
| 236 | - // 欲保存的busInfo信息,绑定 | |
| 237 | - self.busInfoForSave = {}; | |
| 238 | - | |
| 239 | - // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 240 | - var id = $stateParams.id; | |
| 241 | - if (id) { | |
| 242 | - self.busInfoForSave.id = id; | |
| 243 | - busInfoManageService.getDetail(id).then( | |
| 244 | - function(result) { | |
| 245 | - var key; | |
| 246 | - for (key in result) { | |
| 247 | - self.busInfoForSave[key] = result[key]; | |
| 248 | - } | |
| 249 | - }, | |
| 250 | - function(result) { | |
| 251 | - alert("出错啦!"); | |
| 252 | - } | |
| 253 | - ); | |
| 254 | - } | |
| 255 | - | |
| 256 | - // 提交方法 | |
| 257 | - self.submit = function() { | |
| 258 | - console.log(self.busInfoForSave); | |
| 259 | - //if (self.busInfoForSave) { | |
| 260 | - // delete $stateParams.id; | |
| 261 | - //} | |
| 262 | - busInfoManageService.saveDetail(self.busInfoForSave).then( | |
| 263 | - function(result) { | |
| 264 | - // TODO:弹出框方式以后改 | |
| 265 | - if (result.status == 'SUCCESS') { | |
| 266 | - alert("保存成功!"); | |
| 267 | - $state.go("busInfoManage"); | |
| 268 | - } else { | |
| 269 | - alert("保存异常!"); | |
| 270 | - } | |
| 271 | - }, | |
| 272 | - function(result) { | |
| 273 | - // TODO:弹出框方式以后改 | |
| 274 | - alert("出错啦!"); | |
| 275 | - } | |
| 276 | - ); | |
| 277 | - }; | |
| 278 | - | |
| 279 | -}]); | |
| 280 | - | |
| 281 | -angular.module('ScheduleApp').controller('BusInfoManageDetailCtrl', ['BusInfoManageService', '$stateParams', function(busInfoManageService, $stateParams) { | |
| 282 | - var self = this; | |
| 283 | - self.title = ""; | |
| 284 | - self.busInfoForDetail = {}; | |
| 285 | - self.busInfoForDetail.id = $stateParams.id; | |
| 286 | - | |
| 287 | - // 当转向到此页面时,就获取明细信息并绑定 | |
| 288 | - busInfoManageService.getDetail($stateParams.id).then( | |
| 289 | - function(result) { | |
| 290 | - var key; | |
| 291 | - for (key in result) { | |
| 292 | - self.busInfoForDetail[key] = result[key]; | |
| 293 | - } | |
| 294 | - | |
| 295 | - self.title = "车辆 " + self.busInfoForDetail.insideCode + " 详细信息"; | |
| 296 | - }, | |
| 297 | - function(result) { | |
| 298 | - // TODO:弹出框方式以后改 | |
| 299 | - alert("出错啦!"); | |
| 300 | - } | |
| 301 | - ); | |
| 1 | +// 车辆基础信息维护 service controller等写在一起 | |
| 2 | + | |
| 3 | +angular.module('ScheduleApp').factory('BusInfoManageService', ['BusInfoManageService_g', function(service) { | |
| 4 | + | |
| 5 | + /** 当前的查询条件信息 */ | |
| 6 | + var currentSearchCondition = { | |
| 7 | + "carCode_like" : "", | |
| 8 | + "insideCode_like" : "", | |
| 9 | + "equipmentCode_like" : "", | |
| 10 | + "carPlate_like" : "" | |
| 11 | + }; | |
| 12 | + | |
| 13 | + /** 当前第几页 */ | |
| 14 | + var currentPageNo = 1; | |
| 15 | + return { | |
| 16 | + /** | |
| 17 | + * 获取查询条件信息, | |
| 18 | + * 用于给controller用来和页面数据绑定。 | |
| 19 | + */ | |
| 20 | + getSearchCondition: function() { | |
| 21 | + return currentSearchCondition; | |
| 22 | + }, | |
| 23 | + /** | |
| 24 | + * 重置查询条件信息。 | |
| 25 | + */ | |
| 26 | + resetSearchCondition: function() { | |
| 27 | + var key; | |
| 28 | + for (key in currentSearchCondition) { | |
| 29 | + currentSearchCondition[key] = undefined; | |
| 30 | + } | |
| 31 | + currentPageNo = 1; | |
| 32 | + }, | |
| 33 | + /** | |
| 34 | + * 设置当前页码。 | |
| 35 | + * @param cpn 从1开始,后台是从0开始的 | |
| 36 | + */ | |
| 37 | + setCurrentPageNo: function(cpn) { | |
| 38 | + currentPageNo = cpn; | |
| 39 | + }, | |
| 40 | + /** | |
| 41 | + * 组装查询参数,返回一个promise查询结果。 | |
| 42 | + * @param params 查询参数 | |
| 43 | + * @return 返回一个 promise | |
| 44 | + */ | |
| 45 | + getPage: function() { | |
| 46 | + var params = currentSearchCondition; // 查询条件 | |
| 47 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 48 | + return service.rest.list(params).$promise; | |
| 49 | + }, | |
| 50 | + /** | |
| 51 | + * 获取明细信息。 | |
| 52 | + * @param id 车辆id | |
| 53 | + * @return 返回一个 promise | |
| 54 | + */ | |
| 55 | + getDetail: function(id) { | |
| 56 | + var params = {id: id}; | |
| 57 | + return service.rest.get(params).$promise; | |
| 58 | + }, | |
| 59 | + /** | |
| 60 | + * 保存信息。 | |
| 61 | + * @param obj 车辆详细信息 | |
| 62 | + * @return 返回一个 promise | |
| 63 | + */ | |
| 64 | + saveDetail: function(obj) { | |
| 65 | + return service.rest.save(obj).$promise; | |
| 66 | + }, | |
| 67 | + /** | |
| 68 | + * 数据导出。 | |
| 69 | + * @returns {*|Function|promise|n} | |
| 70 | + */ | |
| 71 | + dataExport: function() { | |
| 72 | + return service.dataTools.dataExport().$promise; | |
| 73 | + } | |
| 74 | + }; | |
| 75 | +}]); | |
| 76 | + | |
| 77 | +angular.module('ScheduleApp').controller('BusInfoManageCtrl', [ | |
| 78 | + 'BusInfoManageService','$state', '$uibModal', 'FileDownload_g', | |
| 79 | + function(busInfoManageService, $state, $uibModal, fileDownload) { | |
| 80 | + var self = this; | |
| 81 | + | |
| 82 | + // 切换到form状态 | |
| 83 | + self.goForm = function() { | |
| 84 | + //alert("切换"); | |
| 85 | + $state.go("busInfoManage_form"); | |
| 86 | + }; | |
| 87 | + | |
| 88 | + // 导入excel | |
| 89 | + self.importData = function() { | |
| 90 | + // large方式弹出模态对话框 | |
| 91 | + var modalInstance = $uibModal.open({ | |
| 92 | + templateUrl: '/pages/scheduleApp/module/basicInfo/busInfoManage/dataImport.html', | |
| 93 | + size: "lg", | |
| 94 | + animation: true, | |
| 95 | + backdrop: 'static', | |
| 96 | + resolve: { | |
| 97 | + // 可以传值给controller | |
| 98 | + }, | |
| 99 | + windowClass: 'center-modal', | |
| 100 | + controller: "BusInfoManageToolsCtrl", | |
| 101 | + controllerAs: "ctrl", | |
| 102 | + bindToController: true | |
| 103 | + }); | |
| 104 | + modalInstance.result.then( | |
| 105 | + function() { | |
| 106 | + console.log("dataImport.html打开"); | |
| 107 | + }, | |
| 108 | + function() { | |
| 109 | + console.log("dataImport.html消失"); | |
| 110 | + } | |
| 111 | + ); | |
| 112 | + }; | |
| 113 | + | |
| 114 | + // 导出excel | |
| 115 | + self.exportData = function() { | |
| 116 | + busInfoManageService.dataExport().then( | |
| 117 | + function(result) { | |
| 118 | + fileDownload.downloadFile(result.data, "application/octet-stream", "车辆基础信息.xls"); | |
| 119 | + }, | |
| 120 | + function(result) { | |
| 121 | + console.log("exportData failed:" + result); | |
| 122 | + } | |
| 123 | + ); | |
| 124 | + }; | |
| 125 | + }]); | |
| 126 | + | |
| 127 | +angular.module('ScheduleApp').controller('BusInfoManageToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | |
| 128 | + var self = this; | |
| 129 | + self.data = "TODO"; | |
| 130 | + | |
| 131 | + // 关闭窗口 | |
| 132 | + self.close = function() { | |
| 133 | + $modalInstance.dismiss("cancel"); | |
| 134 | + }; | |
| 135 | + | |
| 136 | + self.clearInputFile = function() { | |
| 137 | + angular.element("input[type='file']").val(null); | |
| 138 | + }; | |
| 139 | + | |
| 140 | + // 上传文件组件 | |
| 141 | + self.uploader = new FileUploader({ | |
| 142 | + url: "/cars/dataImport", | |
| 143 | + filters: [] // 用于过滤文件,比如只允许导入excel | |
| 144 | + }); | |
| 145 | + self.uploader.onAfterAddingFile = function(fileItem) | |
| 146 | + { | |
| 147 | + console.info('onAfterAddingFile', fileItem); | |
| 148 | + console.log(self.uploader.queue.length); | |
| 149 | + if (self.uploader.queue.length > 1) | |
| 150 | + self.uploader.removeFromQueue(0); | |
| 151 | + }; | |
| 152 | + self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 153 | + { | |
| 154 | + console.info('onSuccessItem', fileItem, response, status, headers); | |
| 155 | + }; | |
| 156 | + self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 157 | + { | |
| 158 | + console.info('onErrorItem', fileItem, response, status, headers); | |
| 159 | + }; | |
| 160 | + | |
| 161 | +}]); | |
| 162 | + | |
| 163 | + | |
| 164 | +angular.module('ScheduleApp').controller('BusInfoManageListCtrl', ['BusInfoManageService','$scope', function(busInfoManageService, $scope) { | |
| 165 | + var self = this; | |
| 166 | + self.pageInfo = { | |
| 167 | + totalItems : 0, | |
| 168 | + currentPage : 1, | |
| 169 | + infos: [] | |
| 170 | + }; | |
| 171 | + | |
| 172 | + // 初始创建的时候,获取一次列表数据 | |
| 173 | + busInfoManageService.getPage().then( | |
| 174 | + function(result) { | |
| 175 | + self.pageInfo.totalItems = result.totalElements; | |
| 176 | + self.pageInfo.currentPage = result.number + 1; | |
| 177 | + self.pageInfo.infos = result.content; | |
| 178 | + busInfoManageService.setCurrentPageNo(result.number + 1); | |
| 179 | + }, | |
| 180 | + function(result) { | |
| 181 | + alert("出错啦!"); | |
| 182 | + } | |
| 183 | + ); | |
| 184 | + | |
| 185 | + //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 186 | + // alert("dfdfdf"); | |
| 187 | + //}); | |
| 188 | + | |
| 189 | + // 翻页的时候调用 | |
| 190 | + self.pageChanaged = function() { | |
| 191 | + busInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 192 | + busInfoManageService.getPage().then( | |
| 193 | + function(result) { | |
| 194 | + self.pageInfo.totalItems = result.totalElements; | |
| 195 | + self.pageInfo.currentPage = result.number + 1; | |
| 196 | + self.pageInfo.infos = result.content; | |
| 197 | + busInfoManageService.setCurrentPageNo(result.number + 1); | |
| 198 | + }, | |
| 199 | + function(result) { | |
| 200 | + alert("出错啦!"); | |
| 201 | + } | |
| 202 | + ); | |
| 203 | + }; | |
| 204 | + // 获取查询条件数据 | |
| 205 | + self.searchCondition = function() { | |
| 206 | + return busInfoManageService.getSearchCondition(); | |
| 207 | + }; | |
| 208 | + // 重置查询条件 | |
| 209 | + self.resetSearchCondition = function() { | |
| 210 | + busInfoManageService.resetSearchCondition(); | |
| 211 | + self.pageInfo.currentPage = 1; | |
| 212 | + self.pageChanaged(); | |
| 213 | + }; | |
| 214 | +}]); | |
| 215 | + | |
| 216 | +angular.module('ScheduleApp').controller('BusInfoManageFormCtrl', ['BusInfoManageService', '$stateParams', '$state', function(busInfoManageService, $stateParams, $state) { | |
| 217 | + var self = this; | |
| 218 | + | |
| 219 | + // 报废日期 日期控件开关 | |
| 220 | + self.scrapDateOpen = false; | |
| 221 | + self.scrapDate_open = function() { | |
| 222 | + self.scrapDateOpen = true; | |
| 223 | + }; | |
| 224 | + | |
| 225 | + // 启用日期 日期控件开关 | |
| 226 | + self.openDateOpen = false; | |
| 227 | + self.openDate_open = function() { | |
| 228 | + self.openDateOpen = true; | |
| 229 | + }; | |
| 230 | + // 取消日期 日期控件开关 | |
| 231 | + self.closeDateOpen = false; | |
| 232 | + self.closeDate_open = function() { | |
| 233 | + self.closeDateOpen = true; | |
| 234 | + }; | |
| 235 | + | |
| 236 | + // 欲保存的busInfo信息,绑定 | |
| 237 | + self.busInfoForSave = {}; | |
| 238 | + | |
| 239 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 240 | + var id = $stateParams.id; | |
| 241 | + if (id) { | |
| 242 | + self.busInfoForSave.id = id; | |
| 243 | + busInfoManageService.getDetail(id).then( | |
| 244 | + function(result) { | |
| 245 | + var key; | |
| 246 | + for (key in result) { | |
| 247 | + self.busInfoForSave[key] = result[key]; | |
| 248 | + } | |
| 249 | + }, | |
| 250 | + function(result) { | |
| 251 | + alert("出错啦!"); | |
| 252 | + } | |
| 253 | + ); | |
| 254 | + } | |
| 255 | + | |
| 256 | + // 提交方法 | |
| 257 | + self.submit = function() { | |
| 258 | + console.log(self.busInfoForSave); | |
| 259 | + //if (self.busInfoForSave) { | |
| 260 | + // delete $stateParams.id; | |
| 261 | + //} | |
| 262 | + busInfoManageService.saveDetail(self.busInfoForSave).then( | |
| 263 | + function(result) { | |
| 264 | + // TODO:弹出框方式以后改 | |
| 265 | + if (result.status == 'SUCCESS') { | |
| 266 | + alert("保存成功!"); | |
| 267 | + $state.go("busInfoManage"); | |
| 268 | + } else { | |
| 269 | + alert("保存异常!"); | |
| 270 | + } | |
| 271 | + }, | |
| 272 | + function(result) { | |
| 273 | + // TODO:弹出框方式以后改 | |
| 274 | + alert("出错啦!"); | |
| 275 | + } | |
| 276 | + ); | |
| 277 | + }; | |
| 278 | + | |
| 279 | +}]); | |
| 280 | + | |
| 281 | +angular.module('ScheduleApp').controller('BusInfoManageDetailCtrl', ['BusInfoManageService', '$stateParams', function(busInfoManageService, $stateParams) { | |
| 282 | + var self = this; | |
| 283 | + self.title = ""; | |
| 284 | + self.busInfoForDetail = {}; | |
| 285 | + self.busInfoForDetail.id = $stateParams.id; | |
| 286 | + | |
| 287 | + // 当转向到此页面时,就获取明细信息并绑定 | |
| 288 | + busInfoManageService.getDetail($stateParams.id).then( | |
| 289 | + function(result) { | |
| 290 | + var key; | |
| 291 | + for (key in result) { | |
| 292 | + self.busInfoForDetail[key] = result[key]; | |
| 293 | + } | |
| 294 | + | |
| 295 | + self.title = "车辆 " + self.busInfoForDetail.insideCode + " 详细信息"; | |
| 296 | + }, | |
| 297 | + function(result) { | |
| 298 | + // TODO:弹出框方式以后改 | |
| 299 | + alert("出错啦!"); | |
| 300 | + } | |
| 301 | + ); | |
| 302 | 302 | }]); |
| 303 | 303 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 车辆基础信息模块配置route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + .state("busInfoManage", { // index页面 | |
| 13 | + url: '/busInfoManage', | |
| 14 | + views: { | |
| 15 | + "": { | |
| 16 | + templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/index.html' | |
| 17 | + }, | |
| 18 | + "busInfoManage_list@busInfoManage": { | |
| 19 | + templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/list.html' | |
| 20 | + } | |
| 21 | + }, | |
| 22 | + | |
| 23 | + resolve: { | |
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 25 | + return $ocLazyLoad.load({ | |
| 26 | + name: 'busInfoManage_module', | |
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 28 | + files: [ | |
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 31 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 32 | + "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | |
| 33 | + ] | |
| 34 | + }); | |
| 35 | + }] | |
| 36 | + } | |
| 37 | + }) | |
| 38 | + .state("busInfoManage_form", { // 添加车辆form | |
| 39 | + url: '/busInfoManage_form', | |
| 40 | + views: { | |
| 41 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/form.html'} | |
| 42 | + }, | |
| 43 | + resolve: { | |
| 44 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 45 | + return $ocLazyLoad.load({ | |
| 46 | + name: 'busInfoManage_form_module', | |
| 47 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 48 | + files: [ | |
| 49 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 50 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 51 | + "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | |
| 52 | + ] | |
| 53 | + }); | |
| 54 | + }] | |
| 55 | + } | |
| 56 | + }) | |
| 57 | + .state("busInfoManage_edit", { // 修改车辆form | |
| 58 | + url: '/busInfoManage_edit/:id', | |
| 59 | + views: { | |
| 60 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/edit.html'} | |
| 61 | + }, | |
| 62 | + resolve: { | |
| 63 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 64 | + return $ocLazyLoad.load({ | |
| 65 | + name: 'busInfoManage_edit_module', | |
| 66 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 67 | + files: [ | |
| 68 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 69 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 70 | + "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | |
| 71 | + ] | |
| 72 | + }); | |
| 73 | + }] | |
| 74 | + } | |
| 75 | + }) | |
| 76 | + .state("busInfoManage_detail", { // 车辆详细信息 | |
| 77 | + url: '/busInfoManage_detail/:id', | |
| 78 | + views: { | |
| 79 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/detail.html'} | |
| 80 | + }, | |
| 81 | + resolve: { | |
| 82 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 83 | + return $ocLazyLoad.load({ | |
| 84 | + name: 'busInfoManage_detail_module', | |
| 85 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 86 | + files: [ | |
| 87 | + "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | |
| 88 | + ] | |
| 89 | + }); | |
| 90 | + }] | |
| 91 | + } | |
| 92 | + }) | |
| 93 | + } | |
| 94 | +]); | |
| 0 | 95 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/dist/deviceInfoManage.dist.html deleted
100644 → 0
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js renamed to src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js
| 1 | -// 设备信息维护 service controller 等写在一起 | |
| 2 | - | |
| 3 | -angular.module('ScheduleApp').factory('DeviceInfoManageService', ['DeviceInfoManageService_g', function(service) { | |
| 4 | - /** 当前的查询条件信息 */ | |
| 5 | - var currentSearchCondition = {}; | |
| 6 | - | |
| 7 | - /** 当前第几页 */ | |
| 8 | - var currentPageNo = 1; | |
| 9 | - | |
| 10 | - return { | |
| 11 | - /** | |
| 12 | - * 获取查询条件信息, | |
| 13 | - * 用于给controller用来和页面数据绑定。 | |
| 14 | - */ | |
| 15 | - getSearchCondition: function() { | |
| 16 | - return currentSearchCondition; | |
| 17 | - }, | |
| 18 | - /** | |
| 19 | - * 重置查询条件信息。 | |
| 20 | - */ | |
| 21 | - resetSearchCondition: function() { | |
| 22 | - var key; | |
| 23 | - for (key in currentSearchCondition) { | |
| 24 | - currentSearchCondition[key] = ""; | |
| 25 | - } | |
| 26 | - }, | |
| 27 | - /** | |
| 28 | - * 设置当前页码。 | |
| 29 | - * @param cpn 从1开始,后台是从0开始的 | |
| 30 | - */ | |
| 31 | - setCurrentPageNo: function(cpn) { | |
| 32 | - currentPageNo = cpn; | |
| 33 | - }, | |
| 34 | - /** | |
| 35 | - * 组装查询参数,返回一个promise查询结果。 | |
| 36 | - * @param params 查询参数 | |
| 37 | - * @return 返回一个 promise | |
| 38 | - */ | |
| 39 | - getPage: function() { | |
| 40 | - var params = currentSearchCondition; // 查询条件 | |
| 41 | - params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 42 | - return service.list(params).$promise; | |
| 43 | - }, | |
| 44 | - /** | |
| 45 | - * 获取明细信息。 | |
| 46 | - * @param id 车辆id | |
| 47 | - * @return 返回一个 promise | |
| 48 | - */ | |
| 49 | - getDetail: function(id) { | |
| 50 | - var params = {id: id}; | |
| 51 | - return service.get(params).$promise; | |
| 52 | - }, | |
| 53 | - /** | |
| 54 | - * 保存信息。 | |
| 55 | - * @param obj 车辆详细信息 | |
| 56 | - * @return 返回一个 promise | |
| 57 | - */ | |
| 58 | - saveDetail: function(obj) { | |
| 59 | - return service.save(obj).$promise; | |
| 60 | - }, | |
| 61 | - /** | |
| 62 | - * 删除信息。 | |
| 63 | - * @param id 主键id | |
| 64 | - * @returns {*|Function|promise|n} | |
| 65 | - */ | |
| 66 | - deleteDetail: function(id) { | |
| 67 | - return service.delete({id: id}).$promise; | |
| 68 | - } | |
| 69 | - }; | |
| 70 | - | |
| 71 | -}]); | |
| 72 | - | |
| 73 | -angular.module('ScheduleApp').controller('DeviceInfoManageCtrl', ['DeviceInfoManageService', '$state', function(deviceInfoManageService, $state) { | |
| 74 | - var self = this; | |
| 75 | - | |
| 76 | - // 切换到form状态 | |
| 77 | - self.goForm = function() { | |
| 78 | - //alert("切换"); | |
| 79 | - $state.go("deviceInfoManage_form"); | |
| 80 | - } | |
| 81 | - | |
| 82 | - | |
| 83 | -}]); | |
| 84 | - | |
| 85 | -angular.module('ScheduleApp').controller('DeviceInfoManageListCtrl', ['DeviceInfoManageService', function(deviceInfoManageService) { | |
| 86 | - var self = this; | |
| 87 | - self.pageInfo = { | |
| 88 | - totalItems : 0, | |
| 89 | - currentPage : 1, | |
| 90 | - infos: [] | |
| 91 | - }; | |
| 92 | - | |
| 93 | - // 初始创建的时候,获取一次列表数据 | |
| 94 | - deviceInfoManageService.getPage().then( | |
| 95 | - function(result) { | |
| 96 | - self.pageInfo.totalItems = result.totalElements; | |
| 97 | - self.pageInfo.currentPage = result.number + 1; | |
| 98 | - self.pageInfo.infos = result.content; | |
| 99 | - deviceInfoManageService.setCurrentPageNo(result.number + 1); | |
| 100 | - }, | |
| 101 | - function(result) { | |
| 102 | - alert("出错啦!"); | |
| 103 | - } | |
| 104 | - ); | |
| 105 | - | |
| 106 | - // 翻页的时候调用 | |
| 107 | - self.pageChanaged = function() { | |
| 108 | - deviceInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 109 | - deviceInfoManageService.getPage().then( | |
| 110 | - function(result) { | |
| 111 | - self.pageInfo.totalItems = result.totalElements; | |
| 112 | - self.pageInfo.currentPage = result.number + 1; | |
| 113 | - self.pageInfo.infos = result.content; | |
| 114 | - deviceInfoManageService.setCurrentPageNo(result.number + 1); | |
| 115 | - }, | |
| 116 | - function(result) { | |
| 117 | - alert("出错啦!"); | |
| 118 | - } | |
| 119 | - ); | |
| 120 | - }; | |
| 121 | - // 获取查询条件数据 | |
| 122 | - self.searchCondition = function() { | |
| 123 | - return deviceInfoManageService.getSearchCondition(); | |
| 124 | - }; | |
| 125 | - // 重置查询条件 | |
| 126 | - self.resetSearchCondition = function() { | |
| 127 | - deviceInfoManageService.resetSearchCondition(); | |
| 128 | - self.pageInfo.currentPage = 1; | |
| 129 | - self.pageChanaged(); | |
| 130 | - }; | |
| 131 | - | |
| 132 | - // 作废/撤销 | |
| 133 | - self.toggleCde = function(id) { | |
| 134 | - // TODO: | |
| 135 | - deviceInfoManageService.deleteDetail(id).then( | |
| 136 | - function(result) { | |
| 137 | - if (result.message) { // 暂时这样做,之后全局拦截 | |
| 138 | - alert("失败:" + result.message); | |
| 139 | - } else { | |
| 140 | - alert("成功!"); | |
| 141 | - | |
| 142 | - deviceInfoManageService.getPage().then( | |
| 143 | - function(result) { | |
| 144 | - self.pageInfo.totalItems = result.totalElements; | |
| 145 | - self.pageInfo.currentPage = result.number + 1; | |
| 146 | - self.pageInfo.infos = result.content; | |
| 147 | - deviceInfoManageService.setCurrentPageNo(result.number + 1); | |
| 148 | - }, | |
| 149 | - function(result) { | |
| 150 | - alert("出错啦!"); | |
| 151 | - } | |
| 152 | - ); | |
| 153 | - } | |
| 154 | - | |
| 155 | - }, | |
| 156 | - function(result) { | |
| 157 | - alert("出错啦!" + result); | |
| 158 | - } | |
| 159 | - ); | |
| 160 | - }; | |
| 161 | - | |
| 162 | -}]); | |
| 163 | - | |
| 164 | -angular.module('ScheduleApp').controller('DeviceInfoManageFormCtrl', ['DeviceInfoManageService', '$stateParams', '$state', function(deviceInfoManageService, $stateParams, $state) { | |
| 165 | - var self = this; | |
| 166 | - | |
| 167 | - // 启用日期 日期控件开关 | |
| 168 | - self.qyrqOpen = false; | |
| 169 | - self.qyrq_open = function() { | |
| 170 | - self.qyrqOpen = true; | |
| 171 | - }; | |
| 172 | - | |
| 173 | - // 欲保存的busInfo信息,绑定 | |
| 174 | - self.deviceInfoForSave = {}; | |
| 175 | - | |
| 176 | - // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 177 | - var id = $stateParams.id; | |
| 178 | - if (id) { | |
| 179 | - self.deviceInfoForSave.id = id; | |
| 180 | - deviceInfoManageService.getDetail(id).then( | |
| 181 | - function(result) { | |
| 182 | - var key; | |
| 183 | - for (key in result) { | |
| 184 | - self.deviceInfoForSave[key] = result[key]; | |
| 185 | - } | |
| 186 | - // 填写所有的 select 控件选中框数据 | |
| 187 | - // 公司字典 | |
| 188 | - if (self.deviceInfoForSave.gsName) { | |
| 189 | - angular.forEach(self.gses, function(data) { | |
| 190 | - if (self.deviceInfoForSave.gsName == data.gsmc) { | |
| 191 | - self.deviceInfoForSave.gs_selected = data; | |
| 192 | - } | |
| 193 | - }); | |
| 194 | - } | |
| 195 | - }, | |
| 196 | - function(result) { | |
| 197 | - alert("出错啦!"); | |
| 198 | - } | |
| 199 | - ); | |
| 200 | - } | |
| 201 | - | |
| 202 | - // 提交方法 | |
| 203 | - self.submit = function() { | |
| 204 | - console.log(self.deviceInfoForSave); | |
| 205 | - deviceInfoManageService.saveDetail(self.deviceInfoForSave).then( | |
| 206 | - function(result) { | |
| 207 | - // TODO:弹出框方式以后改 | |
| 208 | - if (result.status == 'SUCCESS') { | |
| 209 | - alert("保存成功!"); | |
| 210 | - $state.go("deviceInfoManage"); | |
| 211 | - } else { | |
| 212 | - alert("保存异常!"); | |
| 213 | - } | |
| 214 | - }, | |
| 215 | - function(result) { | |
| 216 | - // TODO:弹出框方式以后改 | |
| 217 | - alert("出错啦!"); | |
| 218 | - } | |
| 219 | - ); | |
| 220 | - }; | |
| 221 | - | |
| 222 | -}]); | |
| 223 | - | |
| 224 | -angular.module('ScheduleApp').controller('DeviceInfoManageDetailCtrl', ['DeviceInfoManageService', '$stateParams', function(deviceInfoManageService, $stateParams) { | |
| 225 | - var self = this; | |
| 226 | - self.title = ""; | |
| 227 | - self.deviceInfoForDetail = {}; | |
| 228 | - self.deviceInfoForDetail.id = $stateParams.id; | |
| 229 | - | |
| 230 | - // 当转向到此页面时,就获取明细信息并绑定 | |
| 231 | - deviceInfoManageService.getDetail($stateParams.id).then( | |
| 232 | - function(result) { | |
| 233 | - var key; | |
| 234 | - for (key in result) { | |
| 235 | - self.deviceInfoForDetail[key] = result[key]; | |
| 236 | - } | |
| 237 | - | |
| 238 | - self.title = "车辆 " + self.deviceInfoForDetail.clZbh + "设备信息"; | |
| 239 | - }, | |
| 240 | - function(result) { | |
| 241 | - // TODO:弹出框方式以后改 | |
| 242 | - alert("出错啦!"); | |
| 243 | - } | |
| 244 | - ); | |
| 1 | +// 设备信息维护 service controller 等写在一起 | |
| 2 | + | |
| 3 | +angular.module('ScheduleApp').factory('DeviceInfoManageService', ['DeviceInfoManageService_g', function(service) { | |
| 4 | + /** 当前的查询条件信息 */ | |
| 5 | + var currentSearchCondition = {}; | |
| 6 | + | |
| 7 | + /** 当前第几页 */ | |
| 8 | + var currentPageNo = 1; | |
| 9 | + | |
| 10 | + return { | |
| 11 | + /** | |
| 12 | + * 获取查询条件信息, | |
| 13 | + * 用于给controller用来和页面数据绑定。 | |
| 14 | + */ | |
| 15 | + getSearchCondition: function() { | |
| 16 | + return currentSearchCondition; | |
| 17 | + }, | |
| 18 | + /** | |
| 19 | + * 重置查询条件信息。 | |
| 20 | + */ | |
| 21 | + resetSearchCondition: function() { | |
| 22 | + var key; | |
| 23 | + for (key in currentSearchCondition) { | |
| 24 | + currentSearchCondition[key] = ""; | |
| 25 | + } | |
| 26 | + }, | |
| 27 | + /** | |
| 28 | + * 设置当前页码。 | |
| 29 | + * @param cpn 从1开始,后台是从0开始的 | |
| 30 | + */ | |
| 31 | + setCurrentPageNo: function(cpn) { | |
| 32 | + currentPageNo = cpn; | |
| 33 | + }, | |
| 34 | + /** | |
| 35 | + * 组装查询参数,返回一个promise查询结果。 | |
| 36 | + * @param params 查询参数 | |
| 37 | + * @return 返回一个 promise | |
| 38 | + */ | |
| 39 | + getPage: function() { | |
| 40 | + var params = currentSearchCondition; // 查询条件 | |
| 41 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 42 | + return service.list(params).$promise; | |
| 43 | + }, | |
| 44 | + /** | |
| 45 | + * 获取明细信息。 | |
| 46 | + * @param id 车辆id | |
| 47 | + * @return 返回一个 promise | |
| 48 | + */ | |
| 49 | + getDetail: function(id) { | |
| 50 | + var params = {id: id}; | |
| 51 | + return service.get(params).$promise; | |
| 52 | + }, | |
| 53 | + /** | |
| 54 | + * 保存信息。 | |
| 55 | + * @param obj 车辆详细信息 | |
| 56 | + * @return 返回一个 promise | |
| 57 | + */ | |
| 58 | + saveDetail: function(obj) { | |
| 59 | + return service.save(obj).$promise; | |
| 60 | + }, | |
| 61 | + /** | |
| 62 | + * 删除信息。 | |
| 63 | + * @param id 主键id | |
| 64 | + * @returns {*|Function|promise|n} | |
| 65 | + */ | |
| 66 | + deleteDetail: function(id) { | |
| 67 | + return service.delete({id: id}).$promise; | |
| 68 | + } | |
| 69 | + }; | |
| 70 | + | |
| 71 | +}]); | |
| 72 | + | |
| 73 | +angular.module('ScheduleApp').controller('DeviceInfoManageCtrl', ['DeviceInfoManageService', '$state', function(deviceInfoManageService, $state) { | |
| 74 | + var self = this; | |
| 75 | + | |
| 76 | + // 切换到form状态 | |
| 77 | + self.goForm = function() { | |
| 78 | + //alert("切换"); | |
| 79 | + $state.go("deviceInfoManage_form"); | |
| 80 | + } | |
| 81 | + | |
| 82 | + | |
| 83 | +}]); | |
| 84 | + | |
| 85 | +angular.module('ScheduleApp').controller('DeviceInfoManageListCtrl', ['DeviceInfoManageService', function(deviceInfoManageService) { | |
| 86 | + var self = this; | |
| 87 | + self.pageInfo = { | |
| 88 | + totalItems : 0, | |
| 89 | + currentPage : 1, | |
| 90 | + infos: [] | |
| 91 | + }; | |
| 92 | + | |
| 93 | + // 初始创建的时候,获取一次列表数据 | |
| 94 | + deviceInfoManageService.getPage().then( | |
| 95 | + function(result) { | |
| 96 | + self.pageInfo.totalItems = result.totalElements; | |
| 97 | + self.pageInfo.currentPage = result.number + 1; | |
| 98 | + self.pageInfo.infos = result.content; | |
| 99 | + deviceInfoManageService.setCurrentPageNo(result.number + 1); | |
| 100 | + }, | |
| 101 | + function(result) { | |
| 102 | + alert("出错啦!"); | |
| 103 | + } | |
| 104 | + ); | |
| 105 | + | |
| 106 | + // 翻页的时候调用 | |
| 107 | + self.pageChanaged = function() { | |
| 108 | + deviceInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 109 | + deviceInfoManageService.getPage().then( | |
| 110 | + function(result) { | |
| 111 | + self.pageInfo.totalItems = result.totalElements; | |
| 112 | + self.pageInfo.currentPage = result.number + 1; | |
| 113 | + self.pageInfo.infos = result.content; | |
| 114 | + deviceInfoManageService.setCurrentPageNo(result.number + 1); | |
| 115 | + }, | |
| 116 | + function(result) { | |
| 117 | + alert("出错啦!"); | |
| 118 | + } | |
| 119 | + ); | |
| 120 | + }; | |
| 121 | + // 获取查询条件数据 | |
| 122 | + self.searchCondition = function() { | |
| 123 | + return deviceInfoManageService.getSearchCondition(); | |
| 124 | + }; | |
| 125 | + // 重置查询条件 | |
| 126 | + self.resetSearchCondition = function() { | |
| 127 | + deviceInfoManageService.resetSearchCondition(); | |
| 128 | + self.pageInfo.currentPage = 1; | |
| 129 | + self.pageChanaged(); | |
| 130 | + }; | |
| 131 | + | |
| 132 | + // 作废/撤销 | |
| 133 | + self.toggleCde = function(id) { | |
| 134 | + // TODO: | |
| 135 | + deviceInfoManageService.deleteDetail(id).then( | |
| 136 | + function(result) { | |
| 137 | + if (result.message) { // 暂时这样做,之后全局拦截 | |
| 138 | + alert("失败:" + result.message); | |
| 139 | + } else { | |
| 140 | + alert("成功!"); | |
| 141 | + | |
| 142 | + deviceInfoManageService.getPage().then( | |
| 143 | + function(result) { | |
| 144 | + self.pageInfo.totalItems = result.totalElements; | |
| 145 | + self.pageInfo.currentPage = result.number + 1; | |
| 146 | + self.pageInfo.infos = result.content; | |
| 147 | + deviceInfoManageService.setCurrentPageNo(result.number + 1); | |
| 148 | + }, | |
| 149 | + function(result) { | |
| 150 | + alert("出错啦!"); | |
| 151 | + } | |
| 152 | + ); | |
| 153 | + } | |
| 154 | + | |
| 155 | + }, | |
| 156 | + function(result) { | |
| 157 | + alert("出错啦!" + result); | |
| 158 | + } | |
| 159 | + ); | |
| 160 | + }; | |
| 161 | + | |
| 162 | +}]); | |
| 163 | + | |
| 164 | +angular.module('ScheduleApp').controller('DeviceInfoManageFormCtrl', ['DeviceInfoManageService', '$stateParams', '$state', function(deviceInfoManageService, $stateParams, $state) { | |
| 165 | + var self = this; | |
| 166 | + | |
| 167 | + // 启用日期 日期控件开关 | |
| 168 | + self.qyrqOpen = false; | |
| 169 | + self.qyrq_open = function() { | |
| 170 | + self.qyrqOpen = true; | |
| 171 | + }; | |
| 172 | + | |
| 173 | + // 欲保存的busInfo信息,绑定 | |
| 174 | + self.deviceInfoForSave = {}; | |
| 175 | + | |
| 176 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 177 | + var id = $stateParams.id; | |
| 178 | + if (id) { | |
| 179 | + self.deviceInfoForSave.id = id; | |
| 180 | + deviceInfoManageService.getDetail(id).then( | |
| 181 | + function(result) { | |
| 182 | + var key; | |
| 183 | + for (key in result) { | |
| 184 | + self.deviceInfoForSave[key] = result[key]; | |
| 185 | + } | |
| 186 | + // 填写所有的 select 控件选中框数据 | |
| 187 | + // 公司字典 | |
| 188 | + if (self.deviceInfoForSave.gsName) { | |
| 189 | + angular.forEach(self.gses, function(data) { | |
| 190 | + if (self.deviceInfoForSave.gsName == data.gsmc) { | |
| 191 | + self.deviceInfoForSave.gs_selected = data; | |
| 192 | + } | |
| 193 | + }); | |
| 194 | + } | |
| 195 | + }, | |
| 196 | + function(result) { | |
| 197 | + alert("出错啦!"); | |
| 198 | + } | |
| 199 | + ); | |
| 200 | + } | |
| 201 | + | |
| 202 | + // 提交方法 | |
| 203 | + self.submit = function() { | |
| 204 | + console.log(self.deviceInfoForSave); | |
| 205 | + deviceInfoManageService.saveDetail(self.deviceInfoForSave).then( | |
| 206 | + function(result) { | |
| 207 | + // TODO:弹出框方式以后改 | |
| 208 | + if (result.status == 'SUCCESS') { | |
| 209 | + alert("保存成功!"); | |
| 210 | + $state.go("deviceInfoManage"); | |
| 211 | + } else { | |
| 212 | + alert("保存异常!"); | |
| 213 | + } | |
| 214 | + }, | |
| 215 | + function(result) { | |
| 216 | + // TODO:弹出框方式以后改 | |
| 217 | + alert("出错啦!"); | |
| 218 | + } | |
| 219 | + ); | |
| 220 | + }; | |
| 221 | + | |
| 222 | +}]); | |
| 223 | + | |
| 224 | +angular.module('ScheduleApp').controller('DeviceInfoManageDetailCtrl', ['DeviceInfoManageService', '$stateParams', function(deviceInfoManageService, $stateParams) { | |
| 225 | + var self = this; | |
| 226 | + self.title = ""; | |
| 227 | + self.deviceInfoForDetail = {}; | |
| 228 | + self.deviceInfoForDetail.id = $stateParams.id; | |
| 229 | + | |
| 230 | + // 当转向到此页面时,就获取明细信息并绑定 | |
| 231 | + deviceInfoManageService.getDetail($stateParams.id).then( | |
| 232 | + function(result) { | |
| 233 | + var key; | |
| 234 | + for (key in result) { | |
| 235 | + self.deviceInfoForDetail[key] = result[key]; | |
| 236 | + } | |
| 237 | + | |
| 238 | + self.title = "车辆 " + self.deviceInfoForDetail.clZbh + "设备信息"; | |
| 239 | + }, | |
| 240 | + function(result) { | |
| 241 | + // TODO:弹出框方式以后改 | |
| 242 | + alert("出错啦!"); | |
| 243 | + } | |
| 244 | + ); | |
| 245 | 245 | }]); |
| 246 | 246 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 车辆设备信息模块配置route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + .state("deviceInfoManage", { // index页面 | |
| 13 | + url: '/deviceInfoManage', | |
| 14 | + views: { | |
| 15 | + "": { | |
| 16 | + templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/index.html' | |
| 17 | + }, | |
| 18 | + "deviceInfoManage_list@deviceInfoManage": { | |
| 19 | + templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/list.html' | |
| 20 | + } | |
| 21 | + }, | |
| 22 | + | |
| 23 | + resolve: { | |
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 25 | + return $ocLazyLoad.load({ | |
| 26 | + name: 'deviceInfoManage_module', | |
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 28 | + files: [ | |
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 31 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | |
| 32 | + ] | |
| 33 | + }); | |
| 34 | + }] | |
| 35 | + } | |
| 36 | + }) | |
| 37 | + .state("deviceInfoManage_form", { // 添加设备信息form | |
| 38 | + url: '/deviceInfoManage_form', | |
| 39 | + views: { | |
| 40 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/form.html'} | |
| 41 | + }, | |
| 42 | + resolve: { | |
| 43 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 44 | + return $ocLazyLoad.load({ | |
| 45 | + name: 'deviceInfoManage_form_module', | |
| 46 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 47 | + files: [ | |
| 48 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 49 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 50 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | |
| 51 | + ] | |
| 52 | + }); | |
| 53 | + }] | |
| 54 | + } | |
| 55 | + }) | |
| 56 | + .state("deviceInfoManage_edit", { // 修改设备信息form | |
| 57 | + url: '/deviceInfoManage_edit/:id', | |
| 58 | + views: { | |
| 59 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/edit.html'} | |
| 60 | + }, | |
| 61 | + resolve: { | |
| 62 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 63 | + return $ocLazyLoad.load({ | |
| 64 | + name: 'deviceInfoManage_edit_module', | |
| 65 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 66 | + files: [ | |
| 67 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 68 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 69 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | |
| 70 | + ] | |
| 71 | + }); | |
| 72 | + }] | |
| 73 | + } | |
| 74 | + }) | |
| 75 | + .state("deviceInfoManage_detail", { // 详细信息页面 | |
| 76 | + url: '/deviceInfoManage_detail/:id', | |
| 77 | + views: { | |
| 78 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/detail.html'} | |
| 79 | + }, | |
| 80 | + resolve: { | |
| 81 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 82 | + return $ocLazyLoad.load({ | |
| 83 | + name: 'deviceInfoManage_detail_module', | |
| 84 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 85 | + files: [ | |
| 86 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | |
| 87 | + ] | |
| 88 | + }); | |
| 89 | + }] | |
| 90 | + } | |
| 91 | + }) | |
| 92 | + | |
| 93 | + } | |
| 94 | +]); | |
| 0 | 95 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/dist/employeeInfoManage.dist.html deleted
100644 → 0
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js renamed to src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js
| 1 | -// 人员信息管理 service controller等写在一起 | |
| 2 | - | |
| 3 | -angular.module('ScheduleApp').factory('EmployeeInfoManageService', ['EmployeeInfoManageService_g', function(service) { | |
| 4 | - | |
| 5 | - /** 当前的查询条件信息 */ | |
| 6 | - var currentSearchCondition = { | |
| 7 | - //"carCode_like" : "", | |
| 8 | - //"insideCode_like" : "", | |
| 9 | - //"equipmentCode_like" : "", | |
| 10 | - //"carPlate_like" : "" | |
| 11 | - }; | |
| 12 | - | |
| 13 | - /** 当前第几页 */ | |
| 14 | - var currentPageNo = 1; | |
| 15 | - | |
| 16 | - return { | |
| 17 | - /** | |
| 18 | - * 获取查询条件信息, | |
| 19 | - * 用于给controller用来和页面数据绑定。 | |
| 20 | - */ | |
| 21 | - getSearchCondition: function() { | |
| 22 | - return currentSearchCondition; | |
| 23 | - }, | |
| 24 | - /** | |
| 25 | - * 重置查询条件信息。 | |
| 26 | - */ | |
| 27 | - resetSearchCondition: function() { | |
| 28 | - var key; | |
| 29 | - for (key in currentSearchCondition) { | |
| 30 | - currentSearchCondition[key] = undefined; | |
| 31 | - } | |
| 32 | - currentPageNo = 1; | |
| 33 | - }, | |
| 34 | - /** | |
| 35 | - * 设置当前页码。 | |
| 36 | - * @param cpn 从1开始,后台是从0开始的 | |
| 37 | - */ | |
| 38 | - setCurrentPageNo: function(cpn) { | |
| 39 | - currentPageNo = cpn; | |
| 40 | - }, | |
| 41 | - /** | |
| 42 | - * 组装查询参数,返回一个promise查询结果。 | |
| 43 | - * @param params 查询参数 | |
| 44 | - * @return 返回一个 promise | |
| 45 | - */ | |
| 46 | - getPage: function() { | |
| 47 | - var params = currentSearchCondition; // 查询条件 | |
| 48 | - params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 49 | - return service.rest.list(params).$promise; | |
| 50 | - }, | |
| 51 | - /** | |
| 52 | - * 获取明细信息。 | |
| 53 | - * @param id 车辆id | |
| 54 | - * @return 返回一个 promise | |
| 55 | - */ | |
| 56 | - getDetail: function(id) { | |
| 57 | - var params = {id: id}; | |
| 58 | - return service.rest.get(params).$promise; | |
| 59 | - }, | |
| 60 | - /** | |
| 61 | - * 保存信息。 | |
| 62 | - * @param obj 车辆详细信息 | |
| 63 | - * @return 返回一个 promise | |
| 64 | - */ | |
| 65 | - saveDetail: function(obj) { | |
| 66 | - return service.rest.save(obj).$promise; | |
| 67 | - }, | |
| 68 | - /** | |
| 69 | - * 数据导出。 | |
| 70 | - * @returns {*|Function|promise|n} | |
| 71 | - */ | |
| 72 | - dataExport: function() { | |
| 73 | - return service.dataTools.dataExport().$promise; | |
| 74 | - } | |
| 75 | - } | |
| 76 | - | |
| 77 | -}]); | |
| 78 | - | |
| 79 | -angular.module('ScheduleApp').controller('EmployeeInfoManageCtrl', [ | |
| 80 | - 'EmployeeInfoManageService', '$state', '$uibModal', 'FileDownload_g', | |
| 81 | - function(employeeInfoManageService, $state, $uibModal, fileDownload) { | |
| 82 | - var self = this; | |
| 83 | - | |
| 84 | - // 切换到form状态 | |
| 85 | - self.goForm = function() { | |
| 86 | - //alert("切换"); | |
| 87 | - $state.go("employeeInfoManage_form"); | |
| 88 | - } | |
| 89 | - | |
| 90 | - // 导入excel | |
| 91 | - self.importData = function() { | |
| 92 | - // large方式弹出模态对话框 | |
| 93 | - var modalInstance = $uibModal.open({ | |
| 94 | - templateUrl: '/pages/scheduleApp/module/basicInfo/employeeInfoManage/dataImport.html', | |
| 95 | - size: "lg", | |
| 96 | - animation: true, | |
| 97 | - backdrop: 'static', | |
| 98 | - resolve: { | |
| 99 | - // 可以传值给controller | |
| 100 | - }, | |
| 101 | - windowClass: 'center-modal', | |
| 102 | - controller: "EmployInfoManageToolsCtrl", | |
| 103 | - controllerAs: "ctrl", | |
| 104 | - bindToController: true | |
| 105 | - }); | |
| 106 | - modalInstance.result.then( | |
| 107 | - function() { | |
| 108 | - console.log("dataImport.html打开"); | |
| 109 | - }, | |
| 110 | - function() { | |
| 111 | - console.log("dataImport.html消失"); | |
| 112 | - } | |
| 113 | - ); | |
| 114 | - }; | |
| 115 | - | |
| 116 | - // 导出excel | |
| 117 | - self.exportData = function() { | |
| 118 | - employeeInfoManageService.dataExport().then( | |
| 119 | - function(result) { | |
| 120 | - fileDownload.downloadFile(result.data, "application/octet-stream", "人员基础信息.xls"); | |
| 121 | - }, | |
| 122 | - function(result) { | |
| 123 | - console.log("exportData failed:" + result); | |
| 124 | - } | |
| 125 | - ); | |
| 126 | - }; | |
| 127 | -}]); | |
| 128 | - | |
| 129 | -angular.module('ScheduleApp').controller('EmployInfoManageToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | |
| 130 | - var self = this; | |
| 131 | - | |
| 132 | - // 关闭窗口 | |
| 133 | - self.close = function() { | |
| 134 | - $modalInstance.dismiss("cancel"); | |
| 135 | - }; | |
| 136 | - | |
| 137 | - self.clearInputFile = function() { | |
| 138 | - angular.element("input[type='file']").val(null); | |
| 139 | - }; | |
| 140 | - | |
| 141 | - // 上传文件组件 | |
| 142 | - self.uploader = new FileUploader({ | |
| 143 | - url: "/personnel/dataImport", | |
| 144 | - filters: [] // 用于过滤文件,比如只允许导入excel | |
| 145 | - }); | |
| 146 | - self.uploader.onAfterAddingFile = function(fileItem) | |
| 147 | - { | |
| 148 | - console.info('onAfterAddingFile', fileItem); | |
| 149 | - console.log(self.uploader.queue.length); | |
| 150 | - if (self.uploader.queue.length > 1) | |
| 151 | - self.uploader.removeFromQueue(0); | |
| 152 | - }; | |
| 153 | - self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 154 | - { | |
| 155 | - console.info('onSuccessItem', fileItem, response, status, headers); | |
| 156 | - }; | |
| 157 | - self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 158 | - { | |
| 159 | - console.info('onErrorItem', fileItem, response, status, headers); | |
| 160 | - }; | |
| 161 | - | |
| 162 | -}]); | |
| 163 | - | |
| 164 | -angular.module('ScheduleApp').controller('EmployeeInfoManageListCtrl', ['EmployeeInfoManageService', function(employeeInfoManageService) { | |
| 165 | - var self = this; | |
| 166 | - self.pageInfo = { | |
| 167 | - totalItems : 0, | |
| 168 | - currentPage : 1, | |
| 169 | - infos: [] | |
| 170 | - }; | |
| 171 | - | |
| 172 | - // 初始创建的时候,获取一次列表数据 | |
| 173 | - employeeInfoManageService.getPage().then( | |
| 174 | - function(result) { | |
| 175 | - self.pageInfo.totalItems = result.totalElements; | |
| 176 | - self.pageInfo.currentPage = result.number + 1; | |
| 177 | - self.pageInfo.infos = result.content; | |
| 178 | - employeeInfoManageService.setCurrentPageNo(result.number + 1); | |
| 179 | - }, | |
| 180 | - function(result) { | |
| 181 | - alert("出错啦!"); | |
| 182 | - } | |
| 183 | - ); | |
| 184 | - | |
| 185 | - //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 186 | - // alert("dfdfdf"); | |
| 187 | - //}); | |
| 188 | - | |
| 189 | - // 翻页的时候调用 | |
| 190 | - self.pageChanaged = function() { | |
| 191 | - employeeInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 192 | - employeeInfoManageService.getPage().then( | |
| 193 | - function(result) { | |
| 194 | - self.pageInfo.totalItems = result.totalElements; | |
| 195 | - self.pageInfo.currentPage = result.number + 1; | |
| 196 | - self.pageInfo.infos = result.content; | |
| 197 | - employeeInfoManageService.setCurrentPageNo(result.number + 1); | |
| 198 | - }, | |
| 199 | - function(result) { | |
| 200 | - alert("出错啦!"); | |
| 201 | - } | |
| 202 | - ); | |
| 203 | - }; | |
| 204 | - // 获取查询条件数据 | |
| 205 | - self.searchCondition = function() { | |
| 206 | - return employeeInfoManageService.getSearchCondition(); | |
| 207 | - }; | |
| 208 | - // 重置查询条件 | |
| 209 | - self.resetSearchCondition = function() { | |
| 210 | - employeeInfoManageService.resetSearchCondition(); | |
| 211 | - self.pageInfo.currentPage = 1; | |
| 212 | - self.pageChanaged(); | |
| 213 | - }; | |
| 214 | -}]); | |
| 215 | - | |
| 216 | -angular.module('ScheduleApp').controller('EmployeeInfoManageFormCtrl', ['EmployeeInfoManageService', '$stateParams', '$state', function(employeeInfoManageService, $stateParams, $state) { | |
| 217 | - var self = this; | |
| 218 | - | |
| 219 | - // 欲保存的busInfo信息,绑定 | |
| 220 | - self.employeeInfoForSave = {}; | |
| 221 | - | |
| 222 | - // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 223 | - var id = $stateParams.id; | |
| 224 | - if (id) { | |
| 225 | - self.employeeInfoForSave.id = id; | |
| 226 | - employeeInfoManageService.getDetail(id).then( | |
| 227 | - function(result) { | |
| 228 | - var key; | |
| 229 | - for (key in result) { | |
| 230 | - self.employeeInfoForSave[key] = result[key]; | |
| 231 | - } | |
| 232 | - }, | |
| 233 | - function(result) { | |
| 234 | - alert("出错啦!"); | |
| 235 | - } | |
| 236 | - ); | |
| 237 | - } | |
| 238 | - | |
| 239 | - // 提交方法 | |
| 240 | - self.submit = function() { | |
| 241 | - console.log(self.employeeInfoForSave); | |
| 242 | - employeeInfoManageService.saveDetail(self.employeeInfoForSave).then( | |
| 243 | - function(result) { | |
| 244 | - // TODO:弹出框方式以后改 | |
| 245 | - if (result.status == 'SUCCESS') { | |
| 246 | - alert("保存成功!"); | |
| 247 | - $state.go("employeeInfoManage"); | |
| 248 | - } else { | |
| 249 | - alert("保存异常!"); | |
| 250 | - } | |
| 251 | - }, | |
| 252 | - function(result) { | |
| 253 | - // TODO:弹出框方式以后改 | |
| 254 | - alert("出错啦!"); | |
| 255 | - } | |
| 256 | - ); | |
| 257 | - }; | |
| 258 | - | |
| 259 | - | |
| 260 | -}]); | |
| 261 | - | |
| 262 | -angular.module('ScheduleApp').controller('EmployeeInfoManageDetailCtrl', ['EmployeeInfoManageService', '$stateParams', function(employeeInfoManageService, $stateParams) { | |
| 263 | - var self = this; | |
| 264 | - self.title = ""; | |
| 265 | - self.employeeInfoForDetail = {}; | |
| 266 | - self.employeeInfoForDetail.id = $stateParams.id; | |
| 267 | - | |
| 268 | - // 当转向到此页面时,就获取明细信息并绑定 | |
| 269 | - employeeInfoManageService.getDetail($stateParams.id).then( | |
| 270 | - function(result) { | |
| 271 | - var key; | |
| 272 | - for (key in result) { | |
| 273 | - self.employeeInfoForDetail[key] = result[key]; | |
| 274 | - } | |
| 275 | - | |
| 276 | - self.title = "员工 " + self.employeeInfoForDetail.personnelName + " 详细信息"; | |
| 277 | - }, | |
| 278 | - function(result) { | |
| 279 | - // TODO:弹出框方式以后改 | |
| 280 | - alert("出错啦!"); | |
| 281 | - } | |
| 282 | - ); | |
| 283 | -}]); | |
| 284 | - | |
| 1 | +// 人员信息管理 service controller等写在一起 | |
| 2 | + | |
| 3 | +angular.module('ScheduleApp').factory('EmployeeInfoManageService', ['EmployeeInfoManageService_g', function(service) { | |
| 4 | + | |
| 5 | + /** 当前的查询条件信息 */ | |
| 6 | + var currentSearchCondition = { | |
| 7 | + //"carCode_like" : "", | |
| 8 | + //"insideCode_like" : "", | |
| 9 | + //"equipmentCode_like" : "", | |
| 10 | + //"carPlate_like" : "" | |
| 11 | + }; | |
| 12 | + | |
| 13 | + /** 当前第几页 */ | |
| 14 | + var currentPageNo = 1; | |
| 15 | + | |
| 16 | + return { | |
| 17 | + /** | |
| 18 | + * 获取查询条件信息, | |
| 19 | + * 用于给controller用来和页面数据绑定。 | |
| 20 | + */ | |
| 21 | + getSearchCondition: function() { | |
| 22 | + return currentSearchCondition; | |
| 23 | + }, | |
| 24 | + /** | |
| 25 | + * 重置查询条件信息。 | |
| 26 | + */ | |
| 27 | + resetSearchCondition: function() { | |
| 28 | + var key; | |
| 29 | + for (key in currentSearchCondition) { | |
| 30 | + currentSearchCondition[key] = undefined; | |
| 31 | + } | |
| 32 | + currentPageNo = 1; | |
| 33 | + }, | |
| 34 | + /** | |
| 35 | + * 设置当前页码。 | |
| 36 | + * @param cpn 从1开始,后台是从0开始的 | |
| 37 | + */ | |
| 38 | + setCurrentPageNo: function(cpn) { | |
| 39 | + currentPageNo = cpn; | |
| 40 | + }, | |
| 41 | + /** | |
| 42 | + * 组装查询参数,返回一个promise查询结果。 | |
| 43 | + * @param params 查询参数 | |
| 44 | + * @return 返回一个 promise | |
| 45 | + */ | |
| 46 | + getPage: function() { | |
| 47 | + var params = currentSearchCondition; // 查询条件 | |
| 48 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 49 | + return service.rest.list(params).$promise; | |
| 50 | + }, | |
| 51 | + /** | |
| 52 | + * 获取明细信息。 | |
| 53 | + * @param id 车辆id | |
| 54 | + * @return 返回一个 promise | |
| 55 | + */ | |
| 56 | + getDetail: function(id) { | |
| 57 | + var params = {id: id}; | |
| 58 | + return service.rest.get(params).$promise; | |
| 59 | + }, | |
| 60 | + /** | |
| 61 | + * 保存信息。 | |
| 62 | + * @param obj 车辆详细信息 | |
| 63 | + * @return 返回一个 promise | |
| 64 | + */ | |
| 65 | + saveDetail: function(obj) { | |
| 66 | + return service.rest.save(obj).$promise; | |
| 67 | + }, | |
| 68 | + /** | |
| 69 | + * 数据导出。 | |
| 70 | + * @returns {*|Function|promise|n} | |
| 71 | + */ | |
| 72 | + dataExport: function() { | |
| 73 | + return service.dataTools.dataExport().$promise; | |
| 74 | + } | |
| 75 | + } | |
| 76 | + | |
| 77 | +}]); | |
| 78 | + | |
| 79 | +angular.module('ScheduleApp').controller('EmployeeInfoManageCtrl', [ | |
| 80 | + 'EmployeeInfoManageService', '$state', '$uibModal', 'FileDownload_g', | |
| 81 | + function(employeeInfoManageService, $state, $uibModal, fileDownload) { | |
| 82 | + var self = this; | |
| 83 | + | |
| 84 | + // 切换到form状态 | |
| 85 | + self.goForm = function() { | |
| 86 | + //alert("切换"); | |
| 87 | + $state.go("employeeInfoManage_form"); | |
| 88 | + } | |
| 89 | + | |
| 90 | + // 导入excel | |
| 91 | + self.importData = function() { | |
| 92 | + // large方式弹出模态对话框 | |
| 93 | + var modalInstance = $uibModal.open({ | |
| 94 | + templateUrl: '/pages/scheduleApp/module/basicInfo/employeeInfoManage/dataImport.html', | |
| 95 | + size: "lg", | |
| 96 | + animation: true, | |
| 97 | + backdrop: 'static', | |
| 98 | + resolve: { | |
| 99 | + // 可以传值给controller | |
| 100 | + }, | |
| 101 | + windowClass: 'center-modal', | |
| 102 | + controller: "EmployInfoManageToolsCtrl", | |
| 103 | + controllerAs: "ctrl", | |
| 104 | + bindToController: true | |
| 105 | + }); | |
| 106 | + modalInstance.result.then( | |
| 107 | + function() { | |
| 108 | + console.log("dataImport.html打开"); | |
| 109 | + }, | |
| 110 | + function() { | |
| 111 | + console.log("dataImport.html消失"); | |
| 112 | + } | |
| 113 | + ); | |
| 114 | + }; | |
| 115 | + | |
| 116 | + // 导出excel | |
| 117 | + self.exportData = function() { | |
| 118 | + employeeInfoManageService.dataExport().then( | |
| 119 | + function(result) { | |
| 120 | + fileDownload.downloadFile(result.data, "application/octet-stream", "人员基础信息.xls"); | |
| 121 | + }, | |
| 122 | + function(result) { | |
| 123 | + console.log("exportData failed:" + result); | |
| 124 | + } | |
| 125 | + ); | |
| 126 | + }; | |
| 127 | + }]); | |
| 128 | + | |
| 129 | +angular.module('ScheduleApp').controller('EmployInfoManageToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | |
| 130 | + var self = this; | |
| 131 | + | |
| 132 | + // 关闭窗口 | |
| 133 | + self.close = function() { | |
| 134 | + $modalInstance.dismiss("cancel"); | |
| 135 | + }; | |
| 136 | + | |
| 137 | + self.clearInputFile = function() { | |
| 138 | + angular.element("input[type='file']").val(null); | |
| 139 | + }; | |
| 140 | + | |
| 141 | + // 上传文件组件 | |
| 142 | + self.uploader = new FileUploader({ | |
| 143 | + url: "/personnel/dataImport", | |
| 144 | + filters: [] // 用于过滤文件,比如只允许导入excel | |
| 145 | + }); | |
| 146 | + self.uploader.onAfterAddingFile = function(fileItem) | |
| 147 | + { | |
| 148 | + console.info('onAfterAddingFile', fileItem); | |
| 149 | + console.log(self.uploader.queue.length); | |
| 150 | + if (self.uploader.queue.length > 1) | |
| 151 | + self.uploader.removeFromQueue(0); | |
| 152 | + }; | |
| 153 | + self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 154 | + { | |
| 155 | + console.info('onSuccessItem', fileItem, response, status, headers); | |
| 156 | + }; | |
| 157 | + self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 158 | + { | |
| 159 | + console.info('onErrorItem', fileItem, response, status, headers); | |
| 160 | + }; | |
| 161 | + | |
| 162 | +}]); | |
| 163 | + | |
| 164 | +angular.module('ScheduleApp').controller('EmployeeInfoManageListCtrl', ['EmployeeInfoManageService', function(employeeInfoManageService) { | |
| 165 | + var self = this; | |
| 166 | + self.pageInfo = { | |
| 167 | + totalItems : 0, | |
| 168 | + currentPage : 1, | |
| 169 | + infos: [] | |
| 170 | + }; | |
| 171 | + | |
| 172 | + // 初始创建的时候,获取一次列表数据 | |
| 173 | + employeeInfoManageService.getPage().then( | |
| 174 | + function(result) { | |
| 175 | + self.pageInfo.totalItems = result.totalElements; | |
| 176 | + self.pageInfo.currentPage = result.number + 1; | |
| 177 | + self.pageInfo.infos = result.content; | |
| 178 | + employeeInfoManageService.setCurrentPageNo(result.number + 1); | |
| 179 | + }, | |
| 180 | + function(result) { | |
| 181 | + alert("出错啦!"); | |
| 182 | + } | |
| 183 | + ); | |
| 184 | + | |
| 185 | + //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 186 | + // alert("dfdfdf"); | |
| 187 | + //}); | |
| 188 | + | |
| 189 | + // 翻页的时候调用 | |
| 190 | + self.pageChanaged = function() { | |
| 191 | + employeeInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 192 | + employeeInfoManageService.getPage().then( | |
| 193 | + function(result) { | |
| 194 | + self.pageInfo.totalItems = result.totalElements; | |
| 195 | + self.pageInfo.currentPage = result.number + 1; | |
| 196 | + self.pageInfo.infos = result.content; | |
| 197 | + employeeInfoManageService.setCurrentPageNo(result.number + 1); | |
| 198 | + }, | |
| 199 | + function(result) { | |
| 200 | + alert("出错啦!"); | |
| 201 | + } | |
| 202 | + ); | |
| 203 | + }; | |
| 204 | + // 获取查询条件数据 | |
| 205 | + self.searchCondition = function() { | |
| 206 | + return employeeInfoManageService.getSearchCondition(); | |
| 207 | + }; | |
| 208 | + // 重置查询条件 | |
| 209 | + self.resetSearchCondition = function() { | |
| 210 | + employeeInfoManageService.resetSearchCondition(); | |
| 211 | + self.pageInfo.currentPage = 1; | |
| 212 | + self.pageChanaged(); | |
| 213 | + }; | |
| 214 | +}]); | |
| 215 | + | |
| 216 | +angular.module('ScheduleApp').controller('EmployeeInfoManageFormCtrl', ['EmployeeInfoManageService', '$stateParams', '$state', function(employeeInfoManageService, $stateParams, $state) { | |
| 217 | + var self = this; | |
| 218 | + | |
| 219 | + // 欲保存的busInfo信息,绑定 | |
| 220 | + self.employeeInfoForSave = {}; | |
| 221 | + | |
| 222 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 223 | + var id = $stateParams.id; | |
| 224 | + if (id) { | |
| 225 | + self.employeeInfoForSave.id = id; | |
| 226 | + employeeInfoManageService.getDetail(id).then( | |
| 227 | + function(result) { | |
| 228 | + var key; | |
| 229 | + for (key in result) { | |
| 230 | + self.employeeInfoForSave[key] = result[key]; | |
| 231 | + } | |
| 232 | + }, | |
| 233 | + function(result) { | |
| 234 | + alert("出错啦!"); | |
| 235 | + } | |
| 236 | + ); | |
| 237 | + } | |
| 238 | + | |
| 239 | + // 提交方法 | |
| 240 | + self.submit = function() { | |
| 241 | + console.log(self.employeeInfoForSave); | |
| 242 | + employeeInfoManageService.saveDetail(self.employeeInfoForSave).then( | |
| 243 | + function(result) { | |
| 244 | + // TODO:弹出框方式以后改 | |
| 245 | + if (result.status == 'SUCCESS') { | |
| 246 | + alert("保存成功!"); | |
| 247 | + $state.go("employeeInfoManage"); | |
| 248 | + } else { | |
| 249 | + alert("保存异常!"); | |
| 250 | + } | |
| 251 | + }, | |
| 252 | + function(result) { | |
| 253 | + // TODO:弹出框方式以后改 | |
| 254 | + alert("出错啦!"); | |
| 255 | + } | |
| 256 | + ); | |
| 257 | + }; | |
| 258 | + | |
| 259 | + | |
| 260 | +}]); | |
| 261 | + | |
| 262 | +angular.module('ScheduleApp').controller('EmployeeInfoManageDetailCtrl', ['EmployeeInfoManageService', '$stateParams', function(employeeInfoManageService, $stateParams) { | |
| 263 | + var self = this; | |
| 264 | + self.title = ""; | |
| 265 | + self.employeeInfoForDetail = {}; | |
| 266 | + self.employeeInfoForDetail.id = $stateParams.id; | |
| 267 | + | |
| 268 | + // 当转向到此页面时,就获取明细信息并绑定 | |
| 269 | + employeeInfoManageService.getDetail($stateParams.id).then( | |
| 270 | + function(result) { | |
| 271 | + var key; | |
| 272 | + for (key in result) { | |
| 273 | + self.employeeInfoForDetail[key] = result[key]; | |
| 274 | + } | |
| 275 | + | |
| 276 | + self.title = "员工 " + self.employeeInfoForDetail.personnelName + " 详细信息"; | |
| 277 | + }, | |
| 278 | + function(result) { | |
| 279 | + // TODO:弹出框方式以后改 | |
| 280 | + alert("出错啦!"); | |
| 281 | + } | |
| 282 | + ); | |
| 283 | +}]); | |
| 284 | + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 人员基础信息模块配置route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + .state("employeeInfoManage", { // index页面 | |
| 13 | + url: '/employeeInfoManage', | |
| 14 | + views: { | |
| 15 | + "": { | |
| 16 | + templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/index.html' | |
| 17 | + }, | |
| 18 | + "employeeInfoManage_list@employeeInfoManage": { | |
| 19 | + templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html' | |
| 20 | + } | |
| 21 | + }, | |
| 22 | + | |
| 23 | + resolve: { | |
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 25 | + return $ocLazyLoad.load({ | |
| 26 | + name: 'employeeInfoManage_module', | |
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 28 | + files: [ | |
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 31 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 32 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | |
| 33 | + ] | |
| 34 | + }); | |
| 35 | + }] | |
| 36 | + } | |
| 37 | + }) | |
| 38 | + .state("employeeInfoManage_form", { // 添加人员信息form | |
| 39 | + url: '/employeeInfoManage_form', | |
| 40 | + views: { | |
| 41 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html'} | |
| 42 | + }, | |
| 43 | + resolve: { | |
| 44 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 45 | + return $ocLazyLoad.load({ | |
| 46 | + name: 'employeeInfoManage_form_module', | |
| 47 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 48 | + files: [ | |
| 49 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 50 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 51 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | |
| 52 | + ] | |
| 53 | + }); | |
| 54 | + }] | |
| 55 | + } | |
| 56 | + }) | |
| 57 | + .state("employeeInfoManage_edit", { // 修改人员信息form | |
| 58 | + url: '/employeeInfoManage_edit/:id', | |
| 59 | + views: { | |
| 60 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html'} | |
| 61 | + }, | |
| 62 | + resolve: { | |
| 63 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 64 | + return $ocLazyLoad.load({ | |
| 65 | + name: 'employeeInfoManage_edit_module', | |
| 66 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 67 | + files: [ | |
| 68 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 69 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 70 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | |
| 71 | + ] | |
| 72 | + }); | |
| 73 | + }] | |
| 74 | + } | |
| 75 | + }) | |
| 76 | + .state("employeeInfoManage_detail", { // 详细信息页面 | |
| 77 | + url: '/employeeInfoManage_detail/:id', | |
| 78 | + views: { | |
| 79 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/detail.html'} | |
| 80 | + }, | |
| 81 | + resolve: { | |
| 82 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 83 | + return $ocLazyLoad.load({ | |
| 84 | + name: 'employeeInfoManage_detail_module', | |
| 85 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 86 | + files: [ | |
| 87 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | |
| 88 | + ] | |
| 89 | + }); | |
| 90 | + }] | |
| 91 | + } | |
| 92 | + }) | |
| 93 | + | |
| 94 | +}]); | |
| 0 | 95 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
| ... | ... | @@ -118,105 +118,105 @@ angular.module('ScheduleApp').directive('remoteValidation', [ |
| 118 | 118 | } |
| 119 | 119 | ]); |
| 120 | 120 | |
| 121 | -/** | |
| 122 | - * remoteValidatiot2指令,远程数据验证验证,作为属性放在某个指令上,依赖与指令的ngModel(专门用于时刻表sheet验证)。 | |
| 123 | - * 属性如下: | |
| 124 | - * remotevtype(必须):验证类型(在service中有对应映射),如rvtype="xl" | |
| 125 | - * remotevparam(必须):后端判定查询参数,如rvparam={{ {'xl.id_eq': '123'} | json }} | |
| 126 | - * | |
| 127 | - */ | |
| 128 | -angular.module('ScheduleApp').directive('remoteValidationt2', [ | |
| 129 | - '$$SearchInfoService_g', | |
| 130 | - function($$SearchInfoService_g) { | |
| 131 | - return { | |
| 132 | - restrict: "A", // 属性 | |
| 133 | - require: "^ngModel", // 依赖所属指令的ngModel | |
| 134 | - compile: function(tElem, tAttrs) { | |
| 135 | - // 验证属性 | |
| 136 | - if (!tAttrs["remotevtype"]) { // 验证类型 | |
| 137 | - throw new Error("remotevtype属性必须填写"); | |
| 138 | - } else if (!$$SearchInfoService_g.validate[tAttrs["remotevtype"]]) { | |
| 139 | - throw new Error(!tAttrs["remotevtype"] + "验证类型不存在"); | |
| 140 | - } | |
| 141 | - if (!tAttrs["remotevparam"]) { // 查询参数 | |
| 142 | - throw new Error("remotevparam属性必须填写"); | |
| 143 | - } | |
| 144 | - | |
| 145 | - // 监听获取的数据 | |
| 146 | - var $watch_rvtype = undefined; | |
| 147 | - var $watch_rvparam_obj = undefined; | |
| 148 | - | |
| 149 | - // 验证数据 | |
| 150 | - var $$internal_validate = function(ngModelCtrl, scope) { | |
| 151 | - if ($watch_rvtype && $watch_rvparam_obj) { | |
| 152 | - // 获取查询参数模版 | |
| 153 | - var paramTemplate = $$SearchInfoService_g.validate[$watch_rvtype].template; | |
| 154 | - if (!paramTemplate) { | |
| 155 | - throw new Error($watch_rvtype + "查询模版不存在"); | |
| 156 | - } | |
| 157 | - // 判定如果参数对象不全,没有完全和模版参数里对应上,则不验证 | |
| 158 | - var isParamAll = true; | |
| 159 | - for (var key in paramTemplate) { | |
| 160 | - if (!$watch_rvparam_obj[key]) { | |
| 161 | - isParamAll = false; | |
| 162 | - break; | |
| 163 | - } | |
| 164 | - } | |
| 165 | - if (!isParamAll) { | |
| 166 | - ngModelCtrl.$setValidity('remote', true); | |
| 167 | - } else { // 开始验证 | |
| 168 | - $$SearchInfoService_g.validate[$watch_rvtype].remote.do( | |
| 169 | - $watch_rvparam_obj, | |
| 170 | - function(result) { | |
| 171 | - if (result.status == "SUCCESS") { | |
| 172 | - ngModelCtrl.$setValidity('remote', true); | |
| 173 | - } else { | |
| 174 | - ngModelCtrl.$setValidity('remote', false); | |
| 175 | - scope.ctrl.ttInfoDetailManageForForm.sheetvaliddesc = result.msg; | |
| 176 | - } | |
| 177 | - }, | |
| 178 | - function(result) { | |
| 179 | - alert("出错拉"); | |
| 180 | - ngModelCtrl.$setValidity('remote', true); | |
| 181 | - } | |
| 182 | - ); | |
| 183 | - } | |
| 184 | - } | |
| 185 | - }; | |
| 186 | - | |
| 187 | - return { | |
| 188 | - pre: function(scope, element, attr) { | |
| 189 | - | |
| 190 | - }, | |
| 191 | - | |
| 192 | - post: function(scope, element, attr, ngModelCtrl) { | |
| 193 | - /** | |
| 194 | - * 监控验证类型属性变化。 | |
| 195 | - */ | |
| 196 | - attr.$observe("remotevtype", function(value) { | |
| 197 | - if (value && value != "") { | |
| 198 | - $watch_rvtype = value; | |
| 199 | - $$internal_validate(ngModelCtrl, scope); | |
| 200 | - } | |
| 201 | - }); | |
| 202 | - /** | |
| 203 | - * 监控查询结果属性变化。 | |
| 204 | - */ | |
| 205 | - attr.$observe("remotevparam", function(value) { | |
| 206 | - if (value && value != "") { | |
| 207 | - //if (!ngModelCtrl.$dirty) { // 没有修改过模型数据,不验证 | |
| 208 | - // return; | |
| 209 | - //} | |
| 210 | - $watch_rvparam_obj = JSON.parse(value); | |
| 211 | - $$internal_validate(ngModelCtrl, scope); | |
| 212 | - } | |
| 213 | - }); | |
| 214 | - } | |
| 215 | - }; | |
| 216 | - } | |
| 217 | - } | |
| 218 | - } | |
| 219 | -]); | |
| 121 | +/** | |
| 122 | + * remoteValidatiot2指令,远程数据验证验证,作为属性放在某个指令上,依赖与指令的ngModel(专门用于时刻表sheet验证)。 | |
| 123 | + * 属性如下: | |
| 124 | + * remotevtype(必须):验证类型(在service中有对应映射),如rvtype="xl" | |
| 125 | + * remotevparam(必须):后端判定查询参数,如rvparam={{ {'xl.id_eq': '123'} | json }} | |
| 126 | + * | |
| 127 | + */ | |
| 128 | +angular.module('ScheduleApp').directive('remoteValidationt2', [ | |
| 129 | + '$$SearchInfoService_g', | |
| 130 | + function($$SearchInfoService_g) { | |
| 131 | + return { | |
| 132 | + restrict: "A", // 属性 | |
| 133 | + require: "^ngModel", // 依赖所属指令的ngModel | |
| 134 | + compile: function(tElem, tAttrs) { | |
| 135 | + // 验证属性 | |
| 136 | + if (!tAttrs["remotevtype"]) { // 验证类型 | |
| 137 | + throw new Error("remotevtype属性必须填写"); | |
| 138 | + } else if (!$$SearchInfoService_g.validate[tAttrs["remotevtype"]]) { | |
| 139 | + throw new Error(!tAttrs["remotevtype"] + "验证类型不存在"); | |
| 140 | + } | |
| 141 | + if (!tAttrs["remotevparam"]) { // 查询参数 | |
| 142 | + throw new Error("remotevparam属性必须填写"); | |
| 143 | + } | |
| 144 | + | |
| 145 | + // 监听获取的数据 | |
| 146 | + var $watch_rvtype = undefined; | |
| 147 | + var $watch_rvparam_obj = undefined; | |
| 148 | + | |
| 149 | + // 验证数据 | |
| 150 | + var $$internal_validate = function(ngModelCtrl, scope) { | |
| 151 | + if ($watch_rvtype && $watch_rvparam_obj) { | |
| 152 | + // 获取查询参数模版 | |
| 153 | + var paramTemplate = $$SearchInfoService_g.validate[$watch_rvtype].template; | |
| 154 | + if (!paramTemplate) { | |
| 155 | + throw new Error($watch_rvtype + "查询模版不存在"); | |
| 156 | + } | |
| 157 | + // 判定如果参数对象不全,没有完全和模版参数里对应上,则不验证 | |
| 158 | + var isParamAll = true; | |
| 159 | + for (var key in paramTemplate) { | |
| 160 | + if (!$watch_rvparam_obj[key]) { | |
| 161 | + isParamAll = false; | |
| 162 | + break; | |
| 163 | + } | |
| 164 | + } | |
| 165 | + if (!isParamAll) { | |
| 166 | + ngModelCtrl.$setValidity('remote', true); | |
| 167 | + } else { // 开始验证 | |
| 168 | + $$SearchInfoService_g.validate[$watch_rvtype].remote.do( | |
| 169 | + $watch_rvparam_obj, | |
| 170 | + function(result) { | |
| 171 | + if (result.status == "SUCCESS") { | |
| 172 | + ngModelCtrl.$setValidity('remote', true); | |
| 173 | + } else { | |
| 174 | + ngModelCtrl.$setValidity('remote', false); | |
| 175 | + scope.ctrl.ttInfoDetailManageForForm.sheetvaliddesc = result.msg; | |
| 176 | + } | |
| 177 | + }, | |
| 178 | + function(result) { | |
| 179 | + alert("出错拉"); | |
| 180 | + ngModelCtrl.$setValidity('remote', true); | |
| 181 | + } | |
| 182 | + ); | |
| 183 | + } | |
| 184 | + } | |
| 185 | + }; | |
| 186 | + | |
| 187 | + return { | |
| 188 | + pre: function(scope, element, attr) { | |
| 189 | + | |
| 190 | + }, | |
| 191 | + | |
| 192 | + post: function(scope, element, attr, ngModelCtrl) { | |
| 193 | + /** | |
| 194 | + * 监控验证类型属性变化。 | |
| 195 | + */ | |
| 196 | + attr.$observe("remotevtype", function(value) { | |
| 197 | + if (value && value != "") { | |
| 198 | + $watch_rvtype = value; | |
| 199 | + $$internal_validate(ngModelCtrl, scope); | |
| 200 | + } | |
| 201 | + }); | |
| 202 | + /** | |
| 203 | + * 监控查询结果属性变化。 | |
| 204 | + */ | |
| 205 | + attr.$observe("remotevparam", function(value) { | |
| 206 | + if (value && value != "") { | |
| 207 | + //if (!ngModelCtrl.$dirty) { // 没有修改过模型数据,不验证 | |
| 208 | + // return; | |
| 209 | + //} | |
| 210 | + $watch_rvparam_obj = JSON.parse(value); | |
| 211 | + $$internal_validate(ngModelCtrl, scope); | |
| 212 | + } | |
| 213 | + }); | |
| 214 | + } | |
| 215 | + }; | |
| 216 | + } | |
| 217 | + } | |
| 218 | + } | |
| 219 | +]); | |
| 220 | 220 | |
| 221 | 221 | |
| 222 | 222 | angular.module('ScheduleApp').directive("saSelect", ['$timeout', function($timeout) { | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-ui-route-state.js
| 1 | -// ui route 配置 | |
| 2 | - | |
| 3 | -/** 配置所有模块页面route */ | |
| 4 | -ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { | |
| 5 | - // 默认路由 | |
| 6 | - //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 7 | - | |
| 8 | - $stateProvider | |
| 9 | - // 车辆基础信息模块配置 | |
| 10 | - .state("busInfoManage", { | |
| 11 | - url: '/busInfoManage', | |
| 12 | - views: { | |
| 13 | - "": { | |
| 14 | - templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/index.html' | |
| 15 | - }, | |
| 16 | - "busInfoManage_list@busInfoManage": { | |
| 17 | - templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/list.html' | |
| 18 | - } | |
| 19 | - }, | |
| 20 | - | |
| 21 | - resolve: { | |
| 22 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 23 | - return $ocLazyLoad.load({ | |
| 24 | - name: 'busInfoManage_module', | |
| 25 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 26 | - files: [ | |
| 27 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 28 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 29 | - "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 30 | - "pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js" | |
| 31 | - ] | |
| 32 | - }); | |
| 33 | - }] | |
| 34 | - } | |
| 35 | - }) | |
| 36 | - .state("busInfoManage_form", { | |
| 37 | - url: '/busInfoManage_form', | |
| 38 | - views: { | |
| 39 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/form.html'} | |
| 40 | - }, | |
| 41 | - resolve: { | |
| 42 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 43 | - return $ocLazyLoad.load({ | |
| 44 | - name: 'busInfoManage_form_module', | |
| 45 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 46 | - files: [ | |
| 47 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 48 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 49 | - "pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js" | |
| 50 | - ] | |
| 51 | - }); | |
| 52 | - }] | |
| 53 | - } | |
| 54 | - }) | |
| 55 | - .state("busInfoManage_edit", { | |
| 56 | - url: '/busInfoManage_edit/:id', | |
| 57 | - views: { | |
| 58 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/edit.html'} | |
| 59 | - }, | |
| 60 | - resolve: { | |
| 61 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 62 | - return $ocLazyLoad.load({ | |
| 63 | - name: 'busInfoManage_edit_module', | |
| 64 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 65 | - files: [ | |
| 66 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 67 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 68 | - "pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js" | |
| 69 | - ] | |
| 70 | - }); | |
| 71 | - }] | |
| 72 | - } | |
| 73 | - }) | |
| 74 | - .state("busInfoManage_detail", { | |
| 75 | - url: '/busInfoManage_detail/:id', | |
| 76 | - views: { | |
| 77 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/detail.html'} | |
| 78 | - }, | |
| 79 | - resolve: { | |
| 80 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 81 | - return $ocLazyLoad.load({ | |
| 82 | - name: 'busInfoManage_detail_module', | |
| 83 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 84 | - files: [ | |
| 85 | - "pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js" | |
| 86 | - ] | |
| 87 | - }); | |
| 88 | - }] | |
| 89 | - } | |
| 90 | - }) | |
| 91 | - | |
| 92 | - // 人员基础信息模块配置 | |
| 93 | - .state("employeeInfoManage", { | |
| 94 | - url: '/employeeInfoManage', | |
| 95 | - views: { | |
| 96 | - "": { | |
| 97 | - templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/index.html' | |
| 98 | - }, | |
| 99 | - "employeeInfoManage_list@employeeInfoManage": { | |
| 100 | - templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html' | |
| 101 | - } | |
| 102 | - }, | |
| 103 | - | |
| 104 | - resolve: { | |
| 105 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 106 | - return $ocLazyLoad.load({ | |
| 107 | - name: 'employeeInfoManage_module', | |
| 108 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 109 | - files: [ | |
| 110 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 111 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 112 | - "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 113 | - "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js" | |
| 114 | - ] | |
| 115 | - }); | |
| 116 | - }] | |
| 117 | - } | |
| 118 | - }) | |
| 119 | - .state("employeeInfoManage_form", { | |
| 120 | - url: '/employeeInfoManage_form', | |
| 121 | - views: { | |
| 122 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html'} | |
| 123 | - }, | |
| 124 | - resolve: { | |
| 125 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 126 | - return $ocLazyLoad.load({ | |
| 127 | - name: 'employeeInfoManage_form_module', | |
| 128 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 129 | - files: [ | |
| 130 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 131 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 132 | - "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js" | |
| 133 | - ] | |
| 134 | - }); | |
| 135 | - }] | |
| 136 | - } | |
| 137 | - }) | |
| 138 | - .state("employeeInfoManage_edit", { | |
| 139 | - url: '/employeeInfoManage_edit/:id', | |
| 140 | - views: { | |
| 141 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html'} | |
| 142 | - }, | |
| 143 | - resolve: { | |
| 144 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 145 | - return $ocLazyLoad.load({ | |
| 146 | - name: 'employeeInfoManage_edit_module', | |
| 147 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 148 | - files: [ | |
| 149 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 150 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 151 | - "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js" | |
| 152 | - ] | |
| 153 | - }); | |
| 154 | - }] | |
| 155 | - } | |
| 156 | - }) | |
| 157 | - .state("employeeInfoManage_detail", { | |
| 158 | - url: '/employeeInfoManage_detail/:id', | |
| 159 | - views: { | |
| 160 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/detail.html'} | |
| 161 | - }, | |
| 162 | - resolve: { | |
| 163 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 164 | - return $ocLazyLoad.load({ | |
| 165 | - name: 'employeeInfoManage_detail_module', | |
| 166 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 167 | - files: [ | |
| 168 | - "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js" | |
| 169 | - ] | |
| 170 | - }); | |
| 171 | - }] | |
| 172 | - } | |
| 173 | - }) | |
| 174 | - | |
| 175 | - // 车辆设备信息模块配置 | |
| 176 | - .state("deviceInfoManage", { | |
| 177 | - url: '/deviceInfoManage', | |
| 178 | - views: { | |
| 179 | - "": { | |
| 180 | - templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/index.html' | |
| 181 | - }, | |
| 182 | - "deviceInfoManage_list@deviceInfoManage": { | |
| 183 | - templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/list.html' | |
| 184 | - } | |
| 185 | - }, | |
| 186 | - | |
| 187 | - resolve: { | |
| 188 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 189 | - return $ocLazyLoad.load({ | |
| 190 | - name: 'deviceInfoManage_module', | |
| 191 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 192 | - files: [ | |
| 193 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 194 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 195 | - "pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js" | |
| 196 | - ] | |
| 197 | - }); | |
| 198 | - }] | |
| 199 | - } | |
| 200 | - }) | |
| 201 | - .state("deviceInfoManage_form", { | |
| 202 | - url: '/deviceInfoManage_form', | |
| 203 | - views: { | |
| 204 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/form.html'} | |
| 205 | - }, | |
| 206 | - resolve: { | |
| 207 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 208 | - return $ocLazyLoad.load({ | |
| 209 | - name: 'deviceInfoManage_form_module', | |
| 210 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 211 | - files: [ | |
| 212 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 213 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 214 | - "pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js" | |
| 215 | - ] | |
| 216 | - }); | |
| 217 | - }] | |
| 218 | - } | |
| 219 | - }) | |
| 220 | - .state("deviceInfoManage_edit", { | |
| 221 | - url: '/deviceInfoManage_edit/:id', | |
| 222 | - views: { | |
| 223 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/edit.html'} | |
| 224 | - }, | |
| 225 | - resolve: { | |
| 226 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 227 | - return $ocLazyLoad.load({ | |
| 228 | - name: 'deviceInfoManage_edit_module', | |
| 229 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 230 | - files: [ | |
| 231 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 232 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 233 | - "pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js" | |
| 234 | - ] | |
| 235 | - }); | |
| 236 | - }] | |
| 237 | - } | |
| 238 | - }) | |
| 239 | - .state("deviceInfoManage_detail", { | |
| 240 | - url: '/deviceInfoManage_detail/:id', | |
| 241 | - views: { | |
| 242 | - "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/detail.html'} | |
| 243 | - }, | |
| 244 | - resolve: { | |
| 245 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 246 | - return $ocLazyLoad.load({ | |
| 247 | - name: 'deviceInfoManage_detail_module', | |
| 248 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 249 | - files: [ | |
| 250 | - "pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js" | |
| 251 | - ] | |
| 252 | - }); | |
| 253 | - }] | |
| 254 | - } | |
| 255 | - }) | |
| 256 | - | |
| 257 | - // 车辆配置模块 | |
| 258 | - .state("busConfig", { | |
| 259 | - url: '/busConfig', | |
| 260 | - views: { | |
| 261 | - "": { | |
| 262 | - templateUrl: 'pages/scheduleApp/module/core/busConfig/index.html' | |
| 263 | - }, | |
| 264 | - "busConfig_list@busConfig": { | |
| 265 | - templateUrl: 'pages/scheduleApp/module/core/busConfig/list.html' | |
| 266 | - } | |
| 267 | - }, | |
| 268 | - | |
| 269 | - resolve: { | |
| 270 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 271 | - return $ocLazyLoad.load({ | |
| 272 | - name: 'busConfig_module', | |
| 273 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 274 | - files: [ | |
| 275 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 276 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 277 | - "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 278 | - "pages/scheduleApp/module/core/busConfig/busConfig.js" | |
| 279 | - ] | |
| 280 | - }); | |
| 281 | - }] | |
| 282 | - } | |
| 283 | - }) | |
| 284 | - .state("busConfig_form", { | |
| 285 | - url: '/busConfig_form', | |
| 286 | - views: { | |
| 287 | - "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/form.html'} | |
| 288 | - }, | |
| 289 | - resolve: { | |
| 290 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 291 | - return $ocLazyLoad.load({ | |
| 292 | - name: 'busConfig_form_module', | |
| 293 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 294 | - files: [ | |
| 295 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 296 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 297 | - "pages/scheduleApp/module/core/busConfig/busConfig.js" | |
| 298 | - ] | |
| 299 | - }); | |
| 300 | - }] | |
| 301 | - } | |
| 302 | - }) | |
| 303 | - .state("busConfig_edit", { | |
| 304 | - url: '/busConfig_edit/:id', | |
| 305 | - views: { | |
| 306 | - "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/edit.html'} | |
| 307 | - }, | |
| 308 | - resolve: { | |
| 309 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 310 | - return $ocLazyLoad.load({ | |
| 311 | - name: 'busConfig_edit_module', | |
| 312 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 313 | - files: [ | |
| 314 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 315 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 316 | - "pages/scheduleApp/module/core/busConfig/busConfig.js" | |
| 317 | - ] | |
| 318 | - }); | |
| 319 | - }] | |
| 320 | - } | |
| 321 | - }) | |
| 322 | - .state("busConfig_detail", { | |
| 323 | - url: '/busConfig_detail/:id', | |
| 324 | - views: { | |
| 325 | - "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/detail.html'} | |
| 326 | - }, | |
| 327 | - resolve: { | |
| 328 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 329 | - return $ocLazyLoad.load({ | |
| 330 | - name: 'busConfig_detail_module', | |
| 331 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 332 | - files: [ | |
| 333 | - "pages/scheduleApp/module/core/busConfig/busConfig.js" | |
| 334 | - ] | |
| 335 | - }); | |
| 336 | - }] | |
| 337 | - } | |
| 338 | - }) | |
| 339 | - | |
| 340 | - // 人员配置模块 | |
| 341 | - .state("employeeConfig", { | |
| 342 | - url: '/employeeConfig', | |
| 343 | - views: { | |
| 344 | - "": { | |
| 345 | - templateUrl: 'pages/scheduleApp/module/core/employeeConfig/index.html' | |
| 346 | - }, | |
| 347 | - "employeeConfig_list@employeeConfig": { | |
| 348 | - templateUrl: 'pages/scheduleApp/module/core/employeeConfig/list.html' | |
| 349 | - } | |
| 350 | - }, | |
| 351 | - | |
| 352 | - resolve: { | |
| 353 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 354 | - return $ocLazyLoad.load({ | |
| 355 | - name: 'employeeConfig_module', | |
| 356 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 357 | - files: [ | |
| 358 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 359 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 360 | - "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 361 | - "pages/scheduleApp/module/core/employeeConfig/employeeConfig.js" | |
| 362 | - ] | |
| 363 | - }); | |
| 364 | - }] | |
| 365 | - } | |
| 366 | - }) | |
| 367 | - .state("employeeConfig_form", { | |
| 368 | - url: '/employeeConfig_form', | |
| 369 | - views: { | |
| 370 | - "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/form.html'} | |
| 371 | - }, | |
| 372 | - resolve: { | |
| 373 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 374 | - return $ocLazyLoad.load({ | |
| 375 | - name: 'employeeConfig_form_module', | |
| 376 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 377 | - files: [ | |
| 378 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 379 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 380 | - "pages/scheduleApp/module/core/employeeConfig/employeeConfig.js" | |
| 381 | - ] | |
| 382 | - }); | |
| 383 | - }] | |
| 384 | - } | |
| 385 | - }) | |
| 386 | - .state("employeeConfig_edit", { | |
| 387 | - url: '/employeeConfig_edit/:id', | |
| 388 | - views: { | |
| 389 | - "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/edit.html'} | |
| 390 | - }, | |
| 391 | - resolve: { | |
| 392 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 393 | - return $ocLazyLoad.load({ | |
| 394 | - name: 'employeeConfig_edit_module', | |
| 395 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 396 | - files: [ | |
| 397 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 398 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 399 | - "pages/scheduleApp/module/core/employeeConfig/employeeConfig.js" | |
| 400 | - ] | |
| 401 | - }); | |
| 402 | - }] | |
| 403 | - } | |
| 404 | - }) | |
| 405 | - .state("employeeConfig_detail", { | |
| 406 | - url: '/employeeConfig_detail/:id', | |
| 407 | - views: { | |
| 408 | - "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/detail.html'} | |
| 409 | - }, | |
| 410 | - resolve: { | |
| 411 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 412 | - return $ocLazyLoad.load({ | |
| 413 | - name: 'employeeConfig_detail_module', | |
| 414 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 415 | - files: [ | |
| 416 | - "pages/scheduleApp/module/core/employeeConfig/employeeConfig.js" | |
| 417 | - ] | |
| 418 | - }); | |
| 419 | - }] | |
| 420 | - } | |
| 421 | - }) | |
| 422 | - | |
| 423 | - // 路牌管理 | |
| 424 | - .state("guideboardManage", { | |
| 425 | - url: '/guideboardManage', | |
| 426 | - views: { | |
| 427 | - "": { | |
| 428 | - templateUrl: 'pages/scheduleApp/module/core/guideboardManage/index.html' | |
| 429 | - }, | |
| 430 | - "guideboardManage_list@guideboardManage": { | |
| 431 | - templateUrl: 'pages/scheduleApp/module/core/guideboardManage/list.html' | |
| 432 | - } | |
| 433 | - }, | |
| 434 | - | |
| 435 | - resolve: { | |
| 436 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 437 | - return $ocLazyLoad.load({ | |
| 438 | - name: 'guideboardManage_module', | |
| 439 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 440 | - files: [ | |
| 441 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 442 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 443 | - "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 444 | - "pages/scheduleApp/module/core/guideboardManage/guideboardManage.js" | |
| 445 | - ] | |
| 446 | - }); | |
| 447 | - }] | |
| 448 | - } | |
| 449 | - }) | |
| 450 | - .state("guideboardManage_detail", { | |
| 451 | - url: '/guideboardManage_detail/:id', | |
| 452 | - views: { | |
| 453 | - "": {templateUrl: 'pages/scheduleApp/module/core/guideboardManage/detail.html'} | |
| 454 | - }, | |
| 455 | - resolve: { | |
| 456 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 457 | - return $ocLazyLoad.load({ | |
| 458 | - name: 'guideboardManage_detail_module', | |
| 459 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 460 | - files: [ | |
| 461 | - "pages/scheduleApp/module/core/guideboardManage/guideboardManage.js" | |
| 462 | - ] | |
| 463 | - }); | |
| 464 | - }] | |
| 465 | - } | |
| 466 | - }) | |
| 467 | - | |
| 468 | - | |
| 469 | - // 时刻表管理 | |
| 470 | - .state("timeTableManage", { | |
| 471 | - url: '/timeTableManage', | |
| 472 | - views: { | |
| 473 | - "": { | |
| 474 | - templateUrl: 'pages/scheduleApp/module/core/timeTableManage/index.html' | |
| 475 | - }, | |
| 476 | - "timeTableManage_list@timeTableManage": { | |
| 477 | - templateUrl: 'pages/scheduleApp/module/core/timeTableManage/list.html' | |
| 478 | - } | |
| 479 | - }, | |
| 480 | - | |
| 481 | - resolve: { | |
| 482 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 483 | - return $ocLazyLoad.load({ | |
| 484 | - name: 'timeTableManage_module', | |
| 485 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 486 | - files: [ | |
| 487 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 488 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 489 | - "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 490 | - "pages/scheduleApp/module/core/timeTableManage/timeTableManage.js" | |
| 491 | - ] | |
| 492 | - }); | |
| 493 | - }] | |
| 494 | - } | |
| 495 | - }) | |
| 496 | - .state("timeTableManage_form", { | |
| 497 | - url: '/timeTableManage_form', | |
| 498 | - views: { | |
| 499 | - "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/form.html'} | |
| 500 | - }, | |
| 501 | - resolve: { | |
| 502 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 503 | - return $ocLazyLoad.load({ | |
| 504 | - name: 'timeTableManage_form_module', | |
| 505 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 506 | - files: [ | |
| 507 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 508 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 509 | - "pages/scheduleApp/module/core/timeTableManage/timeTableManage.js" | |
| 510 | - ] | |
| 511 | - }); | |
| 512 | - }] | |
| 513 | - } | |
| 514 | - }) | |
| 515 | - .state("timeTableManage_edit", { | |
| 516 | - url: '/timeTableManage_edit/:id', | |
| 517 | - views: { | |
| 518 | - "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/edit.html'} | |
| 519 | - }, | |
| 520 | - resolve: { | |
| 521 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 522 | - return $ocLazyLoad.load({ | |
| 523 | - name: 'timeTableManage_edit_module', | |
| 524 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 525 | - files: [ | |
| 526 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 527 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 528 | - "pages/scheduleApp/module/core/timeTableManage/timeTableManage.js" | |
| 529 | - ] | |
| 530 | - }); | |
| 531 | - }] | |
| 532 | - } | |
| 533 | - }) | |
| 534 | - .state("timeTableManage_detail", { | |
| 535 | - url: '/timeTableManage_detail/:id', | |
| 536 | - views: { | |
| 537 | - "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/detail.html'} | |
| 538 | - }, | |
| 539 | - resolve: { | |
| 540 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 541 | - return $ocLazyLoad.load({ | |
| 542 | - name: 'timeTableManage_detail_module', | |
| 543 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 544 | - files: [ | |
| 545 | - "pages/scheduleApp/module/core/timeTableManage/timeTableManage.js" | |
| 546 | - ] | |
| 547 | - }); | |
| 548 | - }] | |
| 549 | - } | |
| 550 | - }) | |
| 551 | - .state("timeTableDetailInfoManage", { | |
| 552 | - url: '/timeTableDetailInfoManage/:xlid/:ttid/:xlname/:ttname', | |
| 553 | - views: { | |
| 554 | - "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/detail_info.html'} | |
| 555 | - }, | |
| 556 | - resolve: { | |
| 557 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 558 | - return $ocLazyLoad.load({ | |
| 559 | - name: 'timeTableDetailInfoManage_module', | |
| 560 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 561 | - files: [ | |
| 562 | - "pages/scheduleApp/module/core/timeTableManage/timeTableDetailManage.js" | |
| 563 | - ] | |
| 564 | - }); | |
| 565 | - }] | |
| 566 | - } | |
| 567 | - }) | |
| 568 | - .state("timeTableDetailInfoManage_detail_edit", { | |
| 569 | - url: '/timeTableDetailInfoManage_detail_edit/:id/:xlid/:ttid/:xlname/:ttname', | |
| 570 | - views: { | |
| 571 | - "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/detail_info_edit.html'} | |
| 572 | - }, | |
| 573 | - resolve: { | |
| 574 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 575 | - return $ocLazyLoad.load({ | |
| 576 | - name: 'timeTableDetailInfoManage_module', | |
| 577 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 578 | - files: [ | |
| 579 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 580 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 581 | - "pages/scheduleApp/module/core/timeTableManage/timeTableDetailManage.js" | |
| 582 | - ] | |
| 583 | - }); | |
| 584 | - }] | |
| 585 | - } | |
| 586 | - }) | |
| 587 | - | |
| 588 | - // 时刻表管理(新版本) | |
| 589 | - .state("ttInfoManage", { // 时刻表基础信息界面 | |
| 590 | - url: '/ttInfoManage', | |
| 591 | - views: { | |
| 592 | - "": { | |
| 593 | - templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/index.html' | |
| 594 | - }, | |
| 595 | - "ttInfoManage_list@ttInfoManage": { | |
| 596 | - templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/list.html' | |
| 597 | - } | |
| 598 | - }, | |
| 599 | - | |
| 600 | - resolve: { | |
| 601 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 602 | - return $ocLazyLoad.load({ | |
| 603 | - name: 'ttInfoManage_module', | |
| 604 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 605 | - files: [ | |
| 606 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 607 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 608 | - "pages/scheduleApp/module/core/ttInfoManage/main.js" | |
| 609 | - ] | |
| 610 | - }); | |
| 611 | - }] | |
| 612 | - } | |
| 613 | - }) | |
| 614 | - .state("ttInfoManage_form", { | |
| 615 | - url: '/ttInfoManage_form', | |
| 616 | - views: { | |
| 617 | - "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/form.html'} | |
| 618 | - }, | |
| 619 | - resolve: { | |
| 620 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 621 | - return $ocLazyLoad.load({ | |
| 622 | - name: 'ttInfoManage_form_module', | |
| 623 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 624 | - files: [ | |
| 625 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 626 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 627 | - "pages/scheduleApp/module/core/ttInfoManage/main.js" | |
| 628 | - ] | |
| 629 | - }); | |
| 630 | - }] | |
| 631 | - } | |
| 632 | - }) | |
| 633 | - .state("ttInfoManage_edit", { | |
| 634 | - url: '/ttInfoManage_edit/:id', | |
| 635 | - views: { | |
| 636 | - "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/edit.html'} | |
| 637 | - }, | |
| 638 | - resolve: { | |
| 639 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 640 | - return $ocLazyLoad.load({ | |
| 641 | - name: 'ttInfoManage_edit_module', | |
| 642 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 643 | - files: [ | |
| 644 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 645 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 646 | - "pages/scheduleApp/module/core/ttInfoManage/main.js" | |
| 647 | - ] | |
| 648 | - }); | |
| 649 | - }] | |
| 650 | - } | |
| 651 | - }) | |
| 652 | - .state("ttInfoManage_detail", { | |
| 653 | - url: '/ttInfoManage_detail/:id', | |
| 654 | - views: { | |
| 655 | - "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detail.html'} | |
| 656 | - }, | |
| 657 | - resolve: { | |
| 658 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 659 | - return $ocLazyLoad.load({ | |
| 660 | - name: 'ttInfoManage_detail_module', | |
| 661 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 662 | - files: [ | |
| 663 | - "pages/scheduleApp/module/core/ttInfoManage/main.js" | |
| 664 | - ] | |
| 665 | - }); | |
| 666 | - }] | |
| 667 | - } | |
| 668 | - }) | |
| 669 | - .state("ttInfoDetailManage_form", { | |
| 670 | - url: '/ttInfoDetailManage_form/:xlid/:ttid/:xlname/:ttname', | |
| 671 | - views: { | |
| 672 | - "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoDetailManage/form.html'} | |
| 673 | - }, | |
| 674 | - resolve: { | |
| 675 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 676 | - return $ocLazyLoad.load({ | |
| 677 | - name: 'ttInfoDetailManage_form_module', | |
| 678 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 679 | - files: [ | |
| 680 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 681 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 682 | - "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 683 | - "pages/scheduleApp/module/core/ttInfoDetailManage/main.js" | |
| 684 | - ] | |
| 685 | - }); | |
| 686 | - }] | |
| 687 | - } | |
| 688 | - }) | |
| 689 | - .state("ttInfoDetailManage_edit", { | |
| 690 | - url: '/ttInfoDetailManage_edit/:xlid/:ttid/:xlname/:ttname', | |
| 691 | - views: { | |
| 692 | - "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoDetailManage/edit.html'} | |
| 693 | - }, | |
| 694 | - resolve: { | |
| 695 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 696 | - return $ocLazyLoad.load({ | |
| 697 | - name: 'ttInfoDetailManage_edit_module', | |
| 698 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 699 | - files: [ | |
| 700 | - "pages/scheduleApp/module/core/ttInfoDetailManage/timeTableDetailManage_old.js" | |
| 701 | - ] | |
| 702 | - }); | |
| 703 | - }] | |
| 704 | - } | |
| 705 | - }) | |
| 706 | - .state("ttInfoDetailManage_detail_edit", { | |
| 707 | - url: '/ttInfoDetailManage_detail_edit/:id/:xlid/:ttid/:xlname/:ttname', | |
| 708 | - views: { | |
| 709 | - "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoDetailManage/edit-detail.html'} | |
| 710 | - }, | |
| 711 | - resolve: { | |
| 712 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 713 | - return $ocLazyLoad.load({ | |
| 714 | - name: 'ttInfoDetailManage_detail_edit_module', | |
| 715 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 716 | - files: [ | |
| 717 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 718 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 719 | - "pages/scheduleApp/module/core/ttInfoDetailManage/timeTableDetailManage_old.js" | |
| 720 | - ] | |
| 721 | - }); | |
| 722 | - }] | |
| 723 | - } | |
| 724 | - }) | |
| 725 | - | |
| 726 | - | |
| 727 | - | |
| 728 | - | |
| 729 | - | |
| 730 | - | |
| 731 | - | |
| 732 | - | |
| 733 | - | |
| 734 | - | |
| 735 | - | |
| 736 | - | |
| 737 | - | |
| 738 | - | |
| 739 | - | |
| 740 | - | |
| 741 | - | |
| 742 | - | |
| 743 | - | |
| 744 | - | |
| 745 | - | |
| 746 | - // 排班规则管理模块 | |
| 747 | - .state("scheduleRuleManage", { | |
| 748 | - url: '/scheduleRuleManage', | |
| 749 | - views: { | |
| 750 | - "": { | |
| 751 | - templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/index.html' | |
| 752 | - }, | |
| 753 | - "scheduleRuleManage_list@scheduleRuleManage": { | |
| 754 | - templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/list.html' | |
| 755 | - } | |
| 756 | - }, | |
| 757 | - | |
| 758 | - resolve: { | |
| 759 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 760 | - return $ocLazyLoad.load({ | |
| 761 | - name: 'scheduleRuleManage_module', | |
| 762 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 763 | - files: [ | |
| 764 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 765 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 766 | - "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js" | |
| 767 | - ] | |
| 768 | - }); | |
| 769 | - }] | |
| 770 | - } | |
| 771 | - }) | |
| 772 | - .state("scheduleRuleManage_form", { | |
| 773 | - url: '/scheduleRuleManage_form', | |
| 774 | - views: { | |
| 775 | - "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/form.html'} | |
| 776 | - }, | |
| 777 | - resolve: { | |
| 778 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 779 | - return $ocLazyLoad.load({ | |
| 780 | - name: 'scheduleRuleManage_form_module', | |
| 781 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 782 | - files: [ | |
| 783 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 784 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 785 | - "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js" | |
| 786 | - ] | |
| 787 | - }); | |
| 788 | - }] | |
| 789 | - } | |
| 790 | - }) | |
| 791 | - .state("scheduleRuleManage_edit", { | |
| 792 | - url: '/scheduleRuleManage_edit/:id', | |
| 793 | - views: { | |
| 794 | - "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/edit.html'} | |
| 795 | - }, | |
| 796 | - resolve: { | |
| 797 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 798 | - return $ocLazyLoad.load({ | |
| 799 | - name: 'scheduleRuleManage_edit_module', | |
| 800 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 801 | - files: [ | |
| 802 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 803 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 804 | - "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js" | |
| 805 | - ] | |
| 806 | - }); | |
| 807 | - }] | |
| 808 | - } | |
| 809 | - }) | |
| 810 | - .state("scheduleRuleManage_detail", { | |
| 811 | - url: '/scheduleRuleManage_detail/:id', | |
| 812 | - views: { | |
| 813 | - "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/detail.html'} | |
| 814 | - }, | |
| 815 | - resolve: { | |
| 816 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 817 | - return $ocLazyLoad.load({ | |
| 818 | - name: 'scheduleRuleManage_detail_module', | |
| 819 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 820 | - files: [ | |
| 821 | - "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js" | |
| 822 | - ] | |
| 823 | - }); | |
| 824 | - }] | |
| 825 | - } | |
| 826 | - }) | |
| 827 | - | |
| 828 | - // 套跑管理模块 | |
| 829 | - .state("rerunManage", { | |
| 830 | - url: '/rerunManage', | |
| 831 | - views: { | |
| 832 | - "": { | |
| 833 | - templateUrl: 'pages/scheduleApp/module/core/rerunManage/index.html' | |
| 834 | - }, | |
| 835 | - "rerunManage_list@rerunManage": { | |
| 836 | - templateUrl: 'pages/scheduleApp/module/core/rerunManage/list.html' | |
| 837 | - } | |
| 838 | - }, | |
| 839 | - | |
| 840 | - resolve: { | |
| 841 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 842 | - return $ocLazyLoad.load({ | |
| 843 | - name: 'rerunManage_module', | |
| 844 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 845 | - files: [ | |
| 846 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 847 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 848 | - "pages/scheduleApp/module/core/rerunManage/main.js" | |
| 849 | - ] | |
| 850 | - }); | |
| 851 | - }] | |
| 852 | - } | |
| 853 | - }) | |
| 854 | - .state("rerunManage_form", { | |
| 855 | - url: '/rerunManage_form', | |
| 856 | - views: { | |
| 857 | - "": {templateUrl: 'pages/scheduleApp/module/core/rerunManage/form.html'} | |
| 858 | - }, | |
| 859 | - resolve: { | |
| 860 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 861 | - return $ocLazyLoad.load({ | |
| 862 | - name: 'rerunManage_form_module', | |
| 863 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 864 | - files: [ | |
| 865 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 866 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 867 | - "pages/scheduleApp/module/core/rerunManage/main.js" | |
| 868 | - ] | |
| 869 | - }); | |
| 870 | - }] | |
| 871 | - } | |
| 872 | - }) | |
| 873 | - .state("rerunManage_edit", { | |
| 874 | - url: '/rerunManage_edit/:id', | |
| 875 | - views: { | |
| 876 | - "": {templateUrl: 'pages/scheduleApp/module/core/rerunManage/edit.html'} | |
| 877 | - }, | |
| 878 | - resolve: { | |
| 879 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 880 | - return $ocLazyLoad.load({ | |
| 881 | - name: 'rerunManage_edit_module', | |
| 882 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 883 | - files: [ | |
| 884 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 885 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 886 | - "pages/scheduleApp/module/core/rerunManage/main.js" | |
| 887 | - ] | |
| 888 | - }); | |
| 889 | - }] | |
| 890 | - } | |
| 891 | - }) | |
| 892 | - .state("rerunManage_detail", { | |
| 893 | - url: '/rerunManage_detail/:id', | |
| 894 | - views: { | |
| 895 | - "": {templateUrl: 'pages/scheduleApp/module/core/rerunManage/detail.html'} | |
| 896 | - }, | |
| 897 | - resolve: { | |
| 898 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 899 | - return $ocLazyLoad.load({ | |
| 900 | - name: 'rerunManage_detail_module', | |
| 901 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 902 | - files: [ | |
| 903 | - "pages/scheduleApp/module/core/rerunManage/main.js" | |
| 904 | - ] | |
| 905 | - }); | |
| 906 | - }] | |
| 907 | - } | |
| 908 | - }) | |
| 909 | - | |
| 910 | - // 排班计划管理模块 | |
| 911 | - .state("schedulePlanManage", { | |
| 912 | - url: '/schedulePlanManage', | |
| 913 | - views: { | |
| 914 | - "": { | |
| 915 | - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index.html' | |
| 916 | - }, | |
| 917 | - "schedulePlanManage_list@schedulePlanManage": { | |
| 918 | - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list.html' | |
| 919 | - } | |
| 920 | - }, | |
| 921 | - | |
| 922 | - resolve: { | |
| 923 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 924 | - return $ocLazyLoad.load({ | |
| 925 | - name: 'schedulePlanManage_module', | |
| 926 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 927 | - files: [ | |
| 928 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 929 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 930 | - "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanManage.js" | |
| 931 | - ] | |
| 932 | - }); | |
| 933 | - }] | |
| 934 | - } | |
| 935 | - }) | |
| 936 | - .state("schedulePlanManage_form", { | |
| 937 | - url: '/schedulePlanManage_form', | |
| 938 | - views: { | |
| 939 | - "": { | |
| 940 | - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/form.html' | |
| 941 | - } | |
| 942 | - }, | |
| 943 | - | |
| 944 | - resolve: { | |
| 945 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 946 | - return $ocLazyLoad.load({ | |
| 947 | - name: 'schedulePlanManage_form_module', | |
| 948 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 949 | - files: [ | |
| 950 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 951 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 952 | - "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanManage.js" | |
| 953 | - ] | |
| 954 | - }); | |
| 955 | - }] | |
| 956 | - } | |
| 957 | - }) | |
| 958 | - | |
| 959 | - // 排班计划明细管理模块 | |
| 960 | - .state("schedulePlanInfoManage", { | |
| 961 | - url: '/schedulePlanInfoManage/:spid/:xlname/:ttname/:stime/:etime', | |
| 962 | - views: { | |
| 963 | - "": { | |
| 964 | - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index_info.html' | |
| 965 | - }, | |
| 966 | - "schedulePlanInfoManage_list@schedulePlanInfoManage": { | |
| 967 | - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list_info.html' | |
| 968 | - } | |
| 969 | - }, | |
| 970 | - | |
| 971 | - resolve: { | |
| 972 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 973 | - return $ocLazyLoad.load({ | |
| 974 | - name: 'schedulePlanInfoManage_module', | |
| 975 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 976 | - files: [ | |
| 977 | - "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanInfoManage.js" | |
| 978 | - ] | |
| 979 | - }); | |
| 980 | - }] | |
| 981 | - } | |
| 982 | - }) | |
| 983 | - | |
| 984 | - // 排班调度值勤日报模块 | |
| 985 | - .state("schedulePlanReportManage", { | |
| 986 | - url: '/schedulePlanReportManage', | |
| 987 | - views: { | |
| 988 | - "": { | |
| 989 | - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index_report.html' | |
| 990 | - }, | |
| 991 | - "schedulePlanReportManage_list@schedulePlanReportManage": { | |
| 992 | - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list_report.html' | |
| 993 | - } | |
| 994 | - }, | |
| 995 | - | |
| 996 | - resolve: { | |
| 997 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 998 | - return $ocLazyLoad.load({ | |
| 999 | - name: 'schedulePlanManage_module', | |
| 1000 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 1001 | - files: [ | |
| 1002 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 1003 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 1004 | - "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanReportManage.js" | |
| 1005 | - ] | |
| 1006 | - }); | |
| 1007 | - }] | |
| 1008 | - } | |
| 1009 | - }) | |
| 1010 | - | |
| 1011 | - .state("schedulePlanReportManage_edit", { | |
| 1012 | - url: '/schedulePlanReportManage_edit', | |
| 1013 | - params: {type: 0, groupInfo: null}, | |
| 1014 | - views: { | |
| 1015 | - "": { | |
| 1016 | - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/edit_report.html' | |
| 1017 | - } | |
| 1018 | - }, | |
| 1019 | - | |
| 1020 | - resolve: { | |
| 1021 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 1022 | - return $ocLazyLoad.load({ | |
| 1023 | - name: 'schedulePlanReportManage_edit_module', | |
| 1024 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 1025 | - files: [ | |
| 1026 | - "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 1027 | - "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 1028 | - "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanReportManage.js" | |
| 1029 | - ] | |
| 1030 | - }); | |
| 1031 | - }] | |
| 1032 | - } | |
| 1033 | - }) | |
| 1034 | - | |
| 1035 | - // 线路运营概览模块 | |
| 1036 | - .state("busLineInfoStat", { | |
| 1037 | - url: '/busLineInfoStat', | |
| 1038 | - views: { | |
| 1039 | - "": { | |
| 1040 | - templateUrl: 'pages/scheduleApp/module/core/busLineInfoStat/index.html' | |
| 1041 | - }, | |
| 1042 | - "busLineInfoStat_list@busLineInfoStat": { | |
| 1043 | - templateUrl: 'pages/scheduleApp/module/core/busLineInfoStat/list.html' | |
| 1044 | - } | |
| 1045 | - }, | |
| 1046 | - | |
| 1047 | - resolve: { | |
| 1048 | - deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 1049 | - return $ocLazyLoad.load({ | |
| 1050 | - name: 'busLineInfoStat_module', | |
| 1051 | - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 1052 | - files: [ | |
| 1053 | - "pages/scheduleApp/module/core/busLineInfoStat/busLineInfoStat.js" | |
| 1054 | - ] | |
| 1055 | - }); | |
| 1056 | - }] | |
| 1057 | - } | |
| 1058 | - }) | |
| 1059 | - | |
| 1060 | - | |
| 1061 | - | |
| 1062 | - | |
| 1063 | - | |
| 1064 | - // TODO: | |
| 1065 | - | |
| 1066 | - ; | |
| 1067 | -}]); | |
| 1068 | 1 | \ No newline at end of file |
| 2 | +//所有模块ui route 配置// ui route 配置 | |
| 3 | + | |
| 4 | +/** 车辆基础信息模块配置route */ | |
| 5 | +ScheduleApp.config([ | |
| 6 | + '$stateProvider', | |
| 7 | + '$urlRouterProvider', | |
| 8 | + function($stateProvider, $urlRouterProvider) { | |
| 9 | + // 默认路由 | |
| 10 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 11 | + | |
| 12 | + $stateProvider | |
| 13 | + .state("busInfoManage", { // index页面 | |
| 14 | + url: '/busInfoManage', | |
| 15 | + views: { | |
| 16 | + "": { | |
| 17 | + templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/index.html' | |
| 18 | + }, | |
| 19 | + "busInfoManage_list@busInfoManage": { | |
| 20 | + templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/list.html' | |
| 21 | + } | |
| 22 | + }, | |
| 23 | + | |
| 24 | + resolve: { | |
| 25 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 26 | + return $ocLazyLoad.load({ | |
| 27 | + name: 'busInfoManage_module', | |
| 28 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 29 | + files: [ | |
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 31 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 32 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 33 | + "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | |
| 34 | + ] | |
| 35 | + }); | |
| 36 | + }] | |
| 37 | + } | |
| 38 | + }) | |
| 39 | + .state("busInfoManage_form", { // 添加车辆form | |
| 40 | + url: '/busInfoManage_form', | |
| 41 | + views: { | |
| 42 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/form.html'} | |
| 43 | + }, | |
| 44 | + resolve: { | |
| 45 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 46 | + return $ocLazyLoad.load({ | |
| 47 | + name: 'busInfoManage_form_module', | |
| 48 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 49 | + files: [ | |
| 50 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 51 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 52 | + "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | |
| 53 | + ] | |
| 54 | + }); | |
| 55 | + }] | |
| 56 | + } | |
| 57 | + }) | |
| 58 | + .state("busInfoManage_edit", { // 修改车辆form | |
| 59 | + url: '/busInfoManage_edit/:id', | |
| 60 | + views: { | |
| 61 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/edit.html'} | |
| 62 | + }, | |
| 63 | + resolve: { | |
| 64 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 65 | + return $ocLazyLoad.load({ | |
| 66 | + name: 'busInfoManage_edit_module', | |
| 67 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 68 | + files: [ | |
| 69 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 70 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 71 | + "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | |
| 72 | + ] | |
| 73 | + }); | |
| 74 | + }] | |
| 75 | + } | |
| 76 | + }) | |
| 77 | + .state("busInfoManage_detail", { // 车辆详细信息 | |
| 78 | + url: '/busInfoManage_detail/:id', | |
| 79 | + views: { | |
| 80 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/detail.html'} | |
| 81 | + }, | |
| 82 | + resolve: { | |
| 83 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 84 | + return $ocLazyLoad.load({ | |
| 85 | + name: 'busInfoManage_detail_module', | |
| 86 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 87 | + files: [ | |
| 88 | + "pages/scheduleApp/module/basicInfo/busInfoManage/module.js" | |
| 89 | + ] | |
| 90 | + }); | |
| 91 | + }] | |
| 92 | + } | |
| 93 | + }) | |
| 94 | + } | |
| 95 | +]); | |
| 96 | +// ui route 配置 | |
| 97 | + | |
| 98 | +/** 车辆设备信息模块配置route */ | |
| 99 | +ScheduleApp.config([ | |
| 100 | + '$stateProvider', | |
| 101 | + '$urlRouterProvider', | |
| 102 | + function($stateProvider, $urlRouterProvider) { | |
| 103 | + // 默认路由 | |
| 104 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 105 | + | |
| 106 | + $stateProvider | |
| 107 | + .state("deviceInfoManage", { // index页面 | |
| 108 | + url: '/deviceInfoManage', | |
| 109 | + views: { | |
| 110 | + "": { | |
| 111 | + templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/index.html' | |
| 112 | + }, | |
| 113 | + "deviceInfoManage_list@deviceInfoManage": { | |
| 114 | + templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/list.html' | |
| 115 | + } | |
| 116 | + }, | |
| 117 | + | |
| 118 | + resolve: { | |
| 119 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 120 | + return $ocLazyLoad.load({ | |
| 121 | + name: 'deviceInfoManage_module', | |
| 122 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 123 | + files: [ | |
| 124 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 125 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 126 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | |
| 127 | + ] | |
| 128 | + }); | |
| 129 | + }] | |
| 130 | + } | |
| 131 | + }) | |
| 132 | + .state("deviceInfoManage_form", { // 添加设备信息form | |
| 133 | + url: '/deviceInfoManage_form', | |
| 134 | + views: { | |
| 135 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/form.html'} | |
| 136 | + }, | |
| 137 | + resolve: { | |
| 138 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 139 | + return $ocLazyLoad.load({ | |
| 140 | + name: 'deviceInfoManage_form_module', | |
| 141 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 142 | + files: [ | |
| 143 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 144 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 145 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | |
| 146 | + ] | |
| 147 | + }); | |
| 148 | + }] | |
| 149 | + } | |
| 150 | + }) | |
| 151 | + .state("deviceInfoManage_edit", { // 修改设备信息form | |
| 152 | + url: '/deviceInfoManage_edit/:id', | |
| 153 | + views: { | |
| 154 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/edit.html'} | |
| 155 | + }, | |
| 156 | + resolve: { | |
| 157 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 158 | + return $ocLazyLoad.load({ | |
| 159 | + name: 'deviceInfoManage_edit_module', | |
| 160 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 161 | + files: [ | |
| 162 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 163 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 164 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | |
| 165 | + ] | |
| 166 | + }); | |
| 167 | + }] | |
| 168 | + } | |
| 169 | + }) | |
| 170 | + .state("deviceInfoManage_detail", { // 详细信息页面 | |
| 171 | + url: '/deviceInfoManage_detail/:id', | |
| 172 | + views: { | |
| 173 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/detail.html'} | |
| 174 | + }, | |
| 175 | + resolve: { | |
| 176 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 177 | + return $ocLazyLoad.load({ | |
| 178 | + name: 'deviceInfoManage_detail_module', | |
| 179 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 180 | + files: [ | |
| 181 | + "pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js" | |
| 182 | + ] | |
| 183 | + }); | |
| 184 | + }] | |
| 185 | + } | |
| 186 | + }) | |
| 187 | + | |
| 188 | + } | |
| 189 | +]); | |
| 190 | +// ui route 配置 | |
| 191 | + | |
| 192 | +/** 人员基础信息模块配置route */ | |
| 193 | +ScheduleApp.config([ | |
| 194 | + '$stateProvider', | |
| 195 | + '$urlRouterProvider', | |
| 196 | + function($stateProvider, $urlRouterProvider) { | |
| 197 | + // 默认路由 | |
| 198 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 199 | + | |
| 200 | + $stateProvider | |
| 201 | + .state("employeeInfoManage", { // index页面 | |
| 202 | + url: '/employeeInfoManage', | |
| 203 | + views: { | |
| 204 | + "": { | |
| 205 | + templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/index.html' | |
| 206 | + }, | |
| 207 | + "employeeInfoManage_list@employeeInfoManage": { | |
| 208 | + templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html' | |
| 209 | + } | |
| 210 | + }, | |
| 211 | + | |
| 212 | + resolve: { | |
| 213 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 214 | + return $ocLazyLoad.load({ | |
| 215 | + name: 'employeeInfoManage_module', | |
| 216 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 217 | + files: [ | |
| 218 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 219 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 220 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 221 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | |
| 222 | + ] | |
| 223 | + }); | |
| 224 | + }] | |
| 225 | + } | |
| 226 | + }) | |
| 227 | + .state("employeeInfoManage_form", { // 添加人员信息form | |
| 228 | + url: '/employeeInfoManage_form', | |
| 229 | + views: { | |
| 230 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html'} | |
| 231 | + }, | |
| 232 | + resolve: { | |
| 233 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 234 | + return $ocLazyLoad.load({ | |
| 235 | + name: 'employeeInfoManage_form_module', | |
| 236 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 237 | + files: [ | |
| 238 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 239 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 240 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | |
| 241 | + ] | |
| 242 | + }); | |
| 243 | + }] | |
| 244 | + } | |
| 245 | + }) | |
| 246 | + .state("employeeInfoManage_edit", { // 修改人员信息form | |
| 247 | + url: '/employeeInfoManage_edit/:id', | |
| 248 | + views: { | |
| 249 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html'} | |
| 250 | + }, | |
| 251 | + resolve: { | |
| 252 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 253 | + return $ocLazyLoad.load({ | |
| 254 | + name: 'employeeInfoManage_edit_module', | |
| 255 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 256 | + files: [ | |
| 257 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 258 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 259 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | |
| 260 | + ] | |
| 261 | + }); | |
| 262 | + }] | |
| 263 | + } | |
| 264 | + }) | |
| 265 | + .state("employeeInfoManage_detail", { // 详细信息页面 | |
| 266 | + url: '/employeeInfoManage_detail/:id', | |
| 267 | + views: { | |
| 268 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/detail.html'} | |
| 269 | + }, | |
| 270 | + resolve: { | |
| 271 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 272 | + return $ocLazyLoad.load({ | |
| 273 | + name: 'employeeInfoManage_detail_module', | |
| 274 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 275 | + files: [ | |
| 276 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js" | |
| 277 | + ] | |
| 278 | + }); | |
| 279 | + }] | |
| 280 | + } | |
| 281 | + }) | |
| 282 | + | |
| 283 | +}]); | |
| 284 | +// ui route 配置 | |
| 285 | + | |
| 286 | +/** 车辆配置模块页面route */ | |
| 287 | +ScheduleApp.config([ | |
| 288 | + '$stateProvider', | |
| 289 | + '$urlRouterProvider', | |
| 290 | + function($stateProvider, $urlRouterProvider) { | |
| 291 | + // 默认路由 | |
| 292 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 293 | + | |
| 294 | + $stateProvider | |
| 295 | + .state("busConfig", { // index主页面 | |
| 296 | + url: '/busConfig', | |
| 297 | + views: { | |
| 298 | + "": { | |
| 299 | + templateUrl: 'pages/scheduleApp/module/core/busConfig/index.html' | |
| 300 | + }, | |
| 301 | + "busConfig_list@busConfig": { | |
| 302 | + templateUrl: 'pages/scheduleApp/module/core/busConfig/list.html' | |
| 303 | + } | |
| 304 | + }, | |
| 305 | + | |
| 306 | + resolve: { | |
| 307 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 308 | + return $ocLazyLoad.load({ | |
| 309 | + name: 'busConfig_module', | |
| 310 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 311 | + files: [ | |
| 312 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 313 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 314 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 315 | + "pages/scheduleApp/module/core/busConfig/module.js" | |
| 316 | + ] | |
| 317 | + }); | |
| 318 | + }] | |
| 319 | + } | |
| 320 | + }) | |
| 321 | + .state("busConfig_form", { // 添加页面 | |
| 322 | + url: '/busConfig_form', | |
| 323 | + views: { | |
| 324 | + "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/form.html'} | |
| 325 | + }, | |
| 326 | + resolve: { | |
| 327 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 328 | + return $ocLazyLoad.load({ | |
| 329 | + name: 'busConfig_form_module', | |
| 330 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 331 | + files: [ | |
| 332 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 333 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 334 | + "pages/scheduleApp/module/core/busConfig/module.js" | |
| 335 | + ] | |
| 336 | + }); | |
| 337 | + }] | |
| 338 | + } | |
| 339 | + }) | |
| 340 | + .state("busConfig_edit", { // 修改页面 | |
| 341 | + url: '/busConfig_edit/:id', | |
| 342 | + views: { | |
| 343 | + "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/edit.html'} | |
| 344 | + }, | |
| 345 | + resolve: { | |
| 346 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 347 | + return $ocLazyLoad.load({ | |
| 348 | + name: 'busConfig_edit_module', | |
| 349 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 350 | + files: [ | |
| 351 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 352 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 353 | + "pages/scheduleApp/module/core/busConfig/module.js" | |
| 354 | + ] | |
| 355 | + }); | |
| 356 | + }] | |
| 357 | + } | |
| 358 | + }) | |
| 359 | + .state("busConfig_detail", { // 详细信息页面 | |
| 360 | + url: '/busConfig_detail/:id', | |
| 361 | + views: { | |
| 362 | + "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/detail.html'} | |
| 363 | + }, | |
| 364 | + resolve: { | |
| 365 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 366 | + return $ocLazyLoad.load({ | |
| 367 | + name: 'busConfig_detail_module', | |
| 368 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 369 | + files: [ | |
| 370 | + "pages/scheduleApp/module/core/busConfig/module.js" | |
| 371 | + ] | |
| 372 | + }); | |
| 373 | + }] | |
| 374 | + } | |
| 375 | + }); | |
| 376 | + } | |
| 377 | +]); | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | +// ui route 配置 | |
| 382 | + | |
| 383 | +/** 线路运营概览配置route */ | |
| 384 | +ScheduleApp.config([ | |
| 385 | + '$stateProvider', | |
| 386 | + '$urlRouterProvider', | |
| 387 | + function($stateProvider, $urlRouterProvider) { | |
| 388 | + // 默认路由 | |
| 389 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 390 | + | |
| 391 | + $stateProvider | |
| 392 | + .state("busLineInfoStat", { // index页面 | |
| 393 | + url: '/busLineInfoStat', | |
| 394 | + views: { | |
| 395 | + "": { | |
| 396 | + templateUrl: 'pages/scheduleApp/module/core/busLineInfoStat/index.html' | |
| 397 | + }, | |
| 398 | + "busLineInfoStat_list@busLineInfoStat": { | |
| 399 | + templateUrl: 'pages/scheduleApp/module/core/busLineInfoStat/list.html' | |
| 400 | + } | |
| 401 | + }, | |
| 402 | + | |
| 403 | + resolve: { | |
| 404 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 405 | + return $ocLazyLoad.load({ | |
| 406 | + name: 'busLineInfoStat_module', | |
| 407 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 408 | + files: [ | |
| 409 | + "pages/scheduleApp/module/core/busLineInfoStat/module.js" | |
| 410 | + ] | |
| 411 | + }); | |
| 412 | + }] | |
| 413 | + } | |
| 414 | + }); | |
| 415 | + | |
| 416 | + } | |
| 417 | +]); | |
| 418 | +// ui route 配置 | |
| 419 | + | |
| 420 | +/** 人员配置模块页面route */ | |
| 421 | +ScheduleApp.config([ | |
| 422 | + '$stateProvider', | |
| 423 | + '$urlRouterProvider', | |
| 424 | + function($stateProvider, $urlRouterProvider) { | |
| 425 | + // 默认路由 | |
| 426 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 427 | + | |
| 428 | + $stateProvider | |
| 429 | + .state("employeeConfig", { // index页面 | |
| 430 | + url: '/employeeConfig', | |
| 431 | + views: { | |
| 432 | + "": { | |
| 433 | + templateUrl: 'pages/scheduleApp/module/core/employeeConfig/index.html' | |
| 434 | + }, | |
| 435 | + "employeeConfig_list@employeeConfig": { | |
| 436 | + templateUrl: 'pages/scheduleApp/module/core/employeeConfig/list.html' | |
| 437 | + } | |
| 438 | + }, | |
| 439 | + | |
| 440 | + resolve: { | |
| 441 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 442 | + return $ocLazyLoad.load({ | |
| 443 | + name: 'employeeConfig_module', | |
| 444 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 445 | + files: [ | |
| 446 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 447 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 448 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 449 | + "pages/scheduleApp/module/core/employeeConfig/module.js" | |
| 450 | + ] | |
| 451 | + }); | |
| 452 | + }] | |
| 453 | + } | |
| 454 | + }) | |
| 455 | + .state("employeeConfig_form", { // 添加人员配置form | |
| 456 | + url: '/employeeConfig_form', | |
| 457 | + views: { | |
| 458 | + "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/form.html'} | |
| 459 | + }, | |
| 460 | + resolve: { | |
| 461 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 462 | + return $ocLazyLoad.load({ | |
| 463 | + name: 'employeeConfig_form_module', | |
| 464 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 465 | + files: [ | |
| 466 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 467 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 468 | + "pages/scheduleApp/module/core/employeeConfig/module.js" | |
| 469 | + ] | |
| 470 | + }); | |
| 471 | + }] | |
| 472 | + } | |
| 473 | + }) | |
| 474 | + .state("employeeConfig_edit", { // 修改人员配置form | |
| 475 | + url: '/employeeConfig_edit/:id', | |
| 476 | + views: { | |
| 477 | + "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/edit.html'} | |
| 478 | + }, | |
| 479 | + resolve: { | |
| 480 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 481 | + return $ocLazyLoad.load({ | |
| 482 | + name: 'employeeConfig_edit_module', | |
| 483 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 484 | + files: [ | |
| 485 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 486 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 487 | + "pages/scheduleApp/module/core/employeeConfig/module.js" | |
| 488 | + ] | |
| 489 | + }); | |
| 490 | + }] | |
| 491 | + } | |
| 492 | + }) | |
| 493 | + .state("employeeConfig_detail", { // 详细信息页面 | |
| 494 | + url: '/employeeConfig_detail/:id', | |
| 495 | + views: { | |
| 496 | + "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/detail.html'} | |
| 497 | + }, | |
| 498 | + resolve: { | |
| 499 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 500 | + return $ocLazyLoad.load({ | |
| 501 | + name: 'employeeConfig_detail_module', | |
| 502 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 503 | + files: [ | |
| 504 | + "pages/scheduleApp/module/core/employeeConfig/module.js" | |
| 505 | + ] | |
| 506 | + }); | |
| 507 | + }] | |
| 508 | + } | |
| 509 | + }) | |
| 510 | + | |
| 511 | + } | |
| 512 | +]); | |
| 513 | +// ui route 配置 | |
| 514 | + | |
| 515 | +/** 路牌管理配置所有模块页面route */ | |
| 516 | +ScheduleApp.config([ | |
| 517 | + '$stateProvider', | |
| 518 | + '$urlRouterProvider', | |
| 519 | + function($stateProvider, $urlRouterProvider) { | |
| 520 | + // 默认路由 | |
| 521 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 522 | + | |
| 523 | + $stateProvider | |
| 524 | + .state("guideboardManage", { // index页面 | |
| 525 | + url: '/guideboardManage', | |
| 526 | + views: { | |
| 527 | + "": { | |
| 528 | + templateUrl: 'pages/scheduleApp/module/core/guideboardManage/index.html' | |
| 529 | + }, | |
| 530 | + "guideboardManage_list@guideboardManage": { | |
| 531 | + templateUrl: 'pages/scheduleApp/module/core/guideboardManage/list.html' | |
| 532 | + } | |
| 533 | + }, | |
| 534 | + | |
| 535 | + resolve: { | |
| 536 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 537 | + return $ocLazyLoad.load({ | |
| 538 | + name: 'guideboardManage_module', | |
| 539 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 540 | + files: [ | |
| 541 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 542 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 543 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 544 | + "pages/scheduleApp/module/core/guideboardManage/module.js" | |
| 545 | + ] | |
| 546 | + }); | |
| 547 | + }] | |
| 548 | + } | |
| 549 | + }) | |
| 550 | + .state("guideboardManage_detail", { // 详细信息页面 | |
| 551 | + url: '/guideboardManage_detail/:id', | |
| 552 | + views: { | |
| 553 | + "": {templateUrl: 'pages/scheduleApp/module/core/guideboardManage/detail.html'} | |
| 554 | + }, | |
| 555 | + resolve: { | |
| 556 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 557 | + return $ocLazyLoad.load({ | |
| 558 | + name: 'guideboardManage_detail_module', | |
| 559 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 560 | + files: [ | |
| 561 | + "pages/scheduleApp/module/core/guideboardManage/module.js" | |
| 562 | + ] | |
| 563 | + }); | |
| 564 | + }] | |
| 565 | + } | |
| 566 | + }) | |
| 567 | + | |
| 568 | +}]); | |
| 569 | +// ui route 配置 | |
| 570 | + | |
| 571 | +/** 套跑管理模块配置页面route */ | |
| 572 | +ScheduleApp.config([ | |
| 573 | + '$stateProvider', | |
| 574 | + '$urlRouterProvider', | |
| 575 | + function($stateProvider, $urlRouterProvider) { | |
| 576 | + // 默认路由 | |
| 577 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 578 | + | |
| 579 | + $stateProvider | |
| 580 | + .state("rerunManage", { // index页面 | |
| 581 | + url: '/rerunManage', | |
| 582 | + views: { | |
| 583 | + "": { | |
| 584 | + templateUrl: 'pages/scheduleApp/module/core/rerunManage/index.html' | |
| 585 | + }, | |
| 586 | + "rerunManage_list@rerunManage": { | |
| 587 | + templateUrl: 'pages/scheduleApp/module/core/rerunManage/list.html' | |
| 588 | + } | |
| 589 | + }, | |
| 590 | + | |
| 591 | + resolve: { | |
| 592 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 593 | + return $ocLazyLoad.load({ | |
| 594 | + name: 'rerunManage_module', | |
| 595 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 596 | + files: [ | |
| 597 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 598 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 599 | + "pages/scheduleApp/module/core/rerunManage/module.js" | |
| 600 | + ] | |
| 601 | + }); | |
| 602 | + }] | |
| 603 | + } | |
| 604 | + }) | |
| 605 | + .state("rerunManage_form", { // 添加套跑form | |
| 606 | + url: '/rerunManage_form', | |
| 607 | + views: { | |
| 608 | + "": {templateUrl: 'pages/scheduleApp/module/core/rerunManage/form.html'} | |
| 609 | + }, | |
| 610 | + resolve: { | |
| 611 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 612 | + return $ocLazyLoad.load({ | |
| 613 | + name: 'rerunManage_form_module', | |
| 614 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 615 | + files: [ | |
| 616 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 617 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 618 | + "pages/scheduleApp/module/core/rerunManage/module.js" | |
| 619 | + ] | |
| 620 | + }); | |
| 621 | + }] | |
| 622 | + } | |
| 623 | + }) | |
| 624 | + .state("rerunManage_edit", { // 修改套跑form | |
| 625 | + url: '/rerunManage_edit/:id', | |
| 626 | + views: { | |
| 627 | + "": {templateUrl: 'pages/scheduleApp/module/core/rerunManage/edit.html'} | |
| 628 | + }, | |
| 629 | + resolve: { | |
| 630 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 631 | + return $ocLazyLoad.load({ | |
| 632 | + name: 'rerunManage_edit_module', | |
| 633 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 634 | + files: [ | |
| 635 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 636 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 637 | + "pages/scheduleApp/module/core/rerunManage/module.js" | |
| 638 | + ] | |
| 639 | + }); | |
| 640 | + }] | |
| 641 | + } | |
| 642 | + }) | |
| 643 | + .state("rerunManage_detail", { // 详细信息页面 | |
| 644 | + url: '/rerunManage_detail/:id', | |
| 645 | + views: { | |
| 646 | + "": {templateUrl: 'pages/scheduleApp/module/core/rerunManage/detail.html'} | |
| 647 | + }, | |
| 648 | + resolve: { | |
| 649 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 650 | + return $ocLazyLoad.load({ | |
| 651 | + name: 'rerunManage_detail_module', | |
| 652 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 653 | + files: [ | |
| 654 | + "pages/scheduleApp/module/core/rerunManage/module.js" | |
| 655 | + ] | |
| 656 | + }); | |
| 657 | + }] | |
| 658 | + } | |
| 659 | + }) | |
| 660 | + } | |
| 661 | +]); | |
| 662 | +// ui route 配置 | |
| 663 | + | |
| 664 | +/** 排班计划管理配置route */ | |
| 665 | +ScheduleApp.config([ | |
| 666 | + '$stateProvider', | |
| 667 | + '$urlRouterProvider', | |
| 668 | + function($stateProvider, $urlRouterProvider) { | |
| 669 | + // 默认路由 | |
| 670 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 671 | + | |
| 672 | + $stateProvider | |
| 673 | + .state("schedulePlanManage", { // index页面 | |
| 674 | + url: '/schedulePlanManage', | |
| 675 | + views: { | |
| 676 | + "": { | |
| 677 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index.html' | |
| 678 | + }, | |
| 679 | + "schedulePlanManage_list@schedulePlanManage": { | |
| 680 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list.html' | |
| 681 | + } | |
| 682 | + }, | |
| 683 | + | |
| 684 | + resolve: { | |
| 685 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 686 | + return $ocLazyLoad.load({ | |
| 687 | + name: 'schedulePlanManage_module', | |
| 688 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 689 | + files: [ | |
| 690 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 691 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 692 | + "pages/scheduleApp/module/core/schedulePlanManage/module.js" | |
| 693 | + ] | |
| 694 | + }); | |
| 695 | + }] | |
| 696 | + } | |
| 697 | + }) | |
| 698 | + .state("schedulePlanManage_form", { // 添加排班计划form | |
| 699 | + url: '/schedulePlanManage_form', | |
| 700 | + views: { | |
| 701 | + "": { | |
| 702 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/form.html' | |
| 703 | + } | |
| 704 | + }, | |
| 705 | + | |
| 706 | + resolve: { | |
| 707 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 708 | + return $ocLazyLoad.load({ | |
| 709 | + name: 'schedulePlanManage_form_module', | |
| 710 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 711 | + files: [ | |
| 712 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 713 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 714 | + "pages/scheduleApp/module/core/schedulePlanManage/module.js" | |
| 715 | + ] | |
| 716 | + }); | |
| 717 | + }] | |
| 718 | + } | |
| 719 | + }) | |
| 720 | + | |
| 721 | + | |
| 722 | + } | |
| 723 | +]); | |
| 724 | +// ui route 配置 | |
| 725 | + | |
| 726 | +/** 排班计划明细配置route */ | |
| 727 | +ScheduleApp.config([ | |
| 728 | + '$stateProvider', | |
| 729 | + '$urlRouterProvider', | |
| 730 | + function($stateProvider, $urlRouterProvider) { | |
| 731 | + // 默认路由 | |
| 732 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 733 | + | |
| 734 | + $stateProvider | |
| 735 | + // 排班计划明细管理模块 | |
| 736 | + .state("schedulePlanInfoManage", { | |
| 737 | + url: '/schedulePlanInfoManage/:spid/:xlname/:ttname/:stime/:etime', | |
| 738 | + views: { | |
| 739 | + "": { | |
| 740 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/info/index_info.html' | |
| 741 | + }, | |
| 742 | + "schedulePlanInfoManage_list@schedulePlanInfoManage": { | |
| 743 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/info/list_info.html' | |
| 744 | + } | |
| 745 | + }, | |
| 746 | + | |
| 747 | + resolve: { | |
| 748 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 749 | + return $ocLazyLoad.load({ | |
| 750 | + name: 'schedulePlanInfoManage_module', | |
| 751 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 752 | + files: [ | |
| 753 | + "pages/scheduleApp/module/core/schedulePlanManage/info/module.js" | |
| 754 | + ] | |
| 755 | + }); | |
| 756 | + }] | |
| 757 | + } | |
| 758 | + }); | |
| 759 | + | |
| 760 | + } | |
| 761 | +]); | |
| 762 | +// ui route 配置 | |
| 763 | + | |
| 764 | +/** 排班调度值勤日报配置route */ | |
| 765 | +ScheduleApp.config([ | |
| 766 | + '$stateProvider', | |
| 767 | + '$urlRouterProvider', | |
| 768 | + function($stateProvider, $urlRouterProvider) { | |
| 769 | + // 默认路由 | |
| 770 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 771 | + | |
| 772 | + $stateProvider | |
| 773 | + .state("schedulePlanReportManage", { | |
| 774 | + url: '/schedulePlanReportManage', | |
| 775 | + views: { | |
| 776 | + "": { | |
| 777 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/report/index_report.html' | |
| 778 | + }, | |
| 779 | + "schedulePlanReportManage_list@schedulePlanReportManage": { | |
| 780 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/report/list_report.html' | |
| 781 | + } | |
| 782 | + }, | |
| 783 | + | |
| 784 | + resolve: { | |
| 785 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 786 | + return $ocLazyLoad.load({ | |
| 787 | + name: 'schedulePlanManage_module', | |
| 788 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 789 | + files: [ | |
| 790 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 791 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 792 | + "pages/scheduleApp/module/core/schedulePlanManage/report/module.js" | |
| 793 | + ] | |
| 794 | + }); | |
| 795 | + }] | |
| 796 | + } | |
| 797 | + }) | |
| 798 | + .state("schedulePlanReportManage_edit", { | |
| 799 | + url: '/schedulePlanReportManage_edit', | |
| 800 | + params: {type: 0, groupInfo: null}, | |
| 801 | + views: { | |
| 802 | + "": { | |
| 803 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/report/edit_report.html' | |
| 804 | + } | |
| 805 | + }, | |
| 806 | + | |
| 807 | + resolve: { | |
| 808 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 809 | + return $ocLazyLoad.load({ | |
| 810 | + name: 'schedulePlanReportManage_edit_module', | |
| 811 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 812 | + files: [ | |
| 813 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 814 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 815 | + "pages/scheduleApp/module/core/schedulePlanManage/report/module.js" | |
| 816 | + ] | |
| 817 | + }); | |
| 818 | + }] | |
| 819 | + } | |
| 820 | + }); | |
| 821 | + | |
| 822 | + } | |
| 823 | +]); | |
| 824 | +// ui route 配置 | |
| 825 | + | |
| 826 | +/** 排班规则模块配置route */ | |
| 827 | +ScheduleApp.config([ | |
| 828 | + '$stateProvider', | |
| 829 | + '$urlRouterProvider', | |
| 830 | + function($stateProvider, $urlRouterProvider) { | |
| 831 | + // 默认路由 | |
| 832 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 833 | + | |
| 834 | + $stateProvider | |
| 835 | + .state("scheduleRuleManage", { // index页面 | |
| 836 | + url: '/scheduleRuleManage', | |
| 837 | + views: { | |
| 838 | + "": { | |
| 839 | + templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/index.html' | |
| 840 | + }, | |
| 841 | + "scheduleRuleManage_list@scheduleRuleManage": { | |
| 842 | + templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/list.html' | |
| 843 | + } | |
| 844 | + }, | |
| 845 | + | |
| 846 | + resolve: { | |
| 847 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 848 | + return $ocLazyLoad.load({ | |
| 849 | + name: 'scheduleRuleManage_module', | |
| 850 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 851 | + files: [ | |
| 852 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 853 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 854 | + "pages/scheduleApp/module/core/scheduleRuleManage/module.js" | |
| 855 | + ] | |
| 856 | + }); | |
| 857 | + }] | |
| 858 | + } | |
| 859 | + }) | |
| 860 | + .state("scheduleRuleManage_form", { // 添加排班规则form | |
| 861 | + url: '/scheduleRuleManage_form', | |
| 862 | + views: { | |
| 863 | + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/form.html'} | |
| 864 | + }, | |
| 865 | + resolve: { | |
| 866 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 867 | + return $ocLazyLoad.load({ | |
| 868 | + name: 'scheduleRuleManage_form_module', | |
| 869 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 870 | + files: [ | |
| 871 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 872 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 873 | + "pages/scheduleApp/module/core/scheduleRuleManage/module.js" | |
| 874 | + ] | |
| 875 | + }); | |
| 876 | + }] | |
| 877 | + } | |
| 878 | + }) | |
| 879 | + .state("scheduleRuleManage_edit", { // 修改排班规则form | |
| 880 | + url: '/scheduleRuleManage_edit/:id', | |
| 881 | + views: { | |
| 882 | + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/edit.html'} | |
| 883 | + }, | |
| 884 | + resolve: { | |
| 885 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 886 | + return $ocLazyLoad.load({ | |
| 887 | + name: 'scheduleRuleManage_edit_module', | |
| 888 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 889 | + files: [ | |
| 890 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 891 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 892 | + "pages/scheduleApp/module/core/scheduleRuleManage/module.js" | |
| 893 | + ] | |
| 894 | + }); | |
| 895 | + }] | |
| 896 | + } | |
| 897 | + }) | |
| 898 | + .state("scheduleRuleManage_detail", { // 详细信息 | |
| 899 | + url: '/scheduleRuleManage_detail/:id', | |
| 900 | + views: { | |
| 901 | + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/detail.html'} | |
| 902 | + }, | |
| 903 | + resolve: { | |
| 904 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 905 | + return $ocLazyLoad.load({ | |
| 906 | + name: 'scheduleRuleManage_detail_module', | |
| 907 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 908 | + files: [ | |
| 909 | + "pages/scheduleApp/module/core/scheduleRuleManage/module.js" | |
| 910 | + ] | |
| 911 | + }); | |
| 912 | + }] | |
| 913 | + } | |
| 914 | + }) | |
| 915 | + } | |
| 916 | +]); | |
| 917 | +// ui route 配置 | |
| 918 | + | |
| 919 | +/** 时刻表管理配置route */ | |
| 920 | +ScheduleApp.config([ | |
| 921 | + '$stateProvider', | |
| 922 | + '$urlRouterProvider', | |
| 923 | + function($stateProvider, $urlRouterProvider) { | |
| 924 | + // 默认路由 | |
| 925 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 926 | + | |
| 927 | + $stateProvider | |
| 928 | + .state("ttInfoManage", { // index页面 | |
| 929 | + url: '/ttInfoManage', | |
| 930 | + views: { | |
| 931 | + "": { | |
| 932 | + templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/index.html' | |
| 933 | + }, | |
| 934 | + "ttInfoManage_list@ttInfoManage": { | |
| 935 | + templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/list.html' | |
| 936 | + } | |
| 937 | + }, | |
| 938 | + | |
| 939 | + resolve: { | |
| 940 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 941 | + return $ocLazyLoad.load({ | |
| 942 | + name: 'ttInfoManage_module', | |
| 943 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 944 | + files: [ | |
| 945 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 946 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 947 | + "pages/scheduleApp/module/core/ttInfoManage/module.js" | |
| 948 | + ] | |
| 949 | + }); | |
| 950 | + }] | |
| 951 | + } | |
| 952 | + }) | |
| 953 | + .state("ttInfoManage_form", { // 添加时刻表信息form | |
| 954 | + url: '/ttInfoManage_form', | |
| 955 | + views: { | |
| 956 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/form.html'} | |
| 957 | + }, | |
| 958 | + resolve: { | |
| 959 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 960 | + return $ocLazyLoad.load({ | |
| 961 | + name: 'ttInfoManage_form_module', | |
| 962 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 963 | + files: [ | |
| 964 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 965 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 966 | + "pages/scheduleApp/module/core/ttInfoManage/module.js" | |
| 967 | + ] | |
| 968 | + }); | |
| 969 | + }] | |
| 970 | + } | |
| 971 | + }) | |
| 972 | + .state("ttInfoManage_edit", { // 修改时刻表信息form | |
| 973 | + url: '/ttInfoManage_edit/:id', | |
| 974 | + views: { | |
| 975 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/edit.html'} | |
| 976 | + }, | |
| 977 | + resolve: { | |
| 978 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 979 | + return $ocLazyLoad.load({ | |
| 980 | + name: 'ttInfoManage_edit_module', | |
| 981 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 982 | + files: [ | |
| 983 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 984 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 985 | + "pages/scheduleApp/module/core/ttInfoManage/module.js" | |
| 986 | + ] | |
| 987 | + }); | |
| 988 | + }] | |
| 989 | + } | |
| 990 | + }) | |
| 991 | + .state("ttInfoManage_detail", { // 时刻表详细信息 | |
| 992 | + url: '/ttInfoManage_detail/:id', | |
| 993 | + views: { | |
| 994 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detail.html'} | |
| 995 | + }, | |
| 996 | + resolve: { | |
| 997 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 998 | + return $ocLazyLoad.load({ | |
| 999 | + name: 'ttInfoManage_detail_module', | |
| 1000 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 1001 | + files: [ | |
| 1002 | + "pages/scheduleApp/module/core/ttInfoManage/module.js" | |
| 1003 | + ] | |
| 1004 | + }); | |
| 1005 | + }] | |
| 1006 | + } | |
| 1007 | + }); | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + } | |
| 1011 | +]); | |
| 1012 | +// ui route 配置 | |
| 1013 | + | |
| 1014 | +/** 时刻表编辑管理配置route */ | |
| 1015 | +ScheduleApp.config([ | |
| 1016 | + '$stateProvider', | |
| 1017 | + '$urlRouterProvider', | |
| 1018 | + function($stateProvider, $urlRouterProvider) { | |
| 1019 | + // 默认路由 | |
| 1020 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 1021 | + | |
| 1022 | + $stateProvider | |
| 1023 | + .state("ttInfoDetailManage_form", { // 时刻表明细导入 | |
| 1024 | + url: '/ttInfoDetailManage_form/:xlid/:ttid/:xlname/:ttname', | |
| 1025 | + views: { | |
| 1026 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/form.html'} | |
| 1027 | + }, | |
| 1028 | + resolve: { | |
| 1029 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 1030 | + return $ocLazyLoad.load({ | |
| 1031 | + name: 'ttInfoDetailManage_form_module', | |
| 1032 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 1033 | + files: [ | |
| 1034 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 1035 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 1036 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 1037 | + "pages/scheduleApp/module/core/ttInfoManage/detailedit/module.js" | |
| 1038 | + ] | |
| 1039 | + }); | |
| 1040 | + }] | |
| 1041 | + } | |
| 1042 | + }) | |
| 1043 | + .state("ttInfoDetailManage_edit", { // 时刻表详细信息编辑 | |
| 1044 | + url: '/ttInfoDetailManage_edit/:xlid/:ttid/:xlname/:ttname', | |
| 1045 | + views: { | |
| 1046 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/edit.html'} | |
| 1047 | + }, | |
| 1048 | + resolve: { | |
| 1049 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 1050 | + return $ocLazyLoad.load({ | |
| 1051 | + name: 'ttInfoDetailManage_edit_module', | |
| 1052 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 1053 | + files: [ | |
| 1054 | + "pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js" | |
| 1055 | + ] | |
| 1056 | + }); | |
| 1057 | + }] | |
| 1058 | + } | |
| 1059 | + }) | |
| 1060 | + .state("ttInfoDetailManage_detail_edit", { // 时刻表详细信息单元格编辑 | |
| 1061 | + url: '/ttInfoDetailManage_detail_edit/:id/:xlid/:ttid/:xlname/:ttname', | |
| 1062 | + views: { | |
| 1063 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail.html'} | |
| 1064 | + }, | |
| 1065 | + resolve: { | |
| 1066 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 1067 | + return $ocLazyLoad.load({ | |
| 1068 | + name: 'ttInfoDetailManage_detail_edit_module', | |
| 1069 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 1070 | + files: [ | |
| 1071 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 1072 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 1073 | + "pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js" | |
| 1074 | + ] | |
| 1075 | + }); | |
| 1076 | + }] | |
| 1077 | + } | |
| 1078 | + }); | |
| 1079 | + | |
| 1080 | + } | |
| 1081 | +]); | |
| 1069 | 1082 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/dist/busConfig.dist.html deleted
100644 → 0
| 1 | -<div class="page-head"> | |
| 2 | - <div class="page-title"> | |
| 3 | - <h1>车辆配置</h1> | |
| 4 | - </div> | |
| 5 | -</div> | |
| 6 | - | |
| 7 | -<ul class="page-breadcrumb breadcrumb"> | |
| 8 | - <li> | |
| 9 | - <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | - <i class="fa fa-circle"></i> | |
| 11 | - </li> | |
| 12 | - <li> | |
| 13 | - <span class="active">运营计划管理</span> | |
| 14 | - <i class="fa fa-circle"></i> | |
| 15 | - </li> | |
| 16 | - <li> | |
| 17 | - <span class="active">车俩配置</span> | |
| 18 | - </li> | |
| 19 | -</ul> | |
| 20 | - | |
| 21 | -<div class="row" id="busConfig" ng-app="busConfigApp"> | |
| 22 | - <div class="col-md-12" ng-controller="busConfigCtrl as bcc"> | |
| 23 | - <div class="portlet light bordered"> | |
| 24 | - <div class="portlet-title"> | |
| 25 | - <div class="caption font-dark"> | |
| 26 | - <i class="fa fa-database font-dark"></i> | |
| 27 | - <span class="caption-subject bold uppercase">配置表</span> | |
| 28 | - </div> | |
| 29 | - <div class="actions"> | |
| 30 | - <a href="javascirpt:" class="btn btn-circle blue"> | |
| 31 | - <i class="fa fa-plus"></i> | |
| 32 | - 添加配置 | |
| 33 | - </a> | |
| 34 | - <div class="btn-group"> | |
| 35 | - <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 36 | - <i class="fa fa-share"></i> | |
| 37 | - <span>系统工具</span> | |
| 38 | - <i class="fa fa-angle-down"></i> | |
| 39 | - </a> | |
| 40 | - <ul class="dropdown-menu pull-right"> | |
| 41 | - <li> | |
| 42 | - <a href="javascript:" class="tool-action"> | |
| 43 | - <i class="fa fa-file-excel-o"></i> | |
| 44 | - 导出excel | |
| 45 | - </a> | |
| 46 | - </li> | |
| 47 | - <li class="divider"></li> | |
| 48 | - <li> | |
| 49 | - <a href="javascript:" class="tool-action"> | |
| 50 | - <i class="fa fa-refresh"></i> | |
| 51 | - 刷行数据 | |
| 52 | - </a> | |
| 53 | - </li> | |
| 54 | - </ul> | |
| 55 | - </div> | |
| 56 | - </div> | |
| 57 | - </div> | |
| 58 | - | |
| 59 | - <div class="portlet-body"> | |
| 60 | - <table class="table table-striped table-bordered table-hover table-checkable order-column" id="busConfigInfoTable"> | |
| 61 | - <thead> | |
| 62 | - <tr> | |
| 63 | - <th> | |
| 64 | - <input type="checkbox" class="group-checkable" data-set="#busConfigInfoTable.checkboxes"/> | |
| 65 | - </th> | |
| 66 | - <th>线路名称</th> | |
| 67 | - <th>自编号</th> | |
| 68 | - <th>设备编号</th> | |
| 69 | - <th>启用日期</th> | |
| 70 | - <th>终止日期</th> | |
| 71 | - <th>停车点</th> | |
| 72 | - <th>操作</th> | |
| 73 | - </tr> | |
| 74 | - </thead> | |
| 75 | - <tbody> | |
| 76 | - <tr ng-repeat="info in bcc.infos" class="odd gradeX"> | |
| 77 | - <td> | |
| 78 | - <input type="checkbox" class="checkboxes"/> | |
| 79 | - </td> | |
| 80 | - <td> | |
| 81 | - <span ng-bind="info.xl"></span> | |
| 82 | - </td> | |
| 83 | - <td> | |
| 84 | - <span ng-bind="info.clZbh"></span> | |
| 85 | - </td> | |
| 86 | - <td> | |
| 87 | - <span ng-bind="info.sbbh"></span> | |
| 88 | - </td> | |
| 89 | - <td> | |
| 90 | - <span ng-bind="info.qyrq | date:'yyyy-MM-dd HH:mm:ss'"></span> | |
| 91 | - </td> | |
| 92 | - <td> | |
| 93 | - <span ng-bind="info.zzrq | date:'yyyy-MM-dd HH:mm:ss'"></span> | |
| 94 | - </td> | |
| 95 | - <td> | |
| 96 | - <span ng-bind="info.tcd"></span> | |
| 97 | - </td> | |
| 98 | - </tr> | |
| 99 | - </tbody> | |
| 100 | - </table> | |
| 101 | - | |
| 102 | - <div style="text-align: right;"> | |
| 103 | - <uib-pagination total-items="bcc.totalItems" | |
| 104 | - ng-model="bcc.currentPage" | |
| 105 | - ng-change="bcc.pageChanged()" | |
| 106 | - previous-text="上一页" | |
| 107 | - next-text="下一页"> | |
| 108 | - </uib-pagination> | |
| 109 | - </div> | |
| 110 | - | |
| 111 | - </div> | |
| 112 | - </div> | |
| 113 | - </div> | |
| 114 | -</div> | |
| 115 | - | |
| 116 | -<script>angular.module("busConfigApp",["ngResource","ui.bootstrap"]).factory("BusConfigInfo",["$resource",function(a){return a("/cci",{},{list:{method:"GET"}})}]);</script> | |
| 117 | -<script>angular.module("busConfigApp").controller("busConfigCtrl",["BusConfigInfo",function(a){var b=this;b.totalItems=64,b.currentPage=4,b.infos=[],b.pageChanged=function(){console.log("页面调转到:"+b.currentPage)},a.list(function(a){console.log("后台返回记录数:"+a.content.length),b.infos=a.content})}]);</script> | |
| 118 | - | |
| 119 | -<script type="text/javascript"> | |
| 120 | - angular.bootstrap(document.getElementById("busConfig"), ["busConfigApp"]); | |
| 121 | -</script> | |
| 122 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/dist/controller.min.js deleted
100644 → 0
| 1 | -angular.module("busConfigApp").controller("busConfigCtrl",["BusConfigInfo",function(a){var b=this;b.totalItems=64,b.currentPage=4,b.infos=[],b.pageChanged=function(){console.log("页面调转到:"+b.currentPage)},a.list(function(a){console.log("后台返回记录数:"+a.content.length),b.infos=a.content})}]); | |
| 2 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/dist/service.min.js deleted
100644 → 0
src/main/resources/static/pages/scheduleApp/module/core/busConfig/list.html
| ... | ... | @@ -10,6 +10,7 @@ |
| 10 | 10 | <th style="width: 150px;">启用日期</th> |
| 11 | 11 | <th style="width: 150px;">终止日期</th> |
| 12 | 12 | <th >停车点</th> |
| 13 | + <th style="width: 80px;" >状态</th> | |
| 13 | 14 | <th style="width: 21%">操作</th> |
| 14 | 15 | </tr> |
| 15 | 16 | <tr role="row" class="filter"> |
| ... | ... | @@ -34,6 +35,11 @@ |
| 34 | 35 | <td></td> |
| 35 | 36 | <td></td> |
| 36 | 37 | <td> |
| 38 | + <label class="checkbox-inline input"> | |
| 39 | + <input type="checkbox" ng-model="ctrl.searchCondition()['isCancel_eq']" />作废 | |
| 40 | + </label> | |
| 41 | + </td> | |
| 42 | + <td> | |
| 37 | 43 | <button class="btn btn-sm green btn-outline filter-submit margin-bottom" |
| 38 | 44 | ng-click="ctrl.pageChanaged()"> |
| 39 | 45 | <i class="fa fa-search"></i> 搜索</button> |
| ... | ... | @@ -67,6 +73,10 @@ |
| 67 | 73 | <span ng-bind="info.tcd"></span> |
| 68 | 74 | </td> |
| 69 | 75 | <td> |
| 76 | + <span class="glyphicon glyphicon-ok" ng-if="info.isCancel == '0'"></span> | |
| 77 | + <span class="glyphicon glyphicon-remove" ng-if="info.isCancel == '1'"></span> | |
| 78 | + </td> | |
| 79 | + <td> | |
| 70 | 80 | <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> |
| 71 | 81 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> |
| 72 | 82 | <a ui-sref="busConfig_detail({id: info.id})" class="btn btn-info btn-sm"> 详细 </a> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/busConfig.js renamed to src/main/resources/static/pages/scheduleApp/module/core/busConfig/module.js
| 1 | -// 车辆配置管理 service controller 等写在一起 | |
| 2 | -angular.module('ScheduleApp').factory('BusConfigService', ['BusConfigService_g', function(service) { | |
| 3 | - /** 当前的查询条件信息 */ | |
| 4 | - var currentSearchCondition = {}; | |
| 5 | - | |
| 6 | - /** 当前第几页 */ | |
| 7 | - var currentPageNo = 1; | |
| 8 | - | |
| 9 | - return { | |
| 10 | - /** | |
| 11 | - * 获取查询条件信息, | |
| 12 | - * 用于给controller用来和页面数据绑定。 | |
| 13 | - */ | |
| 14 | - getSearchCondition: function() { | |
| 15 | - return currentSearchCondition; | |
| 16 | - }, | |
| 17 | - /** | |
| 18 | - * 重置查询条件信息。 | |
| 19 | - */ | |
| 20 | - resetSearchCondition: function() { | |
| 21 | - var key; | |
| 22 | - for (key in currentSearchCondition) { | |
| 23 | - currentSearchCondition[key] = undefined; | |
| 24 | - } | |
| 25 | - }, | |
| 26 | - /** | |
| 27 | - * 设置当前页码。 | |
| 28 | - * @param cpn 从1开始,后台是从0开始的 | |
| 29 | - */ | |
| 30 | - setCurrentPageNo: function(cpn) { | |
| 31 | - currentPageNo = cpn; | |
| 32 | - }, | |
| 33 | - /** | |
| 34 | - * 组装查询参数,返回一个promise查询结果。 | |
| 35 | - * @param params 查询参数 | |
| 36 | - * @return 返回一个 promise | |
| 37 | - */ | |
| 38 | - getPage: function() { | |
| 39 | - var params = currentSearchCondition; // 查询条件 | |
| 40 | - params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 41 | - return service.rest.list(params).$promise; | |
| 42 | - }, | |
| 43 | - /** | |
| 44 | - * 获取明细信息。 | |
| 45 | - * @param id 车辆id | |
| 46 | - * @return 返回一个 promise | |
| 47 | - */ | |
| 48 | - getDetail: function(id) { | |
| 49 | - var params = {id: id}; | |
| 50 | - return service.rest.get(params).$promise; | |
| 51 | - }, | |
| 52 | - /** | |
| 53 | - * 保存信息。 | |
| 54 | - * @param obj 车辆详细信息 | |
| 55 | - * @return 返回一个 promise | |
| 56 | - */ | |
| 57 | - saveDetail: function(obj) { | |
| 58 | - return service.rest.save(obj).$promise; | |
| 59 | - }, | |
| 60 | - /** | |
| 61 | - * 删除信息。 | |
| 62 | - * @param id 主键id | |
| 63 | - * @returns {*|Function|promise|n} | |
| 64 | - */ | |
| 65 | - deleteDetail: function(id) { | |
| 66 | - return service.rest.delete({id: id}).$promise; | |
| 67 | - } | |
| 68 | - }; | |
| 69 | - | |
| 70 | -}]); | |
| 71 | - | |
| 72 | -angular.module('ScheduleApp').controller('BusConfigCtrl', ['BusConfigService', '$state', '$uibModal', function(busConfigService, $state, $uibModal) { | |
| 73 | - var self = this; | |
| 74 | - | |
| 75 | - // 切换到form状态 | |
| 76 | - self.goForm = function() { | |
| 77 | - //alert("切换"); | |
| 78 | - $state.go("busConfig_form"); | |
| 79 | - }; | |
| 80 | - | |
| 81 | - // 导入excel | |
| 82 | - self.importData = function() { | |
| 83 | - // large方式弹出模态对话框 | |
| 84 | - var modalInstance = $uibModal.open({ | |
| 85 | - templateUrl: '/pages/scheduleApp/module/core/busConfig/dataImport.html', | |
| 86 | - size: "lg", | |
| 87 | - animation: true, | |
| 88 | - backdrop: 'static', | |
| 89 | - resolve: { | |
| 90 | - // 可以传值给controller | |
| 91 | - }, | |
| 92 | - windowClass: 'center-modal', | |
| 93 | - controller: "BusConfigToolsCtrl", | |
| 94 | - controllerAs: "ctrl", | |
| 95 | - bindToController: true | |
| 96 | - }); | |
| 97 | - modalInstance.result.then( | |
| 98 | - function() { | |
| 99 | - console.log("dataImport.html打开"); | |
| 100 | - }, | |
| 101 | - function() { | |
| 102 | - console.log("dataImport.html消失"); | |
| 103 | - } | |
| 104 | - ); | |
| 105 | - }; | |
| 106 | -}]); | |
| 107 | - | |
| 108 | -angular.module('ScheduleApp').controller('BusConfigToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | |
| 109 | - var self = this; | |
| 110 | - self.data = "TODO"; | |
| 111 | - | |
| 112 | - // 关闭窗口 | |
| 113 | - self.close = function() { | |
| 114 | - $modalInstance.dismiss("cancel"); | |
| 115 | - }; | |
| 116 | - | |
| 117 | - self.clearInputFile = function() { | |
| 118 | - angular.element("input[type='file']").val(null); | |
| 119 | - }; | |
| 120 | - | |
| 121 | - // 上传文件组件 | |
| 122 | - self.uploader = new FileUploader({ | |
| 123 | - url: "/cci/dataImport", | |
| 124 | - filters: [] // 用于过滤文件,比如只允许导入excel | |
| 125 | - }); | |
| 126 | - self.uploader.onAfterAddingFile = function(fileItem) | |
| 127 | - { | |
| 128 | - console.info('onAfterAddingFile', fileItem); | |
| 129 | - console.log(self.uploader.queue.length); | |
| 130 | - if (self.uploader.queue.length > 1) | |
| 131 | - self.uploader.removeFromQueue(0); | |
| 132 | - }; | |
| 133 | - self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 134 | - { | |
| 135 | - console.info('onSuccessItem', fileItem, response, status, headers); | |
| 136 | - }; | |
| 137 | - self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 138 | - { | |
| 139 | - console.info('onErrorItem', fileItem, response, status, headers); | |
| 140 | - }; | |
| 141 | - | |
| 142 | -}]); | |
| 143 | - | |
| 144 | -angular.module('ScheduleApp').controller('BusConfigListCtrl', ['BusConfigService', function(busConfigService) { | |
| 145 | - var self = this; | |
| 146 | - self.pageInfo = { | |
| 147 | - totalItems : 0, | |
| 148 | - currentPage : 1, | |
| 149 | - infos: [] | |
| 150 | - }; | |
| 151 | - | |
| 152 | - // 初始创建的时候,获取一次列表数据 | |
| 153 | - busConfigService.getPage().then( | |
| 154 | - function(result) { | |
| 155 | - self.pageInfo.totalItems = result.totalElements; | |
| 156 | - self.pageInfo.currentPage = result.number + 1; | |
| 157 | - self.pageInfo.infos = result.content; | |
| 158 | - busConfigService.setCurrentPageNo(result.number + 1); | |
| 159 | - }, | |
| 160 | - function(result) { | |
| 161 | - alert("出错啦!"); | |
| 162 | - } | |
| 163 | - ); | |
| 164 | - | |
| 165 | - //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 166 | - // alert("dfdfdf"); | |
| 167 | - //}); | |
| 168 | - | |
| 169 | - // 翻页的时候调用 | |
| 170 | - self.pageChanaged = function() { | |
| 171 | - busConfigService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 172 | - busConfigService.getPage().then( | |
| 173 | - function(result) { | |
| 174 | - self.pageInfo.totalItems = result.totalElements; | |
| 175 | - self.pageInfo.currentPage = result.number + 1; | |
| 176 | - self.pageInfo.infos = result.content; | |
| 177 | - busConfigService.setCurrentPageNo(result.number + 1); | |
| 178 | - }, | |
| 179 | - function(result) { | |
| 180 | - alert("出错啦!"); | |
| 181 | - } | |
| 182 | - ); | |
| 183 | - }; | |
| 184 | - // 获取查询条件数据 | |
| 185 | - self.searchCondition = function() { | |
| 186 | - return busConfigService.getSearchCondition(); | |
| 187 | - }; | |
| 188 | - // 重置查询条件 | |
| 189 | - self.resetSearchCondition = function() { | |
| 190 | - busConfigService.resetSearchCondition(); | |
| 191 | - self.pageInfo.currentPage = 1; | |
| 192 | - self.pageChanaged(); | |
| 193 | - }; | |
| 194 | - | |
| 195 | - // 删除时刻表 | |
| 196 | - self.deleteEci = function(id) { | |
| 197 | - // TODO: | |
| 198 | - busConfigService.deleteDetail(id).then( | |
| 199 | - function(result) { | |
| 200 | - if (result.message) { // 暂时这样做,之后全局拦截 | |
| 201 | - alert("失败:" + result.message); | |
| 202 | - } else { | |
| 203 | - alert("作废成功!"); | |
| 204 | - | |
| 205 | - busConfigService.getPage().then( | |
| 206 | - function(result) { | |
| 207 | - self.pageInfo.totalItems = result.totalElements; | |
| 208 | - self.pageInfo.currentPage = result.number + 1; | |
| 209 | - self.pageInfo.infos = result.content; | |
| 210 | - busConfigService.setCurrentPageNo(result.number + 1); | |
| 211 | - }, | |
| 212 | - function(result) { | |
| 213 | - alert("出错啦!"); | |
| 214 | - } | |
| 215 | - ); | |
| 216 | - } | |
| 217 | - | |
| 218 | - }, | |
| 219 | - function(result) { | |
| 220 | - alert("出错啦!" + result); | |
| 221 | - } | |
| 222 | - ); | |
| 223 | - }; | |
| 224 | - | |
| 225 | - // 撤销修改 | |
| 226 | - self.redoDeleteEci = function(id) { | |
| 227 | - busConfigService.getDetail(id).then( | |
| 228 | - function(result) { | |
| 229 | - result.isCancel = 'false'; | |
| 230 | - busConfigService.saveDetail(result).then( | |
| 231 | - function(result) { | |
| 232 | - if (result.message) { // 暂时这样做,之后全局拦截 | |
| 233 | - alert("失败:" + result.message); | |
| 234 | - } else { | |
| 235 | - alert("撤销成功!"); | |
| 236 | - | |
| 237 | - busConfigService.getPage().then( | |
| 238 | - function(result) { | |
| 239 | - self.pageInfo.totalItems = result.totalElements; | |
| 240 | - self.pageInfo.currentPage = result.number + 1; | |
| 241 | - self.pageInfo.infos = result.content; | |
| 242 | - busConfigService.setCurrentPageNo(result.number + 1); | |
| 243 | - }, | |
| 244 | - function(result) { | |
| 245 | - alert("出错啦!"); | |
| 246 | - } | |
| 247 | - ); | |
| 248 | - } | |
| 249 | - }, | |
| 250 | - function(result) { | |
| 251 | - // TODO:弹出框方式以后改 | |
| 252 | - alert("出错啦!"); | |
| 253 | - } | |
| 254 | - ); | |
| 255 | - }, | |
| 256 | - function(result) { | |
| 257 | - // TODO:弹出框方式以后改 | |
| 258 | - alert("出错啦!"); | |
| 259 | - } | |
| 260 | - ); | |
| 261 | - }; | |
| 262 | - | |
| 263 | -}]); | |
| 264 | - | |
| 265 | -angular.module('ScheduleApp').controller('BusConfigFormCtrl', ['BusConfigService', '$stateParams', '$state', '$scope', function(busConfigService, $stateParams, $state, $scope) { | |
| 266 | - var self = this; | |
| 267 | - | |
| 268 | - // 启用日期 日期控件开关 | |
| 269 | - self.qyrqOpen = false; | |
| 270 | - self.qyrq_open = function() { | |
| 271 | - self.qyrqOpen = true; | |
| 272 | - }; | |
| 273 | - | |
| 274 | - // 终止日期 日期控件开关 | |
| 275 | - self.zzrqOpen = false; | |
| 276 | - self.zzrq_open = function() { | |
| 277 | - self.zzrqOpen = true; | |
| 278 | - }; | |
| 279 | - | |
| 280 | - // 欲保存的busInfo信息,绑定 | |
| 281 | - self.busConfigForSave = {xl:{}, cl:{}}; | |
| 282 | - | |
| 283 | - // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 284 | - var id = $stateParams.id; | |
| 285 | - if (id) { | |
| 286 | - self.busConfigForSave.id = id; | |
| 287 | - busConfigService.getDetail(id).then( | |
| 288 | - function(result) { | |
| 289 | - var key; | |
| 290 | - for (key in result) { | |
| 291 | - self.busConfigForSave[key] = result[key]; | |
| 292 | - } | |
| 293 | - }, | |
| 294 | - function(result) { | |
| 295 | - alert("出错啦!"); | |
| 296 | - } | |
| 297 | - ); | |
| 298 | - } | |
| 299 | - | |
| 300 | - // 提交方法 | |
| 301 | - self.submit = function() { | |
| 302 | - console.log(self.busConfigForSave); | |
| 303 | - busConfigService.saveDetail(self.busConfigForSave).then( | |
| 304 | - function(result) { | |
| 305 | - // TODO:弹出框方式以后改 | |
| 306 | - if (result.status == 'SUCCESS') { | |
| 307 | - alert("保存成功!"); | |
| 308 | - $state.go("busConfig"); | |
| 309 | - } else { | |
| 310 | - alert("保存异常!"); | |
| 311 | - } | |
| 312 | - }, | |
| 313 | - function(result) { | |
| 314 | - // TODO:弹出框方式以后改 | |
| 315 | - alert("出错啦!"); | |
| 316 | - } | |
| 317 | - ); | |
| 318 | - }; | |
| 319 | -}]); | |
| 320 | - | |
| 321 | -angular.module('ScheduleApp').controller('BusConfigDetailCtrl', ['BusConfigService', '$stateParams', function(busConfigService, $stateParams) { | |
| 322 | - var self = this; | |
| 323 | - self.title = ""; | |
| 324 | - self.busConfigForDetail = {}; | |
| 325 | - self.busConfigForDetail.id = $stateParams.id; | |
| 326 | - | |
| 327 | - // 当转向到此页面时,就获取明细信息并绑定 | |
| 328 | - busConfigService.getDetail($stateParams.id).then( | |
| 329 | - function(result) { | |
| 330 | - var key; | |
| 331 | - for (key in result) { | |
| 332 | - self.busConfigForDetail[key] = result[key]; | |
| 333 | - } | |
| 334 | - | |
| 335 | - self.title = "车辆 " + self.busConfigForDetail.cl.insideCode + " 配置详细信息"; | |
| 336 | - }, | |
| 337 | - function(result) { | |
| 338 | - // TODO:弹出框方式以后改 | |
| 339 | - alert("出错啦!"); | |
| 340 | - } | |
| 341 | - ); | |
| 342 | -}]); | |
| 343 | - | |
| 344 | - | |
| 345 | - | |
| 1 | +// 车辆配置管理 service controller 等写在一起 | |
| 2 | +angular.module('ScheduleApp').factory('BusConfigService', ['BusConfigService_g', function(service) { | |
| 3 | + /** 当前的查询条件信息 */ | |
| 4 | + var currentSearchCondition = {'isCancel_eq': false}; | |
| 5 | + | |
| 6 | + /** 当前第几页 */ | |
| 7 | + var currentPageNo = 1; | |
| 8 | + | |
| 9 | + return { | |
| 10 | + /** | |
| 11 | + * 获取查询条件信息, | |
| 12 | + * 用于给controller用来和页面数据绑定。 | |
| 13 | + */ | |
| 14 | + getSearchCondition: function() { | |
| 15 | + return currentSearchCondition; | |
| 16 | + }, | |
| 17 | + /** | |
| 18 | + * 重置查询条件信息。 | |
| 19 | + */ | |
| 20 | + resetSearchCondition: function() { | |
| 21 | + var key; | |
| 22 | + for (key in currentSearchCondition) { | |
| 23 | + currentSearchCondition[key] = undefined; | |
| 24 | + } | |
| 25 | + currentSearchCondition['isCancel_eq'] = false; | |
| 26 | + }, | |
| 27 | + /** | |
| 28 | + * 设置当前页码。 | |
| 29 | + * @param cpn 从1开始,后台是从0开始的 | |
| 30 | + */ | |
| 31 | + setCurrentPageNo: function(cpn) { | |
| 32 | + currentPageNo = cpn; | |
| 33 | + }, | |
| 34 | + /** | |
| 35 | + * 组装查询参数,返回一个promise查询结果。 | |
| 36 | + * @param params 查询参数 | |
| 37 | + * @return 返回一个 promise | |
| 38 | + */ | |
| 39 | + getPage: function() { | |
| 40 | + var params = currentSearchCondition; // 查询条件 | |
| 41 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 42 | + return service.rest.list(params).$promise; | |
| 43 | + }, | |
| 44 | + /** | |
| 45 | + * 获取明细信息。 | |
| 46 | + * @param id 车辆id | |
| 47 | + * @return 返回一个 promise | |
| 48 | + */ | |
| 49 | + getDetail: function(id) { | |
| 50 | + var params = {id: id}; | |
| 51 | + return service.rest.get(params).$promise; | |
| 52 | + }, | |
| 53 | + /** | |
| 54 | + * 保存信息。 | |
| 55 | + * @param obj 车辆详细信息 | |
| 56 | + * @return 返回一个 promise | |
| 57 | + */ | |
| 58 | + saveDetail: function(obj) { | |
| 59 | + return service.rest.save(obj).$promise; | |
| 60 | + }, | |
| 61 | + /** | |
| 62 | + * 删除信息。 | |
| 63 | + * @param id 主键id | |
| 64 | + * @returns {*|Function|promise|n} | |
| 65 | + */ | |
| 66 | + deleteDetail: function(id) { | |
| 67 | + return service.rest.delete({id: id}).$promise; | |
| 68 | + } | |
| 69 | + }; | |
| 70 | + | |
| 71 | +}]); | |
| 72 | + | |
| 73 | +angular.module('ScheduleApp').controller('BusConfigCtrl', ['BusConfigService', '$state', '$uibModal', function(busConfigService, $state, $uibModal) { | |
| 74 | + var self = this; | |
| 75 | + | |
| 76 | + // 切换到form状态 | |
| 77 | + self.goForm = function() { | |
| 78 | + //alert("切换"); | |
| 79 | + $state.go("busConfig_form"); | |
| 80 | + }; | |
| 81 | + | |
| 82 | + // 导入excel | |
| 83 | + self.importData = function() { | |
| 84 | + // large方式弹出模态对话框 | |
| 85 | + var modalInstance = $uibModal.open({ | |
| 86 | + templateUrl: '/pages/scheduleApp/module/core/busConfig/dataImport.html', | |
| 87 | + size: "lg", | |
| 88 | + animation: true, | |
| 89 | + backdrop: 'static', | |
| 90 | + resolve: { | |
| 91 | + // 可以传值给controller | |
| 92 | + }, | |
| 93 | + windowClass: 'center-modal', | |
| 94 | + controller: "BusConfigToolsCtrl", | |
| 95 | + controllerAs: "ctrl", | |
| 96 | + bindToController: true | |
| 97 | + }); | |
| 98 | + modalInstance.result.then( | |
| 99 | + function() { | |
| 100 | + console.log("dataImport.html打开"); | |
| 101 | + }, | |
| 102 | + function() { | |
| 103 | + console.log("dataImport.html消失"); | |
| 104 | + } | |
| 105 | + ); | |
| 106 | + }; | |
| 107 | +}]); | |
| 108 | + | |
| 109 | +angular.module('ScheduleApp').controller('BusConfigToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | |
| 110 | + var self = this; | |
| 111 | + self.data = "TODO"; | |
| 112 | + | |
| 113 | + // 关闭窗口 | |
| 114 | + self.close = function() { | |
| 115 | + $modalInstance.dismiss("cancel"); | |
| 116 | + }; | |
| 117 | + | |
| 118 | + self.clearInputFile = function() { | |
| 119 | + angular.element("input[type='file']").val(null); | |
| 120 | + }; | |
| 121 | + | |
| 122 | + // 上传文件组件 | |
| 123 | + self.uploader = new FileUploader({ | |
| 124 | + url: "/cci/dataImport", | |
| 125 | + filters: [] // 用于过滤文件,比如只允许导入excel | |
| 126 | + }); | |
| 127 | + self.uploader.onAfterAddingFile = function(fileItem) | |
| 128 | + { | |
| 129 | + console.info('onAfterAddingFile', fileItem); | |
| 130 | + console.log(self.uploader.queue.length); | |
| 131 | + if (self.uploader.queue.length > 1) | |
| 132 | + self.uploader.removeFromQueue(0); | |
| 133 | + }; | |
| 134 | + self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 135 | + { | |
| 136 | + console.info('onSuccessItem', fileItem, response, status, headers); | |
| 137 | + }; | |
| 138 | + self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 139 | + { | |
| 140 | + console.info('onErrorItem', fileItem, response, status, headers); | |
| 141 | + }; | |
| 142 | + | |
| 143 | +}]); | |
| 144 | + | |
| 145 | +angular.module('ScheduleApp').controller('BusConfigListCtrl', ['BusConfigService', function(busConfigService) { | |
| 146 | + var self = this; | |
| 147 | + self.pageInfo = { | |
| 148 | + totalItems : 0, | |
| 149 | + currentPage : 1, | |
| 150 | + infos: [] | |
| 151 | + }; | |
| 152 | + | |
| 153 | + // 初始创建的时候,获取一次列表数据 | |
| 154 | + busConfigService.getPage().then( | |
| 155 | + function(result) { | |
| 156 | + self.pageInfo.totalItems = result.totalElements; | |
| 157 | + self.pageInfo.currentPage = result.number + 1; | |
| 158 | + self.pageInfo.infos = result.content; | |
| 159 | + busConfigService.setCurrentPageNo(result.number + 1); | |
| 160 | + }, | |
| 161 | + function(result) { | |
| 162 | + alert("出错啦!"); | |
| 163 | + } | |
| 164 | + ); | |
| 165 | + | |
| 166 | + //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 167 | + // alert("dfdfdf"); | |
| 168 | + //}); | |
| 169 | + | |
| 170 | + // 翻页的时候调用 | |
| 171 | + self.pageChanaged = function() { | |
| 172 | + busConfigService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 173 | + busConfigService.getPage().then( | |
| 174 | + function(result) { | |
| 175 | + self.pageInfo.totalItems = result.totalElements; | |
| 176 | + self.pageInfo.currentPage = result.number + 1; | |
| 177 | + self.pageInfo.infos = result.content; | |
| 178 | + busConfigService.setCurrentPageNo(result.number + 1); | |
| 179 | + }, | |
| 180 | + function(result) { | |
| 181 | + alert("出错啦!"); | |
| 182 | + } | |
| 183 | + ); | |
| 184 | + }; | |
| 185 | + // 获取查询条件数据 | |
| 186 | + self.searchCondition = function() { | |
| 187 | + return busConfigService.getSearchCondition(); | |
| 188 | + }; | |
| 189 | + // 重置查询条件 | |
| 190 | + self.resetSearchCondition = function() { | |
| 191 | + busConfigService.resetSearchCondition(); | |
| 192 | + self.pageInfo.currentPage = 1; | |
| 193 | + self.pageChanaged(); | |
| 194 | + }; | |
| 195 | + | |
| 196 | + // 删除时刻表 | |
| 197 | + self.deleteEci = function(id) { | |
| 198 | + // TODO: | |
| 199 | + busConfigService.deleteDetail(id).then( | |
| 200 | + function(result) { | |
| 201 | + if (result.message) { // 暂时这样做,之后全局拦截 | |
| 202 | + alert("失败:" + result.message); | |
| 203 | + } else { | |
| 204 | + alert("作废成功!"); | |
| 205 | + | |
| 206 | + busConfigService.getPage().then( | |
| 207 | + function(result) { | |
| 208 | + self.pageInfo.totalItems = result.totalElements; | |
| 209 | + self.pageInfo.currentPage = result.number + 1; | |
| 210 | + self.pageInfo.infos = result.content; | |
| 211 | + busConfigService.setCurrentPageNo(result.number + 1); | |
| 212 | + }, | |
| 213 | + function(result) { | |
| 214 | + alert("出错啦!"); | |
| 215 | + } | |
| 216 | + ); | |
| 217 | + } | |
| 218 | + | |
| 219 | + }, | |
| 220 | + function(result) { | |
| 221 | + alert("出错啦!" + result); | |
| 222 | + } | |
| 223 | + ); | |
| 224 | + }; | |
| 225 | + | |
| 226 | + // 撤销修改 | |
| 227 | + self.redoDeleteEci = function(id) { | |
| 228 | + busConfigService.getDetail(id).then( | |
| 229 | + function(result) { | |
| 230 | + result.isCancel = 'false'; | |
| 231 | + busConfigService.saveDetail(result).then( | |
| 232 | + function(result) { | |
| 233 | + if (result.message) { // 暂时这样做,之后全局拦截 | |
| 234 | + alert("失败:" + result.message); | |
| 235 | + } else { | |
| 236 | + alert("撤销成功!"); | |
| 237 | + | |
| 238 | + busConfigService.getPage().then( | |
| 239 | + function(result) { | |
| 240 | + self.pageInfo.totalItems = result.totalElements; | |
| 241 | + self.pageInfo.currentPage = result.number + 1; | |
| 242 | + self.pageInfo.infos = result.content; | |
| 243 | + busConfigService.setCurrentPageNo(result.number + 1); | |
| 244 | + }, | |
| 245 | + function(result) { | |
| 246 | + alert("出错啦!"); | |
| 247 | + } | |
| 248 | + ); | |
| 249 | + } | |
| 250 | + }, | |
| 251 | + function(result) { | |
| 252 | + // TODO:弹出框方式以后改 | |
| 253 | + alert("出错啦!"); | |
| 254 | + } | |
| 255 | + ); | |
| 256 | + }, | |
| 257 | + function(result) { | |
| 258 | + // TODO:弹出框方式以后改 | |
| 259 | + alert("出错啦!"); | |
| 260 | + } | |
| 261 | + ); | |
| 262 | + }; | |
| 263 | + | |
| 264 | +}]); | |
| 265 | + | |
| 266 | +angular.module('ScheduleApp').controller('BusConfigFormCtrl', ['BusConfigService', '$stateParams', '$state', '$scope', function(busConfigService, $stateParams, $state, $scope) { | |
| 267 | + var self = this; | |
| 268 | + | |
| 269 | + // 启用日期 日期控件开关 | |
| 270 | + self.qyrqOpen = false; | |
| 271 | + self.qyrq_open = function() { | |
| 272 | + self.qyrqOpen = true; | |
| 273 | + }; | |
| 274 | + | |
| 275 | + // 终止日期 日期控件开关 | |
| 276 | + self.zzrqOpen = false; | |
| 277 | + self.zzrq_open = function() { | |
| 278 | + self.zzrqOpen = true; | |
| 279 | + }; | |
| 280 | + | |
| 281 | + // 欲保存的busInfo信息,绑定 | |
| 282 | + self.busConfigForSave = {xl:{}, cl:{}}; | |
| 283 | + | |
| 284 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 285 | + var id = $stateParams.id; | |
| 286 | + if (id) { | |
| 287 | + self.busConfigForSave.id = id; | |
| 288 | + busConfigService.getDetail(id).then( | |
| 289 | + function(result) { | |
| 290 | + var key; | |
| 291 | + for (key in result) { | |
| 292 | + self.busConfigForSave[key] = result[key]; | |
| 293 | + } | |
| 294 | + }, | |
| 295 | + function(result) { | |
| 296 | + alert("出错啦!"); | |
| 297 | + } | |
| 298 | + ); | |
| 299 | + } | |
| 300 | + | |
| 301 | + // 提交方法 | |
| 302 | + self.submit = function() { | |
| 303 | + console.log(self.busConfigForSave); | |
| 304 | + busConfigService.saveDetail(self.busConfigForSave).then( | |
| 305 | + function(result) { | |
| 306 | + // TODO:弹出框方式以后改 | |
| 307 | + if (result.status == 'SUCCESS') { | |
| 308 | + alert("保存成功!"); | |
| 309 | + $state.go("busConfig"); | |
| 310 | + } else { | |
| 311 | + alert("保存异常!"); | |
| 312 | + } | |
| 313 | + }, | |
| 314 | + function(result) { | |
| 315 | + // TODO:弹出框方式以后改 | |
| 316 | + alert("出错啦!"); | |
| 317 | + } | |
| 318 | + ); | |
| 319 | + }; | |
| 320 | +}]); | |
| 321 | + | |
| 322 | +angular.module('ScheduleApp').controller('BusConfigDetailCtrl', ['BusConfigService', '$stateParams', function(busConfigService, $stateParams) { | |
| 323 | + var self = this; | |
| 324 | + self.title = ""; | |
| 325 | + self.busConfigForDetail = {}; | |
| 326 | + self.busConfigForDetail.id = $stateParams.id; | |
| 327 | + | |
| 328 | + // 当转向到此页面时,就获取明细信息并绑定 | |
| 329 | + busConfigService.getDetail($stateParams.id).then( | |
| 330 | + function(result) { | |
| 331 | + var key; | |
| 332 | + for (key in result) { | |
| 333 | + self.busConfigForDetail[key] = result[key]; | |
| 334 | + } | |
| 335 | + | |
| 336 | + self.title = "车辆 " + self.busConfigForDetail.cl.insideCode + " 配置详细信息"; | |
| 337 | + }, | |
| 338 | + function(result) { | |
| 339 | + // TODO:弹出框方式以后改 | |
| 340 | + alert("出错啦!"); | |
| 341 | + } | |
| 342 | + ); | |
| 343 | +}]); | |
| 344 | + | |
| 345 | + | |
| 346 | + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 车辆配置模块页面route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + .state("busConfig", { // index主页面 | |
| 13 | + url: '/busConfig', | |
| 14 | + views: { | |
| 15 | + "": { | |
| 16 | + templateUrl: 'pages/scheduleApp/module/core/busConfig/index.html' | |
| 17 | + }, | |
| 18 | + "busConfig_list@busConfig": { | |
| 19 | + templateUrl: 'pages/scheduleApp/module/core/busConfig/list.html' | |
| 20 | + } | |
| 21 | + }, | |
| 22 | + | |
| 23 | + resolve: { | |
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 25 | + return $ocLazyLoad.load({ | |
| 26 | + name: 'busConfig_module', | |
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 28 | + files: [ | |
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 31 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 32 | + "pages/scheduleApp/module/core/busConfig/module.js" | |
| 33 | + ] | |
| 34 | + }); | |
| 35 | + }] | |
| 36 | + } | |
| 37 | + }) | |
| 38 | + .state("busConfig_form", { // 添加页面 | |
| 39 | + url: '/busConfig_form', | |
| 40 | + views: { | |
| 41 | + "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/form.html'} | |
| 42 | + }, | |
| 43 | + resolve: { | |
| 44 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 45 | + return $ocLazyLoad.load({ | |
| 46 | + name: 'busConfig_form_module', | |
| 47 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 48 | + files: [ | |
| 49 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 50 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 51 | + "pages/scheduleApp/module/core/busConfig/module.js" | |
| 52 | + ] | |
| 53 | + }); | |
| 54 | + }] | |
| 55 | + } | |
| 56 | + }) | |
| 57 | + .state("busConfig_edit", { // 修改页面 | |
| 58 | + url: '/busConfig_edit/:id', | |
| 59 | + views: { | |
| 60 | + "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/edit.html'} | |
| 61 | + }, | |
| 62 | + resolve: { | |
| 63 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 64 | + return $ocLazyLoad.load({ | |
| 65 | + name: 'busConfig_edit_module', | |
| 66 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 67 | + files: [ | |
| 68 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 69 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 70 | + "pages/scheduleApp/module/core/busConfig/module.js" | |
| 71 | + ] | |
| 72 | + }); | |
| 73 | + }] | |
| 74 | + } | |
| 75 | + }) | |
| 76 | + .state("busConfig_detail", { // 详细信息页面 | |
| 77 | + url: '/busConfig_detail/:id', | |
| 78 | + views: { | |
| 79 | + "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/detail.html'} | |
| 80 | + }, | |
| 81 | + resolve: { | |
| 82 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 83 | + return $ocLazyLoad.load({ | |
| 84 | + name: 'busConfig_detail_module', | |
| 85 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 86 | + files: [ | |
| 87 | + "pages/scheduleApp/module/core/busConfig/module.js" | |
| 88 | + ] | |
| 89 | + }); | |
| 90 | + }] | |
| 91 | + } | |
| 92 | + }); | |
| 93 | + } | |
| 94 | +]); | |
| 95 | + | |
| 96 | + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busLineInfoStat/dist/busLineInfoOverview.dist.html deleted
100644 → 0
| 1 | -<div class="page-head"> | |
| 2 | - <div class="page-title"> | |
| 3 | - <h1>线路运营概览</h1> | |
| 4 | - </div> | |
| 5 | -</div> | |
| 6 | - | |
| 7 | -<ul class="page-breadcrumb breadcrumb"> | |
| 8 | - <li> | |
| 9 | - <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | - <i class="fa fa-circle"></i> | |
| 11 | - </li> | |
| 12 | - <li> | |
| 13 | - <span class="active">线路运营概览</span> | |
| 14 | - <i class="fa fa-circle"></i> | |
| 15 | - </li> | |
| 16 | - <li> | |
| 17 | - <span class="active">路牌管理</span> | |
| 18 | - </li> | |
| 19 | -</ul> | |
| 20 | - | |
| 21 | -<div class="row" id="busLineInfoOverview" ng-app="busLineInfoOverviewApp"> | |
| 22 | - <div class="col-md-12" ng-controller="busLineInfoOverviewCtrl as gmc"> | |
| 23 | - <div class="portlet light bordered"> | |
| 24 | - <div class="portlet-title"> | |
| 25 | - <div class="caption font-dark"> | |
| 26 | - <i class="fa fa-database font-dark"></i> | |
| 27 | - <span class="caption-subject bold uppercase">概览</span> | |
| 28 | - </div> | |
| 29 | - <div class="actions"> | |
| 30 | - <div class="btn-group"> | |
| 31 | - <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 32 | - <i class="fa fa-share"></i> | |
| 33 | - <span>系统工具</span> | |
| 34 | - <i class="fa fa-angle-down"></i> | |
| 35 | - </a> | |
| 36 | - <ul class="dropdown-menu pull-right"> | |
| 37 | - <li> | |
| 38 | - <a href="javascript:" class="tool-action"> | |
| 39 | - <i class="fa fa-file-excel-o"></i> | |
| 40 | - 导出excel | |
| 41 | - </a> | |
| 42 | - </li> | |
| 43 | - <li class="divider"></li> | |
| 44 | - <li> | |
| 45 | - <a href="javascript:" class="tool-action"> | |
| 46 | - <i class="fa fa-refresh"></i> | |
| 47 | - 刷行数据 | |
| 48 | - </a> | |
| 49 | - </li> | |
| 50 | - </ul> | |
| 51 | - </div> | |
| 52 | - </div> | |
| 53 | - </div> | |
| 54 | - | |
| 55 | - <div class="portlet-body"> | |
| 56 | - <table class="table table-striped table-bordered table-hover table-checkable order-column" id="busConfigInfoTable"> | |
| 57 | - <thead> | |
| 58 | - <tr> | |
| 59 | - <th> | |
| 60 | - <input type="checkbox" class="group-checkable" data-set="#busConfigInfoTable.checkboxes"/> | |
| 61 | - </th> | |
| 62 | - <th>线路名称</th> | |
| 63 | - <th>线路编号</th> | |
| 64 | - <th>公司</th> | |
| 65 | - <th>分公司</th> | |
| 66 | - | |
| 67 | - <th>配车数</th> | |
| 68 | - <th>人员数</th> | |
| 69 | - <th>路牌数</th> | |
| 70 | - <th>套跑数</th> | |
| 71 | - <th>时刻表数</th> | |
| 72 | - <th>排班规则数</th> | |
| 73 | - <th>排班计划数</th> | |
| 74 | - </tr> | |
| 75 | - </thead> | |
| 76 | - <tbody> | |
| 77 | - <tr ng-repeat="info in gmc.infos" class="odd gradeX"> | |
| 78 | - <td> | |
| 79 | - <input type="checkbox" class="checkboxes"/> | |
| 80 | - </td> | |
| 81 | - <td> | |
| 82 | - <span ng-bind="info.xlName"></span> | |
| 83 | - </td> | |
| 84 | - <td> | |
| 85 | - <span ng-bind="info.xlBm"></span> | |
| 86 | - </td> | |
| 87 | - <td> | |
| 88 | - <span ng-bind="info.gsName"></span> | |
| 89 | - </td> | |
| 90 | - <td> | |
| 91 | - <span ng-bind="info.fgsName"></span> | |
| 92 | - </td> | |
| 93 | - | |
| 94 | - <td> | |
| 95 | - <span ng-bind="info.pcCount"></span> | |
| 96 | - </td> | |
| 97 | - <td> | |
| 98 | - <span ng-bind="info.ryCount"></span> | |
| 99 | - </td> | |
| 100 | - <td> | |
| 101 | - <span ng-bind="info.lpCount"></span> | |
| 102 | - </td> | |
| 103 | - <td> | |
| 104 | - <span ng-bind="info.tpCount"></span> | |
| 105 | - </td> | |
| 106 | - <td> | |
| 107 | - <span ng-bind="info.ttCount"></span> | |
| 108 | - </td> | |
| 109 | - <td> | |
| 110 | - <span ng-bind="info.srCount"></span> | |
| 111 | - </td> | |
| 112 | - <td> | |
| 113 | - <span ng-bind="info.spCount"></span> | |
| 114 | - </td> | |
| 115 | - </tr> | |
| 116 | - </tbody> | |
| 117 | - </table> | |
| 118 | - | |
| 119 | - <div style="text-align: right;"> | |
| 120 | - <uib-pagination total-items="gmc.totalItems" | |
| 121 | - ng-model="gmc.currentPage" | |
| 122 | - ng-change="gmc.pageChanged()" | |
| 123 | - previous-text="上一页" | |
| 124 | - next-text="下一页"> | |
| 125 | - </uib-pagination> | |
| 126 | - </div> | |
| 127 | - | |
| 128 | - </div> | |
| 129 | - </div> | |
| 130 | - </div> | |
| 131 | -</div> | |
| 132 | - | |
| 133 | -<script>angular.module("busLineInfoOverviewApp",["ngResource","ui.bootstrap"]).factory("BusinessInfo",["$resource",function(a){return a("/bic",{order:"id",direction:"ASC"},{list:{method:"GET",params:{page:0}}})}]);</script> | |
| 134 | -<script>angular.module("busLineInfoOverviewApp").controller("busLineInfoOverviewCtrl",["BusinessInfo",function(a){var b=this;b.totalItems=0,b.currentPage=1,b.infos=[],b.pageChanged=function(){console.log("页面跳转到:"+b.currentPage),a.list({page:b.currentPage-1},function(a){console.log("后台返回记录数:"+a.content.length),b.totalItems=a.totalElements,b.currentPage=a.number+1,b.infos=a.content})},a.list(function(a){console.log("后台返回记录数:"+a.content.length),b.totalItems=a.totalElements,b.currentPage=a.number+1,b.infos=a.content})}]);</script> | |
| 135 | - | |
| 136 | -<script type="text/javascript"> | |
| 137 | - angular.bootstrap(document.getElementById("busLineInfoOverview"), ["busLineInfoOverviewApp"]); | |
| 138 | -</script> | |
| 139 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/busLineInfoStat/dist/controller.min.js deleted
100644 → 0
| 1 | -angular.module("busLineInfoOverviewApp").controller("busLineInfoOverviewCtrl",["BusinessInfo",function(a){var b=this;b.totalItems=0,b.currentPage=1,b.infos=[],b.pageChanged=function(){console.log("页面跳转到:"+b.currentPage),a.list({page:b.currentPage-1},function(a){console.log("后台返回记录数:"+a.content.length),b.totalItems=a.totalElements,b.currentPage=a.number+1,b.infos=a.content})},a.list(function(a){console.log("后台返回记录数:"+a.content.length),b.totalItems=a.totalElements,b.currentPage=a.number+1,b.infos=a.content})}]); | |
| 2 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/busLineInfoStat/dist/service.min.js deleted
100644 → 0
src/main/resources/static/pages/scheduleApp/module/core/busLineInfoStat/module.js
0 → 100644
| 1 | +// 车辆配置管理 service controller 等写在一起 | |
| 2 | +angular.module('ScheduleApp').factory('BusLineInfoStatService', ['BusLineInfoStatService_g', function(service) { | |
| 3 | + /** 当前的查询条件信息 */ | |
| 4 | + var currentSearchCondition = {}; | |
| 5 | + | |
| 6 | + /** 当前第几页 */ | |
| 7 | + var currentPageNo = 1; | |
| 8 | + | |
| 9 | + return { | |
| 10 | + /** | |
| 11 | + * 获取查询条件信息, | |
| 12 | + * 用于给controller用来和页面数据绑定。 | |
| 13 | + */ | |
| 14 | + getSearchCondition: function() { | |
| 15 | + return currentSearchCondition; | |
| 16 | + }, | |
| 17 | + /** | |
| 18 | + * 重置查询条件信息。 | |
| 19 | + */ | |
| 20 | + resetSearchCondition: function() { | |
| 21 | + var key; | |
| 22 | + for (key in currentSearchCondition) { | |
| 23 | + currentSearchCondition[key] = ""; | |
| 24 | + } | |
| 25 | + }, | |
| 26 | + /** | |
| 27 | + * 设置当前页码。 | |
| 28 | + * @param cpn 从1开始,后台是从0开始的 | |
| 29 | + */ | |
| 30 | + setCurrentPageNo: function(cpn) { | |
| 31 | + currentPageNo = cpn; | |
| 32 | + }, | |
| 33 | + /** | |
| 34 | + * 组装查询参数,返回一个promise查询结果。 | |
| 35 | + * @param params 查询参数 | |
| 36 | + * @return 返回一个 promise | |
| 37 | + */ | |
| 38 | + getPage: function() { | |
| 39 | + var params = currentSearchCondition; // 查询条件 | |
| 40 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 41 | + return service.list(params).$promise; | |
| 42 | + }, | |
| 43 | + /** | |
| 44 | + * 获取明细信息。 | |
| 45 | + * @param id 车辆id | |
| 46 | + * @return 返回一个 promise | |
| 47 | + */ | |
| 48 | + getDetail: function(id) { | |
| 49 | + var params = {id: id}; | |
| 50 | + return service.get(params).$promise; | |
| 51 | + }, | |
| 52 | + /** | |
| 53 | + * 保存信息。 | |
| 54 | + * @param obj 车辆详细信息 | |
| 55 | + * @return 返回一个 promise | |
| 56 | + */ | |
| 57 | + saveDetail: function(obj) { | |
| 58 | + return service.save(obj).$promise; | |
| 59 | + } | |
| 60 | + }; | |
| 61 | + | |
| 62 | +}]); | |
| 63 | + | |
| 64 | +angular.module('ScheduleApp').controller('BusLineInfoStatCtrl', ['BusLineInfoStatService', '$state', function(busLineInfoStatService, $state) { | |
| 65 | + var self = this; | |
| 66 | + | |
| 67 | + // 切换到form状态 | |
| 68 | + self.goForm = function() { | |
| 69 | + alert("切换"); | |
| 70 | + } | |
| 71 | +}]); | |
| 72 | + | |
| 73 | +angular.module('ScheduleApp').controller('BusLineInfoStatListCtrl', ['BusLineInfoStatService', function(busLineInfoStatService) { | |
| 74 | + var self = this; | |
| 75 | + self.pageInfo = { | |
| 76 | + totalItems : 0, | |
| 77 | + currentPage : 1, | |
| 78 | + infos: [] | |
| 79 | + }; | |
| 80 | + | |
| 81 | + // 初始创建的时候,获取一次列表数据 | |
| 82 | + busLineInfoStatService.getPage().then( | |
| 83 | + function(result) { | |
| 84 | + self.pageInfo.totalItems = result.totalElements; | |
| 85 | + self.pageInfo.currentPage = result.number + 1; | |
| 86 | + self.pageInfo.infos = result.content; | |
| 87 | + busLineInfoStatService.setCurrentPageNo(result.number + 1); | |
| 88 | + }, | |
| 89 | + function(result) { | |
| 90 | + alert("出错啦!"); | |
| 91 | + } | |
| 92 | + ); | |
| 93 | + | |
| 94 | + //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 95 | + // alert("dfdfdf"); | |
| 96 | + //}); | |
| 97 | + | |
| 98 | + // 翻页的时候调用 | |
| 99 | + self.pageChanaged = function() { | |
| 100 | + busLineInfoStatService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 101 | + busLineInfoStatService.getPage().then( | |
| 102 | + function(result) { | |
| 103 | + self.pageInfo.totalItems = result.totalElements; | |
| 104 | + self.pageInfo.currentPage = result.number + 1; | |
| 105 | + self.pageInfo.infos = result.content; | |
| 106 | + busLineInfoStatService.setCurrentPageNo(result.number + 1); | |
| 107 | + }, | |
| 108 | + function(result) { | |
| 109 | + alert("出错啦!"); | |
| 110 | + } | |
| 111 | + ); | |
| 112 | + }; | |
| 113 | + // 获取查询条件数据 | |
| 114 | + self.searchCondition = function() { | |
| 115 | + return busLineInfoStatService.getSearchCondition(); | |
| 116 | + }; | |
| 117 | + // 重置查询条件 | |
| 118 | + self.resetSearchCondition = function() { | |
| 119 | + return busLineInfoStatService.resetSearchCondition(); | |
| 120 | + }; | |
| 121 | + | |
| 122 | +}]); | |
| 123 | + | |
| 124 | +angular.module('ScheduleApp').controller('BusLineInfoStatFormCtrl', ['BusLineInfoStatService', '$stateParams', '$state', function(busLineInfoStatService, $stateParams, $state) { | |
| 125 | + // TODO: | |
| 126 | +}]); | |
| 127 | + | |
| 128 | +angular.module('ScheduleApp').controller('BusLineInfoStatDetailCtrl', ['BusLineInfoStatService', '$stateParams', function(busLineInfoStatService, $stateParams) { | |
| 129 | + // TODO: | |
| 130 | +}]); | |
| 131 | + | |
| 132 | + | |
| 133 | + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/busLineInfoStat/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 线路运营概览配置route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + .state("busLineInfoStat", { // index页面 | |
| 13 | + url: '/busLineInfoStat', | |
| 14 | + views: { | |
| 15 | + "": { | |
| 16 | + templateUrl: 'pages/scheduleApp/module/core/busLineInfoStat/index.html' | |
| 17 | + }, | |
| 18 | + "busLineInfoStat_list@busLineInfoStat": { | |
| 19 | + templateUrl: 'pages/scheduleApp/module/core/busLineInfoStat/list.html' | |
| 20 | + } | |
| 21 | + }, | |
| 22 | + | |
| 23 | + resolve: { | |
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 25 | + return $ocLazyLoad.load({ | |
| 26 | + name: 'busLineInfoStat_module', | |
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 28 | + files: [ | |
| 29 | + "pages/scheduleApp/module/core/busLineInfoStat/module.js" | |
| 30 | + ] | |
| 31 | + }); | |
| 32 | + }] | |
| 33 | + } | |
| 34 | + }); | |
| 35 | + | |
| 36 | + } | |
| 37 | +]); | |
| 0 | 38 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/dispatchManage/dispatchManage.html deleted
100644 → 0
src/main/resources/static/pages/scheduleApp/module/core/dispatchManage/dist/dispatchManage.dist.html deleted
100644 → 0
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/dist/controller.min.js deleted
100644 → 0
| 1 | -angular.module("employeeConfigApp").controller("employeeConfigCtrl",["EmployeeConfigInfo",function(a){var b=this;b.totalItems=64,b.currentPage=4,b.infos=[],b.pageChanged=function(){console.log("页面跳转到:"+b.currentPage)},a.list(function(a){console.log("后台返回记录数:"+a.content.length),b.infos=a.content})}]); | |
| 2 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/dist/employeeConfig.dist.html deleted
100644 → 0
| 1 | -<div class="page-head"> | |
| 2 | - <div class="page-title"> | |
| 3 | - <h1>人员配置</h1> | |
| 4 | - </div> | |
| 5 | -</div> | |
| 6 | - | |
| 7 | -<ul class="page-breadcrumb breadcrumb"> | |
| 8 | - <li> | |
| 9 | - <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | - <i class="fa fa-circle"></i> | |
| 11 | - </li> | |
| 12 | - <li> | |
| 13 | - <span class="active">运营计划管理</span> | |
| 14 | - <i class="fa fa-circle"></i> | |
| 15 | - </li> | |
| 16 | - <li> | |
| 17 | - <span class="active">人员配置</span> | |
| 18 | - </li> | |
| 19 | -</ul> | |
| 20 | - | |
| 21 | -<div class="row" id="employeeConfig" ng-app="employeeConfigApp"> | |
| 22 | - <div class="col-md-12" ng-controller="employeeConfigCtrl as ecc"> | |
| 23 | - <div class="portlet light bordered"> | |
| 24 | - <div class="portlet-title"> | |
| 25 | - <div class="caption font-dark"> | |
| 26 | - <i class="fa fa-database font-dark"></i> | |
| 27 | - <span class="caption-subject bold uppercase">配置表</span> | |
| 28 | - </div> | |
| 29 | - <div class="actions"> | |
| 30 | - <a href="javascirpt:" class="btn btn-circle blue"> | |
| 31 | - <i class="fa fa-plus"></i> | |
| 32 | - 添加配置 | |
| 33 | - </a> | |
| 34 | - <div class="btn-group"> | |
| 35 | - <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 36 | - <i class="fa fa-share"></i> | |
| 37 | - <span>系统工具</span> | |
| 38 | - <i class="fa fa-angle-down"></i> | |
| 39 | - </a> | |
| 40 | - <ul class="dropdown-menu pull-right"> | |
| 41 | - <li> | |
| 42 | - <a href="javascript:" class="tool-action"> | |
| 43 | - <i class="fa fa-file-excel-o"></i> | |
| 44 | - 导出excel | |
| 45 | - </a> | |
| 46 | - </li> | |
| 47 | - <li class="divider"></li> | |
| 48 | - <li> | |
| 49 | - <a href="javascript:" class="tool-action"> | |
| 50 | - <i class="fa fa-refresh"></i> | |
| 51 | - 刷行数据 | |
| 52 | - </a> | |
| 53 | - </li> | |
| 54 | - </ul> | |
| 55 | - </div> | |
| 56 | - </div> | |
| 57 | - </div> | |
| 58 | - | |
| 59 | - <div class="portlet-body"> | |
| 60 | - <table class="table table-striped table-bordered table-hover table-checkable order-column" id="busConfigInfoTable"> | |
| 61 | - <thead> | |
| 62 | - <tr> | |
| 63 | - <th> | |
| 64 | - <input type="checkbox" class="group-checkable" data-set="#busConfigInfoTable.checkboxes"/> | |
| 65 | - </th> | |
| 66 | - <th>线路名称</th> | |
| 67 | - <th>搭班编码</th> | |
| 68 | - <th>驾驶员工号</th> | |
| 69 | - <th>驾驶员</th> | |
| 70 | - <th>售票员工号</th> | |
| 71 | - <th>售票员</th> | |
| 72 | - <th>车辆内部编码</th> | |
| 73 | - <th>操作</th> | |
| 74 | - </tr> | |
| 75 | - </thead> | |
| 76 | - <tbody> | |
| 77 | - <tr ng-repeat="info in ecc.infos" class="odd gradeX"> | |
| 78 | - <td> | |
| 79 | - <input type="checkbox" class="checkboxes"/> | |
| 80 | - </td> | |
| 81 | - <td> | |
| 82 | - <span ng-bind="info.xl"></span> | |
| 83 | - </td> | |
| 84 | - <td> | |
| 85 | - <span ng-bind="info.dbbm"></span> | |
| 86 | - </td> | |
| 87 | - <td> | |
| 88 | - <span ng-bind="info.jsygh"></span> | |
| 89 | - </td> | |
| 90 | - <td> | |
| 91 | - <span ng-bind="info.jsy"></span> | |
| 92 | - </td> | |
| 93 | - <td> | |
| 94 | - <span ng-bind="info.spygh"></span> | |
| 95 | - </td> | |
| 96 | - <td> | |
| 97 | - <span ng-bind="info.spy"></span> | |
| 98 | - </td> | |
| 99 | - <td> | |
| 100 | - <span ng-bind="info.clZbh"></span> | |
| 101 | - </td> | |
| 102 | - </tr> | |
| 103 | - </tbody> | |
| 104 | - </table> | |
| 105 | - | |
| 106 | - <div style="text-align: right;"> | |
| 107 | - <uib-pagination total-items="ecc.totalItems" | |
| 108 | - ng-model="ecc.currentPage" | |
| 109 | - ng-change="ecc.pageChanged()" | |
| 110 | - previous-text="上一页" | |
| 111 | - next-text="下一页"> | |
| 112 | - </uib-pagination> | |
| 113 | - </div> | |
| 114 | - | |
| 115 | - </div> | |
| 116 | - </div> | |
| 117 | - </div> | |
| 118 | -</div> | |
| 119 | - | |
| 120 | -<script>angular.module("employeeConfigApp",["ngResource","ui.bootstrap"]).factory("EmployeeConfigInfo",["$resource",function(a){return a("/eci",{},{list:{method:"GET"}})}]);</script> | |
| 121 | -<script>angular.module("employeeConfigApp").controller("employeeConfigCtrl",["EmployeeConfigInfo",function(a){var b=this;b.totalItems=64,b.currentPage=4,b.infos=[],b.pageChanged=function(){console.log("页面跳转到:"+b.currentPage)},a.list(function(a){console.log("后台返回记录数:"+a.content.length),b.infos=a.content})}]);</script> | |
| 122 | - | |
| 123 | -<script type="text/javascript"> | |
| 124 | - angular.bootstrap(document.getElementById("employeeConfig"), ["employeeConfigApp"]); | |
| 125 | -</script> | |
| 126 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/dist/service.min.js deleted
100644 → 0
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/list.html
| ... | ... | @@ -11,6 +11,7 @@ |
| 11 | 11 | <th style="width: 15%;">驾驶员</th> |
| 12 | 12 | <th >售票员工号</th> |
| 13 | 13 | <th >售票员</th> |
| 14 | + <th style="width: 80px;">状态</th> | |
| 14 | 15 | <th style="width: 21%">操作</th> |
| 15 | 16 | </tr> |
| 16 | 17 | <tr role="row" class="filter"> |
| ... | ... | @@ -44,6 +45,11 @@ |
| 44 | 45 | <input type="text" class="form-control form-filter input-sm" ng-model="ctrl.searchCondition()['spy.personnelName_like']" placeholder="输入姓名..."/> |
| 45 | 46 | </td> |
| 46 | 47 | <td> |
| 48 | + <label class="checkbox-inline"> | |
| 49 | + <input type="checkbox" ng-model="ctrl.searchCondition()['isCancel_eq']"/>作废 | |
| 50 | + </label> | |
| 51 | + </td> | |
| 52 | + <td> | |
| 47 | 53 | <button class="btn btn-sm green btn-outline filter-submit margin-bottom" |
| 48 | 54 | ng-click="ctrl.pageChanaged()"> |
| 49 | 55 | <i class="fa fa-search"></i> 搜索</button> |
| ... | ... | @@ -80,6 +86,10 @@ |
| 80 | 86 | <span ng-bind="info.spy.personnelName"></span> |
| 81 | 87 | </td> |
| 82 | 88 | <td> |
| 89 | + <span class="glyphicon glyphicon-ok" ng-if="info.isCancel == '0'"></span> | |
| 90 | + <span class="glyphicon glyphicon-remove" ng-if="info.isCancel == '1'"></span> | |
| 91 | + </td> | |
| 92 | + <td> | |
| 83 | 93 | <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> |
| 84 | 94 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> |
| 85 | 95 | <a ui-sref="employeeConfig_detail({id: info.id})" class="btn btn-info btn-sm"> 详细 </a> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/employeeConfig.js renamed to src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/module.js
| 1 | -// 人员配置管理 service controller 等写在一起 | |
| 2 | - | |
| 3 | -angular.module('ScheduleApp').factory('EmployeeConfigService', ['EmployeeConfigService_g', function(service) { | |
| 4 | - /** 当前的查询条件信息 */ | |
| 5 | - var currentSearchCondition = {}; | |
| 6 | - | |
| 7 | - /** 当前第几页 */ | |
| 8 | - var currentPageNo = 1; | |
| 9 | - | |
| 10 | - return { | |
| 11 | - /** | |
| 12 | - * 获取查询条件信息, | |
| 13 | - * 用于给controller用来和页面数据绑定。 | |
| 14 | - */ | |
| 15 | - getSearchCondition: function() { | |
| 16 | - return currentSearchCondition; | |
| 17 | - }, | |
| 18 | - /** | |
| 19 | - * 重置查询条件信息。 | |
| 20 | - */ | |
| 21 | - resetSearchCondition: function() { | |
| 22 | - var key; | |
| 23 | - for (key in currentSearchCondition) { | |
| 24 | - currentSearchCondition[key] = undefined; | |
| 25 | - } | |
| 26 | - }, | |
| 27 | - /** | |
| 28 | - * 设置当前页码。 | |
| 29 | - * @param cpn 从1开始,后台是从0开始的 | |
| 30 | - */ | |
| 31 | - setCurrentPageNo: function(cpn) { | |
| 32 | - currentPageNo = cpn; | |
| 33 | - }, | |
| 34 | - /** | |
| 35 | - * 组装查询参数,返回一个promise查询结果。 | |
| 36 | - * @param params 查询参数 | |
| 37 | - * @return 返回一个 promise | |
| 38 | - */ | |
| 39 | - getPage: function() { | |
| 40 | - var params = currentSearchCondition; // 查询条件 | |
| 41 | - params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 42 | - return service.rest.list(params).$promise; | |
| 43 | - }, | |
| 44 | - /** | |
| 45 | - * 获取明细信息。 | |
| 46 | - * @param id 车辆id | |
| 47 | - * @return 返回一个 promise | |
| 48 | - */ | |
| 49 | - getDetail: function(id) { | |
| 50 | - var params = {id: id}; | |
| 51 | - return service.rest.get(params).$promise; | |
| 52 | - }, | |
| 53 | - /** | |
| 54 | - * 保存信息。 | |
| 55 | - * @param obj 车辆详细信息 | |
| 56 | - * @return 返回一个 promise | |
| 57 | - */ | |
| 58 | - saveDetail: function(obj) { | |
| 59 | - return service.rest.save(obj).$promise; | |
| 60 | - }, | |
| 61 | - /** | |
| 62 | - * 删除信息。 | |
| 63 | - * @param id 主键id | |
| 64 | - * @returns {*|Function|promise|n} | |
| 65 | - */ | |
| 66 | - deleteDetail: function(id) { | |
| 67 | - return service.rest.delete({id: id}).$promise; | |
| 68 | - } | |
| 69 | - }; | |
| 70 | -}]); | |
| 71 | - | |
| 72 | -angular.module('ScheduleApp').controller('EmployeeConfigCtrl', ['EmployeeConfigService', '$state', '$uibModal', function(employeeConfigService, $state, $uibModal) { | |
| 73 | - var self = this; | |
| 74 | - | |
| 75 | - // 切换到form状态 | |
| 76 | - self.goForm = function() { | |
| 77 | - //alert("切换"); | |
| 78 | - $state.go("employeeConfig_form"); | |
| 79 | - }; | |
| 80 | - | |
| 81 | - // 导入excel | |
| 82 | - self.importData = function() { | |
| 83 | - // large方式弹出模态对话框 | |
| 84 | - var modalInstance = $uibModal.open({ | |
| 85 | - templateUrl: '/pages/scheduleApp/module/core/employeeConfig/dataImport.html', | |
| 86 | - size: "lg", | |
| 87 | - animation: true, | |
| 88 | - backdrop: 'static', | |
| 89 | - resolve: { | |
| 90 | - // 可以传值给controller | |
| 91 | - }, | |
| 92 | - windowClass: 'center-modal', | |
| 93 | - controller: "EmployeeConfigToolsCtrl", | |
| 94 | - controllerAs: "ctrl", | |
| 95 | - bindToController: true | |
| 96 | - }); | |
| 97 | - modalInstance.result.then( | |
| 98 | - function() { | |
| 99 | - console.log("dataImport.html打开"); | |
| 100 | - }, | |
| 101 | - function() { | |
| 102 | - console.log("dataImport.html消失"); | |
| 103 | - } | |
| 104 | - ); | |
| 105 | - }; | |
| 106 | -}]); | |
| 107 | - | |
| 108 | -angular.module('ScheduleApp').controller('EmployeeConfigToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | |
| 109 | - var self = this; | |
| 110 | - self.data = "TODO"; | |
| 111 | - | |
| 112 | - // 关闭窗口 | |
| 113 | - self.close = function() { | |
| 114 | - $modalInstance.dismiss("cancel"); | |
| 115 | - }; | |
| 116 | - | |
| 117 | - self.clearInputFile = function() { | |
| 118 | - angular.element("input[type='file']").val(null); | |
| 119 | - }; | |
| 120 | - | |
| 121 | - // 上传文件组件 | |
| 122 | - self.uploader = new FileUploader({ | |
| 123 | - url: "/eci/dataImport", | |
| 124 | - filters: [] // 用于过滤文件,比如只允许导入excel | |
| 125 | - }); | |
| 126 | - self.uploader.onAfterAddingFile = function(fileItem) | |
| 127 | - { | |
| 128 | - console.info('onAfterAddingFile', fileItem); | |
| 129 | - console.log(self.uploader.queue.length); | |
| 130 | - if (self.uploader.queue.length > 1) | |
| 131 | - self.uploader.removeFromQueue(0); | |
| 132 | - }; | |
| 133 | - self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 134 | - { | |
| 135 | - console.info('onSuccessItem', fileItem, response, status, headers); | |
| 136 | - }; | |
| 137 | - self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 138 | - { | |
| 139 | - console.info('onErrorItem', fileItem, response, status, headers); | |
| 140 | - }; | |
| 141 | - | |
| 142 | -}]); | |
| 143 | - | |
| 144 | -angular.module('ScheduleApp').controller('EmployeeConfigListCtrl', ['EmployeeConfigService', function(employeeConfigService) { | |
| 145 | - var self = this; | |
| 146 | - self.pageInfo = { | |
| 147 | - totalItems : 0, | |
| 148 | - currentPage : 1, | |
| 149 | - infos: [] | |
| 150 | - }; | |
| 151 | - | |
| 152 | - // 初始创建的时候,获取一次列表数据 | |
| 153 | - employeeConfigService.getPage().then( | |
| 154 | - function(result) { | |
| 155 | - self.pageInfo.totalItems = result.totalElements; | |
| 156 | - self.pageInfo.currentPage = result.number + 1; | |
| 157 | - self.pageInfo.infos = result.content; | |
| 158 | - employeeConfigService.setCurrentPageNo(result.number + 1); | |
| 159 | - }, | |
| 160 | - function(result) { | |
| 161 | - alert("出错啦!"); | |
| 162 | - } | |
| 163 | - ); | |
| 164 | - | |
| 165 | - //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 166 | - // alert("dfdfdf"); | |
| 167 | - //}); | |
| 168 | - | |
| 169 | - // 翻页的时候调用 | |
| 170 | - self.pageChanaged = function() { | |
| 171 | - employeeConfigService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 172 | - employeeConfigService.getPage().then( | |
| 173 | - function(result) { | |
| 174 | - self.pageInfo.totalItems = result.totalElements; | |
| 175 | - self.pageInfo.currentPage = result.number + 1; | |
| 176 | - self.pageInfo.infos = result.content; | |
| 177 | - employeeConfigService.setCurrentPageNo(result.number + 1); | |
| 178 | - }, | |
| 179 | - function(result) { | |
| 180 | - alert("出错啦!"); | |
| 181 | - } | |
| 182 | - ); | |
| 183 | - }; | |
| 184 | - // 获取查询条件数据 | |
| 185 | - self.searchCondition = function() { | |
| 186 | - return employeeConfigService.getSearchCondition(); | |
| 187 | - }; | |
| 188 | - // 重置查询条件 | |
| 189 | - self.resetSearchCondition = function() { | |
| 190 | - employeeConfigService.resetSearchCondition(); | |
| 191 | - self.pageInfo.currentPage = 1; | |
| 192 | - self.pageChanaged(); | |
| 193 | - }; | |
| 194 | - | |
| 195 | - // 删除时刻表 | |
| 196 | - self.deleteEci = function(id) { | |
| 197 | - // TODO: | |
| 198 | - employeeConfigService.deleteDetail(id).then( | |
| 199 | - function(result) { | |
| 200 | - if (result.message) { // 暂时这样做,之后全局拦截 | |
| 201 | - alert("失败:" + result.message); | |
| 202 | - } else { | |
| 203 | - alert("作废成功!"); | |
| 204 | - | |
| 205 | - employeeConfigService.getPage().then( | |
| 206 | - function(result) { | |
| 207 | - self.pageInfo.totalItems = result.totalElements; | |
| 208 | - self.pageInfo.currentPage = result.number + 1; | |
| 209 | - self.pageInfo.infos = result.content; | |
| 210 | - employeeConfigService.setCurrentPageNo(result.number + 1); | |
| 211 | - }, | |
| 212 | - function(result) { | |
| 213 | - alert("出错啦!"); | |
| 214 | - } | |
| 215 | - ); | |
| 216 | - } | |
| 217 | - | |
| 218 | - }, | |
| 219 | - function(result) { | |
| 220 | - alert("出错啦!" + result); | |
| 221 | - } | |
| 222 | - ); | |
| 223 | - }; | |
| 224 | - | |
| 225 | - // 撤销修改 | |
| 226 | - self.redoDeleteEci = function(id) { | |
| 227 | - employeeConfigService.getDetail(id).then( | |
| 228 | - function(result) { | |
| 229 | - result.isCancel = 'false'; | |
| 230 | - employeeConfigService.saveDetail(result).then( | |
| 231 | - function(result) { | |
| 232 | - if (result.message) { // 暂时这样做,之后全局拦截 | |
| 233 | - alert("失败:" + result.message); | |
| 234 | - } else { | |
| 235 | - alert("撤销成功!"); | |
| 236 | - | |
| 237 | - employeeConfigService.getPage().then( | |
| 238 | - function(result) { | |
| 239 | - self.pageInfo.totalItems = result.totalElements; | |
| 240 | - self.pageInfo.currentPage = result.number + 1; | |
| 241 | - self.pageInfo.infos = result.content; | |
| 242 | - employeeConfigService.setCurrentPageNo(result.number + 1); | |
| 243 | - }, | |
| 244 | - function(result) { | |
| 245 | - alert("出错啦!"); | |
| 246 | - } | |
| 247 | - ); | |
| 248 | - } | |
| 249 | - }, | |
| 250 | - function(result) { | |
| 251 | - // TODO:弹出框方式以后改 | |
| 252 | - alert("出错啦!"); | |
| 253 | - } | |
| 254 | - ); | |
| 255 | - }, | |
| 256 | - function(result) { | |
| 257 | - // TODO:弹出框方式以后改 | |
| 258 | - alert("出错啦!"); | |
| 259 | - } | |
| 260 | - ); | |
| 261 | - }; | |
| 262 | - | |
| 263 | -}]); | |
| 264 | - | |
| 265 | -angular.module('ScheduleApp').controller('EmployeeConfigFormCtrl', ['EmployeeConfigService', '$stateParams', '$state', function(employeeConfigService, $stateParams, $state) { | |
| 266 | - var self = this; | |
| 267 | - | |
| 268 | - // 欲保存的busInfo信息,绑定 | |
| 269 | - self.employeeConfigForSave = {xl:{}, jsy:{}, spy:{}}; | |
| 270 | - | |
| 271 | - // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 272 | - var id = $stateParams.id; | |
| 273 | - if (id) { | |
| 274 | - self.employeeConfigForSave.id = id; | |
| 275 | - employeeConfigService.getDetail(id).then( | |
| 276 | - function(result) { | |
| 277 | - var key; | |
| 278 | - for (key in result) { | |
| 279 | - self.employeeConfigForSave[key] = result[key]; | |
| 280 | - } | |
| 281 | - | |
| 282 | - if (!self.employeeConfigForSave.spy) { | |
| 283 | - self.employeeConfigForSave.spy = {}; | |
| 284 | - } | |
| 285 | - | |
| 286 | - }, | |
| 287 | - function(result) { | |
| 288 | - alert("出错啦!"); | |
| 289 | - } | |
| 290 | - ); | |
| 291 | - } | |
| 292 | - | |
| 293 | - // 提交方法 | |
| 294 | - self.submit = function() { | |
| 295 | - console.log(self.employeeConfigForSave); | |
| 296 | - | |
| 297 | - // 如果自对象没id值,设置成null | |
| 298 | - if (self.employeeConfigForSave.spy && !self.employeeConfigForSave.spy.id) { | |
| 299 | - self.employeeConfigForSave.spy = null; | |
| 300 | - } | |
| 301 | - | |
| 302 | - employeeConfigService.saveDetail(self.employeeConfigForSave).then( | |
| 303 | - function(result) { | |
| 304 | - // TODO:弹出框方式以后改 | |
| 305 | - if (result.status == 'SUCCESS') { | |
| 306 | - alert("保存成功!"); | |
| 307 | - $state.go("employeeConfig"); | |
| 308 | - } else { | |
| 309 | - alert("保存异常!"); | |
| 310 | - } | |
| 311 | - }, | |
| 312 | - function(result) { | |
| 313 | - // TODO:弹出框方式以后改 | |
| 314 | - alert("出错啦!"); | |
| 315 | - } | |
| 316 | - ); | |
| 317 | - }; | |
| 318 | -}]); | |
| 319 | - | |
| 320 | -angular.module('ScheduleApp').controller('EmployeeConfigDetailCtrl', ['EmployeeConfigService', '$stateParams', function(employeeConfigService, $stateParams) { | |
| 321 | - var self = this; | |
| 322 | - self.title = ""; | |
| 323 | - self.employeeConfigForDetail = {}; | |
| 324 | - self.employeeConfigForDetail.id = $stateParams.id; | |
| 325 | - | |
| 326 | - // 当转向到此页面时,就获取明细信息并绑定 | |
| 327 | - employeeConfigService.getDetail($stateParams.id).then( | |
| 328 | - function(result) { | |
| 329 | - var key; | |
| 330 | - for (key in result) { | |
| 331 | - self.employeeConfigForDetail[key] = result[key]; | |
| 332 | - } | |
| 333 | - | |
| 334 | - self.title = "驾驶员 " + self.employeeConfigForDetail.jsy.personnelName + " 配置详细信息"; | |
| 335 | - }, | |
| 336 | - function(result) { | |
| 337 | - // TODO:弹出框方式以后改 | |
| 338 | - alert("出错啦!"); | |
| 339 | - } | |
| 340 | - ); | |
| 341 | -}]); | |
| 342 | - | |
| 1 | +// 人员配置管理 service controller 等写在一起 | |
| 2 | + | |
| 3 | +angular.module('ScheduleApp').factory('EmployeeConfigService', ['EmployeeConfigService_g', function(service) { | |
| 4 | + /** 当前的查询条件信息 */ | |
| 5 | + var currentSearchCondition = {'isCancel_eq': false}; | |
| 6 | + | |
| 7 | + /** 当前第几页 */ | |
| 8 | + var currentPageNo = 1; | |
| 9 | + | |
| 10 | + return { | |
| 11 | + /** | |
| 12 | + * 获取查询条件信息, | |
| 13 | + * 用于给controller用来和页面数据绑定。 | |
| 14 | + */ | |
| 15 | + getSearchCondition: function() { | |
| 16 | + return currentSearchCondition; | |
| 17 | + }, | |
| 18 | + /** | |
| 19 | + * 重置查询条件信息。 | |
| 20 | + */ | |
| 21 | + resetSearchCondition: function() { | |
| 22 | + var key; | |
| 23 | + for (key in currentSearchCondition) { | |
| 24 | + currentSearchCondition[key] = undefined; | |
| 25 | + } | |
| 26 | + currentSearchCondition['isCancel_eq'] = false; | |
| 27 | + }, | |
| 28 | + /** | |
| 29 | + * 设置当前页码。 | |
| 30 | + * @param cpn 从1开始,后台是从0开始的 | |
| 31 | + */ | |
| 32 | + setCurrentPageNo: function(cpn) { | |
| 33 | + currentPageNo = cpn; | |
| 34 | + }, | |
| 35 | + /** | |
| 36 | + * 组装查询参数,返回一个promise查询结果。 | |
| 37 | + * @param params 查询参数 | |
| 38 | + * @return 返回一个 promise | |
| 39 | + */ | |
| 40 | + getPage: function() { | |
| 41 | + var params = currentSearchCondition; // 查询条件 | |
| 42 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 43 | + return service.rest.list(params).$promise; | |
| 44 | + }, | |
| 45 | + /** | |
| 46 | + * 获取明细信息。 | |
| 47 | + * @param id 车辆id | |
| 48 | + * @return 返回一个 promise | |
| 49 | + */ | |
| 50 | + getDetail: function(id) { | |
| 51 | + var params = {id: id}; | |
| 52 | + return service.rest.get(params).$promise; | |
| 53 | + }, | |
| 54 | + /** | |
| 55 | + * 保存信息。 | |
| 56 | + * @param obj 车辆详细信息 | |
| 57 | + * @return 返回一个 promise | |
| 58 | + */ | |
| 59 | + saveDetail: function(obj) { | |
| 60 | + return service.rest.save(obj).$promise; | |
| 61 | + }, | |
| 62 | + /** | |
| 63 | + * 删除信息。 | |
| 64 | + * @param id 主键id | |
| 65 | + * @returns {*|Function|promise|n} | |
| 66 | + */ | |
| 67 | + deleteDetail: function(id) { | |
| 68 | + return service.rest.delete({id: id}).$promise; | |
| 69 | + } | |
| 70 | + }; | |
| 71 | +}]); | |
| 72 | + | |
| 73 | +angular.module('ScheduleApp').controller('EmployeeConfigCtrl', ['EmployeeConfigService', '$state', '$uibModal', function(employeeConfigService, $state, $uibModal) { | |
| 74 | + var self = this; | |
| 75 | + | |
| 76 | + // 切换到form状态 | |
| 77 | + self.goForm = function() { | |
| 78 | + //alert("切换"); | |
| 79 | + $state.go("employeeConfig_form"); | |
| 80 | + }; | |
| 81 | + | |
| 82 | + // 导入excel | |
| 83 | + self.importData = function() { | |
| 84 | + // large方式弹出模态对话框 | |
| 85 | + var modalInstance = $uibModal.open({ | |
| 86 | + templateUrl: '/pages/scheduleApp/module/core/employeeConfig/dataImport.html', | |
| 87 | + size: "lg", | |
| 88 | + animation: true, | |
| 89 | + backdrop: 'static', | |
| 90 | + resolve: { | |
| 91 | + // 可以传值给controller | |
| 92 | + }, | |
| 93 | + windowClass: 'center-modal', | |
| 94 | + controller: "EmployeeConfigToolsCtrl", | |
| 95 | + controllerAs: "ctrl", | |
| 96 | + bindToController: true | |
| 97 | + }); | |
| 98 | + modalInstance.result.then( | |
| 99 | + function() { | |
| 100 | + console.log("dataImport.html打开"); | |
| 101 | + }, | |
| 102 | + function() { | |
| 103 | + console.log("dataImport.html消失"); | |
| 104 | + } | |
| 105 | + ); | |
| 106 | + }; | |
| 107 | +}]); | |
| 108 | + | |
| 109 | +angular.module('ScheduleApp').controller('EmployeeConfigToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | |
| 110 | + var self = this; | |
| 111 | + self.data = "TODO"; | |
| 112 | + | |
| 113 | + // 关闭窗口 | |
| 114 | + self.close = function() { | |
| 115 | + $modalInstance.dismiss("cancel"); | |
| 116 | + }; | |
| 117 | + | |
| 118 | + self.clearInputFile = function() { | |
| 119 | + angular.element("input[type='file']").val(null); | |
| 120 | + }; | |
| 121 | + | |
| 122 | + // 上传文件组件 | |
| 123 | + self.uploader = new FileUploader({ | |
| 124 | + url: "/eci/dataImport", | |
| 125 | + filters: [] // 用于过滤文件,比如只允许导入excel | |
| 126 | + }); | |
| 127 | + self.uploader.onAfterAddingFile = function(fileItem) | |
| 128 | + { | |
| 129 | + console.info('onAfterAddingFile', fileItem); | |
| 130 | + console.log(self.uploader.queue.length); | |
| 131 | + if (self.uploader.queue.length > 1) | |
| 132 | + self.uploader.removeFromQueue(0); | |
| 133 | + }; | |
| 134 | + self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 135 | + { | |
| 136 | + console.info('onSuccessItem', fileItem, response, status, headers); | |
| 137 | + }; | |
| 138 | + self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 139 | + { | |
| 140 | + console.info('onErrorItem', fileItem, response, status, headers); | |
| 141 | + }; | |
| 142 | + | |
| 143 | +}]); | |
| 144 | + | |
| 145 | +angular.module('ScheduleApp').controller('EmployeeConfigListCtrl', ['EmployeeConfigService', function(employeeConfigService) { | |
| 146 | + var self = this; | |
| 147 | + self.pageInfo = { | |
| 148 | + totalItems : 0, | |
| 149 | + currentPage : 1, | |
| 150 | + infos: [] | |
| 151 | + }; | |
| 152 | + | |
| 153 | + // 初始创建的时候,获取一次列表数据 | |
| 154 | + employeeConfigService.getPage().then( | |
| 155 | + function(result) { | |
| 156 | + self.pageInfo.totalItems = result.totalElements; | |
| 157 | + self.pageInfo.currentPage = result.number + 1; | |
| 158 | + self.pageInfo.infos = result.content; | |
| 159 | + employeeConfigService.setCurrentPageNo(result.number + 1); | |
| 160 | + }, | |
| 161 | + function(result) { | |
| 162 | + alert("出错啦!"); | |
| 163 | + } | |
| 164 | + ); | |
| 165 | + | |
| 166 | + //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 167 | + // alert("dfdfdf"); | |
| 168 | + //}); | |
| 169 | + | |
| 170 | + // 翻页的时候调用 | |
| 171 | + self.pageChanaged = function() { | |
| 172 | + employeeConfigService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 173 | + employeeConfigService.getPage().then( | |
| 174 | + function(result) { | |
| 175 | + self.pageInfo.totalItems = result.totalElements; | |
| 176 | + self.pageInfo.currentPage = result.number + 1; | |
| 177 | + self.pageInfo.infos = result.content; | |
| 178 | + employeeConfigService.setCurrentPageNo(result.number + 1); | |
| 179 | + }, | |
| 180 | + function(result) { | |
| 181 | + alert("出错啦!"); | |
| 182 | + } | |
| 183 | + ); | |
| 184 | + }; | |
| 185 | + // 获取查询条件数据 | |
| 186 | + self.searchCondition = function() { | |
| 187 | + return employeeConfigService.getSearchCondition(); | |
| 188 | + }; | |
| 189 | + // 重置查询条件 | |
| 190 | + self.resetSearchCondition = function() { | |
| 191 | + employeeConfigService.resetSearchCondition(); | |
| 192 | + self.pageInfo.currentPage = 1; | |
| 193 | + self.pageChanaged(); | |
| 194 | + }; | |
| 195 | + | |
| 196 | + // 删除时刻表 | |
| 197 | + self.deleteEci = function(id) { | |
| 198 | + // TODO: | |
| 199 | + employeeConfigService.deleteDetail(id).then( | |
| 200 | + function(result) { | |
| 201 | + if (result.message) { // 暂时这样做,之后全局拦截 | |
| 202 | + alert("失败:" + result.message); | |
| 203 | + } else { | |
| 204 | + alert("作废成功!"); | |
| 205 | + | |
| 206 | + employeeConfigService.getPage().then( | |
| 207 | + function(result) { | |
| 208 | + self.pageInfo.totalItems = result.totalElements; | |
| 209 | + self.pageInfo.currentPage = result.number + 1; | |
| 210 | + self.pageInfo.infos = result.content; | |
| 211 | + employeeConfigService.setCurrentPageNo(result.number + 1); | |
| 212 | + }, | |
| 213 | + function(result) { | |
| 214 | + alert("出错啦!"); | |
| 215 | + } | |
| 216 | + ); | |
| 217 | + } | |
| 218 | + | |
| 219 | + }, | |
| 220 | + function(result) { | |
| 221 | + alert("出错啦!" + result); | |
| 222 | + } | |
| 223 | + ); | |
| 224 | + }; | |
| 225 | + | |
| 226 | + // 撤销修改 | |
| 227 | + self.redoDeleteEci = function(id) { | |
| 228 | + employeeConfigService.getDetail(id).then( | |
| 229 | + function(result) { | |
| 230 | + result.isCancel = 'false'; | |
| 231 | + employeeConfigService.saveDetail(result).then( | |
| 232 | + function(result) { | |
| 233 | + if (result.message) { // 暂时这样做,之后全局拦截 | |
| 234 | + alert("失败:" + result.message); | |
| 235 | + } else { | |
| 236 | + alert("撤销成功!"); | |
| 237 | + | |
| 238 | + employeeConfigService.getPage().then( | |
| 239 | + function(result) { | |
| 240 | + self.pageInfo.totalItems = result.totalElements; | |
| 241 | + self.pageInfo.currentPage = result.number + 1; | |
| 242 | + self.pageInfo.infos = result.content; | |
| 243 | + employeeConfigService.setCurrentPageNo(result.number + 1); | |
| 244 | + }, | |
| 245 | + function(result) { | |
| 246 | + alert("出错啦!"); | |
| 247 | + } | |
| 248 | + ); | |
| 249 | + } | |
| 250 | + }, | |
| 251 | + function(result) { | |
| 252 | + // TODO:弹出框方式以后改 | |
| 253 | + alert("出错啦!"); | |
| 254 | + } | |
| 255 | + ); | |
| 256 | + }, | |
| 257 | + function(result) { | |
| 258 | + // TODO:弹出框方式以后改 | |
| 259 | + alert("出错啦!"); | |
| 260 | + } | |
| 261 | + ); | |
| 262 | + }; | |
| 263 | + | |
| 264 | +}]); | |
| 265 | + | |
| 266 | +angular.module('ScheduleApp').controller('EmployeeConfigFormCtrl', ['EmployeeConfigService', '$stateParams', '$state', function(employeeConfigService, $stateParams, $state) { | |
| 267 | + var self = this; | |
| 268 | + | |
| 269 | + // 欲保存的busInfo信息,绑定 | |
| 270 | + self.employeeConfigForSave = {xl:{}, jsy:{}, spy:{}}; | |
| 271 | + | |
| 272 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 273 | + var id = $stateParams.id; | |
| 274 | + if (id) { | |
| 275 | + self.employeeConfigForSave.id = id; | |
| 276 | + employeeConfigService.getDetail(id).then( | |
| 277 | + function(result) { | |
| 278 | + var key; | |
| 279 | + for (key in result) { | |
| 280 | + self.employeeConfigForSave[key] = result[key]; | |
| 281 | + } | |
| 282 | + | |
| 283 | + if (!self.employeeConfigForSave.spy) { | |
| 284 | + self.employeeConfigForSave.spy = {}; | |
| 285 | + } | |
| 286 | + | |
| 287 | + }, | |
| 288 | + function(result) { | |
| 289 | + alert("出错啦!"); | |
| 290 | + } | |
| 291 | + ); | |
| 292 | + } | |
| 293 | + | |
| 294 | + // 提交方法 | |
| 295 | + self.submit = function() { | |
| 296 | + console.log(self.employeeConfigForSave); | |
| 297 | + | |
| 298 | + // 如果自对象没id值,设置成null | |
| 299 | + if (self.employeeConfigForSave.spy && !self.employeeConfigForSave.spy.id) { | |
| 300 | + self.employeeConfigForSave.spy = null; | |
| 301 | + } | |
| 302 | + | |
| 303 | + employeeConfigService.saveDetail(self.employeeConfigForSave).then( | |
| 304 | + function(result) { | |
| 305 | + // TODO:弹出框方式以后改 | |
| 306 | + if (result.status == 'SUCCESS') { | |
| 307 | + alert("保存成功!"); | |
| 308 | + $state.go("employeeConfig"); | |
| 309 | + } else { | |
| 310 | + alert("保存异常!"); | |
| 311 | + } | |
| 312 | + }, | |
| 313 | + function(result) { | |
| 314 | + // TODO:弹出框方式以后改 | |
| 315 | + alert("出错啦!"); | |
| 316 | + } | |
| 317 | + ); | |
| 318 | + }; | |
| 319 | +}]); | |
| 320 | + | |
| 321 | +angular.module('ScheduleApp').controller('EmployeeConfigDetailCtrl', ['EmployeeConfigService', '$stateParams', function(employeeConfigService, $stateParams) { | |
| 322 | + var self = this; | |
| 323 | + self.title = ""; | |
| 324 | + self.employeeConfigForDetail = {}; | |
| 325 | + self.employeeConfigForDetail.id = $stateParams.id; | |
| 326 | + | |
| 327 | + // 当转向到此页面时,就获取明细信息并绑定 | |
| 328 | + employeeConfigService.getDetail($stateParams.id).then( | |
| 329 | + function(result) { | |
| 330 | + var key; | |
| 331 | + for (key in result) { | |
| 332 | + self.employeeConfigForDetail[key] = result[key]; | |
| 333 | + } | |
| 334 | + | |
| 335 | + self.title = "驾驶员 " + self.employeeConfigForDetail.jsy.personnelName + " 配置详细信息"; | |
| 336 | + }, | |
| 337 | + function(result) { | |
| 338 | + // TODO:弹出框方式以后改 | |
| 339 | + alert("出错啦!"); | |
| 340 | + } | |
| 341 | + ); | |
| 342 | +}]); | |
| 343 | + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 人员配置模块页面route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + .state("employeeConfig", { // index页面 | |
| 13 | + url: '/employeeConfig', | |
| 14 | + views: { | |
| 15 | + "": { | |
| 16 | + templateUrl: 'pages/scheduleApp/module/core/employeeConfig/index.html' | |
| 17 | + }, | |
| 18 | + "employeeConfig_list@employeeConfig": { | |
| 19 | + templateUrl: 'pages/scheduleApp/module/core/employeeConfig/list.html' | |
| 20 | + } | |
| 21 | + }, | |
| 22 | + | |
| 23 | + resolve: { | |
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 25 | + return $ocLazyLoad.load({ | |
| 26 | + name: 'employeeConfig_module', | |
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 28 | + files: [ | |
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 31 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 32 | + "pages/scheduleApp/module/core/employeeConfig/module.js" | |
| 33 | + ] | |
| 34 | + }); | |
| 35 | + }] | |
| 36 | + } | |
| 37 | + }) | |
| 38 | + .state("employeeConfig_form", { // 添加人员配置form | |
| 39 | + url: '/employeeConfig_form', | |
| 40 | + views: { | |
| 41 | + "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/form.html'} | |
| 42 | + }, | |
| 43 | + resolve: { | |
| 44 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 45 | + return $ocLazyLoad.load({ | |
| 46 | + name: 'employeeConfig_form_module', | |
| 47 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 48 | + files: [ | |
| 49 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 50 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 51 | + "pages/scheduleApp/module/core/employeeConfig/module.js" | |
| 52 | + ] | |
| 53 | + }); | |
| 54 | + }] | |
| 55 | + } | |
| 56 | + }) | |
| 57 | + .state("employeeConfig_edit", { // 修改人员配置form | |
| 58 | + url: '/employeeConfig_edit/:id', | |
| 59 | + views: { | |
| 60 | + "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/edit.html'} | |
| 61 | + }, | |
| 62 | + resolve: { | |
| 63 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 64 | + return $ocLazyLoad.load({ | |
| 65 | + name: 'employeeConfig_edit_module', | |
| 66 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 67 | + files: [ | |
| 68 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 69 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 70 | + "pages/scheduleApp/module/core/employeeConfig/module.js" | |
| 71 | + ] | |
| 72 | + }); | |
| 73 | + }] | |
| 74 | + } | |
| 75 | + }) | |
| 76 | + .state("employeeConfig_detail", { // 详细信息页面 | |
| 77 | + url: '/employeeConfig_detail/:id', | |
| 78 | + views: { | |
| 79 | + "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/detail.html'} | |
| 80 | + }, | |
| 81 | + resolve: { | |
| 82 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 83 | + return $ocLazyLoad.load({ | |
| 84 | + name: 'employeeConfig_detail_module', | |
| 85 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 86 | + files: [ | |
| 87 | + "pages/scheduleApp/module/core/employeeConfig/module.js" | |
| 88 | + ] | |
| 89 | + }); | |
| 90 | + }] | |
| 91 | + } | |
| 92 | + }) | |
| 93 | + | |
| 94 | + } | |
| 95 | +]); | |
| 0 | 96 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/dist/controller.min.js deleted
100644 → 0
| 1 | -angular.module("guideboardManageApp").controller("guideboardManageCtrl",["GuideboardInfo",function(a){var b=this;b.totalItems=0,b.currentPage=1,b.infos=[],b.pageChanged=function(){console.log("页面跳转到:"+b.currentPage),a.list({page:b.currentPage-1},function(a){console.log("后台返回记录数:"+a.content.length),b.totalItems=a.totalElements,b.currentPage=a.number+1,b.infos=a.content})},a.list(function(a){console.log("后台返回记录数:"+a.content.length),b.totalItems=a.totalElements,b.currentPage=a.number+1,b.infos=a.content})}]); | |
| 2 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/dist/guideboardManage.dist.html deleted
100644 → 0
| 1 | -<div class="page-head"> | |
| 2 | - <div class="page-title"> | |
| 3 | - <h1>路牌管理</h1> | |
| 4 | - </div> | |
| 5 | -</div> | |
| 6 | - | |
| 7 | -<ul class="page-breadcrumb breadcrumb"> | |
| 8 | - <li> | |
| 9 | - <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | - <i class="fa fa-circle"></i> | |
| 11 | - </li> | |
| 12 | - <li> | |
| 13 | - <span class="active">运营计划管理</span> | |
| 14 | - <i class="fa fa-circle"></i> | |
| 15 | - </li> | |
| 16 | - <li> | |
| 17 | - <span class="active">路牌管理</span> | |
| 18 | - </li> | |
| 19 | -</ul> | |
| 20 | - | |
| 21 | -<div class="row" id="guideboardManage" ng-app="guideboardManageApp"> | |
| 22 | - <div class="col-md-12" ng-controller="guideboardManageCtrl as gmc"> | |
| 23 | - <div class="portlet light bordered"> | |
| 24 | - <div class="portlet-title"> | |
| 25 | - <div class="caption font-dark"> | |
| 26 | - <i class="fa fa-database font-dark"></i> | |
| 27 | - <span class="caption-subject bold uppercase">路牌表</span> | |
| 28 | - </div> | |
| 29 | - <div class="actions"> | |
| 30 | - <a href="javascirpt:" class="btn btn-circle blue"> | |
| 31 | - <i class="fa fa-plus"></i> | |
| 32 | - 添加路牌 | |
| 33 | - </a> | |
| 34 | - <div class="btn-group"> | |
| 35 | - <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 36 | - <i class="fa fa-share"></i> | |
| 37 | - <span>系统工具</span> | |
| 38 | - <i class="fa fa-angle-down"></i> | |
| 39 | - </a> | |
| 40 | - <ul class="dropdown-menu pull-right"> | |
| 41 | - <li> | |
| 42 | - <a href="javascript:" class="tool-action"> | |
| 43 | - <i class="fa fa-file-excel-o"></i> | |
| 44 | - 导出excel | |
| 45 | - </a> | |
| 46 | - </li> | |
| 47 | - <li class="divider"></li> | |
| 48 | - <li> | |
| 49 | - <a href="javascript:" class="tool-action"> | |
| 50 | - <i class="fa fa-refresh"></i> | |
| 51 | - 刷行数据 | |
| 52 | - </a> | |
| 53 | - </li> | |
| 54 | - </ul> | |
| 55 | - </div> | |
| 56 | - </div> | |
| 57 | - </div> | |
| 58 | - | |
| 59 | - <div class="portlet-body"> | |
| 60 | - <table class="table table-striped table-bordered table-hover table-checkable order-column" id="busConfigInfoTable"> | |
| 61 | - <thead> | |
| 62 | - <tr> | |
| 63 | - <th> | |
| 64 | - <input type="checkbox" class="group-checkable" data-set="#busConfigInfoTable.checkboxes"/> | |
| 65 | - </th> | |
| 66 | - <th>线路</th> | |
| 67 | - <th>路牌顺序号</th> | |
| 68 | - <th>路牌名称</th> | |
| 69 | - <th>路牌类型</th> | |
| 70 | - <th>操作</th> | |
| 71 | - </tr> | |
| 72 | - </thead> | |
| 73 | - <tbody> | |
| 74 | - <tr ng-repeat="info in gmc.infos" class="odd gradeX"> | |
| 75 | - <td> | |
| 76 | - <input type="checkbox" class="checkboxes"/> | |
| 77 | - </td> | |
| 78 | - <td> | |
| 79 | - <span ng-bind="info.xl"></span> | |
| 80 | - </td> | |
| 81 | - <td> | |
| 82 | - <span ng-bind="info.lpNo"></span> | |
| 83 | - </td> | |
| 84 | - <td> | |
| 85 | - <span ng-bind="info.lpName"></span> | |
| 86 | - </td> | |
| 87 | - <td> | |
| 88 | - <span ng-bind="info.lpType"></span> | |
| 89 | - </td> | |
| 90 | - </tr> | |
| 91 | - </tbody> | |
| 92 | - </table> | |
| 93 | - | |
| 94 | - <div style="text-align: right;"> | |
| 95 | - <uib-pagination total-items="gmc.totalItems" | |
| 96 | - ng-model="gmc.currentPage" | |
| 97 | - ng-change="gmc.pageChanged()" | |
| 98 | - previous-text="上一页" | |
| 99 | - next-text="下一页"> | |
| 100 | - </uib-pagination> | |
| 101 | - </div> | |
| 102 | - | |
| 103 | - </div> | |
| 104 | - </div> | |
| 105 | - </div> | |
| 106 | -</div> | |
| 107 | - | |
| 108 | -<script>angular.module("guideboardManageApp",["ngResource","ui.bootstrap"]).factory("GuideboardInfo",["$resource",function(a){return a("/gic",{order:"lpNo",direction:"ASC"},{list:{method:"GET",params:{page:0}}})}]);</script> | |
| 109 | -<script>angular.module("guideboardManageApp").controller("guideboardManageCtrl",["GuideboardInfo",function(a){var b=this;b.totalItems=0,b.currentPage=1,b.infos=[],b.pageChanged=function(){console.log("页面跳转到:"+b.currentPage),a.list({page:b.currentPage-1},function(a){console.log("后台返回记录数:"+a.content.length),b.totalItems=a.totalElements,b.currentPage=a.number+1,b.infos=a.content})},a.list(function(a){console.log("后台返回记录数:"+a.content.length),b.totalItems=a.totalElements,b.currentPage=a.number+1,b.infos=a.content})}]);</script> | |
| 110 | - | |
| 111 | -<script type="text/javascript"> | |
| 112 | - angular.bootstrap(document.getElementById("guideboardManage"), ["guideboardManageApp"]); | |
| 113 | -</script> | |
| 114 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/dist/service.min.js deleted
100644 → 0
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/guideboardManage.js renamed to src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/module.js
| 1 | -// 路牌管理 service controller 等写在一起 | |
| 2 | - | |
| 3 | -angular.module('ScheduleApp').factory('GuideboardManageService', ['GuideboardManageService_g', function(service) { | |
| 4 | - /** 当前的查询条件信息 */ | |
| 5 | - var currentSearchCondition = {}; | |
| 6 | - | |
| 7 | - /** 当前第几页 */ | |
| 8 | - var currentPageNo = 1; | |
| 9 | - | |
| 10 | - return { | |
| 11 | - /** | |
| 12 | - * 获取查询条件信息, | |
| 13 | - * 用于给controller用来和页面数据绑定。 | |
| 14 | - */ | |
| 15 | - getSearchCondition: function() { | |
| 16 | - return currentSearchCondition; | |
| 17 | - }, | |
| 18 | - /** | |
| 19 | - * 重置查询条件信息。 | |
| 20 | - */ | |
| 21 | - resetSearchCondition: function() { | |
| 22 | - var key; | |
| 23 | - for (key in currentSearchCondition) { | |
| 24 | - currentSearchCondition[key] = undefined; | |
| 25 | - } | |
| 26 | - }, | |
| 27 | - /** | |
| 28 | - * 设置当前页码。 | |
| 29 | - * @param cpn 从1开始,后台是从0开始的 | |
| 30 | - */ | |
| 31 | - setCurrentPageNo: function(cpn) { | |
| 32 | - currentPageNo = cpn; | |
| 33 | - }, | |
| 34 | - /** | |
| 35 | - * 组装查询参数,返回一个promise查询结果。 | |
| 36 | - * @param params 查询参数 | |
| 37 | - * @return 返回一个 promise | |
| 38 | - */ | |
| 39 | - getPage: function() { | |
| 40 | - var params = currentSearchCondition; // 查询条件 | |
| 41 | - params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 42 | - return service.rest.list(params).$promise; | |
| 43 | - }, | |
| 44 | - /** | |
| 45 | - * 获取明细信息。 | |
| 46 | - * @param id 车辆id | |
| 47 | - * @return 返回一个 promise | |
| 48 | - */ | |
| 49 | - getDetail: function(id) { | |
| 50 | - var params = {id: id}; | |
| 51 | - return service.rest.get(params).$promise; | |
| 52 | - }, | |
| 53 | - /** | |
| 54 | - * 保存信息。 | |
| 55 | - * @param obj 车辆详细信息 | |
| 56 | - * @return 返回一个 promise | |
| 57 | - */ | |
| 58 | - saveDetail: function(obj) { | |
| 59 | - return service.rest.save(obj).$promise; | |
| 60 | - } | |
| 61 | - }; | |
| 62 | -}]); | |
| 63 | - | |
| 64 | -angular.module('ScheduleApp').controller('GuideboardManageCtrl', ['GuideboardManageService', '$state', '$uibModal', function(guideboardManageService, $state, $uibModal) { | |
| 65 | - var self = this; | |
| 66 | - | |
| 67 | - // 切换到form状态 | |
| 68 | - self.goForm = function() { | |
| 69 | - alert("切换添加"); | |
| 70 | - }; | |
| 71 | - | |
| 72 | - // 导入excel | |
| 73 | - self.importData = function() { | |
| 74 | - // large方式弹出模态对话框 | |
| 75 | - var modalInstance = $uibModal.open({ | |
| 76 | - templateUrl: '/pages/scheduleApp/module/core/guideboardManage/dataImport.html', | |
| 77 | - size: "lg", | |
| 78 | - animation: true, | |
| 79 | - backdrop: 'static', | |
| 80 | - resolve: { | |
| 81 | - // 可以传值给controller | |
| 82 | - }, | |
| 83 | - windowClass: 'center-modal', | |
| 84 | - controller: "GuideboardManageToolsCtrl", | |
| 85 | - controllerAs: "ctrl", | |
| 86 | - bindToController: true | |
| 87 | - }); | |
| 88 | - modalInstance.result.then( | |
| 89 | - function() { | |
| 90 | - console.log("dataImport.html打开"); | |
| 91 | - }, | |
| 92 | - function() { | |
| 93 | - console.log("dataImport.html消失"); | |
| 94 | - } | |
| 95 | - ); | |
| 96 | - }; | |
| 97 | -}]); | |
| 98 | - | |
| 99 | -angular.module('ScheduleApp').controller('GuideboardManageToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | |
| 100 | - var self = this; | |
| 101 | - self.data = "TODO"; | |
| 102 | - | |
| 103 | - // 关闭窗口 | |
| 104 | - self.close = function() { | |
| 105 | - $modalInstance.dismiss("cancel"); | |
| 106 | - }; | |
| 107 | - | |
| 108 | - self.clearInputFile = function() { | |
| 109 | - angular.element("input[type='file']").val(null); | |
| 110 | - }; | |
| 111 | - | |
| 112 | - // 上传文件组件 | |
| 113 | - self.uploader = new FileUploader({ | |
| 114 | - url: "/gic/dataImport", | |
| 115 | - filters: [] // 用于过滤文件,比如只允许导入excel | |
| 116 | - }); | |
| 117 | - self.uploader.onAfterAddingFile = function(fileItem) | |
| 118 | - { | |
| 119 | - console.info('onAfterAddingFile', fileItem); | |
| 120 | - console.log(self.uploader.queue.length); | |
| 121 | - if (self.uploader.queue.length > 1) | |
| 122 | - self.uploader.removeFromQueue(0); | |
| 123 | - }; | |
| 124 | - self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 125 | - { | |
| 126 | - console.info('onSuccessItem', fileItem, response, status, headers); | |
| 127 | - }; | |
| 128 | - self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 129 | - { | |
| 130 | - console.info('onErrorItem', fileItem, response, status, headers); | |
| 131 | - }; | |
| 132 | - | |
| 133 | -}]); | |
| 134 | - | |
| 135 | -angular.module('ScheduleApp').controller('GuideboardManageListCtrl', ['GuideboardManageService', function(guideboardManageService) { | |
| 136 | - var self = this; | |
| 137 | - self.pageInfo = { | |
| 138 | - totalItems : 0, | |
| 139 | - currentPage : 1, | |
| 140 | - infos: [] | |
| 141 | - }; | |
| 142 | - | |
| 143 | - // 初始创建的时候,获取一次列表数据 | |
| 144 | - guideboardManageService.getPage().then( | |
| 145 | - function(result) { | |
| 146 | - self.pageInfo.totalItems = result.totalElements; | |
| 147 | - self.pageInfo.currentPage = result.number + 1; | |
| 148 | - self.pageInfo.infos = result.content; | |
| 149 | - guideboardManageService.setCurrentPageNo(result.number + 1); | |
| 150 | - }, | |
| 151 | - function(result) { | |
| 152 | - alert("出错啦!"); | |
| 153 | - } | |
| 154 | - ); | |
| 155 | - | |
| 156 | - //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 157 | - // alert("dfdfdf"); | |
| 158 | - //}); | |
| 159 | - | |
| 160 | - // 翻页的时候调用 | |
| 161 | - self.pageChanaged = function() { | |
| 162 | - guideboardManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 163 | - guideboardManageService.getPage().then( | |
| 164 | - function(result) { | |
| 165 | - self.pageInfo.totalItems = result.totalElements; | |
| 166 | - self.pageInfo.currentPage = result.number + 1; | |
| 167 | - self.pageInfo.infos = result.content; | |
| 168 | - guideboardManageService.setCurrentPageNo(result.number + 1); | |
| 169 | - }, | |
| 170 | - function(result) { | |
| 171 | - alert("出错啦!"); | |
| 172 | - } | |
| 173 | - ); | |
| 174 | - }; | |
| 175 | - // 获取查询条件数据 | |
| 176 | - self.searchCondition = function() { | |
| 177 | - return guideboardManageService.getSearchCondition(); | |
| 178 | - }; | |
| 179 | - // 重置查询条件 | |
| 180 | - self.resetSearchCondition = function() { | |
| 181 | - guideboardManageService.resetSearchCondition(); | |
| 182 | - self.pageInfo.currentPage = 1; | |
| 183 | - self.pageChanaged(); | |
| 184 | - }; | |
| 185 | - | |
| 186 | -}]); | |
| 187 | - | |
| 188 | -angular.module('ScheduleApp').controller('GuideboardManageFormCtrl', ['GuideboardManageService', '$stateParams', '$state', function(guideboardManageService, $stateParams, $state) { | |
| 189 | - // TODO: | |
| 190 | -}]); | |
| 191 | - | |
| 192 | -angular.module('ScheduleApp').controller('GuideboardManageDetailCtrl', ['GuideboardManageService', '$stateParams', function(guideboardManageService, $stateParams) { | |
| 193 | - var self = this; | |
| 194 | - self.title = ""; | |
| 195 | - self.guideboardForDetail = {}; | |
| 196 | - self.guideboardForDetail.id = $stateParams.id; | |
| 197 | - | |
| 198 | - // 当转向到此页面时,就获取明细信息并绑定 | |
| 199 | - guideboardManageService.getDetail($stateParams.id).then( | |
| 200 | - function(result) { | |
| 201 | - var key; | |
| 202 | - for (key in result) { | |
| 203 | - self.guideboardForDetail[key] = result[key]; | |
| 204 | - } | |
| 205 | - | |
| 206 | - self.title = "路牌 " + self.guideboardForDetail.lpName + " 详细信息"; | |
| 207 | - }, | |
| 208 | - function(result) { | |
| 209 | - // TODO:弹出框方式以后改 | |
| 210 | - alert("出错啦!"); | |
| 211 | - } | |
| 212 | - ); | |
| 213 | -}]); | |
| 214 | - | |
| 215 | - | |
| 1 | +// 路牌管理 service controller 等写在一起 | |
| 2 | + | |
| 3 | +angular.module('ScheduleApp').factory('GuideboardManageService', ['GuideboardManageService_g', function(service) { | |
| 4 | + /** 当前的查询条件信息 */ | |
| 5 | + var currentSearchCondition = {}; | |
| 6 | + | |
| 7 | + /** 当前第几页 */ | |
| 8 | + var currentPageNo = 1; | |
| 9 | + | |
| 10 | + return { | |
| 11 | + /** | |
| 12 | + * 获取查询条件信息, | |
| 13 | + * 用于给controller用来和页面数据绑定。 | |
| 14 | + */ | |
| 15 | + getSearchCondition: function() { | |
| 16 | + return currentSearchCondition; | |
| 17 | + }, | |
| 18 | + /** | |
| 19 | + * 重置查询条件信息。 | |
| 20 | + */ | |
| 21 | + resetSearchCondition: function() { | |
| 22 | + var key; | |
| 23 | + for (key in currentSearchCondition) { | |
| 24 | + currentSearchCondition[key] = undefined; | |
| 25 | + } | |
| 26 | + }, | |
| 27 | + /** | |
| 28 | + * 设置当前页码。 | |
| 29 | + * @param cpn 从1开始,后台是从0开始的 | |
| 30 | + */ | |
| 31 | + setCurrentPageNo: function(cpn) { | |
| 32 | + currentPageNo = cpn; | |
| 33 | + }, | |
| 34 | + /** | |
| 35 | + * 组装查询参数,返回一个promise查询结果。 | |
| 36 | + * @param params 查询参数 | |
| 37 | + * @return 返回一个 promise | |
| 38 | + */ | |
| 39 | + getPage: function() { | |
| 40 | + var params = currentSearchCondition; // 查询条件 | |
| 41 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 42 | + return service.rest.list(params).$promise; | |
| 43 | + }, | |
| 44 | + /** | |
| 45 | + * 获取明细信息。 | |
| 46 | + * @param id 车辆id | |
| 47 | + * @return 返回一个 promise | |
| 48 | + */ | |
| 49 | + getDetail: function(id) { | |
| 50 | + var params = {id: id}; | |
| 51 | + return service.rest.get(params).$promise; | |
| 52 | + }, | |
| 53 | + /** | |
| 54 | + * 保存信息。 | |
| 55 | + * @param obj 车辆详细信息 | |
| 56 | + * @return 返回一个 promise | |
| 57 | + */ | |
| 58 | + saveDetail: function(obj) { | |
| 59 | + return service.rest.save(obj).$promise; | |
| 60 | + } | |
| 61 | + }; | |
| 62 | +}]); | |
| 63 | + | |
| 64 | +angular.module('ScheduleApp').controller('GuideboardManageCtrl', ['GuideboardManageService', '$state', '$uibModal', function(guideboardManageService, $state, $uibModal) { | |
| 65 | + var self = this; | |
| 66 | + | |
| 67 | + // 切换到form状态 | |
| 68 | + self.goForm = function() { | |
| 69 | + alert("切换添加"); | |
| 70 | + }; | |
| 71 | + | |
| 72 | + // 导入excel | |
| 73 | + self.importData = function() { | |
| 74 | + // large方式弹出模态对话框 | |
| 75 | + var modalInstance = $uibModal.open({ | |
| 76 | + templateUrl: '/pages/scheduleApp/module/core/guideboardManage/dataImport.html', | |
| 77 | + size: "lg", | |
| 78 | + animation: true, | |
| 79 | + backdrop: 'static', | |
| 80 | + resolve: { | |
| 81 | + // 可以传值给controller | |
| 82 | + }, | |
| 83 | + windowClass: 'center-modal', | |
| 84 | + controller: "GuideboardManageToolsCtrl", | |
| 85 | + controllerAs: "ctrl", | |
| 86 | + bindToController: true | |
| 87 | + }); | |
| 88 | + modalInstance.result.then( | |
| 89 | + function() { | |
| 90 | + console.log("dataImport.html打开"); | |
| 91 | + }, | |
| 92 | + function() { | |
| 93 | + console.log("dataImport.html消失"); | |
| 94 | + } | |
| 95 | + ); | |
| 96 | + }; | |
| 97 | +}]); | |
| 98 | + | |
| 99 | +angular.module('ScheduleApp').controller('GuideboardManageToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | |
| 100 | + var self = this; | |
| 101 | + self.data = "TODO"; | |
| 102 | + | |
| 103 | + // 关闭窗口 | |
| 104 | + self.close = function() { | |
| 105 | + $modalInstance.dismiss("cancel"); | |
| 106 | + }; | |
| 107 | + | |
| 108 | + self.clearInputFile = function() { | |
| 109 | + angular.element("input[type='file']").val(null); | |
| 110 | + }; | |
| 111 | + | |
| 112 | + // 上传文件组件 | |
| 113 | + self.uploader = new FileUploader({ | |
| 114 | + url: "/gic/dataImport", | |
| 115 | + filters: [] // 用于过滤文件,比如只允许导入excel | |
| 116 | + }); | |
| 117 | + self.uploader.onAfterAddingFile = function(fileItem) | |
| 118 | + { | |
| 119 | + console.info('onAfterAddingFile', fileItem); | |
| 120 | + console.log(self.uploader.queue.length); | |
| 121 | + if (self.uploader.queue.length > 1) | |
| 122 | + self.uploader.removeFromQueue(0); | |
| 123 | + }; | |
| 124 | + self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 125 | + { | |
| 126 | + console.info('onSuccessItem', fileItem, response, status, headers); | |
| 127 | + }; | |
| 128 | + self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 129 | + { | |
| 130 | + console.info('onErrorItem', fileItem, response, status, headers); | |
| 131 | + }; | |
| 132 | + | |
| 133 | +}]); | |
| 134 | + | |
| 135 | +angular.module('ScheduleApp').controller('GuideboardManageListCtrl', ['GuideboardManageService', function(guideboardManageService) { | |
| 136 | + var self = this; | |
| 137 | + self.pageInfo = { | |
| 138 | + totalItems : 0, | |
| 139 | + currentPage : 1, | |
| 140 | + infos: [] | |
| 141 | + }; | |
| 142 | + | |
| 143 | + // 初始创建的时候,获取一次列表数据 | |
| 144 | + guideboardManageService.getPage().then( | |
| 145 | + function(result) { | |
| 146 | + self.pageInfo.totalItems = result.totalElements; | |
| 147 | + self.pageInfo.currentPage = result.number + 1; | |
| 148 | + self.pageInfo.infos = result.content; | |
| 149 | + guideboardManageService.setCurrentPageNo(result.number + 1); | |
| 150 | + }, | |
| 151 | + function(result) { | |
| 152 | + alert("出错啦!"); | |
| 153 | + } | |
| 154 | + ); | |
| 155 | + | |
| 156 | + //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 157 | + // alert("dfdfdf"); | |
| 158 | + //}); | |
| 159 | + | |
| 160 | + // 翻页的时候调用 | |
| 161 | + self.pageChanaged = function() { | |
| 162 | + guideboardManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 163 | + guideboardManageService.getPage().then( | |
| 164 | + function(result) { | |
| 165 | + self.pageInfo.totalItems = result.totalElements; | |
| 166 | + self.pageInfo.currentPage = result.number + 1; | |
| 167 | + self.pageInfo.infos = result.content; | |
| 168 | + guideboardManageService.setCurrentPageNo(result.number + 1); | |
| 169 | + }, | |
| 170 | + function(result) { | |
| 171 | + alert("出错啦!"); | |
| 172 | + } | |
| 173 | + ); | |
| 174 | + }; | |
| 175 | + // 获取查询条件数据 | |
| 176 | + self.searchCondition = function() { | |
| 177 | + return guideboardManageService.getSearchCondition(); | |
| 178 | + }; | |
| 179 | + // 重置查询条件 | |
| 180 | + self.resetSearchCondition = function() { | |
| 181 | + guideboardManageService.resetSearchCondition(); | |
| 182 | + self.pageInfo.currentPage = 1; | |
| 183 | + self.pageChanaged(); | |
| 184 | + }; | |
| 185 | + | |
| 186 | +}]); | |
| 187 | + | |
| 188 | +angular.module('ScheduleApp').controller('GuideboardManageFormCtrl', ['GuideboardManageService', '$stateParams', '$state', function(guideboardManageService, $stateParams, $state) { | |
| 189 | + // TODO: | |
| 190 | +}]); | |
| 191 | + | |
| 192 | +angular.module('ScheduleApp').controller('GuideboardManageDetailCtrl', ['GuideboardManageService', '$stateParams', function(guideboardManageService, $stateParams) { | |
| 193 | + var self = this; | |
| 194 | + self.title = ""; | |
| 195 | + self.guideboardForDetail = {}; | |
| 196 | + self.guideboardForDetail.id = $stateParams.id; | |
| 197 | + | |
| 198 | + // 当转向到此页面时,就获取明细信息并绑定 | |
| 199 | + guideboardManageService.getDetail($stateParams.id).then( | |
| 200 | + function(result) { | |
| 201 | + var key; | |
| 202 | + for (key in result) { | |
| 203 | + self.guideboardForDetail[key] = result[key]; | |
| 204 | + } | |
| 205 | + | |
| 206 | + self.title = "路牌 " + self.guideboardForDetail.lpName + " 详细信息"; | |
| 207 | + }, | |
| 208 | + function(result) { | |
| 209 | + // TODO:弹出框方式以后改 | |
| 210 | + alert("出错啦!"); | |
| 211 | + } | |
| 212 | + ); | |
| 213 | +}]); | |
| 214 | + | |
| 215 | + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 路牌管理配置所有模块页面route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + .state("guideboardManage", { // index页面 | |
| 13 | + url: '/guideboardManage', | |
| 14 | + views: { | |
| 15 | + "": { | |
| 16 | + templateUrl: 'pages/scheduleApp/module/core/guideboardManage/index.html' | |
| 17 | + }, | |
| 18 | + "guideboardManage_list@guideboardManage": { | |
| 19 | + templateUrl: 'pages/scheduleApp/module/core/guideboardManage/list.html' | |
| 20 | + } | |
| 21 | + }, | |
| 22 | + | |
| 23 | + resolve: { | |
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 25 | + return $ocLazyLoad.load({ | |
| 26 | + name: 'guideboardManage_module', | |
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 28 | + files: [ | |
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 31 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 32 | + "pages/scheduleApp/module/core/guideboardManage/module.js" | |
| 33 | + ] | |
| 34 | + }); | |
| 35 | + }] | |
| 36 | + } | |
| 37 | + }) | |
| 38 | + .state("guideboardManage_detail", { // 详细信息页面 | |
| 39 | + url: '/guideboardManage_detail/:id', | |
| 40 | + views: { | |
| 41 | + "": {templateUrl: 'pages/scheduleApp/module/core/guideboardManage/detail.html'} | |
| 42 | + }, | |
| 43 | + resolve: { | |
| 44 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 45 | + return $ocLazyLoad.load({ | |
| 46 | + name: 'guideboardManage_detail_module', | |
| 47 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 48 | + files: [ | |
| 49 | + "pages/scheduleApp/module/core/guideboardManage/module.js" | |
| 50 | + ] | |
| 51 | + }); | |
| 52 | + }] | |
| 53 | + } | |
| 54 | + }) | |
| 55 | + | |
| 56 | +}]); | |
| 0 | 57 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/dist/rerunManage.dist.html deleted
100644 → 0
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/list.html
| ... | ... | @@ -3,14 +3,15 @@ |
| 3 | 3 | <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column"> |
| 4 | 4 | <thead> |
| 5 | 5 | <tr role="row" class="heading"> |
| 6 | - <th style="width: 5%;">序号</th> | |
| 7 | - <th style="width: 15%;">套跑线路</th> | |
| 8 | - <th style="width: 100px">套跑路牌</th> | |
| 9 | - <th style="width: 10%;">时刻表</th> | |
| 10 | - <th style="width: 10%;">线路</th> | |
| 11 | - <th style="width: 100px">路牌</th> | |
| 6 | + <th style="width: 50px;">序号</th> | |
| 7 | + <th style="width: 150px;">套跑线路</th> | |
| 8 | + <th style="width: 80px">套跑路牌</th> | |
| 9 | + <th >时刻表</th> | |
| 10 | + <th style="width: 150px;">线路</th> | |
| 11 | + <th style="width: 50px">路牌</th> | |
| 12 | 12 | <th width="100px">车辆</th> |
| 13 | 13 | <th width="100px">套跑类型</th> |
| 14 | + <th width="80px">状态</th> | |
| 14 | 15 | <th style="width: 21%">操作</th> |
| 15 | 16 | </tr> |
| 16 | 17 | <tr role="row" class="filter"> |
| ... | ... | @@ -33,6 +34,11 @@ |
| 33 | 34 | <td></td> |
| 34 | 35 | <td></td> |
| 35 | 36 | <td> |
| 37 | + <label class="checkbox-inline"> | |
| 38 | + <input type="checkbox" ng-model="ctrl.searchCondition()['isCancel_eq']"/>作废 | |
| 39 | + </label> | |
| 40 | + </td> | |
| 41 | + <td> | |
| 36 | 42 | <button class="btn btn-sm green btn-outline filter-submit margin-bottom" |
| 37 | 43 | ng-click="ctrl.pageChanaged()"> |
| 38 | 44 | <i class="fa fa-search"></i> 搜索</button> |
| ... | ... | @@ -70,6 +76,10 @@ |
| 70 | 76 | <td> |
| 71 | 77 | <span ng-bind="info.rerunType | dict:'rerunType':'未知' "></span> |
| 72 | 78 | </td> |
| 79 | + <td> | |
| 80 | + <span class="glyphicon glyphicon-ok" ng-if="info.isCancel == '0'"></span> | |
| 81 | + <span class="glyphicon glyphicon-remove" ng-if="info.isCancel == '1'"></span> | |
| 82 | + </td> | |
| 73 | 83 | |
| 74 | 84 | <td> |
| 75 | 85 | <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/main.js renamed to src/main/resources/static/pages/scheduleApp/module/core/rerunManage/module.js
| 1 | -// 规则配置管理 service controller 等写在一起 | |
| 2 | -angular.module('ScheduleApp').factory('RerunManageService', ['rerunManageService_g', function(service) { | |
| 3 | - /** 当前的查询条件信息 */ | |
| 4 | - var currentSearchCondition = {}; | |
| 5 | - | |
| 6 | - /** 当前第几页 */ | |
| 7 | - var currentPageNo = 1; | |
| 8 | - | |
| 9 | - return { | |
| 10 | - /** | |
| 11 | - * 获取查询条件信息, | |
| 12 | - * 用于给controller用来和页面数据绑定。 | |
| 13 | - */ | |
| 14 | - getSearchCondition: function() { | |
| 15 | - return currentSearchCondition; | |
| 16 | - }, | |
| 17 | - /** | |
| 18 | - * 重置查询条件信息。 | |
| 19 | - */ | |
| 20 | - resetSearchCondition: function() { | |
| 21 | - var key; | |
| 22 | - for (key in currentSearchCondition) { | |
| 23 | - currentSearchCondition[key] = undefined; | |
| 24 | - } | |
| 25 | - }, | |
| 26 | - /** | |
| 27 | - * 设置当前页码。 | |
| 28 | - * @param cpn 从1开始,后台是从0开始的 | |
| 29 | - */ | |
| 30 | - setCurrentPageNo: function(cpn) { | |
| 31 | - currentPageNo = cpn; | |
| 32 | - }, | |
| 33 | - /** | |
| 34 | - * 组装查询参数,返回一个promise查询结果。 | |
| 35 | - * @param params 查询参数 | |
| 36 | - * @return 返回一个 promise | |
| 37 | - */ | |
| 38 | - getPage: function() { | |
| 39 | - var params = currentSearchCondition; // 查询条件 | |
| 40 | - params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 41 | - return service.rest.list(params).$promise; | |
| 42 | - }, | |
| 43 | - /** | |
| 44 | - * 获取明细信息。 | |
| 45 | - * @param id 车辆id | |
| 46 | - * @return 返回一个 promise | |
| 47 | - */ | |
| 48 | - getDetail: function(id) { | |
| 49 | - var params = {id: id}; | |
| 50 | - return service.rest.get(params).$promise; | |
| 51 | - }, | |
| 52 | - /** | |
| 53 | - * 保存信息。 | |
| 54 | - * @param obj 车辆详细信息 | |
| 55 | - * @return 返回一个 promise | |
| 56 | - */ | |
| 57 | - saveDetail: function(obj) { | |
| 58 | - return service.rest.save(obj).$promise; | |
| 59 | - }, | |
| 60 | - /** | |
| 61 | - * 删除信息。 | |
| 62 | - * @param id 主键id | |
| 63 | - * @returns {*|Function|promise|n} | |
| 64 | - */ | |
| 65 | - deleteDetail: function(id) { | |
| 66 | - return service.rest.delete({id: id}).$promise; | |
| 67 | - } | |
| 68 | - }; | |
| 69 | - | |
| 70 | -}]); | |
| 71 | - | |
| 72 | -angular.module('ScheduleApp').controller('RerunManageCtrl', ['RerunManageService', '$state', function(rerunManageService, $state) { | |
| 73 | - var self = this; | |
| 74 | - | |
| 75 | - // 切换到form状态 | |
| 76 | - self.goForm = function() { | |
| 77 | - //alert("切换"); | |
| 78 | - $state.go("rerunManage_form"); | |
| 79 | - }; | |
| 80 | - | |
| 81 | -}]); | |
| 82 | - | |
| 83 | -angular.module('ScheduleApp').controller('RerunManageListCtrl', ['RerunManageService', function(rerunManageService) { | |
| 84 | - var self = this; | |
| 85 | - self.pageInfo = { | |
| 86 | - totalItems : 0, | |
| 87 | - currentPage : 1, | |
| 88 | - infos: [] | |
| 89 | - }; | |
| 90 | - | |
| 91 | - // 初始创建的时候,获取一次列表数据 | |
| 92 | - rerunManageService.getPage().then( | |
| 93 | - function(result) { | |
| 94 | - self.pageInfo.totalItems = result.totalElements; | |
| 95 | - self.pageInfo.currentPage = result.number + 1; | |
| 96 | - self.pageInfo.infos = result.content; | |
| 97 | - rerunManageService.setCurrentPageNo(result.number + 1); | |
| 98 | - }, | |
| 99 | - function(result) { | |
| 100 | - alert("出错啦!"); | |
| 101 | - } | |
| 102 | - ); | |
| 103 | - | |
| 104 | - //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 105 | - // alert("dfdfdf"); | |
| 106 | - //}); | |
| 107 | - | |
| 108 | - // 翻页的时候调用 | |
| 109 | - self.pageChanaged = function() { | |
| 110 | - rerunManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 111 | - rerunManageService.getPage().then( | |
| 112 | - function(result) { | |
| 113 | - self.pageInfo.totalItems = result.totalElements; | |
| 114 | - self.pageInfo.currentPage = result.number + 1; | |
| 115 | - self.pageInfo.infos = result.content; | |
| 116 | - rerunManageService.setCurrentPageNo(result.number + 1); | |
| 117 | - }, | |
| 118 | - function(result) { | |
| 119 | - alert("出错啦!"); | |
| 120 | - } | |
| 121 | - ); | |
| 122 | - }; | |
| 123 | - // 获取查询条件数据 | |
| 124 | - self.searchCondition = function() { | |
| 125 | - return rerunManageService.getSearchCondition(); | |
| 126 | - }; | |
| 127 | - // 重置查询条件 | |
| 128 | - self.resetSearchCondition = function() { | |
| 129 | - rerunManageService.resetSearchCondition(); | |
| 130 | - self.pageInfo.currentPage = 1; | |
| 131 | - self.pageChanaged(); | |
| 132 | - }; | |
| 133 | - | |
| 134 | - // 作废/撤销 | |
| 135 | - self.toggleRerun = function(id) { | |
| 136 | - // TODO: | |
| 137 | - rerunManageService.deleteDetail(id).then( | |
| 138 | - function(result) { | |
| 139 | - if (result.message) { // 暂时这样做,之后全局拦截 | |
| 140 | - alert("失败:" + result.message); | |
| 141 | - } else { | |
| 142 | - alert("成功!"); | |
| 143 | - | |
| 144 | - rerunManageService.getPage().then( | |
| 145 | - function(result) { | |
| 146 | - self.pageInfo.totalItems = result.totalElements; | |
| 147 | - self.pageInfo.currentPage = result.number + 1; | |
| 148 | - self.pageInfo.infos = result.content; | |
| 149 | - rerunManageService.setCurrentPageNo(result.number + 1); | |
| 150 | - }, | |
| 151 | - function(result) { | |
| 152 | - alert("出错啦!"); | |
| 153 | - } | |
| 154 | - ); | |
| 155 | - } | |
| 156 | - | |
| 157 | - }, | |
| 158 | - function(result) { | |
| 159 | - alert("出错啦!" + result); | |
| 160 | - } | |
| 161 | - ); | |
| 162 | - }; | |
| 163 | - | |
| 164 | -}]); | |
| 165 | - | |
| 166 | -angular.module('ScheduleApp').controller('RerunManageFormCtrl', ['RerunManageService', '$stateParams', '$state', '$scope', function(rerunManageService, $stateParams, $state, $scope) { | |
| 167 | - var self = this; | |
| 168 | - | |
| 169 | - // 启用日期 日期控件开关 | |
| 170 | - self.qyrqOpen = false; | |
| 171 | - self.qyrq_open = function() { | |
| 172 | - self.qyrqOpen = true; | |
| 173 | - }; | |
| 174 | - | |
| 175 | - // 欲保存的busInfo信息,绑定 | |
| 176 | - self.rerunManageForSave = {rerunXl: {}, rerunTtinfo: {}, rerunLp: {}, rerunType: "dylp", useXl: {}, useLp: {}, useCarConfig: {}, useEmployeeConfig: {}}; | |
| 177 | - | |
| 178 | - // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 179 | - var id = $stateParams.id; | |
| 180 | - if (id) { | |
| 181 | - self.rerunManageForSave.id = id; | |
| 182 | - rerunManageService.getDetail(id).then( | |
| 183 | - function(result) { | |
| 184 | - var key; | |
| 185 | - for (key in result) { | |
| 186 | - if (result[key]) { | |
| 187 | - self.rerunManageForSave[key] = result[key]; | |
| 188 | - | |
| 189 | - if (self.rerunManageForSave.rerunType == 'dylp') { | |
| 190 | - self.rerunManageForSave.useCarConfig = {}; | |
| 191 | - self.rerunManageForSave.useEmployeeConfig = {}; | |
| 192 | - } else if (self.rerunManageForSave.rerunType == 'dybc') { | |
| 193 | - self.rerunManageForSave.useXl = {}; | |
| 194 | - self.rerunManageForSave.useLp = {}; | |
| 195 | - } else { | |
| 196 | - | |
| 197 | - } | |
| 198 | - } | |
| 199 | - } | |
| 200 | - }, | |
| 201 | - function(result) { | |
| 202 | - alert("出错啦!"); | |
| 203 | - } | |
| 204 | - ); | |
| 205 | - } | |
| 206 | - | |
| 207 | - // 提交方法 | |
| 208 | - self.submit = function() { | |
| 209 | - if (self.rerunManageForSave.rerunType == 'dylp') { | |
| 210 | - delete self.rerunManageForSave.useCarConfig; | |
| 211 | - delete self.rerunManageForSave.useEmployeeConfig; | |
| 212 | - | |
| 213 | - // 关联对象只取id | |
| 214 | - self.rerunManageForSave.useXl = {id: self.rerunManageForSave.useXl.id}; | |
| 215 | - self.rerunManageForSave.useLp = {id: self.rerunManageForSave.useLp.id} | |
| 216 | - } else if (self.rerunManageForSave.rerunType == 'dybc') { | |
| 217 | - delete self.rerunManageForSave.useXl; | |
| 218 | - delete self.rerunManageForSave.useLp; | |
| 219 | - | |
| 220 | - // 关联对象只取id | |
| 221 | - self.rerunManageForSave.useCarConfig = {id: self.rerunManageForSave.useCarConfig.id}; | |
| 222 | - self.rerunManageForSave.useEmployeeConfig = {id: self.rerunManageForSave.useEmployeeConfig.id}; | |
| 223 | - } else { | |
| 224 | - return; | |
| 225 | - } | |
| 226 | - | |
| 227 | - rerunManageService.saveDetail(self.rerunManageForSave).then( | |
| 228 | - function(result) { | |
| 229 | - // TODO:弹出框方式以后改 | |
| 230 | - if (result.status == 'SUCCESS') { | |
| 231 | - alert("保存成功!"); | |
| 232 | - $state.go("rerunManage"); | |
| 233 | - } else { | |
| 234 | - alert("保存异常!"); | |
| 235 | - } | |
| 236 | - }, | |
| 237 | - function(result) { | |
| 238 | - // TODO:弹出框方式以后改 | |
| 239 | - alert("出错啦!"); | |
| 240 | - } | |
| 241 | - ); | |
| 242 | - }; | |
| 243 | -}]); | |
| 244 | - | |
| 245 | -angular.module('ScheduleApp').controller('RerunManageDetailCtrl', ['RerunManageService', '$stateParams', function(rerunManageService, $stateParams) { | |
| 246 | - var self = this; | |
| 247 | - self.title = ""; | |
| 248 | - self.rerunManageForDetail = {}; | |
| 249 | - self.rerunManageForDetail.id = $stateParams.id; | |
| 250 | - | |
| 251 | - // 当转向到此页面时,就获取明细信息并绑定 | |
| 252 | - rerunManageService.getDetail($stateParams.id).then( | |
| 253 | - function(result) { | |
| 254 | - var key; | |
| 255 | - for (key in result) { | |
| 256 | - self.rerunManageForDetail[key] = result[key]; | |
| 257 | - } | |
| 258 | - | |
| 259 | - self.title = "规则配置详细信息"; | |
| 260 | - }, | |
| 261 | - function(result) { | |
| 262 | - // TODO:弹出框方式以后改 | |
| 263 | - alert("出错啦!"); | |
| 264 | - } | |
| 265 | - ); | |
| 266 | -}]); | |
| 267 | - | |
| 268 | - | |
| 269 | - | |
| 1 | +// 规则配置管理 service controller 等写在一起 | |
| 2 | +angular.module('ScheduleApp').factory('RerunManageService', ['rerunManageService_g', function(service) { | |
| 3 | + /** 当前的查询条件信息 */ | |
| 4 | + var currentSearchCondition = {'isCancel_eq': false}; | |
| 5 | + | |
| 6 | + /** 当前第几页 */ | |
| 7 | + var currentPageNo = 1; | |
| 8 | + | |
| 9 | + return { | |
| 10 | + /** | |
| 11 | + * 获取查询条件信息, | |
| 12 | + * 用于给controller用来和页面数据绑定。 | |
| 13 | + */ | |
| 14 | + getSearchCondition: function() { | |
| 15 | + return currentSearchCondition; | |
| 16 | + }, | |
| 17 | + /** | |
| 18 | + * 重置查询条件信息。 | |
| 19 | + */ | |
| 20 | + resetSearchCondition: function() { | |
| 21 | + var key; | |
| 22 | + for (key in currentSearchCondition) { | |
| 23 | + currentSearchCondition[key] = undefined; | |
| 24 | + } | |
| 25 | + currentSearchCondition['isCancel_eq'] = false; | |
| 26 | + }, | |
| 27 | + /** | |
| 28 | + * 设置当前页码。 | |
| 29 | + * @param cpn 从1开始,后台是从0开始的 | |
| 30 | + */ | |
| 31 | + setCurrentPageNo: function(cpn) { | |
| 32 | + currentPageNo = cpn; | |
| 33 | + }, | |
| 34 | + /** | |
| 35 | + * 组装查询参数,返回一个promise查询结果。 | |
| 36 | + * @param params 查询参数 | |
| 37 | + * @return 返回一个 promise | |
| 38 | + */ | |
| 39 | + getPage: function() { | |
| 40 | + var params = currentSearchCondition; // 查询条件 | |
| 41 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 42 | + return service.rest.list(params).$promise; | |
| 43 | + }, | |
| 44 | + /** | |
| 45 | + * 获取明细信息。 | |
| 46 | + * @param id 车辆id | |
| 47 | + * @return 返回一个 promise | |
| 48 | + */ | |
| 49 | + getDetail: function(id) { | |
| 50 | + var params = {id: id}; | |
| 51 | + return service.rest.get(params).$promise; | |
| 52 | + }, | |
| 53 | + /** | |
| 54 | + * 保存信息。 | |
| 55 | + * @param obj 车辆详细信息 | |
| 56 | + * @return 返回一个 promise | |
| 57 | + */ | |
| 58 | + saveDetail: function(obj) { | |
| 59 | + return service.rest.save(obj).$promise; | |
| 60 | + }, | |
| 61 | + /** | |
| 62 | + * 删除信息。 | |
| 63 | + * @param id 主键id | |
| 64 | + * @returns {*|Function|promise|n} | |
| 65 | + */ | |
| 66 | + deleteDetail: function(id) { | |
| 67 | + return service.rest.delete({id: id}).$promise; | |
| 68 | + } | |
| 69 | + }; | |
| 70 | + | |
| 71 | +}]); | |
| 72 | + | |
| 73 | +angular.module('ScheduleApp').controller('RerunManageCtrl', ['RerunManageService', '$state', function(rerunManageService, $state) { | |
| 74 | + var self = this; | |
| 75 | + | |
| 76 | + // 切换到form状态 | |
| 77 | + self.goForm = function() { | |
| 78 | + //alert("切换"); | |
| 79 | + $state.go("rerunManage_form"); | |
| 80 | + }; | |
| 81 | + | |
| 82 | +}]); | |
| 83 | + | |
| 84 | +angular.module('ScheduleApp').controller('RerunManageListCtrl', ['RerunManageService', function(rerunManageService) { | |
| 85 | + var self = this; | |
| 86 | + self.pageInfo = { | |
| 87 | + totalItems : 0, | |
| 88 | + currentPage : 1, | |
| 89 | + infos: [] | |
| 90 | + }; | |
| 91 | + | |
| 92 | + // 初始创建的时候,获取一次列表数据 | |
| 93 | + rerunManageService.getPage().then( | |
| 94 | + function(result) { | |
| 95 | + self.pageInfo.totalItems = result.totalElements; | |
| 96 | + self.pageInfo.currentPage = result.number + 1; | |
| 97 | + self.pageInfo.infos = result.content; | |
| 98 | + rerunManageService.setCurrentPageNo(result.number + 1); | |
| 99 | + }, | |
| 100 | + function(result) { | |
| 101 | + alert("出错啦!"); | |
| 102 | + } | |
| 103 | + ); | |
| 104 | + | |
| 105 | + //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 106 | + // alert("dfdfdf"); | |
| 107 | + //}); | |
| 108 | + | |
| 109 | + // 翻页的时候调用 | |
| 110 | + self.pageChanaged = function() { | |
| 111 | + rerunManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 112 | + rerunManageService.getPage().then( | |
| 113 | + function(result) { | |
| 114 | + self.pageInfo.totalItems = result.totalElements; | |
| 115 | + self.pageInfo.currentPage = result.number + 1; | |
| 116 | + self.pageInfo.infos = result.content; | |
| 117 | + rerunManageService.setCurrentPageNo(result.number + 1); | |
| 118 | + }, | |
| 119 | + function(result) { | |
| 120 | + alert("出错啦!"); | |
| 121 | + } | |
| 122 | + ); | |
| 123 | + }; | |
| 124 | + // 获取查询条件数据 | |
| 125 | + self.searchCondition = function() { | |
| 126 | + return rerunManageService.getSearchCondition(); | |
| 127 | + }; | |
| 128 | + // 重置查询条件 | |
| 129 | + self.resetSearchCondition = function() { | |
| 130 | + rerunManageService.resetSearchCondition(); | |
| 131 | + self.pageInfo.currentPage = 1; | |
| 132 | + self.pageChanaged(); | |
| 133 | + }; | |
| 134 | + | |
| 135 | + // 作废/撤销 | |
| 136 | + self.toggleRerun = function(id) { | |
| 137 | + // TODO: | |
| 138 | + rerunManageService.deleteDetail(id).then( | |
| 139 | + function(result) { | |
| 140 | + if (result.message) { // 暂时这样做,之后全局拦截 | |
| 141 | + alert("失败:" + result.message); | |
| 142 | + } else { | |
| 143 | + alert("成功!"); | |
| 144 | + | |
| 145 | + rerunManageService.getPage().then( | |
| 146 | + function(result) { | |
| 147 | + self.pageInfo.totalItems = result.totalElements; | |
| 148 | + self.pageInfo.currentPage = result.number + 1; | |
| 149 | + self.pageInfo.infos = result.content; | |
| 150 | + rerunManageService.setCurrentPageNo(result.number + 1); | |
| 151 | + }, | |
| 152 | + function(result) { | |
| 153 | + alert("出错啦!"); | |
| 154 | + } | |
| 155 | + ); | |
| 156 | + } | |
| 157 | + | |
| 158 | + }, | |
| 159 | + function(result) { | |
| 160 | + alert("出错啦!" + result); | |
| 161 | + } | |
| 162 | + ); | |
| 163 | + }; | |
| 164 | + | |
| 165 | +}]); | |
| 166 | + | |
| 167 | +angular.module('ScheduleApp').controller('RerunManageFormCtrl', ['RerunManageService', '$stateParams', '$state', '$scope', function(rerunManageService, $stateParams, $state, $scope) { | |
| 168 | + var self = this; | |
| 169 | + | |
| 170 | + // 启用日期 日期控件开关 | |
| 171 | + self.qyrqOpen = false; | |
| 172 | + self.qyrq_open = function() { | |
| 173 | + self.qyrqOpen = true; | |
| 174 | + }; | |
| 175 | + | |
| 176 | + // 欲保存的busInfo信息,绑定 | |
| 177 | + self.rerunManageForSave = {rerunXl: {}, rerunTtinfo: {}, rerunLp: {}, rerunType: "dylp", useXl: {}, useLp: {}, useCarConfig: {}, useEmployeeConfig: {}}; | |
| 178 | + | |
| 179 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 180 | + var id = $stateParams.id; | |
| 181 | + if (id) { | |
| 182 | + self.rerunManageForSave.id = id; | |
| 183 | + rerunManageService.getDetail(id).then( | |
| 184 | + function(result) { | |
| 185 | + var key; | |
| 186 | + for (key in result) { | |
| 187 | + if (result[key]) { | |
| 188 | + self.rerunManageForSave[key] = result[key]; | |
| 189 | + | |
| 190 | + if (self.rerunManageForSave.rerunType == 'dylp') { | |
| 191 | + self.rerunManageForSave.useCarConfig = {}; | |
| 192 | + self.rerunManageForSave.useEmployeeConfig = {}; | |
| 193 | + } else if (self.rerunManageForSave.rerunType == 'dybc') { | |
| 194 | + self.rerunManageForSave.useXl = {}; | |
| 195 | + self.rerunManageForSave.useLp = {}; | |
| 196 | + } else { | |
| 197 | + | |
| 198 | + } | |
| 199 | + } | |
| 200 | + } | |
| 201 | + }, | |
| 202 | + function(result) { | |
| 203 | + alert("出错啦!"); | |
| 204 | + } | |
| 205 | + ); | |
| 206 | + } | |
| 207 | + | |
| 208 | + // 提交方法 | |
| 209 | + self.submit = function() { | |
| 210 | + if (self.rerunManageForSave.rerunType == 'dylp') { | |
| 211 | + delete self.rerunManageForSave.useCarConfig; | |
| 212 | + delete self.rerunManageForSave.useEmployeeConfig; | |
| 213 | + | |
| 214 | + // 关联对象只取id | |
| 215 | + self.rerunManageForSave.useXl = {id: self.rerunManageForSave.useXl.id}; | |
| 216 | + self.rerunManageForSave.useLp = {id: self.rerunManageForSave.useLp.id} | |
| 217 | + } else if (self.rerunManageForSave.rerunType == 'dybc') { | |
| 218 | + delete self.rerunManageForSave.useXl; | |
| 219 | + delete self.rerunManageForSave.useLp; | |
| 220 | + | |
| 221 | + // 关联对象只取id | |
| 222 | + self.rerunManageForSave.useCarConfig = {id: self.rerunManageForSave.useCarConfig.id}; | |
| 223 | + self.rerunManageForSave.useEmployeeConfig = {id: self.rerunManageForSave.useEmployeeConfig.id}; | |
| 224 | + } else { | |
| 225 | + return; | |
| 226 | + } | |
| 227 | + | |
| 228 | + rerunManageService.saveDetail(self.rerunManageForSave).then( | |
| 229 | + function(result) { | |
| 230 | + // TODO:弹出框方式以后改 | |
| 231 | + if (result.status == 'SUCCESS') { | |
| 232 | + alert("保存成功!"); | |
| 233 | + $state.go("rerunManage"); | |
| 234 | + } else { | |
| 235 | + alert("保存异常!"); | |
| 236 | + } | |
| 237 | + }, | |
| 238 | + function(result) { | |
| 239 | + // TODO:弹出框方式以后改 | |
| 240 | + alert("出错啦!"); | |
| 241 | + } | |
| 242 | + ); | |
| 243 | + }; | |
| 244 | +}]); | |
| 245 | + | |
| 246 | +angular.module('ScheduleApp').controller('RerunManageDetailCtrl', ['RerunManageService', '$stateParams', function(rerunManageService, $stateParams) { | |
| 247 | + var self = this; | |
| 248 | + self.title = ""; | |
| 249 | + self.rerunManageForDetail = {}; | |
| 250 | + self.rerunManageForDetail.id = $stateParams.id; | |
| 251 | + | |
| 252 | + // 当转向到此页面时,就获取明细信息并绑定 | |
| 253 | + rerunManageService.getDetail($stateParams.id).then( | |
| 254 | + function(result) { | |
| 255 | + var key; | |
| 256 | + for (key in result) { | |
| 257 | + self.rerunManageForDetail[key] = result[key]; | |
| 258 | + } | |
| 259 | + | |
| 260 | + self.title = "规则配置详细信息"; | |
| 261 | + }, | |
| 262 | + function(result) { | |
| 263 | + // TODO:弹出框方式以后改 | |
| 264 | + alert("出错啦!"); | |
| 265 | + } | |
| 266 | + ); | |
| 267 | +}]); | |
| 268 | + | |
| 269 | + | |
| 270 | + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 套跑管理模块配置页面route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + .state("rerunManage", { // index页面 | |
| 13 | + url: '/rerunManage', | |
| 14 | + views: { | |
| 15 | + "": { | |
| 16 | + templateUrl: 'pages/scheduleApp/module/core/rerunManage/index.html' | |
| 17 | + }, | |
| 18 | + "rerunManage_list@rerunManage": { | |
| 19 | + templateUrl: 'pages/scheduleApp/module/core/rerunManage/list.html' | |
| 20 | + } | |
| 21 | + }, | |
| 22 | + | |
| 23 | + resolve: { | |
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 25 | + return $ocLazyLoad.load({ | |
| 26 | + name: 'rerunManage_module', | |
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 28 | + files: [ | |
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 31 | + "pages/scheduleApp/module/core/rerunManage/module.js" | |
| 32 | + ] | |
| 33 | + }); | |
| 34 | + }] | |
| 35 | + } | |
| 36 | + }) | |
| 37 | + .state("rerunManage_form", { // 添加套跑form | |
| 38 | + url: '/rerunManage_form', | |
| 39 | + views: { | |
| 40 | + "": {templateUrl: 'pages/scheduleApp/module/core/rerunManage/form.html'} | |
| 41 | + }, | |
| 42 | + resolve: { | |
| 43 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 44 | + return $ocLazyLoad.load({ | |
| 45 | + name: 'rerunManage_form_module', | |
| 46 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 47 | + files: [ | |
| 48 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 49 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 50 | + "pages/scheduleApp/module/core/rerunManage/module.js" | |
| 51 | + ] | |
| 52 | + }); | |
| 53 | + }] | |
| 54 | + } | |
| 55 | + }) | |
| 56 | + .state("rerunManage_edit", { // 修改套跑form | |
| 57 | + url: '/rerunManage_edit/:id', | |
| 58 | + views: { | |
| 59 | + "": {templateUrl: 'pages/scheduleApp/module/core/rerunManage/edit.html'} | |
| 60 | + }, | |
| 61 | + resolve: { | |
| 62 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 63 | + return $ocLazyLoad.load({ | |
| 64 | + name: 'rerunManage_edit_module', | |
| 65 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 66 | + files: [ | |
| 67 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 68 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 69 | + "pages/scheduleApp/module/core/rerunManage/module.js" | |
| 70 | + ] | |
| 71 | + }); | |
| 72 | + }] | |
| 73 | + } | |
| 74 | + }) | |
| 75 | + .state("rerunManage_detail", { // 详细信息页面 | |
| 76 | + url: '/rerunManage_detail/:id', | |
| 77 | + views: { | |
| 78 | + "": {templateUrl: 'pages/scheduleApp/module/core/rerunManage/detail.html'} | |
| 79 | + }, | |
| 80 | + resolve: { | |
| 81 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 82 | + return $ocLazyLoad.load({ | |
| 83 | + name: 'rerunManage_detail_module', | |
| 84 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 85 | + files: [ | |
| 86 | + "pages/scheduleApp/module/core/rerunManage/module.js" | |
| 87 | + ] | |
| 88 | + }); | |
| 89 | + }] | |
| 90 | + } | |
| 91 | + }) | |
| 92 | + } | |
| 93 | +]); | |
| 0 | 94 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/dist/schedulePlanManage.dist.html deleted
100644 → 0
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/index_info.html renamed to src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/info/index_info.html
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/list_info.html renamed to src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/info/list_info.html
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/schedulePlanInfoManage.js renamed to src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/info/module.js
| 1 | -// 车辆配置管理 service controller 等写在一起 | |
| 2 | -angular.module('ScheduleApp').factory('SchedulePlanInfoManageService', ['SchedulePlanInfoManageService_g', function(service) { | |
| 3 | - /** 当前的查询条件信息 */ | |
| 4 | - var currentSearchCondition = {}; | |
| 5 | - | |
| 6 | - /** 当前第几页 */ | |
| 7 | - var currentPageNo = 1; | |
| 8 | - | |
| 9 | - return { | |
| 10 | - /** | |
| 11 | - * 获取查询条件信息, | |
| 12 | - * 用于给controller用来和页面数据绑定。 | |
| 13 | - */ | |
| 14 | - getSearchCondition: function() { | |
| 15 | - return currentSearchCondition; | |
| 16 | - }, | |
| 17 | - /** | |
| 18 | - * 重置查询条件信息。 | |
| 19 | - */ | |
| 20 | - resetSearchCondition: function() { | |
| 21 | - var key; | |
| 22 | - for (key in currentSearchCondition) { | |
| 23 | - currentSearchCondition[key] = undefined; | |
| 24 | - } | |
| 25 | - }, | |
| 26 | - /** | |
| 27 | - * 设置当前页码。 | |
| 28 | - * @param cpn 从1开始,后台是从0开始的 | |
| 29 | - */ | |
| 30 | - setCurrentPageNo: function(cpn) { | |
| 31 | - currentPageNo = cpn; | |
| 32 | - }, | |
| 33 | - /** | |
| 34 | - * 组装查询参数,返回一个promise查询结果。 | |
| 35 | - * @param params 查询参数 | |
| 36 | - * @return 返回一个 promise | |
| 37 | - */ | |
| 38 | - getPage: function(spid) { | |
| 39 | - var params = currentSearchCondition; // 查询条件 | |
| 40 | - params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 41 | - params["schedulePlan.id_eq"] = spid; // 排班id | |
| 42 | - return service.rest.list(params).$promise; | |
| 43 | - } | |
| 44 | - | |
| 45 | - }; | |
| 46 | - | |
| 47 | -}]); | |
| 48 | - | |
| 49 | -angular.module('ScheduleApp').controller('SchedulePlanInfoManageCtrl', ['SchedulePlanInfoManageService', '$state', '$stateParams', '$scope', function(schedulePlanInfoManageService, $state, $stateParams, $scope) { | |
| 50 | - var self = this; | |
| 51 | - var spid = $stateParams.spid; // 排班规则id | |
| 52 | - var xlname = $stateParams.xlname; // 线路名字 | |
| 53 | - var ttname = $stateParams.ttname; // 时刻表名字 | |
| 54 | - var stime = $stateParams.stime; // 开始时间 | |
| 55 | - var etime = $stateParams.etime; // 结束时间 | |
| 56 | - | |
| 57 | - $scope.spid = spid; | |
| 58 | - $scope.xlname = xlname; | |
| 59 | - $scope.ttname = ttname; | |
| 60 | - $scope.stime = stime; | |
| 61 | - $scope.etime = etime; | |
| 62 | - | |
| 63 | - // 切换到form状态 | |
| 64 | - self.goForm = function() { | |
| 65 | - alert("等待生成"); | |
| 66 | - | |
| 67 | - } | |
| 68 | -}]); | |
| 69 | - | |
| 70 | -angular.module('ScheduleApp').controller('SchedulePlanInfoManageListCtrl', ['SchedulePlanInfoManageService', '$scope', function(schedulePlanInfoManageService, $scope) { | |
| 71 | - var self = this; | |
| 72 | - self.pageInfo = { | |
| 73 | - totalItems : 0, | |
| 74 | - currentPage : 1, | |
| 75 | - infos: [] | |
| 76 | - }; | |
| 77 | - | |
| 78 | - // 日期 日期控件开关 | |
| 79 | - self.scheduleDate = false; | |
| 80 | - self.scheduleDate_open = function() { | |
| 81 | - self.scheduleDate = true; | |
| 82 | - }; | |
| 83 | - | |
| 84 | - var spid = $scope.spid; | |
| 85 | - | |
| 86 | - // 初始创建的时候,获取一次列表数据 | |
| 87 | - schedulePlanInfoManageService.getPage(spid).then( | |
| 88 | - function(result) { | |
| 89 | - self.pageInfo.totalItems = result.totalElements; | |
| 90 | - self.pageInfo.currentPage = result.number + 1; | |
| 91 | - self.pageInfo.infos = result.content; | |
| 92 | - schedulePlanInfoManageService.setCurrentPageNo(result.number + 1); | |
| 93 | - }, | |
| 94 | - function(result) { | |
| 95 | - alert("出错啦!"); | |
| 96 | - } | |
| 97 | - ); | |
| 98 | - | |
| 99 | - //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 100 | - // alert("dfdfdf"); | |
| 101 | - //}); | |
| 102 | - | |
| 103 | - // 翻页的时候调用 | |
| 104 | - self.pageChanaged = function() { | |
| 105 | - schedulePlanInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 106 | - schedulePlanInfoManageService.getPage(spid).then( | |
| 107 | - function(result) { | |
| 108 | - self.pageInfo.totalItems = result.totalElements; | |
| 109 | - self.pageInfo.currentPage = result.number + 1; | |
| 110 | - self.pageInfo.infos = result.content; | |
| 111 | - schedulePlanInfoManageService.setCurrentPageNo(result.number + 1); | |
| 112 | - }, | |
| 113 | - function(result) { | |
| 114 | - alert("出错啦!"); | |
| 115 | - } | |
| 116 | - ); | |
| 117 | - }; | |
| 118 | - // 获取查询条件数据 | |
| 119 | - self.searchCondition = function() { | |
| 120 | - return schedulePlanInfoManageService.getSearchCondition(); | |
| 121 | - }; | |
| 122 | - // 重置查询条件 | |
| 123 | - self.resetSearchCondition = function() { | |
| 124 | - return schedulePlanInfoManageService.resetSearchCondition(); | |
| 125 | - }; | |
| 126 | - | |
| 127 | - $scope.$watch( | |
| 128 | - function() { | |
| 129 | - return self.searchCondition()['scheduleDate_eq']; | |
| 130 | - }, | |
| 131 | - function(newValue, oldValue) { | |
| 132 | - if (newValue == undefined && oldValue == undefined) { | |
| 133 | - | |
| 134 | - } else { | |
| 135 | - self.pageChanaged(); | |
| 136 | - } | |
| 137 | - }); | |
| 138 | - | |
| 139 | -}]); | |
| 140 | - | |
| 141 | - | |
| 142 | - | |
| 143 | - | |
| 1 | +// 车辆配置管理 service controller 等写在一起 | |
| 2 | +angular.module('ScheduleApp').factory('SchedulePlanInfoManageService', ['SchedulePlanInfoManageService_g', function(service) { | |
| 3 | + /** 当前的查询条件信息 */ | |
| 4 | + var currentSearchCondition = {}; | |
| 5 | + | |
| 6 | + /** 当前第几页 */ | |
| 7 | + var currentPageNo = 1; | |
| 8 | + | |
| 9 | + return { | |
| 10 | + /** | |
| 11 | + * 获取查询条件信息, | |
| 12 | + * 用于给controller用来和页面数据绑定。 | |
| 13 | + */ | |
| 14 | + getSearchCondition: function() { | |
| 15 | + return currentSearchCondition; | |
| 16 | + }, | |
| 17 | + /** | |
| 18 | + * 重置查询条件信息。 | |
| 19 | + */ | |
| 20 | + resetSearchCondition: function() { | |
| 21 | + var key; | |
| 22 | + for (key in currentSearchCondition) { | |
| 23 | + currentSearchCondition[key] = undefined; | |
| 24 | + } | |
| 25 | + }, | |
| 26 | + /** | |
| 27 | + * 设置当前页码。 | |
| 28 | + * @param cpn 从1开始,后台是从0开始的 | |
| 29 | + */ | |
| 30 | + setCurrentPageNo: function(cpn) { | |
| 31 | + currentPageNo = cpn; | |
| 32 | + }, | |
| 33 | + /** | |
| 34 | + * 组装查询参数,返回一个promise查询结果。 | |
| 35 | + * @param params 查询参数 | |
| 36 | + * @return 返回一个 promise | |
| 37 | + */ | |
| 38 | + getPage: function(spid) { | |
| 39 | + var params = currentSearchCondition; // 查询条件 | |
| 40 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 41 | + params["schedulePlan.id_eq"] = spid; // 排班id | |
| 42 | + return service.rest.list(params).$promise; | |
| 43 | + } | |
| 44 | + | |
| 45 | + }; | |
| 46 | + | |
| 47 | +}]); | |
| 48 | + | |
| 49 | +angular.module('ScheduleApp').controller('SchedulePlanInfoManageCtrl', ['SchedulePlanInfoManageService', '$state', '$stateParams', '$scope', function(schedulePlanInfoManageService, $state, $stateParams, $scope) { | |
| 50 | + var self = this; | |
| 51 | + var spid = $stateParams.spid; // 排班规则id | |
| 52 | + var xlname = $stateParams.xlname; // 线路名字 | |
| 53 | + var ttname = $stateParams.ttname; // 时刻表名字 | |
| 54 | + var stime = $stateParams.stime; // 开始时间 | |
| 55 | + var etime = $stateParams.etime; // 结束时间 | |
| 56 | + | |
| 57 | + $scope.spid = spid; | |
| 58 | + $scope.xlname = xlname; | |
| 59 | + $scope.ttname = ttname; | |
| 60 | + $scope.stime = stime; | |
| 61 | + $scope.etime = etime; | |
| 62 | + | |
| 63 | + // 切换到form状态 | |
| 64 | + self.goForm = function() { | |
| 65 | + alert("等待生成"); | |
| 66 | + | |
| 67 | + } | |
| 68 | +}]); | |
| 69 | + | |
| 70 | +angular.module('ScheduleApp').controller('SchedulePlanInfoManageListCtrl', ['SchedulePlanInfoManageService', '$scope', function(schedulePlanInfoManageService, $scope) { | |
| 71 | + var self = this; | |
| 72 | + self.pageInfo = { | |
| 73 | + totalItems : 0, | |
| 74 | + currentPage : 1, | |
| 75 | + infos: [] | |
| 76 | + }; | |
| 77 | + | |
| 78 | + // 日期 日期控件开关 | |
| 79 | + self.scheduleDate = false; | |
| 80 | + self.scheduleDate_open = function() { | |
| 81 | + self.scheduleDate = true; | |
| 82 | + }; | |
| 83 | + | |
| 84 | + var spid = $scope.spid; | |
| 85 | + | |
| 86 | + // 初始创建的时候,获取一次列表数据 | |
| 87 | + schedulePlanInfoManageService.getPage(spid).then( | |
| 88 | + function(result) { | |
| 89 | + self.pageInfo.totalItems = result.totalElements; | |
| 90 | + self.pageInfo.currentPage = result.number + 1; | |
| 91 | + self.pageInfo.infos = result.content; | |
| 92 | + schedulePlanInfoManageService.setCurrentPageNo(result.number + 1); | |
| 93 | + }, | |
| 94 | + function(result) { | |
| 95 | + alert("出错啦!"); | |
| 96 | + } | |
| 97 | + ); | |
| 98 | + | |
| 99 | + //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 100 | + // alert("dfdfdf"); | |
| 101 | + //}); | |
| 102 | + | |
| 103 | + // 翻页的时候调用 | |
| 104 | + self.pageChanaged = function() { | |
| 105 | + schedulePlanInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 106 | + schedulePlanInfoManageService.getPage(spid).then( | |
| 107 | + function(result) { | |
| 108 | + self.pageInfo.totalItems = result.totalElements; | |
| 109 | + self.pageInfo.currentPage = result.number + 1; | |
| 110 | + self.pageInfo.infos = result.content; | |
| 111 | + schedulePlanInfoManageService.setCurrentPageNo(result.number + 1); | |
| 112 | + }, | |
| 113 | + function(result) { | |
| 114 | + alert("出错啦!"); | |
| 115 | + } | |
| 116 | + ); | |
| 117 | + }; | |
| 118 | + // 获取查询条件数据 | |
| 119 | + self.searchCondition = function() { | |
| 120 | + return schedulePlanInfoManageService.getSearchCondition(); | |
| 121 | + }; | |
| 122 | + // 重置查询条件 | |
| 123 | + self.resetSearchCondition = function() { | |
| 124 | + return schedulePlanInfoManageService.resetSearchCondition(); | |
| 125 | + }; | |
| 126 | + | |
| 127 | + $scope.$watch( | |
| 128 | + function() { | |
| 129 | + return self.searchCondition()['scheduleDate_eq']; | |
| 130 | + }, | |
| 131 | + function(newValue, oldValue) { | |
| 132 | + if (newValue == undefined && oldValue == undefined) { | |
| 133 | + | |
| 134 | + } else { | |
| 135 | + self.pageChanaged(); | |
| 136 | + } | |
| 137 | + }); | |
| 138 | + | |
| 139 | +}]); | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/info/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 排班计划明细配置route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + // 排班计划明细管理模块 | |
| 13 | + .state("schedulePlanInfoManage", { | |
| 14 | + url: '/schedulePlanInfoManage/:spid/:xlname/:ttname/:stime/:etime', | |
| 15 | + views: { | |
| 16 | + "": { | |
| 17 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/info/index_info.html' | |
| 18 | + }, | |
| 19 | + "schedulePlanInfoManage_list@schedulePlanInfoManage": { | |
| 20 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/info/list_info.html' | |
| 21 | + } | |
| 22 | + }, | |
| 23 | + | |
| 24 | + resolve: { | |
| 25 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 26 | + return $ocLazyLoad.load({ | |
| 27 | + name: 'schedulePlanInfoManage_module', | |
| 28 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 29 | + files: [ | |
| 30 | + "pages/scheduleApp/module/core/schedulePlanManage/info/module.js" | |
| 31 | + ] | |
| 32 | + }); | |
| 33 | + }] | |
| 34 | + } | |
| 35 | + }); | |
| 36 | + | |
| 37 | + } | |
| 38 | +]); | |
| 0 | 39 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/schedulePlanManage.js renamed to src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/module.js
| 1 | -// 车辆配置管理 service controller 等写在一起 | |
| 2 | -angular.module('ScheduleApp').factory('SchedulePlanManageService', ['SchedulePlanManageService_g', function(service) { | |
| 3 | - /** 当前的查询条件信息 */ | |
| 4 | - var currentSearchCondition = {}; | |
| 5 | - | |
| 6 | - /** 当前第几页 */ | |
| 7 | - var currentPageNo = 1; | |
| 8 | - | |
| 9 | - return { | |
| 10 | - /** | |
| 11 | - * 获取查询条件信息, | |
| 12 | - * 用于给controller用来和页面数据绑定。 | |
| 13 | - */ | |
| 14 | - getSearchCondition: function() { | |
| 15 | - return currentSearchCondition; | |
| 16 | - }, | |
| 17 | - /** | |
| 18 | - * 重置查询条件信息。 | |
| 19 | - */ | |
| 20 | - resetSearchCondition: function() { | |
| 21 | - var key; | |
| 22 | - for (key in currentSearchCondition) { | |
| 23 | - currentSearchCondition[key] = undefined; | |
| 24 | - } | |
| 25 | - }, | |
| 26 | - /** | |
| 27 | - * 设置当前页码。 | |
| 28 | - * @param cpn 从1开始,后台是从0开始的 | |
| 29 | - */ | |
| 30 | - setCurrentPageNo: function(cpn) { | |
| 31 | - currentPageNo = cpn; | |
| 32 | - }, | |
| 33 | - /** | |
| 34 | - * 组装查询参数,返回一个promise查询结果。 | |
| 35 | - * @param params 查询参数 | |
| 36 | - * @return 返回一个 promise | |
| 37 | - */ | |
| 38 | - getPage: function() { | |
| 39 | - var params = currentSearchCondition; // 查询条件 | |
| 40 | - params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 41 | - return service.rest.list(params).$promise; | |
| 42 | - }, | |
| 43 | - /** | |
| 44 | - * 保存信息。 | |
| 45 | - * @param obj 车辆详细信息 | |
| 46 | - * @return 返回一个 promise | |
| 47 | - */ | |
| 48 | - saveDetail: function(obj) { | |
| 49 | - return service.rest.save(obj).$promise; | |
| 50 | - }, | |
| 51 | - /** | |
| 52 | - * 删除信息。 | |
| 53 | - * @param id 主键id | |
| 54 | - * @returns {*|Function|promise|n} | |
| 55 | - */ | |
| 56 | - deleteDetail: function(id) { | |
| 57 | - return service.rest.delete({id: id}).$promise; | |
| 58 | - } | |
| 59 | - | |
| 60 | - }; | |
| 61 | - | |
| 62 | -}]); | |
| 63 | - | |
| 64 | -angular.module('ScheduleApp').controller('SchedulePlanManageCtrl', ['SchedulePlanManageService', '$state', function(schedulePlanManageService, $state) { | |
| 65 | - var self = this; | |
| 66 | - | |
| 67 | - // 切换到form状态 | |
| 68 | - self.goForm = function() { | |
| 69 | - $state.go("schedulePlanManage_form"); | |
| 70 | - } | |
| 71 | -}]); | |
| 72 | - | |
| 73 | -angular.module('ScheduleApp').controller('SchedulePlanManageListCtrl', ['SchedulePlanManageService', function(schedulePlanManageService) { | |
| 74 | - var self = this; | |
| 75 | - self.pageInfo = { | |
| 76 | - totalItems : 0, | |
| 77 | - currentPage : 1, | |
| 78 | - infos: [] | |
| 79 | - }; | |
| 80 | - | |
| 81 | - // 日期 日期控件开关 | |
| 82 | - self.scheduleFromTime = false; | |
| 83 | - self.scheduleFromTime_open = function() { | |
| 84 | - self.scheduleFromTime = true; | |
| 85 | - }; | |
| 86 | - self.scheduleToTime = false; | |
| 87 | - self.scheduleToTime_open = function() { | |
| 88 | - self.scheduleToTime = true; | |
| 89 | - }; | |
| 90 | - | |
| 91 | - // 初始创建的时候,获取一次列表数据 | |
| 92 | - schedulePlanManageService.getPage().then( | |
| 93 | - function(result) { | |
| 94 | - self.pageInfo.totalItems = result.totalElements; | |
| 95 | - self.pageInfo.currentPage = result.number + 1; | |
| 96 | - self.pageInfo.infos = result.content; | |
| 97 | - schedulePlanManageService.setCurrentPageNo(result.number + 1); | |
| 98 | - }, | |
| 99 | - function(result) { | |
| 100 | - alert("出错啦!"); | |
| 101 | - } | |
| 102 | - ); | |
| 103 | - | |
| 104 | - //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 105 | - // alert("dfdfdf"); | |
| 106 | - //}); | |
| 107 | - | |
| 108 | - // 翻页的时候调用 | |
| 109 | - self.pageChanaged = function() { | |
| 110 | - schedulePlanManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 111 | - schedulePlanManageService.getPage().then( | |
| 112 | - function(result) { | |
| 113 | - self.pageInfo.totalItems = result.totalElements; | |
| 114 | - self.pageInfo.currentPage = result.number + 1; | |
| 115 | - self.pageInfo.infos = result.content; | |
| 116 | - schedulePlanManageService.setCurrentPageNo(result.number + 1); | |
| 117 | - }, | |
| 118 | - function(result) { | |
| 119 | - alert("出错啦!"); | |
| 120 | - } | |
| 121 | - ); | |
| 122 | - }; | |
| 123 | - // 获取查询条件数据 | |
| 124 | - self.searchCondition = function() { | |
| 125 | - return schedulePlanManageService.getSearchCondition(); | |
| 126 | - }; | |
| 127 | - // 重置查询条件 | |
| 128 | - self.resetSearchCondition = function() { | |
| 129 | - schedulePlanManageService.resetSearchCondition(); | |
| 130 | - self.pageInfo.currentPage = 1; | |
| 131 | - self.pageChanaged(); | |
| 132 | - }; | |
| 133 | - | |
| 134 | - // 删除排班(整个删除) | |
| 135 | - self.deletePlan = function(id) { | |
| 136 | - schedulePlanManageService.deleteDetail(id).then( | |
| 137 | - function(result) { | |
| 138 | - alert("删除成功!"); | |
| 139 | - | |
| 140 | - schedulePlanManageService.getPage().then( | |
| 141 | - function(result) { | |
| 142 | - self.pageInfo.totalItems = result.totalElements; | |
| 143 | - self.pageInfo.currentPage = result.number + 1; | |
| 144 | - self.pageInfo.infos = result.content; | |
| 145 | - schedulePlanManageService.setCurrentPageNo(result.number + 1); | |
| 146 | - }, | |
| 147 | - function(result) { | |
| 148 | - alert("出错啦!"); | |
| 149 | - } | |
| 150 | - ); | |
| 151 | - }, | |
| 152 | - function(result) { | |
| 153 | - alert("出错啦!"); | |
| 154 | - } | |
| 155 | - ); | |
| 156 | - } | |
| 157 | - | |
| 158 | -}]); | |
| 159 | - | |
| 160 | - | |
| 161 | -angular.module('ScheduleApp').controller('SchedulePlanManageFormCtrl', ['SchedulePlanManageService', '$stateParams', '$state', '$scope', function(schedulePlanManageService, $stateParams, $state, $scope) { | |
| 162 | - var self = this; | |
| 163 | - | |
| 164 | - // 开始日期 日期控件开关 | |
| 165 | - self.scheduleFromTimeOpen = false; | |
| 166 | - self.scheduleFromTime_open = function() { | |
| 167 | - self.scheduleFromTimeOpen = true; | |
| 168 | - }; | |
| 169 | - | |
| 170 | - // 结束日期 日期控件开关 | |
| 171 | - self.scheduleToTimeOpen = false; | |
| 172 | - self.scheduleToTime_open = function() { | |
| 173 | - self.scheduleToTimeOpen = true; | |
| 174 | - }; | |
| 175 | - | |
| 176 | - // 欲保存的busInfo信息,绑定 | |
| 177 | - self.schedulePlanManageForSave = {xl: {}}; | |
| 178 | - | |
| 179 | - // 提交方法 | |
| 180 | - self.submit = function() { | |
| 181 | - console.log(self.schedulePlanManageForSave); | |
| 182 | - | |
| 183 | - schedulePlanManageService.saveDetail(self.schedulePlanManageForSave).then( | |
| 184 | - function(result) { | |
| 185 | - // TODO:弹出框方式以后改 | |
| 186 | - if (result.status == 'SUCCESS') { | |
| 187 | - alert("保存成功!"); | |
| 188 | - $state.go("schedulePlanManage"); | |
| 189 | - } else { | |
| 190 | - alert("保存异常!"); | |
| 191 | - } | |
| 192 | - }, | |
| 193 | - function(result) { | |
| 194 | - // TODO:弹出框方式以后改 | |
| 195 | - alert("出错啦!"); | |
| 196 | - } | |
| 197 | - ); | |
| 198 | - }; | |
| 199 | -}]); | |
| 200 | - | |
| 1 | +// 车辆配置管理 service controller 等写在一起 | |
| 2 | +angular.module('ScheduleApp').factory('SchedulePlanManageService', ['SchedulePlanManageService_g', function(service) { | |
| 3 | + /** 当前的查询条件信息 */ | |
| 4 | + var currentSearchCondition = {}; | |
| 5 | + | |
| 6 | + /** 当前第几页 */ | |
| 7 | + var currentPageNo = 1; | |
| 8 | + | |
| 9 | + return { | |
| 10 | + /** | |
| 11 | + * 获取查询条件信息, | |
| 12 | + * 用于给controller用来和页面数据绑定。 | |
| 13 | + */ | |
| 14 | + getSearchCondition: function() { | |
| 15 | + return currentSearchCondition; | |
| 16 | + }, | |
| 17 | + /** | |
| 18 | + * 重置查询条件信息。 | |
| 19 | + */ | |
| 20 | + resetSearchCondition: function() { | |
| 21 | + var key; | |
| 22 | + for (key in currentSearchCondition) { | |
| 23 | + currentSearchCondition[key] = undefined; | |
| 24 | + } | |
| 25 | + }, | |
| 26 | + /** | |
| 27 | + * 设置当前页码。 | |
| 28 | + * @param cpn 从1开始,后台是从0开始的 | |
| 29 | + */ | |
| 30 | + setCurrentPageNo: function(cpn) { | |
| 31 | + currentPageNo = cpn; | |
| 32 | + }, | |
| 33 | + /** | |
| 34 | + * 组装查询参数,返回一个promise查询结果。 | |
| 35 | + * @param params 查询参数 | |
| 36 | + * @return 返回一个 promise | |
| 37 | + */ | |
| 38 | + getPage: function() { | |
| 39 | + var params = currentSearchCondition; // 查询条件 | |
| 40 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 41 | + return service.rest.list(params).$promise; | |
| 42 | + }, | |
| 43 | + /** | |
| 44 | + * 保存信息。 | |
| 45 | + * @param obj 车辆详细信息 | |
| 46 | + * @return 返回一个 promise | |
| 47 | + */ | |
| 48 | + saveDetail: function(obj) { | |
| 49 | + return service.rest.save(obj).$promise; | |
| 50 | + }, | |
| 51 | + /** | |
| 52 | + * 删除信息。 | |
| 53 | + * @param id 主键id | |
| 54 | + * @returns {*|Function|promise|n} | |
| 55 | + */ | |
| 56 | + deleteDetail: function(id) { | |
| 57 | + return service.rest.delete({id: id}).$promise; | |
| 58 | + } | |
| 59 | + | |
| 60 | + }; | |
| 61 | + | |
| 62 | +}]); | |
| 63 | + | |
| 64 | +angular.module('ScheduleApp').controller('SchedulePlanManageCtrl', ['SchedulePlanManageService', '$state', function(schedulePlanManageService, $state) { | |
| 65 | + var self = this; | |
| 66 | + | |
| 67 | + // 切换到form状态 | |
| 68 | + self.goForm = function() { | |
| 69 | + $state.go("schedulePlanManage_form"); | |
| 70 | + } | |
| 71 | +}]); | |
| 72 | + | |
| 73 | +angular.module('ScheduleApp').controller('SchedulePlanManageListCtrl', ['SchedulePlanManageService', function(schedulePlanManageService) { | |
| 74 | + var self = this; | |
| 75 | + self.pageInfo = { | |
| 76 | + totalItems : 0, | |
| 77 | + currentPage : 1, | |
| 78 | + infos: [] | |
| 79 | + }; | |
| 80 | + | |
| 81 | + // 日期 日期控件开关 | |
| 82 | + self.scheduleFromTime = false; | |
| 83 | + self.scheduleFromTime_open = function() { | |
| 84 | + self.scheduleFromTime = true; | |
| 85 | + }; | |
| 86 | + self.scheduleToTime = false; | |
| 87 | + self.scheduleToTime_open = function() { | |
| 88 | + self.scheduleToTime = true; | |
| 89 | + }; | |
| 90 | + | |
| 91 | + // 初始创建的时候,获取一次列表数据 | |
| 92 | + schedulePlanManageService.getPage().then( | |
| 93 | + function(result) { | |
| 94 | + self.pageInfo.totalItems = result.totalElements; | |
| 95 | + self.pageInfo.currentPage = result.number + 1; | |
| 96 | + self.pageInfo.infos = result.content; | |
| 97 | + schedulePlanManageService.setCurrentPageNo(result.number + 1); | |
| 98 | + }, | |
| 99 | + function(result) { | |
| 100 | + alert("出错啦!"); | |
| 101 | + } | |
| 102 | + ); | |
| 103 | + | |
| 104 | + //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 105 | + // alert("dfdfdf"); | |
| 106 | + //}); | |
| 107 | + | |
| 108 | + // 翻页的时候调用 | |
| 109 | + self.pageChanaged = function() { | |
| 110 | + schedulePlanManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 111 | + schedulePlanManageService.getPage().then( | |
| 112 | + function(result) { | |
| 113 | + self.pageInfo.totalItems = result.totalElements; | |
| 114 | + self.pageInfo.currentPage = result.number + 1; | |
| 115 | + self.pageInfo.infos = result.content; | |
| 116 | + schedulePlanManageService.setCurrentPageNo(result.number + 1); | |
| 117 | + }, | |
| 118 | + function(result) { | |
| 119 | + alert("出错啦!"); | |
| 120 | + } | |
| 121 | + ); | |
| 122 | + }; | |
| 123 | + // 获取查询条件数据 | |
| 124 | + self.searchCondition = function() { | |
| 125 | + return schedulePlanManageService.getSearchCondition(); | |
| 126 | + }; | |
| 127 | + // 重置查询条件 | |
| 128 | + self.resetSearchCondition = function() { | |
| 129 | + schedulePlanManageService.resetSearchCondition(); | |
| 130 | + self.pageInfo.currentPage = 1; | |
| 131 | + self.pageChanaged(); | |
| 132 | + }; | |
| 133 | + | |
| 134 | + // 删除排班(整个删除) | |
| 135 | + self.deletePlan = function(id) { | |
| 136 | + schedulePlanManageService.deleteDetail(id).then( | |
| 137 | + function(result) { | |
| 138 | + alert("删除成功!"); | |
| 139 | + | |
| 140 | + schedulePlanManageService.getPage().then( | |
| 141 | + function(result) { | |
| 142 | + self.pageInfo.totalItems = result.totalElements; | |
| 143 | + self.pageInfo.currentPage = result.number + 1; | |
| 144 | + self.pageInfo.infos = result.content; | |
| 145 | + schedulePlanManageService.setCurrentPageNo(result.number + 1); | |
| 146 | + }, | |
| 147 | + function(result) { | |
| 148 | + alert("出错啦!"); | |
| 149 | + } | |
| 150 | + ); | |
| 151 | + }, | |
| 152 | + function(result) { | |
| 153 | + alert("出错啦!"); | |
| 154 | + } | |
| 155 | + ); | |
| 156 | + } | |
| 157 | + | |
| 158 | +}]); | |
| 159 | + | |
| 160 | + | |
| 161 | +angular.module('ScheduleApp').controller('SchedulePlanManageFormCtrl', ['SchedulePlanManageService', '$stateParams', '$state', '$scope', function(schedulePlanManageService, $stateParams, $state, $scope) { | |
| 162 | + var self = this; | |
| 163 | + | |
| 164 | + // 开始日期 日期控件开关 | |
| 165 | + self.scheduleFromTimeOpen = false; | |
| 166 | + self.scheduleFromTime_open = function() { | |
| 167 | + self.scheduleFromTimeOpen = true; | |
| 168 | + }; | |
| 169 | + | |
| 170 | + // 结束日期 日期控件开关 | |
| 171 | + self.scheduleToTimeOpen = false; | |
| 172 | + self.scheduleToTime_open = function() { | |
| 173 | + self.scheduleToTimeOpen = true; | |
| 174 | + }; | |
| 175 | + | |
| 176 | + // 欲保存的busInfo信息,绑定 | |
| 177 | + self.schedulePlanManageForSave = {xl: {}}; | |
| 178 | + | |
| 179 | + // 提交方法 | |
| 180 | + self.submit = function() { | |
| 181 | + console.log(self.schedulePlanManageForSave); | |
| 182 | + | |
| 183 | + schedulePlanManageService.saveDetail(self.schedulePlanManageForSave).then( | |
| 184 | + function(result) { | |
| 185 | + // TODO:弹出框方式以后改 | |
| 186 | + if (result.status == 'SUCCESS') { | |
| 187 | + alert("保存成功!"); | |
| 188 | + $state.go("schedulePlanManage"); | |
| 189 | + } else { | |
| 190 | + alert("保存异常!"); | |
| 191 | + } | |
| 192 | + }, | |
| 193 | + function(result) { | |
| 194 | + // TODO:弹出框方式以后改 | |
| 195 | + alert("出错啦!"); | |
| 196 | + } | |
| 197 | + ); | |
| 198 | + }; | |
| 199 | +}]); | |
| 200 | + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/edit_report.html renamed to src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/report/edit_report.html
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/index_report.html renamed to src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/report/index_report.html
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/list_report.html renamed to src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/report/list_report.html
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/schedulePlanReportManage.js renamed to src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/report/module.js
| 1 | -// 调度值勤日报管理 service controller 等写在一起 | |
| 2 | -// TODO:使用的global服务需要修正 | |
| 3 | -angular.module('ScheduleApp').factory('SchedulePlanReportManageService', [ | |
| 4 | - 'SchedulePlanInfoManageService_g', 'SchedulePlanManageService_g', '$q', | |
| 5 | - function(service, service2, $q) { | |
| 6 | - /** 当前的查询条件信息 */ | |
| 7 | - var currentSearchCondition = {}; | |
| 8 | - | |
| 9 | - return { | |
| 10 | - /** | |
| 11 | - * 获取查询条件信息, | |
| 12 | - * 用于给controller用来和页面数据绑定。 | |
| 13 | - */ | |
| 14 | - getSearchCondition: function() { | |
| 15 | - return currentSearchCondition; | |
| 16 | - }, | |
| 17 | - /** | |
| 18 | - * 重置查询条件信息。 | |
| 19 | - */ | |
| 20 | - resetSearchCondition: function() { | |
| 21 | - var key; | |
| 22 | - for (key in currentSearchCondition) { | |
| 23 | - currentSearchCondition[key] = undefined; | |
| 24 | - } | |
| 25 | - }, | |
| 26 | - /** | |
| 27 | - * 组装查询参数,返回一个promise查询结果。 | |
| 28 | - * @param params 查询参数 | |
| 29 | - * @return 返回一个 promise | |
| 30 | - */ | |
| 31 | - getPage: function() { | |
| 32 | - var params = currentSearchCondition; // 查询条件 | |
| 33 | - | |
| 34 | - // promise | |
| 35 | - var deferred = $q.defer(); | |
| 36 | - | |
| 37 | - // 如果线路id和日期都没有,从后台获取一组参数,如果还没有,就设定死一组参数 | |
| 38 | - if (!params.xlid && !params.sdate) { | |
| 39 | - service2.tommorw.list().$promise.then( | |
| 40 | - function(result) { | |
| 41 | - if (result) { | |
| 42 | - // 线路id | |
| 43 | - params.xlid = result.xl.id; | |
| 44 | - // 时间 | |
| 45 | - var dd = new Date(); | |
| 46 | - dd.setHours(0); | |
| 47 | - dd.setMinutes(0); | |
| 48 | - dd.setSeconds(0); | |
| 49 | - dd.setMilliseconds(0); | |
| 50 | - dd.setTime(dd.getTime() + 24 * 3600 * 1000); | |
| 51 | - params.sdate = dd; | |
| 52 | - } else { | |
| 53 | - // 如果没有选中线路、日期,默认选中一个 | |
| 54 | - params.xlid = 2; | |
| 55 | - params.sdate = new Date(); | |
| 56 | - params.sdate.setTime(1472140800000); | |
| 57 | - } | |
| 58 | - | |
| 59 | - // 调用方法 | |
| 60 | - service.groupinfo.list(params).$promise.then( | |
| 61 | - function(result_internal) { | |
| 62 | - deferred.resolve(result_internal); | |
| 63 | - }, | |
| 64 | - function(result_internal_error) { | |
| 65 | - deferred.reject(result_internal_error); | |
| 66 | - } | |
| 67 | - ); | |
| 68 | - | |
| 69 | - }, | |
| 70 | - function(result_error) { | |
| 71 | - // 如果没有选中线路、日期,默认选中一个 | |
| 72 | - params.xlid = 2; | |
| 73 | - params.sdate = new Date(); | |
| 74 | - params.sdate.setTime(1472140800000); | |
| 75 | - | |
| 76 | - // 调用方法 | |
| 77 | - service.groupinfo.list(params).$promise.then( | |
| 78 | - function(result_internal) { | |
| 79 | - deferred.resolve(result_internal); | |
| 80 | - }, | |
| 81 | - function(result_internal_error) { | |
| 82 | - deferred.reject(result_internal_error); | |
| 83 | - } | |
| 84 | - ); | |
| 85 | - } | |
| 86 | - ); | |
| 87 | - } else { | |
| 88 | - // 调用方法 | |
| 89 | - service.groupinfo.list(params).$promise.then( | |
| 90 | - function(result_internal) { | |
| 91 | - deferred.resolve(result_internal); | |
| 92 | - }, | |
| 93 | - function(result_internal_error) { | |
| 94 | - deferred.reject(result_internal_error); | |
| 95 | - } | |
| 96 | - ); | |
| 97 | - } | |
| 98 | - | |
| 99 | - return deferred.promise; | |
| 100 | - | |
| 101 | - }, | |
| 102 | - /** | |
| 103 | - * 获取明细信息。 | |
| 104 | - * @param id 车辆id | |
| 105 | - * @return 返回一个 promise | |
| 106 | - */ | |
| 107 | - getDetail: function(id) { | |
| 108 | - var params = {id: id}; | |
| 109 | - return service.get(params).$promise; | |
| 110 | - }, | |
| 111 | - /** | |
| 112 | - * 保存信息。 | |
| 113 | - * @param obj 车辆详细信息 | |
| 114 | - * @return 返回一个 promise | |
| 115 | - */ | |
| 116 | - saveDetail: function(obj) { | |
| 117 | - return service.save(obj).$promise; | |
| 118 | - }, | |
| 119 | - /** | |
| 120 | - * 更新分组信息。 | |
| 121 | - * @param obj | |
| 122 | - * @returns {*|Function|promise|n} | |
| 123 | - */ | |
| 124 | - updateDetail: function(obj) { | |
| 125 | - return service.updateGroupInfo.update(obj).$promise; | |
| 126 | - } | |
| 127 | - }; | |
| 128 | - | |
| 129 | - }]); | |
| 130 | - | |
| 131 | -angular.module('ScheduleApp').controller('SchedulePlanReportManageCtrl', [ | |
| 132 | - 'SchedulePlanReportManageService', '$state', | |
| 133 | - function(schedulePlanReportManageService, $state) { | |
| 134 | - var self = this; | |
| 135 | - | |
| 136 | - // 切换到form状态 | |
| 137 | - self.goForm = function() { | |
| 138 | - alert("切换"); | |
| 139 | - } | |
| 140 | - } | |
| 141 | -]); | |
| 142 | - | |
| 143 | -angular.module('ScheduleApp').controller('SchedulePlanReportManageListCtrl', [ | |
| 144 | - 'SchedulePlanReportManageService', '$scope', '$state', | |
| 145 | - function(schedulePlanReportManageService, $scope, $state) { | |
| 146 | - | |
| 147 | - var self = this; | |
| 148 | - self.pageInfo = { | |
| 149 | - infos: [] | |
| 150 | - }; | |
| 151 | - | |
| 152 | - // 日期 日期控件开关 | |
| 153 | - self.scheduleDateOpen = false; | |
| 154 | - self.scheduleDate_open = function() { | |
| 155 | - self.scheduleDateOpen = true; | |
| 156 | - }; | |
| 157 | - | |
| 158 | - // 翻页的时候调用 | |
| 159 | - self.pageChanaged = function() { | |
| 160 | - schedulePlanReportManageService.getPage().then( | |
| 161 | - function(result) { | |
| 162 | - self.pageInfo.infos = result; | |
| 163 | - }, | |
| 164 | - function(result) { | |
| 165 | - alert("出错啦!"); | |
| 166 | - } | |
| 167 | - ); | |
| 168 | - }; | |
| 169 | - // 获取查询条件数据 | |
| 170 | - self.searchCondition = function() { | |
| 171 | - return schedulePlanReportManageService.getSearchCondition(); | |
| 172 | - }; | |
| 173 | - // 重置查询条件 | |
| 174 | - self.resetSearchCondition = function() { | |
| 175 | - return schedulePlanReportManageService.resetSearchCondition(); | |
| 176 | - }; | |
| 177 | - | |
| 178 | - // 监控条件变化,触发查询 | |
| 179 | - $scope.$watch( | |
| 180 | - function() { | |
| 181 | - return schedulePlanReportManageService.getSearchCondition(); | |
| 182 | - }, | |
| 183 | - function(newValue, oldValue) { | |
| 184 | - if (newValue) { | |
| 185 | - if (newValue.xlid && newValue.sdate) { | |
| 186 | - self.pageChanaged(); | |
| 187 | - } | |
| 188 | - } | |
| 189 | - }, | |
| 190 | - true | |
| 191 | - ); | |
| 192 | - | |
| 193 | - /** | |
| 194 | - * ui-route中param不定义在template-url后,定义在params参数对象中 | |
| 195 | - * 参数说明,type=更新方式,groupInfo=分组排班信息 | |
| 196 | - * @param type 1=替换车辆,2=修改出场班次1,3=替换分组人员(驾驶员1和售票员1) | |
| 197 | - // 有分班的话,4=修改出场班次2,5=修改分组人员(驾驶员2和售票员2) | |
| 198 | - * @param groupInfo 列表单条数据,表示每条线路,每天,每个路牌谁跑的 | |
| 199 | - */ | |
| 200 | - self.goEditForm = function(type, groupInfo) { | |
| 201 | - $state.go("schedulePlanReportManage_edit", { | |
| 202 | - type: type, | |
| 203 | - groupInfo: groupInfo | |
| 204 | - }); | |
| 205 | - }; | |
| 206 | - | |
| 207 | - | |
| 208 | - // 初始创建的时候,获取一次列表数据 | |
| 209 | - self.pageChanaged(); | |
| 210 | - | |
| 211 | - } | |
| 212 | -]); | |
| 213 | - | |
| 214 | -angular.module('ScheduleApp').controller('SchedulePlanReportManageFormCtrl', [ | |
| 215 | - 'SchedulePlanReportManageService', | |
| 216 | - '$stateParams', | |
| 217 | - '$state', | |
| 218 | - '$scope', | |
| 219 | - function(schedulePlanReportManageService, $stateParams, $state, $scope) { | |
| 220 | - var self = this; | |
| 221 | - | |
| 222 | - // 传过来的值 | |
| 223 | - var type_src = $stateParams.type; | |
| 224 | - var groupInfo_src = $stateParams.groupInfo; | |
| 225 | - | |
| 226 | - // 时间正则表达式(格式hh:mm,如:06:39) | |
| 227 | - self.time_regex = /^(([0-1]\d)|(2[0-4])):[0-5]\d$/; | |
| 228 | - | |
| 229 | - // 欲修改的groupInfo值 | |
| 230 | - self.groupInfo_src = groupInfo_src; | |
| 231 | - self.groupInfo = {}; | |
| 232 | - self.type = type_src; | |
| 233 | - angular.copy(groupInfo_src, self.groupInfo); | |
| 234 | - | |
| 235 | - // 提交方法 | |
| 236 | - self.submit = function() { | |
| 237 | - var param = { | |
| 238 | - type: self.type, | |
| 239 | - src: self.groupInfo_src, | |
| 240 | - update: self.groupInfo | |
| 241 | - }; | |
| 242 | - | |
| 243 | - //console.log($scope); | |
| 244 | - //console.log(param); | |
| 245 | - schedulePlanReportManageService.updateDetail(param).then( | |
| 246 | - function(result) { | |
| 247 | - $state.go("schedulePlanReportManage"); | |
| 248 | - }, | |
| 249 | - function(result) { | |
| 250 | - alert("出错啦!"); | |
| 251 | - } | |
| 252 | - ); | |
| 253 | - } | |
| 254 | - | |
| 255 | - } | |
| 256 | -]); | |
| 257 | - | |
| 258 | -angular.module('ScheduleApp').controller('SchedulePlanReportManageDetailCtrl', ['SchedulePlanReportManageService', '$stateParams', function(schedulePlanReportManageService, $stateParams) { | |
| 259 | - // TODO: | |
| 260 | -}]); | |
| 261 | - | |
| 262 | - | |
| 1 | +// 调度值勤日报管理 service controller 等写在一起 | |
| 2 | +// TODO:使用的global服务需要修正 | |
| 3 | +angular.module('ScheduleApp').factory('SchedulePlanReportManageService', [ | |
| 4 | + 'SchedulePlanInfoManageService_g', 'SchedulePlanManageService_g', '$q', | |
| 5 | + function(service, service2, $q) { | |
| 6 | + /** 当前的查询条件信息 */ | |
| 7 | + var currentSearchCondition = {}; | |
| 8 | + | |
| 9 | + return { | |
| 10 | + /** | |
| 11 | + * 获取查询条件信息, | |
| 12 | + * 用于给controller用来和页面数据绑定。 | |
| 13 | + */ | |
| 14 | + getSearchCondition: function() { | |
| 15 | + return currentSearchCondition; | |
| 16 | + }, | |
| 17 | + /** | |
| 18 | + * 重置查询条件信息。 | |
| 19 | + */ | |
| 20 | + resetSearchCondition: function() { | |
| 21 | + var key; | |
| 22 | + for (key in currentSearchCondition) { | |
| 23 | + currentSearchCondition[key] = undefined; | |
| 24 | + } | |
| 25 | + }, | |
| 26 | + /** | |
| 27 | + * 组装查询参数,返回一个promise查询结果。 | |
| 28 | + * @param params 查询参数 | |
| 29 | + * @return 返回一个 promise | |
| 30 | + */ | |
| 31 | + getPage: function() { | |
| 32 | + var params = currentSearchCondition; // 查询条件 | |
| 33 | + | |
| 34 | + // promise | |
| 35 | + var deferred = $q.defer(); | |
| 36 | + | |
| 37 | + // 如果线路id和日期都没有,从后台获取一组参数,如果还没有,就设定死一组参数 | |
| 38 | + if (!params.xlid && !params.sdate) { | |
| 39 | + service2.tommorw.list().$promise.then( | |
| 40 | + function(result) { | |
| 41 | + if (result) { | |
| 42 | + // 线路id | |
| 43 | + params.xlid = result.xl.id; | |
| 44 | + // 时间 | |
| 45 | + var dd = new Date(); | |
| 46 | + dd.setHours(0); | |
| 47 | + dd.setMinutes(0); | |
| 48 | + dd.setSeconds(0); | |
| 49 | + dd.setMilliseconds(0); | |
| 50 | + dd.setTime(dd.getTime() + 24 * 3600 * 1000); | |
| 51 | + params.sdate = dd; | |
| 52 | + } else { | |
| 53 | + // 如果没有选中线路、日期,默认选中一个 | |
| 54 | + params.xlid = 2; | |
| 55 | + params.sdate = new Date(); | |
| 56 | + params.sdate.setTime(1472140800000); | |
| 57 | + } | |
| 58 | + | |
| 59 | + // 调用方法 | |
| 60 | + service.groupinfo.list(params).$promise.then( | |
| 61 | + function(result_internal) { | |
| 62 | + deferred.resolve(result_internal); | |
| 63 | + }, | |
| 64 | + function(result_internal_error) { | |
| 65 | + deferred.reject(result_internal_error); | |
| 66 | + } | |
| 67 | + ); | |
| 68 | + | |
| 69 | + }, | |
| 70 | + function(result_error) { | |
| 71 | + // 如果没有选中线路、日期,默认选中一个 | |
| 72 | + params.xlid = 2; | |
| 73 | + params.sdate = new Date(); | |
| 74 | + params.sdate.setTime(1472140800000); | |
| 75 | + | |
| 76 | + // 调用方法 | |
| 77 | + service.groupinfo.list(params).$promise.then( | |
| 78 | + function(result_internal) { | |
| 79 | + deferred.resolve(result_internal); | |
| 80 | + }, | |
| 81 | + function(result_internal_error) { | |
| 82 | + deferred.reject(result_internal_error); | |
| 83 | + } | |
| 84 | + ); | |
| 85 | + } | |
| 86 | + ); | |
| 87 | + } else { | |
| 88 | + // 调用方法 | |
| 89 | + service.groupinfo.list(params).$promise.then( | |
| 90 | + function(result_internal) { | |
| 91 | + deferred.resolve(result_internal); | |
| 92 | + }, | |
| 93 | + function(result_internal_error) { | |
| 94 | + deferred.reject(result_internal_error); | |
| 95 | + } | |
| 96 | + ); | |
| 97 | + } | |
| 98 | + | |
| 99 | + return deferred.promise; | |
| 100 | + | |
| 101 | + }, | |
| 102 | + /** | |
| 103 | + * 获取明细信息。 | |
| 104 | + * @param id 车辆id | |
| 105 | + * @return 返回一个 promise | |
| 106 | + */ | |
| 107 | + getDetail: function(id) { | |
| 108 | + var params = {id: id}; | |
| 109 | + return service.get(params).$promise; | |
| 110 | + }, | |
| 111 | + /** | |
| 112 | + * 保存信息。 | |
| 113 | + * @param obj 车辆详细信息 | |
| 114 | + * @return 返回一个 promise | |
| 115 | + */ | |
| 116 | + saveDetail: function(obj) { | |
| 117 | + return service.save(obj).$promise; | |
| 118 | + }, | |
| 119 | + /** | |
| 120 | + * 更新分组信息。 | |
| 121 | + * @param obj | |
| 122 | + * @returns {*|Function|promise|n} | |
| 123 | + */ | |
| 124 | + updateDetail: function(obj) { | |
| 125 | + return service.updateGroupInfo.update(obj).$promise; | |
| 126 | + } | |
| 127 | + }; | |
| 128 | + | |
| 129 | + }]); | |
| 130 | + | |
| 131 | +angular.module('ScheduleApp').controller('SchedulePlanReportManageCtrl', [ | |
| 132 | + 'SchedulePlanReportManageService', '$state', | |
| 133 | + function(schedulePlanReportManageService, $state) { | |
| 134 | + var self = this; | |
| 135 | + | |
| 136 | + // 切换到form状态 | |
| 137 | + self.goForm = function() { | |
| 138 | + alert("切换"); | |
| 139 | + } | |
| 140 | + } | |
| 141 | +]); | |
| 142 | + | |
| 143 | +angular.module('ScheduleApp').controller('SchedulePlanReportManageListCtrl', [ | |
| 144 | + 'SchedulePlanReportManageService', '$scope', '$state', | |
| 145 | + function(schedulePlanReportManageService, $scope, $state) { | |
| 146 | + | |
| 147 | + var self = this; | |
| 148 | + self.pageInfo = { | |
| 149 | + infos: [] | |
| 150 | + }; | |
| 151 | + | |
| 152 | + // 日期 日期控件开关 | |
| 153 | + self.scheduleDateOpen = false; | |
| 154 | + self.scheduleDate_open = function() { | |
| 155 | + self.scheduleDateOpen = true; | |
| 156 | + }; | |
| 157 | + | |
| 158 | + // 翻页的时候调用 | |
| 159 | + self.pageChanaged = function() { | |
| 160 | + schedulePlanReportManageService.getPage().then( | |
| 161 | + function(result) { | |
| 162 | + self.pageInfo.infos = result; | |
| 163 | + }, | |
| 164 | + function(result) { | |
| 165 | + alert("出错啦!"); | |
| 166 | + } | |
| 167 | + ); | |
| 168 | + }; | |
| 169 | + // 获取查询条件数据 | |
| 170 | + self.searchCondition = function() { | |
| 171 | + return schedulePlanReportManageService.getSearchCondition(); | |
| 172 | + }; | |
| 173 | + // 重置查询条件 | |
| 174 | + self.resetSearchCondition = function() { | |
| 175 | + return schedulePlanReportManageService.resetSearchCondition(); | |
| 176 | + }; | |
| 177 | + | |
| 178 | + // 监控条件变化,触发查询 | |
| 179 | + $scope.$watch( | |
| 180 | + function() { | |
| 181 | + return schedulePlanReportManageService.getSearchCondition(); | |
| 182 | + }, | |
| 183 | + function(newValue, oldValue) { | |
| 184 | + if (newValue) { | |
| 185 | + if (newValue.xlid && newValue.sdate) { | |
| 186 | + self.pageChanaged(); | |
| 187 | + } | |
| 188 | + } | |
| 189 | + }, | |
| 190 | + true | |
| 191 | + ); | |
| 192 | + | |
| 193 | + /** | |
| 194 | + * ui-route中param不定义在template-url后,定义在params参数对象中 | |
| 195 | + * 参数说明,type=更新方式,groupInfo=分组排班信息 | |
| 196 | + * @param type 1=替换车辆,2=修改出场班次1,3=替换分组人员(驾驶员1和售票员1) | |
| 197 | + // 有分班的话,4=修改出场班次2,5=修改分组人员(驾驶员2和售票员2) | |
| 198 | + * @param groupInfo 列表单条数据,表示每条线路,每天,每个路牌谁跑的 | |
| 199 | + */ | |
| 200 | + self.goEditForm = function(type, groupInfo) { | |
| 201 | + $state.go("schedulePlanReportManage_edit", { | |
| 202 | + type: type, | |
| 203 | + groupInfo: groupInfo | |
| 204 | + }); | |
| 205 | + }; | |
| 206 | + | |
| 207 | + | |
| 208 | + // 初始创建的时候,获取一次列表数据 | |
| 209 | + self.pageChanaged(); | |
| 210 | + | |
| 211 | + } | |
| 212 | +]); | |
| 213 | + | |
| 214 | +angular.module('ScheduleApp').controller('SchedulePlanReportManageFormCtrl', [ | |
| 215 | + 'SchedulePlanReportManageService', | |
| 216 | + '$stateParams', | |
| 217 | + '$state', | |
| 218 | + '$scope', | |
| 219 | + function(schedulePlanReportManageService, $stateParams, $state, $scope) { | |
| 220 | + var self = this; | |
| 221 | + | |
| 222 | + // 传过来的值 | |
| 223 | + var type_src = $stateParams.type; | |
| 224 | + var groupInfo_src = $stateParams.groupInfo; | |
| 225 | + | |
| 226 | + // 时间正则表达式(格式hh:mm,如:06:39) | |
| 227 | + self.time_regex = /^(([0-1]\d)|(2[0-4])):[0-5]\d$/; | |
| 228 | + | |
| 229 | + // 欲修改的groupInfo值 | |
| 230 | + self.groupInfo_src = groupInfo_src; | |
| 231 | + self.groupInfo = {}; | |
| 232 | + self.type = type_src; | |
| 233 | + angular.copy(groupInfo_src, self.groupInfo); | |
| 234 | + | |
| 235 | + // 提交方法 | |
| 236 | + self.submit = function() { | |
| 237 | + var param = { | |
| 238 | + type: self.type, | |
| 239 | + src: self.groupInfo_src, | |
| 240 | + update: self.groupInfo | |
| 241 | + }; | |
| 242 | + | |
| 243 | + //console.log($scope); | |
| 244 | + //console.log(param); | |
| 245 | + schedulePlanReportManageService.updateDetail(param).then( | |
| 246 | + function(result) { | |
| 247 | + $state.go("schedulePlanReportManage"); | |
| 248 | + }, | |
| 249 | + function(result) { | |
| 250 | + alert("出错啦!"); | |
| 251 | + } | |
| 252 | + ); | |
| 253 | + } | |
| 254 | + | |
| 255 | + } | |
| 256 | +]); | |
| 257 | + | |
| 258 | +angular.module('ScheduleApp').controller('SchedulePlanReportManageDetailCtrl', ['SchedulePlanReportManageService', '$stateParams', function(schedulePlanReportManageService, $stateParams) { | |
| 259 | + // TODO: | |
| 260 | +}]); | |
| 261 | + | |
| 262 | + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/report/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 排班调度值勤日报配置route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + .state("schedulePlanReportManage", { | |
| 13 | + url: '/schedulePlanReportManage', | |
| 14 | + views: { | |
| 15 | + "": { | |
| 16 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/report/index_report.html' | |
| 17 | + }, | |
| 18 | + "schedulePlanReportManage_list@schedulePlanReportManage": { | |
| 19 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/report/list_report.html' | |
| 20 | + } | |
| 21 | + }, | |
| 22 | + | |
| 23 | + resolve: { | |
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 25 | + return $ocLazyLoad.load({ | |
| 26 | + name: 'schedulePlanManage_module', | |
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 28 | + files: [ | |
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 31 | + "pages/scheduleApp/module/core/schedulePlanManage/report/module.js" | |
| 32 | + ] | |
| 33 | + }); | |
| 34 | + }] | |
| 35 | + } | |
| 36 | + }) | |
| 37 | + .state("schedulePlanReportManage_edit", { | |
| 38 | + url: '/schedulePlanReportManage_edit', | |
| 39 | + params: {type: 0, groupInfo: null}, | |
| 40 | + views: { | |
| 41 | + "": { | |
| 42 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/report/edit_report.html' | |
| 43 | + } | |
| 44 | + }, | |
| 45 | + | |
| 46 | + resolve: { | |
| 47 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 48 | + return $ocLazyLoad.load({ | |
| 49 | + name: 'schedulePlanReportManage_edit_module', | |
| 50 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 51 | + files: [ | |
| 52 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 53 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 54 | + "pages/scheduleApp/module/core/schedulePlanManage/report/module.js" | |
| 55 | + ] | |
| 56 | + }); | |
| 57 | + }] | |
| 58 | + } | |
| 59 | + }); | |
| 60 | + | |
| 61 | + } | |
| 62 | +]); | |
| 0 | 63 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 排班计划管理配置route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + .state("schedulePlanManage", { // index页面 | |
| 13 | + url: '/schedulePlanManage', | |
| 14 | + views: { | |
| 15 | + "": { | |
| 16 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index.html' | |
| 17 | + }, | |
| 18 | + "schedulePlanManage_list@schedulePlanManage": { | |
| 19 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list.html' | |
| 20 | + } | |
| 21 | + }, | |
| 22 | + | |
| 23 | + resolve: { | |
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 25 | + return $ocLazyLoad.load({ | |
| 26 | + name: 'schedulePlanManage_module', | |
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 28 | + files: [ | |
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 31 | + "pages/scheduleApp/module/core/schedulePlanManage/module.js" | |
| 32 | + ] | |
| 33 | + }); | |
| 34 | + }] | |
| 35 | + } | |
| 36 | + }) | |
| 37 | + .state("schedulePlanManage_form", { // 添加排班计划form | |
| 38 | + url: '/schedulePlanManage_form', | |
| 39 | + views: { | |
| 40 | + "": { | |
| 41 | + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/form.html' | |
| 42 | + } | |
| 43 | + }, | |
| 44 | + | |
| 45 | + resolve: { | |
| 46 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 47 | + return $ocLazyLoad.load({ | |
| 48 | + name: 'schedulePlanManage_form_module', | |
| 49 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 50 | + files: [ | |
| 51 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 52 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 53 | + "pages/scheduleApp/module/core/schedulePlanManage/module.js" | |
| 54 | + ] | |
| 55 | + }); | |
| 56 | + }] | |
| 57 | + } | |
| 58 | + }) | |
| 59 | + | |
| 60 | + | |
| 61 | + } | |
| 62 | +]); | |
| 0 | 63 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/dist/scheduleRuleManage.dist.html deleted
100644 → 0
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js renamed to src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/module.js
| 1 | -// 规则配置管理 service controller 等写在一起 | |
| 2 | -angular.module('ScheduleApp').factory('ScheduleRuleManageService', ['ScheduleRuleManageService_g', function(service) { | |
| 3 | - /** 当前的查询条件信息 */ | |
| 4 | - var currentSearchCondition = {}; | |
| 5 | - | |
| 6 | - /** 当前第几页 */ | |
| 7 | - var currentPageNo = 1; | |
| 8 | - | |
| 9 | - return { | |
| 10 | - /** | |
| 11 | - * 获取查询条件信息, | |
| 12 | - * 用于给controller用来和页面数据绑定。 | |
| 13 | - */ | |
| 14 | - getSearchCondition: function() { | |
| 15 | - return currentSearchCondition; | |
| 16 | - }, | |
| 17 | - /** | |
| 18 | - * 重置查询条件信息。 | |
| 19 | - */ | |
| 20 | - resetSearchCondition: function() { | |
| 21 | - var key; | |
| 22 | - for (key in currentSearchCondition) { | |
| 23 | - currentSearchCondition[key] = undefined; | |
| 24 | - } | |
| 25 | - }, | |
| 26 | - /** | |
| 27 | - * 设置当前页码。 | |
| 28 | - * @param cpn 从1开始,后台是从0开始的 | |
| 29 | - */ | |
| 30 | - setCurrentPageNo: function(cpn) { | |
| 31 | - currentPageNo = cpn; | |
| 32 | - }, | |
| 33 | - /** | |
| 34 | - * 组装查询参数,返回一个promise查询结果。 | |
| 35 | - * @param params 查询参数 | |
| 36 | - * @return 返回一个 promise | |
| 37 | - */ | |
| 38 | - getPage: function() { | |
| 39 | - var params = currentSearchCondition; // 查询条件 | |
| 40 | - params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 41 | - return service.rest.list(params).$promise; | |
| 42 | - }, | |
| 43 | - /** | |
| 44 | - * 获取明细信息。 | |
| 45 | - * @param id 车辆id | |
| 46 | - * @return 返回一个 promise | |
| 47 | - */ | |
| 48 | - getDetail: function(id) { | |
| 49 | - var params = {id: id}; | |
| 50 | - return service.rest.get(params).$promise; | |
| 51 | - }, | |
| 52 | - /** | |
| 53 | - * 保存信息。 | |
| 54 | - * @param obj 车辆详细信息 | |
| 55 | - * @return 返回一个 promise | |
| 56 | - */ | |
| 57 | - saveDetail: function(obj) { | |
| 58 | - return service.rest.save(obj).$promise; | |
| 59 | - }, | |
| 60 | - /** | |
| 61 | - * 删除信息。 | |
| 62 | - * @param id 主键id | |
| 63 | - * @returns {*|Function|promise|n} | |
| 64 | - */ | |
| 65 | - deleteDetail: function(id) { | |
| 66 | - return service.rest.delete({id: id}).$promise; | |
| 67 | - } | |
| 68 | - }; | |
| 69 | - | |
| 70 | -}]); | |
| 71 | - | |
| 72 | -angular.module('ScheduleApp').controller('ScheduleRuleManageCtrl', ['ScheduleRuleManageService', '$state', function(busConfigService, $state) { | |
| 73 | - var self = this; | |
| 74 | - | |
| 75 | - // 切换到form状态 | |
| 76 | - self.goForm = function() { | |
| 77 | - //alert("切换"); | |
| 78 | - $state.go("scheduleRuleManage_form"); | |
| 79 | - }; | |
| 80 | - | |
| 81 | -}]); | |
| 82 | - | |
| 83 | -angular.module('ScheduleApp').controller('ScheduleRuleManageListCtrl', ['ScheduleRuleManageService', function(scheduleRuleManageService) { | |
| 84 | - var self = this; | |
| 85 | - self.pageInfo = { | |
| 86 | - totalItems : 0, | |
| 87 | - currentPage : 1, | |
| 88 | - infos: [] | |
| 89 | - }; | |
| 90 | - | |
| 91 | - // 初始创建的时候,获取一次列表数据 | |
| 92 | - scheduleRuleManageService.getPage().then( | |
| 93 | - function(result) { | |
| 94 | - self.pageInfo.totalItems = result.totalElements; | |
| 95 | - self.pageInfo.currentPage = result.number + 1; | |
| 96 | - self.pageInfo.infos = result.content; | |
| 97 | - scheduleRuleManageService.setCurrentPageNo(result.number + 1); | |
| 98 | - }, | |
| 99 | - function(result) { | |
| 100 | - alert("出错啦!"); | |
| 101 | - } | |
| 102 | - ); | |
| 103 | - | |
| 104 | - //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 105 | - // alert("dfdfdf"); | |
| 106 | - //}); | |
| 107 | - | |
| 108 | - // 翻页的时候调用 | |
| 109 | - self.pageChanaged = function() { | |
| 110 | - scheduleRuleManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 111 | - scheduleRuleManageService.getPage().then( | |
| 112 | - function(result) { | |
| 113 | - self.pageInfo.totalItems = result.totalElements; | |
| 114 | - self.pageInfo.currentPage = result.number + 1; | |
| 115 | - self.pageInfo.infos = result.content; | |
| 116 | - scheduleRuleManageService.setCurrentPageNo(result.number + 1); | |
| 117 | - }, | |
| 118 | - function(result) { | |
| 119 | - alert("出错啦!"); | |
| 120 | - } | |
| 121 | - ); | |
| 122 | - }; | |
| 123 | - // 获取查询条件数据 | |
| 124 | - self.searchCondition = function() { | |
| 125 | - return scheduleRuleManageService.getSearchCondition(); | |
| 126 | - }; | |
| 127 | - // 重置查询条件 | |
| 128 | - self.resetSearchCondition = function() { | |
| 129 | - scheduleRuleManageService.resetSearchCondition(); | |
| 130 | - self.pageInfo.currentPage = 1; | |
| 131 | - self.pageChanaged(); | |
| 132 | - }; | |
| 133 | - | |
| 134 | - // 删除规则 | |
| 135 | - self.deleteRule = function(id) { | |
| 136 | - scheduleRuleManageService.deleteDetail(id).then( | |
| 137 | - function(result) { | |
| 138 | - alert("删除成功!"); | |
| 139 | - | |
| 140 | - scheduleRuleManageService.getPage().then( | |
| 141 | - function(result) { | |
| 142 | - self.pageInfo.totalItems = result.totalElements; | |
| 143 | - self.pageInfo.currentPage = result.number + 1; | |
| 144 | - self.pageInfo.infos = result.content; | |
| 145 | - scheduleRuleManageService.setCurrentPageNo(result.number + 1); | |
| 146 | - }, | |
| 147 | - function(result) { | |
| 148 | - alert("出错啦!"); | |
| 149 | - } | |
| 150 | - ); | |
| 151 | - }, | |
| 152 | - function(result) { | |
| 153 | - alert("出错啦!"); | |
| 154 | - } | |
| 155 | - ); | |
| 156 | - } | |
| 157 | - | |
| 158 | -}]); | |
| 159 | - | |
| 160 | -angular.module('ScheduleApp').controller('ScheduleRuleManageFormCtrl', ['ScheduleRuleManageService', '$stateParams', '$state', '$scope', function(scheduleRuleManageService, $stateParams, $state, $scope) { | |
| 161 | - var self = this; | |
| 162 | - | |
| 163 | - // 启用日期 日期控件开关 | |
| 164 | - self.qyrqOpen = false; | |
| 165 | - self.qyrq_open = function() { | |
| 166 | - self.qyrqOpen = true; | |
| 167 | - }; | |
| 168 | - | |
| 169 | - // 欲保存的busInfo信息,绑定 | |
| 170 | - self.scheduleRuleManageForSave = {xl: {}, carConfigInfo: {}}; | |
| 171 | - | |
| 172 | - // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 173 | - var id = $stateParams.id; | |
| 174 | - if (id) { | |
| 175 | - self.scheduleRuleManageForSave.id = id; | |
| 176 | - scheduleRuleManageService.getDetail(id).then( | |
| 177 | - function(result) { | |
| 178 | - var key; | |
| 179 | - for (key in result) { | |
| 180 | - self.scheduleRuleManageForSave[key] = result[key]; | |
| 181 | - } | |
| 182 | - }, | |
| 183 | - function(result) { | |
| 184 | - alert("出错啦!"); | |
| 185 | - } | |
| 186 | - ); | |
| 187 | - } | |
| 188 | - | |
| 189 | - // 提交方法 | |
| 190 | - self.submit = function() { | |
| 191 | - console.log(self.scheduleRuleManageForSave); | |
| 192 | - | |
| 193 | - scheduleRuleManageService.saveDetail(self.scheduleRuleManageForSave).then( | |
| 194 | - function(result) { | |
| 195 | - // TODO:弹出框方式以后改 | |
| 196 | - if (result.status == 'SUCCESS') { | |
| 197 | - alert("保存成功!"); | |
| 198 | - $state.go("scheduleRuleManage"); | |
| 199 | - } else { | |
| 200 | - alert("保存异常!"); | |
| 201 | - } | |
| 202 | - }, | |
| 203 | - function(result) { | |
| 204 | - // TODO:弹出框方式以后改 | |
| 205 | - alert("出错啦!"); | |
| 206 | - } | |
| 207 | - ); | |
| 208 | - }; | |
| 209 | -}]); | |
| 210 | - | |
| 211 | -angular.module('ScheduleApp').controller('ScheduleRuleManageDetailCtrl', ['ScheduleRuleManageService', '$stateParams', function(scheduleRuleManageService, $stateParams) { | |
| 212 | - var self = this; | |
| 213 | - self.title = ""; | |
| 214 | - self.scheduleRuleManageForDetail = {}; | |
| 215 | - self.scheduleRuleManageForDetail.id = $stateParams.id; | |
| 216 | - | |
| 217 | - // 当转向到此页面时,就获取明细信息并绑定 | |
| 218 | - scheduleRuleManageService.getDetail($stateParams.id).then( | |
| 219 | - function(result) { | |
| 220 | - var key; | |
| 221 | - for (key in result) { | |
| 222 | - self.scheduleRuleManageForDetail[key] = result[key]; | |
| 223 | - } | |
| 224 | - | |
| 225 | - self.title = "规则配置详细信息"; | |
| 226 | - }, | |
| 227 | - function(result) { | |
| 228 | - // TODO:弹出框方式以后改 | |
| 229 | - alert("出错啦!"); | |
| 230 | - } | |
| 231 | - ); | |
| 232 | -}]); | |
| 233 | - | |
| 234 | - | |
| 235 | - | |
| 1 | +// 规则配置管理 service controller 等写在一起 | |
| 2 | +angular.module('ScheduleApp').factory('ScheduleRuleManageService', ['ScheduleRuleManageService_g', function(service) { | |
| 3 | + /** 当前的查询条件信息 */ | |
| 4 | + var currentSearchCondition = {}; | |
| 5 | + | |
| 6 | + /** 当前第几页 */ | |
| 7 | + var currentPageNo = 1; | |
| 8 | + | |
| 9 | + return { | |
| 10 | + /** | |
| 11 | + * 获取查询条件信息, | |
| 12 | + * 用于给controller用来和页面数据绑定。 | |
| 13 | + */ | |
| 14 | + getSearchCondition: function() { | |
| 15 | + return currentSearchCondition; | |
| 16 | + }, | |
| 17 | + /** | |
| 18 | + * 重置查询条件信息。 | |
| 19 | + */ | |
| 20 | + resetSearchCondition: function() { | |
| 21 | + var key; | |
| 22 | + for (key in currentSearchCondition) { | |
| 23 | + currentSearchCondition[key] = undefined; | |
| 24 | + } | |
| 25 | + }, | |
| 26 | + /** | |
| 27 | + * 设置当前页码。 | |
| 28 | + * @param cpn 从1开始,后台是从0开始的 | |
| 29 | + */ | |
| 30 | + setCurrentPageNo: function(cpn) { | |
| 31 | + currentPageNo = cpn; | |
| 32 | + }, | |
| 33 | + /** | |
| 34 | + * 组装查询参数,返回一个promise查询结果。 | |
| 35 | + * @param params 查询参数 | |
| 36 | + * @return 返回一个 promise | |
| 37 | + */ | |
| 38 | + getPage: function() { | |
| 39 | + var params = currentSearchCondition; // 查询条件 | |
| 40 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 41 | + return service.rest.list(params).$promise; | |
| 42 | + }, | |
| 43 | + /** | |
| 44 | + * 获取明细信息。 | |
| 45 | + * @param id 车辆id | |
| 46 | + * @return 返回一个 promise | |
| 47 | + */ | |
| 48 | + getDetail: function(id) { | |
| 49 | + var params = {id: id}; | |
| 50 | + return service.rest.get(params).$promise; | |
| 51 | + }, | |
| 52 | + /** | |
| 53 | + * 保存信息。 | |
| 54 | + * @param obj 车辆详细信息 | |
| 55 | + * @return 返回一个 promise | |
| 56 | + */ | |
| 57 | + saveDetail: function(obj) { | |
| 58 | + return service.rest.save(obj).$promise; | |
| 59 | + }, | |
| 60 | + /** | |
| 61 | + * 删除信息。 | |
| 62 | + * @param id 主键id | |
| 63 | + * @returns {*|Function|promise|n} | |
| 64 | + */ | |
| 65 | + deleteDetail: function(id) { | |
| 66 | + return service.rest.delete({id: id}).$promise; | |
| 67 | + } | |
| 68 | + }; | |
| 69 | + | |
| 70 | +}]); | |
| 71 | + | |
| 72 | +angular.module('ScheduleApp').controller('ScheduleRuleManageCtrl', ['ScheduleRuleManageService', '$state', function(busConfigService, $state) { | |
| 73 | + var self = this; | |
| 74 | + | |
| 75 | + // 切换到form状态 | |
| 76 | + self.goForm = function() { | |
| 77 | + //alert("切换"); | |
| 78 | + $state.go("scheduleRuleManage_form"); | |
| 79 | + }; | |
| 80 | + | |
| 81 | +}]); | |
| 82 | + | |
| 83 | +angular.module('ScheduleApp').controller('ScheduleRuleManageListCtrl', ['ScheduleRuleManageService', function(scheduleRuleManageService) { | |
| 84 | + var self = this; | |
| 85 | + self.pageInfo = { | |
| 86 | + totalItems : 0, | |
| 87 | + currentPage : 1, | |
| 88 | + infos: [] | |
| 89 | + }; | |
| 90 | + | |
| 91 | + // 初始创建的时候,获取一次列表数据 | |
| 92 | + scheduleRuleManageService.getPage().then( | |
| 93 | + function(result) { | |
| 94 | + self.pageInfo.totalItems = result.totalElements; | |
| 95 | + self.pageInfo.currentPage = result.number + 1; | |
| 96 | + self.pageInfo.infos = result.content; | |
| 97 | + scheduleRuleManageService.setCurrentPageNo(result.number + 1); | |
| 98 | + }, | |
| 99 | + function(result) { | |
| 100 | + alert("出错啦!"); | |
| 101 | + } | |
| 102 | + ); | |
| 103 | + | |
| 104 | + //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 105 | + // alert("dfdfdf"); | |
| 106 | + //}); | |
| 107 | + | |
| 108 | + // 翻页的时候调用 | |
| 109 | + self.pageChanaged = function() { | |
| 110 | + scheduleRuleManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 111 | + scheduleRuleManageService.getPage().then( | |
| 112 | + function(result) { | |
| 113 | + self.pageInfo.totalItems = result.totalElements; | |
| 114 | + self.pageInfo.currentPage = result.number + 1; | |
| 115 | + self.pageInfo.infos = result.content; | |
| 116 | + scheduleRuleManageService.setCurrentPageNo(result.number + 1); | |
| 117 | + }, | |
| 118 | + function(result) { | |
| 119 | + alert("出错啦!"); | |
| 120 | + } | |
| 121 | + ); | |
| 122 | + }; | |
| 123 | + // 获取查询条件数据 | |
| 124 | + self.searchCondition = function() { | |
| 125 | + return scheduleRuleManageService.getSearchCondition(); | |
| 126 | + }; | |
| 127 | + // 重置查询条件 | |
| 128 | + self.resetSearchCondition = function() { | |
| 129 | + scheduleRuleManageService.resetSearchCondition(); | |
| 130 | + self.pageInfo.currentPage = 1; | |
| 131 | + self.pageChanaged(); | |
| 132 | + }; | |
| 133 | + | |
| 134 | + // 删除规则 | |
| 135 | + self.deleteRule = function(id) { | |
| 136 | + scheduleRuleManageService.deleteDetail(id).then( | |
| 137 | + function(result) { | |
| 138 | + alert("删除成功!"); | |
| 139 | + | |
| 140 | + scheduleRuleManageService.getPage().then( | |
| 141 | + function(result) { | |
| 142 | + self.pageInfo.totalItems = result.totalElements; | |
| 143 | + self.pageInfo.currentPage = result.number + 1; | |
| 144 | + self.pageInfo.infos = result.content; | |
| 145 | + scheduleRuleManageService.setCurrentPageNo(result.number + 1); | |
| 146 | + }, | |
| 147 | + function(result) { | |
| 148 | + alert("出错啦!"); | |
| 149 | + } | |
| 150 | + ); | |
| 151 | + }, | |
| 152 | + function(result) { | |
| 153 | + alert("出错啦!"); | |
| 154 | + } | |
| 155 | + ); | |
| 156 | + } | |
| 157 | + | |
| 158 | +}]); | |
| 159 | + | |
| 160 | +angular.module('ScheduleApp').controller('ScheduleRuleManageFormCtrl', ['ScheduleRuleManageService', '$stateParams', '$state', '$scope', function(scheduleRuleManageService, $stateParams, $state, $scope) { | |
| 161 | + var self = this; | |
| 162 | + | |
| 163 | + // 启用日期 日期控件开关 | |
| 164 | + self.qyrqOpen = false; | |
| 165 | + self.qyrq_open = function() { | |
| 166 | + self.qyrqOpen = true; | |
| 167 | + }; | |
| 168 | + | |
| 169 | + // 欲保存的busInfo信息,绑定 | |
| 170 | + self.scheduleRuleManageForSave = {xl: {}, carConfigInfo: {}}; | |
| 171 | + | |
| 172 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 173 | + var id = $stateParams.id; | |
| 174 | + if (id) { | |
| 175 | + self.scheduleRuleManageForSave.id = id; | |
| 176 | + scheduleRuleManageService.getDetail(id).then( | |
| 177 | + function(result) { | |
| 178 | + var key; | |
| 179 | + for (key in result) { | |
| 180 | + self.scheduleRuleManageForSave[key] = result[key]; | |
| 181 | + } | |
| 182 | + }, | |
| 183 | + function(result) { | |
| 184 | + alert("出错啦!"); | |
| 185 | + } | |
| 186 | + ); | |
| 187 | + } | |
| 188 | + | |
| 189 | + // 提交方法 | |
| 190 | + self.submit = function() { | |
| 191 | + console.log(self.scheduleRuleManageForSave); | |
| 192 | + | |
| 193 | + scheduleRuleManageService.saveDetail(self.scheduleRuleManageForSave).then( | |
| 194 | + function(result) { | |
| 195 | + // TODO:弹出框方式以后改 | |
| 196 | + if (result.status == 'SUCCESS') { | |
| 197 | + alert("保存成功!"); | |
| 198 | + $state.go("scheduleRuleManage"); | |
| 199 | + } else { | |
| 200 | + alert("保存异常!"); | |
| 201 | + } | |
| 202 | + }, | |
| 203 | + function(result) { | |
| 204 | + // TODO:弹出框方式以后改 | |
| 205 | + alert("出错啦!"); | |
| 206 | + } | |
| 207 | + ); | |
| 208 | + }; | |
| 209 | +}]); | |
| 210 | + | |
| 211 | +angular.module('ScheduleApp').controller('ScheduleRuleManageDetailCtrl', ['ScheduleRuleManageService', '$stateParams', function(scheduleRuleManageService, $stateParams) { | |
| 212 | + var self = this; | |
| 213 | + self.title = ""; | |
| 214 | + self.scheduleRuleManageForDetail = {}; | |
| 215 | + self.scheduleRuleManageForDetail.id = $stateParams.id; | |
| 216 | + | |
| 217 | + // 当转向到此页面时,就获取明细信息并绑定 | |
| 218 | + scheduleRuleManageService.getDetail($stateParams.id).then( | |
| 219 | + function(result) { | |
| 220 | + var key; | |
| 221 | + for (key in result) { | |
| 222 | + self.scheduleRuleManageForDetail[key] = result[key]; | |
| 223 | + } | |
| 224 | + | |
| 225 | + self.title = "规则配置详细信息"; | |
| 226 | + }, | |
| 227 | + function(result) { | |
| 228 | + // TODO:弹出框方式以后改 | |
| 229 | + alert("出错啦!"); | |
| 230 | + } | |
| 231 | + ); | |
| 232 | +}]); | |
| 233 | + | |
| 234 | + | |
| 235 | + | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 排班规则模块配置route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + .state("scheduleRuleManage", { // index页面 | |
| 13 | + url: '/scheduleRuleManage', | |
| 14 | + views: { | |
| 15 | + "": { | |
| 16 | + templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/index.html' | |
| 17 | + }, | |
| 18 | + "scheduleRuleManage_list@scheduleRuleManage": { | |
| 19 | + templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/list.html' | |
| 20 | + } | |
| 21 | + }, | |
| 22 | + | |
| 23 | + resolve: { | |
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 25 | + return $ocLazyLoad.load({ | |
| 26 | + name: 'scheduleRuleManage_module', | |
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 28 | + files: [ | |
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 31 | + "pages/scheduleApp/module/core/scheduleRuleManage/module.js" | |
| 32 | + ] | |
| 33 | + }); | |
| 34 | + }] | |
| 35 | + } | |
| 36 | + }) | |
| 37 | + .state("scheduleRuleManage_form", { // 添加排班规则form | |
| 38 | + url: '/scheduleRuleManage_form', | |
| 39 | + views: { | |
| 40 | + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/form.html'} | |
| 41 | + }, | |
| 42 | + resolve: { | |
| 43 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 44 | + return $ocLazyLoad.load({ | |
| 45 | + name: 'scheduleRuleManage_form_module', | |
| 46 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 47 | + files: [ | |
| 48 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 49 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 50 | + "pages/scheduleApp/module/core/scheduleRuleManage/module.js" | |
| 51 | + ] | |
| 52 | + }); | |
| 53 | + }] | |
| 54 | + } | |
| 55 | + }) | |
| 56 | + .state("scheduleRuleManage_edit", { // 修改排班规则form | |
| 57 | + url: '/scheduleRuleManage_edit/:id', | |
| 58 | + views: { | |
| 59 | + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/edit.html'} | |
| 60 | + }, | |
| 61 | + resolve: { | |
| 62 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 63 | + return $ocLazyLoad.load({ | |
| 64 | + name: 'scheduleRuleManage_edit_module', | |
| 65 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 66 | + files: [ | |
| 67 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 68 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 69 | + "pages/scheduleApp/module/core/scheduleRuleManage/module.js" | |
| 70 | + ] | |
| 71 | + }); | |
| 72 | + }] | |
| 73 | + } | |
| 74 | + }) | |
| 75 | + .state("scheduleRuleManage_detail", { // 详细信息 | |
| 76 | + url: '/scheduleRuleManage_detail/:id', | |
| 77 | + views: { | |
| 78 | + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/detail.html'} | |
| 79 | + }, | |
| 80 | + resolve: { | |
| 81 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 82 | + return $ocLazyLoad.load({ | |
| 83 | + name: 'scheduleRuleManage_detail_module', | |
| 84 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 85 | + files: [ | |
| 86 | + "pages/scheduleApp/module/core/scheduleRuleManage/module.js" | |
| 87 | + ] | |
| 88 | + }); | |
| 89 | + }] | |
| 90 | + } | |
| 91 | + }) | |
| 92 | + } | |
| 93 | +]); | |
| 0 | 94 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/dataExport.html deleted
100644 → 0
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/dataImport.html deleted
100644 → 0
| 1 | -<div class="modal-header"> | |
| 2 | - <h3 class="modal-title">时刻表基础信息excel数据导入</h3> | |
| 3 | -</div> | |
| 4 | -<div class="modal-body"> | |
| 5 | - <div class="col-md-6"> | |
| 6 | - <div class="input-group"> | |
| 7 | - <input type="file" class="form-control" nv-file-select="" uploader="ctrl.uploader"/> | |
| 8 | - <span class="input-group-btn"> | |
| 9 | - <button type="button" ng-click="ctrl.clearInputFile()" class="btn btn-default"> | |
| 10 | - <span class="glyphicon glyphicon-trash"></span> | |
| 11 | - </button> | |
| 12 | - </span> | |
| 13 | - </div> | |
| 14 | - </div> | |
| 15 | - | |
| 16 | - <div class="table-scrollable table-scrollable-borderless"> | |
| 17 | - <table class="table table-hover table-light"> | |
| 18 | - <thead> | |
| 19 | - <tr class="uppercase"> | |
| 20 | - <th width="50%">文件名</th> | |
| 21 | - <th ng-show="ctrl.uploader.isHTML5">大小(M)</th> | |
| 22 | - <th ng-show="ctrl.uploader.isHTML5">进度</th> | |
| 23 | - <th>状态</th> | |
| 24 | - <th>操作</th> | |
| 25 | - </tr> | |
| 26 | - </thead> | |
| 27 | - <tbody> | |
| 28 | - <tr ng-repeat="item in ctrl.uploader.queue"> | |
| 29 | - <td> | |
| 30 | - <strong>{{ item.file.name }}</strong> | |
| 31 | - </td> | |
| 32 | - <td ng-show="ctrl.uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td> | |
| 33 | - <td ng-show="ctrl.uploader.isHTML5"> | |
| 34 | - <div class="progress progress-sm" style="margin-bottom: 0;"> | |
| 35 | - <div class="progress-bar progress-bar-info" role="progressbar" | |
| 36 | - ng-style="{ 'width': item.progress + '%' }"></div> | |
| 37 | - </div> | |
| 38 | - </td> | |
| 39 | - <td class="text-center"> | |
| 40 | - <span ng-show="item.isSuccess" class="text-success"> | |
| 41 | - <i class="glyphicon glyphicon-ok"></i> | |
| 42 | - </span> | |
| 43 | - <span ng-show="item.isCancel" class="text-info"> | |
| 44 | - <i class="glyphicon glyphicon-ban-circle"></i> | |
| 45 | - </span> | |
| 46 | - <span ng-show="item.isError" class="text-danger"> | |
| 47 | - <i class="glyphicon glyphicon-remove"></i> | |
| 48 | - </span> | |
| 49 | - </td> | |
| 50 | - <td nowrap> | |
| 51 | - <button type="button" class="btn btn-success btn-xs" ng-click="item.upload()" | |
| 52 | - ng-disabled="item.isReady || item.isUploading || item.isSuccess"> | |
| 53 | - <span class="glyphicon glyphicon-upload"></span> 上传 | |
| 54 | - </button> | |
| 55 | - <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" | |
| 56 | - ng-disabled="!item.isUploading"> | |
| 57 | - <span class="glyphicon glyphicon-ban-circle"></span> 取消 | |
| 58 | - </button> | |
| 59 | - <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()"> | |
| 60 | - <span class="glyphicon glyphicon-trash"></span> 删除 | |
| 61 | - </button> | |
| 62 | - </td> | |
| 63 | - </tr> | |
| 64 | - </tbody> | |
| 65 | - </table> | |
| 66 | - </div> | |
| 67 | - | |
| 68 | -</div> | |
| 69 | - | |
| 70 | -<div class="modal-footer"> | |
| 71 | - <button class="btn btn-primary" ng-click="ctrl.close()">关闭</button> | |
| 72 | -</div> | |
| 73 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/detail.html deleted
100644 → 0
| 1 | -<div class="page-head"> | |
| 2 | - <div class="page-title"> | |
| 3 | - <h1>时刻表基础信息</h1> | |
| 4 | - </div> | |
| 5 | -</div> | |
| 6 | - | |
| 7 | -<ul class="page-breadcrumb breadcrumb"> | |
| 8 | - <li> | |
| 9 | - <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | - <i class="fa fa-circle"></i> | |
| 11 | - </li> | |
| 12 | - <li> | |
| 13 | - <span class="active">运营计划管理</span> | |
| 14 | - <i class="fa fa-circle"></i> | |
| 15 | - </li> | |
| 16 | - <li> | |
| 17 | - <a ui-sref="timeTableManage">时刻表管理</a> | |
| 18 | - <i class="fa fa-circle"></i> | |
| 19 | - </li> | |
| 20 | - <li> | |
| 21 | - <span class="active">时刻表基础信息</span> | |
| 22 | - </li> | |
| 23 | -</ul> | |
| 24 | - | |
| 25 | -<div class="portlet light bordered" ng-controller="TimeTableManageDetailCtrl as ctrl"> | |
| 26 | - <div class="portlet-title"> | |
| 27 | - <div class="caption"> | |
| 28 | - <i class="icon-equalizer font-red-sunglo"></i> <span | |
| 29 | - class="caption-subject font-red-sunglo bold uppercase" | |
| 30 | - ng-bind="ctrl.title"></span> | |
| 31 | - </div> | |
| 32 | - </div> | |
| 33 | - | |
| 34 | - <div class="portlet-body form"> | |
| 35 | - <form class="form-horizontal" novalidate name="myForm"> | |
| 36 | - <!--<div class="alert alert-danger display-hide">--> | |
| 37 | - <!--<button class="close" data-close="alert"></button>--> | |
| 38 | - <!--您的输入有误,请检查下面的输入项--> | |
| 39 | - <!--</div>--> | |
| 40 | - | |
| 41 | - | |
| 42 | - <!-- 其他信息放置在这里 --> | |
| 43 | - <div class="form-body"> | |
| 44 | - <div class="form-group has-success has-feedback"> | |
| 45 | - <label class="col-md-2 control-label">线路*:</label> | |
| 46 | - <div class="col-md-4"> | |
| 47 | - <input type="text" class="form-control" | |
| 48 | - name="xl" ng-model="ctrl.timeTableManageForDetail.xl.name" readonly/> | |
| 49 | - </div> | |
| 50 | - </div> | |
| 51 | - | |
| 52 | - <div class="form-group has-success has-feedback"> | |
| 53 | - <label class="col-md-2 control-label">线路走向*:</label> | |
| 54 | - <div class="col-md-4"> | |
| 55 | - <sa-Radiogroup model="ctrl.timeTableManageForDetail.xlDir" dicgroup="LineTrend2" name="xlDir" disabled="true"></sa-Radiogroup> | |
| 56 | - </div> | |
| 57 | - </div> | |
| 58 | - | |
| 59 | - <div class="form-group has-success has-feedback"> | |
| 60 | - <label class="col-md-2 control-label">时刻表名字*:</label> | |
| 61 | - <div class="col-md-4"> | |
| 62 | - <input type="text" class="form-control" | |
| 63 | - name="name" ng-model="ctrl.timeTableManageForDetail.name" readonly/> | |
| 64 | - </div> | |
| 65 | - </div> | |
| 66 | - | |
| 67 | - <div class="form-group has-success has-feedback"> | |
| 68 | - <label class="col-md-2 control-label">启用日期*:</label> | |
| 69 | - <div class="col-md-4"> | |
| 70 | - <input type="text" class="form-control" | |
| 71 | - name="qyrq" uib-datepicker-popup="yyyy年MM月dd日" | |
| 72 | - ng-model="ctrl.timeTableManageForDetail.qyrq" readonly/> | |
| 73 | - </div> | |
| 74 | - </div> | |
| 75 | - | |
| 76 | - <div class="form-group has-success has-feedback"> | |
| 77 | - <label class="col-md-2 control-label">是否启用*:</label> | |
| 78 | - <div class="col-md-4"> | |
| 79 | - <sa-Radiogroup model="ctrl.timeTableManageForDetail.isEnableDisTemplate" dicgroup="truefalseType" name="isEnableDisTemplate" disabled="true"></sa-Radiogroup> | |
| 80 | - </div> | |
| 81 | - | |
| 82 | - </div> | |
| 83 | - | |
| 84 | - <div class="form-group"> | |
| 85 | - <label class="col-md-2 control-label">路牌数量:</label> | |
| 86 | - <div class="col-md-4"> | |
| 87 | - <input type="number" class="form-control" ng-value="ctrl.timeTableManageForDetail.lpCount" | |
| 88 | - name="lpCount" placeholder="请输入路牌数" min="1" readonly/> | |
| 89 | - </div> | |
| 90 | - </div> | |
| 91 | - | |
| 92 | - <div class="form-group"> | |
| 93 | - <label class="col-md-2 control-label">营运圈数:</label> | |
| 94 | - <div class="col-md-4"> | |
| 95 | - <input type="number" class="form-control" ng-value="ctrl.timeTableManageForDetail.loopCount" | |
| 96 | - name="loopCount" placeholder="请输入圈数" min="1" readonly/> | |
| 97 | - </div> | |
| 98 | - </div> | |
| 99 | - | |
| 100 | - <div class="form-group"> | |
| 101 | - <label class="col-md-2 control-label">停车场:</label> | |
| 102 | - <div class="col-md-4"> | |
| 103 | - <input type="text" class="form-control" ng-value="ctrl.timeTableManageForDetail.xl.carParkCode | dict:'CarPark':'未知' " | |
| 104 | - name="carParkCode" readonly/> | |
| 105 | - </div> | |
| 106 | - </div> | |
| 107 | - | |
| 108 | - <div class="form-group"> | |
| 109 | - <label class="col-md-2 control-label">常规有效日:</label> | |
| 110 | - <div class="col-md-6"> | |
| 111 | - <sa-Checkboxgroup model="ctrl.timeTableManageForForm" | |
| 112 | - name="rule_days" | |
| 113 | - dcvalue="{{ctrl.timeTableManageForDetail.rule_days}}" | |
| 114 | - disabled > | |
| 115 | - </sa-Checkboxgroup> | |
| 116 | - </div> | |
| 117 | - </div> | |
| 118 | - | |
| 119 | - <div class="form-group"> | |
| 120 | - <label class="col-md-2 control-label">特殊有效日:</label> | |
| 121 | - <div class="col-md-6"> | |
| 122 | - <sa-Dategroup model="ctrl.timeTableManageForForm" | |
| 123 | - name="special_days" | |
| 124 | - dcvalue="{{ctrl.timeTableManageForDetail.special_days}}" | |
| 125 | - disabled | |
| 126 | - > | |
| 127 | - </sa-Dategroup> | |
| 128 | - </div> | |
| 129 | - </div> | |
| 130 | - | |
| 131 | - <!--<div class="form-group">--> | |
| 132 | - <!--<label class="col-md-2 control-label">备注:</label>--> | |
| 133 | - <!--</div>--> | |
| 134 | - | |
| 135 | - <div class="form-group"> | |
| 136 | - <label class="col-md-2 control-label">创建人:</label> | |
| 137 | - <div class="col-md-4"> | |
| 138 | - <input type="text" class="form-control" ng-value="ctrl.timeTableManageForDetail.createBy.name" | |
| 139 | - name="createBy" readonly/> | |
| 140 | - </div> | |
| 141 | - </div> | |
| 142 | - | |
| 143 | - <div class="form-group"> | |
| 144 | - <label class="col-md-2 control-label">创建时间:</label> | |
| 145 | - <div class="col-md-4"> | |
| 146 | - <input type="text" class="form-control" ng-model="ctrl.timeTableManageForDetail.createDate" | |
| 147 | - name="createDate" uib-datepicker-popup="yyyy年MM月dd日 hh:mm:ss" | |
| 148 | - readonly/> | |
| 149 | - </div> | |
| 150 | - </div> | |
| 151 | - | |
| 152 | - <div class="form-group"> | |
| 153 | - <label class="col-md-2 control-label">更新人:</label> | |
| 154 | - <div class="col-md-4"> | |
| 155 | - <input type="text" class="form-control" ng-value="ctrl.timeTableManageForDetail.updateBy.name" | |
| 156 | - name="updateBy" readonly/> | |
| 157 | - </div> | |
| 158 | - </div> | |
| 159 | - | |
| 160 | - <div class="form-group"> | |
| 161 | - <label class="col-md-2 control-label">更新时间:</label> | |
| 162 | - <div class="col-md-4"> | |
| 163 | - <input type="text" class="form-control" ng-model="ctrl.timeTableManageForDetail.updateDate" | |
| 164 | - name="updateDate" uib-datepicker-popup="yyyy年MM月dd日 hh:mm:ss" | |
| 165 | - readonly/> | |
| 166 | - </div> | |
| 167 | - </div> | |
| 168 | - | |
| 169 | - <!-- 其他form-group --> | |
| 170 | - | |
| 171 | - </div> | |
| 172 | - | |
| 173 | - </form> | |
| 174 | - | |
| 175 | - </div> | |
| 176 | - | |
| 177 | - | |
| 178 | -</div> | |
| 179 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/detailDataImport.html deleted
100644 → 0
| 1 | -<div class="modal-header"> | |
| 2 | - <h3 class="modal-title"><span ng-bind="ctrl.xlmc + '(' + ctrl.ttinfoname + ')' "></span>时刻表明细信息excel数据导入</h3> | |
| 3 | -</div> | |
| 4 | -<div class="modal-body"> | |
| 5 | - <div class="col-md-6"> | |
| 6 | - <div class="input-group"> | |
| 7 | - <input type="file" class="form-control" nv-file-select="" uploader="ctrl.uploader"/> | |
| 8 | - <span class="input-group-btn"> | |
| 9 | - <button type="button" ng-click="ctrl.clearInputFile()" class="btn btn-default"> | |
| 10 | - <span class="glyphicon glyphicon-trash"></span> | |
| 11 | - </button> | |
| 12 | - </span> | |
| 13 | - </div> | |
| 14 | - </div> | |
| 15 | - | |
| 16 | - <div class="table-scrollable table-scrollable-borderless"> | |
| 17 | - <table class="table table-hover table-light"> | |
| 18 | - <thead> | |
| 19 | - <tr class="uppercase"> | |
| 20 | - <th width="50%">文件名</th> | |
| 21 | - <th ng-show="ctrl.uploader.isHTML5">大小(M)</th> | |
| 22 | - <th ng-show="ctrl.uploader.isHTML5">进度</th> | |
| 23 | - <th>状态</th> | |
| 24 | - <th>操作</th> | |
| 25 | - </tr> | |
| 26 | - </thead> | |
| 27 | - <tbody> | |
| 28 | - <tr ng-repeat="item in ctrl.uploader.queue"> | |
| 29 | - <td> | |
| 30 | - <strong>{{ item.file.name }}</strong> | |
| 31 | - </td> | |
| 32 | - <td ng-show="ctrl.uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td> | |
| 33 | - <td ng-show="ctrl.uploader.isHTML5"> | |
| 34 | - <div class="progress progress-sm" style="margin-bottom: 0;"> | |
| 35 | - <div class="progress-bar progress-bar-info" role="progressbar" | |
| 36 | - ng-style="{ 'width': item.progress + '%' }"></div> | |
| 37 | - </div> | |
| 38 | - </td> | |
| 39 | - <td class="text-center"> | |
| 40 | - <span ng-show="item.isSuccess" class="text-success"> | |
| 41 | - <i class="glyphicon glyphicon-ok"></i> | |
| 42 | - </span> | |
| 43 | - <span ng-show="item.isCancel" class="text-info"> | |
| 44 | - <i class="glyphicon glyphicon-ban-circle"></i> | |
| 45 | - </span> | |
| 46 | - <span ng-show="item.isError" class="text-danger"> | |
| 47 | - <i class="glyphicon glyphicon-remove"></i> | |
| 48 | - </span> | |
| 49 | - </td> | |
| 50 | - <td nowrap> | |
| 51 | - <button type="button" class="btn btn-success btn-xs" ng-click="item.upload()" | |
| 52 | - ng-disabled="item.isReady || item.isUploading || item.isSuccess"> | |
| 53 | - <span class="glyphicon glyphicon-upload"></span> 上传 | |
| 54 | - </button> | |
| 55 | - <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" | |
| 56 | - ng-disabled="!item.isUploading"> | |
| 57 | - <span class="glyphicon glyphicon-ban-circle"></span> 取消 | |
| 58 | - </button> | |
| 59 | - <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()"> | |
| 60 | - <span class="glyphicon glyphicon-trash"></span> 删除 | |
| 61 | - </button> | |
| 62 | - </td> | |
| 63 | - </tr> | |
| 64 | - </tbody> | |
| 65 | - </table> | |
| 66 | - </div> | |
| 67 | - | |
| 68 | -</div> | |
| 69 | - | |
| 70 | -<div class="modal-footer"> | |
| 71 | - <button class="btn btn-primary" ng-click="ctrl.close()">关闭</button> | |
| 72 | -</div> | |
| 73 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/detail_info.html deleted
100644 → 0
| 1 | -<div class="page-head"> | |
| 2 | - <div class="page-title"> | |
| 3 | - <h1>时刻表明细</h1> | |
| 4 | - </div> | |
| 5 | -</div> | |
| 6 | - | |
| 7 | -<ul class="page-breadcrumb breadcrumb"> | |
| 8 | - <li> | |
| 9 | - <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | - <i class="fa fa-circle"></i> | |
| 11 | - </li> | |
| 12 | - <li> | |
| 13 | - <span class="active">运营计划管理</span> | |
| 14 | - <i class="fa fa-circle"></i> | |
| 15 | - </li> | |
| 16 | - <li> | |
| 17 | - <a ui-sref="timeTableManage">时刻表管理</a> | |
| 18 | - <i class="fa fa-circle"></i> | |
| 19 | - </li> | |
| 20 | - <li> | |
| 21 | - <span class="active">编辑时刻表明细信息</span> | |
| 22 | - </li> | |
| 23 | -</ul> | |
| 24 | - | |
| 25 | -<!--<!– loading widget –>--> | |
| 26 | -<!--<div id="loadingWidget" class="flyover mask" loading-widget>--> | |
| 27 | - <!--<div class="alert alert-info">--> | |
| 28 | - <!--<strong>载入中......</strong>--> | |
| 29 | - <!--</div>--> | |
| 30 | -<!--</div>--> | |
| 31 | - | |
| 32 | -<div class="row" id="timeTableDetail" ng-controller="TimeTableDetailManageCtrl as ctrl"> | |
| 33 | - <div class="col-md-12"> | |
| 34 | - <div class="portlet light bordered"> | |
| 35 | - <div class="portlet-title"> | |
| 36 | - <div class="caption font-dark"> | |
| 37 | - <i class="fa fa-database font-dark"></i> | |
| 38 | - <span class="caption-subject bold uppercase" ng-bind="ctrl.title"></span> | |
| 39 | - </div> | |
| 40 | - <div class="actions"> | |
| 41 | - <i class="fa fa-arrow-up" aria-hidden="true"></i> | |
| 42 | - <span style="padding-right: 10px;">上行班次</span> | |
| 43 | - <i class="fa fa-arrow-down" aria-hidden="true"></i> | |
| 44 | - <span style="padding-right: 10px;">下行班次</span> | |
| 45 | - <i class="fa fa-circle-o-notch" aria-hidden="true"></i> | |
| 46 | - <span style="padding-right: 10px;">区间班次</span> | |
| 47 | - <i class="fa fa-adjust" aria-hidden="true"></i> | |
| 48 | - <span style="padding-right: 10px;">分班班次</span> | |
| 49 | - | |
| 50 | - <div class="btn-group"> | |
| 51 | - <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 52 | - <i class="fa fa-share"></i> | |
| 53 | - <span>数据工具</span> | |
| 54 | - <i class="fa fa-angle-down"></i> | |
| 55 | - </a> | |
| 56 | - <ul class="dropdown-menu pull-right"> | |
| 57 | - <li> | |
| 58 | - <a href="javascript:" class="tool-action"> | |
| 59 | - <i class="fa fa-file-excel-o"></i> | |
| 60 | - 导出excel | |
| 61 | - </a> | |
| 62 | - </li> | |
| 63 | - <li class="divider"></li> | |
| 64 | - <li> | |
| 65 | - <a href="javascript:" class="tool-action" ng-click="ctrl.refresh()"> | |
| 66 | - <i class="fa fa-refresh"></i> | |
| 67 | - 刷行数据 | |
| 68 | - </a> | |
| 69 | - </li> | |
| 70 | - </ul> | |
| 71 | - </div> | |
| 72 | - </div> | |
| 73 | - </div> | |
| 74 | - | |
| 75 | - <div class="portlet-body"> | |
| 76 | - <!--<div ng-view></div>--> | |
| 77 | - <div class="fixDiv"> | |
| 78 | - <table style="width: 2000px" class="table table-striped table-bordered table-hover table-checkable order-column"> | |
| 79 | - <thead> | |
| 80 | - <tr> | |
| 81 | - <th ng-repeat="head in ctrl.detailHeads track by $index"> | |
| 82 | - <span ng-bind="head"></span> | |
| 83 | - </th> | |
| 84 | - | |
| 85 | - </tr> | |
| 86 | - </thead> | |
| 87 | - <tbody> | |
| 88 | - <tr ng-repeat="info in ctrl.detailInfos"> | |
| 89 | - <td ng-repeat="cell in info track by $index"> | |
| 90 | - | |
| 91 | - <!--<span ng-bind="cell.fcsj"></span>--> | |
| 92 | - <span ng-if="!cell.ttdid" ng-bind="cell.fcsj"></span> | |
| 93 | - | |
| 94 | - <div ng-if="cell.ttdid" class="btn-group"> | |
| 95 | - <a href="javascript:" class="btn blue btn-outline btn-circle" data-toggle="dropdown"> | |
| 96 | - <!-- 上下行图标 --> | |
| 97 | - <i ng-if="cell.xldir == '0'" class="fa fa-arrow-up" aria-hidden="true"></i> | |
| 98 | - <i ng-if="cell.xldir == '1'" class="fa fa-arrow-down" aria-hidden="true"></i> | |
| 99 | - <!-- 班次类型图标(区间班次) --> | |
| 100 | - <i ng-if="cell.bc_type == 'region'" class="fa fa-circle-o-notch" aria-hidden="true"></i> | |
| 101 | - <!-- 分班班次 --> | |
| 102 | - <i ng-if="cell.isfb == true" class="fa fa-adjust" aria-hidden="true"></i> | |
| 103 | - | |
| 104 | - <span ng-bind="cell.fcsj"></span> | |
| 105 | - <i class="fa fa-angle-down"></i> | |
| 106 | - </a> | |
| 107 | - <ul class="dropdown-menu pull-left"> | |
| 108 | - <li> | |
| 109 | - <a href="javascript:" class="tool-action" ui-sref="timeTableDetailInfoManage_detail_edit({id: cell.ttdid, xlid: ctrl.xlid, ttid: ctrl.ttid, xlname: ctrl.xlname, ttname: ctrl.ttname})"> | |
| 110 | - <i class="fa fa-file-excel-o"></i> | |
| 111 | - 修改 | |
| 112 | - </a> | |
| 113 | - </li> | |
| 114 | - <li> | |
| 115 | - <a href="javascript:" class="tool-action"> | |
| 116 | - <i class="fa fa-refresh"></i> | |
| 117 | - 删除 | |
| 118 | - </a> | |
| 119 | - </li> | |
| 120 | - <li class="divider"></li> | |
| 121 | - <li> | |
| 122 | - <a href="javascript:" class="tool-action" ng-click="ctrl.changeDirect(cell, 0)"> | |
| 123 | - <i class="fa fa-file-excel-o"></i> | |
| 124 | - 设为上行 | |
| 125 | - <i class="fa fa-arrow-up" aria-hidden="true"></i> | |
| 126 | - </a> | |
| 127 | - </li> | |
| 128 | - <li> | |
| 129 | - <a href="javascript:" class="tool-action" ng-click="ctrl.changeDirect(cell, 1)"> | |
| 130 | - <i class="fa fa-file-excel-o"></i> | |
| 131 | - 设为下行 | |
| 132 | - <i class="fa fa-arrow-down" aria-hidden="true"></i> | |
| 133 | - </a> | |
| 134 | - </li> | |
| 135 | - <li> | |
| 136 | - <a href="javascript:" class="tool-action" ng-click="ctrl.changeFB(cell, true)"> | |
| 137 | - <i class="fa fa-file-excel-o"></i> | |
| 138 | - 设置分班 | |
| 139 | - <i class="fa fa-adjust" aria-hidden="true"></i> | |
| 140 | - </a> | |
| 141 | - </li> | |
| 142 | - <li> | |
| 143 | - <a href="javascript:" class="tool-action" ng-click="ctrl.changeFB(cell, false)"> | |
| 144 | - <i class="fa fa-file-excel-o"></i> | |
| 145 | - 取消分班 | |
| 146 | - <i class="fa fa-adjust" aria-hidden="true"></i> | |
| 147 | - </a> | |
| 148 | - </li> | |
| 149 | - <li> | |
| 150 | - <a href="javascript:" class="tool-action" ng-click="ctrl.changeBCType(cell, 'region')"> | |
| 151 | - <i class="fa fa-file-excel-o"></i> | |
| 152 | - 设为区间 | |
| 153 | - <i class="fa fa-circle-o-notch" aria-hidden="true"></i> | |
| 154 | - </a> | |
| 155 | - </li> | |
| 156 | - | |
| 157 | - | |
| 158 | - </ul> | |
| 159 | - </div> | |
| 160 | - | |
| 161 | - | |
| 162 | - | |
| 163 | - </td> | |
| 164 | - </tr> | |
| 165 | - | |
| 166 | - </tbody> | |
| 167 | - </table> | |
| 168 | - </div> | |
| 169 | - | |
| 170 | - | |
| 171 | - </div> | |
| 172 | - </div> | |
| 173 | - </div> | |
| 174 | -</div> |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/detail_info_edit.html deleted
100644 → 0
| 1 | -<div ng-controller="TimeTableDetailManageFormCtrl as ctrl"> | |
| 2 | - <div class="page-head"> | |
| 3 | - <div class="page-title"> | |
| 4 | - <h1>修改班次信息</h1> | |
| 5 | - </div> | |
| 6 | - </div> | |
| 7 | - | |
| 8 | - <ul class="page-breadcrumb breadcrumb"> | |
| 9 | - <li> | |
| 10 | - <a href="/pages/home.html" data-pjax>首页</a> | |
| 11 | - <i class="fa fa-circle"></i> | |
| 12 | - </li> | |
| 13 | - <li> | |
| 14 | - <span class="active">运营计划管理</span> | |
| 15 | - <i class="fa fa-circle"></i> | |
| 16 | - </li> | |
| 17 | - <li> | |
| 18 | - <a ui-sref="timeTableManage">时刻表管理</a> | |
| 19 | - <i class="fa fa-circle"></i> | |
| 20 | - </li> | |
| 21 | - <li> | |
| 22 | - <a ui-sref="timeTableDetailInfoManage({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname})"><span ng-bind="ctrl.title1"></span></a> | |
| 23 | - <i class="fa fa-circle"></i> | |
| 24 | - </li> | |
| 25 | - <li> | |
| 26 | - <span class="active">修改班次信息</span> | |
| 27 | - </li> | |
| 28 | - </ul> | |
| 29 | - | |
| 30 | - <div class="portlet light bordered"> | |
| 31 | - <div class="portlet-title"> | |
| 32 | - <div class="caption"> | |
| 33 | - <i class="icon-equalizer font-red-sunglo"></i> <span | |
| 34 | - class="caption-subject font-red-sunglo bold uppercase" ng-bind="ctrl.title2"></span> | |
| 35 | - </div> | |
| 36 | - </div> | |
| 37 | - | |
| 38 | - <div class="portlet-body form"> | |
| 39 | - <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> | |
| 40 | - <div class="form-body"> | |
| 41 | - <div class="form-group has-success has-feedback"> | |
| 42 | - <label class="col-md-3 control-label">线路*:</label> | |
| 43 | - <div class="col-md-7"> | |
| 44 | - <input type="text" class="form-control" | |
| 45 | - ng-value="ctrl.TimeTableDetailForSave.xl.name" | |
| 46 | - readonly/> | |
| 47 | - </div> | |
| 48 | - | |
| 49 | - </div> | |
| 50 | - <div class="form-group has-success has-feedback"> | |
| 51 | - <label class="col-md-3 control-label">时刻表名称*:</label> | |
| 52 | - <div class="col-md-7"> | |
| 53 | - <input type="text" class="form-control" | |
| 54 | - ng-value="ctrl.TimeTableDetailForSave.ttinfo.name" | |
| 55 | - readonly/> | |
| 56 | - </div> | |
| 57 | - </div> | |
| 58 | - <div class="form-group has-success has-feedback"> | |
| 59 | - <label class="col-md-3 control-label">路牌*:</label> | |
| 60 | - <div class="col-md-7"> | |
| 61 | - <input type="text" class="form-control" | |
| 62 | - ng-value="ctrl.TimeTableDetailForSave.lp.lpName" | |
| 63 | - readonly/> | |
| 64 | - </div> | |
| 65 | - | |
| 66 | - </div> | |
| 67 | - <div class="form-group has-success has-feedback"> | |
| 68 | - <label class="col-md-3 control-label">发车顺序号*:</label> | |
| 69 | - <div class="col-md-7"> | |
| 70 | - <input type="text" class="form-control" | |
| 71 | - ng-value="ctrl.TimeTableDetailForSave.fcno" | |
| 72 | - readonly/> | |
| 73 | - </div> | |
| 74 | - | |
| 75 | - </div> | |
| 76 | - <div class="form-group has-success has-feedback"> | |
| 77 | - <label class="col-md-3 control-label">方向*:</label> | |
| 78 | - <div class="col-md-7"> | |
| 79 | - <sa-Radiogroup model="ctrl.TimeTableDetailForSave.xlDir" dicgroup="LineTrend" name="xlDir" required></sa-Radiogroup> | |
| 80 | - </div> | |
| 81 | - <!-- 隐藏块,显示验证信息 --> | |
| 82 | - <div class="alert alert-danger well-sm" ng-show="myForm.xlDir.$error.required"> | |
| 83 | - 请选择线路上下行 | |
| 84 | - </div> | |
| 85 | - | |
| 86 | - </div> | |
| 87 | - <div class="form-group"> | |
| 88 | - <label class="col-md-3 control-label">起点站:</label> | |
| 89 | - <div class="col-md-7"> | |
| 90 | - <sa-Select3 model="ctrl.TimeTableDetailForSave" | |
| 91 | - name="qdz" | |
| 92 | - placeholder="请输拼音..." | |
| 93 | - dcvalue="{{ctrl.TimeTableDetailForSave.qdz.id}}" | |
| 94 | - dcname="qdz.id" | |
| 95 | - icname="stationid" | |
| 96 | - icnames="stationname" | |
| 97 | - datatype="zd" | |
| 98 | - dataassociate="true" | |
| 99 | - dataparam="{{ {'xlid': ctrl.TimeTableDetailForSave.xl.id, 'xldir': ctrl.TimeTableDetailForSave.xlDir} | json }}" | |
| 100 | - mlp="true" | |
| 101 | - > | |
| 102 | - </sa-Select3> | |
| 103 | - </div> | |
| 104 | - </div> | |
| 105 | - <div class="form-group"> | |
| 106 | - <label class="col-md-3 control-label">终点站:</label> | |
| 107 | - <div class="col-md-7"> | |
| 108 | - <sa-Select3 model="ctrl.TimeTableDetailForSave" | |
| 109 | - name="zdz" | |
| 110 | - placeholder="请输拼音..." | |
| 111 | - dcvalue="{{ctrl.TimeTableDetailForSave.zdz.id}}" | |
| 112 | - dcname="zdz.id" | |
| 113 | - icname="stationid" | |
| 114 | - icnames="stationname" | |
| 115 | - datatype="zd" | |
| 116 | - dataassociate="true" | |
| 117 | - dataparam="{{ {'xlid': ctrl.TimeTableDetailForSave.xl.id, 'xldir': ctrl.TimeTableDetailForSave.xlDir} | json }}" | |
| 118 | - mlp="true" | |
| 119 | - > | |
| 120 | - </sa-Select3> | |
| 121 | - </div> | |
| 122 | - </div> | |
| 123 | - <div class="form-group"> | |
| 124 | - <label class="col-md-3 control-label">停车场:</label> | |
| 125 | - <div class="col-md-7"> | |
| 126 | - <sa-Select3 model="ctrl.TimeTableDetailForSave" | |
| 127 | - name="tcc" | |
| 128 | - placeholder="请输拼音..." | |
| 129 | - dcvalue="{{ctrl.TimeTableDetailForSave.tcc.id}}" | |
| 130 | - dcname="tcc.id" | |
| 131 | - icname="id" | |
| 132 | - icnames="parkName" | |
| 133 | - datatype="tcc" | |
| 134 | - mlp="true" | |
| 135 | - > | |
| 136 | - </sa-Select3> | |
| 137 | - </div> | |
| 138 | - </div> | |
| 139 | - | |
| 140 | - <div class="form-group has-success has-feedback"> | |
| 141 | - <label class="col-md-3 control-label">发车时间*:</label> | |
| 142 | - <div class="col-md-7"> | |
| 143 | - <input type="text" class="form-control" | |
| 144 | - ng-model="ctrl.TimeTableDetailForSave.fcsj" | |
| 145 | - /> | |
| 146 | - </div> | |
| 147 | - | |
| 148 | - </div> | |
| 149 | - <div class="form-group"> | |
| 150 | - <label class="col-md-3 control-label">对应班次数:</label> | |
| 151 | - <div class="col-md-7"> | |
| 152 | - <input type="text" class="form-control" | |
| 153 | - ng-value="ctrl.TimeTableDetailForSave.bcs" | |
| 154 | - readonly/> | |
| 155 | - </div> | |
| 156 | - | |
| 157 | - </div> | |
| 158 | - <div class="form-group"> | |
| 159 | - <label class="col-md-3 control-label">计划里程:</label> | |
| 160 | - <div class="col-md-7"> | |
| 161 | - <input type="text" class="form-control" | |
| 162 | - ng-model="ctrl.TimeTableDetailForSave.jhlc" | |
| 163 | - /> | |
| 164 | - </div> | |
| 165 | - | |
| 166 | - </div> | |
| 167 | - <div class="form-group"> | |
| 168 | - <label class="col-md-3 control-label">班次历时:</label> | |
| 169 | - <div class="col-md-7"> | |
| 170 | - <input type="text" class="form-control" | |
| 171 | - ng-model="ctrl.TimeTableDetailForSave.bcsj" | |
| 172 | - /> | |
| 173 | - </div> | |
| 174 | - | |
| 175 | - </div> | |
| 176 | - <div class="form-group has-success has-feedback"> | |
| 177 | - <label class="col-md-3 control-label">班次类型*:</label> | |
| 178 | - <div class="col-md-7"> | |
| 179 | - <sa-Select3 model="ctrl.TimeTableDetailForSave" | |
| 180 | - name="bcType" | |
| 181 | - placeholder="请选择班次类型..." | |
| 182 | - dcvalue="{{ctrl.TimeTableDetailForSave.bcType}}" | |
| 183 | - dcname="bcType" | |
| 184 | - icname="code" | |
| 185 | - icnames="name" | |
| 186 | - datatype="ScheduleType" | |
| 187 | - required > | |
| 188 | - </sa-Select3> | |
| 189 | - </div> | |
| 190 | - | |
| 191 | - </div> | |
| 192 | - <div class="form-group"> | |
| 193 | - <label class="col-md-3 control-label">备注:</label> | |
| 194 | - <div class="col-md-7"> | |
| 195 | - <textarea class="form-control" | |
| 196 | - ng-model="ctrl.TimeTableDetailForSave.remark" | |
| 197 | - /> | |
| 198 | - </div> | |
| 199 | - | |
| 200 | - </div> | |
| 201 | - | |
| 202 | - </div> | |
| 203 | - | |
| 204 | - <div class="form-actions"> | |
| 205 | - <div class="row"> | |
| 206 | - <div class="col-md-offset-3 col-md-4"> | |
| 207 | - <button type="submit" class="btn green" | |
| 208 | - ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | |
| 209 | - <a type="button" class="btn default" | |
| 210 | - ui-sref="timeTableDetailInfoManage({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname})" ><i class="fa fa-times"></i> 取消</a> | |
| 211 | - </div> | |
| 212 | - </div> | |
| 213 | - </div> | |
| 214 | - </form> | |
| 215 | - | |
| 216 | - </div> | |
| 217 | - </div> | |
| 218 | - | |
| 219 | - | |
| 220 | - | |
| 221 | - | |
| 222 | -</div> |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/dist/controller.min.js deleted
100644 → 0
| 1 | -angular.module("timeTableManageApp").controller("timeTableManageCtrl",["TTInfo",function(a){var b=this;b.totalItems=0,b.currentPage=1,b.infos=[],b.pageChanged=function(){console.log("页面跳转到:"+b.currentPage),a.list({page:b.currentPage-1},function(a){console.log("后台返回记录数:"+a.content.length),b.totalItems=a.totalElements,b.currentPage=a.number+1,b.infos=a.content})},a.list(function(a){console.log("后台返回记录数:"+a.content.length),b.totalItems=a.totalElements,b.currentPage=a.number+1,b.infos=a.content}),b.showDetail=function(){alert("时刻信息详细")},b.detailHeads=["路牌","出场","华高新村1","陆家嘴地铁站1","华高新村2","陆家嘴地铁站2","华高新村3","陆家嘴地铁站3","华高新村4","陆家嘴地铁站4","华高新村5","陆家嘴地铁站5","华高新村6","陆家嘴地铁站6","华高新村7","陆家嘴地铁站7","华高新村8","陆家嘴地铁站8","进场","空驶班次数/里程","运营班次数/里程"],b.detailInfos=[["1","07:01","","","07:11","08:01","09:22","10:12","11:34","12:24","13:34","14:24","15:42","16:32","18:00","18:50","","","19:46","2/1.6","12/198"],["2","06:51","07:01","07:51","09:12","10:02","11:22","12:12","13:22","14:12","15:36","16:26","17:55","18:45","20:05","20:55","","","21:51","2/1.6","14/231"],["3","05:56","06:06","06:56","08:05","08:55","10:34","11:24","12:20","","","17:01","17:11","18:01","19:10","19:58","21:16","22:08","23:04","4/3.2","12/198"],["4","06:20","06:30","07:20","08:20","09:10","11:02","08:38","12:46","13:36","12:57","15:44","17:20","18:10","19:24","20:14","","","21:10","2/1.6","14/231"],["5","07:21","","","07:31","08:21","09:46","10:36","11:58","12:48","13:36","14:46","16:06","16:56","18:18","19:08","","","20:04","2/1.6","12/198"],["6","06:36","06:46","07:36","08:40","09:30","10:58","11:48","12:58","13:48","15:18","16:08","17:40","18:30","19:48","20:38","21:50","22:49","23:45","2/1.6","16/264"],["7","07:30","","","07:40","08:31","09:58","10:48","12:10","13:00","13:56","16:20","16:30","17:20","18:30","19:20","20:41","21:31","22:27","4/3.2","12/198"],["8","07:46","","","07:56","08:46","10:22","11:12","12:34","13:24","14:20","16:38","16:48","17:38","18:49","19:38","21:00","21:50","22:46","4/3.2","12/198"],["9","07:38","","","07:48","08:38","10:10","10:00","12:22","13:12","14:30","15:20","16:44","17:34","18:42","19:32","","","20:28","2/1.6","12/198"],["10","06:46","06:56","07:46","09:00","09:50","11:10","12:00","13:10","14:00","15:24","16:14","17:45","18:35","19:56","20:46","22:00","23:00","23:56","2/1.6","16/264"],["+1","05:10","05:20","06:10","07:21","08:11","09:07","","","","","15:44","15:54","16:44","18:12","19:02","20:23","21:13","22:09","4/3.2","10/165"],["+2","05:30","05:40","06:30","07:44","08:34","09:30","","","","","16:29","16:39","17:29","18:36","19:26","20:50","21:40","22:36","4/3.2","10/165"],["+3","05:30","","06:00","07:16","08:06","09:02","","","","","15:38","15:48","16:38","18:06","18:56","20:14","21:04","22:00","4/14.95","9/149"],["+4","05:48","05:58","06:48","08:00","08:50","09:46","","","","","16:52","17:02","17:52","19:03","19:50","21:08","21:59","22:54","4/3.2","10/165"],["+5","05:40","05:50","06:40","07:52","08:42","09:38","","","14:26","14:36","15:26","16:53","17:43","18:56","19:44","","","20:40","4/3.2","10/165"],["+6","06:31","06:41","07:31","08:31","09:21","10:17","","","14:56","15:06","15:56","17:30","18:20","19:32","20:22","21:32","22:27","23:23","4/3.2","12/198"],["+7","05:20","05:30","06:20","07:36","08:26","09:22","","","","","16:08","16:18","17:08","18:24","19:14","20:32","21:22","22:18","4/3.2","10/165"],["+8","06:04","06:14","07:04","08:10","09:00","09:56","","","","","17:05","17:15","18:05","19:17","20:06","21:24","22:17","23:13","4/3.2","10/165"],["+9","06:41","06:51","07:41","08:50","09:40","10:36","","","15:02","15:12","16:02","17:35","18:25","19:40","20:30","21:40","22:38","23:34","4/3.2","12/198"],["+10","07:16","","","07:26","08:16","09:34","10:24","11:46","12:36","13:46","14:36","16:00","16:50","","","","","17:46","2/1.6","10/165"],["+20","06:12","06:22","07:12","08:15","09:05","10:01","","","14:50","15:00","15:50","17:25","18:15","","","","","19:11","4/3.2","8/132"],["+21","06:26","06:36","07:26","08:25","09:15","10:11","","","15:20","15:30","16:20","17:50","18:40","","","","","19:36","4/3.2","8/132"],["+22","06:56","07:06","07:56","08:52","","","","","14:38","14:48","15:38","17:06","17:56","","","","","18:52","4/3.2","6/99"],["机1","13:56","","","","","","","","","14:06","14:56","16:12","17:02","","","","","17:58","2/1.6","4/66"],["机2","14:04","","","","","","","","","14:14","15:04","16:24","17:14","","","","","18:10","2/1.6","4/66"],["机3","14:12","","","","","","","","","14:22","15:12","16:35","17:25","","","","","18:21","2/1.6","4/66"],["机4","14:32","","","","","","","","","14:42","15:32","16:57","17:47","","","","","18:43","2/1.6","4/66"]]}]); | |
| 2 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/dist/service.min.js deleted
100644 → 0
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/dist/timeTableDetail.html deleted
100644 → 0
| 1 | -<div class="page-head"> | |
| 2 | - <div class="page-title"> | |
| 3 | - <h1>时刻表明细</h1> | |
| 4 | - </div> | |
| 5 | -</div> | |
| 6 | - | |
| 7 | -<ul class="page-breadcrumb breadcrumb"> | |
| 8 | - <li> | |
| 9 | - <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | - <i class="fa fa-circle"></i> | |
| 11 | - </li> | |
| 12 | - <li> | |
| 13 | - <span class="active">运营计划管理</span> | |
| 14 | - <i class="fa fa-circle"></i> | |
| 15 | - </li> | |
| 16 | - <li> | |
| 17 | - <span class="active">799路测试时刻表明细</span> | |
| 18 | - </li> | |
| 19 | -</ul> | |
| 20 | - | |
| 21 | -<div class="row" id="timeTableDetail" ng-app="timeTableManageApp"> | |
| 22 | - <div class="col-md-12" ng-controller="timeTableManageCtrl as gmc"> | |
| 23 | - <div class="portlet light bordered"> | |
| 24 | - <div class="portlet-title"> | |
| 25 | - <div class="caption font-dark"> | |
| 26 | - <i class="fa fa-database font-dark"></i> | |
| 27 | - <span class="caption-subject bold uppercase">799路测试时刻表明细</span> | |
| 28 | - </div> | |
| 29 | - <div class="actions"> | |
| 30 | - <a href="javascirpt:" class="btn btn-circle blue"> | |
| 31 | - <i class="fa fa-plus"></i> | |
| 32 | - 动态生成 | |
| 33 | - </a> | |
| 34 | - <a href="javascirpt:" class="btn btn-circle blue"> | |
| 35 | - <i class="fa fa-plus"></i> | |
| 36 | - 分班 | |
| 37 | - </a> | |
| 38 | - <a href="javascirpt:" class="btn btn-circle blue"> | |
| 39 | - <i class="fa fa-plus"></i> | |
| 40 | - 取消分班 | |
| 41 | - </a> | |
| 42 | - <a href="javascirpt:" class="btn btn-circle blue"> | |
| 43 | - <i class="fa fa-plus"></i> | |
| 44 | - 反向 | |
| 45 | - </a> | |
| 46 | - <a href="javascirpt:" class="btn btn-circle blue"> | |
| 47 | - <i class="fa fa-plus"></i> | |
| 48 | - 批量选择 | |
| 49 | - </a> | |
| 50 | - <a href="javascirpt:" class="btn btn-circle blue"> | |
| 51 | - <i class="fa fa-plus"></i> | |
| 52 | - 批量修改 | |
| 53 | - </a> | |
| 54 | - <a href="javascirpt:" class="btn btn-circle blue"> | |
| 55 | - <i class="fa fa-plus"></i> | |
| 56 | - 删除 | |
| 57 | - </a> | |
| 58 | - <div class="btn-group"> | |
| 59 | - <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 60 | - <i class="fa fa-share"></i> | |
| 61 | - <span>系统工具</span> | |
| 62 | - <i class="fa fa-angle-down"></i> | |
| 63 | - </a> | |
| 64 | - <ul class="dropdown-menu pull-right"> | |
| 65 | - <li> | |
| 66 | - <a href="javascript:" class="tool-action"> | |
| 67 | - <i class="fa fa-file-excel-o"></i> | |
| 68 | - 导出excel | |
| 69 | - </a> | |
| 70 | - </li> | |
| 71 | - <li class="divider"></li> | |
| 72 | - <li> | |
| 73 | - <a href="javascript:" class="tool-action"> | |
| 74 | - <i class="fa fa-refresh"></i> | |
| 75 | - 刷行数据 | |
| 76 | - </a> | |
| 77 | - </li> | |
| 78 | - </ul> | |
| 79 | - </div> | |
| 80 | - </div> | |
| 81 | - </div> | |
| 82 | - | |
| 83 | - <div class="portlet-body"> | |
| 84 | - <!--<div ng-view></div>--> | |
| 85 | - <table class="table table-striped table-bordered table-hover table-checkable order-column" ng-controller="timeTableManageCtrl as ctrl"> | |
| 86 | - <thead> | |
| 87 | - <tr> | |
| 88 | - <th> | |
| 89 | - <input type="checkbox" class="group-checkable" data-set="#busConfigInfoTable.checkboxes"/> | |
| 90 | - </th> | |
| 91 | - <th ng-repeat="head in ctrl.detailHeads"> | |
| 92 | - <span ng-bind="head"></span> | |
| 93 | - </th> | |
| 94 | - | |
| 95 | - </tr> | |
| 96 | - </thead> | |
| 97 | - <tbody> | |
| 98 | - <tr ng-repeat="info in ctrl.detailInfos"> | |
| 99 | - <td> | |
| 100 | - <input type="checkbox" class="checkboxes"/> | |
| 101 | - </td> | |
| 102 | - <td ng-repeat="cell in info track by $index"> | |
| 103 | - <span ng-bind="cell"></span> | |
| 104 | - </td> | |
| 105 | - </tr> | |
| 106 | - | |
| 107 | - </tbody> | |
| 108 | - </table> | |
| 109 | - | |
| 110 | - <div style="text-align: right;"> | |
| 111 | - <uib-pagination total-items="ctrl.totalItems" | |
| 112 | - ng-model="ctrl.currentPage" | |
| 113 | - ng-change="ctrl.pageChanged()" | |
| 114 | - previous-text="上一页" | |
| 115 | - next-text="下一页"> | |
| 116 | - </uib-pagination> | |
| 117 | - </div> | |
| 118 | - | |
| 119 | - </div> | |
| 120 | - </div> | |
| 121 | - </div> | |
| 122 | -</div> | |
| 123 | - | |
| 124 | -<script>// 时刻表管理 service | |
| 125 | - | |
| 126 | -//angular.module('timeTableManageApp', ['ngResource', 'ui.router', 'ui.bootstrap']) | |
| 127 | -angular.module('timeTableManageApp', ['ngResource', 'ui.bootstrap']) | |
| 128 | - //.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { | |
| 129 | - // $stateProvider | |
| 130 | - // .state("timeTableList", { | |
| 131 | - // url: '/timeTableList.html', | |
| 132 | - // templateUrl: 'timeTableList.html' | |
| 133 | - // }) | |
| 134 | - // .state("timeTableDetail", { | |
| 135 | - // url: '/timeTableDetail.html', | |
| 136 | - // templateUrl: 'timeTableDetail.html' | |
| 137 | - // }); | |
| 138 | - // $urlRouterProvider.otherwise('/timeTableList.html'); | |
| 139 | - //}]) | |
| 140 | - .factory('TTInfo', ['$resource', function($resource) { | |
| 141 | - return $resource( | |
| 142 | - '/tic', | |
| 143 | - {order: 'id', direction: 'ASC'}, | |
| 144 | - { | |
| 145 | - list: { | |
| 146 | - method: 'GET', | |
| 147 | - params: { | |
| 148 | - page: 0 | |
| 149 | - } | |
| 150 | - } | |
| 151 | - } | |
| 152 | - ); | |
| 153 | - }]);</script> | |
| 154 | -<script>// 时刻表管理 controller | |
| 155 | - | |
| 156 | -angular.module('timeTableManageApp') | |
| 157 | - .controller('timeTableManageCtrl', ['TTInfo', function(TTInfo) { | |
| 158 | - var self = this; | |
| 159 | - self.totalItems = 0; | |
| 160 | - self.currentPage = 1; | |
| 161 | - self.infos = []; | |
| 162 | - self.pageChanged = function() { | |
| 163 | - console.log("页面跳转到:" + self.currentPage); | |
| 164 | - | |
| 165 | - TTInfo.list({page: self.currentPage - 1}, function(result) { | |
| 166 | - console.log("后台返回记录数:" + result.content.length); | |
| 167 | - self.totalItems = result.totalElements; | |
| 168 | - self.currentPage = result.number + 1; | |
| 169 | - self.infos = result.content; | |
| 170 | - }); | |
| 171 | - }; | |
| 172 | - | |
| 173 | - TTInfo.list(function(result) { | |
| 174 | - console.log("后台返回记录数:" + result.content.length); | |
| 175 | - self.totalItems = result.totalElements; | |
| 176 | - self.currentPage = result.number + 1; | |
| 177 | - self.infos = result.content; | |
| 178 | - }); | |
| 179 | - | |
| 180 | - self.showDetail = function() { | |
| 181 | - alert("时刻信息详细"); | |
| 182 | - }; | |
| 183 | - | |
| 184 | - // 模拟799路的时刻信息 | |
| 185 | - self.detailHeads = [ | |
| 186 | - '路牌', '出场', | |
| 187 | - '华高新村1', '陆家嘴地铁站1', '华高新村2', '陆家嘴地铁站2', | |
| 188 | - '华高新村3', '陆家嘴地铁站3', '华高新村4', '陆家嘴地铁站4', | |
| 189 | - '华高新村5', '陆家嘴地铁站5', '华高新村6', '陆家嘴地铁站6', | |
| 190 | - '华高新村7', '陆家嘴地铁站7', '华高新村8', '陆家嘴地铁站8', | |
| 191 | - '进场', '空驶班次数/里程', '运营班次数/里程' | |
| 192 | - ]; | |
| 193 | - | |
| 194 | - self.detailInfos = [ | |
| 195 | - ['1', '07:01', '', '', '07:11', '08:01', '09:22', '10:12', '11:34', '12:24', '13:34', '14:24', '15:42', '16:32', '18:00', '18:50', '', '', '19:46', '2/1.6', '12/198'], | |
| 196 | - ['2', '06:51', '07:01', '07:51', '09:12', '10:02', '11:22', '12:12', '13:22', '14:12', '15:36', '16:26', '17:55', '18:45', '20:05', '20:55', '', '', '21:51', '2/1.6', '14/231'], | |
| 197 | - ['3', '05:56', '06:06', '06:56', '08:05', '08:55', '10:34', '11:24', '12:20', '', '', '17:01', '17:11', '18:01', '19:10', '19:58', '21:16', '22:08', '23:04', '4/3.2', '12/198'], | |
| 198 | - ['4', '06:20', '06:30', '07:20', '08:20', '09:10', '11:02', '08:38', '12:46', '13:36', '12:57', '15:44', '17:20', '18:10', '19:24', '20:14', '', '', '21:10', '2/1.6', '14/231'], | |
| 199 | - ['5', '07:21', '', '', '07:31', '08:21', '09:46', '10:36', '11:58', '12:48', '13:36', '14:46', '16:06', '16:56', '18:18', '19:08', '', '', '20:04', '2/1.6', '12/198'], | |
| 200 | - ['6', '06:36', '06:46', '07:36', '08:40', '09:30', '10:58', '11:48', '12:58', '13:48', '15:18', '16:08', '17:40', '18:30', '19:48', '20:38', '21:50', '22:49', '23:45', '2/1.6', '16/264'], | |
| 201 | - ['7', '07:30', '', '', '07:40', '08:31', '09:58', '10:48', '12:10', '13:00', '13:56', '16:20', '16:30', '17:20', '18:30', '19:20', '20:41', '21:31', '22:27', '4/3.2', '12/198'], | |
| 202 | - ['8', '07:46', '', '', '07:56', '08:46', '10:22', '11:12', '12:34', '13:24', '14:20', '16:38', '16:48', '17:38', '18:49', '19:38', '21:00', '21:50', '22:46', '4/3.2', '12/198'], | |
| 203 | - ['9', '07:38', '', '', '07:48', '08:38', '10:10', '10:00', '12:22', '13:12', '14:30', '15:20', '16:44', '17:34', '18:42', '19:32', '', '', '20:28', '2/1.6', '12/198'], | |
| 204 | - ['10', '06:46', '06:56', '07:46', '09:00', '09:50', '11:10', '12:00', '13:10', '14:00', '15:24', '16:14', '17:45', '18:35', '19:56', '20:46', '22:00', '23:00', '23:56', '2/1.6', '16/264'], | |
| 205 | - ['+1', '05:10', '05:20', '06:10', '07:21', '08:11', '09:07', '', '', '', '', '15:44', '15:54', '16:44', '18:12', '19:02', '20:23', '21:13', '22:09', '4/3.2', '10/165'], | |
| 206 | - ['+2', '05:30', '05:40', '06:30', '07:44', '08:34', '09:30', '', '', '', '', '16:29', '16:39', '17:29', '18:36', '19:26', '20:50', '21:40', '22:36', '4/3.2', '10/165'], | |
| 207 | - ['+3', '05:30', '', '06:00', '07:16', '08:06', '09:02', '', '', '', '', '15:38', '15:48', '16:38', '18:06', '18:56', '20:14', '21:04', '22:00', '4/14.95', '9/149'], | |
| 208 | - ['+4', '05:48', '05:58', '06:48', '08:00', '08:50', '09:46', '', '', '', '', '16:52', '17:02', '17:52', '19:03', '19:50', '21:08', '21:59', '22:54', '4/3.2', '10/165'], | |
| 209 | - ['+5', '05:40', '05:50', '06:40', '07:52', '08:42', '09:38', '', '', '14:26', '14:36', '15:26', '16:53', '17:43', '18:56', '19:44', '', '', '20:40', '4/3.2', '10/165'], | |
| 210 | - ['+6', '06:31', '06:41', '07:31', '08:31', '09:21', '10:17', '', '', '14:56', '15:06', '15:56', '17:30', '18:20', '19:32', '20:22', '21:32', '22:27', '23:23', '4/3.2', '12/198'], | |
| 211 | - ['+7', '05:20', '05:30', '06:20', '07:36', '08:26', '09:22', '', '', '', '', '16:08', '16:18', '17:08', '18:24', '19:14', '20:32', '21:22', '22:18', '4/3.2', '10/165'], | |
| 212 | - ['+8', '06:04', '06:14', '07:04', '08:10', '09:00', '09:56', '', '', '', '', '17:05', '17:15', '18:05', '19:17', '20:06', '21:24', '22:17', '23:13', '4/3.2', '10/165'], | |
| 213 | - ['+9', '06:41', '06:51', '07:41', '08:50', '09:40', '10:36', '', '', '15:02', '15:12', '16:02', '17:35', '18:25', '19:40', '20:30', '21:40', '22:38', '23:34', '4/3.2', '12/198'], | |
| 214 | - ['+10', '07:16', '', '', '07:26', '08:16', '09:34', '10:24', '11:46', '12:36', '13:46', '14:36', '16:00', '16:50', '', '', '', '', '17:46', '2/1.6', '10/165'], | |
| 215 | - ['+20', '06:12', '06:22', '07:12', '08:15', '09:05', '10:01', '', '', '14:50', '15:00', '15:50', '17:25', '18:15', '', '', '', '', '19:11', '4/3.2', '8/132'], | |
| 216 | - ['+21', '06:26', '06:36', '07:26', '08:25', '09:15', '10:11', '', '', '15:20', '15:30', '16:20', '17:50', '18:40', '', '', '', '', '19:36', '4/3.2', '8/132'], | |
| 217 | - ['+22', '06:56', '07:06', '07:56', '08:52', '', '', '', '', '14:38', '14:48', '15:38', '17:06', '17:56', '', '', '', '', '18:52', '4/3.2', '6/99'], | |
| 218 | - ['机1', '13:56', '', '', '', '', '', '', '', '', '14:06', '14:56', '16:12', '17:02', '', '', '', '', '17:58', '2/1.6', '4/66'], | |
| 219 | - ['机2', '14:04', '', '', '', '', '', '', '', '', '14:14', '15:04', '16:24', '17:14', '', '', '', '', '18:10', '2/1.6', '4/66'], | |
| 220 | - ['机3', '14:12', '', '', '', '', '', '', '', '', '14:22', '15:12', '16:35', '17:25', '', '', '', '', '18:21', '2/1.6', '4/66'], | |
| 221 | - ['机4', '14:32', '', '', '', '', '', '', '', '', '14:42', '15:32', '16:57', '17:47', '', '', '', '', '18:43', '2/1.6', '4/66'] | |
| 222 | - | |
| 223 | - ] | |
| 224 | - | |
| 225 | - | |
| 226 | - | |
| 227 | - | |
| 228 | - | |
| 229 | - | |
| 230 | - | |
| 231 | - | |
| 232 | - | |
| 233 | - | |
| 234 | - | |
| 235 | - | |
| 236 | - | |
| 237 | - | |
| 238 | - | |
| 239 | - | |
| 240 | - | |
| 241 | - | |
| 242 | - | |
| 243 | - | |
| 244 | - | |
| 245 | - | |
| 246 | - | |
| 247 | - | |
| 248 | - | |
| 249 | - | |
| 250 | - | |
| 251 | - | |
| 252 | - | |
| 253 | - | |
| 254 | - | |
| 255 | - }]);</script> | |
| 256 | - | |
| 257 | -<script type="text/javascript"> | |
| 258 | - angular.bootstrap(document.getElementById("timeTableDetail"), ["timeTableManageApp"]); | |
| 259 | -</script> | |
| 260 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/dist/timeTableList.html deleted
100644 → 0
| 1 | -<table class="table table-striped table-bordered table-hover table-checkable order-column" ng-controller="timeTableManageCtrl as ctrl"> | |
| 2 | - <thead> | |
| 3 | - <tr> | |
| 4 | - <th> | |
| 5 | - <input type="checkbox" class="group-checkable" data-set="#busConfigInfoTable.checkboxes"/> | |
| 6 | - </th> | |
| 7 | - <th>线路</th> | |
| 8 | - <th>时刻表名称</th> | |
| 9 | - <th>修改时间</th> | |
| 10 | - <th>路牌数</th> | |
| 11 | - <th>圈数</th> | |
| 12 | - <th>是否启用</th> | |
| 13 | - <th>操作1</th> | |
| 14 | - <th>操作2</th> | |
| 15 | - </tr> | |
| 16 | - </thead> | |
| 17 | - <tbody> | |
| 18 | - <tr ng-repeat="info in ctrl.infos" class="odd gradeX"> | |
| 19 | - <td> | |
| 20 | - <input type="checkbox" class="checkboxes"/> | |
| 21 | - </td> | |
| 22 | - <td> | |
| 23 | - <span ng-bind="info.xlName"></span> | |
| 24 | - </td> | |
| 25 | - <td> | |
| 26 | - <span ng-bind="info.name"></span> | |
| 27 | - </td> | |
| 28 | - <td> | |
| 29 | - <span ng-bind="info.updateDate | date:'yyyy-MM-dd HH:mm:ss'"></span> | |
| 30 | - </td> | |
| 31 | - <td> | |
| 32 | - <span ng-bind="info.lpCount"></span> | |
| 33 | - </td> | |
| 34 | - <td> | |
| 35 | - <span ng-bind="info.loopCount"></span> | |
| 36 | - </td> | |
| 37 | - <td> | |
| 38 | - <span ng-bind="info.enable"></span> | |
| 39 | - </td> | |
| 40 | - <td> | |
| 41 | - <a href="javascript:" ng-click="ctrl.showDetail()">时刻表明细信息</a> | |
| 42 | - </td> | |
| 43 | - <td> | |
| 44 | - <a href="javascript:">预览</a> | |
| 45 | - <a href="javascript:">基础信息修改</a> | |
| 46 | - </td> | |
| 47 | - </tr> | |
| 48 | - </tbody> | |
| 49 | -</table> | |
| 50 | - | |
| 51 | -<div style="text-align: right;"> | |
| 52 | - <uib-pagination total-items="ctrl.totalItems" | |
| 53 | - ng-model="ctrl.currentPage" | |
| 54 | - ng-change="ctrl.pageChanged()" | |
| 55 | - previous-text="上一页" | |
| 56 | - next-text="下一页"> | |
| 57 | - </uib-pagination> | |
| 58 | -</div> | |
| 59 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/dist/timeTableManage.html deleted
100644 → 0
| 1 | -<div class="page-head"> | |
| 2 | - <div class="page-title"> | |
| 3 | - <h1>时刻表管理</h1> | |
| 4 | - </div> | |
| 5 | -</div> | |
| 6 | - | |
| 7 | -<ul class="page-breadcrumb breadcrumb"> | |
| 8 | - <li> | |
| 9 | - <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | - <i class="fa fa-circle"></i> | |
| 11 | - </li> | |
| 12 | - <li> | |
| 13 | - <span class="active">运营计划管理</span> | |
| 14 | - <i class="fa fa-circle"></i> | |
| 15 | - </li> | |
| 16 | - <li> | |
| 17 | - <span class="active">时刻表管理</span> | |
| 18 | - </li> | |
| 19 | -</ul> | |
| 20 | - | |
| 21 | -<div class="row" id="timeTableManage" ng-app="timeTableManageApp"> | |
| 22 | - <div class="col-md-12" ng-controller="timeTableManageCtrl as gmc"> | |
| 23 | - <div class="portlet light bordered"> | |
| 24 | - <div class="portlet-title"> | |
| 25 | - <div class="caption font-dark"> | |
| 26 | - <i class="fa fa-database font-dark"></i> | |
| 27 | - <span class="caption-subject bold uppercase">时刻表</span> | |
| 28 | - </div> | |
| 29 | - <div class="actions"> | |
| 30 | - <a href="javascirpt:" class="btn btn-circle blue"> | |
| 31 | - <i class="fa fa-plus"></i> | |
| 32 | - 添加时刻表 | |
| 33 | - </a> | |
| 34 | - <div class="btn-group"> | |
| 35 | - <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 36 | - <i class="fa fa-share"></i> | |
| 37 | - <span>系统工具</span> | |
| 38 | - <i class="fa fa-angle-down"></i> | |
| 39 | - </a> | |
| 40 | - <ul class="dropdown-menu pull-right"> | |
| 41 | - <li> | |
| 42 | - <a href="javascript:" class="tool-action"> | |
| 43 | - <i class="fa fa-file-excel-o"></i> | |
| 44 | - 导出excel | |
| 45 | - </a> | |
| 46 | - </li> | |
| 47 | - <li class="divider"></li> | |
| 48 | - <li> | |
| 49 | - <a href="javascript:" class="tool-action"> | |
| 50 | - <i class="fa fa-refresh"></i> | |
| 51 | - 刷行数据 | |
| 52 | - </a> | |
| 53 | - </li> | |
| 54 | - </ul> | |
| 55 | - </div> | |
| 56 | - </div> | |
| 57 | - </div> | |
| 58 | - | |
| 59 | - <div class="portlet-body"> | |
| 60 | - <!--<div ng-view></div>--> | |
| 61 | - <table class="table table-striped table-bordered table-hover table-checkable order-column" ng-controller="timeTableManageCtrl as ctrl"> | |
| 62 | - <thead> | |
| 63 | - <tr> | |
| 64 | - <th> | |
| 65 | - <input type="checkbox" class="group-checkable" data-set="#busConfigInfoTable.checkboxes"/> | |
| 66 | - </th> | |
| 67 | - <th>线路</th> | |
| 68 | - <th>时刻表名称</th> | |
| 69 | - <th>修改时间</th> | |
| 70 | - <th>路牌数</th> | |
| 71 | - <th>圈数</th> | |
| 72 | - <th>是否启用</th> | |
| 73 | - <th>操作1</th> | |
| 74 | - <th>操作2</th> | |
| 75 | - </tr> | |
| 76 | - </thead> | |
| 77 | - <tbody> | |
| 78 | - <tr ng-repeat="info in ctrl.infos" class="odd gradeX"> | |
| 79 | - <td> | |
| 80 | - <input type="checkbox" class="checkboxes"/> | |
| 81 | - </td> | |
| 82 | - <td> | |
| 83 | - <span ng-bind="info.xlName"></span> | |
| 84 | - </td> | |
| 85 | - <td> | |
| 86 | - <span ng-bind="info.name"></span> | |
| 87 | - </td> | |
| 88 | - <td> | |
| 89 | - <span ng-bind="info.updateDate | date:'yyyy-MM-dd HH:mm:ss'"></span> | |
| 90 | - </td> | |
| 91 | - <td> | |
| 92 | - <span ng-bind="info.lpCount"></span> | |
| 93 | - </td> | |
| 94 | - <td> | |
| 95 | - <span ng-bind="info.loopCount"></span> | |
| 96 | - </td> | |
| 97 | - <td> | |
| 98 | - <span ng-bind="info.enable"></span> | |
| 99 | - </td> | |
| 100 | - <td> | |
| 101 | - <a href="javascript:" ng-click="ctrl.showDetail()">时刻表明细信息</a> | |
| 102 | - </td> | |
| 103 | - <td> | |
| 104 | - <a href="javascript:">预览</a> | |
| 105 | - <a href="javascript:">基础信息修改</a> | |
| 106 | - </td> | |
| 107 | - </tr> | |
| 108 | - </tbody> | |
| 109 | - </table> | |
| 110 | - | |
| 111 | - <div style="text-align: right;"> | |
| 112 | - <uib-pagination total-items="ctrl.totalItems" | |
| 113 | - ng-model="ctrl.currentPage" | |
| 114 | - ng-change="ctrl.pageChanged()" | |
| 115 | - previous-text="上一页" | |
| 116 | - next-text="下一页"> | |
| 117 | - </uib-pagination> | |
| 118 | - </div> | |
| 119 | - | |
| 120 | - </div> | |
| 121 | - </div> | |
| 122 | - </div> | |
| 123 | -</div> | |
| 124 | - | |
| 125 | -<script>angular.module("timeTableManageApp",["ngResource","ui.bootstrap"]).factory("TTInfo",["$resource",function(a){return a("/tic",{order:"id",direction:"ASC"},{list:{method:"GET",params:{page:0}}})}]);</script> | |
| 126 | -<script>angular.module("timeTableManageApp").controller("timeTableManageCtrl",["TTInfo",function(a){var b=this;b.totalItems=0,b.currentPage=1,b.infos=[],b.pageChanged=function(){console.log("页面跳转到:"+b.currentPage),a.list({page:b.currentPage-1},function(a){console.log("后台返回记录数:"+a.content.length),b.totalItems=a.totalElements,b.currentPage=a.number+1,b.infos=a.content})},a.list(function(a){console.log("后台返回记录数:"+a.content.length),b.totalItems=a.totalElements,b.currentPage=a.number+1,b.infos=a.content}),b.showDetail=function(){alert("时刻信息详细")},b.detailHeads=["路牌","出场","华高新村1","陆家嘴地铁站1","华高新村2","陆家嘴地铁站2","华高新村3","陆家嘴地铁站3","华高新村4","陆家嘴地铁站4","华高新村5","陆家嘴地铁站5","华高新村6","陆家嘴地铁站6","华高新村7","陆家嘴地铁站7","华高新村8","陆家嘴地铁站8","进场","空驶班次数/里程","运营班次数/里程"],b.detailInfos=[["1","07:01","","","07:11","08:01","09:22","10:12","11:34","12:24","13:34","14:24","15:42","16:32","18:00","18:50","","","19:46","2/1.6","12/198"],["2","06:51","07:01","07:51","09:12","10:02","11:22","12:12","13:22","14:12","15:36","16:26","17:55","18:45","20:05","20:55","","","21:51","2/1.6","14/231"],["3","05:56","06:06","06:56","08:05","08:55","10:34","11:24","12:20","","","17:01","17:11","18:01","19:10","19:58","21:16","22:08","23:04","4/3.2","12/198"],["4","06:20","06:30","07:20","08:20","09:10","11:02","08:38","12:46","13:36","12:57","15:44","17:20","18:10","19:24","20:14","","","21:10","2/1.6","14/231"],["5","07:21","","","07:31","08:21","09:46","10:36","11:58","12:48","13:36","14:46","16:06","16:56","18:18","19:08","","","20:04","2/1.6","12/198"],["6","06:36","06:46","07:36","08:40","09:30","10:58","11:48","12:58","13:48","15:18","16:08","17:40","18:30","19:48","20:38","21:50","22:49","23:45","2/1.6","16/264"],["7","07:30","","","07:40","08:31","09:58","10:48","12:10","13:00","13:56","16:20","16:30","17:20","18:30","19:20","20:41","21:31","22:27","4/3.2","12/198"],["8","07:46","","","07:56","08:46","10:22","11:12","12:34","13:24","14:20","16:38","16:48","17:38","18:49","19:38","21:00","21:50","22:46","4/3.2","12/198"],["9","07:38","","","07:48","08:38","10:10","10:00","12:22","13:12","14:30","15:20","16:44","17:34","18:42","19:32","","","20:28","2/1.6","12/198"],["10","06:46","06:56","07:46","09:00","09:50","11:10","12:00","13:10","14:00","15:24","16:14","17:45","18:35","19:56","20:46","22:00","23:00","23:56","2/1.6","16/264"],["+1","05:10","05:20","06:10","07:21","08:11","09:07","","","","","15:44","15:54","16:44","18:12","19:02","20:23","21:13","22:09","4/3.2","10/165"],["+2","05:30","05:40","06:30","07:44","08:34","09:30","","","","","16:29","16:39","17:29","18:36","19:26","20:50","21:40","22:36","4/3.2","10/165"],["+3","05:30","","06:00","07:16","08:06","09:02","","","","","15:38","15:48","16:38","18:06","18:56","20:14","21:04","22:00","4/14.95","9/149"],["+4","05:48","05:58","06:48","08:00","08:50","09:46","","","","","16:52","17:02","17:52","19:03","19:50","21:08","21:59","22:54","4/3.2","10/165"],["+5","05:40","05:50","06:40","07:52","08:42","09:38","","","14:26","14:36","15:26","16:53","17:43","18:56","19:44","","","20:40","4/3.2","10/165"],["+6","06:31","06:41","07:31","08:31","09:21","10:17","","","14:56","15:06","15:56","17:30","18:20","19:32","20:22","21:32","22:27","23:23","4/3.2","12/198"],["+7","05:20","05:30","06:20","07:36","08:26","09:22","","","","","16:08","16:18","17:08","18:24","19:14","20:32","21:22","22:18","4/3.2","10/165"],["+8","06:04","06:14","07:04","08:10","09:00","09:56","","","","","17:05","17:15","18:05","19:17","20:06","21:24","22:17","23:13","4/3.2","10/165"],["+9","06:41","06:51","07:41","08:50","09:40","10:36","","","15:02","15:12","16:02","17:35","18:25","19:40","20:30","21:40","22:38","23:34","4/3.2","12/198"],["+10","07:16","","","07:26","08:16","09:34","10:24","11:46","12:36","13:46","14:36","16:00","16:50","","","","","17:46","2/1.6","10/165"],["+20","06:12","06:22","07:12","08:15","09:05","10:01","","","14:50","15:00","15:50","17:25","18:15","","","","","19:11","4/3.2","8/132"],["+21","06:26","06:36","07:26","08:25","09:15","10:11","","","15:20","15:30","16:20","17:50","18:40","","","","","19:36","4/3.2","8/132"],["+22","06:56","07:06","07:56","08:52","","","","","14:38","14:48","15:38","17:06","17:56","","","","","18:52","4/3.2","6/99"],["机1","13:56","","","","","","","","","14:06","14:56","16:12","17:02","","","","","17:58","2/1.6","4/66"],["机2","14:04","","","","","","","","","14:14","15:04","16:24","17:14","","","","","18:10","2/1.6","4/66"],["机3","14:12","","","","","","","","","14:22","15:12","16:35","17:25","","","","","18:21","2/1.6","4/66"],["机4","14:32","","","","","","","","","14:42","15:32","16:57","17:47","","","","","18:43","2/1.6","4/66"]]}]);</script> | |
| 127 | - | |
| 128 | -<script type="text/javascript"> | |
| 129 | - angular.bootstrap(document.getElementById("timeTableManage"), ["timeTableManageApp"]); | |
| 130 | -</script> | |
| 131 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/edit.html deleted
100644 → 0
| 1 | -<div class="page-head"> | |
| 2 | - <div class="page-title"> | |
| 3 | - <h1>添加时刻表基础信息</h1> | |
| 4 | - </div> | |
| 5 | -</div> | |
| 6 | - | |
| 7 | -<ul class="page-breadcrumb breadcrumb"> | |
| 8 | - <li> | |
| 9 | - <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | - <i class="fa fa-circle"></i> | |
| 11 | - </li> | |
| 12 | - <li> | |
| 13 | - <span class="active">运营计划管理</span> | |
| 14 | - <i class="fa fa-circle"></i> | |
| 15 | - </li> | |
| 16 | - <li> | |
| 17 | - <a ui-sref="timeTableManage">时刻表管理</a> | |
| 18 | - <i class="fa fa-circle"></i> | |
| 19 | - </li> | |
| 20 | - <li> | |
| 21 | - <span class="active">修改时刻表基础信息</span> | |
| 22 | - </li> | |
| 23 | -</ul> | |
| 24 | - | |
| 25 | -<div class="portlet light bordered" ng-controller="TimeTableManageFormCtrl as ctrl"> | |
| 26 | - <div class="portlet-title"> | |
| 27 | - <div class="caption"> | |
| 28 | - <i class="icon-equalizer font-red-sunglo"></i> <span | |
| 29 | - class="caption-subject font-red-sunglo bold uppercase">表单</span> | |
| 30 | - </div> | |
| 31 | - </div> | |
| 32 | - | |
| 33 | - <div class="portlet-body form"> | |
| 34 | - <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> | |
| 35 | - <!--<div class="alert alert-danger display-hide">--> | |
| 36 | - <!--<button class="close" data-close="alert"></button>--> | |
| 37 | - <!--您的输入有误,请检查下面的输入项--> | |
| 38 | - <!--</div>--> | |
| 39 | - | |
| 40 | - | |
| 41 | - <!-- 其他信息放置在这里 --> | |
| 42 | - <div class="form-body"> | |
| 43 | - <div class="form-group has-success has-feedback"> | |
| 44 | - <label class="col-md-2 control-label">线路*:</label> | |
| 45 | - <div class="col-md-3"> | |
| 46 | - <sa-Select5 name="xl" | |
| 47 | - model="ctrl.timeTableManageForForm" | |
| 48 | - cmaps="{'xl.id' : 'id'}" | |
| 49 | - dcname="xl.id" | |
| 50 | - icname="id" | |
| 51 | - dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'xl' } | json }}" | |
| 52 | - iterobjname="item" | |
| 53 | - iterobjexp="item.name" | |
| 54 | - searchph="请输拼音..." | |
| 55 | - searchexp="this.name" | |
| 56 | - required > | |
| 57 | - </sa-Select5> | |
| 58 | - </div> | |
| 59 | - <!-- 隐藏块,显示验证信息 --> | |
| 60 | - <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required"> | |
| 61 | - 线路必须选择 | |
| 62 | - </div> | |
| 63 | - </div> | |
| 64 | - | |
| 65 | - <div class="form-group has-success has-feedback"> | |
| 66 | - <label class="col-md-2 control-label">线路走向*:</label> | |
| 67 | - <div class="col-md-3"> | |
| 68 | - <sa-Radiogroup model="ctrl.timeTableManageForForm.xlDir" dicgroup="LineTrend2" name="xlDir" required></sa-Radiogroup> | |
| 69 | - </div> | |
| 70 | - <!-- 隐藏块,显示验证信息 --> | |
| 71 | - <div class="alert alert-danger well-sm" ng-show="myForm.xlDir.$error.required"> | |
| 72 | - 线路走向必须填写 | |
| 73 | - </div> | |
| 74 | - </div> | |
| 75 | - | |
| 76 | - <div class="form-group has-success has-feedback"> | |
| 77 | - <label class="col-md-2 control-label">时刻表名字*:</label> | |
| 78 | - <div class="col-md-3"> | |
| 79 | - <input type="text" class="form-control" ng-model="ctrl.timeTableManageForForm.name" | |
| 80 | - name="name" placeholder="请输入时刻表名字..." required | |
| 81 | - remote-Validation | |
| 82 | - remotevtype="ttc1" | |
| 83 | - remotevparam="{{ {'xl.id_eq': ctrl.timeTableManageForForm.xl.id, 'name_eq': ctrl.timeTableManageForForm.name} | json}}" | |
| 84 | - /> | |
| 85 | - </div> | |
| 86 | - | |
| 87 | - <!-- 隐藏块,显示验证信息 --> | |
| 88 | - <div class="alert alert-danger well-sm" ng-show="myForm.name.$error.required"> | |
| 89 | - 时刻表名字必须填写 | |
| 90 | - </div> | |
| 91 | - <div class="alert alert-danger well-sm" ng-show="myForm.name.$error.remote"> | |
| 92 | - 相同线路下的时刻表不能同名 | |
| 93 | - </div> | |
| 94 | - </div> | |
| 95 | - | |
| 96 | - <div class="form-group has-success has-feedback"> | |
| 97 | - <label class="col-md-2 control-label">启用日期*:</label> | |
| 98 | - <div class="col-md-3"> | |
| 99 | - <div class="input-group"> | |
| 100 | - <input type="text" class="form-control" | |
| 101 | - name="qyrq" placeholder="请选择启用日期..." | |
| 102 | - uib-datepicker-popup="yyyy年MM月dd日" | |
| 103 | - is-open="ctrl.qyrqOpen" | |
| 104 | - ng-model="ctrl.timeTableManageForForm.qyrq" readonly required/> | |
| 105 | - <span class="input-group-btn"> | |
| 106 | - <button type="button" class="btn btn-default" ng-click="ctrl.qyrq_open()"> | |
| 107 | - <i class="glyphicon glyphicon-calendar"></i> | |
| 108 | - </button> | |
| 109 | - </span> | |
| 110 | - </div> | |
| 111 | - </div> | |
| 112 | - | |
| 113 | - <!-- 隐藏块,显示验证信息 --> | |
| 114 | - <div class="alert alert-danger well-sm" ng-show="myForm.qyrq.$error.required"> | |
| 115 | - 启用日期必须填写 | |
| 116 | - </div> | |
| 117 | - </div> | |
| 118 | - | |
| 119 | - <div class="form-group has-success has-feedback"> | |
| 120 | - <label class="col-md-2 control-label">是否启用*:</label> | |
| 121 | - <div class="col-md-3"> | |
| 122 | - <sa-Radiogroup model="ctrl.timeTableManageForForm.isEnableDisTemplate" dicgroup="truefalseType" name="isEnableDisTemplate" required></sa-Radiogroup> | |
| 123 | - </div> | |
| 124 | - | |
| 125 | - <!-- 隐藏块,显示验证信息 --> | |
| 126 | - <div class="alert alert-danger well-sm" ng-show="myForm.isEnableDisTemplate.$error.required"> | |
| 127 | - 是否启用必须选择 | |
| 128 | - </div> | |
| 129 | - | |
| 130 | - </div> | |
| 131 | - | |
| 132 | - <div class="form-group"> | |
| 133 | - <label class="col-md-2 control-label">路牌数量:</label> | |
| 134 | - <div class="col-md-3"> | |
| 135 | - <input type="number" class="form-control" ng-model="ctrl.timeTableManageForForm.lpCount" | |
| 136 | - name="lpCount" placeholder="请输入路牌数..." min="1"/> | |
| 137 | - </div> | |
| 138 | - <div class="alert alert-danger well-sm" ng-show="myForm.lpCount.$error.number"> | |
| 139 | - 必须输入数字 | |
| 140 | - </div> | |
| 141 | - <div class="alert alert-danger well-sm" ng-show="myForm.lpCount.$error.min"> | |
| 142 | - 路爬数量必须大于1 | |
| 143 | - </div> | |
| 144 | - </div> | |
| 145 | - | |
| 146 | - <div class="form-group"> | |
| 147 | - <label class="col-md-2 control-label">营运圈数:</label> | |
| 148 | - <div class="col-md-3"> | |
| 149 | - <input type="number" class="form-control" ng-model="ctrl.timeTableManageForForm.loopCount" | |
| 150 | - name="loopCount" placeholder="请输入圈数..." min="1"/> | |
| 151 | - </div> | |
| 152 | - <div class="alert alert-danger well-sm" ng-show="myForm.loopCount.$error.number"> | |
| 153 | - 必须输入数字 | |
| 154 | - </div> | |
| 155 | - <div class="alert alert-danger well-sm" ng-show="myForm.loopCount.$error.min"> | |
| 156 | - 营运圈数必须大于1 | |
| 157 | - </div> | |
| 158 | - </div> | |
| 159 | - | |
| 160 | - <div class="form-group"> | |
| 161 | - <label class="col-md-2 control-label">常规有效日:</label> | |
| 162 | - <div class="col-md-6"> | |
| 163 | - <sa-Checkboxgroup model="ctrl.timeTableManageForForm" | |
| 164 | - name="rule_days" | |
| 165 | - dcvalue="{{ctrl.timeTableManageForForm.rule_days}}" | |
| 166 | - dcname="rule_days" | |
| 167 | - required > | |
| 168 | - </sa-Checkboxgroup> | |
| 169 | - </div> | |
| 170 | - <div class="alert alert-danger well-sm" ng-show="myForm.rule_days.$error.required"> | |
| 171 | - 请操作一下1 | |
| 172 | - </div> | |
| 173 | - </div> | |
| 174 | - | |
| 175 | - <div class="form-group"> | |
| 176 | - <label class="col-md-2 control-label">特殊有效日:</label> | |
| 177 | - <div class="col-md-6"> | |
| 178 | - <sa-Dategroup model="ctrl.timeTableManageForForm" | |
| 179 | - name="special_days" | |
| 180 | - dcvalue="{{ctrl.timeTableManageForForm.special_days}}" | |
| 181 | - dcname="special_days" | |
| 182 | - > | |
| 183 | - </sa-Dategroup> | |
| 184 | - </div> | |
| 185 | - <div class="alert alert-danger well-sm" ng-show="myForm.special_days.$error.required"> | |
| 186 | - 请操作一下2 | |
| 187 | - </div> | |
| 188 | - </div> | |
| 189 | - | |
| 190 | - <!--<div class="form-group">--> | |
| 191 | - <!--<label class="col-md-2 control-label">备注:</label>--> | |
| 192 | - <!--</div>--> | |
| 193 | - | |
| 194 | - <!-- 其他form-group --> | |
| 195 | - | |
| 196 | - </div> | |
| 197 | - | |
| 198 | - <!-- TODO:!myForm.$valid 在这里有点问题,改用以下方法验证 --> | |
| 199 | - <div class="form-actions"> | |
| 200 | - <div class="row"> | |
| 201 | - <div class="col-md-offset-3 col-md-4"> | |
| 202 | - <button type="submit" class="btn green" | |
| 203 | - ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | |
| 204 | - <a type="button" class="btn default" ui-sref="timeTableManage" ><i class="fa fa-times"></i> 取消</a> | |
| 205 | - </div> | |
| 206 | - </div> | |
| 207 | - </div> | |
| 208 | - | |
| 209 | - </form> | |
| 210 | - | |
| 211 | - </div> | |
| 212 | - | |
| 213 | - | |
| 214 | -</div> | |
| 215 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/form.html deleted
100644 → 0
| 1 | -<div class="page-head"> | |
| 2 | - <div class="page-title"> | |
| 3 | - <h1>添加时刻表基础信息</h1> | |
| 4 | - </div> | |
| 5 | -</div> | |
| 6 | - | |
| 7 | -<ul class="page-breadcrumb breadcrumb"> | |
| 8 | - <li> | |
| 9 | - <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | - <i class="fa fa-circle"></i> | |
| 11 | - </li> | |
| 12 | - <li> | |
| 13 | - <span class="active">运营计划管理</span> | |
| 14 | - <i class="fa fa-circle"></i> | |
| 15 | - </li> | |
| 16 | - <li> | |
| 17 | - <a ui-sref="timeTableManage">时刻表管理</a> | |
| 18 | - <i class="fa fa-circle"></i> | |
| 19 | - </li> | |
| 20 | - <li> | |
| 21 | - <span class="active">添加时刻表基础信息</span> | |
| 22 | - </li> | |
| 23 | -</ul> | |
| 24 | - | |
| 25 | -<div class="portlet light bordered" ng-controller="TimeTableManageFormCtrl as ctrl"> | |
| 26 | - <div class="portlet-title"> | |
| 27 | - <div class="caption"> | |
| 28 | - <i class="icon-equalizer font-red-sunglo"></i> <span | |
| 29 | - class="caption-subject font-red-sunglo bold uppercase">表单</span> | |
| 30 | - </div> | |
| 31 | - </div> | |
| 32 | - | |
| 33 | - <div class="portlet-body form"> | |
| 34 | - <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> | |
| 35 | - <!--<div class="alert alert-danger display-hide">--> | |
| 36 | - <!--<button class="close" data-close="alert"></button>--> | |
| 37 | - <!--您的输入有误,请检查下面的输入项--> | |
| 38 | - <!--</div>--> | |
| 39 | - | |
| 40 | - | |
| 41 | - <!-- 其他信息放置在这里 --> | |
| 42 | - <div class="form-body"> | |
| 43 | - <div class="form-group has-success has-feedback"> | |
| 44 | - <label class="col-md-2 control-label">线路*:</label> | |
| 45 | - <div class="col-md-3"> | |
| 46 | - <sa-Select5 name="xl" | |
| 47 | - model="ctrl.timeTableManageForForm" | |
| 48 | - cmaps="{'xl.id' : 'id'}" | |
| 49 | - dcname="xl.id" | |
| 50 | - icname="id" | |
| 51 | - dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'xl' } | json }}" | |
| 52 | - iterobjname="item" | |
| 53 | - iterobjexp="item.name" | |
| 54 | - searchph="请输拼音..." | |
| 55 | - searchexp="this.name" | |
| 56 | - required > | |
| 57 | - </sa-Select5> | |
| 58 | - </div> | |
| 59 | - <!-- 隐藏块,显示验证信息 --> | |
| 60 | - <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required"> | |
| 61 | - 线路必须选择 | |
| 62 | - </div> | |
| 63 | - </div> | |
| 64 | - | |
| 65 | - <div class="form-group has-success has-feedback"> | |
| 66 | - <label class="col-md-2 control-label">线路走向*:</label> | |
| 67 | - <div class="col-md-3"> | |
| 68 | - <sa-Radiogroup model="ctrl.timeTableManageForForm.xlDir" dicgroup="LineTrend2" name="xlDir" required></sa-Radiogroup> | |
| 69 | - </div> | |
| 70 | - <!-- 隐藏块,显示验证信息 --> | |
| 71 | - <div class="alert alert-danger well-sm" ng-show="myForm.xlDir.$error.required"> | |
| 72 | - 线路走向必须填写 | |
| 73 | - </div> | |
| 74 | - </div> | |
| 75 | - | |
| 76 | - <div class="form-group has-success has-feedback"> | |
| 77 | - <label class="col-md-2 control-label">时刻表名字*:</label> | |
| 78 | - <div class="col-md-3"> | |
| 79 | - <input type="text" class="form-control" ng-model="ctrl.timeTableManageForForm.name" | |
| 80 | - name="name" placeholder="请输入时刻表名字..." required | |
| 81 | - remote-Validation | |
| 82 | - remotevtype="ttc1" | |
| 83 | - remotevparam="{{ {'xl.id_eq': ctrl.timeTableManageForForm.xl.id, 'name_eq': ctrl.timeTableManageForForm.name} | json}}" | |
| 84 | - /> | |
| 85 | - </div> | |
| 86 | - | |
| 87 | - <!-- 隐藏块,显示验证信息 --> | |
| 88 | - <div class="alert alert-danger well-sm" ng-show="myForm.name.$error.required"> | |
| 89 | - 时刻表名字必须填写 | |
| 90 | - </div> | |
| 91 | - <div class="alert alert-danger well-sm" ng-show="myForm.name.$error.remote"> | |
| 92 | - 相同线路下的时刻表不能同名 | |
| 93 | - </div> | |
| 94 | - </div> | |
| 95 | - | |
| 96 | - <div class="form-group has-success has-feedback"> | |
| 97 | - <label class="col-md-2 control-label">启用日期*:</label> | |
| 98 | - <div class="col-md-3"> | |
| 99 | - <div class="input-group"> | |
| 100 | - <input type="text" class="form-control" | |
| 101 | - name="qyrq" placeholder="请选择启用日期..." | |
| 102 | - uib-datepicker-popup="yyyy年MM月dd日" | |
| 103 | - is-open="ctrl.qyrqOpen" | |
| 104 | - ng-model="ctrl.timeTableManageForForm.qyrq" readonly required/> | |
| 105 | - <span class="input-group-btn"> | |
| 106 | - <button type="button" class="btn btn-default" ng-click="ctrl.qyrq_open()"> | |
| 107 | - <i class="glyphicon glyphicon-calendar"></i> | |
| 108 | - </button> | |
| 109 | - </span> | |
| 110 | - </div> | |
| 111 | - </div> | |
| 112 | - | |
| 113 | - <!-- 隐藏块,显示验证信息 --> | |
| 114 | - <div class="alert alert-danger well-sm" ng-show="myForm.qyrq.$error.required"> | |
| 115 | - 启用日期必须填写 | |
| 116 | - </div> | |
| 117 | - </div> | |
| 118 | - | |
| 119 | - <div class="form-group has-success has-feedback"> | |
| 120 | - <label class="col-md-2 control-label">是否启用*:</label> | |
| 121 | - <div class="col-md-3"> | |
| 122 | - <sa-Radiogroup model="ctrl.timeTableManageForForm.isEnableDisTemplate" dicgroup="truefalseType" name="isEnableDisTemplate" required></sa-Radiogroup> | |
| 123 | - </div> | |
| 124 | - | |
| 125 | - <!-- 隐藏块,显示验证信息 --> | |
| 126 | - <div class="alert alert-danger well-sm" ng-show="myForm.isEnableDisTemplate.$error.required"> | |
| 127 | - 是否启用必须选择 | |
| 128 | - </div> | |
| 129 | - | |
| 130 | - </div> | |
| 131 | - | |
| 132 | - <div class="form-group"> | |
| 133 | - <label class="col-md-2 control-label">路牌数量:</label> | |
| 134 | - <div class="col-md-3"> | |
| 135 | - <input type="number" class="form-control" ng-model="ctrl.timeTableManageForForm.lpCount" | |
| 136 | - name="lpCount" placeholder="请输入路牌数..." min="1"/> | |
| 137 | - </div> | |
| 138 | - <div class="alert alert-danger well-sm" ng-show="myForm.lpCount.$error.number"> | |
| 139 | - 必须输入数字 | |
| 140 | - </div> | |
| 141 | - <div class="alert alert-danger well-sm" ng-show="myForm.lpCount.$error.min"> | |
| 142 | - 路爬数量必须大于1 | |
| 143 | - </div> | |
| 144 | - </div> | |
| 145 | - | |
| 146 | - <div class="form-group"> | |
| 147 | - <label class="col-md-2 control-label">营运圈数:</label> | |
| 148 | - <div class="col-md-3"> | |
| 149 | - <input type="number" class="form-control" ng-model="ctrl.timeTableManageForForm.loopCount" | |
| 150 | - name="loopCount" placeholder="请输入圈数..." min="1"/> | |
| 151 | - </div> | |
| 152 | - <div class="alert alert-danger well-sm" ng-show="myForm.loopCount.$error.number"> | |
| 153 | - 必须输入数字 | |
| 154 | - </div> | |
| 155 | - <div class="alert alert-danger well-sm" ng-show="myForm.loopCount.$error.min"> | |
| 156 | - 营运圈数必须大于1 | |
| 157 | - </div> | |
| 158 | - </div> | |
| 159 | - | |
| 160 | - <div class="form-group"> | |
| 161 | - <label class="col-md-2 control-label">常规有效日:</label> | |
| 162 | - <div class="col-md-6"> | |
| 163 | - <sa-Checkboxgroup model="ctrl.timeTableManageForForm" | |
| 164 | - name="rule_days" | |
| 165 | - dcvalue="{{ctrl.timeTableManageForForm.rule_days}}" | |
| 166 | - dcname="rule_days" | |
| 167 | - required > | |
| 168 | - </sa-Checkboxgroup> | |
| 169 | - </div> | |
| 170 | - <div class="alert alert-danger well-sm" ng-show="myForm.rule_days.$error.required"> | |
| 171 | - 请操作一下1 | |
| 172 | - </div> | |
| 173 | - </div> | |
| 174 | - | |
| 175 | - <div class="form-group"> | |
| 176 | - <label class="col-md-2 control-label">特殊有效日:</label> | |
| 177 | - <div class="col-md-6"> | |
| 178 | - <sa-Dategroup model="ctrl.timeTableManageForForm" | |
| 179 | - name="special_days" | |
| 180 | - dcvalue="{{ctrl.timeTableManageForForm.special_days}}" | |
| 181 | - dcname="special_days" | |
| 182 | - > | |
| 183 | - </sa-Dategroup> | |
| 184 | - </div> | |
| 185 | - <div class="alert alert-danger well-sm" ng-show="myForm.special_days.$error.required"> | |
| 186 | - 请操作一下2 | |
| 187 | - </div> | |
| 188 | - </div> | |
| 189 | - | |
| 190 | - <!--<div class="form-group">--> | |
| 191 | - <!--<label class="col-md-2 control-label">备注:</label>--> | |
| 192 | - <!--</div>--> | |
| 193 | - | |
| 194 | - <!-- 其他form-group --> | |
| 195 | - | |
| 196 | - </div> | |
| 197 | - | |
| 198 | - <!-- TODO:!myForm.$valid 在这里有点问题,改用以下方法验证 --> | |
| 199 | - <div class="form-actions"> | |
| 200 | - <div class="row"> | |
| 201 | - <div class="col-md-offset-3 col-md-4"> | |
| 202 | - <button type="submit" class="btn green" | |
| 203 | - ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | |
| 204 | - <a type="button" class="btn default" ui-sref="timeTableManage" ><i class="fa fa-times"></i> 取消</a> | |
| 205 | - </div> | |
| 206 | - </div> | |
| 207 | - </div> | |
| 208 | - | |
| 209 | - </form> | |
| 210 | - | |
| 211 | - </div> | |
| 212 | - | |
| 213 | - | |
| 214 | -</div> | |
| 215 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/index.html deleted
100644 → 0
| 1 | -<div class="page-head"> | |
| 2 | - <div class="page-title"> | |
| 3 | - <h1>时刻表管理</h1> | |
| 4 | - </div> | |
| 5 | -</div> | |
| 6 | - | |
| 7 | -<ul class="page-breadcrumb breadcrumb"> | |
| 8 | - <li> | |
| 9 | - <a href="/pages/home.html" data-pjax>首页</a> | |
| 10 | - <i class="fa fa-circle"></i> | |
| 11 | - </li> | |
| 12 | - <li> | |
| 13 | - <span class="active">运营计划管理</span> | |
| 14 | - <i class="fa fa-circle"></i> | |
| 15 | - </li> | |
| 16 | - <li> | |
| 17 | - <span class="active">时刻表管理</span> | |
| 18 | - </li> | |
| 19 | -</ul> | |
| 20 | - | |
| 21 | -<div class="row"> | |
| 22 | - <div class="col-md-12" ng-controller="TimeTableManageCtrl as ctrl"> | |
| 23 | - <div class="portlet light bordered"> | |
| 24 | - <div class="portlet-title"> | |
| 25 | - <div class="caption font-dark"> | |
| 26 | - <i class="fa fa-database font-dark"></i> | |
| 27 | - <span class="caption-subject bold uppercase">时刻表</span> | |
| 28 | - </div> | |
| 29 | - <div class="actions"> | |
| 30 | - <a href="javascirpt:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> | |
| 31 | - <i class="fa fa-plus"></i> | |
| 32 | - 添加时刻表 | |
| 33 | - </a> | |
| 34 | - | |
| 35 | - <div class="btn-group"> | |
| 36 | - <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | |
| 37 | - <i class="fa fa-share"></i> | |
| 38 | - <span>数据工具</span> | |
| 39 | - <i class="fa fa-angle-down"></i> | |
| 40 | - </a> | |
| 41 | - <ul class="dropdown-menu pull-right"> | |
| 42 | - <li class="divider"></li> | |
| 43 | - <li> | |
| 44 | - <a href="javascript:" class="tool-action"> | |
| 45 | - <i class="fa fa-download"></i> | |
| 46 | - excel模版 | |
| 47 | - </a> | |
| 48 | - </li> | |
| 49 | - </ul> | |
| 50 | - </div> | |
| 51 | - </div> | |
| 52 | - </div> | |
| 53 | - | |
| 54 | - <div class="portlet-body"> | |
| 55 | - <div ui-view="timeTableManage_list"></div> | |
| 56 | - </div> | |
| 57 | - </div> | |
| 58 | - </div> | |
| 59 | -</div> | |
| 60 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/list.html deleted
100644 → 0
| 1 | -<!-- ui-route employeeInfoManage.list --> | |
| 2 | -<div ng-controller="TimeTableManageListCtrl as ctrl"> | |
| 3 | - <div class="fixDiv"> | |
| 4 | - <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column"> | |
| 5 | - <thead> | |
| 6 | - <tr role="row" class="heading"> | |
| 7 | - <th style="width: 50px;">序号</th> | |
| 8 | - <th style="width: 150px;">线路</th> | |
| 9 | - <th style="width: 180px;">时刻表名称</th> | |
| 10 | - <th style="width: 100px">路牌数/圈数</th> | |
| 11 | - <th style="width: 80px">上下行</th> | |
| 12 | - <th style="width: 50px;">启用</th> | |
| 13 | - <th style="width: 120px">启用日期</th> | |
| 14 | - <th style="width: 50%">时刻表明细</th> | |
| 15 | - <th style="width: 50%">操作</th> | |
| 16 | - </tr> | |
| 17 | - <tr role="row" class="filter"> | |
| 18 | - <td></td> | |
| 19 | - <td> | |
| 20 | - <sa-Select3 model="ctrl.searchCondition()" | |
| 21 | - name="xl" | |
| 22 | - placeholder="请输拼音..." | |
| 23 | - dcvalue="{{ctrl.searchCondition()['xl.id_eq']}}" | |
| 24 | - dcname="xl.id_eq" | |
| 25 | - icname="id" | |
| 26 | - icnames="name" | |
| 27 | - datatype="xl"> | |
| 28 | - </sa-Select3> | |
| 29 | - </td> | |
| 30 | - <td> | |
| 31 | - <input type="text" class="form-control form-filter input-sm" ng-model="ctrl.searchCondition().name_like" placeholder="输入时刻表名称..."/> | |
| 32 | - </td> | |
| 33 | - <td></td> | |
| 34 | - <td></td> | |
| 35 | - <td></td> | |
| 36 | - <td></td> | |
| 37 | - <td></td> | |
| 38 | - <td> | |
| 39 | - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" | |
| 40 | - ng-click="ctrl.pageChanaged()"> | |
| 41 | - <i class="fa fa-search"></i> 搜索</button> | |
| 42 | - | |
| 43 | - <button class="btn btn-sm red btn-outline filter-cancel" | |
| 44 | - ng-click="ctrl.resetSearchCondition()"> | |
| 45 | - <i class="fa fa-times"></i> 重置</button> | |
| 46 | - </td> | |
| 47 | - </tr> | |
| 48 | - | |
| 49 | - </thead> | |
| 50 | - <tbody> | |
| 51 | - <tr ng-repeat="info in ctrl.pageInfo.infos" ng-class="{odd: true, gradeX: true, danger: info.isCancel}"> | |
| 52 | - <td> | |
| 53 | - <span ng-bind="$index + 1"></span> | |
| 54 | - </td> | |
| 55 | - <td> | |
| 56 | - <span ng-bind="info.xl.name"></span> | |
| 57 | - </td> | |
| 58 | - <td> | |
| 59 | - <span ng-bind="info.name" title="{{info.name}}"></span> | |
| 60 | - </td> | |
| 61 | - <td> | |
| 62 | - <span ng-bind="info.lpCount"></span> | |
| 63 | - / | |
| 64 | - <span ng-bind="info.loopCount"></span> | |
| 65 | - </td> | |
| 66 | - <td> | |
| 67 | - <span ng-bind="info.xlDir | dict:'LineTrend2':'未知' "></span> | |
| 68 | - </td> | |
| 69 | - <td> | |
| 70 | - <span ng-bind="info.isEnableDisTemplate | dict:'truefalseType':'未知' "></span> | |
| 71 | - </td> | |
| 72 | - <td> | |
| 73 | - <span ng-bind="info.qyrq | date: 'yyyy-MM-dd'"></span> | |
| 74 | - </td> | |
| 75 | - <td> | |
| 76 | - <a ui-sref="timeTableDetailInfoManage({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})" | |
| 77 | - class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑 </a> | |
| 78 | - <a ng-click="ctrl.importData($index)" class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 导入 </a> | |
| 79 | - <a href="javascript:" class="btn btn-info btn-sm"> 导出 </a> | |
| 80 | - </td> | |
| 81 | - <td> | |
| 82 | - <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> | |
| 83 | - <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> | |
| 84 | - <a ui-sref="timeTableManage_detail({id: info.id})" class="btn btn-info btn-sm"> 详细 </a> | |
| 85 | - <a ui-sref="timeTableManage_edit({id: info.id})" class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 修改 </a> | |
| 86 | - <a ng-click="ctrl.toggleTtinfo(info.id)" class="btn btn-danger btn-sm" ng-if="info.isCancel == '0'"> 作废 </a> | |
| 87 | - <a ng-click="ctrl.toggleTtinfo(info.id)" class="btn btn-success btn-sm" ng-if="info.isCancel == '1'"> 撤销 </a> | |
| 88 | - </td> | |
| 89 | - </tr> | |
| 90 | - </tbody> | |
| 91 | - </table> | |
| 92 | - </div> | |
| 93 | - | |
| 94 | - <div style="text-align: right;"> | |
| 95 | - <uib-pagination total-items="ctrl.pageInfo.totalItems" | |
| 96 | - ng-model="ctrl.pageInfo.currentPage" | |
| 97 | - ng-change="ctrl.pageChanaged()" | |
| 98 | - rotate="false" | |
| 99 | - max-size="10" | |
| 100 | - boundary-links="true" | |
| 101 | - first-text="首页" | |
| 102 | - previous-text="上一页" | |
| 103 | - next-text="下一页" | |
| 104 | - last-text="尾页"> | |
| 105 | - </uib-pagination> | |
| 106 | - </div> | |
| 107 | -</div> | |
| 108 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/timeTableDetailManage.js deleted
100644 → 0
| 1 | - | |
| 2 | -angular.module('ScheduleApp').factory('TimeTableDetailManageService', ['TimeTableDetailManageService_g', function(service) { | |
| 3 | - | |
| 4 | - return { | |
| 5 | - /** | |
| 6 | - * 获取明细信息。 | |
| 7 | - * @param id 车辆id | |
| 8 | - * @return 返回一个 promise | |
| 9 | - */ | |
| 10 | - getDetail: function(id) { | |
| 11 | - var params = {id: id}; | |
| 12 | - return service.rest.get(params).$promise; | |
| 13 | - }, | |
| 14 | - /** | |
| 15 | - * 保存信息。 | |
| 16 | - * @param obj 车辆详细信息 | |
| 17 | - * @return 返回一个 promise | |
| 18 | - */ | |
| 19 | - saveDetail: function(obj) { | |
| 20 | - return service.rest.save(obj).$promise; | |
| 21 | - }, | |
| 22 | - /** | |
| 23 | - * 获取编辑用的时刻表明细数据。 | |
| 24 | - * @param ttid 时刻表id | |
| 25 | - */ | |
| 26 | - getEditInfo: function(xlid, ttid) { | |
| 27 | - var params = {xlid : xlid, ttid : ttid}; | |
| 28 | - return service.edit.list(params).$promise; | |
| 29 | - } | |
| 30 | - }; | |
| 31 | - | |
| 32 | -}]); | |
| 33 | - | |
| 34 | -angular.module('ScheduleApp').controller('TimeTableDetailManageCtrl', ['TimeTableDetailManageService', '$stateParams', '$uibModal', function(timeTableDetailManageService, $stateParams, $uibModal) { | |
| 35 | - var self = this; | |
| 36 | - self.xlid = $stateParams.xlid; // 获取传过来的线路id | |
| 37 | - self.ttid = $stateParams.ttid; // 获取传过来的时刻表id | |
| 38 | - self.xlname = $stateParams.xlname; // 获取传过来的线路名字 | |
| 39 | - self.ttname = $stateParams.ttname; // 获取传过来的时刻表名字 | |
| 40 | - | |
| 41 | - self.title = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息"; | |
| 42 | - | |
| 43 | - // 载入待编辑的时刻表明细数据 | |
| 44 | - timeTableDetailManageService.getEditInfo(self.xlid, self.ttid).then( | |
| 45 | - function(result) { | |
| 46 | - // TODO;获取数据待展示 | |
| 47 | - self.detailHeads = result.header; | |
| 48 | - self.detailInfos = result.contents; | |
| 49 | - }, | |
| 50 | - function(result) { | |
| 51 | - alert("出错啦!"); | |
| 52 | - } | |
| 53 | - ); | |
| 54 | - | |
| 55 | - // 刷新数据 | |
| 56 | - self.refresh = function() { | |
| 57 | - timeTableDetailManageService.getEditInfo(self.xlid, self.ttid).then( | |
| 58 | - function(result) { | |
| 59 | - // TODO;获取数据待展示 | |
| 60 | - self.detailHeads = result.header; | |
| 61 | - self.detailInfos = result.contents; | |
| 62 | - }, | |
| 63 | - function(result) { | |
| 64 | - alert("出错啦!"); | |
| 65 | - } | |
| 66 | - ); | |
| 67 | - }; | |
| 68 | - | |
| 69 | - /** | |
| 70 | - * 反向操作。 | |
| 71 | - * @param cell 明细信息 | |
| 72 | - */ | |
| 73 | - self.changeDirect = function(detailInfo, xldir) { | |
| 74 | - timeTableDetailManageService.getDetail(detailInfo.ttdid).then( | |
| 75 | - function(result) { | |
| 76 | - result.xlDir = xldir; | |
| 77 | - timeTableDetailManageService.saveDetail(result).then( | |
| 78 | - function(result) { | |
| 79 | - detailInfo.xldir = xldir; | |
| 80 | - }, | |
| 81 | - function(result) { | |
| 82 | - alert("出错啦!"); | |
| 83 | - } | |
| 84 | - ); | |
| 85 | - }, | |
| 86 | - function(result) { | |
| 87 | - alert("出错啦!"); | |
| 88 | - } | |
| 89 | - ); | |
| 90 | - }; | |
| 91 | - | |
| 92 | - /** | |
| 93 | - * 更新分班。 | |
| 94 | - * @param detailInfo 明细信息 | |
| 95 | - * @param flag 分班标识 | |
| 96 | - */ | |
| 97 | - self.changeFB = function(detailInfo, flag) { | |
| 98 | - timeTableDetailManageService.getDetail(detailInfo.ttdid).then( | |
| 99 | - function(result) { | |
| 100 | - result.isFB = flag; | |
| 101 | - timeTableDetailManageService.saveDetail(result).then( | |
| 102 | - function(result) { | |
| 103 | - detailInfo.isfb = flag; | |
| 104 | - }, | |
| 105 | - function(result) { | |
| 106 | - alert("出错啦!"); | |
| 107 | - } | |
| 108 | - ); | |
| 109 | - }, | |
| 110 | - function(result) { | |
| 111 | - alert("出错啦!"); | |
| 112 | - } | |
| 113 | - ); | |
| 114 | - }; | |
| 115 | - | |
| 116 | - /** | |
| 117 | - * 改变便次类型。 | |
| 118 | - * @param detailInfo 明细信息 | |
| 119 | - * @param type 班次类型 | |
| 120 | - */ | |
| 121 | - self.changeBCType = function(detailInfo, type) { | |
| 122 | - timeTableDetailManageService.getDetail(detailInfo.ttdid).then( | |
| 123 | - function(result) { | |
| 124 | - result.bcType = type; | |
| 125 | - timeTableDetailManageService.saveDetail(result).then( | |
| 126 | - function(result) { | |
| 127 | - detailInfo.bc_type = type; | |
| 128 | - }, | |
| 129 | - function(result) { | |
| 130 | - alert("出错啦!"); | |
| 131 | - } | |
| 132 | - ); | |
| 133 | - }, | |
| 134 | - function(result) { | |
| 135 | - alert("出错啦!"); | |
| 136 | - } | |
| 137 | - ); | |
| 138 | - }; | |
| 139 | - | |
| 140 | -}]); | |
| 141 | - | |
| 142 | -angular.module('ScheduleApp').controller('TimeTableDetailManageFormCtrl', ['TimeTableDetailManageService', '$stateParams', '$state', function(timeTableDetailManageService, $stateParams, $state) { | |
| 143 | - var self = this; | |
| 144 | - | |
| 145 | - // 欲保存的busInfo信息,绑定 | |
| 146 | - self.TimeTableDetailForSave = {}; | |
| 147 | - | |
| 148 | - // 获取传过来的id,有的话就是修改,获取一遍数据 | |
| 149 | - var id = $stateParams.id; // 时刻明细班次id | |
| 150 | - self.xlid = $stateParams.xlid; // 获取传过来的线路id | |
| 151 | - self.ttid = $stateParams.ttid; // 获取传过来的时刻表id | |
| 152 | - self.xlname = $stateParams.xlname; // 获取传过来的线路名字 | |
| 153 | - self.ttname = $stateParams.ttname; // 获取传过来的时刻表名字 | |
| 154 | - | |
| 155 | - self.title1 = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息"; | |
| 156 | - | |
| 157 | - if (id) { | |
| 158 | - self.TimeTableDetailForSave.id = id; | |
| 159 | - timeTableDetailManageService.getDetail(id).then( | |
| 160 | - function(result) { | |
| 161 | - var key; | |
| 162 | - for (key in result) { | |
| 163 | - self.TimeTableDetailForSave[key] = result[key]; | |
| 164 | - } | |
| 165 | - | |
| 166 | - self.title2 = | |
| 167 | - self.xlname + "(" + self.ttname + ")" + "时刻表明细信息" + | |
| 168 | - "->路牌" + self.TimeTableDetailForSave.lp.lpName + | |
| 169 | - "->发车顺序号" + self.TimeTableDetailForSave.fcno + | |
| 170 | - "->班次详细信息"; | |
| 171 | - | |
| 172 | - }, | |
| 173 | - function(result) { | |
| 174 | - alert("出错啦!"); | |
| 175 | - } | |
| 176 | - ); | |
| 177 | - } | |
| 178 | - | |
| 179 | - // 提交方法 | |
| 180 | - self.submit = function() { | |
| 181 | - console.log(self.TimeTableDetailForSave); | |
| 182 | - //if (self.busInfoForSave) { | |
| 183 | - // delete $stateParams.id; | |
| 184 | - //} | |
| 185 | - timeTableDetailManageService.saveDetail(self.TimeTableDetailForSave).then( | |
| 186 | - function(result) { | |
| 187 | - // TODO:弹出框方式以后改 | |
| 188 | - if (result.status == 'SUCCESS') { | |
| 189 | - alert("保存成功!"); | |
| 190 | - $state.go("timeTableDetailInfoManage", { | |
| 191 | - xlid: self.xlid, | |
| 192 | - ttid: self.ttid, | |
| 193 | - xlname: self.xlname, | |
| 194 | - ttname: self.ttname | |
| 195 | - }); | |
| 196 | - } else { | |
| 197 | - alert("保存异常!"); | |
| 198 | - } | |
| 199 | - }, | |
| 200 | - function(result) { | |
| 201 | - // TODO:弹出框方式以后改 | |
| 202 | - alert("出错啦!"); | |
| 203 | - } | |
| 204 | - ); | |
| 205 | - }; | |
| 206 | - | |
| 207 | -}]); | |
| 208 | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/timeTableManage.js deleted
100644 → 0
| 1 | -// 时刻表管理 service controller 等写在一起 | |
| 2 | -angular.module('ScheduleApp').factory('TimeTableManageService', ['TimeTableManageService_g', function(service) { | |
| 3 | - /** 当前的查询条件信息 */ | |
| 4 | - var currentSearchCondition = {}; | |
| 5 | - | |
| 6 | - /** 当前第几页 */ | |
| 7 | - var currentPageNo = 1; | |
| 8 | - | |
| 9 | - return { | |
| 10 | - /** | |
| 11 | - * 获取查询条件信息, | |
| 12 | - * 用于给controller用来和页面数据绑定。 | |
| 13 | - */ | |
| 14 | - getSearchCondition: function() { | |
| 15 | - return currentSearchCondition; | |
| 16 | - }, | |
| 17 | - /** | |
| 18 | - * 重置查询条件信息。 | |
| 19 | - */ | |
| 20 | - resetSearchCondition: function() { | |
| 21 | - var key; | |
| 22 | - for (key in currentSearchCondition) { | |
| 23 | - currentSearchCondition[key] = undefined; | |
| 24 | - } | |
| 25 | - }, | |
| 26 | - /** | |
| 27 | - * 设置当前页码。 | |
| 28 | - * @param cpn 从1开始,后台是从0开始的 | |
| 29 | - */ | |
| 30 | - setCurrentPageNo: function(cpn) { | |
| 31 | - currentPageNo = cpn; | |
| 32 | - }, | |
| 33 | - /** | |
| 34 | - * 组装查询参数,返回一个promise查询结果。 | |
| 35 | - * @param params 查询参数 | |
| 36 | - * @return 返回一个 promise | |
| 37 | - */ | |
| 38 | - getPage: function() { | |
| 39 | - var params = currentSearchCondition; // 查询条件 | |
| 40 | - params.page = currentPageNo - 1; // 服务端页码从0开始 | |
| 41 | - return service.rest.list(params).$promise; | |
| 42 | - }, | |
| 43 | - /** | |
| 44 | - * 获取明细信息。 | |
| 45 | - * @param id 车辆id | |
| 46 | - * @return 返回一个 promise | |
| 47 | - */ | |
| 48 | - getDetail: function(id) { | |
| 49 | - var params = {id: id}; | |
| 50 | - return service.rest.get(params).$promise; | |
| 51 | - }, | |
| 52 | - /** | |
| 53 | - * 保存信息。 | |
| 54 | - * @param obj 车辆详细信息 | |
| 55 | - * @return 返回一个 promise | |
| 56 | - */ | |
| 57 | - saveDetail: function(obj) { | |
| 58 | - return service.rest.save(obj).$promise; | |
| 59 | - }, | |
| 60 | - /** | |
| 61 | - * 删除信息。 | |
| 62 | - * @param id 主键id | |
| 63 | - * @returns {*|Function|promise|n} | |
| 64 | - */ | |
| 65 | - deleteDetail: function(id) { | |
| 66 | - return service.rest.delete({id: id}).$promise; | |
| 67 | - } | |
| 68 | - }; | |
| 69 | - | |
| 70 | -}]); | |
| 71 | - | |
| 72 | -angular.module('ScheduleApp').controller('TimeTableManageCtrl', ['TimeTableManageService', '$state', '$uibModal', function(timeTableManageService, $state, $uibModal) { | |
| 73 | - var self = this; | |
| 74 | - | |
| 75 | - // 切换到form状态 | |
| 76 | - self.goForm = function() { | |
| 77 | - //alert("切换"); | |
| 78 | - $state.go("timeTableManage_form"); | |
| 79 | - }; | |
| 80 | - | |
| 81 | - // 导入excel | |
| 82 | - self.importData = function() { | |
| 83 | - // large方式弹出模态对话框 | |
| 84 | - var modalInstance = $uibModal.open({ | |
| 85 | - templateUrl: '/pages/scheduleApp/module/core/timeTableManage/dataImport.html', | |
| 86 | - size: "lg", | |
| 87 | - animation: true, | |
| 88 | - backdrop: 'static', | |
| 89 | - resolve: { | |
| 90 | - // 可以传值给controller | |
| 91 | - }, | |
| 92 | - windowClass: 'center-modal', | |
| 93 | - controller: "TimeTableManageToolsCtrl", | |
| 94 | - controllerAs: "ctrl", | |
| 95 | - bindToController: true | |
| 96 | - }); | |
| 97 | - modalInstance.result.then( | |
| 98 | - function() { | |
| 99 | - console.log("dataImport.html打开"); | |
| 100 | - }, | |
| 101 | - function() { | |
| 102 | - console.log("dataImport.html消失"); | |
| 103 | - } | |
| 104 | - ); | |
| 105 | - }; | |
| 106 | -}]); | |
| 107 | - | |
| 108 | -angular.module('ScheduleApp').controller('TimeTableManageToolsCtrl', ['$modalInstance', 'FileUploader', function($modalInstance, FileUploader) { | |
| 109 | - var self = this; | |
| 110 | - self.data = "TODO"; | |
| 111 | - | |
| 112 | - // 关闭窗口 | |
| 113 | - self.close = function() { | |
| 114 | - $modalInstance.dismiss("cancel"); | |
| 115 | - }; | |
| 116 | - | |
| 117 | - self.clearInputFile = function() { | |
| 118 | - angular.element("input[type='file']").val(null); | |
| 119 | - }; | |
| 120 | - | |
| 121 | - // 上传文件组件 | |
| 122 | - self.uploader = new FileUploader({ | |
| 123 | - url: "/tic/dataImport", | |
| 124 | - filters: [] // 用于过滤文件,比如只允许导入excel | |
| 125 | - }); | |
| 126 | - self.uploader.onAfterAddingFile = function(fileItem) | |
| 127 | - { | |
| 128 | - console.info('onAfterAddingFile', fileItem); | |
| 129 | - console.log(self.uploader.queue.length); | |
| 130 | - if (self.uploader.queue.length > 1) | |
| 131 | - self.uploader.removeFromQueue(0); | |
| 132 | - }; | |
| 133 | - self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 134 | - { | |
| 135 | - console.info('onSuccessItem', fileItem, response, status, headers); | |
| 136 | - }; | |
| 137 | - self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 138 | - { | |
| 139 | - console.info('onErrorItem', fileItem, response, status, headers); | |
| 140 | - }; | |
| 141 | - | |
| 142 | -}]); | |
| 143 | - | |
| 144 | -angular.module('ScheduleApp').controller('TimeTableManageListCtrl', ['TimeTableManageService', '$uibModal', function(timeTableManageService, $uibModal) { | |
| 145 | - var self = this; | |
| 146 | - self.pageInfo = { | |
| 147 | - totalItems : 0, | |
| 148 | - currentPage : 1, | |
| 149 | - infos: [] | |
| 150 | - }; | |
| 151 | - | |
| 152 | - // 初始创建的时候,获取一次列表数据 | |
| 153 | - timeTableManageService.getPage().then( | |
| 154 | - function(result) { | |
| 155 | - self.pageInfo.totalItems = result.totalElements; | |
| 156 | - self.pageInfo.currentPage = result.number + 1; | |
| 157 | - self.pageInfo.infos = result.content; | |
| 158 | - timeTableManageService.setCurrentPageNo(result.number + 1); | |
| 159 | - }, | |
| 160 | - function(result) { | |
| 161 | - alert("出错啦!"); | |
| 162 | - } | |
| 163 | - ); | |
| 164 | - | |
| 165 | - //$scope.$watch("ctrl.pageInfo.currentPage", function() { | |
| 166 | - // alert("dfdfdf"); | |
| 167 | - //}); | |
| 168 | - | |
| 169 | - // 翻页的时候调用 | |
| 170 | - self.pageChanaged = function() { | |
| 171 | - timeTableManageService.setCurrentPageNo(self.pageInfo.currentPage); | |
| 172 | - timeTableManageService.getPage().then( | |
| 173 | - function(result) { | |
| 174 | - self.pageInfo.totalItems = result.totalElements; | |
| 175 | - self.pageInfo.currentPage = result.number + 1; | |
| 176 | - self.pageInfo.infos = result.content; | |
| 177 | - timeTableManageService.setCurrentPageNo(result.number + 1); | |
| 178 | - }, | |
| 179 | - function(result) { | |
| 180 | - alert("出错啦!"); | |
| 181 | - } | |
| 182 | - ); | |
| 183 | - }; | |
| 184 | - // 获取查询条件数据 | |
| 185 | - self.searchCondition = function() { | |
| 186 | - return timeTableManageService.getSearchCondition(); | |
| 187 | - }; | |
| 188 | - // 重置查询条件 | |
| 189 | - self.resetSearchCondition = function() { | |
| 190 | - timeTableManageService.resetSearchCondition(); | |
| 191 | - self.pageInfo.currentPage = 1; | |
| 192 | - self.pageChanaged(); | |
| 193 | - }; | |
| 194 | - | |
| 195 | - // 作废/撤销 | |
| 196 | - self.toggleTtinfo = function(id) { | |
| 197 | - // TODO: | |
| 198 | - timeTableManageService.deleteDetail(id).then( | |
| 199 | - function(result) { | |
| 200 | - if (result.message) { // 暂时这样做,之后全局拦截 | |
| 201 | - alert("失败:" + result.message); | |
| 202 | - } else { | |
| 203 | - alert("成功!"); | |
| 204 | - | |
| 205 | - timeTableManageService.getPage().then( | |
| 206 | - function(result) { | |
| 207 | - self.pageInfo.totalItems = result.totalElements; | |
| 208 | - self.pageInfo.currentPage = result.number + 1; | |
| 209 | - self.pageInfo.infos = result.content; | |
| 210 | - timeTableManageService.setCurrentPageNo(result.number + 1); | |
| 211 | - }, | |
| 212 | - function(result) { | |
| 213 | - alert("出错啦!"); | |
| 214 | - } | |
| 215 | - ); | |
| 216 | - } | |
| 217 | - | |
| 218 | - }, | |
| 219 | - function(result) { | |
| 220 | - alert("出错啦!" + result); | |
| 221 | - } | |
| 222 | - ); | |
| 223 | - }; | |
| 224 | - | |
| 225 | - // 导入excel | |
| 226 | - self.importData = function($index) { | |
| 227 | - // 线路名称 | |
| 228 | - var xlmc = self.pageInfo.infos[$index]["xl"]["name"]; | |
| 229 | - // 时刻表名称 | |
| 230 | - var ttinfoname = self.pageInfo.infos[$index]["name"]; | |
| 231 | - | |
| 232 | - // large方式弹出模态对话框 | |
| 233 | - var modalInstance = $uibModal.open({ | |
| 234 | - templateUrl: '/pages/scheduleApp/module/core/timeTableManage/detailDataImport.html', | |
| 235 | - size: "lg", | |
| 236 | - animation: true, | |
| 237 | - backdrop: 'static', | |
| 238 | - resolve: { | |
| 239 | - // 可以传值给controller | |
| 240 | - r_xlmc : function() {return xlmc}, | |
| 241 | - r_ttinfoname : function() {return ttinfoname;} | |
| 242 | - }, | |
| 243 | - windowClass: 'center-modal', | |
| 244 | - controller: "TimeTableDetailManageToolsCtrl", | |
| 245 | - controllerAs: "ctrl", | |
| 246 | - bindToController: true | |
| 247 | - }); | |
| 248 | - modalInstance.result.then( | |
| 249 | - function() { | |
| 250 | - console.log("dataImport.html打开"); | |
| 251 | - }, | |
| 252 | - function() { | |
| 253 | - console.log("dataImport.html消失"); | |
| 254 | - } | |
| 255 | - ); | |
| 256 | - }; | |
| 257 | - | |
| 258 | -}]); | |
| 259 | - | |
| 260 | -angular.module('ScheduleApp').controller('TimeTableDetailManageToolsCtrl', ['$modalInstance', 'FileUploader', 'r_xlmc', 'r_ttinfoname', function($modalInstance, FileUploader, r_xlmc, r_ttinfoname) { | |
| 261 | - var self = this; | |
| 262 | - | |
| 263 | - self.xlmc = r_xlmc; | |
| 264 | - self.ttinfoname = r_ttinfoname; | |
| 265 | - | |
| 266 | - // 关闭窗口 | |
| 267 | - self.close = function() { | |
| 268 | - $modalInstance.dismiss("cancel"); | |
| 269 | - }; | |
| 270 | - | |
| 271 | - self.clearInputFile = function() { | |
| 272 | - angular.element("input[type='file']").val(null); | |
| 273 | - }; | |
| 274 | - | |
| 275 | - // 上传文件组件 | |
| 276 | - self.uploader = new FileUploader({ | |
| 277 | - url: "/tidc/dataImportExtend", | |
| 278 | - filters: [], // 用于过滤文件,比如只允许导入excel, | |
| 279 | - formData: [{xlmc: self.xlmc, ttinfoname: self.ttinfoname}] | |
| 280 | - }); | |
| 281 | - self.uploader.onAfterAddingFile = function(fileItem) | |
| 282 | - { | |
| 283 | - console.info('onAfterAddingFile', fileItem); | |
| 284 | - console.log(self.uploader.queue.length); | |
| 285 | - if (self.uploader.queue.length > 1) | |
| 286 | - self.uploader.removeFromQueue(0); | |
| 287 | - }; | |
| 288 | - self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 289 | - { | |
| 290 | - console.info('onSuccessItem', fileItem, response, status, headers); | |
| 291 | - }; | |
| 292 | - self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 293 | - { | |
| 294 | - console.info('onErrorItem', fileItem, response, status, headers); | |
| 295 | - }; | |
| 296 | - | |
| 297 | -}]); | |
| 298 | - | |
| 299 | -angular.module('ScheduleApp').controller('TimeTableManageFormCtrl', [ | |
| 300 | - 'TimeTableManageService', | |
| 301 | - '$stateParams', | |
| 302 | - '$state', function(timeTableManageService, $stateParams, $state) { | |
| 303 | - var self = this; | |
| 304 | - | |
| 305 | - // 启用日期 日期控件开关 | |
| 306 | - self.qyrqOpen = false; | |
| 307 | - self.qyrq_open = function() { | |
| 308 | - self.qyrqOpen = true; | |
| 309 | - }; | |
| 310 | - | |
| 311 | - // 欲保存的表单信息,双向绑定 | |
| 312 | - self.timeTableManageForForm= {xl : {}}; | |
| 313 | - | |
| 314 | - // 如果是修改,获取传过来的id,从后台获取一份数据,用于绑定页面form值 | |
| 315 | - var id = $stateParams.id; | |
| 316 | - if (id) { | |
| 317 | - self.timeTableManageForForm.id = id; | |
| 318 | - timeTableManageService.getDetail(id).then( | |
| 319 | - function(result) { | |
| 320 | - var key; | |
| 321 | - for (key in result) { | |
| 322 | - self.timeTableManageForForm[key] = result[key]; | |
| 323 | - } | |
| 324 | - }, | |
| 325 | - function(result) { | |
| 326 | - alert("出错啦!"); | |
| 327 | - } | |
| 328 | - ); | |
| 329 | - } | |
| 330 | - | |
| 331 | - // form提交方法 | |
| 332 | - self.submit = function() { | |
| 333 | - timeTableManageService.saveDetail(self.timeTableManageForForm).then( | |
| 334 | - function(result) { | |
| 335 | - $state.go("timeTableManage"); | |
| 336 | - }, | |
| 337 | - function(result) { | |
| 338 | - alert("出错啦!"); | |
| 339 | - } | |
| 340 | - ); | |
| 341 | - }; | |
| 342 | - | |
| 343 | - | |
| 344 | -}]); | |
| 345 | - | |
| 346 | -angular.module('ScheduleApp').controller('TimeTableManageDetailCtrl', ['TimeTableManageService', '$stateParams', function(timeTableManageService, $stateParams) { | |
| 347 | - var self = this; | |
| 348 | - self.title = ""; | |
| 349 | - self.timeTableManageForDetail = {}; | |
| 350 | - | |
| 351 | - timeTableManageService.getDetail($stateParams.id).then( | |
| 352 | - function(result) { | |
| 353 | - angular.copy(result, self.timeTableManageForDetail); | |
| 354 | - | |
| 355 | - self.title = self.timeTableManageForDetail.xl.name + | |
| 356 | - "(" + | |
| 357 | - self.timeTableManageForDetail.name + | |
| 358 | - ")" + | |
| 359 | - "时刻表基础信息"; | |
| 360 | - }, | |
| 361 | - function(result) { | |
| 362 | - alert("出错啦!"); | |
| 363 | - } | |
| 364 | - ); | |
| 365 | - | |
| 366 | - | |
| 367 | -}]); | |
| 368 | - | |
| 369 | - | |
| 370 | - |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoDetailManage/edit-detail.html renamed to src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail.html
src/main/resources/static/pages/scheduleApp/module/core/ttInfoDetailManage/edit.html renamed to src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit.html
src/main/resources/static/pages/scheduleApp/module/core/ttInfoDetailManage/form.html renamed to src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/form.html
src/main/resources/static/pages/scheduleApp/module/core/ttInfoDetailManage/main.js renamed to src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/module.js
| 1 | -// 时刻表明晰管理service,包装外部定义的globalservice,并保存一定的操作状态 | |
| 2 | -angular.module('ScheduleApp').factory( | |
| 3 | - 'TtInfoDetailManageService', | |
| 4 | - [ | |
| 5 | - 'TimeTableDetailManageService_g', | |
| 6 | - function(service) { | |
| 7 | - // TODO: | |
| 8 | - | |
| 9 | - return { | |
| 10 | - importDetail: function(param) { | |
| 11 | - return service.import.do(param).$promise; | |
| 12 | - }, | |
| 13 | - /** | |
| 14 | - * 获取编辑用的时刻表明细数据。 | |
| 15 | - * @param ttid 时刻表id | |
| 16 | - */ | |
| 17 | - getEditInfo: function(xlid, ttid) { | |
| 18 | - var params = {xlid : xlid, ttid : ttid}; | |
| 19 | - return service.edit.list(params).$promise; | |
| 20 | - } | |
| 21 | - }; | |
| 22 | - } | |
| 23 | - ] | |
| 24 | -); | |
| 25 | - | |
| 26 | -// form.html控制器 | |
| 27 | -angular.module('ScheduleApp').controller( | |
| 28 | - 'TtInfoDetailManageFormCtrl', | |
| 29 | - [ | |
| 30 | - 'TtInfoDetailManageService', | |
| 31 | - 'FileUploader', | |
| 32 | - '$stateParams', | |
| 33 | - '$state', | |
| 34 | - function(service, FileUploader, $stateParams, $state) { | |
| 35 | - var self = this; | |
| 36 | - var xlid = $stateParams.xlid; | |
| 37 | - var ttid = $stateParams.ttid; | |
| 38 | - var xlname = $stateParams.xlname; | |
| 39 | - var ttname = $stateParams.ttname; | |
| 40 | - | |
| 41 | - self.title = xlname + '(' + ttname + ')' + '时刻表明细信息excel数据导入'; | |
| 42 | - | |
| 43 | - // 欲保存的表单信息,双向绑定 | |
| 44 | - self.ttInfoDetailManageForForm = { | |
| 45 | - xlid: xlid, // 线路id | |
| 46 | - ttid: ttid, // 时刻表id | |
| 47 | - xlname: xlname, // 线路名称 | |
| 48 | - ttname: ttname, // 时刻表名称 | |
| 49 | - filename: undefined, // 上传后的文件名 | |
| 50 | - sheetname: undefined, // sheet名字 | |
| 51 | - sheetvaliddesc: undefined, // sheet验证描述返回 | |
| 52 | - lineinfo: undefined, // 线路标准id | |
| 53 | - lineinfovaliddesc: undefined // 线路标准验证描述返回 | |
| 54 | - }; | |
| 55 | - self.sheetnames = [ | |
| 56 | - //{name: '工作表1'}, {name: '工作表2'} // sheet名字列表 | |
| 57 | - ]; | |
| 58 | - | |
| 59 | - //--------------- 上传文件功能 ---------------// | |
| 60 | - | |
| 61 | - self.clearInputFile = function() { | |
| 62 | - angular.element("input[type='file']").val(null); | |
| 63 | - }; | |
| 64 | - self.removeItem = function(item) { | |
| 65 | - item.remove(); | |
| 66 | - self.ttInfoDetailManageForForm.sheetname = undefined; | |
| 67 | - self.sheetnames = []; | |
| 68 | - }; | |
| 69 | - | |
| 70 | - // 上传文件组件 | |
| 71 | - self.uploader = new FileUploader({ | |
| 72 | - url: "/tidc/uploadFile", | |
| 73 | - filters: [], // 用于过滤文件,比如只允许导入excel, | |
| 74 | - formData: [ | |
| 75 | - { | |
| 76 | - xlmc: self.xlmc, | |
| 77 | - ttinfoname: self.ttinfoname | |
| 78 | - } | |
| 79 | - ] | |
| 80 | - }); | |
| 81 | - self.uploader.onAfterAddingFile = function(fileItem) | |
| 82 | - { | |
| 83 | - console.info('onAfterAddingFile', fileItem); | |
| 84 | - console.log(self.uploader.queue.length); | |
| 85 | - if (self.uploader.queue.length > 1) | |
| 86 | - self.uploader.removeFromQueue(0); | |
| 87 | - self.ttInfoDetailManageForForm.sheetname = undefined; | |
| 88 | - self.sheetnames = []; | |
| 89 | - }; | |
| 90 | - self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 91 | - { | |
| 92 | - self.sheetnames = response.sheetnames; | |
| 93 | - self.ttInfoDetailManageForForm.filename = response.fileName; | |
| 94 | - console.info('onSuccessItem', fileItem, response, status, headers); | |
| 95 | - }; | |
| 96 | - self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 97 | - { | |
| 98 | - alert("error"); | |
| 99 | - self.sheetnames = []; | |
| 100 | - console.info('onErrorItem', fileItem, response, status, headers); | |
| 101 | - }; | |
| 102 | - | |
| 103 | - | |
| 104 | - // form提交方法 | |
| 105 | - self.submit = function() { | |
| 106 | - service.importDetail(self.ttInfoDetailManageForForm).then( | |
| 107 | - function(result) { | |
| 108 | - $state.go("ttInfoManage"); | |
| 109 | - }, | |
| 110 | - function(result) { | |
| 111 | - alert("出错啦!"); | |
| 112 | - } | |
| 113 | - ); | |
| 114 | - }; | |
| 115 | - | |
| 116 | - | |
| 117 | - // TODO:edit操作暂时使用旧版本的js文件 | |
| 118 | - | |
| 119 | - | |
| 120 | - } | |
| 121 | - ] | |
| 1 | +// 时刻表明晰管理service,包装外部定义的globalservice,并保存一定的操作状态 | |
| 2 | +angular.module('ScheduleApp').factory( | |
| 3 | + 'TtInfoDetailManageService', | |
| 4 | + [ | |
| 5 | + 'TimeTableDetailManageService_g', | |
| 6 | + function(service) { | |
| 7 | + // TODO: | |
| 8 | + | |
| 9 | + return { | |
| 10 | + importDetail: function(param) { | |
| 11 | + return service.import.do(param).$promise; | |
| 12 | + }, | |
| 13 | + /** | |
| 14 | + * 获取编辑用的时刻表明细数据。 | |
| 15 | + * @param ttid 时刻表id | |
| 16 | + */ | |
| 17 | + getEditInfo: function(xlid, ttid) { | |
| 18 | + var params = {xlid : xlid, ttid : ttid}; | |
| 19 | + return service.edit.list(params).$promise; | |
| 20 | + } | |
| 21 | + }; | |
| 22 | + } | |
| 23 | + ] | |
| 24 | +); | |
| 25 | + | |
| 26 | +// form.html控制器 | |
| 27 | +angular.module('ScheduleApp').controller( | |
| 28 | + 'TtInfoDetailManageFormCtrl', | |
| 29 | + [ | |
| 30 | + 'TtInfoDetailManageService', | |
| 31 | + 'FileUploader', | |
| 32 | + '$stateParams', | |
| 33 | + '$state', | |
| 34 | + function(service, FileUploader, $stateParams, $state) { | |
| 35 | + var self = this; | |
| 36 | + var xlid = $stateParams.xlid; | |
| 37 | + var ttid = $stateParams.ttid; | |
| 38 | + var xlname = $stateParams.xlname; | |
| 39 | + var ttname = $stateParams.ttname; | |
| 40 | + | |
| 41 | + self.title = xlname + '(' + ttname + ')' + '时刻表明细信息excel数据导入'; | |
| 42 | + | |
| 43 | + // 欲保存的表单信息,双向绑定 | |
| 44 | + self.ttInfoDetailManageForForm = { | |
| 45 | + xlid: xlid, // 线路id | |
| 46 | + ttid: ttid, // 时刻表id | |
| 47 | + xlname: xlname, // 线路名称 | |
| 48 | + ttname: ttname, // 时刻表名称 | |
| 49 | + filename: undefined, // 上传后的文件名 | |
| 50 | + sheetname: undefined, // sheet名字 | |
| 51 | + sheetvaliddesc: undefined, // sheet验证描述返回 | |
| 52 | + lineinfo: undefined, // 线路标准id | |
| 53 | + lineinfovaliddesc: undefined // 线路标准验证描述返回 | |
| 54 | + }; | |
| 55 | + self.sheetnames = [ | |
| 56 | + //{name: '工作表1'}, {name: '工作表2'} // sheet名字列表 | |
| 57 | + ]; | |
| 58 | + | |
| 59 | + //--------------- 上传文件功能 ---------------// | |
| 60 | + | |
| 61 | + self.clearInputFile = function() { | |
| 62 | + angular.element("input[type='file']").val(null); | |
| 63 | + }; | |
| 64 | + self.removeItem = function(item) { | |
| 65 | + item.remove(); | |
| 66 | + self.ttInfoDetailManageForForm.sheetname = undefined; | |
| 67 | + self.sheetnames = []; | |
| 68 | + }; | |
| 69 | + | |
| 70 | + // 上传文件组件 | |
| 71 | + self.uploader = new FileUploader({ | |
| 72 | + url: "/tidc/uploadFile", | |
| 73 | + filters: [], // 用于过滤文件,比如只允许导入excel, | |
| 74 | + formData: [ | |
| 75 | + { | |
| 76 | + xlmc: self.xlmc, | |
| 77 | + ttinfoname: self.ttinfoname | |
| 78 | + } | |
| 79 | + ] | |
| 80 | + }); | |
| 81 | + self.uploader.onAfterAddingFile = function(fileItem) | |
| 82 | + { | |
| 83 | + console.info('onAfterAddingFile', fileItem); | |
| 84 | + console.log(self.uploader.queue.length); | |
| 85 | + if (self.uploader.queue.length > 1) | |
| 86 | + self.uploader.removeFromQueue(0); | |
| 87 | + self.ttInfoDetailManageForForm.sheetname = undefined; | |
| 88 | + self.sheetnames = []; | |
| 89 | + }; | |
| 90 | + self.uploader.onSuccessItem = function(fileItem, response, status, headers) | |
| 91 | + { | |
| 92 | + self.sheetnames = response.sheetnames; | |
| 93 | + self.ttInfoDetailManageForForm.filename = response.fileName; | |
| 94 | + console.info('onSuccessItem', fileItem, response, status, headers); | |
| 95 | + }; | |
| 96 | + self.uploader.onErrorItem = function(fileItem, response, status, headers) | |
| 97 | + { | |
| 98 | + alert("error"); | |
| 99 | + self.sheetnames = []; | |
| 100 | + console.info('onErrorItem', fileItem, response, status, headers); | |
| 101 | + }; | |
| 102 | + | |
| 103 | + | |
| 104 | + // form提交方法 | |
| 105 | + self.submit = function() { | |
| 106 | + service.importDetail(self.ttInfoDetailManageForForm).then( | |
| 107 | + function(result) { | |
| 108 | + $state.go("ttInfoManage"); | |
| 109 | + }, | |
| 110 | + function(result) { | |
| 111 | + alert("出错啦!"); | |
| 112 | + } | |
| 113 | + ); | |
| 114 | + }; | |
| 115 | + | |
| 116 | + | |
| 117 | + // TODO:edit操作暂时使用旧版本的js文件 | |
| 118 | + | |
| 119 | + | |
| 120 | + } | |
| 121 | + ] | |
| 122 | 122 | ); |
| 123 | 123 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 时刻表编辑管理配置route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + .state("ttInfoDetailManage_form", { // 时刻表明细导入 | |
| 13 | + url: '/ttInfoDetailManage_form/:xlid/:ttid/:xlname/:ttname', | |
| 14 | + views: { | |
| 15 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/form.html'} | |
| 16 | + }, | |
| 17 | + resolve: { | |
| 18 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 19 | + return $ocLazyLoad.load({ | |
| 20 | + name: 'ttInfoDetailManage_form_module', | |
| 21 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 22 | + files: [ | |
| 23 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 24 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 25 | + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js", | |
| 26 | + "pages/scheduleApp/module/core/ttInfoManage/detailedit/module.js" | |
| 27 | + ] | |
| 28 | + }); | |
| 29 | + }] | |
| 30 | + } | |
| 31 | + }) | |
| 32 | + .state("ttInfoDetailManage_edit", { // 时刻表详细信息编辑 | |
| 33 | + url: '/ttInfoDetailManage_edit/:xlid/:ttid/:xlname/:ttname', | |
| 34 | + views: { | |
| 35 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/edit.html'} | |
| 36 | + }, | |
| 37 | + resolve: { | |
| 38 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 39 | + return $ocLazyLoad.load({ | |
| 40 | + name: 'ttInfoDetailManage_edit_module', | |
| 41 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 42 | + files: [ | |
| 43 | + "pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js" | |
| 44 | + ] | |
| 45 | + }); | |
| 46 | + }] | |
| 47 | + } | |
| 48 | + }) | |
| 49 | + .state("ttInfoDetailManage_detail_edit", { // 时刻表详细信息单元格编辑 | |
| 50 | + url: '/ttInfoDetailManage_detail_edit/:id/:xlid/:ttid/:xlname/:ttname', | |
| 51 | + views: { | |
| 52 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail.html'} | |
| 53 | + }, | |
| 54 | + resolve: { | |
| 55 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 56 | + return $ocLazyLoad.load({ | |
| 57 | + name: 'ttInfoDetailManage_detail_edit_module', | |
| 58 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 59 | + files: [ | |
| 60 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 61 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 62 | + "pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js" | |
| 63 | + ] | |
| 64 | + }); | |
| 65 | + }] | |
| 66 | + } | |
| 67 | + }); | |
| 68 | + | |
| 69 | + } | |
| 70 | +]); | |
| 0 | 71 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoDetailManage/timeTableDetailManage_old.js renamed to src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/list.html
| ... | ... | @@ -11,6 +11,7 @@ |
| 11 | 11 | <th style="width: 80px">上下行</th> |
| 12 | 12 | <th style="width: 50px;">启用</th> |
| 13 | 13 | <th style="width: 120px">启用日期</th> |
| 14 | + <th style="width: 80px">状态</th> | |
| 14 | 15 | <th style="width: 50%">时刻表明细</th> |
| 15 | 16 | <th style="width: 50%">操作</th> |
| 16 | 17 | </tr> |
| ... | ... | @@ -34,6 +35,11 @@ |
| 34 | 35 | <td></td> |
| 35 | 36 | <td></td> |
| 36 | 37 | <td></td> |
| 38 | + <td> | |
| 39 | + <label class="checkbox-inline"> | |
| 40 | + <input type="checkbox" ng-model="ctrl.searchCondition()['isCancel_eq']"/>作废 | |
| 41 | + </label> | |
| 42 | + </td> | |
| 37 | 43 | <td></td> |
| 38 | 44 | <td> |
| 39 | 45 | <button class="btn btn-sm green btn-outline filter-submit margin-bottom" |
| ... | ... | @@ -73,8 +79,14 @@ |
| 73 | 79 | <span ng-bind="info.qyrq | date: 'yyyy-MM-dd'"></span> |
| 74 | 80 | </td> |
| 75 | 81 | <td> |
| 82 | + <span class="glyphicon glyphicon-ok" ng-if="info.isCancel == '0'"></span> | |
| 83 | + <span class="glyphicon glyphicon-remove" ng-if="info.isCancel == '1'"></span> | |
| 84 | + </td> | |
| 85 | + <td> | |
| 76 | 86 | <a ui-sref="ttInfoDetailManage_edit({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})" |
| 77 | 87 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑 </a> |
| 88 | + <a ng-click="ctrl.toTtInfoDetailAuto()" | |
| 89 | + class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 生成 </a> | |
| 78 | 90 | <a ui-sref="ttInfoDetailManage_form({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})" |
| 79 | 91 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 导入 </a> |
| 80 | 92 | <a href="javascript:" class="btn btn-info btn-sm" ng-click="ctrl.exportData(info.id)"> 导出 </a> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/main.js renamed to src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/module.js
| 1 | -// 时刻表管理service,包装外部定义的globalservice,并保存一定的操作状态 | |
| 2 | -angular.module('ScheduleApp').factory( | |
| 3 | - 'TtInfoManageService', | |
| 4 | - [ | |
| 5 | - 'TimeTableManageService_g', | |
| 6 | - 'TimeTableDetailManageService_g', | |
| 7 | - function(service, dservice) { | |
| 8 | - // 当前查询的内容条件搜索对象 | |
| 9 | - var currentSearchCondition = {page: 0}; | |
| 10 | - // 当前查询返回的信息 | |
| 11 | - var currentPage = { // 后台spring data返回的格式 | |
| 12 | - totalElements: 0, | |
| 13 | - number: 0, // 后台返回的页码,spring返回从0开始 | |
| 14 | - content: [], | |
| 15 | - | |
| 16 | - uiNumber: 1 // 页面绑定的页码 | |
| 17 | - }; | |
| 18 | - | |
| 19 | - // 查询对象类 | |
| 20 | - var queryClass = service.rest; | |
| 21 | - | |
| 22 | - return { | |
| 23 | - getTtInfoQueryClass: function() { | |
| 24 | - return queryClass; | |
| 25 | - }, | |
| 26 | - getSearchCondition: function() { | |
| 27 | - currentSearchCondition.page = currentPage.uiNumber - 1; | |
| 28 | - return currentSearchCondition; | |
| 29 | - }, | |
| 30 | - getPage: function(page) { | |
| 31 | - if (page) { | |
| 32 | - currentPage.totalElements = page.totalElements; | |
| 33 | - currentPage.number = page.number; | |
| 34 | - currentPage.content = page.content; | |
| 35 | - } | |
| 36 | - return currentPage; | |
| 37 | - }, | |
| 38 | - resetStatus: function() { | |
| 39 | - currentSearchCondition = {page: 0}; | |
| 40 | - currentPage = { | |
| 41 | - totalElements: 0, | |
| 42 | - number: 0, | |
| 43 | - content: [], | |
| 44 | - uiNumber: 1 | |
| 45 | - }; | |
| 46 | - }, | |
| 47 | - /** | |
| 48 | - * 数据导出。 | |
| 49 | - * @returns {*|Function|promise|n} | |
| 50 | - */ | |
| 51 | - dataExport: function(ttinfoid) { | |
| 52 | - var param = {}; | |
| 53 | - param.type = 'dataExportExt'; | |
| 54 | - param.ttinfoid = ttinfoid; | |
| 55 | - return dservice.dataTools.dataExport(param).$promise; | |
| 56 | - } | |
| 57 | - | |
| 58 | - | |
| 59 | - | |
| 60 | - // TODO: | |
| 61 | - } | |
| 62 | - } | |
| 63 | - ] | |
| 64 | -); | |
| 65 | - | |
| 66 | -// index.html控制器 | |
| 67 | -angular.module('ScheduleApp').controller( | |
| 68 | - 'TtInfoManageIndexCtrl', | |
| 69 | - [ | |
| 70 | - '$state', | |
| 71 | - function($state) { | |
| 72 | - var self = this; | |
| 73 | - | |
| 74 | - // 切换到时刻表form界面 | |
| 75 | - self.toTtInfoManageForm = function() { | |
| 76 | - $state.go('ttInfoManage_form'); | |
| 77 | - } | |
| 78 | - } | |
| 79 | - ] | |
| 80 | -); | |
| 81 | - | |
| 82 | -// list.html控制器 | |
| 83 | -angular.module('ScheduleApp').controller( | |
| 84 | - 'TtInfoManageListCtrl', | |
| 85 | - [ | |
| 86 | - 'TtInfoManageService', | |
| 87 | - 'FileDownload_g', | |
| 88 | - function(service, fileDownload) { | |
| 89 | - var self = this; | |
| 90 | - var TtInfo = service.getTtInfoQueryClass(); | |
| 91 | - | |
| 92 | - self.page = function() { | |
| 93 | - return service.getPage(); | |
| 94 | - }; | |
| 95 | - | |
| 96 | - self.searchCondition = function() { | |
| 97 | - return service.getSearchCondition(); | |
| 98 | - }; | |
| 99 | - | |
| 100 | - self.doPage = function() { | |
| 101 | - var page = TtInfo.list(self.searchCondition(), function() { | |
| 102 | - service.getPage(page); | |
| 103 | - }); | |
| 104 | - }; | |
| 105 | - self.reset = function() { | |
| 106 | - service.resetStatus(); | |
| 107 | - var page = TtInfo.list(self.searchCondition(), function() { | |
| 108 | - service.getPage(page); | |
| 109 | - }); | |
| 110 | - }; | |
| 111 | - self.toggleTtinfo = function(id) { | |
| 112 | - TtInfo.delete({id: id}, function(result) { | |
| 113 | - if (result.message) { // 暂时这样做,之后全局拦截 | |
| 114 | - alert("失败:" + result.message); | |
| 115 | - } else { | |
| 116 | - self.doPage(); | |
| 117 | - } | |
| 118 | - }); | |
| 119 | - }; | |
| 120 | - // 导出excel | |
| 121 | - self.exportData = function(ttinfoid) { | |
| 122 | - service.dataExport(ttinfoid).then( | |
| 123 | - function(result) { | |
| 124 | - fileDownload.downloadFile(result.data, "application/octet-stream", "时刻表.xls"); | |
| 125 | - }, | |
| 126 | - function(result) { | |
| 127 | - console.log("exportData failed:" + result); | |
| 128 | - } | |
| 129 | - ); | |
| 130 | - }; | |
| 131 | - | |
| 132 | - self.doPage(); | |
| 133 | - | |
| 134 | - // TODO: | |
| 135 | - } | |
| 136 | - ] | |
| 137 | -); | |
| 138 | - | |
| 139 | -// form.html控制器 | |
| 140 | -angular.module('ScheduleApp').controller( | |
| 141 | - 'TtInfoManageFormCtrl', | |
| 142 | - [ | |
| 143 | - 'TtInfoManageService', | |
| 144 | - '$stateParams', | |
| 145 | - '$state', | |
| 146 | - function(service, $stateParams, $state) { | |
| 147 | - var self = this; | |
| 148 | - var TtInfo = service.getTtInfoQueryClass(); | |
| 149 | - | |
| 150 | - // 启用日期 日期控件开关 | |
| 151 | - self.qyrqOpen = false; | |
| 152 | - self.qyrq_open = function() { | |
| 153 | - self.qyrqOpen = true; | |
| 154 | - }; | |
| 155 | - | |
| 156 | - // 欲保存的表单信息,双向绑定 | |
| 157 | - self.ttInfoManageForForm = new TtInfo; | |
| 158 | - self.ttInfoManageForForm.xl = {}; | |
| 159 | - | |
| 160 | - // 如果是修改,获取传过来的id,从后台获取一份数据,用于绑定页面form值 | |
| 161 | - var id = $stateParams.id; | |
| 162 | - if (id) { | |
| 163 | - TtInfo.get({id: id}, function(value) { | |
| 164 | - self.ttInfoManageForForm = value; | |
| 165 | - }); | |
| 166 | - } | |
| 167 | - // form提交方法 | |
| 168 | - self.submit = function() { | |
| 169 | - self.ttInfoManageForForm.$save(function() { | |
| 170 | - $state.go("ttInfoManage"); | |
| 171 | - }); | |
| 172 | - }; | |
| 173 | - } | |
| 174 | - ] | |
| 175 | -); | |
| 176 | - | |
| 177 | -// detail.html控制器 | |
| 178 | -angular.module('ScheduleApp').controller( | |
| 179 | - 'TtInfoManageDetailCtrl', | |
| 180 | - [ | |
| 181 | - 'TtInfoManageService', | |
| 182 | - '$stateParams', | |
| 183 | - function(service, $stateParams) { | |
| 184 | - var self = this; | |
| 185 | - var TtInfo = service.getTtInfoQueryClass(); | |
| 186 | - var id = $stateParams.id; | |
| 187 | - | |
| 188 | - self.title = ""; | |
| 189 | - self.ttInfoManageForDetail = {}; | |
| 190 | - | |
| 191 | - TtInfo.get({id: id}, function(value) { | |
| 192 | - self.ttInfoManageForDetail = value; | |
| 193 | - self.title = self.ttInfoManageForDetail.xl.name + | |
| 194 | - "(" + | |
| 195 | - self.ttInfoManageForDetail.name + | |
| 196 | - ")" + | |
| 197 | - "时刻表基础信息"; | |
| 198 | - }); | |
| 199 | - } | |
| 200 | - ] | |
| 1 | +// 时刻表管理service,包装外部定义的globalservice,并保存一定的操作状态 | |
| 2 | +angular.module('ScheduleApp').factory( | |
| 3 | + 'TtInfoManageService', | |
| 4 | + [ | |
| 5 | + 'TimeTableManageService_g', | |
| 6 | + 'TimeTableDetailManageService_g', | |
| 7 | + function(service, dservice) { | |
| 8 | + // 当前查询的内容条件搜索对象 | |
| 9 | + var currentSearchCondition = {page: 0, 'isCancel_eq': false}; | |
| 10 | + // 当前查询返回的信息 | |
| 11 | + var currentPage = { // 后台spring data返回的格式 | |
| 12 | + totalElements: 0, | |
| 13 | + number: 0, // 后台返回的页码,spring返回从0开始 | |
| 14 | + content: [], | |
| 15 | + | |
| 16 | + uiNumber: 1 // 页面绑定的页码 | |
| 17 | + }; | |
| 18 | + | |
| 19 | + // 查询对象类 | |
| 20 | + var queryClass = service.rest; | |
| 21 | + | |
| 22 | + return { | |
| 23 | + getTtInfoQueryClass: function() { | |
| 24 | + return queryClass; | |
| 25 | + }, | |
| 26 | + getSearchCondition: function() { | |
| 27 | + currentSearchCondition.page = currentPage.uiNumber - 1; | |
| 28 | + return currentSearchCondition; | |
| 29 | + }, | |
| 30 | + getPage: function(page) { | |
| 31 | + if (page) { | |
| 32 | + currentPage.totalElements = page.totalElements; | |
| 33 | + currentPage.number = page.number; | |
| 34 | + currentPage.content = page.content; | |
| 35 | + } | |
| 36 | + return currentPage; | |
| 37 | + }, | |
| 38 | + resetStatus: function() { | |
| 39 | + currentSearchCondition = {page: 0, 'isCancel_eq': false}; | |
| 40 | + currentPage = { | |
| 41 | + totalElements: 0, | |
| 42 | + number: 0, | |
| 43 | + content: [], | |
| 44 | + uiNumber: 1 | |
| 45 | + }; | |
| 46 | + }, | |
| 47 | + /** | |
| 48 | + * 数据导出。 | |
| 49 | + * @returns {*|Function|promise|n} | |
| 50 | + */ | |
| 51 | + dataExport: function(ttinfoid) { | |
| 52 | + var param = {}; | |
| 53 | + param.type = 'dataExportExt'; | |
| 54 | + param.ttinfoid = ttinfoid; | |
| 55 | + return dservice.dataTools.dataExport(param).$promise; | |
| 56 | + } | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + // TODO: | |
| 61 | + } | |
| 62 | + } | |
| 63 | + ] | |
| 64 | +); | |
| 65 | + | |
| 66 | +// index.html控制器 | |
| 67 | +angular.module('ScheduleApp').controller( | |
| 68 | + 'TtInfoManageIndexCtrl', | |
| 69 | + [ | |
| 70 | + '$state', | |
| 71 | + function($state) { | |
| 72 | + var self = this; | |
| 73 | + | |
| 74 | + // 切换到时刻表form界面 | |
| 75 | + self.toTtInfoManageForm = function() { | |
| 76 | + $state.go('ttInfoManage_form'); | |
| 77 | + } | |
| 78 | + } | |
| 79 | + ] | |
| 80 | +); | |
| 81 | + | |
| 82 | +// list.html控制器 | |
| 83 | +angular.module('ScheduleApp').controller( | |
| 84 | + 'TtInfoManageListCtrl', | |
| 85 | + [ | |
| 86 | + 'TtInfoManageService', | |
| 87 | + 'FileDownload_g', | |
| 88 | + function(service, fileDownload) { | |
| 89 | + var self = this; | |
| 90 | + var TtInfo = service.getTtInfoQueryClass(); | |
| 91 | + | |
| 92 | + self.page = function() { | |
| 93 | + return service.getPage(); | |
| 94 | + }; | |
| 95 | + | |
| 96 | + self.searchCondition = function() { | |
| 97 | + return service.getSearchCondition(); | |
| 98 | + }; | |
| 99 | + | |
| 100 | + self.doPage = function() { | |
| 101 | + var page = TtInfo.list(self.searchCondition(), function() { | |
| 102 | + service.getPage(page); | |
| 103 | + }); | |
| 104 | + }; | |
| 105 | + self.reset = function() { | |
| 106 | + service.resetStatus(); | |
| 107 | + var page = TtInfo.list(self.searchCondition(), function() { | |
| 108 | + service.getPage(page); | |
| 109 | + }); | |
| 110 | + }; | |
| 111 | + self.toggleTtinfo = function(id) { | |
| 112 | + TtInfo.delete({id: id}, function(result) { | |
| 113 | + if (result.message) { // 暂时这样做,之后全局拦截 | |
| 114 | + alert("失败:" + result.message); | |
| 115 | + } else { | |
| 116 | + self.doPage(); | |
| 117 | + } | |
| 118 | + }); | |
| 119 | + }; | |
| 120 | + // 导出excel | |
| 121 | + self.exportData = function(ttinfoid) { | |
| 122 | + service.dataExport(ttinfoid).then( | |
| 123 | + function(result) { | |
| 124 | + fileDownload.downloadFile(result.data, "application/octet-stream", "时刻表.xls"); | |
| 125 | + }, | |
| 126 | + function(result) { | |
| 127 | + console.log("exportData failed:" + result); | |
| 128 | + } | |
| 129 | + ); | |
| 130 | + }; | |
| 131 | + | |
| 132 | + self.doPage(); | |
| 133 | + | |
| 134 | + // 自动生成时刻表 | |
| 135 | + self.toTtInfoDetailAuto = function() { | |
| 136 | + showPjax(); | |
| 137 | + $.pjax({url: 'pages/base/timesmodel/index.html', container: pjaxContainer}); | |
| 138 | + }; | |
| 139 | + | |
| 140 | + // TODO: | |
| 141 | + } | |
| 142 | + ] | |
| 143 | +); | |
| 144 | + | |
| 145 | +// form.html控制器 | |
| 146 | +angular.module('ScheduleApp').controller( | |
| 147 | + 'TtInfoManageFormCtrl', | |
| 148 | + [ | |
| 149 | + 'TtInfoManageService', | |
| 150 | + '$stateParams', | |
| 151 | + '$state', | |
| 152 | + function(service, $stateParams, $state) { | |
| 153 | + var self = this; | |
| 154 | + var TtInfo = service.getTtInfoQueryClass(); | |
| 155 | + | |
| 156 | + // 启用日期 日期控件开关 | |
| 157 | + self.qyrqOpen = false; | |
| 158 | + self.qyrq_open = function() { | |
| 159 | + self.qyrqOpen = true; | |
| 160 | + }; | |
| 161 | + | |
| 162 | + // 欲保存的表单信息,双向绑定 | |
| 163 | + self.ttInfoManageForForm = new TtInfo; | |
| 164 | + self.ttInfoManageForForm.xl = {}; | |
| 165 | + | |
| 166 | + // 如果是修改,获取传过来的id,从后台获取一份数据,用于绑定页面form值 | |
| 167 | + var id = $stateParams.id; | |
| 168 | + if (id) { | |
| 169 | + TtInfo.get({id: id}, function(value) { | |
| 170 | + self.ttInfoManageForForm = value; | |
| 171 | + }); | |
| 172 | + } | |
| 173 | + // form提交方法 | |
| 174 | + self.submit = function() { | |
| 175 | + self.ttInfoManageForForm.$save(function() { | |
| 176 | + $state.go("ttInfoManage"); | |
| 177 | + }); | |
| 178 | + }; | |
| 179 | + } | |
| 180 | + ] | |
| 181 | +); | |
| 182 | + | |
| 183 | +// detail.html控制器 | |
| 184 | +angular.module('ScheduleApp').controller( | |
| 185 | + 'TtInfoManageDetailCtrl', | |
| 186 | + [ | |
| 187 | + 'TtInfoManageService', | |
| 188 | + '$stateParams', | |
| 189 | + function(service, $stateParams) { | |
| 190 | + var self = this; | |
| 191 | + var TtInfo = service.getTtInfoQueryClass(); | |
| 192 | + var id = $stateParams.id; | |
| 193 | + | |
| 194 | + self.title = ""; | |
| 195 | + self.ttInfoManageForDetail = {}; | |
| 196 | + | |
| 197 | + TtInfo.get({id: id}, function(value) { | |
| 198 | + self.ttInfoManageForDetail = value; | |
| 199 | + self.title = self.ttInfoManageForDetail.xl.name + | |
| 200 | + "(" + | |
| 201 | + self.ttInfoManageForDetail.name + | |
| 202 | + ")" + | |
| 203 | + "时刻表基础信息"; | |
| 204 | + }); | |
| 205 | + } | |
| 206 | + ] | |
| 201 | 207 | ); |
| 202 | 208 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/route.js
0 → 100644
| 1 | +// ui route 配置 | |
| 2 | + | |
| 3 | +/** 时刻表管理配置route */ | |
| 4 | +ScheduleApp.config([ | |
| 5 | + '$stateProvider', | |
| 6 | + '$urlRouterProvider', | |
| 7 | + function($stateProvider, $urlRouterProvider) { | |
| 8 | + // 默认路由 | |
| 9 | + //$urlRouterProvider.otherwise('/busConfig.html'); | |
| 10 | + | |
| 11 | + $stateProvider | |
| 12 | + .state("ttInfoManage", { // index页面 | |
| 13 | + url: '/ttInfoManage', | |
| 14 | + views: { | |
| 15 | + "": { | |
| 16 | + templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/index.html' | |
| 17 | + }, | |
| 18 | + "ttInfoManage_list@ttInfoManage": { | |
| 19 | + templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/list.html' | |
| 20 | + } | |
| 21 | + }, | |
| 22 | + | |
| 23 | + resolve: { | |
| 24 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 25 | + return $ocLazyLoad.load({ | |
| 26 | + name: 'ttInfoManage_module', | |
| 27 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 28 | + files: [ | |
| 29 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 30 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 31 | + "pages/scheduleApp/module/core/ttInfoManage/module.js" | |
| 32 | + ] | |
| 33 | + }); | |
| 34 | + }] | |
| 35 | + } | |
| 36 | + }) | |
| 37 | + .state("ttInfoManage_form", { // 添加时刻表信息form | |
| 38 | + url: '/ttInfoManage_form', | |
| 39 | + views: { | |
| 40 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/form.html'} | |
| 41 | + }, | |
| 42 | + resolve: { | |
| 43 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 44 | + return $ocLazyLoad.load({ | |
| 45 | + name: 'ttInfoManage_form_module', | |
| 46 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 47 | + files: [ | |
| 48 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 49 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 50 | + "pages/scheduleApp/module/core/ttInfoManage/module.js" | |
| 51 | + ] | |
| 52 | + }); | |
| 53 | + }] | |
| 54 | + } | |
| 55 | + }) | |
| 56 | + .state("ttInfoManage_edit", { // 修改时刻表信息form | |
| 57 | + url: '/ttInfoManage_edit/:id', | |
| 58 | + views: { | |
| 59 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/edit.html'} | |
| 60 | + }, | |
| 61 | + resolve: { | |
| 62 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 63 | + return $ocLazyLoad.load({ | |
| 64 | + name: 'ttInfoManage_edit_module', | |
| 65 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 66 | + files: [ | |
| 67 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | |
| 68 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | |
| 69 | + "pages/scheduleApp/module/core/ttInfoManage/module.js" | |
| 70 | + ] | |
| 71 | + }); | |
| 72 | + }] | |
| 73 | + } | |
| 74 | + }) | |
| 75 | + .state("ttInfoManage_detail", { // 时刻表详细信息 | |
| 76 | + url: '/ttInfoManage_detail/:id', | |
| 77 | + views: { | |
| 78 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detail.html'} | |
| 79 | + }, | |
| 80 | + resolve: { | |
| 81 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | |
| 82 | + return $ocLazyLoad.load({ | |
| 83 | + name: 'ttInfoManage_detail_module', | |
| 84 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | |
| 85 | + files: [ | |
| 86 | + "pages/scheduleApp/module/core/ttInfoManage/module.js" | |
| 87 | + ] | |
| 88 | + }); | |
| 89 | + }] | |
| 90 | + } | |
| 91 | + }); | |
| 92 | + | |
| 93 | + | |
| 94 | + } | |
| 95 | +]); | |
| 0 | 96 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/main.css deleted
100644 → 0
| 1 | -form input.ng-invalid.ng-dirty.ng-invalid-required { | |
| 2 | - background-color: #FFC0CB; | |
| 3 | -} | |
| 4 | -form input.ng-valid.ng-dirty.ng-valid-required { | |
| 5 | - background-color: #78FA89; | |
| 6 | -} | |
| 7 | - | |
| 8 | -/*.ng-invalid.ng-dirty {*/ | |
| 9 | - /*background-color: #FFC0CB;*/ | |
| 10 | -/*}*/ | |
| 11 | -/*.ng-valid.ng-dirty {*/ | |
| 12 | - /*background-color: #78FA89;*/ | |
| 13 | -/*}*/ | |
| 14 | - | |
| 15 | -.ui-select-container.ng-invalid.ng-dirty.ng-invalid-required .form-control { | |
| 16 | - background-color: #FFC0CB; | |
| 17 | -} | |
| 18 | -.ui-select-container.ng-valid.ng-dirty.ng-valid-required .form-control { | |
| 19 | - background-color: #78FA89; | |
| 20 | -} | |
| 21 | - | |
| 22 | -.center-modal { | |
| 23 | - position: fixed; | |
| 24 | - top: 10%; | |
| 25 | - left: 18.5%; | |
| 26 | - z-index: 1050; | |
| 27 | - width: 80%; | |
| 28 | - height: 80%; | |
| 29 | - margin-left: -10%; | |
| 30 | -} | |
| 31 | - | |
| 32 | -/* 固定表格,防止内容撑出表格 */ | |
| 33 | -.fixTable { | |
| 34 | - table-layout: fixed; | |
| 35 | -} | |
| 36 | - | |
| 37 | -/** 内容不换行,多余的用...表示 */ | |
| 38 | -.fixTable thead th { | |
| 39 | - white-space: nowrap; | |
| 40 | - overflow: hidden; | |
| 41 | - text-overflow: ellipsis; | |
| 42 | - text-ov | |
| 43 | -} | |
| 44 | - | |
| 45 | -/** 内容不换行,多余的用...表示 */ | |
| 46 | -.fixTable tbody td { | |
| 47 | - white-space: nowrap; | |
| 48 | - overflow: hidden; | |
| 49 | - text-overflow: ellipsis; | |
| 50 | -} |
src/main/resources/static/pages/scheduleApp/module/main.js deleted
100644 → 0
| 1 | -/** shcedule 营运计划App module */ | |
| 2 | - | |
| 3 | -var ScheduleApp = angular.module('ScheduleApp', [ | |
| 4 | - 'ui.router', // ui-route跳转 | |
| 5 | - 'ui.bootstrap', // ui bootstrap封装 | |
| 6 | - 'oc.lazyLoad', // 动态加载模块(html,js,css等) | |
| 7 | - 'ngSanitize', // 净化html标签,配合ng-bind-html使用 | |
| 8 | - 'ngResource' // resource服务 | |
| 9 | -]); | |
| 10 | - | |
| 11 | -/** | |
| 12 | - * 用于请求通知。 | |
| 13 | - */ | |
| 14 | -ScheduleApp.factory('requestNotificationChannel', ['$rootScope', function($rootScope) { | |
| 15 | - // 通知消息常量 | |
| 16 | - var _START_REQUEST_ = '_START_REQUEST_'; // 开始请求通知message | |
| 17 | - var _END_REQUEST_ = '_END_REQUEST_'; // 请求结束通知message | |
| 18 | - | |
| 19 | - // 计数器 | |
| 20 | - var activeCalls = 0; | |
| 21 | - | |
| 22 | - // 发布开始请求通知 | |
| 23 | - var requestStarted = function() { | |
| 24 | - activeCalls += 1; | |
| 25 | - console.log("activeCalls=" + activeCalls); | |
| 26 | - $rootScope.$broadcast(_START_REQUEST_); | |
| 27 | - }; | |
| 28 | - // 发布请求结束通知 | |
| 29 | - var requestEnded = function() { | |
| 30 | - activeCalls -= 1; | |
| 31 | - console.log("activeCalls=" + activeCalls); | |
| 32 | - $rootScope.$broadcast(_END_REQUEST_); | |
| 33 | - }; | |
| 34 | - | |
| 35 | - /** | |
| 36 | - * 订阅开始请求通知。 | |
| 37 | - * @param $scope 作用域 | |
| 38 | - * @param handler 通知处理器函数 | |
| 39 | - */ | |
| 40 | - var onRequestStarted = function($scope, handler) { | |
| 41 | - $scope.$on(_START_REQUEST_, function(event) { | |
| 42 | - handler(); | |
| 43 | - }); | |
| 44 | - }; | |
| 45 | - /** | |
| 46 | - * 订阅请求结束通知。 | |
| 47 | - * @param $scope 作用域 | |
| 48 | - * @param handler 通知处理器函数 | |
| 49 | - */ | |
| 50 | - var onRequestEnded = function($scope, handler) { | |
| 51 | - $scope.$on(_END_REQUEST_, function(event) { | |
| 52 | - handler(); | |
| 53 | - }); | |
| 54 | - }; | |
| 55 | - | |
| 56 | - return { | |
| 57 | - requestStarted : requestStarted, | |
| 58 | - requestEnded : requestEnded, | |
| 59 | - onRequestStarted : onRequestStarted, | |
| 60 | - onRequestEnded : onRequestEnded | |
| 61 | - }; | |
| 62 | - | |
| 63 | -}]); | |
| 64 | - | |
| 65 | -// http 拦截器 | |
| 66 | -ScheduleApp.factory('myInterceptor', ['requestNotificationChannel', function(requestNotificationChannel) { | |
| 67 | - return { | |
| 68 | - request: function(config) { | |
| 69 | - requestNotificationChannel.requestStarted(); | |
| 70 | - return config; | |
| 71 | - }, | |
| 72 | - requestError: function(rejection) { | |
| 73 | - requestNotificationChannel.requestEnded(); | |
| 74 | - return rejection; | |
| 75 | - }, | |
| 76 | - response: function(response) { | |
| 77 | - requestNotificationChannel.requestEnded(); | |
| 78 | - return response; | |
| 79 | - }, | |
| 80 | - responseError: function(rejection) { | |
| 81 | - requestNotificationChannel.requestEnded(); | |
| 82 | - return rejection; | |
| 83 | - } | |
| 84 | - }; | |
| 85 | - | |
| 86 | -}]); | |
| 87 | - | |
| 88 | -ScheduleApp.config(['$httpProvider', 'myInterceptor', function($httpProvider, myInterceptor) { | |
| 89 | - $httpProvider.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest"; | |
| 90 | - $httpProvider.interceptors.push(myInterceptor); | |
| 91 | -}]); | |
| 92 | - | |
| 93 | -/** ocLazyLoader 配置 */ | |
| 94 | -ScheduleApp.config(['$ocLazyLoadProvider', function($ocLazyLoadProvider) { | |
| 95 | - $ocLazyLoadProvider.config({ | |
| 96 | - // TODO:全局配置在这里 | |
| 97 | - }); | |
| 98 | -}]); | |
| 99 | - | |
| 100 | -/** 配置全局配置信息 */ | |
| 101 | -ScheduleApp.factory('settings', ['$rootScope', function($rootScope) { | |
| 102 | - // 封装 settings服务,并设置给 $rootScope同名对象 | |
| 103 | - var settings = { | |
| 104 | - // TODO: | |
| 105 | - }; | |
| 106 | - | |
| 107 | - $rootScope.settings = settings; | |
| 108 | - | |
| 109 | - return settings; | |
| 110 | -}]); | |
| 111 | - | |
| 112 | -/** Schedule App 主应用控制器 */ | |
| 113 | -ScheduleApp.controller('ScheduleAppController', ['$scope', function($scope) { | |
| 114 | - $scope.$on('$viewContentLoaded', function(event) { | |
| 115 | - console.log("子页面已载入:" + event); | |
| 116 | - }); | |
| 117 | -}]); | |
| 118 | - | |
| 119 | - |
src/main/resources/static/pages/scheduleApp/package.json
src/main/resources/static/real_control_v2/assets/js/GeoUtils_min.js
0 → 100644
| 1 | +var BMapLib=window.BMapLib=BMapLib||{};(function(){var a=6370996.81;var b=BMapLib.GeoUtils=function(){};b.isPointInRect=function(f,g){if(!(f instanceof BMap.Point)||!(g instanceof BMap.Bounds)){return false}var e=g.getSouthWest();var h=g.getNorthEast();return(f.lng>=e.lng&&f.lng<=h.lng&&f.lat>=e.lat&&f.lat<=h.lat)};b.isPointInCircle=function(e,h){if(!(e instanceof BMap.Point)||!(h instanceof BMap.Circle)){return false}var i=h.getCenter();var g=h.getRadius();var f=b.getDistance(e,i);if(f<=g){return true}else{return false}};b.isPointOnPolyline=function(f,h){if(!(f instanceof BMap.Point)||!(h instanceof BMap.Polyline)){return false}var e=h.getBounds();if(!this.isPointInRect(f,e)){return false}var m=h.getPath();for(var k=0;k<m.length-1;k++){var l=m[k];var j=m[k+1];if(f.lng>=Math.min(l.lng,j.lng)&&f.lng<=Math.max(l.lng,j.lng)&&f.lat>=Math.min(l.lat,j.lat)&&f.lat<=Math.max(l.lat,j.lat)){var g=(l.lng-f.lng)*(j.lat-f.lat)-(j.lng-f.lng)*(l.lat-f.lat);if(g<2e-10&&g>-2e-10){return true}}}return false};b.isPointInPolygon=function(o,l){if(!(o instanceof BMap.Point)||!(l instanceof BMap.Polygon)){return false}var k=l.getBounds();if(!this.isPointInRect(o,k)){return false}var t=l.getPath();var h=t.length;var n=true;var j=0;var g=2e-10;var s,q;var e=o;s=t[0];for(var f=1;f<=h;++f){if(e.equals(s)){return n}q=t[f%h];if(e.lat<Math.min(s.lat,q.lat)||e.lat>Math.max(s.lat,q.lat)){s=q;continue}if(e.lat>Math.min(s.lat,q.lat)&&e.lat<Math.max(s.lat,q.lat)){if(e.lng<=Math.max(s.lng,q.lng)){if(s.lat==q.lat&&e.lng>=Math.min(s.lng,q.lng)){return n}if(s.lng==q.lng){if(s.lng==e.lng){return n}else{++j}}else{var r=(e.lat-s.lat)*(q.lng-s.lng)/(q.lat-s.lat)+s.lng;if(Math.abs(e.lng-r)<g){return n}if(e.lng<r){++j}}}}else{if(e.lat==q.lat&&e.lng<=q.lng){var m=t[(f+1)%h];if(e.lat>=Math.min(s.lat,m.lat)&&e.lat<=Math.max(s.lat,m.lat)){++j}else{j+=2}}}s=q}if(j%2==0){return false}else{return true}};b.degreeToRad=function(e){return Math.PI*e/180};b.radToDegree=function(e){return(180*e)/Math.PI};function d(g,f,e){if(f!=null){g=Math.max(g,f)}if(e!=null){g=Math.min(g,e)}return g}function c(g,f,e){while(g>e){g-=e-f}while(g<f){g+=e-f}return g}b.getDistance=function(j,h){if(!(j instanceof BMap.Point)||!(h instanceof BMap.Point)){return 0}j.lng=c(j.lng,-180,180);j.lat=d(j.lat,-74,74);h.lng=c(h.lng,-180,180);h.lat=d(h.lat,-74,74);var f,e,i,g;f=b.degreeToRad(j.lng);i=b.degreeToRad(j.lat);e=b.degreeToRad(h.lng);g=b.degreeToRad(h.lat);return a*Math.acos((Math.sin(i)*Math.sin(g)+Math.cos(i)*Math.cos(g)*Math.cos(e-f)))};b.getPolylineDistance=function(f){if(f instanceof BMap.Polyline||f instanceof Array){var l;if(f instanceof BMap.Polyline){l=f.getPath()}else{l=f}if(l.length<2){return 0}var j=0;for(var h=0;h<l.length-1;h++){var k=l[h];var g=l[h+1];var e=b.getDistance(k,g);j+=e}return j}else{return 0}};b.getPolygonArea=function(t){if(!(t instanceof BMap.Polygon)&&!(t instanceof Array)){return 0}var R;if(t instanceof BMap.Polygon){R=t.getPath()}else{R=t}if(R.length<3){return 0}var w=0;var D=0;var C=0;var L=0;var J=0;var F=0;var E=0;var S=0;var H=0;var p=0;var T=0;var I=0;var q=0;var e=0;var M=0;var v=0;var K=0;var N=0;var s=0;var O=0;var l=0;var g=0;var z=0;var Q=0;var G=0;var j=0;var A=0;var o=0;var m=0;var y=0;var x=0;var h=0;var k=0;var f=0;var n=a;var B=R.length;for(var P=0;P<B;P++){if(P==0){D=R[B-1].lng*Math.PI/180;C=R[B-1].lat*Math.PI/180;L=R[0].lng*Math.PI/180;J=R[0].lat*Math.PI/180;F=R[1].lng*Math.PI/180;E=R[1].lat*Math.PI/180}else{if(P==B-1){D=R[B-2].lng*Math.PI/180;C=R[B-2].lat*Math.PI/180;L=R[B-1].lng*Math.PI/180;J=R[B-1].lat*Math.PI/180;F=R[0].lng*Math.PI/180;E=R[0].lat*Math.PI/180}else{D=R[P-1].lng*Math.PI/180;C=R[P-1].lat*Math.PI/180;L=R[P].lng*Math.PI/180;J=R[P].lat*Math.PI/180;F=R[P+1].lng*Math.PI/180;E=R[P+1].lat*Math.PI/180}}S=Math.cos(J)*Math.cos(L);H=Math.cos(J)*Math.sin(L);p=Math.sin(J);T=Math.cos(C)*Math.cos(D);I=Math.cos(C)*Math.sin(D);q=Math.sin(C);e=Math.cos(E)*Math.cos(F);M=Math.cos(E)*Math.sin(F);v=Math.sin(E);K=(S*S+H*H+p*p)/(S*T+H*I+p*q);N=(S*S+H*H+p*p)/(S*e+H*M+p*v);s=K*T-S;O=K*I-H;l=K*q-p;g=N*e-S;z=N*M-H;Q=N*v-p;m=(g*s+z*O+Q*l)/(Math.sqrt(g*g+z*z+Q*Q)*Math.sqrt(s*s+O*O+l*l));m=Math.acos(m);G=z*l-Q*O;j=0-(g*l-Q*s);A=g*O-z*s;if(S!=0){o=G/S}else{if(H!=0){o=j/H}else{o=A/p}}if(o>0){y+=m;k++}else{x+=m;h++}}var u,r;u=y+(2*Math.PI*h-x);r=(2*Math.PI*k-y)+x;if(y>x){if((u-(B-2)*Math.PI)<1){f=u}else{f=r}}else{if((r-(B-2)*Math.PI)<1){f=r}else{f=u}}w=(f-(B-2)*Math.PI)*n*n;return w}})(); | |
| 0 | 2 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/css/main.css
src/main/resources/static/real_control_v2/css/north.css
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/multi_dftz.html
| ... | ... | @@ -48,7 +48,17 @@ |
| 48 | 48 | <script> |
| 49 | 49 | (function() { |
| 50 | 50 | var modal = '#schedule-multi-dftz-modal'; |
| 51 | + var lineConfig; | |
| 52 | + var dateStr = moment().format('YYYY-MM-DD'); | |
| 53 | + | |
| 51 | 54 | $(modal).on('init', function(e, data) { |
| 55 | + var firstSch = data.list[0]; | |
| 56 | + //获取线路配置信息 | |
| 57 | + $.get('/lineConfig/getByLineCode', {lineCode: firstSch.xlBm}, function (config) { | |
| 58 | + //console.log('线路配置', config); | |
| 59 | + lineConfig=config; | |
| 60 | + }); | |
| 61 | + | |
| 52 | 62 | var bodyHtml = template('schedule-multi-dftz-table-temp', data); |
| 53 | 63 | $('.multi-dftz-table .ct_table_body', modal).html(bodyHtml); |
| 54 | 64 | |
| ... | ... | @@ -93,8 +103,8 @@ |
| 93 | 103 | }); |
| 94 | 104 | |
| 95 | 105 | var valChange = function() { |
| 96 | - var old = moment($(this).data('old'), "HH:mm"), | |
| 97 | - now = moment($(this).val(), "HH:mm"), | |
| 106 | + var old = correctDate(moment(dateStr+$(this).data('old'), "YYYY-MM-DDHH:mm")), | |
| 107 | + now = correctDate(moment(dateStr+$(this).val(), "YYYY-MM-DDHH:mm")), | |
| 98 | 108 | diff = now.diff(old) / 1000 / 60, |
| 99 | 109 | span = $(this).next('.modify-num'); |
| 100 | 110 | |
| ... | ... | @@ -104,6 +114,17 @@ |
| 104 | 114 | span.text(''); |
| 105 | 115 | } else |
| 106 | 116 | span.addClass('negative').text('-' + Math.abs(diff)); |
| 117 | + }; | |
| 118 | + | |
| 119 | + | |
| 120 | + function correctDate(d){ | |
| 121 | + //小于线路运营开始时间,加一天 | |
| 122 | + if(lineConfig){ | |
| 123 | + var time = d.format('HH:mm'); | |
| 124 | + if(time < lineConfig.startOpt) | |
| 125 | + d.add(1, 'days'); | |
| 126 | + } | |
| 127 | + return d; | |
| 107 | 128 | } |
| 108 | 129 | |
| 109 | 130 | //drag.... | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/css/real.css
| ... | ... | @@ -320,10 +320,56 @@ |
| 320 | 320 | background: rgba(255, 255, 255, 0.98); |
| 321 | 321 | box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); |
| 322 | 322 | display: none; |
| 323 | + | |
| 324 | + padding-top: 10px; | |
| 323 | 325 | } |
| 324 | 326 | |
| 325 | 327 | .station-route-tree{ |
| 328 | + height: 100%; | |
| 329 | + overflow: auto; | |
| 330 | + padding: 0 0 0 9px; | |
| 331 | +} | |
| 332 | + | |
| 333 | +.top-right-toggle{ | |
| 334 | + position: absolute; | |
| 335 | + right: 2px; | |
| 336 | + top: 2px; | |
| 337 | +} | |
| 338 | + | |
| 339 | +.top-right-toggle ul.uk-subnav{ | |
| 340 | + display: none; | |
| 341 | +} | |
| 342 | + | |
| 343 | +.top-right-toggle ul.uk-subnav>li{ | |
| 344 | + padding-left: 0; | |
| 345 | +} | |
| 346 | + | |
| 347 | +.top-right-toggle ul.uk-subnav>li>a{ | |
| 348 | + padding: 0 3px; | |
| 349 | + font-size: 13px; | |
| 350 | +} | |
| 351 | + | |
| 352 | +.real_spatial_body{ | |
| 326 | 353 | width: 100%; |
| 327 | 354 | height: 100%; |
| 355 | + transition: all .3s ease; | |
| 356 | +} | |
| 357 | + | |
| 358 | +.real_spatial_body.show-tab{ | |
| 359 | + height: calc(100% - 28px); | |
| 360 | + margin-top: 28px; | |
| 361 | +} | |
| 362 | + | |
| 363 | +.real_spatial_body #spatial-tree-content{ | |
| 364 | + height: 100%; | |
| 365 | +} | |
| 366 | + | |
| 367 | +.real_spatial_body #spatial-tree-content li.car-park-item, | |
| 368 | +.real_spatial_body #spatial-tree-content li.station-route-item{ | |
| 369 | + height: 100%; | |
| 328 | 370 | overflow: auto; |
| 371 | +} | |
| 372 | + | |
| 373 | +#spatial-tree-content .jstree-default .jstree-anchor{ | |
| 374 | + font-size: 13px; | |
| 329 | 375 | } |
| 330 | 376 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/fragments/map_config.html
| ... | ... | @@ -14,8 +14,8 @@ |
| 14 | 14 | <span class="uk-form-label">空间数据</span> |
| 15 | 15 | <div class="uk-form-controls"> |
| 16 | 16 | <label><input type="checkbox" name="spatial_data_station" {{if spatialData.station}}checked{{/if}}> 站点</label> |
| 17 | - <label><input type="checkbox" {{if spatialData.electronicFence}}checked{{/if}}> 电子围栏</label> | |
| 18 | - <label><input type="checkbox" {{if spatialData.carPark}}checked{{/if}}> 停车场</label> | |
| 17 | + <label><input type="checkbox" name="spatial_electronicFence" {{if spatialData.electronicFence}}checked{{/if}}> 电子围栏</label> | |
| 18 | + <label><input type="checkbox" name="spatial_data_carPark" {{if spatialData.carPark}}checked{{/if}}> 停车场</label> | |
| 19 | 19 | </div> |
| 20 | 20 | </div> |
| 21 | 21 | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/fragments/map_infowindow.html
| 1 | 1 | <div> |
| 2 | 2 | <script id="map-win-gps-detail-temp" type="text/html"> |
| 3 | - <div class="gps_info_win" > | |
| 3 | + <div class="gps_info_win"> | |
| 4 | 4 | <h4>{{nbbm}}</h4> |
| 5 | 5 | <h5> |
| 6 | 6 | {{lineName}} |
| ... | ... | @@ -23,5 +23,64 @@ |
| 23 | 23 | <a href="javascript:;" style="float: right;">轨迹回放</a> |
| 24 | 24 | </div> |
| 25 | 25 | </script> |
| 26 | -</div> | |
| 27 | -<!-- 2222 --> | |
| 28 | 26 | \ No newline at end of file |
| 27 | + | |
| 28 | + <script id="map-win-station-detail-temp" type="text/html"> | |
| 29 | + <div class="gps_info_win"> | |
| 30 | + <h4>{{stationName}}</h4> | |
| 31 | + <p>方向: | |
| 32 | + {{if directions==0}} | |
| 33 | + 上行 | |
| 34 | + {{else if directions==1}} | |
| 35 | + 下行 | |
| 36 | + {{/if}} | |
| 37 | + </p> | |
| 38 | + <p>站点编码: {{stationCode}}</p> | |
| 39 | + <p>站点类型: | |
| 40 | + {{if stationMark=='B'}} | |
| 41 | + 起点站 | |
| 42 | + {{else if stationMark=='E'}} | |
| 43 | + 终点站 | |
| 44 | + {{else if stationMark=='Z'}} | |
| 45 | + 中途站 | |
| 46 | + {{/if}} | |
| 47 | + </p> | |
| 48 | + <p> | |
| 49 | + 经度: {{lon}} | |
| 50 | + </p> | |
| 51 | + <p>纬度: {{lat}}</p> | |
| 52 | + {{if distances > 0}} | |
| 53 | + <p>到站距离: {{distances}} 公里</p> | |
| 54 | + {{/if}} | |
| 55 | + <p> | |
| 56 | + 电子围栏类型: | |
| 57 | + {{if shapesType=='r'}} | |
| 58 | + 圆形 | |
| 59 | + {{else if shapesType=='d'}} | |
| 60 | + 多边形 | |
| 61 | + {{/if}} | |
| 62 | + </p> | |
| 63 | + <p> | |
| 64 | + {{if shapesType=='r'}} | |
| 65 | + 半径:{{radius}} | |
| 66 | + {{else if shapesType=='d'}} | |
| 67 | + 面积:{{_polygonArea}} 平方米 | |
| 68 | + {{/if}} | |
| 69 | + </p> | |
| 70 | + </div> | |
| 71 | + </script> | |
| 72 | + | |
| 73 | + <script id="map-win-carpark-detail-temp" type="text/html"> | |
| 74 | + <div class="gps_info_win"> | |
| 75 | + <h4>{{parkName}}</h4> | |
| 76 | + <p>停车场编码: {{parkCode}}</p> | |
| 77 | + <p>面积:{{area}}</p> | |
| 78 | + <p> | |
| 79 | + {{if shapesType=='r'}} | |
| 80 | + 电子围栏半径:{{radius}} | |
| 81 | + {{else if shapesType=='d'}} | |
| 82 | + 电子围栏面积:{{_polygonArea}} 平方米 | |
| 83 | + {{/if}} | |
| 84 | + </p> | |
| 85 | + </div> | |
| 86 | + </script> | |
| 87 | +</div> | |
| 29 | 88 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/js/config.js
| ... | ... | @@ -84,7 +84,9 @@ var gb_map_config = (function () { |
| 84 | 84 | var handler = { |
| 85 | 85 | map_type: changeMapType, |
| 86 | 86 | traffic: trafficSwitch, |
| 87 | - spatial_data_station: spatial_data_station | |
| 87 | + spatial_data_station: spatial_data_station, | |
| 88 | + spatial_data_carPark: spatial_data_carPark, | |
| 89 | + spatial_electronicFence: spatial_electronicFence | |
| 88 | 90 | }; |
| 89 | 91 | |
| 90 | 92 | //切换地图类型 |
| ... | ... | @@ -113,7 +115,26 @@ var gb_map_config = (function () { |
| 113 | 115 | //空间数据 站点 |
| 114 | 116 | function spatial_data_station(val) { |
| 115 | 117 | defaultConfig.spatialData.station=this.checked; |
| 116 | - gb_map_spatial_data.refresh(); | |
| 118 | + if(!this.checked) | |
| 119 | + gb_map_imap.call('hideAllStationMarker'); | |
| 120 | + gb_map_spatial_data.refresh('station', this.checked); | |
| 121 | + } | |
| 122 | + | |
| 123 | + //空间数据 停车场 | |
| 124 | + function spatial_data_carPark(val) { | |
| 125 | + defaultConfig.spatialData.carPark=this.checked; | |
| 126 | + if(!this.checked) | |
| 127 | + gb_map_imap.call('hideDrawCarpark'); | |
| 128 | + gb_map_spatial_data.refresh('carPark', this.checked); | |
| 129 | + } | |
| 130 | + | |
| 131 | + //空间数据 电子围栏 | |
| 132 | + function spatial_electronicFence(val) { | |
| 133 | + defaultConfig.spatialData.electronicFence=this.checked; | |
| 134 | + if(this.checked) | |
| 135 | + gb_map_overlay_mge.drawElectronicFence(); | |
| 136 | + else | |
| 137 | + gb_map_imap.call('hideAllCircles'); | |
| 117 | 138 | } |
| 118 | 139 | |
| 119 | 140 | function recursion_get_attr(data, attr) { | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/js/gps_tree.js
| ... | ... | @@ -24,8 +24,9 @@ var gb_map_gps_tree = (function () { |
| 24 | 24 | cb && cb(); |
| 25 | 25 | }) |
| 26 | 26 | .on('activate_node.jstree', function (e, n) { |
| 27 | + //console.log('activate_node.jstree', e, n); | |
| 27 | 28 | var node = n.node; |
| 28 | - if(node.a_attr && node.a_attr.type=='device'){ | |
| 29 | + if(node.a_attr && node.a_attr.type=='device' && node.state.checked){ | |
| 29 | 30 | var device = node.a_attr.device; |
| 30 | 31 | gb_map_overlay_mge._focus(device); |
| 31 | 32 | } |
| ... | ... | @@ -55,6 +56,10 @@ var gb_map_gps_tree = (function () { |
| 55 | 56 | } |
| 56 | 57 | } |
| 57 | 58 | }, |
| 59 | + //local storage里的key | |
| 60 | + 'state':{ | |
| 61 | + 'key': 'jstree_map_devices' | |
| 62 | + }, | |
| 58 | 63 | 'plugins': ['checkbox', 'contextmenu', 'state'] |
| 59 | 64 | }); |
| 60 | 65 | }; | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/js/map/iMap.js
| ... | ... | @@ -34,6 +34,7 @@ var gb_map_imap = (function () { |
| 34 | 34 | alertErr('不存在的地图实例' + mapName); |
| 35 | 35 | }, |
| 36 | 36 | createCarIcon: createCarIcon, |
| 37 | + createStationIcon: createStationIcon, | |
| 37 | 38 | call: function (f, opts) { |
| 38 | 39 | var instance = maps[currentMap].instance; |
| 39 | 40 | if (instance[f]) |
| ... | ... | @@ -66,11 +67,50 @@ var gb_map_imap = (function () { |
| 66 | 67 | //文字 |
| 67 | 68 | ctx.font = "14px arial"; |
| 68 | 69 | ctx.fillStyle = "#fff"; |
| 69 | - ctx.fillText(gps.nbbm, 8, 18); | |
| 70 | + ctx.fillText(gps.nbbm, 4, 18); | |
| 70 | 71 | |
| 71 | 72 | return canvas.toDataURL(); |
| 72 | 73 | } |
| 73 | 74 | |
| 75 | + //绘制站点icon | |
| 76 | + function createStationIcon(station, w) { | |
| 77 | + var canvas = $('<canvas></canvas>')[0]; | |
| 78 | + var ctx = canvas.getContext('2d'); | |
| 79 | + | |
| 80 | +/* var color=station.directions==0?'#125688':'#fb1804' | |
| 81 | + ,bg='rgba(255, 255, 255, 0.87)';*/ | |
| 82 | + | |
| 83 | + var color='#fff', | |
| 84 | + bg=station.directions==0?'#125688':'#fb1804'; | |
| 85 | + //矩形 | |
| 86 | + //ctx.roundRect(0, 0, w, 17, 1).stroke(); | |
| 87 | + ctx.rect(-1,-1,w,17); | |
| 88 | + ctx.fillStyle = bg; | |
| 89 | + ctx.fill(); | |
| 90 | + //ctx.lineWidth = 1; | |
| 91 | + //ctx.strokeStyle=color; | |
| 92 | + //ctx.stroke(); | |
| 93 | + | |
| 94 | + //文字 | |
| 95 | + ctx.font = "12px arial"; | |
| 96 | + ctx.fillStyle = color; | |
| 97 | + ctx.fillText(station.stationName, 2, 12); | |
| 98 | + | |
| 99 | + //角 | |
| 100 | + var c=w/2; | |
| 101 | + ctx.beginPath(); | |
| 102 | + ctx.moveTo(c - 7,16); | |
| 103 | + ctx.lineTo(c,24); | |
| 104 | + ctx.lineTo(c + 7,16); | |
| 105 | + ctx.closePath(); | |
| 106 | + | |
| 107 | + ctx.fillStyle = bg; | |
| 108 | + ctx.fill(); | |
| 109 | + ctx.strokeStyle='#fff'; | |
| 110 | + ctx.stroke(); | |
| 111 | + return canvas.toDataURL(); | |
| 112 | + } | |
| 113 | + | |
| 74 | 114 | function color(g) { |
| 75 | 115 | var colours = {}; |
| 76 | 116 | switch (g.state) { | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/js/map/platform/baidu.js
| ... | ... | @@ -2,15 +2,20 @@ |
| 2 | 2 | var gb_map_baidu = (function(){ |
| 3 | 3 | |
| 4 | 4 | var map; |
| 5 | - var realMarkers = {}; | |
| 6 | 5 | var topMarker; |
| 7 | 6 | //实时路况是否打开 |
| 8 | - var traffVisible; | |
| 9 | - //线路 Polyline | |
| 10 | - var linePolyline; | |
| 11 | - | |
| 7 | + //var traffVisible; | |
| 8 | + var realMarkers = {}; | |
| 9 | + //路段对照 | |
| 12 | 10 | var polylines={}; |
| 13 | - var buffAreas = {}; | |
| 11 | + //站点merker | |
| 12 | + var stationMarkers = {}; | |
| 13 | + //电子围栏对照 | |
| 14 | + var electronicFences = {}; | |
| 15 | + //停车场对照 | |
| 16 | + var carparks = {}; | |
| 17 | + //var buffAreas = {}; | |
| 18 | + | |
| 14 | 19 | |
| 15 | 20 | var ctrl; |
| 16 | 21 | var baiduInstance = { |
| ... | ... | @@ -51,15 +56,17 @@ var gb_map_baidu = (function(){ |
| 51 | 56 | |
| 52 | 57 | //$('#tcWrap.maplibTc').addClass('animated bounceInLeft'); |
| 53 | 58 | //$('.maplibTcBtn_deskTop.anchorTR').remove(); |
| 59 | +/* //缩放事件 | |
| 60 | + map.addEventListener("zoomend", function(type, target){ | |
| 61 | + //console.log('zoomend', type, target, map.getZoom()); | |
| 62 | + //刷新站点marker | |
| 63 | + refreshStation(); | |
| 64 | + });*/ | |
| 54 | 65 | }, |
| 55 | 66 | destroy: function(){ |
| 56 | 67 | realMarkers = {}; |
| 57 | - linePolyline = []; | |
| 58 | - }/*, | |
| 59 | - clear: function(){ | |
| 60 | - realMarkers = {}; | |
| 61 | - map.clearOverlays(); | |
| 62 | - }*/, | |
| 68 | + //linePolyline = []; | |
| 69 | + }, | |
| 63 | 70 | //画线路图层 |
| 64 | 71 | drawLine: function(opt){ |
| 65 | 72 | if(polylines[opt.id]) |
| ... | ... | @@ -105,15 +112,7 @@ var gb_map_baidu = (function(){ |
| 105 | 112 | var pos=polylines[opt.id].getPath(); |
| 106 | 113 | console.log('定位到中心,,,', pos[parseInt(pos.length / 2)]); |
| 107 | 114 | map.setCenter(pos[parseInt(pos.length / 2)]); |
| 108 | - }/*, | |
| 109 | - removeLine: function(opts){ | |
| 110 | - var polyline=polylines[opts.key]; | |
| 111 | - if(polyline){ | |
| 112 | - map.removeOverlay(polyline); | |
| 113 | - polylines[opts.key]=null; | |
| 114 | - delete polylines[opts.key]; | |
| 115 | - } | |
| 116 | - }*/, | |
| 115 | + }, | |
| 117 | 116 | //绘制GPS信号 |
| 118 | 117 | drawRealGpsMarker: function(opts){ |
| 119 | 118 | var gpsArray = opts.gpsList; |
| ... | ... | @@ -139,6 +138,65 @@ var gb_map_baidu = (function(){ |
| 139 | 138 | } |
| 140 | 139 | }); |
| 141 | 140 | }, |
| 141 | + //绘制站点marker | |
| 142 | + drawStationMarker: function (opt) { | |
| 143 | + this.hideAllStationMarker(); | |
| 144 | + | |
| 145 | + var array=opt.list, marker; | |
| 146 | + $.each(array, function () { | |
| 147 | + if(stationMarkers[this.stationCode]){ | |
| 148 | + stationMarkers[this.stationCode].show(); | |
| 149 | + return true; | |
| 150 | + } | |
| 151 | + | |
| 152 | + transCoord(this); | |
| 153 | + marker=createStationMark(this); | |
| 154 | + map.addOverlay(marker); | |
| 155 | + stationMarkers[this.stationCode]=marker; | |
| 156 | + }); | |
| 157 | + }, | |
| 158 | + hideAllStationMarker: function () { | |
| 159 | + for(var code in stationMarkers){ | |
| 160 | + stationMarkers[code].hide(); | |
| 161 | + } | |
| 162 | + }, | |
| 163 | + //绘制停车场 | |
| 164 | + drawCarpark: function (opt) { | |
| 165 | + var list = opt.list; | |
| 166 | + var config = gb_map_config.getConfig() | |
| 167 | + ,color = config.section.color.up; | |
| 168 | + | |
| 169 | + this.hideDrawCarpark(); | |
| 170 | + $.each(list, function () { | |
| 171 | + if(carparks[this.parkCode]){ | |
| 172 | + carparks[this.parkCode].show(); | |
| 173 | + return true; | |
| 174 | + } | |
| 175 | + | |
| 176 | + transMultiWGSToBd(this); | |
| 177 | + var polygon = new BMap.Polygon(this.bdPoints, {strokeColor: color, strokeWeight: 1}); | |
| 178 | + map.addOverlay(polygon); | |
| 179 | + carparks[this.parkCode]=polygon; | |
| 180 | + | |
| 181 | + //中心点 | |
| 182 | + var ts = this.gCenterPoint.split(' ') | |
| 183 | + ,coord = TransGPS.wgsToBD(parseFloat(ts[1]), parseFloat(ts[0])); | |
| 184 | + polygon._centerPoint = new BMap.Point(coord.lng, coord.lat); | |
| 185 | + | |
| 186 | + //info window | |
| 187 | + polygon.infoWin = new BMap.InfoWindow(gb_map_overlay_mge.map_carpark_win_temp(this), {}); | |
| 188 | + polygon.addEventListener('click', function(){ | |
| 189 | + console.log('aaa', this); | |
| 190 | + map.openInfoWindow(this.infoWin, this._centerPoint); | |
| 191 | + }); | |
| 192 | + }); | |
| 193 | + }, | |
| 194 | + //隐藏停车场 | |
| 195 | + hideDrawCarpark: function () { | |
| 196 | + for(var code in carparks){ | |
| 197 | + carparks[code].hide(); | |
| 198 | + } | |
| 199 | + }, | |
| 142 | 200 | clearAll: function () { |
| 143 | 201 | //清除所有覆盖物 |
| 144 | 202 | realMarkers = {}; |
| ... | ... | @@ -165,45 +223,86 @@ var gb_map_baidu = (function(){ |
| 165 | 223 | } |
| 166 | 224 | }); |
| 167 | 225 | }, |
| 168 | - //定位到marker | |
| 226 | + //定位到车辆 marker | |
| 169 | 227 | goToMarker: function(opts){ |
| 170 | 228 | var deviceId = opts.deviceId |
| 171 | 229 | ,m = realMarkers[deviceId]; |
| 172 | 230 | if(m){ |
| 173 | - map.panTo(m.point); | |
| 174 | - setTop(m); | |
| 231 | + map.panTo(m.point, {noAnimation: true}); | |
| 232 | + //setTop(m); | |
| 233 | + } | |
| 234 | + }, | |
| 235 | + //定位到站点 | |
| 236 | + goToStation: function (stationCode) { | |
| 237 | + var m = stationMarkers[stationCode]; | |
| 238 | + if(m){ | |
| 239 | + map.panTo(m.point, {noAnimation: true}); | |
| 240 | + map.openInfoWindow(m.infoWin, m.point); | |
| 241 | + } | |
| 242 | + }, | |
| 243 | + //定位到停车场 | |
| 244 | + goToCarpark: function (parkCode) { | |
| 245 | + var polygon = carparks[parkCode]; | |
| 246 | + if(polygon){ | |
| 247 | + map.panTo(polygon._centerPoint, {noAnimation: true}); | |
| 248 | + map.openInfoWindow(polygon.infoWin, polygon._centerPoint); | |
| 175 | 249 | } |
| 176 | 250 | }, |
| 177 | - //打开信息窗口 | |
| 251 | + //打开车辆信息窗口 | |
| 178 | 252 | openWindow: function(opts){ |
| 179 | 253 | var deviceId = opts.deviceId |
| 180 | 254 | ,m = realMarkers[deviceId]; |
| 181 | 255 | bdOpenWindow(m); |
| 182 | 256 | }, |
| 257 | + //打开站点信息窗口 | |
| 258 | + openStationWin: function (opt) { | |
| 259 | + | |
| 260 | + }, | |
| 183 | 261 | //绘制圆形 |
| 184 | - drawCircle: function(opts){ | |
| 185 | - var coord = TransGPS.wgsToBD(opts.lat, opts.lon); | |
| 186 | - var circle = new BMap.Circle(new BMap.Point(coord.lng, coord.lat), opts.radius); | |
| 187 | - if(opts.color) | |
| 188 | - circle.setStrokeColor(opts.color); | |
| 189 | - if(opts.weight) | |
| 190 | - circle.setStrokeWeight(opts.weight); | |
| 262 | + drawCircle: function(opt){ | |
| 263 | + if(electronicFences[opt.id]){ | |
| 264 | + electronicFences[opt.id].show(); | |
| 265 | + return; | |
| 266 | + } | |
| 267 | + | |
| 268 | + var coord = TransGPS.wgsToBD(opt.lat, opt.lon); | |
| 269 | + var circle = new BMap.Circle(new BMap.Point(coord.lng, coord.lat), opt.radius); | |
| 270 | + circle.setStrokeColor(opt.color); | |
| 271 | + circle.setStrokeWeight(opt.weight); | |
| 191 | 272 | |
| 192 | 273 | map.addOverlay(circle); |
| 193 | - buffAreas[opts.id] = circle; | |
| 274 | + electronicFences[opt.id] = circle; | |
| 275 | + }, | |
| 276 | + hideAllCircles: function () { | |
| 277 | + for(var code in electronicFences){ | |
| 278 | + electronicFences[code].hide(); | |
| 279 | + } | |
| 194 | 280 | }, |
| 195 | 281 | //绘制多边形 |
| 196 | - drawPolygon: function(opts){ | |
| 197 | - var wgs,coord, points = []; | |
| 198 | - $.each(opts.cds, function(){ | |
| 199 | - wgs = this.split(' '); | |
| 200 | - coord = TransGPS.wgsToBD(parseFloat(wgs[1]), parseFloat(wgs[0])); | |
| 201 | - points.push(new BMap.Point(coord.lng, coord.lat)); | |
| 202 | - }); | |
| 282 | + drawPolygon: function(opt){ | |
| 283 | + var station = opt.station | |
| 284 | + ,code = station.stationCode; | |
| 285 | + if(electronicFences[code]){ | |
| 286 | + electronicFences[code].show(); | |
| 287 | + return; | |
| 288 | + } | |
| 203 | 289 | |
| 204 | - var polygon = new BMap.Polygon(points, {strokeColor: opts.color, strokeWeight: opts.weight, strokeOpacity: 0.7}); | |
| 290 | + transMultiWGSToBd(station); | |
| 291 | + var polygon = new BMap.Polygon(station.bdPoints, {strokeColor: opt.color, strokeWeight: opt.weight}); | |
| 205 | 292 | map.addOverlay(polygon); |
| 206 | - buffAreas[opts.id] = polygon; | |
| 293 | + electronicFences[code]=polygon; | |
| 294 | + | |
| 295 | +/* | |
| 296 | + //计算多边形面积 | |
| 297 | + var area=BMapLib.GeoUtils.getPolygonArea(polygon); | |
| 298 | + if(!isNaN(area)) | |
| 299 | + polygon._polygonArea=area+'米'; | |
| 300 | + else | |
| 301 | + polygon._polygonArea='计算失败'; | |
| 302 | + | |
| 303 | + polygon.addEventListener('click', function(){ | |
| 304 | + map.openInfoWindow(this.infoWin, marker.point); | |
| 305 | + });*/ | |
| 207 | 306 | }, |
| 208 | 307 | //删除缓冲区 |
| 209 | 308 | clearBuffArea: function(code){ |
| ... | ... | @@ -214,6 +313,65 @@ var gb_map_baidu = (function(){ |
| 214 | 313 | } |
| 215 | 314 | }; |
| 216 | 315 | |
| 316 | + function transMultiWGSToBd(obj) { | |
| 317 | + if(!obj._gPoints) | |
| 318 | + return; | |
| 319 | + var bdPoints = [],coord; | |
| 320 | + $.each(obj._gPoints, function () { | |
| 321 | + coord = TransGPS.wgsToBD(this.lat, this.lng); | |
| 322 | + bdPoints.push(new BMap.Point(coord.lng, coord.lat)); | |
| 323 | + }); | |
| 324 | + | |
| 325 | + obj.bdPoints=bdPoints; | |
| 326 | + } | |
| 327 | + | |
| 328 | +/* function transCoordCarpark(carpark) { | |
| 329 | + var pStr = carpark.gParkPoint.substring(9, carpark.gParkPoint.length - 2); | |
| 330 | + var pArr = filterPolygonCoords(pStr.split(',')), coord, points=[]; | |
| 331 | + | |
| 332 | + $.each(pArr, function (i, str) { | |
| 333 | + var c = str.split(' '); | |
| 334 | + coord = TransGPS.wgsToBD(parseFloat(c[1]), parseFloat(c[0])); | |
| 335 | + points.push(new BMap.Point(coord.lng, coord.lat)); | |
| 336 | + }); | |
| 337 | + carpark.bdPoints=points; | |
| 338 | + } | |
| 339 | + | |
| 340 | + function transPolygonStation(opt) { | |
| 341 | + var pStr = opt.polygon.substring(9, opt.polygon.length - 2); | |
| 342 | + var pArr = filterPolygonCoords(pStr.split(',')), coord, points=[]; | |
| 343 | + | |
| 344 | + $.each(pArr, function (i, str) { | |
| 345 | + var c = str.split(' '); | |
| 346 | + coord = TransGPS.wgsToBD(parseFloat(c[1]), parseFloat(c[0])); | |
| 347 | + points.push(new BMap.Point(coord.lng, coord.lat)); | |
| 348 | + }); | |
| 349 | + opt.bdPoints=points; | |
| 350 | + }*/ | |
| 351 | + | |
| 352 | +/* //处理多边形点数组 | |
| 353 | + function filterPolygonCoords(pArr) { | |
| 354 | + var newArr=[]; | |
| 355 | + //去掉已闭合的尾 | |
| 356 | + var end=pArr.length - 1; | |
| 357 | + if(pArr.length > 1 && pArr[0] == pArr[end]) | |
| 358 | + pArr = pArr.slice(0, end); | |
| 359 | + | |
| 360 | + //去掉连续的重复点 | |
| 361 | + var last; | |
| 362 | + $.each(pArr, function (i, str) { | |
| 363 | + if(last){ | |
| 364 | + if(last != str) | |
| 365 | + newArr.push(str); | |
| 366 | + } | |
| 367 | + else | |
| 368 | + newArr.push(str); | |
| 369 | + last = str; | |
| 370 | + }); | |
| 371 | + | |
| 372 | + return newArr; | |
| 373 | + }*/ | |
| 374 | + | |
| 217 | 375 | function transCoord(gps) { |
| 218 | 376 | var coord = TransGPS.wgsToBD(gps.lat, gps.lon); |
| 219 | 377 | gps.bd_lat = coord.lat; |
| ... | ... | @@ -231,9 +389,10 @@ var gb_map_baidu = (function(){ |
| 231 | 389 | var marker = new BMap.Marker(point); |
| 232 | 390 | |
| 233 | 391 | //根据编码长度 计算marker 宽度 |
| 234 | - var w = gpsData.nbbm.length * 10; | |
| 392 | + var w = calcGpsMarkerWidth(gpsData.nbbm);//gpsData.nbbm.length * 10; | |
| 235 | 393 | marker.setIcon(new BMap.Icon(gb_map_imap.createCarIcon(gpsData, w), new BMap.Size(w,25))); |
| 236 | 394 | |
| 395 | + marker._icon_width=w; | |
| 237 | 396 | marker.infoWindow = new BMap.InfoWindow(bd_gps_info_win_opts); |
| 238 | 397 | marker.gpsData = gpsData; |
| 239 | 398 | //click |
| ... | ... | @@ -241,8 +400,52 @@ var gb_map_baidu = (function(){ |
| 241 | 400 | bdOpenWindow(this); |
| 242 | 401 | }); |
| 243 | 402 | //mouseover |
| 244 | - marker.addEventListener('mouseover', function(){ | |
| 403 | + /*marker.addEventListener('mouseover', function(){ | |
| 245 | 404 | setTop(this); |
| 405 | + });*/ | |
| 406 | + marker.setTop(true); | |
| 407 | + return marker; | |
| 408 | + } | |
| 409 | + | |
| 410 | + //为每个数字定义宽度 | |
| 411 | +/* var icon_num_width=[ | |
| 412 | + 7,6,7,7,7,7,7,7,7,7 | |
| 413 | + ];*/ | |
| 414 | + function calcGpsMarkerWidth(nbbm) { | |
| 415 | + var width=0; | |
| 416 | + $.each(nbbm.split(''), function () { | |
| 417 | + if(!isNaN(this)) | |
| 418 | + width += 7;//icon_num_width[this]; | |
| 419 | + else if(this=='-') | |
| 420 | + width += 10; | |
| 421 | + else | |
| 422 | + width += 16; | |
| 423 | + }); | |
| 424 | + return width; | |
| 425 | + } | |
| 426 | + | |
| 427 | + function createStationMark(statio) { | |
| 428 | + var point = new BMap.Point(statio.bd_lon, statio.bd_lat); | |
| 429 | + var marker = new BMap.Marker(point); | |
| 430 | + | |
| 431 | + //根据编码长度 计算marker 宽度 | |
| 432 | + var w = statio.stationName.length * 12 + 4 | |
| 433 | + ,iw=w-2; | |
| 434 | + var icon = new BMap.Icon(gb_map_imap.createStationIcon(statio, w), new BMap.Size(iw,24), {anchor: new BMap.Size(iw/2,24)}) | |
| 435 | + marker.setIcon(icon); | |
| 436 | + | |
| 437 | + //信息窗口 | |
| 438 | + marker.infoWin=new BMap.InfoWindow(gb_map_overlay_mge.map_station_win_temp(statio), {}); | |
| 439 | + marker.addEventListener('click', function(){ | |
| 440 | + map.openInfoWindow(this.infoWin, this.point); | |
| 441 | + }); | |
| 442 | + | |
| 443 | + //mouseover | |
| 444 | + marker.addEventListener('mouseover', function(){ | |
| 445 | + this.setTop(true); | |
| 446 | + }); | |
| 447 | + marker.addEventListener('mouseout', function () { | |
| 448 | + this.setTop(false); | |
| 246 | 449 | }); |
| 247 | 450 | return marker; |
| 248 | 451 | } |
| ... | ... | @@ -269,12 +472,18 @@ var gb_map_baidu = (function(){ |
| 269 | 472 | }); |
| 270 | 473 | }*/ |
| 271 | 474 | |
| 475 | +/* function refreshStation() { | |
| 476 | + //console.log('refreshStation', map.getZoom()); | |
| 477 | + var zoom=map.getZoom(); | |
| 478 | + | |
| 479 | + }*/ | |
| 480 | + | |
| 272 | 481 | function moveMarker(m, gps){ |
| 273 | 482 | m.setPosition(new BMap.Point(gps.bd_lon, gps.bd_lat)); |
| 274 | 483 | m.gpsData = gps; |
| 275 | 484 | //重新设置icon |
| 276 | 485 | //根据编码长度 计算marker 宽度 |
| 277 | - var w = gps.nbbm.length * 10; | |
| 486 | + var w = m._icon_width;//calcGpsMarkerWidth(gps.nbbm);//gps.nbbm.length * 10; | |
| 278 | 487 | m.setIcon(new BMap.Icon(gb_map_imap.createCarIcon(gps, w), new BMap.Size(w,25))); |
| 279 | 488 | |
| 280 | 489 | //更新 infoWindow | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/js/map_overlay_manager.js
| ... | ... | @@ -106,18 +106,105 @@ var gb_map_overlay_mge = (function () { |
| 106 | 106 | //打开信息窗口 |
| 107 | 107 | gb_map_imap.call('openWindow',{deviceId: deviceId}); |
| 108 | 108 | }; |
| 109 | + | |
| 110 | + //站点获得焦点 | |
| 111 | + var _focus_station = function (station) { | |
| 112 | + gb_map_imap.call('goToStation', station.stationCode); | |
| 113 | + } | |
| 114 | + | |
| 115 | + //停车场获得焦点 | |
| 116 | + var _focus_carpark = function (carpark) { | |
| 117 | + //console.log('_focus_carpark', carpark); | |
| 118 | + gb_map_imap.call('goToCarpark', carpark.parkCode); | |
| 119 | + } | |
| 109 | 120 | |
| 110 | 121 | function getCheckedDevice() { |
| 111 | 122 | return gb_map_gps_tree.getChecked().filter(deviceFilter); |
| 112 | 123 | } |
| 124 | + | |
| 125 | + //绘制站点 | |
| 126 | + var drawStation = function () { | |
| 127 | + var list = gb_map_spatial_data.getCheckedStation(); | |
| 128 | + //绘制站点 | |
| 129 | + gb_map_imap.call('drawStationMarker', {list: list}); | |
| 130 | + //绘制电子围栏 | |
| 131 | + drawElectronicFence(list); | |
| 132 | + } | |
| 133 | + | |
| 134 | + //绘制电子围栏 | |
| 135 | + var drawElectronicFence = function (list) { | |
| 136 | + var config = gb_map_config.getConfig().spatialData; | |
| 137 | + if(!config.electronicFence) | |
| 138 | + return; | |
| 139 | + | |
| 140 | + if(!list){ | |
| 141 | + list = gb_map_spatial_data.getCheckedStation(); | |
| 142 | + } | |
| 143 | + | |
| 144 | + | |
| 145 | + gb_map_imap.call('hideAllCircles'); | |
| 146 | + $.each(list, function () { | |
| 147 | + fun=this.shapesType=='r'?drawCircle:drawPolygon; | |
| 148 | + fun(this); | |
| 149 | + }); | |
| 150 | + } | |
| 151 | + | |
| 152 | + //绘制停车场 | |
| 153 | + var drawCarpark = function () { | |
| 154 | + var list = gb_map_spatial_data.gteCheckedCarpark(); | |
| 155 | + gb_map_imap.call('drawCarpark', {list: list}); | |
| 156 | + } | |
| 157 | + | |
| 158 | + var drawCircle=function (data) { | |
| 159 | + var config = gb_map_config.getConfig().section.color; | |
| 160 | + var color = data.directions==0?config.up:config.down; | |
| 161 | + | |
| 162 | + var opt = { | |
| 163 | + lon: data.lon, | |
| 164 | + lat: data.lat, | |
| 165 | + text: data.stationName, | |
| 166 | + color: color, | |
| 167 | + weight: 2, | |
| 168 | + radius: parseFloat(data.radius), | |
| 169 | + id: data.stationCode | |
| 170 | + }; | |
| 171 | + | |
| 172 | + gb_map_imap.call('drawCircle', opt); | |
| 173 | + } | |
| 174 | + | |
| 175 | + var drawPolygon=function (data) { | |
| 176 | + var config = gb_map_config.getConfig().section.color; | |
| 177 | + var color = data.directions==0?config.up:config.down; | |
| 178 | + | |
| 179 | + var opt = { | |
| 180 | + //id:data.stationCode, | |
| 181 | + color: color, | |
| 182 | + weight: 2, | |
| 183 | + station: data | |
| 184 | + }; | |
| 185 | + | |
| 186 | + gb_map_imap.call('drawPolygon', opt); | |
| 187 | + } | |
| 188 | + | |
| 113 | 189 | return { |
| 114 | 190 | init: init, |
| 115 | 191 | refresh: showOverlayByChecks, |
| 116 | 192 | _focus: _focus, |
| 193 | + _focus_station: _focus_station, | |
| 194 | + _focus_carpark: _focus_carpark, | |
| 117 | 195 | map_gps_win_temp: function (data) { |
| 118 | 196 | return temps['map-win-gps-detail-temp'](data); |
| 119 | 197 | }, |
| 198 | + map_station_win_temp: function (data) { | |
| 199 | + return temps['map-win-station-detail-temp'](data); | |
| 200 | + }, | |
| 201 | + map_carpark_win_temp: function (data) { | |
| 202 | + return temps['map-win-carpark-detail-temp'](data); | |
| 203 | + }, | |
| 120 | 204 | reDraw: reDraw, |
| 121 | - getCheckedDevice: getCheckedDevice | |
| 205 | + getCheckedDevice: getCheckedDevice, | |
| 206 | + drawStation: drawStation, | |
| 207 | + drawElectronicFence: drawElectronicFence, | |
| 208 | + drawCarpark: drawCarpark | |
| 122 | 209 | }; |
| 123 | 210 | })(); |
| 124 | 211 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/js/spatial_data.js
| ... | ... | @@ -13,13 +13,28 @@ var gb_map_spatial_data = (function () { |
| 13 | 13 | return str.substr(1); |
| 14 | 14 | })(); |
| 15 | 15 | |
| 16 | + var cont = '#spatial-tree-content'; | |
| 16 | 17 | //线路站点路由数据 |
| 17 | 18 | var lineStationArr; |
| 18 | 19 | |
| 20 | + //停车场数据 | |
| 21 | + var carparkArr; | |
| 19 | 22 | |
| 20 | 23 | var init = function () { |
| 24 | + //加载站点路由数据 | |
| 21 | 25 | gb_common.$get('/realMap/stationSpatialData', {idx: line_idx}, function (rs) { |
| 22 | 26 | var list = rs.list; |
| 27 | + $.each(list, function () { | |
| 28 | + this.lat = this.gLaty; | |
| 29 | + this.lon = this.gLonx; | |
| 30 | + delete this.gLaty; | |
| 31 | + delete this.gLonx; | |
| 32 | + if(this.shapesType=='d'){ | |
| 33 | + var calcRs = calcPolygonArea(this.gPolygonGrid); | |
| 34 | + this._polygonArea = calcRs._polygonArea; | |
| 35 | + this._gPoints = calcRs._gPoints; | |
| 36 | + } | |
| 37 | + }); | |
| 23 | 38 | //排序 |
| 24 | 39 | list.sort(function (a, b) { |
| 25 | 40 | return a.stationRouteCode - b.stationRouteCode; |
| ... | ... | @@ -31,42 +46,232 @@ var gb_map_spatial_data = (function () { |
| 31 | 46 | lineStationArr[lineCode] = gb_common.groupBy(lineStationArr[lineCode], 'directions'); |
| 32 | 47 | } |
| 33 | 48 | |
| 49 | + ep.emitLater('station'); | |
| 50 | + }); | |
| 51 | + | |
| 52 | + //加载停车场数据 | |
| 53 | + gb_common.$get('/realMap/carParkSpatialData', {}, function (rs) { | |
| 54 | + carparkArr = rs.list; | |
| 55 | + $.each(carparkArr, function () { | |
| 56 | + if(this.shapesType=='d'){ | |
| 57 | + var calcRs = calcPolygonArea(this.gParkPoint); | |
| 58 | + this._polygonArea = calcRs._polygonArea; | |
| 59 | + this._gPoints = calcRs._gPoints; | |
| 60 | + } | |
| 61 | + }); | |
| 62 | + ep.emitLater('carpark'); | |
| 63 | + }); | |
| 64 | + | |
| 65 | + var ep = EventProxy.create('station', 'carpark', function () { | |
| 66 | + $(".real_spatial_panel").resizable({ | |
| 67 | + maxHeight: '100%', | |
| 68 | + minHeight: 18 | |
| 69 | + }); | |
| 70 | + | |
| 71 | + //绘制站点路由树 | |
| 72 | + $('.station-route-tree', cont) | |
| 73 | + //state插件 状态恢复完成 | |
| 74 | + .on('state_ready.jstree', function () { | |
| 75 | + //绑定checkbox状态切换事件 | |
| 76 | + $(this).on('check_node.jstree uncheck_node.jstree', gb_map_overlay_mge.drawStation); | |
| 77 | + }) | |
| 78 | + .on('activate_node.jstree', function (e, n) { | |
| 79 | + var node = n.node; | |
| 80 | + if(node.state.checked) | |
| 81 | + gb_map_overlay_mge._focus_station(node.data); | |
| 82 | + }) | |
| 83 | + .jstree({ | |
| 84 | + 'core': { | |
| 85 | + 'data': get_st_route_tree_data() | |
| 86 | + }, | |
| 87 | + 'checkbox': { | |
| 88 | + 'keep_selected_style': false, | |
| 89 | + 'whole_node': false, | |
| 90 | + 'tie_selection': false | |
| 91 | + }, | |
| 92 | + //local storage里的key | |
| 93 | + 'state': { | |
| 94 | + 'key': 'jstree_map_station_route' | |
| 95 | + }, | |
| 96 | + 'plugins': ['checkbox', 'state'] | |
| 97 | + }); | |
| 98 | + | |
| 99 | + | |
| 100 | + //停车场 | |
| 101 | + $('.carpark-panel', cont) | |
| 102 | + .on('state_ready.jstree', function () { | |
| 103 | + //绑定checkbox状态切换事件 | |
| 104 | + $(this).on('check_node.jstree uncheck_node.jstree', gb_map_overlay_mge.drawCarpark); | |
| 105 | + }) | |
| 106 | + .on('activate_node.jstree', function (e, n) { | |
| 107 | + var node = n.node; | |
| 108 | + if(node.state.checked) | |
| 109 | + gb_map_overlay_mge._focus_carpark(node.data); | |
| 110 | + }) | |
| 111 | + .jstree({ | |
| 112 | + 'core': { | |
| 113 | + 'data': get_st_carpark_tree_data() | |
| 114 | + }, | |
| 115 | + 'checkbox': { | |
| 116 | + 'keep_selected_style': false, | |
| 117 | + 'whole_node': false, | |
| 118 | + 'tie_selection': false | |
| 119 | + }, | |
| 120 | + //local storage里的key | |
| 121 | + 'state': { | |
| 122 | + 'key': 'jstree_map_carpark' | |
| 123 | + }, | |
| 124 | + 'plugins': ['checkbox', 'state'] | |
| 125 | + }); | |
| 126 | + | |
| 34 | 127 | refresh(); |
| 35 | 128 | }); |
| 36 | 129 | } |
| 37 | 130 | |
| 38 | - var refresh = function () { | |
| 131 | + //计算多边形面积 | |
| 132 | + function calcPolygonArea(polygonStr) { | |
| 133 | + var pStr = polygonStr.substring(9, polygonStr.length - 2); | |
| 134 | + var array = pStr.split(','); | |
| 135 | + var newArr=[]; | |
| 136 | + | |
| 137 | + //递归去掉闭合的尾 | |
| 138 | + (function () { | |
| 139 | + var f = arguments.callee; | |
| 140 | + var end=array.length - 1; | |
| 141 | + if(array.length > 1 && array[0] == array[end]){ | |
| 142 | + array = array.slice(0, end); | |
| 143 | + f(); | |
| 144 | + } | |
| 145 | + })(); | |
| 146 | + | |
| 147 | + //去掉连续的重复点 | |
| 148 | + var last; | |
| 149 | + $.each(array, function (i, str) { | |
| 150 | + if(last){ | |
| 151 | + if(last != str) | |
| 152 | + newArr.push(str); | |
| 153 | + } | |
| 154 | + else | |
| 155 | + newArr.push(str); | |
| 156 | + last = str; | |
| 157 | + }); | |
| 158 | + | |
| 159 | + var gPoints=[],ts; | |
| 160 | + $.each(newArr, function (i, c) { | |
| 161 | + ts=c.split(' '); | |
| 162 | + gPoints.push({ | |
| 163 | + lat: parseFloat(ts[1]), | |
| 164 | + lng: parseFloat(ts[0]) | |
| 165 | + }); | |
| 166 | + }); | |
| 167 | + | |
| 168 | + //用百度geo工具库计算面积 | |
| 169 | + var _polygonArea = BMapLib.GeoUtils.getPolygonArea(gPoints); | |
| 170 | + return {_polygonArea: _polygonArea.toFixed(2), _gPoints: gPoints}; | |
| 171 | + } | |
| 172 | + | |
| 173 | + var refresh = function (type, checked) { | |
| 39 | 174 | if (!triggerElem()) |
| 40 | 175 | return; |
| 41 | 176 | |
| 42 | - //绘制站点路由树 | |
| 43 | - $('.station-route-tree').jstree({ | |
| 44 | - 'core': { | |
| 45 | - 'data': get_st_route_tree_data() | |
| 46 | - }, | |
| 47 | - 'checkbox': { | |
| 48 | - 'keep_selected_style': false, | |
| 49 | - 'whole_node': false, | |
| 50 | - 'tie_selection': false | |
| 51 | - }, | |
| 52 | - 'plugins': ['checkbox', 'state'] | |
| 53 | - }); | |
| 177 | + if ((type == 'carPark' && checked) || (type == 'station' && !checked)) { | |
| 178 | + //显示停车场面板 | |
| 179 | + $('.car-park-item', cont).addClass('uk-active'); | |
| 180 | + $('li.cp-tab-btn', '.real_spatial_panel').addClass('uk-active'); | |
| 181 | + $('.carpark-panel', cont).jstree(true).check_all(); | |
| 182 | + | |
| 183 | + //绘制停车场 | |
| 184 | + gb_map_overlay_mge.drawCarpark(); | |
| 185 | + } | |
| 186 | + else { | |
| 187 | + //显示站点路由面板 | |
| 188 | + $('.station-route-item', cont).addClass('uk-active'); | |
| 189 | + $('li.sr-tab-btn', '.real_spatial_panel').addClass('uk-active'); | |
| 190 | + | |
| 191 | + //选中相关站点路由树 | |
| 192 | + var chs = gb_map_overlay_mge.getCheckedDevice(); | |
| 193 | + var idx = {}; | |
| 194 | + $.each(chs, function () { | |
| 195 | + idx[this.data.lineId + '_' + this.data.upDown] = 1; | |
| 196 | + }); | |
| 197 | + | |
| 198 | + var treeObj = $('.station-route-tree', cont).jstree(true); | |
| 199 | + for (var id in idx) { | |
| 200 | + treeObj.check_node(treeObj.get_node(id + '_st')); | |
| 201 | + } | |
| 202 | + | |
| 203 | + //drawStation(); | |
| 204 | + gb_map_overlay_mge.drawStation(); | |
| 205 | + } | |
| 54 | 206 | } |
| 55 | 207 | |
| 56 | 208 | var triggerElem = function () { |
| 57 | - var config = gb_map_config.getConfig().spatialData | |
| 58 | - , elem = $('.real_spatial_panel'); | |
| 209 | + var config = gb_map_config.getConfig().spatialData; | |
| 59 | 210 | |
| 60 | - for (var att in config) { | |
| 61 | - if (config[att]) { | |
| 62 | - elem.show(); | |
| 63 | - return true; | |
| 64 | - } | |
| 211 | + if(config.station || config.carPark){ | |
| 212 | + showPanel(); | |
| 213 | + return true; | |
| 65 | 214 | } |
| 66 | - elem.hide(); | |
| 215 | + hidePanel(); | |
| 216 | + gb_map_imap.call('hideAllStationMarker'); | |
| 217 | + gb_map_imap.call('hideDrawCarpark'); | |
| 67 | 218 | return false; |
| 68 | 219 | } |
| 69 | 220 | |
| 221 | + var animationend = 'webkitAnimationEnd animationend'; | |
| 222 | + var showPanel = function () { | |
| 223 | + var elem = $('.real_spatial_panel'); | |
| 224 | + var config = gb_map_config.getConfig().spatialData; | |
| 225 | + | |
| 226 | + if (config.station && config.carPark) { | |
| 227 | + anim_show($('.uk-subnav', elem), 'uk-animation-scale-up'); | |
| 228 | + $('.real_spatial_body', elem).addClass('show-tab'); | |
| 229 | + } | |
| 230 | + else { | |
| 231 | + $('.uk-subnav', elem).hide(); | |
| 232 | + $('.real_spatial_body', elem).removeClass('show-tab'); | |
| 233 | + } | |
| 234 | + | |
| 235 | + $('li.uk-active', elem).removeClass('uk-active'); | |
| 236 | + | |
| 237 | + if (!elem.is(":hidden")) | |
| 238 | + return; | |
| 239 | + | |
| 240 | + anim_show(elem, 'uk-animation-slide-left'); | |
| 241 | + } | |
| 242 | + | |
| 243 | + var hidePanel = function () { | |
| 244 | + var elem = $('.real_spatial_panel'); | |
| 245 | + elem.hide(); | |
| 246 | + } | |
| 247 | + | |
| 248 | + function anim_show(e, anim) { | |
| 249 | + e.addClass(anim).show().one(animationend, function () { | |
| 250 | + $(this).removeClass(anim); | |
| 251 | + }); | |
| 252 | + } | |
| 253 | + | |
| 254 | + function getCheckedStation() { | |
| 255 | + var list = []; | |
| 256 | + var chs = $('.station-route-tree', cont).jstree(true).get_checked(true); | |
| 257 | + chs = chs.filter(function (item) { | |
| 258 | + return item.data; | |
| 259 | + }); | |
| 260 | + $.each(chs, function () { | |
| 261 | + list.push(this.data); | |
| 262 | + }); | |
| 263 | + return list; | |
| 264 | + } | |
| 265 | + | |
| 266 | + function gteCheckedCarpark() { | |
| 267 | + var list = []; | |
| 268 | + var chs = $('.carpark-panel', cont).jstree(true).get_checked(true); | |
| 269 | + $.each(chs, function () { | |
| 270 | + list.push(this.data); | |
| 271 | + }); | |
| 272 | + return list; | |
| 273 | + } | |
| 274 | + | |
| 70 | 275 | var get_st_route_tree_data = function () { |
| 71 | 276 | var treeData = []; |
| 72 | 277 | |
| ... | ... | @@ -74,14 +279,17 @@ var gb_map_spatial_data = (function () { |
| 74 | 279 | name = gb_data_basic.codeToLine[lineCode].name; |
| 75 | 280 | treeData.push({ |
| 76 | 281 | 'text': name, |
| 282 | + 'open': true, | |
| 77 | 283 | 'children': [ |
| 78 | 284 | { |
| 79 | 285 | 'text': '上行', |
| 80 | 286 | 'children': grabs(lineStationArr[lineCode][0]), |
| 287 | + 'id': lineCode + '_0_st' | |
| 81 | 288 | }, |
| 82 | 289 | { |
| 83 | 290 | 'text': '下行', |
| 84 | 291 | 'children': grabs(lineStationArr[lineCode][1]), |
| 292 | + 'id': lineCode + '_1_st' | |
| 85 | 293 | } |
| 86 | 294 | ] |
| 87 | 295 | }) |
| ... | ... | @@ -89,6 +297,19 @@ var gb_map_spatial_data = (function () { |
| 89 | 297 | return treeData; |
| 90 | 298 | }; |
| 91 | 299 | |
| 300 | + var get_st_carpark_tree_data = function () { | |
| 301 | + var treeData = []; | |
| 302 | + | |
| 303 | + $.each(carparkArr, function () { | |
| 304 | + treeData.push({ | |
| 305 | + 'text': this.parkName, | |
| 306 | + 'data': this | |
| 307 | + }); | |
| 308 | + }); | |
| 309 | + | |
| 310 | + return treeData; | |
| 311 | + } | |
| 312 | + | |
| 92 | 313 | var grabs = function (array) { |
| 93 | 314 | if (!array) |
| 94 | 315 | return; |
| ... | ... | @@ -96,7 +317,7 @@ var gb_map_spatial_data = (function () { |
| 96 | 317 | $.each(array, function () { |
| 97 | 318 | rs.push({ |
| 98 | 319 | 'text': this.stationName, |
| 99 | - 'data': {}, | |
| 320 | + 'data': this, | |
| 100 | 321 | 'icon': false |
| 101 | 322 | }); |
| 102 | 323 | }); |
| ... | ... | @@ -105,6 +326,8 @@ var gb_map_spatial_data = (function () { |
| 105 | 326 | |
| 106 | 327 | return { |
| 107 | 328 | refresh: refresh, |
| 108 | - init: init | |
| 329 | + init: init, | |
| 330 | + getCheckedStation:getCheckedStation, | |
| 331 | + gteCheckedCarpark: gteCheckedCarpark | |
| 109 | 332 | }; |
| 110 | 333 | })(); |
| 111 | 334 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/real.html
| ... | ... | @@ -25,16 +25,29 @@ |
| 25 | 25 | <div class="real_bl_cont"> |
| 26 | 26 | |
| 27 | 27 | </div> |
| 28 | - <div class="real_br_cont map_config_wrap"> | |
| 29 | - </div> | |
| 28 | + <div class="real_br_cont map_config_wrap"></div> | |
| 30 | 29 | </div> |
| 31 | 30 | |
| 32 | -<div class="real_spatial_panel uk-animation-scale"> | |
| 33 | - <div class="station-route-tree"> | |
| 34 | - | |
| 31 | +<div class="real_spatial_panel"> | |
| 32 | + <div class="top-right-toggle"> | |
| 33 | + <ul class="uk-subnav uk-subnav-pill" data-uk-switcher="{connect:'#spatial-tree-content'}"> | |
| 34 | + <li class="sr-tab-btn"><a>站点</a></li> | |
| 35 | + <li class="cp-tab-btn"><a>停车场</a></li> | |
| 36 | + </ul> | |
| 37 | + </div> | |
| 38 | + <div class="real_spatial_body"> | |
| 39 | + <ul id="spatial-tree-content" class="uk-switcher"> | |
| 40 | + <li class="station-route-item"> | |
| 41 | + <div class="station-route-tree"></div> | |
| 42 | + </li> | |
| 43 | + <li class="car-park-item"> | |
| 44 | + <div class="carpark-panel"></div> | |
| 45 | + </li> | |
| 46 | + </ul> | |
| 35 | 47 | </div> |
| 36 | 48 | </div> |
| 37 | 49 | |
| 50 | +<script src="/real_control_v2/assets/js/GeoUtils_min.js"></script> | |
| 38 | 51 | <script src="/real_control_v2/mapmonitor/js/config.js"></script> |
| 39 | 52 | <script src="/real_control_v2/mapmonitor/js/gps_tree.js"></script> |
| 40 | 53 | <script src="/real_control_v2/mapmonitor/js/spatial_data.js"></script> | ... | ... |