修改进路

This commit is contained in:
dong 2022-08-03 14:13:14 +08:00
parent 71480564f7
commit 5a072c7236

View File

@ -423,7 +423,16 @@ export default {
api(newModel, that.mapInfo.id, newModel.code).then(res=>{
that.$message.success(that.$t(this.isModify ? 'tip.updateSuccessfully' : 'tip.creatingSuccessful'));
that.loading = false;
if (!this.isModify && !newModel.multiRoute) { that.routeList.push({code:newModel.code, name:newModel.name, stationCode: newModel.stationCode || ''}); }
if (!this.isModify && !newModel.multiRoute) {
let sCode = newModel.stationCode;
if (!sCode && newModel.startSignalCode) {
const startSignalObj = that.signalList.find(item => {
return item.code == newModel.startSignalCode;
});
sCode = startSignalObj ? startSignalObj.stationCode : '';
}
that.routeList.push({code:newModel.code, name:newModel.name, stationCode: sCode || ''});
}
that.clear();
}).catch(() => {
that.$messageBox(that.$t(this.isModify ? 'tip.updateFailed' : 'tip.operationAbnormal'));