@@ -51,14 +43,19 @@
| 序号 |
-
+ 机型组 |
+ CAA码 |
+ IATA码 |
+ ICAO码 | -->
{{airline_col.COL_CN}} |
@@ -67,13 +64,18 @@
[ngClass]="{'selected':row_state['renderFlight']===airline_row['renderFlight']}">
{{i+1}} |
+
{{airline_col.aircraftTypeCodeCaa}} |
+
{{airline_col.aircraftTypeCodeIata}} |
+
{{airline_col.aircraftTypeCodeIcao}} | -->
{{airline_row['renderFlight'][airline_col.COL_CODE]}} |
diff --git a/src/app/pages/basic-data/aircraft-type/aircraft-type.component.ts b/src/app/pages/basic-data/aircraft-type/aircraft-type.component.ts
index 5a8403c..8da9868 100644
--- a/src/app/pages/basic-data/aircraft-type/aircraft-type.component.ts
+++ b/src/app/pages/basic-data/aircraft-type/aircraft-type.component.ts
@@ -5,10 +5,10 @@ import dateFormatter from '../../../utils/data-formatter';
import { HttpParams } from '@angular/common/http';
import * as $ from 'jquery';
@Component({
- selector: 'app-aircraft-type',
- templateUrl: './aircraft-type.component.html',
- styleUrls: ['./aircraft-type.component.scss']
-})
+ selector: 'app-aircraft-type',
+ templateUrl: './aircraft-type.component.html',
+ styleUrls: ['./aircraft-type.component.scss']
+ })
export class AircraftTypeComponent implements OnInit {
constructor(
@@ -32,19 +32,14 @@ FLT_POS = 1; //过滤还是定位
SEL_COL = ''; //选择列名
public filterItems = {
- HK: '', //航空公司
- JX: '', //机型
+ ZZU: '', //机型组
}
public formatter = {
- 'HK': {
- 'GH': '海南航空公司',
- 'CH': '国外航空公司'
- },
- 'JX': {
- 'A': 'A306',
- 'B': 'B252',
- "C": 'C256'
+ 'ZZU': {
+ 'E': 'E-类飞机机型',
+ 'T': 'T-类飞机机型',
+ 'G': 'G-类飞机机型'
},
'SODT': dateFormatter,
'ESTT': dateFormatter,
@@ -103,35 +98,35 @@ ngOnInit() {
delete element['isLinked'];
row_flights['reaFlight'] = element;
- for (let i = 0; i < this.aircrafttype_lists.length; i++) {
- let key = this.aircrafttype_lists[i]['COL_CODE']
- if (this.formatter.hasOwnProperty(key)) {
- if (typeof (this.formatter[key]) === 'function') {
- render_flight[key] = (row_flights['preFlight'][key] === row_flights['reaFlight'][key]) ? (this.formatter[key](row_flights['preFlight'][key], 1)) : (this.formatter[key](row_flights['preFlight'][key], 1) + '/' + this.formatter[key](row_flights['reaFlight'][key], 1));
- render_pre_flight[key] = this.formatter[key](row_flights['preFlight'][key], 1);
- render_rea_flight[key] = this.formatter[key](row_flights['reaFlight'][key], 1);
+ for (let i = 0; i < this.aircrafttype_lists.length; i++) {
+ let key = this.aircrafttype_lists[i]['COL_CODE']
+ if (this.formatter.hasOwnProperty(key)) {
+ if (typeof (this.formatter[key]) === 'function') {
+ render_flight[key] = (row_flights['preFlight'][key] === row_flights['reaFlight'][key]) ? (this.formatter[key](row_flights['preFlight'][key], 1)) : (this.formatter[key](row_flights['preFlight'][key], 1) + '/' + this.formatter[key](row_flights['reaFlight'][key], 1));
+ render_pre_flight[key] = this.formatter[key](row_flights['preFlight'][key], 1);
+ render_rea_flight[key] = this.formatter[key](row_flights['reaFlight'][key], 1);
+ } else {
+ render_flight[key] = (row_flights['preFlight'][key] === row_flights['reaFlight'][key]) ? (this.formatter[key][row_flights['preFlight'][key]]) : (this.formatter[key][row_flights['preFlight'][key]] + '/' + this.formatter[key][row_flights['reaFlight'][key]]);
+ render_pre_flight[key] = this.formatter[key][row_flights['preFlight'][key]];
+ render_rea_flight[key] = this.formatter[key][row_flights['reaFlight'][key]];
+ }
} else {
- render_flight[key] = (row_flights['preFlight'][key] === row_flights['reaFlight'][key]) ? (this.formatter[key][row_flights['preFlight'][key]]) : (this.formatter[key][row_flights['preFlight'][key]] + '/' + this.formatter[key][row_flights['reaFlight'][key]]);
- render_pre_flight[key] = this.formatter[key][row_flights['preFlight'][key]];
- render_rea_flight[key] = this.formatter[key][row_flights['reaFlight'][key]];
+ render_flight[key] = (row_flights['preFlight'][key] === row_flights['reaFlight'][key]) ? (row_flights['preFlight'][key]) : (row_flights['preFlight'][key] + '/' + row_flights['reaFlight'][key]);
+ render_pre_flight[key] = row_flights['preFlight'][key];
+ render_rea_flight[key] = row_flights['reaFlight'][key];
}
- } else {
- render_flight[key] = (row_flights['preFlight'][key] === row_flights['reaFlight'][key]) ? (row_flights['preFlight'][key]) : (row_flights['preFlight'][key] + '/' + row_flights['reaFlight'][key]);
- render_pre_flight[key] = row_flights['preFlight'][key];
- render_rea_flight[key] = row_flights['reaFlight'][key];
}
+ row_flights['renderFlight'] = render_flight;
+ row_flights['renderPreFlight'] = render_pre_flight;
+ row_flights['renderReaFlight'] = render_rea_flight;
}
- row_flights['renderFlight'] = render_flight;
- row_flights['renderPreFlight'] = render_pre_flight;
- row_flights['renderReaFlight'] = render_rea_flight;
- }
- this.combined_data.push(row_flights)
+ this.combined_data.push(row_flights)
})
this.render_data = this.combined_data
this.changeDetectorRef.detectChanges();
}
)
- /**
+ /**
* 固定表头
*/
var tableCont = document.querySelector('#table-container');
@@ -141,6 +136,7 @@ ngOnInit() {
}
tableCont.addEventListener('scroll',scrollHandle);
}
+
/**
* 过滤及定位
* @param filterItems
@@ -366,6 +362,6 @@ inputPosition(filterData) {
let tr = $(".selected");
let objTr = tr[0];
$("#table-container").animate({ scrollTop: objTr.offsetTop - 42 }, "slow");
-
+
}
}
diff --git a/src/app/pages/basic-data/aircraft/aircraft.component.html b/src/app/pages/basic-data/aircraft/aircraft.component.html
index c8047f0..ac5d3d0 100644
--- a/src/app/pages/basic-data/aircraft/aircraft.component.html
+++ b/src/app/pages/basic-data/aircraft/aircraft.component.html
@@ -3,7 +3,7 @@
-
| {{airline_col.COL_CN}} |
-
+
| {{i+1}} |
+
{{airline_row['renderFlight'][airline_col.COL_CODE]}} |
diff --git a/src/app/pages/basic-data/aircraft/aircraft.component.scss b/src/app/pages/basic-data/aircraft/aircraft.component.scss
index cf17098..dba3c39 100644
--- a/src/app/pages/basic-data/aircraft/aircraft.component.scss
+++ b/src/app/pages/basic-data/aircraft/aircraft.component.scss
@@ -1,6 +1,7 @@
.main-page {
width: 100%;
- height: calc(100% - 66px);
+ height: 100%;
+ overflow-y: scroll;
padding: 15px 10px;
background-color: #fff;
.page-content {
@@ -31,15 +32,19 @@
// border: 1px solid #ccc;
width: 100%;
height: 700px;
- overflow: scroll;
+ overflow: auto;
+ box-shadow: 0 0 1px .5px #ddd;
table{
width: max-content;
tr{
cursor: pointer;
- &.active{
+ &.selected{
background: rgb(181, 215, 255);
}
}
+ th{
+ background-color: #ddd;
+ }
th,td{
// border: none;
text-align: center;
diff --git a/src/app/pages/basic-data/aircraft/aircraft.component.ts b/src/app/pages/basic-data/aircraft/aircraft.component.ts
index 64bfb1f..54ecf56 100644
--- a/src/app/pages/basic-data/aircraft/aircraft.component.ts
+++ b/src/app/pages/basic-data/aircraft/aircraft.component.ts
@@ -2,12 +2,14 @@ import { Component, OnInit } from '@angular/core';
import { ChangeDetectorRef } from '@angular/core';
import { HttpClientService } from '../../../services/http-client.service';
import dateFormatter from '../../../utils/data-formatter';
+import { HttpParams } from '@angular/common/http';
+import * as $ from 'jquery';
@Component({
- selector: 'app-aircraft',
- templateUrl: './aircraft.component.html',
- styleUrls: ['./aircraft.component.scss']
-})
-export class AircraftComponent implements OnInit {
+ selector: 'app-aircraft',
+ templateUrl: './aircraft.component.html',
+ styleUrls: ['./aircraft.component.scss']
+ })
+ export class AircraftComponent implements OnInit {
constructor(
private httpCilent: HttpClientService,
@@ -22,22 +24,7 @@ public render_data: Array