Commit 427abca53d6f7d2ce25bf0d6668472a1cd0d956e

Authored by 潘钊
1 parent c59bbc6d

update

src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
@@ -439,5 +439,14 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, @@ -439,5 +439,14 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo,
439 public Map<String, Object> exportWaybillMore(@RequestParam Map<String, Object> map){ 439 public Map<String, Object> exportWaybillMore(@RequestParam Map<String, Object> map){
440 return scheduleRealInfoService.exportWaybillMore(map); 440 return scheduleRealInfoService.exportWaybillMore(map);
441 } 441 }
  442 +
  443 + /**
  444 + * 获取当日计划排班 , 从计划表抓取数据
  445 + * @return
  446 + */
  447 + @RequestMapping(value = "currentSchedulePlan", method = RequestMethod.GET)
  448 + public Map<String, Object> currentSchedulePlan(@RequestParam String lineCodes){
  449 + return scheduleRealInfoService.currentSchedulePlan(lineCodes);
  450 + }
442 451
443 } 452 }
src/main/java/com/bsth/data/gpsdata/arrival/handlers/InOutStationSignalHandle.java
@@ -195,7 +195,7 @@ public class InOutStationSignalHandle extends SignalHandle{ @@ -195,7 +195,7 @@ public class InOutStationSignalHandle extends SignalHandle{
195 //进站既进场 195 //进站既进场
196 inStationAndInPark(sch, next); 196 inStationAndInPark(sch, next);
197 //将gps转换为下一个班次走向的站内信号 197 //将gps转换为下一个班次走向的站内信号
198 - transformUpdown(gps, sch); 198 + transformUpdown(gps, next);
199 } 199 }
200 } 200 }
201 else if(sch.getFcsjActual() == null){ 201 else if(sch.getFcsjActual() == null){
@@ -217,6 +217,11 @@ public class InOutStationSignalHandle extends SignalHandle{ @@ -217,6 +217,11 @@ public class InOutStationSignalHandle extends SignalHandle{
217 217
218 sendUtils.refreshSch(next); 218 sendUtils.refreshSch(next);
219 dayOfSchedule.save(next); 219 dayOfSchedule.save(next);
  220 +
  221 + //分班的时候,需要再跳过1个班次
  222 + next = dayOfSchedule.next(next);
  223 + if(next != null)
  224 + dayOfSchedule.addExecPlan(next);
220 } 225 }
221 } 226 }
222 227
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
@@ -49,6 +49,9 @@ public class DayOfSchedule implements CommandLineRunner { @@ -49,6 +49,9 @@ public class DayOfSchedule implements CommandLineRunner {
49 49
50 Logger logger = LoggerFactory.getLogger(this.getClass()); 50 Logger logger = LoggerFactory.getLogger(this.getClass());
51 51
  52 + //按线路分组的 “计划” 排班数据
  53 + public static Map<String, List<SchedulePlanInfo>> schedulePlanMap;
  54 +
52 // 按车辆分组的班次数据 55 // 按车辆分组的班次数据
53 private static ArrayListMultimap<String, ScheduleRealInfo> nbbmScheduleMap; 56 private static ArrayListMultimap<String, ScheduleRealInfo> nbbmScheduleMap;
54 57
@@ -101,6 +104,8 @@ public class DayOfSchedule implements CommandLineRunner { @@ -101,6 +104,8 @@ public class DayOfSchedule implements CommandLineRunner {
101 currSchDateMap = new HashMap<>(); 104 currSchDateMap = new HashMap<>();
102 nbbm2SEStationMap = TreeMultimap.create(); 105 nbbm2SEStationMap = TreeMultimap.create();
103 carExecutePlanMap = new HashMap<>(); 106 carExecutePlanMap = new HashMap<>();
  107 +
  108 + schedulePlanMap = new HashMap<>();
104 } 109 }
105 110
106 @Autowired 111 @Autowired
@@ -328,6 +333,8 @@ public class DayOfSchedule implements CommandLineRunner { @@ -328,6 +333,8 @@ public class DayOfSchedule implements CommandLineRunner {
328 333
329 // 查询计划排班 334 // 查询计划排班
330 List<SchedulePlanInfo> planItr = cleanSchPlanItr(schPlanService.list(data).iterator()); 335 List<SchedulePlanInfo> planItr = cleanSchPlanItr(schPlanService.list(data).iterator());
  336 + //保存一份原始计划排班数据
  337 + schedulePlanMap.put(lineCode, planItr);
331 338
332 // 转换为实际排班 339 // 转换为实际排班
333 realList = JSONArray.parseArray(JSON.toJSONString(planItr), ScheduleRealInfo.class); 340 realList = JSONArray.parseArray(JSON.toJSONString(planItr), ScheduleRealInfo.class);
@@ -374,6 +381,7 @@ public class DayOfSchedule implements CommandLineRunner { @@ -374,6 +381,7 @@ public class DayOfSchedule implements CommandLineRunner {
374 } catch (Exception e) { 381 } catch (Exception e) {
375 logger.error("", e); 382 logger.error("", e);
376 } 383 }
  384 +
377 return realList; 385 return realList;
378 } 386 }
379 387
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
@@ -148,4 +148,6 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L @@ -148,4 +148,6 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
148 List<Map<String, Object>> scheduleDailyExport(Map<String, Object> map); 148 List<Map<String, Object>> scheduleDailyExport(Map<String, Object> map);
149 149
150 Map<String, Object> exportWaybillMore(Map<String, Object> map); 150 Map<String, Object> exportWaybillMore(Map<String, Object> map);
  151 +
  152 + Map<String,Object> currentSchedulePlan(String lineCodes);
151 } 153 }
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -34,6 +34,7 @@ import com.bsth.repository.realcontrol.SvgAttributeRepository; @@ -34,6 +34,7 @@ import com.bsth.repository.realcontrol.SvgAttributeRepository;
34 import com.bsth.repository.schedule.CarConfigInfoRepository; 34 import com.bsth.repository.schedule.CarConfigInfoRepository;
35 import com.bsth.repository.schedule.EmployeeConfigInfoRepository; 35 import com.bsth.repository.schedule.EmployeeConfigInfoRepository;
36 import com.bsth.repository.schedule.GuideboardInfoRepository; 36 import com.bsth.repository.schedule.GuideboardInfoRepository;
  37 +import com.bsth.repository.schedule.SchedulePlanRepository;
