Files
airport-chengdu-web/src/app/utils/chut-formatter.ts
T

19 lines
494 B
TypeScript
Raw Normal View History

2018-11-21 18:55:57 +08:00
/**
* 行李传送带号显示转换
*/
export default function (flight) {
if(flight['CHDT']){
if(Array.isArray(flight['CHDT'])&&flight['CHDT'].length>0){
let chdt = [];
for (let i = 0; i < flight['CHDT'].length; i++) {
chdt.push(flight['CHDT'][i]['CHUT']);
}
let set = new Set(chdt);
return Array.from(set).join(',');
}else{
2018-12-13 18:15:41 +08:00
return '';
2018-11-21 18:55:57 +08:00
}
}else{
return '';
}
}