Commit 337565f1010860088d850d2fc2b9dbf67d4359c0
1 parent
d85f6977
1.道闸造成临加班次前端错误,bug修正
Showing
1 changed file
with
43 additions
and
35 deletions
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
| ... | ... | @@ -239,13 +239,15 @@ var gb_schedule_table = (function () { |
| 239 | 239 | |
| 240 | 240 | // 道闸标记 |
| 241 | 241 | var sch = line2Schedule[this.xlBm][this.id]; |
| 242 | - if(sch.sd_tag == 1){ | |
| 243 | - this.sd_tag = sch.sd_tag; | |
| 244 | - this.sd_time = sch.sd_time; | |
| 245 | - } | |
| 246 | - if(sch.sf_tag == 1){ | |
| 247 | - this.sf_tag = sch.sf_tag; | |
| 248 | - 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 | + } | |
| 249 | 251 | } |
| 250 | 252 | line2Schedule[this.xlBm][this.id] = this; |
| 251 | 253 | xls[this.xlBm] = 1; |
| ... | ... | @@ -378,16 +380,18 @@ var gb_schedule_table = (function () { |
| 378 | 380 | this.c_t_mileage_status = calcCTaskMileageStatus(this); |
| 379 | 381 | // 道闸标记 |
| 380 | 382 | var sch = line2Schedule[this.xlBm][this.id]; |
| 381 | - if(sch.sd_tag == 1){ | |
| 382 | - this.sd_tag = sch.sd_tag; | |
| 383 | - this.sd_time = sch.sd_time; | |
| 384 | - } | |
| 385 | - if(sch.sf_tag == 1){ | |
| 386 | - this.sf_tag = sch.sf_tag; | |
| 387 | - this.sf_time = sch.sf_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); | |
| 388 | 394 | } |
| 389 | - line2Schedule[this.xlBm][this.id] = this; | |
| 390 | - updateDom(this); | |
| 391 | 395 | }catch(e){} |
| 392 | 396 | }); |
| 393 | 397 | |
| ... | ... | @@ -405,16 +409,18 @@ var gb_schedule_table = (function () { |
| 405 | 409 | var updateScheduleSigno = function (tag) { |
| 406 | 410 | if(tag){ |
| 407 | 411 | var sch = line2Schedule[tag.xlBm][tag.realId]; |
| 408 | - if(tag.sdTag == 1){ | |
| 409 | - sch.sd_tag = tag.sdTag; | |
| 410 | - 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); | |
| 411 | 423 | } |
| 412 | - if(tag.out == 1){ | |
| 413 | - sch.sf_tag = tag.out; | |
| 414 | - sch.sf_time = tag.outTimeStr; | |
| 415 | - } | |
| 416 | - line2Schedule[tag.xlBm][sch.id] = sch; | |
| 417 | - updateDom(sch); | |
| 418 | 424 | } |
| 419 | 425 | |
| 420 | 426 | }; |
| ... | ... | @@ -433,15 +439,17 @@ var gb_schedule_table = (function () { |
| 433 | 439 | |
| 434 | 440 | // 道闸标记 |
| 435 | 441 | var sch = line2Schedule[this.xlBm][this.id]; |
| 436 | - if(sch.sd_tag == 1){ | |
| 437 | - this.sd_tag = sch.sd_tag; | |
| 438 | - this.sd_time = sch.sd_time; | |
| 439 | - } | |
| 440 | - if(sch.sf_tag == 1){ | |
| 441 | - this.sf_tag = sch.sf_tag; | |
| 442 | - 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; | |
| 443 | 452 | } |
| 444 | - line2Schedule[this.xlBm][this.id] = this; | |
| 445 | 453 | }); |
| 446 | 454 | }; |
| 447 | 455 | |
| ... | ... | @@ -889,9 +897,9 @@ var gb_schedule_table = (function () { |
| 889 | 897 | sch.sf_tag = tag.sf_tag; |
| 890 | 898 | sch.sf_time = tag.sf_time; |
| 891 | 899 | } |
| 900 | + line2Schedule[sch.xlBm][sch.id] = sch; | |
| 901 | + updateDom(sch); | |
| 892 | 902 | } |
| 893 | - line2Schedule[sch.xlBm][sch.id] = sch; | |
| 894 | - updateDom(sch); | |
| 895 | 903 | i++; |
| 896 | 904 | f(); |
| 897 | 905 | } | ... | ... |