Browse Source

用户管理显示支助人员、服务台人员

seimin 2 years ago
parent
commit
20d3b13fff

+ 3 - 0
src/app/views/clinical-users-management/clinical-users-management.component.ts

@@ -146,6 +146,7 @@ export class ClinicalUsersManagementComponent implements OnInit {
146
 
146
 
147
   // 获取相应的院区
147
   // 获取相应的院区
148
   getAllHospital() {
148
   getAllHospital() {
149
+    this.loading1 = true;
149
     let topLevelParentHosList$ = this.mainService.apiPostAll("topLevelParentHosList", {});
150
     let topLevelParentHosList$ = this.mainService.apiPostAll("topLevelParentHosList", {});
150
     let topLevelParentHos$ = this.mainService.apiPostAll("topLevelParentHos", {hosId: this.tool.getCurrentHospital().id});
151
     let topLevelParentHos$ = this.mainService.apiPostAll("topLevelParentHos", {hosId: this.tool.getCurrentHospital().id});
151
     forkJoin(topLevelParentHosList$, topLevelParentHos$).subscribe((dataArray:any[]) => {
152
     forkJoin(topLevelParentHosList$, topLevelParentHos$).subscribe((dataArray:any[]) => {
@@ -154,6 +155,8 @@ export class ClinicalUsersManagementComponent implements OnInit {
154
       this.hosId = data2.topHospital ? data2.topHospital.id : null;
155
       this.hosId = data2.topHospital ? data2.topHospital.id : null;
155
       this.changeHosp1(this.hosId);
156
       this.changeHosp1(this.hosId);
156
       this.getList();
157
       this.getList();
158
+    }, err => {
159
+      this.loading1 = false;
157
     })
160
     })
158
   }
161
   }
159
 
162
 

+ 5 - 5
src/app/views/users-management/users-management.component.ts

@@ -42,7 +42,7 @@ export class UsersManagementComponent implements OnInit {
42
   hosId: any; //院区(搜索)
42
   hosId: any; //院区(搜索)
43
   userGroup; //所属组
43
   userGroup; //所属组
44
   userGroup1; //所属组(搜索)
44
   userGroup1; //所属组(搜索)
45
-  userTypes: Array<any>; //所有用户类型
45
+  userTypes: Array<any> = []; //所有用户类型
46
   alldepart: any = []; //所有所属科室
46
   alldepart: any = []; //所有所属科室
47
   alldepart1: any = []; //所有所属科室(搜索)
47
   alldepart1: any = []; //所有所属科室(搜索)
48
   allUserGroup: Array<any>; //所有用户组
48
   allUserGroup: Array<any>; //所有用户组
@@ -68,7 +68,6 @@ export class UsersManagementComponent implements OnInit {
68
     });
68
     });
69
     this.coopBtns = this.tool.initCoopBtns(this.route);
69
     this.coopBtns = this.tool.initCoopBtns(this.route);
70
     this.initForm();
70
     this.initForm();
71
-    this.getAllHospital();
72
     this.getAllRole();
71
     this.getAllRole();
73
     this.getUserTypes();
72
     this.getUserTypes();
74
     this.getGender();
73
     this.getGender();
@@ -105,6 +104,7 @@ export class UsersManagementComponent implements OnInit {
105
         account: this.num || "",
104
         account: this.num || "",
106
         groupdata: { id: this.userGroup1 || "" },
105
         groupdata: { id: this.userGroup1 || "" },
107
         hospital: { id: this.hosId || "" },
106
         hospital: { id: this.hosId || "" },
107
+        userTypeIds: String(this.userTypes.map(v => v.id))
108
       },
108
       },
109
     };
109
     };
110
     if (!data.user.dept || !data.user.dept.id) {
110
     if (!data.user.dept || !data.user.dept.id) {
@@ -131,9 +131,9 @@ export class UsersManagementComponent implements OnInit {
131
 
131
 
132
   // 获取所有用户类型
132
   // 获取所有用户类型
133
   getUserTypes() {
133
   getUserTypes() {
134
-    var that = this;
135
-    that.mainService.getDictionary("list", "usertype").subscribe((data) => {
136
-      that.userTypes = data;
134
+    this.mainService.getDictionary("list", "usertype").subscribe((data) => {
135
+      this.userTypes = data.filter(v => (v.value == 2 || v.value == 3));
136
+      this.getAllHospital();
137
     });
137
     });
138
   }
138
   }
139
 
139