소스 검색

综合统计更多

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
     <tr>
23
     <tr>
24
       <th nzWidth="10%">楼栋名称</th>
24
       <th nzWidth="10%">楼栋名称</th>
25
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
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
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
28
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
29
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
29
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
30
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
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
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -13,6 +14,7 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
13
     private mainService: MainService,
14
     private mainService: MainService,
14
     private message: NzMessageService,
15
     private message: NzMessageService,
15
     private route: ActivatedRoute,
16
     private route: ActivatedRoute,
17
+    private tabService: TabService,
16
   ) {}
18
   ) {}
17
 
19
 
18
   listOfData: any[] = []; //表格数据
20
   listOfData: any[] = []; //表格数据
@@ -23,6 +25,7 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
23
 
25
 
24
   ngOnInit() {
26
   ngOnInit() {
25
     this.initSessionData();
27
     this.initSessionData();
28
+    this.getQueryParams();
26
     this.search();
29
     this.search();
27
   }
30
   }
28
 
31
 
@@ -39,6 +42,14 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
39
     }, 0)
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
   get getMoreFilter(){
53
   get getMoreFilter(){
43
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO;
54
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO;
44
     return flag ? 21 : 0;
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
     <tr>
26
     <tr>
27
       <th nzWidth="10%">故障现象</th>
27
       <th nzWidth="10%">故障现象</th>
28
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
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
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
31
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
32
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
32
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
33
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
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
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -13,6 +14,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
13
     private mainService: MainService,
14
     private mainService: MainService,
14
     private message: NzMessageService,
15
     private message: NzMessageService,
15
     private route: ActivatedRoute,
16
     private route: ActivatedRoute,
17
+    private tabService: TabService,
16
   ) {}
18
   ) {}
17
 
19
 
18
   listOfData: any[] = []; //表格数据
20
   listOfData: any[] = []; //表格数据
@@ -23,6 +25,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
23
 
25
 
24
   ngOnInit() {
26
   ngOnInit() {
25
     this.initSessionData();
27
     this.initSessionData();
28
+    this.getQueryParams();
26
     this.search();
29
     this.search();
27
   }
30
   }
28
 
31
 
@@ -39,6 +42,14 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
39
     }, 0)
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
   get getMoreFilter(){
53
   get getMoreFilter(){
43
     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
     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
     return flag ? 21 : 0;
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
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -13,6 +14,7 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
13
     private mainService: MainService,
14
     private mainService: MainService,
14
     private message: NzMessageService,
15
     private message: NzMessageService,
15
     private route: ActivatedRoute,
16
     private route: ActivatedRoute,
17
+    private tabService: TabService,
16
   ) {}
18
   ) {}
17
 
19
 
18
   listOfData: any[] = []; //表格数据
20
   listOfData: any[] = []; //表格数据
@@ -23,6 +25,7 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
23
 
25
 
24
   ngOnInit() {
26
   ngOnInit() {
25
     this.initSessionData();
27
     this.initSessionData();
28
+    this.getQueryParams();
26
     this.search();
29
     this.search();
27
   }
30
   }
28
 
31
 
@@ -39,6 +42,14 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
39
     }, 0)
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
   get getMoreFilter(){
53
   get getMoreFilter(){
43
     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;
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
     return flag ? 21 : 0;
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
     <tr>
46
     <tr>
47
       <th nzWidth="10%">故障现象</th>
47
       <th nzWidth="10%">故障现象</th>
48
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
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
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
51
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
52
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
52
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
53
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
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
 import { debounceTime } from 'rxjs/operators';
2
 import { debounceTime } from 'rxjs/operators';
2
 import { Subject } from 'rxjs';
3
 import { Subject } from 'rxjs';
3
 import { NzMessageService } from 'ng-zorro-antd/message';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -15,6 +16,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
15
     private mainService: MainService,
16
     private mainService: MainService,
16
     private message: NzMessageService,
17
     private message: NzMessageService,
17
     private route: ActivatedRoute,
18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18
   ) {}
20
   ) {}
19
 
21
 
20
   listOfData: any[] = []; //表格数据
22
   listOfData: any[] = []; //表格数据
@@ -34,6 +36,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
34
       fun.call(this, v[1]);
36
       fun.call(this, v[1]);
