剧本预览提示代码调整
This commit is contained in:
parent
b9cd660a7e
commit
ec72904bef
@ -273,6 +273,54 @@ export const operateEnum = {
|
||||
]
|
||||
}
|
||||
},
|
||||
CTCZONE:{
|
||||
function: getCTCDevicename,
|
||||
CTC_ZONE_SAVE_RUN_PLAN:{
|
||||
code:'planParam',
|
||||
name:'添加行车计划',
|
||||
isList:true,
|
||||
params:[
|
||||
{
|
||||
code:'stationCode',
|
||||
name:'车站',
|
||||
function:getStationNameById
|
||||
},
|
||||
{
|
||||
code:'trainType',
|
||||
name:'列车类型',
|
||||
result:trainTypeList
|
||||
},
|
||||
{
|
||||
code:'runType',
|
||||
name:'运行类型',
|
||||
result:[
|
||||
{code:'FAST_PASSENGER_TRAIN', name:'快速旅客列车'}
|
||||
]
|
||||
},
|
||||
{
|
||||
code:'arriveTripNumber',
|
||||
name:'到达车次'
|
||||
},
|
||||
{
|
||||
code:'arriveDirectionCode',
|
||||
name:'接车口'
|
||||
},
|
||||
{
|
||||
code:'arrivePlanTime',
|
||||
name:'到达时间'
|
||||
},
|
||||
{
|
||||
code:'startRunPlan',
|
||||
name:' 始发'
|
||||
},
|
||||
{
|
||||
code:'transfinite',
|
||||
name:' 超限',
|
||||
result:transfiniteList
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
CTC: {
|
||||
function: getCTCDevicename,
|
||||
CTC_READ_DISPATCH_COMMAND: {
|
||||
@ -381,79 +429,79 @@ export const operateEnum = {
|
||||
}
|
||||
};
|
||||
|
||||
// 调度台操作
|
||||
export const ctcZoneMap = {
|
||||
CTC_ZONE_SAVE_RUN_PLAN:{
|
||||
name:'添加行车计划',
|
||||
isList:true,
|
||||
objName:'planParam',
|
||||
params:[
|
||||
{
|
||||
code:'stationCode',
|
||||
name:'车站',
|
||||
function:getStationNameById
|
||||
},
|
||||
{
|
||||
code:'trainType',
|
||||
name:'列车类型',
|
||||
result:trainTypeList
|
||||
},
|
||||
{
|
||||
code:'runType',
|
||||
name:'运行类型',
|
||||
result:[
|
||||
{code:'FAST_PASSENGER_TRAIN', name:'快速旅客列车'}
|
||||
]
|
||||
},
|
||||
{
|
||||
code:'arriveTripNumber',
|
||||
name:'到达车次'
|
||||
},
|
||||
{
|
||||
code:'arriveDirectionCode',
|
||||
name:'接车口'
|
||||
},
|
||||
{
|
||||
code:'arriveSectionCode',
|
||||
name:'接车股道'
|
||||
},
|
||||
{
|
||||
code:'arrivePlanTime',
|
||||
name:'到达时间'
|
||||
},
|
||||
{
|
||||
code:'startRunPlan',
|
||||
name:' 始发'
|
||||
},
|
||||
{
|
||||
code:'transfinite',
|
||||
name:' 超限',
|
||||
result:transfiniteList
|
||||
}
|
||||
//
|
||||
]
|
||||
// planParam: Object
|
||||
// arriveDirectionCode: "Station32295_SF"
|
||||
// arrivePlanTime: "2022-07-27 17:12"
|
||||
// arriveSectionCode: "T97"
|
||||
// arriveTripNumber: "2056"
|
||||
// departDirectionCode: ""
|
||||
// departPlanTime: ""
|
||||
// departSectionCode: ""
|
||||
// departTripNumber: ""
|
||||
// electrical: true
|
||||
// endRunPlan: true
|
||||
// entryOutDiscordant: false
|
||||
// passenger: true
|
||||
// runType: "FAST_PASSENGER_TRAIN"
|
||||
// startRunPlan: false
|
||||
// stationCode: "Station32295"
|
||||
// trackDiscordant: true
|
||||
// trainType: "LOCAL_EXPRESS_PASSENGER_TRAIN"
|
||||
// transfinite: "NO"
|
||||
// // 调度台操作
|
||||
// export const ctcZoneMap = {
|
||||
// CTC_ZONE_SAVE_RUN_PLAN:{
|
||||
// name:'添加行车计划',
|
||||
// isList:true,
|
||||
// objName:'planParam',
|
||||
// params:[
|
||||
// {
|
||||
// code:'stationCode',
|
||||
// name:'车站',
|
||||
// function:getStationNameById
|
||||
// },
|
||||
// {
|
||||
// code:'trainType',
|
||||
// name:'列车类型',
|
||||
// result:trainTypeList
|
||||
// },
|
||||
// {
|
||||
// code:'runType',
|
||||
// name:'运行类型',
|
||||
// result:[
|
||||
// {code:'FAST_PASSENGER_TRAIN', name:'快速旅客列车'}
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// code:'arriveTripNumber',
|
||||
// name:'到达车次'
|
||||
// },
|
||||
// {
|
||||
// code:'arriveDirectionCode',
|
||||
// name:'接车口'
|
||||
// },
|
||||
// {
|
||||
// code:'arriveSectionCode',
|
||||
// name:'接车股道'
|
||||
// },
|
||||
// {
|
||||
// code:'arrivePlanTime',
|
||||
// name:'到达时间'
|
||||
// },
|
||||
// {
|
||||
// code:'startRunPlan',
|
||||
// name:' 始发'
|
||||
// },
|
||||
// {
|
||||
// code:'transfinite',
|
||||
// name:' 超限',
|
||||
// result:transfiniteList
|
||||
// }
|
||||
// //
|
||||
// ]
|
||||
// // planParam: Object
|
||||
// // arriveDirectionCode: "Station32295_SF"
|
||||
// // arrivePlanTime: "2022-07-27 17:12"
|
||||
// // arriveSectionCode: "T97"
|
||||
// // arriveTripNumber: "2056"
|
||||
// // departDirectionCode: ""
|
||||
// // departPlanTime: ""
|
||||
// // departSectionCode: ""
|
||||
// // departTripNumber: ""
|
||||
// // electrical: true
|
||||
// // endRunPlan: true
|
||||
// // entryOutDiscordant: false
|
||||
// // passenger: true
|
||||
// // runType: "FAST_PASSENGER_TRAIN"
|
||||
// // startRunPlan: false
|
||||
// // stationCode: "Station32295"
|
||||
// // trackDiscordant: true
|
||||
// // trainType: "LOCAL_EXPRESS_PASSENGER_TRAIN"
|
||||
// // transfinite: "NO"
|
||||
|
||||
}
|
||||
};
|
||||
// }
|
||||
// };
|
||||
|
||||
// 转换函数
|
||||
export function covertOperate(operationType, operationParamMap) {
|
||||
@ -484,72 +532,74 @@ export function covertOperate(operationType, operationParamMap) {
|
||||
});
|
||||
return tip;
|
||||
|
||||
} else if (operationType.includes('CTC_ZONE')) {
|
||||
let tip = '请点击运行图';
|
||||
// let operateName = null;
|
||||
// Object.keys(CMD).forEach(key => {
|
||||
// Object.values(CMD[key]).forEach(el => {
|
||||
// if (el.value == operationType) {
|
||||
// operateName = el;
|
||||
// return;
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// tip += ',执行【' + operateName.label + '】操作';
|
||||
let operationParam = operationParamMap;
|
||||
const paramInfo = ctcZoneMap[operationType];
|
||||
tip += ',执行【' + paramInfo.name + '】操作';
|
||||
if (paramInfo.objName) {
|
||||
operationParam = operationParamMap[paramInfo.objName];
|
||||
}
|
||||
if (paramInfo.isList) {
|
||||
tip += ',参数:【';
|
||||
paramInfo.params.forEach(param=>{
|
||||
if (param.result) {
|
||||
param.result.forEach(result=>{
|
||||
if (result.code == operationParam[param.code]) {
|
||||
tip += param.name + '为' + result.name + ',';
|
||||
}
|
||||
});
|
||||
} else if (param.function) {
|
||||
tip += param.name + '为' + covertFunction(param.function, operationParam[param.code]) + ',';
|
||||
} else {
|
||||
tip += param.name + '为' + operationParam[param.code] + ',';
|
||||
}
|
||||
});
|
||||
tip += '】';
|
||||
}
|
||||
debugger;
|
||||
// operationParamMap[]
|
||||
}
|
||||
// else if (operationType.includes('CTC_ZONE')) {
|
||||
// let tip = '请点击运行图';
|
||||
// // let operateName = null;
|
||||
// // Object.keys(CMD).forEach(key => {
|
||||
// // Object.values(CMD[key]).forEach(el => {
|
||||
// // if (el.value == operationType) {
|
||||
// // operateName = el;
|
||||
// // return;
|
||||
// // }
|
||||
// // });
|
||||
// // });
|
||||
// // tip += ',执行【' + operateName.label + '】操作';
|
||||
// let operationParam = operationParamMap;
|
||||
// const paramInfo = ctcZoneMap[operationType];
|
||||
// tip += ',执行【' + paramInfo.name + '】操作';
|
||||
// if (paramInfo.objName) {
|
||||
// operationParam = operationParamMap[paramInfo.objName];
|
||||
// }
|
||||
// if (paramInfo.isList) {
|
||||
// tip += ',参数:【';
|
||||
// paramInfo.params.forEach(param=>{
|
||||
// if (param.result) {
|
||||
// param.result.forEach(result=>{
|
||||
// if (result.code == operationParam[param.code]) {
|
||||
// tip += param.name + '为' + result.name + ',';
|
||||
// }
|
||||
// });
|
||||
// } else if (param.function) {
|
||||
// tip += param.name + '为' + covertFunction(param.function, operationParam[param.code]) + ',';
|
||||
// } else {
|
||||
// tip += param.name + '为' + operationParam[param.code] + ',';
|
||||
// }
|
||||
// });
|
||||
// tip += '】';
|
||||
// }
|
||||
// debugger;
|
||||
// // operationParamMap[]
|
||||
|
||||
// if (paramInfo) {
|
||||
// if (paramInfo.isDevice) {
|
||||
// if (paramInfo.isList) {
|
||||
// paramName += '【' + paramInfo.name + ' ';
|
||||
// const deviceList = operationParamMap[paramInfo.code];
|
||||
// deviceList.forEach((device, index)=>{
|
||||
// paramName += covertFunction(paramInfo.function, device);
|
||||
// if (index != deviceList.length - 1) {
|
||||
// paramName += ',';
|
||||
// }
|
||||
// });
|
||||
// paramName += '】';
|
||||
// } else {
|
||||
// // if (paramInfo) {
|
||||
// // if (paramInfo.isDevice) {
|
||||
// // if (paramInfo.isList) {
|
||||
// // paramName += '【' + paramInfo.name + ' ';
|
||||
// // const deviceList = operationParamMap[paramInfo.code];
|
||||
// // deviceList.forEach((device, index)=>{
|
||||
// // paramName += covertFunction(paramInfo.function, device);
|
||||
// // if (index != deviceList.length - 1) {
|
||||
// // paramName += ',';
|
||||
// // }
|
||||
// // });
|
||||
// // paramName += '】';
|
||||
// // } else {
|
||||
|
||||
// operationParamMap[]
|
||||
return tip;
|
||||
// ctcZoneMap[operationType]
|
||||
// 调度台添加行车计划
|
||||
// CTC_ZONE_SAVE_TRACK_SECTION:{value:'CTC_ZONE_SAVE_TRACK_SECTION', label: '调度台行车计划修改股道'},
|
||||
// CTC_ZONE_SAVE_TRIP_NUMBER:{value:'CTC_ZONE_SAVE_TRIP_NUMBER', label: '调度台行车计划修改车次'},
|
||||
// CTC_ZONE_SAVE_PLAN_TIME:{value:'CTC_ZONE_SAVE_PLAN_TIME', label: '调度台行车计划修改时间'},
|
||||
// CTC_ZONE_SAVE_DIRECTION:{value:'CTC_ZONE_SAVE_DIRECTION', label: '调度台行车计划修改出入口'},
|
||||
// CTC_ZONE_SAVE_STATION:{value:'CTC_ZONE_SAVE_STATION', label: '调度台行车计划修改到发车站'},
|
||||
// CTC_ZONE_SAVE_RUN_PLAN:{value:'CTC_ZONE_SAVE_RUN_PLAN', label: '调度台添加行车计划'},
|
||||
// CTC_ZONE_DELETE_RUN_PLAN:{value:'CTC_ZONE_DELETE_RUN_PLAN', label: '调度台删除行车计划'},
|
||||
// CTC_ZONE_RELEASE_ALL_RUN_PLAN:{value:'CTC_ZONE_RELEASE_ALL_RUN_PLAN', label: '调度台发布所有行车计划'},
|
||||
// CTC_ZONE_RELEASE_STATION_RUN_PLAN:{value:'CTC_ZONE_RELEASE_STATION_RUN_PLAN', label: '调度台发布车站行车计划'},
|
||||
} else {
|
||||
// // operationParamMap[]
|
||||
// return tip;
|
||||
// // ctcZoneMap[operationType]
|
||||
// // 调度台添加行车计划
|
||||
// // CTC_ZONE_SAVE_TRACK_SECTION:{value:'CTC_ZONE_SAVE_TRACK_SECTION', label: '调度台行车计划修改股道'},
|
||||
// // CTC_ZONE_SAVE_TRIP_NUMBER:{value:'CTC_ZONE_SAVE_TRIP_NUMBER', label: '调度台行车计划修改车次'},
|
||||
// // CTC_ZONE_SAVE_PLAN_TIME:{value:'CTC_ZONE_SAVE_PLAN_TIME', label: '调度台行车计划修改时间'},
|
||||
// // CTC_ZONE_SAVE_DIRECTION:{value:'CTC_ZONE_SAVE_DIRECTION', label: '调度台行车计划修改出入口'},
|
||||
// // CTC_ZONE_SAVE_STATION:{value:'CTC_ZONE_SAVE_STATION', label: '调度台行车计划修改到发车站'},
|
||||
// // CTC_ZONE_SAVE_RUN_PLAN:{value:'CTC_ZONE_SAVE_RUN_PLAN', label: '调度台添加行车计划'},
|
||||
// // CTC_ZONE_DELETE_RUN_PLAN:{value:'CTC_ZONE_DELETE_RUN_PLAN', label: '调度台删除行车计划'},
|
||||
// // CTC_ZONE_RELEASE_ALL_RUN_PLAN:{value:'CTC_ZONE_RELEASE_ALL_RUN_PLAN', label: '调度台发布所有行车计划'},
|
||||
// // CTC_ZONE_RELEASE_STATION_RUN_PLAN:{value:'CTC_ZONE_RELEASE_STATION_RUN_PLAN', label: '调度台发布车站行车计划'},
|
||||
// }
|
||||
else {
|
||||
let device = operationType.split('_')[0];
|
||||
if (device == 'CM') {
|
||||
device = 'ControlConvertMenu';
|
||||
@ -560,6 +610,9 @@ export function covertOperate(operationType, operationParamMap) {
|
||||
if (operationType.includes('ASSIST')) {
|
||||
device = 'Station';
|
||||
}
|
||||
if (operationType.includes('CTC_ZONE')) {
|
||||
device = 'CTCZONE';
|
||||
}
|
||||
const list = ['Train_Update_Type',
|
||||
'Train_Add_Train_Trace',
|
||||
'Train_Remove_Train_Trace',
|
||||
@ -628,7 +681,9 @@ function covertDeviceName(deviceInfo, deviceType) {
|
||||
|
||||
function getCTCDevicename(operationType) {
|
||||
let deviceName = '';
|
||||
if (operationType == 'CTC_QUERY_DISPATCH_COMMAND') {
|
||||
if (operationType.includes('CTC_ZONE')) {
|
||||
deviceName = '请点击运行图';
|
||||
} else if (operationType == 'CTC_QUERY_DISPATCH_COMMAND') {
|
||||
const roles = store.state.training.roles;
|
||||
if (roles == 'DISPATCHER') {
|
||||
deviceName = '调度命令';
|
||||
|
Loading…
Reference in New Issue
Block a user