运行图 代码调整

This commit is contained in:
joylink_cuiweidong 2021-03-19 13:23:58 +08:00
parent 70260cfbe3
commit 82f8db41d1
2 changed files with 16 additions and 7 deletions

View File

@ -57,7 +57,9 @@ const runPlan = {
const trainList = service.tripNumberDataList;
state.initialPlanData[service.serviceNumber] = { oldIndex: i, serviceNumber: service.serviceNumber, backup: service.backup, trainMap: {} };
trainList.forEach((train, j) => {
state.initialPlanData[service.serviceNumber].trainMap[`${train.tripNumber}`] = { oldIndex: j, tripNumber: train.tripNumber, directionCode: train.directionCode, reentry: train.reentry, stationTimeList: train.stationTimeList };
state.initialPlanData[service.serviceNumber].trainMap[`${train.tripNumber}`] = { oldIndex: j, tripNumber: train.tripNumber, right:train.right,
directionCode: train.directionCode, reentry: train.reentry, stationTimeList: train.stationTimeList, endSecondTime:train.endSecondTime,
startSecondTime: train.startSecondTime };
});
});
}
@ -71,7 +73,10 @@ const runPlan = {
const trainList = service.tripNumberDataList;
state.editData[service.serviceNumber] = { oldIndex: i, serviceNumber: service.serviceNumber, backup: service.backup, trainMap: {} };
trainList.forEach((train, j) => {
state.editData[service.serviceNumber].trainMap[`${train.tripNumber}`] = { oldIndex: j, tripNumber: train.tripNumber, directionCode: train.directionCode, reentry: train.reentry, stationTimeList: train.stationTimeList };
state.editData[service.serviceNumber].trainMap[`${train.tripNumber}`] =
{ oldIndex: j, tripNumber: train.tripNumber, directionCode: train.directionCode, right:train.right,
reentry: train.reentry, stationTimeList: train.stationTimeList, endSecondTime:train.endSecondTime,
startSecondTime: train.startSecondTime};
});
});
}
@ -86,7 +91,9 @@ const runPlan = {
const trainList = service.tripNumberDataList;
state.draftEditData[service.serviceNumber] = { oldIndex: i, serviceNumber: service.serviceNumber, backup: service.backup, trainMap: {} };
trainList.forEach((train, j) => {
state.draftEditData[service.serviceNumber].trainMap[`${train.tripNumber}`] = { oldIndex: j, tripNumber: train.tripNumber, directionCode: train.directionCode, reentry: train.reentry, stationTimeList: train.stationTimeList };
state.draftEditData[service.serviceNumber].trainMap[`${train.tripNumber}`] = { oldIndex: j, tripNumber: train.tripNumber, right:train.right,
directionCode: train.directionCode, reentry: train.reentry, stationTimeList: train.stationTimeList, endSecondTime:train.endSecondTime,
startSecondTime: train.startSecondTime};
});
});
}

View File

@ -118,12 +118,13 @@ export default {
startTbFront:resp.data.startTbFront
};
if (resp.data.startTbFront == false) {
taskObj.startTime = formatTime(trainInfo.startSecondTime + 7200);
const newModel = {
sectionCode:resp.data.parkSectionCodeList[0].sectionCode,
stationCode:resp.data.startStationCode,
// // speedLevel:'',
departureTime: formatTime(trainInfo.stationTimeList[0].secondTime + 7200),
arriveTime: formatTime(trainInfo.stationTimeList[0].secondTime + 7200),
departureTime: formatTime(trainInfo.startSecondTime + 7200),
arriveTime: formatTime(trainInfo.startSecondTime + 7200),
stopTime:0
};
taskObj.arriveConfigList.push(newModel);
@ -160,13 +161,14 @@ export default {
taskObj.arriveConfigList.push(newModel);
});
if (resp.data.endTbFront == false) {
taskObj.endTime = formatTime(trainInfo.endSecondTime + 7200);
const length = resp.data.parkSectionCodeList.length - 1;
const newModel = {
sectionCode:resp.data.parkSectionCodeList[length].sectionCode,
stationCode:resp.data.endStationCode,
// // speedLevel:'',
departureTime: formatTime(trainInfo.stationTimeList[length].secondTime + 7200),
arriveTime: formatTime(trainInfo.stationTimeList[length].secondTime + 7200),
departureTime: formatTime(trainInfo.endSecondTime + 7200),
arriveTime: formatTime(trainInfo.endSecondTime + 7200),
stopTime:0
};
taskObj.arriveConfigList.push(newModel);