17 changed files with 575 additions and 337 deletions
@ -1,48 +1,50 @@ |
|||||||
<h2 mat-dialog-title>创建用户</h2> |
<h2 mat-dialog-title>新增用户</h2> |
||||||
|
|
||||||
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container"> |
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container"> |
||||||
|
|
||||||
<div> |
<div> |
||||||
<mat-form-field> |
<mat-form-field> |
||||||
<input matInput id="idNumber" name="idNumber" |
<input matInput id="realName" name="realName" required ngModel placeholder="用户姓名" autocomplete="off"> |
||||||
required ngModel placeholder="请输入身份证号" autocomplete="off" pattern="^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$"> |
|
||||||
<mat-error> |
|
||||||
<strong>请输入正确身份证号</strong> |
|
||||||
</mat-error> |
|
||||||
</mat-form-field> |
</mat-form-field> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div> |
<div> |
||||||
<mat-form-field> |
<mat-form-field> |
||||||
<input matInput id="realName" name="realName" |
<input matInput id="identityCard" name="identityCard" required ngModel placeholder="身份证号" autocomplete="off" pattern="^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$"> |
||||||
maxlength="100" |
|
||||||
required ngModel placeholder="请输入真实姓名" autocomplete="off"> |
|
||||||
</mat-form-field> |
</mat-form-field> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div> |
<div> |
||||||
<mat-form-field> |
<mat-form-field> |
||||||
<mat-select placeholder="请选择职务" [formControl]="toppings" multiple required> |
<input matInput id="phone" name="phone" required ngModel placeholder="手机号" type="number" autocomplete="off" pattern="^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[0-35-9]\d{2}|4(?:0\d|1[0-2]|9\d))|9[0-35-9]\d{2}|6[2567]\d{2}|4(?:[14]0\d{3}|[68]\d{4}|[579]\d{2}))\d{6}$"> |
||||||
<div style="float: left;"> |
|
||||||
<mat-option *ngFor="let item of detachmentPosts" [value]="item.id">{{item.name}}</mat-option> |
|
||||||
</div> |
|
||||||
<div style="float: left;"> |
|
||||||
<mat-option *ngFor="let item of brigadePosts" [value]="item.id">{{item.name}}</mat-option> |
|
||||||
</div> |
|
||||||
<div style="float: left;"> |
|
||||||
<mat-option *ngFor="let item of RescueStationPosts" [value]="item.id">{{item.name}}</mat-option> |
|
||||||
</div> |
|
||||||
</mat-select> |
|
||||||
</mat-form-field> |
</mat-form-field> |
||||||
</div> |
</div> |
||||||
|
|
||||||
|
<div style="margin-bottom: 10px;"> |
||||||
|
<p style="font-size: 14px;">消防救援站: <label style="margin-left: 10px;">{{organizationName}}</label></p> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="treeDiv"> |
||||||
|
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl"> |
||||||
|
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='selectTree(node)'> |
||||||
|
<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)='selectTree(node)'> |
||||||
|
<button type="button" mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name"> |
||||||
|
<mat-icon 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 mat-dialog-content *ngIf="errmsg"> |
<div mat-dialog-content *ngIf="errmsg"> |
||||||
<p style="font-size: 14px; color: red;">{{errmsg}}</p> |
<p style="font-size: 14px; color: red;">{{errmsg}}</p> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div mat-dialog-actions> |
<div mat-dialog-actions> |
||||||
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid || toppings.value == null">确定</button> |
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">确定</button> |
||||||
<button mat-raised-button mat-dialog-close>取消</button> |
<button mat-raised-button mat-dialog-close>取消</button> |
||||||
</div> |
</div> |
||||||
|
|
||||||
|
@ -1,48 +1,44 @@ |
|||||||
<h2 mat-dialog-title>创建教员</h2> |
<h2 mat-dialog-title>新增用户</h2> |
||||||
|
|
||||||
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container"> |
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container"> |
||||||
|
|
||||||
<div> |
<div> |
||||||
<mat-form-field> |
<mat-form-field> |
||||||
<input matInput id="idNumber" name="idNumber" |
<input matInput id="name" name="name" required ngModel placeholder="登录账号" autocomplete="off" pattern="^[a-zA-Z][a-zA-Z0-9_]{4,19}$"> |
||||||
required ngModel placeholder="请输入帐号" autocomplete="off" pattern="^[a-zA-Z][a-zA-Z0-9_]{4,19}$"> |
|
||||||
<mat-error> |
|
||||||
<strong>帐号格式为字母+数字</strong> |
|
||||||
</mat-error> |
|
||||||
</mat-form-field> |
</mat-form-field> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div> |
<div> |
||||||
<mat-form-field> |
<mat-form-field> |
||||||
<input matInput id="realName" name="realName" |
<input matInput id="realName" name="realName" required ngModel placeholder="用户姓名" autocomplete="off"> |
||||||
maxlength="100" |
|
||||||
required ngModel placeholder="请输入真实姓名" autocomplete="off"> |
|
||||||
</mat-form-field> |
</mat-form-field> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div> |
<div style="margin-bottom: 10px;"> |
||||||
<mat-form-field> |
<p style="font-size: 14px;">消防救援站: <label style="margin-left: 10px;">{{organizationName}}</label></p> |
||||||
<mat-select placeholder="请选择职务" [formControl]="toppings" multiple required> |
|
||||||
<div style="float: left;"> |
|
||||||
<mat-option *ngFor="let item of detachmentPosts" [value]="item.id">{{item.name}}</mat-option> |
|
||||||
</div> |
|
||||||
<div style="float: left;"> |
|
||||||
<mat-option *ngFor="let item of brigadePosts" [value]="item.id">{{item.name}}</mat-option> |
|
||||||
</div> |
|
||||||
<div style="float: left;"> |
|
||||||
<mat-option *ngFor="let item of RescueStationPosts" [value]="item.id">{{item.name}}</mat-option> |
|
||||||
</div> |
|
||||||
</mat-select> |
|
||||||
</mat-form-field> |
|
||||||
</div> |
</div> |
||||||
|
|
||||||
|
<div class="treeDiv"> |
||||||
|
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl"> |
||||||
|
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='selectTree(node)'> |
||||||
|
<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)='selectTree(node)'> |
||||||
|
<button type="button" mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name"> |
||||||
|
<mat-icon 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 mat-dialog-content *ngIf="errmsg"> |
<div mat-dialog-content *ngIf="errmsg"> |
||||||
<p style="font-size: 14px; color: red;">{{errmsg}}</p> |
<p style="font-size: 14px; color: red;">{{errmsg}}</p> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div mat-dialog-actions> |
<div mat-dialog-actions> |
||||||
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid || toppings.value == null">确定</button> |
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">确定</button> |
||||||
<button mat-raised-button mat-dialog-close>取消</button> |
<button mat-raised-button mat-dialog-close>取消</button> |
||||||
</div> |
</div> |
||||||
|
|
||||||
|
@ -1,45 +1,44 @@ |
|||||||
<h2 mat-dialog-title>编辑教员</h2> |
<h2 mat-dialog-title>编辑用户</h2> |
||||||
|
|
||||||
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container"> |
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container"> |
||||||
|
|
||||||
<div> |
<div> |
||||||
<mat-form-field> |
<mat-form-field> |
||||||
<input matInput id="idNumber" name="idNumber" |
<input matInput id="name" name="name" [(ngModel)]="name" required readonly placeholder="登录账号" autocomplete="off"> |
||||||
required [(ngModel)]="IdNumber" placeholder="请输入帐号" autocomplete="off" disabled pattern="^[a-zA-Z][a-zA-Z0-9_]{4,19}$"> |
|
||||||
</mat-form-field> |
</mat-form-field> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div> |
<div> |
||||||
<mat-form-field> |
<mat-form-field> |
||||||
<input matInput id="realName" name="realName" |
<input matInput id="realName" name="realName" [(ngModel)]="realName" required placeholder="用户姓名" autocomplete="off"> |
||||||
maxlength="100" |
|
||||||
required [(ngModel)]="realName" placeholder="请输入真实姓名" autocomplete="off"> |
|
||||||
</mat-form-field> |
</mat-form-field> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div> |
<div style="margin-bottom: 10px;"> |
||||||
<mat-form-field> |
<p style="font-size: 14px;">消防救援站: <label style="margin-left: 10px;">{{organizationName}}</label></p> |
||||||
<mat-select placeholder="请选择职务" [formControl]="toppings" multiple required> |
|
||||||
<div style="float: left;"> |
|
||||||
<mat-option *ngFor="let item of detachmentPosts" [value]="item.id">{{item.name}}</mat-option> |
|
||||||
</div> |
|
||||||
<div style="float: left;"> |
|
||||||
<mat-option *ngFor="let item of brigadePosts" [value]="item.id">{{item.name}}</mat-option> |
|
||||||
</div> |
|
||||||
<div style="float: left;"> |
|
||||||
<mat-option *ngFor="let item of RescueStationPosts" [value]="item.id">{{item.name}}</mat-option> |
|
||||||
</div> |
|
||||||
</mat-select> |
|
||||||
</mat-form-field> |
|
||||||
</div> |
</div> |
||||||
|
|
||||||
|
<div class="treeDiv"> |
||||||
|
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl"> |
||||||
|
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='selectTree(node)'> |
||||||
|
<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)='selectTree(node)'> |
||||||
|
<button type="button" mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name"> |
||||||
|
<mat-icon 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 mat-dialog-content *ngIf="errmsg"> |
<div mat-dialog-content *ngIf="errmsg"> |
||||||
<p style="font-size: 14px; color: red;">{{errmsg}}</p> |
<p style="font-size: 14px; color: red;">{{errmsg}}</p> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div mat-dialog-actions> |
<div mat-dialog-actions> |
||||||
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid || toppings.value == null">确定</button> |
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid">确定</button> |
||||||
<button mat-raised-button mat-dialog-close>取消</button> |
<button mat-raised-button mat-dialog-close>取消</button> |
||||||
</div> |
</div> |
||||||
|
|
||||||
|
Loading…
Reference in new issue