21 changed files with 953 additions and 347 deletions
@ -1,45 +1,47 @@
|
||||
<div mat-dialog-title>编辑消防要素模板</div> |
||||
<div class="dialogBox"> |
||||
<div mat-dialog-title>编辑消防要素模板</div> |
||||
|
||||
<div> |
||||
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm"> |
||||
<mat-form-field> |
||||
<input matInput placeholder="消防要素模板名称" [(ngModel)]="fireName" |
||||
name='name' required> |
||||
</mat-form-field> |
||||
<div> |
||||
<!-- <mat-checkbox>全选</mat-checkbox> --> |
||||
<label>请选择消防要素</label> |
||||
</div> |
||||
|
||||
<div class="tree"> |
||||
<mat-tree [dataSource]="newDataSource" [treeControl]="treeControl"> |
||||
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding> |
||||
<button mat-icon-button disabled ></button> |
||||
<mat-checkbox (change)='changed($event,node.id)' [checked]='node.checked'> |
||||
{{node.name}} |
||||
</mat-checkbox> |
||||
</mat-tree-node> |
||||
|
||||
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding> |
||||
<button mat-icon-button type="button" |
||||
[attr.aria-label]="'toggle ' + node.name"> |
||||
<mat-icon class="mat-icon-rtl-mirror"> |
||||
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}} |
||||
</mat-icon> |
||||
</button> |
||||
<mat-checkbox (change)='changed($event,node.id)' [checked]='node.checked'> |
||||
{{node.name}} |
||||
</mat-checkbox> |
||||
</mat-tree-node> |
||||
</mat-tree> |
||||
</div> |
||||
|
||||
<div mat-dialog-actions> |
||||
<button mat-raised-button color="primary" type="submit" |
||||
[disabled]="!form.form.valid"> |
||||
确定 |
||||
</button> |
||||
<button mat-raised-button mat-dialog-close>取消</button> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
<div> |
||||
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm"> |
||||
<mat-form-field> |
||||
<input matInput placeholder="消防要素模板名称" [(ngModel)]="fireName" |
||||
name='name' required> |
||||
</mat-form-field> |
||||
<div> |
||||
<!-- <mat-checkbox>全选</mat-checkbox> --> |
||||
<label>请选择消防要素</label> |
||||
</div> |
||||
|
||||
<div class="tree"> |
||||
<mat-tree [dataSource]="newDataSource" [treeControl]="treeControl"> |
||||
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding> |
||||
<button mat-icon-button disabled ></button> |
||||
<mat-checkbox (change)='changed($event,node.id)' [checked]='node.checked'> |
||||
{{node.name}} |
||||
</mat-checkbox> |
||||
</mat-tree-node> |
||||
|
||||
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding> |
||||
<button mat-icon-button type="button" |
||||
[attr.aria-label]="'toggle ' + node.name"> |
||||
<mat-icon class="mat-icon-rtl-mirror"> |
||||
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}} |
||||
</mat-icon> |
||||
</button> |
||||
<mat-checkbox (change)='changed($event,node.id)' [checked]='node.checked'> |
||||
{{node.name}} |
||||
</mat-checkbox> |
||||
</mat-tree-node> |
||||
</mat-tree> |
||||
</div> |
||||
|
||||
<div mat-dialog-actions> |
||||
<button mat-raised-button color="primary" type="submit" |
||||
[disabled]="!form.form.valid"> |
||||
确定 |
||||
</button> |
||||
<button mat-raised-button mat-dialog-close>取消</button> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
|
@ -1,44 +1,46 @@
|
||||
<div mat-dialog-title>创建消防要素模板</div> |
||||
<div class="dialogBox"> |
||||
<div mat-dialog-title>创建消防要素模板</div> |
||||
|
||||
<div> |
||||
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm"> |
||||
<mat-form-field> |
||||
<input matInput placeholder="消防要素模板名称" ngModel name='name' required> |
||||
</mat-form-field> |
||||
<div> |
||||
<!-- <mat-checkbox>全选</mat-checkbox> --> |
||||
<label>请选择消防要素</label> |
||||
</div> |
||||
|
||||
<div class="tree"> |
||||
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl"> |
||||
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding> |
||||
<button mat-icon-button disabled ></button> |
||||
<mat-checkbox (change)='changed($event,node.id)'> |
||||
{{node.name}} |
||||
</mat-checkbox> |
||||
</mat-tree-node> |
||||
|
||||
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding> |
||||
<button mat-icon-button type="button" |
||||
[attr.aria-label]="'toggle ' + node.name"> |
||||
<mat-icon class="mat-icon-rtl-mirror"> |
||||
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}} |
||||
</mat-icon> |
||||
</button> |
||||
<mat-checkbox (change)='changed($event,node.id)'> |
||||
{{node.name}} |
||||
</mat-checkbox> |
||||
</mat-tree-node> |
||||
</mat-tree> |
||||
</div> |
||||
|
||||
<div mat-dialog-actions> |
||||
<button mat-raised-button color="primary" type="submit" |
||||
[disabled]="!form.form.valid"> |
||||
确定 |
||||
</button> |
||||
<button mat-raised-button mat-dialog-close>取消</button> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
<div> |
||||
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm"> |
||||
<mat-form-field> |
||||
<input matInput placeholder="消防要素模板名称" ngModel name='name' required> |
||||
</mat-form-field> |
||||
<div> |
||||
<!-- <mat-checkbox>全选</mat-checkbox> --> |
||||
<label>请选择消防要素</label> |
||||
</div> |
||||
|
||||
<div class="tree"> |
||||
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl"> |
||||
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding> |
||||
<button mat-icon-button disabled ></button> |
||||
<mat-checkbox (change)='changed($event,node.id)'> |
||||
{{node.name}} |
||||
</mat-checkbox> |
||||
</mat-tree-node> |
||||
|
||||
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding> |
||||
<button mat-icon-button type="button" |
||||
[attr.aria-label]="'toggle ' + node.name"> |
||||
<mat-icon class="mat-icon-rtl-mirror"> |
||||
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}} |
||||
</mat-icon> |
||||
</button> |
||||
<mat-checkbox (change)='changed($event,node.id)'> |
||||
{{node.name}} |
||||
</mat-checkbox> |
||||
</mat-tree-node> |
||||
</mat-tree> |
||||
</div> |
||||
|
||||
<div mat-dialog-actions> |
||||
<button mat-raised-button color="primary" type="submit" |
||||
[disabled]="!form.form.valid"> |
||||
确定 |
||||
</button> |
||||
<button mat-raised-button mat-dialog-close>取消</button> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
|
@ -1,117 +1,120 @@
|
||||
<div class="header"> |
||||
<form #form="ngForm"> |
||||
<div class="queryBox"> |
||||
|
||||
<div class="queryField"> |
||||
<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)]="userLogin" name="userLogin"> |
||||
</div> |
||||
|
||||
<div class="queryField"> |
||||
<label style="margin-right: 10px;">用户姓名:</label> |
||||
<input type="text" [(ngModel)]="userName" name="userName"> |
||||
</div> |
||||
|
||||
<div class="queryField" style="position: relative;"> |
||||
<label style="margin-right: 10px;">所属机构:</label> |
||||
<input type="text" [(ngModel)]="js" name="userMechanism" (click)="stopclose($event)" readonly autocomplete="off" (focus)="openorganizationbox()"> |
||||
|
||||
<div class="organizationbox" *ngIf="isorganizationbox"> |
||||
<div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div> |
||||
<mat-tree [dataSource]="treedataSource" [treeControl]="treeControl"> |
||||
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='add(node)' class="organizationlist"> |
||||
<button type="button" mat-icon-button disabled ></button> |
||||
<li>{{node.name}}</li> |
||||
</mat-tree-node> |
||||
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)='add(node)' class="organizationlist"> |
||||
<button |
||||
type="button" |
||||
mat-icon-button |
||||
matTreeNodeToggle |
||||
[attr.aria-label]="'toggle ' + node.name"> |
||||
<mat-icon class="mat-icon-rtl-mirror"> |
||||
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}} |
||||
</mat-icon> |
||||
</button> |
||||
<li>{{node.name}}</li> |
||||
</mat-tree-node> |
||||
</mat-tree> |
||||
<div class="box"> |
||||
<div class="header"> |
||||
<form #form="ngForm"> |
||||
<div class="queryBox"> |
||||
|
||||
<div class="queryField"> |
||||
<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)]="userLogin" name="userLogin"> |
||||
</div> |
||||
|
||||
<div class="queryField"> |
||||
<label style="margin-right: 10px;">用户姓名:</label> |
||||
<input type="text" [(ngModel)]="userName" name="userName"> |
||||
</div> |
||||
|
||||
|
||||
<div class="queryField" style="position: relative;"> |
||||
<label style="margin-right: 10px;">所属机构:</label> |
||||
<input type="text" [(ngModel)]="js" name="userMechanism" (click)="stopclose($event)" readonly autocomplete="off" (focus)="openorganizationbox()"> |
||||
|
||||
<div class="organizationbox" *ngIf="isorganizationbox"> |
||||
<div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div> |
||||
<mat-tree [dataSource]="treedataSource" [treeControl]="treeControl"> |
||||
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='add(node)' class="organizationlist"> |
||||
<button type="button" mat-icon-button disabled ></button> |
||||
<li>{{node.name}}</li> |
||||
</mat-tree-node> |
||||
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)='add(node)' class="organizationlist"> |
||||
<button |
||||
type="button" |
||||
mat-icon-button |
||||
matTreeNodeToggle |
||||
[attr.aria-label]="'toggle ' + node.name"> |
||||
<mat-icon class="mat-icon-rtl-mirror"> |
||||
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}} |
||||
</mat-icon> |
||||
</button> |
||||
<li>{{node.name}}</li> |
||||
</mat-tree-node> |
||||
</mat-tree> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
</div> |
||||
<div style="width: 100%;text-align: center;"> |
||||
<button mat-raised-button color="primary" (click)='initData()'>查询</button> |
||||
<button mat-raised-button style="margin-left: 25px;" type="button" (click)='empty()'>重置</button> |
||||
</div> |
||||
</form> |
||||
<div style="width: 100%;text-align: center;"> |
||||
<button mat-raised-button color="primary" (click)='initData()'>查询</button> |
||||
<button mat-raised-button style="margin-left: 25px;" type="button" (click)='empty()'>重置</button> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
|
||||
<table mat-table [dataSource]="dataSource"> |
||||
|
||||
<ng-container matColumnDef="loginName"> |
||||
<th mat-header-cell *matHeaderCellDef>登录账号</th> |
||||
<td mat-cell *matCellDef="let element">{{element.name}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="realName"> |
||||
<th mat-header-cell *matHeaderCellDef>真实姓名</th> |
||||
<td mat-cell *matCellDef="let element">{{element.realName}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="mechanism"> |
||||
<th mat-header-cell *matHeaderCellDef>所属机构</th> |
||||
<td mat-cell *matCellDef="let element">{{element.organizationName}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="office"> |
||||
<th mat-header-cell *matHeaderCellDef>所属机关</th> |
||||
<td mat-cell *matCellDef="let element">{{element.organizationOfficeName}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="role"> |
||||
<th mat-header-cell *matHeaderCellDef>所属角色</th> |
||||
<td mat-cell *matCellDef="let element"> |
||||
<span *ngFor="let item of element.roleNames" class="maginleft">{{item}}</span> |
||||
</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="time"> |
||||
<th mat-header-cell *matHeaderCellDef>创建时间</th> |
||||
<td mat-cell *matCellDef="let element"> |
||||
{{element.creationTime|date:'yyyy-MM-dd'}} |
||||
</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="maginleft" (click)=reset(element.name)>重置密码</button> |
||||
|
||||
<button mat-raised-button color="primary" class="maginleft" (click)='openuser(element)'>分配角色</button> |
||||
|
||||
<!-- <button mat-raised-button color="primary" class="maginleft" (click)='see(element.name)'>查看</button> --> |
||||
|
||||
<button mat-raised-button color="primary" class="maginleft" (click)='edit(element)'>编辑</button> |
||||
|
||||
<button mat-raised-button color="primary" class="maginleft" *ngIf=!element.enabled (click)='enable(element)'>启用</button> |
||||
<button mat-raised-button color="warn" class="maginleft" *ngIf=element.enabled (click)='prohibit(element)'>禁用</button> |
||||
|
||||
<button mat-raised-button color="warn" class="maginleft" (click)='delete(element.name)'>删除</button> |
||||
</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> |
||||
</div> |
||||
|
||||
<table mat-table [dataSource]="dataSource"> |
||||
|
||||
<ng-container matColumnDef="loginName"> |
||||
<th mat-header-cell *matHeaderCellDef>登录账号</th> |
||||
<td mat-cell *matCellDef="let element">{{element.name}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="realName"> |
||||
<th mat-header-cell *matHeaderCellDef>真实姓名</th> |
||||
<td mat-cell *matCellDef="let element">{{element.realName}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="mechanism"> |
||||
<th mat-header-cell *matHeaderCellDef>所属机构</th> |
||||
<td mat-cell *matCellDef="let element">{{element.organizationName}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="office"> |
||||
<th mat-header-cell *matHeaderCellDef>所属机关</th> |
||||
<td mat-cell *matCellDef="let element">{{element.organizationOfficeName}}</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="role"> |
||||
<th mat-header-cell *matHeaderCellDef>所属角色</th> |
||||
<td mat-cell *matCellDef="let element"> |
||||
<span *ngFor="let item of element.roleNames" class="maginleft">{{item}}</span> |
||||
</td> |
||||
</ng-container> |
||||
|
||||
<ng-container matColumnDef="time"> |
||||
<th mat-header-cell *matHeaderCellDef>创建时间</th> |
||||
<td mat-cell *matCellDef="let element"> |
||||
{{element.creationTime|date:'yyyy-MM-dd'}} |
||||
</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="maginleft" (click)=reset(element.name)>重置密码</button> |
||||
|
||||
<button mat-raised-button color="primary" class="maginleft" (click)='openuser(element)'>分配角色</button> |
||||
|
||||
<!-- <button mat-raised-button color="primary" class="maginleft" (click)='see(element.name)'>查看</button> --> |
||||
|
||||
<button mat-raised-button color="primary" class="maginleft" (click)='edit(element)'>编辑</button> |
||||
|
||||
<button mat-raised-button color="primary" class="maginleft" *ngIf=!element.enabled (click)='enable(element)'>启用</button> |
||||
<button mat-raised-button color="warn" class="maginleft" *ngIf=element.enabled (click)='prohibit(element)'>禁用</button> |
||||
|
||||
<button mat-raised-button color="warn" class="maginleft" (click)='delete(element.name)'>删除</button> |
||||
</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> |
||||
|
||||
|
Loading…
Reference in new issue