4 changed files with 57 additions and 55 deletions
@ -1,55 +1,57 @@
|
||||
<div class="unittypeHeader"> |
||||
<div style="width: 100%;height: 100%;overflow-y: auto;"> |
||||
<div class="unittypeHeader"> |
||||
<button mat-raised-button color="primary" (click)='open()' class="left">创建单位</button> |
||||
</div> |
||||
</div> |
||||
|
||||
<div> |
||||
<table mat-table [dataSource]="dataSource"class="mat-elevation-z8"> |
||||
|
||||
<ng-container matColumnDef="company"> |
||||
<th mat-header-cell *matHeaderCellDef>单位类型</th> |
||||
<td mat-cell *matCellDef="let element">{{element.name}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="template"> |
||||
<th mat-header-cell *matHeaderCellDef>单位信息模板</th> |
||||
<td mat-cell *matCellDef="let element">{{element.basicCategoryName}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="fireControl"> |
||||
<th mat-header-cell *matHeaderCellDef>消防要素模板</th> |
||||
<td mat-cell *matCellDef="let element">{{element.fireCategoryName}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="facilityCategory"> |
||||
<th mat-header-cell *matHeaderCellDef>消防设施模板</th> |
||||
<td mat-cell *matCellDef="let element">{{element.facilityCategoryName}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="operation"> |
||||
<th mat-header-cell *matHeaderCellDef>操作</th> |
||||
<td mat-cell *matCellDef="let element"> |
||||
<div > |
||||
<table mat-table [dataSource]="dataSource"class="mat-elevation-z8"> |
||||
|
||||
<button mat-raised-button color="primary" class="marginLeft" (click)='edit(element)'> |
||||
编辑 |
||||
</button> |
||||
|
||||
<button mat-raised-button color="primary" *ngIf=!element.enabled |
||||
(click)='enabled(element)' class="marginLeft"> |
||||
启用 |
||||
</button> |
||||
<button mat-raised-button color="warn" *ngIf=element.enabled |
||||
(click)='prohibit(element)'class="marginLeft"> |
||||
禁用 |
||||
</button> |
||||
<button mat-raised-button color="warn" (click)='delete(element.id)'class="marginLeft"> |
||||
删除 |
||||
</button> |
||||
|
||||
</td> |
||||
</ng-container> |
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> |
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> |
||||
|
||||
</table> |
||||
</div> |
||||
<ng-container matColumnDef="company"> |
||||
<th mat-header-cell *matHeaderCellDef>单位类型</th> |
||||
<td mat-cell *matCellDef="let element">{{element.name}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="template"> |
||||
<th mat-header-cell *matHeaderCellDef>单位信息模板</th> |
||||
<td mat-cell *matCellDef="let element">{{element.basicCategoryName}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="fireControl"> |
||||
<th mat-header-cell *matHeaderCellDef>消防要素模板</th> |
||||
<td mat-cell *matCellDef="let element">{{element.fireCategoryName}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="facilityCategory"> |
||||
<th mat-header-cell *matHeaderCellDef>消防设施模板</th> |
||||
<td mat-cell *matCellDef="let element">{{element.facilityCategoryName}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="operation"> |
||||
<th mat-header-cell *matHeaderCellDef>操作</th> |
||||
<td mat-cell *matCellDef="let element"> |
||||
|
||||
<button mat-raised-button color="primary" class="marginLeft" (click)='edit(element)'> |
||||
编辑 |
||||
</button> |
||||
|
||||
<button mat-raised-button color="primary" *ngIf=!element.enabled |
||||
(click)='enabled(element)' class="marginLeft"> |
||||
启用 |
||||
</button> |
||||
<button mat-raised-button color="warn" *ngIf=element.enabled |
||||
(click)='prohibit(element)'class="marginLeft"> |
||||
禁用 |
||||
</button> |
||||
<button mat-raised-button color="warn" (click)='delete(element.id)'class="marginLeft"> |
||||
删除 |
||||
</button> |
||||
|
||||
</td> |
||||
</ng-container> |
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> |
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> |
||||
|
||||
</table> |
||||
</div> |
||||
</div> |
||||
|
After Width: | Height: | Size: 33 KiB |
Loading…
Reference in new issue