seimin 1 月之前
父節點
當前提交
e6b0502fae

+ 23 - 23
src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.html

@@ -15,35 +15,35 @@
15 15
 <nz-table [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1">
16 16
   <thead (nzSortChange)="sort($event)" nzSingleSort>
17 17
     <tr>
18
-      <th nzWidth="10%">时间</th>
19
-      <th nzWidth="9%">工单总数</th>
20
-      <th nzWidth="9%" nzShowSort nzSortKey="byOrderNum" [(nzSort)]="sortCurrent.byOrderNum">平均响应时间</th>
21
-      <th nzWidth="9%">平均解决时间</th>
22
-      <th nzWidth="9%">超时单数</th>
23
-      <th nzWidth="9%" nzShowSort nzSortKey="completionRate" [(nzSort)]="sortCurrent.completionRate">挂起单数</th>
24
-      <th nzWidth="9%">耗材费用(元)</th>
25
-      <th nzWidth="9%">工时费用(元)</th>
26
-      <th nzWidth="9%">总费用(元)</th>
27
-      <th nzWidth="9%" nzShowSort nzSortKey="byIntegral" [(nzSort)]="sortCurrent.byIntegral">差评单数</th>
28
-      <th nzWidth="9%">好评率</th>
18
+      <th nzWidth="10%" nzShowSort nzSortKey="startDate" [(nzSort)]="sortCurrent.startDate">时间</th>
19
+      <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
20
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均响应时间</th>
21
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时间</th>
22
+      <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
23
+      <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
24
+      <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
25
+      <th nzWidth="9%" nzShowSort nzSortKey="workHourPrice" [(nzSort)]="sortCurrent.workHourPrice">工时费用(元)</th>
26
+      <th nzWidth="9%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用(元)</th>
27
+      <th nzWidth="9%" nzShowSort nzSortKey="negativeNum" [(nzSort)]="sortCurrent.negativeNum">差评单数</th>
28
+      <th nzWidth="9%" nzShowSort nzSortKey="favorableRate" [(nzSort)]="sortCurrent.favorableRate">好评率</th>
29 29
     </tr>
30 30
   </thead>
31 31
   <tbody>
32 32
     <tr *ngFor="let data of listOfData; let index = index">
33
-      <td>{{ index + (pageIndex - 1) * 10 + 1 }}</td>
34
-      <td>{{ data.name }}</td>
35
-      <td>{{ data.total || 0 }}</td>
36
-      <td>{{ data.total || 0 }}</td>
37
-      <td>{{ data.total || 0 }}</td>
38
-      <td>{{ data.fiveTimeNum || 0 }}<br>{{ data.specialCloseNum }}</td>
39
-      <td>{{ data.arriveTime }}<br>{{ data.completeTime }}</td>
40
-      <td>{{ data.avePer + "%" }}</td>
41
-      <td>{{ data.buildingGrade }}<br>{{ data.inspectModeGrade }}</td>
42
-      <td>{{ data.order || 0 }}</td>
43
-      <td>{{ data.order || 0 }}</td>
33
+      <td>{{ data.startDate }}</td>
34
+      <td>{{ data.sum }}</td>
35
+      <td>{{ data.avgResponseTime }}</td>
36
+      <td>{{ data.avgResolvedTime }}</td>
37
+      <td>{{ data.resolvedOverNum }}</td>
38
+      <td>{{ data.overTimeNum }}</td>
39
+      <td>{{ data.consumablePrice }}</td>
40
+      <td>{{ data.workHourPrice }}</td>
41
+      <td>{{ data.totalPrice }}</td>
42
+      <td>{{ data.negativeNum }}</td>
43
+      <td>{{ data.favorableRate }}</td>
44 44
     </tr>
45 45
   </tbody>
46 46
 </nz-table>
47 47
 <div>
48 48
   <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)"></nz-pagination>
49
-</div>
49
+</div>

+ 6 - 9
src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.ts

@@ -27,9 +27,10 @@ export class IncidentStatisticsComponent implements OnInit {
27 27
   dutyId:any;
28 28
   parentDutyId:any;
29 29
   initSessionData(){
30
-    let queryType:any = sessionStorage.getItem('maintenance_statistics_queryType');
31
-    let hosId:any = sessionStorage.getItem('maintenance_statistics_hospitalId');
32
-    let dutyId:any = sessionStorage.getItem('maintenance_statistics_dutyId');
30
+    let maintenanceStatistics = JSON.parse(sessionStorage.getItem('maintenanceStatistics'));
31
+    let queryType:any = maintenanceStatistics.queryType;
32
+    let hosId:any = maintenanceStatistics.hospitalId;
33
+    let dutyId:any = maintenanceStatistics.dutyId;
33 34
 
34 35
     queryType = queryType ? +queryType : undefined;
35 36
     hosId = hosId ? +hosId : undefined;
@@ -71,7 +72,7 @@ export class IncidentStatisticsComponent implements OnInit {
71 72
       parentDutyId: this.parentDutyId,
72 73
     };
73 74
     if (field && sort) {
74
-      postData[field] = sort === "ascend" ? `asc` : `desc`;
75
+      postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
75 76
     }
76 77
     this.loading1 = true;
77 78
     this.mainService
@@ -84,11 +85,7 @@ export class IncidentStatisticsComponent implements OnInit {
84 85
   }
85 86
 
86 87
   // 列表排序
87
-  sortCurrent = {
88
-    byOrderNum: null,
89
-    byIntegral: null,
90
-		completionRate: null,
91
-  };
88
+  sortCurrent = {};
92 89
   sortCurrentKey: string = "";
93 90
   sortCurrentValue: string | null = "";
94 91
   sort(e) {

+ 2 - 6
src/app/views/new-statistics/maintenance-statistics/maintenance-statistics.component.ts

@@ -107,16 +107,12 @@ export class MaintenanceStatisticsComponent implements OnInit, OnDestroy {
107 107
 
108 108
   // 缓存数据
109 109
   sessionSave(){
110
-    sessionStorage.setItem('maintenance_statistics_queryType', this.queryType);
111
-    sessionStorage.setItem('maintenance_statistics_hospitalId', this.hospital ? this.hospital.id : '');
112
-    sessionStorage.setItem('maintenance_statistics_dutyId', this.duty ? this.duty.id : '');
110
+    sessionStorage.setItem('maintenanceStatistics', JSON.stringify({queryType: this.queryType, hospitalId: this.hospital ? this.hospital.id : undefined, dutyId: this.duty ? this.duty.id : undefined}))
113 111
   }
114 112
 
115 113
   // 清除缓存数据
116 114
   sessionRemove(){
117
-    sessionStorage.removeItem('maintenance_statistics_queryType');
118
-    sessionStorage.removeItem('maintenance_statistics_hospitalId');
119
-    sessionStorage.removeItem('maintenance_statistics_dutyId');
115
+    sessionStorage.removeItem('maintenanceStatistics');
120 116
   }
121 117
 
122 118
   // 查询范围