ソースを参照

综合统计更多

seimin 3 ヶ月 前
コミット
eb107b99d3
共有28 個のファイルを変更した236 個の追加45 個の削除を含む
  1. 2 2
      src/app/views/new-statistics/maintenance-statistics/building-statistics/building-statistics.component.html
  2. 11 0
      src/app/views/new-statistics/maintenance-statistics/building-statistics/building-statistics.component.ts
  3. 2 2
      src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.html
  4. 11 0
      src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.ts
  5. 11 0
      src/app/views/new-statistics/maintenance-statistics/category-source-statistics/category-source-statistics.component.ts
  6. 2 2
      src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.html
  7. 11 0
      src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.ts
  8. 2 2
      src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.html
  9. 11 0
      src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.ts
  10. 11 0
      src/app/views/new-statistics/maintenance-statistics/consumable-statistics/consumable-statistics.component.ts
  11. 11 0
      src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.ts
  12. 2 2
      src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.html
  13. 11 0
      src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.ts
  14. 11 0
      src/app/views/new-statistics/maintenance-statistics/department-source-statistics/department-source-statistics.component.ts
  15. 2 2
      src/app/views/new-statistics/maintenance-statistics/floor-statistics/floor-statistics.component.html
  16. 11 0
      src/app/views/new-statistics/maintenance-statistics/floor-statistics/floor-statistics.component.ts
  17. 2 2
      src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.html
  18. 11 0
      src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.ts
  19. 2 2
      src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.html
  20. 11 0
      src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.ts
  21. 8 8
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.html
  22. 30 17
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.ts
  23. 2 2
      src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.html
  24. 11 0
      src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.ts
  25. 2 2
      src/app/views/new-statistics/maintenance-statistics/user-statistics/user-statistics.component.html
  26. 11 0
      src/app/views/new-statistics/maintenance-statistics/user-statistics/user-statistics.component.ts
  27. 11 0
      src/app/views/new-statistics/maintenance-statistics/work-hour-statistics/work-hour-statistics.component.ts
  28. 13 0
      src/app/views/new-statistics/services/tab.service.ts

+ 2 - 2
src/app/views/new-statistics/maintenance-statistics/building-statistics/building-statistics.component.html

@@ -23,8 +23,8 @@
23 23
     <tr>
24 24
       <th nzWidth="10%">楼栋名称</th>
25 25
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
26
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均响应时间</th>
27
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
26
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均接单时长</th>
27
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
28 28
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
29 29
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
30 30
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/building-statistics/building-statistics.component.ts

@@ -1,3 +1,4 @@
1
+import { TabService } from './../../services/tab.service';
1 2
 import { NzMessageService } from 'ng-zorro-antd/message';
2 3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3 4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -13,6 +14,7 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
13 14
     private mainService: MainService,
14 15
     private message: NzMessageService,
15 16
     private route: ActivatedRoute,
17
+    private tabService: TabService,
16 18
   ) {}
17 19
 
18 20
   listOfData: any[] = []; //表格数据
@@ -23,6 +25,7 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
23 25
 
24 26
   ngOnInit() {
25 27
     this.initSessionData();
28
+    this.getQueryParams();
26 29
     this.search();
27 30
   }
28 31
 
@@ -39,6 +42,14 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
39 42
     }, 0)
40 43
   }
41 44
 
45
+  getQueryParams(){
46
+    let queryParams = this.tabService.getQueryParams();
47
+    this.tabService.clearQueryParams();
48
+    if(queryParams.dateRange){
49
+      this.dateRange = queryParams.dateRange;
50
+    }
51
+  }
52
+
42 53
   get getMoreFilter(){
43 54
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO;
44 55
     return flag ? 21 : 0;

+ 2 - 2
src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.html

@@ -26,8 +26,8 @@
26 26
     <tr>
27 27
       <th nzWidth="10%">故障现象</th>
28 28
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
29
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均响应时间</th>
30
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
29
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均接单时长</th>
30
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
31 31
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
32 32
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
33 33
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.ts

@@ -1,3 +1,4 @@
1
+import { TabService } from './../../services/tab.service';
1 2
 import { NzMessageService } from 'ng-zorro-antd/message';
2 3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3 4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -13,6 +14,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
13 14
     private mainService: MainService,
14 15
     private message: NzMessageService,
15 16
     private route: ActivatedRoute,
17
+    private tabService: TabService,
16 18
   ) {}
