diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index 8ea51ab53..049eea29f 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -403,7 +403,9 @@ class SkinCode extends defaultStyle { }, lamp: { radiusR: 6, // 控制灯大小 - controlColor: '#00FF00' // 控制灯颜色 + controlColor: '#00FF00', // 控制灯颜色 + offColor: '#000', + strokeColor: '#fff' } }; this[deviceType.Maintain] = { @@ -439,7 +441,8 @@ class SkinCode extends defaultStyle { }, lamp: { radiusR: 6, // 控制灯大小 - controlColor: '#00FF00' // 控制灯颜色 + controlColor: '#00FF00', // 控制灯颜色 + offColor: '#FF0000' } }; this[deviceType.MaintenanceLamps] = { @@ -454,7 +457,7 @@ class SkinCode extends defaultStyle { controlColor: '#b5b3b3' // 控制灯颜色 } }; - this[deviceType.ChainControl] = { + this[deviceType.ZcCommunication] = { displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { fontSize: 11, // 字体大小 @@ -466,6 +469,19 @@ class SkinCode extends defaultStyle { controlColor: '#00FF00' // 控制灯颜色 } }; + this[deviceType.ChainControl] = { + displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + controlColor: '#00FF00', // 控制灯颜色 + offColor: '#ff0000' + } + }; this[deviceType.IntersiteControl] = { displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { @@ -511,7 +527,8 @@ class SkinCode extends defaultStyle { }, lamp: { radiusR: 6, // 控制灯大小 - controlColor: '#00FF00' // 控制灯颜色 + controlColor: '#00FF00', // 控制灯颜色 + offColor: '#ff0000' } }; this[deviceType.ZcControl] = { diff --git a/src/jmapNew/constant/deviceRender.js b/src/jmapNew/constant/deviceRender.js index dec8872ea..74018fed6 100644 --- a/src/jmapNew/constant/deviceRender.js +++ b/src/jmapNew/constant/deviceRender.js @@ -195,5 +195,10 @@ deviceRender[deviceType.MaintenanceLamps] = { _type: deviceType.MaintenanceLamps, zlevel: 1 }; +/** ZcCommunication Zc通信表示灯 */ +deviceRender[deviceType.ZcCommunication] = { + _type: deviceType.ZcCommunication, + zlevel: 1 +}; export default deviceRender; diff --git a/src/jmapNew/constant/deviceType.js b/src/jmapNew/constant/deviceType.js index 2a6e294f9..4e2aeed9e 100644 --- a/src/jmapNew/constant/deviceType.js +++ b/src/jmapNew/constant/deviceType.js @@ -32,7 +32,8 @@ const deviceType = { Maintain: 'Maintain', PowerSupply: 'PowerSupply', NoOneReturn: 'NoOneReturn', - MaintenanceLamps: 'MaintenanceLamps' + MaintenanceLamps: 'MaintenanceLamps', + ZcCommunication: 'ZcCommunication' }; export default deviceType; diff --git a/src/jmapNew/constant/stateTransition.js b/src/jmapNew/constant/stateTransition.js index 1ada5a6ad..849d0dc79 100644 --- a/src/jmapNew/constant/stateTransition.js +++ b/src/jmapNew/constant/stateTransition.js @@ -165,6 +165,9 @@ class Status { handleMaintenanceLamps(device) { this.statusObj = {}; } + handleZcCommunication(device) { + this.statusObj = {}; + } getStatus() { return this.statusObj; } diff --git a/src/jmapNew/shape/SaidLamp/index.js b/src/jmapNew/shape/SaidLamp/index.js index d9154cfa9..c94ca8244 100644 --- a/src/jmapNew/shape/SaidLamp/index.js +++ b/src/jmapNew/shape/SaidLamp/index.js @@ -2,8 +2,9 @@ import Group from 'zrender/src/container/Group'; import EControl from '../element/EControl'; import EMouse from './EMouse'; import {isShowThePrdType} from '../../utils/handlePath'; +import deviceType from '../../constant/deviceType'; -export default class AtsControl extends Group { +export default class SaidLamp extends Group { constructor(model, style) { super(); this.z = 20; @@ -60,6 +61,12 @@ export default class AtsControl extends Group { // 设置状态 setState(model) { if (!this.isShowShape) return; + if (model._type === deviceType.PowerSupply && model.name.includes('2')) { + this.control.setControlColor(this.deviceStyle.lamp.offColor); + this.control.setControlStroke(this.deviceStyle.lamp.strokeColor, 1); + } else if ((model._type === deviceType.AtsControl || model._type === deviceType.LocalControl || model._type === deviceType.ChainControl) && model.name.includes('B')) { + this.control.setControlColor(this.deviceStyle.lamp.offColor); + } } createMouseEvent() { diff --git a/src/jmapNew/shape/element/EControl.js b/src/jmapNew/shape/element/EControl.js index 18b4c3897..daab1517c 100644 --- a/src/jmapNew/shape/element/EControl.js +++ b/src/jmapNew/shape/element/EControl.js @@ -97,6 +97,10 @@ export default class EControl extends Group { this.control.setStyle('fill', color); } } + setControlStroke(color, lineWidth) { + this.control.setStyle('lineWidth', lineWidth); + this.control.setStyle('stroke', color); + } setTextColor(color) { if (color) { this.text.setStyle('textFill', color); diff --git a/src/jmapNew/shape/factory.js b/src/jmapNew/shape/factory.js index 3eae81f7e..088fcae27 100644 --- a/src/jmapNew/shape/factory.js +++ b/src/jmapNew/shape/factory.js @@ -57,6 +57,7 @@ mapShape[deviceType.Maintain] = SaidLamp; mapShape[deviceType.PowerSupply] = SaidLamp; mapShape[deviceType.NoOneReturn] = SaidLamp; mapShape[deviceType.MaintenanceLamps] = SaidLamp; +mapShape[deviceType.ZcCommunication] = SaidLamp; function shapefactory(device, jmap) { const type = device._type; diff --git a/src/jmapNew/utils/parser.js b/src/jmapNew/utils/parser.js index e2c7e03fa..225c78190 100644 --- a/src/jmapNew/utils/parser.js +++ b/src/jmapNew/utils/parser.js @@ -168,6 +168,9 @@ export function parser(data, skinCode, showConfig) { case 'MaintenanceLamps': mapDevice[elem.code] = createDevice(deviceType.MaintenanceLamps, elem, propConvert, showConfig); break; + case 'ZcCommunication': + mapDevice[elem.code] = createDevice(deviceType.ZcCommunication, elem, propConvert, showConfig); + break; } }, this); @@ -277,6 +280,7 @@ export function updateMapData(state, model) { case deviceType.PowerSupply: updateForList(model, state, 'indicatorLightList'); break; case deviceType.NoOneReturn: updateForList(model, state, 'indicatorLightList'); break; case deviceType.MaintenanceLamps: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.ZcCommunication: updateForList(model, state, 'indicatorLightList'); break; } } } diff --git a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue index 42eac88db..c7fb8edf4 100644 --- a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue +++ b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue @@ -62,7 +62,8 @@ export default { maintainList: [], powerSupplyList: [], noOneReturnList: [], - MaintenanceLampList: [], + maintenanceLampList: [], + zcCommunicationList: [], typeList: [ { name: 'LEU通信', value: 'LeuControl' }, { name: '站间通信', value: 'IntersiteControl' }, @@ -73,7 +74,8 @@ export default { { name: '维护工作站', value: 'Maintain'}, { name: '电源', value: 'PowerSupply'}, { name: '无人折返', value: 'NoOneReturn'}, - { name: '全站维修点灯', value: 'MaintenanceLamps'} + { name: '全站维修点灯', value: 'MaintenanceLamps'}, + { name: 'ZC通信', value: 'ZcCommunication'} ], editModel: { code: '', @@ -238,7 +240,10 @@ export default { this.noOneReturnList.push(item); break; case 'MaintenanceLamps': - this.MaintenanceLampList.push(item); + this.maintenanceLampList.push(item); + break; + case 'ZcCommunication': + this.zcCommunicationList.push(item); break; } }); @@ -273,7 +278,10 @@ export default { this.selectLists = this.noOneReturnList; break; case 'MaintenanceLamps': - this.selectLists = this.MaintenanceLampList; + this.selectLists = this.maintenanceLampList; + break; + case 'ZcCommunication': + this.selectLists = this.zcCommunicationList; break; } }, @@ -302,7 +310,8 @@ export default { selected._type.toUpperCase() === 'CenterCommunication'.toUpperCase() || selected._type.toUpperCase() === 'AtsControl'.toUpperCase() || selected._type.toUpperCase() === 'LocalControl'.toUpperCase() || selected._type.toUpperCase() === 'ChainControl'.toUpperCase() || selected._type.toUpperCase() === 'Maintain'.toUpperCase() || selected._type.toUpperCase() === 'PowerSupply'.toUpperCase() || - selected._type.toUpperCase() === 'NoOneReturn'.toUpperCase() || selected._type.toUpperCase() === 'MaintenanceLamps'.toUpperCase()) { + selected._type.toUpperCase() === 'NoOneReturn'.toUpperCase() || selected._type.toUpperCase() === 'MaintenanceLamps'.toUpperCase() || + selected._type.toUpperCase() === 'ZcCommunication'.toUpperCase()) { this.activeName = 'first'; this.editModel = deepAssign(this.editModel, selected); this.editModel.type = selected._type; @@ -347,7 +356,8 @@ export default { selected._type.toUpperCase() === 'CenterCommunication'.toUpperCase() || selected._type.toUpperCase() === 'AtsControl'.toUpperCase() || selected._type.toUpperCase() === 'LocalControl'.toUpperCase() || selected._type.toUpperCase() === 'ChainControl'.toUpperCase() || selected._type.toUpperCase() === 'Maintain'.toUpperCase() || selected._type.toUpperCase() === 'PowerSupply'.toUpperCase() || - selected._type.toUpperCase() === 'NoOneReturn'.toUpperCase() || selected._type.toUpperCase() === 'MaintenanceLamps'.toUpperCase()) { + selected._type.toUpperCase() === 'NoOneReturn'.toUpperCase() || selected._type.toUpperCase() === 'MaintenanceLamps'.toUpperCase() || + selected._type.toUpperCase() === 'ZcCommunication'.toUpperCase()) { this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), { confirmButtonText: this.$t('tip.confirm'), cancelButtonText: this.$t('tip.cancel'), diff --git a/src/views/newMap/newMapdraft/mapoperate/index.vue b/src/views/newMap/newMapdraft/mapoperate/index.vue index 6afae44f5..84b2f1f5e 100644 --- a/src/views/newMap/newMapdraft/mapoperate/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/index.vue @@ -313,8 +313,8 @@ export default { this.enabledTab = 'Section'; } else if (type == 'AutomaticRoute' || type == 'AutoTurnBack' || type == 'AxleReset' || type == 'LimitControl' || type == 'GuideLock') { this.enabledTab = 'ControlDraft'; - } else if (type == 'AtsControl' || type == 'CenterCommunication' || type == 'ChainControl' || type == 'IntersiteControl' || - type == 'LeuControl' || type == 'LocalControl' || type == 'Maintain' || type == 'PowerSupply' || type == 'NoOneReturn' || type == 'MaintenanceLamps') { + } else if (type == 'AtsControl' || type == 'CenterCommunication' || type == 'ChainControl' || type == 'IntersiteControl' || type == 'LeuControl' || + type == 'LocalControl' || type == 'Maintain' || type == 'PowerSupply' || type == 'NoOneReturn' || type == 'MaintenanceLamps' || type == 'ZcCommunication') { this.enabledTab = 'ControlLamp'; } else { this.enabledTab = type;