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.
69 lines
3.1 KiB
69 lines
3.1 KiB
5 years ago
|
<div class="header">
|
||
|
<form #form="ngForm">
|
||
|
<div class="queryBox">
|
||
|
|
||
|
<div class="queryField"style="margin-right: 90px;">
|
||
|
<button type="button" mat-raised-button color="primary" (click)='open()'>创建教员</button>
|
||
|
</div>
|
||
|
|
||
|
<div class="queryField">
|
||
|
<label style="margin-right: 10px;">姓名:</label>
|
||
|
<input type="text" [(ngModel)]="name" name="name" autocomplete="off">
|
||
|
</div>
|
||
|
|
||
|
<div class="queryField">
|
||
|
<label style="margin-right: 10px;">帐号:</label>
|
||
|
<input type="text" [(ngModel)]="identityCard" name="identityCard" autocomplete="off">
|
||
|
</div>
|
||
|
<div class="btnbox" style="margin-left: 90px;">
|
||
|
<button mat-raised-button color="primary" (click)='initData()'>查询</button>
|
||
|
<button mat-raised-button style="margin-left: 10px;" type="button" (click)='empty()'>重置</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</form>
|
||
|
</div>
|
||
|
|
||
|
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
|
||
|
|
||
|
<ng-container matColumnDef="name">
|
||
|
<th mat-header-cell *matHeaderCellDef>姓名</th>
|
||
|
<td mat-cell *matCellDef="let element">{{element.realName}}</td>
|
||
|
</ng-container>
|
||
|
|
||
|
<ng-container matColumnDef="identitycard">
|
||
|
<th mat-header-cell *matHeaderCellDef>帐号</th>
|
||
|
<td mat-cell *matCellDef="let element">{{element.name}}</td>
|
||
|
</ng-container>
|
||
|
|
||
|
<ng-container matColumnDef="post">
|
||
|
<th mat-header-cell *matHeaderCellDef>职务</th>
|
||
|
<td mat-cell *matCellDef="let element">
|
||
|
<span *ngFor="let item of element.posts">
|
||
|
{{item.name}}
|
||
|
</span>
|
||
|
</td>
|
||
|
</ng-container>
|
||
|
|
||
|
<ng-container matColumnDef="operation">
|
||
|
<th mat-header-cell *matHeaderCellDef>操作</th>
|
||
|
<td mat-cell *matCellDef="let element">
|
||
|
<!-- <span class="operationSpan"><mat-icon class="icon">assessment</mat-icon><span class="spanbtn blue">查看学习记录</span></span> -->
|
||
|
<span class="operationSpan"><mat-icon class="icon">cached</mat-icon><span class="spanbtn blue" (click)="reset(element)">重置密码</span></span>
|
||
|
<span class="operationSpan"><mat-icon class="icon">edit</mat-icon><span class="spanbtn blue" (click)="edit(element)">修改</span></span>
|
||
|
<span *ngIf="element.enabled" class="operationSpan"><mat-icon class="icon" style="color: rgb(245, 34, 45);">remove_circle</mat-icon><span class="spanbtn blue" (click)="noEnabled(element)">禁用</span></span>
|
||
|
<span *ngIf="!element.enabled" class="operationSpan"><mat-icon class="icon" style="color: gray;">remove_circle</mat-icon><span class="spanbtn gray" (click)="enabled(element)">禁用</span></span>
|
||
|
<span class="operationSpan"><mat-icon class="icon">delete</mat-icon><span class="spanbtn red" (click)="delete(element)">删除</span></span>
|
||
|
</td>
|
||
|
</ng-container>
|
||
|
|
||
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||
|
</table>
|
||
|
<mat-paginator [length]="length"
|
||
|
[pageSize]="pageSize"
|
||
|
[pageSizeOptions]="pageSizeOptions"
|
||
|
(page)="chagePage($event)">
|
||
|
</mat-paginator>
|
||
|
|