clinical-users-management.component.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <div class="list-template">
  2. <div class="list-template__content">
  3. <div class="list-template__top" nz-row>
  4. <div nz-col nzXl='18' class="list-template__searchBox">
  5. <div class="list-template__searchItem" *ngIf="isShowSelectHospital">
  6. <span class="label">院区</span>:
  7. <nz-select class="formItem" (nzOnSearch)="changeInpHospital(hosId,'search',$event)"
  8. [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzPlaceHolder="请选择院区"
  9. [(ngModel)]="hosId" (ngModelChange)="changeHosp1($event)">
  10. <ng-container *ngFor="let option of hospitals1">
  11. <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName" [nzValue]="option.id"></nz-option>
  12. </ng-container>
  13. <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
  14. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  15. </nz-option>
  16. </nz-select>
  17. </div>
  18. <div class="list-template__searchItem" style="display: none;">
  19. <span class="label">用户类型</span>:
  20. <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzAllowClear
  21. nzPlaceHolder="请选择用户类型" [(ngModel)]="userType">
  22. <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of userTypes"></nz-option>
  23. </nz-select>
  24. </div>
  25. <div class="list-template__searchItem">
  26. <span class="label">所属科室</span>:
  27. <nz-select class="formItem" (nzOnSearch)="changeInp(hosId,'search',$event)"
  28. [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear nzPlaceHolder="请选择所属科室"
  29. [(ngModel)]="department">
  30. <ng-container *ngFor="let option of alldepart1">
  31. <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
  32. </ng-container>
  33. <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
  34. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  35. </nz-option>
  36. </nz-select>
  37. </div>
  38. <div class="list-template__searchItem">
  39. <span class="label">所属组</span>:
  40. <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzAllowClear
  41. nzPlaceHolder="请选择所属组" [(ngModel)]="userGroup1">
  42. <nz-option nzLabel="{{data.groupName}}" nzValue="{{data.id}}" *ngFor="let data of allUserGroup1">
  43. </nz-option>
  44. </nz-select>
  45. </div>
  46. <div class="list-template__searchItem">
  47. <span class="label">用户名</span>:
  48. <input nz-input class="formItem" [(ngModel)]="num" placeholder="请输入用户名" nzSize="default" />
  49. </div>
  50. <div class="list-template__searchItem">
  51. <span class="label">姓名</span>:
  52. <input nz-input class="formItem" [(ngModel)]="name" placeholder="请输入姓名" nzSize="default" />
  53. </div>
  54. </div>
  55. <div nz-col nzXl='6' class="list-template__btns">
  56. <button nz-button class="btn default" (click)='search()'>搜索</button>
  57. <button nz-button class="btn ml8 default" (click)='reset()'>重置</button>
  58. <button nz-button *ngIf="coopBtns.add" class="btn ml8 default" (click)="showModal()">新增</button>
  59. </div>
  60. </div>
  61. <div class="list-template__bottom">
  62. <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
  63. [nzLoading]="loading1">
  64. <thead>
  65. <tr class="thead">
  66. <th nzWidth="5%">序号</th>
  67. <th nzWidth="10%">姓名</th>
  68. <th nzWidth="5%">用户名</th>
  69. <th nzWidth="10%">绩效ID</th>
  70. <th nzWidth="5%">性别</th>
  71. <th nzWidth="10%">手机号码</th>
  72. <th nzWidth="15%">所属科室</th>
  73. <th nzWidth="15%">所属组</th>
  74. <th nzWidth="10%">用户类型</th>
  75. <th nzWidth="15%">操作</th>
  76. </tr>
  77. </thead>
  78. <tbody>
  79. <tr *ngFor="let data of listOfData;let index=index;">
  80. <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
  81. <td>{{ data.name }}</td>
  82. <td>{{ data.account }}</td>
  83. <td>{{ data.gradeId }}</td>
  84. <td>{{data.gender?data.gender.name:''}}</td>
  85. <td>{{ data.phone }}</td>
  86. <td>{{ data.dept?data.dept.dept:'' }}</td>
  87. <td>
  88. <div *ngIf="data.group&&data.group.length">
  89. <div *ngFor="let gro of data.group;let i=index;">
  90. <span *ngIf='i!=data.group.length-1'>{{gro.groupName}},</span>
  91. <span *ngIf='i==data.group.length-1'>{{gro.groupName}}</span>
  92. </div>
  93. </div>
  94. <div *ngIf="!data.group||!data.group.length">
  95. -
  96. </div>
  97. </td>
  98. <td>{{ data.usertype.name }}</td>
  99. <td>
  100. <div class="coop">
  101. <span *ngIf="coopBtns.look" (click)="detail(data.id)">查看</span>
  102. <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
  103. <span *ngIf="coopBtns.del" (click)="del(data)">删除</span>
  104. <span *ngIf="coopBtns.resetPwd" (click)="resetPwd(data)">重置密码</span>
  105. </div>
  106. </td>
  107. </tr>
  108. </tbody>
  109. </nz-table>
  110. <div class="list-template__pagination">
  111. <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
  112. (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
  113. </nz-pagination>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. <!-- 新增/编辑模态框 -->
  119. <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
  120. <div class="modalBody">
  121. <div class="title">用户管理 - {{add?"新增":"编辑"}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
  122. </div>
  123. <overlay-scrollbars #osComponentRef1 class="content">
  124. <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
  125. <nz-form-item>
  126. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">姓名</nz-form-label>
  127. <nz-form-control nzErrorTip="请填写姓名!">
  128. <nz-input-group>
  129. <input type="name" nz-input formControlName="name" placeholder="请填写姓名" />
  130. </nz-input-group>
  131. </nz-form-control>
  132. </nz-form-item>
  133. <nz-form-item>
  134. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="account">用户名</nz-form-label>
  135. <nz-form-control nzErrorTip="请填写用户名!">
  136. <nz-input-group>
  137. <input type="account" nz-input formControlName="account" placeholder="请填写用户名" />
  138. </nz-input-group>
  139. </nz-form-control>
  140. </nz-form-item>
  141. <nz-form-item>
  142. <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="gradeId">绩效ID</nz-form-label>
  143. <nz-form-control nzErrorTip="请填写绩效ID!">
  144. <nz-input-group>
  145. <input type="gradeId" nz-input formControlName="gradeId" placeholder="请填写绩效ID" />
  146. </nz-input-group>
  147. </nz-form-control>
  148. </nz-form-item>
  149. <nz-form-item>
  150. <nz-form-label [nzSm]="6" [nzXs]="24" [nzRequired]="wxRequired" nzFor="weixin">微信</nz-form-label>
  151. <nz-form-control nzErrorTip="请填写微信!">
  152. <nz-input-group>
  153. <input type="weixin" nz-input formControlName="weixin" placeholder="请填写微信" />
  154. </nz-input-group>
  155. </nz-form-control>
  156. </nz-form-item>
  157. <nz-form-item>
  158. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="usertype">用户类型</nz-form-label>
  159. <nz-form-control nzErrorTip="请选择用户类型!">
  160. <nz-select [nzDropdownMatchSelectWidth]="false" type="usertype" nzShowSearch nzAllowClear
  161. formControlName="usertype" nzPlaceHolder="请选择用户类型" (ngModelChange)="usertypeChange()">
  162. <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of userTypes">
  163. </nz-option>
  164. </nz-select>
  165. </nz-form-control>
  166. </nz-form-item>
  167. <nz-form-item>
  168. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="dept">所属科室</nz-form-label>
  169. <nz-form-control nzErrorTip="请选择所属科室!">
  170. <nz-select (nzOnSearch)="changeInp(hosId,'add',$event)" [nzDropdownMatchSelectWidth]="false" type="dept"
  171. nzServerSearch nzShowSearch nzAllowClear formControlName="dept" nzPlaceHolder="请选择所属科室">
  172. <!-- <nz-option nzLabel="{{data.dept}}" nzValue="{{data.id}}" *ngFor="let data of alldepart">
  173. </nz-option> -->
  174. <ng-container *ngFor="let option of alldepart">
  175. <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
  176. </ng-container>
  177. <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
  178. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  179. </nz-option>
  180. </nz-select>
  181. </nz-form-control>
  182. </nz-form-item>
  183. <nz-form-item>
  184. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="deptPhone">手机号码</nz-form-label>
  185. <nz-form-control nzErrorTip="请填写正确的手机号码!">
  186. <nz-input-group>
  187. <input type="deptPhone" pattern="[\d-]+" nz-input formControlName="deptPhone" placeholder="请填写手机号码" />
  188. </nz-input-group>
  189. </nz-form-control>
  190. </nz-form-item>
  191. <nz-form-item>
  192. <nz-form-label style="line-height:40px;" [nzSm]="6" [nzXs]="24" nzRequired nzFor="gender">性别</nz-form-label>
  193. <nz-form-control nzErrorTip="请选择性别!">
  194. <nz-radio-group type="gender" formControlName="gender">
  195. <label nz-radio nzValue="{{data.id}}" *ngFor="let data of genders">{{data.name}}</label>
  196. </nz-radio-group>
  197. </nz-form-control>
  198. </nz-form-item>
  199. <nz-form-item>
  200. <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="userGroup">用户组</nz-form-label>
  201. <nz-form-control nzErrorTip="请选择用户组!">
  202. <nz-select [nzDropdownMatchSelectWidth]="false" type="userGroup" nzAllowClear nzMode="multiple"
  203. formControlName="userGroup" nzPlaceHolder="请选择用户组">
  204. <nz-option nzLabel="{{data.groupName}}" nzValue="{{data.id}}" *ngFor="let data of allUserGroup">
  205. </nz-option>
  206. </nz-select>
  207. </nz-form-control>
  208. </nz-form-item>
  209. <nz-form-item>
  210. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="role">角色</nz-form-label>
  211. <nz-form-control nzErrorTip="请选择角色!">
  212. <nz-select [nzDropdownMatchSelectWidth]="false" type="role" nzShowSearch nzAllowClear nzMode="multiple"
  213. formControlName="role" nzPlaceHolder="请选择角色">
  214. <nz-option nzLabel="{{data.role}}" nzValue="{{data.id}}" *ngFor="let data of allUserRole">
  215. </nz-option>
  216. </nz-select>
  217. </nz-form-control>
  218. </nz-form-item>
  219. </form>
  220. </overlay-scrollbars>
  221. <div class="display_flex justify-content_flex-center">
  222. <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">确认</button>
  223. <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
  224. </div>
  225. </div>
  226. </div>
  227. <!-- 删除模态框 -->
  228. <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading" [cancenlLoading]="cancenlLoading"
  229. (confirmDelEvent)="confirmDel()" (cancelDelEvent)="cancelDel()" content="是否删除企业微信同用户?" confirmTxt="是" cancelTxt="否">
  230. </app-dialog-delete>
  231. <!-- 重置密码模态框 -->
  232. <app-dialog-delete [delModal]="resetModal" (hideDelModalEvent)="hideResetModal()" [btnLoading]="btnLoading" [cancenlLoading]="cancenlLoading"
  233. (confirmDelEvent)="confirmReset()" (cancelDelEvent)="cancelReset()" content="是否重置密码?">
  234. </app-dialog-delete>
  235. <!-- 操作成功/失败提示框 -->
  236. <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  237. [info]="promptInfo"></app-prompt-modal>
  238. <!-- 查看详情 -->
  239. <router-outlet (deactivate)="getList()"></router-outlet>
  240. <!-- 遮罩 -->
  241. <app-mask *ngIf="maskFlag"></app-mask>