前站起飞时间显示规则修改

This commit is contained in:
zhouyuejun
2019-01-22 11:00:48 +08:00
parent 1147b3216c
commit 021db995d8
3 changed files with 115 additions and 13 deletions
+34
View File
@@ -392,8 +392,42 @@ export class TransferRenderHandle {
}
}
public padtFormatter(flight) {
if (flight['MVIN'] === 'A') {
if (flight['PADT']) {
if (Array.isArray(flight['ROUT']) && flight['ROUT'].length > 0) {
let lastRout = flight['ROUT'][flight['ROUT'].length - 1];
if (lastRout['SCDT']){
return timeFormatter(flight['PADT']) + '(' + timeFormatter(lastRout['SCDT']) + ')';
}else{
return timeFormatter(flight['PADT']);
}
} else if (Object.prototype.toString.call(flight['ROUT']) === '[object Object]') {
if (flight['ROUT']['SCDT']){
return timeFormatter(flight['PADT']) + '(' + timeFormatter(flight['ROUT']['SCDT']) + ')';
}else{
return timeFormatter(flight['PADT']);
}
}else{
return timeFormatter(flight['PADT']);
}
} else {
if (Array.isArray(flight['ROUT']) && flight['ROUT'].length > 0) {
let lastRout = flight['ROUT'][flight['ROUT'].length - 1];
if (lastRout['SCDT']){
return '(' + timeFormatter(lastRout['SCDT']) + ')';
}else{
return '';
}
} else if (Object.prototype.toString.call(flight['ROUT']) === '[object Object]') {
if (flight['ROUT']['SCDT']){
return '(' + timeFormatter(flight['ROUT']['SCDT']) + ')';
}else{
return '';
}
}else{
return '';
}
}
}else{
return '';
}
+34
View File
@@ -568,8 +568,42 @@ export default function (dynamicData?) {
}
},
'PADT': function padtFormatter(flight) {
if (flight['MVIN'] === 'A') {
if (flight['PADT']) {
if (Array.isArray(flight['ROUT']) && flight['ROUT'].length > 0) {
let lastRout = flight['ROUT'][flight['ROUT'].length - 1];
if (lastRout['SCDT']) {
return timeFormatter(flight['PADT']) + '(' + timeFormatter(lastRout['SCDT']) + ')';
} else {
return timeFormatter(flight['PADT']);
}
} else if (Object.prototype.toString.call(flight['ROUT']) === '[object Object]') {
if (flight['ROUT']['SCDT']) {
return timeFormatter(flight['PADT']) + '(' + timeFormatter(flight['ROUT']['SCDT']) + ')';
} else {
return timeFormatter(flight['PADT']);
}
} else {
return timeFormatter(flight['PADT']);
}
} else {
if (Array.isArray(flight['ROUT']) && flight['ROUT'].length > 0) {
let lastRout = flight['ROUT'][flight['ROUT'].length - 1];
if (lastRout['SCDT']) {
return '(' + timeFormatter(lastRout['SCDT']) + ')';
} else {
return '';
}
} else if (Object.prototype.toString.call(flight['ROUT']) === '[object Object]') {
if (flight['ROUT']['SCDT']) {
return '(' + timeFormatter(flight['ROUT']['SCDT']) + ')';
} else {
return '';
}
} else {
return '';
}
}
} else {
return '';
}
+34
View File
@@ -569,8 +569,42 @@ onmessage = function (dynamicData) {
}
},
'PADT': function padtFormatter(flight) {
if (flight['MVIN'] === 'A') {
if (flight['PADT']) {
if (Array.isArray(flight['ROUT']) && flight['ROUT'].length > 0) {
let lastRout = flight['ROUT'][flight['ROUT'].length - 1];
if (lastRout['SCDT']) {
return timeFormatter(flight['PADT']) + '(' + timeFormatter(lastRout['SCDT']) + ')';
} else {
return timeFormatter(flight['PADT']);
}
} else if (Object.prototype.toString.call(flight['ROUT']) === '[object Object]') {
if (flight['ROUT']['SCDT']) {
return timeFormatter(flight['PADT']) + '(' + timeFormatter(flight['ROUT']['SCDT']) + ')';
} else {
return timeFormatter(flight['PADT']);
}
} else {
return timeFormatter(flight['PADT']);
}
} else {
if (Array.isArray(flight['ROUT']) && flight['ROUT'].length > 0) {
let lastRout = flight['ROUT'][flight['ROUT'].length - 1];
if (lastRout['SCDT']) {
return '(' + timeFormatter(lastRout['SCDT']) + ')';
} else {
return '';
}
} else if (Object.prototype.toString.call(flight['ROUT']) === '[object Object]') {
if (flight['ROUT']['SCDT']) {
return '(' + timeFormatter(flight['ROUT']['SCDT']) + ')';
} else {
return '';
}
} else {
return '';
}
}
} else {
return '';
}