添加时间段筛选
This commit is contained in:
@@ -101,6 +101,42 @@
|
||||
<option *ngFor="let anget of flightAgents" [value]="anget.oGId">{{anget.flightAgentName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-container mr-4">
|
||||
<label for="">前时间段: </label>
|
||||
<select [(ngModel)]="filterItems.Start_time" (ngModelChange)="selectChange()" class="form-control">
|
||||
<option value=""></option>
|
||||
<option value="1">前1小时</option>
|
||||
<option value="2">前2小时</option>
|
||||
<option value="3">前3小时</option>
|
||||
<option value="4">前4小时</option>
|
||||
<option value="5">前5小时</option>
|
||||
<option value="6">前6小时</option>
|
||||
<option value="7">前7小时</option>
|
||||
<option value="8">前8小时</option>
|
||||
<option value="9">前9小时</option>
|
||||
<option value="10">前10小时</option>
|
||||
<option value="11">前11小时</option>
|
||||
<option value="12">前12小时</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-container mr-4">
|
||||
<label for="">后时间段: </label>
|
||||
<select [(ngModel)]="filterItems.End_time" (ngModelChange)="selectChange()" class="form-control">
|
||||
<option value=""></option>
|
||||
<option value="1">前1小时</option>
|
||||
<option value="2">前2小时</option>
|
||||
<option value="3">前3小时</option>
|
||||
<option value="4">前4小时</option>
|
||||
<option value="5">前5小时</option>
|
||||
<option value="6">前6小时</option>
|
||||
<option value="7">前7小时</option>
|
||||
<option value="8">前8小时</option>
|
||||
<option value="9">前9小时</option>
|
||||
<option value="10">前10小时</option>
|
||||
<option value="11">前11小时</option>
|
||||
<option value="12">前12小时</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div [ngClass]="{'filterClose-c':filterClose,'filterClose-o':!filterClose}" class="third-condition row">
|
||||
|
||||
@@ -398,6 +398,8 @@ export class MainComponent implements OnInit {
|
||||
FTSS: '', //运营状态
|
||||
TRML: '', //航站楼
|
||||
Abnormal_state: '', //异常状态
|
||||
Start_time: '',
|
||||
End_time: '',
|
||||
FHAG: '', //机坪代理
|
||||
MHAG: '', //维护代理
|
||||
PHAG: '', //旅客代理
|
||||
@@ -462,6 +464,8 @@ export class MainComponent implements OnInit {
|
||||
FTSS: '', //运营状态
|
||||
TRML: '', //航站楼
|
||||
Abnormal_state: '', //异常状态
|
||||
Start_time: '',
|
||||
End_time: '',
|
||||
FHAG: '', //机坪代理
|
||||
MHAG: '', //维护代理
|
||||
PHAG: '', //旅客代理
|
||||
@@ -503,6 +507,26 @@ export class MainComponent implements OnInit {
|
||||
is_satis = false;
|
||||
break;
|
||||
}
|
||||
} else if (key === 'Start_time') {
|
||||
let planTime = new Date(dateFormatter(item['preFlight']['SODT'])).getTime();
|
||||
let nowTime = new Date().getTime();
|
||||
if (nowTime - planTime > +filterItems[key] * 60 * 60 * 1000) {
|
||||
is_satis = false;
|
||||
break;
|
||||
} else {
|
||||
is_satis = true;
|
||||
continue;
|
||||
}
|
||||
} else if (key === 'End_time') {
|
||||
let planTime = new Date(dateFormatter(item['preFlight']['SODT'])).getTime();
|
||||
let nowTime = new Date().getTime();
|
||||
if (planTime - nowTime > +filterItems[key] * 60 * 60 * 1000) {
|
||||
is_satis = false;
|
||||
break;
|
||||
} else {
|
||||
is_satis = true;
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (item['preFlight'][key] === filterItems[key]) {
|
||||
is_satis = true;
|
||||
@@ -527,6 +551,26 @@ export class MainComponent implements OnInit {
|
||||
is_satis = false;
|
||||
break;
|
||||
}
|
||||
} else if (key === 'Start_time') {
|
||||
let planTime = new Date(dateFormatter(item['reaFlight']['SODT'])).getTime();
|
||||
let nowTime = new Date().getTime();
|
||||
if (nowTime - planTime > +filterItems[key] * 60 * 60 * 1000) {
|
||||
is_satis = false;
|
||||
break;
|
||||
} else {
|
||||
is_satis = true;
|
||||
continue;
|
||||
}
|
||||
} else if (key === 'End_time') {
|
||||
let planTime = new Date(dateFormatter(item['reaFlight']['SODT'])).getTime();
|
||||
let nowTime = new Date().getTime();
|
||||
if (planTime - nowTime > +filterItems[key] * 60 * 60 * 1000) {
|
||||
is_satis = false;
|
||||
break;
|
||||
} else {
|
||||
is_satis = true;
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (item['reaFlight'][key] === filterItems[key]) {
|
||||
is_satis = true;
|
||||
@@ -552,6 +596,26 @@ export class MainComponent implements OnInit {
|
||||
pre_satis = false;
|
||||
break;
|
||||
}
|
||||
} else if (key === 'Start_time') {
|
||||
let planTime = new Date(dateFormatter(item['preFlight']['SODT'])).getTime();
|
||||
let nowTime = new Date().getTime();
|
||||
if (nowTime - planTime > +filterItems[key] * 60 * 60 * 1000) {
|
||||
pre_satis = false;
|
||||
break;
|
||||
} else {
|
||||
pre_satis = true;
|
||||
continue;
|
||||
}
|
||||
} else if (key === 'End_time') {
|
||||
let planTime = new Date(dateFormatter(item['preFlight']['SODT'])).getTime();
|
||||
let nowTime = new Date().getTime();
|
||||
if (planTime - nowTime > +filterItems[key] * 60 * 60 * 1000) {
|
||||
pre_satis = false;
|
||||
break;
|
||||
} else {
|
||||
pre_satis = true;
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (item['preFlight'][key] === filterItems[key]) {
|
||||
pre_satis = true;
|
||||
@@ -573,6 +637,26 @@ export class MainComponent implements OnInit {
|
||||
rea_satis = false;
|
||||
break;
|
||||
}
|
||||
} else if (key === 'Start_time') {
|
||||
let planTime = new Date(dateFormatter(item['reaFlight']['SODT'])).getTime();
|
||||
let nowTime = new Date().getTime();
|
||||
if (nowTime - planTime > +filterItems[key] * 60 * 60 * 1000) {
|
||||
rea_satis = false;
|
||||
break;
|
||||
} else {
|
||||
rea_satis = true;
|
||||
continue;
|
||||
}
|
||||
} else if (key === 'End_time') {
|
||||
let planTime = new Date(dateFormatter(item['reaFlight']['SODT'])).getTime();
|
||||
let nowTime = new Date().getTime();
|
||||
if (planTime - nowTime > +filterItems[key] * 60 * 60 * 1000) {
|
||||
rea_satis = false;
|
||||
break;
|
||||
} else {
|
||||
rea_satis = true;
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (item['reaFlight'][key] === filterItems[key]) {
|
||||
rea_satis = true;
|
||||
|
||||
Reference in New Issue
Block a user