diff --git a/src/app/pages/basic-data/stand/stand.component.html b/src/app/pages/basic-data/stand/stand.component.html index fb4e0db..ee773b9 100644 --- a/src/app/pages/basic-data/stand/stand.component.html +++ b/src/app/pages/basic-data/stand/stand.component.html @@ -25,43 +25,38 @@ 查找定位 - +
- - -
-
- - - - - - - - - -
-
- - +
+
+ + +
+
+ + +
-
@@ -83,7 +78,7 @@ {{i+1}} {{stand.standCode}} {{stand.standName}} - {{stand.standType}} + {{stand.standTypeDesc}} {{stand.standStatus}} {{stand.terminalAreaName}} diff --git a/src/app/pages/basic-data/stand/stand.component.ts b/src/app/pages/basic-data/stand/stand.component.ts index 0f05c12..63f433a 100644 --- a/src/app/pages/basic-data/stand/stand.component.ts +++ b/src/app/pages/basic-data/stand/stand.component.ts @@ -17,7 +17,7 @@ export class StandComponent implements OnInit { public col_lists = [ { col_code: 'standCode', col_chn: '机位代码' }, { col_code: 'standName', col_chn: '机位名称' }, - { col_code: 'standType', col_chn: '机位类型' }, + { col_code: 'standTypeDesc', col_chn: '机位类型' }, { col_code: 'standStatus', col_chn: '资源状态' }, { col_code: 'terminalAreaName', col_chn: '航站楼区域' }, ] @@ -35,6 +35,7 @@ export class StandComponent implements OnInit { } terminalAreas: Array; //所属航站楼区域 + standTypes: Array; //停机位类别 stands: Array; public row_state: any = { renderFlight: {} }; public render_data: Array = []; //显示数据,即需要显示的数据 @@ -42,6 +43,7 @@ export class StandComponent implements OnInit { ngOnInit() { this.terminalAreas = this.basicDataService.terminal_area; this.stands = this.basicDataService.stand; + this.standTypes = this.basicDataService.standType; this.render_data = this.basicDataService.stand; this.basicDataService.stand_subject.subscribe( data => { @@ -54,13 +56,23 @@ export class StandComponent implements OnInit { this.terminalAreas = data; //航站楼区域数据转换处理 if(this.terminalAreas && this.terminalAreas.length > 0){ - this.basicDataTransHandle(); + this.terminalAreasHandle(); + } + } + ) + this.basicDataService.standType_subject.subscribe( + data => { + //停机位类别 + if(this.standTypes && this.standTypes.length > 0){ + this.standTypesHandle(); } } ) - //航站楼区域数据转换处理 if(this.render_data){ - this.basicDataTransHandle(); + //航站楼区域数据转换处理 + this.terminalAreasHandle(); + //停机位类别数据转换处理 + this.standTypesHandle(); } /** * 固定表头 @@ -74,7 +86,7 @@ export class StandComponent implements OnInit { } //航站楼区域数据转换处理 - basicDataTransHandle() { + terminalAreasHandle() { this.render_data.forEach(item => { let terminalAreasLinkIndex = this.terminalAreas.findIndex(val => val.terminalAreaCode === item['terminalAreaCode']); if(this.terminalAreas[terminalAreasLinkIndex]){ @@ -82,6 +94,15 @@ export class StandComponent implements OnInit { } }) } + //停机位类别数据转换处理 + standTypesHandle() { + this.render_data.forEach(item => { + let standTypesLinkIndex = this.standTypes.findIndex(val => val.standType === item['standType']); + if(this.standTypes[standTypesLinkIndex]){ + item['standTypeDesc'] = this.standTypes[standTypesLinkIndex].standTypeDesc; + } + }) + } //输入框回车事件 inputEnter() { diff --git a/src/app/services/basic-data-service.ts b/src/app/services/basic-data-service.ts index f8f7a74..81fcc46 100644 --- a/src/app/services/basic-data-service.ts +++ b/src/app/services/basic-data-service.ts @@ -20,6 +20,8 @@ export class BasicDataService { public chut_subject = new Subject(); public stand: Array = []; public stand_subject = new Subject(); + public standType: Array = []; + public standType_subject = new Subject(); public carousel: Array = []; public carousel_subject = new Subject(); public checkin_desk: Array = []; @@ -58,6 +60,7 @@ export class BasicDataService { let terminalHttp = this.httpClient.get('/adminapi/basicdata/ormsTerminals'); let chutHttp = this.httpClient.get('/adminapi/basicdata/ormsChuts'); let standHttp = this.httpClient.get('/adminapi/basicdata/ormsStands'); + let standTypeHttp = this.httpClient.get('/adminapi/basicdata/ormsStandTypes'); let carouselHttp = this.httpClient.get('/adminapi/basicdata/ormsCarousels'); let checkinDeskHttp = this.httpClient.get('/adminapi/basicdata/ormsCheckindesks'); let airportHttp = this.httpClient.get('/adminapi/basicdata/sysAirports'); @@ -79,6 +82,7 @@ export class BasicDataService { terminalHttp, chutHttp, standHttp, + standTypeHttp, carouselHttp, checkinDeskHttp, airportHttp, @@ -101,6 +105,7 @@ export class BasicDataService { terminalRes, chutRes, standRes, + standTypesRes, carouselRes, checkinDeskRes, airportRes, @@ -130,6 +135,8 @@ export class BasicDataService { this.chut_subject.next(chutRes.body); this.stand = standRes.body; this.stand_subject.next(standRes.body); + this.standType = standTypesRes.body; + this.standType_subject.next(standTypesRes.body); this.carousel = carouselRes.body; this.carousel_subject.next(carouselRes.body); this.checkin_desk = checkinDeskRes.body;