diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue index de5a2fb4d..6cbd3cbc2 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue @@ -80,30 +80,20 @@ export default { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; }, domIdChoose() { - if (this.dialogShow) { - if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) { - return OperationEvent.StationControl.requestCentralControl.choose.domId; - } else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) { - return OperationEvent.StationControl.requestStationControl.choose.domId; - } else { - return ''; - } - } else { - return ''; + if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) { + return OperationEvent.StationControl.requestCentralControl.choose.domId; + } else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) { + return OperationEvent.StationControl.requestStationControl.choose.domId; } + return ''; }, domIdConfirm() { - if (this.dialogShow) { - if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) { - return OperationEvent.StationControl.requestCentralControl.confirm.domId; - } else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) { - return OperationEvent.StationControl.requestStationControl.confirm.domId; - } else { - return ''; - } - } else { - return ''; + if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) { + return OperationEvent.StationControl.requestCentralControl.confirm.domId; + } else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) { + return OperationEvent.StationControl.requestStationControl.confirm.domId; } + return ''; }, title() { return '站遥控转换'; @@ -298,10 +288,10 @@ export default { if (valid) { this.doClose(); } - }).catch((error) => { + }).catch(() => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(error.message); + this.$refs.noticeInfo.doShow(); }); } }, diff --git a/src/views/newMap/newMapdraft/mapoperate/signal/index.vue b/src/views/newMap/newMapdraft/mapoperate/signal/index.vue index fbf67104b..8d67934ed 100644 --- a/src/views/newMap/newMapdraft/mapoperate/signal/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/signal/index.vue @@ -66,6 +66,25 @@
设置
+ + + + + + {{ $t('map.activate') }} + + + + + + + +
+ 设置 +
@@ -211,6 +230,10 @@ export default { stationList: [], ciStation: [] }, + ciModelForm: { + signalList: [], + ciStation: '' + }, ctcModel: { ctc: true }, @@ -229,6 +252,14 @@ export default { { required: true, message: '请选择信号机', trigger: 'change' } ] }, + ciModelFormRules: { + signalList: [ + { required: true, message: '请选择信号机', trigger: 'change' } + ], + ciStation: [ + { required: true, message: '请选择连锁站', trigger: 'change' } + ] + }, guideModel: { scope: 'All', callOn: true @@ -404,7 +435,7 @@ export default { this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code)); }, deviceSelect(selected) { - if (selected && selected._type.toUpperCase() == 'Signal'.toUpperCase() && (this.field != 'selectSingalCode' && this.field != 'signalCodesType' && this.field != 'signalIgnoreRouteEnd')) { + if (selected && selected._type.toUpperCase() == 'Signal'.toUpperCase() && (this.field != 'selectSingalCode' && this.field != 'signalCodesType' && this.field != 'signalIgnoreRouteEnd' && this.field != 'signalCodes')) { this.editModel = getModel('Signal'); this.$refs.dataform && this.$refs.dataform.resetFields(); this.activeName = 'first'; @@ -438,6 +469,11 @@ export default { this.editModel.ignoreRouteEnd.push(selected.code); } this.activeName = 'first'; + } else if (selected && selected._type === 'Signal' && this.field == 'signalCodes') { + if (!this.ciModelForm.signalList.includes(selected.code)) { + this.ciModelForm.signalList.push(selected.code); + } + this.activeName = 'three'; } }, updateMapModel(data) { @@ -516,6 +552,21 @@ export default { this.$emit('updateMapModel', models); this.$message.success('数据构建成功!'); }, + setCiStationSignalLists() { + this.$refs['signalCiStation1'].validate(valid => { + if (valid) { + const models = []; + this.ciModelForm.signalList.forEach(code => { + const signalModel = deepAssign({}, this.$store.getters['map/getDeviceByCode'](code)); // 深拷贝 + signalModel.interlockStationCode = this.ciModelForm.ciStation; + models.push(signalModel); + }); + this.$emit('updateMapModel', models); + this.$message.success('数据构建成功!'); + this.ciModelForm.signalList = []; + } + }); + }, setSignalCallOn() { const models = []; this.signalList.forEach(item => {