17 19
 
18 20
   listOfData: any[] = []; //表格数据
@@ -23,6 +25,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
23 25
 
24 26
   ngOnInit() {
25 27
     this.initSessionData();
28
+    this.getQueryParams();
26 29
     this.search();
27 30
   }
28 31
 
@@ -39,6 +42,14 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
39 42
     }, 0)
40 43
   }
41 44
 
45
+  getQueryParams(){
46
+    let queryParams = this.tabService.getQueryParams();
47
+    this.tabService.clearQueryParams();
48
+    if(queryParams.dateRange){
49
+      this.dateRange = queryParams.dateRange;
50
+    }
51
+  }
52
+
42 53
   get getMoreFilter(){
43 54
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
44 55
     return flag ? 21 : 0;

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/category-source-statistics/category-source-statistics.component.ts

@@ -1,3 +1,4 @@
1
+import { TabService } from './../../services/tab.service';
1 2
 import { NzMessageService } from 'ng-zorro-antd/message';
2 3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3 4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -13,6 +14,7 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
13 14
     private mainService: MainService,
14 15
     private message: NzMessageService,
15 16
     private route: ActivatedRoute,
17
+    private tabService: TabService,
16 18
   ) {}
17 19
 
18 20
   listOfData: any[] = []; //表格数据
@@ -23,6 +25,7 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
23 25
 
24 26
   ngOnInit() {
25 27
     this.initSessionData();
28
+    this.getQueryParams();
26 29
     this.search();
27 30
   }
28 31
 
@@ -39,6 +42,14 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
39 42
     }, 0)
40 43
   }
41 44
 
45
+  getQueryParams(){
46
+    let queryParams = this.tabService.getQueryParams();
47
+    this.tabService.clearQueryParams();
48
+    if(queryParams.dateRange){
49
+      this.dateRange = queryParams.dateRange;
50
+    }
51
+  }
52
+
42 53
   get getMoreFilter(){
43 54
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
44 55
     return flag ? 21 : 0;

+ 2 - 2
src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.html

@@ -46,8 +46,8 @@
46 46
     <tr>
47 47
       <th nzWidth="10%">故障现象</th>
48 48
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
49
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均响应时间</th>
50
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
49
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均接单时长</th>
50
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
51 51
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
52 52
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
53 53
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.ts

@@ -1,3 +1,4 @@
1
+import { TabService } from './../../services/tab.service';
1 2
 import { debounceTime } from 'rxjs/operators';
2 3
 import { Subject } from 'rxjs';
3 4
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -15,6 +16,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
15 16
     private mainService: MainService,
16 17
     private message: NzMessageService,
17 18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18 20
   ) {}
19 21
 
20 22
   listOfData: any[] = []; //表格数据
@@ -34,6 +36,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
34 36
       fun.call(this, v[1]);
35 37
     });
36 38
     this.initSessionData();
39
+    this.getQueryParams();
37 40
     this.search();
38 41
   }
39 42
 
@@ -50,6 +53,14 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
50 53
     }, 0)
51 54
   }
52 55
 
56
+  getQueryParams(){
57
+    let queryParams = this.tabService.getQueryParams();
58
+    this.tabService.clearQueryParams();
59
+    if(queryParams.dateRange){
60
+      this.dateRange = queryParams.dateRange;
61
+    }
62
+  }
63
+
53 64
   get getMoreFilter(){
54 65
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
55 66
     return flag ? 21 : 0;

+ 2 - 2
src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.html

@@ -36,8 +36,8 @@
36 36
     <tr>
37 37
       <th nzWidth="10%">故障现象</th>
38 38
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
39
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均响应时间</th>
40
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
39
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均接单时长</th>
40
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
41 41
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
42 42
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
43 43
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.ts

@@ -1,3 +1,4 @@
1
+import { TabService } from './../../services/tab.service';
1 2
 import { debounceTime } from 'rxjs/operators';
2 3
 import { Subject } from 'rxjs';
3 4
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -15,6 +16,7 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
15 16
     private mainService: MainService,
16 17
     private message: NzMessageService,
17 18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18 20
   ) {}
19 21
 
