上海预案管理平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

42 lines
2.1 KiB

<div style="height: 100%; overflow-y: auto;">
<button mat-raised-button color="primary" (click)="createuser()" style=" margin: 10px">创建角色</button>
<table mat-table [dataSource]="dataSource">
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef> 角色名称 </th>
<td mat-cell *matCellDef="let roledata"> {{roledata.name}} </td>
</ng-container>
<ng-container matColumnDef="createtiome">
<th mat-header-cell *matHeaderCellDef> 创建/修改时间 </th>
<td mat-cell *matCellDef="let roledata"> {{roledata.creationTime | time }} </td>
</ng-container>
<ng-container matColumnDef="enabled">
<th mat-header-cell *matHeaderCellDef> 是否启用 </th>
<td mat-cell *matCellDef="let roledata"> {{roledata.enabled | isno}} </td>
</ng-container>
<ng-container matColumnDef="edit">
<th mat-header-cell *matHeaderCellDef> 操作 </th>
<td mat-cell *matCellDef="let roledata">
<!-- <button mat-raised-button (click)="edituser(roledata)">编辑</button> -->
<button mat-icon-button class="up" (click)="up(roledata)" [disabled]="!roledata.isTop?false:true"><mat-icon>arrow_upward</mat-icon></button>
<button mat-icon-button class="down" (click)="down(roledata)" [disabled]="!roledata.isBottom?false:true"><mat-icon>arrow_downward</mat-icon></button>
<button mat-raised-button (click)="allot(roledata)" color="primary">编辑</button>
<button mat-raised-button (click)="open(roledata)" *ngIf="!roledata.enabled">启用</button>
<button mat-raised-button (click)="open(roledata)" *ngIf="roledata.enabled" color="warn">禁用</button>
<button mat-raised-button (click)="deleteduser(roledata)" color="warn">删除</button>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<!-- <mat-paginator [pageSizeOptions]="[5, 10, 20]" showFirstLastButtons></mat-paginator> -->
</div>