seimin 4 달 전
부모
커밋
87a4e041b6
1개의 변경된 파일29개의 추가작업 그리고 1개의 파일을 삭제
  1. 29 1
      src/app/views/fuwutai/fuwutai.component.ts

+ 29 - 1
src/app/views/fuwutai/fuwutai.component.ts

@@ -3812,7 +3812,35 @@ export class FuwutaiComponent implements OnInit {
3812 3812
     this.getSearchTaskList('', this.countRemarkIndex > -1 ? countRemark : '').subscribe((result) => {
3813 3813
       if (result.status == 200) {
3814 3814
         this.searchTaskLoading = false;
3815
-        this.workTypesArrange[index].value = result.data || [];
3815
+        // this.workTypesArrange[index].value = result.data || [];
3816
+        this.workTypes = result['data'] || [];
3817
+        // 整理后的任务类型
3818
+        for (const value of this.workTypesArrange) {
3819
+          value.value = [];
3820
+        }
3821
+        this.workTypes.forEach((item) => {
3822
+          if(item.associationTypeValue === 'patientTransport'){
3823
+            // 患者其他服务
3824
+            let obj = this.workTypesArrange.find(v => v.key === '患者转运');
3825
+            if(obj){
3826
+              obj.value.push(item);
3827
+            }else{
3828
+              this.workTypesArrange.unshift({ key: '患者转运', value: [item] });
3829
+            }
3830
+          }else if(item.associationTypeValue === 'other' || item.associationTypeValue === 'specimen' || item.associationTypeValue === 'ordinary'){
3831
+            // 物品配送
3832
+            let obj = this.workTypesArrange.find(v => v.key === '物品配送');
3833
+            if(obj){
3834
+              obj.value.push(item);
3835
+            }else{
3836
+              this.workTypesArrange.unshift({ key: '物品配送', value: [item] });
3837
+            }
3838
+          }
3839
+        });
3840
+        console.log('workTypesArrange', this.workTypesArrange);
3841
+        // 任务类型是否显示操作项
3842
+        let arr = this.workTypesArrange;
3843
+        this.workTypesFlag = arr.length >= 5;
3816 3844
       }
3817 3845
     });
3818 3846
   }