35
     });
37
     });
36
     this.initSessionData();
38
     this.initSessionData();
39
+    this.getQueryParams();
37
     this.search();
40
     this.search();
38
   }
41
   }
39
 
42
 
@@ -50,6 +53,14 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
50
     }, 0)
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
   get getMoreFilter(){
64
   get getMoreFilter(){
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;
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
     return flag ? 21 : 0;
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
     <tr>
36
     <tr>
37
       <th nzWidth="10%">故障现象</th>
37
       <th nzWidth="10%">故障现象</th>
38
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
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
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
41
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
42
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
42
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
43
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
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
 import { debounceTime } from 'rxjs/operators';
2
 import { debounceTime } from 'rxjs/operators';
2
 import { Subject } from 'rxjs';
3
 import { Subject } from 'rxjs';
3
 import { NzMessageService } from 'ng-zorro-antd/message';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -15,6 +16,7 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
15
     private mainService: MainService,
16
     private mainService: MainService,
16
     private message: NzMessageService,
17
     private message: NzMessageService,
17
     private route: ActivatedRoute,
18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18
   ) {}
20
   ) {}
19
 
21
 
20
   listOfData: any[] = []; //表格数据
22
   listOfData: any[] = []; //表格数据
@@ -33,6 +35,7 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
33
       fun.call(this, v[1]);
35
       fun.call(this, v[1]);
34
     });
36
     });
35
     this.initSessionData();
37
     this.initSessionData();
38
+    this.getQueryParams();
36
     this.search();
39
     this.search();
37
   }
40
   }
38
 
41
 
@@ -49,6 +52,14 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
49
     }, 0)
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
   get getMoreFilter(){
63
   get getMoreFilter(){
53
     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;
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
     return flag ? 21 : 0;
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
 import { debounceTime } from 'rxjs/operators';
2
 import { debounceTime } from 'rxjs/operators';
2
 import { Subject } from 'rxjs';
3
 import { Subject } from 'rxjs';
3
 import { NzMessageService } from 'ng-zorro-antd/message';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -15,6 +16,7 @@ export class ConsumableStatisticsComponent implements OnInit, AfterViewInit {
15
     private mainService: MainService,
16
     private mainService: MainService,
16
     private message: NzMessageService,
17
     private message: NzMessageService,
17
     private route: ActivatedRoute,
18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18
   ) {}
20
   ) {}
19
 
21
 
20
   listOfData: any[] = []; //表格数据
22
   listOfData: any[] = []; //表格数据
@@ -33,6 +35,7 @@ export class ConsumableStatisticsComponent implements OnInit, AfterViewInit {
33
       fun.call(this, v[1]);
35
       fun.call(this, v[1]);
34
     });
36
     });
35
     this.initSessionData();
37
     this.initSessionData();
38
+    this.getQueryParams();
36
     this.search();
39
     this.search();
37
   }
40
   }
38
 
41
 
@@ -49,6 +52,14 @@ export class ConsumableStatisticsComponent implements OnInit, AfterViewInit {
49
     }, 0)
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
   get getMoreFilter(){
63
   get getMoreFilter(){
53
     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;
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
     return flag ? 21 : 0;
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
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -13,6 +14,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
13
     private mainService: MainService,
14
     private mainService: MainService,
14
     private message: NzMessageService,
15
     private message: NzMessageService,
15
     private route: ActivatedRoute,
16
     private route: ActivatedRoute,
17
+    private tabService: TabService,
16
   ) {}
18
   ) {}
17
 
19
 
18
   listOfData: any[] = []; //表格数据
20
   listOfData: any[] = []; //表格数据
@@ -25,6 +27,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
25
 
27
 
26
   ngOnInit() {
28
   ngOnInit() {
27
     this.initSessionData();
29
     this.initSessionData();
30
+    this.getQueryParams();
28
     this.search();
31
     this.search();
29
   }
32
   }
30
 
33
 