37 import com.bsth.security.util.SecurityUtils; 38 import com.bsth.security.util.SecurityUtils;
38 import com.bsth.service.SectionRouteService; 39 import com.bsth.service.SectionRouteService;
39 import com.bsth.service.impl.BaseServiceImpl; 40 import com.bsth.service.impl.BaseServiceImpl;
@@ -55,11 +56,7 @@ import org.slf4j.LoggerFactory; @@ -55,11 +56,7 @@ import org.slf4j.LoggerFactory;
55 import org.springframework.beans.factory.annotation.Autowired; 56 import org.springframework.beans.factory.annotation.Autowired;
56 import org.springframework.stereotype.Service; 57 import org.springframework.stereotype.Service;
57 58
58 -import java.io.BufferedInputStream;  
59 -import java.io.BufferedOutputStream;  
60 -import java.io.File;  
61 -import java.io.FileInputStream;  
62 -import java.io.FileOutputStream; 59 +import java.io.*;
63 import java.text.DecimalFormat; 60 import java.text.DecimalFormat;
64 import java.text.ParseException; 61 import java.text.ParseException;
65 import java.text.SimpleDateFormat; 62 import java.text.SimpleDateFormat;
@@ -3228,5 +3225,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3228,5 +3225,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3228 map.put("fileName", file.getName()); 3225 map.put("fileName", file.getName());
3229 return map; 3226 return map;
3230 } 3227 }
3231 - 3228 +
  3229 +
  3230 + @Autowired
  3231 + SchedulePlanRepository schedulePlanRepository;
  3232 +
  3233 + @Override
  3234 + public Map<String, Object> currentSchedulePlan(String lineCodes) {
  3235 + List<String> codes = Splitter.on(",").splitToList(lineCodes);
  3236 +
  3237 + //List<SchedulePlan> list = schedulePlanRepository.findByMultiLineCode(codes);
  3238 + //System.out.println(list);
  3239 + return null;
  3240 + }
3232 } 3241 }
3233 \ No newline at end of file 3242 \ No newline at end of file
src/main/resources/static/real_control_v2/electron/lineSelect.html
@@ -403,6 +403,14 @@ @@ -403,6 +403,14 @@
403 }); 403 });
404 })(); 404 })();
405 } 405 }
  406 +
  407 + $('#mnavbarIconBtnMIN').on('click', function () {
  408 + ipcMain.send('webPageSelectWindowMinimize');
  409 + });
  410 +
  411 + $('#mnavbarIconBtnCLOSE').on('click', function () {
  412 + ipcMain.send('webPageSelectWindowClose');
  413 + });
