From ea742a9d36d08334cfdda9f410bede27bbd38d37 Mon Sep 17 00:00:00 2001 From: zhouyuejun <505127606@qq.com> Date: Sat, 15 Dec 2018 10:30:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=9C=E8=89=B2=E9=85=8D=E7=BD=AE=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/basic-data-service.ts | 7 + src/app/pages/main/main.component.html | 13 +- src/app/pages/main/main.component.ts | 134 ++++++------- src/app/pages/main/utils/cell-color-handle.ts | 185 ++++++++++++++++++ .../pages/main/utils/flights-data-handle.ts | 49 +++-- 5 files changed, 288 insertions(+), 100 deletions(-) create mode 100644 src/app/pages/main/utils/cell-color-handle.ts diff --git a/src/app/pages/basic-data-service.ts b/src/app/pages/basic-data-service.ts index 75593f6..757278c 100644 --- a/src/app/pages/basic-data-service.ts +++ b/src/app/pages/basic-data-service.ts @@ -4,6 +4,8 @@ import { Subject, forkJoin, zip } from 'rxjs' @Injectable() export class BasicDataService { + public flightTypes:Array; + public flightTypes_subject = new Subject(); public flightStatus:Array; public flightStatus_subject = new Subject(); public checkin_group: Array; @@ -46,6 +48,7 @@ export class BasicDataService { ) { } loadBasicData() { + let flightTypesHttp = this.httpClient.get('/adminapi/basicdata/sysFlightTypes'); let flightStatusHttp = this.httpClient.get('/adminapi/basicdata/sysFlightStatus'); let checkinGroupHttp = this.httpClient.get('/adminapi/basicdata/checkinGroups'); let gateHttp = this.httpClient.get('/adminapi/basicdata/ormsGates'); @@ -65,6 +68,7 @@ export class BasicDataService { let airportGroupsHttp = this.httpClient.get('/adminapi/basicdata/sysAirportGroups'); let airlineGroupHttp = this.httpClient.get('/adminapi/basicdata/sysAirlineGroup'); zip( + flightTypesHttp, flightStatusHttp, checkinGroupHttp, gateHttp, @@ -85,6 +89,7 @@ export class BasicDataService { airlineGroupHttp ).subscribe( ([ + flightTypesRes, flightStatusRes, checkinGroupRes, gateRes, @@ -104,6 +109,8 @@ export class BasicDataService { airportGroupRes, airlineGroupRes ]) => { + this.flightTypes = flightTypesRes.body; + this.flightTypes_subject.next(flightTypesRes.body) this.flightStatus = flightStatusRes.body; this.flightStatus_subject.next(flightStatusRes.body); this.checkin_group = checkinGroupRes.body; diff --git a/src/app/pages/main/main.component.html b/src/app/pages/main/main.component.html index 528ce45..ae72459 100644 --- a/src/app/pages/main/main.component.html +++ b/src/app/pages/main/main.component.html @@ -5,7 +5,7 @@
@@ -138,7 +135,7 @@ 序号 重要提示 - {{airline_col.COL_CN}} + {{airline_col.COL_CN}} @@ -155,8 +152,8 @@ - {{airline_row['renderFlight'][airline_col.COL_CODE]}} + {{airline_row['renderFlight'][airline_col.COL_CODE]}} diff --git a/src/app/pages/main/main.component.ts b/src/app/pages/main/main.component.ts index e040453..8f85043 100644 --- a/src/app/pages/main/main.component.ts +++ b/src/app/pages/main/main.component.ts @@ -11,6 +11,7 @@ import { WebsocketService } from '../../services/websocket.service'; import { DynamicFlightOrder } from './utils/dynamic-flight-order'; import { FlightsDataHandle } from './utils/flights-data-handle'; +import { CellColorHandle } from './utils/cell-color-handle'; import dateFormatter from '../../utils/data-formatter'; @@ -34,6 +35,7 @@ export class MainComponent implements OnInit { } public orderHandle = new DynamicFlightOrder(); public dataHandle = new FlightsDataHandle(); + public cellColorHandle = new CellColorHandle(); public tabClose: boolean = true; @@ -41,6 +43,7 @@ export class MainComponent implements OnInit { public dynamicMessageArray: Array = []; //各项基础数据 + public flightTypes: Array; public terminals: Array; public flightStatus: Array; public airports: Array; @@ -55,6 +58,8 @@ export class MainComponent implements OnInit { public render_data: Array = []; //显示数据,即需要显示的数据 public col_lists: Array; //列数据 + public render_col_lists: Array; + public airline_color: Array = []; public row_state: any = { renderFlight: {} }; @@ -87,13 +92,17 @@ export class MainComponent implements OnInit { } ) - /* 获取显示列 */ - this.httpCilent.get('/assets/mock-data/airline-col_code.json').subscribe( + /* 获取用户设置 */ + this.httpCilent.get('/adminapi/settings/uisettings').subscribe( data => { - data.sort(function (a, b) { - return (a['COL_ORDER'] - b['COL_ORDER']); + data.body.forEach(element => { + if (element.groupCode === 'userSettingCol') { + this.col_lists = JSON.parse(element.settingContent).allCols; + this.render_col_lists = JSON.parse(element.settingContent).targetList; + } else if (element.groupCode === 'userSettingColor') { + this.airline_color = JSON.parse(element.settingContent); + } }) - this.col_lists = data; } ) //获取航班动态信息 @@ -109,6 +118,7 @@ export class MainComponent implements OnInit { }); //从基础数据服务中拿出部分基础数据 + this.flightTypes = this.basicDataService.flightTypes; this.terminals = this.basicDataService.terminal; this.flightStatus = this.basicDataService.flightStatus; this.airlines = this.basicDataService.airline; @@ -118,11 +128,14 @@ export class MainComponent implements OnInit { if (this.airports && this.airports.length > 0) { let combined_data = [] this.combined_data.forEach(item => { - combined_data.push(this.dataHandle.basicDataTransHandle(item, this.airports, this.citys, this.airlines, this.flightStatus)); + combined_data.push(this.dataHandle.basicDataTransHandle(item, this.airports, this.citys, this.airlines, this.flightStatus, this.flightTypes)); }) this.combined_data = combined_data; this.doSequence(this.combined_data); } else { + this.basicDataService.flightTypes_subject.subscribe( + val => this.flightTypes = val + ) this.basicDataService.terminal_subject.subscribe( val => this.terminals = val ) @@ -140,7 +153,7 @@ export class MainComponent implements OnInit { this.airports = val; let combined_data = [] this.combined_data.forEach(item => { - combined_data.push(this.dataHandle.basicDataTransHandle(item, this.airports, this.citys, this.airlines, this.flightStatus)); + combined_data.push(this.dataHandle.basicDataTransHandle(item, this.airports, this.citys, this.airlines, this.flightStatus, this.flightTypes)); }) this.combined_data = combined_data; this.doSequence(this.combined_data); @@ -176,6 +189,11 @@ export class MainComponent implements OnInit { this.airlinesSelections.push(this.airlines[index]); } + if (this.flightTypeSelections.findIndex(flightType => flightType.flightTypeCode === message['FLTY']) === -1) { + let index = this.flightTypes.findIndex(val => val.flightTypeCode === message['FLTY']); + this.flightTypeSelections.push(this.flightTypes[index]); + } + let dynamicHandleData = this.dataHandle.dynamicMessageHandle( message, this.combined_data, @@ -186,7 +204,9 @@ export class MainComponent implements OnInit { this.LAST_SEL_COL, this.airports, this.citys, - this.airlines, this.flightStatus + this.airlines, + this.flightStatus, + this.flightTypes ) this.combined_data = dynamicHandleData.combined_data; @@ -218,6 +238,10 @@ export class MainComponent implements OnInit { let index = this.airlines.findIndex(val => val.airlineCodeIata === element['ALCD']); this.airlinesSelections.push(this.airlines[index]); } + if (this.flightTypeSelections.findIndex(flightType => flightType.flightTypeCode === element['FLTY']) === -1) { + let index = this.flightTypes.findIndex(val => val.flightTypeCode === element['FLTY']); + this.flightTypeSelections.push(this.flightTypes[index]); + } }) combined_data.forEach(element => { @@ -242,14 +266,17 @@ export class MainComponent implements OnInit { * 刷新 */ refresh() { - let testss = this.render_data.reverse(); - let tstt = []; - testss.forEach(element => { - tstt.push(Object.assign({}, element)) - }) + // let testss = this.render_data.reverse(); + // let tstt = []; + // testss.forEach(element => { + // tstt.push(Object.assign({}, element)) + // }) - this.render_data = testss; - this.changeDetectorRef.detectChanges(); + // this.render_data = testss; + // this.changeDetectorRef.detectChanges(); + + const toastCfg = new ToastConfig(ToastType.SUCCESS, '', '登录成功!', 3000); + this.toastService.toast(toastCfg); } @@ -552,68 +579,25 @@ export class MainComponent implements OnInit { * 获取当前单元格颜色 * @param col_CODE */ + public colorFormatter = { + 'RENO': this.cellColorHandle.reno.bind(this.cellColorHandle), + 'ACTT': this.cellColorHandle.actt.bind(this.cellColorHandle), + 'ESTT': this.cellColorHandle.estt.bind(this.cellColorHandle), + 'SODT': this.cellColorHandle.sodt.bind(this.cellColorHandle), + 'PADT': this.cellColorHandle.padt.bind(this.cellColorHandle), + 'PSST': this.cellColorHandle.psst.bind(this.cellColorHandle), + 'COTM': this.cellColorHandle.cotm.bind(this.cellColorHandle), + 'CCTM': this.cellColorHandle.cctm.bind(this.cellColorHandle), + 'BOTM': this.cellColorHandle.botm.bind(this.cellColorHandle), + 'GCTM': this.cellColorHandle.gctm.bind(this.cellColorHandle) + } getColor(col_CODE, flight) { - if (this.orderHandle.isArriFlight(flight)) { - if (col_CODE === 'SODT') { - if (flight['preFlight']['SODT']) { - if (!flight['preFlight']['ESTT'] && !flight['preFlight']['ACTT']) { - return 'rgb(0,255,255)'; - } else { - return null; - } - } else { - return null; - } - } else if (col_CODE === 'ESTT') { - if (flight['preFlight']['ESTT']) { - if (!flight['preFlight']['ACTT']) { - return 'rgb(255,207,156)'; - } else { - return null; - } - } else { - return null; - } - } else if (col_CODE === 'ACTT') { - if (flight['preFlight']['ACTT']) { - return 'rgb(148,207,255)'; - } else { - return null; - } - } else { - return null; - } - + let index = this.airline_color.findIndex(color => color['COL_CODE'] === col_CODE) + if (index > -1) { + let styles = this.colorFormatter[col_CODE](flight, this.airline_color[index]); + return styles; } else { - if (col_CODE === 'SODT') { - if (flight['reaFlight']['SODT']) { - if (!flight['reaFlight']['ESTT'] && !flight['reaFlight']['ACTT']) { - return 'rgb(0,255,255)'; - } else { - return null; - } - } else { - return null; - } - } else if (col_CODE === 'ESTT') { - if (flight['reaFlight']['ESTT']) { - if (!flight['reaFlight']['ACTT']) { - return 'rgb(255,207,156)'; - } else { - return null; - } - } else { - return null; - } - } else if (col_CODE === 'ACTT') { - if (flight['reaFlight']['ACTT']) { - return 'rgb(148,207,255)'; - } else { - return null; - } - } else { - return null; - } + return null; } } diff --git a/src/app/pages/main/utils/cell-color-handle.ts b/src/app/pages/main/utils/cell-color-handle.ts new file mode 100644 index 0000000..b202a3a --- /dev/null +++ b/src/app/pages/main/utils/cell-color-handle.ts @@ -0,0 +1,185 @@ + +import { DynamicFlightOrder } from './dynamic-flight-order'; + +export class CellColorHandle { + + public orderHandle = new DynamicFlightOrder(); + + + public reno(flight, colorSetting) { + if (this.orderHandle.isArriFlight(flight)) { + if (flight['preFlight']['RENO'] && flight['preFlight']['RENO'].indexOf('(') > 0) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + } + } else { + return null; + } + } else if (this.orderHandle.isDeptFlight(flight)) { + if (flight['reaFlight']['RENO'] && flight['reaFlight']['RENO'].indexOf('(') > 0) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + } + } else { + return null; + } + } else { + if ((flight['preFlight']['RENO'] && flight['preFlight']['RENO'].indexOf('(') > 0) || (flight['reaFlight']['RENO'] && flight['reaFlight']['RENO'].indexOf('(') > 0)) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + } + } else { + return null; + } + } + } + + public actt(flight, colorSetting) { + if (this.orderHandle.isArriFlight(flight)) { + if (flight['preFlight']['ACTT']) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + }; + } else { + return null; + } + } else { + if (flight['reaFlight']['ACTT']) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + }; + } else { + return null; + } + } + } + + public estt(flight, colorSetting) { + if (this.orderHandle.isArriFlight(flight)) { + if (flight['preFlight']['ESTT'] && !flight['preFlight']['ACTT']) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + }; + } else { + return null; + } + } else { + if (flight['reaFlight']['ESTT'] && !flight['reaFlight']['ACTT']) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + }; + } else { + return null; + + } + } + } + + public sodt(flight, colorSetting) { + if (this.orderHandle.isArriFlight(flight)) { + if (flight['preFlight']['SODT'] && !flight['preFlight']['ESTT'] && !flight['preFlight']['ACTT']) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + }; + } else { + return null; + } + } else { + if (flight['reaFlight']['SODT'] && !flight['reaFlight']['ESTT'] && !flight['reaFlight']['ACTT']) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + }; + } else { + return null; + } + } + } + + public padt(flight, colorSetting) { + if (this.orderHandle.isArriFlight(flight)) { + if (flight['preFlight']['PADT'] && flight['preFlight']['PADT'].indexOf('(') > 0) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + } + } else { + return null; + } + } else if (this.orderHandle.isDeptFlight(flight)) { + if (flight['reaFlight']['PADT'] && flight['reaFlight']['PADT'].indexOf('(') > 0) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + } + } else { + return null; + } + } else { + if ((flight['preFlight']['PADT'] && flight['preFlight']['PADT'].indexOf('(') > 0) || (flight['reaFlight']['PADT'] && flight['reaFlight']['PADT'].indexOf('(') > 0)) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + } + } else { + return null; + } + } + } + + public psst(flight, colorSetting) { + + } + + public cotm(flight, colorSetting) { + if (flight['renderFlight']['COTM'] && !flight['renderFlight']['CCTM']) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + } + } else { + return false; + } + } + + public cctm(flight, colorSetting) { + if (flight['renderFlight']['CCTM']) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + } + } else { + return false; + } + } + + public botm(flight, colorSetting) { + if (flight['renderFlight']['BOTM'] && !flight['renderFlight']['GCTM']) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + } + } else { + return false; + } + } + + public gctm(flight, colorSetting) { + if (flight['renderFlight']['GCTM']) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + } + } else { + return false; + } + } +} \ No newline at end of file diff --git a/src/app/pages/main/utils/flights-data-handle.ts b/src/app/pages/main/utils/flights-data-handle.ts index 918748e..6eb4fac 100644 --- a/src/app/pages/main/utils/flights-data-handle.ts +++ b/src/app/pages/main/utils/flights-data-handle.ts @@ -160,7 +160,7 @@ export class FlightsDataHandle { return flights_item; } - public basicDataTransHandle(item, airports, citys, airlines, flightStatus) { + public basicDataTransHandle(item, airports, citys, airlines, flightStatus, flightTypes) { if (this.orderHandle.isArriFlight(item) || this.orderHandle.isDeptFlight(item)) { //航线处理 let erutCodeArray = item['renderFlight']['ERUT'].split(' - '); @@ -179,7 +179,9 @@ export class FlightsDataHandle { let airlineIndex = airlines.findIndex(val => val.airlineCode === item['renderFlight']['ALCD']); item['renderFlight']['ALCD'] = airlines[airlineIndex].airlineName; //运营状态处理 - item['renderFlight']['FTSS'] = flightStatus.find(val => val.sttc === item['renderFlight']['FTSS']).stdc + item['renderFlight']['FTSS'] = flightStatus.find(val => val.sttc === item['renderFlight']['FTSS']).stdc; + //航班类型处理 + item['renderFlight']['FLTY'] = flightTypes.find(val => val.flightTypeCode === item['renderFlight']['FLTY']).flightTypeNameCn; } else { //航线处理 let erutLinkCodeArray = item['renderFlight']['ERUT'].split(' - '); @@ -205,6 +207,14 @@ export class FlightsDataHandle { } item['renderFlight']['FTSS'] = ftssLinkChnArray.join(' / '); + //航班类型处理 + let fltyLinkCodeArray = item['renderFlight']['FLTY'].split(' / '); + let fltyLinkChnArray = []; + for (let i = 0; i < fltyLinkCodeArray.length; i++) { + fltyLinkChnArray.push(flightTypes.find(val => val.flightTypeCode === fltyLinkCodeArray[i]).flightTypeNameCn) + } + item['renderFlight']['FLTY'] = fltyLinkChnArray.join(' / '); + //航线处理 let erutPreCodeArray = item['renderPreFlight']['ERUT'].split(' - '); let erutPreChnArray = [] @@ -223,6 +233,9 @@ export class FlightsDataHandle { item['renderPreFlight']['ALCD'] = airlines[airlinePreIndex].airlineName; //运营状态处理 item['renderPreFlight']['FTSS'] = flightStatus.find(val => val.sttc === item['renderPreFlight']['FTSS']).stdc + //航班类型处理 + item['renderPreFlight']['FLTY'] = flightTypes.find(val => val.flightTypeCode === item['renderPreFlight']['FLTY']).flightTypeNameCn; + //航线处理 let erutReaCodeArray = item['renderReaFlight']['ERUT'].split(' - '); @@ -242,12 +255,14 @@ export class FlightsDataHandle { item['renderReaFlight']['ALCD'] = airlines[airlineReaIndex].airlineName; //运营状态处理 item['renderReaFlight']['FTSS'] = flightStatus.find(val => val.sttc === item['renderReaFlight']['FTSS']).stdc + //航班类型处理 + item['renderReaFlight']['FLTY'] = flightTypes.find(val => val.flightTypeCode === item['renderReaFlight']['FLTY']).flightTypeNameCn; } return item; } - public dynamicMessageHandle(message, combined_data, render_data, col_lists, filterItems, LASTSEARCH, LAST_SEL_COL, airports, citys, airlines, flightStatus) { + public dynamicMessageHandle(message, combined_data, render_data, col_lists, filterItems, LASTSEARCH, LAST_SEL_COL, airports, citys, airlines, flightStatus, flightTypes) { if (message.MVIN === 'A') { //针对combined_data的处理 let index = combined_data.findIndex(element => { @@ -264,7 +279,7 @@ export class FlightsDataHandle { if (index > -1) { combined_data[index]['preFlight'] = message; combined_data[index] = this.flightsRenderTransfer(combined_data[index], col_lists); - combined_data[index] = this.basicDataTransHandle(combined_data[index], airports, citys, airlines, flightStatus); + combined_data[index] = this.basicDataTransHandle(combined_data[index], airports, citys, airlines, flightStatus, flightTypes); if (message.UPTP === 'FLOP-AOTP') { if (this.orderHandle.isArriFlight(combined_data[index])) { @@ -290,7 +305,7 @@ export class FlightsDataHandle { combined_data.splice(i, 1); newFlight = this.flightsRenderTransfer(newFlight, col_lists); - newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus); + newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus, flightTypes); combined_data.push(newFlight) } } else if (this.orderHandle.isLinked(combined_data[index])) { @@ -315,7 +330,7 @@ export class FlightsDataHandle { let newFlight = {}; newFlight['preFlight'] = message; newFlight = this.flightsRenderTransfer(newFlight, col_lists); - newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus); + newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus, flightTypes); combined_data.push(newFlight); } @@ -334,7 +349,7 @@ export class FlightsDataHandle { if (index1 > -1) { render_data[index1]['preFlight'] = message; render_data[index1] = this.flightsRenderTransfer(render_data[index1], col_lists); - render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus); + render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus, flightTypes); let is_satis = true; for (const key in filterItems) { @@ -413,7 +428,7 @@ export class FlightsDataHandle { newFlight['reaFlight'] = render_data[i]['reaFlight']; render_data.splice(i, 1); newFlight = this.flightsRenderTransfer(newFlight, col_lists); - newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus); + newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus, flightTypes); render_data.push(newFlight) } } @@ -440,14 +455,14 @@ export class FlightsDataHandle { delete render_data[index1]['preFlight']; delete render_data[index1]['renderPreFlight']; render_data[index1] = this.flightsRenderTransfer(render_data[index1], col_lists); - render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus); + render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus, flightTypes); } } } else { let newFlight = {}; newFlight['preFlight'] = message; newFlight = this.flightsRenderTransfer(newFlight, col_lists); - newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus); + newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus, flightTypes); let is_satis = true; for (const key in filterItems) { @@ -521,7 +536,7 @@ export class FlightsDataHandle { newFlight['reaFlight'] = Object.assign({}, render_data[i]['reaFlight']); render_data.splice(i, 1); newFlight = this.flightsRenderTransfer(newFlight, col_lists); - newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus); + newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus, flightTypes); render_data.push(newFlight); } else { render_data.push(newFlight); @@ -544,12 +559,12 @@ export class FlightsDataHandle { if (index > -1) { combined_data[index]['reaFlight'] = message; combined_data[index] = this.flightsRenderTransfer(combined_data[index], col_lists); - combined_data[index] = this.basicDataTransHandle(combined_data[index], airports, citys, airlines, flightStatus); + combined_data[index] = this.basicDataTransHandle(combined_data[index], airports, citys, airlines, flightStatus, flightTypes); } else { let newFlight = {}; newFlight['reaFlight'] = message; newFlight = this.flightsRenderTransfer(newFlight, col_lists); - newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus); + newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus, flightTypes); combined_data.push(newFlight); } @@ -568,7 +583,7 @@ export class FlightsDataHandle { if (index1 > -1) { render_data[index1]['reaFlight'] = message; render_data[index1] = this.flightsRenderTransfer(render_data[index1], col_lists); - render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus); + render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus, flightTypes); let is_satis = true; for (const key in filterItems) { @@ -630,14 +645,14 @@ export class FlightsDataHandle { delete render_data[index1]['renderReaFlight']; render_data[index1] = this.flightsRenderTransfer(render_data[index1], col_lists); - render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus); + render_data[index1] = this.basicDataTransHandle(render_data[index1], airports, citys, airlines, flightStatus, flightTypes); } } } else { let newFlight = {}; newFlight['reaFlight'] = message; newFlight = this.flightsRenderTransfer(newFlight, col_lists); - newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus); + newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus, flightTypes); let is_satis = true; for (const key in filterItems) { @@ -710,7 +725,7 @@ export class FlightsDataHandle { newFlight['preFlight'] = Object.assign({}, render_data[i]['preFlight']); render_data.splice(i, 1); newFlight = this.flightsRenderTransfer(newFlight, col_lists); - newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus); + newFlight = this.basicDataTransHandle(newFlight, airports, citys, airlines, flightStatus, flightTypes); render_data.push(newFlight); } else { render_data.push(newFlight);