添加刷新及显示航班ID方便测试

This commit is contained in:
zhouyuejun
2018-12-24 17:18:50 +08:00
parent 6e35f9cb88
commit 9815df7b0f
4 changed files with 67 additions and 7 deletions
+2
View File
@@ -133,6 +133,7 @@
<tr>
<th>序号</th>
<th>重要提示</th>
<th>航班ID</th>
<th *ngFor="let airline_col of render_col_lists">{{airline_col.COL_CN}}</th>
</tr>
</thead>
@@ -158,6 +159,7 @@
<img class="mr-2" *ngIf="getStopoverNotes(airline_row)" src="/adminweb/assets/images/important-notes/stopover.png"
alt="">
</td>
<td>{{airline_row['renderFlight']['FLID']}}</td>
<td *ngFor="let airline_col of render_col_lists" [ngClass]="getPosition(airline_col.COL_CODE,airline_row)"
[ngStyle]="getColor(airline_col.COL_CODE,airline_row)">{{airline_row['renderFlight'][airline_col.COL_CODE]}}</td>
</tr>
+60 -3
View File
@@ -307,7 +307,7 @@ export class MainComponent implements OnInit {
let index = this.airline_message_alert.findIndex(val => val['COL_CODE'] === alertType);
if (index > -1) {
let alertText = this.alertMessage[alertType]();
const toastCfg = new ToastConfig(ToastType.SUCCESS, '', alertText, 10000);
const toastCfg = new ToastConfig(ToastType.SUCCESS, '', alertText, 600000);
this.toastService.toast(toastCfg);
}
}
@@ -354,8 +354,65 @@ export class MainComponent implements OnInit {
* 刷新
*/
refresh() {
const toastCfg = new ToastConfig(ToastType.SUCCESS, '', '刷新成功!', 3000);
this.toastService.toast(toastCfg);
this.operateSpinServiceService.showSpin();
this.canHandleDynamicMessage = false;
this.canHandleDynamicAlert = false;
this.SEARCH = ''; //手动输入条件
this.LASTSEARCH = '';
this.FLT_POS = 1; //过滤还是定位
this.SEL_COL = ''; //选择列名
this.LAST_SEL_COL = '';
this.filterItems = {
ALCD: '', //航空公司
FLIN: '', //航线类别
FLTY: '', //航班类别
MVIN: '', //到达/出发
FTSS: '', //运营状态
TRML: '', //航站楼
Abnormal_state: '', //异常状态
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;
} else if (element.groupCode === 'userSettingColor') {
this.airline_color = JSON.parse(element.settingContent);
} else if (element.groupCode === 'userSettingMsgAlert') {
this.airline_message_alert = JSON.parse(element.settingContent).targetList;
}
});
}
)
//获取航班动态信息
this.httpCilent.get('/msgexchangeapi/all/flights').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);
}
)
}