Commit 101f51c9493d1d7a3dc64498d448e367ed49c225
Merge branch 'minhang' into qingpu
Showing
20 changed files
with
503 additions
and
211 deletions
src/main/java/com/bsth/controller/directive/DirectiveController.java~HEAD deleted
100644 → 0
| 1 | -//package com.bsth.controller.directive; | |
| 2 | -// | |
| 3 | -//import java.util.List; | |
| 4 | -//import java.util.Map; | |
| 5 | -// | |
| 6 | -//import org.springframework.beans.factory.annotation.Autowired; | |
| 7 | -//import org.springframework.data.domain.Page; | |
| 8 | -//import org.springframework.data.domain.PageRequest; | |
| 9 | -//import org.springframework.data.domain.Sort; | |
| 10 | -//import org.springframework.data.domain.Sort.Direction; | |
| 11 | -//import org.springframework.web.bind.annotation.RequestMapping; | |
| 12 | -//import org.springframework.web.bind.annotation.RequestMethod; | |
| 13 | -//import org.springframework.web.bind.annotation.RequestParam; | |
| 14 | -//import org.springframework.web.bind.annotation.RestController; | |
| 15 | -// | |
| 16 | -//import com.bsth.entity.directive.D80; | |
| 17 | -//import com.bsth.entity.sys.SysUser; | |
| 18 | -//import com.bsth.security.util.SecurityUtils; | |
| 19 | -//import com.bsth.service.directive.DirectiveService; | |
| 20 | -// | |
| 21 | -///** | |
| 22 | -// * | |
| 23 | -// * @ClassName: DirectiveController | |
| 24 | -// * @Description: TODO(页面下发调度指令) .0 | |
| 25 | -// * @author PanZhao | |
| 26 | -// * @date 2016年6月8日 上午9:34:51 | |
| 27 | -// * | |
| 28 | -// */ | |
| 29 | -//@RestController | |
| 30 | -//@RequestMapping("/directive") | |
| 31 | -//public class DirectiveController { | |
| 32 | -// | |
| 33 | -// @Autowired | |
| 34 | -// DirectiveService directiveService; | |
| 35 | -// | |
| 36 | -// /** | |
| 37 | -// * | |
| 38 | -// * @Title: send60 | |
| 39 | -// * @Description: TODO(60协议短语下发) | |
| 40 | -// * @throws | |
| 41 | -// */ | |
| 42 | -// @RequestMapping(value = "/phrase", method = RequestMethod.POST) | |
| 43 | -// public int send60Phrase(@RequestParam String nbbm, @RequestParam String text){ | |
| 44 | -// SysUser user = SecurityUtils.getCurrentUser(); | |
| 45 | -// return directiveService.send60Phrase(nbbm, text, user.getUserName()); | |
| 46 | -// } | |
| 47 | -// | |
| 48 | -// /** | |
| 49 | -// * | |
| 50 | -// * @Title: send60Dispatch | |
| 51 | -// * @Description: TODO(班次信息下发) | |
| 52 | -// * @param @param id | |
| 53 | -// * @throws | |
| 54 | -// */ | |
| 55 | -// @RequestMapping(value = "/dispatch", method = RequestMethod.POST) | |
| 56 | -// public int send60Dispatch(@RequestParam Long id){ | |
| 57 | -// SysUser user = SecurityUtils.getCurrentUser(); | |
| 58 | -// return directiveService.send60Dispatch(id, user.getUserName()); | |
| 59 | -// } | |
| 60 | -// | |
| 61 | -// /** | |
| 62 | -// * | |
| 63 | -// * @Title: lineChange | |
| 64 | -// * @Description: TODO(切换线路) | |
| 65 | -// * @param @param nbbm 车辆内部编码 | |
| 66 | -// * @param @param lineId 新线路编码 | |
| 67 | -// * @throws | |
| 68 | -// */ | |
| 69 | -// @RequestMapping(value = "/lineChnage", method = RequestMethod.POST) | |
| 70 | -// public int lineChange(@RequestParam String nbbm, @RequestParam Integer lineId){ | |
| 71 | -// SysUser user = SecurityUtils.getCurrentUser(); | |
| 72 | -// return directiveService.lineChange(nbbm, lineId, user.getUserName()); | |
| 73 | -// } | |
| 74 | -// | |
| 75 | -// /** | |
| 76 | -// * | |
| 77 | -// * @Title: upDownChange | |
| 78 | -// * @Description: TODO(上下行切换) | |
| 79 | -// * @param @param nbbm 车辆内部编码 | |
| 80 | -// * @param @param upDon | |
| 81 | -// * @throws | |
| 82 | -// */ | |
| 83 | -// @RequestMapping(value = "/upDownChange", method = RequestMethod.POST) | |
| 84 | -// public int upDownChange(@RequestParam String nbbm, @RequestParam Integer upDown){ | |
| 85 | -// SysUser user = SecurityUtils.getCurrentUser(); | |
| 86 | -// return directiveService.upDownChange(nbbm, upDown, user.getUserName()); | |
| 87 | -// } | |
| 88 | -// | |
| 89 | -// /** | |
| 90 | -// * | |
| 91 | -// * @Title: findNoCofm80 | |
| 92 | -// * @Description: TODO(根据线路获取未确认的80驾驶员上报数据) | |
| 93 | -// * @throws | |
| 94 | -// */ | |
| 95 | -// @RequestMapping(value = "/findNoCofm80", method = RequestMethod.GET) | |
| 96 | -// public Map<String, List<D80>> findNoCofm80(@RequestParam String lineCodes){ | |
| 97 | -// return directiveService.findNoCofm80(lineCodes); | |
| 98 | -// } | |
| 99 | -// | |
| 100 | -// @RequestMapping(value = "/findAll80", method = RequestMethod.GET) | |
| 101 | -// public Page<D80> findAll80(@RequestParam Map<String, Object> map, | |
| 102 | -// @RequestParam(defaultValue = "0") int page, | |
| 103 | -// @RequestParam(defaultValue = "12") int size){ | |
| 104 | -// | |
| 105 | -// return directiveService.findAll80(map, new PageRequest(page, size, new Sort(Direction.DESC, "timestamp"))); | |
| 106 | -// } | |
| 107 | -// | |
| 108 | -// /** | |
| 109 | -// * | |
| 110 | -// * @Title: reply80 | |
| 111 | -// * @Description: TODO(回复80) | |
| 112 | -// * @param @param reply 0:同意 -1:不同意 | |
| 113 | -// * @throws | |
| 114 | -// */ | |
| 115 | -// @RequestMapping(value = "/reply80", method = RequestMethod.POST) | |
| 116 | -// public Map<String, Object> reply80(@RequestParam int id, @RequestParam int reply){ | |
| 117 | -// return directiveService.reply80(id, reply); | |
| 118 | -// } | |
| 119 | -// | |
| 120 | -// /** | |
| 121 | -// * | |
| 122 | -// * @Title: findDirective | |
| 123 | -// * @Description: TODO(查询调度指令) | |
| 124 | -// * @param @param nbbm 车辆 | |
| 125 | -// * @param @param dType 类型 | |
| 126 | -// * @param @param page 页号 | |
| 127 | -// * @param @param size 每页数量 | |
| 128 | -// * @throws | |
| 129 | -// */ | |
| 130 | -// @RequestMapping(value = "/list", method = RequestMethod.GET) | |
| 131 | -// public Map<String, Object> findDirective(String nbbm,@RequestParam int dType | |
| 132 | -// , @RequestParam(defaultValue = "0") int page, | |
| 133 | -// @RequestParam(defaultValue = "10") int size){ | |
| 134 | -// | |
| 135 | -// return directiveService.findDirective(nbbm, dType, page, size); | |
| 136 | -// } | |
| 137 | -//} |
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| ... | ... | @@ -300,6 +300,7 @@ public class DayOfSchedule implements CommandLineRunner { |
| 300 | 300 | try{ |
| 301 | 301 | sch.setZdsjT(DateUtils.sdfHHmm.parse(sch.getFcsj()).getTime() + (sch.getBcsj() * 60 * 1000)); |
| 302 | 302 | sch.setZdsj(DateUtils.sdfHHmm.format(sch.getZdsjT())); |
| 303 | + sch.setLate(false); | |
| 303 | 304 | }catch(ParseException pe){ |
| 304 | 305 | logger.error("loadPlanSch... 计算终点时间失败..."); |
| 305 | 306 | } | ... | ... |
src/main/java/com/bsth/entity/forecast/Sample.java
| ... | ... | @@ -37,9 +37,13 @@ public class Sample { |
| 37 | 37 | |
| 38 | 38 | // 开始站点 |
| 39 | 39 | private String sStation; |
| 40 | + @Transient | |
| 41 | + private String sName; | |
| 40 | 42 | |
| 41 | 43 | // 结束站点 |
| 42 | 44 | private String eStation; |
| 45 | + @Transient | |
| 46 | + private String eName; | |
| 43 | 47 | |
| 44 | 48 | // 0:gps分析生成, 1:人工录入 |
| 45 | 49 | private int type; |
| ... | ... | @@ -146,4 +150,20 @@ public class Sample { |
| 146 | 150 | public void setUpdown(int updown) { |
| 147 | 151 | this.updown = updown; |
| 148 | 152 | } |
| 153 | + | |
| 154 | + public String getsName() { | |
| 155 | + return sName; | |
| 156 | + } | |
| 157 | + | |
| 158 | + public void setsName(String sName) { | |
| 159 | + this.sName = sName; | |
| 160 | + } | |
| 161 | + | |
| 162 | + public String geteName() { | |
| 163 | + return eName; | |
| 164 | + } | |
| 165 | + | |
| 166 | + public void seteName(String eName) { | |
| 167 | + this.eName = eName; | |
| 168 | + } | |
| 149 | 169 | } | ... | ... |
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
src/main/java/com/bsth/service/forecast/SampleServiceImpl.java
| 1 | 1 | package com.bsth.service.forecast; |
| 2 | 2 | |
| 3 | +import java.util.Iterator; | |
| 4 | +import java.util.Map; | |
| 5 | + | |
| 3 | 6 | import org.springframework.stereotype.Service; |
| 4 | 7 | |
| 8 | +import com.bsth.data.BasicData; | |
| 5 | 9 | import com.bsth.entity.forecast.Sample; |
| 6 | 10 | import com.bsth.service.impl.BaseServiceImpl; |
| 7 | 11 | |
| 8 | 12 | @Service |
| 9 | 13 | public class SampleServiceImpl extends BaseServiceImpl<Sample, Long>{ |
| 10 | 14 | |
| 15 | + @Override | |
| 16 | + public Iterable<Sample> list(Map<String, Object> map) { | |
| 17 | + Iterable<Sample> rs = super.list(map); | |
| 18 | + | |
| 19 | + //转换站点名称 | |
| 20 | + Iterator<Sample> iterator = rs.iterator(); | |
| 21 | + Sample s; | |
| 22 | + while(iterator.hasNext()){ | |
| 23 | + s = iterator.next(); | |
| 24 | + s.setsName(BasicData.stationCode2NameMap.get(s.getsStation())); | |
| 25 | + s.seteName(BasicData.stationCode2NameMap.get(s.geteStation())); | |
| 26 | + } | |
| 27 | + return rs; | |
| 28 | + } | |
| 11 | 29 | } | ... | ... |
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= true |
| 10 | 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 11 | -spring.datasource.url= jdbc:mysql://127.0.0.1:3306/qp_control | |
| 11 | +spring.datasource.url= jdbc:mysql://127.0.0.1:3306/control | |
| 12 | 12 | spring.datasource.username= root |
| 13 | 13 | spring.datasource.password= panzhao |
| 14 | 14 | #DATASOURCE | ... | ... |
src/main/resources/application-prod.properties
| ... | ... | @@ -8,9 +8,9 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy |
| 8 | 8 | spring.jpa.database= MYSQL |
| 9 | 9 | spring.jpa.show-sql= true |
| 10 | 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 11 | -spring.datasource.url= jdbc:mysql://192.168.40.82:3306/qp_control | |
| 11 | +spring.datasource.url= jdbc:mysql://192.168.168.171:3306/control | |
| 12 | 12 | spring.datasource.username= root |
| 13 | -spring.datasource.password= 123456 | |
| 13 | +spring.datasource.password= root2jsp | |
| 14 | 14 | #DATASOURCE |
| 15 | 15 | spring.datasource.max-active=100 |
| 16 | 16 | spring.datasource.max-idle=8 |
| ... | ... | @@ -26,6 +26,6 @@ spring.datasource.validation-query=select 1 |
| 26 | 26 | ## |
| 27 | 27 | #222.66.0.204:5555 |
| 28 | 28 | ##\u5B9E\u65F6gps |
| 29 | -http.gps.real.url= http://192.168.40.82:8080/transport_server/rtgps/ | |
| 29 | +http.gps.real.url= http://192.168.168.171:8080/transport_server/rtgps/ | |
| 30 | 30 | ##\u6D88\u606F\u4E0B\u53D1 |
| 31 | -http.send.directive = http://192.168.40.82:8080/transport_server/message/ | |
| 31 | +http.send.directive = http://192.168.168.171:8080/transport_server/message/ | |
| 32 | 32 | \ No newline at end of file | ... | ... |
src/main/resources/ms-jdbc.properties
| ... | ... | @@ -4,6 +4,6 @@ |
| 4 | 4 | #ms.mysql.password= panzhao |
| 5 | 5 | |
| 6 | 6 | ms.mysql.driver= com.mysql.jdbc.Driver |
| 7 | -ms.mysql.url= jdbc:mysql://192.168.40.82:3306/ms?useUnicode=true&characterEncoding=utf-8 | |
| 7 | +ms.mysql.url= jdbc:mysql://192.168.168.171:3306/ms?useUnicode=true&characterEncoding=utf-8 | |
| 8 | 8 | ms.mysql.username= root |
| 9 | -ms.mysql.password= 123456 | |
| 9 | +ms.mysql.password= root2jsp | ... | ... |
src/main/resources/static/assets/img/login_bgcenter.png
src/main/resources/static/assets/img/logo_text.png deleted
100644 → 0
15 KB
src/main/resources/static/index.html
| ... | ... | @@ -143,7 +143,7 @@ tr.row-active td { |
| 143 | 143 | <div class="page-header-inner "> |
| 144 | 144 | <!-- LOGO --> |
| 145 | 145 | <div class="page-logo"> |
| 146 | - <a href="index.html" class="logo-default logo-default-text" > 青浦公交调度系统 </a> | |
| 146 | + <a href="index.html" class="logo-default logo-default-text" > 闵行公交调度系统 </a> | |
| 147 | 147 | <div class="menu-toggler sidebar-toggler"> |
| 148 | 148 | </div> |
| 149 | 149 | </div> | ... | ... |
src/main/resources/static/pages/base/lineinformation/add.html
| ... | ... | @@ -252,6 +252,83 @@ |
| 252 | 252 | </div> |
| 253 | 253 | </div> |
| 254 | 254 | |
| 255 | + | |
| 256 | + <!-- 上行进场时间 --> | |
| 257 | + <div class="form-group"> | |
| 258 | + <label class="control-label col-md-3"> 上行进场时间 : </label> | |
| 259 | + <div class="col-md-4"> | |
| 260 | + <input type="text" class="form-control" name="upInTimer" id="upInTimerInput" placeholder="上行进场时间"> | |
| 261 | + <span class="help-block"> 描述:上行起点至停车场的进场时间 </span> | |
| 262 | + </div> | |
| 263 | + </div> | |
| 264 | + | |
| 265 | + <!--上行出场时间 --> | |
| 266 | + <div class="form-group"> | |
| 267 | + <label class="control-label col-md-3"> 上行出场时间 : </label> | |
| 268 | + <div class="col-md-4"> | |
| 269 | + <input type="text" class="form-control" name="upOutTimer" id="upOutTimerInput" placeholder="上行出场时间"> | |
| 270 | + <span class="help-block"> 描述:上行起点至停车场的出场时间 </span> | |
| 271 | + </div> | |
| 272 | + </div> | |
| 273 | + | |
| 274 | + <!-- 下行进场时间 --> | |
| 275 | + <div class="form-group"> | |
| 276 | + <label class="control-label col-md-3"> 下行进场时间 : </label> | |
| 277 | + <div class="col-md-4"> | |
| 278 | + <input type="text" class="form-control" name="downInTimer" id="downInTimerInput" placeholder="下行进场时间"> | |
| 279 | + <span class="help-block"> 描述:下行起点至停车场的进场时间 </span> | |
| 280 | + </div> | |
| 281 | + </div> | |
| 282 | + | |
| 283 | + <!-- 下行出场时间 --> | |
| 284 | + <div class="form-group"> | |
| 285 | + <label class="control-label col-md-3"> 下行出场时间: </label> | |
| 286 | + <div class="col-md-4"> | |
| 287 | + <input type="text" class="form-control" name="downOutTimer" id="downOutTimerInput" placeholder="下行出场时间"> | |
| 288 | + <span class="help-block"> 描述:下行起点至停车场的出场时间 </span> | |
| 289 | + </div> | |
| 290 | + </div> | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + <!-- 上行进场里程 --> | |
| 295 | + <div class="form-group"> | |
| 296 | + <label class="control-label col-md-3"> 上行进场里程 : </label> | |
| 297 | + <div class="col-md-4"> | |
| 298 | + <input type="text" class="form-control" name="upInMileage" id="upInMileageInput" placeholder="上行进场里程"> | |
| 299 | + <span class="help-block"> 描述:上行起点至停车场的进场里程 </span> | |
| 300 | + </div> | |
| 301 | + </div> | |
| 302 | + | |
| 303 | + <!-- 上行出场里程 --> | |
| 304 | + <div class="form-group"> | |
| 305 | + <label class="control-label col-md-3"> 上行出场里程: </label> | |
| 306 | + <div class="col-md-4"> | |
| 307 | + <input type="text" class="form-control" name="upOutMileage" id="upOutMileageInput" placeholder="上行出场里程"> | |
| 308 | + <span class="help-block"> 描述:上行起点至停车场的出场里程 </span> | |
| 309 | + </div> | |
| 310 | + </div> | |
| 311 | + | |
| 312 | + <!-- 下行进场里程 --> | |
| 313 | + <div class="form-group"> | |
| 314 | + <label class="control-label col-md-3"> 下行进场里程 : </label> | |
| 315 | + <div class="col-md-4"> | |
| 316 | + <input type="text" class="form-control" name="downInMileage" id="downInMileageInput" placeholder="下行进场里程"> | |
| 317 | + <span class="help-block"> 描述:下行起点至停车场的进场里程 </span> | |
| 318 | + </div> | |
| 319 | + </div> | |
| 320 | + | |
| 321 | + <!-- 下行出场里程 --> | |
| 322 | + <div class="form-group"> | |
| 323 | + <label class="control-label col-md-3"> 下行出场里程: </label> | |
| 324 | + <div class="col-md-4"> | |
| 325 | + <input type="text" class="form-control" name="downOutMileage" id="downOutMileageInput" placeholder="下行出场里程"> | |
| 326 | + <span class="help-block"> 描述:下行起点至停车场的出场里程 </span> | |
| 327 | + </div> | |
| 328 | + </div> | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 255 | 332 | <!-- 出场里程 --> |
| 256 | 333 | <div class="form-group"> |
| 257 | 334 | <label class="control-label col-md-3"> 出场里程: </label> | ... | ... |
src/main/resources/static/pages/base/lineinformation/details.html
| ... | ... | @@ -250,6 +250,81 @@ |
| 250 | 250 | </div> |
| 251 | 251 | </div> |
| 252 | 252 | |
| 253 | + | |
| 254 | + <!-- 上行进场时间 --> | |
| 255 | + <div class="form-group"> | |
| 256 | + <label class="control-label col-md-3"> 上行进场时间 : </label> | |
| 257 | + <div class="col-md-4"> | |
| 258 | + <input type="text" class="form-control" name="upInTimer" id="upInTimerInput" placeholder="上行进场时间"> | |
| 259 | + <span class="help-block"> 描述:上行起点至停车场的进场时间 </span> | |
| 260 | + </div> | |
| 261 | + </div> | |
| 262 | + | |
| 263 | + <!--上行出场时间 --> | |
| 264 | + <div class="form-group"> | |
| 265 | + <label class="control-label col-md-3"> 上行出场时间 : </label> | |
| 266 | + <div class="col-md-4"> | |
| 267 | + <input type="text" class="form-control" name="upOutTimer" id="upOutTimerInput" placeholder="上行出场时间"> | |
| 268 | + <span class="help-block"> 描述:上行起点至停车场的出场时间 </span> | |
| 269 | + </div> | |
| 270 | + </div> | |
| 271 | + | |
| 272 | + <!-- 下行进场时间 --> | |
| 273 | + <div class="form-group"> | |
| 274 | + <label class="control-label col-md-3"> 下行进场时间 : </label> | |
| 275 | + <div class="col-md-4"> | |
| 276 | + <input type="text" class="form-control" name="downInTimer" id="downInTimerInput" placeholder="下行进场时间"> | |
| 277 | + <span class="help-block"> 描述:下行起点至停车场的进场时间 </span> | |
| 278 | + </div> | |
| 279 | + </div> | |
| 280 | + | |
| 281 | + <!-- 下行出场时间 --> | |
| 282 | + <div class="form-group"> | |
| 283 | + <label class="control-label col-md-3"> 下行出场时间: </label> | |
| 284 | + <div class="col-md-4"> | |
| 285 | + <input type="text" class="form-control" name="downOutTimer" id="downOutTimerInput" placeholder="下行出场时间"> | |
| 286 | + <span class="help-block"> 描述:下行起点至停车场的出场时间 </span> | |
| 287 | + </div> | |
| 288 | + </div> | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + <!-- 上行进场里程 --> | |
| 293 | + <div class="form-group"> | |
| 294 | + <label class="control-label col-md-3"> 上行进场里程 : </label> | |
| 295 | + <div class="col-md-4"> | |
| 296 | + <input type="text" class="form-control" name="upInMileage" id="upInMileageInput" placeholder="上行进场里程"> | |
| 297 | + <span class="help-block"> 描述:上行起点至停车场的进场里程 </span> | |
| 298 | + </div> | |
| 299 | + </div> | |
| 300 | + | |
| 301 | + <!-- 上行出场里程 --> | |
| 302 | + <div class="form-group"> | |
| 303 | + <label class="control-label col-md-3"> 上行出场里程: </label> | |
| 304 | + <div class="col-md-4"> | |
| 305 | + <input type="text" class="form-control" name="upOutMileage" id="upOutMileageInput" placeholder="上行出场里程"> | |
| 306 | + <span class="help-block"> 描述:上行起点至停车场的出场里程 </span> | |
| 307 | + </div> | |
| 308 | + </div> | |
| 309 | + | |
| 310 | + <!-- 下行进场里程 --> | |
| 311 | + <div class="form-group"> | |
| 312 | + <label class="control-label col-md-3"> 下行进场里程 : </label> | |
| 313 | + <div class="col-md-4"> | |
| 314 | + <input type="text" class="form-control" name="downInMileage" id="downInMileageInput" placeholder="下行进场里程"> | |
| 315 | + <span class="help-block"> 描述:下行起点至停车场的进场里程 </span> | |
| 316 | + </div> | |
| 317 | + </div> | |
| 318 | + | |
| 319 | + <!-- 下行出场里程 --> | |
| 320 | + <div class="form-group"> | |
| 321 | + <label class="control-label col-md-3"> 下行出场里程: </label> | |
| 322 | + <div class="col-md-4"> | |
| 323 | + <input type="text" class="form-control" name="downOutMileage" id="downOutMileageInput" placeholder="下行出场里程"> | |
| 324 | + <span class="help-block"> 描述:下行起点至停车场的出场里程 </span> | |
| 325 | + </div> | |
| 326 | + </div> | |
| 327 | + | |
| 253 | 328 | <!-- 进场里程 --> |
| 254 | 329 | <div class="form-group"> |
| 255 | 330 | <label class="control-label col-md-3"> 进场里程 : </label> | ... | ... |
src/main/resources/static/pages/base/lineinformation/edit.html
| ... | ... | @@ -253,6 +253,81 @@ |
| 253 | 253 | </div> |
| 254 | 254 | </div> |
| 255 | 255 | |
| 256 | + | |
| 257 | + <!-- 上行进场时间 --> | |
| 258 | + <div class="form-group"> | |
| 259 | + <label class="control-label col-md-3"> 上行进场时间 : </label> | |
| 260 | + <div class="col-md-4"> | |
| 261 | + <input type="text" class="form-control" name="upInTimer" id="upInTimerInput" placeholder="上行进场时间"> | |
| 262 | + <span class="help-block"> 描述:上行起点至停车场的进场时间 </span> | |
| 263 | + </div> | |
| 264 | + </div> | |
| 265 | + | |
| 266 | + <!--上行出场时间 --> | |
| 267 | + <div class="form-group"> | |
| 268 | + <label class="control-label col-md-3"> 上行出场时间 : </label> | |
| 269 | + <div class="col-md-4"> | |
| 270 | + <input type="text" class="form-control" name="upOutTimer" id="upOutTimerInput" placeholder="上行出场时间"> | |
| 271 | + <span class="help-block"> 描述:上行起点至停车场的出场时间 </span> | |
| 272 | + </div> | |
| 273 | + </div> | |
| 274 | + | |
| 275 | + <!-- 下行进场时间 --> | |
| 276 | + <div class="form-group"> | |
| 277 | + <label class="control-label col-md-3"> 下行进场时间 : </label> | |
| 278 | + <div class="col-md-4"> | |
| 279 | + <input type="text" class="form-control" name="downInTimer" id="downInTimerInput" placeholder="下行进场时间"> | |
| 280 | + <span class="help-block"> 描述:下行起点至停车场的进场时间 </span> | |
| 281 | + </div> | |
| 282 | + </div> | |
| 283 | + | |
| 284 | + <!-- 下行出场时间 --> | |
| 285 | + <div class="form-group"> | |
| 286 | + <label class="control-label col-md-3"> 下行出场时间: </label> | |
| 287 | + <div class="col-md-4"> | |
| 288 | + <input type="text" class="form-control" name="downOutTimer" id="downOutTimerInput" placeholder="下行出场时间"> | |
| 289 | + <span class="help-block"> 描述:下行起点至停车场的出场时间 </span> | |
| 290 | + </div> | |
| 291 | + </div> | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + <!-- 上行进场里程 --> | |
| 296 | + <div class="form-group"> | |
| 297 | + <label class="control-label col-md-3"> 上行进场里程 : </label> | |
| 298 | + <div class="col-md-4"> | |
| 299 | + <input type="text" class="form-control" name="upInMileage" id="upInMileageInput" placeholder="上行进场里程"> | |
| 300 | + <span class="help-block"> 描述:上行起点至停车场的进场里程 </span> | |
| 301 | + </div> | |
| 302 | + </div> | |
| 303 | + | |
| 304 | + <!-- 上行出场里程 --> | |
| 305 | + <div class="form-group"> | |
| 306 | + <label class="control-label col-md-3"> 上行出场里程: </label> | |
| 307 | + <div class="col-md-4"> | |
| 308 | + <input type="text" class="form-control" name="upOutMileage" id="upOutMileageInput" placeholder="上行出场里程"> | |
| 309 | + <span class="help-block"> 描述:上行起点至停车场的出场里程 </span> | |
| 310 | + </div> | |
| 311 | + </div> | |
| 312 | + | |
| 313 | + <!-- 下行进场里程 --> | |
| 314 | + <div class="form-group"> | |
| 315 | + <label class="control-label col-md-3"> 下行进场里程 : </label> | |
| 316 | + <div class="col-md-4"> | |
| 317 | + <input type="text" class="form-control" name="downInMileage" id="downInMileageInput" placeholder="下行进场里程"> | |
| 318 | + <span class="help-block"> 描述:下行起点至停车场的进场里程 </span> | |
| 319 | + </div> | |
| 320 | + </div> | |
| 321 | + | |
| 322 | + <!-- 下行出场里程 --> | |
| 323 | + <div class="form-group"> | |
| 324 | + <label class="control-label col-md-3"> 下行出场里程: </label> | |
| 325 | + <div class="col-md-4"> | |
| 326 | + <input type="text" class="form-control" name="downOutMileage" id="downOutMileageInput" placeholder="下行出场里程"> | |
| 327 | + <span class="help-block"> 描述:下行起点至停车场的出场里程 </span> | |
| 328 | + </div> | |
| 329 | + </div> | |
| 330 | + | |
| 256 | 331 | <!-- 进场里程 --> |
| 257 | 332 | <div class="form-group"> |
| 258 | 333 | <label class="control-label col-md-3"> 进场里程 : </label> | ... | ... |
src/main/resources/static/pages/control/line/index.html
| ... | ... | @@ -18,7 +18,7 @@ |
| 18 | 18 | <div class="portlet-title banner" > |
| 19 | 19 | <div class="caption col_hide_1280" style="color: #FFF;"> |
| 20 | 20 | <i class="fa fa-life-ring" style="font-size: 22px;color: #FFF;"></i> <span |
| 21 | - class="caption-subject bold" style="font-size: 24px;">青浦公交线路调度系统</span> | |
| 21 | + class="caption-subject bold" style="font-size: 24px;">闵行公交线路调度系统</span> | |
| 22 | 22 | </div> |
| 23 | 23 | <div class="col_hide_1440" style="color: white;font-size: 18px;position: absolute;right: 25px;top: 75px;"> |
| 24 | 24 | <span class="top_username"></span> <span class="operation_mode_text animated" ></span> | ... | ... |
src/main/resources/static/pages/control/line/js/home.js
| ... | ... | @@ -85,7 +85,7 @@ var _home = (function() { |
| 85 | 85 | $('menu.menu').show(); |
| 86 | 86 | }, 400); |
| 87 | 87 | |
| 88 | - setTimeout(function() { | |
| 88 | + /*setTimeout(function() { | |
| 89 | 89 | // 提示文本 |
| 90 | 90 | var promptFlag = storage.getItem('promptFlag_0828'); |
| 91 | 91 | if (!promptFlag) { |
| ... | ... | @@ -96,7 +96,7 @@ var _home = (function() { |
| 96 | 96 | }); |
| 97 | 97 | storage.setItem('promptFlag_0828', 1); |
| 98 | 98 | } |
| 99 | - }, 1500); | |
| 99 | + }, 1500);*/ | |
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | ... | ... |
src/main/resources/static/pages/control/line/js/webSocketHandle.js
| ... | ... | @@ -151,7 +151,7 @@ function appendLogItem(tempId, json, lineCode){ |
| 151 | 151 | var text = $item.find('.log-item-text').text(); |
| 152 | 152 | //线路名称 |
| 153 | 153 | var lineName = _data.getLineIds()[lineCode]; |
| 154 | - h5Speech.speak(lineName + ' ' + text); | |
| 154 | + h5Speech.speak(lineName.replace('行', '航') + ' ' + text); | |
| 155 | 155 | } |
| 156 | 156 | //重新计算未处理消息 |
| 157 | 157 | _messenger.setUntreatedNum(lineCode); | ... | ... |
src/main/resources/static/pages/forecast/sample/css/main.css
| ... | ... | @@ -106,6 +106,7 @@ |
| 106 | 106 | font-size: 85%; |
| 107 | 107 | fill: #6b6666; |
| 108 | 108 | font-weight: bold; |
| 109 | + pointer-events: none; | |
| 109 | 110 | } |
| 110 | 111 | |
| 111 | 112 | #lineConfigPanel #trafficChart .sample_tags a.tag.active{ |
| ... | ... | @@ -192,6 +193,7 @@ rect.f_rect{ |
| 192 | 193 | height: 20px; |
| 193 | 194 | fill: #32c2a5; |
| 194 | 195 | rx: 3px; |
| 196 | + cursor: pointer; | |
| 195 | 197 | } |
| 196 | 198 | |
| 197 | 199 | #lineConfigPanel #trafficChart svg text.f_text{ | ... | ... |
src/main/resources/static/pages/forecast/sample/js/svg.js
| ... | ... | @@ -93,6 +93,7 @@ var sampleSvg = (function(){ |
| 93 | 93 | showTags(); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | + //tag 点击事件 | |
| 96 | 97 | $('#trafficChart').on('click', '.sample_tags a.tag', function(){ |
| 97 | 98 | $('.sample_tags a.tag.active').removeClass('active'); |
| 98 | 99 | $(this).addClass('active'); |
| ... | ... | @@ -114,6 +115,7 @@ var sampleSvg = (function(){ |
| 114 | 115 | .attr('data-sid', this.id); |
| 115 | 116 | }); |
| 116 | 117 | |
| 118 | + console.log('showRunTimeE...', rs); | |
| 117 | 119 | //背景 |
| 118 | 120 | svg.selectAll('.f_rect') |
| 119 | 121 | .data(rs).enter().append('rect') |
| ... | ... | @@ -123,7 +125,9 @@ var sampleSvg = (function(){ |
| 123 | 125 | .attr('width', function(d){ |
| 124 | 126 | return (d.runTime + '').length * 7 + 20; |
| 125 | 127 | }) |
| 126 | - .classed('f_rect', true); | |
| 128 | + .attr('data-id', function(d){return d.eStation;}) | |
| 129 | + .classed('f_rect', true) | |
| 130 | + .on('click', function(){popAddModal($(this).data('id'))}); | |
| 127 | 131 | |
| 128 | 132 | //时间text |
| 129 | 133 | svg.selectAll('.f_text') |
| ... | ... | @@ -168,7 +172,6 @@ var sampleSvg = (function(){ |
| 168 | 172 | .text(text) |
| 169 | 173 | } |
| 170 | 174 | |
| 171 | - var tagRange = {'早高峰': {s: '06:31', e: '08:30'}, '平峰': {s: '08:31', e: '16:00'}, '晚高峰': {s: '16:01', e: '18:00'}}; | |
| 172 | 175 | function popAddModal(id){ |
| 173 | 176 | //var eid = id ,sid = prve(id); |
| 174 | 177 | //if(!sid)return; |
| ... | ... | @@ -181,8 +184,9 @@ var sampleSvg = (function(){ |
| 181 | 184 | content: rs, |
| 182 | 185 | shift: 5, |
| 183 | 186 | // title: '...', |
| 184 | - success: function(){ | |
| 185 | - $('#forecast_sample_modal').trigger('init', {_opt: _opt, _data: _data, id: id}); | |
| 187 | + success: function(layero, index){ | |
| 188 | + var activeTag = $('.sample_tags a.tag.active'); | |
| 189 | + $('#forecast_sample_modal').trigger('init', {layero: layero, _opt: _opt, _data: _data, id: id, tag: activeTag.length > 0?activeTag.text():''}); | |
| 186 | 190 | /*$("#addSampleForm select[name=tag]").select2({ |
| 187 | 191 | maximumSelectionLength: 1, |
| 188 | 192 | tags: true | ... | ... |
src/main/resources/static/pages/forecast/sample/modal.html
| 1 | 1 | <div id="forecast_sample_modal"> |
| 2 | +<div class="row" style="margin: 15px 0;"> | |
| 3 | +</div> | |
| 2 | 4 | </div> |
| 3 | 5 | |
| 4 | -<script id="forecast_addSample_temp" type="text/html"> | |
| 5 | -<form class="form-horizontal" role="form" style="padding: 35px 25px;" id="addSampleForm"> | |
| 6 | - <input type="hidden" name="sStation" value="{{sid}}"/> | |
| 7 | - <input type="hidden" name="eStation" value="{{eid}}"/> | |
| 8 | - <div class="form-body"> | |
| 9 | - <div class="form-group"> | |
| 10 | - <label class="col-md-3 control-label">开始站:</label> | |
| 11 | - <div class="col-md-9"> | |
| 12 | - <input type="text" class="form-control " value="{{sName}}" readonly> | |
| 13 | - </div> | |
| 14 | - </div> | |
| 15 | - <div class="form-group"> | |
| 16 | - <label class="col-md-3 control-label">截止站:</label> | |
| 17 | - <div class="col-md-9"> | |
| 18 | - <input type="text" class="form-control" value="{{eName}}" readonly> | |
| 19 | - </div> | |
| 20 | - </div> | |
| 21 | - <div class="form-group"> | |
| 22 | - <label class="col-md-3 control-label">标签:</label> | |
| 23 | - <div class="col-md-9"> | |
| 24 | - <select class="form-control" name="tag" multiple required> | |
| 25 | - <option value="早高峰">早高峰</option> | |
| 26 | - <option value="平峰">平峰</option> | |
| 27 | - <option value="晚高峰">晚高峰</option> | |
| 28 | - </select> | |
| 29 | - </div> | |
| 30 | - </div> | |
| 31 | - <div class="form-group"> | |
| 32 | - <label class="col-md-3 control-label">时段:</label> | |
| 33 | - <div class="col-md-4" style="padding-right: 0;"> | |
| 34 | - <input type="time" class="form-control" name="sDate" required> | |
| 35 | - </div> | |
| 36 | - <div class="col-md-1" style="margin-top: 10px;font-size: 85%;color: gray;">至</div> | |
| 37 | - <div class="col-md-4" style="padding-left: 0;"> | |
| 38 | - <input type="time" class="form-control" name="eDate" required> | |
| 39 | - </div> | |
| 40 | - </div> | |
| 41 | - <div class="form-group"> | |
| 42 | - <label class="col-md-3 control-label">耗时(分):</label> | |
| 43 | - <div class="col-md-9"> | |
| 44 | - <input type="number" class="form-control" name="runTime" required> | |
| 45 | - </div> | |
| 46 | - </div> | |
| 47 | - </div> | |
| 48 | -<br> | |
| 49 | - <div class="form-actions"> | |
| 50 | - <div class="row"> | |
| 51 | - <div class="col-md-offset-4 col-md-8"> | |
| 52 | - <button type="button" class="btn green confirm"><i class="fa fa-check"></i> 提交</button> | |
| 53 | - <button type="button" class="btn layui-layer-close">取消</button> | |
| 54 | - </div> | |
| 55 | - </div> | |
| 6 | +<script id="forecast_sample_tab_detail_temp" type="text/html"> | |
| 7 | +<div class="col-md-3 col-sm-3 col-xs-3"> | |
| 8 | + <ul class="nav nav-tabs tabs-left"> | |
| 9 | +{{each data as obj i}} | |
| 10 | + <li > | |
| 11 | + <a href="#tab_sample_{{i}}" data-toggle="tab" title="{{obj.t}}"> {{obj.t}} </a> | |
| 12 | + </li> | |
| 13 | +{{/each}} | |
| 14 | +<li ><a href="#tab_sample_add" data-toggle="tab" style="font-size: 12px;color: red;"> <i class="fa fa-plus"></i> 新增 </a></li> | |
| 15 | + </ul> | |
| 16 | +</div> | |
| 17 | + | |
| 18 | +<div class="col-md-9 col-sm-9 col-xs-9"> | |
| 19 | +<div class="tab-content"> | |
| 20 | +{{each data as obj i}} | |
| 21 | + <div class="tab-pane" id="tab_sample_{{i}}"> | |
| 22 | + <form class="form-horizontal" role="form" style="padding: 35px 25px;" id="addSampleForm"> | |
| 23 | + <input type="hidden" name="sStation" value="{{obj.d.sid}}"/> | |
| 24 | + <input type="hidden" name="eStation" value="{{obj.d.eid}}"/> | |
| 25 | + <div class="form-body"> | |
| 26 | + <div class="form-group"> | |
| 27 | + <label class="col-md-3 control-label">开始站:</label> | |
| 28 | + <div class="col-md-9"> | |
| 29 | + <input type="text" class="form-control " value="{{obj.d.sName}}" readonly> | |
| 30 | + </div> | |
| 31 | + </div> | |
| 32 | + <div class="form-group"> | |
| 33 | + <label class="col-md-3 control-label">截止站:</label> | |
| 34 | + <div class="col-md-9"> | |
| 35 | + <input type="text" class="form-control" value="{{obj.d.eName}}" readonly> | |
| 36 | + </div> | |
| 37 | + </div> | |
| 38 | + <div class="form-group"> | |
| 39 | + <label class="col-md-3 control-label">时段:</label> | |
| 40 | + <div class="col-md-4" style="padding-right: 0;"> | |
| 41 | + <input type="time" class="form-control" name="sDate" value="{{obj.d.sDate}}" required> | |
| 42 | + </div> | |
| 43 | + <div class="col-md-1" style="margin-top: 10px;font-size: 85%;color: gray;">至</div> | |
| 44 | + <div class="col-md-4" style="padding-left: 0;"> | |
| 45 | + <input type="time" class="form-control" name="eDate" value="{{obj.d.eDate}}" required> | |
| 46 | + </div> | |
| 47 | + </div> | |
| 48 | + <div class="form-group"> | |
| 49 | + <label class="col-md-3 control-label">用时:</label> | |
| 50 | + <div class="col-md-9"> | |
| 51 | + <input type="number" class="form-control" name="runTime" value="{{obj.d.runTime}}" required> | |
| 52 | + </div> | |
| 53 | + </div> | |
| 54 | + </div> | |
| 55 | + <br> | |
| 56 | + <div class="form-actions"> | |
| 57 | + <div class="row"> | |
| 58 | + <div class="col-md-offset-4 col-md-8"> | |
| 59 | + <button type="button" class="btn green confirm"><i class="fa fa-check"></i> 保存</button> | |
| 60 | + <button type="button" class="btn red layui-layer-close">删除</button> | |
| 61 | + </div> | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + </form> | |
| 56 | 65 | </div> |
| 57 | -</form> | |
| 66 | +{{/each}} | |
| 67 | + | |
| 68 | +<div class="tab-pane" id="tab_sample_add"> | |
| 69 | + <form class="form-horizontal" role="form" style="padding: 35px 25px;" id="addSampleForm"> | |
| 70 | + <input type="hidden" name="sStation" value="{{base.sid}}"/> | |
| 71 | + <input type="hidden" name="eStation" value="{{base.eid}}"/> | |
| 72 | + <div class="form-body"> | |
| 73 | + <div class="form-group"> | |
| 74 | + <label class="col-md-3 control-label">开始站:</label> | |
| 75 | + <div class="col-md-9"> | |
| 76 | + <input type="text" class="form-control " value="{{base.sName}}" readonly> | |
| 77 | + </div> | |
| 78 | + </div> | |
| 79 | + <div class="form-group"> | |
| 80 | + <label class="col-md-3 control-label">截止站:</label> | |
| 81 | + <div class="col-md-9"> | |
| 82 | + <input type="text" class="form-control" value="{{base.eName}}" readonly> | |
| 83 | + </div> | |
| 84 | + </div> | |
| 85 | + <div class="form-group"> | |
| 86 | + <label class="col-md-3 control-label">标签:</label> | |
| 87 | + <div class="col-md-9"> | |
| 88 | + <select class="form-control" name="tag" style="width:100%;" multiple required> | |
| 89 | + <option value="早高峰">早高峰</option> | |
| 90 | + <option value="平峰">平峰</option> | |
| 91 | + <option value="晚高峰">晚高峰</option> | |
| 92 | + </select> | |
| 93 | + </div> | |
| 94 | + </div> | |
| 95 | + <div class="form-group"> | |
| 96 | + <label class="col-md-3 control-label">时段:</label> | |
| 97 | + <div class="col-md-4" style="padding-right: 0;"> | |
| 98 | + <input type="time" class="form-control" name="sDate" required> | |
| 99 | + </div> | |
| 100 | + <div class="col-md-1" style="margin-top: 10px;font-size: 85%;color: gray;">至</div> | |
| 101 | + <div class="col-md-4" style="padding-left: 0;"> | |
| 102 | + <input type="time" class="form-control" name="eDate" required> | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + <div class="form-group"> | |
| 106 | + <label class="col-md-3 control-label">用时:</label> | |
| 107 | + <div class="col-md-9"> | |
| 108 | + <input type="number" class="form-control" name="runTime" required> | |
| 109 | + </div> | |
| 110 | + </div> | |
| 111 | + </div> | |
| 112 | + <br> | |
| 113 | + <div class="form-actions"> | |
| 114 | + <div class="row"> | |
| 115 | + <div class="col-md-offset-4 col-md-8"> | |
| 116 | + <button type="button" class="btn green confirm"><i class="fa fa-check"></i> 提交</button> | |
| 117 | + </div> | |
| 118 | + </div> | |
| 119 | + </div> | |
| 120 | + </form> | |
| 121 | + </div> | |
| 122 | +</div> | |
| 123 | +</div> | |
| 58 | 124 | </script> |
| 59 | 125 | |
| 60 | 126 | <script> |
| 61 | 127 | !function(){ |
| 62 | - var _data,_opt,id; | |
| 63 | - | |
| 128 | + var _data,_opt,id, currentData, layero; | |
| 129 | + var tagRange = {'早高峰': {s: '06:31', e: '08:30'}, '平峰': {s: '08:31', e: '16:00'}, '晚高峰': {s: '16:01', e: '18:00'}}; | |
| 64 | 130 | |
| 65 | 131 | $('#forecast_sample_modal').on('init', function(e, rs){ |
| 66 | 132 | _data = rs._data; |
| 67 | 133 | _opt = rs._opt; |
| 134 | + layero = rs.layero; | |
| 68 | 135 | id = rs.id; |
| 69 | - //console.log(rs); | |
| 136 | + | |
| 137 | + var eid = id, sid = prve(id).stationCode; | |
| 138 | + var sampData = searchData(sid, eid); | |
| 139 | + var baseData = {sid: sid, eid: eid, sName: toName(sid), eName: toName(eid)}; | |
| 140 | + var html = template('forecast_sample_tab_detail_temp', {data: sampData, base: baseData}); | |
| 141 | + $('#forecast_sample_modal .row').html(html); | |
| 142 | + //默认选中tab | |
| 143 | + defaultSelect(rs.tag); | |
| 144 | + | |
| 145 | + //标签select2 | |
| 146 | + $("select[name=tag]").select2({ | |
| 147 | + maximumSelectionLength: 1, | |
| 148 | + tags: true | |
| 149 | + }) | |
| 150 | + .on('change', function(){ | |
| 151 | + var t = $(this).val(); | |
| 152 | + if(tagRange[t]){ | |
| 153 | + $("input[name=sDate]").val(tagRange[t].s); | |
| 154 | + $("input[name=eDate]").val(tagRange[t].e); | |
| 155 | + } | |
| 156 | + }); | |
| 157 | + | |
| 158 | + toCenter(layero); | |
| 159 | + | |
| 160 | + //currentData = searchData(sid, eid)[rs.tag]; | |
| 161 | + | |
| 162 | + //console.log('当前站点: ' , getById(id)); | |
| 163 | + //console.log('上一个站点: ' , prve(id)); | |
| 164 | + //console.log('当前数据:', currentData); | |
| 165 | + | |
| 166 | + //forecast_sample_tab_detail_temp | |
| 70 | 167 | }); |
| 71 | 168 | |
| 72 | 169 | |
| 73 | 170 | function prve(that){ |
| 74 | 171 | for(var i = 0; i < _opt.rts.length; i ++){ |
| 75 | - if(routes[i].stationCode == that){ | |
| 172 | + if(_opt.rts[i].stationCode == that){ | |
| 76 | 173 | if(i == 0) |
| 77 | 174 | return null; |
| 78 | - return routes[i - 1].stationCode; | |
| 175 | + return _opt.rts[i - 1]; | |
| 176 | + | |
| 177 | + | |
| 79 | 178 | } |
| 80 | 179 | } |
| 81 | 180 | |
| 82 | 181 | return null; |
| 83 | 182 | } |
| 183 | + | |
| 184 | + function getById(id){ | |
| 185 | + var rts = _opt.rts; | |
| 186 | + for(var i = 0;i < rts.length ; i ++){ | |
| 187 | + if(rts[i].stationCode == id) | |
| 188 | + return rts[i]; | |
| 189 | + } | |
| 190 | + | |
| 191 | + return null; | |
| 192 | + } | |
| 193 | + | |
| 194 | + function searchData(sid, eid){ | |
| 195 | + var rs = []; | |
| 196 | + | |
| 197 | + for(var tag in _data){ | |
| 198 | + $.each(_data[tag], function(){ | |
| 199 | + if(this.sStation == sid && this.eStation == eid) | |
| 200 | + rs.push({t: tag, d: this}); | |
| 201 | + }) | |
| 202 | + } | |
| 203 | + return rs; | |
| 204 | + } | |
| 205 | + | |
| 206 | + function toCenter($e){ | |
| 207 | + var h = $(document.body).height(); | |
| 208 | + var eh = $e.height(); | |
| 209 | + if(eh < h){ | |
| 210 | + $e.css('top', (h - eh) /2); | |
| 211 | + } | |
| 212 | + else{ | |
| 213 | + $e.css('top', h - eh); | |
| 214 | + layer.msg('页面高度不够了,但是并没有出现滚动条!'); | |
| 215 | + } | |
| 216 | + } | |
| 217 | + | |
| 218 | + function toName(id){ | |
| 219 | + var rts = _opt.rts; | |
| 220 | + for(var i = 0;i < rts.length ; i ++){ | |
| 221 | + if(rts[i].stationCode == id) | |
| 222 | + return rts[i].stationName; | |
| 223 | + } | |
| 224 | + | |
| 225 | + return null; | |
| 226 | + } | |
| 227 | + | |
| 228 | + function defaultSelect(tag){ | |
| 229 | + var firstTab = $('ul.tabs-left li:eq(0) a'); | |
| 230 | + if(tag){ | |
| 231 | + var _tab = $('ul.tabs-left li a[title='+tag+']'); | |
| 232 | + if(_tab.length > 0) | |
| 233 | + _tab.click(); | |
| 234 | + else | |
| 235 | + firstTab.click(); | |
| 236 | + } | |
| 237 | + else | |
| 238 | + firstTab.click(); | |
| 239 | + } | |
| 84 | 240 | }(); |
| 85 | 241 | </script> |
| 86 | 242 | \ No newline at end of file | ... | ... |