航班明细航线全称显示
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<p><label>航线类别:</label>{{singleFlight.FLIN}}</p>
|
||||
<p><label>航班类别:</label>{{singleFlight.FLTY}}</p>
|
||||
<!-- <p><label>航班任务:</label>{{lines.}}</p> -->
|
||||
<p><label>航线:</label>{{singleFlight.ERUT}}</p>
|
||||
<p><label>航线:</label>{{singleFlight.ERUTCHN}}</p>
|
||||
<p><label>航班机型:</label>{{singleFlight.ACFT}}</p>
|
||||
<p><label>到达/出发:</label>{{singleFlight.MVIN}}</p>
|
||||
<p><label>飞机号:</label>{{singleFlight.RENO}}</p>
|
||||
|
||||
@@ -224,10 +224,12 @@ export class FlightsDataHandle {
|
||||
//航线处理
|
||||
try {
|
||||
let erutCodeArray = item['renderFlight']['ERUT'].split(' - ');
|
||||
let erutChnArray = []
|
||||
let erutChnArray = [];
|
||||
let erutAirportArray = []
|
||||
for (let i = 0; i < erutCodeArray.length; i++) {
|
||||
let airportIndex = airports.findIndex(val => val.airportCodeIata === erutCodeArray[i]);
|
||||
if (airportIndex > -1) {
|
||||
erutAirportArray.push(airports[airportIndex].airportNameChn);
|
||||
if (airports[airportIndex].briefNameChn) {
|
||||
erutChnArray.push(airports[airportIndex].briefNameChn);
|
||||
} else {
|
||||
@@ -237,6 +239,7 @@ export class FlightsDataHandle {
|
||||
erutChnArray.push(erutCodeArray[i]);
|
||||
}
|
||||
}
|
||||
item['renderFlight']['ERUTCHN'] = erutAirportArray.join(' - ');
|
||||
item['renderFlight']['ERUT'] = erutChnArray.join(' - ');
|
||||
} catch (error) {
|
||||
console.log("基础数据航线错误,处理失败,请检查数据 -- 纯到港或纯离港")
|
||||
@@ -264,10 +267,12 @@ export class FlightsDataHandle {
|
||||
//航线处理
|
||||
try {
|
||||
let erutLinkCodeArray = item['renderFlight']['ERUT'].split(' - ');
|
||||
let erutLinkChnArray = []
|
||||
let erutLinkChnArray = [];
|
||||
let erutLinkAirportArray = [];
|
||||
for (let i = 0; i < erutLinkCodeArray.length; i++) {
|
||||
let airportIndex = airports.findIndex(val => val.airportCodeIata === erutLinkCodeArray[i]);
|
||||
if (airportIndex > -1) {
|
||||
erutLinkAirportArray.push(airports[airportIndex].airportNameChn);
|
||||
if (airports[airportIndex].briefNameChn) {
|
||||
erutLinkChnArray.push(airports[airportIndex].briefNameChn);
|
||||
} else {
|
||||
@@ -278,6 +283,7 @@ export class FlightsDataHandle {
|
||||
}
|
||||
|
||||
}
|
||||
item['renderFlight']['ERUTCHN'] = erutLinkAirportArray.join(' - ');
|
||||
item['renderFlight']['ERUT'] = erutLinkChnArray.join(' - ');
|
||||
} catch (error) {
|
||||
console.log("基础数据航线错误,处理失败,请检查数据 -- 链接航班")
|
||||
@@ -316,11 +322,13 @@ export class FlightsDataHandle {
|
||||
//航线处理
|
||||
try {
|
||||
let erutPreCodeArray = item['renderPreFlight']['ERUT'].split(' - ');
|
||||
let erutPreChnArray = []
|
||||
let erutPreChnArray = [];
|
||||
let erutPreAirportArray = [];
|
||||
for (let i = 0; i < erutPreCodeArray.length; i++) {
|
||||
try {
|
||||
let airportIndex = airports.findIndex(val => val.airportCodeIata === erutPreCodeArray[i]);
|
||||
if (airportIndex > -1) {
|
||||
erutPreAirportArray.push(airports[airportIndex].airportNameChn);
|
||||
if (airports[airportIndex].briefNameChn) {
|
||||
erutPreChnArray.push(airports[airportIndex].briefNameChn);
|
||||
} else {
|
||||
@@ -333,6 +341,7 @@ export class FlightsDataHandle {
|
||||
erutPreChnArray.push(erutPreCodeArray[i]);
|
||||
}
|
||||
}
|
||||
item['renderPreFlight']['ERUTCHN'] = erutPreAirportArray.join(' - ');
|
||||
item['renderPreFlight']['ERUT'] = erutPreChnArray.join(' - ');
|
||||
} catch (error) {
|
||||
console.log("基础数据航线错误,处理失败,请检查数据 -- 链接航班-到港航班")
|
||||
@@ -361,11 +370,13 @@ export class FlightsDataHandle {
|
||||
//航线处理
|
||||
try {
|
||||
let erutReaCodeArray = item['renderReaFlight']['ERUT'].split(' - ');
|
||||
let erutReaChnArray = []
|
||||
let erutReaChnArray = [];
|
||||
let erutReaAirportArray = [];
|
||||
for (let i = 0; i < erutReaCodeArray.length; i++) {
|
||||
try {
|
||||
let airportIndex = airports.findIndex(val => val.airportCodeIata === erutReaCodeArray[i]);
|
||||
if (airportIndex > -1) {
|
||||
erutReaAirportArray.push(airports[airportIndex].airportNameChn);
|
||||
if (airports[airportIndex].briefNameChn) {
|
||||
erutReaChnArray.push(airports[airportIndex].briefNameChn);
|
||||
} else {
|
||||
@@ -378,6 +389,7 @@ export class FlightsDataHandle {
|
||||
erutReaChnArray.push(erutReaCodeArray[i]);
|
||||
}
|
||||
}
|
||||
item['renderReaFlight']['ERUTCHN'] = erutReaAirportArray.join(' - ');
|
||||
item['renderReaFlight']['ERUT'] = erutReaChnArray.join(' - ');
|
||||
} catch (error) {
|
||||
console.log("基础数据航线错误,处理失败,请检查数据 -- 链接航班-离港航班")
|
||||
|
||||
@@ -1143,10 +1143,12 @@ onmessage = function (dynamicData) {
|
||||
//航线处理
|
||||
let erutCodeArray = item['renderFlight']['ERUT'].split(' - ');
|
||||
let erutChnArray = []
|
||||
let erutAirportArray = []
|
||||
for (let i = 0; i < erutCodeArray.length; i++) {
|
||||
try {
|
||||
let airportIndex = airports.findIndex(val => val.airportCodeIata === erutCodeArray[i]);
|
||||
if (airportIndex > -1) {
|
||||
erutAirportArray.push(airports[airportIndex].airportNameChn);
|
||||
if (airports[airportIndex].briefNameChn) {
|
||||
erutChnArray.push(airports[airportIndex].briefNameChn);
|
||||
} else {
|
||||
@@ -1159,6 +1161,7 @@ onmessage = function (dynamicData) {
|
||||
erutChnArray.push(erutCodeArray[i]);
|
||||
}
|
||||
}
|
||||
item['renderFlight']['ERUTCHN'] = erutAirportArray.join(' - ');
|
||||
item['renderFlight']['ERUT'] = erutChnArray.join(' - ');
|
||||
//航空公司处理
|
||||
let airlineIndex = airlines.findIndex(val => val.airlineCode === item['renderFlight']['ALCD']);
|
||||
@@ -1171,10 +1174,12 @@ onmessage = function (dynamicData) {
|
||||
//航线处理
|
||||
let erutLinkCodeArray = item['renderFlight']['ERUT'].split(' - ');
|
||||
let erutLinkChnArray = []
|
||||
let erutLinkAirportArray = [];
|
||||
for (let i = 0; i < erutLinkCodeArray.length; i++) {
|
||||
try {
|
||||
let airportIndex = airports.findIndex(val => val.airportCodeIata === erutLinkCodeArray[i]);
|
||||
if (airportIndex > -1) {
|
||||
erutLinkAirportArray.push(airports[airportIndex].airportNameChn);
|
||||
if (airports[airportIndex].briefNameChn) {
|
||||
erutLinkChnArray.push(airports[airportIndex].briefNameChn);
|
||||
} else {
|
||||
@@ -1187,6 +1192,7 @@ onmessage = function (dynamicData) {
|
||||
erutLinkChnArray.push(erutLinkCodeArray[i]);
|
||||
}
|
||||
}
|
||||
item['renderFlight']['ERUTCHN'] = erutLinkAirportArray.join(' - ');
|
||||
item['renderFlight']['ERUT'] = erutLinkChnArray.join(' - ');
|
||||
//航空公司处理
|
||||
let airlineLinkIndex = airlines.findIndex(val => val.airlineCode === item['renderFlight']['ALCD']);
|
||||
@@ -1210,10 +1216,12 @@ onmessage = function (dynamicData) {
|
||||
//航线处理
|
||||
let erutPreCodeArray = item['renderPreFlight']['ERUT'].split(' - ');
|
||||
let erutPreChnArray = []
|
||||
let erutPreAirportArray = [];
|
||||
for (let i = 0; i < erutPreCodeArray.length; i++) {
|
||||
try {
|
||||
let airportIndex = airports.findIndex(val => val.airportCodeIata === erutPreCodeArray[i]);
|
||||
if (airportIndex > -1) {
|
||||
erutPreAirportArray.push(airports[airportIndex].airportNameChn);
|
||||
if (airports[airportIndex].briefNameChn) {
|
||||
erutPreChnArray.push(airports[airportIndex].briefNameChn);
|
||||
} else {
|
||||
@@ -1226,6 +1234,7 @@ onmessage = function (dynamicData) {
|
||||
erutPreChnArray.push(erutPreCodeArray[i]);
|
||||
}
|
||||
}
|
||||
item['renderPreFlight']['ERUTCHN'] = erutPreAirportArray.join(' - ');
|
||||
item['renderPreFlight']['ERUT'] = erutPreChnArray.join(' - ');
|
||||
//航空公司处理
|
||||
let airlinePreIndex = airlines.findIndex(val => val.airlineCode === item['renderPreFlight']['ALCD']);
|
||||
@@ -1238,11 +1247,13 @@ onmessage = function (dynamicData) {
|
||||
|
||||
//航线处理
|
||||
let erutReaCodeArray = item['renderReaFlight']['ERUT'].split(' - ');
|
||||
let erutReaChnArray = []
|
||||
let erutReaChnArray = [];
|
||||
let erutReaAirportArray = [];
|
||||
for (let i = 0; i < erutReaCodeArray.length; i++) {
|
||||
try {
|
||||
let airportIndex = airports.findIndex(val => val.airportCodeIata === erutReaCodeArray[i]);
|
||||
if (airportIndex > -1) {
|
||||
erutReaAirportArray.push(airports[airportIndex].airportNameChn);
|
||||
if (airports[airportIndex].briefNameChn) {
|
||||
erutReaChnArray.push(airports[airportIndex].briefNameChn);
|
||||
} else {
|
||||
@@ -1255,6 +1266,7 @@ onmessage = function (dynamicData) {
|
||||
erutReaChnArray.push(erutReaCodeArray[i]);
|
||||
}
|
||||
}
|
||||
item['renderReaFlight']['ERUTCHN'] = erutReaAirportArray.join(' - ');
|
||||
item['renderReaFlight']['ERUT'] = erutReaChnArray.join(' - ');
|
||||
//航空公司处理
|
||||
let airlineReaIndex = airlines.findIndex(val => val.airlineCode === item['renderReaFlight']['ALCD']);
|
||||
|
||||
Reference in New Issue
Block a user