rt-sim-training-client/src/scripts/ConstDic.js

2126 lines
41 KiB
JavaScript
Raw Normal View History

2019-07-25 10:30:30 +08:00
/**
* 权限类型
*/
export const PermissionType = {
LESSON: '01',
EXAM: '02',
SIMULATION: '03',
SCREEN: '04',
PLAN: '05',
REPLAY: '06'
};
/**
* 地图视图
*/
export const ViewMode = {
LOGIC: '01',
PHYSICAL: '02',
MIX: '03'
};
/**
* 实训模式
*/
export const TrainingMode = {
MAP_EDIT: '00',
EDIT: '01',
TEACH: '02',
PRACTICE: '03',
TEST: '04',
EXAM: '05',
NORMAL: '06'
};
/**
* 教练/正常
*/
export const OperateMode = {
ADMIN: '00',
NORMAL: '01',
FAULT: '02'
};
/**
* 分发转赠
*/
export const OperatorModel = {
DISTRIBUTE: '01',
TRANSFER: '02'
};
/**
* 地图设备类型
*/
export const MapDeviceType = {
Link: { type: '01', label: 'Link' },
Switch: { type: '02', label: '道岔' },
Section: { type: '03', label: '区段' },
Signal: { type: '04', label: '信号机' },
StationControl: { type: '05', label: '控制模式' },
StationStand: { type: '06', label: '站台' },
Train: { type: '07', label: '列车' },
Station: { type: '08', label: '车站' },
TrainWindow: { type: '09', label: '车次窗' },
LimitControl: { type: '10', label: '限速' },
MixinCommand: { type: '11', label: '混合命令' }
};
/**
* 根据类型编码获取类型名称
* @param {*} code
*/
export function getDeviceTypeByDic(code) {
for (var field in MapDeviceType) {
if (code === MapDeviceType[field].type) {
return field;
}
}
return null;
}
/**
* 菜单编号
*/
export const DeviceMenu = {
Cancel: '00',
Link: '01',
Switch: '02',
Section: '03',
Signal: '04',
StationControl: '05',
StationStand: '06',
Train: '07',
Station: '08',
TrainWindow: '09',
LimitControl: '10',
Map: '100',
PrdCategory: '101',
Training: '102',
Lesson: '103',
RunPlan: '104',
JointRoom: '105',
SetDriver: '106',
Script: '107'
};
/**
* 根据设备类型名获取对应菜单编号
* @param {*} type
*/
export function getDeviceMenuByDeviceType(type) {
for (var item in DeviceMenu) {
if (item == type) {
return DeviceMenu[item];
}
}
return null;
}
/**
* 操作事件类型
*/
export const OperationEvent = {
// 直接指令
Command: {
// 取消操作
cancel: {
menu: {
operation: '000',
domId: '_Tips-Cancel-Menu'
}
},
// 关闭对话框
close: {
menu: {
operation: '001',
domId: '_Tips-Close-Menu'
},
password: {
operation: '0011',
domId: '_Tips-Close-Password'
},
confirm: {
operation: '0012',
domId: '_Tips-Close-Confirm'
},
alarm: {
operation: '0013',
domId: '_Tips-Close-Alarm'
},
notice: {
operation: '0014',
domId: '_Tips-Close-Notice'
}
},
// 菜单
mBar: {
/** 系统 */
system: {
operation: '002',
domId: '_Tips-Mbar-0-System'
},
/** 查看 */
check: {
operation: '0021',
domId: '_Tips-Mbar-0-Check'
},
/** 刷新 */
fresh: {
operation: '0022',
domId: '_Tips-Mbar-0-Fresh'
},
/** 显示 */
view: {
operation: '0023',
domId: '_Tips-Mbar-0-View'
},
/** 控制模式菜单 */
remoteControl: {
operation: '0024',
domId: '_Tips-Mbar-0-StationControl'
},
/** 请求区域 */
requestZone: {
operation: '0025',
domId: '_Tips-Mbar-0-StationControl'
},
/** 历史查询 */
historyQuery: {
operation: '0026',
domId: '_Tips-Mbar-0-HistoryQuery'
},
/** 用户管理 */
userManage: {
operation: '0027',
domId: '_Tips-Mbar-0-UserManage'
},
/** 帮助 */
help: {
operation: '0028',
domId: '_Tips-Mbar-0-Help'
},
/** 计划车操作 */
planTrain: {
operation: '0029',
domId: '_Tips-Mbar-0-PlanTrain'
},
/** 扣车*/
detainControl: {
operation: '00291',
domId: '_Tips-Mbar-0-detainControl'
}
},
// 前端视图指令
view: {
/** 设置列车识别号显示*/
setTrainIdDisplay: {
operation: '003',
domId: '_Tips-View-SetTrainIdDisplay'
},
/** 设置名称显示*/
setNameDisplay: {
operation: '0031',
domId: '_Tips-View-SetNameDisplay'
},
/** 设置设备显示*/
setDeviceDisplay: {
operation: '0032',
domId: '_Tips-View-SetDeviceDisplay'
},
setSection: {
operation: '0033',
domId: '_Tips-View-SetSection'
},
setSwitch: {
operation: '0034',
domId: '_Tips-View-SetSwitch'
},
setSignal: {
operation: '0035',
domId: '_Tips-View-SetSignal'
},
setTrainN: {
operation: '0036',
domId: '_Tips-View-SetTrainN'
},
setTrainB: {
operation: '0037',
domId: '_Tips-View-SetTrainB'
},
amplification: {
operation: '0038',
domId: '_Tips-View-Amplification'
},
dpShowTrainN: {
operation: '0039',
domId: '_Tips-View-DpShowTrainN'
}
},
// 计划车指令
planTrain: {
/** 添加计划车*/
addPlanTrain: {
operation: '004',
domId: '_Tips-PlanTrain-AddPlanTrain'
},
/** 平移计划车*/
translatPlanTrain: {
operation: '0041',
domId: '_Tips-PlanTrain-TranslatPlanTrain'
},
/** 删除计划车*/
delPlanTrain: {
operation: '0042',
domId: '_Tips-PlanTrain-DelPlanTrain'
}
},
// 管理指令
manage: {
/** 用户管理*/
userManage: {
operation: '005',
domId: '_Tips-Manage-UserManage'
},
/** 添加用户*/
addUser: {
operation: '0051',
domId: '_Tips-Manage-AddUser'
},
/** 修改用户*/
editUser: {
operation: '0052',
domId: '_Tips-Manage-EditUser'
},
/** 删除用户*/
delUser: {
operation: '0053',
domId: '_Tips-Manage-DelUser'
},
/** 选择用户*/
chooseUser: {
operation: '0054',
domId: '_Tips-Manage-ChooseUser'
},
/** 刷新用户*/
freshUser: {
operation: '0055',
domId: '_Tips-Manage-FreshUser'
}
},
// 帮助
help: {
about: {
operation: '006',
domId: '_Tips-Help-About'
}
},
// 无设备关联的指令
order: {
choose: {
operation: '007',
domId: '_Tips-Order-Choose'
},
choose1: {
operation: '0071',
domId: '_Tips-Order-Choose1'
}
}
},
// 道岔操作
Switch: {
// 取消故障
cancelStoppage: {
event: '999',
menu: {
operation: '199'
}
},
// 道岔故障
stoppage: {
event: '0',
menu: {
operation: '100'
}
},
// 道岔总定/定位操作
locate: {
event: '1',
button: {
operation: '1010',
domId: '_Tips-Switch-Locate-Mbm'
},
menu: {
operation: '101',
domId: '_Tips-Switch-Locate-Menu'
}
},
// 道岔总反/反位操作
reverse: {
event: '2',
button: {
operation: '1020',
domId: '_Tips-Switch-Reverse-Mbm'
},
menu: {
operation: '102',
domId: '_Tips-Switch-Reverse-Menu'
}
},
// 道岔单锁
lock: {
event: '3',
button: {
operation: '1030',
domId: '_Tips-Switch-Lock-Mbm'
},
menu: {
operation: '103',
domId: '_Tips-Switch-Lock-Menu'
}
},
// 道岔解锁
unlock: {
event: '4',
button: {
operation: '1040',
domId: '_Tips-Switch-Unlock-Mbm'
},
menu: {
operation: '104',
domId: '_Tips-Switch-Unlock-Menu'
},
order: {
operation: '1041',
domId: '_Tips-Switch-Unlock-Order'
},
confirm: {
operation: '1042',
domId: '_Tips-Switch-Unlock-Confirm'
},
confirm1: {
operation: '1043',
domId: '_Tips-Switch-Unlock-Confirm1'
},
confirm2: {
operation: '1044',
domId: '_Tips-Switch-Unlock-Confirm2'
},
stop: {
operation: '1045',
domId: '_Tips-Switch-Unlock-Stop'
}
},
// 道岔封闭
block: {
event: '5',
menu: {
operation: '105',
domId: '_Tips-Switch-Block-Menu'
}
},
// 道岔解封
unblock: {
event: '6',
menu: {
operation: '106',
domId: '_Tips-Switch-Unblock-menu'
},
order: {
operation: '1061',
domId: '_Tips-Switch-Unblock-Order'
},
confirm: {
operation: '1062',
domId: '_Tips-Switch-Unblock-Confirm'
},
confirm1: {
operation: '1063',
domId: '_Tips-Switch-Unblock-Confirm1'
},
confirm2: {
operation: '1064',
domId: '_Tips-Switch-Unblock-Confirm2'
},
stop: {
operation: '1065',
domId: '_Tips-Switch-Unblock-Stop'
}
},
// 转动
turnout: {
event: '7',
menu: {
operation: '107',
domId: '_Tips-Switch-Turnout-Menu'
}
},
// 强制扳动
turnoutForce: {
event: '8',
menu: {
operation: '108',
domId: '_Tips-Switch-TurnoutForce-Menu'
}
},
// 道岔故障解锁
fault: {
event: '9',
menu: {
operation: '109',
domId: '_Tips-Switch-Fault-Menu'
},
order: {
operation: '1091',
domId: '_Tips-Switch-Fault-Order'
},
confirm: {
operation: '1092',
domId: '_Tips-Switch-Fault-Confirm'
},
confirm1: {
operation: '1093',
domId: '_Tips-Switch-Fault-Confirm1'
},
confirm2: {
operation: '1094',
domId: '_Tips-Switch-Fault-Confirm2'
},
stop: {
operation: '1095',
domId: '_Tips-Switch-Fault-Stop'
}
},
// 计轴预复位
axlePreReset: {
event: '10',
menu: {
operation: '110',
domId: '_Tips-Switch-AxlePreReset-Menu'
},
order: {
operation: '1101',
domId: '_Tips-Switch-AxlePreReset-Order'
},
confirm: {
operation: '1102',
domId: '_Tips-Switch-AxlePreReset-Confirm'
},
confirm1: {
operation: '1103',
domId: '_Tips-Switch-AxlePreReset-Confirm1'
},
confirm2: {
operation: '1104',
domId: '_Tips-Switch-AxlePreReset-Confirm2'
},
stop: {
operation: '1105',
domId: '_Tips-Switch-AxlePreReset-Stop'
}
},
// 切除
split: {
event: '11',
menu: {
operation: '111',
domId: '_Tips-Switch-Split-Menu'
},
mbar: {
operation: '1111',
domId: '_Tips-Switch-Split-Mbar'
}
},
// 激活
active: {
event: '12',
menu: {
operation: '112',
domId: '_Tips-Switch-Active-Menu'
},
mbar: {
operation: '1121',
domId: '_Tips-Switch-Active-Mbar'
}
},
// 设置速度
setSpeed: {
event: '13',
menu: {
operation: '113',
domId: '_Tips-Switch-SetSpeed-Menu'
},
order: {
operation: '1131',
domId: '_Tips-Switch-SetSpeed-Order'
},
confirm: {
operation: '1132',
domId: '_Tips-Switch-SetSpeed-Confirm'
},
confirm1: {
operation: '1133',
domId: '_Tips-Switch-SetSpeed-Confirm1'
},
confirm2: {
operation: '1134',
domId: '_Tips-Switch-SetSpeed-Confirm2'
},
stop: {
operation: '1135',
domId: '_Tips-Switch-SetSpeed-Stop'
},
choose: {
operation: '1136',
domId: '_Tips-Switch-SetSpeed-Choose'
}
},
// 取消速度
cancelSpeed: {
event: { query: '15', confirm: '14' },
menu: {
operation: '114',
domId: '_Tips-Switch-CancelSpeed-Menu'
},
order: {
operation: '1141',
domId: '_Tips-Switch-CancelSpeed-Order'
},
confirm: {
operation: '1142',
domId: '_Tips-Switch-CancelSpeed-Confirm'
},
confirm1: {
operation: '1143',
domId: '_Tips-Switch-CancelSpeed-Confirm1'
},
confirm2: {
operation: '1144',
domId: '_Tips-Switch-CancelSpeed-Confirm2'
},
stop: {
operation: '1145',
domId: '_Tips-Switch-CancelSpeed-Stop'
}
},
// 查询区段详情
query: {
event: '15',
menu: {
operation: '115',
domId: '_Tips-Switch-Query-Menu'
}
},
// 设置限速
setLimitSpeed: {
event: '16',
menu: {
operation: '116',
domId: '_Tips-Switch-SetSpeed-Menu'
}
},
// 确认计轴有效
alxeEffective: {
event: '17',
menu: {
operation: '117',
domId: '_Tips-Switch-Alxe-Effective-Menu'
},
choose1: {
operation: '1171',
domId: '_Tips-Switch-Alxe-Effective-Choose-1'
},
choose2: {
operation: '1172',
domId: '_Tips-Switch-Alxe-Effective-Choose-2'
},
confirm1: {
operation: '1173',
domId: '_Tips-Switch-Alxe-Effective-Confirm-1'
},
confirm2: {
operation: '1174',
domId: '_Tips-Switch-Alxe-Effective-Confirm-2'
}
},
// 区故解
solution: {
event: '20',
menu: {
operation: '120',
domId: '_Tip-Switch-Single-Solution-Menu'
}
}
},
// 控制模式操作
StationControl: {
// 取消故障
cancelStoppage: {
event: '999',
menu: {
operation: '299'
}
},
// 故障
stoppage: {
event: '0',
menu: {
operation: '200'
}
},
// 紧急站控
emergencyStationControl: {
event: '1',
menu: {
operation: '201',
domId: '_Tips-Control-Emergency-Menu'
},
mbar: {
operation: '2011',
domId: '_Tips-Control-Emergency-Mbar'
},
choose: {
operation: '2012',
domId: '_Tips-Control-Emergency-Choose'
},
confirm: {
operation: '2013',
domId: '_Tips-Control-Emergency-Confirm'
}
},
// 请求站控
requestStationControl: {
event: '2',
menu: {
operation: '202',
domId: '_Tips-Control-Request-Menu'
},
mbar: {
operation: '2021',
domId: '_Tips-Control-Request-Mbar'
},
choose: {
operation: '2022',
domId: '_Tips-Control-Request-Choose'
},
confirm: {
operation: '2023',
domId: '_Tips-Control-Request-Confirm'
}
},
// 强行站控
forcedStationControl: {
event: '3',
menu: {
operation: '203',
domId: '_Tips-Control-Forced-Menu'
},
mbar: {
operation: '2031',
domId: '_Tips-Control-Forced-Mbar'
},
choose: {
operation: '2032',
domId: '_Tips-Control-Forced-Choose'
},
confirm: {
operation: '2033',
domId: '_Tips-Control-Forced-Confirm'
},
password: {
operation: '2034',
domId: '_Tips-Control-Forced-Password'
},
passwordConfirm: {
operation: '2035',
domId: '_Tips-Control-Forced-PasswordConfirm'
}
},
// 请求中控
requestCentralControl: {
event: '4',
menu: {
operation: '204',
domId: '_Tips-Control-Central-Menu'
},
mbar: {
operation: '2041',
domId: '_Tips-Control-Central-Mbar'
},
choose: {
operation: '2042',
domId: '_Tips-Control-Central-Choose'
},
confirm: {
operation: '2043',
domId: '_Tips-Control-Central-Confirm'
}
},
// 控制模式应答同意
controlResponse: {
event: { centralAgree: '5', centralRefuse: '6', stationAgree: '7', stationRefuse: '8' },
menu: {
operation: '205',
domId: '_Tips-Control-Response-Menu'
},
choose: {
operation: '2052',
domId: '_Tips-Control-Response-Choose'
},
agree: {
operation: '2053',
domId: '_Tips-Control-Response-Agree'
},
refuse: {
operation: '2054',
domId: '_Tips-Control-Response-Refuse'
}
}
},
// 信号机操作
Signal: {
// 取消故障
cancelStoppage: {
event: '999',
menu: {
operation: '399'
}
},
// 故障
stoppage: {
event: '0',
menu: {
operation: '300'
}
},
// 查询进路
query: {
event: '1'
},
// 排列进路
arrangementRoute: {
event: { query: '1', confirm: '2' },
button: {
operation: '3010',
domId: '_Tips-Signal-ArrangementRoute-Mbm'
},
menu: {
operation: '301',
domId: '_Tips-Signal-ArrangementRoute-Menu'
},
choose: {
operation: '3011',
domId: '_Tips-Signal-ArrangementRoute-Choose'
},
confirm: {
operation: '3012',
domId: '_Tips-Signal-ArrangementRoute-Confirm'
}
},
// 取消进路
cancelTrainRoute: {
event: '3',
button: {
operation: '3030',
domId: '_Tips-Signal-CancelTrainRoute-Mbm'
},
menu: {
operation: '303',
domId: '_Tips-Signal-CancelTrainRoute-Menu'
},
confirm: {
operation: '3031',
domId: '_Tips-Signal-CancelTrainRoute-Confirm'
}
},
// 信号重开
reopenSignal: {
event: '4',
button: {
operation: '3040',
domId: '_Tips-Signal-Reopen-Mbm'
},
menu: {
operation: '304',
domId: '_Tips-Signal-Reopen-Menu'
},
confirm: {
operation: '3041',
domId: '_Tips-Signal-Reopen-Confirm'
}
},
// 人解列车进路
humanTrainRoute: {
event: '5',
button: {
operation: '3050',
domId: '_Tips-Signal-HumanTrainRoute-Mbm'
},
menu: {
operation: '3051',
domId: '_Tips-Signal-HumanTrainRoute-Menu'
},
confirm: {
operation: '3052',
domId: '_Tips-Signal-HumanTrainRoute-Confirm'
}
},
// 封锁
lock: {
event: '6',
menu: {
operation: '306',
domId: '_Tips-Signal-Lock-Menu'
},
confirm: {
operation: '3061',
domId: '_Tips-Signal-Lock-Confirm'
}
},
// 解锁
unlock: {
event: '7',
menu: {
operation: '307',
domId: '_Tips-Signal-Unlock-Menu'
},
order: {
operation: '3071',
domId: '_Tips-Signal-Unlock-Order'
},
confirm: {
operation: '3072',
domId: '_Tips-Signal-Unlock-Confirm'
},
confirm1: {
operation: '3073',
domId: '_Tips-Signal-Unlock-Confirm1'
},
confirm2: {
operation: '3074',
domId: '_Tips-Signal-Unlock-Confirm2'
},
stop: {
operation: '3075',
domId: '_Tips-Signal-Unlock-Stop'
}
},
// 引导
guide: {
event: { query: '1', confirm: '8' },
button: {
operation: '3080',
domId: '_Tips-Signal-Guide-Mbm'
},
menu: {
operation: '308',
domId: '_Tips-Signal-Guide-Menu'
},
order: {
operation: '3081',
domId: '_Tips-Signal-Guide-Order'
},
confirm: {
operation: '3082',
domId: '_Tips-Signal-Guide-Confirm'
},
confirm1: {
operation: '3083',
domId: '_Tips-Signal-Guide-Confirm1'
},
confirm2: {
operation: '3084',
domId: '_Tips-Signal-Guide-Confirm2'
},
stop: {
operation: '3085',
domId: '_Tips-Signal-Guide-Stop'
},
choose: {
operation: '3085',
domId: '_Tips-Signal-Guide-Choose'
}
},
// 设置联锁自动进路
setAutoInterlock: {
event: '9',
button: {
operation: '3090',
domId: '_Tips-Signal-SetAutoInterlock-Mbm'
},
menu: {
operation: '309',
domId: '_Tips-Signal-SetAutoInterlock-Menu'
}
},
// 取消联锁自动进路
cancelAutoInterlock: {
event: '10',
menu: {
operation: '310',
domId: '_Tips-Signal-CancelAutoInterlock-Menu'
}
},
// 设置联锁自动触发
setAutoTrigger: {
event: '11',
menu: {
operation: '311',
domId: '_Tips-Signal-SetAutoTrigger-Menu'
}
},
// 取消联锁自动触发
cancelAutoTrigger: {
event: '12',
menu: {
operation: '312',
domId: '_Tips-Signal-CancelAutoTrigger-Menu'
}
},
// 信号关灯
signalClose: {
event: '13',
menu: {
operation: '313',
domId: '_Tips-Signal-SignalClose-Menu'
},
confirm: {
operation: '3131',
domId: '_Tips-Signal-SignalClose-Confirm'
}
},
// 进路交人工控
humanControl: {
event: { query: '1', confirm: '14' },
menu: {
operation: '314',
domId: '_Tips-Signal-HumanControl-Menu'
},
choose: {
operation: '3141',
domId: '_Tips-Signal-HumanControl-Choose'
},
confirm: {
operation: '3142',
domId: '_Tips-Signal-HumanControl-Confirm'
}
},
// 进路交ATS自动工控
atsAutoControl: {
event: { query: '1', confirm: '15' },
menu: {
operation: '315',
domId: '_Tips-Signal-AtsAutoControl-Menu'
},
choose: {
operation: '3151',
domId: '_Tips-Signal-AtsAutoControl-Choose'
},
confirm: {
operation: '3152',
domId: '_Tips-Signal-AtsAutoControls-Confirm'
}
},
// 查询进路状态
detail: {
event: { query: '1', confirm: '16' },
menu: {
operation: '316',
domId: '_Tips-Signal-Detail-Menu'
}
}
},
// 物理区段操作
Section: {
// 取消故障
cancelStoppage: {
event: '999',
menu: {
operation: '499'
}
},
// 故障
stoppage: {
event: '0',
menu: {
operation: '400'
}
},
// 设置计轴失效
alxeFailure: {
event: '001',
menu: {
operation: '4001'
}
},
// 查询区段详情
query: {
event: '1',
menu: {
operation: '401',
domId: '_Tips-Section-Query-Menu'
}
},
// 区故解
fault: {
event: '2',
button: {
operation: '4020',
domId: '_Tips-Section-Fault-Mbm'
},
menu: {
operation: '402',
domId: '_Tips-Section-Fault-Menu'
},
prepare: {
operation: '4021',
domId: '_Tips-Section-Fault-Prepare'
},
select: {
operation: '4022',
domId: '_Tips-Section-Fault-Select'
},
confirm: {
operation: '4023',
domId: '_Tips-Section-Fault-Confirm'
},
confirm1: {
operation: '4024',
domId: '_Tips-Section-Fault-Confirm1'
},
confirm2: {
operation: '4025',
domId: '_Tips-Section-Fault-Confirm2'
},
order: {
operation: '4026',
domId: '_Tips-Section-Fault-Order'
},
stop: {
operation: '4027',
domId: '_Tips-Section-Fault-Stop'
}
},
// 封锁
lock: {
event: '3',
menu: {
operation: '403',
domId: '_Tips-Section-Lock-Menu'
}
},
// 解锁
unlock: {
event: '4',
menu: {
operation: '404',
domId: '_Tips-Section-Unlock-Menu'
},
order: {
operation: '4041',
domId: '_Tips-Section-Unlock-Order'
},
confirm: {
operation: '4042',
domId: '_Tips-Section-Unlock-Confirm'
},
confirm1: {
operation: '4043',
domId: '_Tips-Section-Unlock-Confirm1'
},
confirm2: {
operation: '4044',
domId: '_Tips-Section-Unlock-Confirm2'
},
stop: {
operation: '4045',
domId: '_Tips-Section-Unlock-Stop'
}
},
// 切除
split: {
event: '5',
menu: {
operation: '405',
domId: '_Tips-Section-split-Menu'
},
mbar: {
operation: '4051',
domId: '_Tips-Section-split-Mbar'
}
},
// 激活
active: {
event: '6',
menu: {
operation: '406',
domId: '_Tips-Section-Active-Menu'
},
mbar: {
operation: '4061',
domId: '_Tips-Section-Active-mbar'
}
},
// 设置速度
setSpeed: {
event: '7',
menu: {
operation: '407',
domId: '_Tips-Section-SetSpeed-Menu'
},
order: {
operation: '4071',
domId: '_Tips-Section-SetSpeed-Order'
},
confirm: {
operation: '4072',
domId: '_Tips-Section-SetSpeed-Confirm'
},
confirm1: {
operation: '4073',
domId: '_Tips-Section-SetSpeed-Confirm1'
},
confirm2: {
operation: '4074',
domId: '_Tips-Section-SetSpeed-Confirm2'
},
stop: {
operation: '4075',
domId: '_Tips-Section-SetSpeed-Stop'
},
choose: {
operation: '4076',
domId: '_Tips-Section-SetSpeed-Choose'
}
},
// 取消速度
cancelSpeed: {
event: { query: '1', confirm: '8' },
menu: {
operation: '408',
domId: '_Tips-Section-CancelSpeed-Menu'
},
order: {
operation: '4081',
domId: '_Tips-Section-CancelSpeed-Order'
},
confirm: {
operation: '4082',
domId: '_Tips-Section-CancelSpeed-Confirm'
},
confirm1: {
operation: '4083',
domId: '_Tips-Section-CancelSpeed-Confirm1'
},
confirm2: {
operation: '4084',
domId: '_Tips-Section-CancelSpeed-Confirm2'
},
stop: {
operation: '4085',
domId: '_Tips-Section-CancelSpeed-Stop'
}
},
// 计轴预复位
axlePreReset: {
event: '9',
button: {
operation: '4090',
domId: '_Tips-Section-AxlePreReset-Mbm'
},
menu: {
operation: '409',
domId: '_Tips-Section-AxlePreReset-Menu'
},
order: {
operation: '4091',
domId: '_Tips-Section-AxlePreReset-Order'
},
confirm: {
operation: '4092',
domId: '_Tips-Section-AxlePreReset-Confirm'
},
confirm1: {
operation: '4093',
domId: '_Tips-Section-AxlePreReset-Confirm1'
},
confirm2: {
operation: '4094',
domId: '_Tips-Section-AxlePreReset-Confirm2'
},
stop: {
operation: '4095',
domId: '_Tips-Section-AxlePreReset-Stop'
}
},
// 设备状态
detail: {
event: '10',
menu: {
operation: '410',
domId: '_Tips-Section-detail-Menu'
}
},
// 新建列车
newtrain: {
event: '11',
menu: {
operation: '411',
domId: '_Tips-Section-Newtrain-Menu'
}
},
// 确认计轴有效
alxeEffective: {
event: '12',
menu: {
operation: '412',
domId: '_Tips-Section-Alxe-Effective-Menu'
},
choose1: {
operation: '4121',
domId: '_Tips-Section-Alxe-Effective-Choose-1'
},
choose2: {
operation: '4122',
domId: '_Tips-Section-Alxe-Effective-Choose-2'
},
confirm1: {
operation: '4123',
domId: '_Tips-Section-Alxe-Effective-Confirm-1'
},
confirm2: {
operation: '4124',
domId: '_Tips-Section-Alxe-Effective-Confirm-2'
}
},
// 设置临时限速
setLimitSpeed: {
event: '13',
menu: {
operation: '413',
domId: '_Tips-Section-SetLimitSpeed-Menu'
},
openConversation: {
operation: '4131',
domId: '_Tips-Section-SetLimitSpeed-OpenConversation'
},
closeConversation: {
operation: '4132',
domId: '_Tips-Section-SetLimitSpeed-CloseConversation'
},
firstLimitSpeed: {
operation: '4133',
domId: '_Tips-Section-SetLimitSpeed-FirstLimitSpeed{TOP}'
},
firstStartSection: {
operation: '4134',
domId: '_Tips-Section-SetLimitSpeed-FirstStartSection{TOP}'
},
firstStartvalue: {
operation: '4135',
domId: '_Tips-Section-SetLimitSpeed-FirstStartvalue'
},
firstEndSection: {
operation: '4136',
domId: '_Tips-Section-SetLimitSpeed-FirstEndSection{TOP}'
},
firstEndvalue: {
operation: '4137',
domId: '_Tips-Section-SetLimitSpeed-FirstEndvalue'
},
firstCheck: {
operation: '4138',
domId: '_Tips-Section-SetLimitSpeed-FirstCheck'
},
firstComfirm: {
operation: '4139',
domId: '_Tips-Section-SetLimitSpeed-FirstComfirm'
},
secondLimitSpeed: {
operation: '41310',
domId: '_Tips-Section-SetLimitSpeed-SecondLimitSpeed{TOP}'
},
secondStartSection: {
operation: '41311',
domId: '_Tips-Section-SetLimitSpeed-SecondStartSection{TOP}'
},
secondStartvalue: {
operation: '41312',
domId: '_Tips-Section-SetLimitSpeed-SecondStartvalue{TOP}'
},
secondEndSection: {
operation: '41313',
domId: '_Tips-Section-SetLimitSpeed-SecondEndSection{TOP}'
},
secondEndvalue: {
operation: '41314',
domId: '_Tips-Section-SetLimitSpeed-SecondEndvalue{TOP}'
},
secondCheck: {
operation: '41315',
domId: '_Tips-Section-SetLimitSpeed-SecondCheck'
},
secondComfirm: {
operation: '41316',
domId: '_Tips-Section-SetLimitSpeed-SecondComfirm'
},
domIdClose: {
operation: '41317',
domId: '_Tips-Section-SetLimitSpeed-DomIdClose'
},
close: {
operation: '41318',
domId: '_Tips-Section-SetLimitSpeed-close'
}
},
// 确认临时限速
confirmLimit: {
event: '14',
menu: {
operation: '414',
domId: '_Tips-Section-Confirm-Limit-Menu'
}
}
// 区段详情
// detail: {
// event: '15',
// menu: {
// operation: '415',
// domId: '_Tips-Section-Detail-Menu'
// }
// }
},
// 站台
StationStand: {
// 取消故障
cancelStoppage: {
event: '999',
menu: {
operation: '599'
}
},
// 故障
stoppage: {
event: '0',
menu: {
operation: '500'
}
},
// 提前发车
earlyDeparture: {
event: '1',
menu: {
operation: '501',
domId: '_Tips-Stand-EarlyDeparture-Menu'
},
upSelect: {
operation: '5011',
domId: '_Tips-Stand-EarlyDeparture-upSelect'
},
downSelect: {
operation: '5012',
domId: '_Tips-Stand-EarlyDeparture-downSelect'
}
},
// 设置跳停
setJumpStop: {
event: '2',
menu: {
operation: '502',
domId: '_Tips-Stand-SetJumpStop-Menu'
},
choose: {
operation: '5021',
domId: '_Tips-Stand-SetJumpStop-Choose'
},
select: {
operation: '5022',
domId: '_Tips-Stand-SetJumpStop-Select'
},
selfStationStand: {
operation: '5023',
domId: '_Tips-Stand-SetJumpStop-selfStationStand'
},
otherStationStand: {
operation: '5024',
domId: '_Tips-Stand-SetJumpStop-otherStationStand'
}
},
// 取消跳停
cancelJumpStop: {
event: '3',
menu: {
operation: '503',
domId: '_Tips-Stand-CancelJumpStop-Menu'
},
choose: {
operation: '5031',
domId: '_Tips-Stand-CancelJumpStop-Choose'
},
select: {
operation: '5032',
domId: '_Tips-Stand-CancelJumpStop-Select'
},
selfStationStand: {
operation: '5033',
domId: '_Tips-Stand-CancelJumpStop-selfStationStand'
},
otherStationStand: {
operation: '5034',
domId: '_Tips-Stand-CancelJumpStop-otherStationStand'
}
},
// 设置扣车
setDetainTrain: {
event: '4',
menu: {
operation: '504',
domId: '_Tips-Stand-SetDetainTrain-Menu'
}
},
// 取消扣车
cancelDetainTrain: {
event: '5',
menu: {
operation: '505',
domId: '_Tips-Stand-CancelDetainTrain-Menu'
},
choose: {
operation: '5051',
domId: '_Tips-Stand-cancelDetainTrain-Choose'
}
},
// 强制取消扣车
cancelDetainTrainForce: {
event: '6',
menu: {
operation: '506',
domId: '_Tips-Stand-CancelDetainTrainForce-Menu'
}
},
// 站台详细信息
detail: {
event: '7',
menu: {
operation: '507',
domId: '_Tips-Stand-Detail-Menu'
}
},
// 全线取消扣车
cancelDetainTrainAll: {
event: '8',
menu: {
operation: '508',
domId: '_Tips-Stand-CancelDetainTrainAll-Menu'
},
choose: {
operation: '5081',
domId: '_Tips-Stand-CancelDetainTrainAll-Choose'
},
mbar: {
operation: '5082',
domId: '_Tips-Stand-CancelDetainTrainAll-Mbar'
},
confirm: {
operation: '5083',
domId: '_Tips-Stand-CancelDetainTrainAll-Confirm'
}
},
// 设置停站时间
setStopTime: {
event: { query: '7', confirm: '9' },
menu: {
operation: '509',
domId: '_Tips-Stand-SetStopTime-Menu'
},
confirm: {
operation: '5091',
domId: '_Tips-Stand-SetStopTime-Confirm'
},
choose1: {
operation: '5092',
domId: '_Tips-Stand-SetStopTime-Choose-1'
},
choose2: {
operation: '5093',
domId: '_Tips-Stand-SetStopTime-Choose-2'
},
input: {
operation: '5094',
domId: '_Tips-Stand-SetStopTime-Input'
}
},
// 设置运行等级
setRunLevel: {
event: { query: '7', confirm: '10' },
menu: {
operation: '510',
domId: '_Tips-Stand-SetRunLevel-Menu'
},
choose: {
operation: '5101',
domId: '_Tips-Stand-SetRunLevel-Choose'
},
confirm: {
operation: '5102',
domId: '_Tips-Stand-SetRunLevel-confirm'
},
check: {
operation: '5103',
domId: '_Tips-Stand-SetRunLevel-check'
},
chooseLevel: {
operation: '5104',
domId: '_Tips-Stand-SetRunLevel-chooseLevel'
},
chooseTrain: {
operation: '5105',
domId: '_Tips-Stand-SetRunLevel-chooseTrain'
},
choose1: {
operation: '5106',
domId: '_Tips-Stand-SetRunLevel-Choose-1'
},
choose2: {
operation: '5107',
domId: '_Tips-Stand-SetRunLevel-Choose-2'
}
},
// 设置折返策略
setBackStrategy: {
event: { query: '7', confirm: '11' },
menu: {
operation: '511',
domId: '_Tips-Stand-SetBackStrategy-Menu'
},
choose: {
operation: '5111',
domId: '_Tips-Stand-setBackStrategy-Choose'
},
confirm: {
operation: '5112',
domId: '_Tips-Stand-setBackStrategy-confirm'
}
},
// 设置全线扣车
setDetainTrainAll: {
event: 12,
menu: {
operation: '512',
domId: '_Tips-Stand-SetBackStrategy-Menu'
},
mbar: {
operation: '5121',
domId: '_Tips-Stand-setDetainTrainAll-Mbar'
},
confirm: {
operation: '5122',
domId: '_Tips-Stand-setDetainTrainAll-confirm'
}
},
cancelUpDetainTrainAll: {
event: 13,
menu: {
operation: '513',
domId: '_Tips-Stand-SetBackStrategy-Menu'
},
mbar: {
operation: '5131',
domId: '_Tips-Stand-clearUpCar-Mbar'
},
confirm: {
operation: '5132',
domId: '_Tips-Stand-clearUpCar-confirm'
}
},
cancelDownDetainTrainAll: {
event: 14,
menu: {
operation: '514',
domId: '_Tips-Stand-SetBackStrategy-Menu'
},
mbar: {
operation: '5141',
domId: '_Tips-Stand-clearDownCar-Mbar'
},
confirm: {
operation: '5142',
domId: '_Tips-Stand-clearDownCar-confirm'
}
}
},
Station: {
// 取消故障
cancelStoppage: {
event: '999',
menu: {
operation: '699'
}
},
// 故障
stoppage: {
event: '0',
menu: {
operation: '600'
}
},
// 全站设置联锁自动触发
setAutoTrigger: {
event: '1',
menu: {
operation: '601',
domId: '_Tips-Station-SetAutoTrigger-Menu'
}
},
// 全站取消联锁自动触发
cancelAutoTrigger: {
event: '2',
menu: {
operation: '602',
domId: '_Tips-Station-CancelAutoTrigger-Menu'
}
},
// 上电解锁
powerUnLock: {
event: '3',
menu: {
operation: '603',
domId: '_Tips-Station-PowerUnLock-Menu'
},
order: {
operation: '6031',
domId: '_Tips-Station-PowerUnLock-Order'
},
confirm: {
operation: '6032',
domId: '_Tips-Station-PowerUnLock-Confirm'
},
confirm1: {
operation: '6033',
domId: '_Tips-Station-PowerUnLock-Confirm1'
},
confirm2: {
operation: '6034',
domId: '_Tips-Station-PowerUnLock-Confirm2'
},
stop: {
operation: '6035',
domId: '_Tips-Station-PowerUnLock-Stop'
}
},
// 执行关键操作测试
execKeyOperationTest: {
event: '4',
menu: {
operation: '604',
domId: '_Tips-Station-ExecKeyOperationTest-Menu'
},
order: {
operation: '6041',
domId: '_Tips-Station-ExecKeyOperationTest-Order'
},
confirm: {
operation: '6042',
domId: '_Tips-Station-ExecKeyOperationTest-Confirm'
},
confirm1: {
operation: '6043',
domId: '_Tips-Station-ExecKeyOperationTest-Confirm1'
},
confirm2: {
operation: '6044',
domId: '_Tips-Station-ExecKeyOperationTest-Confirm2'
},
stop: {
operation: '6045',
domId: '_Tips-Station-ExecKeyOperationTest-Stop'
}
},
// 所有进路自排关
humanControlALL: {
event: '5',
menu: {
operation: '605',
domId: '_Tips-Station-HumanControlALL-Menu'
}
},
// 所有进路自排开
atsAutoControlALL: {
event: '6',
menu: {
operation: '606',
domId: '_Tips-Station-AtsAutoControlALL-Menu'
}
},
split: {
event: '7',
mbar: {
operation: '6071',
domId: '_Tips-Stand-Split-Mbar'
},
choose: {
operation: '6072',
domId: '_Tips-Stand-Split-Mbar'
},
confirm: {
operation: '6073',
domId: '_Tips-Stand-Split-confirm'
}
},
active: {
event: '8',
mbar: {
operation: '6081',
domId: '_Tips-Stand-Active-Mbar'
},
choose: {
operation: '6082',
domId: '_Tips-Stand-Split-Mbar'
},
confirm: {
operation: '6083',
domId: '_Tips-Stand-Active-confirm'
}
}
},
// 列车
Train: {
// 取消故障
cancelStoppage: {
event: '999',
menu: {
operation: '799'
}
},
// 故障
stoppage: {
event: '0',
menu: {
operation: '700'
}
},
// 添加列车识别号
addTrainId: {
event: '1',
menu: {
operation: '701',
domId: '_Tips-Train-AddTrainId-Menu'
},
trainNumberChange: {
operation: '7011',
domId: '_Tips-Train-AddTrainId-TrainNumberChange'
},
trainTypeChange: {
operation: '7012',
domId: '_Tips-Train-AddTrainId-trainTypeChange'
},
serverNoChange: {
operation: '7013',
domId: '_Tips-Train-AddTrainId-serverNoChange'
},
trainNoChange: {
operation: '7014',
domId: '_Tips-Train-AddTrainId-trainNoChange'
},
targetCodeChange: {
operation: '7015',
domId: '_Tips-Train-AddTrainId-targetCodeChange'
},
confirm: {
operation: '7016',
domId: '_Tips-Train-AddTrainId-Confirm'
},
input: {
operation: '7017',
domId: '_Tips-Train-AddTrainId-Input'
}
},
// 修改列车识别号
editTrainId: {
event: '2',
menu: {
operation: '702',
domId: '_Tips-Train-EditTrainId-Menu'
},
trainNumberChange: {
operation: '7021',
domId: '_Tips-Train-EditTrainId-TrainNumberChange'
},
trainTypeChange: {
operation: '7022',
domId: '_Tips-Train-EditTrainId-trainTypeChange'
},
serverNoChange: {
operation: '7023',
domId: '_Tips-Train-EditTrainId-serverNoChange'
},
trainNoChange: {
operation: '7024',
domId: '_Tips-Train-EditTrainId-trainNoChange'
},
targetCodeChange: {
operation: '7025',
domId: '_Tips-Train-EditTrainId-targetCodeChange'
},
confirm: {
operation: '7026',
domId: '_Tips-Train-EditTrainId-Confirm'
},
input: {
operation: '7027',
domId: '_Tips-Train-EditTrainId-Input'
}
},
// 删除列车识别号
delTrainId: {
event: '3',
menu: {
operation: '703',
domId: '_Tips-Train-DelTrainId-Menu'
},
trainNumberChange: {
operation: '7031',
domId: '_Tips-Train-DelTrainId-TrainNumberChange'
},
confirm: {
operation: '7032',
domId: '_Tips-Train-DelTrainId-Confirm'
},
input: {
operation: '7033',
domId: '_Tips-Train-DelTrainId-Input'
}
},
// 移动列车识别号
moveTrainId: {
event: '4',
menu: {
operation: '704',
domId: '_Tips-Train-MoveTrainId-Menu'
},
confirm: {
operation: '7041',
domId: '_Tips-Train-MoveTrainId-Confirm'
}
},
// 交换列车识别号
switchTrainId: {
event: '5',
menu: {
operation: '705',
domId: '_Tips-Train-SwitchTrainId-Menu'
},
confirm: {
operation: '7051',
domId: '_Tips-Train-SwitchTrainId-Confirm'
}
},
// 修改车组号
editTrainNo: {
event: '6',
menu: {
operation: '706',
domId: '_Tips-Train-DditTrainNo-Menu'
},
confirm: {
operation: '7061',
domId: '_Tips-Train-DditTrainNo-Confirm'
}
},
// 限速行驶
limitSpeed: {
event: '7',
menu: {
operation: '707',
domId: '_Tips-Train-LimitSpeed-Menu'
}
},
// 设置计划车
setPlanTrainId: {
event: '8',
menu: {
operation: '708',
domId: '_Tips-Train-SetPlanTrainId-Menu'
},
confirm: {
operation: '7081',
domId: '_Tips-Train-SetPlanTrainId-Confirm'
},
trainSource: {
operation: '7082',
domId: '_Tips-Train-SetPlanTrainId-TrainSource'
}
},
// 添加计划车
addPlanTrainId: {
event: '9',
menu: {
operation: '709',
domId: '_Tips-Train-addPlanTrainId-Menu'
},
confirm: {
operation: '7091',
domId: '_Tips-Train-addPlanTrainId-Confirm'
},
trainSource: {
operation: '7092',
domId: '_Tips-Train-addPlanTrainId-TrainSource'
}
},
// 平移计划车
moveEventlyTrainId: {
event: 'a',
menu: {
operation: '70a',
domId: '_Tips-Train-moveEventlyTrainId-Menu'
},
confirm: {
operation: '70a1',
domId: '_Tips-Train-moveEventlyTrainId-Confirm'
},
trainSource: {
operation: '70a2',
domId: '_Tips-Train-moveEventlyTrainId-TrainSource'
}
},
// 删除计划车
deletePlanTrainId: {
event: 'b',
menu: {
operation: '70b',
domId: '_Tips-Train-deletePlanTrainId-Menu'
},
confirm: {
operation: '70b1',
domId: '_Tips-Train-deletePlanTrainId-Confirm'
},
trainSource: {
operation: '70b2',
domId: '_Tips-Train-deletePlanTrainId-TrainSource'
}
}
},
// 取消全线临时限速
LimitControl: {
CancelAllLimit: {
event: '1',
menu: {
operation: '800',
domId: '_Tips-Cancel-Limit-All-Menu'
},
openMessage: {
operation: '8001',
domId: '_Tips-Cancel-Limit-open-message-Menu'
},
closeMessage: {
operation: '8002',
domId: '_Tips-Cancel-Limit-close-message-Menu'
},
confirm1: {
operation: '8003',
domId: '_Tips-Cancel-Limit-close-confirm1-Menu'
},
confirm2: {
operation: '8004',
domId: '_Tips-Cancel-Limit-close-confirm2-Menu'
},
confirm: {
operation: '8005',
domId: '_Tips-Cancel-Limit-confirm-Menu'
},
close: {
operation: '8006',
domId: '_Tips-Cancel-Limit-close-Menu'
}
}
},
// 混合指令
MixinCommand: {
/** 控制模式操作 */
remoteControl: {
mbar: {
operation: '2999',
domId: '_Tips-Control-StationControl-Mbar'
}
}
}
// 密码输入框指令
};
/**
* 根据OperationEvent字典生成DomIdOperationRel
* @param {*}
*/
export function generateDomIdOperationRel() {
const domIdOperationRel = {};
for (const deviceType in OperationEvent) {
for (const operate in OperationEvent[deviceType]) {
for (const orderType in OperationEvent[deviceType][operate]) {
if (OperationEvent[deviceType][operate][orderType].operation) {
domIdOperationRel[OperationEvent[deviceType][operate][orderType].operation] = OperationEvent[deviceType][operate][orderType].domId;
}
}
}
}
return domIdOperationRel;
}
export const DomIdOperationRel = generateDomIdOperationRel();
/**
* 根据设备type和operation code获取操作分类
* @param {*} deviceType
* @param {*} operation
*/
export function getOperateTypeBy(deviceType, operation) {
if (OperationEvent[deviceType]) {
for (var operate in OperationEvent[deviceType]) {
for (var orderType in OperationEvent[deviceType][operate]) {
if (OperationEvent[deviceType][operate][orderType] &&
OperationEvent[deviceType][operate][orderType].operation === operation) {
return OperationEvent[deviceType][operate][orderType].operation;
}
}
}
}
return null;
}
/**
* 根据操作类型获取地图菜单按钮domId
* @param {*} operation
*/
export function getDomIdByOperation(operation) {
let domIdDict = DomIdOperationRel;
if (!domIdDict) {
domIdDict = generateDomIdOperationRel();
}
return domIdDict[operation];
}
/**
* 根据操作类型和操作原子判断是否属于该原子
*/
export function checkOperationIsCurrentOperate(operation, operate) {
for (const order in operate) {
if (operate[order] &&
operate[order].operation === operation) {
return true;
}
}
}