Commit 6dfb6f5601681b1383b8c264d51017a02d48b0a3
1 parent
c88a1206
update....
Showing
15 changed files
with
472 additions
and
74 deletions
src/main/java/com/bsth/controller/realcontrol/RealChartsController.java
| ... | ... | @@ -36,4 +36,9 @@ public class RealChartsController { |
| 36 | 36 | public List<StratEndPunctualityRate> stratEndPunctualityRate(@RequestParam String idx, @RequestParam String month){ |
| 37 | 37 | return realChartsService.stratEndPunctualityRate(month, idx); |
| 38 | 38 | } |
| 39 | + | |
| 40 | + @RequestMapping("sePunctualityRateLine") | |
| 41 | + public List<StratEndPunctualityRate> sePunctualityRateLine(@RequestParam String idx, @RequestParam String month){ | |
| 42 | + return realChartsService.sePunctualityRateLine(month, idx); | |
| 43 | + } | |
| 39 | 44 | } | ... | ... |
src/main/java/com/bsth/data/arrival/ArrivalData_GPS.java
| ... | ... | @@ -50,7 +50,7 @@ public class ArrivalData_GPS implements CommandLineRunner{ |
| 50 | 50 | |
| 51 | 51 | @Override |
| 52 | 52 | public void run(String... arg0) throws Exception { |
| 53 | - logger.info("ArrivalData_GPS,100,10 @11-10"); | |
| 53 | + logger.info("ArrivalData_GPS,100,10 @11-11"); | |
| 54 | 54 | //Application.mainServices.scheduleWithFixedDelay(dataLoaderThread, 100, 10, TimeUnit.SECONDS); |
| 55 | 55 | } |
| 56 | 56 | ... | ... |
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| ... | ... | @@ -136,8 +136,8 @@ public class DayOfSchedule implements CommandLineRunner { |
| 136 | 136 | //班次误点扫描 |
| 137 | 137 | //Application.mainServices.scheduleWithFixedDelay(scheduleLateThread, 60, 60, TimeUnit.SECONDS); |
| 138 | 138 | |
| 139 | - //每天凌晨1点40提交数据到运管处 | |
| 140 | - long diff = (DateUtils.getTimestamp() + 1000*60*100) - System.currentTimeMillis(); | |
| 139 | + //每天凌晨2点20提交数据到运管处 | |
| 140 | + long diff = (DateUtils.getTimestamp() + 1000*60*140) - System.currentTimeMillis(); | |
| 141 | 141 | if(diff < 0) |
| 142 | 142 | diff+=(1000*60*60*24); |
| 143 | 143 | ... | ... |
src/main/java/com/bsth/service/realcontrol/RealChartsService.java
| ... | ... | @@ -16,4 +16,6 @@ public interface RealChartsService { |
| 16 | 16 | List<CarOutRate> carOutRate(String month, String idx); |
| 17 | 17 | |
| 18 | 18 | List<StratEndPunctualityRate> stratEndPunctualityRate(String month, String idx); |
| 19 | + | |
| 20 | + List<StratEndPunctualityRate> sePunctualityRateLine(String month, String idx); | |
| 19 | 21 | } | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/RealChartsServiceImpl.java
| ... | ... | @@ -209,4 +209,48 @@ public class RealChartsServiceImpl implements RealChartsService { |
| 209 | 209 | }); |
| 210 | 210 | return list; |
| 211 | 211 | } |
| 212 | + | |
| 213 | + @Override | |
| 214 | + public List<StratEndPunctualityRate> sePunctualityRateLine(String month, String idx) { | |
| 215 | + List<String> idArray = Splitter.on(",").splitToList(idx); | |
| 216 | + //拼接in语句 | |
| 217 | + String inStr = ""; | |
| 218 | + for (String code : idArray) { | |
| 219 | + inStr += (",'" + code+"'"); | |
| 220 | + } | |
| 221 | + inStr = " (" + inStr.substring(1) + ")"; | |
| 222 | + | |
| 223 | + String sql = "select SCHEDULE_DATE_STR,XL_BM, min(sj) as STARTDATE, max(sj) as ENDDATE " + | |
| 224 | + "from (select SCHEDULE_DATE_STR,dfsj, concat_ws('/',dfsj, fcsj_actual) as sj,XL_BM from bsth_c_s_sp_info_real " + | |
| 225 | + "where schedule_date_str like :month and bc_type='normal' and dfsj is not null and xl_bm in "+inStr+") t group by SCHEDULE_DATE_STR,XL_BM"; | |
| 226 | + | |
| 227 | + MapSqlParameterSource parameters = new MapSqlParameterSource(); | |
| 228 | + parameters.addValue("month", month+"-%"); | |
| 229 | + | |
| 230 | + List<StratEndPunctualityRate> list = jdbcTemplate.query(sql, parameters, new RowMapper<StratEndPunctualityRate>() { | |
| 231 | + @Override | |
| 232 | + public StratEndPunctualityRate mapRow(ResultSet rs, int rowNum) throws SQLException { | |
| 233 | + StratEndPunctualityRate obj = new StratEndPunctualityRate(); | |
| 234 | + obj.setLineCode(rs.getString("XL_BM")); | |
| 235 | + obj.setDateStr(rs.getString("SCHEDULE_DATE_STR")); | |
| 236 | + obj.setStartTime(rs.getString("STARTDATE")); | |
| 237 | + obj.setEndTime(rs.getString("ENDDATE")); | |
| 238 | + obj.setEtRealExecDate(obj.getDateStr()); | |
| 239 | + | |
| 240 | + if(obj.getEndTime().length() == 11){ | |
| 241 | + //末班真实执行日期 | |
| 242 | + LineConfig conf =lineConfigData.get(obj.getLineCode()); | |
| 243 | + String fcsjActual=obj.getEndTime().split("/")[1]; | |
| 244 | + | |
| 245 | + if(fcsjActual.compareTo(conf.getStartOpt()) < 0){ | |
| 246 | + //加一天 | |
| 247 | + obj.setEtRealExecDate(fmtyyyyMMdd.print(fmtyyyyMMdd.parseMillis(obj.getEtRealExecDate()) + DAY_TIME)); | |
| 248 | + } | |
| 249 | + } | |
| 250 | + | |
| 251 | + return obj; | |
| 252 | + } | |
| 253 | + }); | |
| 254 | + return list; | |
| 255 | + } | |
| 212 | 256 | } | ... | ... |
src/main/resources/static/real_control_v2/css/north.css
| ... | ... | @@ -79,4 +79,18 @@ |
| 79 | 79 | margin-left: -76px; |
| 80 | 80 | font-size: 18px; |
| 81 | 81 | display: none; |
| 82 | +} | |
| 83 | + | |
| 84 | +.uk-dropdown.dropdown-column-2{ | |
| 85 | + width: 336px; | |
| 86 | +} | |
| 87 | + | |
| 88 | +#north_toolbar_panel li.event a i{ | |
| 89 | + margin-right: 4px; | |
| 90 | + color: #b4b2b2; | |
| 91 | + font-size: 12px; | |
| 92 | +} | |
| 93 | + | |
| 94 | +#north_toolbar_panel li.event a:hover i{ | |
| 95 | + color: #e9e4e4; | |
| 82 | 96 | } |
| 83 | 97 | \ No newline at end of file | ... | ... |
src/main/resources/static/real_control_v2/fragments/north/nav/charts/s_e_punctuality_rate_line.html
0 → 100644
| 1 | +<div class="uk-modal" id="s-e-punctuality-rate-line-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 class="uk-panel uk-panel-box uk-panel-box-primary" style="margin-bottom: 10px;"> | |
| 8 | + <form class="uk-form search-form"> | |
| 9 | + <fieldset data-uk-margin> | |
| 10 | + <div class="uk-form-icon"> | |
| 11 | + <i class="uk-icon-calendar"></i> | |
| 12 | + <input type="month" id="monthInput"> | |
| 13 | + </div> | |
| 14 | + <button class="uk-button" id="countBtn" >统计</button> | |
| 15 | + </fieldset> | |
| 16 | + </form> | |
| 17 | + </div> | |
| 18 | + | |
| 19 | + <div class="chart-wrap" style="height: 570px;"> | |
| 20 | + | |
| 21 | + </div> | |
| 22 | + | |
| 23 | + <div class="load-panel"> | |
| 24 | + <i class="uk-icon-spinner uk-icon-spin"></i> | |
| 25 | + 正在汇总数据 | |
| 26 | + </div> | |
| 27 | + </div> | |
| 28 | + | |
| 29 | + <script> | |
| 30 | + (function () { | |
| 31 | + | |
| 32 | + var modal = '#s-e-punctuality-rate-line-modal'; | |
| 33 | + var chartObj; | |
| 34 | + | |
| 35 | + | |
| 36 | + var gb_option = { | |
| 37 | + timeline: { | |
| 38 | + axisType: 'category', | |
| 39 | + label: { | |
| 40 | + formatter: function (s, a) { | |
| 41 | + return s.slice(8).length==1?'0'+s.slice(8):s.slice(8); | |
| 42 | + } | |
| 43 | + }, | |
| 44 | + x: 20, | |
| 45 | + x2: 5 | |
| 46 | + } | |
| 47 | + }; | |
| 48 | + | |
| 49 | + | |
| 50 | + $(modal).on('init', function (e, data) { | |
| 51 | + //默认当前月 | |
| 52 | + var m = moment().format('YYYY-MM'); | |
| 53 | + $('#monthInput', modal).val(m); | |
| 54 | + | |
| 55 | + chartObj = echarts.init($('.chart-wrap', modal)[0]); | |
| 56 | + chartObj.on('click', chartObjClickHandler); | |
| 57 | + renderChart(); | |
| 58 | + | |
| 59 | + }); | |
| 60 | + | |
| 61 | + //实发准点率 -dfsj 待发时间戳(秒),sfsj 实发时间戳(秒) | |
| 62 | + function calcPunctuality(dfsj, sfsj){ | |
| 63 | + var diff=(dfsj-sfsj)/60; | |
| 64 | + var rs=0; | |
| 65 | + if(diff > 0){ | |
| 66 | + if(diff <= 1) | |
| 67 | + rs=1; | |
| 68 | + else | |
| 69 | + rs=(10 - (diff - 1)) / 10; | |
| 70 | + } | |
| 71 | + else{ | |
| 72 | + if(Math.abs(diff) < 3) | |
| 73 | + rs=1; | |
| 74 | + else | |
| 75 | + rs=(10 - (Math.abs(diff) - 3)) / 10; | |
| 76 | + } | |
| 77 | + | |
| 78 | + return rs<0?0:rs; | |
| 79 | + } | |
| 80 | + | |
| 81 | + //计算准点率 | |
| 82 | + function calcPunctualityRate(data){ | |
| 83 | + var line2Reate={}, seff, eeff, fs="YYYY-MM-DDHH:mm"; | |
| 84 | + for(var lineCode in data){ | |
| 85 | + seff=0; | |
| 86 | + eeff=0; | |
| 87 | + $.each(data[lineCode], function(){ | |
| 88 | + //首班时间 | |
| 89 | + if(this.startTime.length == 11){ | |
| 90 | + var arr=this.startTime.split('/'); | |
| 91 | + var sDfsj=moment(this.etRealExecDate+arr[0], fs).format('X'), | |
| 92 | + sSfsj=moment(this.etRealExecDate+arr[1], fs).format('X'); | |
| 93 | + | |
| 94 | + seff=calcPunctuality(sDfsj, sSfsj); | |
| 95 | + } | |
| 96 | + else | |
| 97 | + this.s_isPunctuality=-1; | |
| 98 | + //末班时间 | |
| 99 | + if(this.endTime.length == 11){ | |
| 100 | + var arr=this.endTime.split('/'); | |
| 101 | + var eDfsj=moment(this.etRealExecDate+arr[0], fs).format('X'), | |
| 102 | + eSfsj=moment(this.etRealExecDate+arr[1], fs).format('X'); | |
| 103 | + | |
| 104 | + eeff=calcPunctuality(eDfsj, eSfsj); | |
| 105 | + } | |
| 106 | + else | |
| 107 | + this.e_isPunctuality=-1; | |
| 108 | + }); | |
| 109 | + | |
| 110 | + line2Reate[lineCode]={ | |
| 111 | + seff: (seff*100).toFixed(2), | |
| 112 | + eeff: (eeff*100).toFixed(2) | |
| 113 | + }; | |
| 114 | + } | |
| 115 | + | |
| 116 | + return line2Reate; | |
| 117 | + } | |
| 118 | + | |
| 119 | + $('#countBtn', modal).on('click', renderChart); | |
| 120 | + | |
| 121 | + var renderData; | |
| 122 | + function renderChart(){ | |
| 123 | + //时间轴数据 | |
| 124 | + var lastdate = moment().format('DD') | |
| 125 | + ,month = $('#monthInput', modal).val(); | |
| 126 | + if(month!=moment().format('YYYY-MM')){ | |
| 127 | + //不是当前月 | |
| 128 | + lastdate = new Date(month.split('-')[0],month.split('-')[1],0).getDate(); | |
| 129 | + } | |
| 130 | + | |
| 131 | + var timeData = []; | |
| 132 | + for (var i = 0; i < lastdate; i++) | |
| 133 | + timeData.push(month + '-' + (i + 1)); | |
| 134 | + //时间轴 | |
| 135 | + gb_option.timeline.data = timeData; | |
| 136 | + gb_option.timeline.currentIndex=timeData.length-1; | |
| 137 | + | |
| 138 | + //xAxis | |
| 139 | + var xAxisData=[],lineCodeArr=[]; | |
| 140 | + $.each(gb_data_basic.activeLines, function(){ | |
| 141 | + xAxisData.push(this.name); | |
| 142 | + lineCodeArr.push(this.lineCode); | |
| 143 | + }); | |
| 144 | + | |
| 145 | + | |
| 146 | + $('.load-panel', modal).show(); | |
| 147 | + $('#countBtn', modal).attr('disabled', 'disabled'); | |
| 148 | + //统计数据 | |
| 149 | + gb_common.$get('/realCharts/sePunctualityRateLine', {idx: gb_data_basic.line_idx, month: $('#monthInput', modal).val()}, function (rs) { | |
| 150 | + | |
| 151 | + if(!rs || rs.length==0){ | |
| 152 | + notify_err("缺少" + month + "的数据"); | |
| 153 | + $('.load-panel', modal).hide(); | |
| 154 | + $('#countBtn', modal).removeAttr('disabled'); | |
| 155 | + return; | |
| 156 | + } | |
| 157 | + | |
| 158 | + //日期分组数据 | |
| 159 | + var groupList=gb_common.groupBy(rs, 'dateStr') | |
| 160 | + ,data=[], opt={}; | |
| 161 | + | |
| 162 | + renderData=groupList; | |
| 163 | + var subData,eData; | |
| 164 | + for(var date in groupList){ | |
| 165 | + //lineCode再次分组,计算准点率 | |
| 166 | + var line2Reate=calcPunctualityRate(gb_common.groupBy(groupList[date],'lineCode')); | |
| 167 | + | |
| 168 | + sData=[], eData=[]; | |
| 169 | + //subData=[]; | |
| 170 | + $.each(lineCodeArr, function(i, code){ | |
| 171 | + sData.push({ | |
| 172 | + value: line2Reate[code]?line2Reate[code].seff:0, | |
| 173 | + date:date, | |
| 174 | + lineCode: code | |
| 175 | + }); | |
| 176 | + | |
| 177 | + eData.push({ | |
| 178 | + value: line2Reate[code]?line2Reate[code].eeff:0, | |
| 179 | + date:date, | |
| 180 | + lineCode: code | |
| 181 | + }); | |
| 182 | + }); | |
| 183 | + | |
| 184 | + data.push({ | |
| 185 | + legend: { | |
| 186 | + data: ['首班', '末班'] | |
| 187 | + }, | |
| 188 | + grid: {x: 30, x2: 5, height: 390, y: 94, y2: 50}, | |
| 189 | + tooltip: { | |
| 190 | + 'trigger': 'axis', | |
| 191 | + axisPointer: { | |
| 192 | + type: 'shadow' | |
| 193 | + } | |
| 194 | + }, | |
| 195 | + toolbox: {'show': false}, | |
| 196 | + calculable: true, | |
| 197 | + xAxis: [{ | |
| 198 | + 'type': 'category', | |
| 199 | + 'data': xAxisData | |
| 200 | + }], | |
| 201 | + yAxis: { | |
| 202 | + 'type': 'value', | |
| 203 | + 'name': '准点率', | |
| 204 | + 'min': 0, | |
| 205 | + 'max': 100 | |
| 206 | + }, | |
| 207 | + title: { | |
| 208 | + text: date + '首末班次准点率', | |
| 209 | + subtext: '线路首末班发车数据(快1慢3准点,差值每分钟降10点)' | |
| 210 | + }, | |
| 211 | + text: date + '发车率', | |
| 212 | + series: [{ | |
| 213 | + name: '首班', | |
| 214 | + type: 'bar', | |
| 215 | + data: sData | |
| 216 | + }, | |
| 217 | + { | |
| 218 | + name: '末班', | |
| 219 | + type: 'bar', | |
| 220 | + data: eData | |
| 221 | + }] | |
| 222 | + }); | |
| 223 | + } | |
| 224 | + | |
| 225 | + $('.load-panel', modal).hide(); | |
| 226 | + $('#countBtn', modal).removeAttr('disabled'); | |
| 227 | + gb_option.options=data; | |
| 228 | + chartObj.setOption(gb_option); | |
| 229 | + }); | |
| 230 | + } | |
| 231 | + | |
| 232 | + function chartObjClickHandler(obj) { | |
| 233 | + if(obj.componentType!='series' || obj.componentSubType!='bar') | |
| 234 | + return; | |
| 235 | + | |
| 236 | + var lineGroupData=gb_common.groupBy(renderData[obj.data.date],'lineCode'); | |
| 237 | + var list=lineGroupData[obj.data.lineCode]; | |
| 238 | + //console.log('show list', list); | |
| 239 | + | |
| 240 | + $.get('/real_control_v2/fragments/north/nav/charts/strat_end_punctuality_rate_dateil.html', function(htmlStr){ | |
| 241 | + $(document.body).append(htmlStr); | |
| 242 | + var detailModal='#s-e-punctuality-rate-dateil-modal'; | |
| 243 | + var elem = UIkit.modal(detailModal, {bgclose: true,modal:false}).show(); | |
| 244 | + $(detailModal).trigger('init', {list: list}); | |
| 245 | + }) | |
| 246 | + } | |
| 247 | + })(); | |
| 248 | + </script> | |
| 249 | +</div> | ... | ... |
src/main/resources/static/real_control_v2/fragments/north/nav/charts/strat_end_punctuality_rate.html
src/main/resources/static/real_control_v2/fragments/north/nav/charts/strat_end_punctuality_rate_dateil.html
| ... | ... | @@ -26,24 +26,10 @@ |
| 26 | 26 | <td>{{obj.nbbm}}</td> |
| 27 | 27 | <td> |
| 28 | 28 | {{obj.startTime}} |
| 29 | - {{if obj.s_isPunctuality}} | |
| 30 | - {{if obj.s_isPunctuality==-1}} | |
| 31 | - <div class="uk-badge uk-badge-danger">无实发</div> | |
| 32 | - {{/if}} | |
| 33 | - {{else}} | |
| 34 | - <div class="uk-badge uk-badge-danger">误点</div> | |
| 35 | - {{/if}} | |
| 36 | 29 | </td> |
| 37 | 30 | |
| 38 | 31 | <td> |
| 39 | 32 | {{obj.endTime}} |
| 40 | - {{if obj.e_isPunctuality}} | |
| 41 | - {{if obj.e_isPunctuality==-1}} | |
| 42 | - <div class="uk-badge uk-badge-danger">无实发</div> | |
| 43 | - {{/if}} | |
| 44 | - {{else}} | |
| 45 | - <div class="uk-badge uk-badge-danger">误点</div> | |
| 46 | - {{/if}} | |
| 47 | 33 | </td> |
| 48 | 34 | </tr> |
| 49 | 35 | {{/each}} | ... | ... |
src/main/resources/static/real_control_v2/fragments/north/toolbar.html
| ... | ... | @@ -7,8 +7,9 @@ |
| 7 | 7 | </a> |
| 8 | 8 | <ul class="uk-navbar-nav"> |
| 9 | 9 | {{each list as obj i}} |
| 10 | - <li class="uk-parent {{obj.disabled}}" data-uk-dropdown="" aria-haspopup="true" aria-expanded="false"> | |
| 10 | + <li class="uk-parent " data-uk-dropdown="{{if obj.columns}}{pos:'top-right'}{{/if}}" aria-haspopup="true" aria-expanded="false"> | |
| 11 | 11 | <a>{{obj.text}} <i class="uk-icon-caret-down"></i></a> |
| 12 | + {{if obj.children != null}} | |
| 12 | 13 | <div class="uk-dropdown uk-dropdown-navbar uk-dropdown-bottom" style="top: 40px; left: 0px;"> |
| 13 | 14 | <ul class="uk-nav uk-nav-navbar"> |
| 14 | 15 | {{each obj.children as c j}} |
| ... | ... | @@ -18,11 +19,39 @@ |
| 18 | 19 | {{else if c.divider}} |
| 19 | 20 | <li class="uk-nav-divider"></li> |
| 20 | 21 | {{else}} |
| 21 | - <li class="event {{obj.disabled}}"><a data-event="{{c.event}}">{{c.text}}</a></li> | |
| 22 | + <li class="event"><a data-event="{{c.event}}">{{c.text}}</a></li> | |
| 22 | 23 | {{/if}} |
| 23 | 24 | {{/each}} |
| 24 | 25 | </ul> |
| 25 | 26 | </div> |
| 27 | + {{else if obj.columns}} | |
| 28 | + <div class="uk-dropdown {{obj.clazz}}"> | |
| 29 | + <div class="uk-grid uk-dropdown-grid"> | |
| 30 | + {{each obj.grid as cls s}} | |
| 31 | + <div class="{{obj.cls_class}}"> | |
| 32 | + <ul class="uk-nav uk-nav-dropdown uk-panel"> | |
| 33 | + {{each cls as c z}} | |
| 34 | + {{if c.header}} | |
| 35 | + <li class="uk-nav-header">{{c.text}}</li> | |
| 36 | + | |
| 37 | + {{else if c.divider}} | |
| 38 | + <li class="uk-nav-divider"></li> | |
| 39 | + {{else}} | |
| 40 | + <li class="event"> | |
| 41 | + <a data-event="{{c.event}}"> | |
| 42 | + {{if c.icon != null}} | |
| 43 | + <i class="{{c.icon}}"></i> | |
| 44 | + {{/if}} | |
| 45 | + {{c.text}}</a> | |
| 46 | + </li> | |
| 47 | + {{/if}} | |
| 48 | + {{/each}} | |
| 49 | + </ul> | |
| 50 | + </div> | |
| 51 | + {{/each}} | |
| 52 | + </div> | |
| 53 | + </div> | |
| 54 | + {{/if}} | |
| 26 | 55 | </li> |
| 27 | 56 | {{/each}} |
| 28 | 57 | </ul> | ... | ... |
src/main/resources/static/real_control_v2/js/data/json/back
| 1 | -[ { | |
| 2 | - "id": 1, | |
| 3 | - "text": "数据&统计", | |
| 4 | - "children": [ | |
| 5 | - { | |
| 6 | - "id": 1.1, | |
| 7 | - "text": "统计分析", | |
| 8 | - "header": 1 | |
| 9 | - }, | |
| 10 | - { | |
| 11 | - "id": 1.2, | |
| 12 | - "text": "出车率", | |
| 13 | - "event": "turnout_rate" | |
| 14 | - }, | |
| 15 | - { | |
| 16 | - "id": 1.3, | |
| 17 | - "text": "设备上线率", | |
| 18 | - "event": "device_online_rate" | |
| 19 | - }, | |
| 20 | - { | |
| 21 | - "id": 1.4, | |
| 22 | - "text": "首末班次准点率", | |
| 23 | - "event": "s_e_punctuality_rate" | |
| 24 | - },{ | |
| 25 | - "id": 1.5, | |
| 26 | - "text": "班次执行率", | |
| 27 | - "event": "sch_execution_rate" | |
| 28 | - } | |
| 29 | - ] | |
| 30 | - }, { | |
| 1 | +[ { | |
| 2 | + "id": 1, | |
| 3 | + "text": "数据&统计", | |
| 4 | + "clazz": "dropdown-column-2", | |
| 5 | + "columns": true, | |
| 6 | + "cls_class": "uk-width-1-2", | |
| 7 | + "grid": [ | |
| 8 | + [ | |
| 9 | + { | |
| 10 | + "id": 1.12, | |
| 11 | + "text": "数据管理", | |
| 12 | + "header": 1 | |
| 13 | + }, | |
| 14 | + { | |
| 15 | + "id": 1.52, | |
| 16 | + "text": "历史班次维护", | |
| 17 | + "event": "history_sch_maintain" | |
| 18 | + } | |
| 19 | + ], | |
| 20 | + [ | |
| 21 | + { | |
| 22 | + "id": 1.1, | |
| 23 | + "text": "统计分析", | |
| 24 | + "header": 1 | |
| 25 | + }, | |
| 26 | + { | |
| 27 | + "id": 1.2, | |
| 28 | + "text": "出车率", | |
| 29 | + "event": "turnout_rate", | |
| 30 | + "icon": "uk-icon-pie-chart" | |
| 31 | + }, | |
| 32 | + { | |
| 33 | + "id": 1.3, | |
| 34 | + "text": "设备上线率", | |
| 35 | + "event": "device_online_rate", | |
| 36 | + "icon": "uk-icon-pie-chart" | |
| 37 | + }, | |
| 38 | + { | |
| 39 | + "id": 1.4, | |
| 40 | + "divider": true | |
| 41 | + }, | |
| 42 | + { | |
| 43 | + "id": 1.5, | |
| 44 | + "text": "班次执行率", | |
| 45 | + "event": "sch_exec_rate", | |
| 46 | + "icon": "uk-icon-pie-chart" | |
| 47 | + }, | |
| 48 | + { | |
| 49 | + "id": 1.6, | |
| 50 | + "text": "线路首末班准点率", | |
| 51 | + "event": "s_e_punctuality_rate_line", | |
| 52 | + "icon": "uk-icon-pie-chart" | |
| 53 | + }, | |
| 54 | + { | |
| 55 | + "id": 1.7, | |
| 56 | + "text": "车辆首末班准点率", | |
| 57 | + "event": "s_e_punctuality_rate", | |
| 58 | + "icon": "uk-icon-pie-chart" | |
| 59 | + } | |
| 60 | + ] | |
| 61 | + ] | |
| 62 | + }, { | |
| 31 | 63 | "id": 2, |
| 32 | 64 | "text": "车载设备", |
| 33 | 65 | "children": [{ | ... | ... |
src/main/resources/static/real_control_v2/js/data/json/north_toolbar.json
| ... | ... | @@ -2,27 +2,57 @@ |
| 2 | 2 | { |
| 3 | 3 | "id": 1, |
| 4 | 4 | "text": "数据&统计", |
| 5 | - "children": [ | |
| 6 | - { | |
| 7 | - "id": 1.1, | |
| 8 | - "text": "统计分析", | |
| 9 | - "header": 1 | |
| 10 | - }, | |
| 11 | - { | |
| 12 | - "id": 1.2, | |
| 13 | - "text": "出车率", | |
| 14 | - "event": "turnout_rate" | |
| 15 | - }, | |
| 16 | - { | |
| 17 | - "id": 1.3, | |
| 18 | - "text": "设备上线率", | |
| 19 | - "event": "device_online_rate" | |
| 20 | - }, | |
| 21 | - { | |
| 22 | - "id": 1.4, | |
| 23 | - "text": "首末班次准点率", | |
| 24 | - "event": "s_e_punctuality_rate" | |
| 25 | - } | |
| 5 | + "clazz": "dropdown-column-2", | |
| 6 | + "columns": true, | |
| 7 | + "cls_class": "uk-width-1-2", | |
| 8 | + "grid": [ | |
| 9 | + [ | |
| 10 | + { | |
| 11 | + "id": 1.12, | |
| 12 | + "text": "数据管理", | |
| 13 | + "header": 1 | |
| 14 | + }, | |
| 15 | + { | |
| 16 | + "id": 1.52, | |
| 17 | + "text": "...", | |
| 18 | + "event": "history_sch_maintain" | |
| 19 | + } | |
| 20 | + ], | |
| 21 | + [ | |
| 22 | + { | |
| 23 | + "id": 1.1, | |
| 24 | + "text": "统计分析", | |
| 25 | + "header": 1 | |
| 26 | + }, | |
| 27 | + { | |
| 28 | + "id": 1.2, | |
| 29 | + "text": "出车率", | |
| 30 | + "event": "turnout_rate", | |
| 31 | + "icon": "uk-icon-pie-chart" | |
| 32 | + }, | |
| 33 | + { | |
| 34 | + "id": 1.3, | |
| 35 | + "text": "设备上线率", | |
| 36 | + "event": "device_online_rate", | |
| 37 | + "icon": "uk-icon-pie-chart" | |
| 38 | + }, | |
| 39 | + { | |
| 40 | + "id": 1.4, | |
| 41 | + "divider": true | |
| 42 | + }, | |
| 43 | + { | |
| 44 | + "id": 1.6, | |
| 45 | + "text": "线路首末班准点率", | |
| 46 | + "event": "s_e_punctuality_rate_line", | |
| 47 | + "icon": "uk-icon-pie-chart" | |
| 48 | + }, | |
| 49 | + { | |
| 50 | + "id": 1.7, | |
| 51 | + "text": "车辆首末班准点率", | |
| 52 | + "event": "s_e_punctuality_rate", | |
| 53 | + "icon": "uk-icon-pie-chart" | |
| 54 | + } | |
| 55 | + ] | |
| 26 | 56 | ] |
| 27 | 57 | }, |
| 28 | 58 | { | ... | ... |
src/main/resources/static/real_control_v2/js/north/toolbar.js
| ... | ... | @@ -40,9 +40,6 @@ var gb_northToolbar = (function() { |
| 40 | 40 | var handler = { |
| 41 | 41 | // device report list |
| 42 | 42 | device_report: function(){ |
| 43 | - /*$.get('/directive/findAll80', {requestCode: -1}, function(rs){ | |
| 44 | - console.log(rs); | |
| 45 | - });*/ | |
| 46 | 43 | open_modal('/real_control_v2/fragments/north/nav/report_80.html', {}, modal_opts); |
| 47 | 44 | }, |
| 48 | 45 | directive_history: function(){ |
| ... | ... | @@ -62,6 +59,9 @@ var gb_northToolbar = (function() { |
| 62 | 59 | }, |
| 63 | 60 | s_e_punctuality_rate: function () { |
| 64 | 61 | open_modal('/real_control_v2/fragments/north/nav/charts/strat_end_punctuality_rate.html', {}, modal_opts); |
| 62 | + }, | |
| 63 | + s_e_punctuality_rate_line: function () { | |
| 64 | + open_modal('/real_control_v2/fragments/north/nav/charts/s_e_punctuality_rate_line.html', {}, modal_opts); | |
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | })(); | ... | ... |
src/main/resources/static/real_control_v2/js/utils/svg_chart_tooltip.js
| ... | ... | @@ -115,6 +115,9 @@ var gb_svg_tooltip = (function() { |
| 115 | 115 | var carIcon = '/assets/img/bus1.png'; |
| 116 | 116 | //,normalIcon = '/assets/img/Marker_32px_583000_easyicon.net.png'; |
| 117 | 117 | var show_baidu_map = function(elem, list) { |
| 118 | + if(!window.BMap) | |
| 119 | + return; | |
| 120 | + | |
| 118 | 121 | if(!isArray(list)) |
| 119 | 122 | list=[list]; |
| 120 | 123 | //init map | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/real_monitor/js/map/platform/baidu.js
| ... | ... | @@ -14,6 +14,10 @@ var gb_map_baidu = (function(){ |
| 14 | 14 | var baiduInstance = { |
| 15 | 15 | //初始化 |
| 16 | 16 | init: function(){ |
| 17 | + if(!window.BMap){ | |
| 18 | + alert('地图没有加载成功,请确认是否能正常连接外网!!'); | |
| 19 | + return; | |
| 20 | + } | |
| 17 | 21 | map = new BMap.Map($(gb_map_consts.mapContainer)[0]); |
| 18 | 22 | //中心点和缩放级别 |
| 19 | 23 | map.centerAndZoom(new BMap.Point(gb_map_consts.center_point.lng, gb_map_consts.center_point.lat), 15); | ... | ... |