优化运行图代码,防止报错
This commit is contained in:
parent
1a1fbbfd69
commit
a62248d4a6
@ -377,12 +377,12 @@ export default {
|
||||
|
||||
|
||||
let fronTime = 0;
|
||||
if (index == 0 &&
|
||||
String(this.frontModel.startTbFront) == 'false') {
|
||||
fronTime = this.reentryData[elem.stationCode].tbTo
|
||||
} else if (index == list.length - 2 &&
|
||||
String(this.frontModel.endTbFront) == 'false') {
|
||||
fronTime = this.reentryData[list[index+1].stationCode].tbTo
|
||||
if (index == 0 && String(this.frontModel.startTbFront) == 'false') {
|
||||
const data = this.reentryData[elem.stationCode]||{};
|
||||
fronTime = data.tbTo || 0;
|
||||
} else if (index == list.length - 2 && String(this.frontModel.endTbFront) == 'false') {
|
||||
const data = this.reentryData[list[index+1].stationCode]||{};
|
||||
fronTime = data.tbTo || 0;
|
||||
}
|
||||
|
||||
tempTime = tempTime + fronTime + elem.stopTime + elem.speedLevelTime;
|
||||
@ -404,7 +404,6 @@ export default {
|
||||
this.addModel.routingCode = row.code;
|
||||
this.frontModel.startTbFront = row.startTbFront;
|
||||
this.frontModel.endTbFront = row.endTbFront;
|
||||
console.log(row);
|
||||
this.computedDetailList('routingCode');
|
||||
},
|
||||
handleCommit() {
|
||||
|
@ -413,12 +413,12 @@ export default {
|
||||
|
||||
|
||||
let fronTime = 0;
|
||||
if (index == 0 &&
|
||||
String(this.frontModel.startTbFront) == 'false') {
|
||||
fronTime = this.reentryData[elem.stationCode].tbTo
|
||||
} else if (index == list.length - 2 &&
|
||||
String(this.frontModel.endTbFront) == 'false') {
|
||||
fronTime = this.reentryData[list[index+1].stationCode].tbTo
|
||||
if (index == 0 && String(this.frontModel.startTbFront) == 'false') {
|
||||
const data = this.reentryData[elem.stationCode]||{};
|
||||
fronTime = data.tbTo || 0;
|
||||
} else if (index == list.length - 2 && String(this.frontModel.endTbFront) == 'false') {
|
||||
const data = this.reentryData[list[index+1].stationCode]||{};
|
||||
fronTime = data.tbTo || 0;
|
||||
}
|
||||
|
||||
tempTime = tempTime + fronTime + elem.stopTime + elem.speedLevelTime;
|
||||
|
@ -377,12 +377,12 @@ export default {
|
||||
|
||||
|
||||
let fronTime = 0;
|
||||
if (index == 0 &&
|
||||
String(this.frontModel.startTbFront) == 'false') {
|
||||
fronTime = this.reentryData[elem.stationCode].tbTo
|
||||
} else if (index == list.length - 2 &&
|
||||
String(this.frontModel.endTbFront) == 'false') {
|
||||
fronTime = this.reentryData[list[index+1].stationCode].tbTo
|
||||
if (index == 0 && String(this.frontModel.startTbFront) == 'false') {
|
||||
const data = this.reentryData[elem.stationCode]||{};
|
||||
fronTime = data.tbTo || 0;
|
||||
} else if (index == list.length - 2 && String(this.frontModel.endTbFront) == 'false') {
|
||||
const data = this.reentryData[list[index+1].stationCode]||{};
|
||||
fronTime = data.tbTo || 0;
|
||||
}
|
||||
|
||||
tempTime = tempTime + fronTime + elem.stopTime + elem.speedLevelTime;
|
||||
@ -404,7 +404,6 @@ export default {
|
||||
this.addModel.routingCode = row.code;
|
||||
this.frontModel.startTbFront = row.startTbFront;
|
||||
this.frontModel.endTbFront = row.endTbFront;
|
||||
console.log(row);
|
||||
this.computedDetailList('routingCode');
|
||||
},
|
||||
handleCommit() {
|
||||
|
@ -413,12 +413,12 @@ export default {
|
||||
|
||||
|
||||
let fronTime = 0;
|
||||
if (index == 0 &&
|
||||
String(this.frontModel.startTbFront) == 'false') {
|
||||
fronTime = this.reentryData[elem.stationCode].tbTo
|
||||
} else if (index == list.length - 2 &&
|
||||
String(this.frontModel.endTbFront) == 'false') {
|
||||
fronTime = this.reentryData[list[index+1].stationCode].tbTo
|
||||
if (index == 0 && String(this.frontModel.startTbFront) == 'false') {
|
||||
const data = this.reentryData[elem.stationCode]||{};
|
||||
fronTime = data.tbTo || 0;
|
||||
} else if (index == list.length - 2 && String(this.frontModel.endTbFront) == 'false') {
|
||||
const data = this.reentryData[list[index+1].stationCode]||{};
|
||||
fronTime = data.tbTo || 0;
|
||||
}
|
||||
|
||||
tempTime = tempTime + fronTime + elem.stopTime + elem.speedLevelTime;
|
||||
|
Loading…
Reference in New Issue
Block a user