@@ -41,6 +44,14 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
41
     }, 0)
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
   get getMoreFilter(){
55
   get getMoreFilter(){
45
     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;
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
     return flag ? 21 : 0;
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
     <tr>
38
     <tr>
39
       <th nzWidth="10%">科室名称(编码)</th>
39
       <th nzWidth="10%">科室名称(编码)</th>
40
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
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
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
43
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
44
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
44
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
45
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
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
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -13,6 +14,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
13
     private mainService: MainService,
14
     private mainService: MainService,
14
     private message: NzMessageService,
15
     private message: NzMessageService,
15
     private route: ActivatedRoute,
16
     private route: ActivatedRoute,
17
+    private tabService: TabService,
16
   ) {}
18
   ) {}
17
 
19
 
18
   listOfData: any[] = []; //表格数据
20
   listOfData: any[] = []; //表格数据
@@ -25,6 +27,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
25
 
27
 
26
   ngOnInit() {
28
   ngOnInit() {
27
     this.initSessionData();
29
     this.initSessionData();
30
+    this.getQueryParams();
28
     this.search();
31
     this.search();
29
   }
32
   }
30
 
33
 
@@ -41,6 +44,14 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
41
     }, 0)
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
   get getMoreFilter(){
55
   get getMoreFilter(){
45
     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;
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
     return flag ? 21 : 0;
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
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -13,6 +14,7 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
13
     private mainService: MainService,
14
     private mainService: MainService,
14
     private message: NzMessageService,
15
     private message: NzMessageService,
15
     private route: ActivatedRoute,
16
     private route: ActivatedRoute,
17
+    private tabService: TabService,
16
   ) {}
18
   ) {}
17
 
19
 
18
   listOfData: any[] = []; //表格数据
20
   listOfData: any[] = []; //表格数据
@@ -25,6 +27,7 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
25
 
27
 
26
   ngOnInit() {
28
   ngOnInit() {
27
     this.initSessionData();
29
     this.initSessionData();
30
+    this.getQueryParams();
28
     this.search();
31
     this.search();
29
   }
32
   }
30
 
33
 
@@ -41,6 +44,14 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
41
     }, 0)
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
   get getMoreFilter(){
55
   get getMoreFilter(){
45
     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;
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
     return flag ? 21 : 0;
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
     <tr>
34
     <tr>
35
       <th nzWidth="10%">楼栋楼层名称</th>
35
       <th nzWidth="10%">楼栋楼层名称</th>
36
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
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
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
39
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
40
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
40
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
41
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
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
 import { debounceTime } from 'rxjs/operators';
2
 import { debounceTime } from 'rxjs/operators';
2
 import { Subject } from 'rxjs';
3
 import { Subject } from 'rxjs';
3
 import { NzMessageService } from 'ng-zorro-antd/message';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -15,6 +16,7 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
15
     private mainService: MainService,
16
     private mainService: MainService,
16
     private message: NzMessageService,
17
     private message: NzMessageService,
17
     private route: ActivatedRoute,
18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18
   ) {}
20
   ) {}
19
 
21
 
20
   listOfData: any[] = []; //表格数据
22
   listOfData: any[] = []; //表格数据
@@ -33,6 +35,7 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
33
       fun.call(this, v[1]);
35
       fun.call(this, v[1]);
34
     });
36
     });
35
     this.initSessionData();
37
     this.initSessionData();
38
+    this.getQueryParams();
36
     this.search();
39
     this.search();
37
   }
40
   }
38
 
41
 
@@ -49,6 +52,14 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
49
     }, 0)
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
   get getMoreFilter(){
63
   get getMoreFilter(){
53
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO;
64
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO;
54
     return flag ? 21 : 0;
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
     <tr>
25
     <tr>
26
       <th nzWidth="10%">分组名称</th>
26
       <th nzWidth="10%">分组名称</th>
27
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
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
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
30
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
31
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
31
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
32
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
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
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
3
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -13,6 +14,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
13
     private mainService: MainService,
14
     private mainService: MainService,
14
     private message: NzMessageService,
15
     private message: NzMessageService,
15
     private route: ActivatedRoute,
16
     private route: ActivatedRoute,
17
+    private tabService: TabService,
16
   ) {}
18
   ) {}
17
 
19
 
18
   listOfData: any[] = []; //表格数据
20
   listOfData: any[] = []; //表格数据
@@ -23,6 +25,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
23
 
25
 
24
   ngOnInit() {
26
   ngOnInit() {
25
     this.initSessionData();
27
     this.initSessionData();
28
+    this.getQueryParams();
26
     this.search();
29
     this.search();
27
   }
30
   }
