修改 道岔位置定位、反位 为pos字段
修改 信号机红绿黄显示的三个字段 为aspect
This commit is contained in:
parent
f35684d74d
commit
7d21d75ad0
@ -32,8 +32,8 @@ deviceState[deviceType.Switch] = {
|
||||
blockade: 0, // 是否封锁
|
||||
routeLock: 0, // 是否进路锁闭
|
||||
overlapLock: 0, // 是否进路延续保护锁闭
|
||||
normalPosition: 1, // 是否定位
|
||||
reversePosition: 0, // 是否反位
|
||||
pos:'N', // // 道岔位置定位、反位 N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
// reversePosition: 0, // 是否反位
|
||||
isCiConfirm: 0, // 是否进行联锁确认
|
||||
/** 定位状态*/
|
||||
// locateType: {
|
||||
@ -72,9 +72,7 @@ deviceState[deviceType.Switch] = {
|
||||
deviceState[deviceType.Signal] = {
|
||||
blockade: 0, // 是否锁闭
|
||||
logicLight: 0, // 逻辑点灯
|
||||
greenOpen: 0, // 绿灯开放
|
||||
yellowOpen: 0, // 黄灯开放
|
||||
redOpen: 1, // 红灯开放(默认状态)
|
||||
aspect:'R', // 信号机颜色默认状态
|
||||
delayTime: 0, // 信号机延迟解锁倒计时
|
||||
atsControl: 1, // 0是人工,1是自动
|
||||
checkConflict:0, // 0是不检查冲突,1是检测冲突(检测冲突进路)
|
||||
|
@ -45,8 +45,8 @@ class Status {
|
||||
blockade: device.blockade, // 是否封锁
|
||||
routeLock: device.routeLock, // 是否进路锁闭
|
||||
overlapLock: device.overlapLock, // 是否进路延续保护锁闭
|
||||
normalPosition: device.normalPosition, // 是否定位
|
||||
reversePosition: device.reversePosition, // 是否反位
|
||||
pos:device.pos, // 道岔位置定位、反位 N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
// reversePosition: device.pos == 'R', // 是否反位
|
||||
fault: device.fault /** 非故障*/
|
||||
};
|
||||
}
|
||||
@ -56,9 +56,7 @@ class Status {
|
||||
atsControl: device.atsControl, /** 0是人工控制,1是自动控制 */
|
||||
blockade: device.blockade,
|
||||
logicLight: device.logicLight,
|
||||
greenOpen: device.greenOpen,
|
||||
redOpen: device.redOpen,
|
||||
yellowOpen: device.yellowOpen,
|
||||
aspect:device.aspect, // 信号机颜色默认状态 R-红 G-绿 Y-黄 W-月白 B-蓝 RY-红黄 RW-红白 GG-绿绿 GY-绿黄 YY-黄黄 RF-红闪 YF-黄闪 GF-绿闪 WF-白闪
|
||||
ciControl: device.ciControl || 0,
|
||||
canSetCi: !!device.canSetCi
|
||||
};
|
||||
|
@ -966,10 +966,32 @@ class Signal extends Group {
|
||||
model.isRouteSignal && this.setLowButtonShow();
|
||||
|
||||
/** 设置灯的颜色 */
|
||||
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.redOpen && model.yellowOpen && !model.greenOpen && this.guid(); // 引导信号显示
|
||||
switch (model.aspect) {
|
||||
// 红
|
||||
case 'R': {
|
||||
this.close(model.logicLight); // 信号关闭
|
||||
break;
|
||||
}
|
||||
// 绿
|
||||
case 'G': {
|
||||
this.openPositive(model.logicLight); // 信号正向开放
|
||||
break;
|
||||
}
|
||||
// 黄
|
||||
case 'Y': {
|
||||
this.openLateral(model.logicLight); // 信号侧向开放
|
||||
break;
|
||||
}
|
||||
// 红黄
|
||||
case 'RY': {
|
||||
this.guid(); // 引导信号显示
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (model.remainTime) {
|
||||
this.showRemainTime(model.remainTime);
|
||||
} else {
|
||||
|
@ -243,7 +243,7 @@ export default {
|
||||
}
|
||||
case OperationEvent.Signal.reopenSignal.button.operation: {
|
||||
// 信号重开
|
||||
if (selectType.greenOpen) {
|
||||
if (selectType.aspect == 'G') { // 绿灯开放
|
||||
this.$refs.noticeInfo.doShow(`信号机[${selectType.name}(${selectType.code})]已开启,无需重开信号机`);
|
||||
} else {
|
||||
// 开放进路信号机因故关闭
|
||||
|
@ -316,7 +316,7 @@ export default {
|
||||
},
|
||||
checkRoutes(routes) {
|
||||
const route = routes.filter(route => {
|
||||
return route.greenOpen;
|
||||
return route.aspect == 'G';
|
||||
});
|
||||
return route[0].code;
|
||||
},
|
||||
|
@ -222,7 +222,7 @@ export default {
|
||||
methods: {
|
||||
passWordCommit(data) {
|
||||
let operate = {};
|
||||
if (data.overNext) {
|
||||
if (data.overNext) {
|
||||
operate = {
|
||||
over: true,
|
||||
code: data.code,
|
||||
@ -348,7 +348,7 @@ export default {
|
||||
}
|
||||
}
|
||||
// 如果该信号机红灯亮 而且 所属区段左右两侧区段锁闭 执行信号重启操作
|
||||
if (signal.redOpen && !signal.greenOpen && !signal.yellowOpen && isArrangementRoute) { // 信号重启
|
||||
if (signal.aspect == 'R' && isArrangementRoute) { // 信号重启
|
||||
operate.over = true;
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
||||
operate.code = deviceList[0].code;
|
||||
@ -538,7 +538,7 @@ export default {
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
operate['operation'] = this.Command.close.password.operation;
|
||||
operate['operation'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
@ -550,7 +550,7 @@ export default {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: deviceList[1].code,
|
||||
cmdType: this.cmdType,
|
||||
cmdType: this.cmdType,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
overNext: true
|
||||
};
|
||||
@ -575,12 +575,12 @@ export default {
|
||||
handleTotalHumanSolution(model) {
|
||||
const operate = {
|
||||
send: true,
|
||||
overNext: true,
|
||||
code: model.code,
|
||||
overNext: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation
|
||||
};
|
||||
|
||||
if (model.yellowOpen && model.redOpen) {
|
||||
if (model.aspect == 'RY') {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CLOSE_GUIDE;
|
||||
operate.param = {signalCode: model.code};
|
||||
this.deviceList = [];
|
||||
@ -588,7 +588,7 @@ export default {
|
||||
} else {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
operate.param = {signalCode: model.code};
|
||||
operate.val = model.code;
|
||||
operate.val = model.code;
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
console.error(error);
|
||||
@ -744,7 +744,7 @@ export default {
|
||||
},
|
||||
clearOperate() {
|
||||
Handler.clear(); // 清空操作组
|
||||
this.deviceList = [];
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
}
|
||||
|
@ -132,17 +132,8 @@ export default {
|
||||
},
|
||||
getSignalShow(code) {
|
||||
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (signalEle.redOpen && !signalEle.yellowOpen && !signalEle.greenOpen) {
|
||||
return '红';
|
||||
} else if (!signalEle.redOpen && !signalEle.yellowOpen && signalEle.greenOpen) {
|
||||
return '绿';
|
||||
} else if (!signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) {
|
||||
return '黄';
|
||||
} else if (signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) {
|
||||
return '引导';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
const data = {'R':'红', 'G':'绿', 'Y':'黄', 'RY':'引导'};
|
||||
return data[signalEle.aspect] || '';
|
||||
},
|
||||
getCanGuide(code) {
|
||||
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
|
||||
|
@ -134,17 +134,8 @@ export default {
|
||||
},
|
||||
getSignalShow(code) {
|
||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (elem.redOpen && !elem.yellowOpen && !elem.greenOpen) {
|
||||
return '红';
|
||||
} else if (!elem.redOpen && !elem.yellowOpen && elem.greenOpen) {
|
||||
return '绿';
|
||||
} else if (!elem.redOpen && elem.yellowOpen && !elem.greenOpen) {
|
||||
return '黄';
|
||||
} else if (elem.redOpen && elem.yellowOpen && !elem.greenOpen) {
|
||||
return '引导';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
const data = {'R':'红', 'G':'绿', 'Y':'黄', 'RY':'引导'};
|
||||
return data[elem.aspect] || '';
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
@ -245,17 +245,8 @@ export default {
|
||||
},
|
||||
getSignalShow(code) {
|
||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (elem.redOpen && !elem.yellowOpen && !elem.greenOpen) {
|
||||
return '红';
|
||||
} else if (!elem.redOpen && !elem.yellowOpen && elem.greenOpen) {
|
||||
return '绿';
|
||||
} else if (!elem.redOpen && elem.yellowOpen && !elem.greenOpen) {
|
||||
return '黄';
|
||||
} else if (elem.redOpen && elem.yellowOpen && !elem.greenOpen) {
|
||||
return '引导';
|
||||
}
|
||||
|
||||
return '';
|
||||
const data = {'R':'红', 'G':'绿', 'Y':'黄', 'RY':'引导'};
|
||||
return data[elem.aspect] || '';
|
||||
},
|
||||
getCanGuide(code) {
|
||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||
|
@ -13,7 +13,8 @@
|
||||
<el-table-column prop="name" label="ID" />
|
||||
<el-table-column prop="status" label="信号指示模式">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.redOpen">灭灯模式</span>
|
||||
<!-- <span v-if="scope.row.redOpen">灭灯模式</span> -->
|
||||
<span v-if="scope.row.aspect=='R'">灭灯模式</span>
|
||||
<span v-else>开灯模式</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -109,7 +110,7 @@ export default {
|
||||
'selected': function(val) {
|
||||
if (val) {
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||
if (signal && signal.redOpen) {
|
||||
if (signal && signal.aspect == 'R') {
|
||||
this.status = true;
|
||||
} else {
|
||||
this.status = false;
|
||||
|
Loading…
Reference in New Issue
Block a user