From 62300d327fc7028f1eb788bc6c3c1c8931ffad27 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 13 Dec 2019 17:51:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=99=E5=8F=B0=E6=96=B9=E5=90=91=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newMap/newMapdraft/mapoperate/stationstand.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue index 454651eda..6f47871bc 100644 --- a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue +++ b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue @@ -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); } });