Browse Source

[完善]修改表格样式

dev
邵佳豪 3 years ago
parent
commit
767c86db02
  1. 12
      src/app/pages/plan-admin/plan-admin.component.html
  2. 10
      src/app/pages/plan-admin/plan-admin.component.scss
  3. 42
      src/theme.less

12
src/app/pages/plan-admin/plan-admin.component.html

@ -5,9 +5,9 @@
<app-title [name]="'组织机构'"></app-title> <app-title [name]="'组织机构'"></app-title>
</div> </div>
<div class="or"> <div class="or">
<nz-tree [nzExpandedKeys]="nzExpandedKeys" [nzShowExpand]="false" #nzTreeComponent <nz-tree [nzExpandedKeys]="nzExpandedKeys" [nzShowExpand]="false" #nzTreeComponent [nzExpandAll]="nzExpandAll"
[nzExpandAll]="nzExpandAll" nzBlockNode [nzData]="nodes" (nzClick)="activeNode($event)" nzBlockNode [nzData]="nodes" (nzClick)="activeNode($event)" [nzTreeTemplate]="nzTreeTemplate"
[nzTreeTemplate]="nzTreeTemplate" [nzMultiple]="false"></nz-tree> [nzMultiple]="false"></nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin"> <ng-template #nzTreeTemplate let-node let-origin="origin">
<ng-container *ngIf="node.origin.parentId == null; else elseTemplate"> <ng-container *ngIf="node.origin.parentId == null; else elseTemplate">
<img style="vertical-align: bottom;" src="../../../assets/images/flower.png" alt=""> <img style="vertical-align: bottom;" src="../../../assets/images/flower.png" alt="">
@ -55,7 +55,7 @@
<nz-table #basicTable [nzData]="list" [nzShowPagination]="false"> <nz-table #basicTable [nzData]="list" [nzShowPagination]="false">
<thead> <thead>
<tr> <tr>
<th>加油站名称</th> <th style="text-align: center;">加油站名称</th>
<th>区域</th> <th>区域</th>
<th>所属公司</th> <th>所属公司</th>
<th>联系人</th> <th>联系人</th>
@ -70,7 +70,7 @@
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data"> <tr *ngFor="let data of basicTable.data">
<th>加油站名称</th> <th style="text-align: center;">加油站名称</th>
<th>区域</th> <th>区域</th>
<th>所属公司</th> <th>所属公司</th>
<th>联系人</th> <th>联系人</th>
@ -80,7 +80,7 @@
<th>油机数量</th> <th>油机数量</th>
<th>车道数量</th> <th>车道数量</th>
<th>油罐容积</th> <th>油罐容积</th>
<th (click)="look()">查看</th> <th class="look" (click)="look()" style="cursor:pointer;color: #36A2FF">查看</th>
</tr> </tr>
</tbody> </tbody>
</nz-table> </nz-table>

10
src/app/pages/plan-admin/plan-admin.component.scss

@ -29,7 +29,7 @@
nz-tree { nz-tree {
background: none; background: none;
color: #C4E2FC; color: #c4e2fc;
} }
} }
} }
@ -57,7 +57,7 @@
input { input {
background: none; background: none;
border: 1px solid #91CCFF; border: 1px solid #91ccff;
color: #fff; color: #fff;
} }
@ -70,8 +70,6 @@
margin-left: 16px; margin-left: 16px;
} }
} }
} }
.tablebox { .tablebox {
@ -80,9 +78,6 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
overflow: hidden; overflow: hidden;
.pagination { .pagination {
margin-top: 26px; margin-top: 26px;
display: flex; display: flex;
@ -93,6 +88,5 @@
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 0px; width: 0px;
} }
} }
} }

42
src/theme.less

@ -298,53 +298,55 @@
margin-left: 0px; margin-left: 0px;
} }
} }
.ant-table table{
.ant-table table {
border-collapse: collapse; border-collapse: collapse;
} }
nz-table { nz-table {
flex: 1; flex: 1;
width: 96%; width: 96%;
display: flex; }
flex-direction: column;
overflow: hidden;
background: none;
.ant-table { .ant-table {
background: none; background: none;
} }
thead { .ant-table-thead>tr {
tr {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
background: rgba(35, 153, 255, 0.2); background: rgba(35, 153, 255, 0.2);
border: 1px solid rgba(35, 217, 255, 0.4); border: 1px solid rgba(35, 217, 255, 0.4);
box-shadow: 0 0 3px 0 rgba(35, 217, 255, 0.4) inset; box-shadow: 0 0 3px 0 rgba(35, 217, 255, 0.4) inset;
th { }
text-align: left;
padding: 0;
background: none;
.ant-table-thead>tr>th {
background: none;
border-bottom: none;
padding: 0;
color: #23D9FF; color: #23D9FF;
} }
}
}
tbody { .ant-table-tbody>tr {
flex: 1;
overflow-y: auto;
tr {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
border-bottom: 1px solid #0d3761; border-bottom: 1px solid #0d3761;
}
.ant-table-tbody>tr>th {
font-weight: 400;
font-family: synormal;
background: none;
border-bottom: none;
padding: 0;
color: #91CCFF; color: #91CCFF;
}
.look { .look {
color: #36A2FF; color: #36A2FF;
cursor: pointer; cursor: pointer;
} }
}
}
}
} }

Loading…
Cancel
Save