基础数据停机位类别数据转换处理
This commit is contained in:
@@ -25,43 +25,38 @@
|
||||
<input type="radio" [(ngModel)]="FLT_POS" [value]="2" name="filter-position">
|
||||
<span>查找定位</span>
|
||||
</label>
|
||||
<input class="form-control" [(ngModel)]="SEARCH" type="text" (keyup.enter) = "inputEnter()" id="inputerInfo">
|
||||
<input class="form-control" [(ngModel)]="SEARCH" type="text" (keyup.enter) = "inputEnter()">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="second-condition mb-3 row">
|
||||
<div class="input-container mr-4">
|
||||
<label for="terminalAreaCode">所属航站楼区域: </label>
|
||||
<select class="form-control" [(ngModel)]="filterItems.terminalAreaCode" (ngModelChange)="selectChange()" id="qy">
|
||||
<option value=""></option>
|
||||
<option *ngFor="let items of terminalAreas" [value]="items.terminalAreaCode">{{items.terminalAreaName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-container mr-4">
|
||||
<label for="standType">机位类型: </label>
|
||||
<select class="form-control" [(ngModel)]="filterItems.standType" (ngModelChange)="selectChange()" id="jtype">
|
||||
<label for="terminalAreaCode">所属航站楼区域: </label>
|
||||
<select class="form-control" [(ngModel)]="filterItems.terminalAreaCode" (ngModelChange)="selectChange()">
|
||||
<option value=""></option>
|
||||
<option value="bridge">靠桥机位</option>
|
||||
<option value="remote">远机位</option>
|
||||
<option value="near">近机位</option>
|
||||
<option value="night">过夜机位</option>
|
||||
<option value="specific">专机位</option>
|
||||
<!-- <option *ngFor="let items of stands" [value]="items.standType">{{items.standType}}</option> -->
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-container mr-4">
|
||||
<label for="standStatus">资源状态: </label>
|
||||
<select class="form-control" [(ngModel)]="filterItems.standStatus" (ngModelChange)="selectChange()" id="zystatus">
|
||||
<option value=""></option>
|
||||
<!-- <option *ngFor="let items of stands" [value]="items.standStatus">{{items.standStatus}}</option> -->
|
||||
<option value="0">可用</option>
|
||||
<option value="1">在用</option>
|
||||
<option value="2">锁定</option>
|
||||
<option value="3">禁用</option>
|
||||
<option value="4">预分</option>
|
||||
<option *ngFor="let items of terminalAreas" [value]="items.terminalAreaCode">{{items.terminalAreaName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-container mr-4">
|
||||
<label for="standType">机位类型: </label>
|
||||
<select class="form-control" [(ngModel)]="filterItems.standType" (ngModelChange)="selectChange()">
|
||||
<option value=""></option>
|
||||
<option *ngFor="let items of standTypes" [value]="items.standType">{{items.standTypeDesc}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-container mr-4">
|
||||
<label for="standStatus">资源状态: </label>
|
||||
<select class="form-control" [(ngModel)]="filterItems.standStatus" (ngModelChange)="selectChange()">
|
||||
<option value=""></option>
|
||||
<!-- <option *ngFor="let items of stands" [value]="items.standStatus">{{items.standStatus}}</option> -->
|
||||
<option value="0">可用</option>
|
||||
<option value="1">在用</option>
|
||||
<option value="2">锁定</option>
|
||||
<option value="3">禁用</option>
|
||||
<option value="4">预分</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="airline-table">
|
||||
@@ -83,7 +78,7 @@
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{stand.standCode}}</td>
|
||||
<td>{{stand.standName}}</td>
|
||||
<td>{{stand.standType}}</td>
|
||||
<td>{{stand.standTypeDesc}}</td>
|
||||
<td>{{stand.standStatus}}</td>
|
||||
<td>{{stand.terminalAreaName}}</td>
|
||||
</tr>
|
||||
|
||||
@@ -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<any>; //所属航站楼区域
|
||||
standTypes: Array<any>; //停机位类别
|
||||
stands: Array<any>;
|
||||
public row_state: any = { renderFlight: {} };
|
||||
public render_data: Array<object> = []; //显示数据,即需要显示的数据
|
||||
@@ -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() {
|
||||
|
||||
@@ -20,6 +20,8 @@ export class BasicDataService {
|
||||
public chut_subject = new Subject<any>();
|
||||
public stand: Array<any> = [];
|
||||
public stand_subject = new Subject<any>();
|
||||
public standType: Array<any> = [];
|
||||
public standType_subject = new Subject<any>();
|
||||
public carousel: Array<any> = [];
|
||||
public carousel_subject = new Subject<any>();
|
||||
public checkin_desk: Array<any> = [];
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user