Commit c1569fe05c0ec404c4fb61b3fdf30b841bf5611f

Authored by 潘钊
1 parent 80ca42b5

update

src/main/resources/static/real_control_v2/fragments/geo/calc_station_space.html
@@ -81,6 +81,7 @@ @@ -81,6 +81,7 @@
81 }; 81 };
82 82
83 window.localStorage.setItem('control_route_distance_'+sch.xlBm, JSON.stringify(locData)); 83 window.localStorage.setItem('control_route_distance_'+sch.xlBm, JSON.stringify(locData));
  84 + //console.log('结果', locData);
84 } 85 }
85 86
86 function sectionArrSort(s1, s2) { 87 function sectionArrSort(s1, s2) {
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lj_zrw.html
@@ -322,8 +322,7 @@ @@ -322,8 +322,7 @@
322 name: "添加子任务", 322 name: "添加子任务",
323 items: { 323 items: {
324 'add_sub_task_in': { 324 'add_sub_task_in': {
325 - name: '回场',  
326 - disabled: true 325 + name: '回场'
327 }, 326 },
328 'add_sub_task_out': { 327 'add_sub_task_out': {
329 name: '出场', 328 name: '出场',
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task/add_sub_task_other.html
@@ -15,10 +15,11 @@ @@ -15,10 +15,11 @@
15 <label class="uk-form-label">班次类型</label> 15 <label class="uk-form-label">班次类型</label>
16 <div class="uk-form-controls"> 16 <div class="uk-form-controls">
17 <select class="form-control" name="type1" style="width: 65px;"> 17 <select class="form-control" name="type1" style="width: 65px;">
18 - <option>正常</option>  
19 - <option>临加</option> 18 + <option>正常</option>
  19 + <option>临加</option>
20 </select> 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 </div> 23 </div>
23 </div> 24 </div>
24 </div> 25 </div>
@@ -47,7 +48,8 @@ @@ -47,7 +48,8 @@
47 <div class="uk-form-row"> 48 <div class="uk-form-row">
48 <label class="uk-form-label">里程类型</label> 49 <label class="uk-form-label">里程类型</label>
49 <div class="uk-form-controls"> 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 </div> 53 </div>
52 </div> 54 </div>
53 </div> 55 </div>
@@ -74,7 +76,7 @@ @@ -74,7 +76,7 @@
74 <div class="uk-form-row"> 76 <div class="uk-form-row">
75 <label class="uk-form-label">结束时间</label> 77 <label class="uk-form-label">结束时间</label>
76 <div class="uk-form-controls"> 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 </div> 80 </div>
79 </div> 81 </div>
80 </div> 82 </div>
@@ -95,12 +97,12 @@ @@ -95,12 +97,12 @@
95 <div class="uk-form-row"> 97 <div class="uk-form-row">
96 <label class="uk-form-label">烂班原因</label> 98 <label class="uk-form-label">烂班原因</label>
97 <div class="uk-form-controls"> 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 </div> 106 </div>
105 </div> 107 </div>
106 </div> 108 </div>
@@ -110,7 +112,8 @@ @@ -110,7 +112,8 @@
110 <div class="uk-width-1-1"> 112 <div class="uk-width-1-1">
111 <div class="uk-form-row ct-stacked"> 113 <div class="uk-form-row ct-stacked">
112 <div class="uk-form-controls" style="margin-top: 5px;"> 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 </div> 117 </div>
115 </div> 118 </div>
116 </div> 119 </div>
@@ -122,48 +125,36 @@ @@ -122,48 +125,36 @@
122 </script> 125 </script>
123 126
124 <script> 127 <script>
125 - (function() { 128 + (function () {
126 var modal = '#add-sub-task-other-modal', 129 var modal = '#add-sub-task-other-modal',
127 - sch, stationRoutes, parks, information; 130 + sch, stationRoutes, parks, information;
128 var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他']; 131 var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他'];
129 - $(modal).on('init', function(e, data) { 132 + $(modal).on('init', function (e, data) {
130 sch = data.sch; 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 $('form', modal).html(formHtml); 135 $('form', modal).html(formHtml);
133 //字典转换 136 //字典转换
134 dictionaryUtils.transformDom($('.nt-dictionary', modal)); 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 }), 'directions'); 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 //submit 150 //submit
160 var f = $('form', modal).formValidation(gb_form_validation_opts); 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 disabled_submit_btn(this); 153 disabled_submit_btn(this);
163 e.preventDefault(); 154 e.preventDefault();
164 var data = $(this).serializeJSON(); 155 var data = $(this).serializeJSON();
165 156
166 - gb_common.$post('/childTask', data, function(rs){ 157 + gb_common.$post('/childTask', data, function (rs) {
167 notify_succ('子任务添加成功'); 158 notify_succ('子任务添加成功');
168 gb_schedule_table.updateSchedule(rs.t); 159 gb_schedule_table.updateSchedule(rs.t);
169 $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: rs.t}); 160 $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: rs.t});
@@ -172,49 +163,49 @@ @@ -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 console.log(this, this.checked); 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 else { 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 </script> 211 </script>
src/main/resources/static/real_control_v2/fragments/north/tabs.html
1 <div> 1 <div>
2 <script id="north-tabs-temp" type="text/html"> 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 <li class="uk-active" ><a>主页</a></li> 4 <li class="uk-active" ><a>主页</a></li>
5 <li id="north_tabs_map_btn"><a>地图</a></li> 5 <li id="north_tabs_map_btn"><a>地图</a></li>
6 {{each list as line i}} 6 {{each list as line i}}
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 </script> 10 </script>
11 11
12 <script id="north-tab-content-temp" type="text/html"> 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 <li class="uk-active home-panel">主页</li> 14 <li class="uk-active home-panel">主页</li>
15 <li class="map-panel">地图未渲染</li> 15 <li class="map-panel">地图未渲染</li>
16 {{each list as line i}} 16 {{each list as line i}}