28
 
31
 
@@ -39,6 +42,14 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
39
     }, 0)
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
   get getMoreFilter(){
53
   get getMoreFilter(){
43
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
54
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
44
     return flag ? 21 : 0;
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
     <tr>
37
     <tr>
38
       <th nzWidth="10%" nzShowSort nzSortKey="startDate" [(nzSort)]="sortCurrent.startDate">时间</th>
38
       <th nzWidth="10%" nzShowSort nzSortKey="startDate" [(nzSort)]="sortCurrent.startDate">时间</th>
39
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
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
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
42
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
43
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
43
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
44
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
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
 import { debounceTime } from 'rxjs/operators';
2
 import { debounceTime } from 'rxjs/operators';
2
 import { Subject } from 'rxjs';
3
 import { Subject } from 'rxjs';
3
 import { NzMessageService } from 'ng-zorro-antd/message';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -15,6 +16,7 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
15
     private mainService: MainService,
16
     private mainService: MainService,
16
     private message: NzMessageService,
17
     private message: NzMessageService,
17
     private route: ActivatedRoute,
18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18
   ) {}
20
   ) {}
19
 
21
 
20
   listOfData: any[] = []; //表格数据
22
   listOfData: any[] = []; //表格数据
@@ -33,6 +35,7 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
33
       fun.call(this, v[1]);
35
       fun.call(this, v[1]);
34
     });
36
     });
35
     this.initSessionData();
37
     this.initSessionData();
38
+    this.getQueryParams();
36
     this.search();
39
     this.search();
37
   }
40
   }
38
 
41
 