20 22
   listOfData: any[] = []; //表格数据
@@ -33,6 +35,7 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
33 35
       fun.call(this, v[1]);
34 36
     });
35 37
     this.initSessionData();
38
+    this.getQueryParams();
36 39
     this.search();
37 40
   }
38 41
 
@@ -49,6 +52,14 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
49 52
     }, 0)
50 53
   }
51 54
 
55
+  getQueryParams(){
56
+    let queryParams = this.tabService.getQueryParams();
57
+    this.tabService.clearQueryParams();
58
+    if(queryParams.dateRange){
59
+      this.dateRange = queryParams.dateRange;
60
+    }
61
+  }
62
+
52 63
   get getMoreFilter(){
53 64
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
54 65
     return flag ? 21 : 0;

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/consumable-statistics/consumable-statistics.component.ts

@@ -1,3 +1,4 @@
1
+import { TabService } from './../../services/tab.service';
1 2
 import { debounceTime } from 'rxjs/operators';
2 3
 import { Subject } from 'rxjs';
3 4
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -15,6 +16,7 @@ export class ConsumableStatisticsComponent implements OnInit, AfterViewInit {
15 16
     private mainService: MainService,
16 17
     private message: NzMessageService,
17 18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18 20
   ) {}
19 21
 
20 22
   listOfData: any[] = []; //表格数据
@@ -33,6 +35,7 @@ export class ConsumableStatisticsComponent implements OnInit, AfterViewInit {
33 35
       fun.call(this, v[1]);
34 36
     });
35 37
     this.initSessionData();
38
+    this.getQueryParams();
36 39
     this.search();
37 40
   }
38 41
 
@@ -49,6 +52,14 @@ export class ConsumableStatisticsComponent implements OnInit, AfterViewInit {
49 52
     }, 0)
50 53
   }
51 54
 
55
+  getQueryParams(){
56
+    let queryParams = this.tabService.getQueryParams();
57
+    this.tabService.clearQueryParams();
58
+    if(queryParams.dateRange){
59
+      this.dateRange = queryParams.dateRange;
60
+    }
61
+  }
62
+
52 63
   get getMoreFilter(){
53 64
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.companyDTO;
54 65
     return flag ? 21 : 0;

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.ts

@@ -1,3 +1,4 @@
1
+import { TabService } from './../../services/tab.service';
1 2
 import { NzMessageService } from 'ng-zorro-antd/message';
2 3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3 4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -13,6 +14,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
13 14
     private mainService: MainService,
14 15
     private message: NzMessageService,
15 16
     private route: ActivatedRoute,
17
+    private tabService: TabService,
16 18
   ) {}
17 19
 
18 20
   listOfData: any[] = []; //表格数据
@@ -25,6 +27,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
25 27
 
26 28
   ngOnInit() {
27 29
     this.initSessionData();
30
+    this.getQueryParams();
28 31
     this.search();
29 32
   }
30 33
 
@@ -41,6 +44,14 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
41 44
     }, 0)
42 45
   }
43 46
 
47
+  getQueryParams(){
48
+    let queryParams = this.tabService.getQueryParams();
49
+    this.tabService.clearQueryParams();
50
+    if(queryParams.dateRange){
51
+      this.dateRange = queryParams.dateRange;
52
+    }
53
+  }
54
+
44 55
   get getMoreFilter(){
45 56
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
46 57
     return flag ? 21 : 0;

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

@@ -38,8 +38,8 @@
38 38
     <tr>
39 39
       <th nzWidth="10%">科室名称(编码)</th>
40 40
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
41
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均响应时间</th>
42
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
41
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均接单时长</th>
42
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
43 43
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
44 44
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
45 45
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.ts

@@ -1,3 +1,4 @@
1
+import { TabService } from './../../services/tab.service';
1 2
 import { NzMessageService } from 'ng-zorro-antd/message';
2 3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3 4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -13,6 +14,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
13 14
     private mainService: MainService,
14 15
     private message: NzMessageService,
15 16
     private route: ActivatedRoute,
17
+    private tabService: TabService,
16 18
   ) {}
17 19
 
18 20
   listOfData: any[] = []; //表格数据
@@ -25,6 +27,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
25 27
 
26 28
   ngOnInit() {
27 29
     this.initSessionData();
30
+    this.getQueryParams();
28 31
     this.search();
29 32
   }
