Commit 9ab7bacf1ba50c7c3a0362cda5b8a1747a4babee
1 parent
4cd76de3
update...
Showing
5 changed files
with
303 additions
and
186 deletions
src/main/java/com/bsth/websocket/handler/RealControlSocketHandler.java
| 1 | 1 | package com.bsth.websocket.handler; |
| 2 | 2 | |
| 3 | -import java.io.IOException; | |
| 4 | 3 | import java.util.ArrayList; |
| 5 | 4 | import java.util.HashMap; |
| 6 | 5 | import java.util.Iterator; |
| ... | ... | @@ -19,7 +18,6 @@ import org.springframework.web.socket.WebSocketMessage; |
| 19 | 18 | import org.springframework.web.socket.WebSocketSession; |
| 20 | 19 | |
| 21 | 20 | import com.alibaba.fastjson.JSONObject; |
| 22 | -import com.bsth.common.Constants; | |
| 23 | 21 | import com.bsth.data.BasicData; |
| 24 | 22 | import com.google.common.base.Splitter; |
| 25 | 23 | import com.google.common.collect.ArrayListMultimap; |
| ... | ... | @@ -30,7 +28,7 @@ import com.google.common.collect.ArrayListMultimap; |
| 30 | 28 | @Component |
| 31 | 29 | @Scope("prototype") |
| 32 | 30 | public class RealControlSocketHandler implements WebSocketHandler { |
| 33 | - | |
| 31 | + | |
| 34 | 32 | Logger logger = LoggerFactory.getLogger(this.getClass()); |
| 35 | 33 | |
| 36 | 34 | private static final ArrayList<WebSocketSession> users; |
| ... | ... | @@ -40,25 +38,25 @@ public class RealControlSocketHandler implements WebSocketHandler { |
| 40 | 38 | users = new ArrayList<WebSocketSession>(); |
| 41 | 39 | listenMap = ArrayListMultimap.create(); |
| 42 | 40 | } |
| 43 | - | |
| 41 | + | |
| 44 | 42 | @Override |
| 45 | 43 | public void afterConnectionClosed(WebSocketSession session, CloseStatus arg1) |
| 46 | 44 | throws Exception { |
| 47 | - users.remove(session); | |
| 48 | - //清理监听 | |
| 49 | - Set<String> keys = listenMap.keySet(); | |
| 50 | - Map<String, WebSocketSession> remMap = new HashMap<>(); | |
| 51 | - for(String k : keys){ | |
| 52 | - if(listenMap.get(k).contains(session)) | |
| 53 | - remMap.put(k, session); | |
| 54 | - } | |
| 55 | - | |
| 56 | - Set<String> remSet = remMap.keySet(); | |
| 57 | - for(String k : remSet){ | |
| 58 | - listenMap.remove(k, remMap.get(k)); | |
| 59 | - logger.info("web socket close, remove listen K: "+ k); | |
| 60 | - } | |
| 61 | - logger.info("listen values size: " + listenMap.values().size()); | |
| 45 | + users.remove(session); | |
| 46 | + //清理监听 | |
| 47 | + Set<String> keys = listenMap.keySet(); | |
| 48 | + Map<String, WebSocketSession> remMap = new HashMap<>(); | |
| 49 | + for(String k : keys){ | |
| 50 | + if(listenMap.get(k).contains(session)) | |
| 51 | + remMap.put(k, session); | |
| 52 | + } | |
| 53 | + | |
| 54 | + Set<String> remSet = remMap.keySet(); | |
| 55 | + for(String k : remSet){ | |
| 56 | + listenMap.remove(k, remMap.get(k)); | |
| 57 | + logger.info("web socket close, remove listen K: "+ k); | |
| 58 | + } | |
| 59 | + logger.info("listen values size: " + listenMap.values().size()); | |
| 62 | 60 | } |
| 63 | 61 | |
| 64 | 62 | @Override |
| ... | ... | @@ -72,17 +70,17 @@ public class RealControlSocketHandler implements WebSocketHandler { |
| 72 | 70 | throws Exception { |
| 73 | 71 | JSONObject jsonObj = JSONObject.parseObject(msg.getPayload().toString()); |
| 74 | 72 | switch (jsonObj.getString("operCode")) { |
| 75 | - case "register_line": | |
| 76 | - //注册线路监听 | |
| 77 | - List<String> idx = Splitter.on(",").splitToList(jsonObj.getString("idx")); | |
| 78 | - for(String lineCode : idx){ | |
| 79 | - if(BasicData.lineCode2NameMap.containsKey(lineCode)) | |
| 80 | - listenMap.put(lineCode, session); | |
| 81 | - } | |
| 82 | - break; | |
| 73 | + case "register_line": | |
| 74 | + //注册线路监听 | |
| 75 | + List<String> idx = Splitter.on(",").splitToList(jsonObj.getString("idx")); | |
| 76 | + for(String lineCode : idx){ | |
| 77 | + if(BasicData.lineCode2NameMap.containsKey(lineCode)) | |
| 78 | + listenMap.put(lineCode, session); | |
| 79 | + } | |
| 80 | + break; | |
| 83 | 81 | |
| 84 | - default: | |
| 85 | - break; | |
| 82 | + default: | |
| 83 | + break; | |
| 86 | 84 | } |
| 87 | 85 | logger.info(msg.getPayload().toString()); |
| 88 | 86 | } |
| ... | ... | @@ -91,9 +89,9 @@ public class RealControlSocketHandler implements WebSocketHandler { |
| 91 | 89 | public void handleTransportError(WebSocketSession session, Throwable arg1) |
| 92 | 90 | throws Exception { |
| 93 | 91 | if(session.isOpen()){ |
| 94 | - session.close(); | |
| 95 | - } | |
| 96 | - users.remove(session); | |
| 92 | + session.close(); | |
| 93 | + } | |
| 94 | + users.remove(session); | |
| 97 | 95 | } |
| 98 | 96 | |
| 99 | 97 | @Override |
| ... | ... | @@ -105,17 +103,17 @@ public class RealControlSocketHandler implements WebSocketHandler { |
| 105 | 103 | * 给所有在线用户发送消息 |
| 106 | 104 | * |
| 107 | 105 | * @param message |
| 108 | - | |
| 106 | + | |
| 109 | 107 | public synchronized void sendMessageToUsers(TextMessage message) { |
| 110 | - for (WebSocketSession user : users) { | |
| 111 | - try { | |
| 112 | - if (user.isOpen()) { | |
| 113 | - user.sendMessage(message); | |
| 114 | - } | |
| 115 | - } catch (IOException e) { | |
| 116 | - e.printStackTrace(); | |
| 117 | - } | |
| 118 | - } | |
| 108 | + for (WebSocketSession user : users) { | |
| 109 | + try { | |
| 110 | + if (user.isOpen()) { | |
| 111 | + user.sendMessage(message); | |
| 112 | + } | |
| 113 | + } catch (IOException e) { | |
| 114 | + e.printStackTrace(); | |
| 115 | + } | |
| 116 | + } | |
| 119 | 117 | }*/ |
| 120 | 118 | |
| 121 | 119 | /** |
| ... | ... | @@ -123,31 +121,31 @@ public class RealControlSocketHandler implements WebSocketHandler { |
| 123 | 121 | * |
| 124 | 122 | * @param userId |
| 125 | 123 | * @param message |
| 126 | - | |
| 124 | + | |
| 127 | 125 | public synchronized void sendMessageToUser(Set<String> uids, String msg) { |
| 128 | - TextMessage message = new TextMessage(msg.getBytes()); | |
| 129 | - for (WebSocketSession user : users) { | |
| 130 | - if (uids.contains(user.getAttributes().get(Constants.SESSION_USERNAME))) { | |
| 131 | - try { | |
| 132 | - if (user.isOpen()) { | |
| 133 | - user.sendMessage(message); | |
| 134 | - } | |
| 135 | - } catch (IOException e) { | |
| 136 | - e.printStackTrace(); | |
| 137 | - } | |
| 138 | - } | |
| 139 | - } | |
| 126 | + TextMessage message = new TextMessage(msg.getBytes()); | |
| 127 | + for (WebSocketSession user : users) { | |
| 128 | + if (uids.contains(user.getAttributes().get(Constants.SESSION_USERNAME))) { | |
| 129 | + try { | |
| 130 | + if (user.isOpen()) { | |
| 131 | + user.sendMessage(message); | |
| 132 | + } | |
| 133 | + } catch (IOException e) { | |
| 134 | + e.printStackTrace(); | |
| 135 | + } | |
| 136 | + } | |
| 137 | + } | |
| 140 | 138 | }*/ |
| 141 | - | |
| 139 | + | |
| 142 | 140 | /** |
| 143 | 141 | * 根据线路推送消息 |
| 144 | 142 | */ |
| 145 | 143 | public synchronized void sendMessageToLine(String lineCode, String msg) { |
| 146 | 144 | |
| 147 | 145 | TextMessage message = new TextMessage(msg.getBytes()); |
| 148 | - | |
| 146 | + | |
| 149 | 147 | Iterator<WebSocketSession> iterator = listenMap.get(lineCode).iterator(); |
| 150 | - | |
| 148 | + | |
| 151 | 149 | WebSocketSession user; |
| 152 | 150 | while(iterator.hasNext()){ |
| 153 | 151 | user = iterator.next(); |
| ... | ... | @@ -159,7 +157,6 @@ public class RealControlSocketHandler implements WebSocketHandler { |
| 159 | 157 | logger.error("sendMessageToLine error ...."+msg); |
| 160 | 158 | logger.error("sendMessageToLine error ....", e); |
| 161 | 159 | } |
| 162 | - | |
| 163 | 160 | } |
| 164 | 161 | } |
| 165 | 162 | } | ... | ... |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html
0 → 100644
| 1 | +<div class="uk-modal ct-form-modal" id="bctype-venting-modal"> | |
| 2 | + <div class="uk-modal-dialog"> | |
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | |
| 4 | + <h2>班次直放调整</h2> | |
| 5 | + <form class="uk-form uk-form-horizontal"> | |
| 6 | + <div class="uk-grid"> | |
| 7 | + <div class="uk-width-1-2"> | |
| 8 | + <div class="uk-form-row"> | |
| 9 | + <label class="uk-form-label" style="width: 75px;">从</label> | |
| 10 | + <div class="uk-form-controls" style="margin-left: 75px;"> | |
| 11 | + <select name="startStation"> | |
| 12 | + </select> | |
| 13 | + </div> | |
| 14 | + </div> | |
| 15 | + </div> | |
| 16 | + <div class="uk-width-1-2"> | |
| 17 | + <div class="uk-form-row"> | |
| 18 | + <label class="uk-form-label" style="width: 75px;">直放至</label> | |
| 19 | + <div class="uk-form-controls" style="margin-left: 75px;"> | |
| 20 | + <select name="endStation"> | |
| 21 | + </select> | |
| 22 | + </div> | |
| 23 | + </div> | |
| 24 | + </div> | |
| 25 | + </div> | |
| 26 | + <div class="uk-grid"> | |
| 27 | + <div class="uk-width-1-1"> | |
| 28 | + <div class="uk-form-row ct-stacked"> | |
| 29 | + <label class="uk-form-label" for="form-s-t"><i class="uk-icon-bullhorn"></i> 指令内容</label> | |
| 30 | + <div class="uk-form-controls"> | |
| 31 | + <textarea style="color: #e53636;" id="form-s-t" cols="30" placeholder="指令内容" rows="5" name="directiveStr" data-fv-stringlength="true" data-fv-stringlength-max="50" ></textarea> | |
| 32 | + </div> | |
| 33 | + </div> | |
| 34 | + </div> | |
| 35 | + </div> | |
| 36 | + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;"> | |
| 37 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 38 | + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-send"></i> 确认调整并下发指令</button> | |
| 39 | + </div> | |
| 40 | + </form> | |
| 41 | + </div> | |
| 42 | + | |
| 43 | + <script> | |
| 44 | + (function() { | |
| 45 | + var modal = '#bctype-venting-modal' | |
| 46 | + ,sch,stationRoutes; | |
| 47 | + $(modal).on('init', function(e, data) { | |
| 48 | + sch=data.sch; | |
| 49 | + | |
| 50 | + //站点路由 | |
| 51 | + stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function(a, b){ | |
| 52 | + return a.stationRouteCode-b.stationRouteCode; | |
| 53 | + }), 'directions'); | |
| 54 | + | |
| 55 | + var opts=''; | |
| 56 | + $.each(stationRoutes[sch.xlDir], function(){ | |
| 57 | + opts+='<option value="'+this.stationCode+'">'+this.stationName+'</option>'; | |
| 58 | + }); | |
| 59 | + $('[name=startStation]',modal).html(opts).val(sch.qdzCode); | |
| 60 | + $('[name=endStation]',modal).html(opts).val(sch.zdzCode); | |
| 61 | + //指令内容 | |
| 62 | + $('[name=directiveStr]',modal).text('从 ' + sch.qdzName + ' 直放至 ' + sch.zdzName); | |
| 63 | + | |
| 64 | + //submit | |
| 65 | + var f = $('form', modal).formValidation(gb_form_validation_opts); | |
| 66 | + f.on('success.form.fv', function(e) { | |
| 67 | + e.preventDefault(); | |
| 68 | + var data = $(this).serializeJSON(); | |
| 69 | + console.log(data); | |
| 70 | + }); | |
| 71 | + | |
| 72 | + $('[name=startStation],[name=endStation]',modal).on('change', refreshDirectiveStr); | |
| 73 | + | |
| 74 | + | |
| 75 | + function refreshDirectiveStr(){ | |
| 76 | + //指令内容 | |
| 77 | + var qdzName=$('[name=startStation]').find("option:selected").text() | |
| 78 | + ,zdzName=$('[name=endStation]').find("option:selected").text(); | |
| 79 | + $('[name=directiveStr]',modal).text('从 ' + qdzName + ' 直放至 ' + zdzName); | |
| 80 | + } | |
| 81 | + | |
| 82 | + $('[name=startStation]',modal).on('change', function () { | |
| 83 | + var ops=$('[name=endStation]', modal).find('option'); | |
| 84 | + | |
| 85 | + var flag=0, code=$(this).val(); | |
| 86 | + $.each(ops, function () { | |
| 87 | + if(this.stationCode==code) | |
| 88 | + }); | |
| 89 | + }); | |
| 90 | + }); | |
| 91 | + })(); | |
| 92 | + </script> | |
| 93 | +</div> | ... | ... |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/dftz.html
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | <div class="uk-form-row"> |
| 15 | 15 | <label class="uk-form-label" >班次类型</label> |
| 16 | 16 | <div class="uk-form-controls"> |
| 17 | - <select class="form-control nt-dictionary" data-code="{{bcType}}" data-group=ScheduleType></select> | |
| 17 | + <select name="bcType"></select> | |
| 18 | 18 | </div> |
| 19 | 19 | </div> |
| 20 | 20 | </div> |
| ... | ... | @@ -25,7 +25,7 @@ |
| 25 | 25 | <div class="uk-form-row"> |
| 26 | 26 | <label class="uk-form-label" >从<small>(起点站)</small></label> |
| 27 | 27 | <div class="uk-form-controls"> |
| 28 | - <input type="text" value="{{qdzName}}" disabled> | |
| 28 | + <input type="text" value="{{qdzName}}" disabled> | |
| 29 | 29 | </div> |
| 30 | 30 | </div> |
| 31 | 31 | </div> |
| ... | ... | @@ -114,13 +114,25 @@ |
| 114 | 114 | <script> |
| 115 | 115 | (function() { |
| 116 | 116 | var modal = '#schedule-dftz-modal' |
| 117 | - ,sch; | |
| 117 | + ,sch; | |
| 118 | 118 | $(modal).on('init', function(e, data) { |
| 119 | 119 | sch=data.sch; |
| 120 | 120 | var formHtml = template('schedule-dftz-form-temp', sch); |
| 121 | 121 | $('form', modal).html(formHtml); |
| 122 | - //字典转换 | |
| 123 | - dictionaryUtils.transformDom($('.nt-dictionary', modal)); | |
| 122 | + | |
| 123 | + //班次类型字典 | |
| 124 | + var bctypes=dictionaryUtils.getByGroup('ScheduleType') | |
| 125 | + ,opts='<option value="'+sch.bcType+'">'+bctypes[sch.bcType]+'</option>'; | |
| 126 | + if(sch.bcType!='normal') | |
| 127 | + $('select[name=bcType]', modal).attr('disabled','disabled'); | |
| 128 | + else{ | |
| 129 | + for(var code in bctypes){ | |
| 130 | + if(code!='venting' && code!='major') | |
| 131 | + continue; | |
| 132 | + opts+='<option value="'+code+'">'+bctypes[code]+'</option>'; | |
| 133 | + } | |
| 134 | + } | |
| 135 | + $('[name=bcType]', modal).html(opts); | |
| 124 | 136 | |
| 125 | 137 | //submit |
| 126 | 138 | var f = $('form', modal).formValidation(gb_form_validation_opts); |
| ... | ... | @@ -128,27 +140,32 @@ |
| 128 | 140 | e.preventDefault(); |
| 129 | 141 | var data = $(this).serializeJSON(); |
| 130 | 142 | if(data.dfsj==sch.dfsj && data.remarks==''){ |
| 131 | - return; | |
| 143 | + return; | |
| 132 | 144 | } |
| 133 | 145 | gb_common.$post('/realSchedule/outgoAdjust', data, function(rs){ |
| 134 | - //更新班次信息 | |
| 135 | - gb_schedule_table.updateSchedule(rs.ts); | |
| 136 | - notify_succ('操作成功!'); | |
| 137 | - UIkit.modal(modal).hide(); | |
| 146 | + //更新班次信息 | |
| 147 | + gb_schedule_table.updateSchedule(rs.ts); | |
| 148 | + notify_succ('操作成功!'); | |
| 149 | + UIkit.modal(modal).hide(); | |
| 138 | 150 | }); |
| 139 | 151 | }); |
| 140 | 152 | |
| 141 | - //班次类型 | |
| 142 | - if(sch.bcType=='out'||sch.bcType=='in') | |
| 143 | - $('select[name=bcType]', f).attr('disabled','disabled'); | |
| 144 | - else { | |
| 145 | - //正常班次只能改为直放 和 放大站 | |
| 146 | - $('select[name=bcType] option', f).each(function(){ | |
| 147 | - var whiteList=['venting', 'major', sch.bcType]; | |
| 148 | - if(whiteList.indexOf($(this).val()) == -1) | |
| 149 | - $(this).remove(); | |
| 150 | - }); | |
| 151 | - } | |
| 153 | + | |
| 154 | + $('[name=bcType]', modal).on('change', function(){ | |
| 155 | + var type = $(this).val(); | |
| 156 | + if(sch.bcType != 'normal') | |
| 157 | + return; | |
| 158 | + //if($(this)) | |
| 159 | + if(type=='venting'){ | |
| 160 | + //直放 | |
| 161 | + $.get('/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html', function(htmlStr){ | |
| 162 | + $(document.body).append(htmlStr); | |
| 163 | + var detailModal='#bctype-venting-modal'; | |
| 164 | + UIkit.modal(detailModal, {bgclose: true,modal:false}).show(); | |
| 165 | + $(detailModal).trigger('init', {sch: sch}); | |
| 166 | + }) | |
| 167 | + } | |
| 168 | + }); | |
| 152 | 169 | }); |
| 153 | 170 | })(); |
| 154 | 171 | </script> | ... | ... |
src/main/resources/static/real_control_v2/fragments/line_schedule/sch_table.html
| 1 | 1 | <div> |
| 2 | - <script id="line-schedule-table-temp" type="text/html"> | |
| 3 | - <div class="schedule-wrap {{if dir==0}}up{{else}}down{{/if}}"> | |
| 4 | - <h3 class="header-title"> | |
| 5 | - {{if dir==0}} | |
| 6 | - 上行/{{line.startStationName}} | |
| 7 | - {{else}} | |
| 8 | - 下行/{{line.endStationName}} | |
| 9 | - {{/if}} | |
| 10 | - <i class="uk-icon-question-circle" ></i> | |
| 11 | - <div class="search_sch_panel"> | |
| 12 | - <form class="uk-form" onsubmit="javascript:return false;"> | |
| 13 | - <div class="uk-autocomplete sch-search-autocom"> | |
| 14 | - <div class="uk-form-icon"> | |
| 15 | - <i class="uk-icon-search"></i> | |
| 16 | - <input type="text" placeholder="search"> | |
| 17 | - <i class="cancel uk-icon-times-circle" data-uk-tooltip="{pos:'right'}" title="取消过滤"></i> | |
| 2 | + <script id="line-schedule-table-temp" type="text/html"> | |
| 3 | + <div class="schedule-wrap {{if dir==0}}up{{else}}down{{/if}}"> | |
| 4 | + <h3 class="header-title"> | |
| 5 | + {{if dir==0}} | |
| 6 | + 上行/{{line.startStationName}} | |
| 7 | + {{else}} | |
| 8 | + 下行/{{line.endStationName}} | |
| 9 | + {{/if}} | |
| 10 | + <i class="uk-icon-question-circle" ></i> | |
| 11 | + <div class="search_sch_panel"> | |
| 12 | + <form class="uk-form" onsubmit="javascript:return false;"> | |
| 13 | + <div class="uk-autocomplete sch-search-autocom"> | |
| 14 | + <div class="uk-form-icon"> | |
| 15 | + <i class="uk-icon-search"></i> | |
| 16 | + <input type="text" placeholder="search"> | |
| 17 | + <i class="cancel uk-icon-times-circle" data-uk-tooltip="{pos:'right'}" title="取消过滤"></i> | |
| 18 | + </div> | |
| 19 | + </div> | |
| 20 | + </form> | |
| 18 | 21 | </div> |
| 19 | - </div> | |
| 20 | - </form> | |
| 21 | - </div> | |
| 22 | - </h3> | |
| 23 | - <div class="schedule-body"> | |
| 24 | - <div class="ct_table_wrap"> | |
| 25 | - <div class="ct_table line-schedule-table"> | |
| 26 | - <div class="ct_table_head"> | |
| 27 | - <dl> | |
| 28 | - <dt>序号</dt> | |
| 29 | - <dt>路牌</dt> | |
| 30 | - <dt>车辆</dt> | |
| 31 | - <dt>应到</dt> | |
| 32 | - <dt>实到</dt> | |
| 33 | - <dt sort-field>计发</dt> | |
| 34 | - <dt sort-field>待发</dt> | |
| 35 | - <dt>实发</dt> | |
| 36 | - <dt>原因</dt> | |
| 37 | - </dl> | |
| 38 | - </div> | |
| 39 | - <div class="ct_table_body"> | |
| 40 | - {{each list as sch i}} | |
| 41 | - <dl data-id="{{sch.id}}" > | |
| 42 | - <dd class="seq_no">{{i + 1}}</dd> | |
| 43 | - <dd class="lpName"><a>{{sch.lpName}}</a></dd> | |
| 44 | - <dd data-nbbm="{{sch.clZbh}}" | |
| 45 | - class="{{if sch.directiveState == 60}}tl-xxfc{{else if sch.directiveState == 100}}tl-xxsd{{else if sch.directiveState == 200}}tl-xxrd{{/if}}"> | |
| 46 | - {{sch.clZbh}} | |
| 47 | - </dd> | |
| 48 | - <dd>{{sch.qdzArrDateJH}}</dd> | |
| 49 | - <dd>{{sch.qdzArrDateSJ}}</dd> | |
| 50 | - <dd data-sort-val={{sch.fcsjT}}> | |
| 51 | - {{sch.fcsj}} | |
| 52 | - {{if sch.bcType == "out"}} | |
| 53 | - <span class="uk-badge uk-badge-success">出场</span> | |
| 54 | - {{else if sch.bcType == "in"}} | |
| 55 | - <span class="uk-badge uk-badge-warning">进场</span> | |
| 56 | - {{/if}} | |
| 57 | - {{if sch.sflj}} | |
| 58 | - <span class="uk-badge uk-badge-danger">临加</span> | |
| 59 | - {{/if}} | |
| 60 | - {{if sch.cTasks.length > 0}} | |
| 61 | - <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span> | |
| 62 | - {{/if}} | |
| 63 | - </dd> | |
| 64 | - <dd data-sort-val={{sch.dfsjT}} dbclick dbclick-type="dfsj" dbclick-val="{{sch.dfsj}}">{{sch.dfsj}}</dd> | |
| 65 | - <dd class=" | |
| 22 | + </h3> | |
| 23 | + <div class="schedule-body"> | |
| 24 | + <div class="ct_table_wrap"> | |
| 25 | + <div class="ct_table line-schedule-table"> | |
| 26 | + <div class="ct_table_head"> | |
| 27 | + <dl> | |
| 28 | + <dt>序号</dt> | |
| 29 | + <dt>路牌</dt> | |
| 30 | + <dt>车辆</dt> | |
| 31 | + <dt>应到</dt> | |
| 32 | + <dt>实到</dt> | |
| 33 | + <dt sort-field>计发</dt> | |
| 34 | + <dt sort-field>待发</dt> | |
| 35 | + <dt>实发</dt> | |
| 36 | + <dt>原因</dt> | |
| 37 | + </dl> | |
| 38 | + </div> | |
| 39 | + <div class="ct_table_body"> | |
| 40 | + {{each list as sch i}} | |
| 41 | + <dl data-id="{{sch.id}}" > | |
| 42 | + <dd class="seq_no">{{i + 1}}</dd> | |
| 43 | + <dd class="lpName"><a>{{sch.lpName}}</a></dd> | |
| 44 | + <dd data-nbbm="{{sch.clZbh}}" | |
| 45 | + class="{{if sch.directiveState == 60}}tl-xxfc{{else if sch.directiveState == 100}}tl-xxsd{{else if sch.directiveState == 200}}tl-xxrd{{/if}}"> | |
| 46 | + {{sch.clZbh}} | |
| 47 | + </dd> | |
| 48 | + <dd>{{sch.qdzArrDateJH}}</dd> | |
| 49 | + <dd>{{sch.qdzArrDateSJ}}</dd> | |
| 50 | + <dd data-sort-val={{sch.fcsjT}}> | |
| 51 | + {{sch.fcsj}} | |
| 52 | + {{if sch.bcType == "out"}} | |
| 53 | + <span class="uk-badge uk-badge-success">出场</span> | |
| 54 | + {{else if sch.bcType == "in"}} | |
| 55 | + <span class="uk-badge uk-badge-warning">进场</span> | |
| 56 | + {{/if}} | |
| 57 | + {{if sch.sflj}} | |
| 58 | + <span class="uk-badge uk-badge-danger">临加</span> | |
| 59 | + {{/if}} | |
| 60 | + {{if sch.cTasks.length > 0}} | |
| 61 | + <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span> | |
| 62 | + {{/if}} | |
| 63 | + </dd> | |
| 64 | + <dd data-sort-val={{sch.dfsjT}} dbclick dbclick-type="dfsj" dbclick-val="{{sch.dfsj}}">{{sch.dfsj}}</dd> | |
| 65 | + <dd class=" | |
| 66 | 66 | {{if sch.status==-1}} |
| 67 | 67 | tl-qrlb |
| 68 | 68 | {{else if sch.status==2}} |
| ... | ... | @@ -72,56 +72,56 @@ |
| 72 | 72 | {{else if sch.status == 0 && sch.late}} |
| 73 | 73 | tl-wd |
| 74 | 74 | {{/if}}"> |
| 75 | - {{sch.fcsjActual}}<span class="fcsj-diff">{{sch.fcsj_diff}}</span> | |
| 76 | - </dd> | |
| 77 | - <dd data-uk-observe> | |
| 78 | - <span title="{{sch.remarks}}" data-uk-tooltip="{pos:'top-left'}" >{{sch.remarks}}</span> | |
| 79 | - </dd> | |
| 80 | - </dl> | |
| 81 | - {{/each}} | |
| 82 | - </div> | |
| 83 | - </div> | |
| 84 | - </div> | |
| 85 | - </div> | |
| 86 | - </div> | |
| 87 | -</script> | |
| 75 | + {{sch.fcsjActual}}<span class="fcsj-diff">{{sch.fcsj_diff}}</span> | |
| 76 | + </dd> | |
| 77 | + <dd data-uk-observe> | |
| 78 | + <span title="{{sch.remarks}}" data-uk-tooltip="{pos:'top-left'}" >{{sch.remarks}}</span> | |
| 79 | + </dd> | |
| 80 | + </dl> | |
| 81 | + {{/each}} | |
| 82 | + </div> | |
| 83 | + </div> | |
| 84 | + </div> | |
| 85 | + </div> | |
| 86 | + </div> | |
| 87 | + </script> | |
| 88 | 88 | |
| 89 | -<script id="line-schedule-fcsj-temp" type="text/html"> | |
| 90 | - <dd data-sort-val={{fcsjT}}> | |
| 91 | - {{fcsj}} | |
| 92 | - {{if bcType == "out"}} | |
| 93 | - <span class="uk-badge uk-badge-success">出场</span> | |
| 94 | - {{else if bcType == "in"}} | |
| 95 | - <span class="uk-badge uk-badge-warning">进场</span> | |
| 96 | - {{/if}} | |
| 97 | - {{if sflj}} | |
| 98 | - <span class="uk-badge uk-badge-danger">临加</span> | |
| 99 | - {{/if}} | |
| 100 | - {{if cTasks.length > 0}} | |
| 101 | - <span class="uk-badge uk-badge-notification">{{cTasks.length}}</span> | |
| 102 | - {{/if}} | |
| 103 | - </dd> | |
| 104 | -</script> | |
| 89 | + <script id="line-schedule-fcsj-temp" type="text/html"> | |
| 90 | + <dd data-sort-val={{fcsjT}}> | |
| 91 | + {{fcsj}} | |
| 92 | + {{if bcType == "out"}} | |
| 93 | + <span class="uk-badge uk-badge-success">出场</span> | |
| 94 | + {{else if bcType == "in"}} | |
| 95 | + <span class="uk-badge uk-badge-warning">进场</span> | |
| 96 | + {{/if}} | |
| 97 | + {{if sflj}} | |
| 98 | + <span class="uk-badge uk-badge-danger">临加</span> | |
| 99 | + {{/if}} | |
| 100 | + {{if cTasks.length > 0}} | |
| 101 | + <span class="uk-badge uk-badge-notification">{{cTasks.length}}</span> | |
| 102 | + {{/if}} | |
| 103 | + </dd> | |
| 104 | + </script> | |
| 105 | 105 | |
| 106 | -<script id="line-schedule-sfsj-temp" type="text/html"> | |
| 107 | -<dd class=" | |
| 108 | -{{if sch.status==-1}} | |
| 106 | + <script id="line-schedule-sfsj-temp" type="text/html"> | |
| 107 | + <dd class=" | |
| 108 | +{{if status==-1}} | |
| 109 | 109 | tl-qrlb |
| 110 | -{{else if sch.status==2}} | |
| 110 | +{{else if status==2}} | |
| 111 | 111 | tl-yzx |
| 112 | -{{else if sch.status==1}} | |
| 112 | +{{else if status==1}} | |
| 113 | 113 | tl-zzzx |
| 114 | -{{else if sch.status == 0 && sch.late}} | |
| 114 | +{{else if status == 0 && late}} | |
| 115 | 115 | tl-wd |
| 116 | 116 | {{/if}}"> |
| 117 | - {{fcsjActual}}<span class="fcsj-diff">{{fcsj_diff}}</span> | |
| 118 | -</dd> | |
| 119 | -</script> | |
| 117 | + {{fcsjActual}}<span class="fcsj-diff">{{fcsj_diff}}</span> | |
| 118 | + </dd> | |
| 119 | + </script> | |
| 120 | 120 | |
| 121 | 121 | <script id="line-schedule-nbbm-temp" type="text/html"> |
| 122 | - <dd data-nbbm="{{clZbh}}" | |
| 123 | - class="{{if directiveState == 60}}tl-xxfc{{else if directiveState == 100}}tl-xxsd{{else if directiveState == 200}}tl-xxrd{{/if}}"> | |
| 124 | - {{clZbh}} | |
| 125 | - </dd> | |
| 122 | + <dd data-nbbm="{{clZbh}}" | |
| 123 | + class="{{if directiveState == 60}}tl-xxfc{{else if directiveState == 100}}tl-xxsd{{else if directiveState == 200}}tl-xxrd{{/if}}"> | |
| 124 | + {{clZbh}} | |
| 125 | + </dd> | |
| 126 | 126 | </script> |
| 127 | 127 | </div> | ... | ... |
src/main/resources/static/real_control_v2/js/data/json/north_toolbar.json
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | }, |
| 15 | 15 | { |
| 16 | 16 | "id": 1.52, |
| 17 | - "text": "...", | |
| 17 | + "text": "历史班次维护", | |
| 18 | 18 | "event": "history_sch_maintain" |
| 19 | 19 | } |
| 20 | 20 | ], |
| ... | ... | @@ -51,6 +51,16 @@ |
| 51 | 51 | "text": "车辆首末班准点率", |
| 52 | 52 | "event": "s_e_punctuality_rate", |
| 53 | 53 | "icon": "uk-icon-pie-chart" |
| 54 | + }, | |
| 55 | + { | |
| 56 | + "id": 1.8, | |
| 57 | + "divider": true | |
| 58 | + }, | |
| 59 | + { | |
| 60 | + "id": 1.9, | |
| 61 | + "text": "班次执行率", | |
| 62 | + "event": "sch_exec_rate", | |
| 63 | + "icon": "uk-icon-pie-chart" | |
| 54 | 64 | } |
| 55 | 65 | ] |
| 56 | 66 | ] | ... | ... |