@@ -49,6 +52,14 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
49
     }, 0)
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
   get getMoreFilter(){
63
   get getMoreFilter(){
53
     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;
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
     return flag ? 21 : 0;
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
 					<div class="statistics-select-list" [ngClass]="{'activeClass': activeIndex == 0}" (click)="selectCheck(0)">维修人员</div>
58
 					<div class="statistics-select-list" [ngClass]="{'activeClass': activeIndex == 0}" (click)="selectCheck(0)">维修人员</div>
59
 					<div class="statistics-select-list" [ngClass]="{'activeClass': activeIndex == 1}" (click)="selectCheck(1)">维修组</div>
59
 					<div class="statistics-select-list" [ngClass]="{'activeClass': activeIndex == 1}" (click)="selectCheck(1)">维修组</div>
60
 				</div>
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
 			</div>
62
 			</div>
63
 			<div class="table">
63
 			<div class="table">
64
 				<div class="td">
64
 				<div class="td">
@@ -67,7 +67,7 @@
67
 					<div class="table-td" *ngIf="activeIndex==1">维修组</div>
67
 					<div class="table-td" *ngIf="activeIndex==1">维修组</div>
68
 					<div class="table-td">工单量</div>
68
 					<div class="table-td">工单量</div>
69
 					<div class="table-td">平均接单时长</div>
69
 					<div class="table-td">平均接单时长</div>
70
-					<div class="table-td">平均处理时长</div>
70
+					<div class="table-td">平均解决时长</div>
71
 					<div class="table-td">超时单</div>
71
 					<div class="table-td">超时单</div>
72
 				</div>
72
 				</div>
73
 				<div class="th" *ngFor="let item of maintainData; let index = index;">
73
 				<div class="th" *ngFor="let item of maintainData; let index = index;">
@@ -88,8 +88,8 @@
88
 		<div class="statistics width-40">
88
 		<div class="statistics width-40">
89
 			<div class="statistics-box">
89
 			<div class="statistics-box">
90
 				<div class="sign-green"></div>
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
 			</div>
93
 			</div>
94
 			<div class="echarts-repairs">
94
 			<div class="echarts-repairs">
95
 			  <div echarts class="echarts" [options]='repairsOptions'></div>
95
 			  <div echarts class="echarts" [options]='repairsOptions'></div>
@@ -101,7 +101,7 @@
101
 			<div class="statistics-box">
101
 			<div class="statistics-box">
102
 				<div class="sign-green"></div>
102
 				<div class="sign-green"></div>
103
 				<div class="statistics-title">一级故障现象Top5</div>
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
 			</div>
105
 			</div>
106
 			<div class="echarts-repairs">
106
 			<div class="echarts-repairs">
107
 				<div echarts class="echarts" [options]='malfunctionOptions'></div>
107
 				<div echarts class="echarts" [options]='malfunctionOptions'></div>
@@ -111,7 +111,7 @@
111
 			<div class="statistics-box">
111
 			<div class="statistics-box">
112
 				<div class="sign-green"></div>
112
 				<div class="sign-green"></div>
113
 				<div class="statistics-title">楼栋报修Top5</div>
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
 			</div>
115
 			</div>
116
 			<div class="echarts-repairs">
116
 			<div class="echarts-repairs">
117
 				<div echarts class="echarts" [options]='buildingOptions'></div>
117
 				<div echarts class="echarts" [options]='buildingOptions'></div>
@@ -123,7 +123,7 @@
123
 			<div class="statistics-box">
123
 			<div class="statistics-box">
124
 				<div class="sign-green"></div>
124
 				<div class="sign-green"></div>
125
 				<div class="statistics-title">科室费用Top5</div>
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
 			</div>
127
 			</div>
128
 			<div class="table">
128
 			<div class="table">
129
 				<div class="td">
129
 				<div class="td">
@@ -144,7 +144,7 @@
144
 			<div class="statistics-box">
144
 			<div class="statistics-box">
145
 				<div class="sign-green"></div>
145
 				<div class="sign-green"></div>
146
 				<div class="statistics-title">耗材Top5</div>
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
 			</div>
148
 			</div>
149
 			<div class="table">
149
 			<div class="table">
150
 				<div class="td">
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
 import { format, addMonths, startOfMonth, endOfMonth } from 'date-fns';
2
 import { format, addMonths, startOfMonth, endOfMonth } from 'date-fns';
2
 import { Component, OnInit } from "@angular/core";
3
 import { Component, OnInit } from "@angular/core";
3
 import { MainService } from 'src/app/services/main.service';
4
 import { MainService } from 'src/app/services/main.service';
5
+import { TabService } from '../../services/tab.service';
4
 @Component({
6
 @Component({
5
   selector: "app-synthesize-statistics",
7
   selector: "app-synthesize-statistics",
6
   templateUrl: "./synthesize-statistics.component.html",
8
   templateUrl: "./synthesize-statistics.component.html",
@@ -9,8 +11,10 @@ import { MainService } from 'src/app/services/main.service';
9
 export class SynthesizeStatisticsComponent implements OnInit {
11
 export class SynthesizeStatisticsComponent implements OnInit {
10
   constructor(
12
   constructor(
11
     private mainService: MainService,
13
     private mainService: MainService,
14
+    private tabService: TabService,
15
+    public router: Router,
12
   ) {}
16
   ) {}
13
-	
17
+
14
 	isLoading:Boolean = false;
18
 	isLoading:Boolean = false;
15
 	workData:any = []; //工单统计
19
 	workData:any = []; //工单统计
16
   listOfData: any[] = []; //表格数据
20
   listOfData: any[] = []; //表格数据
@@ -59,13 +63,13 @@ export class SynthesizeStatisticsComponent implements OnInit {
59
   ngOnInit() {
63
   ngOnInit() {
60
     this.search();
64
     this.search();
61
   }
65
   }
62
-	
66
+
63
 	// 维修处理类型切换
67
 	// 维修处理类型切换
64
 	selectCheck(type){
68
 	selectCheck(type){
65
 		this.activeIndex = type
69
 		this.activeIndex = type
66
 		this.getMaintainData();
70
 		this.getMaintainData();
67
 	}
71
 	}
68
-	
72
+
69
 	// 报修来源
73
 	// 报修来源
70
 	repairsChart() {
74
 	repairsChart() {
71
 		let postData:any = {
75
 		let postData:any = {
@@ -109,7 +113,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
109
 							},
113
 							},
110
 							label: {
114
 							label: {
111
 									show: true,
115
 									show: true,
112
-									formatter: '{b}: {c} {d}%'  
116
+									formatter: '{b}: {c} {d}%'
113
 							},
117
 							},
114
 				      itemStyle: {
118
 				      itemStyle: {
115
 				        normal: {
119
 				        normal: {
@@ -130,7 +134,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
130
 				};
134
 				};
131
 		  });
135
 		  });
132
 	}
136
 	}
133
-	
137
+
134
 	// 一级故障
138
 	// 一级故障
135
 	malfunctionChart(){
139
 	malfunctionChart(){
136
 		let postData:any = {
140
 		let postData:any = {
@@ -195,7 +199,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
195
 				}
199
 				}
196
 		  });
200
 		  });
197
 	}
201
 	}
198
-	
202
+
199
 	// 楼栋报修
203
 	// 楼栋报修
200
 	buildingChart(){
204
 	buildingChart(){
201
 		let postData:any = {
205
 		let postData:any = {
@@ -260,7 +264,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
260
 		    }
264
 		    }
261
 		  });
265
 		  });
262
 	}
