Bläddra i källkod

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

maotao 4 månader sedan
förälder
incheckning
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 148
     if(type === 'hospital' || type === 'department'){
149 149
       this.incidentCategoryList = [];
150 150
       this.incidentDataCopy.category = null;
151
+      this.isLoading = false;
151 152
       return;
152 153
     };
153 154
     let postData = {
@@ -164,17 +165,17 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
164 165
       this.isLoading = true;
165 166
     }
166 167
     this.mainService.incidentPost("listIncidentCategory", postData).subscribe(res => {
168
+      this.incidentCategoryList = res.data || [];
167 169
       if(isInit){
168 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 176
       }else{
170 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