Commit 2a04fb24b9ec7ab790d97637368bea772a4e1bed
Update
Showing
21 changed files
with
1229 additions
and
354 deletions
src/main/java/com/bsth/controller/DownloadController.java
| ... | ... | @@ -31,12 +31,14 @@ public class DownloadController |
| 31 | 31 | @RequestMapping("download") |
| 32 | 32 | public ResponseEntity<byte[]> download(String fileName) throws IOException { |
| 33 | 33 | fileName = fileName+".xls"; |
| 34 | - String moudelPath = this.getClass().getResource("/").getPath()+ "static\\pages\\forms\\export\\"+fileName; | |
| 34 | + String moudelPath = this.getClass().getResource("/").getPath()+ "static\\pages\\forms\\export\\"+fileName; | |
| 35 | + System.out.println(moudelPath); | |
| 35 | 36 | // String path="D:\\export\\target\\"+jName+".xls"; |
| 36 | 37 | File file=new File(moudelPath); |
| 37 | 38 | HttpHeaders headers = new HttpHeaders(); |
| 38 | 39 | String realFileName=new String(fileName.getBytes("UTF-8"),"iso-8859-1");//为了解决中文名称乱码问题 |
| 39 | - headers.setContentDispositionFormData("attachment", URLDecoder.decode(realFileName,"utf-8")); | |
| 40 | + headers.setContentDispositionFormData("attachment", fileName); | |
| 41 | + System.out.println( URLDecoder.decode(realFileName,"utf-8")); | |
| 40 | 42 | headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); |
| 41 | 43 | return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file), |
| 42 | 44 | headers, HttpStatus.CREATED); | ... | ... |
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| ... | ... | @@ -41,7 +41,7 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, |
| 41 | 41 | */ |
| 42 | 42 | @RequestMapping(value = "/outgoAdjust", method = RequestMethod.POST) |
| 43 | 43 | public Map<String, Object> outgoAdjust(@RequestParam Long id, @RequestParam String remarks, |
| 44 | - @RequestParam String dfsj,@RequestParam String bcType) { | |
| 44 | + @RequestParam String dfsj,String bcType) { | |
| 45 | 45 | return scheduleRealInfoService.outgoAdjust(id, remarks, dfsj, bcType); |
| 46 | 46 | } |
| 47 | 47 | |
| ... | ... | @@ -418,4 +418,14 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, |
| 418 | 418 | public Map<String, Object> findSvgAttr(@RequestParam String idx){ |
| 419 | 419 | return scheduleRealInfoService.findSvgAttr(idx); |
| 420 | 420 | } |
| 421 | + | |
| 422 | + @RequestMapping(value = "addRemarks", method = RequestMethod.POST) | |
| 423 | + public Map<String, Object> addRemarks(@RequestParam Long id, @RequestParam String remarks){ | |
| 424 | + return scheduleRealInfoService.addRemarks(id, remarks); | |
| 425 | + } | |
| 426 | + | |
| 427 | + @RequestMapping(value = "scheduleDailyQp", method = RequestMethod.GET) | |
| 428 | + public List<Map<String, Object>> scheduleDailyQp(@RequestParam String line,@RequestParam String date){ | |
| 429 | + return scheduleRealInfoService.scheduleDailyQp(line,date); | |
| 430 | + } | |
| 421 | 431 | } | ... | ... |
src/main/java/com/bsth/data/pilot80/PilotReport.java
| ... | ... | @@ -77,7 +77,6 @@ public class PilotReport { |
| 77 | 77 | ScheduleRealInfo outSch = dayOfSchedule.nextByBcType(nbbm, "out"); |
| 78 | 78 | //如果有对应出场班次 |
| 79 | 79 | if(outSch != null){ |
| 80 | - | |
| 81 | 80 | //没有计划里程的出场班次,出场既是首发站,发送下一班次的营运指令 |
| 82 | 81 | if(outSch.getJhlc() == null) |
| 83 | 82 | outSch = dayOfSchedule.next(outSch); |
| ... | ... | @@ -86,13 +85,6 @@ public class PilotReport { |
| 86 | 85 | directiveService.send60Dispatch(outSch, dayOfSchedule.doneSum(nbbm), "请出@系统"); |
| 87 | 86 | //下发线路切换指令 |
| 88 | 87 | directiveService.lineChange(outSch.getClZbh(), outSch.getXlBm(), "请出@系统"); |
| 89 | -/* d80.setRemarks("计划出场时间:" + outSch.getDfsj()); | |
| 90 | - //当前GPS位置 | |
| 91 | - GpsEntity gps = gpsRealData.get(d80.getDeviceId()); | |
| 92 | - if(null != gps) | |
| 93 | - d80.addRemarks("<br> 位置:" + coordHtmlStr(gps));*/ | |
| 94 | - | |
| 95 | - //sendUtils.refreshSch(outSch); | |
| 96 | 88 | }else |
| 97 | 89 | d80.setRemarks("没有出场计划"); |
| 98 | 90 | ... | ... |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| ... | ... | @@ -18,13 +18,16 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI |
| 18 | 18 | List<ScheduleRealInfo> findByLines(List<String> lines); |
| 19 | 19 | |
| 20 | 20 | |
| 21 | + @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and bc_type not in ('in','out') order by (lpName+1),clZbh,realExecDate,fcsj") | |
| 22 | + List<ScheduleRealInfo> scheduleDailyQp(String line,String date); | |
| 23 | + | |
| 21 | 24 | @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY s.id,s.jGh,s.clZbh,s.lpName order by (lpName+1)") |
| 22 | 25 | List<ScheduleRealInfo> queryUserInfo(String line,String date); |
| 23 | 26 | |
| 24 | 27 | @Query(value="select min(s.id), s.jGh,s.clZbh,s.lpName,s.jName from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY s.jGh,s.clZbh,s.lpName ,s.jName order by (lpName+1)") |
| 25 | 28 | List<ScheduleRealInfo> queryUserInfo2(String line,String date); |
| 26 | 29 | |
| 27 | - @Query(value="select min(s.id), s.clZbh from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY s.clZbh order by (lpName+1)") | |
| 30 | + @Query(value="select min(s.id), s.clZbh from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY s.clZbh ") | |
| 28 | 31 | List<ScheduleRealInfo> queryUserInfo3(String line,String date); |
| 29 | 32 | |
| 30 | 33 | @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 order by bcs") | ... | ... |
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| ... | ... | @@ -326,13 +326,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 326 | 326 | |
| 327 | 327 | String[] date1 = startDate.split("-"); |
| 328 | 328 | String[] date2 = endDate.split("-"); |
| 329 | - startDate = date1[0] + "年" + date1[1] + "月" + date1[2] + "日"; | |
| 330 | - endDate = date2[0] + "年" + date2[1] + "月" + date2[2] + "日"; | |
| 329 | +// startDate = date1[0] + "年" + date1[1] + "月" + date1[2] + "日"; | |
| 330 | +// endDate = date2[0] + "年" + date2[1] + "月" + date2[2] + "日"; | |
| 331 | 331 | String Date = ""; |
| 332 | 332 | if(startDate.equals(endDate)) |
| 333 | - Date = startDate; | |
| 333 | + Date = date1[0] + "年" + date1[1] + "月" + date1[2] + "日"; | |
| 334 | 334 | else |
| 335 | - Date = startDate + "--" + endDate; | |
| 335 | + Date = date1[0] + "年" + date1[1] + "月" + date1[2] + "日" + "--" | |
| 336 | + + date2[0] + "年" + date2[1] + "月" + date2[2] + "日"; | |
| 336 | 337 | |
| 337 | 338 | // String[] split = times.split("-"); |
| 338 | 339 | // int startTime = Integer.valueOf(split[0].split(":")[0])*60 + Integer.valueOf(split[0].split(":")[1]); |
| ... | ... | @@ -526,7 +527,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 526 | 527 | try { |
| 527 | 528 | listI.add(resList.iterator()); |
| 528 | 529 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; |
| 529 | - ee.excelReplace(listI, new Object[] { m }, path+"mould\\interval.xls", | |
| 530 | + ee.excelReplace(listI, new Object[] { m }, path+"mould\\busInterval"+statu+".xls", | |
| 530 | 531 | path+"export\\班次间隔统计表" + sdfSimple.format(sdfMonth.parse(startDate)) |
| 531 | 532 | + "-" + sdfSimple.format(sdfMonth.parse(endDate)) + ".xls"); |
| 532 | 533 | } catch (Exception e) { | ... | ... |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| ... | ... | @@ -140,4 +140,8 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L |
| 140 | 140 | Map<String,Object> svgAttr(String jsonStr); |
| 141 | 141 | |
| 142 | 142 | Map<String,Object> findSvgAttr(String idx); |
| 143 | + | |
| 144 | + Map<String,Object> addRemarks(Long id, String remarks); | |
| 145 | + | |
| 146 | + List<Map<String, Object>> scheduleDailyQp(String line ,String date); | |
| 143 | 147 | } | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -2075,6 +2075,22 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2075 | 2075 | } |
| 2076 | 2076 | |
| 2077 | 2077 | @Override |
| 2078 | + public Map<String, Object> addRemarks(Long id, String remarks) { | |
| 2079 | + Map<String, Object> rs = new HashMap<>(); | |
| 2080 | + try { | |
| 2081 | + ScheduleRealInfo sch = dayOfSchedule.get(id); | |
| 2082 | + sch.addRemarks(remarks); | |
| 2083 | + | |
| 2084 | + rs.put("status", ResponseCode.SUCCESS); | |
| 2085 | + rs.put("t", sch); | |
| 2086 | + } catch (Exception e) { | |
| 2087 | + logger.error("", e); | |
| 2088 | + rs.put("status", ResponseCode.ERROR); | |
| 2089 | + } | |
| 2090 | + return rs; | |
| 2091 | + } | |
| 2092 | + | |
| 2093 | + @Override | |
| 2078 | 2094 | public List<Map<String, Object>> yesterdayDataList(String line) { |
| 2079 | 2095 | // TODO Auto-generated method stub |
| 2080 | 2096 | return null; |
| ... | ... | @@ -2373,4 +2389,140 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2373 | 2389 | return map; |
| 2374 | 2390 | } |
| 2375 | 2391 | |
| 2392 | + @Override | |
| 2393 | + public List<Map<String, Object>> scheduleDailyQp(String line, String date) { | |
| 2394 | + // TODO Auto-generated method stub | |
| 2395 | + List<Map<String, Object>> list=new ArrayList<Map<String, Object>>(); | |
| 2396 | + List<ScheduleRealInfo> scheduleRealInfos=scheduleRealInfoRepository.scheduleDailyQp(line, date); | |
| 2397 | + Map<String, Object> map=null; | |
| 2398 | + String lp="lp"; | |
| 2399 | + String jgh="jgh"; | |
| 2400 | + String clzbh="clzbh"; | |
| 2401 | + int bcs=0; | |
| 2402 | + String thclzbh=""; | |
| 2403 | + String sgh="sgh"; | |
| 2404 | + for(int i=0;i<scheduleRealInfos.size();i++){ | |
| 2405 | + ScheduleRealInfo scheduleRealInfo=scheduleRealInfos.get(i); | |
| 2406 | + if(scheduleRealInfo.getLpName().equals(lp)){ | |
| 2407 | + bcs++; | |
| 2408 | + String fcsj=scheduleRealInfo.getFcsj(); | |
| 2409 | + | |
| 2410 | + if(!clzbh.equals(scheduleRealInfo.getClZbh())){ | |
| 2411 | + clzbh=scheduleRealInfo.getClZbh(); | |
| 2412 | + if(thclzbh==""){ | |
| 2413 | + thclzbh +=scheduleRealInfo.getClZbh()+","; | |
| 2414 | + }else{ | |
| 2415 | + thclzbh +=scheduleRealInfo.getClZbh(); | |
| 2416 | + } | |
| 2417 | + map.put("thclzbh", thclzbh); | |
| 2418 | + } | |
| 2419 | + | |
| 2420 | + if(!jgh.equals(scheduleRealInfo.getjGh())){ | |
| 2421 | + jgh=scheduleRealInfo.getjGh(); | |
| 2422 | + if(map.get("jjb2")!=null){ | |
| 2423 | + map.put("jjb3", scheduleRealInfo.getjGh()+"/"+ | |
| 2424 | + scheduleRealInfo.getFcsjActual()); | |
| 2425 | + | |
| 2426 | + }else{ | |
| 2427 | + map.put("jjb2", scheduleRealInfo.getjGh()+"/"+ | |
| 2428 | + scheduleRealInfo.getFcsjActual()); | |
| 2429 | + } | |
| 2430 | + | |
| 2431 | + } | |
| 2432 | + | |
| 2433 | + if(scheduleRealInfo.getsGh()!=null){ | |
| 2434 | + if(!scheduleRealInfo.getsGh().equals(sgh)){ | |
| 2435 | + sgh=scheduleRealInfo.getsGh(); | |
| 2436 | + if(map.get("sjb1")!=null){ | |
| 2437 | + if(map.get("sjb2")!=null){ | |
| 2438 | + map.put("sjb3", scheduleRealInfo.getsGh()+"/"+ | |
| 2439 | + scheduleRealInfo.getFcsjActual()); | |
| 2440 | + }else{ | |
| 2441 | + map.put("sjb2", scheduleRealInfo.getsGh()+"/"+ | |
| 2442 | + scheduleRealInfo.getFcsjActual()); | |
| 2443 | + } | |
| 2444 | + }else{ | |
| 2445 | + map.put("sjb1", scheduleRealInfo.getsGh()+"/"+ | |
| 2446 | + scheduleRealInfo.getFcsjActual()); | |
| 2447 | + } | |
| 2448 | + } | |
| 2449 | + } | |
| 2450 | + if(scheduleRealInfo.getFcsjActual()!=null){ | |
| 2451 | + String fcsjs[]=fcsj.split(":"); | |
| 2452 | + String fcsjActuals[]=scheduleRealInfo.getFcsjActual().split(":"); | |
| 2453 | + int a=Integer.parseInt(fcsjActuals[0])*60+Integer.parseInt(fcsjActuals[1]); | |
| 2454 | + int b=Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1]); | |
| 2455 | + map.put("cz"+bcs, b-a); | |
| 2456 | + }else{ | |
| 2457 | + map.put("cz"+bcs, "无"); | |
| 2458 | + } | |
| 2459 | + map.put("lp", scheduleRealInfo.getLpName()); | |
| 2460 | + map.put("dd"+bcs, scheduleRealInfo.getZdsjActual()); | |
| 2461 | + map.put("kc"+bcs, scheduleRealInfo.getFcsjActual()); | |
| 2462 | + | |
| 2463 | + if(i<scheduleRealInfos.size()-1){ | |
| 2464 | + if(!scheduleRealInfos.get(i+1).getLpName().equals | |
| 2465 | + (scheduleRealInfos.get(i).getLpName())){ | |
| 2466 | + list.add(map); | |
| 2467 | + lp="lp"; | |
| 2468 | + jgh="jgh"; | |
| 2469 | + clzbh="clzbh"; | |
| 2470 | + bcs=0; | |
| 2471 | + thclzbh=""; | |
| 2472 | + sgh="sgh"; | |
| 2473 | + } | |
| 2474 | + }else{ | |
| 2475 | + list.add(map); | |
| 2476 | + } | |
| 2477 | + }else{ | |
| 2478 | + bcs=1; | |
| 2479 | + map=new HashMap<String,Object>(); | |
| 2480 | + lp=scheduleRealInfo.getLpName(); | |
| 2481 | + jgh=scheduleRealInfo.getjGh(); | |
| 2482 | + clzbh=scheduleRealInfo.getClZbh(); | |
| 2483 | + if(scheduleRealInfo.getsGh()!=null){ | |
| 2484 | + sgh=scheduleRealInfo.getsGh(); | |
| 2485 | + map.put("sjb1",scheduleRealInfo.getsGh()+"/"+ | |
| 2486 | + scheduleRealInfo.getFcsjActual()); | |
| 2487 | + } | |
| 2488 | + String fcsj=scheduleRealInfo.getFcsj(); | |
| 2489 | + scheduleRealInfo.getFcsjActual(); | |
| 2490 | + map.put("jjb1", jgh+"/"+scheduleRealInfo.getFcsjActual()); | |
| 2491 | + map.put("cccl", clzbh); | |
| 2492 | + | |
| 2493 | + if(scheduleRealInfo.getFcsjActual()!=null){ | |
| 2494 | + String fcsjs[]=fcsj.split(":"); | |
| 2495 | + String fcsjActuals[]=scheduleRealInfo.getFcsjActual().split(":"); | |
| 2496 | + int a=Integer.parseInt(fcsjActuals[0])*60+Integer.parseInt(fcsjActuals[1]); | |
| 2497 | + int b=Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1]); | |
| 2498 | + map.put("cz"+bcs, b-a); | |
| 2499 | + }else{ | |
| 2500 | + map.put("cz"+bcs, "无"); | |
| 2501 | + } | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + map.put("lp", scheduleRealInfo.getLpName()); | |
| 2505 | + map.put("dd"+bcs, scheduleRealInfo.getZdsjActual()); | |
| 2506 | + map.put("kc"+bcs, scheduleRealInfo.getFcsjActual()); | |
| 2507 | + | |
| 2508 | + if(i<scheduleRealInfos.size()-1){ | |
| 2509 | + if(!scheduleRealInfos.get(i+1).getLpName().equals | |
| 2510 | + (scheduleRealInfos.get(i).getLpName())){ | |
| 2511 | + list.add(map); | |
| 2512 | + lp="lp"; | |
| 2513 | + jgh="jgh"; | |
| 2514 | + clzbh="clzbh"; | |
| 2515 | + bcs=0; | |
| 2516 | + thclzbh=""; | |
| 2517 | + sgh="sgh"; | |
| 2518 | + } | |
| 2519 | + }else{ | |
| 2520 | + list.add(map); | |
| 2521 | + } | |
| 2522 | + } | |
| 2523 | + | |
| 2524 | + } | |
| 2525 | + return list; | |
| 2526 | + } | |
| 2527 | + | |
| 2376 | 2528 | } |
| 2377 | 2529 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/forms/mould/busInterval0.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/busInterval1.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/busInterval.html
| ... | ... | @@ -73,7 +73,7 @@ |
| 73 | 73 | <!-- </div> --> |
| 74 | 74 | <div class="form-group" style="margin-left: 14px"> |
| 75 | 75 | <input class="btn btn-default" type="button" id="query" value="筛选"/> |
| 76 | -<!-- <input class="btn btn-default" type="button" id="export" value="导出"/> --> | |
| 76 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | |
| 77 | 77 | </div> |
| 78 | 78 | </form> |
| 79 | 79 | </div> | ... | ... |
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
src/main/resources/static/pages/forms/statement/scheduleDailyQp.html
| ... | ... | @@ -52,7 +52,7 @@ |
| 52 | 52 | <div class="portlet-body" > |
| 53 | 53 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 506px;height: 400px"> |
| 54 | 54 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 55 | - <thead> | |
| 55 | + <thead > | |
| 56 | 56 | <tr > |
| 57 | 57 | <th style="text-align:center;vertical-align:middle;" rowspan="3">路牌</th> |
| 58 | 58 | <th style="text-align:center;vertical-align:middle;" |
| ... | ... | @@ -62,90 +62,126 @@ |
| 62 | 62 | <th colspan="3" style="text-align:center;vertical-align:middle;">售票员</th> |
| 63 | 63 | <th rowspan="3" style="text-align:center;vertical-align:middle;">路牌</th> |
| 64 | 64 | <th rowspan="4" style="text-align:center;vertical-align:middle;">记录项目</th> |
| 65 | - <th colspan="4" style="text-align:center;vertical-align:middle;">1</th> | |
| 66 | - <th colspan="4" style="text-align:center;vertical-align:middle;">2</th> | |
| 67 | - <th colspan="4" style="text-align:center;vertical-align:middle;">3</th> | |
| 68 | - <th colspan="4" style="text-align:center;vertical-align:middle;">4</th> | |
| 69 | - <th colspan="4" style="text-align:center;vertical-align:middle;">5</th> | |
| 70 | - <th colspan="4" style="text-align:center;vertical-align:middle;">6</th> | |
| 71 | - <th colspan="4" style="text-align:center;vertical-align:middle;">7</th> | |
| 72 | - <th colspan="4" style="text-align:center;vertical-align:middle;">8</th> | |
| 73 | - <th colspan="4" style="text-align:center;vertical-align:middle;">9</th> | |
| 74 | - <th colspan="4" style="text-align:center;vertical-align:middle;">10</th> | |
| 75 | - <th colspan="4" style="text-align:center;vertical-align:middle;">11</th> | |
| 76 | - <th colspan="4" style="text-align:center;vertical-align:middle;">12</th> | |
| 77 | - <th colspan="4" style="text-align:center;vertical-align:middle;">13</th> | |
| 65 | + <th colspan="3" style="text-align:center;vertical-align:middle;">1</th> | |
| 66 | + <th colspan="3" style="text-align:center;vertical-align:middle;">2</th> | |
| 67 | + <th colspan="3" style="text-align:center;vertical-align:middle;">3</th> | |
| 68 | + <th colspan="3" style="text-align:center;vertical-align:middle;">4</th> | |
| 69 | + <th colspan="3" style="text-align:center;vertical-align:middle;">5</th> | |
| 70 | + <th colspan="3" style="text-align:center;vertical-align:middle;">6</th> | |
| 71 | + <th colspan="3" style="text-align:center;vertical-align:middle;">7</th> | |
| 72 | + <th colspan="3" style="text-align:center;vertical-align:middle;">8</th> | |
| 73 | + <th colspan="3" style="text-align:center;vertical-align:middle;">9</th> | |
| 74 | + <th colspan="3" style="text-align:center;vertical-align:middle;">10</th> | |
| 75 | + <th colspan="3" style="text-align:center;vertical-align:middle;">11</th> | |
| 76 | + <th colspan="3" style="text-align:center;vertical-align:middle;">12</th> | |
| 77 | + <th colspan="3" style="text-align:center;vertical-align:middle;">13</th> | |
| 78 | + <th colspan="3" style="text-align:center;vertical-align:middle;">14</th> | |
| 79 | + <th colspan="3" style="text-align:center;vertical-align:middle;">15</th> | |
| 80 | + <th colspan="3" style="text-align:center;vertical-align:middle;">16</th> | |
| 81 | + <th colspan="3" style="text-align:center;vertical-align:middle;">17</th> | |
| 82 | + <th colspan="3" style="text-align:center;vertical-align:middle;">18</th> | |
| 83 | + <th colspan="3" style="text-align:center;vertical-align:middle;">19</th> | |
| 84 | + <th colspan="3" style="text-align:center;vertical-align:middle;">20</th> | |
| 78 | 85 | |
| 79 | 86 | </tr> |
| 80 | 87 | <tr> |
| 81 | 88 | |
| 82 | - <th rowspan="2">职号</th> | |
| 83 | - <th colspan="2">接班时间</th> | |
| 84 | - <th rowspan="2">职号</th> | |
| 85 | - <th colspan="2">接班时间</th> | |
| 89 | + | |
| 90 | + <th colspan="3">职号/接班时间</th> | |
| 91 | + <th colspan="3">职号/接班时间</th> | |
| 92 | + <th rowspan="2">到达</th> | |
| 93 | + <th rowspan="2">早/迟</th> | |
| 94 | + <th rowspan="2">开出</th> | |
| 95 | + | |
| 96 | + <th rowspan="2">到达</th> | |
| 97 | + <th rowspan="2">早/迟</th> | |
| 98 | + <th rowspan="2">开出</th> | |
| 99 | + | |
| 100 | + <th rowspan="2">到达</th> | |
| 101 | + <th rowspan="2">早/迟</th> | |
| 102 | + <th rowspan="2">开出</th> | |
| 103 | + | |
| 104 | + <th rowspan="2">到达</th> | |
| 105 | + <th rowspan="2">早/迟</th> | |
| 106 | + <th rowspan="2">开出</th> | |
| 107 | + | |
| 108 | + <th rowspan="2">到达</th> | |
| 109 | + <th rowspan="2">早/迟</th> | |
| 110 | + <th rowspan="2">开出</th> | |
| 111 | + | |
| 112 | + <th rowspan="2">到达</th> | |
| 113 | + <th rowspan="2">早/迟</th> | |
| 114 | + <th rowspan="2">开出</th> | |
| 115 | + | |
| 116 | + <th rowspan="2">到达</th> | |
| 117 | + <th rowspan="2">早/迟</th> | |
| 118 | + <th rowspan="2">开出</th> | |
| 119 | + | |
| 86 | 120 | <th rowspan="2">到达</th> |
| 87 | 121 | <th rowspan="2">早/迟</th> |
| 88 | 122 | <th rowspan="2">开出</th> |
| 89 | - <th rowspan="2">备注</th> | |
| 123 | + | |
| 90 | 124 | <th rowspan="2">到达</th> |
| 91 | 125 | <th rowspan="2">早/迟</th> |
| 92 | 126 | <th rowspan="2">开出</th> |
| 93 | - <th rowspan="2">备注</th> | |
| 127 | + | |
| 94 | 128 | <th rowspan="2">到达</th> |
| 95 | 129 | <th rowspan="2">早/迟</th> |
| 96 | 130 | <th rowspan="2">开出</th> |
| 97 | - <th rowspan="2">备注</th> | |
| 131 | + | |
| 98 | 132 | <th rowspan="2">到达</th> |
| 99 | 133 | <th rowspan="2">早/迟</th> |
| 100 | 134 | <th rowspan="2">开出</th> |
| 101 | - <th rowspan="2">备注</th> | |
| 135 | + | |
| 102 | 136 | <th rowspan="2">到达</th> |
| 103 | 137 | <th rowspan="2">早/迟</th> |
| 104 | 138 | <th rowspan="2">开出</th> |
| 105 | - <th rowspan="2">备注</th> | |
| 139 | + | |
| 106 | 140 | <th rowspan="2">到达</th> |
| 107 | 141 | <th rowspan="2">早/迟</th> |
| 108 | 142 | <th rowspan="2">开出</th> |
| 109 | - <th rowspan="2">备注</th> | |
| 143 | + | |
| 110 | 144 | <th rowspan="2">到达</th> |
| 111 | 145 | <th rowspan="2">早/迟</th> |
| 112 | 146 | <th rowspan="2">开出</th> |
| 113 | - <th rowspan="2">备注</th> | |
| 147 | + | |
| 114 | 148 | <th rowspan="2">到达</th> |
| 115 | 149 | <th rowspan="2">早/迟</th> |
| 116 | 150 | <th rowspan="2">开出</th> |
| 117 | - <th rowspan="2">备注</th> | |
| 151 | + | |
| 118 | 152 | <th rowspan="2">到达</th> |
| 119 | 153 | <th rowspan="2">早/迟</th> |
| 120 | 154 | <th rowspan="2">开出</th> |
| 121 | - <th rowspan="2">备注</th> | |
| 155 | + | |
| 122 | 156 | <th rowspan="2">到达</th> |
| 123 | 157 | <th rowspan="2">早/迟</th> |
| 124 | 158 | <th rowspan="2">开出</th> |
| 125 | - <th rowspan="2">备注</th> | |
| 159 | + | |
| 126 | 160 | <th rowspan="2">到达</th> |
| 127 | 161 | <th rowspan="2">早/迟</th> |
| 128 | 162 | <th rowspan="2">开出</th> |
| 129 | - <th rowspan="2">备注</th> | |
| 163 | + | |
| 130 | 164 | <th rowspan="2">到达</th> |
| 131 | 165 | <th rowspan="2">早/迟</th> |
| 132 | 166 | <th rowspan="2">开出</th> |
| 133 | - <th rowspan="2">备注</th> | |
| 167 | + | |
| 134 | 168 | <th rowspan="2">到达</th> |
| 135 | 169 | <th rowspan="2">早/迟</th> |
| 136 | 170 | <th rowspan="2">开出</th> |
| 137 | - <th rowspan="2">备注</th> | |
| 171 | + | |
| 138 | 172 | </tr> |
| 139 | 173 | <tr> |
| 140 | 174 | <th>出场</th> |
| 141 | 175 | <th>调换</th> |
| 142 | 176 | <th>1</th> |
| 143 | 177 | <th>2</th> |
| 178 | + <th>3</th> | |
| 144 | 179 | <th>1</th> |
| 145 | 180 | <th>2</th> |
| 181 | + <th>3</th> | |
| 146 | 182 | </tr> |
| 147 | 183 | </thead> |
| 148 | - <tbody> | |
| 184 | + <tbody > | |
| 149 | 185 | <tr > |
| 150 | 186 | <td>1</td> |
| 151 | 187 | <td> |
| ... | ... | @@ -221,6 +257,14 @@ |
| 221 | 257 | <td></td> |
| 222 | 258 | <td></td> |
| 223 | 259 | <td></td> |
| 260 | + <td></td> | |
| 261 | + <td></td> | |
| 262 | + <td></td> | |
| 263 | + <td></td> | |
| 264 | + <td></td> | |
| 265 | + <td></td> | |
| 266 | + <td></td> | |
| 267 | + <td></td> | |
| 224 | 268 | </tr> |
| 225 | 269 | |
| 226 | 270 | </tbody> |
| ... | ... | @@ -297,34 +341,16 @@ |
| 297 | 341 | } |
| 298 | 342 | |
| 299 | 343 | |
| 300 | - $("#query").on("click",jsDoQuery); | |
| 301 | - | |
| 302 | - var line = $("#line").val(); | |
| 303 | - var date = $("#date").val(); | |
| 304 | - var company = $("#company").val(); | |
| 305 | - var subCompany = $("#subCompany").val(); | |
| 306 | - function jsDoQuery(pagination){ | |
| 307 | - var params = {}; | |
| 308 | - line = $("#line").val(); | |
| 309 | - date = $("#date").val(); | |
| 310 | - company = $("#company").val(); | |
| 311 | - subCompany = $("#subCompany").val(); | |
| 312 | - if(line == " ") | |
| 313 | - line = ""; | |
| 314 | - params['line'] = line; | |
| 315 | - params['date'] = date; | |
| 316 | - params['type'] = "query"; | |
| 317 | - params['company'] = company; | |
| 318 | - params['subCompany'] = subCompany; | |
| 319 | - $(".hidden").removeClass("hidden"); | |
| 320 | - /* $get('/pcpc/workDaily', params, function(result){ | |
| 321 | - // 把数据填充到模版中 | |
| 322 | - var tbodyHtml = template('list_workDaily',{list:result}); | |
| 323 | - // 把渲染好的模版html文本追加到表格中 | |
| 324 | - $('#forms tbody').html(tbodyHtml); | |
| 325 | - | |
| 326 | - }); */ | |
| 327 | - } | |
| 344 | + //查询 | |
| 345 | + $("#query").on('click',function(){ | |
| 346 | + var line = $("#line").val(); | |
| 347 | + var date = $("#date").val(); | |
| 348 | + $get('/realSchedule/scheduleDailyQp',{line:line,date:date},function(result){ | |
| 349 | + var mycars = new Array(20); | |
| 350 | + var scheduleDaily_qp = template('scheduleDaily_qp',{list:result,lists:mycars}); | |
| 351 | + $('#forms tbody').html(scheduleDaily_qp); | |
| 352 | + }); | |
| 353 | + }); | |
| 328 | 354 | |
| 329 | 355 | $("#export").on("click",function(){ |
| 330 | 356 | $get('/pcpc/workDaily',{line:line,date:date,type:'export'},function(result){ |
| ... | ... | @@ -336,27 +362,28 @@ |
| 336 | 362 | }); |
| 337 | 363 | |
| 338 | 364 | </script> |
| 339 | -<script type="text/html" id="list_workDaily"> | |
| 365 | +<script type="text/html" id="scheduleDaily_qp"> | |
| 340 | 366 | {{each list as obj i}} |
| 341 | 367 | <tr> |
| 342 | - <td>{{obj.date}}</td> | |
| 343 | - <td>{{obj.line}}</td> | |
| 344 | - <td>{{obj.jhbc}}</td> | |
| 345 | - <td>{{obj.dftz}}</td> | |
| 346 | - <td>{{obj.dftzl}}</td> | |
| 347 | - <td>{{obj.ccl}}</td> | |
| 348 | - <td>{{obj.upfk}}</td> | |
| 349 | - <td>{{obj.updk}}</td> | |
| 350 | - <td>{{obj.dnfk}}</td> | |
| 351 | - <td>{{obj.dndk}}</td> | |
| 352 | - <td>{{obj.upfm}}</td> | |
| 353 | - <td>{{obj.updm}}</td> | |
| 354 | - <td>{{obj.dnfm}}</td> | |
| 355 | - <td>{{obj.dndm}}</td> | |
| 356 | - <td>{{obj.wdzs}}</td> | |
| 357 | - <td>{{obj.smbzdl}}</td> | |
| 358 | - <td>{{obj.gfbczxl}}</td> | |
| 359 | - </tr> | |
| 368 | + <td>{{obj.lp}}</td> | |
| 369 | + <td>{{obj.cccl}}</td> | |
| 370 | + <td>{{obj.thclzbh}}</td> | |
| 371 | + <td> </td> | |
| 372 | + <td>{{obj.jjb1}}</td> | |
| 373 | + <td>{{obj.jjb2}}</td> | |
| 374 | + <td>{{obj.jjb3}}</td> | |
| 375 | + <td>{{obj.sjb1}}</td> | |
| 376 | + <td>{{obj.sjb2}}</td> | |
| 377 | + <td>{{obj.sjb3}}</td> | |
| 378 | + <td>{{obj.lp}}</td> | |
| 379 | + <td> </td> | |
| 380 | + {{each lists as o j}} | |
| 381 | + <td>{{obj['dd'+(j+1)]}}</td> | |
| 382 | + <td>{{obj['cz'+(j+1)]}}</td> | |
| 383 | + <td>{{obj['kc'+(j+1)]}}</td> | |
| 384 | + {{/each}} | |
| 385 | + | |
| 386 | + | |
| 360 | 387 | {{/each}} |
| 361 | 388 | {{if list.length == 0}} |
| 362 | 389 | <tr> | ... | ... |
src/main/resources/static/pages/forms/statement/statisticsDaily .html
| 1 | -<style type="text/css"> | |
| 2 | - .table-bordered { | |
| 3 | - border: 1px solid; } | |
| 4 | - .table-bordered > thead > tr > th, | |
| 5 | - .table-bordered > thead > tr > td, | |
| 6 | - .table-bordered > tbody > tr > th, | |
| 7 | - .table-bordered > tbody > tr > td, | |
| 8 | - .table-bordered > tfoot > tr > th, | |
| 9 | - .table-bordered > tfoot > tr > td { | |
| 10 | - border: 1px solid; } | |
| 11 | - .table-bordered > thead > tr > th, | |
| 12 | - .table-bordered > thead > tr > td { | |
| 13 | - border-bottom-width: 2px; } | |
| 14 | - | |
| 15 | - .table > tbody + tbody { | |
| 16 | - border-top: 1px solid; } | |
| 17 | -</style> | |
| 18 | - | |
| 19 | -<div class="page-head"> | |
| 20 | - <div class="page-title"> | |
| 21 | - <h1>统计日报</h1> | |
| 22 | - </div> | |
| 23 | -</div> | |
| 24 | - | |
| 25 | -<div class="row"> | |
| 26 | - <div class="col-md-12"> | |
| 27 | - <div class="portlet light porttlet-fit bordered"> | |
| 28 | - <div class="portlet-title"> | |
| 29 | - <form class="form-inline" action=""> | |
| 30 | - <div style="display: inline-block;"> | |
| 31 | - <span class="item-label" style="width: 80px;">线路: </span> | |
| 32 | - <select class="form-control" name="line" id="line" style="width: 180px;"></select> | |
| 33 | - </div> | |
| 34 | - <div style="display: inline-block;margin-left: 15px;"> | |
| 35 | - <span class="item-label" style="width: 80px;">时间: </span> | |
| 36 | - <input class="form-control" type="text" id="date" style="width: 180px;"/> | |
| 37 | - </div> | |
| 38 | - <div class="form-group"> | |
| 39 | - <input class="btn btn-default" type="button" id="query" value="查询"/> | |
| 40 | -<!-- <input class="btn btn-default" type="button" id="export" value="导出"/> --> | |
| 41 | - </div> | |
| 42 | - </form> | |
| 43 | - </div> | |
| 44 | - <div class="portlet-body"> | |
| 45 | - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | |
| 46 | - <label>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> | |
| 47 | - <table class="table table-bordered table-hover table-checkable" id="forms"> | |
| 48 | - <thead> | |
| 49 | - <tr> | |
| 50 | - <th colspan="36">线路运营情况统计日报</th> | |
| 51 | - </tr> | |
| 52 | - <tr> | |
| 53 | - <td rowspan="3">路线别</td> | |
| 54 | - <td colspan="15">全日营运里程(公里)</td> | |
| 55 | - <td colspan="15">全日营运班次</td> | |
| 56 | - <td colspan="5">大间隔情况</td> | |
| 57 | - </tr> | |
| 58 | - <tr> | |
| 59 | - <td rowspan="2">计划</td> | |
| 60 | - <td rowspan="2">实驶</td> | |
| 61 | - <td rowspan="2">少驶</td> | |
| 62 | - <td colspan="11">少驶原因(公里)</td> | |
| 63 | - <td rowspan="2">临加公里</td> | |
| 64 | - <td colspan="3">计划班次</td> | |
| 65 | - <td colspan="3">实际班次</td> | |
| 66 | - <td colspan="3">临加班次</td> | |
| 67 | - <td colspan="3">放站班次</td> | |
| 68 | - <td colspan="3">调头班次</td> | |
| 69 | - <td colspan="3">发生次数</td> | |
| 70 | - <td rowspan="2">最大间隔时间(秒)</td> | |
| 71 | - <td rowspan="2">原因</td> | |
| 72 | - </tr> | |
| 73 | - <tr> | |
| 74 | - <td width="31px">路阻</td> | |
| 75 | - <td>吊慢</td> | |
| 76 | - <td>故障</td> | |
| 77 | - <td>纠纷</td> | |
| 78 | - <td>肇事</td> | |
| 79 | - <td>缺人</td> | |
| 80 | - <td>缺车</td> | |
| 81 | - <td>客稀</td> | |
| 82 | - <td>气候</td> | |
| 83 | - <td>援外</td> | |
| 84 | - <td>其他</td> | |
| 85 | - <td>全日</td> | |
| 86 | - <td>早高峰</td> | |
| 87 | - <td>晚高峰</td> | |
| 88 | - <td>全日</td> | |
| 89 | - <td>早高峰</td> | |
| 90 | - <td>晚高峰</td> | |
| 91 | - <td>全日</td> | |
| 92 | - <td>早高峰</td> | |
| 93 | - <td>晚高峰</td> | |
| 94 | - <td>全日</td> | |
| 95 | - <td>早高峰</td> | |
| 96 | - <td>晚高峰</td> | |
| 97 | - <td>全日</td> | |
| 98 | - <td>早高峰</td> | |
| 99 | - <td>晚高峰</td> | |
| 100 | - <td>全日</td> | |
| 101 | - <td>早高峰</td> | |
| 102 | - <td>晚高峰</td> | |
| 103 | - </tr> | |
| 104 | - </thead> | |
| 105 | - <tbody class="statisticsDaily"> | |
| 106 | - | |
| 107 | - </tbody> | |
| 108 | - <tr> | |
| 109 | - <td>合计</td> | |
| 110 | - <td> </td> | |
| 111 | - <td> </td> | |
| 112 | - <td> </td> | |
| 113 | - <td> </td> | |
| 114 | - <td> </td> | |
| 115 | - <td> </td> | |
| 116 | - <td> </td> | |
| 117 | - <td> </td> | |
| 118 | - <td> </td> | |
| 119 | - <td> </td> | |
| 120 | - <td> </td> | |
| 121 | - <td> </td> | |
| 122 | - <td> </td> | |
| 123 | - <td> </td> | |
| 124 | - <td> </td> | |
| 125 | - <td> </td> | |
| 126 | - <td> </td> | |
| 127 | - <td> </td> | |
| 128 | - <td> </td> | |
| 129 | - <td> </td> | |
| 130 | - <td> </td> | |
| 131 | - <td> </td> | |
| 132 | - <td> </td> | |
| 133 | - <td> </td> | |
| 134 | - <td> </td> | |
| 135 | - <td> </td> | |
| 136 | - <td> </td> | |
| 137 | - <td> </td> | |
| 138 | - <td> </td> | |
| 139 | - <td> </td> | |
| 140 | - <td> </td> | |
| 141 | - <td> </td> | |
| 142 | - <td> </td> | |
| 143 | - <td> </td> | |
| 144 | - <td> </td> | |
| 145 | - </tr> | |
| 146 | - <tr> | |
| 147 | - <td>运营情况摘录</td> | |
| 148 | - <td colspan="35"> </td> | |
| 149 | - </tr> | |
| 150 | - </table> | |
| 151 | - </div> | |
| 152 | - </div> | |
| 153 | - </div> | |
| 154 | - </div> | |
| 155 | -</div> | |
| 156 | - | |
| 157 | -<script> | |
| 158 | - $(function(){ | |
| 159 | - // 关闭左侧栏 | |
| 160 | - if (!$('body').hasClass('page-sidebar-closed')) | |
| 161 | - $('.menu-toggler.sidebar-toggler').click(); | |
| 162 | - | |
| 163 | - $("#date").datetimepicker({ | |
| 164 | - format : 'YYYY-MM-DD', | |
| 165 | - locale : 'zh-cn' | |
| 166 | - }); | |
| 167 | - $.get('/basic/lineCode2Name',function(result){ | |
| 168 | - var data=[]; | |
| 169 | - | |
| 170 | - for(var code in result){ | |
| 171 | - data.push({id: code, text: result[code]}); | |
| 172 | - } | |
| 173 | - console.log(data); | |
| 174 | - initPinYinSelect2('#line',data,''); | |
| 175 | - | |
| 176 | - }) | |
| 177 | - | |
| 178 | - | |
| 179 | - $("#query").on("click",function(){ | |
| 180 | - var line = $("#line").val(); | |
| 181 | - var xlName = $("#select2-line-container").html(); | |
| 182 | - var date = $("#date").val(); | |
| 183 | - $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName},function(result){ | |
| 184 | - // 把数据填充到模版中 | |
| 185 | - var tbodyHtml = template('statisticsDaily',{list:result}); | |
| 186 | - // 把渲染好的模版html文本追加到表格中 | |
| 187 | - $('#forms .statisticsDaily').html(tbodyHtml); | |
| 188 | - }); | |
| 189 | - }); | |
| 190 | - }); | |
| 191 | -</script> | |
| 192 | -<script type="text/html" id="statisticsDaily"> | |
| 193 | - {{each list as obj i}} | |
| 194 | - <tr> | |
| 195 | - <td>{{obj.xlName}}</td> | |
| 196 | - <td>{{obj.jhlc}}</td> | |
| 197 | - <td>{{obj.sjgl}}</td> | |
| 198 | - <td>{{obj.ssgl}}</td> | |
| 199 | - <td>{{obj.ssgl_lz}}</td> | |
| 200 | - <td>{{obj.ssgl_dm}}</td> | |
| 201 | - <td>{{obj.ssgl_gz}}</td> | |
| 202 | - <td>{{obj.ssgl_jf}}</td> | |
| 203 | - <td>{{obj.ssgl_zs}}</td> | |
| 204 | - <td>{{obj.ssgl_qr}}</td> | |
| 205 | - <td>{{obj.ssgl_qc}}</td> | |
| 206 | - <td>{{obj.ssgl_kx}}</td> | |
| 207 | - <td>{{obj.ssgl_qh}}</td> | |
| 208 | - <td>{{obj.ssgl_yw}}</td> | |
| 209 | - <td>{{obj.ssgl_other}}</td> | |
| 210 | - <td>{{obj.ljgl}}</td> | |
| 211 | - <td>{{obj.jhbc}}</td> | |
| 212 | - <td>{{obj.jhbc_m}}</td> | |
| 213 | - <td>{{obj.jhbc_a}}</td> | |
| 214 | - <td>{{obj.sjbc}}</td> | |
| 215 | - <td>{{obj.sjbc_m}}</td> | |
| 216 | - <td>{{obj.sjbc_a}}</td> | |
| 217 | - <td>{{obj.ljbc}}</td> | |
| 218 | - <td>{{obj.ljbc_m}}</td> | |
| 219 | - <td>{{obj.ljbc_a}}</td> | |
| 220 | - <td>{{obj.fzbc}}</td> | |
| 221 | - <td>{{obj.fzbc_m}}</td> | |
| 222 | - <td>{{obj.fzbc_a}}</td> | |
| 223 | - <td>{{obj.dtbc}}</td> | |
| 224 | - <td>{{obj.dtbc_m}}</td> | |
| 225 | - <td>{{obj.dtbc_a}}</td> | |
| 226 | - <td>{{obj.djg}}</td> | |
| 227 | - <td>{{obj.djg_m}}</td> | |
| 228 | - <td>{{obj.djg_a}}</td> | |
| 229 | - <td>{{obj.djg_time}}</td> | |
| 230 | - <td> </td> | |
| 231 | - </tr> | |
| 232 | - {{/each}} | |
| 233 | - {{if list.length == 0}} | |
| 234 | - <tr> | |
| 235 | - <td colspan="36"><h6 class="muted">没有找到相关数据</h6></td> | |
| 236 | - </tr> | |
| 237 | - {{/if}} | |
| 1 | +<style type="text/css"> | |
| 2 | + .table-bordered { | |
| 3 | + border: 1px solid; } | |
| 4 | + .table-bordered > thead > tr > th, | |
| 5 | + .table-bordered > thead > tr > td, | |
| 6 | + .table-bordered > tbody > tr > th, | |
| 7 | + .table-bordered > tbody > tr > td, | |
| 8 | + .table-bordered > tfoot > tr > th, | |
| 9 | + .table-bordered > tfoot > tr > td { | |
| 10 | + border: 1px solid; } | |
| 11 | + .table-bordered > thead > tr > th, | |
| 12 | + .table-bordered > thead > tr > td { | |
| 13 | + border-bottom-width: 2px; } | |
| 14 | + | |
| 15 | + .table > tbody + tbody { | |
| 16 | + border-top: 1px solid; } | |
| 17 | +</style> | |
| 18 | + | |
| 19 | +<div class="page-head"> | |
| 20 | + <div class="page-title"> | |
| 21 | + <h1>统计日报</h1> | |
| 22 | + </div> | |
| 23 | +</div> | |
| 24 | + | |
| 25 | +<div class="row"> | |
| 26 | + <div class="col-md-12"> | |
| 27 | + <div class="portlet light porttlet-fit bordered"> | |
| 28 | + <div class="portlet-title"> | |
| 29 | + <form class="form-inline" action=""> | |
| 30 | + <div style="display: inline-block;"> | |
| 31 | + <span class="item-label" style="width: 80px;">线路: </span> | |
| 32 | + <select class="form-control" name="line" id="line" style="width: 180px;"></select> | |
| 33 | + </div> | |
| 34 | + <div style="display: inline-block;margin-left: 15px;"> | |
| 35 | + <span class="item-label" style="width: 80px;">时间: </span> | |
| 36 | + <input class="form-control" type="text" id="date" style="width: 180px;"/> | |
| 37 | + </div> | |
| 38 | + <div class="form-group"> | |
| 39 | + <input class="btn btn-default" type="button" id="query" value="查询"/> | |
| 40 | +<!-- <input class="btn btn-default" type="button" id="export" value="导出"/> --> | |
| 41 | + </div> | |
| 42 | + </form> | |
| 43 | + </div> | |
| 44 | + <div class="portlet-body"> | |
| 45 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | |
| 46 | + <label>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> | |
| 47 | + <table class="table table-bordered table-hover table-checkable" id="forms"> | |
| 48 | + <thead> | |
| 49 | + <tr> | |
| 50 | + <th colspan="36">线路运营情况统计日报</th> | |
| 51 | + </tr> | |
| 52 | + <tr> | |
| 53 | + <td rowspan="3">路线别</td> | |
| 54 | + <td colspan="15">全日营运里程(公里)</td> | |
| 55 | + <td colspan="15">全日营运班次</td> | |
| 56 | + <td colspan="5">大间隔情况</td> | |
| 57 | + </tr> | |
| 58 | + <tr> | |
| 59 | + <td rowspan="2">计划</td> | |
| 60 | + <td rowspan="2">实驶</td> | |
| 61 | + <td rowspan="2">少驶</td> | |
| 62 | + <td colspan="11">少驶原因(公里)</td> | |
| 63 | + <td rowspan="2">临加公里</td> | |
| 64 | + <td colspan="3">计划班次</td> | |
| 65 | + <td colspan="3">实际班次</td> | |
| 66 | + <td colspan="3">临加班次</td> | |
| 67 | + <td colspan="3">放站班次</td> | |
| 68 | + <td colspan="3">调头班次</td> | |
| 69 | + <td colspan="3">发生次数</td> | |
| 70 | + <td rowspan="2">最大间隔时间(秒)</td> | |
| 71 | + <td rowspan="2">原因</td> | |
| 72 | + </tr> | |
| 73 | + <tr> | |
| 74 | + <td width="31px">路阻</td> | |
| 75 | + <td>吊慢</td> | |
| 76 | + <td>故障</td> | |
| 77 | + <td>纠纷</td> | |
| 78 | + <td>肇事</td> | |
| 79 | + <td>缺人</td> | |
| 80 | + <td>缺车</td> | |
| 81 | + <td>客稀</td> | |
| 82 | + <td>气候</td> | |
| 83 | + <td>援外</td> | |
| 84 | + <td>其他</td> | |
| 85 | + <td>全日</td> | |
| 86 | + <td>早高峰</td> | |
| 87 | + <td>晚高峰</td> | |
| 88 | + <td>全日</td> | |
| 89 | + <td>早高峰</td> | |
| 90 | + <td>晚高峰</td> | |
| 91 | + <td>全日</td> | |
| 92 | + <td>早高峰</td> | |
| 93 | + <td>晚高峰</td> | |
| 94 | + <td>全日</td> | |
| 95 | + <td>早高峰</td> | |
| 96 | + <td>晚高峰</td> | |
| 97 | + <td>全日</td> | |
| 98 | + <td>早高峰</td> | |
| 99 | + <td>晚高峰</td> | |
| 100 | + <td>全日</td> | |
| 101 | + <td>早高峰</td> | |
| 102 | + <td>晚高峰</td> | |
| 103 | + </tr> | |
| 104 | + </thead> | |
| 105 | + <tbody class="statisticsDaily"> | |
| 106 | + | |
| 107 | + </tbody> | |
| 108 | + <tr> | |
| 109 | + <td>合计</td> | |
| 110 | + <td> </td> | |
| 111 | + <td> </td> | |
| 112 | + <td> </td> | |
| 113 | + <td> </td> | |
| 114 | + <td> </td> | |
| 115 | + <td> </td> | |
| 116 | + <td> </td> | |
| 117 | + <td> </td> | |
| 118 | + <td> </td> | |
| 119 | + <td> </td> | |
| 120 | + <td> </td> | |
| 121 | + <td> </td> | |
| 122 | + <td> </td> | |
| 123 | + <td> </td> | |
| 124 | + <td> </td> | |
| 125 | + <td> </td> | |
| 126 | + <td> </td> | |
| 127 | + <td> </td> | |
| 128 | + <td> </td> | |
| 129 | + <td> </td> | |
| 130 | + <td> </td> | |
| 131 | + <td> </td> | |
| 132 | + <td> </td> | |
| 133 | + <td> </td> | |
| 134 | + <td> </td> | |
| 135 | + <td> </td> | |
| 136 | + <td> </td> | |
| 137 | + <td> </td> | |
| 138 | + <td> </td> | |
| 139 | + <td> </td> | |
| 140 | + <td> </td> | |
| 141 | + <td> </td> | |
| 142 | + <td> </td> | |
| 143 | + <td> </td> | |
| 144 | + <td> </td> | |
| 145 | + </tr> | |
| 146 | + <tr> | |
| 147 | + <td>运营情况摘录</td> | |
| 148 | + <td colspan="35"> </td> | |
| 149 | + </tr> | |
| 150 | + </table> | |
| 151 | + </div> | |
| 152 | + </div> | |
| 153 | + </div> | |
| 154 | + </div> | |
| 155 | +</div> | |
| 156 | + | |
| 157 | +<script> | |
| 158 | + $(function(){ | |
| 159 | + // 关闭左侧栏 | |
| 160 | + if (!$('body').hasClass('page-sidebar-closed')) | |
| 161 | + $('.menu-toggler.sidebar-toggler').click(); | |
| 162 | + | |
| 163 | + $("#date").datetimepicker({ | |
| 164 | + format : 'YYYY-MM-DD', | |
| 165 | + locale : 'zh-cn' | |
| 166 | + }); | |
| 167 | + $.get('/basic/lineCode2Name',function(result){ | |
| 168 | + var data=[]; | |
| 169 | + | |
| 170 | + for(var code in result){ | |
| 171 | + data.push({id: code, text: result[code]}); | |
| 172 | + } | |
| 173 | + console.log(data); | |
| 174 | + initPinYinSelect2('#line',data,''); | |
| 175 | + | |
| 176 | + }) | |
| 177 | + | |
| 178 | + | |
| 179 | + $("#query").on("click",function(){ | |
| 180 | + var line = $("#line").val(); | |
| 181 | + var xlName = $("#select2-line-container").html(); | |
| 182 | + var date = $("#date").val(); | |
| 183 | + $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName},function(result){ | |
| 184 | + // 把数据填充到模版中 | |
| 185 | + var tbodyHtml = template('statisticsDaily',{list:result}); | |
| 186 | + // 把渲染好的模版html文本追加到表格中 | |
| 187 | + $('#forms .statisticsDaily').html(tbodyHtml); | |
| 188 | + }); | |
| 189 | + }); | |
| 190 | + }); | |
| 191 | +</script> | |
| 192 | +<script type="text/html" id="statisticsDaily"> | |
| 193 | + {{each list as obj i}} | |
| 194 | + <tr> | |
| 195 | + <td>{{obj.xlName}}</td> | |
| 196 | + <td>{{obj.jhlc}}</td> | |
| 197 | + <td>{{obj.sjgl}}</td> | |
| 198 | + <td>{{obj.ssgl}}</td> | |
| 199 | + <td>{{obj.ssgl_lz}}</td> | |
| 200 | + <td>{{obj.ssgl_dm}}</td> | |
| 201 | + <td>{{obj.ssgl_gz}}</td> | |
| 202 | + <td>{{obj.ssgl_jf}}</td> | |
| 203 | + <td>{{obj.ssgl_zs}}</td> | |
| 204 | + <td>{{obj.ssgl_qr}}</td> | |
| 205 | + <td>{{obj.ssgl_qc}}</td> | |
| 206 | + <td>{{obj.ssgl_kx}}</td> | |
| 207 | + <td>{{obj.ssgl_qh}}</td> | |
| 208 | + <td>{{obj.ssgl_yw}}</td> | |
| 209 | + <td>{{obj.ssgl_other}}</td> | |
| 210 | + <td>{{obj.ljgl}}</td> | |
| 211 | + <td>{{obj.jhbc}}</td> | |
| 212 | + <td>{{obj.jhbc_m}}</td> | |
| 213 | + <td>{{obj.jhbc_a}}</td> | |
| 214 | + <td>{{obj.sjbc}}</td> | |
| 215 | + <td>{{obj.sjbc_m}}</td> | |
| 216 | + <td>{{obj.sjbc_a}}</td> | |
| 217 | + <td>{{obj.ljbc}}</td> | |
| 218 | + <td>{{obj.ljbc_m}}</td> | |
| 219 | + <td>{{obj.ljbc_a}}</td> | |
| 220 | + <td>{{obj.fzbc}}</td> | |
| 221 | + <td>{{obj.fzbc_m}}</td> | |
| 222 | + <td>{{obj.fzbc_a}}</td> | |
| 223 | + <td>{{obj.dtbc}}</td> | |
| 224 | + <td>{{obj.dtbc_m}}</td> | |
| 225 | + <td>{{obj.dtbc_a}}</td> | |
| 226 | + <td>{{obj.djg}}</td> | |
| 227 | + <td>{{obj.djg_m}}</td> | |
| 228 | + <td>{{obj.djg_a}}</td> | |
| 229 | + <td>{{obj.djg_time}}</td> | |
| 230 | + <td> </td> | |
| 231 | + </tr> | |
| 232 | + {{/each}} | |
| 233 | + {{if list.length == 0}} | |
| 234 | + <tr> | |
| 235 | + <td colspan="36"><h6 class="muted">没有找到相关数据</h6></td> | |
| 236 | + </tr> | |
| 237 | + {{/if}} | |
| 238 | 238 | </script> |
| 239 | 239 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/css/home.css
| ... | ... | @@ -58,7 +58,7 @@ |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | .home-gps-table { |
| 61 | - width: 560px; | |
| 61 | + width: 620px; | |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | .home-gps-table small { |
| ... | ... | @@ -66,7 +66,7 @@ |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | .home-gps-table dl dt:nth-of-type(1), .home-gps-table dl dd:nth-of-type(1) { |
| 69 | - width: 15%; | |
| 69 | + width: 14%; | |
| 70 | 70 | font-size: 14px; |
| 71 | 71 | } |
| 72 | 72 | |
| ... | ... | @@ -75,19 +75,19 @@ |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | .home-gps-table dl dt:nth-of-type(3), .home-gps-table dl dd:nth-of-type(3) { |
| 78 | - width: 10% | |
| 78 | + width: 8% | |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | .home-gps-table dl dt:nth-of-type(4), .home-gps-table dl dd:nth-of-type(4) { |
| 82 | - width: 10% | |
| 82 | + width: 9% | |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | .home-gps-table dl dt:nth-of-type(5), .home-gps-table dl dd:nth-of-type(5) { |
| 86 | - width: 19% | |
| 86 | + width: 17% | |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | .home-gps-table dl dt:nth-of-type(6), .home-gps-table dl dd:nth-of-type(6) { |
| 90 | - width: 18% | |
| 90 | + width: 17% | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | .home-gps-table dl dt:nth-of-type(7), .home-gps-table dl dd:nth-of-type(7) { |
| ... | ... | @@ -95,7 +95,7 @@ |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | .home-gps-table dl dt:nth-of-type(8), .home-gps-table dl dd:nth-of-type(8) { |
| 98 | - width: 9%; | |
| 98 | + width: 16%; | |
| 99 | 99 | border-right: 0; |
| 100 | 100 | } |
| 101 | 101 | ... | ... |
src/main/resources/static/real_control_v2/css/main.css
| ... | ... | @@ -643,4 +643,48 @@ li.map-panel{ |
| 643 | 643 | .station-list.down .station-item:hover{ |
| 644 | 644 | box-shadow: 0px 3px 6px 0 rgba(0, 0, 0, 0.2), 0px 1px 4px 0 rgba(0, 0, 0, 0.19); |
| 645 | 645 | background: #e95151; |
| 646 | +} | |
| 647 | + | |
| 648 | +.modal-dotted-hr{ | |
| 649 | + height: 1px;border: none;border-top: 1px dashed #d1d1d1;width: calc(100% + 40px);margin-left: -20px; | |
| 650 | +} | |
| 651 | + | |
| 652 | +#add-sub-task-range_turn-modal .main-sch-panel{ | |
| 653 | + height: 60px; | |
| 654 | + border: 1px solid #dddddd; | |
| 655 | + border-radius: 5px; | |
| 656 | + position: relative; | |
| 657 | + padding: 20px 0 0 8px; | |
| 658 | +} | |
| 659 | + | |
| 660 | +#add-sub-task-range_turn-modal .main-sch-panel:before{ | |
| 661 | + content: '主任务'; | |
| 662 | + position: absolute; | |
| 663 | + top: -10px; | |
| 664 | + left: 10px; | |
| 665 | + background: #fff; | |
| 666 | + padding: 0 4px; | |
| 667 | + font-size: 12px; | |
| 668 | + color: #adadad; | |
| 669 | +} | |
| 670 | + | |
| 671 | +.ct_row { | |
| 672 | + font-size: 0; | |
| 673 | +} | |
| 674 | + | |
| 675 | +.ct_row .ct_cell { | |
| 676 | + display: inline-block; | |
| 677 | + font-size: 13px; | |
| 678 | + white-space: nowrap; | |
| 679 | + overflow: hidden; | |
| 680 | + text-overflow: ellipsis; | |
| 681 | +} | |
| 682 | + | |
| 683 | +.ct_row .ct_cell label{ | |
| 684 | + color: #979393; | |
| 685 | + margin-right: 3px; | |
| 686 | +} | |
| 687 | + | |
| 688 | +.ct_row .ct_cell.c_1_3 { | |
| 689 | + width: 33%; | |
| 646 | 690 | } |
| 647 | 691 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/fcxxwt.html
| ... | ... | @@ -129,7 +129,7 @@ |
| 129 | 129 | </div> |
| 130 | 130 | </div> |
| 131 | 131 | |
| 132 | - <hr style="height: 1px;border: none;border-top: 1px dashed #d1d1d1;width: calc(100% + 40px);margin-left: -20px;"> | |
| 132 | + <hr class="modal-dotted-hr"> | |
| 133 | 133 | <div class="uk-grid"> |
| 134 | 134 | <div class="uk-width-1-2"> |
| 135 | 135 | <div class="uk-form-row"> | ... | ... |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lj_zrw.html
| ... | ... | @@ -330,6 +330,19 @@ |
| 330 | 330 | }, modal_opts); |
| 331 | 331 | }; |
| 332 | 332 | |
| 333 | + //区间掉头子任务 | |
| 334 | + var add_sub_task_range_turn = function () { | |
| 335 | + var sch = getActiveSch(); | |
| 336 | + if (!sch) | |
| 337 | + return notify_err('无法获取到主任务信息!'); | |
| 338 | + if(sch.bcType == 'out' || sch.bcType == 'in') | |
| 339 | + return notify_err('进出场班次不能做区间掉头!'); | |
| 340 | + | |
| 341 | + open_modal(folder + '/sub_task/add_sub_task_range_turn.html', { | |
| 342 | + sch: sch | |
| 343 | + }, modal_opts); | |
| 344 | + }; | |
| 345 | + | |
| 333 | 346 | //删除子任务 |
| 334 | 347 | var remove_sub_task = function () { |
| 335 | 348 | var activeDl = $(s_t_body, modal).find('dl.context-menu-active'); |
| ... | ... | @@ -358,7 +371,8 @@ |
| 358 | 371 | add_sub_task_other: add_sub_task_other, |
| 359 | 372 | add_sub_task_in: add_sub_task_in, |
| 360 | 373 | remove_sub_task: remove_sub_task, |
| 361 | - add_sub_task_out: add_sub_task_out | |
| 374 | + add_sub_task_out: add_sub_task_out, | |
| 375 | + add_sub_task_range_turn: add_sub_task_range_turn | |
| 362 | 376 | }; |
| 363 | 377 | |
| 364 | 378 | //右键菜单 |
| ... | ... | @@ -382,8 +396,7 @@ |
| 382 | 396 | name: '出场' |
| 383 | 397 | }, |
| 384 | 398 | 'add_sub_task_range_turn': { |
| 385 | - name: '区间掉头', | |
| 386 | - disabled: true | |
| 399 | + name: '区间掉头' | |
| 387 | 400 | }, |
| 388 | 401 | 'add_sub_task_other': { |
| 389 | 402 | name: '自定义' | ... | ... |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task/add_sub_task_range_turn.html
0 → 100644
| 1 | +<div class="uk-modal ct-form-modal" id="add-sub-task-range_turn-modal"> | |
| 2 | + <div class="uk-modal-dialog" style="width: 1200px;"> | |
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | |
| 4 | + <div class="uk-modal-header"> | |
| 5 | + <h2>区间掉头子任务</h2></div> | |
| 6 | + | |
| 7 | + <div style="width: 100%;padding-left: 1%;"> | |
| 8 | + <form class="uk-form uk-form-horizontal"> | |
| 9 | + <div class="uk-grid"> | |
| 10 | + <div class="uk-width-1-4"> | |
| 11 | + <div class="uk-form-row" style="margin-top: 20px;"> | |
| 12 | + <label class="uk-form-label">掉头站点</label> | |
| 13 | + <div class="uk-form-controls"> | |
| 14 | + <select id="turnStationSelect"> | |
| 15 | + <option value="">请选择...</option> | |
| 16 | + </select> | |
| 17 | + </div> | |
| 18 | + </div> | |
| 19 | + </div> | |
| 20 | + <div class="uk-width-1-4"> | |
| 21 | + <div class="uk-form-row" style="margin-top: 20px;"> | |
| 22 | + <label class="uk-form-label">掉头原因</label> | |
| 23 | + <div class="uk-form-controls"> | |
| 24 | + <select id="turnReason" style="width: calc(100% - 9px);"> | |
| 25 | + <option value="">请选择...</option> | |
| 26 | + </select> | |
| 27 | + </div> | |
| 28 | + </div> | |
| 29 | + </div> | |
| 30 | + <div class="uk-width-2-4" style="padding-left: 28px;"> | |
| 31 | + <h6 style="color: #a7a5a5;margin-top: 35px;"><i class="uk-icon-question-circle"> </i> | |
| 32 | + 如果“掉头站点”在另一个走向不存在,你需要手动选择第二个营运起点</h6> | |
| 33 | + </div> | |
| 34 | + </div> | |
| 35 | + </form> | |
| 36 | + </div> | |
| 37 | + <hr class="modal-dotted-hr"> | |
| 38 | + <div class="uk-grid"> | |
| 39 | + <div class="uk-width-1-2"> | |
| 40 | + <div class="main-sch-panel curr"></div> | |
| 41 | + | |
| 42 | + <div style="margin-top: 5px;"> | |
| 43 | + <div class="sub-task-card" style="margin: 0 0 0 7px;"> | |
| 44 | + <div class="uk-panel uk-panel-box uk-panel-box-primary" style="padding-bottom: 32px;"> | |
| 45 | + <div class="uk-panel-badge uk-badge">营运</div> | |
| 46 | + <h3 class="uk-panel-title">线路上站点间</h3> | |
| 47 | + | |
| 48 | + <form class="uk-form uk-form-horizontal" curr_service_form> | |
| 49 | + </form> | |
| 50 | + </div> | |
| 51 | + </div> | |
| 52 | + <div class="sub-task-card " style="margin: 0;"> | |
| 53 | + <div class="uk-panel uk-panel-box" style="padding-bottom: 32px;"> | |
| 54 | + <div class="uk-panel-badge uk-badge uk-badge-danger">烂班</div> | |
| 55 | + <h3 class="uk-panel-title">线路上站点间</h3> | |
| 56 | + <form class="uk-form uk-form-horizontal " curr_destroy_form> | |
| 57 | + </form> | |
| 58 | + </div> | |
| 59 | + </div> | |
| 60 | + </div> | |
| 61 | + </div> | |
| 62 | + <div class="uk-width-1-2"> | |
| 63 | + <div class="main-sch-panel next"></div> | |
| 64 | + | |
| 65 | + <div style="margin: 5px;"> | |
| 66 | + <div class="sub-task-card " style="margin: 0 0 0 7px;"> | |
| 67 | + <div class="uk-panel uk-panel-box" style="padding-bottom: 32px;"> | |
| 68 | + <div class="uk-panel-badge uk-badge uk-badge-danger">烂班</div> | |
| 69 | + <h3 class="uk-panel-title">线路上站点间</h3> | |
| 70 | + <form class="uk-form uk-form-horizontal " next_destroy_form></form> | |
| 71 | + </div> | |
| 72 | + </div> | |
| 73 | + <div class="sub-task-card" style="margin: 0;"> | |
| 74 | + <div class="uk-panel uk-panel-box uk-panel-box-primary" style="padding-bottom: 32px;"> | |
| 75 | + <div class="uk-panel-badge uk-badge">营运</div> | |
| 76 | + <h3 class="uk-panel-title">线路上站点间</h3> | |
| 77 | + | |
| 78 | + <form class="uk-form uk-form-horizontal" next_service_form> | |
| 79 | + </form> | |
| 80 | + </div> | |
| 81 | + </div> | |
| 82 | + </div> | |
| 83 | + </div> | |
| 84 | + </div> | |
| 85 | + | |
| 86 | + | |
| 87 | + <div class="uk-modal-footer uk-text-right"> | |
| 88 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 89 | + <button type="button" class="uk-button uk-button-primary" id="submitChildTaskBtn">提交子任务</button> | |
| 90 | + | |
| 91 | + <div class="ct-footer-left"> | |
| 92 | + <a id="betweenStationRangeCalc" data-drawer-id="station_route_spacing_chart_drawer">站点间公里不准?</a> | |
| 93 | + </div> | |
| 94 | + </div> | |
| 95 | + </div> | |
| 96 | + <!-- 主任务信息 --> | |
| 97 | + <script id="range_turn_main_sch-temp" type="text/html"> | |
| 98 | + <div class="ct_row"> | |
| 99 | + <div class="ct_cell c_1_3"> | |
| 100 | + <label>待发</label> | |
| 101 | + <span>{{dfsj}}</span> | |
| 102 | + </div> | |
| 103 | + <div class="ct_cell c_1_3"> | |
| 104 | + <label>计达</label> | |
| 105 | + <span>{{zdsj}}</span> | |
| 106 | + </div> | |
| 107 | + <div class="ct_cell c_1_3"> | |
| 108 | + <label>车辆</label> | |
| 109 | + <span>{{clZbh}}</span> | |
| 110 | + </div> | |
| 111 | + </div> | |
| 112 | + <div class="ct_row"> | |
| 113 | + <div class="ct_cell c_1_3"> | |
| 114 | + <label>起点</label> | |
| 115 | + <span>{{qdzName}}</span> | |
| 116 | + </div> | |
| 117 | + <div class="ct_cell c_1_3"> | |
| 118 | + <label>终点</label> | |
| 119 | + <span>{{zdzName}}</span> | |
| 120 | + </div> | |
| 121 | + <div class="ct_cell c_1_3"> | |
| 122 | + <label>里程</label> | |
| 123 | + <span>{{jhlc}}</span> | |
| 124 | + </div> | |
| 125 | + </div> | |
| 126 | + </script> | |
| 127 | + | |
| 128 | + <!-- 子任务营运表单 --> | |
| 129 | + <script id="range_turn_child_service-temp" type="text/html"> | |
| 130 | + <input type="hidden" name="schedule.id" value="{{sch.id}}"> | |
| 131 | + <input type="hidden" name="type2" value="1"> | |
| 132 | + <input type="hidden" value="正常" name="type1"> | |
| 133 | + <input type="hidden" name="mileageType" value="service"> | |
| 134 | + <div class="uk-grid"> | |
| 135 | + <div class="uk-width-3-10"> | |
| 136 | + <div class="uk-form-row"> | |
| 137 | + <label class="uk-form-label">起点 </label> | |
| 138 | + </div> | |
| 139 | + </div> | |
| 140 | + <div class="uk-width-7-10 pl5"> | |
| 141 | + <select name="startStation"> | |
| 142 | + {{each routes as r i}} | |
| 143 | + <option value="{{r.stationCode}}">{{r.stationName}}</option> | |
| 144 | + {{/each}} | |
| 145 | + </select> | |
| 146 | + </div> | |
| 147 | + </div> | |
| 148 | + <div class="uk-grid"> | |
| 149 | + <div class="uk-width-3-10"> | |
| 150 | + <div class="uk-form-row"> | |
| 151 | + <label class="uk-form-label">终点 </label> | |
| 152 | + </div> | |
| 153 | + </div> | |
| 154 | + <div class="uk-width-7-10 pl5"> | |
| 155 | + <select name="endStation" class="ct_focus" disabled> | |
| 156 | + {{each routes as r i}} | |
| 157 | + <option value="{{r.stationCode}}" {{if r.stationCode==sch.zdzCode}}selected{{/if}}> | |
| 158 | + {{r.stationName}} | |
| 159 | + </option> | |
| 160 | + {{/each}} | |
| 161 | + </select> | |
| 162 | + </div> | |
| 163 | + </div> | |
| 164 | + <div class="uk-grid"> | |
| 165 | + <div class="uk-width-3-10"> | |
| 166 | + <div class="uk-form-row"> | |
| 167 | + <label class="uk-form-label">营运里程</label> | |
| 168 | + </div> | |
| 169 | + </div> | |
| 170 | + <div class="uk-width-7-10 pl5"> | |
| 171 | + <input type="text" name="mileage" value="{{sch.jhlc}}" required> | |
| 172 | + </div> | |
| 173 | + </div> | |
| 174 | + <div class="uk-grid"> | |
| 175 | + <div class="uk-width-3-10"> | |
| 176 | + <div class="uk-form-row"> | |
| 177 | + <label class="uk-form-label">开始时间</label> | |
| 178 | + </div> | |
| 179 | + </div> | |
| 180 | + <div class="uk-width-7-10 pl5"> | |
| 181 | + <input type="time" name="startDate" value="{{sch.dfsj}}" required disabled> | |
| 182 | + </div> | |
| 183 | + </div> | |
| 184 | + <div class="uk-grid"> | |
| 185 | + <div class="uk-width-3-10"> | |
| 186 | + <div class="uk-form-row"> | |
| 187 | + <label class="uk-form-label">结束时间</label> | |
| 188 | + </div> | |
| 189 | + </div> | |
| 190 | + <div class="uk-width-7-10 pl5"> | |
| 191 | + <input type="time" name="endDate" value="{{sch.zdsj}}" required> | |
| 192 | + </div> | |
| 193 | + </div> | |
| 194 | + </script> | |
| 195 | + | |
| 196 | + <!-- 子任务烂班表单 --> | |
| 197 | + <script id="range_turn_child_destroy-temp" type="text/html"> | |
| 198 | + <input type="hidden" name="schedule.id" value="{{sch.id}}"> | |
| 199 | + <input type="hidden" value="正常" name="type1"> | |
| 200 | + <input type="hidden" value="1" name="type2"> | |
| 201 | + <input type="hidden" name="mileageType" value="service"> | |
| 202 | + <input type="hidden" name="destroy" value="true"> | |
| 203 | + <div class="uk-grid"> | |
| 204 | + <div class="uk-width-3-10"> | |
| 205 | + <div class="uk-form-row"> | |
| 206 | + <label class="uk-form-label">起点 </label> | |
| 207 | + </div> | |
| 208 | + </div> | |
| 209 | + <div class="uk-width-7-10 pl5"> | |
| 210 | + <select name="startStation" required disabled> | |
| 211 | + {{each routes as r i}} | |
| 212 | + <option value="{{r.stationCode}}">{{r.stationName}}</option> | |
| 213 | + {{/each}} | |
| 214 | + </select> | |
| 215 | + </div> | |
| 216 | + </div> | |
| 217 | + <div class="uk-grid"> | |
| 218 | + <div class="uk-width-3-10"> | |
| 219 | + <div class="uk-form-row"> | |
| 220 | + <label class="uk-form-label">终点 </label> | |
| 221 | + </div> | |
| 222 | + </div> | |
| 223 | + <div class="uk-width-7-10 pl5"> | |
| 224 | + <select name="endStation" required class="ct_focus"> | |
| 225 | + {{each routes as r i}} | |
| 226 | + <option value="{{r.stationCode}}" {{if r.stationCode==sch.zdzCode}}selected{{/if}}> | |
| 227 | + {{r.stationName}} | |
| 228 | + </option> | |
| 229 | + {{/each}} | |
| 230 | + </select> | |
| 231 | + </div> | |
| 232 | + </div> | |
| 233 | + <div class="uk-grid"> | |
| 234 | + <div class="uk-width-3-10"> | |
| 235 | + <div class="uk-form-row"> | |
| 236 | + <label class="uk-form-label">烂班里程</label> | |
| 237 | + </div> | |
| 238 | + </div> | |
| 239 | + <div class="uk-width-7-10 pl5"> | |
| 240 | + <input type="text" name="mileage" required> | |
| 241 | + </div> | |
| 242 | + </div> | |
| 243 | + <div class="uk-grid"> | |
| 244 | + <div class="uk-width-3-10"> | |
| 245 | + <div class="uk-form-row"> | |
| 246 | + <label class="uk-form-label">开始时间</label> | |
| 247 | + </div> | |
| 248 | + </div> | |
| 249 | + <div class="uk-width-7-10 pl5"> | |
| 250 | + <input type="time" name="startDate" required disabled> | |
| 251 | + </div> | |
| 252 | + </div> | |
| 253 | + <div class="uk-grid" style="height: 30px;"> | |
| 254 | + </div> | |
| 255 | + </script> | |
| 256 | + | |
| 257 | + <div class="ct-bottom-drawer"> | |
| 258 | + <div class="ct-bottom-drawer-body"></div> | |
| 259 | + </div> | |
| 260 | + | |
| 261 | + <script> | |
| 262 | + (function () { | |
| 263 | + var modal = '#add-sub-task-range_turn-modal', | |
| 264 | + sch, nextSch, stationRoutes, information, timeLocStations; | |
| 265 | + var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他']; | |
| 266 | + | |
| 267 | + var csf = $('form[curr_service_form]', modal); | |
| 268 | + var nsf = $('form[next_service_form]', modal); | |
| 269 | + var cdf = $('form[curr_destroy_form]', modal); | |
| 270 | + var ndf = $('form[next_destroy_form]', modal); | |
| 271 | + | |
| 272 | + //掉头站点 | |
| 273 | + var turnStation, turnStationName; | |
| 274 | + $(modal).on('init', function (e, data) { | |
| 275 | + sch = data.sch; | |
| 276 | + nextSch = gb_schedule_table.getNextSch(sch); | |
| 277 | + | |
| 278 | + //主任务信息 | |
| 279 | + $('.main-sch-panel.curr', modal).html(template('range_turn_main_sch-temp', sch)); | |
| 280 | + $('.main-sch-panel.next', modal).html(template('range_turn_main_sch-temp', nextSch)); | |
| 281 | + | |
| 282 | + //站点路由 | |
| 283 | + stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function (a, b) { | |
| 284 | + return a.stationRouteCode - b.stationRouteCode; | |
| 285 | + }), 'directions'); | |
| 286 | + | |
| 287 | + var currData = {sch: sch, routes: stationRoutes[sch.xlDir]} | |
| 288 | + , nextData = {sch: nextSch, routes: stationRoutes[nextSch.xlDir]}; | |
| 289 | + //营运1 | |
| 290 | + csf.html(template('range_turn_child_service-temp', currData)); | |
| 291 | + disabledField(csf, 'startStation'); | |
| 292 | + //营运结束时间 | |
| 293 | + $('[name=endDate]', csf).on('input', synchroDate); | |
| 294 | + | |
| 295 | + //营运2 | |
| 296 | + nsf.html(template('range_turn_child_service-temp', nextData)); | |
| 297 | + disabledField(nsf, 'endDate'); | |
| 298 | + //烂班1 | |
| 299 | + cdf.html(template('range_turn_child_destroy-temp', currData)); | |
| 300 | + disabledField(cdf, 'endStation'); | |
| 301 | + //烂班2 | |
| 302 | + ndf.html(template('range_turn_child_destroy-temp', nextData)); | |
| 303 | + $('[name=startStation]', ndf).val(nextSch.qdzCode); | |
| 304 | + //烂班2终点改变 | |
| 305 | + $('[name=endStation]', ndf).on('change', reCalcSecond); | |
| 306 | + //营运2起点改变 | |
| 307 | + $('[name=startStation]', nsf).on('change', reCalcSecond); | |
| 308 | + | |
| 309 | + //掉头站点 | |
| 310 | + var opts = ''; | |
| 311 | + $.each(currData.routes, function () { | |
| 312 | + opts += '<option value="' + this.stationCode + '">' + this.stationName + '</option>'; | |
| 313 | + }); | |
| 314 | + $('#turnStationSelect', modal).append(opts); | |
| 315 | + opts = ''; | |
| 316 | + $.each(adjustExps, function () { | |
| 317 | + opts += '<option value="' + this + '">' + this + '</option>'; | |
| 318 | + }); | |
| 319 | + //掉头原因 | |
| 320 | + $('#turnReason', modal).append(opts); | |
| 321 | + | |
| 322 | + //线路标准 | |
| 323 | + information = gb_data_basic.getLineInformation(sch.xlBm); | |
| 324 | + //本地存储的站点耗时 | |
| 325 | + getLocStationsSpace(); | |
| 326 | + | |
| 327 | + var dataArray = []; | |
| 328 | + var fs = $('.sub-task-card form', modal).formValidation({ | |
| 329 | + framework: 'uikit', | |
| 330 | + locale: 'zh_CN' | |
| 331 | + }); | |
| 332 | + fs.on('success.form.fv', function (e) { | |
| 333 | + e.preventDefault(); | |
| 334 | + dataArray.push($.extend($(this).serializeJSON(), getDisabledVal(this), | |
| 335 | + {remarks: $('#turnReason', modal).val(), destroyReason: $('#turnReason', modal).val()})); | |
| 336 | + $(this).data('valid', true); | |
| 337 | + | |
| 338 | + if (allValidSuccess()) { | |
| 339 | + var i = 0; | |
| 340 | + (function () { | |
| 341 | + var f = arguments.callee; | |
| 342 | + if (i >= dataArray.length) { | |
| 343 | + /** | |
| 344 | + * 为班次添加备注 | |
| 345 | + */ | |
| 346 | + var remarks = '掉头' + $('[name=endDate]', csf).val() + ' 因 ' + $('#turnReason', modal).val() + '在' + $('[name=endStation] option:selected', csf).text() + '掉头'; | |
| 347 | + gb_schedule_table.addRemarks([sch, nextSch], remarks); | |
| 348 | + UIkit.modal(modal).hide(); | |
| 349 | + $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: sch}); | |
| 350 | + return; | |
| 351 | + } | |
| 352 | + var data = dataArray[i]; | |
| 353 | + gb_common.$post('/childTask', data, function (rs) { | |
| 354 | + notify_succ('子任务添加成功'); | |
| 355 | + gb_schedule_table.updateSchedule(rs.t); | |
| 356 | + i++; | |
| 357 | + f(); | |
| 358 | + }); | |
| 359 | + })(); | |
| 360 | + } | |
| 361 | + }); | |
| 362 | + | |
| 363 | + //校验不过 | |
| 364 | + fs.on('err.field.fv', function () { | |
| 365 | + $('#submitChildTaskBtn', modal).removeClass('disabled').removeAttr('disabled'); | |
| 366 | + }); | |
| 367 | + | |
| 368 | + //submit | |
| 369 | + $('#submitChildTaskBtn', modal).on('click', function () { | |
| 370 | + if ($('#turnReason', modal).val() == '') { | |
| 371 | + return notify_err('你必须选择掉头原因!'); | |
| 372 | + } | |
| 373 | + | |
| 374 | + $(this).addClass('disabled').attr('disabled', 'disabled'); | |
| 375 | + dataArray = []; | |
| 376 | + fs.data('valid', false); | |
| 377 | + fs.formValidation('validate'); | |
| 378 | + }); | |
| 379 | + | |
| 380 | + //掉头站切换 | |
| 381 | + $('#turnStationSelect', modal).on('change', function () { | |
| 382 | + turnStation = $(this).val(); | |
| 383 | + turnStationName = $('option:selected', this).text(); | |
| 384 | + reClac(); | |
| 385 | + }); | |
| 386 | + }); | |
| 387 | + | |
| 388 | + function disabledField(f, itemName) { | |
| 389 | + $('[name=' + itemName + ']', f).attr('disabled', 'disabled'); | |
| 390 | + } | |
| 391 | + | |
| 392 | + function allValidSuccess() { | |
| 393 | + var flag = true; | |
| 394 | + $('.sub-task-card form:visible', modal).each(function (i, f) { | |
| 395 | + if (!$(f).data('valid')) { | |
| 396 | + flag = false; | |
| 397 | + return false; | |
| 398 | + } | |
| 399 | + }); | |
| 400 | + return flag; | |
| 401 | + } | |
| 402 | + | |
| 403 | + //获取表单disabled 项的值 | |
| 404 | + function getDisabledVal(f) { | |
| 405 | + var rs = {}; | |
| 406 | + $('input,select', f).each(function () { | |
| 407 | + if ($(this).attr('disabled')) { | |
| 408 | + rs[$(this).attr('name')] = $(this).val(); | |
| 409 | + } | |
| 410 | + }); | |
| 411 | + return rs; | |
| 412 | + } | |
| 413 | + | |
| 414 | + function reClac() { | |
| 415 | + if (!turnStation || turnStation == '') | |
| 416 | + return; | |
| 417 | + | |
| 418 | + var mileage, et, ets; | |
| 419 | + | |
| 420 | + $('#turnStationSelect', modal).val(turnStation); | |
| 421 | + //营运1终点 | |
| 422 | + $('[name=endStation]', csf).val(turnStation); | |
| 423 | + calcFormMileage(csf, sch.xlDir);//里程 | |
| 424 | + //结束时间 | |
| 425 | + ets = calcFirstEndDate(); | |
| 426 | + | |
| 427 | + //烂班1起点 | |
| 428 | + $('[name=startStation]', cdf).val(turnStation); | |
| 429 | + calcFormMileage(cdf, sch.xlDir); | |
| 430 | + //开始时间 | |
| 431 | + $('[name=startDate]', cdf).val(ets); | |
| 432 | + //烂班2终点 | |
| 433 | + try { | |
| 434 | + $('[name=endStation]', ndf).val(searchParallelStation()); | |
| 435 | + calcFormMileage(ndf, nextSch.xlDir); | |
| 436 | + } catch (e) { | |
| 437 | + } | |
| 438 | + //开始时间 | |
| 439 | + $('[name=startDate]', ndf).val(ets); | |
| 440 | + | |
| 441 | + //营运2起点 | |
| 442 | + try { | |
| 443 | + $('[name=startStation]', nsf).val(searchParallelStation()); | |
| 444 | + calcFormMileage(nsf, nextSch.xlDir); | |
| 445 | + } catch (e) { | |
| 446 | + } | |
| 447 | + //开始时间 | |
| 448 | + $('[name=startDate]', nsf).val(ets); | |
| 449 | + //结束时间 | |
| 450 | + calcSecondEndDate(); | |
| 451 | + } | |
| 452 | + | |
| 453 | + function calcFirstEndDate() { | |
| 454 | + var mileage = parseInt($('[name=mileage]', csf).val()); | |
| 455 | + var et = sch.dfsjT + (mileage / sch.jhlc * sch.bcsj * 60 * 1000); | |
| 456 | + var ets = et > sch.zdsjT ? sch.zdsj : moment(et).format('HH:mm'); | |
| 457 | + $('[name=endDate]', csf).val(ets); | |
| 458 | + return ets; | |
| 459 | + } | |
| 460 | + | |
| 461 | + function calcSecondEndDate() { | |
| 462 | + var mileage = parseInt($('[name=mileage]', nsf).val()); | |
| 463 | + var ets = moment($('[name=startDate]', nsf).val(), 'HH:mm') | |
| 464 | + .add(mileage / nextSch.jhlc * nextSch.bcsj * 60, 'seconds') | |
| 465 | + .format('HH:mm'); | |
| 466 | + $('[name=endDate]', nsf).val(ets); | |
| 467 | + return ets; | |
| 468 | + } | |
| 469 | + | |
| 470 | + //返回另一个走向对应的站点 | |
| 471 | + function searchParallelStation() { | |
| 472 | + var routes = stationRoutes[nextSch.xlDir] | |
| 473 | + , len = routes.length; | |
| 474 | + | |
| 475 | + for (var i = 0; i < len; i++) { | |
| 476 | + if (routes[i].stationName == turnStationName) | |
| 477 | + return routes[i].stationCode; | |
| 478 | + } | |
| 479 | + } | |
| 480 | + | |
| 481 | + //计算第二个班次 | |
| 482 | + function reCalcSecond() { | |
| 483 | + var code = $(this).val() | |
| 484 | + , updown = nextSch.xlDir; | |
| 485 | + | |
| 486 | + $('[name=endStation]', ndf).val(code); | |
| 487 | + calcFormMileage(ndf, updown); | |
| 488 | + | |
| 489 | + $('[name=startStation]', nsf).val(code); | |
| 490 | + calcFormMileage(nsf, updown); | |
| 491 | + //结束时间 | |
| 492 | + calcSecondEndDate(); | |
| 493 | + } | |
| 494 | + | |
| 495 | + //同步时间 | |
| 496 | + function synchroDate() { | |
| 497 | + var date = $(this).val(); | |
| 498 | + $('[name=startDate]', cdf).val(date); | |
| 499 | + $('[name=startDate]', ndf).val(date); | |
| 500 | + $('[name=startDate]', nsf).val(date); | |
| 501 | + calcSecondEndDate(); | |
| 502 | + } | |
| 503 | + | |
| 504 | + function calcFormMileage(f, updown) { | |
| 505 | + var s = $('[name=startStation]', f).val() | |
| 506 | + , e = $('[name=endStation]', f).val(); | |
| 507 | + | |
| 508 | + $('[name=mileage]', f).val(calcMileage(s, e, updown)); | |
| 509 | + } | |
| 510 | + | |
| 511 | + function calcMileage(s, e, updown) { | |
| 512 | + var mileage = 0, flag, code; | |
| 513 | + if (timeLocStations) { | |
| 514 | + //空间坐标计算的站距 | |
| 515 | + $.each(timeLocStations[updown == 0 ? 'up' : 'down'], function () { | |
| 516 | + code = this.station['STATION_CODE']; | |
| 517 | + if (flag) | |
| 518 | + mileage = gb_common.accAdd(mileage, this.toDistanceGl); | |
| 519 | + if (code == s) | |
| 520 | + flag = true; | |
| 521 | + if (code == e) | |
| 522 | + return false; | |
| 523 | + }); | |
| 524 | + } | |
| 525 | + else { | |
| 526 | + //从原始站点路由字段里取值 | |
| 527 | + $.each(stationRoutes[updown], function () { | |
| 528 | + code = this['stationCode']; | |
| 529 | + if (flag) | |
| 530 | + mileage = gb_common.accAdd(mileage, this.distances); | |
| 531 | + if (code == s) | |
| 532 | + flag = true; | |
| 533 | + if (code == e) | |
| 534 | + return false; | |
| 535 | + }); | |
| 536 | + } | |
| 537 | + return mileage; | |
| 538 | + } | |
| 539 | + | |
| 540 | + //从本地localStorage获取站间距数据 | |
| 541 | + function getLocStationsSpace() { | |
| 542 | + try { | |
| 543 | + timeLocStations = window.localStorage.getItem('control_route_distance_' + sch.xlBm); | |
| 544 | + if (timeLocStations) | |
| 545 | + timeLocStations = JSON.parse(timeLocStations).stations; | |
| 546 | + } catch (e) { | |
| 547 | + console.log(e); | |
| 548 | + } | |
| 549 | + } | |
| 550 | + | |
| 551 | + //站间距计算后刷新 | |
| 552 | + $(modal).on('refresh_station_space', function () { | |
| 553 | + getLocStationsSpace(); | |
| 554 | + reClac(); | |
| 555 | + }); | |
| 556 | + | |
| 557 | + //------ 下抽屉 ------ | |
| 558 | + $('#betweenStationRangeCalc', modal).on('click', function () { | |
| 559 | + var id = $(this).data('drawer-id'); | |
| 560 | + switchBtmDrawer(id, '/real_control_v2/fragments/line_schedule/context_menu/sub_task/station_route_spacing_chart.html'); | |
| 561 | + }); | |
| 562 | + | |
| 563 | + var btmDrawer = $('.ct-bottom-drawer', modal); | |
| 564 | + //打开事件 | |
| 565 | + btmDrawer.on('drawer_show', function () { | |
| 566 | + var url = $(this).data('url'); | |
| 567 | + if (!url) { | |
| 568 | + alert('无效的地址'); | |
| 569 | + } | |
| 570 | + | |
| 571 | + var drawerPanel = $(this).data('name'); | |
| 572 | + $('.ct-bottom-drawer-body', btmDrawer).load(url, function () { | |
| 573 | + $('#' + drawerPanel).trigger('drawer-init', {sch: sch}); | |
| 574 | + }); | |
| 575 | + }); | |
| 576 | + | |
| 577 | + function switchBtmDrawer(id, url) { | |
| 578 | + if (btmDrawer.hasClass('open') && btmDrawer.data('name') == id) { | |
| 579 | + btmDrawer.removeClass('open'); | |
| 580 | + btmDrawer.removeData('name').removeData('url'); | |
| 581 | + } | |
| 582 | + else { | |
| 583 | + btmDrawer.addClass('open'); | |
| 584 | + btmDrawer.data('name', id).data('url', url).trigger('drawer_show'); | |
| 585 | + } | |
| 586 | + } | |
| 587 | + })(); | |
| 588 | + </script> | |
| 589 | +</div> | |
| 0 | 590 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/js/home/line_panel.js
| ... | ... | @@ -31,7 +31,7 @@ var gb_home_line_panel = (function() { |
| 31 | 31 | |
| 32 | 32 | cb && cb(); |
| 33 | 33 | }); |
| 34 | - } | |
| 34 | + }; | |
| 35 | 35 | |
| 36 | 36 | var gps_refresh_event = function(addArr, upArr, upDownChange) { |
| 37 | 37 | //marker |
| ... | ... | @@ -94,7 +94,7 @@ var gb_home_line_panel = (function() { |
| 94 | 94 | if(t.sch){ |
| 95 | 95 | $(cells[5]).text(t.sch.zdzName); |
| 96 | 96 | $(cells[6]).text(t.sch.zdsj); |
| 97 | - $(cells[7]).text(t.sch.jName); | |
| 97 | + $(cells[7]).text(t.sch.jGh + '/' + t.sch.jName); | |
| 98 | 98 | } |
| 99 | 99 | }; |
| 100 | 100 | ... | ... |
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
| ... | ... | @@ -9,7 +9,7 @@ var gb_schedule_table = (function () { |
| 9 | 9 | var car_yfwf_map = {}; |
| 10 | 10 | var schedule_sort = function (s1, s2) { |
| 11 | 11 | return s1.dfsjT - s2.dfsjT; |
| 12 | - } | |
| 12 | + }; | |
| 13 | 13 | |
| 14 | 14 | var show = function (cb) { |
| 15 | 15 | //从服务器获取班次数据 |
| ... | ... | @@ -421,7 +421,7 @@ var gb_schedule_table = (function () { |
| 421 | 421 | dl.addClass('dl-last-sch'); |
| 422 | 422 | |
| 423 | 423 | $('dd.fcsjActualCell', dl).append(temps['last-sch-sunken-temp'](lastSch)); |
| 424 | - } | |
| 424 | + }; | |
| 425 | 425 | |
| 426 | 426 | //清除线路下指定班次的 末班标记 |
| 427 | 427 | var removeMarkers = function (lineCode, array) { |
| ... | ... | @@ -435,11 +435,47 @@ var gb_schedule_table = (function () { |
| 435 | 435 | $(this).removeClass('dl-last-sch').find('.last-sch-sunken').remove(); |
| 436 | 436 | } |
| 437 | 437 | }); |
| 438 | - } | |
| 438 | + }; | |
| 439 | 439 | |
| 440 | 440 | var schDestroyFilter = function (a) { |
| 441 | 441 | return a.status != -1; |
| 442 | - } | |
| 442 | + }; | |
| 443 | + | |
| 444 | + /* 下一个班次 */ | |
| 445 | + var getNextSch = function (sch) { | |
| 446 | + var array = gb_common.get_vals(line2Schedule[sch.xlBm]).filter(function (a) { | |
| 447 | + return a.clZbh == sch.clZbh; | |
| 448 | + }).sort(schedule_sort); | |
| 449 | + | |
| 450 | + for (var i = 0, item; item = array[i++];) { | |
| 451 | + if (array[i].id == sch.id) { | |
| 452 | + return i < array.length ? array[i + 1] : null; | |
| 453 | + } | |
| 454 | + } | |
| 455 | + }; | |
| 456 | + | |
| 457 | + /** 添加备注信息 */ | |
| 458 | + var addRemarks = function (list, remarks) { | |
| 459 | + //if(!list || list) | |
| 460 | + var i = 0, sch; | |
| 461 | + | |
| 462 | + (function () { | |
| 463 | + var f = arguments.callee; | |
| 464 | + if(i >= list.length){ | |
| 465 | + return; | |
| 466 | + } | |
| 467 | + sch = list[i]; | |
| 468 | + gb_common.$post('/realSchedule/addRemarks', {id: sch.id, remarks: remarks}, function (rs) { | |
| 469 | + if(rs.t){ | |
| 470 | + sch = rs.t; | |
| 471 | + line2Schedule[sch.xlBm][sch.id] = sch; | |
| 472 | + updateDom(sch); | |
| 473 | + i++; | |
| 474 | + f(); | |
| 475 | + } | |
| 476 | + }); | |
| 477 | + })(); | |
| 478 | + }; | |
| 443 | 479 | |
| 444 | 480 | return { |
| 445 | 481 | show: show, |
| ... | ... | @@ -454,6 +490,8 @@ var gb_schedule_table = (function () { |
| 454 | 490 | }, |
| 455 | 491 | scroToDl: scroToDl, |
| 456 | 492 | reset_drag_active_all: reset_drag_active_all, |
| 457 | - getDl: getDl | |
| 493 | + getDl: getDl, | |
| 494 | + getNextSch: getNextSch, | |
| 495 | + addRemarks: addRemarks | |
| 458 | 496 | }; |
| 459 | 497 | })(); | ... | ... |
src/main/resources/static/real_control_v2/js/main.js