diff --git a/src/app/pages/main/detail-tab/detail-tab.component.html b/src/app/pages/main/detail-tab/detail-tab.component.html
index e01f9fb..3bb3fb4 100644
--- a/src/app/pages/main/detail-tab/detail-tab.component.html
+++ b/src/app/pages/main/detail-tab/detail-tab.component.html
@@ -5,7 +5,8 @@
描述类 -----------------------------------------
-
{{singleFlight.FLNO}}
+
{{singleFlight.FLNO}}
+
{{singleFlight.TRML}}
{{singleFlight.ALCD}}
{{singleFlight.FLIN}}
{{singleFlight.FLTY}}
@@ -14,20 +15,22 @@
{{singleFlight.ACFT}}
{{singleFlight.MVIN}}
{{singleFlight.RENO}}
-
{{singleFlight.FTSS}}
+
{{singleFlight.FTSS}}
+
{{showRemc}}
资源类 -----------------------------------------
-
{{showPsst}}
+
{{showPsst}}
{{singleFlight.GTDT}}
{{singleFlight.CHKC}}
{{singleFlight.CHUT}}
时间类 -----------------------------------------
-
{{singleFlight.SODT}}
-
{{singleFlight.ESTT}}
-
{{singleFlight.ACTT}}
+
{{singleFlight.FLDT}}
+
{{singleFlight.SODT}}
+
{{singleFlight.ESTT}}
+
{{singleFlight.ACTT}}
{{singleFlight.CHTM_ON}}
{{singleFlight.CHTM_OFF}}
{{singleFlight.COTM}}
@@ -35,4 +38,4 @@
{{singleFlight.BOTM}}
{{singleFlight.GCTM}}
-
+
\ No newline at end of file
diff --git a/src/app/pages/main/detail-tab/detail-tab.component.ts b/src/app/pages/main/detail-tab/detail-tab.component.ts
index bfc80a3..8993c1a 100644
--- a/src/app/pages/main/detail-tab/detail-tab.component.ts
+++ b/src/app/pages/main/detail-tab/detail-tab.component.ts
@@ -11,11 +11,13 @@ export class DetailTabComponent implements OnInit {
public btnClickDisabled: boolean = true;
public showPsst: string;
+ public showRemc:string;
@Input() set flight(flight) {
this.lines = Object.assign({}, flight);
if (this.lines.preFlight && !this.lines.reaFlight) {
this.singleFlight = this.lines.renderFlight;
+ this.showRemc = this.lines.preFlight.REMC;
let psst = this.psstFormatter(this.lines.preFlight);
if (psst) {
this.showPsst = (this.singleFlight.STND || '') + '(' + psst + ')';
@@ -25,6 +27,7 @@ export class DetailTabComponent implements OnInit {
this.btnClickDisabled = true;
} else if (!this.lines.preFlight && this.lines.reaFlight) {
this.singleFlight = this.lines.renderFlight;
+ this.showRemc = this.lines.reaFlight.REMC;
let psst = this.psstFormatter(this.lines.reaFlight);
if (psst) {
this.showPsst = (this.singleFlight.STND || '') + '(' + psst + ')';
@@ -34,6 +37,7 @@ export class DetailTabComponent implements OnInit {
this.btnClickDisabled = true;
} else {
this.singleFlight = this.lines.renderPreFlight;
+ this.showRemc = this.lines.preFlight.REMC;
let psst = this.psstFormatter(this.lines.preFlight);
if (psst) {
this.showPsst = (this.singleFlight.STND || '') + '(' + psst + ')';
@@ -51,6 +55,7 @@ export class DetailTabComponent implements OnInit {
showPreFlight() {
if (this.lines.preFlight && !this.lines.reaFlight) {
this.singleFlight = this.lines.renderFlight;
+ this.showRemc = this.lines.preFlight.REMC;
let psst = this.psstFormatter(this.lines.preFlight);
if (psst) {
this.showPsst = (this.singleFlight.STND || '') + '(' + psst + ')';
@@ -60,6 +65,7 @@ export class DetailTabComponent implements OnInit {
this.btnClickDisabled = true;
} else {
this.singleFlight = this.lines.renderPreFlight;
+ this.showRemc = this.lines.preFlight.REMC;
let psst = this.psstFormatter(this.lines.preFlight);
if (psst) {
this.showPsst = (this.singleFlight.STND || '') + '(' + psst + ')';
@@ -72,6 +78,7 @@ export class DetailTabComponent implements OnInit {
showReaFlight() {
if (!this.lines.preFlight && this.lines.reaFlight) {
this.singleFlight = this.lines.renderFlight;
+ this.showRemc = this.lines.reaFlight.REMC;
let psst = this.psstFormatter(this.lines.reaFlight);
if (psst) {
this.showPsst = (this.singleFlight.STND || '') + '(' + psst + ')';
@@ -81,6 +88,7 @@ export class DetailTabComponent implements OnInit {
this.btnClickDisabled = true;
} else {
this.singleFlight = this.lines.renderReaFlight;
+ this.showRemc = this.lines.reaFlight.REMC;
let psst = this.psstFormatter(this.lines.reaFlight);
if (psst) {
this.showPsst = (this.singleFlight.STND || '') + '(' + psst + ')';
diff --git a/src/app/pages/main/main.component.ts b/src/app/pages/main/main.component.ts
index ef76506..70f4353 100644
--- a/src/app/pages/main/main.component.ts
+++ b/src/app/pages/main/main.component.ts
@@ -141,7 +141,7 @@ export class MainComponent implements OnInit {
let data = JSON.parse(event as string);
if (data.topic === 'schd') {
let message = JSON.parse(data.message);
- // console.log(message);
+ console.log(message);
//是否可以开始处理动态消息
if (this.canHandleDynamicMessage) {
this.dynamicMessageHandle(message);
@@ -150,7 +150,7 @@ export class MainComponent implements OnInit {
}
} else if (data.topic === 'msg') {
let message = JSON.parse(data.message);
- // console.log(message);
+ console.log(message);
if (this.canHandleDynamicAlert) {
this.dynamicAlertHandle(message);
} else {
@@ -290,10 +290,12 @@ export class MainComponent implements OnInit {
this.dynamicMessageArray.forEach(message => {
this.dynamicMessageHandle(message);
})
+ this.dynamicMessageArray = [];
this.canHandleDynamicAlert = true;
this.dynamicAlertArray.forEach(message => {
this.dynamicAlertHandle(message);
})
+ this.dynamicAlertArray = [];
}
/**
@@ -879,8 +881,14 @@ export class MainComponent implements OnInit {
if (col_CODE === 'SODT' || col_CODE === 'ESTT' || col_CODE === 'ACTT') {
if (!flight['renderPreFlight'][col_CODE] && flight['renderReaFlight'][col_CODE]) {
return 'text-right';
+ } else if (flight['renderPreFlight'][col_CODE] && !flight['renderReaFlight'][col_CODE]) {
+ return 'text-left';
}
}
+ } else {
+ if (col_CODE === 'FLNO' || col_CODE === 'SODT' || col_CODE === 'ESTT' || col_CODE === 'ACTT') {
+ return 'text-left';
+ }
}
}
diff --git a/src/app/utils/alert-message-handle.ts b/src/app/utils/alert-message-handle.ts
index 55072ea..1bc83be 100644
--- a/src/app/utils/alert-message-handle.ts
+++ b/src/app/utils/alert-message-handle.ts
@@ -134,21 +134,31 @@ export class AlertMessageHandle {
let mvin = message.FLOP.FFID.split('-')[2];
let rout = [];
- if (Array.isArray(message.FLOP['ROUT']) && message.FLOP['ROUT'] > 0) {
+ if (Array.isArray(message.FLOP['ROUT']) && message.FLOP['ROUT'].length > 0) {
for (let i = 0; i < message.FLOP['ROUT'].length; i++) {
let airportIndex = airports.findIndex(val => val.airportCodeIata === message.FLOP['ROUT'][i]['APCD']);
- let cityIndex = citys.findIndex(val => airports[airportIndex].cityId === val.cityId);
- rout.push(citys[cityIndex].cityNameChn);
+ if(airportIndex>-1){
+ if (airports[airportIndex].briefNameChn) {
+ rout.push(airports[airportIndex].briefNameChn);
+ } else {
+ rout.push(airports[airportIndex].airportNameChn);
+ }
+ }
}
} else if (Object.prototype.toString.call(message.FLOP['ROUT']) === '[object Object]') {
let airportIndex = airports.findIndex(val => val.airportCodeIata === message.FLOP['ROUT']['APCD']);
- let cityIndex = citys.findIndex(val => airports[airportIndex].cityId === val.cityId);
- rout.push(citys[cityIndex].cityNameChn);
+ if(airportIndex>-1){
+ if (airports[airportIndex].briefNameChn) {
+ rout.push(airports[airportIndex].briefNameChn);
+ } else {
+ rout.push(airports[airportIndex].airportNameChn);
+ }
+ }
}
if (mvin === 'A') {
- rout.push('成都');
+ rout.push('蓉');
} else if (mvin === 'D') {
- rout.unshift('成都');
+ rout.unshift('蓉');
}
return message.FLOP.FFID + '航线更改为:' + rout.join(' - ');
}