Преглед изворни кода

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

seimin пре 2 година
родитељ
комит
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 148
   getAllHospital() {
149
+    this.loading1 = true;
149 150
     let topLevelParentHosList$ = this.mainService.apiPostAll("topLevelParentHosList", {});
150 151
     let topLevelParentHos$ = this.mainService.apiPostAll("topLevelParentHos", {hosId: this.tool.getCurrentHospital().id});
151 152
     forkJoin(topLevelParentHosList$, topLevelParentHos$).subscribe((dataArray:any[]) => {
@@ -154,6 +155,8 @@ export class ClinicalUsersManagementComponent implements OnInit {
154 155
       this.hosId = data2.topHospital ? data2.topHospital.id : null;
155 156
       this.changeHosp1(this.hosId);
156 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 42
   hosId: any; //院区(搜索)
43 43
   userGroup; //所属组
44 44
   userGroup1; //所属组(搜索)
45
-  userTypes: Array<any>; //所有用户类型
45
+  userTypes: Array<any> = []; //所有用户类型
46 46
   alldepart: any = []; //所有所属科室
47 47
   alldepart1: any = []; //所有所属科室(搜索)
48 48
   allUserGroup: Array<any>; //所有用户组
@@ -68,7 +68,6 @@ export class UsersManagementComponent implements OnInit {
68 68
     });
69 69
     this.coopBtns = this.tool.initCoopBtns(this.route);
70 70
     this.initForm();
71
-    this.getAllHospital();
72 71
     this.getAllRole();
73 72
     this.getUserTypes();
74 73
     this.getGender();
@@ -105,6 +104,7 @@ export class UsersManagementComponent implements OnInit {
105 104
         account: this.num || "",
106 105
         groupdata: { id: this.userGroup1 || "" },
107 106
         hospital: { id: this.hosId || "" },
107
+        userTypeIds: String(this.userTypes.map(v => v.id))
108 108
       },
109 109
     };
110 110
     if (!data.user.dept || !data.user.dept.id) {
@@ -131,9 +131,9 @@ export class UsersManagementComponent implements OnInit {
131 131
 
132 132
   // 获取所有用户类型
133 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