diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js index a403394e5..b8b53b994 100644 --- a/src/jmapNew/theme/components/utils/menuOperate.js +++ b/src/jmapNew/theme/components/utils/menuOperate.js @@ -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: { diff --git a/src/jmapNew/theme/datie_02/menus/menuSwitch.vue b/src/jmapNew/theme/datie_02/menus/menuSwitch.vue index 3637112e7..2f43f3c1d 100644 --- a/src/jmapNew/theme/datie_02/menus/menuSwitch.vue +++ b/src/jmapNew/theme/datie_02/menus/menuSwitch.vue @@ -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: '' diff --git a/src/jmapNew/theme/datie_02/menus/menuTrain.vue b/src/jmapNew/theme/datie_02/menus/menuTrain.vue index e3da86fa1..b83dc1cbd 100644 --- a/src/jmapNew/theme/datie_02/menus/menuTrain.vue +++ b/src/jmapNew/theme/datie_02/menus/menuTrain.vue @@ -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; diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuSwitch.vue b/src/jmapNew/theme/datie_jd1a/menus/menuSwitch.vue index 68bcfaafa..f09e16af6 100644 --- a/src/jmapNew/theme/datie_jd1a/menus/menuSwitch.vue +++ b/src/jmapNew/theme/datie_jd1a/menus/menuSwitch.vue @@ -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: '' diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue b/src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue index ea840d29a..c469be542 100644 --- a/src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue +++ b/src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue @@ -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; diff --git a/src/jmapNew/theme/datie_tky/menus/menuSwitch.vue b/src/jmapNew/theme/datie_tky/menus/menuSwitch.vue index 42c5a2f2d..6ab499d8e 100644 --- a/src/jmapNew/theme/datie_tky/menus/menuSwitch.vue +++ b/src/jmapNew/theme/datie_tky/menus/menuSwitch.vue @@ -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: [ diff --git a/src/jmapNew/theme/datie_tky/menus/menuTrain.vue b/src/jmapNew/theme/datie_tky/menus/menuTrain.vue index e3da86fa1..b83dc1cbd 100644 --- a/src/jmapNew/theme/datie_tky/menus/menuTrain.vue +++ b/src/jmapNew/theme/datie_tky/menus/menuTrain.vue @@ -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; diff --git a/src/scripts/cmdPlugin/Config.js b/src/scripts/cmdPlugin/Config.js index c0afc6431..7150caeba 100644 --- a/src/scripts/cmdPlugin/Config.js +++ b/src/scripts/cmdPlugin/Config.js @@ -3,7 +3,8 @@ export const State2SimulationMap = { '01': 'Local', // 现地工作站 '02': 'Center', // 中心调度工作站 '09':'Depot_IL', // 车辆段工作站 - '10': 'Local' + '10': 'Local', + '04': 'Local' }; export const State2ControlMap = { diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index 765385b35..ac0303f1e 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -3437,6 +3437,12 @@ export const OperationEvent = { operation: '70w', domId: '_Tips-Train-driverStop-Menu' } + }, + turnDirection: { + menu: { + operation: '70x', + domId: '_Tips-Train-turnDirection-Menu' + } } }, diff --git a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue index dd0809f5e..d12c145f0 100644 --- a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue +++ b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue @@ -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); diff --git a/src/views/newMap/displayNew/scriptDisplay/scriptRecord/index.vue b/src/views/newMap/displayNew/scriptDisplay/scriptRecord/index.vue index a9fb99ad7..21fe5d39b 100644 --- a/src/views/newMap/displayNew/scriptDisplay/scriptRecord/index.vue +++ b/src/views/newMap/displayNew/scriptDisplay/scriptRecord/index.vue @@ -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) { diff --git a/src/views/scriptManage/tipScriptRecord.vue b/src/views/scriptManage/tipScriptRecord.vue index 0ef8c0728..e6d6bb4d9 100644 --- a/src/views/scriptManage/tipScriptRecord.vue +++ b/src/views/scriptManage/tipScriptRecord.vue @@ -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 == '车站引导员') {