30 33
 
@@ -41,6 +44,14 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
41 44
     }, 0)
42 45
   }
43 46
 
47
+  getQueryParams(){
48
+    let queryParams = this.tabService.getQueryParams();
49
+    this.tabService.clearQueryParams();
50
+    if(queryParams.dateRange){
51
+      this.dateRange = queryParams.dateRange;
52
+    }
53
+  }
54
+
44 55
   get getMoreFilter(){
45 56
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
46 57
     return flag ? 21 : 0;

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/department-source-statistics/department-source-statistics.component.ts

@@ -1,3 +1,4 @@
1
+import { TabService } from './../../services/tab.service';
1 2
 import { NzMessageService } from 'ng-zorro-antd/message';
2 3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3 4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -13,6 +14,7 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
13 14
     private mainService: MainService,
14 15
     private message: NzMessageService,
15 16
     private route: ActivatedRoute,
17
+    private tabService: TabService,
16 18
   ) {}
17 19
 
18 20
   listOfData: any[] = []; //表格数据
@@ -25,6 +27,7 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
25 27
 
26 28
   ngOnInit() {
27 29
     this.initSessionData();
30
+    this.getQueryParams();
28 31
     this.search();
29 32
   }
30 33
 
@@ -41,6 +44,14 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
41 44
     }, 0)
42 45
   }
43 46
 
47
+  getQueryParams(){
48
+    let queryParams = this.tabService.getQueryParams();
49
+    this.tabService.clearQueryParams();
50
+    if(queryParams.dateRange){
51
+      this.dateRange = queryParams.dateRange;
52
+    }
53
+  }
54
+
44 55
   get getMoreFilter(){
45 56
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
46 57
     return flag ? 21 : 0;

+ 2 - 2
src/app/views/new-statistics/maintenance-statistics/floor-statistics/floor-statistics.component.html

@@ -34,8 +34,8 @@
34 34
     <tr>
35 35
       <th nzWidth="10%">楼栋楼层名称</th>
36 36
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
37
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均响应时间</th>
38
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
37
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均接单时长</th>
38
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
39 39
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
40 40
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
41 41
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/floor-statistics/floor-statistics.component.ts

@@ -1,3 +1,4 @@
1
+import { TabService } from './../../services/tab.service';
1 2
 import { debounceTime } from 'rxjs/operators';
2 3
 import { Subject } from 'rxjs';
3 4
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -15,6 +16,7 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
15 16
     private mainService: MainService,
16 17
     private message: NzMessageService,
17 18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18 20
   ) {}
19 21
 
20 22
   listOfData: any[] = []; //表格数据
@@ -33,6 +35,7 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
33 35
       fun.call(this, v[1]);
34 36
     });
35 37
     this.initSessionData();
38
+    this.getQueryParams();
36 39
     this.search();
37 40
   }
38 41
 
@@ -49,6 +52,14 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
49 52
     }, 0)
50 53
   }
51 54
 
55
+  getQueryParams(){
56
+    let queryParams = this.tabService.getQueryParams();
57
+    this.tabService.clearQueryParams();
58
+    if(queryParams.dateRange){
59
+      this.dateRange = queryParams.dateRange;
60
+    }
61
+  }
62
+
52 63
   get getMoreFilter(){
53 64
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO;
54 65
     return flag ? 21 : 0;

+ 2 - 2
src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.html

@@ -25,8 +25,8 @@
25 25
     <tr>
26 26
       <th nzWidth="10%">分组名称</th>
27 27
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
28
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均响应时间</th>
29
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
28
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均接单时长</th>
29
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
30 30
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
31 31
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
32 32
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.ts

@@ -1,3 +1,4 @@
1
+import { TabService } from './../../services/tab.service';
1 2
 import { NzMessageService } from 'ng-zorro-antd/message';
2 3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3 4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -13,6 +14,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
13 14
     private mainService: MainService,
14 15
     private message: NzMessageService,
15 16
     private route: ActivatedRoute,
17
+    private tabService: TabService,
16 18
   ) {}
17 19
 
18 20
   listOfData: any[] = []; //表格数据
@@ -23,6 +25,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
23 25
 
24 26
   ngOnInit() {
25 27
     this.initSessionData();
28
+    this.getQueryParams();
26 29
     this.search();
27 30
   }
