Commit c1569fe05c0ec404c4fb61b3fdf30b841bf5611f
1 parent
80ca42b5
update
Showing
4 changed files
with
63 additions
and
72 deletions
src/main/resources/static/real_control_v2/fragments/geo/calc_station_space.html
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lj_zrw.html
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task/add_sub_task_other.html
| ... | ... | @@ -15,10 +15,11 @@ |
| 15 | 15 | <label class="uk-form-label">班次类型</label> |
| 16 | 16 | <div class="uk-form-controls"> |
| 17 | 17 | <select class="form-control" name="type1" style="width: 65px;"> |
| 18 | - <option>正常</option> | |
| 19 | - <option>临加</option> | |
| 18 | + <option>正常</option> | |
| 19 | + <option>临加</option> | |
| 20 | 20 | </select> |
| 21 | - <select class="form-control nt-dictionary" name="type2" data-group=ChildTaskType style="width: 126px;;"></select> | |
| 21 | + <select class="form-control nt-dictionary" name="type2" data-group=ChildTaskType | |
| 22 | + style="width: 126px;;"></select> | |
| 22 | 23 | </div> |
| 23 | 24 | </div> |
| 24 | 25 | </div> |
| ... | ... | @@ -47,7 +48,8 @@ |
| 47 | 48 | <div class="uk-form-row"> |
| 48 | 49 | <label class="uk-form-label">里程类型</label> |
| 49 | 50 | <div class="uk-form-controls"> |
| 50 | - <select class="form-control nt-dictionary" required name="mileageType" data-group="MileageType" ></select> | |
| 51 | + <select class="form-control nt-dictionary" required name="mileageType" | |
| 52 | + data-group="MileageType"></select> | |
| 51 | 53 | </div> |
| 52 | 54 | </div> |
| 53 | 55 | </div> |
| ... | ... | @@ -74,7 +76,7 @@ |
| 74 | 76 | <div class="uk-form-row"> |
| 75 | 77 | <label class="uk-form-label">结束时间</label> |
| 76 | 78 | <div class="uk-form-controls"> |
| 77 | - <input name="endDate" value="{{sch.zdsj}}" type="time" required> | |
| 79 | + <input name="endDate" value="{{sch.zdsj}}" type="time" required> | |
| 78 | 80 | </div> |
| 79 | 81 | </div> |
| 80 | 82 | </div> |
| ... | ... | @@ -95,12 +97,12 @@ |
| 95 | 97 | <div class="uk-form-row"> |
| 96 | 98 | <label class="uk-form-label">烂班原因</label> |
| 97 | 99 | <div class="uk-form-controls"> |
| 98 | - <select class="form-control" name="destroyReason" > | |
| 99 | - <option value="">请选择...</option> | |
| 100 | - {{each adjustExps as exp i}} | |
| 101 | - <option value="{{exp}}">{{exp}}</option> | |
| 102 | - {{/each}} | |
| 103 | - </select> | |
| 100 | + <select class="form-control" name="destroyReason"> | |
| 101 | + <option value="">请选择...</option> | |
| 102 | + {{each adjustExps as exp i}} | |
| 103 | + <option value="{{exp}}">{{exp}}</option> | |
| 104 | + {{/each}} | |
| 105 | + </select> | |
| 104 | 106 | </div> |
| 105 | 107 | </div> |
| 106 | 108 | </div> |
| ... | ... | @@ -110,7 +112,8 @@ |
| 110 | 112 | <div class="uk-width-1-1"> |
| 111 | 113 | <div class="uk-form-row ct-stacked"> |
| 112 | 114 | <div class="uk-form-controls" style="margin-top: 5px;"> |
| 113 | - <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="50" placeholder="备注,不超过50个字符"></textarea> | |
| 115 | + <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" | |
| 116 | + data-fv-stringlength-max="50" placeholder="备注,不超过50个字符"></textarea> | |
| 114 | 117 | </div> |
| 115 | 118 | </div> |
| 116 | 119 | </div> |
| ... | ... | @@ -122,48 +125,36 @@ |
| 122 | 125 | </script> |
| 123 | 126 | |
| 124 | 127 | <script> |
| 125 | - (function() { | |
| 128 | + (function () { | |
| 126 | 129 | var modal = '#add-sub-task-other-modal', |
| 127 | - sch, stationRoutes, parks, information; | |
| 130 | + sch, stationRoutes, parks, information; | |
| 128 | 131 | var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他']; |
| 129 | - $(modal).on('init', function(e, data) { | |
| 132 | + $(modal).on('init', function (e, data) { | |
| 130 | 133 | sch = data.sch; |
| 131 | - var formHtml = template('sub-task-other-form-temp', {sch:sch, adjustExps: adjustExps}); | |
| 134 | + var formHtml = template('sub-task-other-form-temp', {sch: sch, adjustExps: adjustExps}); | |
| 132 | 135 | $('form', modal).html(formHtml); |
| 133 | 136 | //字典转换 |
| 134 | 137 | dictionaryUtils.transformDom($('.nt-dictionary', modal)); |
| 135 | 138 | |
| 136 | - //----------- Autocomplete -------------- | |
| 137 | - // $.get('/basic/cars', function(rs) { | |
| 138 | - // //车辆 | |
| 139 | - // gb_common.carAutocomplete($('.car-autocom', modal), rs); | |
| 140 | - // }); | |
| 141 | - // $.get('/basic/all_personnel', function(rs) { | |
| 142 | - // //驾驶员 | |
| 143 | - // gb_common.personAutocomplete($('.jsy-autocom', modal), rs); | |
| 144 | - // //售票员 | |
| 145 | - // gb_common.personAutocomplete($('.spy-autocom', modal), rs); | |
| 146 | - // }); | |
| 147 | - | |
| 148 | 139 | //站点路由 |
| 149 | - stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function(a, b){ | |
| 150 | - return a.stationRouteCode-b.stationRouteCode; | |
| 140 | + stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function (a, b) { | |
| 141 | + return a.stationRouteCode - b.stationRouteCode; | |
| 151 | 142 | }), 'directions'); |
| 152 | 143 | //停车场 |
| 153 | - $.get('/basic/parks', function(rs){ | |
| 154 | - parks=rs; | |
| 144 | + $.get('/basic/parks', function (rs) { | |
| 145 | + parks = rs; | |
| 155 | 146 | }); |
| 156 | 147 | //线路标准 |
| 157 | - information=gb_data_basic.getLineInformation(sch.xlBm); | |
| 148 | + information = gb_data_basic.getLineInformation(sch.xlBm); | |
| 158 | 149 | |
| 159 | 150 | //submit |
| 160 | 151 | var f = $('form', modal).formValidation(gb_form_validation_opts); |
| 161 | - f.on('success.form.fv', function(e) { | |
| 152 | + f.on('success.form.fv', function (e) { | |
| 162 | 153 | disabled_submit_btn(this); |
| 163 | 154 | e.preventDefault(); |
| 164 | 155 | var data = $(this).serializeJSON(); |
| 165 | 156 | |
| 166 | - gb_common.$post('/childTask', data, function(rs){ | |
| 157 | + gb_common.$post('/childTask', data, function (rs) { | |
| 167 | 158 | notify_succ('子任务添加成功'); |
| 168 | 159 | gb_schedule_table.updateSchedule(rs.t); |
| 169 | 160 | $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: rs.t}); |
| ... | ... | @@ -172,49 +163,49 @@ |
| 172 | 163 | }); |
| 173 | 164 | |
| 174 | 165 | //班次类型 |
| 175 | - $('[name=type2]', f).on('change', function(){ | |
| 176 | - var routes=stationRoutes[sch.xlDir] | |
| 177 | - ,lastCode=routes[routes.length-1].stationCode | |
| 178 | - ,opts='',park_opts=''; | |
| 179 | - //station options | |
| 180 | - $.each(routes, function(){ | |
| 181 | - opts+='<option value="'+this.stationCode+'">'+this.stationName+'</option>' | |
| 182 | - }); | |
| 183 | - //park options | |
| 184 | - for(var code in parks) | |
| 185 | - park_opts+='<option value="'+code+'">'+parks[code]+'</option>'; | |
| 166 | + $('[name=type2]', f).on('change', function () { | |
| 167 | + var routes = stationRoutes[sch.xlDir] | |
| 168 | + , lastCode = routes[routes.length - 1].stationCode | |
| 169 | + , opts = '', park_opts = ''; | |
| 170 | + //station options | |
| 171 | + $.each(routes, function () { | |
| 172 | + opts += '<option value="' + this.stationCode + '">' + this.stationName + '</option>' | |
| 173 | + }); | |
| 174 | + //park options | |
| 175 | + for (var code in parks) | |
| 176 | + park_opts += '<option value="' + code + '">' + parks[code] + '</option>'; | |
| 186 | 177 | |
| 187 | - var qdz=$('[name=startStation]', f),zdz=$('[name=endStation]', f); | |
| 188 | - switch ($(this).val()) { | |
| 189 | - case '3'://出场 | |
| 190 | - qdz.html(park_opts).val(information.carPark); | |
| 191 | - zdz.html(opts); | |
| 192 | - break; | |
| 193 | - case '2'://进场 | |
| 194 | - qdz.html(opts); | |
| 195 | - zdz.html(park_opts).val(information.carPark); | |
| 196 | - break; | |
| 197 | - default: | |
| 198 | - qdz.html(opts); | |
| 199 | - zdz.html(opts).val(lastCode); | |
| 200 | - } | |
| 178 | + var qdz = $('[name=startStation]', f), zdz = $('[name=endStation]', f); | |
| 179 | + switch ($(this).val()) { | |
| 180 | + case '3'://出场 | |
| 181 | + qdz.html(park_opts).val(information.carPark); | |
| 182 | + zdz.html(opts); | |
| 183 | + break; | |
| 184 | + case '2'://进场 | |
| 185 | + qdz.html(opts); | |
| 186 | + zdz.html(park_opts).val(information.carPark); | |
| 187 | + break; | |
| 188 | + default: | |
| 189 | + qdz.html(opts); | |
| 190 | + zdz.html(opts).val(lastCode); | |
| 191 | + } | |
| 201 | 192 | }); |
| 202 | 193 | |
| 203 | 194 | //是否烂班 |
| 204 | - $('[name=destroy]', f).on('click', function(){ | |
| 195 | + $('[name=destroy]', f).on('click', function () { | |
| 205 | 196 | console.log(this, this.checked); |
| 206 | - if(this.checked){ | |
| 207 | - $('.destroy_reason_wrap', modal).show(); | |
| 197 | + if (this.checked) { | |
| 198 | + $('.destroy_reason_wrap', modal).show(); | |
| 208 | 199 | } |
| 209 | 200 | else { |
| 210 | - $('.destroy_reason_wrap', modal).hide(); | |
| 201 | + $('.destroy_reason_wrap', modal).hide(); | |
| 211 | 202 | } |
| 212 | 203 | }); |
| 213 | 204 | |
| 214 | - $('[name=destroyReason]', f).on('change', function(){ | |
| 215 | - var rem=$('[name=remarks]', f); | |
| 216 | - rem.val(rem.val() + $(this).val() + ','); | |
| 217 | - }); | |
| 205 | + $('[name=destroyReason]', f).on('change', function () { | |
| 206 | + var rem = $('[name=remarks]', f); | |
| 207 | + rem.val(rem.val() + $(this).val() + ','); | |
| 208 | + }); | |
| 218 | 209 | }); |
| 219 | 210 | })(); |
| 220 | 211 | </script> | ... | ... |
src/main/resources/static/real_control_v2/fragments/north/tabs.html
| 1 | 1 | <div> |
| 2 | 2 | <script id="north-tabs-temp" type="text/html"> |
| 3 | - <ul class="uk-tab" data-uk-tab="{connect:'#main-tab-content'}"> | |
| 3 | + <ul class="uk-tab" data-uk-switcher="{connect:'#main-tab-content', swiping: false}" > | |
| 4 | 4 | <li class="uk-active" ><a>主页</a></li> |
| 5 | 5 | <li id="north_tabs_map_btn"><a>地图</a></li> |
| 6 | 6 | {{each list as line i}} |
| ... | ... | @@ -10,7 +10,7 @@ |
| 10 | 10 | </script> |
| 11 | 11 | |
| 12 | 12 | <script id="north-tab-content-temp" type="text/html"> |
| 13 | - <ul id="main-tab-content" class="uk-switcher uk-margin "> | |
| 13 | + <ul id="main-tab-content" class="uk-switcher uk-margin " > | |
| 14 | 14 | <li class="uk-active home-panel">主页</li> |
| 15 | 15 | <li class="map-panel">地图未渲染</li> |
| 16 | 16 | {{each list as line i}} | ... | ... |