From 5c7c27d2f3993773185c1e1086aba58e358e966d Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Tue, 24 Mar 2020 15:02:14 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=8A=B6=E6=80=81=E7=81=AF=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/chengdu_03.js | 12 +++++++++++ src/jmapNew/constant/deviceRender.js | 5 +++++ src/jmapNew/constant/deviceType.js | 3 ++- src/jmapNew/constant/stateTransition.js | 3 +++ src/jmapNew/shape/factory.js | 21 ++++++++++--------- src/jmapNew/utils/parser.js | 4 ++++ .../newMapdraft/mapoperate/controlLamp.vue | 17 +++++++++++---- .../newMap/newMapdraft/mapoperate/index.vue | 3 ++- 8 files changed, 52 insertions(+), 16 deletions(-) diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index d8bb8c54c..8ea51ab53 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -442,6 +442,18 @@ class SkinCode extends defaultStyle { controlColor: '#00FF00' // 控制灯颜色 } }; + this[deviceType.MaintenanceLamps] = { + displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + lamp: { + radiusR: 6, // 控制灯大小 + controlColor: '#b5b3b3' // 控制灯颜色 + } + }; this[deviceType.ChainControl] = { displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { diff --git a/src/jmapNew/constant/deviceRender.js b/src/jmapNew/constant/deviceRender.js index 322979417..dec8872ea 100644 --- a/src/jmapNew/constant/deviceRender.js +++ b/src/jmapNew/constant/deviceRender.js @@ -190,5 +190,10 @@ deviceRender[deviceType.NoOneReturn] = { _type: deviceType.NoOneReturn, zlevel: 1 }; +/** MaintenanceLamps 全站维修点灯 */ +deviceRender[deviceType.MaintenanceLamps] = { + _type: deviceType.MaintenanceLamps, + zlevel: 1 +}; export default deviceRender; diff --git a/src/jmapNew/constant/deviceType.js b/src/jmapNew/constant/deviceType.js index 0304a84a1..2a6e294f9 100644 --- a/src/jmapNew/constant/deviceType.js +++ b/src/jmapNew/constant/deviceType.js @@ -31,7 +31,8 @@ const deviceType = { LocalControl: 'LocalControl', Maintain: 'Maintain', PowerSupply: 'PowerSupply', - NoOneReturn: 'NoOneReturn' + NoOneReturn: 'NoOneReturn', + MaintenanceLamps: 'MaintenanceLamps' }; export default deviceType; diff --git a/src/jmapNew/constant/stateTransition.js b/src/jmapNew/constant/stateTransition.js index 85ffd91a6..1ada5a6ad 100644 --- a/src/jmapNew/constant/stateTransition.js +++ b/src/jmapNew/constant/stateTransition.js @@ -162,6 +162,9 @@ class Status { handleNoOneReturn(device) { this.statusObj = {}; } + handleMaintenanceLamps(device) { + this.statusObj = {}; + } getStatus() { return this.statusObj; } diff --git a/src/jmapNew/shape/factory.js b/src/jmapNew/shape/factory.js index d764c4b97..3eae81f7e 100644 --- a/src/jmapNew/shape/factory.js +++ b/src/jmapNew/shape/factory.js @@ -21,7 +21,7 @@ import AutoTurnBack from './Automactic/index.js'; import OutFrame from './OutFrame/index.js'; import CheckBox from './checkBox/checkBox.js'; import AutomaticRoute from './AutomacticRoute/index.js'; -import AtsControl from './SaidLamp/index.js'; +import SaidLamp from './SaidLamp/index.js'; /** 图库*/ const mapShape = {}; @@ -47,15 +47,16 @@ mapShape[deviceType.AxleReset] = AxleReset; mapShape[deviceType.GuideLock] = GuideLock; mapShape[deviceType.CheckBox] = CheckBox; mapShape[deviceType.AutomaticRoute] = AutomaticRoute; -mapShape[deviceType.AtsControl] = AtsControl; -mapShape[deviceType.CenterCommunication] = AtsControl; -mapShape[deviceType.ChainControl] = AtsControl; -mapShape[deviceType.IntersiteControl] = AtsControl; -mapShape[deviceType.LeuControl] = AtsControl; -mapShape[deviceType.LocalControl] = AtsControl; -mapShape[deviceType.Maintain] = AtsControl; -mapShape[deviceType.PowerSupply] = AtsControl; -mapShape[deviceType.NoOneReturn] = AtsControl; +mapShape[deviceType.AtsControl] = SaidLamp; +mapShape[deviceType.CenterCommunication] = SaidLamp; +mapShape[deviceType.ChainControl] = SaidLamp; +mapShape[deviceType.IntersiteControl] = SaidLamp; +mapShape[deviceType.LeuControl] = SaidLamp; +mapShape[deviceType.LocalControl] = SaidLamp; +mapShape[deviceType.Maintain] = SaidLamp; +mapShape[deviceType.PowerSupply] = SaidLamp; +mapShape[deviceType.NoOneReturn] = SaidLamp; +mapShape[deviceType.MaintenanceLamps] = SaidLamp; function shapefactory(device, jmap) { const type = device._type; diff --git a/src/jmapNew/utils/parser.js b/src/jmapNew/utils/parser.js index 99a633bc8..e2c7e03fa 100644 --- a/src/jmapNew/utils/parser.js +++ b/src/jmapNew/utils/parser.js @@ -165,6 +165,9 @@ export function parser(data, skinCode, showConfig) { case 'NoOneReturn': mapDevice[elem.code] = createDevice(deviceType.NoOneReturn, elem, propConvert, showConfig); break; + case 'MaintenanceLamps': + mapDevice[elem.code] = createDevice(deviceType.MaintenanceLamps, elem, propConvert, showConfig); + break; } }, this); @@ -273,6 +276,7 @@ export function updateMapData(state, model) { case deviceType.Maintain: updateForList(model, state, 'indicatorLightList'); break; case deviceType.PowerSupply: updateForList(model, state, 'indicatorLightList'); break; case deviceType.NoOneReturn: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.MaintenanceLamps: updateForList(model, state, 'indicatorLightList'); break; } } } diff --git a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue index 5c806bb9c..42eac88db 100644 --- a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue +++ b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue @@ -62,6 +62,7 @@ export default { maintainList: [], powerSupplyList: [], noOneReturnList: [], + MaintenanceLampList: [], typeList: [ { name: 'LEU通信', value: 'LeuControl' }, { name: '站间通信', value: 'IntersiteControl' }, @@ -71,7 +72,8 @@ export default { { name: '连锁主备状态', value: 'ChainControl' }, { name: '维护工作站', value: 'Maintain'}, { name: '电源', value: 'PowerSupply'}, - { name: '无人折返', value: 'NoOneReturn'} + { name: '无人折返', value: 'NoOneReturn'}, + { name: '全站维修点灯', value: 'MaintenanceLamps'} ], editModel: { code: '', @@ -235,6 +237,9 @@ export default { case 'NoOneReturn': this.noOneReturnList.push(item); break; + case 'MaintenanceLamps': + this.MaintenanceLampList.push(item); + break; } }); }, @@ -267,8 +272,10 @@ export default { case 'NoOneReturn': this.selectLists = this.noOneReturnList; break; + case 'MaintenanceLamps': + this.selectLists = this.MaintenanceLampList; + break; } - console.log(this.selectLists, '==============='); }, changeStation(code) { // 选择对应的所属设备集中站 this.autoList.forEach(elem => { @@ -294,7 +301,8 @@ export default { if (selected && selected._type.toUpperCase() === 'LeuControl'.toUpperCase() || selected._type.toUpperCase() === 'IntersiteControl'.toUpperCase() || 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() === 'Maintain'.toUpperCase() || selected._type.toUpperCase() === 'PowerSupply'.toUpperCase() || + selected._type.toUpperCase() === 'NoOneReturn'.toUpperCase() || selected._type.toUpperCase() === 'MaintenanceLamps'.toUpperCase()) { this.activeName = 'first'; this.editModel = deepAssign(this.editModel, selected); this.editModel.type = selected._type; @@ -338,7 +346,8 @@ export default { if (selected && selected._type.toUpperCase() === 'LeuControl'.toUpperCase() || selected._type.toUpperCase() === 'IntersiteControl'.toUpperCase() || 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() === 'Maintain'.toUpperCase() || selected._type.toUpperCase() === 'PowerSupply'.toUpperCase() || + selected._type.toUpperCase() === 'NoOneReturn'.toUpperCase() || selected._type.toUpperCase() === 'MaintenanceLamps'.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 dc079ee2c..6afae44f5 100644 --- a/src/views/newMap/newMapdraft/mapoperate/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/index.vue @@ -313,7 +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 == 'InteresiteControl' || type == 'LeuControl' || type == 'LocalControl' || type == 'Maintain' || type == 'PowerSupply' || type == 'NoOneReturn') { + } else if (type == 'AtsControl' || type == 'CenterCommunication' || type == 'ChainControl' || type == 'IntersiteControl' || + type == 'LeuControl' || type == 'LocalControl' || type == 'Maintain' || type == 'PowerSupply' || type == 'NoOneReturn' || type == 'MaintenanceLamps') { this.enabledTab = 'ControlLamp'; } else { this.enabledTab = type; From a22ec53e39ae2106f9b9ade5bb9955b2fbed2342 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Tue, 24 Mar 2020 15:09:25 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BD=9B=E5=B1=B1?= =?UTF-8?q?=E7=BA=BF=E8=B7=AF=E4=BF=A1=E5=8F=B7=E6=9C=BA=EF=BC=8C=E7=AB=99?= =?UTF-8?q?=E5=8F=B0=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/foshan_01.js | 56 +++++++++++++++--------- src/jmapNew/shape/Signal/index.js | 4 +- src/jmapNew/shape/StationStand/ELevel.js | 2 +- src/jmapNew/shape/StationStand/index.js | 7 ++- 4 files changed, 44 insertions(+), 25 deletions(-) diff --git a/src/jmapNew/config/skinCode/foshan_01.js b/src/jmapNew/config/skinCode/foshan_01.js index 679da5199..19eda9cec 100644 --- a/src/jmapNew/config/skinCode/foshan_01.js +++ b/src/jmapNew/config/skinCode/foshan_01.js @@ -144,7 +144,7 @@ class SkinCode extends defaultStyle { }, lamp: { bgShow: false, // 是否被选中 - guidName: 'defult', // 默认引导类型 + guidName: 'ningbo_01', // 默认引导类型 stopWidth: 2, // 禁止线宽度 borderWidth: 1, // 信号灯边框线宽度 borderColor: '#3149C3', // 信号灯边框线颜色 @@ -158,19 +158,21 @@ class SkinCode extends defaultStyle { blueColor: '#0070C0' // 信号灯蓝色 }, route: { - direction: false, // 自动进路方向 - offset: { x: -4, y: 0 }, // 自动进路偏移量 - routeColor: '#00FF00' // 自动进路 + direction: false, // 自动通过方向 + radiusR: 8, // 自动通过三角半径 + offset: { x: 2, y: 0 }, // 自动通过偏移量 + routeColor: '#00FF00' // 自动进路 }, - auto: { - signalFrontTriangle: false, // 信号灯前三角展示 - direction: false, // 自动通过方向 - offset: { x: -4, y: 0}, // 自动通过偏移量 - width: 5, // 自动宽度 - autoRoute: '#00FF00', // 自动进路 - autoTrigger: '#FFFF00', // 自动触发 - manualControl: '#FFFF00', // 人工控制 - outConflict: '#C00808' // 出车冲突 + auto: { // 人工进路显示状态 + signalFrontTriangle: true, // 信号灯前三角展示 + fleetModeTriangle: false, // 自动进路显示三角形非箭头 + direction: false, // 自动通过方向 + offset: { x: -4, y: 0 }, // 自动通过偏移量 + width: 5, // 自动宽度 + manualControl: '#FFFF00', // 人工控制 + autoRoute: '#00FF00', // 自动进路 (绿色) + autoTrigger: '#FFFF00', // 自动触发 + outConflict: '#C00808' // 出车冲突 }, delay: { direction: true, // 延时解锁方向 @@ -193,6 +195,7 @@ class SkinCode extends defaultStyle { this[deviceType.StationStand] = { common: { // 通用属性 textFontSize: 11, // 站台默认字体大小 + haveJumpShow: true, // 站台是否有列车停跳显示 functionButtonShow: '03' // 功能灯按钮显示条件(01所有模式下显示 02 行调显示 03现地显示) }, safetyDoor: { // 屏蔽门 @@ -207,11 +210,12 @@ class SkinCode extends defaultStyle { spareColor: '#606060', // 站台空闲颜色 stopColor: '#FEFE00', // 站台列车停站颜色 jumpStopColor: '#9A99FF', // 站台跳停颜色 - designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色 + designatedJumpStopColor: '#606060' // 站台指定列车跳停颜色 }, standEmergent: { // 紧急关闭 mergentR: 4, // 站台紧急关闭半径 - offset: {x: 0, y: 40}, // 站台紧急关闭偏移量 + position: -1, + offset: {x: -6, y: -15}, // 站台紧急关闭偏移量 closeColor: '#F61107' // 站台紧急关闭颜色 }, reentry: { // 站台折返策略 @@ -223,20 +227,30 @@ class SkinCode extends defaultStyle { detainCar: { // 扣车 text: 'H', // 扣车显示内容 position: -1, // 扣车方向 - offset: {x: -8, y: -6}, // 扣车偏移量 + offset: {x: -8, y: 13}, // 扣车偏移量 trainColor: '#E4EF50', // 车站扣车颜色 centerTrainColor: '#FFFFFF', // 中心扣车颜色 andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色 }, - stopTime: { // 停站时间 - position: 1, // 运行时间方向 - offset: {x: -8, y: 26}, // 运行时间偏移量 - textColor: '#FFFFFF' // 停站时间字体颜色 + stopTime: { // 停站时间 + position: 1, // 运行时间方向 + offset: {x: -8, y: -4}, // 运行时间偏移量 + textColor: '#C0C0C0', // 停站时间字体颜色 + textFontSize: 12 + }, + jump: { + text: 'S', // 停跳显示内容 + position: -1, // 停跳方向 + offset: {x: -8, y: 10}, + textColor: '#5376B3', // 停跳文字颜色 + arcColor: '#000000', // 停跳圆圈颜色 + fillColor: 'rgba(0,0,0,0)', // 透明填充颜色 + r: 8 // 圆半径大小 }, level: { // 运行等级 position: 1, // 运行等级方向 - offset: {x: -8, y: 6}, // 运行等级偏移量 + offset: {x: -8, y: -6}, // 运行等级偏移量 textColor: '#FFFFFF' // 停站等级字体颜色 }, text: { diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js index 9eede85fd..850e2cd42 100644 --- a/src/jmapNew/shape/Signal/index.js +++ b/src/jmapNew/shape/Signal/index.js @@ -391,11 +391,11 @@ class Signal extends Group { /** 信号机进路按钮显示 */ model.isRouteSignal && this.setLowButtonShow(); - /** 信号机封锁 */ + /** 信号机封锁 */ // 缺一个功能封锁 model.blockade && this.block(); /** 设置灯的颜色 */ // model.redOpen = 1; - // model.yellowOpen = 0; + // model.yellowOpen = 1; // model.greenOpen = 0; model.redOpen && model.yellowOpen && !model.greenOpen && this.guid(); // 引导信号显示 model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(); // 信号关闭 diff --git a/src/jmapNew/shape/StationStand/ELevel.js b/src/jmapNew/shape/StationStand/ELevel.js index 17d4c19a4..bc51b346f 100644 --- a/src/jmapNew/shape/StationStand/ELevel.js +++ b/src/jmapNew/shape/StationStand/ELevel.js @@ -26,7 +26,7 @@ class ELevel extends Group { text: model.name, textFill: style.StationStand.level.textColor, textAlign: 'center', - textVerticalAlign: 'middle' + textVerticalAlign: 'middle' } }); diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js index 2442c2b3a..6f5a737ab 100644 --- a/src/jmapNew/shape/StationStand/index.js +++ b/src/jmapNew/shape/StationStand/index.js @@ -61,7 +61,11 @@ class StationStand extends Group { /** 站台紧急关闭*/ const emergentH = model.inside ? model.right ? 1 : -1 : model.right ? -1 : 1; - let emergentX = model.position.x + style.StationStand.standEmergent.offset.x; + let emergentWidth = 0; + if (style.StationStand.stopTime.position) { + emergentWidth = model.width / 2; + } + let emergentX = model.position.x + (style.StationStand.stopTime.position || emergentH) * style.StationStand.standEmergent.offset.x - emergentWidth; let emergentY = model.position.y + emergentH * (model.height / 2 + style.StationStand.standEmergent.offset.y); if (style.StationStand.common.special) { emergentX = model.position.x; @@ -493,6 +497,7 @@ class StationStand extends Group { this.recover(); model.free && this.spare(); /** 空闲*/ model.trainParking && this.stop(); /** 列车停站*/ + model.emergencyClosed = 1; model.emergencyClosed && this.emergentClose(); /** 站台紧急关闭*/ if (Number(model.parkingTime) > 0) { From 98158fdb869308ac8711b0689ca85eecfa0fad90 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Tue, 24 Mar 2020 15:10:31 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/StationStand/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js index 6f5a737ab..335cc1736 100644 --- a/src/jmapNew/shape/StationStand/index.js +++ b/src/jmapNew/shape/StationStand/index.js @@ -497,7 +497,6 @@ class StationStand extends Group { this.recover(); model.free && this.spare(); /** 空闲*/ model.trainParking && this.stop(); /** 列车停站*/ - model.emergencyClosed = 1; model.emergencyClosed && this.emergentClose(); /** 站台紧急关闭*/ if (Number(model.parkingTime) > 0) { From 1e72a8cff3e4aead47682f4f030665324a8ba0ab Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Tue, 24 Mar 2020 16:35:09 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=8A=B6=E6=80=81=E7=81=AF=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/chengdu_03.js | 25 ++++++++++++++++--- src/jmapNew/constant/deviceRender.js | 5 ++++ src/jmapNew/constant/deviceType.js | 3 ++- src/jmapNew/constant/stateTransition.js | 3 +++ src/jmapNew/shape/SaidLamp/index.js | 9 ++++++- src/jmapNew/shape/element/EControl.js | 4 +++ src/jmapNew/shape/factory.js | 1 + src/jmapNew/utils/parser.js | 4 +++ .../newMapdraft/mapoperate/controlLamp.vue | 22 +++++++++++----- .../newMap/newMapdraft/mapoperate/index.vue | 4 +-- 10 files changed, 66 insertions(+), 14 deletions(-) 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;