28 31
 
@@ -39,6 +42,14 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
39 42
     }, 0)
40 43
   }
41 44
 
45
+  getQueryParams(){
46
+    let queryParams = this.tabService.getQueryParams();
47
+    this.tabService.clearQueryParams();
48
+    if(queryParams.dateRange){
49
+      this.dateRange = queryParams.dateRange;
50
+    }
51
+  }
52
+
42 53
   get getMoreFilter(){
43 54
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
44 55
     return flag ? 21 : 0;

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

@@ -37,8 +37,8 @@
37 37
     <tr>
38 38
       <th nzWidth="10%" nzShowSort nzSortKey="startDate" [(nzSort)]="sortCurrent.startDate">时间</th>
39 39
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
40
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均响应时间</th>
41
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
40
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均接单时长</th>
41
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
42 42
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
43 43
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
44 44
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.ts

@@ -1,3 +1,4 @@
1
+import { TabService } from './../../services/tab.service';
1 2
 import { debounceTime } from 'rxjs/operators';
2 3
 import { Subject } from 'rxjs';
3 4
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -15,6 +16,7 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
15 16
     private mainService: MainService,
16 17
     private message: NzMessageService,
17 18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18 20
   ) {}
19 21
 
20 22
   listOfData: any[] = []; //表格数据
@@ -33,6 +35,7 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
33 35
       fun.call(this, v[1]);
34 36
     });
35 37
     this.initSessionData();
38
+    this.getQueryParams();
36 39
     this.search();
37 40
   }
38 41
 
@@ -49,6 +52,14 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
49 52
     }, 0)
50 53
   }
51 54
 