266
 	}
263
-	
267
+
264
 	// 科室费用
268
 	// 科室费用
265
 	getDeptCostData() {
269
 	getDeptCostData() {
266
 	  let postData:any = {
270
 	  let postData:any = {
@@ -277,7 +281,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
277
 	      this.deptCostData = result.data || [];
281
 	      this.deptCostData = result.data || [];
278
 	    });
282
 	    });
279
 	}
283
 	}
280
-	
284
+
281
 	// 耗材
285
 	// 耗材
282
 	getConsumableData() {
286
 	getConsumableData() {
283
 	  let postData:any = {
287
 	  let postData:any = {
@@ -295,12 +299,21 @@ export class SynthesizeStatisticsComponent implements OnInit {
295
 	      this.consumableData = result.data || [];
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
   queryType:any;
318
   queryType:any;
306
   hosId:any;
319
   hosId:any;
@@ -334,7 +347,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
334
       this.dutyId = undefined;
347
       this.dutyId = undefined;
335
       this.parentDutyId = dutyId;
348
       this.parentDutyId = dutyId;
336
     }
349
     }
337
-		
350
+
338
 		this.isLoading = true
351
 		this.isLoading = true
339
 		this.getWorkData();
352
 		this.getWorkData();
340
 		this.getMaintainData();
353
 		this.getMaintainData();
@@ -369,7 +382,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
369
         this.listLength = result.totalCount;
382
         this.listLength = result.totalCount;
370
       });
383
       });
371
   }
384
   }
372
-	
385
+
373
 	// 头部工单数据
386
 	// 头部工单数据
374
 	getWorkData() {
387
 	getWorkData() {
375
 	  let postData:any = {
388
 	  let postData:any = {
@@ -386,7 +399,7 @@ export class SynthesizeStatisticsComponent implements OnInit {
386
 	      this.workData = result.data[0] || [];
399
 	      this.workData = result.data[0] || [];
387
 	    });
400
 	    });
388
 	}
401
 	}
389
-	
402
+
390
 	// 维修处理
403
 	// 维修处理
391
 	getMaintainData() {
404
 	getMaintainData() {
392
 	  let postData:any = {
405
 	  let postData:any = {
@@ -404,14 +417,14 @@ export class SynthesizeStatisticsComponent implements OnInit {
404
 	      this.maintainData = result.data || [];
417
 	      this.maintainData = result.data || [];
405
 	    });
418
 	    });
406
 	}
419
 	}
407
-	
420
+
408
 	// 重置
421
 	// 重置
409
 	reset(){
422
 	reset(){
410
 		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')];
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
 		this.activeIndex = 0;
424
 		this.activeIndex = 0;
412
 		this.search();
425
 		this.search();
413
 	}
426
 	}
414
-	
427
+
415
   // 搜索
428
   // 搜索
416
   search() {
429
   search() {
417
 		this.initSessionData();
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
     <tr>
36
     <tr>
37
       <th nzWidth="10%">公司名称</th>
37
       <th nzWidth="10%">公司名称</th>
38
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
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
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
41
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
42
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
42
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
43
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
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
 import { debounceTime } from 'rxjs/operators';
2
 import { debounceTime } from 'rxjs/operators';
2
 import { Subject } from 'rxjs';
3
 import { Subject } from 'rxjs';
3
 import { NzMessageService } from 'ng-zorro-antd/message';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -15,6 +16,7 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
15
     private mainService: MainService,
16
     private mainService: MainService,
16
     private message: NzMessageService,
17
     private message: NzMessageService,
17
     private route: ActivatedRoute,
18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18
   ) {}
20
   ) {}
