Commit eac986b95d0cb152f2ed3bad627db2ec5485c964

Authored by 娄高锋
2 parents 055c8d3e 337565f1

Merge branch 'jiading' of 192.168.168.201:panzhaov5/bsth_control into jiading

src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
... ... @@ -222,13 +222,15 @@ var gb_schedule_table = (function () {
222 222  
223 223 // 道闸标记
224 224 var tag = line2Schedule[sch.xlBm][sch.id];
225   - if(tag.sd_tag == 1){
226   - sch.sd_tag = sch.sd_tag;
227   - sch.sd_time = sch.sd_time;
228   - }
229   - if(tag.sf_tag == 1){
230   - sch.sf_tag = sch.sf_tag;
231   - sch.sf_time = sch.sf_time;
  225 + if (tag) {
  226 + if(tag.sd_tag == 1){
  227 + sch.sd_tag = sch.sd_tag;
  228 + sch.sd_time = sch.sd_time;
  229 + }
  230 + if(tag.sf_tag == 1){
  231 + sch.sf_tag = sch.sf_tag;
  232 + sch.sf_time = sch.sf_time;
  233 + }
232 234 }
233 235 line2Schedule[sch.xlBm][sch.id] = sch;
234 236 //update
... ... @@ -237,13 +239,15 @@ var gb_schedule_table = (function () {
237 239  
238 240 // 道闸标记
239 241 var sch = line2Schedule[this.xlBm][this.id];
240   - if(sch.sd_tag == 1){
241   - this.sd_tag = sch.sd_tag;
242   - this.sd_time = sch.sd_time;
243   - }
244   - if(sch.sf_tag == 1){
245   - this.sf_tag = sch.sf_tag;
246   - this.sf_time = sch.sf_time;
  242 + if (sch) {
  243 + if(sch.sd_tag == 1){
  244 + this.sd_tag = sch.sd_tag;
  245 + this.sd_time = sch.sd_time;
  246 + }
  247 + if(sch.sf_tag == 1){
  248 + this.sf_tag = sch.sf_tag;
  249 + this.sf_time = sch.sf_time;
  250 + }
247 251 }
248 252 line2Schedule[this.xlBm][this.id] = this;
249 253 xls[this.xlBm] = 1;
... ... @@ -376,16 +380,18 @@ var gb_schedule_table = (function () {
376 380 this.c_t_mileage_status = calcCTaskMileageStatus(this);
377 381 // 道闸标记
378 382 var sch = line2Schedule[this.xlBm][this.id];
379   - if(sch.sd_tag == 1){
380   - this.sd_tag = sch.sd_tag;
381   - this.sd_time = sch.sd_time;
  383 + if (sch) {
  384 + if(sch.sd_tag == 1){
  385 + this.sd_tag = sch.sd_tag;
  386 + this.sd_time = sch.sd_time;
  387 + }
  388 + if(sch.sf_tag == 1){
  389 + this.sf_tag = sch.sf_tag;
  390 + this.sf_time = sch.sf_time;
  391 + }
  392 + line2Schedule[this.xlBm][this.id] = this;
  393 + updateDom(this);
382 394 }
383   - if(sch.sf_tag == 1){
384   - this.sf_tag = sch.sf_tag;
385   - this.sf_time = sch.sf_time;
386   - }
387   - line2Schedule[this.xlBm][this.id] = this;
388   - updateDom(this);
389 395 }catch(e){}
390 396 });
391 397  
... ... @@ -403,16 +409,18 @@ var gb_schedule_table = (function () {
403 409 var updateScheduleSigno = function (tag) {
404 410 if(tag){
405 411 var sch = line2Schedule[tag.xlBm][tag.realId];
406   - if(tag.sdTag == 1){
407   - sch.sd_tag = tag.sdTag;
408   - sch.sd_time = tag.sdTime;
  412 + if (sch) {
  413 + if(tag.sdTag == 1){
  414 + sch.sd_tag = tag.sdTag;
  415 + sch.sd_time = tag.sdTime;
  416 + }
  417 + if(tag.out == 1){
  418 + sch.sf_tag = tag.out;
  419 + sch.sf_time = tag.outTimeStr;
  420 + }
  421 + line2Schedule[tag.xlBm][sch.id] = sch;
  422 + updateDom(sch);
409 423 }
410   - if(tag.out == 1){
411   - sch.sf_tag = tag.out;
412   - sch.sf_time = tag.outTimeStr;
413   - }
414   - line2Schedule[tag.xlBm][sch.id] = sch;
415   - updateDom(sch);
416 424 }
417 425  
418 426 };
... ... @@ -431,15 +439,17 @@ var gb_schedule_table = (function () {
431 439  
432 440 // 道闸标记
433 441 var sch = line2Schedule[this.xlBm][this.id];
434   - if(sch.sd_tag == 1){
435   - this.sd_tag = sch.sd_tag;
436   - this.sd_time = sch.sd_time;
437   - }
438   - if(sch.sf_tag == 1){
439   - this.sf_tag = sch.sf_tag;
440   - this.sf_time = sch.sf_time;
  442 + if (sch) {
  443 + if(sch.sd_tag == 1){
  444 + this.sd_tag = sch.sd_tag;
  445 + this.sd_time = sch.sd_time;
  446 + }
  447 + if(sch.sf_tag == 1){
  448 + this.sf_tag = sch.sf_tag;
  449 + this.sf_time = sch.sf_time;
  450 + }
  451 + line2Schedule[this.xlBm][this.id] = this;
441 452 }
442   - line2Schedule[this.xlBm][this.id] = this;
443 453 });
444 454 };
445 455  
... ... @@ -878,16 +888,18 @@ var gb_schedule_table = (function () {
878 888 sch = rs.t;
879 889 // 道闸标记
880 890 var tag = line2Schedule[sch.xlBm][sch.id];
881   - if(tag.sd_tag == 1){
882   - sch.sd_tag = tag.sd_tag;
883   - sch.sd_time = tag.sd_time;
884   - }
885   - if(tag.sf_tag == 1){
886   - sch.sf_tag = tag.sf_tag;
887   - sch.sf_time = tag.sf_time;
  891 + if (tag) {
  892 + if(tag.sd_tag == 1){
  893 + sch.sd_tag = tag.sd_tag;
  894 + sch.sd_time = tag.sd_time;
  895 + }
  896 + if(tag.sf_tag == 1){
  897 + sch.sf_tag = tag.sf_tag;
  898 + sch.sf_time = tag.sf_time;
  899 + }
  900 + line2Schedule[sch.xlBm][sch.id] = sch;
  901 + updateDom(sch);
888 902 }
889   - line2Schedule[sch.xlBm][sch.id] = sch;
890   - updateDom(sch);
891 903 i++;
892 904 f();
893 905 }
... ...