修改name错误的问题

This commit is contained in:
ival 2019-08-14 15:25:01 +08:00
parent 4886587d2d
commit 230d118d30
3 changed files with 13 additions and 14 deletions

View File

@ -51,7 +51,7 @@ export default {
queryObject: {
name: {
type: 'text',
label: this.$t('map.pathName'),
label: this.$t('map.pathName')
},
stationCode: {
type: 'select',

View File

@ -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 = {

View File

@ -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: {