seimin 4 months ago
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
     this.getClosecodes();
71
     this.getClosecodes();
72
     this.getSynergeticList();
72
     this.getSynergeticList();
73
     this.getAssetList();
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
   incidentCategoryList:any[] = [];
144
   incidentCategoryList:any[] = [];
145
   handleInfoLoading:boolean = false;
145
   handleInfoLoading:boolean = false;
146
-  getIncidentCategoryList(keyword = ''){
146
+  getIncidentCategoryList(keyword = '', isInit = false){
147
     let { hospital, type } = this.tool.getHospitalOrDuty();
147
     let { hospital, type } = this.tool.getHospitalOrDuty();
148
     if(type === 'hospital' || type === 'department'){
148
     if(type === 'hospital' || type === 'department'){
149
       this.incidentCategoryList = [];
149
       this.incidentCategoryList = [];
@@ -158,9 +158,17 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
158
         dutyIds: type === 'duty' ? hospital.id.toString()  : undefined,
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
     this.mainService.incidentPost("listIncidentCategory", postData).subscribe(res => {
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
       this.incidentCategoryList = res.data || [];
172
       this.incidentCategoryList = res.data || [];
165
       if(this.incidentDataCopy.category){
173
       if(this.incidentDataCopy.category){
166
         let obj = this.incidentCategoryList.find(v => v.id == this.incidentDataCopy.category);
174
         let obj = this.incidentCategoryList.find(v => v.id == this.incidentDataCopy.category);