diff --git a/src/views/map/mapdraft/mapedit/routeoperate/detail.vue b/src/views/map/mapdraft/mapedit/routeoperate/detail.vue index 163f1d754..1d7ab37cd 100644 --- a/src/views/map/mapdraft/mapedit/routeoperate/detail.vue +++ b/src/views/map/mapdraft/mapedit/routeoperate/detail.vue @@ -51,7 +51,7 @@ export default { queryObject: { name: { type: 'text', - label: this.$t('map.pathName'), + label: this.$t('map.pathName') }, stationCode: { type: 'select', diff --git a/src/views/map/mapdraft/mapedit/routeoperate/route.vue b/src/views/map/mapdraft/mapedit/routeoperate/route.vue index 59bf7eb36..e80f3afab 100644 --- a/src/views/map/mapdraft/mapedit/routeoperate/route.vue +++ b/src/views/map/mapdraft/mapedit/routeoperate/route.vue @@ -423,17 +423,16 @@ export default { 'stationStandList' ]), routeName() { + let beg = ''; let end = ''; if (this.isSave) { - let beg = ''; let end = ''; if (this.signalList) { this.signalList.forEach(elem => { if (elem.code === this.addModel.startSignalCode) beg = elem.name; if (elem.code === this.addModel.endSignalCode) end = elem.name; }); } - return beg + '-' + end; } - return ''; + return beg + '-' + end; }, rules() { const baseRules = { diff --git a/src/views/map/mapdraft/mapedit/switchoperate/route.vue b/src/views/map/mapdraft/mapedit/switchoperate/route.vue index 93cb851c2..38af4345a 100644 --- a/src/views/map/mapdraft/mapedit/switchoperate/route.vue +++ b/src/views/map/mapdraft/mapedit/switchoperate/route.vue @@ -111,16 +111,16 @@ export default { 'stationStandList' ]), routeName: { - // get: function () { - // let beg = ''; let end = ''; - // if (this.signalList) { - // this.signalList.forEach(elem => { - // if (elem.code === this.addModel.startSignalCode) beg = elem.name; - // if (elem.code === this.addModel.endSignalCode) end = elem.name; - // }); - // } - // return this.addModel.name = beg + '-' + end; - // } + get: function () { + let beg = ''; let end = ''; + if (this.signalList) { + this.signalList.forEach(elem => { + if (elem.code === this.addModel.startSignalCode) beg = elem.name; + if (elem.code === this.addModel.endSignalCode) end = elem.name; + }); + } + return beg + '-' + end; + } } }, watch: {