19 lines
505 B
TypeScript
19 lines
505 B
TypeScript
/**
|
|||
|
|
* 值机柜台显示转换
|
||
|
|
*/
|
||
|
|
export default function(flight){
|
||
|
|
if(flight['CKDT']){
|
||
|
|
if(Array.isArray(flight['CKDT'])&&flight['CKDT'].length>0){
|
||
|
|
let chkc = [];
|
||
|
|
for (let i = 0; i < flight['CKDT'].length; i++) {
|
||
|
|
chkc.push(flight['CKDT'][i]['CHKC']);
|
||
|
|
}
|
||
|
|
let set = new Set(chkc);
|
||
|
|
return Array.from(set).join(',');
|
||
|
|
}else{
|
||
|
|
return flight['CKDT']['CHKC']
|
||
|
|
}
|
||
|
|
}else{
|
||
|
|
return '';
|
||
|
|
}
|
||
|
|
}
|