修改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: { queryObject: {
name: { name: {
type: 'text', type: 'text',
label: this.$t('map.pathName'), label: this.$t('map.pathName')
}, },
stationCode: { stationCode: {
type: 'select', type: 'select',

View File

@ -423,17 +423,16 @@ export default {
'stationStandList' 'stationStandList'
]), ]),
routeName() { routeName() {
let beg = ''; let end = '';
if (this.isSave) { if (this.isSave) {
let beg = ''; let end = '';
if (this.signalList) { if (this.signalList) {
this.signalList.forEach(elem => { this.signalList.forEach(elem => {
if (elem.code === this.addModel.startSignalCode) beg = elem.name; if (elem.code === this.addModel.startSignalCode) beg = elem.name;
if (elem.code === this.addModel.endSignalCode) end = elem.name; if (elem.code === this.addModel.endSignalCode) end = elem.name;
}); });
} }
return beg + '-' + end;
} }
return ''; return beg + '-' + end;
}, },
rules() { rules() {
const baseRules = { const baseRules = {

View File

@ -111,16 +111,16 @@ export default {
'stationStandList' 'stationStandList'
]), ]),
routeName: { routeName: {
// get: function () { get: function () {
// let beg = ''; let end = ''; let beg = ''; let end = '';
// if (this.signalList) { if (this.signalList) {
// this.signalList.forEach(elem => { this.signalList.forEach(elem => {
// if (elem.code === this.addModel.startSignalCode) beg = elem.name; if (elem.code === this.addModel.startSignalCode) beg = elem.name;
// if (elem.code === this.addModel.endSignalCode) end = elem.name; if (elem.code === this.addModel.endSignalCode) end = elem.name;
// }); });
// } }
// return this.addModel.name = beg + '-' + end; return beg + '-' + end;
// } }
} }
}, },
watch: { watch: {