diff --git a/src/views/newMap/newMapdraft/mapoperate/trainwindow.vue b/src/views/newMap/newMapdraft/mapoperate/trainwindow.vue index 614d6bb1f..d2bb50dda 100644 --- a/src/views/newMap/newMapdraft/mapoperate/trainwindow.vue +++ b/src/views/newMap/newMapdraft/mapoperate/trainwindow.vue @@ -22,7 +22,7 @@
删除 - {{ $t('map.deleteTrainWindow') }} + {{ $t('map.deleteTrainWindow') }}
修改 @@ -374,15 +374,17 @@ export default { this.$refs['addForm'].validate((valid) => { if (valid) { const models = []; - this.addModel.modelList.forEach(item => { - const model = this.$store.getters['map/getDeviceByCode'](item); - model.point.y = this.addModel.pointY; - model.height = this.addModel.height; - model.width = this.addModel.width; - models.push(model); + this.addModel.modelList.forEach(code => { + const model = this.$store.getters['map/getDeviceByCode'](code); + const modelData = deepAssign({}, model); + modelData.point.y = this.addModel.pointY; + modelData.height = this.addModel.height; + modelData.width = this.addModel.width; + models.push(modelData); }); this.$emit('updateMapModel', models); this.addModel.modelList = []; + this.field = ''; } }); }