55
+  getQueryParams(){
56
+    let queryParams = this.tabService.getQueryParams();
57
+    this.tabService.clearQueryParams();
58
+    if(queryParams.dateRange){
59
+      this.dateRange = queryParams.dateRange;
60
+    }
61
+  }
62
+
52 63
   get getMoreFilter(){
53 64
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO;
54 65
     return flag ? 21 : 0;

+ 8 - 8
src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.html

@@ -58,7 +58,7 @@
58 58
 					<div class="statistics-select-list" [ngClass]="{'activeClass': activeIndex == 0}" (click)="selectCheck(0)">维修人员</div>
59 59
 					<div class="statistics-select-list" [ngClass]="{'activeClass': activeIndex == 1}" (click)="selectCheck(1)">维修组</div>
60 60
 				</div>
61
-				<div class="more" (click)="toPath(1)">更多></div>
61
+				<div class="more" *ngIf="showMore(activeIndex == 0 ? 'userStatistics' : 'groupStatistics')" (click)="toPath(activeIndex == 0 ? '/newStatistics/maintenanceStatistics/userStatistics' : '/newStatistics/maintenanceStatistics/groupStatistics')">更多></div>
62 62
 			</div>
63 63
 			<div class="table">
64 64
 				<div class="td">
@@ -67,7 +67,7 @@
67 67
 					<div class="table-td" *ngIf="activeIndex==1">维修组</div>
68 68
 					<div class="table-td">工单量</div>
69 69
 					<div class="table-td">平均接单时长</div>
70
-					<div class="table-td">平均处理时长</div>
70
+					<div class="table-td">平均解决时长</div>
71 71
 					<div class="table-td">超时单</div>
72 72
 				</div>
73 73
 				<div class="th" *ngFor="let item of maintainData; let index = index;">
@@ -88,8 +88,8 @@
88 88
 		<div class="statistics width-40">
89 89
 			<div class="statistics-box">
90 90
 				<div class="sign-green"></div>
91
-				<div class="statistics-title">报修来源</div>
92
-				<div class="more" (click)="toPath(2)">更多></div>
91
+				<div class="statistics-title">故障来源</div>
92
+				<div class="more" *ngIf="showMore('categorySourceStatistics')" (click)="toPath('/newStatistics/maintenanceStatistics/categorySourceStatistics')">更多></div>
93 93
 			</div>
94 94
 			<div class="echarts-repairs">
95 95
 			  <div echarts class="echarts" [options]='repairsOptions'></div>
@@ -101,7 +101,7 @@
101 101
 			<div class="statistics-box">
102 102
 				<div class="sign-green"></div>
103 103
 				<div class="statistics-title">一级故障现象Top5</div>
104
-				<div class="more" (click)="toPath(3)">更多></div>
104
+				<div class="more" *ngIf="showMore('categoryOneStatistics')" (click)="toPath('/newStatistics/maintenanceStatistics/categoryOneStatistics')">更多></div>
105 105
 			</div>
106 106
 			<div class="echarts-repairs">
107 107
 				<div echarts class="echarts" [options]='malfunctionOptions'></div>
@@ -111,7 +111,7 @@
111 111
 			<div class="statistics-box">
112 112
 				<div class="sign-green"></div>
113 113
 				<div class="statistics-title">楼栋报修Top5</div>
114
-				<div class="more" (click)="toPath(4)">更多></div>
114
+				<div class="more" *ngIf="showMore('buildingStatistics')" (click)="toPath('/newStatistics/maintenanceStatistics/buildingStatistics')">更多></div>
115 115
 			</div>
116 116
 			<div class="echarts-repairs">
117 117
 				<div echarts class="echarts" [options]='buildingOptions'></div>
@@ -123,7 +123,7 @@
123 123
 			<div class="statistics-box">
124 124
 				<div class="sign-green"></div>
125 125
 				<div class="statistics-title">科室费用Top5</div>
126
-				<div class="more" (click)="toPath(5)">更多></div>
126
+				<div class="more" *ngIf="showMore('departmentIncidentStatistics')" (click)="toPath('/newStatistics/maintenanceStatistics/departmentIncidentStatistics')">更多></div>
127 127
 			</div>
128 128
 			<div class="table">
129 129
 				<div class="td">
@@ -144,7 +144,7 @@
144 144
 			<div class="statistics-box">
145 145
 				<div class="sign-green"></div>
146 146
 				<div class="statistics-title">耗材Top5</div>
147
-				<div class="more" (click)="toPath(6)">更多></div>
147
+				<div class="more" *ngIf="showMore('consumableStatistics')" (click)="toPath('/newStatistics/maintenanceStatistics/consumableStatistics')">更多></div>
148 148
 			</div>
149 149
 			<div class="table">
150 150
 				<div class="td">

+ 30 - 17
src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.ts

@@ -1,6 +1,8 @@
1
+import { Router } from '@angular/router';
1 2
 import { format, addMonths, startOfMonth, endOfMonth } from 'date-fns';
2 3
 import { Component, OnInit } from "@angular/core";
3 4
 import { MainService } from 'src/app/services/main.service';
5
+import { TabService } from '../../services/tab.service';
4 6
 @Component({
5 7
   selector: "app-synthesize-statistics",
6 8
   templateUrl: "./synthesize-statistics.component.html",
@@ -9,8 +11,10 @@ import { MainService } from 'src/app/services/main.service';
9 11
 export class SynthesizeStatisticsComponent implements OnInit {
10 12
   constructor(
11 13
     private mainService: MainService,
14
+    private tabService: TabService,
15
+    public router: Router,
12 16
   ) {}
13
-	
17
+
14 18
 	isLoading:Boolean = false;
15 19
 	workData:any = []; //工单统计
16 20
   listOfData: any[] = []; //表格数据
@@ -59,13 +63,13 @@ export class SynthesizeStatisticsComponent implements OnInit {
59 63
   ngOnInit() {
60 64
     this.search();
61 65
   }
62
-	
66
+
63 67
 	// 维修处理类型切换
64 68
 	selectCheck(type){
65 69
 		this.activeIndex = type
66 70
 		this.getMaintainData();
67 71
 	}
68
-	
72
+
69 73
 	// 报修来源
70 74
 	repairsChart() {
71 75
 		let postData:any = {
@@ -109,7 +113,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
109 113
 							},
110 114
 							label: {
111 115
 									show: true,
112
-									formatter: '{b}: {c} {d}%'  
116
+									formatter: '{b}: {c} {d}%'
113 117
 							},
114 118
 				      itemStyle: {
115 119
 				        normal: {
@@ -130,7 +134,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
130 134
 				};
131 135
 		  });
132 136
 	}
133
-	
137
+
134 138
 	// 一级故障
135 139
 	malfunctionChart(){
136 140
 		let postData:any = {
@@ -195,7 +199,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
195 199
 				}
196 200
 		  });
197 201
 	}
198
-	
202
+
199 203
 	// 楼栋报修
200 204
 	buildingChart(){
201 205
 		let postData:any = {
@@ -260,7 +264,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
260 264
 		    }
261 265
 		  });
262 266
 	}
