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.
164 lines
8.2 KiB
164 lines
8.2 KiB
<div class="content"> |
|
<div class="leftBox"> |
|
<div class="bank"> |
|
<mat-icon (click)="showlist()" *ngIf="isshow">keyboard_arrow_down</mat-icon> |
|
<mat-icon (click)="showlist()" *ngIf="!isshow">chevron_right</mat-icon> |
|
<span>单位信息</span> |
|
<div class="btnBox"> |
|
<button mat-icon-button (click)="addunitinfo()"> |
|
<mat-icon>add_circle_outline</mat-icon> |
|
</button> |
|
<button mat-icon-button (click)="editunitinfo()"> |
|
<mat-icon>create</mat-icon> |
|
</button> |
|
<button mat-icon-button (click)="disableunit()"> |
|
<mat-icon>block</mat-icon> |
|
</button> |
|
<button mat-icon-button (click)="deleteunit()"> |
|
<mat-icon>delete</mat-icon> |
|
</button> |
|
</div> |
|
</div> |
|
<div *ngIf="isshow"> |
|
<div *ngFor="let item of allUnitInformation,let key=index" class="material" |
|
(click)='add(item,key)' [ngClass]="{'active': key === unitInformationIndex}" > |
|
<span class="overFlowText" [title]='item.name'>{{item.name}}</span> |
|
<mat-icon *ngIf="!item.enabled" class="blockBtn">block</mat-icon> |
|
</div> |
|
</div> |
|
|
|
</div> |
|
|
|
<div class="rightBox"> |
|
<div class="topBox"> |
|
<div class="originalScript"> |
|
<p *ngIf="unitInformation">{{unitInformation.name}}</p> |
|
<div> |
|
<button mat-raised-button color="primary" style="margin-left: 10px;" |
|
(click)="addgroups()"> |
|
新增分组 |
|
</button> |
|
<button mat-icon-button> |
|
<mat-icon (click)='groupingTop()'>arrow_upward</mat-icon> |
|
</button> |
|
<button mat-icon-button> |
|
<mat-icon (click)='groupingBottom()'>arrow_downward</mat-icon> |
|
</button> |
|
<!-- <button mat-raised-button color="primary">提交</button> --> |
|
</div> |
|
</div> |
|
|
|
<div class="tableBox" *ngFor="let item of allGrouping,let key=index" |
|
[ngClass]="{'twoLevel': item.css,'threeLevel':item.newcss}"> |
|
<div class="attribute"> |
|
<div class="attributeLeft"> |
|
<mat-checkbox (change)='groupingChange(item,key,$event)'></mat-checkbox> |
|
<span style="margin: 0 10px 0 10px;">{{item.name}}</span> |
|
|
|
<mat-icon mat-icon-button title="上移" (click)='attributeTop(item,key)'>arrow_upward</mat-icon> |
|
<mat-icon mat-icon-button title="下移" (click)='attributeBottom(item,key)'> |
|
arrow_downward |
|
</mat-icon> |
|
<mat-icon mat-icon-button (click)='submit(item,key)' title="保存">description</mat-icon> |
|
<mat-icon mat-icon-button title="编辑" (click)="editgroup(item,key)"> border_color</mat-icon> |
|
<mat-icon mat-icon-button title="可选"*ngIf="!item.isOptional" (click)='optional(item)'>star</mat-icon> |
|
<mat-icon mat-icon-button title="不可选" *ngIf="item.isOptional" (click)='optional(item)'>star_border</mat-icon> |
|
<mat-icon mat-icon-button title="启用" *ngIf="!item.enabled" style="color:#999" (click)="disablegroup(item)"> |
|
block |
|
</mat-icon> |
|
<mat-icon mat-icon-button title="禁用" *ngIf="item.enabled" style="color:red" (click)="disablegroup(item)"> |
|
block |
|
</mat-icon> |
|
<mat-icon mat-icon-button title="删除" (click)="deletegroup(item)">delete</mat-icon> |
|
</div> |
|
</div> |
|
|
|
<div> |
|
<table mat-table [dataSource]="item.propertyInfos"> |
|
|
|
<ng-container matColumnDef="checked"> |
|
<th mat-header-cell *matHeaderCellDef> |
|
<mat-icon title="创建" (click)='addGrouping(item,key)'>add_box</mat-icon> |
|
</th> |
|
<td mat-cell *matCellDef="let element"> |
|
<mat-checkbox (change)='attributeChange(element,key,$event)'></mat-checkbox> |
|
</td> |
|
</ng-container> |
|
|
|
<ng-container matColumnDef="name"> |
|
<th mat-header-cell *matHeaderCellDef>名称</th> |
|
<td mat-cell *matCellDef="let element"> |
|
{{element.propertyName}} |
|
</td> |
|
</ng-container> |
|
|
|
<ng-container matColumnDef="type"> |
|
<th mat-header-cell *matHeaderCellDef>类型</th> |
|
<td mat-cell *matCellDef="let element"> |
|
<label *ngIf="element.propertyType==0">单行文本</label> |
|
<label *ngIf="element.propertyType==1">多行文本</label> |
|
<label *ngIf="element.propertyType==2">数值</label> |
|
</td> |
|
</ng-container> |
|
|
|
<ng-container matColumnDef="default"> |
|
<th mat-header-cell *matHeaderCellDef>默认值</th> |
|
<td mat-cell *matCellDef="let element"> |
|
{{element.propertyValue}} |
|
</td> |
|
</ng-container> |
|
|
|
<ng-container matColumnDef="required"> |
|
<th mat-header-cell *matHeaderCellDef>必填</th> |
|
<td mat-cell *matCellDef="let element"> |
|
<label *ngIf="element.required">是</label> |
|
<label *ngIf="!element.required">否</label> |
|
</td> |
|
</ng-container> |
|
|
|
<ng-container matColumnDef="physicalUnit"> |
|
<th mat-header-cell *matHeaderCellDef>单位</th> |
|
<td mat-cell *matCellDef="let element"> |
|
{{element.physicalUnit}} |
|
</td> |
|
</ng-container> |
|
|
|
<ng-container matColumnDef="operation"> |
|
<th mat-header-cell *matHeaderCellDef>操作</th> |
|
<td mat-cell *matCellDef="let element"> |
|
<mat-icon title="编辑" (click)='editGrouping(item,key,element)'> |
|
border_color |
|
</mat-icon> |
|
<!-- <mat-icon title="显示" (click)='display(element)' |
|
*ngIf="!element.visible"> |
|
visibility |
|
</mat-icon> |
|
<mat-icon title="隐藏" (click)='noDisplay(element)' |
|
*ngIf="element.visible"> |
|
visibility_off |
|
</mat-icon> --> |
|
<mat-icon title="启用" (click)='enabledGrouping(element)' |
|
*ngIf="!element.enabled" style="color:#999"> |
|
block |
|
</mat-icon> |
|
<mat-icon title="禁用" (click)='noEnabledGrouping(element)' |
|
*ngIf="element.enabled" style="color:red"> |
|
block |
|
</mat-icon> |
|
<mat-icon title="删除" (click)='deleteGrouping(item,key,element.index)'> |
|
delete |
|
</mat-icon> |
|
</td> |
|
</ng-container> |
|
|
|
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr> |
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> |
|
</table> |
|
</div> |
|
</div> |
|
|
|
|
|
|
|
</div> |
|
</div> |
|
</div> |