运行图编制代码调整

This commit is contained in:
joylink_cuiweidong 2021-01-25 17:45:39 +08:00
parent 4da53f69e5
commit db35ba370e

View File

@ -152,17 +152,17 @@ export default {
this.$ConstSelect.DirectionCodeList.forEach(elem => {
this.DirectionCodeMap[elem.value] = elem.label;
});
this.stationIntervalData = [];
if (this.$route.query.lineCode) {
getMapStationRunUser(this.$route.query.mapId).then(resp =>{
const list = resp.data.list;
this.stationIntervalData = [];
this.stationIntervalData = list;
this.form.level1 = '';
this.form.level2 = '';
this.form.level3 = '';
this.form.level4 = '';
this.form.level5 = '';
});
}
},
@ -192,10 +192,24 @@ export default {
},
handleStationDistance() {
updateRunlevelDistance(this.$route.query.mapId).then(resp => {
this.loadInitData();
if (resp.data) {
const list = resp.data;
const stationIntervalData = [];
this.stationIntervalData.forEach(station=>{
if (list[station.id]) {
const tempStation = Object.assign({}, station);
tempStation.distance = list[station.id];
stationIntervalData.push(tempStation);
}
});
this.stationIntervalData = stationIntervalData;
} else {
this.$messageBox('更新失败');
}
this.$message.success('更新成功');
}).catch(() => {
this.$messageBox('更新失败');
});
},
doShow(params) {