소스 검색

BUG修复

seimin 3 년 전
부모
커밋
f258d32596

+ 1 - 1
src/app/views/task-type-management/task-type-management.component.html

@@ -622,7 +622,7 @@
622 622
           <input nz-input class="mb8 w100" [(ngModel)]="carryingCourses[indexs].name" placeholder="请选择科室名称" nzSize="" />
623 623
           <nz-form-label class="label" nzRequired>默认科室</nz-form-label>
624 624
           <nz-select class="mb8 w100" nzShowSearch nzAllowClear nzPlaceHolder="请选择默认科室"
625
-            [(ngModel)]="departmentStrategy.id" (ngModelChange)="depa(departmentStrategy,'clear')"
625
+            [(ngModel)]="departmentStrategy.id" (ngModelChange)="depa($event,'clear')"
626 626
             [nzLoading]="yLoading">
627 627
             <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of departmentData"></nz-option>
628 628
           </nz-select>

+ 16 - 12
src/app/views/task-type-management/task-type-management.component.ts

@@ -206,7 +206,7 @@ export class TaskTypeManagementComponent implements OnInit {
206 206
   departmentName; //流程名称
207 207
   departmentIds; //固定科室选择字段
208 208
   departmentTypeIds; //固定科室选择字段
209
-  departmentStrategy = {
209
+  departmentStrategy: any = {
210 210
     id: null,
211 211
   }; //默认科室字段
212 212
   checkoutMethod = {
@@ -784,7 +784,7 @@ export class TaskTypeManagementComponent implements OnInit {
784 784
       }
785 785
       this.carryingCourses = data.carryingCourses;
786 786
       this.ysgcData(this.carryingCourses[this.indexs]);
787
-      this.depa(this.carryingCourses[this.indexs].departmentStrategy);
787
+      this.depa(this.carryingCourses[this.indexs].departmentStrategy.id);
788 788
     }
789 789
   }
790 790
   // 获取科室类型
@@ -891,7 +891,7 @@ export class TaskTypeManagementComponent implements OnInit {
891 891
         );
892 892
         return;
893 893
       }
894
-      if (this.departmentStrategy.id == 265) {
894
+      if (this.departmentStrategy.value == 2) {
895 895
         if (!this.departmentIds && this.departments.length === 0) {
896 896
           that.showPromptModal(
897 897
             that.add ? "新增" : "编辑",
@@ -901,7 +901,7 @@ export class TaskTypeManagementComponent implements OnInit {
901 901
           return;
902 902
         }
903 903
       }
904
-      if (this.departmentStrategy.id == 447) {
904
+      if (this.departmentStrategy.value == 5) {
905 905
         if (!this.departmentTypeIds) {
906 906
           that.showPromptModal(
907 907
             that.add ? "新增" : "编辑",
@@ -911,7 +911,7 @@ export class TaskTypeManagementComponent implements OnInit {
911 911
           return;
912 912
         }
913 913
       }
914
-      if (this.departmentStrategy.id == 266) {
914
+      if (this.departmentStrategy.value == 3) {
915 915
         if (!this.departmentIds && this.departments.length === 0) {
916 916
           that.showPromptModal(
917 917
             that.add ? "新增" : "编辑",
@@ -1578,7 +1578,7 @@ export class TaskTypeManagementComponent implements OnInit {
1578 1578
     if (this.association.value == "other") {
1579 1579
       this.mrksType = "department_strategy";
1580 1580
     }
1581
-    //患者转运/其他type
1581
+    //患者转运
1582 1582
     if (this.association.value == "patientTransport") {
1583 1583
       this.mrksType = "department_strategy_other";
1584 1584
     }
@@ -1692,7 +1692,7 @@ export class TaskTypeManagementComponent implements OnInit {
1692 1692
     this.getDepartment();
1693 1693
     this.getcheckout();
1694 1694
     this.ysgcData(this.carryingCourses[this.indexs]);
1695
-    this.depa(this.carryingCourses[this.indexs].departmentStrategy);
1695
+    this.depa(this.carryingCourses[this.indexs].departmentStrategy.id);
1696 1696
   }
1697 1697
   //处理运送过程字段
1698 1698
   ysgcData(data) {
@@ -1906,9 +1906,13 @@ export class TaskTypeManagementComponent implements OnInit {
1906 1906
   }
1907 1907
   //默认科室选择
1908 1908
   depa(data, doing?): void {
1909
-    console.log(data);
1910
-    if (data) {
1911
-      if (data.id == "265") {
1909
+    var obj = null;
1910
+    if (this.departmentData) {
1911
+      obj = this.departmentData.filter((v) => v.id == data)[0];
1912
+    }
1913
+    console.log(obj, "-----------------------1111");
1914
+    if (obj) {
1915
+      if (obj.value == "2") {
1912 1916
         this.depaShow = true;
1913 1917
         if (doing === "clear") {
1914 1918
           //固定科室
@@ -1921,7 +1925,7 @@ export class TaskTypeManagementComponent implements OnInit {
1921 1925
         }
1922 1926
         this.depaShow1 = false;
1923 1927
         this.depaShow4 = false;
1924
-      } else if (data.id == "447") {
1928
+      } else if (obj.value == "5") {
1925 1929
         //固定科室类型
1926 1930
         this.depaShow4 = true;
1927 1931
         if (doing === "clear") {
@@ -1935,7 +1939,7 @@ export class TaskTypeManagementComponent implements OnInit {
1935 1939
         }
1936 1940
         this.depaShow = false;
1937 1941
         this.depaShow1 = false;
1938
-      } else if (data.id == "266") {
1942
+      } else if (obj.value == "3") {
1939 1943
         this.depaShow1 = true;
1940 1944
         if (doing === "clear") {
1941 1945
           //固定科室范围