406 }(); 414 }();
407 </script> 415 </script>
408 </body> 416 </body>
src/main/resources/static/real_control_v2/fragments/north/nav/curr_date_schedule.html 0 → 100644
  1 +<div class="uk-modal" id="curr-date-schedule-modal">
  2 + <style>
  3 + .curr-schedule-table {
  4 + width: 1600px;
  5 + }
  6 +
  7 + .curr-schedule-table dl dt:nth-of-type(1), .curr-schedule-table dl dd:nth-of-type(1) {
  8 + width: 6%;
  9 + }
  10 +
  11 + .curr-schedule-table dl dt:nth-of-type(2), .curr-schedule-table dl dd:nth-of-type(2) {
  12 + width: 5%;
  13 + }
  14 +
  15 + .curr-schedule-table dl dt:nth-of-type(3), .curr-schedule-table dl dd:nth-of-type(3) {
  16 + width: 7%;
  17 + }
  18 +
  19 + .curr-schedule-table dl dt:nth-of-type(4), .curr-schedule-table dl dd:nth-of-type(4) {
  20 + width: 7%;
  21 + }
  22 +
  23 + .curr-schedule-table dl dt:nth-of-type(5), .curr-schedule-table dl dd:nth-of-type(5) {
  24 + width: 7%;
  25 + }
  26 +
  27 + .curr-schedule-table dl dt:nth-of-type(6), .curr-schedule-table dl dd:nth-of-type(6) {
  28 + width: 7%;
  29 + }
  30 +
  31 + .curr-schedule-table dl dt:nth-of-type(7), .curr-schedule-table dl dd:nth-of-type(7) {
  32 + width: 5%;
  33 + }
  34 +
  35 + .curr-schedule-table dl dt:nth-of-type(8), .curr-schedule-table dl dd:nth-of-type(8) {
  36 + width: 5%;
  37 + }
  38 +
  39 + .curr-schedule-table dl dt:nth-of-type(9), .curr-schedule-table dl dd:nth-of-type(9) {
  40 + width: 5%;
  41 + }
  42 +
  43 + .curr-schedule-table dl dt:nth-of-type(10), .curr-schedule-table dl dd:nth-of-type(10) {
  44 + width: 5%;
  45 + }
  46 +
  47 + .curr-schedule-table dl dt:nth-of-type(11), .curr-schedule-table dl dd:nth-of-type(11) {
  48 + width: 5%;
  49 + }
  50 +
  51 + .curr-schedule-table dl dt:nth-of-type(12), .curr-schedule-table dl dd:nth-of-type(12) {
  52 + width: 5%;
  53 + }
  54 +
  55 + .curr-schedule-table dl dt:nth-of-type(13), .curr-schedule-table dl dd:nth-of-type(13) {
  56 + width: 5%;
  57 + }
  58 +
  59 + .curr-schedule-table dl dt:nth-of-type(14), .curr-schedule-table dl dd:nth-of-type(14) {
  60 + width: 5%;
  61 + }
  62 +
  63 + .curr-schedule-table dl dt:nth-of-type(15), .curr-schedule-table dl dd:nth-of-type(15) {
  64 + width: 5%;
  65 + }
  66 +
  67 + .curr-schedule-table dl dt:nth-of-type(16), .curr-schedule-table dl dd:nth-of-type(16) {
  68 + width: 5%;
  69 + }
  70 +
  71 + .curr-schedule-table dl dt:nth-of-type(17), .curr-schedule-table dl dd:nth-of-type(17) {
  72 + width: 5%;
  73 + }
  74 +
  75 + .curr-schedule-table dl dt:nth-of-type(18), .curr-schedule-table dl dd:nth-of-type(18) {
  76 + width: 5%;
  77 + }
  78 + </style>
  79 +
  80 + <div class="uk-modal-dialog uk-modal-dialog-large">
  81 + <a href="" class="uk-modal-close uk-close"></a>
  82 + <div class="uk-modal-header">
  83 + <h2>当日计划排班</h2></div>
  84 +
  85 + <div class="uk-grid uk-grid-collapse">
  86 + <div class="uk-width-medium-1-10">
  87 + <ul class="uk-list uk-list-line uk-width-medium-1-1">
  88 + <li>219路</li>
  89 + <li>784路</li>
  90 + <li>166路</li>
  91 + </ul>
  92 + </div>
  93 + <div class="uk-width-medium-9-10">
  94 + <div class="ct_table_wrap">
  95 + <div class="ct_table curr-schedule-table">
  96 + <div class="ct_table_head">
  97 + <dl>
  98 + <dt>日期</dt>
  99 + <dt>线路ID</dt>
  100 + <dt>路牌名</dt>
  101 + <dt>车辆编号</dt>
  102 + <dt>车牌号码</dt>
  103 + <dt>日车辆营运状态</dt>
  104 + <dt>驾工号1</dt>
  105 + <dt>驾驶员1</dt>
  106 + <dt>售工号1</dt>
  107 + <dt>售票员1</dt>
  108 + <dt>驾工号2</dt>
  109 + <dt>驾驶员2</dt>
  110 + <dt>售工号2</dt>
  111 + <dt>售票员2</dt>
  112 + <dt>驾工号3</dt>
  113 + <dt>驾驶员3</dt>
  114 + <dt>售工号3</dt>
  115 + <dt>售票员3</dt>
  116 + </dl>
  117 + </div>
  118 + <div class="ct_table_body">
  119 +
  120 + </div>
  121 + </div>
  122 + </div>
  123 + </div>
  124 + </div>
  125 + </div>
  126 +
  127 +
  128 + <script>
  129 + (function () {
  130 + var modal = '#curr-date-schedule-modal';
  131 +
  132 + $(modal).on('init', function (e, data) {
  133 + e.stopPropagation();
  134 +
  135 +
  136 + });
  137 +
  138 +
  139 + var query = function () {
  140 +
  141 + };
  142 + })();
  143 + </script>
  144 +</div>
