运行图代码调整

This commit is contained in:
joylink_cuiweidong 2020-10-19 10:25:36 +08:00
parent 9f7e37393b
commit 6b65c641a7
2 changed files with 25 additions and 25 deletions

View File

@ -216,7 +216,6 @@ export default {
const mapId = this.$route.query.mapId; const mapId = this.$route.query.mapId;
if (mapId && this.drawWay == 'false') { if (mapId && this.drawWay == 'false') {
debugger;
getStationRunning(mapId).then(resp => { // getStationRunning(mapId).then(resp => { //
const list = resp.data; const list = resp.data;
list.forEach(elem => { list.forEach(elem => {
@ -242,19 +241,18 @@ export default {
list.forEach(elem => { list.forEach(elem => {
this.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem; this.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem;
}); });
if (list && list.length) { // if (list && list.length) {
list.forEach(elem => { // list.forEach(elem => {
if (!elem.runPlanLevelVO) { // if (!elem.runPlanLevelVO) {
this.$alert(`${this.$t('planMonitor.tipOperationTime')}`, { // this.$alert(`${this.$t('planMonitor.tipOperationTime')}`, {
confirmButtonText: this.$t('global.confirm'), // confirmButtonText: this.$t('global.confirm'),
callback: action => { // callback: action => {
this.doClose(); // this.doClose();
} // }
}); // });
} // }
}); // });
// }
}
}); });
} }
}, },

View File

@ -275,8 +275,8 @@ export default {
title() { title() {
return this.$t('planMonitor.modifying.modifyTask'); return this.$t('planMonitor.modifying.modifyTask');
}, },
isNewMap() { drawWay() {
return this.$route.path.includes('displayNew'); return this.$route.query.drawWay + '';
} }
}, },
watch: { watch: {
@ -312,6 +312,7 @@ export default {
} else if (stopStationObj['l3']) { } else if (stopStationObj['l3']) {
runTime = parseInt(stopStationObj['l3']); runTime = parseInt(stopStationObj['l3']);
} else { } else {
if (this.drawWay == ' false') {
// this.$messageBox(`${this.$t('planMonitor.modifying.setMessageTip1')} ${stopStationObj.startSectionCode} ${this.$t('planMonitor.modifying.setMessageTip2')} ${stopStationObj.endSectionCode} ${this.$t('planMonitor.modifying.setMessageTip3')}`); // this.$messageBox(`${this.$t('planMonitor.modifying.setMessageTip1')} ${stopStationObj.startSectionCode} ${this.$t('planMonitor.modifying.setMessageTip2')} ${stopStationObj.endSectionCode} ${this.$t('planMonitor.modifying.setMessageTip3')}`);
this.$alert(`${this.$t('planMonitor.tipOperationTime')}`, { this.$alert(`${this.$t('planMonitor.tipOperationTime')}`, {
confirmButtonText: this.$t('global.confirm'), confirmButtonText: this.$t('global.confirm'),
@ -322,6 +323,7 @@ export default {
} }
} }
} }
}
return runTime; return runTime;
}, },
@ -375,14 +377,14 @@ export default {
this.editModel.startTime = formatTime(trainInfo.stationTimeList[0].secondTime + this.PlanConvert.TranslationTime); this.editModel.startTime = formatTime(trainInfo.stationTimeList[0].secondTime + this.PlanConvert.TranslationTime);
} }
if (mapId && !this.isNewMap) { if (mapId && this.drawWay == ' false') {
getStationRunning(mapId).then(resp => { getStationRunning(mapId).then(resp => {
const list = resp.data; const list = resp.data;
list.forEach(elem => { list.forEach(elem => {
this.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem; this.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem;
}); });
}); });
} else if (mapId && this.isNewMap) { } else if (mapId && this.drawWay == ' true') {
getMapStationRun(mapId).then(resp => { getMapStationRun(mapId).then(resp => {
const list = resp.data; const list = resp.data;
list.forEach(elem => { list.forEach(elem => {