浏览代码

统计下钻开发

maotao 2 月之前
父节点
当前提交
671e200a98
共有 65 个文件被更改,包括 5277 次插入530 次删除
  1. 1 1
      src/app/views/incident-management/incident-management.component.html
  2. 5 0
      src/app/views/main/main-routing.module.ts
  3. 20 18
      src/app/views/new-statistics/components/custom-change-date/custom-change-date.component.ts
  4. 1 1
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.html
  5. 46 13
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.ts
  6. 1 1
      src/app/views/new-statistics/components/search-more/search-more.component.ts
  7. 6 6
      src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.html
  8. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.less
  9. 156 2
      src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.ts
  10. 4 4
      src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.html
  11. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.less
  12. 109 2
      src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.ts
  13. 6 6
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.html
  14. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.less
  15. 189 2
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.ts
  16. 4 4
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.html
  17. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.less
  18. 141 2
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.ts
  19. 6 6
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.html
  20. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.less
  21. 246 2
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.ts
  22. 12 12
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.html
  23. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.less
  24. 540 3
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.ts
  25. 8 8
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.html
  26. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.less
  27. 347 2
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.ts
  28. 4 4
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.html
  29. 7 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.less
  30. 99 1
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.ts
  31. 6 6
      src/app/views/new-statistics/distribution-inspection-statistics/hour-quality-control-statistics/hour-quality-control-statistics.component.html
  32. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/hour-quality-control-statistics/hour-quality-control-statistics.component.less
  33. 183 2
      src/app/views/new-statistics/distribution-inspection-statistics/hour-quality-control-statistics/hour-quality-control-statistics.component.ts
  34. 4 2
      src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.html
  35. 61 18
      src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.ts
  36. 6 6
      src/app/views/new-statistics/distribution-inspection-statistics/taskType-quality-control-statistics/taskType-quality-control-statistics.component.html
  37. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/taskType-quality-control-statistics/taskType-quality-control-statistics.component.less
  38. 242 2
      src/app/views/new-statistics/distribution-inspection-statistics/taskType-quality-control-statistics/taskType-quality-control-statistics.component.ts
  39. 104 9
      src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.ts
  40. 589 99
      src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.ts
  41. 378 95
      src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.ts
  42. 123 12
      src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.ts
  43. 62 8
      src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.ts
  44. 78 8
      src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.ts
  45. 1 1
      src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.html
  46. 28 31
      src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.ts
  47. 1 1
      src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.html
  48. 90 12
      src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.ts
  49. 103 18
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.ts
  50. 78 12
      src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.ts
  51. 4 3
      src/app/views/new-statistics/maintenance-statistics/user-evaluate-statistics/user-evaluate-statistics.component.html
  52. 165 36
      src/app/views/new-statistics/maintenance-statistics/user-evaluate-statistics/user-evaluate-statistics.component.ts
  53. 4 3
      src/app/views/new-statistics/maintenance-statistics/user-statistics/user-statistics.component.html
  54. 102 40
      src/app/views/new-statistics/maintenance-statistics/user-statistics/user-statistics.component.ts
  55. 10 0
      src/app/views/operation-config/operation-config.component.html
  56. 10 0
      src/app/views/operation-config/operation-config.component.ts
  57. 29 2
      src/app/views/operation-notice/operation-notice.component.html
  58. 7 1
      src/app/views/operation-notice/operation-notice.component.less
  59. 35 2
      src/app/views/operation-notice/operation-notice.component.ts
  60. 14 0
      src/app/views/operation-search/operation-search-routing.module.ts
  61. 183 0
      src/app/views/operation-search/operation-search.component.html
  62. 173 0
      src/app/views/operation-search/operation-search.component.less
  63. 390 0
      src/app/views/operation-search/operation-search.component.ts
  64. 19 0
      src/app/views/operation-search/operation-search.module.ts
  65. 1 1
      src/app/views/order-management/order-management.component.html

+ 1 - 1
src/app/views/incident-management/incident-management.component.html

@@ -204,7 +204,7 @@
204
 				  <nz-form-label [nzSpan]="5" nzFor="busiParent">业务父级</nz-form-label>
204
 				  <nz-form-label [nzSpan]="5" nzFor="busiParent">业务父级</nz-form-label>
205
 				  <nz-form-control [nzSpan]="19" nzErrorTip="请选择业务父级!">
205
 				  <nz-form-control [nzSpan]="19" nzErrorTip="请选择业务父级!">
206
 				    <nz-select nzAllowClear [nzDropdownMatchSelectWidth]="false" formControlName="busiParent" nzShowSearch
206
 				    <nz-select nzAllowClear [nzDropdownMatchSelectWidth]="false" formControlName="busiParent" nzShowSearch
207
-				      nzPlaceHolder="请选择业务父级" nzServerSearch (nzOnSearch)="changeInp($event)"
207
+				      nzPlaceHolder="请选择业务父级" nzServerSearch (nzOnSearch)="changeDeptInp($event)"
208
 				      (nzOpenChange)="openDeptSelect($event)">
208
 				      (nzOpenChange)="openDeptSelect($event)">
209
 				      <ng-container *ngFor="let data of allParentdepart">
209
 				      <ng-container *ngFor="let data of allParentdepart">
210
 				        <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [nzValue]="data.id">
210
 				        <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [nzValue]="data.id">

+ 5 - 0
src/app/views/main/main-routing.module.ts

@@ -627,6 +627,11 @@ const routes: Routes = [
627
 			{
627
 			{
628
 			  path: "patientInspectLog",
628
 			  path: "patientInspectLog",
629
 			  loadChildren: () => import("../patient-inspect-log/patient-inspect-log.module").then((m) => m.PatientInspectLogModule),
629
 			  loadChildren: () => import("../patient-inspect-log/patient-inspect-log.module").then((m) => m.PatientInspectLogModule),
630
+			},
631
+			// 手术信息
632
+			{
633
+			  path: "operationSearch",
634
+			  loadChildren: () => import("../operation-search/operation-search.module").then((m) => m.OperationSearchModule),
630
 			}
635
 			}
631
     ],
636
     ],
632
   },
637
   },

+ 20 - 18
src/app/views/new-statistics/components/custom-change-date/custom-change-date.component.ts

@@ -11,8 +11,8 @@ import { debounceTime, filter } from 'rxjs/operators';
11
 })
11
 })
12
 export class CustomChangeDateComponent implements OnInit, OnDestroy {
12
 export class CustomChangeDateComponent implements OnInit, OnDestroy {
13
   @Input() isShowType: boolean = true;
13
   @Input() isShowType: boolean = true;
14
-	@Input() dateData1: any;
15
-	@Input() dateData2: any;
14
+	// @Input() dateData1: any;
15
+	// @Input() dateData2: any;
16
   @Input() name: string = '建单时间';
16
   @Input() name: string = '建单时间';
17
   constructor(
17
   constructor(
18
     private dateService: DateService,
18
     private dateService: DateService,
@@ -74,13 +74,13 @@ export class CustomChangeDateComponent implements OnInit, OnDestroy {
74
 
74
 
75
   ngOnInit() {
75
   ngOnInit() {
76
 		this.resetByDate();
76
 		this.resetByDate();
77
-		this.router.events
78
-		  .pipe(filter(event => event instanceof NavigationEnd))
79
-		  .subscribe((event: NavigationEnd) => {
80
-		    if(event.urlAfterRedirects.endsWith('/incidentList')){
81
-					this.resetByDate();
82
-		    }
83
-		  });
77
+		// this.router.events
78
+		//   .pipe(filter(event => event instanceof NavigationEnd))
79
+		//   .subscribe((event: NavigationEnd) => {
80
+		//     if(event.urlAfterRedirects.endsWith('/incidentList')){
81
+		// 			this.resetByDate();
82
+		//     }
83
+		//   });
84
   }
84
   }
85
 	
85
 	
86
 	ngOnDestroy(){
86
 	ngOnDestroy(){
@@ -91,22 +91,24 @@ export class CustomChangeDateComponent implements OnInit, OnDestroy {
91
   // 根据时间区间重置
91
   // 根据时间区间重置
92
   resetByDate(){
92
   resetByDate(){
93
 		setTimeout(_=>{
93
 		setTimeout(_=>{
94
-			console.log(2222,this.dateData1, this.dateData2)
95
-			if(this.dateData1 && this.dateData2){
96
-				this.dateRange = [this.dateData1, this.dateData2]
97
-			}else{
98
-				this.dateType = 'day';
99
-				this.changeDateType(this.dateType, 6);
100
-			}
94
+			// console.log(2222,this.dateData1, this.dateData2)
95
+			// if(this.dateData1 && this.dateData2){
96
+			// 	this.dateRange = [this.dateData1, this.dateData2]
97
+			// }else{
98
+			// 	this.dateType = 'day';
99
+			// 	this.changeDateType(this.dateType, 6);
100
+			// }
101
+			this.dateType = 'day';
102
+			this.changeDateType(this.dateType, 6);
101
 		})
103
 		})
102
   }
104
   }
103
 
105
 
104
   // 根据时间区间初始化
106
   // 根据时间区间初始化
105
-  initByDate(dateRange:any[]){
107
+  initByDate(dateRange:any[], dateNum:any= 6){
106
     setTimeout(() => {
108
     setTimeout(() => {
107
       this.dateType = 'day';
109
       this.dateType = 'day';
108
       this.dateRange = dateRange;
110
       this.dateRange = dateRange;
109
-      this.changeDateType(this.dateType, null);
111
+      this.changeDateType(this.dateType, dateNum);
110
     }, 0)
112
     }, 0)
111
   }
113
   }
112
 
114
 

+ 1 - 1
src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.html

@@ -107,7 +107,7 @@
107
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择来源!">
107
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择来源!">
108
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="sourceId" nzPlaceHolder="请选择来源">
108
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="sourceId" nzPlaceHolder="请选择来源">
109
 				      <ng-container *ngFor="let option of sourceList">
109
 				      <ng-container *ngFor="let option of sourceList">
110
-				        <nz-option [nzLabel]="option.name " [nzValue]="option.name"></nz-option>
110
+				        <nz-option [nzLabel]="option.name " [nzValue]="option.sourceId"></nz-option>
111
 				      </ng-container>
111
 				      </ng-container>
112
 				    </nz-select>
112
 				    </nz-select>
113
 				  </nz-form-control>
113
 				  </nz-form-control>

+ 46 - 13
src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.ts

@@ -19,6 +19,7 @@ export class DistributionSearchMoreComponent implements OnInit {
19
   @Input() parentDutyId: any;
19
   @Input() parentDutyId: any;
20
   @Input() dutyId: any;
20
   @Input() dutyId: any;
21
   @Input() queryType: any;
21
   @Input() queryType: any;
22
+	@Input() going: boolean = false;
22
   validateForm: FormGroup;//表单
23
   validateForm: FormGroup;//表单
23
   searchTimerSubject = new Subject();
24
   searchTimerSubject = new Subject();
24
   constructor(
25
   constructor(
@@ -45,6 +46,7 @@ export class DistributionSearchMoreComponent implements OnInit {
45
       let fun = v[0];
46
       let fun = v[0];
46
       fun.call(this, v[1]);
47
       fun.call(this, v[1]);
47
     });
48
     });
49
+		console.log(4444,this.fieldConfig)
48
     this.initForm();
50
     this.initForm();
49
     this.getSourceList();
51
     this.getSourceList();
50
 		this.getSourceDataList();
52
 		this.getSourceDataList();
@@ -88,6 +90,32 @@ export class DistributionSearchMoreComponent implements OnInit {
88
 			codeNum: [this.fieldConfig.fields.codeNum || null],
90
 			codeNum: [this.fieldConfig.fields.codeNum || null],
89
 			timeFrameId: [this.fieldConfig.fields.timeFrameDTO ? this.fieldConfig.fields.timeFrameDTO.id  : null],
91
 			timeFrameId: [this.fieldConfig.fields.timeFrameDTO ? this.fieldConfig.fields.timeFrameDTO.id  : null],
90
 		});
92
 		});
93
+		
94
+		
95
+		if(this.going && this.fieldConfig.fields.taskTypeId){
96
+			this.getTaskTypeList();
97
+		}
98
+		
99
+		if(this.going && this.fieldConfig.fields.deptId){
100
+			this.getRepairDeptList();
101
+		}
102
+		
103
+		if(this.going && this.fieldConfig.fields.sourceId){
104
+			this.getSourceList();
105
+		}
106
+		
107
+		if(this.going && this.fieldConfig.fields.evaluateId){
108
+			this.getWorkHourEvaluateList();
109
+		}
110
+		
111
+		if(this.going && this.fieldConfig.fields.executeUserId){
112
+			this.getExecuteUserList();
113
+		}
114
+		
115
+		if(this.going && this.fieldConfig.fields.timeFrameId){
116
+			this.getTimeFrameList();
117
+		}
118
+		
91
   }
119
   }
92
   // 表单提交
120
   // 表单提交
93
   submitForm(): void {
121
   submitForm(): void {
@@ -385,19 +413,24 @@ export class DistributionSearchMoreComponent implements OnInit {
385
 	// 获取来源列表
413
 	// 获取来源列表
386
 	sourceList:any[] = [];
414
 	sourceList:any[] = [];
387
 	getSourceDataList(keyword?){
415
 	getSourceDataList(keyword?){
388
-	  let postData:any = {
389
-	    idx: 0,
390
-	    sum: 9999,
391
-	    hosId: this.getHosId,
392
-	  };
393
-
394
-	  this.isLoading = true;
395
-	  this.mainService
396
-	    .postCustom("itsm/report", "sourceTransOrder", postData)
397
-	    .subscribe((result) => {
398
-	      this.isLoading = false;
399
-	      this.sourceList = result.dataList;
400
-	    });
416
+		this.sourceList = [
417
+			{
418
+				sourceId:1,
419
+				name:"服务台"
420
+			},
421
+			{
422
+				sourceId:2,
423
+				name:"护士端"
424
+			},
425
+			{
426
+				sourceId:3,
427
+				name:"系统自动"
428
+			},
429
+			{
430
+				sourceId:4,
431
+				name:"微信端"
432
+			},
433
+		]
401
 	}
434
 	}
402
 	
435
 	
403
 	// =================评价===================
436
 	// =================评价===================

+ 1 - 1
src/app/views/new-statistics/components/search-more/search-more.component.ts

@@ -741,7 +741,7 @@ export class SearchMoreComponent implements OnInit {
741
 	    sum: 20,
741
 	    sum: 20,
742
 			user: {
742
 			user: {
743
 			  name: keyword,
743
 			  name: keyword,
744
-			  engineer: 1,
744
+			  // engineer: 1,
745
 			  // simpleQuery: true,
745
 			  // simpleQuery: true,
746
 			},
746
 			},
747
 	  };
747
 	  };

+ 6 - 6
src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.html

@@ -33,30 +33,30 @@
33
   <tbody>
33
   <tbody>
34
     <tr *ngFor="let data of listOfData">
34
     <tr *ngFor="let data of listOfData">
35
       <td>{{ data.name }}</td>
35
       <td>{{ data.name }}</td>
36
-      <td>{{ data.totalCount }}</td>
36
+      <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
37
       <td>{{ data.totalGrade }}</td>
37
       <td>{{ data.totalGrade }}</td>
38
 			<td>{{ data.totalPrice }}</td>
38
 			<td>{{ data.totalPrice }}</td>
39
       <td>{{ data.response_time_num }}</td>
39
       <td>{{ data.response_time_num }}</td>
40
       <td>{{ data.execution_time_num }}</td>
40
       <td>{{ data.execution_time_num }}</td>
41
       <td>{{ data.aveper }}</td>
41
       <td>{{ data.aveper }}</td>
42
       <td>{{ data.total_time }}</td>
42
       <td>{{ data.total_time }}</td>
43
-      <td>{{ data.five_count }}</td>
44
-      <td>{{ data.special_close }}</td>
43
+      <td class="text-sign" (click)="viewDetail2(data)">{{ data.five_count }}</td>
44
+      <td class="text-sign" (click)="viewDetail3(data)">{{ data.special_close }}</td>
45
     </tr>
45
     </tr>
46
   </tbody>
46
   </tbody>
47
   <ng-template #footerTpl>
47
   <ng-template #footerTpl>
48
     <table class="footTable">
48
     <table class="footTable">
49
       <tr *ngFor="let data of listOfDataEnd">
49
       <tr *ngFor="let data of listOfDataEnd">
50
         <td style="width: 10%">{{ data.name }}</td>
50
         <td style="width: 10%">{{ data.name }}</td>
51
-        <td style="width: 10%">{{ data.totalCount }}</td>
51
+        <td style="width: 10%" class="text-sign" (click)="viewDetail1(data,'all')">{{ data.totalCount }}</td>
52
         <td style="width: 10%">{{ data.totalGrade }}</td>
52
         <td style="width: 10%">{{ data.totalGrade }}</td>
53
 				<td style="width: 10%">{{ data.totalPrice }}</td>
53
 				<td style="width: 10%">{{ data.totalPrice }}</td>
54
         <td style="width: 10%">{{ data.response_time_num }}</td>
54
         <td style="width: 10%">{{ data.response_time_num }}</td>
55
         <td style="width: 10%">{{ data.execution_time_num }}</td>
55
         <td style="width: 10%">{{ data.execution_time_num }}</td>
56
         <td style="width: 10%">{{ data.aveper }}</td>
56
         <td style="width: 10%">{{ data.aveper }}</td>
57
         <td style="width: 10%">{{ data.total_time }}</td>
57
         <td style="width: 10%">{{ data.total_time }}</td>
58
-        <td style="width: 10%">{{ data.five_count }}</td>
59
-        <td style="width: 10%">{{ data.special_close }}</td>
58
+        <td style="width: 10%" class="text-sign" (click)="viewDetail2(data,'all')">{{ data.five_count }}</td>
59
+        <td style="width: 10%" class="text-sign" (click)="viewDetail3(data,'all')">{{ data.special_close }}</td>
60
       </tr>
60
       </tr>
61
     </table>
61
     </table>
62
   </ng-template>
62
   </ng-template>

+ 4 - 0
src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.less

@@ -5,6 +5,10 @@
5
   right: 0;
5
   right: 0;
6
   bottom: 0;
6
   bottom: 0;
7
   left: 0;
7
   left: 0;
8
+	.text-sign{
9
+		text-decoration: underline;
10
+		cursor: pointer;
11
+	}
8
   ::ng-deep .ant-table-footer{
12
   ::ng-deep .ant-table-footer{
9
     padding: 16px 0;
13
     padding: 16px 0;
10
     width: calc(100% - 15px);
14
     width: calc(100% - 15px);

+ 156 - 2
src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.ts

@@ -2,7 +2,7 @@ import { TabService } from './../../services/tab.service';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
3
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
3
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
4
 import { MainService } from 'src/app/services/main.service';
4
 import { MainService } from 'src/app/services/main.service';
5
-import { ActivatedRoute } from '@angular/router';
5
+import { ActivatedRoute, Router } from '@angular/router';
6
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
6
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
7
 @Component({
7
 @Component({
8
   selector: "app-business-classify-statistics",
8
   selector: "app-business-classify-statistics",
@@ -15,6 +15,7 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
15
     private mainService: MainService,
15
     private mainService: MainService,
16
     private message: NzMessageService,
16
     private message: NzMessageService,
17
     private route: ActivatedRoute,
17
     private route: ActivatedRoute,
18
+		private router: Router,
18
     private tabService: TabService,
19
     private tabService: TabService,
19
   ) {}
20
   ) {}
20
 
21
 
@@ -45,7 +46,160 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
45
 
46
 
46
     }, 0)
47
     }, 0)
47
   }
48
   }
48
-
49
+	
50
+	// 数据下钻
51
+	viewDetail1(data, type){
52
+		let query = null
53
+		if(type=='all'){
54
+			query = {
55
+				startDate: this.customChangeDateComponent.startDate || undefined,
56
+				endDate: this.customChangeDateComponent.endDate || undefined,
57
+				searchQuery:{
58
+					statusValue: 'close',
59
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
60
+					deptId: this.fieldConfig.fields.deptId || undefined,
61
+					groupId: this.fieldConfig.fields.groupId || undefined,
62
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
63
+					userId: this.fieldConfig.fields.userId || undefined,
64
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
65
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
66
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
67
+				}
68
+			}
69
+		}else{
70
+			query = {
71
+				startDate: this.customChangeDateComponent.startDate || undefined,
72
+				endDate: this.customChangeDateComponent.endDate || undefined,
73
+				statisticsTypeId: data.statisticsTypeId || undefined,
74
+				searchQuery:{
75
+					statusValue: 'close',
76
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
77
+					deptId: this.fieldConfig.fields.deptId || undefined,
78
+					groupId: this.fieldConfig.fields.groupId || undefined,
79
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
80
+					userId: this.fieldConfig.fields.userId || undefined,
81
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
82
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
83
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
84
+				}
85
+			}
86
+		}
87
+	
88
+		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
89
+		let flag = this.tabService.tabs.some(v => v.path === path);
90
+		flag && this.tabService.deleteRouteSnapshot(path);
91
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
92
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
93
+		sessionStorage.setItem('distributionData', JSON.stringify(query))
94
+		this.router.navigate([path], { replaceUrl: true });
95
+	}
96
+	
97
+	viewDetail2(data, type){
98
+		let query = null
99
+		if(type=='all'){
100
+			query = {
101
+				startDate: this.customChangeDateComponent.startDate || undefined,
102
+				endDate: this.customChangeDateComponent.endDate || undefined,
103
+				searchQuery:{
104
+					statusValue: 'close',
105
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
106
+					deptId: this.fieldConfig.fields.deptId || undefined,
107
+					groupId: this.fieldConfig.fields.groupId || undefined,
108
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
109
+					userId: this.fieldConfig.fields.userId || undefined,
110
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
111
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
112
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
113
+					minuteClose: 5,
114
+					minuteDTO: 5,
115
+				}
116
+			}
117
+		}else{
118
+			query = {
119
+				startDate: this.customChangeDateComponent.startDate || undefined,
120
+				endDate: this.customChangeDateComponent.endDate || undefined,
121
+				statisticsTypeId: data.statisticsTypeId || undefined,
122
+				searchQuery:{
123
+					statusValue: 'close',
124
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
125
+					deptId: this.fieldConfig.fields.deptId || undefined,
126
+					groupId: this.fieldConfig.fields.groupId || undefined,
127
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
128
+					userId: this.fieldConfig.fields.userId || undefined,
129
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
130
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
131
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
132
+					minuteClose: 5,
133
+					minuteDTO: 5,
134
+				}
135
+			}
136
+		}
137
+	
138
+		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
139
+		let flag = this.tabService.tabs.some(v => v.path === path);
140
+		flag && this.tabService.deleteRouteSnapshot(path);
141
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
142
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
143
+		sessionStorage.setItem('distributionData', JSON.stringify(query))
144
+		this.router.navigate([path], { replaceUrl: true });
145
+	}
146
+	
147
+	viewDetail3(data, type){
148
+		let query = null
149
+		if(type=='all'){
150
+			query = {
151
+				startDate: this.customChangeDateComponent.startDate || undefined,
152
+				endDate: this.customChangeDateComponent.endDate || undefined,
153
+				searchQuery:{
154
+					statusValue: 'close',
155
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
156
+					deptId: this.fieldConfig.fields.deptId || undefined,
157
+					groupId: this.fieldConfig.fields.groupId || undefined,
158
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
159
+					userId: this.fieldConfig.fields.userId || undefined,
160
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
161
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
162
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
163
+					specialId: 1,
164
+					specialDTO: {
165
+						"name": "是",
166
+						"id": 1
167
+					},
168
+				}
169
+			}
170
+		}else{
171
+			query = {
172
+				startDate: this.customChangeDateComponent.startDate || undefined,
173
+				endDate: this.customChangeDateComponent.endDate || undefined,
174
+				statisticsTypeId: data.statisticsTypeId || undefined,
175
+				searchQuery:{
176
+					statusValue: 'close',
177
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
178
+					deptId: this.fieldConfig.fields.deptId || undefined,
179
+					groupId: this.fieldConfig.fields.groupId || undefined,
180
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
181
+					userId: this.fieldConfig.fields.userId || undefined,
182
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
183
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
184
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
185
+					specialId: 1,
186
+					specialDTO: {
187
+						"name": "是",
188
+						"id": 1
189
+					},
190
+				}
191
+			}
192
+		}
193
+	
194
+		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
195
+		let flag = this.tabService.tabs.some(v => v.path === path);
196
+		flag && this.tabService.deleteRouteSnapshot(path);
197
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
198
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
199
+		sessionStorage.setItem('distributionData', JSON.stringify(query))
200
+		this.router.navigate([path], { replaceUrl: true });
201
+	}
202
+	
49
   getQueryParams(){
203
   getQueryParams(){
50
     let queryParams = this.tabService.getQueryParams();
204
     let queryParams = this.tabService.getQueryParams();
51
     this.tabService.clearQueryParams();
205
     this.tabService.clearQueryParams();

+ 4 - 4
src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.html

@@ -36,11 +36,11 @@
36
     <tbody>
36
     <tbody>
37
       <tr *ngFor="let data of listOfData">
37
       <tr *ngFor="let data of listOfData">
38
         <td>{{ data.date }}</td>
38
         <td>{{ data.date }}</td>
39
-        <td>{{ data.totalCount }}</td>
39
+        <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
40
         <td>{{ data.totalGrade }}</td>
40
         <td>{{ data.totalGrade }}</td>
41
 				<td>{{ data.totalPrice }}</td>
41
 				<td>{{ data.totalPrice }}</td>
42
         <ng-container *ngFor="let dictionary of dictionaryList">
42
         <ng-container *ngFor="let dictionary of dictionaryList">
43
-          <td>{{ data[dictionary.value + 'Count'] }}</td>
43
+          <td class="text-sign" (click)="viewDetail2(data, dictionary)">{{ data[dictionary.value + 'Count'] }}</td>
44
           <td>{{ data[dictionary.value + 'Grade'] }}</td>
44
           <td>{{ data[dictionary.value + 'Grade'] }}</td>
45
 					<td>{{ data[dictionary.value + 'Score'] }}</td>
45
 					<td>{{ data[dictionary.value + 'Score'] }}</td>
46
         </ng-container>
46
         </ng-container>
@@ -50,11 +50,11 @@
50
       <table class="footTable">
50
       <table class="footTable">
51
         <tr *ngFor="let data of listOfDataEnd">
51
         <tr *ngFor="let data of listOfDataEnd">
52
           <td>{{ data.date }}</td>
52
           <td>{{ data.date }}</td>
53
-          <td>{{ data.totalCount }}</td>
53
+          <td class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.totalCount }}</td>
54
           <td>{{ data.totalGrade }}</td>
54
           <td>{{ data.totalGrade }}</td>
55
 					<td>{{ data.totalPrice }}</td>
55
 					<td>{{ data.totalPrice }}</td>
56
           <ng-container *ngFor="let dictionary of dictionaryList">
56
           <ng-container *ngFor="let dictionary of dictionaryList">
57
-            <td>{{ data[dictionary.value + 'Count'] }}</td>
57
+            <td class="text-sign" (click)="viewDetail2(data, dictionary, 'all')">{{ data[dictionary.value + 'Count'] }}</td>
58
             <td>{{ data[dictionary.value + 'Grade'] }}</td>
58
             <td>{{ data[dictionary.value + 'Grade'] }}</td>
59
 						<td>{{ data[dictionary.value + 'Score'] }}</td>
59
 						<td>{{ data[dictionary.value + 'Score'] }}</td>
60
           </ng-container>
60
           </ng-container>

+ 4 - 0
src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.less

@@ -5,6 +5,10 @@
5
   right: 0;
5
   right: 0;
6
   bottom: 0;
6
   bottom: 0;
7
   left: 0;
7
   left: 0;
8
+	.text-sign{
9
+		text-decoration: underline;
10
+		cursor: pointer;
11
+	}
8
   ::ng-deep .ant-table-footer{
12
   ::ng-deep .ant-table-footer{
9
     padding: 16px 0;
13
     padding: 16px 0;
10
     width: calc(100% - 15px);
14
     width: calc(100% - 15px);

+ 109 - 2
src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.ts

@@ -2,7 +2,7 @@ import { TabService } from './../../services/tab.service';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
3
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
3
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
4
 import { MainService } from 'src/app/services/main.service';
4
 import { MainService } from 'src/app/services/main.service';
5
-import { ActivatedRoute } from '@angular/router';
5
+import { ActivatedRoute, Router } from '@angular/router';
6
 import cloneDeep from 'lodash-es/cloneDeep'
6
 import cloneDeep from 'lodash-es/cloneDeep'
7
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
7
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
8
 @Component({
8
 @Component({
@@ -16,6 +16,7 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
16
     private mainService: MainService,
16
     private mainService: MainService,
17
     private message: NzMessageService,
17
     private message: NzMessageService,
18
     private route: ActivatedRoute,
18
     private route: ActivatedRoute,
19
+		private router: Router,
19
     private tabService: TabService,
20
     private tabService: TabService,
20
   ) {}
21
   ) {}
21
 
22
 
@@ -45,7 +46,113 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
45
 
46
 
46
     }, 0)
47
     }, 0)
47
   }
48
   }
48
-
49
+	
50
+	// 数据下钻
51
+	viewDetail1(data, type){
52
+		let query = null
53
+		if(type=='all'){
54
+			query = {
55
+				startDate: this.customChangeDateComponent.startDate || undefined,
56
+				endDate: this.customChangeDateComponent.endDate || undefined,
57
+				searchQuery:{
58
+					statusValue: 'close',
59
+					deptDTO: this.fieldConfig.fields.deptDTO,
60
+					deptId: this.fieldConfig.fields.deptId,
61
+					groupId: this.fieldConfig.fields.groupId || undefined,
62
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
63
+					userId: this.fieldConfig.fields.userId || undefined,
64
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
65
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
66
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
67
+				}
68
+			}
69
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
70
+			let flag = this.tabService.tabs.some(v => v.path === path);
71
+			flag && this.tabService.deleteRouteSnapshot(path);
72
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
73
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
74
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
75
+			this.router.navigate([path], { replaceUrl: true });
76
+		}else{
77
+			query = {
78
+				startDate: data.date + ' ' + '00:00:00' || undefined,
79
+				endDate: data.date + ' ' + '23:59:59' || undefined,
80
+				searchQuery:{
81
+					statusValue: 'close',
82
+					deptDTO: this.fieldConfig.fields.deptDTO,
83
+					deptId: this.fieldConfig.fields.deptId,
84
+					groupId: this.fieldConfig.fields.groupId || undefined,
85
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
86
+					userId: this.fieldConfig.fields.userId || undefined,
87
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
88
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
89
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
90
+				}
91
+			}
92
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
93
+			let flag = this.tabService.tabs.some(v => v.path === path);
94
+			flag && this.tabService.deleteRouteSnapshot(path);
95
+			this.tabService.setQueryParams('dateRange', [data.date + ' ' + '00:00:00', data.date + ' ' + '23:59:59']);
96
+			this.tabService.setQueryParams('defRange', null);
97
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
98
+			this.router.navigate([path], { replaceUrl: true });
99
+		}
100
+	}
101
+	
102
+	// 数据下钻
103
+	viewDetail2(data, sublevel, type){
104
+		let query = null
105
+		if(type=='all'){
106
+			query = {
107
+				startDate: this.customChangeDateComponent.startDate || undefined,
108
+				endDate: this.customChangeDateComponent.endDate || undefined,
109
+				statisticsTypeId: Number(data[sublevel.value + 'StatisticsTypeId']) || undefined,
110
+				searchQuery:{
111
+					statusValue: 'close',
112
+					deptDTO: this.fieldConfig.fields.deptDTO,
113
+					deptId: this.fieldConfig.fields.deptId,
114
+					groupId: this.fieldConfig.fields.groupId || undefined,
115
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
116
+					userId: this.fieldConfig.fields.userId || undefined,
117
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
118
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
119
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
120
+				}
121
+			}
122
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
123
+			let flag = this.tabService.tabs.some(v => v.path === path);
124
+			flag && this.tabService.deleteRouteSnapshot(path);
125
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
126
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
127
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
128
+			this.router.navigate([path], { replaceUrl: true });
129
+		}else{
130
+			query = {
131
+				startDate: data.date + ' ' + '00:00:00' || undefined,
132
+				endDate: data.date + ' ' + '23:59:59' || undefined,
133
+				statisticsTypeId: Number(data[sublevel.value + 'StatisticsTypeId']) || undefined,
134
+				searchQuery:{
135
+					statusValue: 'close',
136
+					deptDTO: this.fieldConfig.fields.deptDTO,
137
+					deptId: this.fieldConfig.fields.deptId,
138
+					groupId: this.fieldConfig.fields.groupId || undefined,
139
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
140
+					userId: this.fieldConfig.fields.userId || undefined,
141
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
142
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
143
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
144
+				}
145
+			}
146
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
147
+			let flag = this.tabService.tabs.some(v => v.path === path);
148
+			flag && this.tabService.deleteRouteSnapshot(path);
149
+			this.tabService.setQueryParams('dateRange', [data.date + ' ' + '00:00:00', data.date + ' ' + '23:59:59']);
150
+			this.tabService.setQueryParams('defRange', null);
151
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
152
+			this.router.navigate([path], { replaceUrl: true });
153
+		}
154
+	}
155
+	
49
   getQueryParams(){
156
   getQueryParams(){
50
     let queryParams = this.tabService.getQueryParams();
157
     let queryParams = this.tabService.getQueryParams();
51
     this.tabService.clearQueryParams();
158
     this.tabService.clearQueryParams();

+ 6 - 6
src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.html

@@ -46,7 +46,7 @@
46
   <tbody>
46
   <tbody>
47
     <tr *ngFor="let data of listOfData">
47
     <tr *ngFor="let data of listOfData">
48
       <td>{{ data.date }}</td>
48
       <td>{{ data.date }}</td>
49
-      <td>{{ data.totalCount }}</td>
49
+      <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
50
       <td>{{ data.totalGrade }}</td>
50
       <td>{{ data.totalGrade }}</td>
51
 			<td>{{ data.totalPrice }}</td>
51
 			<td>{{ data.totalPrice }}</td>
52
       <td>{{ data.response_time_num }}</td>
52
       <td>{{ data.response_time_num }}</td>
@@ -54,15 +54,15 @@
54
       <td>{{ data.execution_time_num }}</td>
54
       <td>{{ data.execution_time_num }}</td>
55
       <td>{{ data.aveper }}</td>
55
       <td>{{ data.aveper }}</td>
56
       <td>{{ data.total_time }}</td>
56
       <td>{{ data.total_time }}</td>
57
-      <td>{{ data.five_count }}</td>
58
-      <td>{{ data.special_close }}</td>
57
+      <td class="text-sign" (click)="viewDetail2(data)">{{ data.five_count }}</td>
58
+      <td class="text-sign" (click)="viewDetail3(data)">{{ data.special_close }}</td>
59
     </tr>
59
     </tr>
60
   </tbody>
60
   </tbody>
61
   <ng-template #footerTpl>
61
   <ng-template #footerTpl>
62
     <table class="footTable">
62
     <table class="footTable">
63
       <tr *ngFor="let data of listOfDataEnd">
63
       <tr *ngFor="let data of listOfDataEnd">
64
         <td style="width: 10%">{{ data.date }}</td>
64
         <td style="width: 10%">{{ data.date }}</td>
65
-        <td style="width: 9%">{{ data.totalCount }}</td>
65
+        <td style="width: 9%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.totalCount }}</td>
66
         <td style="width: 9%">{{ data.totalGrade }}</td>
66
         <td style="width: 9%">{{ data.totalGrade }}</td>
67
 				<td style="width: 9%">{{ data.totalPrice }}</td>
67
 				<td style="width: 9%">{{ data.totalPrice }}</td>
68
         <td style="width: 9%">{{ data.response_time_num }}</td>
68
         <td style="width: 9%">{{ data.response_time_num }}</td>
@@ -70,8 +70,8 @@
70
         <td style="width: 9%">{{ data.execution_time_num }}</td>
70
         <td style="width: 9%">{{ data.execution_time_num }}</td>
71
         <td style="width: 9%">{{ data.aveper }}</td>
71
         <td style="width: 9%">{{ data.aveper }}</td>
72
         <td style="width: 9%">{{ data.total_time }}</td>
72
         <td style="width: 9%">{{ data.total_time }}</td>
73
-        <td style="width: 9%">{{ data.five_count }}</td>
74
-        <td style="width: 9%">{{ data.special_close }}</td>
73
+        <td style="width: 9%" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.five_count }}</td>
74
+        <td style="width: 9%" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.special_close }}</td>
75
       </tr>
75
       </tr>
76
     </table>
76
     </table>
77
   </ng-template>
77
   </ng-template>

+ 4 - 0
src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.less

@@ -5,6 +5,10 @@
5
   right: 0;
5
   right: 0;
6
   bottom: 0;
6
   bottom: 0;
7
   left: 0;
7
   left: 0;
8
+	.text-sign{
9
+		text-decoration: underline;
10
+		cursor: pointer;
11
+	}
8
   ::ng-deep .ant-table-footer{
12
   ::ng-deep .ant-table-footer{
9
     padding: 16px 0;
13
     padding: 16px 0;
10
     width: calc(100% - 15px);
14
     width: calc(100% - 15px);

+ 189 - 2
src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.ts

@@ -2,7 +2,7 @@ import { TabService } from './../../services/tab.service';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
3
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
3
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
4
 import { MainService } from 'src/app/services/main.service';
4
 import { MainService } from 'src/app/services/main.service';
5
-import { ActivatedRoute } from '@angular/router';
5
+import { ActivatedRoute, Router } from '@angular/router';
6
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
6
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
7
 @Component({
7
 @Component({
8
   selector: "app-date-quality-control-statistics",
8
   selector: "app-date-quality-control-statistics",
@@ -15,6 +15,7 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
15
     private mainService: MainService,
15
     private mainService: MainService,
16
     private message: NzMessageService,
16
     private message: NzMessageService,
17
     private route: ActivatedRoute,
17
     private route: ActivatedRoute,
18
+		private router: Router,
18
     private tabService: TabService,
19
     private tabService: TabService,
19
   ) {}
20
   ) {}
20
 
21
 
@@ -45,7 +46,193 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
45
 
46
 
46
     }, 0)
47
     }, 0)
47
   }
48
   }
48
-
49
+	
50
+	// 数据下钻
51
+	viewDetail1(data, type){
52
+		let query = null
53
+		if(type=='all'){
54
+			query = {
55
+				startDate: this.customChangeDateComponent.startDate || undefined,
56
+				endDate: this.customChangeDateComponent.endDate || undefined,
57
+				statisticsTypeId: this.statisticsTypeId || undefined,
58
+				searchQuery:{
59
+					statusValue: 'close',
60
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
61
+					deptId: this.fieldConfig.fields.deptId || undefined,
62
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
63
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
64
+					groupId: this.fieldConfig.fields.groupId || undefined,
65
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
66
+					userId: this.fieldConfig.fields.userId || undefined,
67
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
68
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
69
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
70
+				}
71
+			}
72
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
73
+			let flag = this.tabService.tabs.some(v => v.path === path);
74
+			flag && this.tabService.deleteRouteSnapshot(path);
75
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
76
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
77
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
78
+			this.router.navigate([path], { replaceUrl: true });
79
+		}else{
80
+			query = {
81
+				startDate: this.customChangeDateComponent.startDate || undefined,
82
+				endDate: this.customChangeDateComponent.endDate || undefined,
83
+				statisticsTypeId: this.statisticsTypeId || undefined,
84
+				searchQuery:{
85
+					statusValue: 'close',
86
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
87
+					deptId: this.fieldConfig.fields.deptId || undefined,
88
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
89
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
90
+					groupId: this.fieldConfig.fields.groupId || undefined,
91
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
92
+					userId: this.fieldConfig.fields.userId || undefined,
93
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
94
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
95
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
96
+				}
97
+			}
98
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
99
+			let flag = this.tabService.tabs.some(v => v.path === path);
100
+			flag && this.tabService.deleteRouteSnapshot(path);
101
+			this.tabService.setQueryParams('dateRange',  [data.date + ' ' + '00:00:00', data.date + ' ' + '23:59:59']);
102
+			this.tabService.setQueryParams('defRange', null);
103
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
104
+			this.router.navigate([path], { replaceUrl: true });
105
+		}
106
+	}
107
+	
108
+	viewDetail2(data, type){
109
+		let query = null
110
+		if(type=='all'){
111
+			query = {
112
+				startDate: this.customChangeDateComponent.startDate || undefined,
113
+				endDate: this.customChangeDateComponent.endDate || undefined,
114
+				statisticsTypeId: this.statisticsTypeId || undefined,
115
+				searchQuery:{
116
+					statusValue: 'close',
117
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
118
+					deptId: this.fieldConfig.fields.deptId || undefined,
119
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
120
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
121
+					groupId: this.fieldConfig.fields.groupId || undefined,
122
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
123
+					userId: this.fieldConfig.fields.userId || undefined,
124
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
125
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
126
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
127
+					minuteClose: 5,
128
+					minuteDTO: 5,
129
+				}
130
+			}
131
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
132
+			let flag = this.tabService.tabs.some(v => v.path === path);
133
+			flag && this.tabService.deleteRouteSnapshot(path);
134
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
135
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
136
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
137
+			this.router.navigate([path], { replaceUrl: true });
138
+		}else{
139
+			query = {
140
+				startDate: this.customChangeDateComponent.startDate || undefined,
141
+				endDate: this.customChangeDateComponent.endDate || undefined,
142
+				statisticsTypeId: data.statisticsTypeId || undefined,
143
+				searchQuery:{
144
+					statusValue: 'close',
145
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
146
+					deptId: this.fieldConfig.fields.deptId || undefined,
147
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
148
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
149
+					groupId: this.fieldConfig.fields.groupId || undefined,
150
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
151
+					userId: this.fieldConfig.fields.userId || undefined,
152
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
153
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
154
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
155
+					minuteClose: 5,
156
+					minuteDTO: 5,
157
+				}
158
+			}
159
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
160
+			let flag = this.tabService.tabs.some(v => v.path === path);
161
+			flag && this.tabService.deleteRouteSnapshot(path);
162
+			this.tabService.setQueryParams('dateRange',  [data.date + ' ' + '00:00:00', data.date + ' ' + '23:59:59']);
163
+			this.tabService.setQueryParams('defRange', null);
164
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
165
+			this.router.navigate([path], { replaceUrl: true });
166
+		}
167
+	}
168
+	
169
+	viewDetail3(data, type){
170
+		let query = null
171
+		if(type=='all'){
172
+			query = {
173
+				startDate: this.customChangeDateComponent.startDate || undefined,
174
+				endDate: this.customChangeDateComponent.endDate || undefined,
175
+				statisticsTypeId: this.statisticsTypeId || undefined,
176
+				searchQuery:{
177
+					statusValue: 'close',
178
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
179
+					deptId: this.fieldConfig.fields.deptId || undefined,
180
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
181
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
182
+					groupId: this.fieldConfig.fields.groupId || undefined,
183
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
184
+					userId: this.fieldConfig.fields.userId || undefined,
185
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
186
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
187
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
188
+					specialId: 1,
189
+					specialDTO: {
190
+						"name": "是",
191
+						"id": 1
192
+					},
193
+				}
194
+			}
195
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
196
+			let flag = this.tabService.tabs.some(v => v.path === path);
197
+			flag && this.tabService.deleteRouteSnapshot(path);
198
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
199
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
200
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
201
+			this.router.navigate([path], { replaceUrl: true });
202
+		}else{
203
+			query = {
204
+				startDate: this.customChangeDateComponent.startDate || undefined,
205
+				endDate: this.customChangeDateComponent.endDate || undefined,
206
+				statisticsTypeId: this.statisticsTypeId || undefined,
207
+				searchQuery:{
208
+					statusValue: 'close',
209
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
210
+					deptId: this.fieldConfig.fields.deptId || undefined,
211
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
212
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
213
+					groupId: this.fieldConfig.fields.groupId || undefined,
214
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
215
+					userId: this.fieldConfig.fields.userId || undefined,
216
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
217
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
218
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
219
+					specialId: 1,
220
+					specialDTO: {
221
+						"name": "是",
222
+						"id": 1
223
+					},
224
+				}
225
+			}
226
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
227
+			let flag = this.tabService.tabs.some(v => v.path === path);
228
+			flag && this.tabService.deleteRouteSnapshot(path);
229
+			this.tabService.setQueryParams('dateRange',  [data.date + ' ' + '00:00:00', data.date + ' ' + '23:59:59']);
230
+			this.tabService.setQueryParams('defRange', null);
231
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
232
+			this.router.navigate([path], { replaceUrl: true });
233
+		}
234
+	}
235
+	
49
   getQueryParams(){
236
   getQueryParams(){
50
     let queryParams = this.tabService.getQueryParams();
237
     let queryParams = this.tabService.getQueryParams();
51
     this.tabService.clearQueryParams();
238
     this.tabService.clearQueryParams();

+ 4 - 4
src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.html

@@ -49,11 +49,11 @@
49
       <tr *ngFor="let data of listOfData">
49
       <tr *ngFor="let data of listOfData">
50
 				<td class="width150" *ngIf="parent==1">{{ data.parentName || '无' }}</td>
50
 				<td class="width150" *ngIf="parent==1">{{ data.parentName || '无' }}</td>
51
         <td class="width150">{{ data.name }}</td>
51
         <td class="width150">{{ data.name }}</td>
52
-        <td>{{ data.totalCount }}</td>
52
+        <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
53
         <td>{{ data.totalGrade }}</td>
53
         <td>{{ data.totalGrade }}</td>
54
 				<td>{{ data.totalPrice }}</td>
54
 				<td>{{ data.totalPrice }}</td>
55
         <ng-container *ngFor="let dictionary of dictionaryList">
55
         <ng-container *ngFor="let dictionary of dictionaryList">
56
-          <td>{{ data[dictionary.value + 'Count'] }}</td>
56
+          <td class="text-sign" (click)="viewDetail2(data, dictionary)">{{ data[dictionary.value + 'Count'] }}</td>
57
           <td>{{ data[dictionary.value + 'Grade'] }}</td>
57
           <td>{{ data[dictionary.value + 'Grade'] }}</td>
58
 					<td>{{ data[dictionary.value + 'Score'] }}</td>
58
 					<td>{{ data[dictionary.value + 'Score'] }}</td>
59
         </ng-container>
59
         </ng-container>
@@ -65,11 +65,11 @@
65
 					<td class="width150" *ngIf="parent==1">{{ data.parentName }}</td>
65
 					<td class="width150" *ngIf="parent==1">{{ data.parentName }}</td>
66
 					<td class="width150" *ngIf="parent==0">{{ data.name }}</td>
66
 					<td class="width150" *ngIf="parent==0">{{ data.name }}</td>
67
 					<td class="width150" *ngIf="parent==1"></td>
67
 					<td class="width150" *ngIf="parent==1"></td>
68
-          <td>{{ data.totalCount }}</td>
68
+          <td class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.totalCount }}</td>
69
           <td>{{ data.totalGrade }}</td>
69
           <td>{{ data.totalGrade }}</td>
70
 					<td>{{ data.totalPrice }}</td>
70
 					<td>{{ data.totalPrice }}</td>
71
           <ng-container *ngFor="let dictionary of dictionaryList">
71
           <ng-container *ngFor="let dictionary of dictionaryList">
72
-            <td>{{ data[dictionary.value + 'Count'] }}</td>
72
+            <td class="text-sign" (click)="viewDetail2(data, dictionary, 'all')">{{ data[dictionary.value + 'Count'] }}</td>
73
             <td>{{ data[dictionary.value + 'Grade'] }}</td>
73
             <td>{{ data[dictionary.value + 'Grade'] }}</td>
74
 						<td>{{ data[dictionary.value + 'Score'] }}</td>
74
 						<td>{{ data[dictionary.value + 'Score'] }}</td>
75
           </ng-container>
75
           </ng-container>

+ 4 - 0
src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.less

@@ -5,6 +5,10 @@
5
   right: 0;
5
   right: 0;
6
   bottom: 0;
6
   bottom: 0;
7
   left: 0;
7
   left: 0;
8
+	.text-sign{
9
+		text-decoration: underline;
10
+		cursor: pointer;
11
+	}
8
   ::ng-deep .ant-table-footer{
12
   ::ng-deep .ant-table-footer{
9
     padding: 16px 0;
13
     padding: 16px 0;
10
     width: calc(100% - 15px);
14
     width: calc(100% - 15px);

+ 141 - 2
src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.ts

@@ -4,7 +4,7 @@ import { Subject } from 'rxjs';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
5
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
5
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } 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, Router } from '@angular/router';
8
 import cloneDeep from 'lodash-es/cloneDeep'
8
 import cloneDeep from 'lodash-es/cloneDeep'
9
 import { ToolService } from "../../../../services/tool.service";
9
 import { ToolService } from "../../../../services/tool.service";
10
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
10
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
@@ -20,6 +20,7 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
20
     private mainService: MainService,
20
     private mainService: MainService,
21
     private message: NzMessageService,
21
     private message: NzMessageService,
22
     private route: ActivatedRoute,
22
     private route: ActivatedRoute,
23
+		private router: Router,
23
     private tabService: TabService,
24
     private tabService: TabService,
24
 		private tool: ToolService,
25
 		private tool: ToolService,
25
   ) {}
26
   ) {}
@@ -62,7 +63,145 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
62
 
63
 
63
     }, 0)
64
     }, 0)
64
   }
65
   }
65
-
66
+	
67
+	// 数据下钻
68
+	viewDetail1(data, type){
69
+		let query = null
70
+		let item = null
71
+		if(this.deptId){
72
+			item = this.alldepart.find(i => i.id == this.deptId)
73
+		}
74
+		if(type=='all'){
75
+			query = {
76
+				startDate: this.customChangeDateComponent.startDate || undefined,
77
+				endDate: this.customChangeDateComponent.endDate || undefined,
78
+				searchQuery:{
79
+					statusValue: 'close',
80
+					deptDTO: item,
81
+					deptId: this.deptId,
82
+					groupId: this.fieldConfig.fields.groupId || undefined,
83
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
84
+					userId: this.fieldConfig.fields.userId || undefined,
85
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
86
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
87
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
88
+				}
89
+			}
90
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
91
+			let flag = this.tabService.tabs.some(v => v.path === path);
92
+			flag && this.tabService.deleteRouteSnapshot(path);
93
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
94
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
95
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
96
+			this.router.navigate([path], { replaceUrl: true });
97
+		}else{
98
+			let arr = data.name.split('(')
99
+			let postData: any = {
100
+			  idx: 0,
101
+			  sum: 20,
102
+			  department: {
103
+			    dept: arr[0],
104
+			    searchType: 1,
105
+			  },
106
+			};
107
+			this.mainService.getFetchDataList("simple/data", "department", postData).subscribe(res => {
108
+				let item = res.list.find(i => i.id == data.deptId)
109
+				query = {
110
+					startDate: this.customChangeDateComponent.startDate || undefined,
111
+					endDate: this.customChangeDateComponent.endDate || undefined,
112
+					searchQuery:{
113
+						statusValue: 'close',
114
+						deptDTO: item,
115
+						deptId: data.deptId,
116
+						groupId: this.fieldConfig.fields.groupId || undefined,
117
+						groupDTO: this.fieldConfig.fields.groupDTO || undefined,
118
+						userId: this.fieldConfig.fields.userId || undefined,
119
+						userDTO: this.fieldConfig.fields.userDTO || undefined,
120
+						buildingId: this.fieldConfig.fields.buildingId || undefined,
121
+						buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
122
+					}
123
+				}
124
+				let path = '/newStatistics/distributionInspectionStatistics/incidentList'
125
+				let flag = this.tabService.tabs.some(v => v.path === path);
126
+				flag && this.tabService.deleteRouteSnapshot(path);
127
+				this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
128
+				this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
129
+				sessionStorage.setItem('distributionData', JSON.stringify(query))
130
+				this.router.navigate([path], { replaceUrl: true });
131
+			});
132
+		}
133
+	}
134
+	
135
+	// 数据下钻
136
+	viewDetail2(data, sublevel, type){
137
+		let query = null
138
+		let item = null
139
+		if(this.deptId){
140
+			item = this.alldepart.find(i => i.id == this.deptId)
141
+		}
142
+		if(type=='all'){
143
+			query = {
144
+				startDate: this.customChangeDateComponent.startDate || undefined,
145
+				endDate: this.customChangeDateComponent.endDate || undefined,
146
+				statisticsTypeId: Number(data[sublevel.value + 'StatisticsTypeId']) || undefined,
147
+				searchQuery:{
148
+					statusValue: 'close',
149
+					deptDTO: item,
150
+					deptId: this.deptId,
151
+					groupId: this.fieldConfig.fields.groupId || undefined,
152
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
153
+					userId: this.fieldConfig.fields.userId || undefined,
154
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
155
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
156
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
157
+				}
158
+			}
159
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
160
+			let flag = this.tabService.tabs.some(v => v.path === path);
161
+			flag && this.tabService.deleteRouteSnapshot(path);
162
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
163
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
164
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
165
+			this.router.navigate([path], { replaceUrl: true });
166
+		}else{
167
+			let arr = data.name.split('(')
168
+			let postData: any = {
169
+			  idx: 0,
170
+			  sum: 20,
171
+			  department: {
172
+			    dept: arr[0],
173
+			    searchType: 1,
174
+			  },
175
+			};
176
+			this.mainService.getFetchDataList("simple/data", "department", postData).subscribe(res => {
177
+				let item = res.list.find(i => i.id == data.deptId)
178
+				query = {
179
+					startDate: this.customChangeDateComponent.startDate || undefined,
180
+					endDate: this.customChangeDateComponent.endDate || undefined,
181
+					statisticsTypeId: Number(data[sublevel.value + 'StatisticsTypeId']) || undefined,
182
+					searchQuery:{
183
+						statusValue: 'close',
184
+						deptDTO: item,
185
+						deptId: data.deptId,
186
+						groupId: this.fieldConfig.fields.groupId || undefined,
187
+						groupDTO: this.fieldConfig.fields.groupDTO || undefined,
188
+						userId: this.fieldConfig.fields.userId || undefined,
189
+						userDTO: this.fieldConfig.fields.userDTO || undefined,
190
+						buildingId: this.fieldConfig.fields.buildingId || undefined,
191
+						buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
192
+					}
193
+				}
194
+				let path = '/newStatistics/distributionInspectionStatistics/incidentList'
195
+				let flag = this.tabService.tabs.some(v => v.path === path);
196
+				flag && this.tabService.deleteRouteSnapshot(path);
197
+				this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
198
+				this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
199
+				sessionStorage.setItem('distributionData', JSON.stringify(query))
200
+				this.router.navigate([path], { replaceUrl: true });
201
+			});
202
+		}
203
+	}
204
+	
66
   getQueryParams(){
205
   getQueryParams(){
67
     let queryParams = this.tabService.getQueryParams();
206
     let queryParams = this.tabService.getQueryParams();
68
     this.tabService.clearQueryParams();
207
     this.tabService.clearQueryParams();

+ 6 - 6
src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.html

@@ -49,7 +49,7 @@
49
 			<tr *ngFor="let data of listOfData">
49
 			<tr *ngFor="let data of listOfData">
50
 				<td *ngIf="parent==1">{{ data.parentName || '无' }}</td>
50
 				<td *ngIf="parent==1">{{ data.parentName || '无' }}</td>
51
 				<td>{{ data.name }}</td>
51
 				<td>{{ data.name }}</td>
52
-				<td>{{ data.totalCount }}</td>
52
+				<td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
53
 				<td>{{ data.totalGrade }}</td>
53
 				<td>{{ data.totalGrade }}</td>
54
 				<td>{{ data.totalPrice }}</td>
54
 				<td>{{ data.totalPrice }}</td>
55
 				<td>{{ data.response_time_num }}</td>
55
 				<td>{{ data.response_time_num }}</td>
@@ -57,8 +57,8 @@
57
 				<td>{{ data.execution_time_num }}</td>
57
 				<td>{{ data.execution_time_num }}</td>
58
 				<td>{{ data.aveper }}</td>
58
 				<td>{{ data.aveper }}</td>
59
 				<td>{{ data.total_time }}</td>
59
 				<td>{{ data.total_time }}</td>
60
-				<td>{{ data.five_count }}</td>
61
-				<td>{{ data.special_close }}</td>
60
+				<td class="text-sign" (click)="viewDetail2(data)">{{ data.five_count }}</td>
61
+				<td class="text-sign" (click)="viewDetail3(data)">{{ data.special_close }}</td>
62
 			</tr>
62
 			</tr>
63
 		</tbody>
63
 		</tbody>
64
 		<ng-template #footerTpl>
64
 		<ng-template #footerTpl>
@@ -67,7 +67,7 @@
67
 					<td style="width: 12%" *ngIf="parent==1">{{ data.parentName }}</td>
67
 					<td style="width: 12%" *ngIf="parent==1">{{ data.parentName }}</td>
68
 					<td style="width: 10%" *ngIf="parent==0">{{ data.name }}</td>
68
 					<td style="width: 10%" *ngIf="parent==0">{{ data.name }}</td>
69
 					<td style="width: 8%" *ngIf="parent==1"></td>
69
 					<td style="width: 8%" *ngIf="parent==1"></td>
70
-					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.totalCount }}</td>
70
+					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.totalCount }}</td>
71
 					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.totalGrade }}</td>
71
 					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.totalGrade }}</td>
72
 					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.totalPrice }}</td>
72
 					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.totalPrice }}</td>
73
 					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.response_time_num }}</td>
73
 					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.response_time_num }}</td>
@@ -75,8 +75,8 @@
75
 					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.execution_time_num }}</td>
75
 					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.execution_time_num }}</td>
76
 					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.aveper }}</td>
76
 					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.aveper }}</td>
77
 					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.total_time }}</td>
77
 					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.total_time }}</td>
78
-					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.five_count }}</td>
79
-					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.special_close }}</td>
78
+					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.five_count }}</td>
79
+					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.special_close }}</td>
80
 				</tr>
80
 				</tr>
81
 			</table>
81
 			</table>
82
 		</ng-template>
82
 		</ng-template>

+ 4 - 0
src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.less

@@ -5,6 +5,10 @@
5
   right: 0;
5
   right: 0;
6
   bottom: 0;
6
   bottom: 0;
7
   left: 0;
7
   left: 0;
8
+	.text-sign{
9
+		text-decoration: underline;
10
+		cursor: pointer;
11
+	}
8
   ::ng-deep .ant-table-footer{
12
   ::ng-deep .ant-table-footer{
9
     padding: 16px 0;
13
     padding: 16px 0;
10
     width: calc(100% - 15px);
14
     width: calc(100% - 15px);

+ 246 - 2
src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.ts

@@ -4,7 +4,7 @@ import { Subject } from 'rxjs';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
5
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
5
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } 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, Router } from '@angular/router';
8
 import { ToolService } from "../../../../services/tool.service";
8
 import { ToolService } from "../../../../services/tool.service";
9
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
9
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
10
 @Component({
10
 @Component({
@@ -18,6 +18,7 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
18
     private mainService: MainService,
18
     private mainService: MainService,
19
     private message: NzMessageService,
19
     private message: NzMessageService,
20
     private route: ActivatedRoute,
20
     private route: ActivatedRoute,
21
+		private router: Router,
21
     private tabService: TabService,
22
     private tabService: TabService,
22
 		private tool: ToolService,
23
 		private tool: ToolService,
23
   ) {}
24
   ) {}
@@ -59,7 +60,250 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
59
 
60
 
60
     }, 0)
61
     }, 0)
61
   }
62
   }
62
-
63
+	
64
+	// 数据下钻
65
+	viewDetail1(data, type){
66
+		let query = null
67
+		let item = null
68
+		if(this.deptId){
69
+			item = this.alldepart.find(i => i.id == this.deptId)
70
+		}
71
+		if(type=='all'){
72
+			query = {
73
+				startDate: this.customChangeDateComponent.startDate || undefined,
74
+				endDate: this.customChangeDateComponent.endDate || undefined,
75
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
76
+				searchQuery:{
77
+					statusValue: 'close',
78
+					deptDTO: item || undefined,
79
+					deptId: this.deptId || undefined,
80
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
81
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
82
+					groupId: this.fieldConfig.fields.groupId || undefined,
83
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
84
+					userId: this.fieldConfig.fields.userId || undefined,
85
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
86
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
87
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
88
+				}
89
+			}
90
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
91
+			let flag = this.tabService.tabs.some(v => v.path === path);
92
+			flag && this.tabService.deleteRouteSnapshot(path);
93
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
94
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
95
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
96
+			this.router.navigate([path], { replaceUrl: true });
97
+		}else{
98
+			let arr = data.name.split('(')
99
+			let postData: any = {
100
+			  idx: 0,
101
+			  sum: 20,
102
+			  department: {
103
+			    dept: arr[0],
104
+			    searchType: 1,
105
+			  },
106
+			};
107
+			this.mainService.getFetchDataList("simple/data", "department", postData)
108
+			  .subscribe((res) => {
109
+			    if (res.status == 200) {
110
+						let item = res.list.find(i =>i.id == data.deptId)
111
+			      query = {
112
+			      	startDate: this.customChangeDateComponent.startDate || undefined,
113
+			      	endDate: this.customChangeDateComponent.endDate || undefined,
114
+			      	statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
115
+							searchQuery:{
116
+			      		statusValue: 'close',
117
+			      		deptDTO: item || undefined,
118
+			      		deptId: data.deptId || undefined,
119
+			      		taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
120
+			      		taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
121
+			      		groupId: this.fieldConfig.fields.groupId || undefined,
122
+			      		groupDTO: this.fieldConfig.fields.groupDTO || undefined,
123
+			      		userId: this.fieldConfig.fields.userId || undefined,
124
+			      		userDTO: this.fieldConfig.fields.userDTO || undefined,
125
+			      		buildingId: this.fieldConfig.fields.buildingId || undefined,
126
+			      		buildingDTO: this.fieldConfig.fields.buildingDTO || undefined
127
+			      	}
128
+			      }
129
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
130
+						let flag = this.tabService.tabs.some(v => v.path === path);
131
+						flag && this.tabService.deleteRouteSnapshot(path);
132
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
133
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
134
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
135
+						this.router.navigate([path], { replaceUrl: true });
136
+			    }
137
+			  });
138
+		}
139
+	}
140
+	
141
+	viewDetail2(data, type){
142
+		let query = null
143
+		let item = null
144
+		if(this.deptId){
145
+			item = this.alldepart.find(i => i.id == this.deptId)
146
+		}
147
+		if(type=='all'){
148
+			query = {
149
+				startDate: this.customChangeDateComponent.startDate || undefined,
150
+				endDate: this.customChangeDateComponent.endDate || undefined,
151
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
152
+				searchQuery:{
153
+					statusValue: 'close',
154
+					deptDTO: item || undefined,
155
+					deptId: data.deptId || undefined,
156
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
157
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
158
+					groupId: this.fieldConfig.fields.groupId || undefined,
159
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
160
+					userId: this.fieldConfig.fields.userId || undefined,
161
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
162
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
163
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
164
+					minuteClose: 5,
165
+					minuteDTO: 5,
166
+				}
167
+			}
168
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
169
+			let flag = this.tabService.tabs.some(v => v.path === path);
170
+			flag && this.tabService.deleteRouteSnapshot(path);
171
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
172
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
173
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
174
+			this.router.navigate([path], { replaceUrl: true });
175
+		}else{
176
+			let arr = data.name.split('(')
177
+			let postData: any = {
178
+			  idx: 0,
179
+			  sum: 20,
180
+			  department: {
181
+			    dept: arr[0],
182
+			    searchType: 1,
183
+			  },
184
+			};
185
+			this.mainService.getFetchDataList("simple/data", "department", postData)
186
+				.subscribe((res) => {
187
+					if (res.status == 200) {
188
+						let item = res.list.find(i =>i.id == data.deptId)
189
+						query = {
190
+							startDate: this.customChangeDateComponent.startDate || undefined,
191
+							endDate: this.customChangeDateComponent.endDate || undefined,
192
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
193
+							searchQuery:{
194
+								statusValue: 'close',
195
+								deptDTO: this.fieldConfig.fields.deptDTO || undefined,
196
+								deptId: this.fieldConfig.fields.deptId || undefined,
197
+								taskTypeId: data.taskTypeId || undefined,
198
+								taskTypeDTO: item,
199
+								groupId: this.fieldConfig.fields.groupId || undefined,
200
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
201
+								userId: this.fieldConfig.fields.userId || undefined,
202
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
203
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
204
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
205
+								minuteClose: 5,
206
+								minuteDTO: 5
207
+							}
208
+						}
209
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
210
+						let flag = this.tabService.tabs.some(v => v.path === path);
211
+						flag && this.tabService.deleteRouteSnapshot(path);
212
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
213
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
214
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
215
+						this.router.navigate([path], { replaceUrl: true });
216
+					}
217
+				});
218
+		}
219
+	}
220
+	
221
+	viewDetail3(data, type){
222
+		let query = null
223
+		let item = null
224
+		if(this.deptId){
225
+			item = this.alldepart.find(i => i.id == this.deptId)
226
+		}
227
+		if(type=='all'){
228
+			query = {
229
+				startDate: this.customChangeDateComponent.startDate || undefined,
230
+				endDate: this.customChangeDateComponent.endDate || undefined,
231
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
232
+				searchQuery:{
233
+					statusValue: 'close',
234
+					deptDTO: item || undefined,
235
+					deptId: this.deptId || undefined,
236
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
237
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
238
+					groupId: this.fieldConfig.fields.groupId || undefined,
239
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
240
+					userId: this.fieldConfig.fields.userId || undefined,
241
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
242
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
243
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
244
+					specialId: 1,
245
+					specialDTO: {
246
+						"name": "是",
247
+						"id": 1
248
+					},
249
+				}
250
+			}
251
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
252
+			let flag = this.tabService.tabs.some(v => v.path === path);
253
+			flag && this.tabService.deleteRouteSnapshot(path);
254
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
255
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
256
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
257
+			this.router.navigate([path], { replaceUrl: true });
258
+		}else{
259
+			let arr = data.name.split('(')
260
+			let postData: any = {
261
+			  idx: 0,
262
+			  sum: 20,
263
+			  department: {
264
+			    dept: arr[0],
265
+			    searchType: 1,
266
+			  },
267
+			};
268
+			this.mainService.getFetchDataList("simple/data", "department", postData)
269
+				.subscribe((res) => {
270
+					if (res.status == 200) {
271
+						let item = res.list.find(i =>i.id == data.deptId)
272
+						query = {
273
+							startDate: this.customChangeDateComponent.startDate || undefined,
274
+							endDate: this.customChangeDateComponent.endDate || undefined,
275
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
276
+							searchQuery:{
277
+								statusValue: 'close',
278
+								deptDTO: item || undefined,
279
+								deptId: data.deptId || undefined,
280
+								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
281
+								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
282
+								groupId: this.fieldConfig.fields.groupId || undefined,
283
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
284
+								userId: this.fieldConfig.fields.userId || undefined,
285
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
286
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
287
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
288
+								specialId: 1,
289
+								specialDTO: {
290
+									"name": "是",
291
+									"id": 1
292
+								}
293
+							}
294
+						}
295
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
296
+						let flag = this.tabService.tabs.some(v => v.path === path);
297
+						flag && this.tabService.deleteRouteSnapshot(path);
298
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
299
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
300
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
301
+						this.router.navigate([path], { replaceUrl: true });
302
+					}
303
+				});
304
+		}
305
+	}
306
+	
63
   getQueryParams(){
307
   getQueryParams(){
64
     let queryParams = this.tabService.getQueryParams();
308
     let queryParams = this.tabService.getQueryParams();
65
     this.tabService.clearQueryParams();
309
     this.tabService.clearQueryParams();

+ 12 - 12
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.html

@@ -46,13 +46,13 @@
46
     <tr *ngFor="let data of listOfData">
46
     <tr *ngFor="let data of listOfData">
47
 			<td *ngIf="parent==1">{{ data.parentName || '无' }}</td>
47
 			<td *ngIf="parent==1">{{ data.parentName || '无' }}</td>
48
       <td>{{ data.name }}</td>
48
       <td>{{ data.name }}</td>
49
-      <td>{{ data.totalCount }}</td>
49
+      <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
50
       <td>{{ data.evaCount }}</td>
50
       <td>{{ data.evaCount }}</td>
51
-      <td>{{ data.eva1 }}</td>
52
-      <td>{{ data.eva2 }}</td>
53
-      <td>{{ data.eva3 }}</td>
54
-      <td>{{ data.eva4 }}</td>
55
-      <td>{{ data.eva5 }}</td>
51
+      <td class="text-sign" (click)="viewDetail2(data)">{{ data.eva1 }}</td>
52
+      <td class="text-sign" (click)="viewDetail3(data)">{{ data.eva2 }}</td>
53
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.eva3 }}</td>
54
+      <td class="text-sign" (click)="viewDetail5(data)">{{ data.eva4 }}</td>
55
+      <td class="text-sign" (click)="viewDetail6(data)">{{ data.eva5 }}</td>
56
       <td>{{ data.avgCount }}</td>
56
       <td>{{ data.avgCount }}</td>
57
     </tr>
57
     </tr>
58
   </tbody>
58
   </tbody>
@@ -62,13 +62,13 @@
62
 				<td [ngStyle]="{width: widthStyle}" *ngIf="parent==1">{{ data.parentName }}</td>
62
 				<td [ngStyle]="{width: widthStyle}" *ngIf="parent==1">{{ data.parentName }}</td>
63
 				<td [ngStyle]="{width: widthStyle}" *ngIf="parent==0">{{ data.name }}</td>
63
 				<td [ngStyle]="{width: widthStyle}" *ngIf="parent==0">{{ data.name }}</td>
64
 				<td [ngStyle]="{width: widthStyle}" *ngIf="parent==1"></td>
64
 				<td [ngStyle]="{width: widthStyle}" *ngIf="parent==1"></td>
65
-        <td [ngStyle]="{width: widthThStyle}">{{ data.totalCount }}</td>
65
+        <td [ngStyle]="{width: widthThStyle}" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.totalCount }}</td>
66
         <td [ngStyle]="{width: widthThStyle}">{{ data.evaCount }}</td>
66
         <td [ngStyle]="{width: widthThStyle}">{{ data.evaCount }}</td>
67
-        <td [ngStyle]="{width: widthThStyle}">{{ data.eva1 }}</td>
68
-        <td [ngStyle]="{width: widthThStyle}">{{ data.eva2 }}</td>
69
-        <td [ngStyle]="{width: widthThStyle}">{{ data.eva3 }}</td>
70
-        <td [ngStyle]="{width: widthThStyle}">{{ data.eva4 }}</td>
71
-        <td [ngStyle]="{width: widthThStyle}">{{ data.eva5 }}</td>
67
+        <td [ngStyle]="{width: widthThStyle}" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.eva1 }}</td>
68
+        <td [ngStyle]="{width: widthThStyle}" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.eva2 }}</td>
69
+        <td [ngStyle]="{width: widthThStyle}" class="text-sign" (click)="viewDetail4(data, 'all')">{{ data.eva3 }}</td>
70
+        <td [ngStyle]="{width: widthThStyle}" class="text-sign" (click)="viewDetail5(data, 'all')">{{ data.eva4 }}</td>
71
+        <td [ngStyle]="{width: widthThStyle}" class="text-sign" (click)="viewDetail6(data, 'all')">{{ data.eva5 }}</td>
72
         <td [ngStyle]="{width: widthThStyle}">{{ data.avgCount }}</td>
72
         <td [ngStyle]="{width: widthThStyle}">{{ data.avgCount }}</td>
73
       </tr>
73
       </tr>
74
     </table>
74
     </table>

+ 4 - 0
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.less

@@ -5,6 +5,10 @@
5
   right: 0;
5
   right: 0;
6
   bottom: 0;
6
   bottom: 0;
7
   left: 0;
7
   left: 0;
8
+	.text-sign{
9
+		text-decoration: underline;
10
+		cursor: pointer;
11
+	}
8
   ::ng-deep .ant-table-footer{
12
   ::ng-deep .ant-table-footer{
9
     padding: 16px 0;
13
     padding: 16px 0;
10
     width: calc(100% - 15px);
14
     width: calc(100% - 15px);

+ 540 - 3
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.ts

@@ -4,7 +4,7 @@ import { Subject } from 'rxjs';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
5
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
5
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } 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, Router } from '@angular/router';
8
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
8
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
9
 @Component({
9
 @Component({
10
   selector: "app-distribution-department-evaluate-statistics",
10
   selector: "app-distribution-department-evaluate-statistics",
@@ -17,6 +17,7 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
17
     private mainService: MainService,
17
     private mainService: MainService,
18
     private message: NzMessageService,
18
     private message: NzMessageService,
19
     private route: ActivatedRoute,
19
     private route: ActivatedRoute,
20
+		private router: Router,
20
     private tabService: TabService,
21
     private tabService: TabService,
21
   ) {}
22
   ) {}
22
 
23
 
@@ -57,7 +58,543 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
57
 
58
 
58
     }, 0)
59
     }, 0)
59
   }
60
   }
60
-
61
+	
62
+	// 数据下钻
63
+	viewDetail1(data, type){
64
+		let query = null
65
+		let item = null
66
+		if(this.deptId){
67
+			item = this.alldepart.find(i => i.id == this.deptId)
68
+		}
69
+		if(type=='all'){
70
+			query = {
71
+				startDate: this.customChangeDateComponent.startDate || undefined,
72
+				endDate: this.customChangeDateComponent.endDate || undefined,
73
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
74
+				searchQuery:{
75
+					statusValue: 'close',
76
+					deptDTO: item || undefined,
77
+					deptId: this.deptId || undefined,
78
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
79
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
80
+					groupId: this.fieldConfig.fields.groupId || undefined,
81
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
82
+					userId: this.fieldConfig.fields.userId || undefined,
83
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
84
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
85
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
86
+				}
87
+			}
88
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
89
+			let flag = this.tabService.tabs.some(v => v.path === path);
90
+			flag && this.tabService.deleteRouteSnapshot(path);
91
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
92
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
93
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
94
+			this.router.navigate([path], { replaceUrl: true });
95
+		}else{
96
+			let arr = data.name.split('(')
97
+			let postData: any = {
98
+			  idx: 0,
99
+			  sum: 20,
100
+			  department: {
101
+			    dept: arr[0],
102
+			    searchType: 1,
103
+			  },
104
+			};
105
+			this.mainService.getFetchDataList("simple/data", "department", postData)
106
+			  .subscribe((res) => {
107
+			    if (res.status == 200) {
108
+						let item = res.list.find(i =>i.id == data.deptId)
109
+			      query = {
110
+			      	startDate: this.customChangeDateComponent.startDate || undefined,
111
+			      	endDate: this.customChangeDateComponent.endDate || undefined,
112
+			      	statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
113
+							searchQuery:{
114
+			      		statusValue: 'close',
115
+			      		deptDTO: item || undefined,
116
+			      		deptId: data.deptId || undefined,
117
+			      		taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
118
+			      		taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
119
+			      		groupId: this.fieldConfig.fields.groupId || undefined,
120
+			      		groupDTO: this.fieldConfig.fields.groupDTO || undefined,
121
+			      		userId: this.fieldConfig.fields.userId || undefined,
122
+			      		userDTO: this.fieldConfig.fields.userDTO || undefined,
123
+			      		buildingId: this.fieldConfig.fields.buildingId || undefined,
124
+			      		buildingDTO: this.fieldConfig.fields.buildingDTO || undefined
125
+			      	}
126
+			      }
127
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
128
+						let flag = this.tabService.tabs.some(v => v.path === path);
129
+						flag && this.tabService.deleteRouteSnapshot(path);
130
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
131
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
132
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
133
+						this.router.navigate([path], { replaceUrl: true });
134
+			    }
135
+			  });
136
+		}
137
+	}
138
+	
139
+	viewDetail2(data, type){
140
+		let query = null
141
+		let item = null
142
+		if(this.deptId){
143
+			item = this.alldepart.find(i => i.id == this.deptId)
144
+		}
145
+		if(type=='all'){
146
+			query = {
147
+				startDate: this.customChangeDateComponent.startDate || undefined,
148
+				endDate: this.customChangeDateComponent.endDate || undefined,
149
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
150
+				searchQuery:{
151
+					statusValue: 'close',
152
+					deptDTO: item || undefined,
153
+					deptId: data.deptId || undefined,
154
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
155
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
156
+					groupId: this.fieldConfig.fields.groupId || undefined,
157
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
158
+					userId: this.fieldConfig.fields.userId || undefined,
159
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
160
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
161
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
162
+					evaluateId: 358,
163
+					evaluateDTO: {
164
+							"id": 358,
165
+							"key": "workorderEvaluation",
166
+							"name": "极差",
167
+							"value": "1",
168
+							"desc": "工单评价"
169
+					}
170
+				}
171
+			}
172
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
173
+			let flag = this.tabService.tabs.some(v => v.path === path);
174
+			flag && this.tabService.deleteRouteSnapshot(path);
175
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
176
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
177
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
178
+			this.router.navigate([path], { replaceUrl: true });
179
+		}else{
180
+			let arr = data.name.split('(')
181
+			let postData: any = {
182
+			  idx: 0,
183
+			  sum: 20,
184
+			  department: {
185
+			    dept: arr[0],
186
+			    searchType: 1,
187
+			  },
188
+			};
189
+			this.mainService.getFetchDataList("simple/data", "department", postData)
190
+				.subscribe((res) => {
191
+					if (res.status == 200) {
192
+						let item = res.list.find(i =>i.id == data.deptId)
193
+						query = {
194
+							startDate: this.customChangeDateComponent.startDate || undefined,
195
+							endDate: this.customChangeDateComponent.endDate || undefined,
196
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
197
+							searchQuery:{
198
+								statusValue: 'close',
199
+								deptDTO: this.fieldConfig.fields.deptDTO || undefined,
200
+								deptId: this.fieldConfig.fields.deptId || undefined,
201
+								taskTypeId: data.taskTypeId || undefined,
202
+								taskTypeDTO: item,
203
+								groupId: this.fieldConfig.fields.groupId || undefined,
204
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
205
+								userId: this.fieldConfig.fields.userId || undefined,
206
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
207
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
208
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
209
+								evaluateId: 358,
210
+								evaluateDTO: {
211
+										"id": 358,
212
+										"key": "workorderEvaluation",
213
+										"name": "极差",
214
+										"value": "1",
215
+										"desc": "工单评价"
216
+								}
217
+							}
218
+						}
219
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
220
+						let flag = this.tabService.tabs.some(v => v.path === path);
221
+						flag && this.tabService.deleteRouteSnapshot(path);
222
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
223
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
224
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
225
+						this.router.navigate([path], { replaceUrl: true });
226
+					}
227
+				});
228
+		}
229
+	}
230
+	
231
+	viewDetail3(data, type){
232
+		let query = null
233
+		let item = null
234
+		if(this.deptId){
235
+			item = this.alldepart.find(i => i.id == this.deptId)
236
+		}
237
+		if(type=='all'){
238
+			query = {
239
+				startDate: this.customChangeDateComponent.startDate || undefined,
240
+				endDate: this.customChangeDateComponent.endDate || undefined,
241
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
242
+				searchQuery:{
243
+					statusValue: 'close',
244
+					deptDTO: item || undefined,
245
+					deptId: this.deptId || undefined,
246
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
247
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
248
+					groupId: this.fieldConfig.fields.groupId || undefined,
249
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
250
+					userId: this.fieldConfig.fields.userId || undefined,
251
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
252
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
253
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
254
+					evaluateId: 357,
255
+					evaluateDTO: {
256
+							"id": 357,
257
+							"key": "workorderEvaluation",
258
+							"name": "差",
259
+							"value": "2",
260
+							"desc": "工单评价"
261
+					}
262
+				}
263
+			}
264
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
265
+			let flag = this.tabService.tabs.some(v => v.path === path);
266
+			flag && this.tabService.deleteRouteSnapshot(path);
267
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
268
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
269
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
270
+			this.router.navigate([path], { replaceUrl: true });
271
+		}else{
272
+			let arr = data.name.split('(')
273
+			let postData: any = {
274
+			  idx: 0,
275
+			  sum: 20,
276
+			  department: {
277
+			    dept: arr[0],
278
+			    searchType: 1,
279
+			  },
280
+			};
281
+			this.mainService.getFetchDataList("simple/data", "department", postData)
282
+				.subscribe((res) => {
283
+					if (res.status == 200) {
284
+						let item = res.list.find(i =>i.id == data.deptId)
285
+						query = {
286
+							startDate: this.customChangeDateComponent.startDate || undefined,
287
+							endDate: this.customChangeDateComponent.endDate || undefined,
288
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
289
+							searchQuery:{
290
+								statusValue: 'close',
291
+								deptDTO: item || undefined,
292
+								deptId: data.deptId || undefined,
293
+								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
294
+								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
295
+								groupId: this.fieldConfig.fields.groupId || undefined,
296
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
297
+								userId: this.fieldConfig.fields.userId || undefined,
298
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
299
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
300
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
301
+								evaluateId: 357,
302
+								evaluateDTO: {
303
+										"id": 357,
304
+										"key": "workorderEvaluation",
305
+										"name": "差",
306
+										"value": "2",
307
+										"desc": "工单评价"
308
+								}
309
+							}
310
+						}
311
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
312
+						let flag = this.tabService.tabs.some(v => v.path === path);
313
+						flag && this.tabService.deleteRouteSnapshot(path);
314
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
315
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
316
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
317
+						this.router.navigate([path], { replaceUrl: true });
318
+					}
319
+				});
320
+		}
321
+	}
322
+	
323
+	viewDetail4(data, type){
324
+		let query = null
325
+		let item = null
326
+		if(this.deptId){
327
+			item = this.alldepart.find(i => i.id == this.deptId)
328
+		}
329
+		if(type=='all'){
330
+			query = {
331
+				startDate: this.customChangeDateComponent.startDate || undefined,
332
+				endDate: this.customChangeDateComponent.endDate || undefined,
333
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
334
+				searchQuery:{
335
+					statusValue: 'close',
336
+					deptDTO: item || undefined,
337
+					deptId: this.deptId || undefined,
338
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
339
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
340
+					groupId: this.fieldConfig.fields.groupId || undefined,
341
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
342
+					userId: this.fieldConfig.fields.userId || undefined,
343
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
344
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
345
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
346
+					evaluateId: 356,
347
+					evaluateDTO: {
348
+						"id": 356,
349
+						"key": "workorderEvaluation",
350
+						"name": "一般",
351
+						"value": "3",
352
+						"desc": "工单评价"
353
+					}
354
+				}
355
+			}
356
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
357
+			let flag = this.tabService.tabs.some(v => v.path === path);
358
+			flag && this.tabService.deleteRouteSnapshot(path);
359
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
360
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
361
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
362
+			this.router.navigate([path], { replaceUrl: true });
363
+		}else{
364
+			let arr = data.name.split('(')
365
+			let postData: any = {
366
+			  idx: 0,
367
+			  sum: 20,
368
+			  department: {
369
+			    dept: arr[0],
370
+			    searchType: 1,
371
+			  },
372
+			};
373
+			this.mainService.getFetchDataList("simple/data", "department", postData)
374
+				.subscribe((res) => {
375
+					if (res.status == 200) {
376
+						let item = res.list.find(i =>i.id == data.deptId)
377
+						query = {
378
+							startDate: this.customChangeDateComponent.startDate || undefined,
379
+							endDate: this.customChangeDateComponent.endDate || undefined,
380
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
381
+							searchQuery:{
382
+								statusValue: 'close',
383
+								deptDTO: item || undefined,
384
+								deptId: data.deptId || undefined,
385
+								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
386
+								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
387
+								groupId: this.fieldConfig.fields.groupId || undefined,
388
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
389
+								userId: this.fieldConfig.fields.userId || undefined,
390
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
391
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
392
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
393
+								evaluateId: 356,
394
+								evaluateDTO: {
395
+										"id": 356,
396
+										"key": "workorderEvaluation",
397
+										"name": "一般",
398
+										"value": "3",
399
+										"desc": "工单评价"
400
+								}
401
+							}
402
+						}
403
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
404
+						let flag = this.tabService.tabs.some(v => v.path === path);
405
+						flag && this.tabService.deleteRouteSnapshot(path);
406
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
407
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
408
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
409
+						this.router.navigate([path], { replaceUrl: true });
410
+					}
411
+				});
412
+		}
413
+	}
414
+	
415
+	viewDetail5(data, type){
416
+		let query = null
417
+		let item = null
418
+		if(this.deptId){
419
+			item = this.alldepart.find(i => i.id == this.deptId)
420
+		}
421
+		if(type=='all'){
422
+			query = {
423
+				startDate: this.customChangeDateComponent.startDate || undefined,
424
+				endDate: this.customChangeDateComponent.endDate || undefined,
425
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
426
+				searchQuery:{
427
+					statusValue: 'close',
428
+					deptDTO: item || undefined,
429
+					deptId: this.deptId || undefined,
430
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
431
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
432
+					groupId: this.fieldConfig.fields.groupId || undefined,
433
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
434
+					userId: this.fieldConfig.fields.userId || undefined,
435
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
436
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
437
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
438
+					evaluateId: 355,
439
+					evaluateDTO: {
440
+							"id": 355,
441
+							"key": "workorderEvaluation",
442
+							"name": "好评",
443
+							"value": "4",
444
+							"desc": "工单评价"
445
+					}
446
+				}
447
+			}
448
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
449
+			let flag = this.tabService.tabs.some(v => v.path === path);
450
+			flag && this.tabService.deleteRouteSnapshot(path);
451
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
452
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
453
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
454
+			this.router.navigate([path], { replaceUrl: true });
455
+		}else{
456
+			let arr = data.name.split('(')
457
+			let postData: any = {
458
+			  idx: 0,
459
+			  sum: 20,
460
+			  department: {
461
+			    dept: arr[0],
462
+			    searchType: 1,
463
+			  },
464
+			};
465
+			this.mainService.getFetchDataList("simple/data", "department", postData)
466
+				.subscribe((res) => {
467
+					if (res.status == 200) {
468
+						let item = res.list.find(i =>i.id == data.deptId)
469
+						query = {
470
+							startDate: this.customChangeDateComponent.startDate || undefined,
471
+							endDate: this.customChangeDateComponent.endDate || undefined,
472
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
473
+							searchQuery:{
474
+								statusValue: 'close',
475
+								deptDTO: item || undefined,
476
+								deptId: data.deptId || undefined,
477
+								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
478
+								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
479
+								groupId: this.fieldConfig.fields.groupId || undefined,
480
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
481
+								userId: this.fieldConfig.fields.userId || undefined,
482
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
483
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
484
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
485
+								evaluateId: 355,
486
+								evaluateDTO: {
487
+										"id": 355,
488
+										"key": "workorderEvaluation",
489
+										"name": "好评",
490
+										"value": "4",
491
+										"desc": "工单评价"
492
+								}
493
+							}
494
+						}
495
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
496
+						let flag = this.tabService.tabs.some(v => v.path === path);
497
+						flag && this.tabService.deleteRouteSnapshot(path);
498
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
499
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
500
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
501
+						this.router.navigate([path], { replaceUrl: true });
502
+					}
503
+				});
504
+		}
505
+	}
506
+	
507
+	viewDetail6(data, type){
508
+		let query = null
509
+		let item = null
510
+		if(this.deptId){
511
+			item = this.alldepart.find(i => i.id == this.deptId)
512
+		}
513
+		if(type=='all'){
514
+			query = {
515
+				startDate: this.customChangeDateComponent.startDate || undefined,
516
+				endDate: this.customChangeDateComponent.endDate || undefined,
517
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
518
+				searchQuery:{
519
+					statusValue: 'close',
520
+					deptDTO: item || undefined,
521
+					deptId: this.deptId || undefined,
522
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
523
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
524
+					groupId: this.fieldConfig.fields.groupId || undefined,
525
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
526
+					userId: this.fieldConfig.fields.userId || undefined,
527
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
528
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
529
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
530
+					evaluateId: 354,
531
+					evaluateDTO: {
532
+						"id": 354,
533
+						"key": "workorderEvaluation",
534
+						"name": "非常好评",
535
+						"value": "5",
536
+						"desc": "工单评价"
537
+					}
538
+				}
539
+			}
540
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
541
+			let flag = this.tabService.tabs.some(v => v.path === path);
542
+			flag && this.tabService.deleteRouteSnapshot(path);
543
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
544
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
545
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
546
+			this.router.navigate([path], { replaceUrl: true });
547
+		}else{
548
+			let arr = data.name.split('(')
549
+			let postData: any = {
550
+			  idx: 0,
551
+			  sum: 20,
552
+			  department: {
553
+			    dept: arr[0],
554
+			    searchType: 1,
555
+			  },
556
+			};
557
+			this.mainService.getFetchDataList("simple/data", "department", postData)
558
+				.subscribe((res) => {
559
+					if (res.status == 200) {
560
+						let item = res.list.find(i =>i.id == data.deptId)
561
+						query = {
562
+							startDate: this.customChangeDateComponent.startDate || undefined,
563
+							endDate: this.customChangeDateComponent.endDate || undefined,
564
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
565
+							searchQuery:{
566
+								statusValue: 'close',
567
+								deptDTO: item || undefined,
568
+								deptId: data.deptId || undefined,
569
+								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
570
+								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
571
+								groupId: this.fieldConfig.fields.groupId || undefined,
572
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
573
+								userId: this.fieldConfig.fields.userId || undefined,
574
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
575
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
576
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
577
+								evaluateId: 354,
578
+								evaluateDTO: {
579
+									"id": 354,
580
+									"key": "workorderEvaluation",
581
+									"name": "非常好评",
582
+									"value": "5",
583
+									"desc": "工单评价"
584
+								}
585
+							}
586
+						}
587
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
588
+						let flag = this.tabService.tabs.some(v => v.path === path);
589
+						flag && this.tabService.deleteRouteSnapshot(path);
590
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
591
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
592
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
593
+						this.router.navigate([path], { replaceUrl: true });
594
+					}
595
+				});
596
+		}
597
+	}
61
   getQueryParams(){
598
   getQueryParams(){
62
     let queryParams = this.tabService.getQueryParams();
599
     let queryParams = this.tabService.getQueryParams();
63
     this.tabService.clearQueryParams();
600
     this.tabService.clearQueryParams();
@@ -225,7 +762,7 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
225
 		this.sortCurrentValue = "descend";
762
 		this.sortCurrentValue = "descend";
226
 		this.sortCurrent = {totalCount: 'descend'};
763
 		this.sortCurrent = {totalCount: 'descend'};
227
     this.dateRange = []
764
     this.dateRange = []
228
-    this.buildingId = undefined;
765
+    this.deptId = undefined;
229
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, statisticsTypeId: undefined, taskTypeId: undefined, buildingId: undefined};
766
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, statisticsTypeId: undefined, taskTypeId: undefined, buildingId: undefined};
230
     this.customChangeDateComponent.resetByDate();
767
     this.customChangeDateComponent.resetByDate();
231
     this.search();
768
     this.search();

+ 8 - 8
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.html

@@ -42,10 +42,10 @@
42
     <tr *ngFor="let data of listOfData">
42
     <tr *ngFor="let data of listOfData">
43
 			<td *ngIf="parent==1">{{ data.parentName || '无' }}</td>
43
 			<td *ngIf="parent==1">{{ data.parentName || '无' }}</td>
44
       <td>{{ data.name }}</td>
44
       <td>{{ data.name }}</td>
45
-      <td>{{ data.service }}</td>
46
-      <td>{{ data.nurse }}</td>
47
-      <td>{{ data.system }}</td>
48
-      <td>{{ data.wechat }}</td>
45
+      <td class="text-sign" (click)="viewDetail1(data)">{{ data.service }}</td>
46
+      <td class="text-sign" (click)="viewDetail2(data)">{{ data.nurse }}</td>
47
+      <td class="text-sign" (click)="viewDetail3(data)">{{ data.system }}</td>
48
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.wechat }}</td>
49
     </tr>
49
     </tr>
50
   </tbody>
50
   </tbody>
51
   <ng-template #footerTpl>
51
   <ng-template #footerTpl>
@@ -54,10 +54,10 @@
54
 				<td style="width: 20%" *ngIf="parent==1">{{ data.parentName }}</td>
54
 				<td style="width: 20%" *ngIf="parent==1">{{ data.parentName }}</td>
55
 				<td style="width: 20%" *ngIf="parent==0">{{ data.name }}</td>
55
 				<td style="width: 20%" *ngIf="parent==0">{{ data.name }}</td>
56
 				<td style="width: 20%" *ngIf="parent==1"></td>
56
 				<td style="width: 20%" *ngIf="parent==1"></td>
57
-        <td style="width: 15%">{{ data.service }}</td>
58
-        <td style="width: 15%">{{ data.nurse }}</td>
59
-        <td style="width: 15%">{{ data.system }}</td>
60
-        <td style="width: 15%">{{ data.wechat }}</td>
57
+        <td style="width: 15%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.service }}</td>
58
+        <td style="width: 15%" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.nurse }}</td>
59
+        <td style="width: 15%" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.system }}</td>
60
+        <td style="width: 15%" class="text-sign" (click)="viewDetail4(data, 'all')">{{ data.wechat }}</td>
61
       </tr>
61
       </tr>
62
     </table>
62
     </table>
63
   </ng-template>
63
   </ng-template>

+ 4 - 0
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.less

@@ -5,6 +5,10 @@
5
   right: 0;
5
   right: 0;
6
   bottom: 0;
6
   bottom: 0;
7
   left: 0;
7
   left: 0;
8
+	.text-sign{
9
+		text-decoration: underline;
10
+		cursor: pointer;
11
+	}
8
   ::ng-deep .ant-table-footer{
12
   ::ng-deep .ant-table-footer{
9
     padding: 16px 0;
13
     padding: 16px 0;
10
     width: calc(100% - 15px);
14
     width: calc(100% - 15px);

+ 347 - 2
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.ts

@@ -4,7 +4,7 @@ import { Subject } from 'rxjs';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
5
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
5
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } 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, Router } from '@angular/router';
8
 import { ToolService } from "../../../../services/tool.service";
8
 import { ToolService } from "../../../../services/tool.service";
9
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
9
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
10
 @Component({
10
 @Component({
@@ -18,6 +18,7 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
18
     private mainService: MainService,
18
     private mainService: MainService,
19
     private message: NzMessageService,
19
     private message: NzMessageService,
20
     private route: ActivatedRoute,
20
     private route: ActivatedRoute,
21
+		private router: Router,
21
     private tabService: TabService,
22
     private tabService: TabService,
22
 		private tool: ToolService,
23
 		private tool: ToolService,
23
   ) {}
24
   ) {}
@@ -59,7 +60,351 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
59
 
60
 
60
     }, 0)
61
     }, 0)
61
   }
62
   }
62
-
63
+	
64
+	viewDetail1(data, type){
65
+		let query = null
66
+		let item = null
67
+		if(this.deptId){
68
+			item = this.alldepart.find(i => i.id == this.deptId)
69
+		}
70
+		if(type=='all'){
71
+			query = {
72
+				startDate: this.customChangeDateComponent.startDate || undefined,
73
+				endDate: this.customChangeDateComponent.endDate || undefined,
74
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
75
+				searchQuery:{
76
+					statusValue: 'close',
77
+					deptDTO: item || undefined,
78
+					deptId: data.deptId || undefined,
79
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
80
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
81
+					groupId: this.fieldConfig.fields.groupId || undefined,
82
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
83
+					userId: this.fieldConfig.fields.userId || undefined,
84
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
85
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
86
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
87
+					sourceId: 1,
88
+					sourceDTO: {
89
+						sourceId: 1,
90
+						name:"微信端"
91
+					}
92
+				}
93
+			}
94
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
95
+			let flag = this.tabService.tabs.some(v => v.path === path);
96
+			flag && this.tabService.deleteRouteSnapshot(path);
97
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
98
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
99
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
100
+			this.router.navigate([path], { replaceUrl: true });
101
+		}else{
102
+			let arr = data.name.split('(')
103
+			let postData: any = {
104
+			  idx: 0,
105
+			  sum: 20,
106
+			  department: {
107
+			    dept: arr[0],
108
+			    searchType: 1,
109
+			  },
110
+			};
111
+			this.mainService.getFetchDataList("simple/data", "department", postData)
112
+				.subscribe((res) => {
113
+					if (res.status == 200) {
114
+						let item = res.list.find(i =>i.id == data.deptId)
115
+						query = {
116
+							startDate: this.customChangeDateComponent.startDate || undefined,
117
+							endDate: this.customChangeDateComponent.endDate || undefined,
118
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
119
+							searchQuery:{
120
+								statusValue: 'close',
121
+								deptDTO: item || undefined,
122
+								deptId: data.deptId || undefined,
123
+								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
124
+								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
125
+								groupId: this.fieldConfig.fields.groupId || undefined,
126
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
127
+								userId: this.fieldConfig.fields.userId || undefined,
128
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
129
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
130
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
131
+								sourceId: 1,
132
+								sourceDTO: {
133
+									sourceId: 1,
134
+									name:"服务台"
135
+								}
136
+							}
137
+						}
138
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
139
+						let flag = this.tabService.tabs.some(v => v.path === path);
140
+						flag && this.tabService.deleteRouteSnapshot(path);
141
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
142
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
143
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
144
+						this.router.navigate([path], { replaceUrl: true });
145
+					}
146
+				});
147
+		}
148
+	}
149
+	
150
+	viewDetail2(data, type){
151
+		let query = null
152
+		let item = null
153
+		if(this.deptId){
154
+			item = this.alldepart.find(i => i.id == this.deptId)
155
+		}
156
+		if(type=='all'){
157
+			query = {
158
+				startDate: this.customChangeDateComponent.startDate || undefined,
159
+				endDate: this.customChangeDateComponent.endDate || undefined,
160
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
161
+				searchQuery:{
162
+					statusValue: 'close',
163
+					deptDTO: item || undefined,
164
+					deptId: this.deptId || undefined,
165
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
166
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
167
+					groupId: this.fieldConfig.fields.groupId || undefined,
168
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
169
+					userId: this.fieldConfig.fields.userId || undefined,
170
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
171
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
172
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
173
+					sourceId: 2,
174
+					sourceDTO: {
175
+						sourceId: 2,
176
+						name:"护士端"
177
+					}
178
+				}
179
+			}
180
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
181
+			let flag = this.tabService.tabs.some(v => v.path === path);
182
+			flag && this.tabService.deleteRouteSnapshot(path);
183
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
184
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
185
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
186
+			this.router.navigate([path], { replaceUrl: true });
187
+		}else{
188
+			let arr = data.name.split('(')
189
+			let postData: any = {
190
+			  idx: 0,
191
+			  sum: 20,
192
+			  department: {
193
+			    dept: arr[0],
194
+			    searchType: 1,
195
+			  },
196
+			};
197
+			this.mainService.getFetchDataList("simple/data", "department", postData)
198
+				.subscribe((res) => {
199
+					if (res.status == 200) {
200
+						let item = res.list.find(i =>i.id == data.deptId)
201
+						query = {
202
+							startDate: this.customChangeDateComponent.startDate || undefined,
203
+							endDate: this.customChangeDateComponent.endDate || undefined,
204
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
205
+							searchQuery:{
206
+								statusValue: 'close',
207
+								deptDTO: item || undefined,
208
+								deptId: data.deptId || undefined,
209
+								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
210
+								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
211
+								groupId: this.fieldConfig.fields.groupId || undefined,
212
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
213
+								userId: this.fieldConfig.fields.userId || undefined,
214
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
215
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
216
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
217
+								sourceId: 2,
218
+								sourceDTO: {
219
+									sourceId: 2,
220
+									name:"护士端"
221
+								}
222
+							}
223
+						}
224
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
225
+						let flag = this.tabService.tabs.some(v => v.path === path);
226
+						flag && this.tabService.deleteRouteSnapshot(path);
227
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
228
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
229
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
230
+						this.router.navigate([path], { replaceUrl: true });
231
+					}
232
+				});
233
+		}
234
+	}
235
+	
236
+	viewDetail3(data, type){
237
+		let query = null
238
+		let item = null
239
+		if(this.deptId){
240
+			item = this.alldepart.find(i => i.id == this.deptId)
241
+		}
242
+		if(type=='all'){
243
+			query = {
244
+				startDate: this.customChangeDateComponent.startDate || undefined,
245
+				endDate: this.customChangeDateComponent.endDate || undefined,
246
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
247
+				searchQuery:{
248
+					statusValue: 'close',
249
+					deptDTO: item || undefined,
250
+					deptId: this.deptId || undefined,
251
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
252
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
253
+					groupId: this.fieldConfig.fields.groupId || undefined,
254
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
255
+					userId: this.fieldConfig.fields.userId || undefined,
256
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
257
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
258
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
259
+					sourceId: 3,
260
+					sourceDTO: {
261
+						sourceId: 3,
262
+						name:"系统自动"
263
+					}
264
+				}
265
+			}
266
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
267
+			let flag = this.tabService.tabs.some(v => v.path === path);
268
+			flag && this.tabService.deleteRouteSnapshot(path);
269
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
270
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
271
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
272
+			this.router.navigate([path], { replaceUrl: true });
273
+		}else{
274
+			let arr = data.name.split('(')
275
+			let postData: any = {
276
+			  idx: 0,
277
+			  sum: 20,
278
+			  department: {
279
+			    dept: arr[0],
280
+			    searchType: 1,
281
+			  },
282
+			};
283
+			this.mainService.getFetchDataList("simple/data", "department", postData)
284
+				.subscribe((res) => {
285
+					if (res.status == 200) {
286
+						let item = res.list.find(i =>i.id == data.deptId)
287
+						query = {
288
+							startDate: this.customChangeDateComponent.startDate || undefined,
289
+							endDate: this.customChangeDateComponent.endDate || undefined,
290
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
291
+							searchQuery:{
292
+								statusValue: 'close',
293
+								deptDTO: item || undefined,
294
+								deptId: data.deptId || undefined,
295
+								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
296
+								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
297
+								groupId: this.fieldConfig.fields.groupId || undefined,
298
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
299
+								userId: this.fieldConfig.fields.userId || undefined,
300
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
301
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
302
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
303
+								sourceId: 3,
304
+								sourceDTO: {
305
+									sourceId: 3,
306
+									name:"系统自动"
307
+								}
308
+							}
309
+						}
310
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
311
+						let flag = this.tabService.tabs.some(v => v.path === path);
312
+						flag && this.tabService.deleteRouteSnapshot(path);
313
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
314
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
315
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
316
+						this.router.navigate([path], { replaceUrl: true });
317
+					}
318
+				});
319
+		}
320
+	}
321
+	
322
+	viewDetail4(data, type){
323
+		let query = null
324
+		let item = null
325
+		if(this.deptId){
326
+			item = this.alldepart.find(i => i.id == this.deptId)
327
+		}
328
+		if(type=='all'){
329
+			query = {
330
+				startDate: this.customChangeDateComponent.startDate || undefined,
331
+				endDate: this.customChangeDateComponent.endDate || undefined,
332
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
333
+				searchQuery:{
334
+					statusValue: 'close',
335
+					deptDTO: item || undefined,
336
+					deptId: this.deptId || undefined,
337
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
338
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
339
+					groupId: this.fieldConfig.fields.groupId || undefined,
340
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
341
+					userId: this.fieldConfig.fields.userId || undefined,
342
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
343
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
344
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
345
+					sourceId: 4,
346
+					sourceDTO: {
347
+						sourceId: 4,
348
+						name:"微信端"
349
+					}
350
+				}
351
+			}
352
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
353
+			let flag = this.tabService.tabs.some(v => v.path === path);
354
+			flag && this.tabService.deleteRouteSnapshot(path);
355
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
356
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
357
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
358
+			this.router.navigate([path], { replaceUrl: true });
359
+		}else{
360
+			let arr = data.name.split('(')
361
+			let postData: any = {
362
+			  idx: 0,
363
+			  sum: 20,
364
+			  department: {
365
+			    dept: arr[0],
366
+			    searchType: 1,
367
+			  },
368
+			};
369
+			this.mainService.getFetchDataList("simple/data", "department", postData)
370
+				.subscribe((res) => {
371
+					if (res.status == 200) {
372
+						let item = res.list.find(i =>i.id == data.deptId)
373
+						query = {
374
+							startDate: this.customChangeDateComponent.startDate || undefined,
375
+							endDate: this.customChangeDateComponent.endDate || undefined,
376
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
377
+							searchQuery:{
378
+								statusValue: 'close',
379
+								deptDTO: item || undefined,
380
+								deptId: data.deptId || undefined,
381
+								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
382
+								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
383
+								groupId: this.fieldConfig.fields.groupId || undefined,
384
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
385
+								userId: this.fieldConfig.fields.userId || undefined,
386
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
387
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
388
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
389
+								sourceId: 4,
390
+								sourceDTO: {
391
+									sourceId: 4,
392
+									name:"微信端"
393
+								}
394
+							}
395
+						}
396
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
397
+						let flag = this.tabService.tabs.some(v => v.path === path);
398
+						flag && this.tabService.deleteRouteSnapshot(path);
399
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
400
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
401
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
402
+						this.router.navigate([path], { replaceUrl: true });
403
+					}
404
+				});
405
+		}
406
+	}
407
+	
63
   getQueryParams(){
408
   getQueryParams(){
64
     let queryParams = this.tabService.getQueryParams();
409
     let queryParams = this.tabService.getQueryParams();
65
     this.tabService.clearQueryParams();
410
     this.tabService.clearQueryParams();

+ 4 - 4
src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.html

@@ -11,7 +11,7 @@
11
   <ng-container *ngIf="!isLoading">
11
   <ng-container *ngIf="!isLoading">
12
     <div class="top1-statistics">
12
     <div class="top1-statistics">
13
       <div class="top-list">
13
       <div class="top-list">
14
-        <div class="special-box">
14
+        <div class="special-box cursor" (click)="viewDetail1()">
15
           <div class="num">{{workData.totalCount || 0}}</div>
15
           <div class="num">{{workData.totalCount || 0}}</div>
16
           <div class="describe">工单总数</div>
16
           <div class="describe">工单总数</div>
17
         </div>
17
         </div>
@@ -37,7 +37,7 @@
37
         <div class="border"></div>
37
         <div class="border"></div>
38
       </div>
38
       </div>
39
       <div class="top-list">
39
       <div class="top-list">
40
-        <div class="special-box">
40
+        <div class="special-box cursor" (click)="viewDetail4()">
41
           <div class="num">{{workData.badCount || 0}}</div>
41
           <div class="num">{{workData.badCount || 0}}</div>
42
           <div class="describe">差评单数</div>
42
           <div class="describe">差评单数</div>
43
         </div>
43
         </div>
@@ -103,7 +103,7 @@
103
               <span *ngIf="index !=0 && index !=1 && index !=2">{{index+1}}</span>
103
               <span *ngIf="index !=0 && index !=1 && index !=2">{{index+1}}</span>
104
             </div>
104
             </div>
105
             <div class="table-list-4 ellipsis-oneline" title="{{item.dept}}">{{item.dept}}</div>
105
             <div class="table-list-4 ellipsis-oneline" title="{{item.dept}}">{{item.dept}}</div>
106
-            <div class="table-list-4">{{item.sum || 0}}</div>
106
+            <div class="table-list-4 text-sign" (click)="viewMaintain1(item)">{{item.sum || 0}}</div>
107
             <div class="table-list-4">{{item.goodRate || '0%'}}</div>
107
             <div class="table-list-4">{{item.goodRate || '0%'}}</div>
108
           </div>
108
           </div>
109
         </div>
109
         </div>
@@ -129,7 +129,7 @@
129
               <span *ngIf="index !=0 && index !=1 && index !=2">{{index+1}}</span>
129
               <span *ngIf="index !=0 && index !=1 && index !=2">{{index+1}}</span>
130
             </div>
130
             </div>
131
             <div class="table-list-4 ellipsis-oneline" title="{{item.userName}}({{item.userAccount}})">{{item.userName}}<ng-container *ngIf="item.userAccount">({{item.userAccount}})</ng-container></div>
131
             <div class="table-list-4 ellipsis-oneline" title="{{item.userName}}({{item.userAccount}})">{{item.userName}}<ng-container *ngIf="item.userAccount">({{item.userAccount}})</ng-container></div>
132
-            <div class="table-list-4">{{item.sum || 0}}</div>
132
+            <div class="table-list-4 text-sign" (click)="viewMaintain2(item)">{{item.sum || 0}}</div>
133
             <div class="table-list-4">{{item.totalGrade || 0}}</div>
133
             <div class="table-list-4">{{item.totalGrade || 0}}</div>
134
           </div>
134
           </div>
135
         </div>
135
         </div>

+ 7 - 0
src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.less

@@ -5,6 +5,13 @@
5
   right: 0;
5
   right: 0;
6
   bottom: 0;
6
   bottom: 0;
7
   left: 0;
7
   left: 0;
8
+	.cursor{
9
+		cursor: pointer;
10
+	}
11
+	.text-sign{
12
+		text-decoration: underline;
13
+		cursor: pointer;
14
+	}
8
 	.synthesize-box{
15
 	.synthesize-box{
9
 		background: #F0F2F5 !important;
16
 		background: #F0F2F5 !important;
10
 		height: calc((100vh - 92px));
17
 		height: calc((100vh - 92px));

+ 99 - 1
src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.ts

@@ -62,7 +62,104 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
62
 		}
62
 		}
63
 	] //人员top5
63
 	] //人员top5
64
   ngOnInit() {}
64
   ngOnInit() {}
65
-
65
+	
66
+	/*========= 数据下钻 ========*/
67
+	
68
+	// 汇总
69
+	viewDetail1(){
70
+		let query = {
71
+			
72
+		}
73
+		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
74
+		let flag = this.tabService.tabs.some(v => v.path === path);
75
+		flag && this.tabService.deleteRouteSnapshot(path);
76
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
77
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
78
+		sessionStorage.setItem('distributionData', JSON.stringify(query))
79
+		this.router.navigate([path], { replaceUrl: true });
80
+	}
81
+	
82
+	// 差评
83
+	viewDetail4(){
84
+		let query = {
85
+			startDate: this.customChangeDateComponent.startDate,
86
+			endDate: this.customChangeDateComponent.endDate,
87
+			searchQuery:{
88
+				evaluateId: 358,
89
+				evaluateDTO: {
90
+					desc: "工单评价",
91
+					id: 358,
92
+					key: "workorderEvaluation",
93
+					name: "极差",
94
+					value: "1"
95
+				}
96
+			}
97
+		}
98
+		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
99
+		let flag = this.tabService.tabs.some(v => v.path === path);
100
+		flag && this.tabService.deleteRouteSnapshot(path);
101
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
102
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
103
+		sessionStorage.setItem('distributionData', JSON.stringify(query))
104
+		this.router.navigate([path], { replaceUrl: true });
105
+	}
106
+	
107
+	// 科室top5
108
+	viewMaintain1(data){
109
+		let postData: any = {
110
+		  idx: 0,
111
+		  sum: 20,
112
+		  department: {
113
+		    statisticalHosId: this.getHosId,
114
+		    dept: data.dept,
115
+		    searchType: 1,
116
+		  },
117
+		};
118
+		this.mainService.getFetchDataList("simple/data", "department", postData).subscribe(res => {
119
+			let item = res.list.find(i => i.id == data.deptId)
120
+			let query = {
121
+				startDate: this.customChangeDateComponent.startDate,
122
+				endDate: this.customChangeDateComponent.endDate,
123
+				repairDeptId: data.deptId,
124
+				searchQuery:{
125
+					statusValue: 'close',
126
+					deptDTO: item,
127
+					deptId: data.deptId
128
+				}
129
+			}
130
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
131
+			let flag = this.tabService.tabs.some(v => v.path === path);
132
+			flag && this.tabService.deleteRouteSnapshot(path);
133
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
134
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
135
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
136
+			this.router.navigate([path], { replaceUrl: true });
137
+		});
138
+	}
139
+	
140
+	// 人员top5
141
+	viewMaintain2(data){
142
+		let query = {
143
+			startDate: this.customChangeDateComponent.startDate,
144
+			endDate: this.customChangeDateComponent.endDate,
145
+			searchQuery:{
146
+				statusValue: 'close',
147
+				executeUserDTO: {
148
+					name: data.userName,
149
+					id: data.userId
150
+				},
151
+				executeUserId: data.userId
152
+			}
153
+		}
154
+		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
155
+		let flag = this.tabService.tabs.some(v => v.path === path);
156
+		flag && this.tabService.deleteRouteSnapshot(path);
157
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
158
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
159
+		sessionStorage.setItem('distributionData', JSON.stringify(query))
160
+		this.router.navigate([path], { replaceUrl: true });
161
+	}
162
+	
66
   ngAfterViewInit(){
163
   ngAfterViewInit(){
67
     setTimeout(() => {
164
     setTimeout(() => {
68
       this.search();
165
       this.search();
@@ -476,6 +573,7 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
476
 		this.dateRange = [];
573
 		this.dateRange = [];
477
 		this.activeIndex = 'day';
574
 		this.activeIndex = 'day';
478
     this.customChangeDateComponent.resetByDate();
575
     this.customChangeDateComponent.resetByDate();
576
+		sessionStorage.removeItem('distributionData');
479
 		this.search();
577
 		this.search();
480
 	}
578
 	}
481
 
579
 

+ 6 - 6
src/app/views/new-statistics/distribution-inspection-statistics/hour-quality-control-statistics/hour-quality-control-statistics.component.html

@@ -46,7 +46,7 @@
46
   <tbody>
46
   <tbody>
47
     <tr *ngFor="let data of listOfData">
47
     <tr *ngFor="let data of listOfData">
48
       <td>{{ data.date }}</td>
48
       <td>{{ data.date }}</td>
49
-      <td>{{ data.totalCount }}</td>
49
+      <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
50
       <td>{{ data.avgCount }}</td>
50
       <td>{{ data.avgCount }}</td>
51
       <td>{{ data.totalGrade }}</td>
51
       <td>{{ data.totalGrade }}</td>
52
       <td>{{ data.response_time_num }}</td>
52
       <td>{{ data.response_time_num }}</td>
@@ -54,15 +54,15 @@
54
       <td>{{ data.execution_time_num }}</td>
54
       <td>{{ data.execution_time_num }}</td>
55
       <td>{{ data.aveper }}</td>
55
       <td>{{ data.aveper }}</td>
56
       <td>{{ data.total_time }}</td>
56
       <td>{{ data.total_time }}</td>
57
-      <td>{{ data.five_count }}</td>
58
-      <td>{{ data.special_close }}</td>
57
+      <td class="text-sign" (click)="viewDetail2(data)">{{ data.five_count }}</td>
58
+      <td class="text-sign" (click)="viewDetail3(data)">{{ data.special_close }}</td>
59
     </tr>
59
     </tr>
60
   </tbody>
60
   </tbody>
61
   <ng-template #footerTpl>
61
   <ng-template #footerTpl>
62
     <table class="footTable">
62
     <table class="footTable">
63
       <tr *ngFor="let data of listOfDataEnd">
63
       <tr *ngFor="let data of listOfDataEnd">
64
         <td style="width: 10%">{{ data.date }}</td>
64
         <td style="width: 10%">{{ data.date }}</td>
65
-        <td style="width: 9%">{{ data.totalCount }}</td>
65
+        <td style="width: 9%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.totalCount }}</td>
66
         <td style="width: 9%">{{ data.avgCount }}</td>
66
         <td style="width: 9%">{{ data.avgCount }}</td>
67
         <td style="width: 9%">{{ data.totalGrade }}</td>
67
         <td style="width: 9%">{{ data.totalGrade }}</td>
68
         <td style="width: 9%">{{ data.response_time_num }}</td>
68
         <td style="width: 9%">{{ data.response_time_num }}</td>
@@ -70,8 +70,8 @@
70
         <td style="width: 9%">{{ data.execution_time_num }}</td>
70
         <td style="width: 9%">{{ data.execution_time_num }}</td>
71
         <td style="width: 9%">{{ data.aveper }}</td>
71
         <td style="width: 9%">{{ data.aveper }}</td>
72
         <td style="width: 9%">{{ data.total_time }}</td>
72
         <td style="width: 9%">{{ data.total_time }}</td>
73
-        <td style="width: 9%">{{ data.five_count }}</td>
74
-        <td style="width: 9%">{{ data.special_close }}</td>
73
+        <td style="width: 9%" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.five_count }}</td>
74
+        <td style="width: 9%" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.special_close }}</td>
75
       </tr>
75
       </tr>
76
     </table>
76
     </table>
77
   </ng-template>
77
   </ng-template>

+ 4 - 0
src/app/views/new-statistics/distribution-inspection-statistics/hour-quality-control-statistics/hour-quality-control-statistics.component.less

@@ -5,6 +5,10 @@
5
   right: 0;
5
   right: 0;
6
   bottom: 0;
6
   bottom: 0;
7
   left: 0;
7
   left: 0;
8
+	.text-sign{
9
+		text-decoration: underline;
10
+		cursor: pointer;
11
+	}
8
   ::ng-deep .ant-table-footer{
12
   ::ng-deep .ant-table-footer{
9
     padding: 16px 0;
13
     padding: 16px 0;
10
     width: calc(100% - 15px);
14
     width: calc(100% - 15px);

+ 183 - 2
src/app/views/new-statistics/distribution-inspection-statistics/hour-quality-control-statistics/hour-quality-control-statistics.component.ts

@@ -2,7 +2,7 @@ import { TabService } from './../../services/tab.service';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
2
 import { NzMessageService } from 'ng-zorro-antd/message';
3
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
3
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
4
 import { MainService } from 'src/app/services/main.service';
4
 import { MainService } from 'src/app/services/main.service';
5
-import { ActivatedRoute } from '@angular/router';
5
+import { ActivatedRoute, Router } from '@angular/router';
6
 import { ToolService } from "../../../../services/tool.service";
6
 import { ToolService } from "../../../../services/tool.service";
7
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
7
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
8
 @Component({
8
 @Component({
@@ -16,6 +16,7 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
16
     private mainService: MainService,
16
     private mainService: MainService,
17
     private message: NzMessageService,
17
     private message: NzMessageService,
18
     private route: ActivatedRoute,
18
     private route: ActivatedRoute,
19
+		private router: Router,
19
     private tabService: TabService,
20
     private tabService: TabService,
20
 		private tool: ToolService,
21
 		private tool: ToolService,
21
   ) {}
22
   ) {}
@@ -48,7 +49,187 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
48
 
49
 
49
     }, 0)
50
     }, 0)
50
   }
51
   }
51
-
52
+	
53
+	// 数据下钻
54
+	viewDetail1(data, type){
55
+		let query = null
56
+		if(type=='all'){
57
+			query = {
58
+				startDate: this.customChangeDateComponent.startDate || undefined,
59
+				endDate: this.customChangeDateComponent.endDate || undefined,
60
+				statisticsTypeId: this.statisticsTypeId || undefined,
61
+				searchQuery:{
62
+					statusValue: 'close',
63
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
64
+					deptId: this.fieldConfig.fields.deptId || undefined,
65
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
66
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
67
+					groupId: this.fieldConfig.fields.groupId || undefined,
68
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
69
+					userId: this.fieldConfig.fields.userId || undefined,
70
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
71
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
72
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
73
+				}
74
+			}
75
+		}else{
76
+			query = {
77
+				startDate: this.customChangeDateComponent.startDate || undefined,
78
+				endDate: this.customChangeDateComponent.endDate || undefined,
79
+				statisticsTypeId: this.statisticsTypeId || undefined,
80
+				searchQuery:{
81
+					statusValue: 'close',
82
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
83
+					deptId: this.fieldConfig.fields.deptId || undefined,
84
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
85
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
86
+					groupId: this.fieldConfig.fields.groupId || undefined,
87
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
88
+					userId: this.fieldConfig.fields.userId || undefined,
89
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
90
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
91
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
92
+					timeFrameId: data.date || undefined,
93
+					timeFrameDTO:{
94
+						"name": data.date,
95
+						"id": data.date
96
+					}
97
+				}
98
+			}
99
+		}
100
+		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
101
+		let flag = this.tabService.tabs.some(v => v.path === path);
102
+		flag && this.tabService.deleteRouteSnapshot(path);
103
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
104
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
105
+		sessionStorage.setItem('distributionData', JSON.stringify(query))
106
+		this.router.navigate([path], { replaceUrl: true });
107
+	}
108
+	
109
+	viewDetail2(data, type){
110
+		let query = null
111
+		if(type=='all'){
112
+			query = {
113
+				startDate: this.customChangeDateComponent.startDate || undefined,
114
+				endDate: this.customChangeDateComponent.endDate || undefined,
115
+				statisticsTypeId: this.statisticsTypeId || undefined,
116
+				searchQuery:{
117
+					statusValue: 'close',
118
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
119
+					deptId: this.fieldConfig.fields.deptId || undefined,
120
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
121
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
122
+					groupId: this.fieldConfig.fields.groupId || undefined,
123
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
124
+					userId: this.fieldConfig.fields.userId || undefined,
125
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
126
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
127
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
128
+					minuteClose: 5,
129
+					minuteDTO: 5,
130
+				}
131
+			}
132
+		}else{
133
+			query = {
134
+				startDate: this.customChangeDateComponent.startDate || undefined,
135
+				endDate: this.customChangeDateComponent.endDate || undefined,
136
+				statisticsTypeId: data.statisticsTypeId || undefined,
137
+				searchQuery:{
138
+					statusValue: 'close',
139
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
140
+					deptId: this.fieldConfig.fields.deptId || undefined,
141
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
142
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
143
+					groupId: this.fieldConfig.fields.groupId || undefined,
144
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
145
+					userId: this.fieldConfig.fields.userId || undefined,
146
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
147
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
148
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
149
+					minuteClose: 5,
150
+					minuteDTO: 5,
151
+					timeFrameId: data.date || undefined,
152
+					timeFrameDTO:{
153
+						"name": data.date,
154
+						"id": data.date
155
+					}
156
+				}
157
+			}
158
+		}
159
+		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
160
+		let flag = this.tabService.tabs.some(v => v.path === path);
161
+		flag && this.tabService.deleteRouteSnapshot(path);
162
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
163
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
164
+		sessionStorage.setItem('distributionData', JSON.stringify(query))
165
+		this.router.navigate([path], { replaceUrl: true });
166
+	}
167
+	
168
+	viewDetail3(data, type){
169
+		let query = null
170
+		if(type=='all'){
171
+			query = {
172
+				startDate: this.customChangeDateComponent.startDate || undefined,
173
+				endDate: this.customChangeDateComponent.endDate || undefined,
174
+				statisticsTypeId: this.statisticsTypeId || undefined,
175
+				searchQuery:{
176
+					statusValue: 'close',
177
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
178
+					deptId: this.fieldConfig.fields.deptId || undefined,
179
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
180
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
181
+					groupId: this.fieldConfig.fields.groupId || undefined,
182
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
183
+					userId: this.fieldConfig.fields.userId || undefined,
184
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
185
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
186
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
187
+					specialId: 1,
188
+					specialDTO: {
189
+						"name": "是",
190
+						"id": 1
191
+					},
192
+				}
193
+			}
194
+		}else{
195
+			query = {
196
+				startDate: this.customChangeDateComponent.startDate || undefined,
197
+				endDate: this.customChangeDateComponent.endDate || undefined,
198
+				statisticsTypeId: this.statisticsTypeId || undefined,
199
+				searchQuery:{
200
+					statusValue: 'close',
201
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
202
+					deptId: this.fieldConfig.fields.deptId || undefined,
203
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
204
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
205
+					groupId: this.fieldConfig.fields.groupId || undefined,
206
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
207
+					userId: this.fieldConfig.fields.userId || undefined,
208
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
209
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
210
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
211
+					specialId: 1,
212
+					specialDTO: {
213
+						"name": "是",
214
+						"id": 1
215
+					},
216
+					timeFrameId: data.date || undefined,
217
+					timeFrameDTO:{
218
+						"name": data.date,
219
+						"id": data.date
220
+					}
221
+				}
222
+			}
223
+		}
224
+		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
225
+		let flag = this.tabService.tabs.some(v => v.path === path);
226
+		flag && this.tabService.deleteRouteSnapshot(path);
227
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
228
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
229
+		sessionStorage.setItem('distributionData', JSON.stringify(query))
230
+		this.router.navigate([path], { replaceUrl: true });
231
+	}
232
+	
52
   getQueryParams(){
233
   getQueryParams(){
53
     let queryParams = this.tabService.getQueryParams();
234
     let queryParams = this.tabService.getQueryParams();
54
     this.tabService.clearQueryParams();
235
     this.tabService.clearQueryParams();

+ 4 - 2
src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.html

@@ -20,8 +20,11 @@
20
     <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
20
     <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
21
   </div>
21
   </div>
22
 </div>
22
 </div>
23
-<div class="moreFilter" *ngIf="fieldConfig.fields.deptDTO|| fieldConfig.fields.taskTypeDTO || fieldConfig.fields.sourceDTO || fieldConfig.fields.minuteDTO || fieldConfig.fields.specialDTO || fieldConfig.fields.overtimeIdDTO || fieldConfig.fields.abnormalDTO || fieldConfig.fields.evaluateDTO || fieldConfig.fields.executeUserDTO || fieldConfig.fields.codeNumDTO || fieldConfig.fields.timeFrameDTO">
23
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.deptDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.taskTypeDTO || fieldConfig.fields.sourceDTO || fieldConfig.fields.minuteDTO || fieldConfig.fields.specialDTO || fieldConfig.fields.overtimeIdDTO || fieldConfig.fields.abnormalDTO || fieldConfig.fields.evaluateDTO || fieldConfig.fields.codeNumDTO || fieldConfig.fields.timeFrameDTO">
24
+	<span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
25
+	<span>{{fieldConfig.fields.userDTO?.name}}</span>
24
 	<span>{{fieldConfig.fields.taskTypeDTO?.taskName}}</span>
26
 	<span>{{fieldConfig.fields.taskTypeDTO?.taskName}}</span>
27
+	<span>{{fieldConfig.fields.buildingDTO?.buildingName}}</span>
25
   <span>{{fieldConfig.fields.deptDTO?.dept}}</span>
28
   <span>{{fieldConfig.fields.deptDTO?.dept}}</span>
26
 	<span>{{fieldConfig.fields.sourceDTO?.name}}</span>
29
 	<span>{{fieldConfig.fields.sourceDTO?.name}}</span>
27
 	<span>{{fieldConfig.fields.minuteDTO}}</span>
30
 	<span>{{fieldConfig.fields.minuteDTO}}</span>
@@ -29,7 +32,6 @@
29
 	<span>{{fieldConfig.fields.overtimeDTO?.name}}</span>
32
 	<span>{{fieldConfig.fields.overtimeDTO?.name}}</span>
30
 	<span>{{fieldConfig.fields.abnormalDTO?.name}}</span>
33
 	<span>{{fieldConfig.fields.abnormalDTO?.name}}</span>
31
 	<span>{{fieldConfig.fields.evaluateDTO?.name}}</span>
34
 	<span>{{fieldConfig.fields.evaluateDTO?.name}}</span>
32
-	<span>{{fieldConfig.fields.executeUserDTO?.name}}</span>
33
 	<span>{{fieldConfig.fields.codeNumDTO}}</span>
35
 	<span>{{fieldConfig.fields.codeNumDTO}}</span>
34
 	<span>{{fieldConfig.fields.timeFrameDTO?.name}}</span>
36
 	<span>{{fieldConfig.fields.timeFrameDTO?.name}}</span>
35
 </div>
37
 </div>

+ 61 - 18
src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.ts

@@ -1,10 +1,10 @@
1
 import { TabService } from './../../services/tab.service';
1
 import { TabService } from './../../services/tab.service';
2
-import { debounceTime } from 'rxjs/operators';
2
+import { debounceTime, filter } from 'rxjs/operators';
3
 import { Subject } from 'rxjs';
3
 import { Subject } from 'rxjs';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
5
-import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
5
+import { Component, OnInit, HostListener, AfterViewInit, ViewChild, OnDestroy } from "@angular/core";
6
 import { MainService } from 'src/app/services/main.service';
6
 import { MainService } from 'src/app/services/main.service';
7
-import { ActivatedRoute, Router } from '@angular/router';
7
+import { ActivatedRoute, Router, NavigationEnd } from '@angular/router';
8
 import cloneDeep from 'lodash-es/cloneDeep'
8
 import cloneDeep from 'lodash-es/cloneDeep'
9
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
9
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
10
 @Component({
10
 @Component({
@@ -12,7 +12,7 @@ import { CustomChangeDateComponent } from '../../components/custom-change-date/c
12
   templateUrl: "./incident-list.component.html",
12
   templateUrl: "./incident-list.component.html",
13
   styleUrls: ["./incident-list.component.less"],
13
   styleUrls: ["./incident-list.component.less"],
14
 })
14
 })
15
-export class IncidentListComponent implements OnInit, AfterViewInit {
15
+export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
16
   @ViewChild('customChangeDate', { static: false }) customChangeDateComponent!: CustomChangeDateComponent;
16
   @ViewChild('customChangeDate', { static: false }) customChangeDateComponent!: CustomChangeDateComponent;
17
   constructor(
17
   constructor(
18
     private mainService: MainService,
18
     private mainService: MainService,
@@ -31,20 +31,22 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
31
   repairDeptId;//报修科室id
31
   repairDeptId;//报修科室id
32
 
32
 
33
   searchTimerSubject = new Subject();
33
   searchTimerSubject = new Subject();
34
-
34
+	
35
   ngOnInit() {
35
   ngOnInit() {
36
+		// 数据下钻搜索
37
+		this.getRouteQuery()
36
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
38
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
37
       let fun = v[0];
39
       let fun = v[0];
38
       fun.call(this, v[1]);
40
       fun.call(this, v[1]);
39
     });
41
     });
40
   }
42
   }
41
-
43
+	
44
+	ngOnDestroy(){
45
+		sessionStorage.removeItem('distributionData')
46
+	}
47
+	
42
   ngAfterViewInit(){
48
   ngAfterViewInit(){
43
     this.initSessionData();
49
     this.initSessionData();
44
-    this.getQueryParams();
45
-    setTimeout(() => {
46
-      this.search();
47
-    }, 0)
48
     this.onResize(0);
50
     this.onResize(0);
49
   }
51
   }
50
 
52
 
@@ -56,14 +58,50 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
56
 
58
 
57
     }, 0)
59
     }, 0)
58
   }
60
   }
59
-
61
+	
62
+	goingType:boolean = false;
63
+	getRouteQuery(){
64
+		let data = sessionStorage.getItem('distributionData')
65
+		let query = null
66
+		if(data){
67
+			query = JSON.parse(data)
68
+			console.log('query==========',query)
69
+			setTimeout(_=>{
70
+				// 统计分类
71
+				if(query.statisticsTypeId){
72
+					this.getStatisticsTypeList();
73
+					this.statisticsTypeId = query.statisticsTypeId
74
+				}else{
75
+					this.statisticsTypeId = undefined
76
+				}
77
+				if(query.searchQuery){
78
+					this.goingType = true
79
+					this.fieldConfig.fields = query.searchQuery
80
+				}else{
81
+					this.goingType = false
82
+					this.fieldConfig.fields = {}
83
+				}
84
+				
85
+				this.getQueryParams();
86
+			},50)
87
+		}else{
88
+			setTimeout(_=>{
89
+				this.getQueryParams();
90
+			},50)
91
+		}
92
+	}
93
+	
60
   getQueryParams(){
94
   getQueryParams(){
61
     let queryParams = this.tabService.getQueryParams();
95
     let queryParams = this.tabService.getQueryParams();
62
     this.tabService.clearQueryParams();
96
     this.tabService.clearQueryParams();
63
     if(queryParams.dateRange){
97
     if(queryParams.dateRange){
64
       this.dateRange = queryParams.dateRange;
98
       this.dateRange = queryParams.dateRange;
65
-      this.customChangeDateComponent.initByDate(this.dateRange);
99
+      this.customChangeDateComponent.initByDate(this.dateRange, queryParams.defRange);
66
     }
100
     }
101
+    setTimeout(_=>{
102
+    	this.search();
103
+    	this.onResize(37);
104
+    },50)
67
   }
105
   }
68
 
106
 
69
   get getMoreFilter(){
107
   get getMoreFilter(){
@@ -129,14 +167,16 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
129
       endDate: this.customChangeDateComponent.endDate || undefined,
167
       endDate: this.customChangeDateComponent.endDate || undefined,
130
       hosId: this.getHosId,
168
       hosId: this.getHosId,
131
       deptId: this.fieldConfig.fields.deptId || undefined,
169
       deptId: this.fieldConfig.fields.deptId || undefined,
132
-      taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
170
+			groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
171
+			userId: this.fieldConfig.fields.userId || undefined,
172
+			taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
173
+			buildingId: this.fieldConfig.fields.buildingId || undefined,
133
 			sourceId: this.fieldConfig.fields.sourceId || undefined,
174
 			sourceId: this.fieldConfig.fields.sourceId || undefined,
134
 			minutesClose: this.fieldConfig.fields.minuteClose || undefined,
175
 			minutesClose: this.fieldConfig.fields.minuteClose || undefined,
135
 			specialCloseFlag: this.fieldConfig.fields.specialId || undefined,
176
 			specialCloseFlag: this.fieldConfig.fields.specialId || undefined,
136
 			timeout: this.fieldConfig.fields.overtimeId || undefined,
177
 			timeout: this.fieldConfig.fields.overtimeId || undefined,
137
 			abnormityType: this.fieldConfig.fields.abnormalId || undefined,
178
 			abnormityType: this.fieldConfig.fields.abnormalId || undefined,
138
 			workOrderEvaluationId: this.fieldConfig.fields.evaluateId || undefined,
179
 			workOrderEvaluationId: this.fieldConfig.fields.evaluateId || undefined,
139
-			userId: this.fieldConfig.fields.executeUserId || undefined,
140
 			hour: this.fieldConfig.fields.timeFrameId || undefined,
180
 			hour: this.fieldConfig.fields.timeFrameId || undefined,
141
 			gdCode: this.fieldConfig.fields.codeNum || undefined
181
 			gdCode: this.fieldConfig.fields.codeNum || undefined
142
     };
182
     };
@@ -184,14 +224,16 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
184
       endDate: this.customChangeDateComponent.endDate || undefined,
224
       endDate: this.customChangeDateComponent.endDate || undefined,
185
       hosId: this.getHosId,
225
       hosId: this.getHosId,
186
       deptId: this.fieldConfig.fields.deptId || undefined,
226
       deptId: this.fieldConfig.fields.deptId || undefined,
187
-      taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
227
+			groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
228
+			userId: this.fieldConfig.fields.userId || undefined,
229
+			taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
230
+			buildingId: this.fieldConfig.fields.buildingId || undefined,
188
     	sourceId: this.fieldConfig.fields.sourceId || undefined,
231
     	sourceId: this.fieldConfig.fields.sourceId || undefined,
189
     	minutesClose: this.fieldConfig.fields.minuteClose || undefined,
232
     	minutesClose: this.fieldConfig.fields.minuteClose || undefined,
190
     	specialCloseFlag: this.fieldConfig.fields.specialId || undefined,
233
     	specialCloseFlag: this.fieldConfig.fields.specialId || undefined,
191
     	timeout: this.fieldConfig.fields.overtimeId || undefined,
234
     	timeout: this.fieldConfig.fields.overtimeId || undefined,
192
     	abnormityType: this.fieldConfig.fields.abnormalId || undefined,
235
     	abnormityType: this.fieldConfig.fields.abnormalId || undefined,
193
     	workOrderEvaluationId: this.fieldConfig.fields.evaluateId || undefined,
236
     	workOrderEvaluationId: this.fieldConfig.fields.evaluateId || undefined,
194
-    	userId: this.fieldConfig.fields.executeUserId || undefined,
195
     	hour: this.fieldConfig.fields.timeFrameId || undefined,
237
     	hour: this.fieldConfig.fields.timeFrameId || undefined,
196
     	gdCode: this.fieldConfig.fields.codeNum || undefined
238
     	gdCode: this.fieldConfig.fields.codeNum || undefined
197
     };
239
     };
@@ -227,6 +269,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
227
     this.statisticsTypeId = undefined;
269
     this.statisticsTypeId = undefined;
228
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined};
270
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined};
229
     this.customChangeDateComponent.resetByDate();
271
     this.customChangeDateComponent.resetByDate();
272
+		sessionStorage.removeItem('distributionData');
230
     this.search();
273
     this.search();
231
 		this.onResize(0);
274
 		this.onResize(0);
232
   }
275
   }
@@ -272,8 +315,8 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
272
 
315
 
273
   // 详细搜索
316
   // 详细搜索
274
   fieldConfig:any = {
317
   fieldConfig:any = {
275
-		fields: { deptId: undefined, taskTypeId: undefined, sourceId: undefined, minuteId: undefined, specialId: undefined, overtimeId: undefined, abnormalId: undefined, evaluateId: undefined, executeUserId: undefined, codeNum: undefined, timeFrameId: undefined},
276
-		config: { dept: true, taskType: true, source: true, minute: true, special: true, overtime: true, abnormal: true, evaluate: true, executeUser:true, code: true, timeFrame: true},
318
+		fields: { deptId: undefined, taskTypeId: undefined, sourceId: undefined, minuteId: undefined, specialId: undefined, overtimeId: undefined, abnormalId: undefined, evaluateId: undefined, codeNum: undefined, timeFrameId: undefined, groupId: undefined, userId: undefined, buildingId: undefined},
319
+		config: { dept: true, taskType: true, source: true, minute: true, special: true, overtime: true, abnormal: true, evaluate: true, code: true, timeFrame: true, groupAndUser: true, building: true},
277
   }
320
   }
278
   showSearchMore:boolean = false;
321
   showSearchMore:boolean = false;
279
   showMore(){
322
   showMore(){

+ 6 - 6
src/app/views/new-statistics/distribution-inspection-statistics/taskType-quality-control-statistics/taskType-quality-control-statistics.component.html

@@ -44,30 +44,30 @@
44
   <tbody>
44
   <tbody>
45
     <tr *ngFor="let data of listOfData">
45
     <tr *ngFor="let data of listOfData">
46
       <td>{{ data.taskName }}</td>
46
       <td>{{ data.taskName }}</td>
47
-      <td>{{ data.totalCount }}</td>
47
+      <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
48
       <td>{{ data.totalGrade }}</td>
48
       <td>{{ data.totalGrade }}</td>
49
       <td>{{ data.response_time_num }}</td>
49
       <td>{{ data.response_time_num }}</td>
50
       <td>{{ data.arrive_time_num }}</td>
50
       <td>{{ data.arrive_time_num }}</td>
51
       <td>{{ data.execution_time_num }}</td>
51
       <td>{{ data.execution_time_num }}</td>
52
       <td>{{ data.aveper }}</td>
52
       <td>{{ data.aveper }}</td>
53
       <td>{{ data.total_time }}</td>
53
       <td>{{ data.total_time }}</td>
54
-      <td>{{ data.five_count }}</td>
55
-      <td>{{ data.special_close }}</td>
54
+      <td class="text-sign" (click)="viewDetail2(data)">{{ data.five_count }}</td>
55
+      <td class="text-sign" (click)="viewDetail3(data)">{{ data.special_close }}</td>
56
     </tr>
56
     </tr>
57
   </tbody>
57
   </tbody>
58
   <ng-template #footerTpl>
58
   <ng-template #footerTpl>
59
     <table class="footTable">
59
     <table class="footTable">
60
       <tr *ngFor="let data of listOfDataEnd">
60
       <tr *ngFor="let data of listOfDataEnd">
61
         <td style="width: 10%">{{ data.taskName }}</td>
61
         <td style="width: 10%">{{ data.taskName }}</td>
62
-        <td style="width: 10%">{{ data.totalCount }}</td>
62
+        <td style="width: 10%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.totalCount }}</td>
63
         <td style="width: 10%">{{ data.totalGrade }}</td>
63
         <td style="width: 10%">{{ data.totalGrade }}</td>
64
         <td style="width: 10%">{{ data.response_time_num }}</td>
64
         <td style="width: 10%">{{ data.response_time_num }}</td>
65
         <td style="width: 10%">{{ data.arrive_time_num }}</td>
65
         <td style="width: 10%">{{ data.arrive_time_num }}</td>
66
         <td style="width: 10%">{{ data.execution_time_num }}</td>
66
         <td style="width: 10%">{{ data.execution_time_num }}</td>
67
         <td style="width: 10%">{{ data.aveper }}</td>
67
         <td style="width: 10%">{{ data.aveper }}</td>
68
         <td style="width: 10%">{{ data.total_time }}</td>
68
         <td style="width: 10%">{{ data.total_time }}</td>
69
-        <td style="width: 10%">{{ data.five_count }}</td>
70
-        <td style="width: 10%">{{ data.special_close }}</td>
69
+        <td style="width: 10%" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.five_count }}</td>
70
+        <td style="width: 10%" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.special_close }}</td>
71
       </tr>
71
       </tr>
72
     </table>
72
     </table>
73
   </ng-template>
73
   </ng-template>

+ 4 - 0
src/app/views/new-statistics/distribution-inspection-statistics/taskType-quality-control-statistics/taskType-quality-control-statistics.component.less

@@ -5,6 +5,10 @@
5
   right: 0;
5
   right: 0;
6
   bottom: 0;
6
   bottom: 0;
7
   left: 0;
7
   left: 0;
8
+	.text-sign{
9
+		text-decoration: underline;
10
+		cursor: pointer;
11
+	}
8
   ::ng-deep .ant-table-footer{
12
   ::ng-deep .ant-table-footer{
9
     padding: 16px 0;
13
     padding: 16px 0;
10
     width: calc(100% - 15px);
14
     width: calc(100% - 15px);

+ 242 - 2
src/app/views/new-statistics/distribution-inspection-statistics/taskType-quality-control-statistics/taskType-quality-control-statistics.component.ts

@@ -4,7 +4,7 @@ import { Subject } from 'rxjs';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
4
 import { NzMessageService } from 'ng-zorro-antd/message';
5
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
5
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } 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, Router } from '@angular/router';
8
 import { ToolService } from "../../../../services/tool.service";
8
 import { ToolService } from "../../../../services/tool.service";
9
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
9
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
10
 @Component({
10
 @Component({
@@ -18,6 +18,7 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
18
     private mainService: MainService,
18
     private mainService: MainService,
19
     private message: NzMessageService,
19
     private message: NzMessageService,
20
     private route: ActivatedRoute,
20
     private route: ActivatedRoute,
21
+		private router: Router,
21
     private tabService: TabService,
22
     private tabService: TabService,
22
 		private tool: ToolService,
23
 		private tool: ToolService,
23
   ) {}
24
   ) {}
@@ -56,7 +57,246 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
56
 
57
 
57
     }, 0)
58
     }, 0)
58
   }
59
   }
59
-
60
+	
61
+	// 数据下钻
62
+	viewDetail1(data, type){
63
+		let query = null
64
+		let item = null
65
+		if(this.taskTypeId){
66
+			item = this.taskTypeList.find(i => i.id == this.taskTypeId)
67
+		}
68
+		if(type=='all'){
69
+			query = {
70
+				startDate: this.customChangeDateComponent.startDate || undefined,
71
+				endDate: this.customChangeDateComponent.endDate || undefined,
72
+				searchQuery:{
73
+					statusValue: 'close',
74
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
75
+					deptId: this.fieldConfig.fields.deptId || undefined,
76
+					taskTypeId: this.taskTypeId || undefined,
77
+					taskTypeDTO: item,
78
+					groupId: this.fieldConfig.fields.groupId || undefined,
79
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
80
+					userId: this.fieldConfig.fields.userId || undefined,
81
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
82
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
83
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
84
+				}
85
+			}
86
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
87
+			let flag = this.tabService.tabs.some(v => v.path === path);
88
+			flag && this.tabService.deleteRouteSnapshot(path);
89
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
90
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
91
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
92
+			this.router.navigate([path], { replaceUrl: true });
93
+		}else{
94
+			let arr = data.taskName.split('-');
95
+			let postData = {
96
+			  idx: 0,
97
+			  sum: 10,
98
+			  taskType: {
99
+			    taskName: arr[arr.length-1],
100
+			  },
101
+			};
102
+			this.mainService
103
+			  .getFetchDataList("configuration", "taskType", postData)
104
+			  .subscribe((res) => {
105
+			    if (res.status == 200) {
106
+						let item = res.list.find(i =>i.id == data.taskTypeId)
107
+			      query = {
108
+			      	startDate: this.customChangeDateComponent.startDate || undefined,
109
+			      	endDate: this.customChangeDateComponent.endDate || undefined,
110
+			      	searchQuery:{
111
+			      		statusValue: 'close',
112
+			      		deptDTO: this.fieldConfig.fields.deptDTO || undefined,
113
+			      		deptId: this.fieldConfig.fields.deptId || undefined,
114
+			      		taskTypeId: data.taskTypeId || undefined,
115
+			      		taskTypeDTO: item,
116
+			      		groupId: this.fieldConfig.fields.groupId || undefined,
117
+			      		groupDTO: this.fieldConfig.fields.groupDTO || undefined,
118
+			      		userId: this.fieldConfig.fields.userId || undefined,
119
+			      		userDTO: this.fieldConfig.fields.userDTO || undefined,
120
+			      		buildingId: this.fieldConfig.fields.buildingId || undefined,
121
+			      		buildingDTO: this.fieldConfig.fields.buildingDTO || undefined
122
+			      	}
123
+			      }
124
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
125
+						let flag = this.tabService.tabs.some(v => v.path === path);
126
+						flag && this.tabService.deleteRouteSnapshot(path);
127
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
128
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
129
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
130
+						this.router.navigate([path], { replaceUrl: true });
131
+			    }
132
+			  });
133
+		}
134
+	}
135
+	
136
+	viewDetail2(data, type){
137
+		let query = null
138
+		let item = null
139
+		if(this.taskTypeId){
140
+			item = this.taskTypeList.find(i => i.id == this.taskTypeId)
141
+		}
142
+		if(type=='all'){
143
+			query = {
144
+				startDate: this.customChangeDateComponent.startDate || undefined,
145
+				endDate: this.customChangeDateComponent.endDate || undefined,
146
+				taskTypeId: this.taskTypeId || undefined,
147
+				searchQuery:{
148
+					statusValue: 'close',
149
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
150
+					deptId: this.fieldConfig.fields.deptId || undefined,
151
+					taskTypeId: this.taskTypeId || undefined,
152
+					taskTypeDTO: item,
153
+					groupId: this.fieldConfig.fields.groupId || undefined,
154
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
155
+					userId: this.fieldConfig.fields.userId || undefined,
156
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
157
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
158
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
159
+					minuteClose: 5,
160
+					minuteDTO: 5,
161
+				}
162
+			}
163
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
164
+			let flag = this.tabService.tabs.some(v => v.path === path);
165
+			flag && this.tabService.deleteRouteSnapshot(path);
166
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
167
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
168
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
169
+			this.router.navigate([path], { replaceUrl: true });
170
+		}else{
171
+			let arr = data.taskName.split('-');
172
+			let postData = {
173
+			  idx: 0,
174
+			  sum: 10,
175
+			  taskType: {
176
+			    taskName: arr[arr.length-1],
177
+			  }
178
+			};
179
+			this.mainService
180
+				.getFetchDataList("configuration", "taskType", postData)
181
+				.subscribe((res) => {
182
+					if (res.status == 200) {
183
+						let item = res.list.find(i =>i.id == data.taskTypeId)
184
+						query = {
185
+							startDate: this.customChangeDateComponent.startDate || undefined,
186
+							endDate: this.customChangeDateComponent.endDate || undefined,
187
+							searchQuery:{
188
+								statusValue: 'close',
189
+								deptDTO: this.fieldConfig.fields.deptDTO || undefined,
190
+								deptId: this.fieldConfig.fields.deptId || undefined,
191
+								taskTypeId: data.taskTypeId || undefined,
192
+								taskTypeDTO: item,
193
+								groupId: this.fieldConfig.fields.groupId || undefined,
194
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
195
+								userId: this.fieldConfig.fields.userId || undefined,
196
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
197
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
198
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
199
+								minuteClose: 5,
200
+								minuteDTO: 5
201
+							}
202
+						}
203
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
204
+						let flag = this.tabService.tabs.some(v => v.path === path);
205
+						flag && this.tabService.deleteRouteSnapshot(path);
206
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
207
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
208
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
209
+						this.router.navigate([path], { replaceUrl: true });
210
+					}
211
+				});
212
+		}
213
+	}
214
+	
215
+	viewDetail3(data, type){
216
+		let query = null
217
+		let item = null
218
+		if(this.taskTypeId){
219
+			item = this.taskTypeList.find(i => i.id == this.taskTypeId)
220
+		}
221
+		if(type=='all'){
222
+			query = {
223
+				startDate: this.customChangeDateComponent.startDate || undefined,
224
+				endDate: this.customChangeDateComponent.endDate || undefined,
225
+				taskTypeId: this.taskTypeId || undefined,
226
+				searchQuery:{
227
+					statusValue: 'close',
228
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
229
+					deptId: this.fieldConfig.fields.deptId || undefined,
230
+					taskTypeId: this.taskTypeId || undefined,
231
+					taskTypeDTO: item,
232
+					groupId: this.fieldConfig.fields.groupId || undefined,
233
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
234
+					userId: this.fieldConfig.fields.userId || undefined,
235
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
236
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
237
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
238
+					specialId: 1,
239
+					specialDTO: {
240
+						"name": "是",
241
+						"id": 1
242
+					},
243
+				}
244
+			}
245
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
246
+			let flag = this.tabService.tabs.some(v => v.path === path);
247
+			flag && this.tabService.deleteRouteSnapshot(path);
248
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
249
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
250
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
251
+			this.router.navigate([path], { replaceUrl: true });
252
+		}else{
253
+			let arr = data.taskName.split('-');
254
+			let postData = {
255
+			  idx: 0,
256
+			  sum: 10,
257
+			  taskType: {
258
+			    taskName: arr[arr.length-1],
259
+			  },
260
+			};
261
+			this.mainService
262
+				.getFetchDataList("configuration", "taskType", postData)
263
+				.subscribe((res) => {
264
+					if (res.status == 200) {
265
+						let item = res.list.find(i =>i.id == data.taskTypeId)
266
+						query = {
267
+							startDate: this.customChangeDateComponent.startDate || undefined,
268
+							endDate: this.customChangeDateComponent.endDate || undefined,
269
+							searchQuery:{
270
+								statusValue: 'close',
271
+								deptDTO: this.fieldConfig.fields.deptDTO || undefined,
272
+								deptId: this.fieldConfig.fields.deptId || undefined,
273
+								taskTypeId: data.taskTypeId || undefined,
274
+								taskTypeDTO: item,
275
+								groupId: this.fieldConfig.fields.groupId || undefined,
276
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
277
+								userId: this.fieldConfig.fields.userId || undefined,
278
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
279
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
280
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
281
+								specialId: 1,
282
+								specialDTO: {
283
+									"name": "是",
284
+									"id": 1
285
+								}
286
+							}
287
+						}
288
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
289
+						let flag = this.tabService.tabs.some(v => v.path === path);
290
+						flag && this.tabService.deleteRouteSnapshot(path);
291
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
292
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
293
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
294
+						this.router.navigate([path], { replaceUrl: true });
295
+					}
296
+				});
297
+		}
298
+	}
299
+	
60
   getQueryParams(){
300
   getQueryParams(){
61
     let queryParams = this.tabService.getQueryParams();
301
     let queryParams = this.tabService.getQueryParams();
62
     this.tabService.clearQueryParams();
302
     this.tabService.clearQueryParams();

+ 104 - 9
src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.ts

@@ -28,6 +28,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
28
   ngOnInit() {}
28
   ngOnInit() {}
29
 
29
 
30
   ngAfterViewInit(){
30
   ngAfterViewInit(){
31
+		this.getCategory1List();
31
     this.initSessionData();
32
     this.initSessionData();
32
     this.getQueryParams();
33
     this.getQueryParams();
33
     setTimeout(() => {
34
     setTimeout(() => {
@@ -48,6 +49,10 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
48
 	// 数据下钻
49
 	// 数据下钻
49
 	viewDetail1(data, type){
50
 	viewDetail1(data, type){
50
 		let query = null
51
 		let query = null
52
+		let item = null;
53
+		if(data.categoryId){
54
+		  item = this.category1List.find(item => item.id == data.categoryId);
55
+		}
51
 		if(type=='all'){
56
 		if(type=='all'){
52
 			query = {
57
 			query = {
53
 				startDate: this.customChangeDateComponent.startDate || undefined,
58
 				startDate: this.customChangeDateComponent.startDate || undefined,
@@ -88,17 +93,27 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
88
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
93
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
89
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
94
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
90
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
95
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
96
+					category1DTO: item || undefined,
91
 				}
97
 				}
92
 			}
98
 			}
93
 		}
99
 		}
94
 
100
 
95
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
96
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
101
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
102
+		let flag = this.tabService.tabs.some(v => v.path === path);
103
+		flag && this.tabService.deleteRouteSnapshot(path);
104
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
105
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
106
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
107
+		this.router.navigate([path], { replaceUrl: true });
97
 	}
108
 	}
98
 	
109
 	
99
 	// 数据下钻
110
 	// 数据下钻
100
 	viewDetail2(data, type){
111
 	viewDetail2(data, type){
101
 		let query = null
112
 		let query = null
113
+		let item = null;
114
+		if(data.categoryId){
115
+		  item = this.category1List.find(item => item.id == data.categoryId);
116
+		}
102
 		if(type=='all'){
117
 		if(type=='all'){
103
 			query = {
118
 			query = {
104
 				startDate: this.customChangeDateComponent.startDate || undefined,
119
 				startDate: this.customChangeDateComponent.startDate || undefined,
@@ -118,6 +133,10 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
118
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
133
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
119
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
134
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
120
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
135
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
136
+					overtimeDTO:{
137
+						id: 1,
138
+						name: "是"
139
+					},
121
 				}
140
 				}
122
 			}
141
 			}
123
 		}else{
142
 		}else{
@@ -141,17 +160,31 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
141
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
160
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
142
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
161
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
143
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
162
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
163
+					overtimeDTO:{
164
+						id: 1,
165
+						name: "是"
166
+					},
167
+					category1DTO: item || undefined,
144
 				}
168
 				}
145
 			}
169
 			}
146
 		}
170
 		}
147
 
171
 
148
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
149
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
172
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
173
+		let flag = this.tabService.tabs.some(v => v.path === path);
174
+		flag && this.tabService.deleteRouteSnapshot(path);
175
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
176
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
177
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
178
+		this.router.navigate([path], { replaceUrl: true });
150
 	}
179
 	}
151
 	
180
 	
152
 	// 数据下钻
181
 	// 数据下钻
153
 	viewDetail3(data, type){
182
 	viewDetail3(data, type){
154
 		let query = null
183
 		let query = null
184
+		let item = null;
185
+		if(data.categoryId){
186
+		  item = this.category1List.find(item => item.id == data.categoryId);
187
+		}
155
 		if(type=='all'){
188
 		if(type=='all'){
156
 			query = {
189
 			query = {
157
 				startDate: this.customChangeDateComponent.startDate || undefined,
190
 				startDate: this.customChangeDateComponent.startDate || undefined,
@@ -171,6 +204,10 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
171
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
204
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
172
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
205
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
173
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
206
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
207
+					isHangDTO: {
208
+						id: 1,
209
+						name: "是"
210
+					},
174
 				}
211
 				}
175
 			}
212
 			}
176
 		}else{
213
 		}else{
@@ -194,17 +231,31 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
194
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
231
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
195
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
232
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
196
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
233
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
234
+					isHangDTO: {
235
+						id: 1,
236
+						name: "是"
237
+					},
238
+					category1DTO: item || undefined,
197
 				}
239
 				}
198
 			}
240
 			}
199
 		}
241
 		}
200
 
242
 
201
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
202
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
243
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
244
+		let flag = this.tabService.tabs.some(v => v.path === path);
245
+		flag && this.tabService.deleteRouteSnapshot(path);
246
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
247
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
248
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
249
+		this.router.navigate([path], { replaceUrl: true });
203
 	}
250
 	}
204
 	
251
 	
205
 	// 数据下钻
252
 	// 数据下钻
206
 	viewDetail4(data, type){
253
 	viewDetail4(data, type){
207
 		let query = null
254
 		let query = null
255
+		let item = null;
256
+		if(data.categoryId){
257
+		  item = this.category1List.find(item => item.id == data.categoryId);
258
+		}
208
 		if(type=='all'){
259
 		if(type=='all'){
209
 			query = {
260
 			query = {
210
 				startDate: this.customChangeDateComponent.startDate || undefined,
261
 				startDate: this.customChangeDateComponent.startDate || undefined,
@@ -224,6 +275,15 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
224
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
275
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
225
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
276
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
226
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
277
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
278
+					evaluateDTO: {
279
+							"id": 20424,
280
+							"key": "incident_degree",
281
+							"name": "不满意",
282
+							"value": "1",
283
+							"orders": 5,
284
+							"extra1": "",
285
+							"extra2": ""
286
+					},
227
 				}
287
 				}
228
 			}
288
 			}
229
 		}else{
289
 		}else{
@@ -247,12 +307,27 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
247
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
307
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
248
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
308
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
249
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
309
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
310
+					evaluateDTO: {
311
+							"id": 20424,
312
+							"key": "incident_degree",
313
+							"name": "不满意",
314
+							"value": "1",
315
+							"orders": 5,
316
+							"extra1": "",
317
+							"extra2": ""
318
+					},
319
+					category1DTO: item || undefined,
250
 				}
320
 				}
251
 			}
321
 			}
252
 		}
322
 		}
253
 		
323
 		
254
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
255
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
324
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
325
+		let flag = this.tabService.tabs.some(v => v.path === path);
326
+		flag && this.tabService.deleteRouteSnapshot(path);
327
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
328
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
329
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
330
+		this.router.navigate([path], { replaceUrl: true });
256
 	}
331
 	}
257
 	
332
 	
258
   getQueryParams(){
333
   getQueryParams(){
@@ -307,7 +382,27 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
307
   get getHosId(){
382
   get getHosId(){
308
     return this.parentDutyId || this.dutyId || this.hosId;
383
     return this.parentDutyId || this.dutyId || this.hosId;
309
   }
384
   }
310
-
385
+	
386
+	// 获取一级分类列表
387
+	category1List:any[] = [];
388
+	getCategory1List(keyword?) {
389
+	  let data = {
390
+	    category: {
391
+	      category: keyword,
392
+	      selectType: 'mutlQuery',
393
+	      statisticalHosId: this.getHosId,
394
+	      hierarchy: 1,
395
+	    },
396
+	  };
397
+	  this.isLoading = true;
398
+	  this.mainService
399
+	    .incidentPost("listIncidentCategory", data)
400
+	    .subscribe((data) => {
401
+	      this.isLoading = false;
402
+	      this.category1List = data.data;
403
+	    });
404
+	}
405
+	
311
   // 表格数据
406
   // 表格数据
312
   loading1 = false;
407
   loading1 = false;
313
   getList(num?: number, field?: string, sort?: string) {
408
   getList(num?: number, field?: string, sort?: string) {

+ 589 - 99
src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.ts

@@ -89,36 +89,143 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
89
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
89
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
90
 					category1DTO: item1 || undefined,
90
 					category1DTO: item1 || undefined,
91
 					category2DTO: item2 || undefined,
91
 					category2DTO: item2 || undefined,
92
+					category3DTO:{
93
+						category: data.category,
94
+						id: data.categoryId,
95
+					}
92
 				}
96
 				}
93
 			}
97
 			}
98
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
99
+			let flag = this.tabService.tabs.some(v => v.path === path);
100
+			flag && this.tabService.deleteRouteSnapshot(path);
101
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
102
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
103
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
104
+			this.router.navigate([path], { replaceUrl: true });
94
 		}else{
105
 		}else{
95
-			query = {
96
-				startDate: this.customChangeDateComponent.startDate || undefined,
97
-				endDate: this.customChangeDateComponent.endDate || undefined,
98
-				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
99
-				searchQuery:{
100
-					statusValue: 'close',
101
-					hierarchy: data.hierarchy,
102
-					categoryId: data.categoryId,
103
-					groupId: this.fieldConfig.fields.groupId || undefined,
104
-					userId: this.fieldConfig.fields.userId || undefined,
105
-					buildingId: this.fieldConfig.fields.buildingId || undefined,
106
-					placeId: this.fieldConfig.fields.floorId || undefined,
107
-					floorId: this.fieldConfig.fields.floorId || undefined,
108
-					companyId: this.fieldConfig.fields.companyId || undefined,
109
-					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
110
-					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
111
-					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
112
-					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
113
-					userDTO: this.fieldConfig.fields.userDTO || undefined,
114
-					category1DTO: item1 || undefined,
115
-					category2DTO: item2 || undefined,
106
+			let category1 = null
107
+			let category2 = null
108
+			if(!item1 && !item2){
109
+				this.mainService
110
+				  .getFetchData("simple/data", "incidentCategory", data.categoryId)
111
+				  .subscribe((res) => {
112
+						category2 = res.data.parent;
113
+						category1 = res.data.parent.parent;
114
+						query = {
115
+							startDate: this.customChangeDateComponent.startDate || undefined,
116
+							endDate: this.customChangeDateComponent.endDate || undefined,
117
+							repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
118
+							searchQuery:{
119
+								statusValue: 'close',
120
+								hierarchy: data.hierarchy,
121
+								categoryId: data.categoryId,
122
+								groupId: this.fieldConfig.fields.groupId || undefined,
123
+								userId: this.fieldConfig.fields.userId || undefined,
124
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
125
+								placeId: this.fieldConfig.fields.floorId || undefined,
126
+								floorId: this.fieldConfig.fields.floorId || undefined,
127
+								companyId: this.fieldConfig.fields.companyId || undefined,
128
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
129
+								companyDTO: this.fieldConfig.fields.companyDTO || undefined,
130
+								floorDTO: this.fieldConfig.fields.floorDTO || undefined,
131
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
132
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
133
+								category1DTO: category1 || undefined,
134
+								category2DTO: category2 || undefined,
135
+								category3DTO:{
136
+									category: data.category,
137
+									id: data.categoryId,
138
+								}
139
+							}
140
+						}
141
+						let path = '/newStatistics/maintenanceStatistics/incidentList'
142
+						let flag = this.tabService.tabs.some(v => v.path === path);
143
+						flag && this.tabService.deleteRouteSnapshot(path);
144
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
145
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
146
+						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
147
+						this.router.navigate([path], { replaceUrl: true });
148
+				});	
149
+			}else if(item1){
150
+				let category1 = null
151
+				let category2 = null
152
+				this.mainService
153
+				  .getFetchData("simple/data", "incidentCategory", data.categoryId)
154
+				  .subscribe((res) => {
155
+						category2 = res.data.parent;
156
+						category1 = res.data.parent.parent;
157
+						query = {
158
+							startDate: this.customChangeDateComponent.startDate || undefined,
159
+							endDate: this.customChangeDateComponent.endDate || undefined,
160
+							repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
161
+							searchQuery:{
162
+								statusValue: 'close',
163
+								hierarchy: data.hierarchy,
164
+								categoryId: data.categoryId,
165
+								groupId: this.fieldConfig.fields.groupId || undefined,
166
+								userId: this.fieldConfig.fields.userId || undefined,
167
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
168
+								placeId: this.fieldConfig.fields.floorId || undefined,
169
+								floorId: this.fieldConfig.fields.floorId || undefined,
170
+								companyId: this.fieldConfig.fields.companyId || undefined,
171
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
172
+								companyDTO: this.fieldConfig.fields.companyDTO || undefined,
173
+								floorDTO: this.fieldConfig.fields.floorDTO || undefined,
174
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
175
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
176
+								category1DTO: category1 || undefined,
177
+								category2DTO: category2 || undefined,
178
+								category3DTO: {
179
+									category: data.category,
180
+									id: data.categoryId,
181
+								},
182
+							}
183
+						}
184
+						let path = '/newStatistics/maintenanceStatistics/incidentList'
185
+						let flag = this.tabService.tabs.some(v => v.path === path);
186
+						flag && this.tabService.deleteRouteSnapshot(path);
187
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
188
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
189
+						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
190
+						this.router.navigate([path], { replaceUrl: true });
191
+				});	
192
+			}else{
193
+				query = {
194
+					startDate: this.customChangeDateComponent.startDate || undefined,
195
+					endDate: this.customChangeDateComponent.endDate || undefined,
196
+					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
197
+					searchQuery:{
198
+						statusValue: 'close',
199
+						hierarchy: data.hierarchy,
200
+						categoryId: data.categoryId,
201
+						groupId: this.fieldConfig.fields.groupId || undefined,
202
+						userId: this.fieldConfig.fields.userId || undefined,
203
+						buildingId: this.fieldConfig.fields.buildingId || undefined,
204
+						placeId: this.fieldConfig.fields.floorId || undefined,
205
+						floorId: this.fieldConfig.fields.floorId || undefined,
206
+						companyId: this.fieldConfig.fields.companyId || undefined,
207
+						buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
208
+						companyDTO: this.fieldConfig.fields.companyDTO || undefined,
209
+						floorDTO: this.fieldConfig.fields.floorDTO || undefined,
210
+						groupDTO: this.fieldConfig.fields.groupDTO || undefined,
211
+						userDTO: this.fieldConfig.fields.userDTO || undefined,
212
+						category1DTO: item1 || undefined,
213
+						category2DTO: item2 || undefined,
214
+						category3DTO:{
215
+							category: data.category,
216
+							id: data.categoryId,
217
+						}
218
+					}
116
 				}
219
 				}
220
+				let path = '/newStatistics/maintenanceStatistics/incidentList'
221
+				let flag = this.tabService.tabs.some(v => v.path === path);
222
+				flag && this.tabService.deleteRouteSnapshot(path);
223
+				this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
224
+				this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
225
+				sessionStorage.setItem('maintenanceData', JSON.stringify(query))
226
+				this.router.navigate([path], { replaceUrl: true });
117
 			}
227
 			}
118
 		}
228
 		}
119
-		
120
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
121
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
122
 	}
229
 	}
123
 	
230
 	
124
 	// 数据下钻
231
 	// 数据下钻
@@ -155,37 +262,158 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
155
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
262
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
156
 					category1DTO: item1 || undefined,
263
 					category1DTO: item1 || undefined,
157
 					category2DTO: item2 || undefined,
264
 					category2DTO: item2 || undefined,
265
+					overtimeDTO:{
266
+						id: 1,
267
+						name: "是"
268
+					},
158
 				}
269
 				}
159
 			}
270
 			}
271
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
272
+			let flag = this.tabService.tabs.some(v => v.path === path);
273
+			flag && this.tabService.deleteRouteSnapshot(path);
274
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
275
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
276
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
277
+			this.router.navigate([path], { replaceUrl: true });
160
 		}else{
278
 		}else{
161
-			query = {
162
-				startDate: this.customChangeDateComponent.startDate || undefined,
163
-				endDate: this.customChangeDateComponent.endDate || undefined,
164
-				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
165
-				searchQuery:{
166
-					statusValue: 'close',
167
-					hierarchy: data.hierarchy,
168
-					categoryId: data.categoryId,
169
-					overtimeId: 1,
170
-					groupId: this.fieldConfig.fields.groupId || undefined,
171
-					userId: this.fieldConfig.fields.userId || undefined,
172
-					buildingId: this.fieldConfig.fields.buildingId || undefined,
173
-					placeId: this.fieldConfig.fields.floorId || undefined,
174
-					floorId: this.fieldConfig.fields.floorId || undefined,
175
-					companyId: this.fieldConfig.fields.companyId || undefined,
176
-					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
177
-					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
178
-					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
179
-					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
180
-					userDTO: this.fieldConfig.fields.userDTO || undefined,
181
-					category1DTO: item1 || undefined,
182
-					category2DTO: item2 || undefined,
279
+			let category1 = null
280
+			let category2 = null
281
+			if(!item1 && !item2){
282
+				this.mainService
283
+				  .getFetchData("simple/data", "incidentCategory", data.categoryId)
284
+				  .subscribe((res) => {
285
+						category2 = res.data.parent;
286
+						category1 = res.data.parent.parent;
287
+						query = {
288
+							startDate: this.customChangeDateComponent.startDate || undefined,
289
+							endDate: this.customChangeDateComponent.endDate || undefined,
290
+							repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
291
+							searchQuery:{
292
+								statusValue: 'close',
293
+								hierarchy: data.hierarchy,
294
+								categoryId: data.categoryId,
295
+								overtimeId: 1,
296
+								groupId: this.fieldConfig.fields.groupId || undefined,
297
+								userId: this.fieldConfig.fields.userId || undefined,
298
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
299
+								placeId: this.fieldConfig.fields.floorId || undefined,
300
+								floorId: this.fieldConfig.fields.floorId || undefined,
301
+								companyId: this.fieldConfig.fields.companyId || undefined,
302
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
303
+								companyDTO: this.fieldConfig.fields.companyDTO || undefined,
304
+								floorDTO: this.fieldConfig.fields.floorDTO || undefined,
305
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
306
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
307
+								category1DTO: category1 || undefined,
308
+								category2DTO: category2 || undefined,
309
+								category3DTO:{
310
+									category: data.category,
311
+									id: data.categoryId,
312
+								},
313
+								overtimeDTO:{
314
+									id: 1,
315
+									name: "是"
316
+								},
317
+							}
318
+						}
319
+						let path = '/newStatistics/maintenanceStatistics/incidentList'
320
+						let flag = this.tabService.tabs.some(v => v.path === path);
321
+						flag && this.tabService.deleteRouteSnapshot(path);
322
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
323
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
324
+						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
325
+						this.router.navigate([path], { replaceUrl: true });
326
+				});	
327
+			}else if(item1){
328
+				let category1 = null
329
+				let category2 = null
330
+				this.mainService
331
+				  .getFetchData("simple/data", "incidentCategory", data.categoryId)
332
+				  .subscribe((res) => {
333
+						category2 = res.data.parent;
334
+						category1 = res.data.parent.parent;
335
+						query = {
336
+							startDate: this.customChangeDateComponent.startDate || undefined,
337
+							endDate: this.customChangeDateComponent.endDate || undefined,
338
+							repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
339
+							searchQuery:{
340
+								statusValue: 'close',
341
+								hierarchy: data.hierarchy,
342
+								categoryId: data.categoryId,
343
+								overtimeId: 1,
344
+								groupId: this.fieldConfig.fields.groupId || undefined,
345
+								userId: this.fieldConfig.fields.userId || undefined,
346
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
347
+								placeId: this.fieldConfig.fields.floorId || undefined,
348
+								floorId: this.fieldConfig.fields.floorId || undefined,
349
+								companyId: this.fieldConfig.fields.companyId || undefined,
350
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
351
+								companyDTO: this.fieldConfig.fields.companyDTO || undefined,
352
+								floorDTO: this.fieldConfig.fields.floorDTO || undefined,
353
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
354
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
355
+								category1DTO: category1 || undefined,
356
+								category2DTO: category2 || undefined,
357
+								category3DTO: {
358
+									category: data.category,
359
+									id: data.categoryId,
360
+								},
361
+								overtimeDTO:{
362
+									id: 1,
363
+									name: "是"
364
+								},
365
+							}
366
+						}
367
+						let path = '/newStatistics/maintenanceStatistics/incidentList'
368
+						let flag = this.tabService.tabs.some(v => v.path === path);
369
+						flag && this.tabService.deleteRouteSnapshot(path);
370
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
371
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
372
+						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
373
+						this.router.navigate([path], { replaceUrl: true });
374
+				});	
375
+			}else{
376
+				query = {
377
+					startDate: this.customChangeDateComponent.startDate || undefined,
378
+					endDate: this.customChangeDateComponent.endDate || undefined,
379
+					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
380
+					searchQuery:{
381
+						statusValue: 'close',
382
+						hierarchy: data.hierarchy,
383
+						categoryId: data.categoryId,
384
+						overtimeId: 1,
385
+						groupId: this.fieldConfig.fields.groupId || undefined,
386
+						userId: this.fieldConfig.fields.userId || undefined,
387
+						buildingId: this.fieldConfig.fields.buildingId || undefined,
388
+						placeId: this.fieldConfig.fields.floorId || undefined,
389
+						floorId: this.fieldConfig.fields.floorId || undefined,
390
+						companyId: this.fieldConfig.fields.companyId || undefined,
391
+						buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
392
+						companyDTO: this.fieldConfig.fields.companyDTO || undefined,
393
+						floorDTO: this.fieldConfig.fields.floorDTO || undefined,
394
+						groupDTO: this.fieldConfig.fields.groupDTO || undefined,
395
+						userDTO: this.fieldConfig.fields.userDTO || undefined,
396
+						category1DTO: item1 || undefined,
397
+						category2DTO: item2 || undefined,
398
+						category3DTO:{
399
+							category: data.category,
400
+							id: data.categoryId,
401
+						},
402
+						overtimeDTO:{
403
+							id: 1,
404
+							name: "是"
405
+						},
406
+					}
183
 				}
407
 				}
408
+				let path = '/newStatistics/maintenanceStatistics/incidentList'
409
+				let flag = this.tabService.tabs.some(v => v.path === path);
410
+				flag && this.tabService.deleteRouteSnapshot(path);
411
+				this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
412
+				this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
413
+				sessionStorage.setItem('maintenanceData', JSON.stringify(query))
414
+				this.router.navigate([path], { replaceUrl: true });
184
 			}
415
 			}
185
 		}
416
 		}
186
-
187
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
188
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
189
 	}
417
 	}
190
 	
418
 	
191
 	// 数据下钻
419
 	// 数据下钻
@@ -222,37 +450,158 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
222
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
450
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
223
 					category1DTO: item1 || undefined,
451
 					category1DTO: item1 || undefined,
224
 					category2DTO: item2 || undefined,
452
 					category2DTO: item2 || undefined,
453
+					isHangDTO:{
454
+						id: 1,
455
+						name: "是"
456
+					},
225
 				}
457
 				}
226
 			}
458
 			}
459
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
460
+			let flag = this.tabService.tabs.some(v => v.path === path);
461
+			flag && this.tabService.deleteRouteSnapshot(path);
462
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
463
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
464
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
465
+			this.router.navigate([path], { replaceUrl: true });
227
 		}else{
466
 		}else{
228
-			query = {
229
-				startDate: this.customChangeDateComponent.startDate || undefined,
230
-				endDate: this.customChangeDateComponent.endDate || undefined,
231
-				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
232
-				searchQuery:{
233
-					statusValue: 'close',
234
-					hierarchy: data.hierarchy,
235
-					categoryId: data.categoryId,
236
-					isHangId: 1,
237
-					groupId: this.fieldConfig.fields.groupId || undefined,
238
-					userId: this.fieldConfig.fields.userId || undefined,
239
-					buildingId: this.fieldConfig.fields.buildingId || undefined,
240
-					placeId: this.fieldConfig.fields.floorId || undefined,
241
-					floorId: this.fieldConfig.fields.floorId || undefined,
242
-					companyId: this.fieldConfig.fields.companyId || undefined,
243
-					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
244
-					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
245
-					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
246
-					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
247
-					userDTO: this.fieldConfig.fields.userDTO || undefined,
248
-					category1DTO: item1 || undefined,
249
-					category2DTO: item2 || undefined,
467
+			let category1 = null
468
+			let category2 = null
469
+			if(!item1 && !item2){
470
+				this.mainService
471
+				  .getFetchData("simple/data", "incidentCategory", data.categoryId)
472
+				  .subscribe((res) => {
473
+						category2 = res.data.parent;
474
+						category1 = res.data.parent.parent;
475
+						query = {
476
+							startDate: this.customChangeDateComponent.startDate || undefined,
477
+							endDate: this.customChangeDateComponent.endDate || undefined,
478
+							repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
479
+							searchQuery:{
480
+								statusValue: 'close',
481
+								hierarchy: data.hierarchy,
482
+								categoryId: data.categoryId,
483
+								isHangId: 1,
484
+								groupId: this.fieldConfig.fields.groupId || undefined,
485
+								userId: this.fieldConfig.fields.userId || undefined,
486
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
487
+								placeId: this.fieldConfig.fields.floorId || undefined,
488
+								floorId: this.fieldConfig.fields.floorId || undefined,
489
+								companyId: this.fieldConfig.fields.companyId || undefined,
490
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
491
+								companyDTO: this.fieldConfig.fields.companyDTO || undefined,
492
+								floorDTO: this.fieldConfig.fields.floorDTO || undefined,
493
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
494
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
495
+								category1DTO: category1 || undefined,
496
+								category2DTO: category2 || undefined,
497
+								category3DTO:{
498
+									category: data.category,
499
+									id: data.categoryId,
500
+								},
501
+								isHangDTO:{
502
+									id: 1,
503
+									name: "是"
504
+								},
505
+							}
506
+						}
507
+						let path = '/newStatistics/maintenanceStatistics/incidentList'
508
+						let flag = this.tabService.tabs.some(v => v.path === path);
509
+						flag && this.tabService.deleteRouteSnapshot(path);
510
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
511
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
512
+						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
513
+						this.router.navigate([path], { replaceUrl: true });
514
+				});	
515
+			}else if(item1){
516
+				let category1 = null
517
+				let category2 = null
518
+				this.mainService
519
+				  .getFetchData("simple/data", "incidentCategory", data.categoryId)
520
+				  .subscribe((res) => {
521
+						category2 = res.data.parent;
522
+						category1 = res.data.parent.parent;
523
+						query = {
524
+							startDate: this.customChangeDateComponent.startDate || undefined,
525
+							endDate: this.customChangeDateComponent.endDate || undefined,
526
+							repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
527
+							searchQuery:{
528
+								statusValue: 'close',
529
+								hierarchy: data.hierarchy,
530
+								categoryId: data.categoryId,
531
+								isHangId: 1,
532
+								groupId: this.fieldConfig.fields.groupId || undefined,
533
+								userId: this.fieldConfig.fields.userId || undefined,
534
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
535
+								placeId: this.fieldConfig.fields.floorId || undefined,
536
+								floorId: this.fieldConfig.fields.floorId || undefined,
537
+								companyId: this.fieldConfig.fields.companyId || undefined,
538
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
539
+								companyDTO: this.fieldConfig.fields.companyDTO || undefined,
540
+								floorDTO: this.fieldConfig.fields.floorDTO || undefined,
541
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
542
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
543
+								category1DTO: category1 || undefined,
544
+								category2DTO: category2 || undefined,
545
+								category3DTO: {
546
+									category: data.category,
547
+									id: data.categoryId,
548
+								},
549
+								isHangDTO:{
550
+									id: 1,
551
+									name: "是"
552
+								},
553
+							}
554
+						}
555
+						let path = '/newStatistics/maintenanceStatistics/incidentList'
556
+						let flag = this.tabService.tabs.some(v => v.path === path);
557
+						flag && this.tabService.deleteRouteSnapshot(path);
558
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
559
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
560
+						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
561
+						this.router.navigate([path], { replaceUrl: true });
562
+				});	
563
+			}else{
564
+				query = {
565
+					startDate: this.customChangeDateComponent.startDate || undefined,
566
+					endDate: this.customChangeDateComponent.endDate || undefined,
567
+					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
568
+					searchQuery:{
569
+						statusValue: 'close',
570
+						hierarchy: data.hierarchy,
571
+						categoryId: data.categoryId,
572
+						isHangId: 1,
573
+						groupId: this.fieldConfig.fields.groupId || undefined,
574
+						userId: this.fieldConfig.fields.userId || undefined,
575
+						buildingId: this.fieldConfig.fields.buildingId || undefined,
576
+						placeId: this.fieldConfig.fields.floorId || undefined,
577
+						floorId: this.fieldConfig.fields.floorId || undefined,
578
+						companyId: this.fieldConfig.fields.companyId || undefined,
579
+						buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
580
+						companyDTO: this.fieldConfig.fields.companyDTO || undefined,
581
+						floorDTO: this.fieldConfig.fields.floorDTO || undefined,
582
+						groupDTO: this.fieldConfig.fields.groupDTO || undefined,
583
+						userDTO: this.fieldConfig.fields.userDTO || undefined,
584
+						category1DTO: item1 || undefined,
585
+						category2DTO: item2 || undefined,
586
+						category3DTO:{
587
+							category: data.category,
588
+							id: data.categoryId,
589
+						},
590
+						isHangDTO:{
591
+							id: 1,
592
+							name: "是"
593
+						},
594
+					}
250
 				}
595
 				}
596
+				let path = '/newStatistics/maintenanceStatistics/incidentList'
597
+				let flag = this.tabService.tabs.some(v => v.path === path);
598
+				flag && this.tabService.deleteRouteSnapshot(path);
599
+				this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
600
+				this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
601
+				sessionStorage.setItem('maintenanceData', JSON.stringify(query))
602
+				this.router.navigate([path], { replaceUrl: true });
251
 			}
603
 			}
252
 		}
604
 		}
253
-
254
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
255
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
256
 	}
605
 	}
257
 	
606
 	
258
 	// 数据下钻
607
 	// 数据下钻
@@ -289,37 +638,178 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
289
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
638
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
290
 					category1DTO: item1 || undefined,
639
 					category1DTO: item1 || undefined,
291
 					category2DTO: item2 || undefined,
640
 					category2DTO: item2 || undefined,
641
+					evaluateDTO: {
642
+							"id": 20424,
643
+							"key": "incident_degree",
644
+							"name": "不满意",
645
+							"value": "1",
646
+							"orders": 5,
647
+							"extra1": "",
648
+							"extra2": ""
649
+					},
292
 				}
650
 				}
293
 			}
651
 			}
652
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
653
+			let flag = this.tabService.tabs.some(v => v.path === path);
654
+			flag && this.tabService.deleteRouteSnapshot(path);
655
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
656
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
657
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
658
+			this.router.navigate([path], { replaceUrl: true });
294
 		}else{
659
 		}else{
295
-			query = {
296
-				startDate: this.customChangeDateComponent.startDate || undefined,
297
-				endDate: this.customChangeDateComponent.endDate || undefined,
298
-				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
299
-				searchQuery:{
300
-					statusValue: 'close',
301
-					hierarchy: data.hierarchy,
302
-					categoryId: data.categoryId,
303
-					evaluateId: 20424,
304
-					groupId: this.fieldConfig.fields.groupId || undefined,
305
-					userId: this.fieldConfig.fields.userId || undefined,
306
-					buildingId: this.fieldConfig.fields.buildingId || undefined,
307
-					placeId: this.fieldConfig.fields.floorId || undefined,
308
-					floorId: this.fieldConfig.fields.floorId || undefined,
309
-					companyId: this.fieldConfig.fields.companyId || undefined,
310
-					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
311
-					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
312
-					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
313
-					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
314
-					userDTO: this.fieldConfig.fields.userDTO || undefined,
315
-					category1DTO: item1 || undefined,
316
-					category2DTO: item2 || undefined,
660
+			let category1 = null
661
+			let category2 = null
662
+			if(!item1 && !item2){
663
+				this.mainService
664
+				  .getFetchData("simple/data", "incidentCategory", data.categoryId)
665
+				  .subscribe((res) => {
666
+						category2 = res.data.parent;
667
+						category1 = res.data.parent.parent;
668
+						query = {
669
+							startDate: this.customChangeDateComponent.startDate || undefined,
670
+							endDate: this.customChangeDateComponent.endDate || undefined,
671
+							repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
672
+							searchQuery:{
673
+								statusValue: 'close',
674
+								hierarchy: data.hierarchy,
675
+								categoryId: data.categoryId,
676
+								evaluateId: 20424,
677
+								groupId: this.fieldConfig.fields.groupId || undefined,
678
+								userId: this.fieldConfig.fields.userId || undefined,
679
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
680
+								placeId: this.fieldConfig.fields.floorId || undefined,
681
+								floorId: this.fieldConfig.fields.floorId || undefined,
682
+								companyId: this.fieldConfig.fields.companyId || undefined,
683
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
684
+								companyDTO: this.fieldConfig.fields.companyDTO || undefined,
685
+								floorDTO: this.fieldConfig.fields.floorDTO || undefined,
686
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
687
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
688
+								category1DTO: category1 || undefined,
689
+								category2DTO: category2 || undefined,
690
+								category3DTO:{
691
+									category: data.category,
692
+									id: data.categoryId,
693
+								},
694
+								evaluateDTO: {
695
+										"id": 20424,
696
+										"key": "incident_degree",
697
+										"name": "不满意",
698
+										"value": "1",
699
+										"orders": 5,
700
+										"extra1": "",
701
+										"extra2": ""
702
+								},
703
+							}
704
+						}
705
+						let path = '/newStatistics/maintenanceStatistics/incidentList'
706
+						let flag = this.tabService.tabs.some(v => v.path === path);
707
+						flag && this.tabService.deleteRouteSnapshot(path);
708
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
709
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
710
+						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
711
+						this.router.navigate([path], { replaceUrl: true });
712
+				});	
713
+			}else if(item1){
714
+				let category1 = null
715
+				let category2 = null
716
+				this.mainService
717
+				  .getFetchData("simple/data", "incidentCategory", data.categoryId)
718
+				  .subscribe((res) => {
719
+						category2 = res.data.parent;
720
+						category1 = res.data.parent.parent;
721
+						query = {
722
+							startDate: this.customChangeDateComponent.startDate || undefined,
723
+							endDate: this.customChangeDateComponent.endDate || undefined,
724
+							repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
725
+							searchQuery:{
726
+								statusValue: 'close',
727
+								hierarchy: data.hierarchy,
728
+								categoryId: data.categoryId,
729
+								evaluateId: 20424,
730
+								groupId: this.fieldConfig.fields.groupId || undefined,
731
+								userId: this.fieldConfig.fields.userId || undefined,
732
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
733
+								placeId: this.fieldConfig.fields.floorId || undefined,
734
+								floorId: this.fieldConfig.fields.floorId || undefined,
735
+								companyId: this.fieldConfig.fields.companyId || undefined,
736
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
737
+								companyDTO: this.fieldConfig.fields.companyDTO || undefined,
738
+								floorDTO: this.fieldConfig.fields.floorDTO || undefined,
739
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
740
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
741
+								category1DTO: category1 || undefined,
742
+								category2DTO: category2 || undefined,
743
+								category3DTO: {
744
+									category: data.category,
745
+									id: data.categoryId,
746
+								},
747
+								evaluateDTO: {
748
+										"id": 20424,
749
+										"key": "incident_degree",
750
+										"name": "不满意",
751
+										"value": "1",
752
+										"orders": 5,
753
+										"extra1": "",
754
+										"extra2": ""
755
+								},
756
+							}
757
+						}
758
+						let path = '/newStatistics/maintenanceStatistics/incidentList'
759
+						let flag = this.tabService.tabs.some(v => v.path === path);
760
+						flag && this.tabService.deleteRouteSnapshot(path);
761
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
762
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
763
+						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
764
+						this.router.navigate([path], { replaceUrl: true });
765
+				});	
766
+			}else{
767
+				query = {
768
+					startDate: this.customChangeDateComponent.startDate || undefined,
769
+					endDate: this.customChangeDateComponent.endDate || undefined,
770
+					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
771
+					searchQuery:{
772
+						statusValue: 'close',
773
+						hierarchy: data.hierarchy,
774
+						categoryId: data.categoryId,
775
+						evaluateId: 20424,
776
+						groupId: this.fieldConfig.fields.groupId || undefined,
777
+						userId: this.fieldConfig.fields.userId || undefined,
778
+						buildingId: this.fieldConfig.fields.buildingId || undefined,
779
+						placeId: this.fieldConfig.fields.floorId || undefined,
780
+						floorId: this.fieldConfig.fields.floorId || undefined,
781
+						companyId: this.fieldConfig.fields.companyId || undefined,
782
+						buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
783
+						companyDTO: this.fieldConfig.fields.companyDTO || undefined,
784
+						floorDTO: this.fieldConfig.fields.floorDTO || undefined,
785
+						groupDTO: this.fieldConfig.fields.groupDTO || undefined,
786
+						userDTO: this.fieldConfig.fields.userDTO || undefined,
787
+						category1DTO: item1 || undefined,
788
+						category2DTO: item2 || undefined,
789
+						category3DTO:{
790
+							category: data.category,
791
+							id: data.categoryId,
792
+						},
793
+						evaluateDTO: {
794
+								"id": 20424,
795
+								"key": "incident_degree",
796
+								"name": "不满意",
797
+								"value": "1",
798
+								"orders": 5,
799
+								"extra1": "",
800
+								"extra2": ""
801
+						},
802
+					}
317
 				}
803
 				}
804
+				let path = '/newStatistics/maintenanceStatistics/incidentList'
805
+				let flag = this.tabService.tabs.some(v => v.path === path);
806
+				flag && this.tabService.deleteRouteSnapshot(path);
807
+				this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
808
+				this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
809
+				sessionStorage.setItem('maintenanceData', JSON.stringify(query))
810
+				this.router.navigate([path], { replaceUrl: true });
318
 			}
811
 			}
319
 		}
812
 		}
320
-
321
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
322
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
323
 	}
813
 	}
324
 	
814
 	
325
   getQueryParams(){
815
   getQueryParams(){

+ 378 - 95
src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.ts

@@ -63,6 +63,7 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
63
 		if(this.category1Id){
63
 		if(this.category1Id){
64
 		  item = this.category1List.find(item => item.id == this.category1Id);
64
 		  item = this.category1List.find(item => item.id == this.category1Id);
65
 		}
65
 		}
66
+		
66
 		if(type=='all'){
67
 		if(type=='all'){
67
 			query = {
68
 			query = {
68
 				startDate: this.customChangeDateComponent.startDate || undefined,
69
 				startDate: this.customChangeDateComponent.startDate || undefined,
@@ -86,33 +87,90 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
86
 					category1DTO: item || undefined,
87
 					category1DTO: item || undefined,
87
 				}
88
 				}
88
 			}
89
 			}
90
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
91
+			let flag = this.tabService.tabs.some(v => v.path === path);
92
+			flag && this.tabService.deleteRouteSnapshot(path);
93
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
94
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
95
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
96
+			this.router.navigate([path], { replaceUrl: true });
89
 		}else{
97
 		}else{
90
-			query = {
91
-				startDate: this.customChangeDateComponent.startDate || undefined,
92
-				endDate: this.customChangeDateComponent.endDate || undefined,
93
-				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
94
-				searchQuery:{
95
-					statusValue: 'close',
96
-					hierarchy: data.hierarchy,
97
-					categoryId: data.categoryId,
98
-					groupId: this.fieldConfig.fields.groupId || undefined,
99
-					userId: this.fieldConfig.fields.userId || undefined,
100
-					buildingId: this.fieldConfig.fields.buildingId || undefined,
101
-					placeId: this.fieldConfig.fields.floorId || undefined,
102
-					floorId: this.fieldConfig.fields.floorId || undefined,
103
-					companyId: this.fieldConfig.fields.companyId || undefined,
104
-					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
105
-					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
106
-					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
107
-					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
108
-					userDTO: this.fieldConfig.fields.userDTO || undefined,
109
-					category1DTO: item || undefined,
98
+			let category1 = null
99
+			if(!item){
100
+				this.mainService
101
+				  .getFetchData("simple/data", "incidentCategory", data.categoryId)
102
+				  .subscribe((res) => {
103
+						category1 = res.data.parent;
104
+						query = {
105
+							startDate: this.customChangeDateComponent.startDate || undefined,
106
+							endDate: this.customChangeDateComponent.endDate || undefined,
107
+							repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
108
+							searchQuery:{
109
+								statusValue: 'close',
110
+								hierarchy: data.hierarchy,
111
+								categoryId: data.categoryId,
112
+								groupId: this.fieldConfig.fields.groupId || undefined,
113
+								userId: this.fieldConfig.fields.userId || undefined,
114
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
115
+								placeId: this.fieldConfig.fields.floorId || undefined,
116
+								floorId: this.fieldConfig.fields.floorId || undefined,
117
+								companyId: this.fieldConfig.fields.companyId || undefined,
118
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
119
+								companyDTO: this.fieldConfig.fields.companyDTO || undefined,
120
+								floorDTO: this.fieldConfig.fields.floorDTO || undefined,
121
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
122
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
123
+								category1DTO: category1,
124
+								category2DTO: {
125
+									category: data.category,
126
+									id: data.categoryId,
127
+								}
128
+							}
129
+						}
130
+						let path = '/newStatistics/maintenanceStatistics/incidentList'
131
+						let flag = this.tabService.tabs.some(v => v.path === path);
132
+						flag && this.tabService.deleteRouteSnapshot(path);
133
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
134
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
135
+						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
136
+						this.router.navigate([path], { replaceUrl: true });
137
+					});
138
+			}else{
139
+				query = {
140
+					startDate: this.customChangeDateComponent.startDate || undefined,
141
+					endDate: this.customChangeDateComponent.endDate || undefined,
142
+					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
143
+					searchQuery:{
144
+						statusValue: 'close',
145
+						hierarchy: data.hierarchy,
146
+						categoryId: data.categoryId,
147
+						groupId: this.fieldConfig.fields.groupId || undefined,
148
+						userId: this.fieldConfig.fields.userId || undefined,
149
+						buildingId: this.fieldConfig.fields.buildingId || undefined,
150
+						placeId: this.fieldConfig.fields.floorId || undefined,
151
+						floorId: this.fieldConfig.fields.floorId || undefined,
152
+						companyId: this.fieldConfig.fields.companyId || undefined,
153
+						buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
154
+						companyDTO: this.fieldConfig.fields.companyDTO || undefined,
155
+						floorDTO: this.fieldConfig.fields.floorDTO || undefined,
156
+						groupDTO: this.fieldConfig.fields.groupDTO || undefined,
157
+						userDTO: this.fieldConfig.fields.userDTO || undefined,
158
+						category1DTO: item,
159
+						category2DTO: {
160
+							category: data.category,
161
+							id: data.categoryId,
162
+						}
163
+					}
110
 				}
164
 				}
165
+				let path = '/newStatistics/maintenanceStatistics/incidentList'
166
+				let flag = this.tabService.tabs.some(v => v.path === path);
167
+				flag && this.tabService.deleteRouteSnapshot(path);
168
+				this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
169
+				this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
170
+				sessionStorage.setItem('maintenanceData', JSON.stringify(query))
171
+				this.router.navigate([path], { replaceUrl: true });
111
 			}
172
 			}
112
 		}
173
 		}
113
-
114
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
115
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
116
 	}
174
 	}
117
 	
175
 	
118
 	// 数据下钻
176
 	// 数据下钻
@@ -144,36 +202,106 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
144
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
202
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
145
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
203
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
146
 					category1DTO: item || undefined,
204
 					category1DTO: item || undefined,
205
+					overtimeDTO:{
206
+						id: 1,
207
+						name: "是"
208
+					},
147
 				}
209
 				}
148
 			}
210
 			}
211
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
212
+			let flag = this.tabService.tabs.some(v => v.path === path);
213
+			flag && this.tabService.deleteRouteSnapshot(path);
214
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
215
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
216
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
217
+			this.router.navigate([path], { replaceUrl: true });
149
 		}else{
218
 		}else{
150
-			query = {
151
-				startDate: this.customChangeDateComponent.startDate || undefined,
152
-				endDate: this.customChangeDateComponent.endDate || undefined,
153
-				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
154
-				searchQuery:{
155
-					statusValue: 'close',
156
-					hierarchy: data.hierarchy,
157
-					categoryId: data.categoryId,
158
-					overtimeId: 1,
159
-					groupId: this.fieldConfig.fields.groupId || undefined,
160
-					userId: this.fieldConfig.fields.userId || undefined,
161
-					buildingId: this.fieldConfig.fields.buildingId || undefined,
162
-					placeId: this.fieldConfig.fields.floorId || undefined,
163
-					floorId: this.fieldConfig.fields.floorId || undefined,
164
-					companyId: this.fieldConfig.fields.companyId || undefined,
165
-					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
166
-					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
167
-					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
168
-					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
169
-					userDTO: this.fieldConfig.fields.userDTO || undefined,
170
-					category1DTO: item || undefined,
219
+			let category1 = null
220
+			if(!item){
221
+				this.mainService
222
+				  .getFetchData("simple/data", "incidentCategory", data.categoryId)
223
+				  .subscribe((res) => {
224
+						category1 = res.data.parent;
225
+						query = {
226
+							startDate: this.customChangeDateComponent.startDate || undefined,
227
+							endDate: this.customChangeDateComponent.endDate || undefined,
228
+							repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
229
+							searchQuery:{
230
+								statusValue: 'close',
231
+								hierarchy: data.hierarchy,
232
+								categoryId: data.categoryId,
233
+								groupId: this.fieldConfig.fields.groupId || undefined,
234
+								userId: this.fieldConfig.fields.userId || undefined,
235
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
236
+								placeId: this.fieldConfig.fields.floorId || undefined,
237
+								floorId: this.fieldConfig.fields.floorId || undefined,
238
+								companyId: this.fieldConfig.fields.companyId || undefined,
239
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
240
+								companyDTO: this.fieldConfig.fields.companyDTO || undefined,
241
+								floorDTO: this.fieldConfig.fields.floorDTO || undefined,
242
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
243
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
244
+								overtimeDTO:{
245
+									id: 1,
246
+									name: "是"
247
+								},
248
+								overtimeId:1,
249
+								category1DTO: category1,
250
+								category2DTO: {
251
+									category: data.category,
252
+									id: data.categoryId,
253
+								},
254
+							}
255
+						}
256
+						let path = '/newStatistics/maintenanceStatistics/incidentList'
257
+						let flag = this.tabService.tabs.some(v => v.path === path);
258
+						flag && this.tabService.deleteRouteSnapshot(path);
259
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
260
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
261
+						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
262
+						this.router.navigate([path], { replaceUrl: true });
263
+					});
264
+			}else{
265
+				query = {
266
+					startDate: this.customChangeDateComponent.startDate || undefined,
267
+					endDate: this.customChangeDateComponent.endDate || undefined,
268
+					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
269
+					searchQuery:{
270
+						statusValue: 'close',
271
+						hierarchy: data.hierarchy,
272
+						categoryId: data.categoryId,
273
+						groupId: this.fieldConfig.fields.groupId || undefined,
274
+						userId: this.fieldConfig.fields.userId || undefined,
275
+						buildingId: this.fieldConfig.fields.buildingId || undefined,
276
+						placeId: this.fieldConfig.fields.floorId || undefined,
277
+						floorId: this.fieldConfig.fields.floorId || undefined,
278
+						companyId: this.fieldConfig.fields.companyId || undefined,
279
+						buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
280
+						companyDTO: this.fieldConfig.fields.companyDTO || undefined,
281
+						floorDTO: this.fieldConfig.fields.floorDTO || undefined,
282
+						groupDTO: this.fieldConfig.fields.groupDTO || undefined,
283
+						userDTO: this.fieldConfig.fields.userDTO || undefined,
284
+						overtimeDTO:{
285
+							id: 1,
286
+							name: "是"
287
+						},
288
+						overtimeId:1,
289
+						category1DTO: item,
290
+						category2DTO: {
291
+							category: data.category,
292
+							id: data.categoryId,
293
+						},
294
+					}
171
 				}
295
 				}
296
+				let path = '/newStatistics/maintenanceStatistics/incidentList'
297
+				let flag = this.tabService.tabs.some(v => v.path === path);
298
+				flag && this.tabService.deleteRouteSnapshot(path);
299
+				this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
300
+				this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
301
+				sessionStorage.setItem('maintenanceData', JSON.stringify(query))
302
+				this.router.navigate([path], { replaceUrl: true });
172
 			}
303
 			}
173
 		}
304
 		}
174
-
175
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
176
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
177
 	}
305
 	}
178
 	
306
 	
179
 	// 数据下钻
307
 	// 数据下钻
@@ -205,36 +333,106 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
205
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
333
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
206
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
334
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
207
 					category1DTO: item || undefined,
335
 					category1DTO: item || undefined,
336
+					isHangDTO: {
337
+						id: 1,
338
+						name: "是"
339
+					},
208
 				}
340
 				}
209
 			}
341
 			}
342
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
343
+			let flag = this.tabService.tabs.some(v => v.path === path);
344
+			flag && this.tabService.deleteRouteSnapshot(path);
345
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
346
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
347
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
348
+			this.router.navigate([path], { replaceUrl: true });
210
 		}else{
349
 		}else{
211
-			query = {
212
-				startDate: this.customChangeDateComponent.startDate || undefined,
213
-				endDate: this.customChangeDateComponent.endDate || undefined,
214
-				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
215
-				searchQuery:{
216
-					statusValue: 'close',
217
-					hierarchy: data.hierarchy,
218
-					categoryId: data.categoryId,
219
-					isHangId: 1,
220
-					groupId: this.fieldConfig.fields.groupId || undefined,
221
-					userId: this.fieldConfig.fields.userId || undefined,
222
-					buildingId: this.fieldConfig.fields.buildingId || undefined,
223
-					placeId: this.fieldConfig.fields.floorId || undefined,
224
-					floorId: this.fieldConfig.fields.floorId || undefined,
225
-					companyId: this.fieldConfig.fields.companyId || undefined,
226
-					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
227
-					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
228
-					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
229
-					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
230
-					userDTO: this.fieldConfig.fields.userDTO || undefined,
231
-					category1DTO: item || undefined,
350
+			let category1 = null
351
+			if(!item){
352
+				this.mainService
353
+				  .getFetchData("simple/data", "incidentCategory", data.categoryId)
354
+				  .subscribe((res) => {
355
+						category1 = res.data.parent;
356
+						query = {
357
+							startDate: this.customChangeDateComponent.startDate || undefined,
358
+							endDate: this.customChangeDateComponent.endDate || undefined,
359
+							repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
360
+							searchQuery:{
361
+								statusValue: 'close',
362
+								hierarchy: data.hierarchy,
363
+								categoryId: data.categoryId,
364
+								groupId: this.fieldConfig.fields.groupId || undefined,
365
+								userId: this.fieldConfig.fields.userId || undefined,
366
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
367
+								placeId: this.fieldConfig.fields.floorId || undefined,
368
+								floorId: this.fieldConfig.fields.floorId || undefined,
369
+								companyId: this.fieldConfig.fields.companyId || undefined,
370
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
371
+								companyDTO: this.fieldConfig.fields.companyDTO || undefined,
372
+								floorDTO: this.fieldConfig.fields.floorDTO || undefined,
373
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
374
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
375
+								isHangDTO: {
376
+									id: 1,
377
+									name: "是"
378
+								},
379
+								isHangId:1,
380
+								category1DTO: category1,
381
+								category2DTO: {
382
+									category: data.category,
383
+									id: data.categoryId,
384
+								},
385
+							}
386
+						}
387
+						let path = '/newStatistics/maintenanceStatistics/incidentList'
388
+						let flag = this.tabService.tabs.some(v => v.path === path);
389
+						flag && this.tabService.deleteRouteSnapshot(path);
390
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
391
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
392
+						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
393
+						this.router.navigate([path], { replaceUrl: true });
394
+					});
395
+			}else{
396
+				query = {
397
+					startDate: this.customChangeDateComponent.startDate || undefined,
398
+					endDate: this.customChangeDateComponent.endDate || undefined,
399
+					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
400
+					searchQuery:{
401
+						statusValue: 'close',
402
+						hierarchy: data.hierarchy,
403
+						categoryId: data.categoryId,
404
+						groupId: this.fieldConfig.fields.groupId || undefined,
405
+						userId: this.fieldConfig.fields.userId || undefined,
406
+						buildingId: this.fieldConfig.fields.buildingId || undefined,
407
+						placeId: this.fieldConfig.fields.floorId || undefined,
408
+						floorId: this.fieldConfig.fields.floorId || undefined,
409
+						companyId: this.fieldConfig.fields.companyId || undefined,
410
+						buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
411
+						companyDTO: this.fieldConfig.fields.companyDTO || undefined,
412
+						floorDTO: this.fieldConfig.fields.floorDTO || undefined,
413
+						groupDTO: this.fieldConfig.fields.groupDTO || undefined,
414
+						userDTO: this.fieldConfig.fields.userDTO || undefined,
415
+						isHangDTO: {
416
+							id: 1,
417
+							name: "是"
418
+						},
419
+						isHangId:1,
420
+						category1DTO: item,
421
+						category2DTO: {
422
+							category: data.category,
423
+							id: data.categoryId,
424
+						},
425
+					}
232
 				}
426
 				}
427
+				let path = '/newStatistics/maintenanceStatistics/incidentList'
428
+				let flag = this.tabService.tabs.some(v => v.path === path);
429
+				flag && this.tabService.deleteRouteSnapshot(path);
430
+				this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
431
+				this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
432
+				sessionStorage.setItem('maintenanceData', JSON.stringify(query))
433
+				this.router.navigate([path], { replaceUrl: true });
233
 			}
434
 			}
234
 		}
435
 		}
235
-
236
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
237
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
238
 	}
436
 	}
239
 	
437
 	
240
 	// 数据下钻
438
 	// 数据下钻
@@ -266,36 +464,121 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
266
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
464
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
267
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
465
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
268
 					category1DTO: item || undefined,
466
 					category1DTO: item || undefined,
467
+					evaluateDTO: {
468
+							"id": 20424,
469
+							"key": "incident_degree",
470
+							"name": "不满意",
471
+							"value": "1",
472
+							"orders": 5,
473
+							"extra1": "",
474
+							"extra2": ""
475
+					},
269
 				}
476
 				}
270
 			}
477
 			}
478
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
479
+			let flag = this.tabService.tabs.some(v => v.path === path);
480
+			flag && this.tabService.deleteRouteSnapshot(path);
481
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
482
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
483
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
484
+			this.router.navigate([path], { replaceUrl: true });
271
 		}else{
485
 		}else{
272
-			query = {
273
-				startDate: this.customChangeDateComponent.startDate || undefined,
274
-				endDate: this.customChangeDateComponent.endDate || undefined,
275
-				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
276
-				searchQuery:{
277
-					statusValue: 'close',
278
-					hierarchy: data.hierarchy,
279
-					categoryId: data.categoryId,
280
-					evaluateId: 20424,
281
-					groupId: this.fieldConfig.fields.groupId || undefined,
282
-					userId: this.fieldConfig.fields.userId || undefined,
283
-					buildingId: this.fieldConfig.fields.buildingId || undefined,
284
-					placeId: this.fieldConfig.fields.floorId || undefined,
285
-					floorId: this.fieldConfig.fields.floorId || undefined,
286
-					companyId: this.fieldConfig.fields.companyId || undefined,
287
-					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
288
-					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
289
-					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
290
-					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
291
-					userDTO: this.fieldConfig.fields.userDTO || undefined,
292
-					category1DTO: item || undefined,
486
+			let category1 = null
487
+			if(!item){
488
+				this.mainService
489
+				  .getFetchData("simple/data", "incidentCategory", data.categoryId)
490
+				  .subscribe((res) => {
491
+						category1 = res.data.parent;
492
+						query = {
493
+							startDate: this.customChangeDateComponent.startDate || undefined,
494
+							endDate: this.customChangeDateComponent.endDate || undefined,
495
+							repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
496
+							searchQuery:{
497
+								statusValue: 'close',
498
+								hierarchy: data.hierarchy,
499
+								categoryId: data.categoryId,
500
+								evaluateId: 20424,
501
+								groupId: this.fieldConfig.fields.groupId || undefined,
502
+								userId: this.fieldConfig.fields.userId || undefined,
503
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
504
+								placeId: this.fieldConfig.fields.floorId || undefined,
505
+								floorId: this.fieldConfig.fields.floorId || undefined,
506
+								companyId: this.fieldConfig.fields.companyId || undefined,
507
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
508
+								companyDTO: this.fieldConfig.fields.companyDTO || undefined,
509
+								floorDTO: this.fieldConfig.fields.floorDTO || undefined,
510
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
511
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
512
+								evaluateDTO: {
513
+										"id": 20424,
514
+										"key": "incident_degree",
515
+										"name": "不满意",
516
+										"value": "1",
517
+										"orders": 5,
518
+										"extra1": "",
519
+										"extra2": ""
520
+								},
521
+								category1DTO: category1,
522
+								category2DTO: {
523
+									category: data.category,
524
+									id: data.categoryId,
525
+								},
526
+							}
527
+						}
528
+						let path = '/newStatistics/maintenanceStatistics/incidentList'
529
+						let flag = this.tabService.tabs.some(v => v.path === path);
530
+						flag && this.tabService.deleteRouteSnapshot(path);
531
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
532
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
533
+						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
534
+						this.router.navigate([path], { replaceUrl: true });
535
+					});
536
+			}else{
537
+				query = {
538
+					startDate: this.customChangeDateComponent.startDate || undefined,
539
+					endDate: this.customChangeDateComponent.endDate || undefined,
540
+					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
541
+					searchQuery:{
542
+						statusValue: 'close',
543
+						hierarchy: data.hierarchy,
544
+						categoryId: data.categoryId,
545
+						evaluateId: 20424,
546
+						groupId: this.fieldConfig.fields.groupId || undefined,
547
+						userId: this.fieldConfig.fields.userId || undefined,
548
+						buildingId: this.fieldConfig.fields.buildingId || undefined,
549
+						placeId: this.fieldConfig.fields.floorId || undefined,
550
+						floorId: this.fieldConfig.fields.floorId || undefined,
551
+						companyId: this.fieldConfig.fields.companyId || undefined,
552
+						buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
553
+						companyDTO: this.fieldConfig.fields.companyDTO || undefined,
554
+						floorDTO: this.fieldConfig.fields.floorDTO || undefined,
555
+						groupDTO: this.fieldConfig.fields.groupDTO || undefined,
556
+						userDTO: this.fieldConfig.fields.userDTO || undefined,
557
+						evaluateDTO: {
558
+								"id": 20424,
559
+								"key": "incident_degree",
560
+								"name": "不满意",
561
+								"value": "1",
562
+								"orders": 5,
563
+								"extra1": "",
564
+								"extra2": ""
565
+						},
566
+						category1DTO: item,
567
+						category2DTO: {
568
+							category: data.category,
569
+							id: data.categoryId,
570
+						},
571
+					}
293
 				}
572
 				}
573
+				let path = '/newStatistics/maintenanceStatistics/incidentList'
574
+				let flag = this.tabService.tabs.some(v => v.path === path);
575
+				flag && this.tabService.deleteRouteSnapshot(path);
576
+				this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
577
+				this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
578
+				sessionStorage.setItem('maintenanceData', JSON.stringify(query))
579
+				this.router.navigate([path], { replaceUrl: true });
294
 			}
580
 			}
295
 		}
581
 		}
296
-
297
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
298
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
299
 	}
582
 	}
300
 	
583
 	
301
   getQueryParams(){
584
   getQueryParams(){

+ 123 - 12
src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.ts

@@ -116,8 +116,13 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
116
 			}
116
 			}
117
 		}
117
 		}
118
 
118
 
119
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
120
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
119
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
120
+		let flag = this.tabService.tabs.some(v => v.path === path);
121
+		flag && this.tabService.deleteRouteSnapshot(path);
122
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
123
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
124
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
125
+		this.router.navigate([path], { replaceUrl: true });
121
 	}
126
 	}
122
 	
127
 	
123
 	// 数据下钻
128
 	// 数据下钻
@@ -147,6 +152,15 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
147
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
152
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
148
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
153
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
149
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
154
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
155
+					evaluateDTO: {
156
+						"id": 20424,
157
+						"key": "incident_degree",
158
+						"name": "不满意",
159
+						"value": "1",
160
+						"orders": 5,
161
+						"extra1": "",
162
+						"extra2": ""
163
+					}
150
 				}
164
 				}
151
 			}
165
 			}
152
 		}else{
166
 		}else{
@@ -173,12 +187,26 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
173
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
187
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
174
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
188
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
175
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
189
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
190
+					evaluateDTO: {
191
+						"id": 20424,
192
+						"key": "incident_degree",
193
+						"name": "不满意",
194
+						"value": "1",
195
+						"orders": 5,
196
+						"extra1": "",
197
+						"extra2": ""
198
+					}
176
 				}
199
 				}
177
 			}
200
 			}
178
 		}
201
 		}
179
 
202
 
180
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
181
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
203
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
204
+		let flag = this.tabService.tabs.some(v => v.path === path);
205
+		flag && this.tabService.deleteRouteSnapshot(path);
206
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
207
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
208
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
209
+		this.router.navigate([path], { replaceUrl: true });
182
 	}
210
 	}
183
 	
211
 	
184
 	// 数据下钻
212
 	// 数据下钻
@@ -208,6 +236,15 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
208
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
236
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
209
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
237
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
210
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
238
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
239
+					evaluateDTO: {
240
+						"id": 20423,
241
+						"key": "incident_degree",
242
+						"name": "一般",
243
+						"value": "2",
244
+						"orders": 4,
245
+						"extra1": "",
246
+						"extra2": ""
247
+					}
211
 				}
248
 				}
212
 			}
249
 			}
213
 		}else{
250
 		}else{
@@ -234,12 +271,26 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
234
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
271
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
235
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
272
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
236
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
273
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
274
+					evaluateDTO: {
275
+						"id": 20423,
276
+						"key": "incident_degree",
277
+						"name": "一般",
278
+						"value": "2",
279
+						"orders": 4,
280
+						"extra1": "",
281
+						"extra2": ""
282
+					}
237
 				}
283
 				}
238
 			}
284
 			}
239
 		}
285
 		}
240
 
286
 
241
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
242
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
287
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
288
+		let flag = this.tabService.tabs.some(v => v.path === path);
289
+		flag && this.tabService.deleteRouteSnapshot(path);
290
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
291
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
292
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
293
+		this.router.navigate([path], { replaceUrl: true });
243
 	}
294
 	}
244
 	
295
 	
245
 	// 数据下钻
296
 	// 数据下钻
@@ -269,6 +320,15 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
269
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
320
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
270
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
321
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
271
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
322
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
323
+					evaluateDTO: {
324
+						"id": 20422,
325
+						"key": "incident_degree",
326
+						"name": "满意",
327
+						"value": "3",
328
+						"orders": 3,
329
+						"extra1": "",
330
+						"extra2": ""
331
+					}
272
 				}
332
 				}
273
 			}
333
 			}
274
 		}else{
334
 		}else{
@@ -295,12 +355,26 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
295
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
355
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
296
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
356
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
297
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
357
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
358
+					evaluateDTO: {
359
+						"id": 20422,
360
+						"key": "incident_degree",
361
+						"name": "满意",
362
+						"value": "3",
363
+						"orders": 3,
364
+						"extra1": "",
365
+						"extra2": ""
366
+					}
298
 				}
367
 				}
299
 			}
368
 			}
300
 		}
369
 		}
301
 
370
 
302
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
303
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
371
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
372
+		let flag = this.tabService.tabs.some(v => v.path === path);
373
+		flag && this.tabService.deleteRouteSnapshot(path);
374
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
375
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
376
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
377
+		this.router.navigate([path], { replaceUrl: true });
304
 	}
378
 	}
305
 	
379
 	
306
 	// 数据下钻
380
 	// 数据下钻
@@ -330,6 +404,15 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
330
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
404
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
331
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
405
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
332
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
406
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
407
+					evaluateDTO: {
408
+						"id": 20421,
409
+						"key": "incident_degree",
410
+						"name": "较满意",
411
+						"value": "2",
412
+						"orders": 2,
413
+						"extra1": "",
414
+						"extra2": ""
415
+					}
333
 				}
416
 				}
334
 			}
417
 			}
335
 		}else{
418
 		}else{
@@ -356,12 +439,26 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
356
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
439
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
357
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
440
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
358
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
441
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
442
+					evaluateDTO: {
443
+						"id": 20421,
444
+						"key": "incident_degree",
445
+						"name": "较满意",
446
+						"value": "2",
447
+						"orders": 2,
448
+						"extra1": "",
449
+						"extra2": ""
450
+					}
359
 				}
451
 				}
360
 			}
452
 			}
361
 		}
453
 		}
362
 
454
 
363
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
364
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
455
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
456
+		let flag = this.tabService.tabs.some(v => v.path === path);
457
+		flag && this.tabService.deleteRouteSnapshot(path);
458
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
459
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
460
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
461
+		this.router.navigate([path], { replaceUrl: true });
365
 	}
462
 	}
366
 	
463
 	
367
 	// 数据下钻
464
 	// 数据下钻
@@ -399,12 +496,26 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
399
 					groupId: this.fieldConfig.fields.groupId || undefined,
496
 					groupId: this.fieldConfig.fields.groupId || undefined,
400
 					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
497
 					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
401
 					userId: this.fieldConfig.fields.userId || undefined,
498
 					userId: this.fieldConfig.fields.userId || undefined,
499
+					evaluateDTO: {
500
+						"id": 20420,
501
+						"key": "incident_degree",
502
+						"name": "非常满意",
503
+						"value": "1",
504
+						"orders": 1,
505
+						"extra1": "",
506
+						"extra2": ""
507
+					}
402
 				}
508
 				}
403
 			}
509
 			}
404
 		}
510
 		}
405
 
511
 
406
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
407
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
512
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
513
+		let flag = this.tabService.tabs.some(v => v.path === path);
514
+		flag && this.tabService.deleteRouteSnapshot(path);
515
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
516
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
517
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
518
+		this.router.navigate([path], { replaceUrl: true });
408
 	}
519
 	}
409
 	
520
 	
410
   getQueryParams(){
521
   getQueryParams(){

+ 62 - 8
src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.ts

@@ -116,8 +116,13 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
116
 			}
116
 			}
117
 		}
117
 		}
118
 
118
 
119
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
120
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
119
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
120
+		let flag = this.tabService.tabs.some(v => v.path === path);
121
+		flag && this.tabService.deleteRouteSnapshot(path);
122
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
123
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
124
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
125
+		this.router.navigate([path], { replaceUrl: true });
121
 	}
126
 	}
122
 	
127
 	
123
 	// 数据下钻
128
 	// 数据下钻
@@ -147,6 +152,10 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
147
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
152
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
148
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
153
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
149
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
154
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
155
+					overtimeDTO:{
156
+						id: 1,
157
+						name: "是"
158
+					},
150
 				}
159
 				}
151
 			}
160
 			}
152
 		}else{
161
 		}else{
@@ -173,12 +182,21 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
173
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
182
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
174
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
183
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
175
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
184
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
185
+					overtimeDTO:{
186
+						id: 1,
187
+						name: "是"
188
+					},
176
 				}
189
 				}
177
 			}
190
 			}
178
 		}
191
 		}
179
 
192
 
180
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
181
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
193
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
194
+		let flag = this.tabService.tabs.some(v => v.path === path);
195
+		flag && this.tabService.deleteRouteSnapshot(path);
196
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
197
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
198
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
199
+		this.router.navigate([path], { replaceUrl: true });
182
 	}
200
 	}
183
 	
201
 	
184
 	// 数据下钻
202
 	// 数据下钻
@@ -208,6 +226,10 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
208
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
226
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
209
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
227
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
210
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
228
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
229
+					isHangDTO:{
230
+						id: 1,
231
+						name: "是"
232
+					},
211
 				}
233
 				}
212
 			}
234
 			}
213
 		}else{
235
 		}else{
@@ -234,12 +256,21 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
234
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
256
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
235
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
257
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
236
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
258
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
259
+					isHangDTO:{
260
+						id: 1,
261
+						name: "是"
262
+					},
237
 				}
263
 				}
238
 			}
264
 			}
239
 		}
265
 		}
240
 
266
 
241
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
242
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
267
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
268
+		let flag = this.tabService.tabs.some(v => v.path === path);
269
+		flag && this.tabService.deleteRouteSnapshot(path);
270
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
271
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
272
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
273
+		this.router.navigate([path], { replaceUrl: true });
243
 	}
274
 	}
244
 	
275
 	
245
 	// 数据下钻
276
 	// 数据下钻
@@ -269,6 +300,15 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
269
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
300
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
270
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
301
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
271
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
302
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
303
+					evaluateDTO: {
304
+						"id": 20424,
305
+						"key": "incident_degree",
306
+						"name": "不满意",
307
+						"value": "1",
308
+						"orders": 5,
309
+						"extra1": "",
310
+						"extra2": ""
311
+					}
272
 				}
312
 				}
273
 			}
313
 			}
274
 		}else{
314
 		}else{
@@ -295,12 +335,26 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
295
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
335
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
296
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
336
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
297
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
337
 					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
338
+					evaluateDTO: {
339
+						"id": 20424,
340
+						"key": "incident_degree",
341
+						"name": "不满意",
342
+						"value": "1",
343
+						"orders": 5,
344
+						"extra1": "",
345
+						"extra2": ""
346
+					}
298
 				}
347
 				}
299
 			}
348
 			}
300
 		}
349
 		}
301
 
350
 
302
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
303
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
351
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
352
+		let flag = this.tabService.tabs.some(v => v.path === path);
353
+		flag && this.tabService.deleteRouteSnapshot(path);
354
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
355
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
356
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
357
+		this.router.navigate([path], { replaceUrl: true });
304
 	}
358
 	}
305
 	
359
 	
306
   getQueryParams(){
360
   getQueryParams(){

+ 78 - 8
src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.ts

@@ -83,12 +83,21 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
83
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
83
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
84
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
84
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
85
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
85
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
86
+					groupDTO:{
87
+						groupName: data.groupName,
88
+						id: data.groupId ? data.groupId : -1,
89
+					}
86
 				}
90
 				}
87
 			}
91
 			}
88
 		}
92
 		}
89
 
93
 
90
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
91
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
94
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
95
+		let flag = this.tabService.tabs.some(v => v.path === path);
96
+		flag && this.tabService.deleteRouteSnapshot(path);
97
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
98
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
99
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
100
+		this.router.navigate([path], { replaceUrl: true });
92
 	}
101
 	}
93
 	
102
 	
94
 	// 数据下钻
103
 	// 数据下钻
@@ -111,6 +120,10 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
111
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
120
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
112
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
121
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
113
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
122
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
123
+					overtimeDTO:{
124
+						id: 1,
125
+						name: "是"
126
+					},
114
 				}
127
 				}
115
 			}
128
 			}
116
 		}else{
129
 		}else{
@@ -131,12 +144,25 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
131
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
144
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
132
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
145
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
133
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
146
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
147
+					groupDTO:{
148
+						groupName: data.groupName,
149
+						id: data.groupId ? data.groupId : -1,
150
+					},
151
+					overtimeDTO:{
152
+						id: 1,
153
+						name: "是"
154
+					},
134
 				}
155
 				}
135
 			}
156
 			}
136
 		}
157
 		}
137
 
158
 
138
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
139
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
159
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
160
+		let flag = this.tabService.tabs.some(v => v.path === path);
161
+		flag && this.tabService.deleteRouteSnapshot(path);
162
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
163
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
164
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
165
+		this.router.navigate([path], { replaceUrl: true });
140
 	}
166
 	}
141
 	
167
 	
142
 	// 数据下钻
168
 	// 数据下钻
@@ -159,6 +185,10 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
159
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
185
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
160
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
186
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
161
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
187
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
188
+					isHangDTO:{
189
+						id: 1,
190
+						name: "是"
191
+					},
162
 				}
192
 				}
163
 			}
193
 			}
164
 		}else{
194
 		}else{
@@ -179,12 +209,25 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
179
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
209
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
180
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
210
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
181
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
211
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
212
+					groupDTO:{
213
+						groupName: data.groupName,
214
+						id: data.groupId ? data.groupId : -1,
215
+					},
216
+					isHangDTO:{
217
+						id: 1,
218
+						name: "是"
219
+					},
182
 				}
220
 				}
183
 			}
221
 			}
184
 		}
222
 		}
185
 
223
 
186
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
187
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
224
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
225
+		let flag = this.tabService.tabs.some(v => v.path === path);
226
+		flag && this.tabService.deleteRouteSnapshot(path);
227
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
228
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
229
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
230
+		this.router.navigate([path], { replaceUrl: true });
188
 	}
231
 	}
189
 	
232
 	
190
 	// 数据下钻
233
 	// 数据下钻
@@ -207,6 +250,15 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
207
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
250
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
208
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
251
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
209
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
252
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
253
+					evaluateDTO: {
254
+						"id": 20424,
255
+						"key": "incident_degree",
256
+						"name": "不满意",
257
+						"value": "1",
258
+						"orders": 5,
259
+						"extra1": "",
260
+						"extra2": ""
261
+					}
210
 				}
262
 				}
211
 			}
263
 			}
212
 		}else{
264
 		}else{
@@ -227,12 +279,30 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
227
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
279
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
228
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
280
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
229
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
281
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
282
+					groupDTO:{
283
+						groupName: data.groupName,
284
+						id: data.groupId ? data.groupId : -1,
285
+					},
286
+					evaluateDTO: {
287
+						"id": 20424,
288
+						"key": "incident_degree",
289
+						"name": "不满意",
290
+						"value": "1",
291
+						"orders": 5,
292
+						"extra1": "",
293
+						"extra2": ""
294
+					}
230
 				}
295
 				}
231
 			}
296
 			}
232
 		}
297
 		}
233
 
298
 
234
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
235
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
299
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
300
+		let flag = this.tabService.tabs.some(v => v.path === path);
301
+		flag && this.tabService.deleteRouteSnapshot(path);
302
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
303
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
304
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
305
+		this.router.navigate([path], { replaceUrl: true });
236
 	}
306
 	}
237
 	
307
 	
238
   getQueryParams(){
308
   getQueryParams(){

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

@@ -1,6 +1,6 @@
1
 <div class="searchDataWrap">
1
 <div class="searchDataWrap">
2
   <div class="searchData">
2
   <div class="searchData">
3
-    <app-custom-change-date #customChangeDate [isShowType]="false" [dateData1]="dateData1" [dateData2]="dateData2"></app-custom-change-date>
3
+    <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4
     <div class="searchDataItem">
4
     <div class="searchDataItem">
5
       <span class="label">报修科室</span>:
5
       <span class="label">报修科室</span>:
6
       <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
6
       <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">

+ 28 - 31
src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.ts

@@ -37,13 +37,14 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
37
   ngOnInit() {
37
   ngOnInit() {
38
 		// 数据下钻搜索
38
 		// 数据下钻搜索
39
 		this.getRouteQuery()
39
 		this.getRouteQuery()
40
-		this.router.events
41
-		  .pipe(filter(event => event instanceof NavigationEnd))
42
-		  .subscribe((event: NavigationEnd) => {
43
-		    if(event.urlAfterRedirects.endsWith('/incidentList')){
44
-					this.getRouteQuery()
45
-		    }
46
-		  });
40
+		// this.router.events
41
+		//   .pipe(filter(event => event instanceof NavigationEnd))
42
+		//   .subscribe((event: NavigationEnd) => {
43
+		//     if(event.urlAfterRedirects=='/newStatistics/maintenanceStatistics/incidentList'){
44
+		// 			console.log('维修=================')
45
+		// 			this.getRouteQuery()
46
+		//     }
47
+		//   });
47
 
48
 
48
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
49
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
49
       let fun = v[0];
50
       let fun = v[0];
@@ -57,10 +58,6 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
57
 	
58
 	
58
   ngAfterViewInit(){
59
   ngAfterViewInit(){
59
     this.initSessionData();
60
     this.initSessionData();
60
-    this.getQueryParams();
61
-    setTimeout(() => {
62
-      this.search();
63
-    }, 0)
64
     this.onResize(0);
61
     this.onResize(0);
65
   }
62
   }
66
 
63
 
@@ -80,15 +77,6 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
80
 			query = JSON.parse(data)
77
 			query = JSON.parse(data)
81
 			console.log('query==========',query)
78
 			console.log('query==========',query)
82
 			setTimeout(_=>{
79
 			setTimeout(_=>{
83
-				// console.log(777,this.customChangeDateComponent)
84
-				if(query.startDate){
85
-					this.dateData1 = query.startDate
86
-					this.customChangeDateComponent.startDate = query.startDate
87
-				}
88
-				if(query.endDate){
89
-					this.dateData2 = query.endDate
90
-					this.customChangeDateComponent.endDate = query.endDate
91
-				}
92
 				if(query.repairDeptId){
80
 				if(query.repairDeptId){
93
 					this.getRepairDeptList();
81
 					this.getRepairDeptList();
94
 					this.repairDeptId = query.repairDeptId
82
 					this.repairDeptId = query.repairDeptId
@@ -102,20 +90,27 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
102
 					this.goingType = false
90
 					this.goingType = false
103
 					this.fieldConfig.fields = {}
91
 					this.fieldConfig.fields = {}
104
 				}
92
 				}
105
-				
106
-				this.search();
107
-				this.onResize(37);
108
-			})
93
+				this.getQueryParams();
94
+			},50)
95
+		}else{
96
+			setTimeout(_=>{
97
+				this.getQueryParams();
98
+			},50)
109
 		}
99
 		}
110
 	}
100
 	}
111
 	
101
 	
112
   getQueryParams(){
102
   getQueryParams(){
113
     let queryParams = this.tabService.getQueryParams();
103
     let queryParams = this.tabService.getQueryParams();
114
     this.tabService.clearQueryParams();
104
     this.tabService.clearQueryParams();
105
+		console.log(8989898,queryParams)
115
     if(queryParams.dateRange){
106
     if(queryParams.dateRange){
116
       this.dateRange = queryParams.dateRange;
107
       this.dateRange = queryParams.dateRange;
117
-      this.customChangeDateComponent.initByDate(this.dateRange);
108
+      this.customChangeDateComponent.initByDate(this.dateRange, queryParams.defRange);
118
     }
109
     }
110
+		setTimeout(_=>{
111
+			this.search();
112
+			this.onResize(37);
113
+		},50)
119
   }
114
   }
120
 
115
 
121
   get getMoreFilter(){
116
   get getMoreFilter(){
@@ -175,7 +170,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
175
     let postData:any = {
170
     let postData:any = {
176
       idx: this.pageIndex - 1,
171
       idx: this.pageIndex - 1,
177
       sum: this.pageSize,
172
       sum: this.pageSize,
178
-      dateType: this.customChangeDateComponent.dateType,
173
+      dateType: this.customChangeDateComponent.dateType || undefined,
179
       startDate: this.customChangeDateComponent.startDate || undefined,
174
       startDate: this.customChangeDateComponent.startDate || undefined,
180
       endDate: this.customChangeDateComponent.endDate || undefined,
175
       endDate: this.customChangeDateComponent.endDate || undefined,
181
       hosId: this.hosId || undefined,
176
       hosId: this.hosId || undefined,
@@ -193,8 +188,8 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
193
 			companyId: this.fieldConfig.fields.companyId || undefined,
188
 			companyId: this.fieldConfig.fields.companyId || undefined,
194
 			repairUserId: this.fieldConfig.fields.repairUserId || undefined,
189
 			repairUserId: this.fieldConfig.fields.repairUserId || undefined,
195
 			consumableId: this.fieldConfig.fields.consumableId || undefined,
190
 			consumableId: this.fieldConfig.fields.consumableId || undefined,
196
-			timeout: this.fieldConfig.fields.overtimeId==0 ? undefined : this.fieldConfig.fields.overtimeId,
197
-			hangUp: this.fieldConfig.fields.isHangId==0 ? undefined : this.fieldConfig.fields.isHangId,
191
+			timeout: this.fieldConfig.fields.overtimeId,
192
+			hangUp: this.fieldConfig.fields.isHangId,
198
 			incidentSign: this.fieldConfig.fields.codeNum,
193
 			incidentSign: this.fieldConfig.fields.codeNum,
199
 			wxDegreeId: this.fieldConfig.fields.evaluateId,
194
 			wxDegreeId: this.fieldConfig.fields.evaluateId,
200
 			statusValue: this.fieldConfig.fields.statusValue || undefined,
195
 			statusValue: this.fieldConfig.fields.statusValue || undefined,
@@ -264,8 +259,8 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
264
     	companyId: this.fieldConfig.fields.companyId || undefined,
259
     	companyId: this.fieldConfig.fields.companyId || undefined,
265
     	repairUserId: this.fieldConfig.fields.repairUserId || undefined,
260
     	repairUserId: this.fieldConfig.fields.repairUserId || undefined,
266
     	consumableId: this.fieldConfig.fields.consumableId || undefined,
261
     	consumableId: this.fieldConfig.fields.consumableId || undefined,
267
-    	timeout: this.fieldConfig.fields.overtimeId==0 ? undefined : this.fieldConfig.fields.overtimeId,
268
-    	hangUp: this.fieldConfig.fields.isHangId==0 ? undefined : this.fieldConfig.fields.isHangId,
262
+    	timeout: this.fieldConfig.fields.overtimeId,
263
+    	hangUp: this.fieldConfig.fields.isHangId,
269
     	incidentSign: this.fieldConfig.fields.codeNum,
264
     	incidentSign: this.fieldConfig.fields.codeNum,
270
 			wxDegreeId: this.fieldConfig.fields.evaluateId,
265
 			wxDegreeId: this.fieldConfig.fields.evaluateId,
271
 			statusValue: this.fieldConfig.fields.statusValue || undefined,
266
 			statusValue: this.fieldConfig.fields.statusValue || undefined,
@@ -307,12 +302,14 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
307
 		this.sortCurrentValue = "";
302
 		this.sortCurrentValue = "";
308
 		this.sortCurrent = {};
303
 		this.sortCurrent = {};
309
     this.dateRange = []
304
     this.dateRange = []
305
+		this.dateData1 = null;
306
+		this.dateData2 = null;
310
     this.repairDeptId = undefined;
307
     this.repairDeptId = undefined;
311
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined};
308
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined};
312
     this.customChangeDateComponent.resetByDate();
309
     this.customChangeDateComponent.resetByDate();
310
+		sessionStorage.removeItem('maintenanceData');
313
     this.search();
311
     this.search();
314
 		this.onResize(0);
312
 		this.onResize(0);
315
-		sessionStorage.removeItem('maintenanceData');
316
   }
313
   }
317
 
314
 
318
   // 科室搜索
315
   // 科室搜索

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

@@ -55,7 +55,7 @@
55
       <td>{{ data.consumablePrice }}</td>
55
       <td>{{ data.consumablePrice }}</td>
56
       <td>{{ data.workHourPrice }}</td>
56
       <td>{{ data.workHourPrice }}</td>
57
       <td>{{ data.totalPrice }}</td>
57
       <td>{{ data.totalPrice }}</td>
58
-      <td class="text-sign" (click)="viewDetail3(data)">{{ data.negativeNum }}</td>
58
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.negativeNum }}</td>
59
       <td>{{ data.favorableRate }}</td>
59
       <td>{{ data.favorableRate }}</td>
60
     </tr>
60
     </tr>
61
   </tbody>
61
   </tbody>

+ 90 - 12
src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.ts

@@ -79,6 +79,13 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
79
 					userDTO: this.fieldConfig.fields.userDTO,
79
 					userDTO: this.fieldConfig.fields.userDTO,
80
 				}
80
 				}
81
 			}
81
 			}
82
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
83
+			let flag = this.tabService.tabs.some(v => v.path === path);
84
+			flag && this.tabService.deleteRouteSnapshot(path);
85
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
86
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
87
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
88
+			this.router.navigate([path], { replaceUrl: true });
82
 		}else{
89
 		}else{
83
 			 query = {
90
 			 query = {
84
 				startDate: data.startDate + ' ' + '00:00:00',
91
 				startDate: data.startDate + ' ' + '00:00:00',
@@ -99,10 +106,14 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
99
 					userDTO: this.fieldConfig.fields.userDTO,
106
 					userDTO: this.fieldConfig.fields.userDTO,
100
 				}
107
 				}
101
 			}
108
 			}
109
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
110
+			let flag = this.tabService.tabs.some(v => v.path === path);
111
+			flag && this.tabService.deleteRouteSnapshot(path);
112
+			this.tabService.setQueryParams('dateRange', [data.startDate + ' ' + '00:00:00', data.startDate + ' ' + '23:59:59']);
113
+			this.tabService.setQueryParams('defRange', null);
114
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
115
+			this.router.navigate([path], { replaceUrl: true });
102
 		}
116
 		}
103
-
104
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
105
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
106
 	}
117
 	}
107
 	
118
 	
108
 	// 数据下钻
119
 	// 数据下钻
@@ -127,8 +138,19 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
127
 					groupDTO: this.fieldConfig.fields.groupDTO,
138
 					groupDTO: this.fieldConfig.fields.groupDTO,
128
 					sourceDTO: this.fieldConfig.fields.sourceDTO,
139
 					sourceDTO: this.fieldConfig.fields.sourceDTO,
129
 					userDTO: this.fieldConfig.fields.userDTO,
140
 					userDTO: this.fieldConfig.fields.userDTO,
141
+					overtimeDTO:{
142
+						id: 1,
143
+						name: "是"
144
+					},
130
 				}
145
 				}
131
 			}
146
 			}
147
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
148
+			let flag = this.tabService.tabs.some(v => v.path === path);
149
+			flag && this.tabService.deleteRouteSnapshot(path);
150
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
151
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
152
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
153
+			this.router.navigate([path], { replaceUrl: true });
132
 		}else{
154
 		}else{
133
 			query = {
155
 			query = {
134
 				startDate: data.startDate + ' ' + '00:00:00',
156
 				startDate: data.startDate + ' ' + '00:00:00',
@@ -148,12 +170,20 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
148
 					groupDTO: this.fieldConfig.fields.groupDTO,
170
 					groupDTO: this.fieldConfig.fields.groupDTO,
149
 					sourceDTO: this.fieldConfig.fields.sourceDTO,
171
 					sourceDTO: this.fieldConfig.fields.sourceDTO,
150
 					userDTO: this.fieldConfig.fields.userDTO,
172
 					userDTO: this.fieldConfig.fields.userDTO,
173
+					overtimeDTO:{
174
+						id: 1,
175
+						name: "是"
176
+					},
151
 				}
177
 				}
152
 			}
178
 			}
179
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
180
+			let flag = this.tabService.tabs.some(v => v.path === path);
181
+			flag && this.tabService.deleteRouteSnapshot(path);
182
+			this.tabService.setQueryParams('dateRange', [data.startDate + ' ' + '00:00:00', data.startDate + ' ' + '23:59:59']);
183
+			this.tabService.setQueryParams('defRange', null);
184
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
185
+			this.router.navigate([path], { replaceUrl: true });
153
 		}
186
 		}
154
-
155
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
156
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
157
 	}
187
 	}
158
 	
188
 	
159
 	// 数据下钻
189
 	// 数据下钻
@@ -178,8 +208,19 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
178
 					groupDTO: this.fieldConfig.fields.groupDTO,
208
 					groupDTO: this.fieldConfig.fields.groupDTO,
179
 					sourceDTO: this.fieldConfig.fields.sourceDTO,
209
 					sourceDTO: this.fieldConfig.fields.sourceDTO,
180
 					userDTO: this.fieldConfig.fields.userDTO,
210
 					userDTO: this.fieldConfig.fields.userDTO,
211
+					isHangDTO: {
212
+						id: 1,
213
+						name: "是"
214
+					},
181
 				}
215
 				}
182
 			}
216
 			}
217
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
218
+			let flag = this.tabService.tabs.some(v => v.path === path);
219
+			flag && this.tabService.deleteRouteSnapshot(path);
220
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
221
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
222
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
223
+			this.router.navigate([path], { replaceUrl: true });
183
 		}else{
224
 		}else{
184
 			query = {
225
 			query = {
185
 				startDate: data.startDate + ' ' + '00:00:00',
226
 				startDate: data.startDate + ' ' + '00:00:00',
@@ -199,12 +240,20 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
199
 					groupDTO: this.fieldConfig.fields.groupDTO,
240
 					groupDTO: this.fieldConfig.fields.groupDTO,
200
 					sourceDTO: this.fieldConfig.fields.sourceDTO,
241
 					sourceDTO: this.fieldConfig.fields.sourceDTO,
201
 					userDTO: this.fieldConfig.fields.userDTO,
242
 					userDTO: this.fieldConfig.fields.userDTO,
243
+					isHangDTO: {
244
+						id: 1,
245
+						name: "是"
246
+					},
202
 				}
247
 				}
203
 			}
248
 			}
249
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
250
+			let flag = this.tabService.tabs.some(v => v.path === path);
251
+			flag && this.tabService.deleteRouteSnapshot(path);
252
+			this.tabService.setQueryParams('dateRange', [data.startDate + ' ' + '00:00:00', data.startDate + ' ' + '23:59:59']);
253
+			this.tabService.setQueryParams('defRange', null);
254
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
255
+			this.router.navigate([path], { replaceUrl: true });
204
 		}
256
 		}
205
-
206
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
207
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
208
 	}
257
 	}
209
 	
258
 	
210
 	// 数据下钻
259
 	// 数据下钻
@@ -229,8 +278,24 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
229
 					groupDTO: this.fieldConfig.fields.groupDTO,
278
 					groupDTO: this.fieldConfig.fields.groupDTO,
230
 					sourceDTO: this.fieldConfig.fields.sourceDTO,
279
 					sourceDTO: this.fieldConfig.fields.sourceDTO,
231
 					userDTO: this.fieldConfig.fields.userDTO,
280
 					userDTO: this.fieldConfig.fields.userDTO,
281
+					evaluateDTO: {
282
+						"id": 20424,
283
+						"key": "incident_degree",
284
+						"name": "不满意",
285
+						"value": "1",
286
+						"orders": 5,
287
+						"extra1": "",
288
+						"extra2": ""
289
+					},
232
 				}
290
 				}
233
 			}
291
 			}
292
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
293
+			let flag = this.tabService.tabs.some(v => v.path === path);
294
+			flag && this.tabService.deleteRouteSnapshot(path);
295
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
296
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
297
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
298
+			this.router.navigate([path], { replaceUrl: true });
234
 		}else{
299
 		}else{
235
 			query = {
300
 			query = {
236
 				startDate: data.startDate + ' ' + '00:00:00',
301
 				startDate: data.startDate + ' ' + '00:00:00',
@@ -250,12 +315,25 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
250
 					groupDTO: this.fieldConfig.fields.groupDTO,
315
 					groupDTO: this.fieldConfig.fields.groupDTO,
251
 					sourceDTO: this.fieldConfig.fields.sourceDTO,
316
 					sourceDTO: this.fieldConfig.fields.sourceDTO,
252
 					userDTO: this.fieldConfig.fields.userDTO,
317
 					userDTO: this.fieldConfig.fields.userDTO,
318
+					evaluateDTO: {
319
+						"id": 20424,
320
+						"key": "incident_degree",
321
+						"name": "不满意",
322
+						"value": "1",
323
+						"orders": 5,
324
+						"extra1": "",
325
+						"extra2": ""
326
+					},
253
 				}
327
 				}
254
 			}
328
 			}
329
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
330
+			let flag = this.tabService.tabs.some(v => v.path === path);
331
+			flag && this.tabService.deleteRouteSnapshot(path);
332
+			this.tabService.setQueryParams('dateRange', [data.startDate + ' ' + '00:00:00', data.startDate + ' ' + '23:59:59']);
333
+			this.tabService.setQueryParams('defRange', null);
334
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
335
+			this.router.navigate([path], { replaceUrl: true });
255
 		}
336
 		}
256
-
257
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
258
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
259
 	}
337
 	}
260
 	
338
 	
261
   getQueryParams(){
339
   getQueryParams(){

+ 103 - 18
src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.ts

@@ -75,11 +75,16 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
75
 	// 汇总
75
 	// 汇总
76
 	viewDetail1(){
76
 	viewDetail1(){
77
 		let query = {
77
 		let query = {
78
-			startDate: this.customChangeDateComponent.startDate,
79
-			endDate: this.customChangeDateComponent.endDate
78
+			
80
 		}
79
 		}
80
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
81
+		let flag = this.tabService.tabs.some(v => v.path === path);
82
+		flag && this.tabService.deleteRouteSnapshot(path);
83
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
84
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
81
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
85
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
82
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
86
+		this.router.navigate([path], { replaceUrl: true });
87
+		// this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
83
 	}
88
 	}
84
 	
89
 	
85
 	// 挂起
90
 	// 挂起
@@ -88,11 +93,20 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
88
 			startDate: this.customChangeDateComponent.startDate,
93
 			startDate: this.customChangeDateComponent.startDate,
89
 			endDate: this.customChangeDateComponent.endDate,
94
 			endDate: this.customChangeDateComponent.endDate,
90
 			searchQuery:{
95
 			searchQuery:{
91
-				isHangId: 1
96
+				isHangId: 1,
97
+				isHangDTO:{
98
+					id: 1,
99
+					name: "是"
100
+				}
92
 			}
101
 			}
93
 		}
102
 		}
103
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
104
+		let flag = this.tabService.tabs.some(v => v.path === path);
105
+		flag && this.tabService.deleteRouteSnapshot(path);
106
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
107
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
94
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
108
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
95
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
109
+		this.router.navigate([path], { replaceUrl: true });
96
 	}
110
 	}
97
 	
111
 	
98
 	// 超时
112
 	// 超时
@@ -101,11 +115,20 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
101
 			startDate: this.customChangeDateComponent.startDate,
115
 			startDate: this.customChangeDateComponent.startDate,
102
 			endDate: this.customChangeDateComponent.endDate,
116
 			endDate: this.customChangeDateComponent.endDate,
103
 			searchQuery:{
117
 			searchQuery:{
104
-				overtimeId: 1
118
+				overtimeId: 1,
119
+				overtimeDTO:{
120
+					id: 1,
121
+					name: "是"
122
+				}
105
 			}
123
 			}
106
 		}
124
 		}
125
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
126
+		let flag = this.tabService.tabs.some(v => v.path === path);
127
+		flag && this.tabService.deleteRouteSnapshot(path);
128
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
129
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
107
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
130
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
108
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
131
+		this.router.navigate([path], { replaceUrl: true });
109
 	}
132
 	}
110
 	
133
 	
111
 	// 差评
134
 	// 差评
@@ -114,11 +137,25 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
114
 			startDate: this.customChangeDateComponent.startDate,
137
 			startDate: this.customChangeDateComponent.startDate,
115
 			endDate: this.customChangeDateComponent.endDate,
138
 			endDate: this.customChangeDateComponent.endDate,
116
 			searchQuery:{
139
 			searchQuery:{
117
-				evaluateId: 20424
140
+				evaluateId: 20424,
141
+				evaluateDTO: {
142
+						"id": 20424,
143
+						"key": "incident_degree",
144
+						"name": "不满意",
145
+						"value": "1",
146
+						"orders": 5,
147
+						"extra1": "",
148
+						"extra2": ""
149
+				}
118
 			}
150
 			}
119
 		}
151
 		}
152
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
153
+		let flag = this.tabService.tabs.some(v => v.path === path);
154
+		flag && this.tabService.deleteRouteSnapshot(path);
155
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
156
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
120
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
157
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
121
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
158
+		this.router.navigate([path], { replaceUrl: true });
122
 	}
159
 	}
123
 	
160
 	
124
 	// 维修处理top5
161
 	// 维修处理top5
@@ -129,18 +166,35 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
129
 			searchQuery:{
166
 			searchQuery:{
130
 				statusValue: 'close',
167
 				statusValue: 'close',
131
 				groupId:null,
168
 				groupId:null,
132
-				userId:null
169
+				groupDTO:null,
170
+				userId:null,
171
+				userDTO:null
133
 			}
172
 			}
134
 		}
173
 		}
135
 		if(this.activeIndex==0){
174
 		if(this.activeIndex==0){
136
 			query.searchQuery.userId = data.userId ? data.userId : -1
175
 			query.searchQuery.userId = data.userId ? data.userId : -1
176
+			query.searchQuery.userDTO = {
177
+				name: data.name,
178
+				id: data.userId
179
+			}
137
 			delete query.searchQuery.groupId
180
 			delete query.searchQuery.groupId
181
+			delete query.searchQuery.groupDTO
138
 		}else{
182
 		}else{
139
 			query.searchQuery.groupId = data.groupId ? data.groupId: -1
183
 			query.searchQuery.groupId = data.groupId ? data.groupId: -1
184
+			query.searchQuery.groupDTO = {
185
+				groupName: data.name,
186
+				id: data.groupId
187
+			}
140
 			delete query.searchQuery.userId
188
 			delete query.searchQuery.userId
189
+			delete query.searchQuery.userDTO
141
 		}
190
 		}
142
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
143
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
191
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
192
+		let flag = this.tabService.tabs.some(v => v.path === path);
193
+		flag && this.tabService.deleteRouteSnapshot(path);
194
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
195
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
196
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
197
+		this.router.navigate([path], { replaceUrl: true });
144
 	}
198
 	}
145
 	
199
 	
146
 	viewMaintain2(data){
200
 	viewMaintain2(data){
@@ -151,18 +205,40 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
151
 				statusValue: 'close',
205
 				statusValue: 'close',
152
 				groupId:null,
206
 				groupId:null,
153
 				userId:null,
207
 				userId:null,
154
-				overtimeId: 1
208
+				groupDTO:null,
209
+				userDTO:null,
210
+				overtimeId: 1,
211
+				overtimeDTO:{
212
+					id: 1,
213
+					name: "是"
214
+				}
155
 			}
215
 			}
156
 		}
216
 		}
217
+		
157
 		if(this.activeIndex==0){
218
 		if(this.activeIndex==0){
158
 			query.searchQuery.userId = data.userId ? data.userId : -1
219
 			query.searchQuery.userId = data.userId ? data.userId : -1
220
+			query.searchQuery.userDTO = {
221
+				name: data.name,
222
+				id: data.userId
223
+			}
159
 			delete query.searchQuery.groupId
224
 			delete query.searchQuery.groupId
225
+			delete query.searchQuery.groupDTO
160
 		}else{
226
 		}else{
161
 			query.searchQuery.groupId = data.groupId ? data.groupId: -1
227
 			query.searchQuery.groupId = data.groupId ? data.groupId: -1
228
+			query.searchQuery.groupDTO = {
229
+				groupName: data.name,
230
+				id: data.groupId
231
+			}
162
 			delete query.searchQuery.userId
232
 			delete query.searchQuery.userId
233
+			delete query.searchQuery.userDTO
163
 		}
234
 		}
164
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
165
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
235
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
236
+		let flag = this.tabService.tabs.some(v => v.path === path);
237
+		flag && this.tabService.deleteRouteSnapshot(path);
238
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
239
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
240
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
241
+		this.router.navigate([path], { replaceUrl: true });
166
 	}
242
 	}
167
 	
243
 	
168
 	// 课科室费用top5
244
 	// 课科室费用top5
@@ -175,8 +251,13 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
175
 				statusValue: 'close',
251
 				statusValue: 'close',
176
 			}
252
 			}
177
 		}
253
 		}
178
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
179
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
254
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
255
+		let flag = this.tabService.tabs.some(v => v.path === path);
256
+		flag && this.tabService.deleteRouteSnapshot(path);
257
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
258
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
259
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
260
+		this.router.navigate([path], { replaceUrl: true });
180
 	}
261
 	}
181
 	
262
 	
182
 	// 维修处理类型切换
263
 	// 维修处理类型切换
@@ -457,6 +538,7 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
457
     let flag = this.tabService.tabs.some(v => v.path === path);
538
     let flag = this.tabService.tabs.some(v => v.path === path);
458
     flag && this.tabService.deleteRouteSnapshot(path);
539
     flag && this.tabService.deleteRouteSnapshot(path);
459
     this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
540
     this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
541
+    this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
460
     this.router.navigate([path], { replaceUrl: true });
542
     this.router.navigate([path], { replaceUrl: true });
461
 	}
543
 	}
462
 
544
 
@@ -575,7 +657,10 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
575
 		this.dateRange = [];
657
 		this.dateRange = [];
576
 		this.activeIndex = 0;
658
 		this.activeIndex = 0;
577
     this.customChangeDateComponent.resetByDate();
659
     this.customChangeDateComponent.resetByDate();
578
-		this.search();
660
+		sessionStorage.removeItem('maintenanceData');
661
+		setTimeout(_=>{
662
+			this.search();
663
+		})
579
 	}
664
 	}
580
 
665
 
581
   // 搜索
666
   // 搜索

+ 78 - 12
src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.ts

@@ -102,13 +102,21 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
102
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
102
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
103
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
103
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
104
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
104
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
105
-					companyDTO: item || undefined,
105
+					companyDTO:{
106
+						name: data.companyName,
107
+						id: data.companyId ? data.companyId : -1,
108
+					}
106
 				}
109
 				}
107
 			}
110
 			}
108
 		}
111
 		}
109
 
112
 
110
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
111
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
113
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
114
+		let flag = this.tabService.tabs.some(v => v.path === path);
115
+		flag && this.tabService.deleteRouteSnapshot(path);
116
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
117
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
118
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
119
+		this.router.navigate([path], { replaceUrl: true });
112
 	}
120
 	}
113
 	
121
 	
114
 	// 数据下钻
122
 	// 数据下钻
@@ -139,6 +147,10 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
139
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
147
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
140
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
148
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
141
 					companyDTO: item || undefined,
149
 					companyDTO: item || undefined,
150
+					overtimeDTO:{
151
+						id: 1,
152
+						name: "是"
153
+					},
142
 				}
154
 				}
143
 			}
155
 			}
144
 		}else{
156
 		}else{
@@ -161,13 +173,25 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
161
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
173
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
162
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
174
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
163
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
175
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
164
-					companyDTO: item || undefined,
176
+					companyDTO:{
177
+						name: data.companyName,
178
+						id: data.companyId ? data.companyId : -1,
179
+					},
180
+					overtimeDTO:{
181
+						id: 1,
182
+						name: "是"
183
+					},
165
 				}
184
 				}
166
 			}
185
 			}
167
 		}
186
 		}
168
 
187
 
169
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
170
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
188
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
189
+		let flag = this.tabService.tabs.some(v => v.path === path);
190
+		flag && this.tabService.deleteRouteSnapshot(path);
191
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
192
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
193
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
194
+		this.router.navigate([path], { replaceUrl: true });
171
 	}
195
 	}
172
 	
196
 	
173
 	// 数据下钻
197
 	// 数据下钻
@@ -198,6 +222,10 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
198
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
222
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
199
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
223
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
200
 					companyDTO: item || undefined,
224
 					companyDTO: item || undefined,
225
+					isHangDTO:{
226
+						id: 1,
227
+						name: "是"
228
+					},
201
 				}
229
 				}
202
 			}
230
 			}
203
 		}else{
231
 		}else{
@@ -220,13 +248,25 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
220
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
248
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
221
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
249
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
222
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
250
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
223
-					companyDTO: item || undefined,
251
+					companyDTO:{
252
+						name: data.companyName,
253
+						id: data.companyId ? data.companyId : -1,
254
+					},
255
+					isHangDTO:{
256
+						id: 1,
257
+						name: "是"
258
+					},
224
 				}
259
 				}
225
 			}
260
 			}
226
 		}
261
 		}
227
 
262
 
228
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
229
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
263
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
264
+		let flag = this.tabService.tabs.some(v => v.path === path);
265
+		flag && this.tabService.deleteRouteSnapshot(path);
266
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
267
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
268
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
269
+		this.router.navigate([path], { replaceUrl: true });
230
 	}
270
 	}
231
 	
271
 	
232
 	// 数据下钻
272
 	// 数据下钻
@@ -257,6 +297,15 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
257
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
297
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
258
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
298
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
259
 					companyDTO: item || undefined,
299
 					companyDTO: item || undefined,
300
+					evaluateDTO: {
301
+						"id": 20424,
302
+						"key": "incident_degree",
303
+						"name": "不满意",
304
+						"value": "1",
305
+						"orders": 5,
306
+						"extra1": "",
307
+						"extra2": ""
308
+					}
260
 				}
309
 				}
261
 			}
310
 			}
262
 		}else{
311
 		}else{
@@ -279,13 +328,30 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
279
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
328
 					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
280
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
329
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
281
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
330
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
282
-					companyDTO: item || undefined,
331
+					companyDTO:{
332
+						name: data.companyName,
333
+						id: data.companyId ? data.companyId : -1,
334
+					},
335
+					evaluateDTO: {
336
+						"id": 20424,
337
+						"key": "incident_degree",
338
+						"name": "不满意",
339
+						"value": "1",
340
+						"orders": 5,
341
+						"extra1": "",
342
+						"extra2": ""
343
+					}
283
 				}
344
 				}
284
 			}
345
 			}
285
 		}
346
 		}
286
 
347
 
287
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
288
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
348
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
349
+		let flag = this.tabService.tabs.some(v => v.path === path);
350
+		flag && this.tabService.deleteRouteSnapshot(path);
351
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
352
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
353
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
354
+		this.router.navigate([path], { replaceUrl: true });
289
 	}
355
 	}
290
 	
356
 	
291
   getQueryParams(){
357
   getQueryParams(){

+ 4 - 3
src/app/views/new-statistics/maintenance-statistics/user-evaluate-statistics/user-evaluate-statistics.component.html

@@ -1,7 +1,7 @@
1
 <div class="searchDataWrap">
1
 <div class="searchDataWrap">
2
   <div class="searchData">
2
   <div class="searchData">
3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4
-    <div class="searchDataItem">
4
+<!--    <div class="searchDataItem">
5
       <span class="label">维修人员</span>:
5
       <span class="label">维修人员</span>:
6
       <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeUserInp($event)" nzAllowClear nzPlaceHolder="请选择维修人员" [(ngModel)]="userId" (nzOpenChange)="openChangeUser($event)">
6
       <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeUserInp($event)" nzAllowClear nzPlaceHolder="请选择维修人员" [(ngModel)]="userId" (nzOpenChange)="openChangeUser($event)">
7
         <ng-container *ngFor="let option of userList">
7
         <ng-container *ngFor="let option of userList">
@@ -11,7 +11,7 @@
11
           <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
11
           <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
12
         </nz-option>
12
         </nz-option>
13
       </nz-select>
13
       </nz-select>
14
-    </div>
14
+    </div> -->
15
   </div>
15
   </div>
16
   <div class="operation">
16
   <div class="operation">
17
     <i class="icon_transport transport-gengduo" nz-tooltip nzTooltipTitle="更多搜索" (click)="showMore()"></i>
17
     <i class="icon_transport transport-gengduo" nz-tooltip nzTooltipTitle="更多搜索" (click)="showMore()"></i>
@@ -20,8 +20,9 @@
20
     <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
20
     <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
21
   </div>
21
   </div>
22
 </div>
22
 </div>
23
-<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.repairDeptDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.floorDTO || fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO">
23
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.repairDeptDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.floorDTO || fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO">
24
   <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
24
   <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
25
+	<span>{{fieldConfig.fields.userDTO?.name}}</span>
25
   <span>{{fieldConfig.fields.category1DTO?.category}}</span>
26
   <span>{{fieldConfig.fields.category1DTO?.category}}</span>
26
   <span>{{fieldConfig.fields.category2DTO?.category}}</span>
27
   <span>{{fieldConfig.fields.category2DTO?.category}}</span>
27
   <span>{{fieldConfig.fields.category3DTO?.category}}</span>
28
   <span>{{fieldConfig.fields.category3DTO?.category}}</span>

+ 165 - 36
src/app/views/new-statistics/maintenance-statistics/user-evaluate-statistics/user-evaluate-statistics.component.ts

@@ -75,7 +75,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
75
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
75
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
76
 					floorId: this.fieldConfig.fields.floorId || undefined,
76
 					floorId: this.fieldConfig.fields.floorId || undefined,
77
 					groupId: this.fieldConfig.fields.groupId || undefined,
77
 					groupId: this.fieldConfig.fields.groupId || undefined,
78
-					userId: this.userId || undefined,
78
+					userId: this.fieldConfig.fields.userId || undefined,
79
 					placeId: this.fieldConfig.fields.floorId || undefined,
79
 					placeId: this.fieldConfig.fields.floorId || undefined,
80
 					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
80
 					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
81
 					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
81
 					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
@@ -83,7 +83,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
83
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
83
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
84
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
84
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
85
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
85
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
86
-					userDTO : item || undefined,
86
+					userDTO : this.fieldConfig.fields.userDTO || undefined,
87
 				}
87
 				}
88
 			}
88
 			}
89
 		}else{
89
 		}else{
@@ -106,13 +106,21 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
106
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
106
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
107
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
107
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
108
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
108
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
109
-					userDTO : item || undefined,
109
+					userDTO:{
110
+						name: data.userName,
111
+						id: data.userId ? data.userId : -1,
112
+					},
110
 				}
113
 				}
111
 			}
114
 			}
112
 		}
115
 		}
113
 
116
 
114
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
115
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
117
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
118
+		let flag = this.tabService.tabs.some(v => v.path === path);
119
+		flag && this.tabService.deleteRouteSnapshot(path);
120
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
121
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
122
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
123
+		this.router.navigate([path], { replaceUrl: true });
116
 	}
124
 	}
117
 	
125
 	
118
 	// 数据下钻
126
 	// 数据下钻
@@ -135,7 +143,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
135
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
143
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
136
 					floorId: this.fieldConfig.fields.floorId || undefined,
144
 					floorId: this.fieldConfig.fields.floorId || undefined,
137
 					groupId: this.fieldConfig.fields.groupId || undefined,
145
 					groupId: this.fieldConfig.fields.groupId || undefined,
138
-					userId: this.userId || undefined,
146
+					userId: this.fieldConfig.fields.userId || undefined,
139
 					placeId: this.fieldConfig.fields.floorId || undefined,
147
 					placeId: this.fieldConfig.fields.floorId || undefined,
140
 					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
148
 					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
141
 					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
149
 					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
@@ -143,7 +151,16 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
143
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
151
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
144
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
152
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
145
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
153
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
146
-					userDTO : item || undefined,
154
+					userDTO : this.fieldConfig.fields.userDTO || undefined,
155
+					evaluateDTO: {
156
+						"id": 20424,
157
+						"key": "incident_degree",
158
+						"name": "不满意",
159
+						"value": "1",
160
+						"orders": 5,
161
+						"extra1": "",
162
+						"extra2": ""
163
+					}
147
 				}
164
 				}
148
 			}
165
 			}
149
 		}else{
166
 		}else{
@@ -167,13 +184,30 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
167
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
184
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
168
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
185
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
169
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
186
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
170
-					userDTO : item || undefined,
187
+					userDTO:{
188
+						name: data.userName,
189
+						id: data.userId ? data.userId : -1,
190
+					},
191
+					evaluateDTO: {
192
+						"id": 20424,
193
+						"key": "incident_degree",
194
+						"name": "不满意",
195
+						"value": "1",
196
+						"orders": 5,
197
+						"extra1": "",
198
+						"extra2": ""
199
+					}
171
 				}
200
 				}
172
 			}
201
 			}
173
 		}
202
 		}
174
 
203
 
175
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
176
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
204
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
205
+		let flag = this.tabService.tabs.some(v => v.path === path);
206
+		flag && this.tabService.deleteRouteSnapshot(path);
207
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
208
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
209
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
210
+		this.router.navigate([path], { replaceUrl: true });
177
 	}
211
 	}
178
 	
212
 	
179
 	// 数据下钻
213
 	// 数据下钻
@@ -196,7 +230,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
196
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
230
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
197
 					floorId: this.fieldConfig.fields.floorId || undefined,
231
 					floorId: this.fieldConfig.fields.floorId || undefined,
198
 					groupId: this.fieldConfig.fields.groupId || undefined,
232
 					groupId: this.fieldConfig.fields.groupId || undefined,
199
-					userId: this.userId || undefined,
233
+					userId: this.fieldConfig.fields.userId || undefined,
200
 					placeId: this.fieldConfig.fields.floorId || undefined,
234
 					placeId: this.fieldConfig.fields.floorId || undefined,
201
 					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
235
 					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
202
 					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
236
 					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
@@ -204,7 +238,16 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
204
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
238
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
205
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
239
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
206
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
240
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
207
-					userDTO : item || undefined,
241
+					userDTO : this.fieldConfig.fields.userDTO || undefined,
242
+					evaluateDTO: {
243
+						"id": 20423,
244
+						"key": "incident_degree",
245
+						"name": "一般",
246
+						"value": "2",
247
+						"orders": 4,
248
+						"extra1": "",
249
+						"extra2": ""
250
+					}
208
 				}
251
 				}
209
 			}
252
 			}
210
 		}else{
253
 		}else{
@@ -228,13 +271,30 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
228
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
271
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
229
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
272
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
230
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
273
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
231
-					userDTO : item || undefined,
274
+					userDTO:{
275
+						name: data.userName,
276
+						id: data.userId ? data.userId : -1,
277
+					},
278
+					evaluateDTO: {
279
+						"id": 20423,
280
+						"key": "incident_degree",
281
+						"name": "一般",
282
+						"value": "2",
283
+						"orders": 4,
284
+						"extra1": "",
285
+						"extra2": ""
286
+					}
232
 				}
287
 				}
233
 			}
288
 			}
234
 		}
289
 		}
235
 
290
 
236
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
237
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
291
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
292
+		let flag = this.tabService.tabs.some(v => v.path === path);
293
+		flag && this.tabService.deleteRouteSnapshot(path);
294
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
295
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
296
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
297
+		this.router.navigate([path], { replaceUrl: true });
238
 	}
298
 	}
239
 	
299
 	
240
 	// 数据下钻
300
 	// 数据下钻
@@ -257,7 +317,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
257
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
317
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
258
 					floorId: this.fieldConfig.fields.floorId || undefined,
318
 					floorId: this.fieldConfig.fields.floorId || undefined,
259
 					groupId: this.fieldConfig.fields.groupId || undefined,
319
 					groupId: this.fieldConfig.fields.groupId || undefined,
260
-					userId: this.userId || undefined,
320
+					userId: this.fieldConfig.fields.userId || undefined,
261
 					placeId: this.fieldConfig.fields.floorId || undefined,
321
 					placeId: this.fieldConfig.fields.floorId || undefined,
262
 					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
322
 					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
263
 					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
323
 					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
@@ -265,7 +325,16 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
265
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
325
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
266
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
326
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
267
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
327
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
268
-					userDTO : item || undefined,
328
+					userDTO : this.fieldConfig.fields.userDTO || undefined,
329
+					evaluateDTO: {
330
+						"id": 20422,
331
+						"key": "incident_degree",
332
+						"name": "满意",
333
+						"value": "3",
334
+						"orders": 3,
335
+						"extra1": "",
336
+						"extra2": ""
337
+					}
269
 				}
338
 				}
270
 			}
339
 			}
271
 		}else{
340
 		}else{
@@ -289,13 +358,30 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
289
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
358
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
290
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
359
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
291
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
360
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
292
-					userDTO : item || undefined,
361
+					userDTO:{
362
+						name: data.userName,
363
+						id: data.userId ? data.userId : -1,
364
+					},
365
+					evaluateDTO: {
366
+						"id": 20422,
367
+						"key": "incident_degree",
368
+						"name": "满意",
369
+						"value": "3",
370
+						"orders": 3,
371
+						"extra1": "",
372
+						"extra2": ""
373
+					}
293
 				}
374
 				}
294
 			}
375
 			}
295
 		}
376
 		}
296
 
377
 
297
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
298
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
378
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
379
+		let flag = this.tabService.tabs.some(v => v.path === path);
380
+		flag && this.tabService.deleteRouteSnapshot(path);
381
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
382
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
383
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
384
+		this.router.navigate([path], { replaceUrl: true });
299
 	}
385
 	}
300
 	
386
 	
301
 	// 数据下钻
387
 	// 数据下钻
@@ -318,7 +404,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
318
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
404
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
319
 					floorId: this.fieldConfig.fields.floorId || undefined,
405
 					floorId: this.fieldConfig.fields.floorId || undefined,
320
 					groupId: this.fieldConfig.fields.groupId || undefined,
406
 					groupId: this.fieldConfig.fields.groupId || undefined,
321
-					userId: this.userId || undefined,
407
+					userId: this.fieldConfig.fields.userId || undefined,
322
 					placeId: this.fieldConfig.fields.floorId || undefined,
408
 					placeId: this.fieldConfig.fields.floorId || undefined,
323
 					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
409
 					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
324
 					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
410
 					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
@@ -326,7 +412,16 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
326
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
412
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
327
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
413
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
328
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
414
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
329
-					userDTO : item || undefined,
415
+					userDTO : this.fieldConfig.fields.userDTO || undefined,
416
+					evaluateDTO: {
417
+						"id": 20421,
418
+						"key": "incident_degree",
419
+						"name": "较满意",
420
+						"value": "2",
421
+						"orders": 2,
422
+						"extra1": "",
423
+						"extra2": ""
424
+					}
330
 				}
425
 				}
331
 			}
426
 			}
332
 		}else{
427
 		}else{
@@ -350,13 +445,30 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
350
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
445
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
351
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
446
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
352
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
447
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
353
-					userDTO : item || undefined,
448
+					userDTO:{
449
+						name: data.userName,
450
+						id: data.userId ? data.userId : -1,
451
+					},
452
+					evaluateDTO: {
453
+						"id": 20421,
454
+						"key": "incident_degree",
455
+						"name": "较满意",
456
+						"value": "2",
457
+						"orders": 2,
458
+						"extra1": "",
459
+						"extra2": ""
460
+					}
354
 				}
461
 				}
355
 			}
462
 			}
356
 		}
463
 		}
357
 
464
 
358
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
359
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
465
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
466
+		let flag = this.tabService.tabs.some(v => v.path === path);
467
+		flag && this.tabService.deleteRouteSnapshot(path);
468
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
469
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
470
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
471
+		this.router.navigate([path], { replaceUrl: true });
360
 	}
472
 	}
361
 	
473
 	
362
 	// 数据下钻
474
 	// 数据下钻
@@ -379,7 +491,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
379
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
491
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
380
 					floorId: this.fieldConfig.fields.floorId || undefined,
492
 					floorId: this.fieldConfig.fields.floorId || undefined,
381
 					groupId: this.fieldConfig.fields.groupId || undefined,
493
 					groupId: this.fieldConfig.fields.groupId || undefined,
382
-					userId: this.userId || undefined,
494
+					userId: this.fieldConfig.fields.userId || undefined,
383
 					placeId: this.fieldConfig.fields.floorId || undefined,
495
 					placeId: this.fieldConfig.fields.floorId || undefined,
384
 					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
496
 					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
385
 					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
497
 					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
@@ -387,7 +499,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
387
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
499
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
388
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
500
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
389
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
501
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
390
-					userDTO : item || undefined,
502
+					userDTO : this.fieldConfig.fields.userDTO || undefined,
391
 				}
503
 				}
392
 			}
504
 			}
393
 		}else{
505
 		}else{
@@ -411,13 +523,30 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
411
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
523
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
412
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
524
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
413
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
525
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
414
-					userDTO : item || undefined,
526
+					userDTO:{
527
+						name: data.userName,
528
+						id: data.userId ? data.userId : -1,
529
+					},
530
+					evaluateDTO: {
531
+						"id": 20420,
532
+						"key": "incident_degree",
533
+						"name": "非常满意",
534
+						"value": "1",
535
+						"orders": 1,
536
+						"extra1": "",
537
+						"extra2": ""
538
+					}
415
 				}
539
 				}
416
 			}
540
 			}
417
 		}
541
 		}
418
 
542
 
419
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
420
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
543
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
544
+		let flag = this.tabService.tabs.some(v => v.path === path);
545
+		flag && this.tabService.deleteRouteSnapshot(path);
546
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
547
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
548
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
549
+		this.router.navigate([path], { replaceUrl: true });
421
 	}
550
 	}
422
 	
551
 	
423
   getQueryParams(){
552
   getQueryParams(){
@@ -487,12 +616,12 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
487
       hosId: this.hosId || undefined,
616
       hosId: this.hosId || undefined,
488
       dutyId: this.dutyId || undefined,
617
       dutyId: this.dutyId || undefined,
489
       parentDutyId: this.parentDutyId || undefined,
618
       parentDutyId: this.parentDutyId || undefined,
490
-      userId: this.userId || undefined,
619
+      userId: this.fieldConfig.fields.userId || undefined,
491
       buildingId: this.fieldConfig.fields.buildingId || undefined,
620
       buildingId: this.fieldConfig.fields.buildingId || undefined,
492
       placeId: this.fieldConfig.fields.floorId || undefined,
621
       placeId: this.fieldConfig.fields.floorId || undefined,
493
       categoryId: this.fieldConfig.fields.categoryId || undefined,
622
       categoryId: this.fieldConfig.fields.categoryId || undefined,
494
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
623
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
495
-      groupId: this.fieldConfig.fields.groupId || undefined,
624
+      groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
496
       repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
625
       repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
497
     };
626
     };
498
     if (field && sort) {
627
     if (field && sort) {
@@ -540,12 +669,12 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
540
       hosId: this.hosId || undefined,
669
       hosId: this.hosId || undefined,
541
       dutyId: this.dutyId || undefined,
670
       dutyId: this.dutyId || undefined,
542
       parentDutyId: this.parentDutyId || undefined,
671
       parentDutyId: this.parentDutyId || undefined,
543
-      userId: this.userId || undefined,
672
+      userId: this.fieldConfig.fields.userId || undefined,
544
       buildingId: this.fieldConfig.fields.buildingId || undefined,
673
       buildingId: this.fieldConfig.fields.buildingId || undefined,
545
       placeId: this.fieldConfig.fields.floorId || undefined,
674
       placeId: this.fieldConfig.fields.floorId || undefined,
546
       categoryId: this.fieldConfig.fields.categoryId || undefined,
675
       categoryId: this.fieldConfig.fields.categoryId || undefined,
547
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
676
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
548
-      groupId: this.fieldConfig.fields.groupId || undefined,
677
+      groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
549
       repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
678
       repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
550
     };
679
     };
551
     if (this.sortCurrentKey && this.sortCurrentValue) {
680
     if (this.sortCurrentKey && this.sortCurrentValue) {
@@ -628,8 +757,8 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
628
 
757
 
629
   // 详细搜索
758
   // 详细搜索
630
   fieldConfig:any = {
759
   fieldConfig:any = {
631
-    fields: {buildingId: undefined, floorId: undefined, categoryId: undefined, groupId: undefined, repairDeptId: undefined},
632
-    config: {buildingAndFloor: true, category123: true, group: true, repairDept: true},
760
+    fields: {buildingId: undefined, floorId: undefined, categoryId: undefined, groupId: undefined, repairDeptId: undefined, userId: undefined},
761
+    config: {buildingAndFloor: true, category123: true, groupAndUser: true, repairDept: true},
633
   }
762
   }
634
   showSearchMore:boolean = false;
763
   showSearchMore:boolean = false;
635
   showMore(){
764
   showMore(){

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

@@ -1,7 +1,7 @@
1
 <div class="searchDataWrap">
1
 <div class="searchDataWrap">
2
   <div class="searchData">
2
   <div class="searchData">
3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4
-    <div class="searchDataItem">
4
+ <!--   <div class="searchDataItem">
5
       <span class="label">维修人员</span>:
5
       <span class="label">维修人员</span>:
6
       <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeUserInp($event)" nzAllowClear nzPlaceHolder="请选择维修人员" [(ngModel)]="userId" (nzOpenChange)="openChangeUser($event)">
6
       <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeUserInp($event)" nzAllowClear nzPlaceHolder="请选择维修人员" [(ngModel)]="userId" (nzOpenChange)="openChangeUser($event)">
7
         <ng-container *ngFor="let option of userList">
7
         <ng-container *ngFor="let option of userList">
@@ -11,7 +11,7 @@
11
           <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
11
           <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
12
         </nz-option>
12
         </nz-option>
13
       </nz-select>
13
       </nz-select>
14
-    </div>
14
+    </div> -->
15
   </div>
15
   </div>
16
   <div class="operation">
16
   <div class="operation">
17
     <i class="icon_transport transport-gengduo" nz-tooltip nzTooltipTitle="更多搜索" (click)="showMore()"></i>
17
     <i class="icon_transport transport-gengduo" nz-tooltip nzTooltipTitle="更多搜索" (click)="showMore()"></i>
@@ -20,8 +20,9 @@
20
     <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
20
     <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
21
   </div>
21
   </div>
22
 </div>
22
 </div>
23
-<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.floorDTO || fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO">
23
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.floorDTO || fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO">
24
   <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
24
   <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
25
+	<span>{{fieldConfig.fields.userDTO?.name}}</span>
25
   <span>{{fieldConfig.fields.category1DTO?.category}}</span>
26
   <span>{{fieldConfig.fields.category1DTO?.category}}</span>
26
   <span>{{fieldConfig.fields.category2DTO?.category}}</span>
27
   <span>{{fieldConfig.fields.category2DTO?.category}}</span>
27
   <span>{{fieldConfig.fields.category3DTO?.category}}</span>
28
   <span>{{fieldConfig.fields.category3DTO?.category}}</span>

+ 102 - 40
src/app/views/new-statistics/maintenance-statistics/user-statistics/user-statistics.component.ts

@@ -59,17 +59,13 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
59
 	// 数据下钻
59
 	// 数据下钻
60
 	viewDetail1(data, type){
60
 	viewDetail1(data, type){
61
 		let query = null
61
 		let query = null
62
-		let item = null;
63
-		if(this.userId){
64
-		  item = this.userList.find(item => item.id == this.userId);
65
-		}
66
 		if(type=='all'){
62
 		if(type=='all'){
67
 			query = {
63
 			query = {
68
 				startDate: this.customChangeDateComponent.startDate || undefined,
64
 				startDate: this.customChangeDateComponent.startDate || undefined,
69
 				endDate: this.customChangeDateComponent.endDate || undefined,
65
 				endDate: this.customChangeDateComponent.endDate || undefined,
70
 				searchQuery:{
66
 				searchQuery:{
71
 					statusValue: 'close',
67
 					statusValue: 'close',
72
-					userId: this.userId,
68
+					userId: this.fieldConfig.fields.userId || undefined,
73
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
69
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
74
 					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
70
 					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
75
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
71
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
@@ -82,7 +78,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
82
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
78
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
83
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
79
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
84
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
80
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
85
-					userDTO : item || undefined
81
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
86
 				}
82
 				}
87
 			}
83
 			}
88
 		}else{
84
 		}else{
@@ -91,7 +87,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
91
 				endDate: this.customChangeDateComponent.endDate || undefined,
87
 				endDate: this.customChangeDateComponent.endDate || undefined,
92
 				searchQuery:{
88
 				searchQuery:{
93
 					statusValue: 'close',
89
 					statusValue: 'close',
94
-					userId: data.userId ? data.userId : -1,
90
+					userId: data.userId ? data.userId : -1 || undefined,
95
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
91
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
96
 					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
92
 					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
97
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
93
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
@@ -104,22 +100,30 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
104
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
100
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
105
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
101
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
106
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
102
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
107
-					userDTO : item || undefined
103
+					userDTO:{
104
+						name: data.userName,
105
+						id: data.userId ? data.userId : -1,
106
+					}
108
 				}
107
 				}
109
 			}
108
 			}
110
 		}
109
 		}
111
 
110
 
112
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
113
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
111
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
112
+		let flag = this.tabService.tabs.some(v => v.path === path);
113
+		flag && this.tabService.deleteRouteSnapshot(path);
114
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
115
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
116
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
117
+		this.router.navigate([path], { replaceUrl: true });
114
 	}
118
 	}
115
 	
119
 	
116
 	// 数据下钻
120
 	// 数据下钻
117
 	viewDetail2(data, type){
121
 	viewDetail2(data, type){
118
 		let query = null
122
 		let query = null
119
-		let item = null;
120
-		if(this.userId){
121
-		  item = this.userList.find(item => item.id == this.userId);
122
-		}
123
+		// let item = null;
124
+		// if(this.userId){
125
+		//   item = this.userList.find(item => item.id == this.userId);
126
+		// }
123
 		if(type=='all'){
127
 		if(type=='all'){
124
 			query = {
128
 			query = {
125
 				startDate: this.customChangeDateComponent.startDate || undefined,
129
 				startDate: this.customChangeDateComponent.startDate || undefined,
@@ -127,7 +131,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
127
 				searchQuery:{
131
 				searchQuery:{
128
 					statusValue: 'close',
132
 					statusValue: 'close',
129
 					overtimeId: 1,
133
 					overtimeId: 1,
130
-					userId: this.userId,
134
+					userId: this.fieldConfig.fields.userId || undefined,
131
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
135
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
132
 					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
136
 					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
133
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
137
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
@@ -140,7 +144,11 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
140
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
144
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
141
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
145
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
142
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
146
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
143
-					userDTO : item || undefined
147
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
148
+					overtimeDTO:{
149
+						id: 1,
150
+						name: "是"
151
+					},
144
 				}
152
 				}
145
 			}
153
 			}
146
 		}else{
154
 		}else{
@@ -163,22 +171,34 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
163
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
171
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
164
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
172
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
165
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
173
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
166
-					userDTO : item || undefined
174
+					userDTO:{
175
+						name: data.userName,
176
+						id: data.userId ? data.userId : -1,
177
+					},
178
+					overtimeDTO:{
179
+						id: 1,
180
+						name: "是"
181
+					},
167
 				}
182
 				}
168
 			}
183
 			}
169
 		}
184
 		}
170
 
185
 
171
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
172
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
186
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
187
+		let flag = this.tabService.tabs.some(v => v.path === path);
188
+		flag && this.tabService.deleteRouteSnapshot(path);
189
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
190
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
191
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
192
+		this.router.navigate([path], { replaceUrl: true });
173
 	}
193
 	}
174
 	
194
 	
175
 	// 数据下钻
195
 	// 数据下钻
176
 	viewDetail3(data, type){
196
 	viewDetail3(data, type){
177
 		let query = null
197
 		let query = null
178
-		let item = null;
179
-		if(this.userId){
180
-		  item = this.userList.find(item => item.id == this.userId);
181
-		}
198
+		// let item = null;
199
+		// if(this.userId){
200
+		//   item = this.userList.find(item => item.id == this.userId);
201
+		// }
182
 		if(type=='all'){
202
 		if(type=='all'){
183
 			query = {
203
 			query = {
184
 				startDate: this.customChangeDateComponent.startDate || undefined,
204
 				startDate: this.customChangeDateComponent.startDate || undefined,
@@ -186,7 +206,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
186
 				searchQuery:{
206
 				searchQuery:{
187
 					statusValue: 'close',
207
 					statusValue: 'close',
188
 					isHangId: 1,
208
 					isHangId: 1,
189
-					userId: this.userId,
209
+					userId: this.fieldConfig.fields.userId || undefined,
190
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
210
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
191
 					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
211
 					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
192
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
212
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
@@ -199,7 +219,11 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
199
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
219
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
200
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
220
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
201
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
221
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
202
-					userDTO : item || undefined
222
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
223
+					isHangDTO:{
224
+						id: 1,
225
+						name: "是"
226
+					},
203
 				}
227
 				}
204
 			}
228
 			}
205
 		}else{
229
 		}else{
@@ -222,13 +246,25 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
222
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
246
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
223
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
247
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
224
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
248
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
225
-					userDTO : item || undefined
249
+					userDTO:{
250
+						name: data.userName,
251
+						id: data.userId ? data.userId : -1,
252
+					},
253
+					isHangDTO:{
254
+						id: 1,
255
+						name: "是"
256
+					},
226
 				}
257
 				}
227
 			}
258
 			}
228
 		}
259
 		}
229
 
260
 
230
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
231
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
261
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
262
+		let flag = this.tabService.tabs.some(v => v.path === path);
263
+		flag && this.tabService.deleteRouteSnapshot(path);
264
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
265
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
266
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
267
+		this.router.navigate([path], { replaceUrl: true });
232
 	}
268
 	}
233
 	
269
 	
234
 	// 数据下钻
270
 	// 数据下钻
@@ -245,7 +281,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
245
 				searchQuery:{
281
 				searchQuery:{
246
 					statusValue: 'close',
282
 					statusValue: 'close',
247
 					evaluateId: 20424,
283
 					evaluateId: 20424,
248
-					userId: this.userId,
284
+					userId: this.fieldConfig.fields.userId || undefined,
249
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
285
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
250
 					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
286
 					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
251
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
287
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
@@ -258,7 +294,16 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
258
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
294
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
259
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
295
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
260
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
296
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
261
-					userDTO : item || undefined
297
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
298
+					evaluateDTO: {
299
+						"id": 20424,
300
+						"key": "incident_degree",
301
+						"name": "不满意",
302
+						"value": "1",
303
+						"orders": 5,
304
+						"extra1": "",
305
+						"extra2": ""
306
+					}
262
 				}
307
 				}
263
 			}
308
 			}
264
 		}else{
309
 		}else{
@@ -281,13 +326,30 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
281
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
326
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
282
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
327
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
283
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
328
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
284
-					userDTO : item || undefined
329
+					userDTO:{
330
+						name: data.userName,
331
+						id: data.userId ? data.userId : -1,
332
+					},
333
+					evaluateDTO: {
334
+						"id": 20424,
335
+						"key": "incident_degree",
336
+						"name": "不满意",
337
+						"value": "1",
338
+						"orders": 5,
339
+						"extra1": "",
340
+						"extra2": ""
341
+					}
285
 				}
342
 				}
286
 			}
343
 			}
287
 		}
344
 		}
288
 
345
 
289
-		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
290
-		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
346
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
347
+		let flag = this.tabService.tabs.some(v => v.path === path);
348
+		flag && this.tabService.deleteRouteSnapshot(path);
349
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
350
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
351
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
352
+		this.router.navigate([path], { replaceUrl: true });
291
 	}
353
 	}
292
 	
354
 	
293
   getQueryParams(){
355
   getQueryParams(){
@@ -357,12 +419,12 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
357
       hosId: this.hosId || undefined,
419
       hosId: this.hosId || undefined,
358
       dutyId: this.dutyId || undefined,
420
       dutyId: this.dutyId || undefined,
359
       parentDutyId: this.parentDutyId || undefined,
421
       parentDutyId: this.parentDutyId || undefined,
360
-      userId: this.userId || undefined,
422
+      userId: this.fieldConfig.fields.userId || undefined,
361
       buildingId: this.fieldConfig.fields.buildingId || undefined,
423
       buildingId: this.fieldConfig.fields.buildingId || undefined,
362
       placeId: this.fieldConfig.fields.floorId || undefined,
424
       placeId: this.fieldConfig.fields.floorId || undefined,
363
       categoryId: this.fieldConfig.fields.categoryId || undefined,
425
       categoryId: this.fieldConfig.fields.categoryId || undefined,
364
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
426
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
365
-      groupId: this.fieldConfig.fields.groupId || undefined,
427
+			groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
366
     };
428
     };
367
     if (field && sort) {
429
     if (field && sort) {
368
       postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
430
       postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
@@ -409,12 +471,12 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
409
       hosId: this.hosId || undefined,
471
       hosId: this.hosId || undefined,
410
       dutyId: this.dutyId || undefined,
472
       dutyId: this.dutyId || undefined,
411
       parentDutyId: this.parentDutyId || undefined,
473
       parentDutyId: this.parentDutyId || undefined,
412
-      userId: this.userId || undefined,
474
+      userId: this.fieldConfig.fields.userId || undefined,
413
       buildingId: this.fieldConfig.fields.buildingId || undefined,
475
       buildingId: this.fieldConfig.fields.buildingId || undefined,
414
       placeId: this.fieldConfig.fields.floorId || undefined,
476
       placeId: this.fieldConfig.fields.floorId || undefined,
415
       categoryId: this.fieldConfig.fields.categoryId || undefined,
477
       categoryId: this.fieldConfig.fields.categoryId || undefined,
416
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
478
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
417
-      groupId: this.fieldConfig.fields.groupId || undefined,
479
+      groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
418
     };
480
     };
419
     if (this.sortCurrentKey && this.sortCurrentValue) {
481
     if (this.sortCurrentKey && this.sortCurrentValue) {
420
       postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
482
       postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
@@ -448,7 +510,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
448
 		this.sortCurrentValue = "";
510
 		this.sortCurrentValue = "";
449
 		this.sortCurrent = {};
511
 		this.sortCurrent = {};
450
     this.dateRange = []
512
     this.dateRange = []
451
-    this.userId = undefined;
513
+    // this.userId = undefined;
452
     this.fieldConfig.fields = {buildingId: undefined, floorId: undefined, categoryId: undefined, groupId: undefined};
514
     this.fieldConfig.fields = {buildingId: undefined, floorId: undefined, categoryId: undefined, groupId: undefined};
453
     this.customChangeDateComponent.resetByDate();
515
     this.customChangeDateComponent.resetByDate();
454
 		sessionStorage.removeItem('maintenanceData');
516
 		sessionStorage.removeItem('maintenanceData');
@@ -496,8 +558,8 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
496
 
558
 
497
   // 详细搜索
559
   // 详细搜索
498
   fieldConfig:any = {
560
   fieldConfig:any = {
499
-    fields: {buildingId: undefined, floorId: undefined, categoryId: undefined, groupId: undefined},
500
-    config: {buildingAndFloor: true, category123: true, group: true},
561
+    fields: {buildingId: undefined, floorId: undefined, categoryId: undefined, groupId: undefined, userId: undefined},
562
+    config: {buildingAndFloor: true, category123: true, groupAndUser: true},
501
   }
563
   }
502
   showSearchMore:boolean = false;
564
   showSearchMore:boolean = false;
503
   showMore(){
565
   showMore(){

+ 10 - 0
src/app/views/operation-config/operation-config.component.html

@@ -89,6 +89,16 @@
89
 				  <nz-form-label class="label">是否开启病理申请单</nz-form-label>
89
 				  <nz-form-label class="label">是否开启病理申请单</nz-form-label>
90
 				  <nz-checkbox-group [(ngModel)]="isPathologyForm"></nz-checkbox-group>
90
 				  <nz-checkbox-group [(ngModel)]="isPathologyForm"></nz-checkbox-group>
91
 				</div>
91
 				</div>
92
+				<!-- 是否根据首台标识 -->
93
+				<div class="display_flex align-items_center mb8">
94
+				  <nz-form-label class="label">是否根据首台标识</nz-form-label>
95
+				  <nz-checkbox-group [(ngModel)]="firstOperation"></nz-checkbox-group>
96
+				</div>
97
+				<!-- 限定时间 -->
98
+				<div class="display_flex align-items_center mb8">
99
+				  <nz-form-label class="label">限定时间</nz-form-label>
100
+					<nz-time-picker [(ngModel)]="firstOperationLimitTime" nzFormat="HH:mm" nzPlaceHolder="限定时间"></nz-time-picker>
101
+				</div>
92
       </div>
102
       </div>
93
       <!-- 自动建单配置 -->
103
       <!-- 自动建单配置 -->
94
       <div *ngIf="tabModalName=='automaticOrderCreation'">
104
       <div *ngIf="tabModalName=='automaticOrderCreation'">

+ 10 - 0
src/app/views/operation-config/operation-config.component.ts

@@ -52,6 +52,12 @@ export class OperationConfigComponent implements OnInit {
52
 	isFrozenSpecimen:any[] = [
52
 	isFrozenSpecimen:any[] = [
53
 	  {label:'是否开启',value: 0}
53
 	  {label:'是否开启',value: 0}
54
 	];
54
 	];
55
+	// 是否根据首台标识
56
+	firstOperation:any[] = [
57
+	  {label:'是否开启',value: 0}
58
+	];
59
+	// 限定时间
60
+	firstOperationLimitTime: Date | null = null;
55
   // 建单时间
61
   // 建单时间
56
   autoTime:Date | null = null;
62
   autoTime:Date | null = null;
57
   tasktype1Id:any;
63
   tasktype1Id:any;
@@ -154,6 +160,8 @@ export class OperationConfigComponent implements OnInit {
154
 			isPathologyForm: this.isPathologyForm[0].checked ? 1 : 0,
160
 			isPathologyForm: this.isPathologyForm[0].checked ? 1 : 0,
155
 			isFrozenSpecimen: this.isFrozenSpecimen[0].checked ? 1 : 0,
161
 			isFrozenSpecimen: this.isFrozenSpecimen[0].checked ? 1 : 0,
156
       cleanTypeId: this.cleanTypeId || undefined,
162
       cleanTypeId: this.cleanTypeId || undefined,
163
+			firstOperation: this.firstOperation[0].checked ? 1 : 0,
164
+			firstOperationLimitTime: this.firstOperationLimitTime ? format(startOfMinute(this.firstOperationLimitTime), 'yyyy-MM-dd HH:mm:ss') : undefined
157
     };
165
     };
158
     let postData = Object.assign({}, this.configs, editData);
166
     let postData = Object.assign({}, this.configs, editData);
159
     console.log(postData);
167
     console.log(postData);
@@ -343,6 +351,8 @@ export class OperationConfigComponent implements OnInit {
343
                 this.surgeryBegin[0].checked = this.configs.surgeryBegin == 1;
351
                 this.surgeryBegin[0].checked = this.configs.surgeryBegin == 1;
344
 								this.isPathologyForm[0].checked = this.configs.isPathologyForm == 1;
352
 								this.isPathologyForm[0].checked = this.configs.isPathologyForm == 1;
345
 								this.isFrozenSpecimen[0].checked = this.configs.isFrozenSpecimen == 1;
353
 								this.isFrozenSpecimen[0].checked = this.configs.isFrozenSpecimen == 1;
354
+								this.firstOperation[0].checked = this.configs.firstOperation == 1;
355
+								this.firstOperationLimitTime = this.configs.firstOperationLimitTime ? new Date(this.configs.firstOperationLimitTime) : null;
346
 							}
356
 							}
347
             });
357
             });
348
         }else{
358
         }else{

+ 29 - 2
src/app/views/operation-notice/operation-notice.component.html

@@ -24,7 +24,7 @@
24
             <label class="tabContent_checkbox" nz-checkbox [(ngModel)]="tab.phoneFlag">短信通知内容</label>
24
             <label class="tabContent_checkbox" nz-checkbox [(ngModel)]="tab.phoneFlag">短信通知内容</label>
25
             <div class="tabContent_textarea">
25
             <div class="tabContent_textarea">
26
               <textarea rows="4" nz-input [(ngModel)]="tab.phoneContent"></textarea>
26
               <textarea rows="4" nz-input [(ngModel)]="tab.phoneContent"></textarea>
27
-              <p>备注:[$变量名称$]可添加<span *ngFor="let item of variableNames; let last = last;" (click)="writeIn(tab, item, $event, 'phoneContent')"><strong>{{item}}</strong><em *ngIf="!last">、</em><em *ngIf="last">。</em></span></p>
27
+              <p>字段:[$变量名称$]可添加<span *ngFor="let item of variableNames; let last = last;" (click)="writeIn(tab, item, $event, 'phoneContent')"><strong>{{item}}</strong><em *ngIf="!last">、</em><em *ngIf="last">。</em></span></p>
28
             </div>
28
             </div>
29
           </div>
29
           </div>
30
 
30
 
@@ -32,9 +32,36 @@
32
             <label class="tabContent_checkbox" nz-checkbox [(ngModel)]="tab.wechatFlag">微信通知内容</label>
32
             <label class="tabContent_checkbox" nz-checkbox [(ngModel)]="tab.wechatFlag">微信通知内容</label>
33
             <div class="tabContent_textarea">
33
             <div class="tabContent_textarea">
34
               <textarea rows="4" nz-input [(ngModel)]="tab.wechatContent"></textarea>
34
               <textarea rows="4" nz-input [(ngModel)]="tab.wechatContent"></textarea>
35
-              <p>备注:[$变量名称$]可添加<span *ngFor="let item of variableNames; let last = last;" (click)="writeIn(tab, item, $event, 'wechatContent')"><strong>{{item}}</strong><em *ngIf="!last">、</em><em *ngIf="last">。</em></span></p>
35
+              <p>字段:[$变量名称$]可添加<span *ngFor="let item of variableNames; let last = last;" (click)="writeIn(tab, item, $event, 'wechatContent')"><strong>{{item}}</strong><em *ngIf="!last">、</em><em *ngIf="last">。</em></span></p>
36
             </div>
36
             </div>
37
           </div>
37
           </div>
38
+					
39
+					<div class="tabContent">
40
+					  <label class="tabContent_checkbox" nz-checkbox [(ngModel)]="tab.outsideFlag">站外消息通知</label>
41
+					</div>
42
+					
43
+					<div class="tabContent">
44
+					  <label class="tabContent_checkbox">自定义标题</label>
45
+					  <div class="tabContent_textarea">
46
+					    <input rows="4" nz-input [(ngModel)]="tab.outsideTitle"/>
47
+					    <p>字段:[$变量名称$]可添加<span *ngFor="let item of variableNames; let last = last;" (click)="writeIn(tab, item, $event, 'outsideTitle')"><strong>{{item}}</strong><em *ngIf="!last">、</em><em *ngIf="last">。</em></span></p>
48
+					  </div>
49
+					</div>
50
+					
51
+					<div class="tabContent">
52
+					  <label class="tabContent_checkbox">消息内容</label>
53
+					  <div class="tabContent_textarea">
54
+					    <textarea rows="4" nz-input [(ngModel)]="tab.outsideContent"></textarea>
55
+					    <p>字段:[$变量名称$]可添加<span *ngFor="let item of variableNames; let last = last;" (click)="writeIn(tab, item, $event, 'outsideContent')"><strong>{{item}}</strong><em *ngIf="!last">、</em><em *ngIf="last">。</em></span></p>
56
+					  </div>
57
+					</div>
58
+					
59
+					<div class="tabContent" *ngIf="currentChoice.id != 1">
60
+					  <label class="tabContent_checkbox label">发送时间</label>
61
+					  <div class="tabContent_textarea">
62
+							<nz-time-picker [(ngModel)]="tab.sendTime" nzFormat="HH:mm" nzPlaceHolder="发送时间"></nz-time-picker>
63
+					  </div>
64
+					</div>
38
         </div>
65
         </div>
39
       </ng-container>
66
       </ng-container>
40
 
67
 

+ 7 - 1
src/app/views/operation-notice/operation-notice.component.less

@@ -185,7 +185,13 @@
185
       .tabContent{
185
       .tabContent{
186
         margin-bottom: 30px;
186
         margin-bottom: 30px;
187
         display: flex;
187
         display: flex;
188
-
188
+				
189
+				.label{
190
+					width: 116px !important;
191
+					display: flex;
192
+					align-items: center;
193
+				}
194
+				
189
         .tabContent_checkbox{
195
         .tabContent_checkbox{
190
           width: 130px;
196
           width: 130px;
191
         }
197
         }

+ 35 - 2
src/app/views/operation-notice/operation-notice.component.ts

@@ -3,6 +3,7 @@ import { ToolService } from 'src/app/services/tool.service';
3
 import { MainService } from 'src/app/services/main.service';
3
 import { MainService } from 'src/app/services/main.service';
4
 import { ActivatedRoute } from '@angular/router';
4
 import { ActivatedRoute } from '@angular/router';
5
 import { KeyValue } from '@angular/common';
5
 import { KeyValue } from '@angular/common';
6
+import { format, startOfMinute } from 'date-fns';
6
 
7
 
7
 @Component({
8
 @Component({
8
   selector: 'app-operation-notice',
9
   selector: 'app-operation-notice',
@@ -30,6 +31,10 @@ export class OperationNoticeComponent implements OnInit {
30
       wechatFlag: false,
31
       wechatFlag: false,
31
       wechatContent: '',
32
       wechatContent: '',
32
       orders: 1,
33
       orders: 1,
34
+			sendTime: new Date(),
35
+			outsideFlag: false,
36
+			outsideContent: '',
37
+			outsideTitle:'',
33
     },
38
     },
34
     {
39
     {
35
       role: 'docAssistant',
40
       role: 'docAssistant',
@@ -38,6 +43,10 @@ export class OperationNoticeComponent implements OnInit {
38
       wechatFlag: false,
43
       wechatFlag: false,
39
       wechatContent: '',
44
       wechatContent: '',
40
       orders: 2,
45
       orders: 2,
46
+			sendTime: new Date(),
47
+			outsideFlag: false,
48
+			outsideContent: '',
49
+			outsideTitle:'',
41
     },
50
     },
42
     {
51
     {
43
       role: 'anesthetist',
52
       role: 'anesthetist',
@@ -46,6 +55,10 @@ export class OperationNoticeComponent implements OnInit {
46
       wechatFlag: false,
55
       wechatFlag: false,
47
       wechatContent: '',
56
       wechatContent: '',
48
       orders: 3,
57
       orders: 3,
58
+			sendTime: new Date(),
59
+			outsideFlag: false,
60
+			outsideContent: '',
61
+			outsideTitle:'',
49
     },
62
     },
50
     {
63
     {
51
       role: 'patient',
64
       role: 'patient',
@@ -54,6 +67,10 @@ export class OperationNoticeComponent implements OnInit {
54
       wechatFlag: false,
67
       wechatFlag: false,
55
       wechatContent: '',
68
       wechatContent: '',
56
       orders: 4,
69
       orders: 4,
70
+			sendTime: new Date(),
71
+			outsideFlag: false,
72
+			outsideContent: '',
73
+			outsideTitle:'',
57
     },
74
     },
58
   ];
75
   ];
59
   tabNames = {
76
   tabNames = {
@@ -81,11 +98,23 @@ export class OperationNoticeComponent implements OnInit {
81
 
98
 
82
   //通知类型列表
99
   //通知类型列表
83
   getAllTaskType() {
100
   getAllTaskType() {
84
-    this.allTaskType = [{
101
+    this.allTaskType = [
102
+			{
85
       id: 1,
103
       id: 1,
86
       taskName: '手术即将开始通知',
104
       taskName: '手术即将开始通知',
87
       code: 'surgery_begin',
105
       code: 'surgery_begin',
88
-    }];
106
+    },
107
+		{
108
+		  id: 2,
109
+		  taskName: '下一日首台通知',
110
+		  code: 'next_day_first_surgery',
111
+		},
112
+		{
113
+		  id: 3,
114
+		  taskName: '当日首台通知',
115
+		  code: 'today_first_surgery',
116
+		}
117
+		];
89
     if (this.allTaskType.length) {
118
     if (this.allTaskType.length) {
90
       this.itemChoice(this.allTaskType[0]);
119
       this.itemChoice(this.allTaskType[0]);
91
     }
120
     }
@@ -115,6 +144,8 @@ export class OperationNoticeComponent implements OnInit {
115
           result.list.forEach(v => {
144
           result.list.forEach(v => {
116
             v.phoneFlag = v.phoneFlag === 1;
145
             v.phoneFlag = v.phoneFlag === 1;
117
             v.wechatFlag = v.wechatFlag === 1;
146
             v.wechatFlag = v.wechatFlag === 1;
147
+						v.outsideFlag = v.outsideFlag === 1;
148
+						v.sendTime = v.sendTime ? new Date(v.sendTime) : null; 
118
           })
149
           })
119
           let tabs = result.list || [];
150
           let tabs = result.list || [];
120
           if(tabs.length){
151
           if(tabs.length){
@@ -178,6 +209,8 @@ export class OperationNoticeComponent implements OnInit {
178
     this.tabs.forEach(v => {
209
     this.tabs.forEach(v => {
179
       v.phoneFlag = v.phoneFlag ? 1 : 0;
210
       v.phoneFlag = v.phoneFlag ? 1 : 0;
180
       v.wechatFlag = v.wechatFlag ? 1 : 0;
211
       v.wechatFlag = v.wechatFlag ? 1 : 0;
212
+			v.outsideFlag = v.outsideFlag ? 1 : 0;
213
+			v.sendTime = v.sendTime ? format(startOfMinute(v.sendTime), 'yyyy-MM-dd HH:mm:ss') : null
181
     })
214
     })
182
     this.mainService
215
     this.mainService
183
       .simplePost("addListData", "transportMessage", this.tabs)
216
       .simplePost("addListData", "transportMessage", this.tabs)

+ 14 - 0
src/app/views/operation-search/operation-search-routing.module.ts

@@ -0,0 +1,14 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { OperationSearchComponent } from './operation-search.component';
4
+
5
+
6
+const routes: Routes = [
7
+  { path: '', component: OperationSearchComponent }
8
+];
9
+
10
+@NgModule({
11
+  imports: [RouterModule.forChild(routes)],
12
+  exports: [RouterModule]
13
+})
14
+export class OperationSearchRoutingModule { }

+ 183 - 0
src/app/views/operation-search/operation-search.component.html

@@ -0,0 +1,183 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl="18" class="list-template__searchBox">
5
+				<div class="list-template__searchItem">
6
+				  <span class="label" style="width: 110px;">手术时间范围:</span>
7
+				  <nz-range-picker [(ngModel)]="searchCriteria.dateRange" (ngModelChange)="changeDate($event)"></nz-range-picker>
8
+				</div>
9
+				
10
+        <div class="list-template__searchItem">
11
+          <span class="label">申请科室:</span>
12
+          <nz-select
13
+            [nzDropdownMatchSelectWidth]="false"
14
+            class="formItem"
15
+            nzServerSearch
16
+            nzShowSearch
17
+            nzAllowClear
18
+            nzPlaceHolder="请选择申请科室"
19
+            [(ngModel)]="searchCriteria.department"
20
+            (nzOnSearch)="changeInp($event, 'search')"
21
+            (nzOpenChange)="changeSearch($event)"
22
+          >
23
+            <ng-container *ngFor="let data of departmentSearch">
24
+              <nz-option
25
+                *ngIf="!isLoading"
26
+                nzLabel="{{ data.dept }}"
27
+                nzValue="{{ data.id }}"
28
+              ></nz-option>
29
+            </ng-container>
30
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
31
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
32
+            </nz-option>
33
+          </nz-select>
34
+        </div>
35
+				
36
+				<div class="list-template__searchItem">
37
+				  <span class="label">手术室:</span>
38
+				  <nz-select
39
+				    [nzDropdownMatchSelectWidth]="false"
40
+				    class="formItem"
41
+				    nzServerSearch
42
+				    nzShowSearch
43
+				    nzAllowClear
44
+				    nzPlaceHolder="请选择手术室"
45
+				    [(ngModel)]="searchCriteria.department"
46
+				    (nzOnSearch)="changeOperatingRoomInp($event, 'search')"
47
+				    (nzOpenChange)="changeSearch2($event)"
48
+				  >
49
+				    <ng-container *ngFor="let data of operatingRoomDept">
50
+				      <nz-option
51
+				        *ngIf="!isLoading"
52
+				        nzLabel="{{ data.dept }}"
53
+				        nzValue="{{ data.id }}"
54
+				      ></nz-option>
55
+				    </ng-container>
56
+				    <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
57
+				      <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
58
+				    </nz-option>
59
+				  </nz-select>
60
+				</div>
61
+				
62
+        <div class="list-template__searchItem">
63
+          <span class="label">状态:</span>
64
+          <nz-select
65
+            [nzDropdownMatchSelectWidth]="false"
66
+            class="formItem"
67
+            nzServerSearch
68
+            nzShowSearch
69
+            nzAllowClear
70
+            nzPlaceHolder="请选择状态"
71
+            [(ngModel)]="searchCriteria.speState"
72
+            (nzOpenChange)="changeSearch1($event)"
73
+          >
74
+            <ng-container *ngFor="let data of types">
75
+              <nz-option
76
+                *ngIf="!isLoading1"
77
+                nzLabel="{{ data.name }}"
78
+                nzValue="{{ data.id }}"
79
+              ></nz-option>
80
+            </ng-container>
81
+            <nz-option *ngIf="isLoading1" nzDisabled nzCustomContent>
82
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
83
+            </nz-option>
84
+          </nz-select>
85
+        </div>
86
+				
87
+				<div class="list-template__searchItem">
88
+				  <span class="label">是否首台:</span>
89
+					<label nz-checkbox [(ngModel)]="searchCriteria.firstOperation"></label>
90
+				</div>
91
+      </div>
92
+      <div nz-col nzXl="6" class="list-template__btns">
93
+        <button nz-button class="btn default ml8" (click)="reset()">
94
+          重置
95
+        </button>
96
+        <button nz-button class="btn default ml8" (click)="getList(1)">
97
+          搜索
98
+        </button>
99
+      </div>
100
+    </div>
101
+    <div class="list-template__bottom">
102
+      <nz-table
103
+        class="list-template__nzTable"
104
+        #headerTable
105
+        [nzData]="listOfData"
106
+        nzSize="middle"
107
+        [nzShowPagination]="false"
108
+        [nzLoading]="loading1"
109
+      >
110
+        <thead (nzSortChange)="sort($event)" nzSingleSort>
111
+          <tr class="thead">
112
+            <th nzWidth="4%">序号</th>
113
+            <th nzWidth="8%">申请科室</th>
114
+            <th nzWidth="7%">患者姓名</th>
115
+            <th nzWidth="5%">标本编码</th>
116
+            <th nzWidth="8%">检验项目</th>
117
+            <th nzWidth="8%">标本类型</th>
118
+            <th nzWidth="5%">状态</th>
119
+            <th nzWidth="8%" nzShowSort nzSortKey="arrive_time" [(nzSort)]="sortCurrent.arrive_time">收取时间</th>
120
+            <th nzWidth="8%">收取人</th>
121
+            <th nzWidth="8%">中转时间</th>
122
+            <th nzWidth="8%">送达时间</th>
123
+            <th nzWidth="8%">送达人</th>
124
+            <th nzWidth="8%">终点科室</th>
125
+            <th nzWidth="7%"></th>
126
+          </tr>
127
+        </thead>
128
+        <tbody>
129
+          <tr *ngFor="let data of listOfData; let i = index">
130
+            <td>{{i+(pageIndex-1) * pageSize + 1}}</td>
131
+            <td>{{ data.sickRoom ? data.sickRoom.dept : "-" }}</td>
132
+            <td>{{ data.patientName}}<span *ngIf="data.bedNum">({{data.bedNum}})</span><br>{{data.residenceNo}}</td>
133
+            <td>{{ data.scode || "-" }}</td>
134
+            <td>{{ data.specimenDesc || "-" }}</td>
135
+            <td>{{ data.stype ? data.stype.name : "-" }}</td>
136
+            <td>{{ data.speState ? data.speState.name : "-" }}</td>
137
+            <td>{{ data.arriveTime || "-" }}</td>
138
+            <td>{{ data.receiverName || "-" }}</td>
139
+            <td>{{ data.transTime || '-' }}</td>
140
+            <td>{{ data.sendTime || '-' }}</td>
141
+            <td>{{ data.delivererName || "-" }}</td>
142
+            <td>{{ data.checkDept ? data.checkDept.dept : "-" }}</td>
143
+            <td><button (click)="viewSpecimenHistory(data)">查看</button></td>
144
+          </tr>
145
+        </tbody>
146
+      </nz-table>
147
+      <div class="list-template__pagination">
148
+        <nz-pagination
149
+          [(nzPageIndex)]="pageIndex"
150
+          [(nzTotal)]="listLength"
151
+          [(nzPageSize)]="pageSize"
152
+          (nzPageIndexChange)="getList(0, sortCurrentKey, sortCurrentValue)"
153
+          (nzPageSizeChange)="getList(0, sortCurrentKey, sortCurrentValue)"
154
+        >
155
+        </nz-pagination>
156
+      </div>
157
+    </div>
158
+  </div>
159
+</div>
160
+<!-- 清空标本模态框 -->
161
+<app-dialog-delete
162
+  [delModal]="delModal"
163
+  (hideDelModalEvent)="hideDelModal()"
164
+  [btnLoading]="btnLoading"
165
+  (confirmDelEvent)="confirmDel()"
166
+  [content]="tipsMsg1"
167
+></app-dialog-delete>
168
+<!-- 标本历史记录查看 -->
169
+<app-history-prompt-modal
170
+  *ngIf="historyPromptModalShow"
171
+  [show]="historyPromptModalShow"
172
+  [scode]="scode"
173
+  (closeModelHs)="closeModelHistory($event)"
174
+></app-history-prompt-modal>
175
+<!-- 操作成功/失败提示框 -->
176
+<app-prompt-modal
177
+  *ngIf="promptModalShow"
178
+  [content]="promptContent"
179
+  [success]="ifSuccess"
180
+  [show]="promptModalShow"
181
+  [info]="promptInfo"
182
+>
183
+</app-prompt-modal>

+ 173 - 0
src/app/views/operation-search/operation-search.component.less

@@ -0,0 +1,173 @@
1
+@import "../../../../src/theme.less";
2
+:host ::ng-deep .on {
3
+  color: #fff !important;
4
+}
5
+.list-template__checkBoxes{
6
+  display: flex;
7
+  justify-content: space-between;
8
+}
9
+.save {
10
+  position: fixed;
11
+  left: 0;
12
+  top: 0;
13
+  width: 100%;
14
+  height: 100%;
15
+  background: rgba(0, 0, 0, 0.4);
16
+  z-index: 99;
17
+
18
+  .modalBody {
19
+    width: 350px;
20
+    height: 220px;
21
+    background: #fff;
22
+    border-radius: 5px;
23
+    padding: 10px 20px;
24
+    color: #333;
25
+
26
+    .title {
27
+      width: 100%;
28
+      text-align: center;
29
+      font-size: 18px;
30
+      position: relative;
31
+
32
+      i {
33
+        position: absolute;
34
+        right: 0;
35
+        top: 0;
36
+        font-size: 20px;
37
+        color: #666;
38
+        cursor: pointer;
39
+        padding: 0 5px;
40
+      }
41
+    }
42
+
43
+    .content {
44
+      width: 310px;
45
+      height: 117px;
46
+      background: #f9fafb;
47
+      border: 1px solid #e5e9ed;
48
+      border-radius: 5px;
49
+      overflow: hidden;
50
+      margin-top: 12px;
51
+
52
+      & > div {
53
+        text-align: center;
54
+        margin: 0;
55
+
56
+        &.icon {
57
+          margin-top: 17px;
58
+
59
+          i {
60
+            color: #34b349;
61
+            font-size: 30px !important;
62
+
63
+            &.transport-wenhao {
64
+              color: #f5a523;
65
+            }
66
+
67
+            &.transport-shibai {
68
+              color: #ff3a52;
69
+            }
70
+          }
71
+        }
72
+
73
+        &.defeat {
74
+          color: #333;
75
+          font-size: 18px;
76
+        }
77
+
78
+        &:nth-child(3) {
79
+          font-size: 14px;
80
+          color: #666;
81
+        }
82
+      }
83
+      .roundRobinTips {
84
+        font-size: 12px;
85
+      }
86
+    }
87
+
88
+    button {
89
+      margin-top: 10px;
90
+
91
+      &.btn {
92
+        margin-left: 8px;
93
+      }
94
+    }
95
+  }
96
+
97
+  // 新增
98
+  &.add {
99
+    .modalBody {
100
+      width: 480px;
101
+      height: auto;
102
+
103
+      .content {
104
+        width: 100%;
105
+        height: auto;
106
+        padding: 18px 14px 0 14px;
107
+        max-height: 497px;
108
+        overflow-y: auto;
109
+
110
+        .addForm {
111
+          .ant-form-item {
112
+            margin-bottom: 15px;
113
+
114
+            .ant-form-item-label {
115
+              line-height: 14px;
116
+              text-align: left;
117
+            }
118
+
119
+            .desc {
120
+              margin-top: 5px;
121
+            }
122
+          }
123
+
124
+          .datesControl {
125
+            margin-top: -16px;
126
+
127
+            .ant-form-item-label {
128
+              line-height: 40px;
129
+            }
130
+          }
131
+
132
+          .timer {
133
+            .ant-form-item-label {
134
+              width: 100%;
135
+              text-align: left;
136
+            }
137
+
138
+            .numInp {
139
+              margin-right: 5px;
140
+            }
141
+
142
+            .line {
143
+              margin-right: 5px;
144
+            }
145
+          }
146
+
147
+          .timer2 {
148
+            .ant-form-item-label {
149
+              line-height: 20px;
150
+            }
151
+          }
152
+        }
153
+
154
+        .editForm {
155
+          .ant-form-item {
156
+            margin-bottom: 15px;
157
+
158
+            .ant-form-item-label {
159
+              line-height: 14px;
160
+              text-align: left;
161
+            }
162
+          }
163
+        }
164
+      }
165
+
166
+      button {
167
+        &:nth-child(1) {
168
+          margin-right: 20px;
169
+        }
170
+      }
171
+    }
172
+  }
173
+}

+ 390 - 0
src/app/views/operation-search/operation-search.component.ts

@@ -0,0 +1,390 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { MainService } from "../../services/main.service";
3
+import { ToolService } from "../../services/tool.service";
4
+import { Subject } from "rxjs";
5
+import { debounceTime } from "rxjs/operators";
6
+import { format } from "date-fns";
7
+@Component({
8
+  selector: "app-operation-search",
9
+  templateUrl: "./operation-search.component.html",
10
+  styleUrls: ["./operation-search.component.less"],
11
+})
12
+export class OperationSearchComponent implements OnInit {
13
+  constructor(private mainService: MainService, private tool: ToolService) {}
14
+
15
+  currentUserAccount: any = JSON.parse(localStorage.getItem("user")).user.account; //当前登录人账号
16
+  searchCriteria = {
17
+    //搜索条件
18
+		firstOperation:false,
19
+    scode: "",
20
+    parent: "",
21
+    hospital: null,
22
+    department: null,
23
+    speState: null,
24
+    receiverName: null,
25
+    dateRange: [],
26
+    checkDept: null,
27
+  };
28
+  types = []; // 类型列表(搜索框)
29
+  departmentSearch = []; // 院区下的科室列表(搜索框)
30
+  userSearch = []; // 院区下的人员列表(搜索框)
31
+  allHospital: any = []; //院区下拉框
32
+  listOfData: any[] = []; //表格数据
33
+  pageIndex: number = 1; //表格当前页码
34
+  pageSize: number = 10; //表格每页展示条数
35
+  listLength: number = 10; //表格总数据量
36
+  checkOptionsOne: Array<any> = [
37
+    { label: "服务中心收取", value: "0", checked: true },
38
+  ];
39
+  changeInpSubject = new Subject();
40
+  changeInp2Subject = new Subject();
41
+	changeRoomInpSubject = new Subject();
42
+  ngOnInit() {
43
+    this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
44
+      this.searchDepartment(v[0], v[1]);
45
+    });
46
+    this.changeInp2Subject.pipe(debounceTime(500)).subscribe((v) => {
47
+      this.searchUser(v[0], v[1]);
48
+    });
49
+		this.changeRoomInpSubject.pipe(debounceTime(500)).subscribe((v) => {
50
+		  this.operatingRoom(v[0], v[1]);
51
+		});
52
+    this.getAllHospital();
53
+  }
54
+  // 表格筛选
55
+  log(value: object[]): void {
56
+    console.log(value);
57
+    this.getList(1, this.sortCurrentKey, this.sortCurrentValue);
58
+  }
59
+  // 搜索类型
60
+  isLoading1 = false;
61
+  searchTypes() {
62
+    this.isLoading1 = true;
63
+    this.mainService.getDictionary("list", "surgery_trans_state").subscribe((res) => {
64
+      this.isLoading1 = false;
65
+      this.types = res;
66
+    });
67
+  }
68
+  // 清空标本
69
+  delModal: boolean = false; //删除模态框
70
+  tipsMsg1: string; //提示框信息
71
+  showDelModal(tipsMsg1: string) {
72
+    this.delModal = true;
73
+    this.tipsMsg1 = tipsMsg1;
74
+  }
75
+  // 隐藏删除框
76
+  hideDelModal() {
77
+    this.delModal = false;
78
+  }
79
+  // 确认
80
+  btnLoading: boolean = false; //提交按钮loading状态
81
+  confirmDel() {
82
+    this.btnLoading = true;
83
+    this.mainService
84
+      .coopDataM("api/emptySpecimenData", { hosId: 1, isEmpty: "ok" })
85
+      .subscribe((data) => {
86
+        this.btnLoading = false;
87
+        this.delModal = false;
88
+        if (data.status == 200) {
89
+          this.showPromptModal("标本清空", true, "");
90
+        } else {
91
+          this.showPromptModal("标本清空", false, "");
92
+        }
93
+      });
94
+  }
95
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
96
+  promptContent: string; //操作提示框提示信息
97
+  ifSuccess: boolean; //操作成功/失败
98
+  promptInfo: string; //操作结果提示信息
99
+  promptModalShow: boolean; //操作提示框是否展示
100
+  showPromptModal(con, success, promptInfo?) {
101
+    this.promptModalShow = false;
102
+    this.promptContent = con;
103
+    this.ifSuccess = success;
104
+    this.promptInfo = promptInfo;
105
+    setTimeout(() => {
106
+      this.promptModalShow = true;
107
+    }, 100);
108
+    this.getList(0, this.sortCurrentKey, this.sortCurrentValue);
109
+  }
110
+  // 查看标本历史记录
111
+  historyPromptModalShow = false; //标本历史记录弹窗开关
112
+  scode = ""; //查看历史记录携带
113
+  viewSpecimenHistory(data) {
114
+    this.scode = data.scode;
115
+    this.historyPromptModalShow = true;
116
+  }
117
+  // 关闭标本历史记录弹窗
118
+  closeModelHistory(e) {
119
+    this.historyPromptModalShow = JSON.parse(e).show;
120
+  }
121
+  // 日期选择
122
+  startDate: string; //发起时间开始
123
+  endDate: string; //发起时间结束
124
+  changeDate(result?): void {
125
+    if (!result) {
126
+      this.startDate = this.endDate = "";
127
+      return;
128
+    }
129
+    this.startDate =
130
+      result[0].getFullYear() +
131
+      "-" +
132
+      (result[0].getMonth() + 1) +
133
+      "-" +
134
+      result[0].getDate() +
135
+      " " +
136
+      "00:00:00";
137
+    this.endDate =
138
+      result[1].getFullYear() +
139
+      "-" +
140
+      (result[1].getMonth() + 1) +
141
+      "-" +
142
+      result[1].getDate() +
143
+      " " +
144
+      "23:59:59";
145
+  }
146
+  // 重置
147
+  reset() {
148
+    this.searchCriteria = {
149
+      //搜索条件
150
+      scode: "",
151
+      parent: "",
152
+      hospital: this.allHospital[0] ? this.allHospital[0]["id"] + "" : null,
153
+      department: null,
154
+      speState: null,
155
+      receiverName: null,
156
+      dateRange: [],
157
+      checkDept: null,
158
+    };
159
+    this.sortCurrentKey = "";
160
+    this.sortCurrentValue = "";
161
+    this.sortCurrent = {
162
+      arrive_time: null,
163
+    };
164
+    this.getList(1, this.sortCurrentKey, this.sortCurrentValue);
165
+  }
166
+  // 选择院区
167
+  changeHospital(id, type) {
168
+    if (type === "search") {
169
+      this.searchCriteria.department = null;
170
+    }
171
+  }
172
+  // 打开搜索框
173
+  changeSearch1(flag) {
174
+    if (flag) {
175
+      this.searchTypes();
176
+    }
177
+  }
178
+  // 打开搜索框
179
+  changeSearch(flag) {
180
+    if (flag) {
181
+      this.changeInp("no", "search");
182
+    }
183
+  }
184
+  // 打开搜索框
185
+  changeSearch2(flag) {
186
+    if (flag) {
187
+      this.changeOperatingRoomInp("no", "search");
188
+    }
189
+  }
190
+  // 边输边搜节流阀
191
+  isLoading = false;
192
+  deptKey = "";
193
+  changeInp(dept, type) {
194
+    if (!dept) {
195
+      return;
196
+    }
197
+    if (dept === "no") {
198
+      dept = "";
199
+    }
200
+    this.deptKey = dept;
201
+    this.isLoading = true;
202
+    this.changeInpSubject.next([dept, type]);
203
+  }
204
+	
205
+	changeOperatingRoomInp(dept, type) {
206
+    if (!dept) {
207
+      return;
208
+    }
209
+    if (dept === "no") {
210
+      dept = "";
211
+    }
212
+    this.deptKey = dept;
213
+    this.isLoading = true;
214
+    this.changeRoomInpSubject.next([dept, type]);
215
+  }
216
+	
217
+  // 搜索科室
218
+  searchDepartment(dept, type) {
219
+    let data = {
220
+      department: {
221
+        dept,
222
+        hospital: {
223
+          id: this.searchCriteria.hospital,
224
+        },
225
+      },
226
+      idx: 0,
227
+      sum: 10,
228
+    };
229
+    this.mainService
230
+      .getFetchDataList("data", "department", data)
231
+      .subscribe((data) => {
232
+        if (data.status == 200) {
233
+          if (type === "search") {
234
+            if (this.deptKey === dept) {
235
+              this.isLoading = false;
236
+              this.departmentSearch = data.list;
237
+            }
238
+          }
239
+        }
240
+      });
241
+  }
242
+	
243
+	// 手术室
244
+	operatingRoomDept:any;
245
+	operatingRoom(dept, type) {
246
+		var that = this;
247
+		that.mainService.getDictionary("list", "dept_type").subscribe((res2) => {
248
+			let item1 = res2.find(i=>i.name=='手术室科室')
249
+			let data1 = {
250
+			  idx: 0,
251
+			  sum: 9999,
252
+			  department: {
253
+					dept,
254
+			    hospital: { id: that.searchCriteria.hospital || "" },
255
+			    type: { id: item1.id || "" },
256
+			  },
257
+			};
258
+
259
+			that.mainService
260
+			  .getFetchDataList("data", "department", data1)
261
+			  .subscribe((res) => {
262
+					if (type === "search") {
263
+					  if (this.deptKey === dept) {
264
+					    this.isLoading = false;
265
+					    that.operatingRoomDept = res.list;
266
+					  }
267
+					}
268
+			  });
269
+		});
270
+	}
271
+	
272
+  // 边输边搜节流阀
273
+  userKey = "";
274
+  changeInp2(keyword, type) {
275
+    if (!keyword) {
276
+      return;
277
+    }
278
+    if (keyword === "no") {
279
+      keyword = "";
280
+    }
281
+    this.userKey = keyword;
282
+    this.isLoading = true;
283
+    this.changeInp2Subject.next([keyword, type]);
284
+  }
285
+  // 搜索科室
286
+  searchUser(keyword, type) {
287
+    let data = {
288
+      user: {
289
+        usertype: { id: 106 },
290
+        name: keyword,
291
+        hospital: {
292
+          id: this.searchCriteria.hospital,
293
+        },
294
+      },
295
+      idx: 0,
296
+      sum: 10,
297
+    };
298
+    this.mainService
299
+      .getFetchDataList("data", "user", data)
300
+      .subscribe((data) => {
301
+        if (data.status == 200) {
302
+          if (type === "search") {
303
+            if (this.userKey === keyword) {
304
+              this.isLoading = false;
305
+              this.userSearch = data.list;
306
+            }
307
+          }
308
+        }
309
+      });
310
+  }
311
+
312
+  // 获取所有院区
313
+  /**
314
+   *
315
+   *
316
+   * @memberof RoundRobinComponent
317
+   */
318
+  getAllHospital() {
319
+    this.allHospital = [this.tool.getCurrentHospital()];
320
+    this.searchCriteria.hospital = this.tool.getCurrentHospital().id + "";
321
+    this.getList(1, this.sortCurrentKey, this.sortCurrentValue);
322
+    this.changeHospital(this.searchCriteria.hospital, "search");
323
+  }
324
+
325
+  // 表格数据
326
+  loading1 = false;
327
+  getList(type, field?: string, sort?: string) {
328
+    console.log(this.searchCriteria.dateRange);
329
+    if (type == 1) {
330
+      this.pageIndex = 1;
331
+    }
332
+    let postData: any = {
333
+      idx: this.pageIndex - 1,
334
+      sum: this.pageSize,
335
+      specimen: {
336
+        firstOperation: this.searchCriteria.firstOperation ? 1 : 0,
337
+        hosId: this.searchCriteria.hospital,
338
+        dept: this.searchCriteria.checkDept
339
+          ? {
340
+              id: this.searchCriteria.checkDept,
341
+            }
342
+          : undefined,
343
+        receiverName: this.searchCriteria.receiverName
344
+          ? this.searchCriteria.receiverName
345
+          : undefined,
346
+        scode: !this.searchCriteria.scode
347
+          ? undefined
348
+          : this.searchCriteria.scode,
349
+        keyWord: !this.searchCriteria.parent
350
+          ? undefined
351
+          : this.searchCriteria.parent,
352
+        speState: this.searchCriteria.speState
353
+          ? { id: this.searchCriteria.speState }
354
+          : undefined,
355
+      },
356
+    };
357
+    if (field && sort) {
358
+      postData.specimen.orderBy = sort === "ascend" ? field : `${field} desc`;
359
+    }
360
+    if (this.searchCriteria.dateRange.length) {
361
+      postData.specimen.startArriveTime =
362
+        format(this.searchCriteria.dateRange[0], "yyyy-MM-dd ") + "00:00:00";
363
+      postData.specimen.endArriveTime =
364
+        format(this.searchCriteria.dateRange[1], "yyyy-MM-dd ") + "23:59:59";
365
+    }
366
+    this.loading1 = true;
367
+    this.mainService
368
+      .getFetchDataList("simple/data", "specimen", postData)
369
+      .subscribe((data) => {
370
+        this.loading1 = false;
371
+        if (data.status == 200) {
372
+          this.listOfData = data.list;
373
+          this.listLength = data.totalNum;
374
+        }
375
+      });
376
+  }
377
+
378
+  // 列表排序
379
+  sortCurrent = {
380
+    arrive_time: null,
381
+  };
382
+  sortCurrentKey: string = "";
383
+  sortCurrentValue: string | null = "";
384
+  sort(e) {
385
+    const { key, value } = e;
386
+    this.sortCurrentKey = key;
387
+    this.sortCurrentValue = value;
388
+    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
389
+  }
390
+}

+ 19 - 0
src/app/views/operation-search/operation-search.module.ts

@@ -0,0 +1,19 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { OperationSearchRoutingModule } from './operation-search-routing.module';
5
+import { OperationSearchComponent } from './operation-search.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [
11
+    OperationSearchComponent
12
+  ],
13
+  imports: [
14
+    CommonModule,
15
+    OperationSearchRoutingModule,
16
+    ShareModule
17
+  ]
18
+})
19
+export class OperationSearchModule { }

+ 1 - 1
src/app/views/order-management/order-management.component.html

@@ -152,7 +152,7 @@
152
 					  <nz-form-label [nzSpan]="6" nzFor="busiParent">业务父级</nz-form-label>
152
 					  <nz-form-label [nzSpan]="6" nzFor="busiParent">业务父级</nz-form-label>
153
 					  <nz-form-control [nzSpan]="18" nzErrorTip="请选择业务父级!">
153
 					  <nz-form-control [nzSpan]="18" nzErrorTip="请选择业务父级!">
154
 					    <nz-select nzAllowClear [nzDropdownMatchSelectWidth]="false" formControlName="busiParent" nzShowSearch
154
 					    <nz-select nzAllowClear [nzDropdownMatchSelectWidth]="false" formControlName="busiParent" nzShowSearch
155
-					      nzPlaceHolder="请选择业务父级" nzServerSearch (nzOnSearch)="changeInp($event)"
155
+					      nzPlaceHolder="请选择业务父级" nzServerSearch (nzOnSearch)="changeDeptInp($event)"
156
 					      (nzOpenChange)="openDeptSelect($event)">
156
 					      (nzOpenChange)="openDeptSelect($event)">
157
 					      <ng-container *ngFor="let data of allParentdepart">
157
 					      <ng-container *ngFor="let data of allParentdepart">
158
 					        <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [nzValue]="data.id">
158
 					        <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [nzValue]="data.id">