seimin 1 rok temu
rodzic
commit
9b56b7dd89

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

@@ -182,7 +182,7 @@ export class ClinicalUsersManagementComponent implements OnInit {
182 182
 
183 183
   // 切换院区选项获取对应科室列表
184 184
   changeHosp() {
185
-    let hid = this.hosId - 0;
185
+    let hid = this.tool.getCurrentHospital().id;
186 186
     let data = {
187 187
       department: {
188 188
         hospital: { id: hid },
@@ -327,7 +327,7 @@ export class ClinicalUsersManagementComponent implements OnInit {
327 327
         group: groups,
328 328
         role: roles,
329 329
         phone: that.validateForm.value.deptPhone,
330
-        hospital: { id: that.tool.getCurrentHospital().id },
330
+        hospital: { id: that.add ? that.tool.getCurrentHospital().id : that.hosId },
331 331
         weixin: that.validateForm.value.weixin,
332 332
       },
333 333
     };
@@ -540,8 +540,8 @@ export class ClinicalUsersManagementComponent implements OnInit {
540 540
   }
541 541
   // 边输边搜节流阀
542 542
   isLoading = false;
543
-  changeInp(deptId, type, e) {
544
-    if (!deptId) {
543
+  changeInp(hosId, type, e) {
544
+    if (!hosId) {
545 545
       if (type == "search") {
546 546
         this.alldepart1 = [];
547 547
       } else if (type == "add") {
@@ -550,7 +550,7 @@ export class ClinicalUsersManagementComponent implements OnInit {
550 550
       return;
551 551
     }
552 552
     this.isLoading = true;
553
-    this.changeInpSubject.next([deptId, type, e]);
553
+    this.changeInpSubject.next([hosId, type, e]);
554 554
   }
555 555
   // 边输边搜节流阀
556 556
   changeInpHospital(hosId, type, e) {
@@ -565,13 +565,13 @@ export class ClinicalUsersManagementComponent implements OnInit {
565 565
   }
566 566
   // 获取所有科室
567 567
   snum = 0;
568
-  getDeparts(deptId, type, dept) {
568
+  getDeparts(hosId, type, dept) {
569 569
     var that = this;
570 570
     let data = {
571 571
       department: {
572 572
         dept,
573 573
         hospital: {
574
-          id: deptId,
574
+          id: type == "search" ? hosId : this.tool.getCurrentHospital().id,
575 575
         },
576 576
       },
577 577
       idx: 0,

+ 3 - 3
src/app/views/office-management/office-management.component.ts

@@ -101,7 +101,7 @@ export class OfficeManagementComponent implements OnInit {
101 101
       idx: 0,
102 102
       sum: 10,
103 103
       department: {
104
-        hospital: { id: this.hospital },
104
+        hospital: { id: this.add ? this.tool.getCurrentHospital().id : this.hospital },
105 105
         keyWord: keyWord,
106 106
       },
107 107
     };
@@ -203,7 +203,7 @@ export class OfficeManagementComponent implements OnInit {
203 203
       hid = this.hospital - 0;
204 204
     }
205 205
     let data = {
206
-      hosId: hid,
206
+      hosId: this.add ? this.tool.getCurrentHospital().id : hid,
207 207
     };
208 208
     this.maskFlag = this.message.loading("正在加载中..", {
209 209
       nzDuration: 0,
@@ -409,7 +409,7 @@ export class OfficeManagementComponent implements OnInit {
409 409
       department: {
410 410
         dept: that.validateForm.value.officeName,
411 411
         deptalias: that.validateForm.value.deptalias,
412
-        hospital: { id: that.hospital },
412
+        hospital: { id: that.add ? that.tool.getCurrentHospital().id : that.hospital },
413 413
         pcode: that.validateForm.value.officeNo,
414 414
         manyPhone: deptsPhone
415 415
           ? that.validateForm.value.officeNum + "," + deptsPhone