站台方向属性调整

This commit is contained in:
fan 2019-12-13 17:51:00 +08:00
parent 852ac4e601
commit 62300d327f

View File

@ -57,8 +57,8 @@ export default {
{ code: '02', name: '朝上' }
*/
isRightList: [
{ code: true, name: '右向'},
{ code: false, name: '左向'}
{ code: 'right', name: '向右'},
{ code: 'left', name: '向左'}
],
editModel: {
code: '',
@ -71,7 +71,7 @@ export default {
stationCode: '', //
position: { x: 0, y: 0 },
visible: true, //
isRight: true,
isRight: 1,
standTrackCode: '',
small: false
// direction: '' //
@ -87,7 +87,7 @@ export default {
standTrackUpCode: '', //
standTrackDownCode: '', //
stationstandDirection: '02', //
isRight: true,
isRight: 1,
small: false
}
};
@ -273,6 +273,7 @@ export default {
this.$refs.dataform.resetFields();
this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected);
this.editModel.isRight = selected.isRight ? 'right' : 'left';
}
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'standSelectStationCode'.toUpperCase()) {
this.addModel.stationCode = selected.code;
@ -310,7 +311,7 @@ export default {
y: this.addModel.pointY
},
standTrackCode: this.addModel.standTrackCode,
isRight: this.addModel.isRight,
isRight: this.addModel.isRight === 'right',
small: this.addModel.small
};
this.stationList.forEach(elem => {
@ -339,7 +340,6 @@ export default {
}
models.push(param);
}
console.log(models, '===========');
this.$emit('updateMapModel', models);
}
});
@ -348,7 +348,9 @@ export default {
edit() {
this.$refs.dataform.validate((valid) => {
if (valid) {
this.editModel.isRight = this.addModel.isRight === 'right';
const data = Object.assign({_type: 'StationStand'}, this.editModel);
console.log(data);
this.$emit('updateMapModel', data);
}
});