航班信息显示转换
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* 登机桥靠桥时间显示转换
|
||||
*/
|
||||
import timeFormatter from './time-formatter';
|
||||
|
||||
export default function (flight) {
|
||||
if (flight['ABTM']) {
|
||||
if (Array.isArray(flight['ABTM']) && flight['ABTM'].length > 0) {
|
||||
for (let i = 0; i < flight['ABTM'].length; i++) {
|
||||
if (flight['ABTM'][i]['ABOP'] === 'A') {
|
||||
return timeFormatter(flight['ABTM'][i]['AOTM']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (flight['ABTM']['ABOP'] === 'A') {
|
||||
return timeFormatter(flight['ABTM']['AOTM']);
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user