Commit d66d6cf6b9aa08079886c0d7afcb72e6db86ec4a

Authored by 潘钊
1 parent d4c7e947

update...

src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
@@ -16,18 +16,22 @@ var gb_schedule_table = (function () { @@ -16,18 +16,22 @@ var gb_schedule_table = (function () {
16 * @param list 16 * @param list
17 */ 17 */
18 var isRepeatData = function (list) { 18 var isRepeatData = function (list) {
19 - var map = {}, reps = [];  
20 - for(var i = 0,sch;sch=list[i++];){  
21 - if(map[sch.id]){  
22 - reps.push(sch.clZbh); 19 + try {
  20 + var map = {}, reps = [];
  21 + for(var i = 0,sch;sch=list[i++];){
  22 + if(map[sch.id]){
  23 + reps.push(sch.clZbh);
  24 + }
  25 + map[sch.id] = sch;
23 } 26 }
24 - map[sch.id] = sch;  
25 - }  
26 27
27 - //通知服务端数据有异常  
28 - $.each(reps, function () {  
29 - $.post('/anomalyCheck/schRepeat', {nbbm: this});  
30 - }); 28 + //通知服务端数据有异常
  29 + $.each(reps, function () {
  30 + $.post('/anomalyCheck/schRepeat', {nbbm: this});
  31 + });
  32 + }catch (e){
  33 + return list;
  34 + }
31 35
32 return gb_common.get_vals(map); 36 return gb_common.get_vals(map);
33 }; 37 };
@@ -38,12 +42,12 @@ var gb_schedule_table = (function () { @@ -38,12 +42,12 @@ var gb_schedule_table = (function () {
38 lines: gb_data_basic.line_idx 42 lines: gb_data_basic.line_idx
39 }, function (rs) { 43 }, function (rs) {
40 for (var lineCode in rs) { 44 for (var lineCode in rs) {
41 - //排序  
42 - rs[lineCode].sort(schedule_sort);  
43 line2Schedule[lineCode] = {}; 45 line2Schedule[lineCode] = {};
44 //------是否有重复班次 #临时代码,为服务端提供诊断信息已解决这个问题 46 //------是否有重复班次 #临时代码,为服务端提供诊断信息已解决这个问题
45 - rs[lineCode] = isRepeatData(line2Schedule[lineCode]); 47 + rs[lineCode] = isRepeatData(rs[lineCode]);
46 48
  49 + //排序
  50 + rs[lineCode].sort(schedule_sort);
47 //calc shift 51 //calc shift
48 $.each(rs[lineCode], function () { 52 $.each(rs[lineCode], function () {
49 calc_sch_real_shift(this); 53 calc_sch_real_shift(this);
@@ -178,26 +182,26 @@ var gb_schedule_table = (function () { @@ -178,26 +182,26 @@ var gb_schedule_table = (function () {
178 //重新渲染表格 182 //重新渲染表格
179 reRenderTable(sch.xlBm); 183 reRenderTable(sch.xlBm);
180 /*//重新渲染表格 184 /*//重新渲染表格
181 - var data = gb_common.get_vals(line2Schedule[sch.xlBm]).sort(schedule_sort),  
182 - dirData = gb_common.groupBy(data, 'xlDir'),  
183 - tabCont = $('li.line_schedule[data-id=' + sch.xlBm + ']');  
184 -  
185 - for (var upDown in dirData) {  
186 - htmlStr = temps['line-schedule-table-temp']({  
187 - dir: upDown,  
188 - line: gb_data_basic.codeToLine[sch.xlBm],  
189 - list: dirData[upDown]  
190 - });  
191 - $('.schedule-wrap .card-panel:eq(' + upDown + ')', tabCont).html(htmlStr);  
192 - }  
193 - //图例相关  
194 - gb_sch_legend.init(tabCont);  
195 - //标记末班  
196 - markerLastByLine(sch.xlBm);  
197 - //计算应发未发  
198 - calc_yfwf_num(sch.xlBm);  
199 - //重新固定表头  
200 - gb_ct_table.fixedHead($('.line_schedule .ct_table_wrap'));*/ 185 + var data = gb_common.get_vals(line2Schedule[sch.xlBm]).sort(schedule_sort),
  186 + dirData = gb_common.groupBy(data, 'xlDir'),
  187 + tabCont = $('li.line_schedule[data-id=' + sch.xlBm + ']');
  188 +
  189 + for (var upDown in dirData) {
  190 + htmlStr = temps['line-schedule-table-temp']({
  191 + dir: upDown,
  192 + line: gb_data_basic.codeToLine[sch.xlBm],
  193 + list: dirData[upDown]
  194 + });
  195 + $('.schedule-wrap .card-panel:eq(' + upDown + ')', tabCont).html(htmlStr);
  196 + }
  197 + //图例相关
  198 + gb_sch_legend.init(tabCont);
  199 + //标记末班
  200 + markerLastByLine(sch.xlBm);
  201 + //计算应发未发
  202 + calc_yfwf_num(sch.xlBm);
  203 + //重新固定表头
  204 + gb_ct_table.fixedHead($('.line_schedule .ct_table_wrap'));*/
201 //定位到新添加的班次 205 //定位到新添加的班次
202 scroToDl(sch); 206 scroToDl(sch);
203 }; 207 };
@@ -542,7 +546,7 @@ var gb_schedule_table = (function () { @@ -542,7 +546,7 @@ var gb_schedule_table = (function () {
542 } 546 }
543 } 547 }
544 }; 548 };
545 - 549 +
546 /** 添加备注信息 */ 550 /** 添加备注信息 */
547 var addRemarks = function (list, remarks) { 551 var addRemarks = function (list, remarks) {
548 //if(!list || list) 552 //if(!list || list)
src/main/resources/static/real_control_v2/main.html
@@ -5,16 +5,16 @@ @@ -5,16 +5,16 @@
5 <meta charset="UTF-8"> 5 <meta charset="UTF-8">
6 <title>线路调度 v2.0</title> 6 <title>线路调度 v2.0</title>
7 <!-- uikit core style--> 7 <!-- uikit core style-->
8 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/css/uikit.gradient.min.css" merge="uikit"/>  
9 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.gradient.min.css" merge="uikit"/>  
10 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.gradient.min.css" merge="uikit"/> 8 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/css/uikit.gradient.min.css" />
  9 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.gradient.min.css" merge="plugins"/>
  10 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.gradient.min.css" merge="plugins"/>
11 <link rel="stylesheet" 11 <link rel="stylesheet"
12 - href="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.gradient.min.css" merge="uikit"/>  
13 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.gradient.min.css" merge="uikit"/>  
14 - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/slidenav.gradient.min.css" merge="uikit"/> 12 + href="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.gradient.min.css" merge="plugins"/>
  13 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.gradient.min.css" merge="plugins"/>
  14 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/slidenav.gradient.min.css" merge="plugins"/>
15 15
16 <!-- main style --> 16 <!-- main style -->
17 - <link rel="stylesheet" href="/real_control_v2/css/main.css" merge="custom_style"/> 17 + <link rel="stylesheet" href="/real_control_v2/css/main.css" />
18 <!-- north style --> 18 <!-- north style -->
19 <link rel="stylesheet" href="/real_control_v2/css/north.css" merge="custom_style"/> 19 <link rel="stylesheet" href="/real_control_v2/css/north.css" merge="custom_style"/>
20 <!-- home style --> 20 <!-- home style -->