历史数据定位功能重置定位数组修改

This commit is contained in:
zhouyuejun
2019-02-19 10:28:32 +08:00
parent f947b8451c
commit a5263a18fe
4 changed files with 27 additions and 2 deletions
@@ -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