航班号相同点击会同时选中两条
This commit is contained in:
@@ -179,7 +179,7 @@
|
||||
<table #tableContent id="table" class="table table-striped">
|
||||
<tbody>
|
||||
<tr *ngFor="let airline_row of render_data;let i = index" (click)="selectRow(airline_row)"
|
||||
[ngClass]="{'selected':row_state['renderFlight']['FLNO']===airline_row['renderFlight']['FLNO']}">
|
||||
[ngClass]="{'selected':getSelectedRow(airline_row)}">
|
||||
<td style="min-width:55px">{{start+i+1}}</td>
|
||||
<td style="min-width:120px">
|
||||
<img class="mr-2" *ngIf="getVipNotes(airline_row)" src="/adminweb/assets/images/important-notes/vip.png"
|
||||
|
||||
@@ -840,6 +840,43 @@ export class MainComponent implements OnInit {
|
||||
this.row_state = i;
|
||||
}
|
||||
|
||||
/**
|
||||
* getSelectedRow(airline_row)
|
||||
*/
|
||||
getSelectedRow(flight) {
|
||||
if (flight['preFlight'] && !flight['reaFlight']) {
|
||||
if (this.row_state['preFlight'] && !this.row_state['reaFlight']) {
|
||||
if (flight['preFlight']['FLID'] === this.row_state['preFlight']['FLID']) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else if (!flight['preFlight'] && flight['reaFlight']) {
|
||||
if (!this.row_state['preFlight'] && this.row_state['reaFlight']) {
|
||||
if (flight['reaFlight']['FLID'] === this.row_state['reaFlight']['FLID']) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
if (this.row_state['preFlight'] && this.row_state['reaFlight']) {
|
||||
if ((flight['preFlight']['FLID'] === this.row_state['preFlight']['FLID'])&&(flight['reaFlight']['FLID'] === this.row_state['reaFlight']['FLID'])) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前单元格颜色
|
||||
* @param col_CODE
|
||||
|
||||
Reference in New Issue
Block a user