Commit d1d7110befeefa6dff22dc7ba7860364f8340073
1 parent
40601a9f
update...
Showing
12 changed files
with
236 additions
and
27 deletions
src/main/resources/static/real_control_v2/css/main.css
| @@ -1141,6 +1141,10 @@ dl.intimity span.late-badge{ | @@ -1141,6 +1141,10 @@ dl.intimity span.late-badge{ | ||
| 1141 | color: red; | 1141 | color: red; |
| 1142 | } | 1142 | } |
| 1143 | 1143 | ||
| 1144 | +.tip_task_list dl.service.temp_add{ | ||
| 1145 | + color: #9C27B0; | ||
| 1146 | +} | ||
| 1147 | + | ||
| 1144 | .tip_task_list dl span{ | 1148 | .tip_task_list dl span{ |
| 1145 | margin: 0; | 1149 | margin: 0; |
| 1146 | width: auto; | 1150 | width: auto; |
| @@ -1719,4 +1723,17 @@ dl.active>dd.disabled{ | @@ -1719,4 +1723,17 @@ dl.active>dd.disabled{ | ||
| 1719 | 1723 | ||
| 1720 | .ct_eye_icon.active{ | 1724 | .ct_eye_icon.active{ |
| 1721 | color: #444; | 1725 | color: #444; |
| 1726 | +} | ||
| 1727 | + | ||
| 1728 | +#tempScheduleContent .forms::-webkit-scrollbar { | ||
| 1729 | + width: 19px; | ||
| 1730 | + height: 16px; | ||
| 1731 | +} | ||
| 1732 | + | ||
| 1733 | +.range_2_normal_tt{ | ||
| 1734 | + margin-bottom: 15px; | ||
| 1735 | + border-top: 1px dashed #c7c7c7; | ||
| 1736 | + color: #a6a6a6; | ||
| 1737 | + text-indent: 7px; | ||
| 1738 | + padding-bottom: 5px; | ||
| 1722 | } | 1739 | } |
| 1723 | \ No newline at end of file | 1740 | \ No newline at end of file |
src/main/resources/static/real_control_v2/fragments/line_schedule/badge_tooltip.html
| @@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
| 10 | <dt>备注</dt> | 10 | <dt>备注</dt> |
| 11 | </dl> | 11 | </dl> |
| 12 | {{each tasks as t i}} | 12 | {{each tasks as t i}} |
| 13 | - <dl class="{{t.mileageType}} {{if t.destroy}}destroy{{/if}}"> | 13 | + <dl class="{{t.mileageType}} {{if t.destroy}}destroy{{/if}} {{if t.type1=='临加'}}temp_add{{/if}}"> |
| 14 | <dd> | 14 | <dd> |
| 15 | {{if t.mileageType=="service"}} | 15 | {{if t.mileageType=="service"}} |
| 16 | 营运 | 16 | 营运 |
| @@ -23,6 +23,8 @@ | @@ -23,6 +23,8 @@ | ||
| 23 | <span>(进场)</span> | 23 | <span>(进场)</span> |
| 24 | {{else if t.type2==3}} | 24 | {{else if t.type2==3}} |
| 25 | <span>(出场)</span> | 25 | <span>(出场)</span> |
| 26 | + {{else if t.type1=='临加'}} | ||
| 27 | + <span>(临加)</span> | ||
| 26 | {{/if}} | 28 | {{/if}} |
| 27 | </dd> | 29 | </dd> |
| 28 | <dd> | 30 | <dd> |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/add_custom.html
| @@ -130,6 +130,14 @@ | @@ -130,6 +130,14 @@ | ||
| 130 | function $f(name, f) { | 130 | function $f(name, f) { |
| 131 | return $('[name=' + name + ']', f); | 131 | return $('[name=' + name + ']', f); |
| 132 | } | 132 | } |
| 133 | + | ||
| 134 | + /** | ||
| 135 | + * 备注级联 | ||
| 136 | + */ | ||
| 137 | + $(wrap).on('input', '[name=remarks]', function () { | ||
| 138 | + var nfs = $(this).parents('.sub_task_form_v2').nextAll('.sub_task_form_v2'); | ||
| 139 | + $('[name=remarks]', nfs).val($(this).val()); | ||
| 140 | + }); | ||
| 133 | })(); | 141 | })(); |
| 134 | </script> | 142 | </script> |
| 135 | </div> | 143 | </div> |
| 136 | \ No newline at end of file | 144 | \ No newline at end of file |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/add_in_out.html
| @@ -85,7 +85,7 @@ | @@ -85,7 +85,7 @@ | ||
| 85 | */ | 85 | */ |
| 86 | function repeat_main(f) { | 86 | function repeat_main(f) { |
| 87 | f.addClass('repeat_main'); | 87 | f.addClass('repeat_main'); |
| 88 | - $f('type2', f).html('<option value="1">线路上站点间</option>'); | 88 | + $f('type2', f).html('<option value="1">线路上站点间</option>').attr('disabled', 'disabled'); |
| 89 | $f('mileage', f).val(sch.jhlc).trigger('input'); | 89 | $f('mileage', f).val(sch.jhlc).trigger('input'); |
| 90 | $f('mileageType', f).val('service').attr('disabled', 'disabled'); | 90 | $f('mileageType', f).val('service').attr('disabled', 'disabled'); |
| 91 | //主任务是烂班 | 91 | //主任务是烂班 |
| @@ -105,7 +105,7 @@ | @@ -105,7 +105,7 @@ | ||
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | function repeat_In(f) { | 107 | function repeat_In(f) { |
| 108 | - $f('type2', f).html('<option value="2">进场</option>').trigger('change'); | 108 | + $f('type2', f).html('<option value="2">进场</option>').trigger('change').attr('disabled', 'disabled');; |
| 109 | if (sch.status != -1) | 109 | if (sch.status != -1) |
| 110 | $f('startStation', f).val(sch.zdzCode);//主任务终点进场 | 110 | $f('startStation', f).val(sch.zdzCode);//主任务终点进场 |
| 111 | 111 | ||
| @@ -116,7 +116,7 @@ | @@ -116,7 +116,7 @@ | ||
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | function repeat_Out(f) { | 118 | function repeat_Out(f) { |
| 119 | - $f('type2', f).html('<option value="3">出场</option>').trigger('change'); | 119 | + $f('type2', f).html('<option value="3">出场</option>').trigger('change').attr('disabled', 'disabled');; |
| 120 | 120 | ||
| 121 | var code; | 121 | var code; |
| 122 | if (sch.status != -1) | 122 | if (sch.status != -1) |
| @@ -180,7 +180,7 @@ | @@ -180,7 +180,7 @@ | ||
| 180 | //烂班 | 180 | //烂班 |
| 181 | $f('destroy',half_form)[0].checked=true; | 181 | $f('destroy',half_form)[0].checked=true; |
| 182 | $f('mileageType',half_form).attr('disabled','disabled'); | 182 | $f('mileageType',half_form).attr('disabled','disabled'); |
| 183 | - $f('type2',half_form).html('<option value="1">线路上站点间</option>'); | 183 | + $f('type2',half_form).html('<option value="1">线路上站点间</option>').attr('disabled', 'disabled');; |
| 184 | $('.destroy_reason_wrap',half_form).show(); | 184 | $('.destroy_reason_wrap',half_form).show(); |
| 185 | half_form.attr('destroy', true); | 185 | half_form.attr('destroy', true); |
| 186 | 186 | ||
| @@ -326,6 +326,14 @@ | @@ -326,6 +326,14 @@ | ||
| 326 | }); | 326 | }); |
| 327 | return flag; | 327 | return flag; |
| 328 | } | 328 | } |
| 329 | + | ||
| 330 | + /** | ||
| 331 | + * 备注级联 | ||
| 332 | + */ | ||
| 333 | + $(wrap).on('input', '[name=remarks]', function () { | ||
| 334 | + var nfs = $(this).parents('.sub_task_form_v2').nextAll('.sub_task_form_v2'); | ||
| 335 | + $('[name=remarks]', nfs).val($(this).val()); | ||
| 336 | + }); | ||
| 329 | })(); | 337 | })(); |
| 330 | </script> | 338 | </script> |
| 331 | </div> | 339 | </div> |
| 332 | \ No newline at end of file | 340 | \ No newline at end of file |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/add_range_normal.html
| 1 | <!-- 区间变全程 --> | 1 | <!-- 区间变全程 --> |
| 2 | <div class="add_range_2_normal"> | 2 | <div class="add_range_2_normal"> |
| 3 | - <div class="err_panel">暂不开放使用</div> | ||
| 4 | - <!--<div class="forms"></div> | 3 | + <div class="forms"></div> |
| 5 | 4 | ||
| 6 | <div class="uk-modal-footer uk-text-right" style="margin-top: 5px;"> | 5 | <div class="uk-modal-footer uk-text-right" style="margin-top: 5px;"> |
| 7 | <button type="button" class="uk-button uk-modal-close">取消</button> | 6 | <button type="button" class="uk-button uk-modal-close">取消</button> |
| @@ -10,38 +9,152 @@ | @@ -10,38 +9,152 @@ | ||
| 10 | <script> | 9 | <script> |
| 11 | (function () { | 10 | (function () { |
| 12 | var wrap = '#add-sub-task-main-modal .add_range_2_normal', | 11 | var wrap = '#add-sub-task-main-modal .add_range_2_normal', |
| 13 | - sch,f1,tf1; | 12 | + sch,nextSch,f1,tf1,f2,tf2; |
| 14 | 13 | ||
| 15 | $(wrap).on('init', function (e, data) { | 14 | $(wrap).on('init', function (e, data) { |
| 16 | e.stopPropagation(); | 15 | e.stopPropagation(); |
| 17 | sch = data.sch; | 16 | sch = data.sch; |
| 17 | + nextSch = gb_schedule_table.getNextSch(sch); | ||
| 18 | 18 | ||
| 19 | + if(sch.bcType!='region'){ | ||
| 20 | + $(wrap).html('<div class="err_panel">该模板只能应用区间班次!</div>'); | ||
| 21 | + return; | ||
| 22 | + } | ||
| 19 | f1 = addTaskForm(); | 23 | f1 = addTaskForm(); |
| 20 | - tf1 = addTaskForm(); | ||
| 21 | - tf1.addClass('temp_service'); | 24 | + tf1 = addTaskForm().addClass('temp_service'); |
| 25 | + changeField(f1, tf1); | ||
| 26 | + | ||
| 27 | + //返程也是区间 | ||
| 28 | + if(nextSch.bcType=='region'){ | ||
| 29 | + var u_d_input = '<input name="upDown" type="hidden" value="'+nextSch.xlDir+'">'; | ||
| 30 | + tf1.after('<div class="range_2_normal_tt">返程</div>'); | ||
| 31 | + tf2 = addTaskForm(u_d_input).addClass('temp_service'); | ||
| 32 | + f2 = addTaskForm(u_d_input); | ||
| 33 | + | ||
| 34 | + changeField(f2, tf2); | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + //设置默认值 | ||
| 38 | + setDefaultVal(); | ||
| 22 | }); | 39 | }); |
| 23 | 40 | ||
| 24 | - function addTaskForm() { | 41 | + function addTaskForm(upDownInput) { |
| 25 | var htmlStr = template('sub-task-v2-form-temp', {sch: sch}); | 42 | var htmlStr = template('sub-task-v2-form-temp', {sch: sch}); |
| 26 | var f = $(htmlStr); | 43 | var f = $(htmlStr); |
| 27 | $('.forms', wrap).append(f); | 44 | $('.forms', wrap).append(f); |
| 45 | + | ||
| 46 | + if(upDownInput) | ||
| 47 | + f.append(upDownInput); | ||
| 28 | //字典转换 | 48 | //字典转换 |
| 29 | dictionaryUtils.transformDom($('.nt-dictionary', f)); | 49 | dictionaryUtils.transformDom($('.nt-dictionary', f)); |
| 30 | 50 | ||
| 31 | //班次类型切换 | 51 | //班次类型切换 |
| 32 | $('select[name=type2]', f).trigger('change'); | 52 | $('select[name=type2]', f).trigger('change'); |
| 33 | 53 | ||
| 34 | - //滚动条到底 | ||
| 35 | - $('.forms', wrap).scrollTop($('.forms', wrap)[0].scrollHeight); | ||
| 36 | - | ||
| 37 | f.formValidation({ | 54 | f.formValidation({ |
| 38 | framework: 'uikit', | 55 | framework: 'uikit', |
| 39 | locale: 'zh_CN' | 56 | locale: 'zh_CN' |
| 40 | }).on('add_reason_field', function () { | 57 | }).on('add_reason_field', function () { |
| 41 | $(this).formValidation('addField', 'reason'); | 58 | $(this).formValidation('addField', 'reason'); |
| 42 | }); | 59 | }); |
| 60 | + | ||
| 61 | + $f('type2', f).attr('disabled', 'disabled'); | ||
| 43 | return f; | 62 | return f; |
| 44 | } | 63 | } |
| 64 | + | ||
| 65 | + function $f(name, f) { | ||
| 66 | + return $('[name=' + name + ']', f); | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + function changeField(f, tf) { | ||
| 70 | + $f('type1', tf).val('临加'); | ||
| 71 | + $f('mileageType', tf).html('<option value="service">临加</option>'); | ||
| 72 | + $f('destroy', f).parents('.uk-form-controls').hide(); | ||
| 73 | + $f('destroy', tf).parents('.uk-form-controls').hide(); | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + /** | ||
| 77 | + * 设置默认值 | ||
| 78 | + */ | ||
| 79 | + function setDefaultVal() { | ||
| 80 | + $f('startStation', f1).attr('disabled', 'disabled'); | ||
| 81 | + $f('endStation', f1).val(sch.zdzCode).trigger('change').attr('disabled', 'disabled'); | ||
| 82 | + $f('startStation', tf1).val(sch.zdzCode).trigger('change'); | ||
| 83 | + | ||
| 84 | + //tf1 startDate | ||
| 85 | + $f('startDate', tf1).val($f('endDate', f1).val()).trigger('input'); | ||
| 86 | + if(tf2){ | ||
| 87 | + $('[sch_id_inp]', tf2).val(nextSch.id); | ||
| 88 | + $f('endStation', tf2).val(nextSch.qdzCode).trigger('change'); | ||
| 89 | + } | ||
| 90 | + if(f2){ | ||
| 91 | + $('[sch_id_inp]', f2).val(nextSch.id); | ||
| 92 | + $f('endStation', f2).val(nextSch.zdzCode).attr('disabled', 'disabled'); | ||
| 93 | + $f('startStation', f2).val(nextSch.qdzCode).trigger('change').attr('disabled', 'disabled'); | ||
| 94 | + $f('mileage', f2).val(nextSch.jhlc); | ||
| 95 | + $f('startDate', f2).val($f('endDate', tf2).val()).trigger('change'); | ||
| 96 | + } | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + /** | ||
| 100 | + * 备注级联 | ||
| 101 | + */ | ||
| 102 | + $(wrap).on('input', '[name=remarks]', function () { | ||
| 103 | + var nfs = $(this).parents('.sub_task_form_v2').nextAll('.sub_task_form_v2'); | ||
| 104 | + $('[name=remarks]', nfs).val($(this).val()); | ||
| 105 | + }); | ||
| 106 | + | ||
| 107 | + | ||
| 108 | + //提交 | ||
| 109 | + $('button[type=submit]', wrap).on('click', function () { | ||
| 110 | + $(this).addClass('disabled').attr('disabled','disabled'); | ||
| 111 | + dataArray = []; | ||
| 112 | + $('form.sub_task_form_v2', wrap).data('valid', false) | ||
| 113 | + .formValidation('validate'); | ||
| 114 | + }); | ||
| 115 | + | ||
| 116 | + var dataArray = []; | ||
| 117 | + $(wrap).on('success.form.fv', 'form.sub_task_form_v2', function (e) { | ||
| 118 | + e.preventDefault(); | ||
| 119 | + | ||
| 120 | + dataArray.push($.extend($(this).serializeJSON(), gb_common.getDisabledVal(this))); | ||
| 121 | + $(this).data('valid', true); | ||
| 122 | + | ||
| 123 | + if (allValidSuccess()) { | ||
| 124 | + var i = 0; | ||
| 125 | + (function () { | ||
| 126 | + var f = arguments.callee; | ||
| 127 | + if (i >= dataArray.length) { | ||
| 128 | + UIkit.modal('#add-sub-task-main-modal').hide(); | ||
| 129 | + $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: sch}); | ||
| 130 | + return; | ||
| 131 | + } | ||
| 132 | + var data = dataArray[i]; | ||
| 133 | + gb_common.$post('/childTask', data, function (rs) { | ||
| 134 | + notify_succ('子任务添加成功'); | ||
| 135 | + gb_schedule_table.updateSchedule(rs.t); | ||
| 136 | + i++; | ||
| 137 | + f(); | ||
| 138 | + }); | ||
| 139 | + })(); | ||
| 140 | + } | ||
| 141 | + }); | ||
| 142 | + //校验不过 | ||
| 143 | + $(wrap).on('err.field.fv','form.sub_task_form_v2', function () { | ||
| 144 | + $('button[type=submit]', wrap).removeClass('disabled').removeAttr('disabled'); | ||
| 145 | + }); | ||
| 146 | + | ||
| 147 | + function allValidSuccess() { | ||
| 148 | + var flag = true; | ||
| 149 | + $('form.sub_task_form_v2', wrap).each(function (i, f) { | ||
| 150 | + if(!$(f).data('valid')){ | ||
| 151 | + flag = false; | ||
| 152 | + return false; | ||
| 153 | + } | ||
| 154 | + }); | ||
| 155 | + return flag; | ||
| 156 | + } | ||
| 157 | + | ||
| 45 | })(); | 158 | })(); |
| 46 | - </script>--> | 159 | + </script> |
| 47 | </div> | 160 | </div> |
| 48 | \ No newline at end of file | 161 | \ No newline at end of file |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/add_range_turn.html
| @@ -305,6 +305,14 @@ | @@ -305,6 +305,14 @@ | ||
| 305 | return routes[i].stationCode; | 305 | return routes[i].stationCode; |
| 306 | } | 306 | } |
| 307 | } | 307 | } |
| 308 | + | ||
| 309 | + /** | ||
| 310 | + * 备注级联 | ||
| 311 | + */ | ||
| 312 | + $(wrap).on('input', '[name=remarks]', function () { | ||
| 313 | + var nfs = $(this).parents('.sub_task_form_v2').nextAll('.sub_task_form_v2'); | ||
| 314 | + $('[name=remarks]', nfs).val($(this).val()); | ||
| 315 | + }); | ||
| 308 | })(); | 316 | })(); |
| 309 | </script> | 317 | </script> |
| 310 | </div> | 318 | </div> |
| 311 | \ No newline at end of file | 319 | \ No newline at end of file |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/main.html
| @@ -248,7 +248,7 @@ | @@ -248,7 +248,7 @@ | ||
| 248 | $('.add_range_wrap', modal).trigger('init', data); | 248 | $('.add_range_wrap', modal).trigger('init', data); |
| 249 | //区间变全程 | 249 | //区间变全程 |
| 250 | $('.rangeToNormal', modal).html(st_doms.range_2_normal_dom); | 250 | $('.rangeToNormal', modal).html(st_doms.range_2_normal_dom); |
| 251 | - //$('.add_range_2_normal', modal).trigger('init', data); | 251 | + $('.add_range_2_normal', modal).trigger('init', data); |
| 252 | } | 252 | } |
| 253 | }); | 253 | }); |
| 254 | 254 |
src/main/resources/static/real_control_v2/js/line_schedule/badge_tooltip.js
| @@ -46,10 +46,21 @@ var gb_schedule_badge_tootip = (function () { | @@ -46,10 +46,21 @@ var gb_schedule_badge_tootip = (function () { | ||
| 46 | text: function() { | 46 | text: function() { |
| 47 | var sch = getSch(this); | 47 | var sch = getSch(this); |
| 48 | //子任务排序 | 48 | //子任务排序 |
| 49 | + $.each(sch.cTasks, function () { | ||
| 50 | + if(this.mileageType=='service'){ | ||
| 51 | + if(this.type1=='正常') | ||
| 52 | + this.order_no=0; | ||
| 53 | + else | ||
| 54 | + this.order_no=1; | ||
| 55 | + | ||
| 56 | + if(this.destroy) | ||
| 57 | + this.order_no=2; | ||
| 58 | + } | ||
| 59 | + else | ||
| 60 | + this.order_no=this.type2 + 1; | ||
| 61 | + }); | ||
| 49 | var array = sch.cTasks.sort(function (a, b) { | 62 | var array = sch.cTasks.sort(function (a, b) { |
| 50 | - var an = (a.mileageType=='service'?1:0)+''+(a.destroy?0:1); | ||
| 51 | - var bn = (b.mileageType=='service'?1:0)+''+(b.destroy?0:1); | ||
| 52 | - return parseInt(bn) - parseInt(an); | 63 | + return a.order_no - b.order_no; |
| 53 | }); | 64 | }); |
| 54 | return temps['sch-table-task-tootip-temp']({tasks: array}); | 65 | return temps['sch-table-task-tootip-temp']({tasks: array}); |
| 55 | } | 66 | } |
src/main/resources/static/real_control_v2/mapmonitor/css/real.css
| @@ -1265,7 +1265,7 @@ span.flatpickr-weekday{ | @@ -1265,7 +1265,7 @@ span.flatpickr-weekday{ | ||
| 1265 | } | 1265 | } |
| 1266 | 1266 | ||
| 1267 | .gps-play-back-panel-v3 .trail-info-table{ | 1267 | .gps-play-back-panel-v3 .trail-info-table{ |
| 1268 | - width: 470px; | 1268 | + width: 520px; |
| 1269 | } | 1269 | } |
| 1270 | 1270 | ||
| 1271 | .gps-play-back-panel-v3 .ct_table>.ct_table_body{ | 1271 | .gps-play-back-panel-v3 .ct_table>.ct_table_body{ |
| @@ -1283,17 +1283,20 @@ span.flatpickr-weekday{ | @@ -1283,17 +1283,20 @@ span.flatpickr-weekday{ | ||
| 1283 | } | 1283 | } |
| 1284 | 1284 | ||
| 1285 | .gps-play-back-panel-v3 .trail-info-table dl dt:nth-of-type(1), .gps-play-back-panel-v3 .trail-info-table dl dd:nth-of-type(1) { | 1285 | .gps-play-back-panel-v3 .trail-info-table dl dt:nth-of-type(1), .gps-play-back-panel-v3 .trail-info-table dl dd:nth-of-type(1) { |
| 1286 | - width: 20%; | 1286 | + width: 16%; |
| 1287 | text-indent: 15px; | 1287 | text-indent: 15px; |
| 1288 | } | 1288 | } |
| 1289 | .gps-play-back-panel-v3 .trail-info-table dl dt:nth-of-type(2), .gps-play-back-panel-v3 .trail-info-table dl dd:nth-of-type(2) { | 1289 | .gps-play-back-panel-v3 .trail-info-table dl dt:nth-of-type(2), .gps-play-back-panel-v3 .trail-info-table dl dd:nth-of-type(2) { |
| 1290 | - width: 16%; | 1290 | + width: 12%; |
| 1291 | } | 1291 | } |
| 1292 | .gps-play-back-panel-v3 .trail-info-table dl dt:nth-of-type(3), .gps-play-back-panel-v3 .trail-info-table dl dd:nth-of-type(3) { | 1292 | .gps-play-back-panel-v3 .trail-info-table dl dt:nth-of-type(3), .gps-play-back-panel-v3 .trail-info-table dl dd:nth-of-type(3) { |
| 1293 | - width: 13%; | 1293 | + width: 10%; |
| 1294 | } | 1294 | } |
| 1295 | .gps-play-back-panel-v3 .trail-info-table dl dt:nth-of-type(4), .gps-play-back-panel-v3 .trail-info-table dl dd:nth-of-type(4) { | 1295 | .gps-play-back-panel-v3 .trail-info-table dl dt:nth-of-type(4), .gps-play-back-panel-v3 .trail-info-table dl dd:nth-of-type(4) { |
| 1296 | - width: 50%; | 1296 | + width: 40%; |
| 1297 | +} | ||
| 1298 | +.gps-play-back-panel-v3 .trail-info-table dl dt:nth-of-type(5), .gps-play-back-panel-v3 .trail-info-table dl dd:nth-of-type(5) { | ||
| 1299 | + width: 21%; | ||
| 1297 | border-right: 0; | 1300 | border-right: 0; |
| 1298 | } | 1301 | } |
| 1299 | 1302 |
src/main/resources/static/real_control_v2/mapmonitor/fragments/playback_v3/layout.html
src/main/resources/static/real_control_v2/mapmonitor/fragments/playback_v3/left.html
| @@ -75,6 +75,7 @@ | @@ -75,6 +75,7 @@ | ||
| 75 | <dt>速度</dt> | 75 | <dt>速度</dt> |
| 76 | <dt>上下行</dt> | 76 | <dt>上下行</dt> |
| 77 | <dt>所在路段</dt> | 77 | <dt>所在路段</dt> |
| 78 | + <dt>车载线路</dt> | ||
| 78 | </dl> | 79 | </dl> |
| 79 | </div> | 80 | </div> |
| 80 | <div class="ct_table_body"></div> | 81 | <div class="ct_table_body"></div> |
| @@ -204,6 +205,11 @@ | @@ -204,6 +205,11 @@ | ||
| 204 | show_load_btn(this); | 205 | show_load_btn(this); |
| 205 | //查询数据 | 206 | //查询数据 |
| 206 | get_server_trail_data(data, function (rs) { | 207 | get_server_trail_data(data, function (rs) { |
| 208 | + //线路名称 | ||
| 209 | + var code2Name = gb_data_basic.lineCode2NameAll(); | ||
| 210 | + $.each(rs.list, function () { | ||
| 211 | + this.lineName = code2Name[this.lineId]; | ||
| 212 | + }); | ||
| 207 | //排序 | 213 | //排序 |
| 208 | rs.list.sort(function (a, b) { | 214 | rs.list.sort(function (a, b) { |
| 209 | return parseInt((a.ts - b.ts) + '' + (a.stop_no - b.stop_no)); | 215 | return parseInt((a.ts - b.ts) + '' + (a.stop_no - b.stop_no)); |
src/main/resources/static/real_control_v2/mapmonitor/fragments/playback_v3/right.html
| @@ -77,6 +77,7 @@ | @@ -77,6 +77,7 @@ | ||
| 77 | var step; | 77 | var step; |
| 78 | var timeTip = $('.ui-slider-tip', rightWrap); | 78 | var timeTip = $('.ui-slider-tip', rightWrap); |
| 79 | var scale = $('.scale', progress); | 79 | var scale = $('.scale', progress); |
| 80 | + var play_before_flag; | ||
| 80 | 81 | ||
| 81 | $('.play-back-tools-wrap', rightWrap).on('ready-to-play', function (e, data) { | 82 | $('.play-back-tools-wrap', rightWrap).on('ready-to-play', function (e, data) { |
| 82 | e.stopPropagation(); | 83 | e.stopPropagation(); |
| @@ -94,6 +95,12 @@ | @@ -94,6 +95,12 @@ | ||
| 94 | $('.top-btn-list', rightWrap).removeClass('disabled').find('[disabled]').removeAttr('disabled'); | 95 | $('.top-btn-list', rightWrap).removeClass('disabled').find('[disabled]').removeAttr('disabled'); |
| 95 | //xlPolyline.lineId=gpsArray[0].lineId; | 96 | //xlPolyline.lineId=gpsArray[0].lineId; |
| 96 | //xlPolyline.upDown=gpsArray[0].upDown; | 97 | //xlPolyline.upDown=gpsArray[0].upDown; |
| 98 | + | ||
| 99 | + /** | ||
| 100 | + * 默认显示完整的地图轨迹 | ||
| 101 | + */ | ||
| 102 | + play_before_goto(gpsArray.length - 1); | ||
| 103 | + play_before_flag=true; | ||
| 97 | }); | 104 | }); |
| 98 | 105 | ||
| 99 | 106 | ||
| @@ -176,6 +183,11 @@ | @@ -176,6 +183,11 @@ | ||
| 176 | return; | 183 | return; |
| 177 | 184 | ||
| 178 | if(!$(this).hasClass('pause')){ | 185 | if(!$(this).hasClass('pause')){ |
| 186 | + //第一次点击播放,清除一下 | ||
| 187 | + if(play_before_flag){ | ||
| 188 | + reset(); | ||
| 189 | + play_before_flag = false; | ||
| 190 | + } | ||
| 179 | $(this).addClass('pause'); | 191 | $(this).addClass('pause'); |
| 180 | if(index>=gpsArray.length-1){ | 192 | if(index>=gpsArray.length-1){ |
| 181 | goto(0); | 193 | goto(0); |
| @@ -441,9 +453,9 @@ | @@ -441,9 +453,9 @@ | ||
| 441 | trailPolyline.setPath(trailArray); | 453 | trailPolyline.setPath(trailArray); |
| 442 | } | 454 | } |
| 443 | 455 | ||
| 444 | - //最多记录1000个点位轨迹线条 | ||
| 445 | - if(trailArray.length > 1000) | ||
| 446 | - trailArray = trailArray.slice(trailArray.length - 1000); | 456 | + //最多记录4000个点位轨迹线条 |
| 457 | + if(trailArray.length > 4000) | ||
| 458 | + trailArray = trailArray.slice(trailArray.length - 4000); | ||
| 447 | } | 459 | } |
| 448 | 460 | ||
| 449 | var trailTbody = leftWrap + ' .trail-info-table .ct_table_body', | 461 | var trailTbody = leftWrap + ' .trail-info-table .ct_table_body', |
| @@ -610,6 +622,26 @@ | @@ -610,6 +622,26 @@ | ||
| 610 | } | 622 | } |
| 611 | } | 623 | } |
| 612 | 624 | ||
| 625 | + function play_before_goto(ei) { | ||
| 626 | + if (ei < 0 || ei >= gpsArray.length) | ||
| 627 | + return; | ||
| 628 | + | ||
| 629 | + var gps = gpsArray[ei]; | ||
| 630 | + //更新gps marker | ||
| 631 | + drawCarMarker(gps); | ||
| 632 | + //更新轨迹线条 | ||
| 633 | + trailArray = []; | ||
| 634 | + var i = 0; | ||
| 635 | + if(ei > 1000) | ||
| 636 | + i = ei - 1000; | ||
| 637 | + for (; i < ei; i++) | ||
| 638 | + trailArray.push(new BMap.Point(gpsArray[i].bd_lon, gpsArray[i].bd_lat)); | ||
| 639 | + updateTrailLine(gpsArray[ei], ei); | ||
| 640 | + | ||
| 641 | + //居中 | ||
| 642 | + map.panTo(gpsMarker.getPosition()); | ||
| 643 | + } | ||
| 644 | + | ||
| 613 | /** | 645 | /** |
| 614 | * 初始化停车场下拉菜单 | 646 | * 初始化停车场下拉菜单 |
| 615 | */ | 647 | */ |