新增到港离港共享航班字段

This commit is contained in:
zhouyuejun
2019-01-21 15:13:53 +08:00
parent f536fc427c
commit ae0b36c399
5 changed files with 117 additions and 5 deletions
+36
View File
@@ -1,6 +1,42 @@
import timeFormatter from './time-formatter';
import dateWithNotimeFormatter from './date-with-notime-formatter';
export class TransferRenderHandle {
public arsfFormatter(flight){
if(flight['MVIN'] === 'A'){
if (Array.isArray(flight['MAFL']) && flight['MAFL'].length > 0) {
let arsf = [];
for (let i = 0; i < flight['MAFL'].length; i++) {
arsf.push(flight['MAFL'][i]['FLNO']);
}
let set = new Set(arsf);
return Array.from(set).join(',');
} else if (Object.prototype.toString.call(flight['MAFL']) === '[object Object]') {
return flight['MAFL']['FLNO'];
} else {
return '';
}
}else{
return '';
}
}
public desfFormatter(flight){
if(flight['MVIN'] === 'D'){
if (Array.isArray(flight['MAFL']) && flight['MAFL'].length > 0) {
let desf = [];
for (let i = 0; i < flight['MAFL'].length; i++) {
desf.push(flight['MAFL'][i]['FLNO']);
}
let set = new Set(desf);
return Array.from(set).join(',');
} else if (Object.prototype.toString.call(flight['MAFL']) === '[object Object]') {
return flight['MAFL']['FLNO'];
} else {
return '';
}
}else{
return '';
}
}
public renoFormatter(flight) {
if (flight['RENO']) {
if (flight['LRENO']) {