diff --git a/src/store/modules/runplan.js b/src/store/modules/runplan.js index a439204e5..8e64913ba 100644 --- a/src/store/modules/runplan.js +++ b/src/store/modules/runplan.js @@ -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}; }); }); } diff --git a/src/views/planMonitor/components/menus/editPlanningTrain.vue b/src/views/planMonitor/components/menus/editPlanningTrain.vue index e01a5cb48..9b9abfaca 100644 --- a/src/views/planMonitor/components/menus/editPlanningTrain.vue +++ b/src/views/planMonitor/components/menus/editPlanningTrain.vue @@ -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);