Browse Source

[完善]固定表头

tangshan
邵佳豪 3 years ago
parent
commit
ddd065563a
  1. 38631
      package-lock.json
  2. 23
      src/app/statistic-analysis/combined-query/combined-query.component.html
  3. 21
      src/app/statistic-analysis/combined-query/combined-query.component.scss
  4. 4
      src/app/statistic-analysis/combined-query/combined-query.component.ts

38631
package-lock.json generated

File diff suppressed because it is too large Load Diff

23
src/app/statistic-analysis/combined-query/combined-query.component.html

@ -131,7 +131,7 @@
</form>
<mat-divider></mat-divider>
<div class="body">
<div class="tablebox" id="table">
<div class="tablehead">
<table cellpadding="0" cellspacing="0" *ngIf="preparelevels==0&&!tableDataNull">
<thead>
<th *ngFor="let item of displayedColumns;let i=index">{{item}}<img *ngIf="i==0 && orRecord.length !=0"
@ -139,6 +139,19 @@
src="../../../assets/images/back.png" alt="">
</th>
</thead>
</table>
<table cellpadding="0" cellspacing="0" *ngIf="preparelevels==1&&!tableDataNull">
<thead>
<th *ngFor="let item of yuanColumns;let i=index">{{item}}<img *ngIf="i==0 && orRecord.length !=0"
style="cursor: pointer;vertical-align: middle;margin-bottom: 2px;" (click)="goBack()"
src="../../../assets/images/back.png" alt="">
</th>
</thead>
</table>
<span *ngIf="tableDataNull">暂无数据</span>
</div>
<div class="tablebox" id="table">
<table cellpadding="0" cellspacing="0" *ngIf="preparelevels==0&&!tableDataNull">
<tbody>
<tr *ngFor="let element of tabledataSource">
<td *ngFor="let eletd of element.name;let key = index" [ngClass]="{'pointer': key == 0}"
@ -148,12 +161,6 @@
</table>
<table cellpadding="0" cellspacing="0" *ngIf="preparelevels==1&&!tableDataNull">
<thead>
<th *ngFor="let item of yuanColumns;let i=index">{{item}}<img *ngIf="i==0 && orRecord.length !=0"
style="cursor: pointer;vertical-align: middle;margin-bottom: 2px;" (click)="goBack()"
src="../../../assets/images/back.png" alt="">
</th>
</thead>
<tbody>
<tr *ngFor="let element of yuanTable">
<td *ngFor="let eletd of element.name;let key = index" [ngClass]="{'pointer': key == 0}"
@ -170,4 +177,4 @@
</ng-template>
</mat-tab>
</mat-tab-group>
</div>
</div>

21
src/app/statistic-analysis/combined-query/combined-query.component.scss

@ -131,13 +131,30 @@
align-items: center;
justify-content: center;
}
.tablehead{
table {
width: 100%;
background-color: white;
table-layout: fixed;
thead,
tr {
border-bottom: 1px solid grey;
}
th {
border-bottom: 1px solid #999;
font-size: 16px;
text-align: center;
height: 60px;
line-height: 60px;
}
}
}
.tablebox {
height: 620px;
height: 565px;
overflow-y: auto;
table {
width: 100%;
background-color: white;
margin-top: 15px;
table-layout: fixed;
thead,

4
src/app/statistic-analysis/combined-query/combined-query.component.ts

@ -105,6 +105,7 @@ export class CombinedQueryComponent implements OnInit {
}
async ngOnInit(): Promise<void> {
await this.getunitdata();
await this.getOrganizations();
await this.getUnittype();
@ -118,6 +119,9 @@ export class CombinedQueryComponent implements OnInit {
this.reservePlanType = ['1', '2', '4', '16']
this.planCategory = ['1', '2', '3', '4', '5']
this.getAllPlanInfo();
}

Loading…
Cancel
Save