From bcda5908e7294f32e60d67d62f74f971a5a0e69a Mon Sep 17 00:00:00 2001 From: zhouyuejun <505127606@qq.com> Date: Mon, 24 Dec 2018 18:32:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AE=E5=88=B7?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../historical-data.component.ts | 53 +++++++++++++++++-- src/app/pages/main/main.component.html | 16 +++--- src/app/pages/main/main.component.ts | 16 ++++-- src/app/pages/pages.component.ts | 23 +++++++- src/index.html | 12 ++--- 5 files changed, 96 insertions(+), 24 deletions(-) diff --git a/src/app/pages/historical-data/historical-data.component.ts b/src/app/pages/historical-data/historical-data.component.ts index 146537c..8e6bc8c 100644 --- a/src/app/pages/historical-data/historical-data.component.ts +++ b/src/app/pages/historical-data/historical-data.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit,ViewChild,Renderer2 } from '@angular/core'; +import { Component, OnInit, ViewChild, Renderer2 } from '@angular/core'; import { ChangeDetectorRef } from '@angular/core'; import { ToastService } from '../../components/toast/toast.service'; @@ -116,7 +116,7 @@ export class HistoricalDataComponent implements OnInit { } ) //获取航班动态信息 - this.httpCilent.post('/adminapi/hitFlightData/list',{ hstFLightTime: '2018-11-22' }).subscribe( + this.httpCilent.post('/adminapi/hitFlightData/list').subscribe( data => { this.raw_data = data.body; @@ -225,8 +225,53 @@ export class HistoricalDataComponent implements OnInit { * 刷新 */ refresh() { - const toastCfg = new ToastConfig(ToastType.SUCCESS, '', '刷新成功!', 3000); - this.toastService.toast(toastCfg); + this.operateSpinServiceService.showSpin(); + this.SEARCH = ''; //手动输入条件 + this.FLT_POS = 1; //过滤还是定位 + this.SEL_COL = ''; //选择列名 + this.filterItems = { + ALCD: '', //航空公司 + FLIN: '', //航线类别 + FLTY: '', //航班类别 + MVIN: '', //到达/出发 + FHAG: '', //机坪代理 + MHAG: '', //维护代理 + PHAG: '', //旅客代理 + } + + /* 获取用户设置 */ + this.httpCilent.get('/adminapi/settings/uisettings').subscribe( + data => { + 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; + } + }) + } + ) + //获取航班动态信息 + this.httpCilent.post('/adminapi/hitFlightData/list').subscribe( + data => { + this.raw_data = data.body; + + //查找链接航班并将其组合成一条数据 + this.combined_data = []; + let combined_linked_data = this.dataHandle.findLinkFlights(this.raw_data); + combined_linked_data.forEach(element => { + let flights_item = this.dataHandle.flightsRenderTransfer(element, this.col_lists); + this.combined_data.push(flights_item); + }); + let combined_data = [] + this.combined_data.forEach(item => { + 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); + const toastCfg = new ToastConfig(ToastType.SUCCESS, '', '刷新成功!', 3000); + this.toastService.toast(toastCfg); + } + ) } diff --git a/src/app/pages/main/main.component.html b/src/app/pages/main/main.component.html index b34be1a..9656e67 100644 --- a/src/app/pages/main/main.component.html +++ b/src/app/pages/main/main.component.html @@ -142,21 +142,21 @@ [ngClass]="{'selected':row_state['renderFlight']['FLNO']===airline_row['renderFlight']['FLNO']}">
-
-
-
-
-
-
-