Sfoglia il codice sorgente

临床用户的用户类型限制为护士

seimin 1 anno fa
parent
commit
6ac6fafa88

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "/service": {
3
-    "target": "http://192.168.4.170",
3
+    "target": "http://192.168.3.108",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 6
     "pathRewrite": {

+ 4 - 6
src/app/views/clinical-users-management/clinical-users-management.component.ts

@@ -92,8 +92,7 @@ export class ClinicalUsersManagementComponent implements OnInit {
92 92
     this.hosId = this.tool.getCurrentHospital().id;
93 93
     this.name = "";
94 94
     this.num = "";
95
-    let userType = this.userTypes.find(v=>v.value == 1);
96
-    this.userType = userType ? String(userType.id) : null;
95
+    this.userType = this.userTypes.length ? this.userTypes[0].id : null;
97 96
     this.department = null;
98 97
     this.userGroup1 = null;
99 98
     this.changeHosp1(this.hosId);
@@ -139,9 +138,8 @@ export class ClinicalUsersManagementComponent implements OnInit {
139 138
   // 获取所有用户类型
140 139
   getUserTypes() {
141 140
     this.mainService.getDictionary("list", "usertype").subscribe((data) => {
142
-      this.userTypes = data;
143
-      let userType = data.find(v=>v.value == 1);
144
-      this.userType = userType ? String(userType.id) : null;
141
+      this.userTypes = data.filter(v=>v.value == 1);
142
+      this.userType = this.userTypes.length ? this.userTypes[0].id : null;
145 143
       this.getAllHospital();
146 144
     });
147 145
   }
@@ -271,7 +269,7 @@ export class ClinicalUsersManagementComponent implements OnInit {
271 269
     this.validateForm = this.fb.group({
272 270
       name: [null, [Validators.required]],
273 271
       account: [null, [Validators.required]],
274
-      usertype: [null, [Validators.required]],
272
+      usertype: [this.userType + '', [Validators.required]],
275 273
       dept: [null, [Validators.required]],
276 274
       deptPhone: [null, [Validators.required]],
277 275
       gender: [null, [Validators.required]],