大铁线路 剧本 道岔钩锁和换端指令添加

This commit is contained in:
joylink_cuiweidong 2022-07-29 17:09:15 +08:00
parent c8d4901149
commit 5132d43595
12 changed files with 135 additions and 7 deletions

View File

@ -530,6 +530,11 @@ export const menuOperate = {
driverStop: {
operation: OperationEvent.Train.driverStop.menu.operation,
cmdType: CMD.Driver.CMD_DRIVER_STOP
},
// 换端
turnDirection:{
operation: OperationEvent.Train.turnDirection.menu.operation,
cmdType: CMD.Driver.CMD_DRIVER_CHANGE_HEAD
}
},
CTC: {

View File

@ -74,6 +74,11 @@ export default {
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: '道岔钩锁',
handler: this.hookLock,
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
},
{
label: '封锁/解封',
handle: ''

View File

@ -85,6 +85,11 @@ export default {
label: '删车次号',
handler: this.removeTripNumber,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
},
{
label: '换端',
handler: this.turnDirection,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
}
],
Center: [
@ -560,6 +565,17 @@ export default {
}
});
},
//
turnDirection() {
commitOperate(menuOperate.Train.turnDirection, { code: this.selected.code }, 3).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;

View File

@ -84,6 +84,11 @@ export default {
handle: this.unblock,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
},
{
label: '道岔钩锁',
handler: this.hookLock,
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
},
{
label: '区故解',
handle: ''

View File

@ -82,6 +82,11 @@ export default {
label: '删车次号',
handler: this.removeTripNumber,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
},
{
label: '换端',
handler: this.turnDirection,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
}
],
Center: [
@ -548,6 +553,17 @@ export default {
}
});
},
//
turnDirection() {
commitOperate(menuOperate.Train.turnDirection, { code: this.selected.code }, 3).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;

View File

@ -88,6 +88,11 @@ export default {
label: '区段故障解锁',
handler: this.fault,
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
},
{
label: '道岔钩锁',
handler: this.hookLock,
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
}
],
Center: [

View File

@ -85,6 +85,11 @@ export default {
label: '删车次号',
handler: this.removeTripNumber,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
},
{
label: '换端',
handler: this.turnDirection,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
}
],
Center: [
@ -560,6 +565,17 @@ export default {
}
});
},
//
turnDirection() {
commitOperate(menuOperate.Train.turnDirection, { code: this.selected.code }, 3).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;

View File

@ -3,7 +3,8 @@ export const State2SimulationMap = {
'01': 'Local', // 现地工作站
'02': 'Center', // 中心调度工作站
'09':'Depot_IL', // 车辆段工作站
'10': 'Local'
'10': 'Local',
'04': 'Local'
};
export const State2ControlMap = {

View File

@ -3437,6 +3437,12 @@ export const OperationEvent = {
operation: '70w',
domId: '_Tips-Train-driverStop-Menu'
}
},
turnDirection: {
menu: {
operation: '70x',
domId: '_Tips-Train-turnDirection-Menu'
}
}
},

View File