263
-	
267
+
264 268
 	// 科室费用
265 269
 	getDeptCostData() {
266 270
 	  let postData:any = {
@@ -277,7 +281,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
277 281
 	      this.deptCostData = result.data || [];
278 282
 	    });
279 283
 	}
280
-	
284
+
281 285
 	// 耗材
282 286
 	getConsumableData() {
283 287
 	  let postData:any = {
@@ -295,12 +299,21 @@ export class SynthesizeStatisticsComponent implements OnInit {
295 299
 	      this.consumableData = result.data || [];
296 300
 	    });
297 301
 	}
298
-	
302
+
299 303
 	// 更多跳转
300
-	toPath(type){
301
-		console.log(type)
304
+	toPath(path){
305
+    let flag = this.tabService.tabs.some(v => v.path === path);
306
+    flag && this.tabService.deleteRouteSnapshot(path);
307
+    this.tabService.setQueryParams('dateRange', this.dateRange);
308
+    this.router.navigate([path], { replaceUrl: true });
302 309
 	}
303
-	
310
+
311
+  // 判断更多是否显示
312
+  showMore(path){
313
+    let menus = JSON.parse(localStorage.getItem("menu"));
314
+    return menus.find(v => v.link === 'maintenanceStatistics').childrens.some(v => v.link === path);
315
+  }
316
+
304 317
   // 初始化缓存数据
305 318
   queryType:any;
306 319
   hosId:any;
@@ -334,7 +347,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
334 347
       this.dutyId = undefined;
335 348
       this.parentDutyId = dutyId;
336 349
     }
337
-		
350
+
338 351
 		this.isLoading = true
339 352
 		this.getWorkData();
340 353
 		this.getMaintainData();
@@ -369,7 +382,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
369 382
         this.listLength = result.totalCount;
370 383
       });
371 384
   }
372
-	
385
+
373 386
 	// 头部工单数据
374 387
 	getWorkData() {
375 388
 	  let postData:any = {
@@ -386,7 +399,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
386 399
 	      this.workData = result.data[0] || [];
387 400
 	    });
388 401
 	}
389
-	
402
+
390 403
 	// 维修处理
391 404
 	getMaintainData() {
392 405
 	  let postData:any = {
@@ -404,14 +417,14 @@ export class SynthesizeStatisticsComponent implements OnInit {
404 417
 	      this.maintainData = result.data || [];
405 418
 	    });
406 419
 	}
407
-	
420
+
408 421
 	// 重置
409 422
 	reset(){
410 423
 		this.dateRange = [format(startOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss'), format(endOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss')];
411 424
 		this.activeIndex = 0;
412 425
 		this.search();
413 426
 	}
414
-	
427
+
415 428
   // 搜索
416 429
   search() {
417 430
 		this.initSessionData();

+ 2 - 2
src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.html

@@ -36,8 +36,8 @@
36 36
     <tr>
37 37
       <th nzWidth="10%">公司名称</th>
38 38
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
39
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均响应时间</th>
40
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
39
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均接单时长</th>
40
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
41 41
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
42 42
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
43 43
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.ts

@@ -1,3 +1,4 @@
1
+import { TabService } from './../../services/tab.service';
1 2
 import { debounceTime } from 'rxjs/operators';
2 3
 import { Subject } from 'rxjs';
3 4
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -15,6 +16,7 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
15 16
     private mainService: MainService,
16 17
     private message: NzMessageService,
17 18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18 20
   ) {}
19 21
 
20 22
   listOfData: any[] = []; //表格数据
@@ -33,6 +35,7 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
33 35
       fun.call(this, v[1]);
34 36
     });
35 37
     this.initSessionData();
38
+    this.getQueryParams();
36 39
     this.search();
37 40
   }
38 41
 
@@ -49,6 +52,14 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
49 52
     }, 0)
50 53
   }
51 54
 
