历史数据定位功能重置定位数组修改
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="search-filter mb-3" #searchFilter>
|
||||
<div class="first-condition row">
|
||||
<div class="line-operator-left input-container mb-3 col-xlg-8 col-mlg-8 col-xl-8 col-lg-10">
|
||||
<select [(ngModel)]="SEL_COL" class="mr-4 form-control" name="" id="">
|
||||
<select [(ngModel)]="SEL_COL" class="mr-4 form-control" (ngModelChange)="resetPositionArray()" name="" id="">
|
||||
<option value="">选择列名</option>
|
||||
<option *ngFor="let airline_col of render_col_lists" [value]="airline_col.COL_CODE">{{airline_col.COL_CN}}</option>
|
||||
</select>
|
||||
@@ -15,7 +15,7 @@
|
||||
<input type="radio" [(ngModel)]="FLT_POS" [value]="2" name="filter-position">
|
||||
<span>查找定位</span>
|
||||
</label>
|
||||
<input class="form-control mr-4" [(ngModel)]="SEARCH" type="text" (keyup.enter)="inputEnter()">
|
||||
<input class="form-control mr-4" [(ngModel)]="SEARCH" (ngModelChange)="resetPositionArray()" type="text" (keyup.enter)="inputEnter()">
|
||||
<label for="">查询日期: </label>
|
||||
<input readonly style="background:transparent;cursor: pointer" type="text" id="selectDate" class="form-control">
|
||||
</div>
|
||||
|
||||
@@ -231,6 +231,11 @@ export class HistoricalDataComponent implements OnInit {
|
||||
$(".table-body tbody>tr").eq(0).find('td').each((index, element) => {
|
||||
$(".table-head table thead tr").eq(0).find('th').eq(index).attr('width', $(element).innerWidth() + 'px');
|
||||
})
|
||||
if (this.tableBody.nativeElement.scrollHeight <= (this.tableBody.nativeElement.innerHeight || this.tableBody.nativeElement.clientHeight)) {
|
||||
this.tableHead.nativeElement.style.overflowY = 'auto';
|
||||
} else {
|
||||
this.tableHead.nativeElement.style.overflowY = 'scroll';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -284,6 +289,8 @@ export class HistoricalDataComponent implements OnInit {
|
||||
*/
|
||||
refresh() {
|
||||
this.operateSpinServiceService.showSpin();
|
||||
this.positionedArray = []; //定位数组为清空
|
||||
this.positionArrayIndex = 0; //定位元素Index归零
|
||||
this.SEARCH = ''; //手动输入条件
|
||||
this.FLT_POS = 1; //过滤还是定位
|
||||
this.SEL_COL = ''; //选择列名
|
||||
@@ -726,6 +733,14 @@ export class HistoricalDataComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置定位数组
|
||||
*/
|
||||
resetPositionArray() {
|
||||
this.positionedArray = [];
|
||||
this.positionArrayIndex = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 选中某行
|
||||
* @param i
|
||||
|
||||
@@ -295,6 +295,11 @@ export class MainComponent implements OnInit {
|
||||
$(".table-body tbody>tr").eq(0).find('td').each((index, element) => {
|
||||
$(".table-head table thead tr").eq(0).find('th').eq(index).attr('width', $(element).innerWidth() + 'px');
|
||||
})
|
||||
if (this.tableBody.nativeElement.scrollHeight <= (this.tableBody.nativeElement.innerHeight || this.tableBody.nativeElement.clientHeight)) {
|
||||
this.tableHead.nativeElement.style.overflowY = 'auto';
|
||||
} else {
|
||||
this.tableHead.nativeElement.style.overflowY = 'scroll';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -318,6 +318,11 @@ export class SeasonalPlanComponent implements OnInit {
|
||||
$(".table-body tbody>tr").eq(0).find('td').each((index, element) => {
|
||||
$(".table-head table thead tr").eq(0).find('th').eq(index).attr('width', $(element).innerWidth() + 'px');
|
||||
})
|
||||
if (this.tableBody.nativeElement.scrollHeight <= (this.tableBody.nativeElement.innerHeight || this.tableBody.nativeElement.clientHeight)) {
|
||||
this.tableHead.nativeElement.style.overflowY = 'auto';
|
||||
} else {
|
||||
this.tableHead.nativeElement.style.overflowY = 'scroll';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user