diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index ed8284558..b96e1c110 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -416,7 +416,8 @@ class SkinCode extends defaultStyle { inversionColor: '#9C9D09', // 道岔反位颜色 monolockLocationColor: '#870E10', // 道岔单锁'定位'颜色 monolockInversionColor: '#870E10', // 道岔单锁'反位'颜色 - block: true // 封锁名称 + block: true, // 封锁名称 + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: false, // 道岔 关联区段显示 diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index 405c3e819..29b033f70 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -383,7 +383,8 @@ class SkinCode extends defaultStyle { locateColor: 'lightgreen', // 道岔定位颜色 inversionColor: 'lightgreen', // 道岔反位颜色 monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色) - monolockInversionColor: '#FFFF00' // 道岔单锁'反位'颜色 (黄色) + monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色) + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: false, // 道岔 关联区段显示 diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index a03765d1e..aeddad95c 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -366,7 +366,8 @@ class SkinCode extends defaultStyle { locateColor: '#00FF00', // 道岔定位颜色 inversionColor: '#FFFF00', // 道岔反位颜色 monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色) - monolockInversionColor: '#FFFF00' // 道岔单锁'反位'颜色 (黄色) + monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色) + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: false, // 道岔 关联区段显示 diff --git a/src/jmapNew/config/skinCode/foshan_01.js b/src/jmapNew/config/skinCode/foshan_01.js index 1986cadc2..ee3875251 100644 --- a/src/jmapNew/config/skinCode/foshan_01.js +++ b/src/jmapNew/config/skinCode/foshan_01.js @@ -404,7 +404,8 @@ class SkinCode extends defaultStyle { inversionColor: '#FFFF00', // 道岔反位颜色 monolockLocationColor: '#c00000', // 道岔单锁'定位'颜色 (红色) monolockInversionColor: '#c00000', // 道岔单锁'反位'颜色 (红色) - block: true // 封锁名称 + block: true, // 封锁名称 + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: false, // 道岔 关联区段显示 diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index 323487877..985280ca9 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -386,7 +386,8 @@ class SkinCode extends defaultStyle { inversionColor: '#9C9D09', // 道岔反位颜色 monolockLocationColor: '#ea282c', // 道岔单锁'定位'颜色 monolockInversionColor: '#ea282c', // 道岔单锁'反位'颜色 - block: true // 封锁名称 + block: true, // 封锁名称 + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: false, // 道岔 关联区段显示 diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index eabbb5a93..080f9ae0b 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -413,7 +413,8 @@ class SkinCode extends defaultStyle { inversionColor: '#fff', // 道岔反位颜色 monolock: true, // 名称单锁显示包围框 monolockLocationColor: '#fff', // 道岔单锁'定位'颜色 - monolockInversionColor: '#fff' // 道岔单锁'反位'颜色 + monolockInversionColor: '#fff', // 道岔单锁'反位'颜色 + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: true, // 道岔 关联区段显示 diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 83e597622..1c21ac13b 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -269,7 +269,8 @@ class SkinCode extends defaultStyle { inversionColor: '#FFFF00', // 道岔反位颜色 monolockLocationColor: 'lightgreen', // 道岔单锁'定位'颜色 (浅绿色) monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色) - block: true // 封锁名称 + block: true, // 封锁名称 + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: false, // 道岔 关联区段显示 diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index acffb3a6f..0adcde48c 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -408,7 +408,9 @@ class SkinCode extends defaultStyle { inversionColor: '#9C9D09', // 道岔反位颜色 monolockLocationColor: '#ea282c', // 道岔单锁'定位'颜色 monolockInversionColor: '#ea282c', // 道岔单锁'反位'颜色 - block: true // 封锁名称 + block: true, // 封锁名称 + faultFlashing: false, // 故障闪烁 + lossRect: true // 道岔失表矩形 }, sectionAction: { flag: false, // 道岔 关联区段显示 @@ -466,7 +468,7 @@ class SkinCode extends defaultStyle { this[deviceType.SwitchFault] = { displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) text: { - fontSize: 11, // 字体大小 + fontSize: 14, // 字体大小 fontWeight: 'normal', // 字体粗细 distance: 5 // 灯跟文字距离 }, diff --git a/src/jmapNew/config/skinCode/xian_02.js b/src/jmapNew/config/skinCode/xian_02.js index 526937ad6..cd98e29f7 100644 --- a/src/jmapNew/config/skinCode/xian_02.js +++ b/src/jmapNew/config/skinCode/xian_02.js @@ -436,7 +436,8 @@ class SkinCode extends defaultStyle { locateColor: '#FFFFFF', // 道岔定位颜色 inversionColor: '#FFFFFF', // 道岔反位颜色 monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色) - monolockInversionColor: '#FFFF00' // 道岔单锁'反位'颜色 (黄色) + monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色) + faultFlashing: true // 故障闪烁 }, sectionAction: { flag: false, // 道岔 关联区段显示 diff --git a/src/jmapNew/shape/SaidLamp/index.js b/src/jmapNew/shape/SaidLamp/index.js index 86b39fe52..9db315b7c 100644 --- a/src/jmapNew/shape/SaidLamp/index.js +++ b/src/jmapNew/shape/SaidLamp/index.js @@ -224,4 +224,7 @@ export default class SaidLamp extends Group { this.isShowShape = false; } } + setControlColor(color) { + this.control && this.control.setControlColor(color); + } } diff --git a/src/jmapNew/shape/Switch/ESwLocal.js b/src/jmapNew/shape/Switch/ESwLocal.js index da834b35c..1418a535d 100644 --- a/src/jmapNew/shape/Switch/ESwLocal.js +++ b/src/jmapNew/shape/Switch/ESwLocal.js @@ -50,6 +50,9 @@ class ESwLocal extends Group { cb(child); }); } + getLocal() { + return this.locShelter; + } } export default ESwLocal; diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index 3b8059130..0dce65d13 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -4,6 +4,7 @@ import Line from 'zrender/src/graphic/shape/Line'; import Group from 'zrender/src/container/Group'; import Text from 'zrender/src/graphic/Text'; +import Rect from 'zrender/src/graphic/shape/Rect'; import JTriangle from '../../utils/JTriangle'; import ESwName from './ESwName.js'; import ESwLocal from './ESwLocal.js'; @@ -105,7 +106,27 @@ export default class Switch extends Group { onmouseover: () => { this.name.getArrowText().show(); }, onmouseout: () => { this.name.getArrowText().hide(); } }); - + if (this.style.Switch.text.lossRect) { + const lossRect = this.locShelter.getLocal().getBoundingRect(); + this.lossShow = new Rect({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x: lossRect.x - 5, + y: lossRect.y - 5, + width: lossRect.width + 10, + height: lossRect.height + 10 + }, + style: { + fill: 'rgba(0, 0, 0, 1)', + lineDash: [3, 3], + stroke: '#F00', + lineWidth: 1 + } + }); + this.add(this.lossShow); + this.lossShow.hide(); + } const trapezoidWidth = this.style.Switch.jointImg.trapezoidLength; const Tspoint1 = [model.intersection.x + directx * width3 + directx * (width2 + width1) - directx * width3, model.intersection.y + directy * switchWidth1]; const Tspoint2 = [Tspoint1[0] - directx * trapezoidWidth, Tspoint1[1]]; @@ -268,6 +289,8 @@ export default class Switch extends Group { this.locShelter.hide(); // 定位覆盖图形 this.relocShelter.hide(); // 反位覆盖图形 this.enabledName.hide(); // 使能隐藏 + this.lossShow && this.lossShow.hide(); + this.lossShow && this.lossShow.stopAnimation(false); } /** 定位*/ @@ -298,7 +321,7 @@ export default class Switch extends Group { } /** 失去*/ - setLossAction(nameFlicker) { + setLossAction() { // this.recover(); this.locShelter.show(); this.relocShelter.show(); @@ -306,9 +329,24 @@ export default class Switch extends Group { this.sheltertriangle.show(); this.sheltertriangle.setColor(this.style.backgroundColor); this.setTextColor(this.style.Switch.text.lossColor); - nameFlicker && this.nameTextAnimation(); - } + this.style.Switch.text.faultFlashing && this.nameTextAnimation(); + this.lossShow && this.lossShow.show(); + this.lossShow && this.lossShow.animateStyle(true) + .when(0, { stroke: this.style.backgroundColor }) + .when(1000, { stroke: '#F00' }) + .when(2000, { stroke: this.style.backgroundColor }) + .start(); + } + setSwitchFault(split) { + if (this.model.switchFaultCode && split) { + const switchFault = store.getters['map/getDeviceByCode'](this.model.switchFaultCode); + switchFault.instance.setControlColor('#F00'); + } else if (this.model.switchFaultCode && !split) { + const switchFault = store.getters['map/getDeviceByCode'](this.model.switchFaultCode); + switchFault.instance.setControlColor(this.style.backgroundColor); + } + } /** 挤叉*/ setForkAction() { this.rhomboid.hide(); // 平行四边形 @@ -479,8 +517,9 @@ export default class Switch extends Group { } else if (model.reversePosition) { this.setInversionAction(model); /** 反位*/ } else { - this.setLossAction(true); + this.setLossAction(); } + /** 道岔单锁 */ model.singleLock && this.setMonolock(); /** 道岔封锁 */ @@ -490,6 +529,7 @@ export default class Switch extends Group { // this.setForkAction(); // 道岔挤岔完成 // 道岔使能显示 model.isCiConfirm && this.setCiConfirm(); + this.setSwitchFault(model.split); model.cutOff && this.setSwitchCutOff(); if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色 const switchModel = Vue.prototype.$jlmap.mapDevice[model.code]; diff --git a/src/jmapNew/theme/xian_01/menus/menuDialog/viewTrainId.vue b/src/jmapNew/theme/xian_01/menus/menuDialog/viewTrainId.vue index a4e14b092..85b716fbe 100644 --- a/src/jmapNew/theme/xian_01/menus/menuDialog/viewTrainId.vue +++ b/src/jmapNew/theme/xian_01/menus/menuDialog/viewTrainId.vue @@ -93,7 +93,7 @@ export default { operation: '', planMode: 5, headMode: 5, - fontSize: 16 + fontSize: 30 }; }, computed: { diff --git a/src/jmapNew/theme/xian_01/model.js b/src/jmapNew/theme/xian_01/model.js index 4920490ff..e8193db1f 100644 --- a/src/jmapNew/theme/xian_01/model.js +++ b/src/jmapNew/theme/xian_01/model.js @@ -36,7 +36,7 @@ class Model { }; this['private'][deviceType.Train] = { nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式 - nameFontSize: 10 // 字体大小 + nameFontSize: 30 // 字体大小 }; this['private'][deviceType.TrainWindow] = { trainWindowShow: true diff --git a/src/jmapNew/utils/parser.js b/src/jmapNew/utils/parser.js index b0f127fd2..00e4f45f2 100644 --- a/src/jmapNew/utils/parser.js +++ b/src/jmapNew/utils/parser.js @@ -150,6 +150,48 @@ export function parser(data, skinCode, showConfig) { zrUtil.each(data.powerLineList || [], elem => { mapDevice[elem.code] = createDevice(deviceType.Power, elem, propConvert, showConfig); }, this); + zrUtil.each(data.switchList || [], elem => { + mapDevice[elem.code] = createDevice(deviceType.Switch, elem, propConvert, showConfig); + const cnodeSection = mapDevice[mapDevice[elem.code].sectionACode]; + const lnodeSection = mapDevice[mapDevice[elem.code].sectionBCode]; + const rnodeSection = mapDevice[mapDevice[elem.code].sectionCCode]; + + if (cnodeSection && lnodeSection && rnodeSection) { + cnodeSection['switch'] = lnodeSection['switch'] = rnodeSection['switch'] = mapDevice[elem.code]; + const sectionParent = mapDevice[cnodeSection.parentCode]; + if (sectionParent) { + sectionParent['switch'] = mapDevice[elem.code]; + } + if (cnodeSection.points[0].x == lnodeSection.points[lnodeSection.points.length - 1].x && cnodeSection.points[0].y == lnodeSection.points[lnodeSection.points.length - 1].y) { + mapDevice[elem.code].intersection = { + x: cnodeSection.points[0].x, + y: cnodeSection.points[0].y + }; + mapDevice[elem.code].skew = { + x: rnodeSection.points[rnodeSection.points.length - 2].x, + y: rnodeSection.points[rnodeSection.points.length - 2].y + }; + } else if (cnodeSection.points[cnodeSection.points.length - 1].x == lnodeSection.points[0].x && cnodeSection.points[cnodeSection.points.length - 1].y == lnodeSection.points[0].y) { + mapDevice[elem.code].intersection = { + x: cnodeSection.points[cnodeSection.points.length - 1].x, + y: cnodeSection.points[cnodeSection.points.length - 1].y + }; + mapDevice[elem.code].skew = { + x: rnodeSection.points[1].x, + y: rnodeSection.points[1].y + }; + } + + const section = mapDevice[cnodeSection.parentCode]; + if (section) { + mapDevice[elem.code].sectionName = section.name; + mapDevice[elem.code].sectionParentCode = section.code; + section['relSwitchCode'] = elem.code; + } + + rnodeSection['layer'] = -1; + } + }, this); zrUtil.each(data.indicatorLightList || [], elem => { switch (elem.type) { case 'AtsControl': @@ -205,6 +247,7 @@ export function parser(data, skinCode, showConfig) { break; case 'SwitchFault': mapDevice[elem.code] = createDevice(deviceType.SwitchFault, elem, propConvert, showConfig); + mapDevice[elem.switchCode].switchFaultCode = elem.code; // 道岔数据上关联道岔故障表示灯(需保证该数据在switchList之后处理) break; } }, this); @@ -218,49 +261,6 @@ export function parser(data, skinCode, showConfig) { } } }, this); - - zrUtil.each(data.switchList || [], elem => { - mapDevice[elem.code] = createDevice(deviceType.Switch, elem, propConvert, showConfig); - const cnodeSection = mapDevice[mapDevice[elem.code].sectionACode]; - const lnodeSection = mapDevice[mapDevice[elem.code].sectionBCode]; - const rnodeSection = mapDevice[mapDevice[elem.code].sectionCCode]; - - if (cnodeSection && lnodeSection && rnodeSection) { - cnodeSection['switch'] = lnodeSection['switch'] = rnodeSection['switch'] = mapDevice[elem.code]; - const sectionParent = mapDevice[cnodeSection.parentCode]; - if (sectionParent) { - sectionParent['switch'] = mapDevice[elem.code]; - } - if (cnodeSection.points[0].x == lnodeSection.points[lnodeSection.points.length - 1].x && cnodeSection.points[0].y == lnodeSection.points[lnodeSection.points.length - 1].y) { - mapDevice[elem.code].intersection = { - x: cnodeSection.points[0].x, - y: cnodeSection.points[0].y - }; - mapDevice[elem.code].skew = { - x: rnodeSection.points[rnodeSection.points.length - 2].x, - y: rnodeSection.points[rnodeSection.points.length - 2].y - }; - } else if (cnodeSection.points[cnodeSection.points.length - 1].x == lnodeSection.points[0].x && cnodeSection.points[cnodeSection.points.length - 1].y == lnodeSection.points[0].y) { - mapDevice[elem.code].intersection = { - x: cnodeSection.points[cnodeSection.points.length - 1].x, - y: cnodeSection.points[cnodeSection.points.length - 1].y - }; - mapDevice[elem.code].skew = { - x: rnodeSection.points[1].x, - y: rnodeSection.points[1].y - }; - } - - const section = mapDevice[cnodeSection.parentCode]; - if (section) { - mapDevice[elem.code].sectionName = section.name; - mapDevice[elem.code].sectionParentCode = section.code; - section['relSwitchCode'] = elem.code; - } - - rnodeSection['layer'] = -1; - } - }, this); } return mapDevice; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 778caeb7b..836771751 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,11 +2,11 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 - // BASE_API = 'http://192.168.3.82:9000'; // 杜康 + BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 diff --git a/src/views/iscs/iscsSystem/config/pis/emergencyRelease.vue b/src/views/iscs/iscsSystem/config/pis/emergencyRelease.vue index 9bb0c83cb..7a4f70106 100644 --- a/src/views/iscs/iscsSystem/config/pis/emergencyRelease.vue +++ b/src/views/iscs/iscsSystem/config/pis/emergencyRelease.vue @@ -2,15 +2,64 @@