19
 
21
 
20
   listOfData: any[] = []; //表格数据
22
   listOfData: any[] = []; //表格数据
@@ -33,6 +35,7 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
33
       fun.call(this, v[1]);
35
       fun.call(this, v[1]);
34
     });
36
     });
35
     this.initSessionData();
37
     this.initSessionData();
38
+    this.getQueryParams();
36
     this.search();
39
     this.search();
37
   }
40
   }
38
 
41
 
@@ -49,6 +52,14 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
49
     }, 0)
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
   get getMoreFilter(){
63
   get getMoreFilter(){
53
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
64
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
54
     return flag ? 21 : 0;
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
     <tr>
36
     <tr>
37
       <th nzWidth="10%">人员姓名(工号)</th>
37
       <th nzWidth="10%">人员姓名(工号)</th>
38
       <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
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
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
41
       <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
42
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
42
       <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
43
       <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
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
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
5
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
6
 import { MainService } from 'src/app/services/main.service';
6
 import { MainService } from 'src/app/services/main.service';
7
 import { ActivatedRoute } from '@angular/router';
7
 import { ActivatedRoute } from '@angular/router';
8
+import { TabService } from '../../services/tab.service';
8
 @Component({
9
 @Component({
9
   selector: "app-user-statistics",
10
   selector: "app-user-statistics",
10
   templateUrl: "./user-statistics.component.html",
11
   templateUrl: "./user-statistics.component.html",
@@ -15,6 +16,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
15
     private mainService: MainService,
16
     private mainService: MainService,
16
     private message: NzMessageService,
17
     private message: NzMessageService,
17
     private route: ActivatedRoute,
18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18
   ) {}
20
   ) {}
19
 
21
 
20
   listOfData: any[] = []; //表格数据
22
   listOfData: any[] = []; //表格数据
@@ -33,6 +35,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
33
       fun.call(this, v[1]);
35
       fun.call(this, v[1]);
34
     });
36
     });
35
     this.initSessionData();
37
     this.initSessionData();
38
+    this.getQueryParams();
36
     this.search();
39
     this.search();
37
   }
40
   }
38
 
41
 
@@ -49,6 +52,14 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
49
     }, 0)
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
   get getMoreFilter(){
63
   get getMoreFilter(){
53
     let flag = this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO;
64
     let flag = this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO;
54
     return flag ? 21 : 0;
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
 import { debounceTime } from 'rxjs/operators';
2
 import { debounceTime } from 'rxjs/operators';
2
 import { Subject } from 'rxjs';
3
 import { Subject } from 'rxjs';
3
 import { NzMessageService } from 'ng-zorro-antd/message';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -15,6 +16,7 @@ export class WorkHourStatisticsComponent implements OnInit, AfterViewInit {
15
     private mainService: MainService,
16
     private mainService: MainService,
16
     private message: NzMessageService,
17
     private message: NzMessageService,
17
     private route: ActivatedRoute,
18
     private route: ActivatedRoute,
19
+    private tabService: TabService,
18
   ) {}
20
   ) {}
19
 
21
 
20
   listOfData: any[] = []; //表格数据
22
   listOfData: any[] = []; //表格数据
@@ -33,6 +35,7 @@ export class WorkHourStatisticsComponent implements OnInit, AfterViewInit {
33
       fun.call(this, v[1]);
35
       fun.call(this, v[1]);
34
     });
36
     });
35
     this.initSessionData();
37
     this.initSessionData();
38
+    this.getQueryParams();
36
     this.search();
39
     this.search();
37
   }
40
   }
38
 
41
 
@@ -49,6 +52,14 @@ export class WorkHourStatisticsComponent implements OnInit, AfterViewInit {
49
     }, 0)
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
   get getMoreFilter(){
63
   get getMoreFilter(){
53
     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;
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
     return flag ? 21 : 0;
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
   public deleteAllRouteSnapshot(){
44
   public deleteAllRouteSnapshot(){
32
     this.tabs.forEach(v => {
45
     this.tabs.forEach(v => {
33
       SimpleReuseStrategy.deleteRouteSnapshot(v.path);
46
       SimpleReuseStrategy.deleteRouteSnapshot(v.path);