seimin 4 mesi fa
parent
commit
f19c1220af

+ 12 - 4
src/app/components/incidentManagement/incident-handle-info/incident-handle-info.component.ts

@@ -71,7 +71,7 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
71 71
     this.getClosecodes();
72 72
     this.getSynergeticList();
73 73
     this.getAssetList();
74
-    this.getIncidentCategoryList();
74
+    this.getIncidentCategoryList('', true);
75 75
   }
76 76
 
77 77
   // 修改故障现象
@@ -143,7 +143,7 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
143 143
   // 获取故障现象
144 144
   incidentCategoryList:any[] = [];
145 145
   handleInfoLoading:boolean = false;
146
-  getIncidentCategoryList(keyword = ''){
146
+  getIncidentCategoryList(keyword = '', isInit = false){
147 147
     let { hospital, type } = this.tool.getHospitalOrDuty();
148 148
     if(type === 'hospital' || type === 'department'){
149 149
       this.incidentCategoryList = [];
@@ -158,9 +158,17 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
158 158
         dutyIds: type === 'duty' ? hospital.id.toString()  : undefined,
159 159
       },
160 160
     };
161
-    this.handleInfoLoading = true;
161
+    if(isInit){
162
+      this.handleInfoLoading = true;
163
+    }else{
164
+      this.isLoading = true;
165
+    }
162 166
     this.mainService.incidentPost("listIncidentCategory", postData).subscribe(res => {
163
-      this.handleInfoLoading = false;
167
+      if(isInit){
168
+        this.handleInfoLoading = false;
169
+      }else{
170
+        this.isLoading = false;
171
+      }
164 172
       this.incidentCategoryList = res.data || [];
165 173
       if(this.incidentDataCopy.category){
166 174
         let obj = this.incidentCategoryList.find(v => v.id == this.incidentDataCopy.category);