From 057aee45fccf46fcf79744a32e4105fff319f7a9 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 29 Apr 2020 16:02:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=A1=E5=8F=B7=E6=B7=BB=E5=8A=A0=E5=B1=9E?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newMapdraft/mapoperate/signal/create.vue | 9 ++--- .../newMapdraft/mapoperate/signal/index.vue | 34 +++++++++++++------ 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/src/views/newMap/newMapdraft/mapoperate/signal/create.vue b/src/views/newMap/newMapdraft/mapoperate/signal/create.vue index ae3eb855a..3585a6118 100644 --- a/src/views/newMap/newMapdraft/mapoperate/signal/create.vue +++ b/src/views/newMap/newMapdraft/mapoperate/signal/create.vue @@ -195,12 +195,13 @@ export default { namePosition: { x: 0, y: 0 }, positionPoint: { x: 0, y: 0 }, buttonShow: true, - useType: '01', potLampType: '01', lampPostType: '01', lampPositionType: '01', guideShow: false, - stationCode: this.addModel.stationCode + stationCode: this.addModel.stationCode, + callOn: true, + turnBack: false }; this.sectionList.forEach(elem => { @@ -236,8 +237,8 @@ export default { }); }, hover(field) { - this.field = field === this.field ? '' : field; - this.$emit('signalSectionCode', this.field); + field = field === this.field ? '' : field; + this.$emit('signalSectionCode', field); }, setSectionCode(code) { this.addModel.sectionCode = code; diff --git a/src/views/newMap/newMapdraft/mapoperate/signal/index.vue b/src/views/newMap/newMapdraft/mapoperate/signal/index.vue index d4eadb7f7..6354236bb 100644 --- a/src/views/newMap/newMapdraft/mapoperate/signal/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/signal/index.vue @@ -68,7 +68,7 @@ export default { SignalLampPostTypeList: [], SignalLampPositionTypeList: [], SignalPositionTypeList: [], - SignalUseTypeList: [], + // SignalUseTypeList: [], failTypes: [ { code: '00', name: this.$t('map.normal') }, { code: '01', name: this.$t('map.signalFilamentAlarm') } @@ -93,7 +93,6 @@ export default { virtual: false, // 是否虚拟信号机 positionType: '', namePosition: { x: 0, y: 0 }, - useType: '', stationCode: '', sectionOffset: 0, rotate: 0, @@ -105,7 +104,9 @@ export default { positionPoint: { x: 0, y: 0 }, buttonPosition: { x: 0, y: 0 }, guidePosition: { x: 0, y: 0 }, - interlockStationCode: '' + interlockStationCode: '', + callOn: true, + turnBack: false }, addModel: { number: 2 @@ -167,21 +168,23 @@ export default { { prop: 'positionType', label: this.$t('map.signalPositionType'), type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.SignalPositionTypeList }, { prop: 'rotate', label: this.$t('map.rotateAngle'), type: 'number', min: -180, max: 180, placeholder: this.$t('tip.angle') }, { prop: 'nameRotated', label: this.$t('map.signalNameRotated'), type: 'checkbox' }, - { prop: 'virtual', label: '是否虚拟信号机:', type: 'checkbox' }, + { prop: 'virtual', label: '是否虚拟信号机:', type: 'checkbox', change: true, deviceChange: this.virtualChange }, { prop: 'namePosition', label: this.$t('map.signalNamePosition'), type: 'coordinate', width: '140px', children: [ { prop: 'namePosition.x', firstLevel: 'namePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, { prop: 'namePosition.y', firstLevel: 'namePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } ] }, { prop: 'buttonShow', label: this.$t('map.signalButtonShow'), type: 'checkbox' }, - { prop: 'buttonPosition', label: this.$t('map.signalButtonPosition'), type: 'coordinate', width: '140px', children: [ + { prop: 'buttonPosition', label: this.$t('map.signalButtonPosition'), type: 'coordinate', width: '140px', isHidden: !this.editModel.buttonShow, children: [ { prop: 'buttonPosition.x', firstLevel: 'buttonPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, { prop: 'buttonPosition.y', firstLevel: 'buttonPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } ] }, { prop: 'guideShow', label: this.$t('map.signalGuideShow'), type: 'checkbox' }, - { prop: 'guidePosition', label: this.$t('map.signalGuidePosition'), type: 'coordinate', width: '140px', children: [ + { prop: 'guidePosition', label: this.$t('map.signalGuidePosition'), type: 'coordinate', width: '140px', isHidden: !this.editModel.guideShow, children: [ { prop: 'guidePosition.x', firstLevel: 'guidePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, { prop: 'guidePosition.y', firstLevel: 'guidePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } - ] } + ] }, + { prop: 'callOn', label: '是否引导信号', type: 'checkbox', isHidden: this.editModel.virtual}, + { prop: 'turnBack', label: '是否折返进路始端', type: 'checkbox', isHidden: this.editModel.virtual} ] }, map: { @@ -190,7 +193,7 @@ export default { { prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList }, { prop: 'interlockStationCode', label: '所属联锁站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList}, { prop: 'uniqueName', label: this.$t('map.signalUniqueName'), type: 'input' }, - { prop: 'useType', label: this.$t('map.signalUseType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalUseTypeList }, + // { prop: 'useType', label: this.$t('map.signalUseType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalUseTypeList }, { prop: 'sectionCode', label: this.$t('map.belongsSection'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.signalSectionList }, { prop: 'sectionOffset', label: this.$t('map.signalOffset'), type: 'number', min: 0, placeholder: this.$t('tip.meter') } @@ -254,9 +257,9 @@ export default { this.SignalPositionTypeList = list; }); - this.$Dictionary.signalUseType().then(list => { - this.SignalUseTypeList = list; - }); + // this.$Dictionary.signalUseType().then(list => { + // this.SignalUseTypeList = list; + // }); }, methods: { deviceChange(code) { @@ -353,6 +356,15 @@ export default { this.$message('请输入偏移量'); } }, + virtualChange(val) { + if (val) { + this.editModel.callOn = false; + this.editModel.turnBack = false; + } else { + this.editModel.callOn = true; + this.editModel.turnBack = false; + } + }, // 寻找信号机关联区段 findSection(signal) { // 01 向左 02 向右