调整成都一号线信号机排列进路

This commit is contained in:
zyy 2020-03-12 10:32:30 +08:00
parent cf456057c3
commit 0cc556fa8d
4 changed files with 62 additions and 39 deletions

View File

@ -4,16 +4,16 @@ const deviceState = {};
deviceState[deviceType.Section] = {
/** 区段状态*/
blockade: false, // 是否封锁
routeLock: false, // 是否进路锁闭
overlapLock: false, // 进路延续保护锁闭
ctOccupied: false, // 通信车占用
nctOccupied: false, // 非通信车占用
cutOff: false, // 是否切除
invalid: false, // 是否失效
blockade: 0, // 是否封锁
routeLock: 0, // 是否进路锁闭
overlapLock: 0, // 进路延续保护锁闭
ctOccupied: 0, // 通信车占用
nctOccupied: 0, // 非通信车占用
cutOff: 0, // 是否切除
invalid: 0, // 是否失效
speedUpLimit: 0, // 最高限速
/** 是否故障*/
fault: false /** 非故障*/
fault: 0 /** 非故障*/
};
deviceState[deviceType.Switch] = {
@ -50,7 +50,7 @@ deviceState[deviceType.Switch] = {
// State14: '14' /** 道岔状态类型 - 封锁*/
// },
/** 是否故障*/
fault: false /** 非故障*/
fault: 0 /** 非故障*/
// /** 是否切除*/
// cutOff: {
// Default: false /** 是否切除*/
@ -58,19 +58,19 @@ deviceState[deviceType.Switch] = {
};
deviceState[deviceType.Signal] = {
blockade: false, // 是否锁闭
logicLight: false, // 逻辑点灯
greenOpen: false, // 绿灯开放
yellowOpen: false, // 黄灯开放
redOpen: true, // 红灯开放(默认状态)
blockade: 0, // 是否锁闭
logicLight: 0, // 逻辑点灯
greenOpen: 0, // 绿灯开放
yellowOpen: 0, // 黄灯开放
redOpen: 1, // 红灯开放(默认状态)
delayTime: 0, // 信号机延迟解锁倒计时
atsControl: 1, // 0是人工1是自动
fault: false // 是否故障
fault: 0 // 是否故障
};
deviceState[deviceType.Station] = {
/** 是否故障*/
fault: false, /** 非故障*/
fault: 0, /** 非故障*/
controlMode: 'Center'
// controlMode: 'Local' // Center 中控 Local 站控 Emergency 紧急站控 Interlock 联锁控
};
@ -87,7 +87,7 @@ deviceState[deviceType.Psd] = {
// State03: '03' /** 切除 */
// },
/** 是否故障*/
fault: false /** 非故障*/
fault: 0 /** 非故障*/
};
deviceState[deviceType.StationDelayUnlock] = {
@ -99,7 +99,7 @@ deviceState[deviceType.StationDelayUnlock] = {
// },
/** 是否故障*/
fault: false /** 非故障*/
fault: 0 /** 非故障*/
};
deviceState[deviceType.StationStand] = {
@ -123,7 +123,7 @@ deviceState[deviceType.StationStand] = {
// State04: '04' /** 默认 */
// },
/** 是否故障*/
fault: false /** 非故障*/
fault: 0 /** 非故障*/
};
deviceState[deviceType.Train] = {
@ -207,7 +207,7 @@ deviceState[deviceType.Train] = {
// State02: '02' /** 有报警 */
// },
/** 车门是否关闭且锁闭 */
doorCloseLock: true,
doorCloseLock: 1,
/** 列车运行级别 */
runLevel: 'CBTC',
/** 驾驶模式 */
@ -219,7 +219,7 @@ deviceState[deviceType.Train] = {
/** 列车是否向右形式 */
right: 1,
/** 是否故障*/
fault: false /** 非故障*/
fault: 0 /** 非故障*/
};
export default deviceState;

View File

@ -105,7 +105,8 @@ export default {
const operate = {
over: true,
operation: eachCmd.operation.code,
cmdType: eachCmd.operation.cmdType
cmdType: eachCmd.operation.cmdType,
param: eachCmd.operation.param //
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;

View File

@ -49,13 +49,13 @@ export default {
},
{
label: '开放自动进路',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
handler: this.singalPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
},
{
label: '关闭自动进路',
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
handler: this.singalCancelPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
},
{
label: '终端信号封锁',
@ -225,6 +225,7 @@ export default {
}
},
doShow(point) {
console.log(this.selected);
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
@ -307,24 +308,45 @@ export default {
arrangementRoute() {
const step = {
start: true,
// over:true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
param: {
signalCode: `${this.selected.code}`
},
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true});
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.arrangementRoute.menu.operation, name: '始端/终端选择', cmdType:CMD.Signal.CMD_SIGNAL_SET_ROUTE}});
const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
const routeCode = this.checkRoutes(routes);
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: {
code: OperationEvent.Signal.arrangementRoute.menu.operation,
name: '始端/终端选择',
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
param: {
routeCode: routeCode
}
}
});
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
checkRoutes(routes) {
const route = routes.filter(route => {
return route.greenOpen;
});
return route[0].code;
},
//
guide() {
const step = {
@ -334,13 +356,13 @@ export default {
operation: OperationEvent.Signal.guide.menu.operation,
param: {
signalCode: `${this.selected.code}`
},
}
// cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
};
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Signal.guide.menu.operation, name: '引导信号',cmdType:CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE}});
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Signal.guide.menu.operation, name: '引导信号', cmdType:CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE}});
}
});
},
@ -353,14 +375,14 @@ export default {
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
param: {
signalCode: `${this.selected.code}`
},
}
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Signal.cancelTrainRoute.menu.operation, name: '取消进路',cmdType:CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE}});
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Signal.cancelTrainRoute.menu.operation, name: '取消进路', cmdType:CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE}});
}
});
},
@ -373,13 +395,13 @@ export default {
operation: OperationEvent.Signal.lock.menu.operation,
param: {
signalCode: `${this.selected.code}`
},
}
// cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.lock.menu.operation, name: '终端信号机封锁',cmdType:CMD.Signal.CMD_SIGNAL_BLOCK}});
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.lock.menu.operation, name: '终端信号机封锁', cmdType:CMD.Signal.CMD_SIGNAL_BLOCK}});
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
@ -394,13 +416,13 @@ export default {
operation: OperationEvent.Signal.unlock.menu.operation,
param: {
signalCode: `${this.selected.code}`
},
}
// cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.unlock.menu.operation, name: '终端信号机解封',cmdType:CMD.Signal.CMD_SIGNAL_UNBLOCK}});
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.unlock.menu.operation, name: '终端信号机解封', cmdType:CMD.Signal.CMD_SIGNAL_UNBLOCK}});
}
});
},

View File

@ -525,7 +525,7 @@ export default {
this.$refs.routerCommand.doShow(step, this.selected, '是否执行引导命令');
}
});
},
}
}
};
</script>