@ -182,18 +182,21 @@ export default {
let prdType;
if (role.type == '行值') {
prdType = '01';
role.type = 'STATION_SUPERVISOR';
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
this.$store.dispatch('training/setRoleDeviceCode', role.deviceCode);
} else if (role.type == '行调') {
prdType = '02';
role.type = 'DISPATCHER';
this.$store.dispatch('training/setRoles', 'DISPATCHER');
this.$store.dispatch('scriptRecord/updateRole', 'DISPATCHER' + ':' + role.id);
} else if (role.type == '司机') {
prdType = '04';
role.type = 'DRIVER';
this.$store.dispatch('training/setRoles', 'DRIVER');
this.$store.dispatch('scriptRecord/updateRole', 'DRIVER' + ':' + role.id);
} else if (role.type == '通号') {
prdType = '';
role.type = 'MAINTAINER';
this.$store.dispatch('training/setRoles', 'MAINTAINER');
const routeData = this.$router.resolve({
path:'/jlmap3d/maintainer',
query:{
@ -205,11 +208,61 @@ export default {
}
});
window.open(routeData.href);
this.$store.dispatch('training/setRoles', 'MAINTAINER');
this.$store.dispatch('scriptRecord/updateRole', 'MAINTAINER' + ':' + role.id);
} else if (role.type == '车辆段信号楼') {
prdType = '05';
role.type = 'DEPOT_DISPATCHER';
this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER');
} else if (role.type == '上级部门') {
prdType = '';
role.type = 'PARENT_DEPARTMENT';
this.$store.dispatch('training/setRoles', 'PARENT_DEPARTMENT');
} else if (role.type == '电力调度') {
prdType = '';
role.type = 'ELECTRIC_DISPATCHER';
this.$store.dispatch('training/setRoles', 'ELECTRIC_DISPATCHER');
} else if (role.type == '停车场信号楼') {
prdType = '';
role.type = 'PARKING_LOT_SIGNAL_BUILDING';
this.$store.dispatch('training/setRoles', 'PARKING_LOT_SIGNAL_BUILDING');
} else if (role.type == '车站助理') {
prdType = '';
role.type = 'STATION_ASSISTANT';
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
} else if (role.type == '车站站长') {
prdType = '';
role.type = 'STATION_MASTER';
this.$store.dispatch('training/setRoles', 'STATION_MASTER');
} else if (role.type == '车站信号员') {
prdType = '01';
role.type = 'STATION_SIGNALER';
this.$store.dispatch('training/setRoles', 'STATION_SIGNALER');
} else if (role.type == '车站客运员') {
prdType = '';
role.type = 'STATION_PASSENGER';
this.$store.dispatch('training/setRoles', 'STATION_PASSENGER');
} else if (role.type == '车站扳道员') {
prdType = '01';
role.type = 'STATION_SWITCH_MAN';
this.$store.dispatch('training/setRoles', 'STATION_SWITCH_MAN');
} else if (role.type == '车站引导员') {
prdType = '';
role.type = 'STATION_FACILITATOR';
this.$store.dispatch('training/setRoles', 'STATION_FACILITATOR');
} else if (role.type == '车站工务工') {
prdType = '';
role.type = 'STATION_WORKER';
this.$store.dispatch('training/setRoles', 'STATION_WORKER');
} else if (role.type == '设备管理员') {
prdType = '';
role.type = 'DEVICE_MANAGER';
this.$store.dispatch('training/setRoles', 'DEVICE_MANAGER');
} else {
prdType = '';
}
this.$store.dispatch('training/setPrdType', prdType);
this.$store.dispatch('scriptRecord/updateRole', role.type + ':' + role.id);
this.switchMode(prdType);
if (role.type == '行值') {
this.setShowStation(role.deviceCode);

View File

@ -151,7 +151,7 @@ export default {
const memberType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER', 'PARENT_DEPARTMENT',
'ELECTRIC_DISPATCHER', 'PARKING_LOT_SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'];
const prdTypeList = ['01', '02', '04', '', '05', '', '', '', '', '', '01', '', '', '', '', ''];
const prdTypeList = ['01', '02', '04', '', '05', '', '', '', '', '', '01', '', '01', '', '', ''];
const index = memberType.indexOf(member.type);
let prdType;
if (index >= 0) {

View File

@ -568,7 +568,7 @@ export default {
role.type = 'STATION_PASSENGER';
this.$store.dispatch('training/setRoles', 'STATION_PASSENGER');
} else if (role.type == '车站扳道员') {
prdType = '';
prdType = '01';
role.type = 'STATION_SWITCH_MAN';
this.$store.dispatch('training/setRoles', 'STATION_SWITCH_MAN');
} else if (role.type == '车站引导员') {