55
+  getQueryParams(){
56
+    let queryParams = this.tabService.getQueryParams();
57
+    this.tabService.clearQueryParams();
58
+    if(queryParams.dateRange){
59
+      this.dateRange = queryParams.dateRange;
60
+    }
61
+  }
62
+
52 63
   get getMoreFilter(){
53 64
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
54 65
     return flag ? 21 : 0;

+ 2 - 2
src/app/views/new-statistics/maintenance-statistics/user-statistics/user-statistics.component.html

@@ -36,8 +36,8 @@
36 36
     <tr>
37 37
       <th nzWidth="10%">人员姓名(工号)</th>
38 38
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
39
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均响应时间</th>
40
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
39
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均接单时长</th>
40
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时</th>
41 41
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
42 42
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
43 43
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/user-statistics/user-statistics.component.ts

@@ -5,6 +5,7 @@ import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } fro
5 5
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
6 6
 import { MainService } from 'src/app/services/main.service';
7 7
 import { ActivatedRoute } from '@angular/router';
8
+import { TabService } from '../../services/tab.service';
8 9
 @Component({
9 10
   selector: "app-user-statistics",
10 11
   templateUrl: "./user-statistics.component.html",
@@ -15,6 +16,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
15 16
     private mainService: MainService,
16 17
     private message: NzMessageService,
17 18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18 20
   ) {}
19 21
 
20 22
   listOfData: any[] = []; //表格数据
@@ -33,6 +35,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
33 35
       fun.call(this, v[1]);
34 36
     });
35 37
     this.initSessionData();
38
+    this.getQueryParams();
36 39
     this.search();
37 40
   }
38 41
 
@@ -49,6 +52,14 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
49 52
     }, 0)
50 53
   }
51 54
 
55
+  getQueryParams(){
56
+    let queryParams = this.tabService.getQueryParams();
57
+    this.tabService.clearQueryParams();
58
+    if(queryParams.dateRange){
59
+      this.dateRange = queryParams.dateRange;
60
+    }
61
+  }
62
+
52 63
   get getMoreFilter(){
53 64
     let flag = this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO;
54 65
     return flag ? 21 : 0;

+ 11 - 0
src/app/views/new-statistics/maintenance-statistics/work-hour-statistics/work-hour-statistics.component.ts

@@ -1,3 +1,4 @@
1
+import { TabService } from './../../services/tab.service';
1 2
 import { debounceTime } from 'rxjs/operators';
2 3
 import { Subject } from 'rxjs';
3 4
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -15,6 +16,7 @@ export class WorkHourStatisticsComponent implements OnInit, AfterViewInit {
15 16
     private mainService: MainService,
16 17
     private message: NzMessageService,
17 18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18 20
   ) {}
19 21
 
20 22
   listOfData: any[] = []; //表格数据
@@ -33,6 +35,7 @@ export class WorkHourStatisticsComponent implements OnInit, AfterViewInit {
33 35
       fun.call(this, v[1]);
34 36
     });
35 37
     this.initSessionData();
38
+    this.getQueryParams();
36 39
     this.search();
37 40
   }
38 41
 
@@ -49,6 +52,14 @@ export class WorkHourStatisticsComponent implements OnInit, AfterViewInit {
49 52
     }, 0)
50 53
   }
51 54
 
55
+  getQueryParams(){
56
+    let queryParams = this.tabService.getQueryParams();
57
+    this.tabService.clearQueryParams();
58
+    if(queryParams.dateRange){
59
+      this.dateRange = queryParams.dateRange;
60
+    }
61
+  }
62
+
52 63
   get getMoreFilter(){
53 64
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.companyDTO;
54 65
     return flag ? 21 : 0;

+ 13 - 0
src/app/views/new-statistics/services/tab.service.ts

@@ -28,6 +28,19 @@ export class TabService {
28 28
       });
29 29
   }
30 30
 
31
+  public queryParams: any = {};
32
+  setQueryParams(key, value){
33
+    this.queryParams[key] = value;
34
+  }
35
+
36
+  getQueryParams(){
37
+    return this.queryParams;
38
+  }
39
+
40
+  clearQueryParams(){
41
+    this.queryParams = {};
42
+  }
43
+
31 44
   public deleteAllRouteSnapshot(){
32 45
     this.tabs.forEach(v => {
33 46
       SimpleReuseStrategy.deleteRouteSnapshot(v.path);