This commit is contained in:
fan 2022-08-04 16:05:10 +08:00
commit 5344ea5788
2 changed files with 57 additions and 3 deletions

View File

@ -247,6 +247,7 @@ export default {
},
mounted() {
this.group = this.$route.query.group;
// debugger;
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
if (this.isCtc) {

View File

@ -545,7 +545,20 @@ export const operateEnum = {
]
},
RAIL_FILL_IN_TICKET:{
name:'填写票据'
name:'填写票据',
isList:true,
params:[
{
code:'stationCode',
name:'车站为',
function:getStationNameById
},
{
code:'ticket',
name:'票据',
function:getTicketInfoById
}
]
},
RAIL_QUERY_TICKET:{
name:'查询票据',
@ -556,10 +569,24 @@ export const operateEnum = {
name:'车站为',
function:getStationNameById
}
// const params = { type: this.attachmentType };
]
},
RAIL_GIVE_TICKET_TO:{
name:'给出票据'
name:'给出票据',
isList:true,
params:[
{
code:'ticketId',
name:'票据id'
},
{
code:'memberId',
name:'成员id'
}
]
// ticketId
// memberId
}
// CMD_RAIL_FILL_IN_TICKET: {value: 'RAIL_FILL_IN_TICKET', label: '填写票据'},
// CMD_RAIL_QUERY_TICKET: {value: 'RAIL_QUERY_TICKET', label: '查询票据'},
@ -646,7 +673,7 @@ export const operateEnum = {
// 转换函数
export function covertOperate(operationType, operationParamMap) {
debugger;
// debugger;
if (operationType == 'Set_Fault' || operationType == 'Cancel_Fault') {
let deviceName = '';
const device = store.getters['map/getDeviceByCode'](operationParamMap.code) || {};
@ -997,6 +1024,32 @@ function getDeviceNameById(deviceCode) {
return device.name;
}
function getTicketInfoById(ticket) {
const ticketTypeMap = {'RAIL_TICKET':'路票', 'GREEN_LICENCE':'绿色许可证', 'RED_LICENCE':'红色许可证'};
let info = '';
if (ticket.type == 'GREEN_LICENCE') {
info = ',编号为' + ticket.number +
'在' + ticket.reason + '的情况下,准许第' + ticket.tripNumber + '次列车由' + ticket.line + '线上发车。' +
',站名印为' + ticket.stationSeal + ',签名为' + ticket.signature +
',日期为' + ticket.year + '年' + ticket.moon + '月' + ticket.day + '日';
} else if (ticket.type == 'RED_LICENCE') {
info = ',编号为' + ticket.number +
',现在一切电话中断,准许第' + ticket.licenseTripNumber + '次列车自' + ticket.licenseStation +
'站至' + ticket.licenseNextStation + '站,本列车前于' + ticket.licenseHour + '时' + ticket.licenseMinute +
'分发出的第' + ticket.licenseTripNumber2 + '次列车,邻站到达通知' + ticket.licenseReceived ? '已' : '未' + '收到' +
'。 通知书1.' + '第' + ticket.noticeTripNumber + '次列车到达你站后,准接你站发出的列车。' +
'2.于' + ticket.noticeHour1 + '时' + ticket.noticeMinute1 + '分发出第' + ticket.noticeTripNumber1 + '次列车,并于' + ticket.noticeHour2 +
'时' + ticket.noticeMinute2 + '分再发出第' + ticket.noticeTripNumber2 + '次列车。' +
',站名印为' + ticket.stationSeal + ',签名为' + ticket.signature +
',日期为' + ticket.year + '年' + ticket.moon + '月' + ticket.day + '日';
} else if (ticket.type == 'RAIL_TICKET') {
info = ',编号为' + ticket.number + ',车次为' + ticket.tripNumber + '' + ticket.station + '到' + ticket.nextStation +
',站名印为' + ticket.stationSeal + ',编号为' + ticket.no;
// deputy: false
}
return '类型为' + ticketTypeMap[ticket.type] + info;
}
function getRecordByLine(line) {
// '{"stationCode":"Station58852","line":{"moonDay":"","hourMinute":"","result":"","noticeTime":{"moonDay":"","hourMinute":"","info":""},"arriveTime":{"moonDay":"","hourMinute":"","info":""},"endTime":{"moonDay":"","hourMinute":"","info":""}}}'
return ',结果为' + line.result;