Ver código fonte

Merge branch 'master' of http://git.dashitech.com/seimin/zy-pc

maotao 4 meses atrás
pai
commit
ec5bdf5d85

+ 7 - 6
src/app/components/incidentManagement/incident-handle-info/incident-handle-info.component.ts

@@ -148,6 +148,7 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
148
     if(type === 'hospital' || type === 'department'){
148
     if(type === 'hospital' || type === 'department'){
149
       this.incidentCategoryList = [];
149
       this.incidentCategoryList = [];
150
       this.incidentDataCopy.category = null;
150
       this.incidentDataCopy.category = null;
151
+      this.isLoading = false;
151
       return;
152
       return;
152
     };
153
     };
153
     let postData = {
154
     let postData = {
@@ -164,17 +165,17 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
164
       this.isLoading = true;
165
       this.isLoading = true;
165
     }
166
     }
166
     this.mainService.incidentPost("listIncidentCategory", postData).subscribe(res => {
167
     this.mainService.incidentPost("listIncidentCategory", postData).subscribe(res => {
168
+      this.incidentCategoryList = res.data || [];
167
       if(isInit){
169
       if(isInit){
168
         this.handleInfoLoading = false;
170
         this.handleInfoLoading = false;
171
+        if(this.incidentDataCopy.category){
172
+          let obj = this.incidentCategoryList.find(v => v.id == this.incidentDataCopy.category);
173
+          this.incidentDataCopy.category = obj ? obj.id : undefined;
174
+          this.changeCategoryHs.emit(this.incidentDataCopy.category);
175
+        }
169
       }else{
176
       }else{
170
         this.isLoading = false;
177
         this.isLoading = false;
171
       }
178
       }
172
-      this.incidentCategoryList = res.data || [];
173
-      if(this.incidentDataCopy.category){
174
-        let obj = this.incidentCategoryList.find(v => v.id == this.incidentDataCopy.category);
175
-        this.incidentDataCopy.category = obj ? obj.id : undefined;
176
-        this.changeCategoryHs.emit(this.incidentDataCopy.category);
177
-      }
178
     })
179
     })
179
   }
180
   }
180
 
181