Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
# Conflicts: # src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js
This commit is contained in:
commit
ccf640c492
@ -205,7 +205,8 @@ export default {
|
||||
this.currentInfo = obj;
|
||||
if (!this.getSignInfo(obj.receiverInfos).receivedTime) {
|
||||
const data = {
|
||||
commandId: obj.id
|
||||
commandId: obj.id,
|
||||
title: obj.title
|
||||
};
|
||||
sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
|
||||
console.log(res, '---res');
|
||||
@ -241,7 +242,7 @@ export default {
|
||||
},
|
||||
signCmd(status) {
|
||||
if (!this.commandId) { return; }
|
||||
const signInfo = { commandId: this.commandId, signedBy: this.getActiveUser.memberId, signedStatus: status };
|
||||
const signInfo = { commandId: this.commandId, signedBy: this.getActiveUser.memberId, signedStatus: status, title: this.currentInfo.title };
|
||||
const data = {
|
||||
signInfo: signInfo
|
||||
};
|
||||
|
@ -223,7 +223,8 @@ export default {
|
||||
hasReadCmd() {
|
||||
if (!this.commandId) { return; }
|
||||
const data = {
|
||||
commandId: this.commandId
|
||||
commandId: this.commandId,
|
||||
title: this.signedData.title
|
||||
};
|
||||
sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
|
||||
console.log(res, '---res');
|
||||
@ -233,7 +234,7 @@ export default {
|
||||
},
|
||||
signCmd(status) {
|
||||
if (!this.commandId) { return; }
|
||||
const signInfo = { commandId: this.commandId, signedBy: this.signedId, signedStatus: status };
|
||||
const signInfo = { commandId: this.commandId, signedBy: this.signedId, signedStatus: status, title: this.signedData.title };
|
||||
const data = {
|
||||
signInfo: signInfo
|
||||
};
|
||||
|
@ -272,6 +272,112 @@ export const operateEnum = {
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
CTC: {
|
||||
function: getCTCDevicename,
|
||||
CTC_READ_DISPATCH_COMMAND: {
|
||||
isList:true,
|
||||
name:'读取调度命令',
|
||||
params:[
|
||||
{
|
||||
code:'title',
|
||||
name:'命令标题'
|
||||
}
|
||||
]
|
||||
},
|
||||
CTC_SIGN_DISPATCH_COMMAND: {
|
||||
code:'signInfo',
|
||||
name:'签收调度命令',
|
||||
isList:true,
|
||||
params:[
|
||||
{
|
||||
code:'title',
|
||||
name:'命令标题'
|
||||
},
|
||||
{
|
||||
code:'signedBy',
|
||||
name:'签收人',
|
||||
function: getUserNameById
|
||||
},
|
||||
{
|
||||
code:'signedStatus',
|
||||
name:'签收状态',
|
||||
result:[
|
||||
{data:'SIGNED', name:'签收', judge:'='},
|
||||
{data:'REFUSE', name:'拒签', judge:'='}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
CTC_SEND_DISPATCH_COMMAND: {
|
||||
code:'command',
|
||||
name:'发送调度命令',
|
||||
isList:true,
|
||||
params:[
|
||||
{
|
||||
code:'title',
|
||||
name:'命令标题'
|
||||
},
|
||||
{
|
||||
code:'number',
|
||||
name:'命令号'
|
||||
},
|
||||
{
|
||||
code:'transferNumber',
|
||||
name:'中转识别号'
|
||||
},
|
||||
{
|
||||
code:'sendTime',
|
||||
name:'发令时间'
|
||||
},
|
||||
{
|
||||
code:'senderName',
|
||||
name:'发令人'
|
||||
},
|
||||
{
|
||||
code:'companyOfSender',
|
||||
name:'发令单位'
|
||||
},
|
||||
{
|
||||
code:'authorizationTime',
|
||||
name:'授权时间'
|
||||
},
|
||||
{
|
||||
code:'authorizationStatus',
|
||||
name:'授权状态'
|
||||
},
|
||||
{
|
||||
code:'finalizationTime',
|
||||
name:'定稿时间'
|
||||
},
|
||||
{
|
||||
code:'reviewerId',
|
||||
name:'审核人',
|
||||
function: getUserNameById
|
||||
},
|
||||
{
|
||||
code:'author',
|
||||
name:'拟令人',
|
||||
function: getUserNameById
|
||||
},
|
||||
{
|
||||
code:'type',
|
||||
name:'命令分类',
|
||||
result:[
|
||||
{data:'NORMAL', name:'正常调度命令', judge:'='}
|
||||
]
|
||||
},
|
||||
{
|
||||
code:'content',
|
||||
name:'命令正文'
|
||||
},
|
||||
{
|
||||
code:'receiverIds',
|
||||
name:'受令单位',
|
||||
function: getStationNamList
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -349,50 +455,6 @@ export const ctcZoneMap = {
|
||||
}
|
||||
};
|
||||
|
||||
export const ctcOperateEnum = {
|
||||
CTC_READ_DISPATCH_COMMAND: {
|
||||
isList:true,
|
||||
name:'读取调度命令',
|
||||
params:[
|
||||
{
|
||||
code:'commandId',
|
||||
name:'命令号'
|
||||
}
|
||||
]
|
||||
},
|
||||
CTC_SIGN_DISPATCH_COMMAND: {
|
||||
code:'signInfo',
|
||||
name:'签收调度命令',
|
||||
isList:true,
|
||||
params:[
|
||||
{
|
||||
code:'commandId',
|
||||
name:'命令号'
|
||||
},
|
||||
{
|
||||
code:'signedStatus',
|
||||
name:'签收状态',
|
||||
result:[
|
||||
{data:'SIGNED', name:'签收', judge:'='},
|
||||
{data:'REFUSE', name:'拒签', judge:'='}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
CTC_SEND_DISPATCH_COMMAND: {
|
||||
code:'signInfo',
|
||||
name:'发送调度命令',
|
||||
isList:true,
|
||||
params:[
|
||||
{
|
||||
code:'receiverIds',
|
||||
name:'受令单位',
|
||||
function: getStationNamList
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
// 转换函数
|
||||
export function covertOperate(operationType, operationParamMap) {
|
||||
if (operationType == 'Set_Fault' || operationType == 'Cancel_Fault') {
|
||||
@ -487,43 +549,6 @@ export function covertOperate(operationType, operationParamMap) {
|
||||
// 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 if (operationType.includes('CTC')) {
|
||||
let tip = '请打开';
|
||||
console.log(operationType, operationParamMap, store.state.training.roles, '---operationType---operationParamMap-');
|
||||
if (operationType == 'CTC_QUERY_DISPATCH_COMMAND') {
|
||||
const roles = store.state.training.roles;
|
||||
if (roles == 'DISPATCHER') {
|
||||
tip = '请打开调度命令';
|
||||
} else {
|
||||
tip = '请打开车务终端';
|
||||
}
|
||||
}
|
||||
if (operationType == 'CTC_READ_DISPATCH_COMMAND') {
|
||||
tip = '请查看详细的调度命令';
|
||||
}
|
||||
if (operationType == 'CTC_SIGN_DISPATCH_COMMAND') {
|
||||
tip = '请签收调度命令';
|
||||
}
|
||||
if (operationType == 'CTC_SEND_DISPATCH_COMMAND') {
|
||||
tip = '请打开并下达调度命令';
|
||||
}
|
||||
// ctcOperateEnum
|
||||
// 车务终端,找到
|
||||
return tip;
|
||||
// 总辅助按钮
|
||||
// CTC_ASSIST_PRESS_MAIN_ASSIST
|
||||
// labelEnum:model.labelEnum,
|
||||
// stationCode:model.stationCode,
|
||||
// pressDown:model.pressDown ? 0 : 1 // 1按下、0弹起
|
||||
// CTC_ASSIST_PRESS_RECEIVE_ASSIST
|
||||
// labelEnum;
|
||||
// stationCode;
|
||||
// CTC_ASSIST_PRESS_DELIVER_ASSIST
|
||||
// CTC_ASSIST_PRESS_BLOCK
|
||||
// CTC_ASSIST_PRESS_RESTORE
|
||||
// CTC_ASSIST_PRESS_ACCIDENT
|
||||
// CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION
|
||||
|
||||
} else {
|
||||
let device = operationType.split('_')[0];
|
||||
if (device == 'CM') {
|
||||
@ -601,6 +626,25 @@ function covertDeviceName(deviceInfo, deviceType) {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
function getCTCDevicename(operationType) {
|
||||
let deviceName = '';
|
||||
if (operationType == 'CTC_QUERY_DISPATCH_COMMAND') {
|
||||
const roles = store.state.training.roles;
|
||||
if (roles == 'DISPATCHER') {
|
||||
deviceName = '调度命令';
|
||||
} else {
|
||||
deviceName = '车务终端';
|
||||
}
|
||||
} else if (operationType == 'CTC_READ_DISPATCH_COMMAND') {
|
||||
deviceName = '车务终端 --> 调度命令';
|
||||
} else if (operationType == 'CTC_SIGN_DISPATCH_COMMAND') {
|
||||
deviceName = '车务终端 --> 调度命令';
|
||||
} else if (operationType == 'CTC_SEND_DISPATCH_COMMAND') {
|
||||
deviceName = '调度命令';
|
||||
}
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
function covertOperation(deviceType, operationParamMap, operationType) {
|
||||
let deviceName = '【';
|
||||
let paramName = '';
|
||||
@ -623,10 +667,12 @@ function covertOperation(deviceType, operationParamMap, operationType) {
|
||||
// } else {
|
||||
|
||||
// }
|
||||
deviceName += '】';
|
||||
} else if (operateEnum[deviceType].type) {
|
||||
deviceName += operateEnum[deviceType].type + '】';
|
||||
deviceName += operateEnum[deviceType].type;
|
||||
} else if (operateEnum[deviceType].function) {
|
||||
deviceName += covertFunction(operateEnum[deviceType].function, operationType);
|
||||
}
|
||||
deviceName += '】';
|
||||
const paramInfo = operateEnum[deviceType][operationType];
|
||||
if (paramInfo) {
|
||||
if (paramInfo.isDevice) {
|
||||
@ -651,7 +697,11 @@ function covertOperation(deviceType, operationParamMap, operationType) {
|
||||
paramName += '【';
|
||||
params.forEach((param, index)=>{
|
||||
paramName += ' ' + param.name;
|
||||
const data = operationParamMap[param.code];
|
||||
let opMap = operationParamMap;
|
||||
if (paramInfo.code) {
|
||||
opMap = operationParamMap[paramInfo.code];
|
||||
}
|
||||
const data = opMap[param.code];
|
||||
if (param.result) {
|
||||
param.result.forEach(result=>{
|
||||
switch (result.judge) {
|
||||
@ -700,6 +750,18 @@ function covertFunction(func, device) {
|
||||
return func(device);
|
||||
}
|
||||
|
||||
function getUserNameById(id) {
|
||||
let name = '';
|
||||
const userList = store.state.training.simulationUserList;
|
||||
const user = userList.find(item=>{
|
||||
return item.memberId == id;
|
||||
});
|
||||
if (user) {
|
||||
name = user.nickName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
function getRouteNameById(routeId) {
|
||||
const routeList = store.state.map.routeList;
|
||||
const route = routeList.find(route=>{
|
||||
|
Loading…
Reference in New Issue
Block a user