diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index b0b3def8f..02bc12167 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -413,7 +413,6 @@ class SkinCode extends defaultStyle { block: false // 封锁显示 } }; - this[deviceType.Line] = { lineColor: '#FFFFFF' // 线条颜色 }; diff --git a/src/jmapNew/config/skinCode/xian_02.js b/src/jmapNew/config/skinCode/xian_02.js index 3b68afa5f..c38ba3c66 100644 --- a/src/jmapNew/config/skinCode/xian_02.js +++ b/src/jmapNew/config/skinCode/xian_02.js @@ -165,6 +165,7 @@ class SkinCode extends defaultStyle { }, lamp: { bgShow: false, // 是否被选中 + logicColor: true, // cbtc通信是否影响灯颜色 guidName: 'singleRY', // 默认引导类型 borderVariable: true, // 信号灯边框可变 stopWidth: 2, // 禁止线宽度 diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js index c60395f25..6e9fc6fb6 100644 --- a/src/jmapNew/shape/Signal/index.js +++ b/src/jmapNew/shape/Signal/index.js @@ -314,39 +314,85 @@ class Signal extends Group { } // 关闭 - close() { - if (this.count == 2) { // 双灯 - this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor); - this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor); - } else if (this.count == 1) { // 单灯 - if (this.model.useType == '05' && this.lamps[0]) { // 调车信号机 - this.lamps[0].setColor(this.style.Signal.lamp.blueColor); - } else { - this.lamps[0].setColor(this.style.Signal.lamp.redColor); + close(logicLight) { + if (this.style.Signal.lamp.logicColor && logicLight) { + // 逻辑点灯影响灯颜色仅西安二且暂无双灯 + if (this.count == 1) { + this.lamps[0].setColor(this.style.Signal.lamp.grayColor); + this.insideTriangle.show(); + this.insideTriangle.setStyle({fill: this.style.Signal.lamp.redColor}); + setTimeout(()=> { + this.insideTriangle.setStyle({fill: '#000'}); + }, 500); + setTimeout(()=> { + this.insideTriangle.setStyle({fill: this.style.Signal.lamp.redColor}); + }, 1000); + } + } else { + if (this.count == 2) { // 双灯 + this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor); + this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor); + } else if (this.count == 1) { // 单灯 + if (this.model.useType == '05' && this.lamps[0]) { // 调车信号机 + this.lamps[0].setColor(this.style.Signal.lamp.blueColor); + } else { + this.lamps[0].setColor(this.style.Signal.lamp.redColor); + } } } + } /* 正向开放*/ - openPositive() { - this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.greenColor); - this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor); // 设置黑色 - this.virtualSignal && this.virtualSignal.setColor(this.style.Signal.lamp.greenColor); - if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色 - this.sigPost.setColor('#00FF00'); - if (this.model.logicLight) { - this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor); + openPositive(logicLight) { + if (this.style.Signal.lamp.logicColor && logicLight) { + // 逻辑点灯影响灯颜色仅西安二且暂无双灯 + if (this.count == 1) { + this.lamps[0].setColor(this.style.Signal.lamp.grayColor); + this.insideTriangle.show(); + this.insideTriangle.setStyle({fill: this.style.Signal.lamp.greenColor}); + setTimeout(()=> { + this.insideTriangle.setStyle({fill: '#000'}); + }, 500); + setTimeout(()=> { + this.insideTriangle.setStyle({fill: this.style.Signal.lamp.greenColor}); + }, 1000); + } + } else { + this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.greenColor); + this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor); // 设置黑色 + this.virtualSignal && this.virtualSignal.setColor(this.style.Signal.lamp.greenColor); + if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色 + this.sigPost.setColor('#00FF00'); + if (this.model.logicLight) { + this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor); + } } } + } /* 侧向开放 */ - openLateral() { - this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor); - this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor); - if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色 - this.sigPost.setColor('#00FF00'); - if (this.model.logicLight) { // 设置哈尔滨逻辑点灯 颜色 - this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor); + openLateral(logicLight) { + if (this.style.Signal.lamp.logicColor && logicLight) { + if (this.count == 1) { + this.lamps[0].setColor(this.style.Signal.lamp.grayColor); + this.insideTriangle.show(); + this.insideTriangle.setStyle({fill: this.style.Signal.lamp.yellowColor}); + setTimeout(()=> { + this.insideTriangle.setStyle({fill: '#000'}); + }, 1000); + setTimeout(()=> { + this.insideTriangle.setStyle({fill: this.style.Signal.lamp.yellowColor}); + }, 2000); + } + } else { + this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor); + this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor); + if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色 + this.sigPost.setColor('#00FF00'); + if (this.model.logicLight) { // 设置哈尔滨逻辑点灯 颜色 + this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor); + } } } } @@ -529,9 +575,9 @@ class Signal extends Group { model.blockade && this.block(); /** 设置灯的颜色 */ model.redOpen && model.yellowOpen && !model.greenOpen && this.guid(); // 引导信号显示 - model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(); // 信号关闭 - model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(); // 信号正向开放 - model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(); // 信号侧向开放 + model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(model.logicLight); // 信号关闭 + model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(model.logicLight); // 信号正向开放 + model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(model.logicLight); // 信号侧向开放 /** 进路交人工控或自动控 */ !model.atsControl && this.setArtificialRouteClose(); // 联锁自动进路通过 diff --git a/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue b/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue index 061d81f27..1adf5f3be 100644 --- a/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue +++ b/src/views/newMap/newMapdraft/mapoperate/ControlDraft.vue @@ -220,8 +220,8 @@ export default { } }, typeChange(type) { // 根据类型来选择功能按钮列表 - this.$refs.dataform && this.$refs.dataform.resetFields(); - this.$refs.make && this.$refs.make.resetFields(); + this.$refs.dataform && this.$refs.dataform.resetFields(); + this.$refs.make && this.$refs.make.resetFields(); this.addModel.automaticRouteCode = ''; this.addModel.cycleCode = ''; this.addModel.concentrateStationList = ''; diff --git a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue index 7ea7e21ad..b02f3c47f 100644 --- a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue +++ b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue @@ -263,8 +263,8 @@ export default { }, methods: { typeChange(type) { - this.$refs.dataform && this.$refs.dataform.resetFields(); - this.$refs.make && this.$refs.make.resetFields(); + this.$refs.dataform && this.$refs.dataform.resetFields(); + this.$refs.make && this.$refs.make.resetFields(); this.addModel.type = type; this.editModel.type = type; }, @@ -288,6 +288,7 @@ export default { this.returnModeGroupList = []; this.controlSwitchList = []; this.AxleList = []; + this.SwitchFaultList = []; indicatorLightList.forEach(item => { switch (item._type) { case 'AtsControl': @@ -341,6 +342,9 @@ export default { case 'Axle': this.AxleList.push(item); break; + case 'SwitchFault': + this.SwitchFaultList.push(item); + break; } }); }, @@ -397,6 +401,9 @@ export default { case 'Axle': this.selectLists = this.AxleList; break; + case 'SwitchFault': + this.selectLists = this.SwitchFaultList; + break; default : this.selectLists = this.intersiteControlList; break; @@ -414,8 +421,8 @@ export default { this.addModel.switchCode = selected.code; } } else if (selected && this.controlLampTypeList.includes(selected._type)) { - this.$refs.dataform && this.$refs.dataform.resetFields(); - this.$refs.make && this.$refs.make.resetFields(); + this.$refs.dataform && this.$refs.dataform.resetFields(); + this.$refs.make && this.$refs.make.resetFields(); this.activeName = 'first'; this.editModel = deepAssign(this.editModel, selected); this.editModel.type = selected._type; diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue index 898ee8e20..26866d41b 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue @@ -1005,26 +1005,15 @@ export default { edit() { this.$refs['dataform'].validate(valid => { if (valid) { - if ( - this.editModel.type === '03' && - this.editModel.leftSectionCode && - this.editModel.rightSectionCode - ) { + if (this.editModel.type === '03' && this.editModel.leftSectionCode && this.editModel.rightSectionCode) { this.$messageBox('道岔区段应仅有一侧关联区段!'); return; } let models = []; - const model = deepAssign(this.editModel, { - _type: 'Section' - }); // 修改元素model - if ( - model.lengthFact > 5 && - (model.transferTrack || - model.reentryTrack || - model.standTrack) - ) { - model.leftStopPointOffset = 5; - model.rightStopPointOffset = model.lengthFact - 5; + const model = deepAssign(this.editModel, { _type: 'Section' }); // 修改元素model + if (model.lengthFact > 5 && (model.transferTrack || model.reentryTrack || model.standTrack)) { + model.leftStopPointOffset = model.leftStopPointOffset || 5; + model.rightStopPointOffset = model.rightStopPointOffset || model.lengthFact - 5; } const changeSectionList = this.handleOtherSectionChange(model); models = [model, ...changeSectionList]; @@ -1091,9 +1080,8 @@ export default { lengthFact += model.lengthFact; copySection.lengthFact = lengthFact.toFixed(3); // 自动获取 物理区段的 实际长度 是由逻辑区段相加 if (copySection.lengthFact > 5) { - copySection.leftStopPointOffset = 5; - copySection.rightStopPointOffset = - copySection.lengthFact - 5; + copySection.leftStopPointOffset = copySection.leftStopPointOffset || 5; + copySection.rightStopPointOffset = copySection.rightStopPointOffset || copySection.lengthFact - 5; } updataFlag = true; } @@ -1203,6 +1191,7 @@ export default { ); models = [...models, ...deleteObjAssociatedSection]; _that.$emit('updateMapModel', models); + this.clear(); _that.deviceSelect(); }) .catch(error => { diff --git a/src/views/newMap/newMapdraft/mapoperate/signal/create.vue b/src/views/newMap/newMapdraft/mapoperate/signal/create.vue index 3585a6118..d218ca050 100644 --- a/src/views/newMap/newMapdraft/mapoperate/signal/create.vue +++ b/src/views/newMap/newMapdraft/mapoperate/signal/create.vue @@ -201,7 +201,8 @@ export default { guideShow: false, stationCode: this.addModel.stationCode, callOn: true, - turnBack: false + turnBack: false, + ctc: true }; this.sectionList.forEach(elem => { diff --git a/src/views/newMap/newMapdraft/mapoperate/signal/index.vue b/src/views/newMap/newMapdraft/mapoperate/signal/index.vue index 8b59dcb0c..abc855339 100644 --- a/src/views/newMap/newMapdraft/mapoperate/signal/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/signal/index.vue @@ -17,61 +17,78 @@ - - - - - -
- 构建信号机偏移量 - {{ $t('map.clearHint') }} -
-
- - - - - - - -
- 设置全部信号机类型 -
-
- - - - - - - - - - - - -
- 设置归属联锁站 -
-
-
- 批量设置引导信号 -
+ + + + + + + +
+ 设置 + {{ $t('map.clearHint') }} +
+
+ + + + + + + + +
+ 设置 +
+
+ + + + + + + + + + + + + +
+ 设置 +
+
+ +
+ 设置 +
+
+ + + + + + +
+ 设置 +
+
+
@@ -106,6 +123,7 @@ export default { data() { return { activeName: 'first', + collapseActive: '', lazy: true, SignalDirectionList: [ { code: false, name: '向左' }, @@ -153,7 +171,8 @@ export default { guidePosition: { x: 0, y: 0 }, interlockStationCode: '', callOn: true, - turnBack: false + turnBack: false, + ctc: true // 是否灭灯显示 }, addModel: { number: 2 @@ -164,6 +183,9 @@ export default { ciModel: { stationList: [], ciStation: [] + }, + ctcModel: { + ctc: true } }; }, @@ -245,7 +267,8 @@ export default { { prop: 'guidePosition.y', firstLevel: 'guidePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } ] }, { prop: 'callOn', label: '是否引导信号:', type: 'checkbox'}, - { prop: 'turnBack', label: '是否折返进路始端:', type: 'checkbox', isHidden: this.editModel.virtual} + { prop: 'turnBack', label: '是否折返进路始端:', type: 'checkbox', isHidden: this.editModel.virtual}, + { prop: 'ctc', label: '是否灭灯显示(CTC级)', type: 'checkbox'} ] }, map: { @@ -421,10 +444,8 @@ export default { }, virtualChange(val) { if (val) { - this.editModel.callOn = false; this.editModel.turnBack = false; } else { - this.editModel.callOn = true; this.editModel.turnBack = false; } }, @@ -462,6 +483,16 @@ export default { this.$emit('updateMapModel', models); this.$message.success('数据构建成功!'); }, + setCtcShow() { + const models = []; + this.signalList.forEach(item => { + const signalModel = deepAssign({}, item); // 深拷贝 + signalModel.ctc = this.ctcModel.ctc; + models.push(signalModel); + }); + this.$emit('updateMapModel', models); + this.$message.success('数据构建成功!'); + }, // 寻找信号机关联区段 findSection(signal) { // 01 向左 02 向右 diff --git a/src/views/publish/publishLesson/index.vue b/src/views/publish/publishLesson/index.vue index 2fe2f9b43..c64889c4e 100644 --- a/src/views/publish/publishLesson/index.vue +++ b/src/views/publish/publishLesson/index.vue @@ -139,9 +139,9 @@ export default { this.$message.success(this.$t('publish.deleteSuccess')); this.reloadTable(); localStore.remove('mapId'); - }).catch(() => { + }).catch((error) => { this.reloadTable(); - this.$messageBox(this.$t('error.deleteFailed')); + this.$messageBox(this.$t('error.deleteFailed') + ':' + error.message); }); }).catch(() => { }); },