This commit is contained in:
sunzhenyu 2021-07-28 17:07:21 +08:00
commit 4c5c312fb5
17 changed files with 144 additions and 22 deletions

View File

@ -153,6 +153,8 @@ class Painter {
trainDevice.overLapIndex = index; trainDevice.overLapIndex = index;
trainDevice.instance && this.mapInstanceLevel[deviceType.Train].remove(trainDevice.instance); trainDevice.instance && this.mapInstanceLevel[deviceType.Train].remove(trainDevice.instance);
trainDevice.instance = null; trainDevice.instance = null;
trainDevice.zrOffsetX = this.$jmap.$options.offsetX;
trainDevice.zrOffsetY = this.$jmap.$options.offsetY;
this.add(trainDevice); this.add(trainDevice);
}); });

View File

@ -66,15 +66,7 @@ class ESafeDoor extends Group {
} }
setState(model) { setState(model) {
if (model.fault) { model.screenDoorOpenStatus == 0 ? this.safeC.show() : this.safeC.hide();
if (model.fault == 'PSD_CANNOT_BE_OPENED') {
this.safeC.hide();
} else if (model.fault == 'PSD_CANNOT_BE_CLOSED') {
this.safeC.show();
}
} else {
model.screenDoorOpenStatus == 0 ? this.safeC.show() : this.safeC.hide();
}
if (model.interlockRelease) { if (model.interlockRelease) {
const style = this.model.style; const style = this.model.style;
this.setColor(style.Psd.safetyDoorNormal.splitDoorColor); this.setColor(style.Psd.safetyDoorNormal.splitDoorColor);

View File

@ -612,8 +612,12 @@ class Signal extends Group {
} }
} else { } else {
this.cbtcStatus = ''; this.cbtcStatus = '';
this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.greenColor); if (parseInt(this.model.lampPositionType) === 2) {
this.lamps[0] && this.lamps[0].setColor(this.style.backgroundColor); // 设置黑色 this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.greenColor);
this.lamps[0] && this.lamps[0].setColor(this.style.backgroundColor); // 设置黑色
} else {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
}
this.virtualSignal && this.virtualSignal.setColor(this.style.Signal.lamp.blueColor); this.virtualSignal && this.virtualSignal.setColor(this.style.Signal.lamp.blueColor);
if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色 if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色
this.sigPost.setColor('#00FF00'); this.sigPost.setColor('#00FF00');
@ -636,8 +640,12 @@ class Signal extends Group {
} }
} else { } else {
this.cbtcStatus = ''; this.cbtcStatus = '';
this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.yellowColor); if (parseInt(this.model.lampPositionType) === 2) {
this.lamps[0] && this.lamps[0].setColor(this.style.backgroundColor); this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
this.lamps[0] && this.lamps[0].setColor(this.style.backgroundColor);
} else {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
}
if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色 if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色
this.sigPost.setColor('#00FF00'); this.sigPost.setColor('#00FF00');
if (this.model.logicLight) { // 设置哈尔滨逻辑点灯 颜色 if (this.model.logicLight) { // 设置哈尔滨逻辑点灯 颜色

View File

@ -171,7 +171,18 @@ class EMouse extends Group {
} }
mouseover() { mouseover() {
if (this.device.model.style.Train.common.trainTip) { if (this.device.model.style.Train.common.trainTip) {
const zrRect = { x: this.device.model.model.zrOffsetX, y: this.device.model.model.zrOffsetY, width: store.state.config.width, height: store.state.config.height };
this.device.deviceModel.__down = true; this.device.deviceModel.__down = true;
const arrowTextRect = this.arrowText.getBoundingRect();
const zrRectX = zrRect.x + zrRect.width;
const zrRectY = zrRect.y + zrRect.height;
const arrowTextRectX = arrowTextRect.x + arrowTextRect.width;
const arrowTextRectY = arrowTextRect.y + arrowTextRect.height;
if (arrowTextRectX > zrRectX || arrowTextRectY > zrRectY) {
const offsetX = arrowTextRectX > zrRectX ? arrowTextRectX - zrRectX : 0;
const offsetY = arrowTextRectY > zrRectY ? arrowTextRectY - zrRectY : 0;
this.arrowText.setStyle({ x: this.device.model.point.x + 50 - offsetX, y: this.device.model.point.y + 25 - offsetY });
}
this.arrowText.show(); this.arrowText.show();
} }
if (this.device.style.Train.mouseOverStyle) { if (this.device.style.Train.mouseOverStyle) {

View File

@ -223,6 +223,10 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -365,6 +369,9 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
const group = this.$route.query.group; const group = this.$route.query.group;
const param = { const param = {

View File

@ -136,6 +136,10 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -275,6 +279,9 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
const group = this.$route.query.group; const group = this.$route.query.group;
const param = { const param = {

View File

@ -119,6 +119,10 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -246,6 +250,9 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
const group = this.$route.query.group; const group = this.$route.query.group;
const param = { const param = {

View File

@ -116,6 +116,10 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -209,6 +213,9 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
const group = this.$route.query.group; const group = this.$route.query.group;
const param = { const param = {

View File

@ -127,6 +127,10 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -262,6 +266,9 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
const group = this.$route.query.group; const group = this.$route.query.group;
const param = { const param = {

View File

@ -96,6 +96,10 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -237,6 +241,9 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
const group = this.$route.query.group; const group = this.$route.query.group;
const param = { const param = {

View File

@ -207,6 +207,10 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -335,6 +339,9 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
const group = this.$route.query.group; const group = this.$route.query.group;
const param = { const param = {

View File

@ -208,6 +208,10 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -335,6 +339,9 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() { nextStation() {
const group = this.$route.query.group; const group = this.$route.query.group;
const param = { const param = {

View File

@ -211,6 +211,10 @@ export default {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
}, },
{
label: '触发故障管理',
handler: this.triggerFaultManagement
},
{ {
label: '托管', label: '托管',
handler: this.setCollocation handler: this.setCollocation
@ -361,6 +365,9 @@ export default {
} }
}); });
}, },
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
// //
setLink() { setLink() {
commitOperate(menuOperate.Common.setLink, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setLink, { code: this.selected.code }, 0).then(({valid, operate})=>{

View File

@ -120,6 +120,10 @@ export default {
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
} }
], ],
menuDirective: [ menuDirective: [
@ -528,6 +532,9 @@ export default {
callback: action => { callback: action => {
} }
}); });
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }
// // // //
// switchTrainId() { // switchTrainId() {

View File

@ -29,7 +29,7 @@ export const MapDeviceType = {
/** 设备故障类型 */ /** 设备故障类型 */
export const deviceFaultType = { export const deviceFaultType = {
Section: [ Section: [
{label: '计轴故障', value: 'FAULT'}, {label: '红光带故障', value: 'FAULT'},
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}, {label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
{label: '橙光带故障', value: 'ARB'} {label: '橙光带故障', value: 'ARB'}
// {label: '计轴干扰', value: 'DISTURBANCE'} // {label: '计轴干扰', value: 'DISTURBANCE'}
@ -43,7 +43,7 @@ export const deviceFaultType = {
{label: '反位失表', value: 'REVERSE_SPLIT'}, {label: '反位失表', value: 'REVERSE_SPLIT'},
{label: '挤岔', value: 'SQUEEZE'}, {label: '挤岔', value: 'SQUEEZE'},
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}, {label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
{label: '计轴故障', value: 'AXLE_FAULT'}, {label: '红光带故障', value: 'AXLE_FAULT'},
{label: '橙光带故障', value: 'ARB'} {label: '橙光带故障', value: 'ARB'}
// {label: '道岔区段计轴故障', value: 'AXLE_FAULT'} // {label: '道岔区段计轴故障', value: 'AXLE_FAULT'}
], ],
@ -61,7 +61,8 @@ export const deviceFaultType = {
], ],
Train: [ Train: [
{label: '通信异常', value: 'COMMUNICATION_ABNORMAL'}, {label: '通信异常', value: 'COMMUNICATION_ABNORMAL'},
{label: '驾驶故障', value: 'DRIVE_FAULT'} {label: '驾驶故障', value: 'DRIVE_FAULT'},
{label: '突然EB', value: 'SUDDEN_EB' }
], ],
Power:[ Power:[
{label: '供电故障', value: 'FAULT'} {label: '供电故障', value: 'FAULT'}
@ -70,7 +71,7 @@ export const deviceFaultType = {
/** 设备故障类型map */ /** 设备故障类型map */
export const deviceFaultMap = { export const deviceFaultMap = {
Section: { Section: {
FAULT: '计轴故障', FAULT: '红光带故障',
CBTC_OCCUPIED_FAULT: '通信车占用', CBTC_OCCUPIED_FAULT: '通信车占用',
ARB: '橙光带故障' ARB: '橙光带故障'
}, },
@ -83,7 +84,7 @@ export const deviceFaultMap = {
REVERSE_SPLIT: '反位失表', REVERSE_SPLIT: '反位失表',
SQUEEZE: '挤岔', SQUEEZE: '挤岔',
CBTC_OCCUPIED_FAULT: '通信车占用', CBTC_OCCUPIED_FAULT: '通信车占用',
AXLE_FAULT: '计轴故障', AXLE_FAULT: '红光带故障',
ARB: '橙光带故障' ARB: '橙光带故障'
}, },
StationStand: { StationStand: {

View File

@ -905,9 +905,9 @@ const map = {
const holdIndex = state.holdStandList.indexOf(status.code); const holdIndex = state.holdStandList.indexOf(status.code);
const jumpIndex = state.jumpStandList.indexOf(status.code); const jumpIndex = state.jumpStandList.indexOf(status.code);
const device = state.mapDevice[status.code]; const device = state.mapDevice[status.code];
if ((device.stationHoldTrain || device.centerHoldTrain) && holdIndex < 0) { if ((device.stationHoldTrain || device.centerHoldTrain || device.ibpHoldTrain) && holdIndex < 0) {
state.holdStandList.push(device.code); state.holdStandList.push(device.code);
} else if (!(device.stationHoldTrain || device.centerHoldTrain) && holdIndex > -1) { } else if (!(device.stationHoldTrain || device.centerHoldTrain || device.ibpHoldTrain) && holdIndex > -1) {
state.holdStandList.splice(holdIndex, 1); state.holdStandList.splice(holdIndex, 1);
} }
state.holdStatus = state.holdStandList.length > 0; state.holdStatus = state.holdStandList.length > 0;

View File

@ -1,7 +1,7 @@
<template> <template>
<div id="textStatus" class="icon-box" :style="{top: offset+'px'}"> <div id="textStatus" class="icon-box" :style="{top: offset+'px'}">
<div class="textStatus" style="cursor: pointer;" :style="{background: holdBackground}" @contextmenu="showHoldStationPop">H</div> <div class="textStatus" style="cursor: pointer;" :style="{background: holdBackground}" @mouseenter="showHoldStatus" @mouseleave="hideHoldStatus" @contextmenu="showHoldStationPop">H</div>
<div class="textStatus" style="cursor: pointer;" :style="{background: jumpBackground}" @contextmenu="showJumpStationPop">S</div> <div class="textStatus" style="cursor: pointer;" :style="{background: jumpBackground}" @mouseenter="showJumpStatus" @mouseleave="hideJumpStatus" @contextmenu="showJumpStationPop">S</div>
<pop-tip v-show="popShow" :position="position" :tip="tip" /> <pop-tip v-show="popShow" :position="position" :tip="tip" />
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="statusIcon" /> <pop-menu ref="popMenu" :menu="menu" pop-menu-class="statusIcon" />
</div> </div>
@ -117,6 +117,44 @@ export default {
}, },
setCenter(val) { setCenter(val) {
this.$jlmap && this.$jlmap.setCenter(val.code); this.$jlmap && this.$jlmap.setCenter(val.code);
},
showHoldStatus(e) {
if (this.$store.state.map.holdStandList.length) {
this.popShow = true;
this.position.x = e.clientX;
this.position.y = e.clientY;
this.tip = '扣车提示:<br>';
this.$store.state.map.holdStandList.forEach(item => {
const stand = this.$store.getters['map/getDeviceByCode'](item);
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
const dir = stand.right ? '上行站台' : '下行站台';
if (stand) {
this.tip = this.tip + station.name + ':<br>' + dir + '站台存在扣车命令<br>';
}
});
}
},
hideHoldStatus(e) {
this.popShow = false;
},
showJumpStatus(e) {
if (this.$store.state.map.jumpStandList.length) {
this.popShow = true;
this.position.x = e.clientX;
this.position.y = e.clientY;
this.tip = '跳停提示:<br>';
this.$store.state.map.jumpStandList.forEach(item => {
const stand = this.$store.getters['map/getDeviceByCode'](item);
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
const dir = stand.right ? '上行站台' : '下行站台';
if (stand) {
this.tip = this.tip + station.name + ':<br>' + dir + '站台存在跳停命令<br>';
}
});
}
},
hideJumpStatus(e) {
this.popShow = false;
} }
} }
}; };