src/main/resources/static/real_control_v2/fragments/north/toolbar.html
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 <a>{{obj.text}} <i class="uk-icon-caret-down"></i></a> 11 <a>{{obj.text}} <i class="uk-icon-caret-down"></i></a>
12 {{if obj.children != null}} 12 {{if obj.children != null}}
13 <div class="uk-dropdown uk-dropdown-navbar uk-dropdown-bottom" style="top: 40px; left: 0px;"> 13 <div class="uk-dropdown uk-dropdown-navbar uk-dropdown-bottom" style="top: 40px; left: 0px;">
14 - <ul class="uk-nav uk-nav-navbar"> 14 + <ul class="uk-nav uk-nav-navbar uk-dropdown-close">
15 {{each obj.children as c j}} 15 {{each obj.children as c j}}
16 {{if c.header}} 16 {{if c.header}}
17 <li class="uk-nav-header">{{c.text}}</li> 17 <li class="uk-nav-header">{{c.text}}</li>
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 <div class="uk-grid uk-dropdown-grid"> 29 <div class="uk-grid uk-dropdown-grid">
30 {{each obj.grid as cls s}} 30 {{each obj.grid as cls s}}
31 <div class="{{obj.cls_class}}"> 31 <div class="{{obj.cls_class}}">
32 - <ul class="uk-nav uk-nav-dropdown uk-panel"> 32 + <ul class="uk-nav uk-nav-dropdown uk-panel uk-dropdown-close">
33 {{each cls as c z}} 33 {{each cls as c z}}
34 {{if c.header}} 34 {{if c.header}}
35 <li class="uk-nav-header">{{c.text}}</li> 35 <li class="uk-nav-header">{{c.text}}</li>
@@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
76 <a>{{obj.text}} <i class="uk-icon-caret-down"></i></a> 76 <a>{{obj.text}} <i class="uk-icon-caret-down"></i></a>
77 {{if obj.children != null}} 77 {{if obj.children != null}}
78 <div class="uk-dropdown uk-dropdown-navbar uk-dropdown-bottom" style="top: 40px; left: 0px;"> 78 <div class="uk-dropdown uk-dropdown-navbar uk-dropdown-bottom" style="top: 40px; left: 0px;">
79 - <ul class="uk-nav uk-nav-navbar"> 79 + <ul class="uk-nav uk-nav-navbar uk-dropdown-close">
80 {{each obj.children as c j}} 80 {{each obj.children as c j}}
81 {{if c.header}} 81 {{if c.header}}
82 <li class="uk-nav-header">{{c.text}}</li> 82 <li class="uk-nav-header">{{c.text}}</li>
@@ -94,7 +94,7 @@ @@ -94,7 +94,7 @@
94 <div class="uk-grid uk-dropdown-grid"> 94 <div class="uk-grid uk-dropdown-grid">
95 {{each obj.grid as cls s}} 95 {{each obj.grid as cls s}}
96 <div class="{{obj.cls_class}}"> 96 <div class="{{obj.cls_class}}">
97 - <ul class="uk-nav uk-nav-dropdown uk-panel"> 97 + <ul class="uk-nav uk-nav-dropdown uk-panel uk-dropdown-close">
98 {{each cls as c z}} 98 {{each cls as c z}}
99 {{if c.header}} 99 {{if c.header}}
100 <li class="uk-nav-header">{{c.text}}</li> 100 <li class="uk-nav-header">{{c.text}}</li>
src/main/resources/static/real_control_v2/js/data/json/north_toolbar.json
@@ -13,14 +13,14 @@ @@ -13,14 +13,14 @@
13 "header": 1 13 "header": 1
14 }, 14 },
15 { 15 {
16 - "id": 1.2,  
17 - "text": "历史班次维护",  
18 - "event": "history_sch_maintain"  
19 - },  
20 - {  
21 "id": 1.3, 16 "id": 1.3,
22 "text": "缓存数据管理", 17 "text": "缓存数据管理",
23 "event": "cache_data_manage" 18 "event": "cache_data_manage"
  19 + },
  20 + {
  21 + "id": 1.4,
  22 + "text": "历史班次维护",
  23 + "event": "history_sch_maintain"
24 } 24 }
25 ], 25 ],
26 [ 26 [
@@ -52,10 +52,6 @@ @@ -52,10 +52,6 @@
52 "icon": "uk-icon-pie-chart" 52 "icon": "uk-icon-pie-chart"
53 }, 53 },
54 { 54 {
55 - "id": 2.6,  
56 - "divider": true  
57 - },  
58 - {  
59 "id": 2.7, 55 "id": 2.7,
60 "text": "班次执行率", 56 "text": "班次执行率",
61 "event": "sch_exec_rate", 57 "event": "sch_exec_rate",
src/main/resources/static/real_control_v2/js/north/toolbar.js
@@ -176,6 +176,9 @@ var gb_northToolbar = (function () { @@ -176,6 +176,9 @@ var gb_northToolbar = (function () {
176 }, 176 },
177 form_allline: function () { 177 form_allline: function () {
178 gb_embed_form_hanlde.open_modal_form_fragment('/pages/mforms/alllines/allline.html', '营运线路名称统计表'); 178 gb_embed_form_hanlde.open_modal_form_fragment('/pages/mforms/alllines/allline.html', '营运线路名称统计表');
  179 + },
  180 + curr_date_schedule: function () {
  181 + open_modal('/real_control_v2/fragments/north/nav/curr_date_schedule.html', {}, modal_opts);
179 } 182 }
180 }; 183 };
181 184
src/main/resources/static/real_control_v2/mapmonitor/css/real.css
@@ -454,8 +454,8 @@ input[type=checkbox].disabled{ @@ -454,8 +454,8 @@ input[type=checkbox].disabled{
454 } 454 }
455 455
456 #playback_run_body{ 456 #playback_run_body{
457 - height: 680px;  
458 - max-height: 780px; 457 + height: 690px;
  458 + /*max-height: 780px;*/
459 } 459 }
460 460
461 #playback_run_body .pb_footer_tools{ 461 #playback_run_body .pb_footer_tools{
@@ -470,7 +470,7 @@ input[type=checkbox].disabled{ @@ -470,7 +470,7 @@ input[type=checkbox].disabled{
470 } 470 }
471 471
472 #playback_run_body .pb_footer_tools .uk-progress{ 472 #playback_run_body .pb_footer_tools .uk-progress{
473 - width: 75%; 473 + width: 73%;
474 margin: 25px 15px 0 1%; 474 margin: 25px 15px 0 1%;
475 cursor: pointer; 475 cursor: pointer;
476 } 476 }
@@ -482,7 +482,7 @@ input[type=checkbox].disabled{ @@ -482,7 +482,7 @@ input[type=checkbox].disabled{
482 .pb_tools_icon{ 482 .pb_tools_icon{
483 vertical-align: top; 483 vertical-align: top;
484 font-size: 32px; 484 font-size: 32px;
485 - margin: 15px 5px 0 5px; 485 + margin: 15px 3px 0 3px;
486 } 486 }
487 487
488 .pb_tools_icon i{ 488 .pb_tools_icon i{
@@ -492,12 +492,35 @@ input[type=checkbox].disabled{ @@ -492,12 +492,35 @@ input[type=checkbox].disabled{
492 .pb_log_panel{ 492 .pb_log_panel{
493 animation-delay: .1s; 493 animation-delay: .1s;
494 position: absolute; 494 position: absolute;
495 - width: 300px;  
496 - height: 600px; 495 + width: 315px;
  496 + height: 310px;
497 background: white; 497 background: white;
498 - right: 0;  
499 - bottom: 80px;  
500 - box-shadow: 1px 0px 5px 0 rgba(0,0,0,0.16), -1px 0px 10px 0 rgba(0,0,0,0.12); 498 + left: 10px;
  499 + top: 60px;
  500 + box-shadow: 1px 0px 5px 0 rgba(3, 169, 244, 0.4), -1px 0px 10px 0 rgba(3, 169, 244, 0.4);
  501 + overflow-x: hidden;
  502 + border: 1px solid #03A9F4;
  503 + border-radius: 0 0 5px 5px;
  504 +}
  505 +
  506 +.pb_log_panel .ct_table_body dl:nth-of-type(odd),
  507 +.pb_inout_station_panel .ct_table_body dl:nth-of-type(odd){
  508 + background: #fafafa;
  509 +}
  510 +
  511 +
  512 +.pb_inout_station_panel{
  513 + animation-delay: .1s;
  514 + position: absolute;
  515 + width: 315px;
  516 + height: 310px;
  517 + background: white;
  518 + left: 10px;
  519 + top: 380px;
  520 + box-shadow: 1px 0px 5px 0 rgba(3, 169, 244, 0.4), -1px 0px 10px 0 rgba(3, 169, 244, 0.4);
  521 + overflow-x: hidden;
  522 + border: 1px solid #03A9F4;
  523 + border-radius: 0 0 5px 5px;
501 } 524 }
502 525
503 #playback_run_body .map_wrap{ 526 #playback_run_body .map_wrap{
@@ -514,12 +537,22 @@ input[type=checkbox].disabled{ @@ -514,12 +537,22 @@ input[type=checkbox].disabled{
514 width: 14%; 537 width: 14%;
515 } 538 }
516 .pb_log_panel .ct_table dl dt:nth-of-type(3), .pb_log_panel .ct_table dl dd:nth-of-type(3) { 539 .pb_log_panel .ct_table dl dt:nth-of-type(3), .pb_log_panel .ct_table dl dd:nth-of-type(3) {
517 - width: 44%; 540 + width: 45%;
518 } 541 }
519 .pb_log_panel .ct_table dl dt:nth-of-type(4), .pb_log_panel .ct_table dl dd:nth-of-type(4) { 542 .pb_log_panel .ct_table dl dt:nth-of-type(4), .pb_log_panel .ct_table dl dd:nth-of-type(4) {
520 width: 16%; 543 width: 16%;
521 } 544 }
522 545
  546 +.pb_inout_station_panel .ct_table dl dt:nth-of-type(1), .pb_inout_station_panel .ct_table dl dd:nth-of-type(1) {
  547 + width: 24%;
  548 +}
  549 +.pb_inout_station_panel .ct_table dl dt:nth-of-type(2), .pb_inout_station_panel .ct_table dl dd:nth-of-type(2) {
  550 + width: 60%;
  551 +}
  552 +.pb_inout_station_panel .ct_table dl dt:nth-of-type(3), .pb_inout_station_panel .ct_table dl dd:nth-of-type(3) {
  553 + width: 15%;
  554 +}
  555 +
523 .pb_log_panel .ct_table .ct_table_body dl:last-child dd{ 556 .pb_log_panel .ct_table .ct_table_body dl:last-child dd{
524 border-bottom: 1px solid #dedede; 557 border-bottom: 1px solid #dedede;
525 } 558 }
@@ -597,4 +630,17 @@ input[type=checkbox].disabled{ @@ -597,4 +630,17 @@ input[type=checkbox].disabled{
597 630
598 .uk-nav-autocomplete>li.uk-active>a .desc{ 631 .uk-nav-autocomplete>li.uk-active>a .desc{
599 color: #fff; 632 color: #fff;
  633 +}
  634 +
  635 +.uk-button.play-btn{
  636 + width:70px;
  637 + border: 1px solid #2196F3;
  638 + color: #2196F3;
  639 + background: #fff;
  640 + transition: all .3s ease;
  641 +}
  642 +
  643 +.uk-button.play-btn[data-type=pause]{
  644 + color: #ff3c3c;
  645 + border: 1px solid #ff3c3c;
600 } 646 }
601 \ No newline at end of file 647 \ No newline at end of file
src/main/resources/static/real_control_v2/mapmonitor/fragments/playback/before_form.html
@@ -74,13 +74,6 @@ @@ -74,13 +74,6 @@
74 $('[name=eTime]', this).val(m.format('HH:mm')); 74 $('[name=eTime]', this).val(m.format('HH:mm'));
75 $('[name=sDate]', this).val(m.subtract(2, 'hour').format(rq)); 75 $('[name=sDate]', this).val(m.subtract(2, 'hour').format(rq));
76 $('[name=sTime]', this).val(m.format(sj)); 76 $('[name=sTime]', this).val(m.format(sj));
77 -  
78 -/* //test  
79 - $('[name=nbbm]', this).val('W9H-003');  
80 - $('[name=eDate]', this).val('2016-12-10');  
81 - $('[name=eTime]', this).val('09:00');  
82 - $('[name=sDate]', this).val('2016-12-10');  
83 - $('[name=sTime]', this).val('07:00');*/  
84 }); 77 });
85 78
86 var ONE_DAY = 1000 * 60 * 60 * 24; 79 var ONE_DAY = 1000 * 60 * 60 * 24;
src/main/resources/static/real_control_v2/mapmonitor/fragments/playback/run.html
1 <div id="playback_run_body"> 1 <div id="playback_run_body">
2 <div class="map_wrap"></div> 2 <div class="map_wrap"></div>
3 <!-- 日志输出 --> 3 <!-- 日志输出 -->
4 - <div class="pb_log_panel uk-animation-slide-right" style="overflow: auto;"> 4 + <div class="pb_log_panel uk-animation-slide-left" style="overflow-y: auto;">
5 <div class="ct_table" style="height: calc(100% - 30px);"> 5 <div class="ct_table" style="height: calc(100% - 30px);">
6 <div class="ct_table_head"> 6 <div class="ct_table_head">
7 <dl> 7 <dl>
@@ -15,7 +15,22 @@ @@ -15,7 +15,22 @@
15 </div> 15 </div>
16 </div> 16 </div>
17 </div> 17 </div>
18 - <div class="pb_footer_tools uk-animation-slide-bottom" onselectstart="return false;" style="-moz-user-select:none;"> 18 +
  19 + <!-- 进出站输出 -->
  20 + <div class="pb_inout_station_panel uk-animation-slide-left" style="overflow-y: auto;">
  21 + <div class="ct_table" style="height: calc(100% - 30px);">
  22 + <div class="ct_table_head">
  23 + <dl>
  24 + <dt>时间</dt>
  25 + <dt>站点</dt>
  26 + <dt>动作</dt>
  27 + </dl>
  28 + </div>
  29 + <div class="ct_table_body">
  30 + </div>
  31 + </div>
  32 + </div>
  33 + <div class="pb_footer_tools uk-animation-slide-bottom" onselectstart="return false;" style="-moz-user-select:none;">
19 <span class="ui-slider-tip">08:30.50</span> 34 <span class="ui-slider-tip">08:30.50</span>
20 <div class="uk-progress uk-progress-small uk-progress-success uk-progress-striped"> 35 <div class="uk-progress uk-progress-small uk-progress-success uk-progress-striped">
21 <div class="uk-progress-bar" style="width: 0;"></div> 36 <div class="uk-progress-bar" style="width: 0;"></div>
@@ -23,38 +38,44 @@ @@ -23,38 +38,44 @@
23 38
24 <div class="pb_tools_icon"> 39 <div class="pb_tools_icon">
25 <div class="uk-button-group"> 40 <div class="uk-button-group">
26 - <a class="uk-button" data-uk-tooltip title="快退" data-type="rewind"><i class="uk-icon-fast-backward"></i></a>  
27 - <a class="uk-button" data-uk-tooltip title="停止" data-type="stop"><i class="uk-icon-stop"></i></a>  
28 - <a class="uk-button play-btn" data-type="play"><i class="uk-icon-play"></i></a>  
29 - <a class="uk-button" data-uk-tooltip title="快进" data-type="fast_forward"><i class="uk-icon-fast-forward"></i></a> 41 + <a class="uk-button play-btn" data-type="play"><i class="uk-icon-play"></i> <span class="text">播放</span></a>
30 </div> 42 </div>
31 </div> 43 </div>
32 44
33 <div class="pb_tools_icon"> 45 <div class="pb_tools_icon">
34 <div class="uk-button-dropdown" data-uk-dropdown="{mode:'hover', pos:'top-left'}"> 46 <div class="uk-button-dropdown" data-uk-dropdown="{mode:'hover', pos:'top-left'}">
35 - <button class="uk-button"><i class="uk-icon-cog"> </i> 工具 <i class="uk-icon-caret-down"></i></button>  
36 - <div class="uk-dropdown uk-dropdown-bottom uk-dropdown-small" style="top: 30px; left: 0px;">  
37 - <ul class="uk-nav uk-nav-dropdown pb_dropdown_tool">  
38 - <!--<li><a>显示站点</a></li>  
39 - <li><a>显示电子围栏</a></li>  
40 - <li class="uk-nav-divider"></li>  
41 - <li><a>关闭日志输出</a></li>  
42 - <li class="uk-nav-divider"></li>-->  
43 - <li><a data-name="exportExcel" href="javascript:;" >导出轨迹</a></li> 47 + <button class="uk-button" id="speedIconBtn"><i class="uk-icon-close"> </i> <span class="text">1</span> <i class="uk-icon-caret-down"></i></button>
  48 + <div class="uk-dropdown uk-dropdown-bottom uk-dropdown-small"
  49 + style="top: 30px; left: 0px;min-width: auto;">
  50 + <ul class="uk-nav uk-nav-dropdown pb_dropdown_tool play_speed_list uk-dropdown-close">
  51 + <li><a data-value="30" href="javascript:;">1秒30帧</a></li>
  52 + <li><a data-value="20" href="javascript:;">1秒20帧</a></li>
  53 + <li><a data-value="10" href="javascript:;">1秒10帧</a></li>
  54 + <li><a data-value="7" href="javascript:;">1秒7帧</a></li>
  55 + <li><a data-value="5" href="javascript:;">1秒5帧</a></li>
  56 + <li><a data-value="1" href="javascript:;">1秒1帧</a></li>
44 </ul> 57 </ul>
45 </div> 58 </div>
46 </div> 59 </div>
47 </div> 60 </div>
  61 +
  62 + <div class="pb_tools_icon">
  63 + <button class="uk-button" disabled><i class="uk-icon-map-signs"></i> 电子围栏 <i class="uk-icon-caret-down"></i> </button>
  64 + </div>
  65 +
  66 + <div class="pb_tools_icon">
  67 + <a class="uk-button" id="exportExcelBtn" data-uk-tooltip title="导出轨迹"><i
  68 + class="uk-icon-file-excel-o"></i></a>
  69 + </div>
48 </div> 70 </div>
49 71
50 <script> 72 <script>
51 (function () { 73 (function () {
52 74
53 var logTemp = template.compile('{{each list as gps i}}<dl data-code="{{gps.road.ROAD_CODE}}">' + 75 var logTemp = template.compile('{{each list as gps i}}<dl data-code="{{gps.road.ROAD_CODE}}">' +
54 - '<dd>{{gps.timeStr}}</dd>' +  
55 - '<dd>{{gps.speed}}</dd>' +  
56 - '<dd>{{gps.road.ROAD_NAME}}</dd><dd>正常</dd></dl>{{/each}}');  
57 - 76 + '<dd>{{gps.timeStr}}</dd>' +
  77 + '<dd>{{gps.speed}}</dd>' +
  78 + '<dd>{{gps.road.ROAD_NAME}}</dd><dd>正常</dd></dl>{{/each}}');
58 79
59 80
60 var _body = '#playback_run_body' 81 var _body = '#playback_run_body'
@@ -93,11 +114,11 @@ @@ -93,11 +114,11 @@
93 }, 600); 114 }, 600);
94 115
95 //导出的文件名 116 //导出的文件名
96 - $('a[data-name=exportExcel]').attr('download', data.fileName); 117 + $('#exportExcelBtn').attr('download', data.fileName);
97 }); 118 });
98 119
99 $('.pb_tools_icon a.uk-button', _body).on('click', function () { 120 $('.pb_tools_icon a.uk-button', _body).on('click', function () {
100 - var type = $(this).data('type'); 121 + var type = $(this).attr('data-type');
101 switch (type) { 122 switch (type) {
102 case 'play': 123 case 'play':
103 play(); 124 play();
@@ -105,30 +126,26 @@ @@ -105,30 +126,26 @@
105 case 'pause': 126 case 'pause':
106 pause(); 127 pause();
107 break; 128 break;
108 - case 'fast_forward':  
109 - goto(index + 10);  
110 - break;  
111 - case 'rewind':  
112 - goto(index - 10);  
113 - break;  
114 - case 'stop':  
115 - pause();  
116 - break; 129 + /*case 'fast_forward':
  130 + goto(index + 10);
  131 + break;
  132 + case 'rewind':
  133 + goto(index - 10);
  134 + break;
  135 + case 'stop':
  136 + pause();
  137 + break;*/
117 } 138 }
118 }); 139 });
119 140
120 - $('.pb_dropdown_tool li a', _body).on('click', function () {  
121 - var name = $(this).data('name');  
122 - switch (name) {  
123 - case 'exportExcel':  
124 - var base64Str = gb_map_play_back.listToExcel(gpsArray);  
125 - $(this).attr('href', base64Str);  
126 - break;  
127 - } 141 + //导出excel
  142 + $('#exportExcelBtn', _body).on('click', function () {
  143 + var base64Str = gb_map_play_back.listToExcel(gpsArray);
  144 + $(this).attr('href', base64Str);
128 }); 145 });
129 146
130 function goto(ei) { 147 function goto(ei) {
131 - if(ei < 0 || ei >= len) 148 + if (ei < 0 || ei >= len)
132 return; 149 return;
133 150
134 bar.css('width', ei * step); 151 bar.css('width', ei * step);
@@ -149,12 +166,13 @@ @@ -149,12 +166,13 @@
149 for (var i = 0; i <= ei; i++) { 166 for (var i = 0; i <= ei; i++) {
150 trailArray.push(new BMap.Point(gpsArray[i].bd_lon, gpsArray[i].bd_lat)); 167 trailArray.push(new BMap.Point(gpsArray[i].bd_lon, gpsArray[i].bd_lat));
151 try { 168 try {
152 - if(i > 0 && logs[logs.length - 1].road.ROAD_CODE == gpsArray[i].road.ROAD_CODE) 169 + if (i > 0 && logs[logs.length - 1].road.ROAD_CODE == gpsArray[i].road.ROAD_CODE)
153 logs.pop(); 170 logs.pop();
154 } 171 }
155 - catch (e){} 172 + catch (e) {
  173 + }
156 174
157 - if(gpsArray[i].road) 175 + if (gpsArray[i].road)
158 logs.push(gpsArray[i]); 176 logs.push(gpsArray[i]);
159 } 177 }
160 trailPolyline.setPath(trailArray); 178 trailPolyline.setPath(trailArray);
@@ -164,15 +182,23 @@ @@ -164,15 +182,23 @@
164 //更新日志面板 182 //更新日志面板
165 logPanel.empty().html(logTemp({list: logs})); 183 logPanel.empty().html(logTemp({list: logs}));
166 logWrap.scrollTop(logWrap[0].scrollHeight); 184 logWrap.scrollTop(logWrap[0].scrollHeight);
  185 +
  186 + //重新填充进出站数据
  187 + $('.pb_inout_station_panel .ct_table_body', _body).html('');
  188 + for (var i = 0; i <= ei; i++) {
  189 + inoutStationWrite(gpsArray[i]);
  190 + }
  191 + inoutWrap.scrollTop(inoutWrap[0].scrollHeight);
167 } 192 }
168 193
169 //播放 194 //播放
170 function play() { 195 function play() {
171 $('.play-btn', _body) 196 $('.play-btn', _body)
172 - .data('type', 'pause') 197 + .attr('data-type', 'pause')
173 .find('i') 198 .find('i')
174 .removeClass('uk-icon-play') 199 .removeClass('uk-icon-play')
175 - .addClass('uk-icon-pause'); 200 + .addClass('uk-icon-pause')
  201 + .next().text('暂停');
176 pauseFlag = false; 202 pauseFlag = false;
177 progress.addClass('uk-active'); 203 progress.addClass('uk-active');
178 run(); 204 run();
@@ -186,7 +212,7 @@ @@ -186,7 +212,7 @@
186 function fixedToCenter() { 212 function fixedToCenter() {
187 toCenterTimer = setInterval(function () { 213 toCenterTimer = setInterval(function () {
188 map.panTo(marker.getPosition()); 214 map.panTo(marker.getPosition());
189 - }, 5000); 215 + }, 4000);
190 } 216 }
191 217
192 //暂停 218 //暂停
@@ -194,10 +220,11 @@ @@ -194,10 +220,11 @@
194 220
195 function pause() { 221 function pause() {
196 $('.play-btn', _body) 222 $('.play-btn', _body)
197 - .data('type', 'play') 223 + .attr('data-type', 'play')
198 .find('i') 224 .find('i')
199 .removeClass('uk-icon-pause') 225 .removeClass('uk-icon-pause')
200 - .addClass('uk-icon-play'); 226 + .addClass('uk-icon-play')
  227 + .next().text('播放');
201 pauseFlag = true; 228 pauseFlag = true;
202 progress.removeClass('uk-active'); 229 progress.removeClass('uk-active');
203 clearInterval(toCenterTimer); 230 clearInterval(toCenterTimer);
@@ -205,7 +232,8 @@ @@ -205,7 +232,8 @@
205 232
206 var index = 1; 233 var index = 1;
207 var len; 234 var len;
208 - 235 + var defaultRunSpeed = 1000;
  236 + var runSpeed = defaultRunSpeed;
209 function run() { 237 function run() {
210 //暂停 238 //暂停
211 if (pauseFlag) { 239 if (pauseFlag) {
@@ -214,7 +242,7 @@ @@ -214,7 +242,7 @@
214 } 242 }
215 //结束 243 //结束
216 if (index >= len) { 244 if (index >= len) {
217 - bar.css('width', '100%') 245 + bar.css('width', '100%');
218 pause(); 246 pause();
219 return; 247 return;
220 } 248 }
@@ -239,9 +267,11 @@ @@ -239,9 +267,11 @@
239 267
240 //日志输出 268 //日志输出
241 logWrite(gps, gpsArray[index - 1]); 269 logWrite(gps, gpsArray[index - 1]);
  270 + //到离站输出
  271 + inoutStationWrite(gps);
242 272
243 index++; 273 index++;
244 - setTimeout(run, 1000); 274 + setTimeout(run, runSpeed);
245 } 275 }
246 276
247 //初始化地图 277 //初始化地图
@@ -306,7 +336,7 @@ @@ -306,7 +336,7 @@
306 gb_ct_table.fixedHead(logWrap); 336 gb_ct_table.fixedHead(logWrap);
307 337
308 function logWrite(gps, prve) { 338 function logWrite(gps, prve) {
309 - if(!gps.road || !gps.road.ROAD_CODE) 339 + if (!gps.road || !gps.road.ROAD_CODE)
310 return; 340 return;
311 341
312 var code = gps.road.ROAD_CODE; 342 var code = gps.road.ROAD_CODE;
@@ -321,6 +351,36 @@ @@ -321,6 +351,36 @@
321 351
322 logWrap.scrollTop(logWrap[0].scrollHeight); 352 logWrap.scrollTop(logWrap[0].scrollHeight);
323 } 353 }
  354 +
  355 +
  356 + var inoutWrap = $('.pb_inout_station_panel', _body);
  357 + gb_ct_table.fixedHead(inoutWrap);
  358 + //进出站数据输出
  359 + function inoutStationWrite(gps) {
  360 + if (gps.inout_stop == -1)
  361 + return;
  362 +
  363 + var inoutInfo = gps['inout_stop_info'];
  364 + var htmlStr = '<dl>' +
  365 + '<dd>' + gps.timeStr + '</dd>' +
  366 + '<dd>' + inoutInfo.stopName + '</dd>' +
  367 + '<dd>' + (inoutInfo.inOut == 1 ? '出站' : '进站') + '</dd>' +
  368 + '</dl>';
  369 +
  370 + $('.pb_inout_station_panel .ct_table_body', _body).append(htmlStr);
  371 +
  372 + //滚动条
  373 + inoutWrap.scrollTop(inoutWrap[0].scrollHeight);
  374 + }
  375 +
  376 +
  377 +
  378 + //播放速度
  379 + $('.play_speed_list li a', _body).on('click', function () {
  380 + var speed = $(this).data('value');
  381 + runSpeed = defaultRunSpeed / speed;
  382 + $('#speedIconBtn .text', _body).text(speed);
  383 + });
324 })(); 384 })();
325 </script> 385 </script>
326 </div> 386 </div>
327 \ No newline at end of file 387 \ No newline at end of file