From c0c5d620cd43e9d92f3ca80310cadca0085f397f Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Thu, 19 Dec 2019 13:12:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=AB=99=E5=8F=B0=E7=B4=A7?= =?UTF-8?q?=E6=80=A5=E5=81=9C=E8=BD=A6=E5=88=9B=E5=BB=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newMapdraft/mapoperate/espDraft.vue | 2 +- .../newMapdraft/mapoperate/stationstand.vue | 21 ++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/views/newMap/newMapdraft/mapoperate/espDraft.vue b/src/views/newMap/newMapdraft/mapoperate/espDraft.vue index 6a3262262..f339d2209 100644 --- a/src/views/newMap/newMapdraft/mapoperate/espDraft.vue +++ b/src/views/newMap/newMapdraft/mapoperate/espDraft.vue @@ -157,7 +157,7 @@ export default { create() { const arr = []; this.stationStandList.forEach(item => { - if (item.visible && !this.hasPSD(item)) { + if (item.visible && !item.small && !this.hasPSD(item)) { const uid = getUID('Esp', [...this.espList, ...arr]); arr.push({ _type: 'Esp', diff --git a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue index b189f3b82..1917ac34a 100644 --- a/src/views/newMap/newMapdraft/mapoperate/stationstand.vue +++ b/src/views/newMap/newMapdraft/mapoperate/stationstand.vue @@ -97,7 +97,8 @@ export default { 'stationList', 'stationStandList', 'sectionList', - 'psdList' + 'psdList', + 'espList' ]), form() { const form = { @@ -121,7 +122,7 @@ export default { { prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' }, { prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'editSectionSelectCode', buttonShowType: this.isButtonTypeES }, { prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList }, - { prop: 'small', label: '是否小型站台:', type: 'checkbox' } + { prop: 'small', label: '是否小型站台:', type: 'checkbox', disabled: true } ] }, map: { @@ -329,6 +330,13 @@ export default { param.position.y = this.addModel.pointY + (this.addModel.height / 2) + space; } models.push(param); + const espUid = getUID('Esp', this.espList); // 创建紧急停车按钮 + models.push({ + _type: 'Esp', + code: espUid, + name: `Esp${this.espList.length + 1}`, + standCode: Standuid + }); } section.standTrack = true; models.push(section); @@ -372,7 +380,14 @@ export default { cancelButtonText: this.$t('tip.cancel'), type: 'warning' }).then(() => { - _that.$emit('updateMapModel', {...selected, _dispose: true}); + const models = []; + models.push(deepAssign(selected, { _dispose: true })); + this.espList.forEach(item => { + if (item.standCode == selected.code) { + models.push(deepAssign(item, { _dispose: true })); + } + }); + _that.$emit('updateMapModel', models); _that.deviceSelect(); this.$refs.dataform.resetFields(); }).catch(() => {