Browse Source

BUG修复

seimin 3 years ago
parent
commit
f258d32596

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

@@ -622,7 +622,7 @@
622
           <input nz-input class="mb8 w100" [(ngModel)]="carryingCourses[indexs].name" placeholder="请选择科室名称" nzSize="" />
622
           <input nz-input class="mb8 w100" [(ngModel)]="carryingCourses[indexs].name" placeholder="请选择科室名称" nzSize="" />
623
           <nz-form-label class="label" nzRequired>默认科室</nz-form-label>
623
           <nz-form-label class="label" nzRequired>默认科室</nz-form-label>
624
           <nz-select class="mb8 w100" nzShowSearch nzAllowClear nzPlaceHolder="请选择默认科室"
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
             [nzLoading]="yLoading">
626
             [nzLoading]="yLoading">
627
             <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of departmentData"></nz-option>
627
             <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of departmentData"></nz-option>
628
           </nz-select>
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
   departmentName; //流程名称
206
   departmentName; //流程名称
207
   departmentIds; //固定科室选择字段
207
   departmentIds; //固定科室选择字段
208
   departmentTypeIds; //固定科室选择字段
208
   departmentTypeIds; //固定科室选择字段
209
-  departmentStrategy = {
209
+  departmentStrategy: any = {
210
     id: null,
210
     id: null,
211
   }; //默认科室字段
211
   }; //默认科室字段
212
   checkoutMethod = {
212
   checkoutMethod = {
@@ -784,7 +784,7 @@ export class TaskTypeManagementComponent implements OnInit {
784
       }
784
       }
785
       this.carryingCourses = data.carryingCourses;
785
       this.carryingCourses = data.carryingCourses;
786
       this.ysgcData(this.carryingCourses[this.indexs]);
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
         return;
892
         return;
893
       }
893
       }
894
-      if (this.departmentStrategy.id == 265) {
894
+      if (this.departmentStrategy.value == 2) {
895
         if (!this.departmentIds && this.departments.length === 0) {
895
         if (!this.departmentIds && this.departments.length === 0) {
896
           that.showPromptModal(
896
           that.showPromptModal(
897
             that.add ? "新增" : "编辑",
897
             that.add ? "新增" : "编辑",
@@ -901,7 +901,7 @@ export class TaskTypeManagementComponent implements OnInit {
901
           return;
901
           return;
902
         }
902
         }
903
       }
903
       }
904
-      if (this.departmentStrategy.id == 447) {
904
+      if (this.departmentStrategy.value == 5) {
905
         if (!this.departmentTypeIds) {
905
         if (!this.departmentTypeIds) {
906
           that.showPromptModal(
906
           that.showPromptModal(
907
             that.add ? "新增" : "编辑",
907
             that.add ? "新增" : "编辑",
@@ -911,7 +911,7 @@ export class TaskTypeManagementComponent implements OnInit {
911
           return;
911
           return;
912
         }
912
         }
913
       }
913
       }
914
-      if (this.departmentStrategy.id == 266) {
914
+      if (this.departmentStrategy.value == 3) {
915
         if (!this.departmentIds && this.departments.length === 0) {
915
         if (!this.departmentIds && this.departments.length === 0) {
916
           that.showPromptModal(
916
           that.showPromptModal(
917
             that.add ? "新增" : "编辑",
917
             that.add ? "新增" : "编辑",
@@ -1578,7 +1578,7 @@ export class TaskTypeManagementComponent implements OnInit {
1578
     if (this.association.value == "other") {
1578
     if (this.association.value == "other") {
1579
       this.mrksType = "department_strategy";
1579
       this.mrksType = "department_strategy";
1580
     }
1580
     }
1581
-    //患者转运/其他type
1581
+    //患者转运
1582
     if (this.association.value == "patientTransport") {
1582
     if (this.association.value == "patientTransport") {
1583
       this.mrksType = "department_strategy_other";
1583
       this.mrksType = "department_strategy_other";
1584
     }
1584
     }
@@ -1692,7 +1692,7 @@ export class TaskTypeManagementComponent implements OnInit {
1692
     this.getDepartment();
1692
     this.getDepartment();
1693
     this.getcheckout();
1693
     this.getcheckout();
1694
     this.ysgcData(this.carryingCourses[this.indexs]);
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
   ysgcData(data) {
1698
   ysgcData(data) {
@@ -1906,9 +1906,13 @@ export class TaskTypeManagementComponent implements OnInit {
1906
   }
1906
   }
1907
   //默认科室选择
1907
   //默认科室选择
1908
   depa(data, doing?): void {
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
         this.depaShow = true;
1916
         this.depaShow = true;
1913
         if (doing === "clear") {
1917
         if (doing === "clear") {
1914
           //固定科室
1918
           //固定科室
@@ -1921,7 +1925,7 @@ export class TaskTypeManagementComponent implements OnInit {
1921
         }
1925
         }
1922
         this.depaShow1 = false;
1926
         this.depaShow1 = false;
1923
         this.depaShow4 = false;
1927
         this.depaShow4 = false;
1924
-      } else if (data.id == "447") {
1928
+      } else if (obj.value == "5") {
1925
         //固定科室类型
1929
         //固定科室类型
1926
         this.depaShow4 = true;
1930
         this.depaShow4 = true;
1927
         if (doing === "clear") {
1931
         if (doing === "clear") {
@@ -1935,7 +1939,7 @@ export class TaskTypeManagementComponent implements OnInit {
1935
         }
1939
         }
1936
         this.depaShow = false;
1940
         this.depaShow = false;
1937
         this.depaShow1 = false;
1941
         this.depaShow1 = false;
1938
-      } else if (data.id == "266") {
1942
+      } else if (obj.value == "3") {
1939
         this.depaShow1 = true;
1943
         this.depaShow1 = true;
1940
         if (doing === "clear") {
1944
         if (doing === "clear") {
1941
           //固定科室范围
1945
           //固定科室范围