atr-components 3.0.14 → 3.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3088,9 +3088,11 @@ class AtrTableComponent {
3088
3088
  initWidth() {
3089
3089
  this.tableHeight = this.tableContent.nativeElement.offsetHeight;
3090
3090
  this.tableWidth = this.tableContent.nativeElement.offsetWidth;
3091
+ let tempWidth = 0;
3091
3092
  this.queryOpts.tables.filter(item => item.isShow && !item.isLeft && !item.isRight).forEach(item => {
3092
- this.scrollX += item.width;
3093
+ tempWidth += item.width;
3093
3094
  });
3095
+ this.scrollX = tempWidth;
3094
3096
  //固定在左侧的最后一列不允许改变宽度 isLeft = true时
3095
3097
  //固定在右侧的第一列不允许改变宽度 isRight = true时
3096
3098
  let arr = this.queryOpts.tables.filter(item => item.isShow && !item.isLeft);
@@ -3602,6 +3604,15 @@ class AtrTableComponent {
3602
3604
  this.pageIndex = e;
3603
3605
  this.query();
3604
3606
  }
3607
+ setDates(res) {
3608
+ this.tableDatas = res.data;
3609
+ this.total = res?.page?.totalResult;
3610
+ this.loading = false;
3611
+ this.getRowSpan();
3612
+ this.mapOfCheckedId = {};
3613
+ this.curChecked = -1;
3614
+ this.refreshStatus();
3615
+ }
3605
3616
  query(reset = false) {
3606
3617
  let params = this.getQueryParams(reset);
3607
3618
  console.log('查询条件', params, this);
@@ -3618,12 +3629,7 @@ class AtrTableComponent {
3618
3629
  action["result"] = result;
3619
3630
  action["params"] = params;
3620
3631
  this.queryBack.emit(action);
3621
- this.total = result?.page?.totalResult;
3622
- this.tableDatas = result.data;
3623
- this.getRowSpan();
3624
- this.mapOfCheckedId = {};
3625
- this.curChecked = -1;
3626
- this.refreshStatus();
3632
+ this.setDates(result);
3627
3633
  }
3628
3634
  }, error => {
3629
3635
  this.loading = false;