seimin 1 тиждень тому
батько
коміт
42491422b7
49 змінених файлів з 3123 додано та 287 видалено
  1. 20 9
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.html
  2. 31 21
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.ts
  3. 6 1
      src/app/views/new-statistics/components/query-range/query-range.component.ts
  4. 23 9
      src/app/views/new-statistics/components/search-more/search-more.component.html
  5. 65 33
      src/app/views/new-statistics/components/search-more/search-more.component.ts
  6. 21 18
      src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.html
  7. 63 7
      src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.ts
  8. 25 22
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.html
  9. 71 4
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.ts
  10. 21 18
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.html
  11. 90 4
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.ts
  12. 9 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-inspection-statistics-routing.module.ts
  13. 14 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics-routing.module.ts
  14. 70 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.component.html
  15. 71 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.component.less
  16. 245 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.component.ts
  17. 23 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.module.ts
  18. 17 14
      src/app/views/new-statistics/distribution-inspection-statistics/hour-quality-control-statistics/hour-quality-control-statistics.component.html
  19. 69 4
      src/app/views/new-statistics/distribution-inspection-statistics/hour-quality-control-statistics/hour-quality-control-statistics.component.ts
  20. 2 1
      src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.html
  21. 14 12
      src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.ts
  22. 21 18
      src/app/views/new-statistics/distribution-inspection-statistics/taskType-quality-control-statistics/taskType-quality-control-statistics.component.html
  23. 89 4
      src/app/views/new-statistics/distribution-inspection-statistics/taskType-quality-control-statistics/taskType-quality-control-statistics.component.ts
  24. 25 22
      src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.component.html
  25. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.component.less
  26. 88 1
      src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.component.ts
  27. 5 4
      src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.html
  28. 47 50
      src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.ts
  29. 27 0
      src/app/views/new-statistics/maintenance-statistics/maintenance-statistics-routing.module.ts
  30. 14 0
      src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics-routing.module.ts
  31. 74 0
      src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics.component.html
  32. 71 0
      src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics.component.less
  33. 255 0
      src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics.component.ts
  34. 23 0
      src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics.module.ts
  35. 14 0
      src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics-routing.module.ts
  36. 64 0
      src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics.component.html
  37. 75 0
      src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics.component.less
  38. 389 0
      src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics.component.ts
  39. 23 0
      src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics.module.ts
  40. 14 0
      src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics-routing.module.ts
  41. 75 0
      src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics.component.html
  42. 75 0
      src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics.component.less
  43. 541 0
      src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics.component.ts
  44. 23 0
      src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics.module.ts
  45. 13 2
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.html
  46. 3 0
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.less
  47. 76 6
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.ts
  48. 1 1
      src/app/views/new-statistics/new-statistics.component.html
  49. 24 2
      src/app/views/new-statistics/new-statistics.component.ts

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

@@ -101,7 +101,7 @@
101
             </nz-select>
101
             </nz-select>
102
           </nz-form-control>
102
           </nz-form-control>
103
         </nz-form-item>
103
         </nz-form-item>
104
-				
104
+
105
 				<nz-form-item [hidden]="!fieldConfig.config.source">
105
 				<nz-form-item [hidden]="!fieldConfig.config.source">
106
 				  <nz-form-label [nzSpan]="6" nzFor="sourceId">来<span style="visibility: hidden;">囧囧</span>源</nz-form-label>
106
 				  <nz-form-label [nzSpan]="6" nzFor="sourceId">来<span style="visibility: hidden;">囧囧</span>源</nz-form-label>
107
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择来源!">
107
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择来源!">
@@ -112,7 +112,7 @@
112
 				    </nz-select>
112
 				    </nz-select>
113
 				  </nz-form-control>
113
 				  </nz-form-control>
114
 				</nz-form-item>
114
 				</nz-form-item>
115
-				
115
+
116
 				<nz-form-item [hidden]="!fieldConfig.config.minute">
116
 				<nz-form-item [hidden]="!fieldConfig.config.minute">
117
 				  <nz-form-label [nzSpan]="6" nzFor="minuteClose">分钟内关单</nz-form-label>
117
 				  <nz-form-label [nzSpan]="6" nzFor="minuteClose">分钟内关单</nz-form-label>
118
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请输入分钟内关单!">
118
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请输入分钟内关单!">
@@ -127,7 +127,7 @@
127
 						 ></nz-input-number>
127
 						 ></nz-input-number>
128
 					</nz-form-control>
128
 					</nz-form-control>
129
 				</nz-form-item>
129
 				</nz-form-item>
130
-				
130
+
131
 				<nz-form-item [hidden]="!fieldConfig.config.special">
131
 				<nz-form-item [hidden]="!fieldConfig.config.special">
132
 				  <nz-form-label [nzSpan]="6" nzFor="specialId">特殊关闭</nz-form-label>
132
 				  <nz-form-label [nzSpan]="6" nzFor="specialId">特殊关闭</nz-form-label>
133
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择特殊关闭!">
133
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择特殊关闭!">
@@ -138,7 +138,7 @@
138
 				    </nz-select>
138
 				    </nz-select>
139
 				  </nz-form-control>
139
 				  </nz-form-control>
140
 				</nz-form-item>
140
 				</nz-form-item>
141
-				
141
+
142
 			<!-- 	<nz-form-item [hidden]="!fieldConfig.config.overtime">
142
 			<!-- 	<nz-form-item [hidden]="!fieldConfig.config.overtime">
143
 				  <nz-form-label [nzSpan]="6" nzFor="overtimeId">超时工单</nz-form-label>
143
 				  <nz-form-label [nzSpan]="6" nzFor="overtimeId">超时工单</nz-form-label>
144
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择超时工单!">
144
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择超时工单!">
@@ -149,7 +149,7 @@
149
 				    </nz-select>
149
 				    </nz-select>
150
 				  </nz-form-control>
150
 				  </nz-form-control>
151
 				</nz-form-item> -->
151
 				</nz-form-item> -->
152
-				
152
+
153
 			<!-- 	<nz-form-item [hidden]="!fieldConfig.config.abnormal">
153
 			<!-- 	<nz-form-item [hidden]="!fieldConfig.config.abnormal">
154
 				  <nz-form-label [nzSpan]="6" nzFor="abnormalId">异常工单</nz-form-label>
154
 				  <nz-form-label [nzSpan]="6" nzFor="abnormalId">异常工单</nz-form-label>
155
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择异常工单!">
155
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择异常工单!">
@@ -160,7 +160,7 @@
160
 				    </nz-select>
160
 				    </nz-select>
161
 				  </nz-form-control>
161
 				  </nz-form-control>
162
 				</nz-form-item> -->
162
 				</nz-form-item> -->
163
-				
163
+
164
 				<nz-form-item [hidden]="!fieldConfig.config.evaluate">
164
 				<nz-form-item [hidden]="!fieldConfig.config.evaluate">
165
 				  <nz-form-label [nzSpan]="6" nzFor="evaluateId">评<span style="visibility: hidden;">囧囧</span>价</nz-form-label>
165
 				  <nz-form-label [nzSpan]="6" nzFor="evaluateId">评<span style="visibility: hidden;">囧囧</span>价</nz-form-label>
166
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择评价!">
166
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择评价!">
@@ -174,7 +174,7 @@
174
 				    </nz-select>
174
 				    </nz-select>
175
 				  </nz-form-control>
175
 				  </nz-form-control>
176
 				</nz-form-item>
176
 				</nz-form-item>
177
-				
177
+
178
 				<nz-form-item [hidden]="!fieldConfig.config.executeUser">
178
 				<nz-form-item [hidden]="!fieldConfig.config.executeUser">
179
 				  <nz-form-label [nzSpan]="6" nzFor="executeUserId">执行人</nz-form-label>
179
 				  <nz-form-label [nzSpan]="6" nzFor="executeUserId">执行人</nz-form-label>
180
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择人员!">
180
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择人员!">
@@ -188,7 +188,7 @@
188
 				    </nz-select>
188
 				    </nz-select>
189
 				  </nz-form-control>
189
 				  </nz-form-control>
190
 				</nz-form-item>
190
 				</nz-form-item>
191
-				
191
+
192
 				<nz-form-item [hidden]="!fieldConfig.config.timeFrame">
192
 				<nz-form-item [hidden]="!fieldConfig.config.timeFrame">
193
 				  <nz-form-label [nzSpan]="6" nzFor="timeFrameId">时<span style="visibility: hidden;">囧囧</span>段</nz-form-label>
193
 				  <nz-form-label [nzSpan]="6" nzFor="timeFrameId">时<span style="visibility: hidden;">囧囧</span>段</nz-form-label>
194
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择人员!">
194
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择人员!">
@@ -199,13 +199,24 @@
199
 				    </nz-select>
199
 				    </nz-select>
200
 				  </nz-form-control>
200
 				  </nz-form-control>
201
 				</nz-form-item>
201
 				</nz-form-item>
202
-				
202
+
203
 				<nz-form-item [hidden]="!fieldConfig.config.code">
203
 				<nz-form-item [hidden]="!fieldConfig.config.code">
204
 				  <nz-form-label [nzSpan]="6" nzFor="codeNum">单<span style="visibility: hidden;">囧囧</span>号</nz-form-label>
204
 				  <nz-form-label [nzSpan]="6" nzFor="codeNum">单<span style="visibility: hidden;">囧囧</span>号</nz-form-label>
205
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请输入单号!">
205
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请输入单号!">
206
 				    <input class="width-200" type="text" placeHolder="请输入单号" nz-input formControlName="codeNum" />
206
 				    <input class="width-200" type="text" placeHolder="请输入单号" nz-input formControlName="codeNum" />
207
 				  </nz-form-control>
207
 				  </nz-form-control>
208
 				</nz-form-item>
208
 				</nz-form-item>
209
+
210
+        <nz-form-item [hidden]="!fieldConfig.config.emergencyType">
211
+				  <nz-form-label [nzSpan]="6" nzFor="emergencyTypeId">是否加急</nz-form-label>
212
+				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择是否加急!">
213
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="emergencyTypeId" nzPlaceHolder="请选择是否加急">
214
+				      <ng-container *ngFor="let option of emergencyTypeList">
215
+				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
216
+				      </ng-container>
217
+				    </nz-select>
218
+				  </nz-form-control>
219
+				</nz-form-item>
209
       </form>
220
       </form>
210
     </div>
221
     </div>
211
     <div class="display_flex justify-content_flex-center">
222
     <div class="display_flex justify-content_flex-center">

+ 31 - 21
src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.ts

@@ -27,12 +27,16 @@ export class DistributionSearchMoreComponent implements OnInit {
27
     private tool: ToolService,
27
     private tool: ToolService,
28
     private mainService: MainService,
28
     private mainService: MainService,
29
   ) { }
29
   ) { }
30
-	
30
+
31
 	minuteClose:any;
31
 	minuteClose:any;
32
 	specialList:any = [
32
 	specialList:any = [
33
 		{name:'是',id:1},
33
 		{name:'是',id:1},
34
 		{name:'否',id:0}
34
 		{name:'否',id:0}
35
 	]
35
 	]
36
+  emergencyTypeList:any = [
37
+		{name:'是',id:1},
38
+		{name:'否',id:0}
39
+	]
36
 	overtimeList:any = [
40
 	overtimeList:any = [
37
 		{name:'是',id:1},
41
 		{name:'是',id:1},
38
 		{name:'否',id:0}
42
 		{name:'否',id:0}
@@ -67,12 +71,13 @@ export class DistributionSearchMoreComponent implements OnInit {
67
     this.deptList = this.fieldConfig.fields.deptDTO ? [this.fieldConfig.fields.deptDTO] : [];
71
     this.deptList = this.fieldConfig.fields.deptDTO ? [this.fieldConfig.fields.deptDTO] : [];
68
 		this.sourceList = this.fieldConfig.fields.sourceDTO ? [this.fieldConfig.fields.sourceDTO] : [];
72
 		this.sourceList = this.fieldConfig.fields.sourceDTO ? [this.fieldConfig.fields.sourceDTO] : [];
69
 		this.specialList = [{name:'是',id:1},{name:'否',id:0}];
73
 		this.specialList = [{name:'是',id:1},{name:'否',id:0}];
74
+		this.emergencyTypeList = [{name:'是',id:300},{name:'否',id:299}];//后端要求写死,是否加急,是-300,否-299
70
 		this.overtimeList = [{name:'是',id:1},{name:'否',id:0}];
75
 		this.overtimeList = [{name:'是',id:1},{name:'否',id:0}];
71
 		this.abnormalList = [{name:'是',id:1},{name:'否',id:0}];
76
 		this.abnormalList = [{name:'是',id:1},{name:'否',id:0}];
72
 		this.evaluateList = this.fieldConfig.fields.evaluateDTO ? [this.fieldConfig.fields.evaluateDTO] : [];
77
 		this.evaluateList = this.fieldConfig.fields.evaluateDTO ? [this.fieldConfig.fields.evaluateDTO] : [];
73
 		this.executeUserList =  this.fieldConfig.fields.executeUserDTO ? [this.fieldConfig.fields.executeUserDTO] : [];
78
 		this.executeUserList =  this.fieldConfig.fields.executeUserDTO ? [this.fieldConfig.fields.executeUserDTO] : [];
74
 		this.timeFrameList = this.fieldConfig.fields.timeFrameDTO ? [this.fieldConfig.fields.timeFrameDTO] : [];
79
 		this.timeFrameList = this.fieldConfig.fields.timeFrameDTO ? [this.fieldConfig.fields.timeFrameDTO] : [];
75
-		
80
+
76
 		this.validateForm = this.fb.group({
81
 		this.validateForm = this.fb.group({
77
       groupId: [this.fieldConfig.fields.groupId || null],
82
       groupId: [this.fieldConfig.fields.groupId || null],
78
       userId: [this.fieldConfig.fields.userId === undefined ? null : this.fieldConfig.fields.userId],
83
       userId: [this.fieldConfig.fields.userId === undefined ? null : this.fieldConfig.fields.userId],
@@ -83,6 +88,7 @@ export class DistributionSearchMoreComponent implements OnInit {
83
 			sourceId: [this.fieldConfig.fields.sourceId || null],
88
 			sourceId: [this.fieldConfig.fields.sourceId || null],
84
 			minuteClose: [this.fieldConfig.fields.minuteClose || null],
89
 			minuteClose: [this.fieldConfig.fields.minuteClose || null],
85
 			specialId: [this.fieldConfig.fields.specialDTO ? this.fieldConfig.fields.specialDTO.id  : null],
90
 			specialId: [this.fieldConfig.fields.specialDTO ? this.fieldConfig.fields.specialDTO.id  : null],
91
+			emergencyTypeId: [this.fieldConfig.fields.emergencyTypeDTO ? this.fieldConfig.fields.emergencyTypeDTO.id  : null],
86
 			overtimeId: [this.fieldConfig.fields.overtimeDTO ? this.fieldConfig.fields.overtimeDTO.id  : null],
92
 			overtimeId: [this.fieldConfig.fields.overtimeDTO ? this.fieldConfig.fields.overtimeDTO.id  : null],
87
 			abnormalId: [this.fieldConfig.fields.abnormalDTO ? this.fieldConfig.fields.abnormalDTO.id  : null],
93
 			abnormalId: [this.fieldConfig.fields.abnormalDTO ? this.fieldConfig.fields.abnormalDTO.id  : null],
88
 			evaluateId: [this.fieldConfig.fields.evaluateId || null],
94
 			evaluateId: [this.fieldConfig.fields.evaluateId || null],
@@ -90,32 +96,32 @@ export class DistributionSearchMoreComponent implements OnInit {
90
 			codeNum: [this.fieldConfig.fields.codeNum || null],
96
 			codeNum: [this.fieldConfig.fields.codeNum || null],
91
 			timeFrameId: [this.fieldConfig.fields.timeFrameDTO ? this.fieldConfig.fields.timeFrameDTO.id  : null],
97
 			timeFrameId: [this.fieldConfig.fields.timeFrameDTO ? this.fieldConfig.fields.timeFrameDTO.id  : null],
92
 		});
98
 		});
93
-		
94
-		
99
+
100
+
95
 		if(this.going && this.fieldConfig.fields.taskTypeId){
101
 		if(this.going && this.fieldConfig.fields.taskTypeId){
96
 			this.getTaskTypeList();
102
 			this.getTaskTypeList();
97
 		}
103
 		}
98
-		
104
+
99
 		if(this.going && this.fieldConfig.fields.deptId){
105
 		if(this.going && this.fieldConfig.fields.deptId){
100
 			this.getRepairDeptList();
106
 			this.getRepairDeptList();
101
 		}
107
 		}
102
-		
108
+
103
 		if(this.going && this.fieldConfig.fields.sourceId){
109
 		if(this.going && this.fieldConfig.fields.sourceId){
104
 			this.getSourceList();
110
 			this.getSourceList();
105
 		}
111
 		}
106
-		
112
+
107
 		if(this.going && this.fieldConfig.fields.evaluateId){
113
 		if(this.going && this.fieldConfig.fields.evaluateId){
108
 			this.getWorkHourEvaluateList();
114
 			this.getWorkHourEvaluateList();
109
 		}
115
 		}
110
-		
116
+
111
 		if(this.going && this.fieldConfig.fields.executeUserId){
117
 		if(this.going && this.fieldConfig.fields.executeUserId){
112
 			this.getExecuteUserList();
118
 			this.getExecuteUserList();
113
 		}
119
 		}
114
-		
120
+
115
 		if(this.going && this.fieldConfig.fields.timeFrameId){
121
 		if(this.going && this.fieldConfig.fields.timeFrameId){
116
 			this.getTimeFrameList();
122
 			this.getTimeFrameList();
117
 		}
123
 		}
118
-		
124
+
119
   }
125
   }
120
   // 表单提交
126
   // 表单提交
121
   submitForm(): void {
127
   submitForm(): void {
@@ -166,6 +172,10 @@ export class DistributionSearchMoreComponent implements OnInit {
166
 		  fields.specialId = this.validateForm.value.specialId;
172
 		  fields.specialId = this.validateForm.value.specialId;
167
 		  fields.specialDTO = this.specialList.find(item => item.id == this.validateForm.value.specialId);
173
 		  fields.specialDTO = this.specialList.find(item => item.id == this.validateForm.value.specialId);
168
 		}
174
 		}
175
+    if(this.fieldConfig.config.emergencyType){
176
+		  fields.emergencyTypeId = this.validateForm.value.emergencyTypeId;
177
+		  fields.emergencyTypeDTO = this.emergencyTypeList.find(item => item.id == this.validateForm.value.emergencyTypeId);
178
+		}
169
 		if(this.fieldConfig.config.overtime){
179
 		if(this.fieldConfig.config.overtime){
170
 		  fields.overtimeId = this.validateForm.value.overtimeId;
180
 		  fields.overtimeId = this.validateForm.value.overtimeId;
171
 		  fields.overtimeDTO = this.overtimeList.find(item => item.id == this.validateForm.value.overtimeId);
181
 		  fields.overtimeDTO = this.overtimeList.find(item => item.id == this.validateForm.value.overtimeId);
@@ -190,7 +200,7 @@ export class DistributionSearchMoreComponent implements OnInit {
190
 		  fields.timeFrameId = this.validateForm.value.timeFrameId;
200
 		  fields.timeFrameId = this.validateForm.value.timeFrameId;
191
 		  fields.timeFrameDTO = this.timeFrameList.find(item => item.id == this.validateForm.value.timeFrameId);
201
 		  fields.timeFrameDTO = this.timeFrameList.find(item => item.id == this.validateForm.value.timeFrameId);
192
 		}
202
 		}
193
-		
203
+
194
     this.submitEvent.emit(fields);
204
     this.submitEvent.emit(fields);
195
     this.hideModal();
205
     this.hideModal();
196
   }
206
   }
@@ -414,9 +424,9 @@ export class DistributionSearchMoreComponent implements OnInit {
414
     flag && this.setIsSelecting(false);
424
     flag && this.setIsSelecting(false);
415
     flag && this.getRepairDeptList();
425
     flag && this.getRepairDeptList();
416
   }
426
   }
417
-	
427
+
418
 	// =================来源===================
428
 	// =================来源===================
419
-	
429
+
420
 	// 获取来源列表
430
 	// 获取来源列表
421
 	sourceList:any[] = [];
431
 	sourceList:any[] = [];
422
 	getSourceDataList(keyword?){
432
 	getSourceDataList(keyword?){
@@ -439,10 +449,10 @@ export class DistributionSearchMoreComponent implements OnInit {
439
 			},
449
 			},
440
 		]
450
 		]
441
 	}
451
 	}
442
-	
452
+
443
 	// =================评价===================
453
 	// =================评价===================
444
-	
445
-	// 获取评价列表 
454
+
455
+	// 获取评价列表
446
 	evaluateList:any[] = [];
456
 	evaluateList:any[] = [];
447
 	getWorkHourEvaluateList(){
457
 	getWorkHourEvaluateList(){
448
 		this.isLoading = true;
458
 		this.isLoading = true;
@@ -453,14 +463,14 @@ export class DistributionSearchMoreComponent implements OnInit {
453
 		    this.evaluateList = data;
463
 		    this.evaluateList = data;
454
 		  });
464
 		  });
455
 	}
465
 	}
456
-	
466
+
457
 	// =================执行人===================
467
 	// =================执行人===================
458
-	
468
+
459
 	// 执行人搜索
469
 	// 执行人搜索
460
 	changeExecuteUserInp(e) {
470
 	changeExecuteUserInp(e) {
461
 	  this.searchTimer(this.getExecuteUserList, e);
471
 	  this.searchTimer(this.getExecuteUserList, e);
462
 	}
472
 	}
463
-	
473
+
464
 	// 获取执行人列表
474
 	// 获取执行人列表
465
 	executeUserList:any[] = [];
475
 	executeUserList:any[] = [];
466
 	getExecuteUserList(keyword?){
476
 	getExecuteUserList(keyword?){
@@ -489,9 +499,9 @@ export class DistributionSearchMoreComponent implements OnInit {
489
 	  flag && this.setIsSelecting(false);
499
 	  flag && this.setIsSelecting(false);
490
 	  flag && this.getExecuteUserList();
500
 	  flag && this.getExecuteUserList();
491
 	}
501
 	}
492
-	
502
+
493
 	// =================时段===================
503
 	// =================时段===================
494
-	
504
+
495
 	// 获取时段列表
505
 	// 获取时段列表
496
 	timeFrameList:any[] = [];
506
 	timeFrameList:any[] = [];
497
 	getTimeFrameList(){
507
 	getTimeFrameList(){

+ 6 - 1
src/app/views/new-statistics/components/query-range/query-range.component.ts

@@ -19,6 +19,7 @@ export class QueryRangeComponent implements OnInit {
19
   @Input() duty: any;
19
   @Input() duty: any;
20
 	@Input() parent: any;
20
 	@Input() parent: any;
21
 	@Input() defaultDate: any = [];
21
 	@Input() defaultDate: any = [];
22
+	@Input() currentDeptDTO;
22
   // sign = largeScreen 大屏
23
   // sign = largeScreen 大屏
23
   // sign = main 管理端
24
   // sign = main 管理端
24
   // sign = nurse 护士端
25
   // sign = nurse 护士端
@@ -71,6 +72,7 @@ export class QueryRangeComponent implements OnInit {
71
     let queryType = this.validateForm.value.queryType;
72
     let queryType = this.validateForm.value.queryType;
72
 		let parent = this.validateForm.value.parent;
73
 		let parent = this.validateForm.value.parent;
73
 		let defaultDate = this.validateForm.value.defaultDate;
74
 		let defaultDate = this.validateForm.value.defaultDate;
75
+    let currentDeptDTO;
74
     let hospital;
76
     let hospital;
75
     let duty;
77
     let duty;
76
     switch (queryType) {
78
     switch (queryType) {
@@ -87,8 +89,11 @@ export class QueryRangeComponent implements OnInit {
87
         hospital = this.dutyOneList.find(v => v.id == this.validateForm.value.dutyOne).parent;
89
         hospital = this.dutyOneList.find(v => v.id == this.validateForm.value.dutyOne).parent;
88
         duty = this.dutyOneList.find(v => v.id == this.validateForm.value.dutyOne);
90
         duty = this.dutyOneList.find(v => v.id == this.validateForm.value.dutyOne);
89
         break;
91
         break;
92
+      case 5:
93
+        currentDeptDTO = this.currentDept;
94
+        break;
90
     }
95
     }
91
-    this.submitQueryRange.emit({queryType, hospital, duty, parent, defaultDate});
96
+    this.submitQueryRange.emit({queryType, hospital, duty, parent, defaultDate, currentDeptDTO});
92
     this.hideModal();
97
     this.hideModal();
93
   }
98
   }
94
 
99
 

+ 23 - 9
src/app/views/new-statistics/components/search-more/search-more.component.html

@@ -17,7 +17,7 @@
17
             </nz-select>
17
             </nz-select>
18
           </nz-form-control>
18
           </nz-form-control>
19
         </nz-form-item>
19
         </nz-form-item>
20
-				
20
+
21
 				<nz-form-item [hidden]="!fieldConfig.config.workHourSmall">
21
 				<nz-form-item [hidden]="!fieldConfig.config.workHourSmall">
22
 				  <nz-form-label [nzSpan]="6" nzFor="workHourSmallId">工时小类</nz-form-label>
22
 				  <nz-form-label [nzSpan]="6" nzFor="workHourSmallId">工时小类</nz-form-label>
23
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择工时小类!">
23
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择工时小类!">
@@ -31,7 +31,7 @@
31
 				    </nz-select>
31
 				    </nz-select>
32
 				  </nz-form-control>
32
 				  </nz-form-control>
33
 				</nz-form-item>
33
 				</nz-form-item>
34
-				
34
+
35
         <nz-form-item [hidden]="!fieldConfig.config.group">
35
         <nz-form-item [hidden]="!fieldConfig.config.group">
36
           <nz-form-label [nzSpan]="6" nzFor="groupId">维修分组</nz-form-label>
36
           <nz-form-label [nzSpan]="6" nzFor="groupId">维修分组</nz-form-label>
37
           <nz-form-control [nzSpan]="16" nzErrorTip="请选择维修分组!">
37
           <nz-form-control [nzSpan]="16" nzErrorTip="请选择维修分组!">
@@ -185,7 +185,7 @@
185
             </nz-select>
185
             </nz-select>
186
           </nz-form-control>
186
           </nz-form-control>
187
         </nz-form-item>
187
         </nz-form-item>
188
-				
188
+
189
 				<nz-form-item [hidden]="!fieldConfig.config.repairUser">
189
 				<nz-form-item [hidden]="!fieldConfig.config.repairUser">
190
 				  <nz-form-label [nzSpan]="6" nzFor="repairUserId">报修人</nz-form-label>
190
 				  <nz-form-label [nzSpan]="6" nzFor="repairUserId">报修人</nz-form-label>
191
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择报修人!">
191
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择报修人!">
@@ -199,7 +199,7 @@
199
 				    </nz-select>
199
 				    </nz-select>
200
 				  </nz-form-control>
200
 				  </nz-form-control>
201
 				</nz-form-item>
201
 				</nz-form-item>
202
-				
202
+
203
 				<nz-form-item [hidden]="!fieldConfig.config.deptType">
203
 				<nz-form-item [hidden]="!fieldConfig.config.deptType">
204
 				  <nz-form-label [nzSpan]="6" nzFor="deptTypeId">科室类型</nz-form-label>
204
 				  <nz-form-label [nzSpan]="6" nzFor="deptTypeId">科室类型</nz-form-label>
205
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择科室类型!">
205
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择科室类型!">
@@ -213,7 +213,7 @@
213
 				    </nz-select>
213
 				    </nz-select>
214
 				  </nz-form-control>
214
 				  </nz-form-control>
215
 				</nz-form-item>
215
 				</nz-form-item>
216
-				
216
+
217
 				<nz-form-item [hidden]="!fieldConfig.config.evaluate">
217
 				<nz-form-item [hidden]="!fieldConfig.config.evaluate">
218
 				  <nz-form-label [nzSpan]="6" nzFor="evaluateId">评价</nz-form-label>
218
 				  <nz-form-label [nzSpan]="6" nzFor="evaluateId">评价</nz-form-label>
219
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择评价!">
219
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择评价!">
@@ -227,7 +227,7 @@
227
 				    </nz-select>
227
 				    </nz-select>
228
 				  </nz-form-control>
228
 				  </nz-form-control>
229
 				</nz-form-item>
229
 				</nz-form-item>
230
-				
230
+
231
 				<nz-form-item [hidden]="!fieldConfig.config.consumable">
231
 				<nz-form-item [hidden]="!fieldConfig.config.consumable">
232
 				  <nz-form-label [nzSpan]="6" nzFor="consumableId">耗材</nz-form-label>
232
 				  <nz-form-label [nzSpan]="6" nzFor="consumableId">耗材</nz-form-label>
233
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择耗材!">
233
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择耗材!">
@@ -241,7 +241,7 @@
241
 				    </nz-select>
241
 				    </nz-select>
242
 				  </nz-form-control>
242
 				  </nz-form-control>
243
 				</nz-form-item>
243
 				</nz-form-item>
244
-				
244
+
245
 				<nz-form-item [hidden]="!fieldConfig.config.isHang">
245
 				<nz-form-item [hidden]="!fieldConfig.config.isHang">
246
 				  <nz-form-label [nzSpan]="6" nzFor="isHangId">是否挂起</nz-form-label>
246
 				  <nz-form-label [nzSpan]="6" nzFor="isHangId">是否挂起</nz-form-label>
247
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择是否挂起!">
247
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择是否挂起!">
@@ -252,14 +252,14 @@
252
 				    </nz-select>
252
 				    </nz-select>
253
 				  </nz-form-control>
253
 				  </nz-form-control>
254
 				</nz-form-item>
254
 				</nz-form-item>
255
-				
255
+
256
 				<nz-form-item [hidden]="!fieldConfig.config.code">
256
 				<nz-form-item [hidden]="!fieldConfig.config.code">
257
 				  <nz-form-label [nzSpan]="6" nzFor="codeNum">单号</nz-form-label>
257
 				  <nz-form-label [nzSpan]="6" nzFor="codeNum">单号</nz-form-label>
258
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请输入单号!">
258
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请输入单号!">
259
 				    <input class="width-200" type="text" placeHolder="请输入单号" nz-input formControlName="codeNum" />
259
 				    <input class="width-200" type="text" placeHolder="请输入单号" nz-input formControlName="codeNum" />
260
 				  </nz-form-control>
260
 				  </nz-form-control>
261
 				</nz-form-item>
261
 				</nz-form-item>
262
-				
262
+
263
 				<nz-form-item [hidden]="!fieldConfig.config.overtime">
263
 				<nz-form-item [hidden]="!fieldConfig.config.overtime">
264
 				  <nz-form-label [nzSpan]="6" nzFor="overtimeId">超时工单</nz-form-label>
264
 				  <nz-form-label [nzSpan]="6" nzFor="overtimeId">超时工单</nz-form-label>
265
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择超时工单!">
265
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择超时工单!">
@@ -270,6 +270,20 @@
270
 				    </nz-select>
270
 				    </nz-select>
271
 				  </nz-form-control>
271
 				  </nz-form-control>
272
 				</nz-form-item>
272
 				</nz-form-item>
273
+
274
+        <nz-form-item [hidden]="!fieldConfig.config.priority">
275
+				  <nz-form-label [nzSpan]="6" nzFor="priorityId">优先级</nz-form-label>
276
+				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择优先级!">
277
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzShowSearch formControlName="priorityId" nzPlaceHolder="请选择优先级" (nzOpenChange)="openChangePriority($event)">
278
+				      <ng-container *ngFor="let option of priorityList">
279
+				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
280
+				      </ng-container>
281
+				      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
282
+				        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
283
+				      </nz-option>
284
+				    </nz-select>
285
+				  </nz-form-control>
286
+				</nz-form-item>
273
       </form>
287
       </form>
274
     </div>
288
     </div>
275
     <div class="display_flex justify-content_flex-center">
289
     <div class="display_flex justify-content_flex-center">

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

@@ -27,7 +27,7 @@ export class SearchMoreComponent implements OnInit {
27
     private tool: ToolService,
27
     private tool: ToolService,
28
     private mainService: MainService,
28
     private mainService: MainService,
29
   ) { }
29
   ) { }
30
-	
30
+
31
 	isHangList:any = [
31
 	isHangList:any = [
32
 		{name:'是',id:1},
32
 		{name:'是',id:1},
33
 		{name:'否',id:0}
33
 		{name:'否',id:0}
@@ -36,7 +36,7 @@ export class SearchMoreComponent implements OnInit {
36
 		{name:'是',id:1},
36
 		{name:'是',id:1},
37
 		{name:'否',id:0}
37
 		{name:'否',id:0}
38
 	]
38
 	]
39
-	
39
+
40
   ngOnInit() {
40
   ngOnInit() {
41
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
41
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
42
       let fun = v[0];
42
       let fun = v[0];
@@ -70,7 +70,8 @@ export class SearchMoreComponent implements OnInit {
70
 		this.repairUserList = this.fieldConfig.fields.repairUserDTO ? [this.fieldConfig.fields.repairUserDTO] : [];
70
 		this.repairUserList = this.fieldConfig.fields.repairUserDTO ? [this.fieldConfig.fields.repairUserDTO] : [];
71
 		this.isHangList = [{name:'是',id:1},{name:'否',id:0}];
71
 		this.isHangList = [{name:'是',id:1},{name:'否',id:0}];
72
 		this.overtimeList = [{name:'是',id:1},{name:'否',id:0}];
72
 		this.overtimeList = [{name:'是',id:1},{name:'否',id:0}];
73
-		
73
+		this.priorityList = this.fieldConfig.fields.priorityDTO ? [this.fieldConfig.fields.priorityDTO] : [];
74
+
74
 		this.validateForm = this.fb.group({
75
 		this.validateForm = this.fb.group({
75
       groupId: [this.fieldConfig.fields.groupId || null],
76
       groupId: [this.fieldConfig.fields.groupId || null],
76
       userId: [this.fieldConfig.fields.userId === undefined ? null : this.fieldConfig.fields.userId],
77
       userId: [this.fieldConfig.fields.userId === undefined ? null : this.fieldConfig.fields.userId],
@@ -91,41 +92,42 @@ export class SearchMoreComponent implements OnInit {
91
 			isHangId: [this.fieldConfig.fields.isHangDTO ? this.fieldConfig.fields.isHangDTO.id  : null],
92
 			isHangId: [this.fieldConfig.fields.isHangDTO ? this.fieldConfig.fields.isHangDTO.id  : null],
92
 			codeNum: [this.fieldConfig.fields.codeNum || null],
93
 			codeNum: [this.fieldConfig.fields.codeNum || null],
93
 			overtimeId: [this.fieldConfig.fields.overtimeDTO ? this.fieldConfig.fields.overtimeDTO.id  : null],
94
 			overtimeId: [this.fieldConfig.fields.overtimeDTO ? this.fieldConfig.fields.overtimeDTO.id  : null],
95
+			priorityId: [this.fieldConfig.fields.priorityId || null],
94
 		});
96
 		});
95
-		
97
+
96
 		if(this.going && this.fieldConfig.fields.groupId){
98
 		if(this.going && this.fieldConfig.fields.groupId){
97
 			this.getGroupList();
99
 			this.getGroupList();
98
 		}
100
 		}
99
-		
101
+
100
 		if(this.going && this.fieldConfig.fields.userId){
102
 		if(this.going && this.fieldConfig.fields.userId){
101
 			this.getUserList();
103
 			this.getUserList();
102
 		}
104
 		}
103
-		
105
+
104
 		if(this.going && this.fieldConfig.fields.category1DTO){
106
 		if(this.going && this.fieldConfig.fields.category1DTO){
105
 			this.getCategory1List();
107
 			this.getCategory1List();
106
 		}
108
 		}
107
-		
109
+
108
 		if(this.going && this.fieldConfig.fields.category2DTO){
110
 		if(this.going && this.fieldConfig.fields.category2DTO){
109
 			this.getCategory2List();
111
 			this.getCategory2List();
110
 		}
112
 		}
111
-		
113
+
112
 		if(this.going && this.fieldConfig.fields.category3DTO){
114
 		if(this.going && this.fieldConfig.fields.category3DTO){
113
 			this.getCategory3List();
115
 			this.getCategory3List();
114
 		}
116
 		}
115
-		
117
+
116
 		if(this.going && this.fieldConfig.fields.buildingId){
118
 		if(this.going && this.fieldConfig.fields.buildingId){
117
 			this.getBuildingList();
119
 			this.getBuildingList();
118
 		}
120
 		}
119
-		
121
+
120
 		if(this.going && this.fieldConfig.fields.floorId){
122
 		if(this.going && this.fieldConfig.fields.floorId){
121
 			this.getFloorList();
123
 			this.getFloorList();
122
 		}
124
 		}
123
-		
125
+
124
 		if(this.going && this.fieldConfig.fields.companyId){
126
 		if(this.going && this.fieldConfig.fields.companyId){
125
 			this.getCompanyList();
127
 			this.getCompanyList();
126
 		}
128
 		}
127
-		
128
-		
129
+
130
+
129
   }
131
   }
130
   // 表单提交
132
   // 表单提交
131
   submitForm(): void {
133
   submitForm(): void {
@@ -195,38 +197,42 @@ export class SearchMoreComponent implements OnInit {
195
 		  fields.deptTypeId = this.validateForm.value.deptTypeId;
197
 		  fields.deptTypeId = this.validateForm.value.deptTypeId;
196
 		  fields.deptTypeDTO = this.deptTypeList.find(item => item.id == this.validateForm.value.deptTypeId);
198
 		  fields.deptTypeDTO = this.deptTypeList.find(item => item.id == this.validateForm.value.deptTypeId);
197
 		}
199
 		}
198
-		
200
+		if(this.fieldConfig.config.priority){
201
+		  fields.priorityId = this.validateForm.value.priorityId;
202
+		  fields.priorityDTO = this.priorityList.find(item => item.id == this.validateForm.value.priorityId);
203
+		}
204
+
199
 		if(this.fieldConfig.config.evaluate){
205
 		if(this.fieldConfig.config.evaluate){
200
 			fields.evaluateId = this.validateForm.value.evaluateId;
206
 			fields.evaluateId = this.validateForm.value.evaluateId;
201
 			fields.evaluateDTO = this.evaluateList.find(item => item.id == this.validateForm.value.evaluateId);
207
 			fields.evaluateDTO = this.evaluateList.find(item => item.id == this.validateForm.value.evaluateId);
202
 		}
208
 		}
203
-		
209
+
204
 		if(this.fieldConfig.config.repairUser){
210
 		if(this.fieldConfig.config.repairUser){
205
 			fields.repairUserId = this.validateForm.value.repairUserId;
211
 			fields.repairUserId = this.validateForm.value.repairUserId;
206
 			fields.repairUserDTO = this.repairUserList.find(item => item.id == this.validateForm.value.repairUserId);
212
 			fields.repairUserDTO = this.repairUserList.find(item => item.id == this.validateForm.value.repairUserId);
207
 		}
213
 		}
208
-		
214
+
209
 		if(this.fieldConfig.config.consumable){
215
 		if(this.fieldConfig.config.consumable){
210
 			fields.consumableId = this.validateForm.value.consumableId;
216
 			fields.consumableId = this.validateForm.value.consumableId;
211
 			fields.consumableDTO = this.consumableList.find(item => item.id == this.validateForm.value.consumableId);
217
 			fields.consumableDTO = this.consumableList.find(item => item.id == this.validateForm.value.consumableId);
212
 		}
218
 		}
213
-		
219
+
214
 		if(this.fieldConfig.config.isHang){
220
 		if(this.fieldConfig.config.isHang){
215
 			fields.isHangId = this.validateForm.value.isHangId;
221
 			fields.isHangId = this.validateForm.value.isHangId;
216
 			fields.isHangDTO = this.isHangList.find(item => item.id == this.validateForm.value.isHangId);
222
 			fields.isHangDTO = this.isHangList.find(item => item.id == this.validateForm.value.isHangId);
217
 		}
223
 		}
218
-		
219
-		
224
+
225
+
220
 		if(this.fieldConfig.config.code){
226
 		if(this.fieldConfig.config.code){
221
 			fields.codeNum = this.validateForm.value.codeNum;
227
 			fields.codeNum = this.validateForm.value.codeNum;
222
 			fields.codeNumDTO = this.validateForm.value.codeNum;
228
 			fields.codeNumDTO = this.validateForm.value.codeNum;
223
 		}
229
 		}
224
-		
230
+
225
 		if(this.fieldConfig.config.overtime){
231
 		if(this.fieldConfig.config.overtime){
226
 			fields.overtimeId = this.validateForm.value.overtimeId;
232
 			fields.overtimeId = this.validateForm.value.overtimeId;
227
 			fields.overtimeDTO = this.overtimeList.find(item => item.id == this.validateForm.value.overtimeId);
233
 			fields.overtimeDTO = this.overtimeList.find(item => item.id == this.validateForm.value.overtimeId);
228
 		}
234
 		}
229
-				
235
+
230
     this.submitEvent.emit(fields);
236
     this.submitEvent.emit(fields);
231
     this.hideModal();
237
     this.hideModal();
232
   }
238
   }
@@ -312,6 +318,32 @@ export class SearchMoreComponent implements OnInit {
312
 	    });
318
 	    });
313
 	}
319
 	}
314
 
320
 
321
+  // =================优先级===================
322
+
323
+	// 优先级
324
+	openChangePriority(flag){
325
+	  flag && this.getPriorityList();
326
+	}
327
+
328
+	// 获取优先级列表
329
+	priorityList:any[] = [];
330
+	getPriorityList(keyword?) {
331
+    let postData: any = {
332
+      idx: 0,
333
+      sum: 99999,
334
+      priority: {},
335
+    };
336
+    this.isLoading = true;
337
+    this.mainService.getFetchDataList("simple/data", "priority", postData).subscribe(result => {
338
+      this.isLoading = false;
339
+      if(result.status == 200){
340
+        this.priorityList = result.list || [];
341
+      }else{
342
+        this.priorityList = [];
343
+      }
344
+    });
345
+	}
346
+
315
   // =================维修人员===================
347
   // =================维修人员===================
316
 
348
 
317
   // 维修人员搜索
349
   // 维修人员搜索
@@ -668,14 +700,14 @@ export class SearchMoreComponent implements OnInit {
668
     flag && this.setIsSelecting(false);
700
     flag && this.setIsSelecting(false);
669
     flag && this.getWorkHourParentList();
701
     flag && this.getWorkHourParentList();
670
   }
702
   }
671
-	
703
+
672
 	// =================工时小类===================
704
 	// =================工时小类===================
673
-	
705
+
674
 	// 工时小类搜索
706
 	// 工时小类搜索
675
 	changeWorkHourSmallInp(e) {
707
 	changeWorkHourSmallInp(e) {
676
 	  this.searchTimer(this.getWorkHourSmallList, e);
708
 	  this.searchTimer(this.getWorkHourSmallList, e);
677
 	}
709
 	}
678
-	
710
+
679
 	// 获取工时小类列表
711
 	// 获取工时小类列表
680
 	workHourSmallList:any[] = [];
712
 	workHourSmallList:any[] = [];
681
 	getWorkHourSmallList(keyword?){
713
 	getWorkHourSmallList(keyword?){
@@ -711,10 +743,10 @@ export class SearchMoreComponent implements OnInit {
711
 	  flag && this.setIsSelecting(false);
743
 	  flag && this.setIsSelecting(false);
712
 	  flag && this.getWorkHourSmallList();
744
 	  flag && this.getWorkHourSmallList();
713
 	}
745
 	}
714
-	
746
+
715
 	// =================评价===================
747
 	// =================评价===================
716
-	
717
-	// 获取评价列表 
748
+
749
+	// 获取评价列表
718
 	evaluateList:any[] = [];
750
 	evaluateList:any[] = [];
719
 	getWorkHourEvaluateList(){
751
 	getWorkHourEvaluateList(){
720
 		this.isLoading = true;
752
 		this.isLoading = true;
@@ -725,14 +757,14 @@ export class SearchMoreComponent implements OnInit {
725
 		    this.evaluateList = data;
757
 		    this.evaluateList = data;
726
 		  });
758
 		  });
727
 	}
759
 	}
728
-	
760
+
729
 	// =================申请人员===================
761
 	// =================申请人员===================
730
-	
762
+
731
 	// 申请人员搜索
763
 	// 申请人员搜索
732
 	changerepairUserInp(e) {
764
 	changerepairUserInp(e) {
733
 	  this.searchTimer(this.getrepairUserList, e);
765
 	  this.searchTimer(this.getrepairUserList, e);
734
 	}
766
 	}
735
-	
767
+
736
 	// 获取申请人员列表
768
 	// 获取申请人员列表
737
 	repairUserList:any[] = [];
769
 	repairUserList:any[] = [];
738
 	getrepairUserList(keyword = ''){
770
 	getrepairUserList(keyword = ''){
@@ -759,14 +791,14 @@ export class SearchMoreComponent implements OnInit {
759
 	  flag && this.setIsSelecting(false);
791
 	  flag && this.setIsSelecting(false);
760
 	  flag && this.getrepairUserList();
792
 	  flag && this.getrepairUserList();
761
 	}
793
 	}
762
-	
794
+
763
 	// =================耗材===================
795
 	// =================耗材===================
764
-	
796
+
765
 	// 耗材搜索
797
 	// 耗材搜索
766
 	changeConsumableInp(e) {
798
 	changeConsumableInp(e) {
767
 	  this.searchTimer(this.getConsumableList, e);
799
 	  this.searchTimer(this.getConsumableList, e);
768
 	}
800
 	}
769
-	
801
+
770
 	// 获取耗材列表
802
 	// 获取耗材列表
771
 	consumableList:any[] = [];
803
 	consumableList:any[] = [];
772
 	getConsumableList(keyword = ''){
804
 	getConsumableList(keyword = ''){

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

@@ -19,21 +19,23 @@
19
   <thead (nzSortChange)="sort($event)" nzSingleSort>
19
   <thead (nzSortChange)="sort($event)" nzSingleSort>
20
     <tr>
20
     <tr>
21
       <th nzWidth="10%">业务分类名称</th>
21
       <th nzWidth="10%">业务分类名称</th>
22
-      <th nzWidth="10%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
23
-      <th nzWidth="10%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
24
-      <th nzWidth="10%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用</th>
25
-			<th nzWidth="10%" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
26
-      <th nzWidth="10%" nzShowSort nzSortKey="execution_time_num" [(nzSort)]="sortCurrent.execution_time_num">平均送达时间</th>
27
-      <th nzWidth="10%" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时完成达标率</th>
28
-      <th nzWidth="10%" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
29
-      <th nzWidth="10%" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
30
-      <th nzWidth="10%" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭工单</th>
22
+      <th nzWidth="9%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
23
+      <th nzWidth="9%" nzShowSort nzSortKey="emergency_count" [(nzSort)]="sortCurrent.emergency_count">加急工单</th>
24
+      <th nzWidth="9%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
25
+      <th nzWidth="9%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用</th>
26
+			<th nzWidth="9%" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
27
+      <th nzWidth="9%" nzShowSort nzSortKey="execution_time_num" [(nzSort)]="sortCurrent.execution_time_num">平均送达时间</th>
28
+      <th nzWidth="9%" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时完成达标率</th>
29
+      <th nzWidth="9%" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
30
+      <th nzWidth="9%" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
31
+      <th nzWidth="9%" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭工单</th>
31
     </tr>
32
     </tr>
32
   </thead>
33
   </thead>
33
   <tbody>
34
   <tbody>
34
     <tr *ngFor="let data of listOfData">
35
     <tr *ngFor="let data of listOfData">
35
       <td>{{ data.name }}</td>
36
       <td>{{ data.name }}</td>
36
       <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
37
       <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
38
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.emergency_count }}</td>
37
       <td>{{ data.totalGrade }}</td>
39
       <td>{{ data.totalGrade }}</td>
38
 			<td>{{ data.totalPrice }}</td>
40
 			<td>{{ data.totalPrice }}</td>
39
       <td>{{ data.response_time_num }}</td>
41
       <td>{{ data.response_time_num }}</td>
@@ -48,15 +50,16 @@
48
     <table class="footTable">
50
     <table class="footTable">
49
       <tr *ngFor="let data of listOfDataEnd">
51
       <tr *ngFor="let data of listOfDataEnd">
50
         <td style="width: 10%">{{ data.name }}</td>
52
         <td style="width: 10%">{{ data.name }}</td>
51
-        <td style="width: 10%" class="text-sign" (click)="viewDetail1(data,'all')">{{ data.totalCount }}</td>
52
-        <td style="width: 10%">{{ data.totalGrade }}</td>
53
-				<td style="width: 10%">{{ data.totalPrice }}</td>
54
-        <td style="width: 10%">{{ data.response_time_num }}</td>
55
-        <td style="width: 10%">{{ data.execution_time_num }}</td>
56
-        <td style="width: 10%">{{ data.aveper }}</td>
57
-        <td style="width: 10%">{{ data.total_time }}</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>
53
+        <td style="width: 9%" class="text-sign" (click)="viewDetail1(data,'all')">{{ data.totalCount }}</td>
54
+        <td style="width: 9%" class="text-sign" (click)="viewDetail4(data,'all')">{{ data.emergency_count }}</td>
55
+        <td style="width: 9%">{{ data.totalGrade }}</td>
56
+				<td style="width: 9%">{{ data.totalPrice }}</td>
57
+        <td style="width: 9%">{{ data.response_time_num }}</td>
58
+        <td style="width: 9%">{{ data.execution_time_num }}</td>
59
+        <td style="width: 9%">{{ data.aveper }}</td>
60
+        <td style="width: 9%">{{ data.total_time }}</td>
61
+        <td style="width: 9%" class="text-sign" (click)="viewDetail2(data,'all')">{{ data.five_count }}</td>
62
+        <td style="width: 9%" class="text-sign" (click)="viewDetail3(data,'all')">{{ data.special_close }}</td>
60
       </tr>
63
       </tr>
61
     </table>
64
     </table>
62
   </ng-template>
65
   </ng-template>

+ 63 - 7
src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.ts

@@ -46,7 +46,7 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
46
 
46
 
47
     }, 0)
47
     }, 0)
48
   }
48
   }
49
-	
49
+
50
 	// 数据下钻
50
 	// 数据下钻
51
 	viewDetail1(data, type){
51
 	viewDetail1(data, type){
52
 		let query = null
52
 		let query = null
@@ -84,7 +84,7 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
84
 				}
84
 				}
85
 			}
85
 			}
86
 		}
86
 		}
87
-	
87
+
88
 		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
88
 		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
89
 		let flag = this.tabService.tabs.some(v => v.path === path);
89
 		let flag = this.tabService.tabs.some(v => v.path === path);
90
 		flag && this.tabService.deleteRouteSnapshot(path);
90
 		flag && this.tabService.deleteRouteSnapshot(path);
@@ -93,7 +93,7 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
93
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
93
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
94
 		this.router.navigate([path], { replaceUrl: true });
94
 		this.router.navigate([path], { replaceUrl: true });
95
 	}
95
 	}
96
-	
96
+
97
 	viewDetail2(data, type){
97
 	viewDetail2(data, type){
98
 		let query = null
98
 		let query = null
99
 		if(type=='all'){
99
 		if(type=='all'){
@@ -134,7 +134,7 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
134
 				}
134
 				}
135
 			}
135
 			}
136
 		}
136
 		}
137
-	
137
+
138
 		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
138
 		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
139
 		let flag = this.tabService.tabs.some(v => v.path === path);
139
 		let flag = this.tabService.tabs.some(v => v.path === path);
140
 		flag && this.tabService.deleteRouteSnapshot(path);
140
 		flag && this.tabService.deleteRouteSnapshot(path);
@@ -143,7 +143,7 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
143
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
143
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
144
 		this.router.navigate([path], { replaceUrl: true });
144
 		this.router.navigate([path], { replaceUrl: true });
145
 	}
145
 	}
146
-	
146
+
147
 	viewDetail3(data, type){
147
 	viewDetail3(data, type){
148
 		let query = null
148
 		let query = null
149
 		if(type=='all'){
149
 		if(type=='all'){
@@ -190,7 +190,63 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
190
 				}
190
 				}
191
 			}
191
 			}
192
 		}
192
 		}
193
-	
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
+  viewDetail4(data, type){
204
+		let query = null
205
+		if(type=='all'){
206
+			query = {
207
+				startDate: this.customChangeDateComponent.startDate || undefined,
208
+				endDate: this.customChangeDateComponent.endDate || undefined,
209
+				searchQuery:{
210
+					statusValue: 'close',
211
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
212
+					deptId: this.fieldConfig.fields.deptId || 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
+					emergencyTypeId: 300,
220
+					emergencyTypeDTO: {
221
+						"name": "是",
222
+						"id": 300
223
+					},
224
+				}
225
+			}
226
+		}else{
227
+			query = {
228
+				startDate: this.customChangeDateComponent.startDate || undefined,
229
+				endDate: this.customChangeDateComponent.endDate || undefined,
230
+				statisticsTypeId: data.statisticsTypeId || undefined,
231
+				searchQuery:{
232
+					statusValue: 'close',
233
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
234
+					deptId: this.fieldConfig.fields.deptId || undefined,
235
+					groupId: this.fieldConfig.fields.groupId || undefined,
236
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
237
+					userId: this.fieldConfig.fields.userId || undefined,
238
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
239
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
240
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
241
+					emergencyTypeId: 300,
242
+					emergencyTypeDTO: {
243
+						"name": "是",
244
+						"id": 300
245
+					},
246
+				}
247
+			}
248
+		}
249
+
194
 		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
250
 		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
195
 		let flag = this.tabService.tabs.some(v => v.path === path);
251
 		let flag = this.tabService.tabs.some(v => v.path === path);
196
 		flag && this.tabService.deleteRouteSnapshot(path);
252
 		flag && this.tabService.deleteRouteSnapshot(path);
@@ -199,7 +255,7 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
199
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
255
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
200
 		this.router.navigate([path], { replaceUrl: true });
256
 		this.router.navigate([path], { replaceUrl: true });
201
 	}
257
 	}
202
-	
258
+
203
   getQueryParams(){
259
   getQueryParams(){
204
     let queryParams = this.tabService.getQueryParams();
260
     let queryParams = this.tabService.getQueryParams();
205
     this.tabService.clearQueryParams();
261
     this.tabService.clearQueryParams();

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

@@ -30,23 +30,25 @@
30
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
30
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
31
   <thead (nzSortChange)="sort($event)" nzSingleSort>
31
   <thead (nzSortChange)="sort($event)" nzSingleSort>
32
     <tr>
32
     <tr>
33
-      <th nzWidth="10%" nzShowSort nzSortKey="date" [(nzSort)]="sortCurrent.date">日期</th>
34
-      <th nzWidth="9%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
35
-      <th nzWidth="9%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
36
-			<th nzWidth="9%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用</th>
37
-      <th nzWidth="9%" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
38
-      <th nzWidth="9%" nzShowSort nzSortKey="arrive_time_num" [(nzSort)]="sortCurrent.arrive_time_num">平均到达时间</th>
39
-      <th nzWidth="9%" nzShowSort nzSortKey="execution_time_num" [(nzSort)]="sortCurrent.execution_time_num">平均送达时间</th>
40
-      <th nzWidth="9%" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时完成达标率</th>
41
-      <th nzWidth="9%" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
42
-      <th nzWidth="9%" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
43
-      <th nzWidth="9%" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
33
+      <th nzWidth="12%" nzShowSort nzSortKey="date" [(nzSort)]="sortCurrent.date">日期</th>
34
+      <th nzWidth="8%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
35
+      <th nzWidth="8%" nzShowSort nzSortKey="emergency_count" [(nzSort)]="sortCurrent.emergency_count">加急工单</th>
36
+      <th nzWidth="8%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
37
+			<th nzWidth="8%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用</th>
38
+      <th nzWidth="8%" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
39
+      <th nzWidth="8%" nzShowSort nzSortKey="arrive_time_num" [(nzSort)]="sortCurrent.arrive_time_num">平均到达时间</th>
40
+      <th nzWidth="8%" nzShowSort nzSortKey="execution_time_num" [(nzSort)]="sortCurrent.execution_time_num">平均送达时间</th>
41
+      <th nzWidth="8%" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时完成达标率</th>
42
+      <th nzWidth="8%" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
43
+      <th nzWidth="8%" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
44
+      <th nzWidth="8%" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
44
     </tr>
45
     </tr>
45
   </thead>
46
   </thead>
46
   <tbody>
47
   <tbody>
47
     <tr *ngFor="let data of listOfData">
48
     <tr *ngFor="let data of listOfData">
48
       <td>{{ data.date }}</td>
49
       <td>{{ data.date }}</td>
49
       <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
50
       <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
51
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.emergency_count }}</td>
50
       <td>{{ data.totalGrade }}</td>
52
       <td>{{ data.totalGrade }}</td>
51
 			<td>{{ data.totalPrice }}</td>
53
 			<td>{{ data.totalPrice }}</td>
52
       <td>{{ data.response_time_num }}</td>
54
       <td>{{ data.response_time_num }}</td>
@@ -61,17 +63,18 @@
61
   <ng-template #footerTpl>
63
   <ng-template #footerTpl>
62
     <table class="footTable">
64
     <table class="footTable">
63
       <tr *ngFor="let data of listOfDataEnd">
65
       <tr *ngFor="let data of listOfDataEnd">
64
-        <td style="width: 10%">{{ data.date }}</td>
65
-        <td style="width: 9%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.totalCount }}</td>
66
-        <td style="width: 9%">{{ data.totalGrade }}</td>
67
-				<td style="width: 9%">{{ data.totalPrice }}</td>
68
-        <td style="width: 9%">{{ data.response_time_num }}</td>
69
-        <td style="width: 9%">{{ data.arrive_time_num }}</td>
70
-        <td style="width: 9%">{{ data.execution_time_num }}</td>
71
-        <td style="width: 9%">{{ data.aveper }}</td>
72
-        <td style="width: 9%">{{ data.total_time }}</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>
66
+        <td style="width: 12%">{{ data.date }}</td>
67
+        <td style="width: 8%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.totalCount }}</td>
68
+        <td style="width: 8%" class="text-sign" (click)="viewDetail4(data, 'all')">{{ data.emergency_count }}</td>
69
+        <td style="width: 8%">{{ data.totalGrade }}</td>
70
+				<td style="width: 8%">{{ data.totalPrice }}</td>
71
+        <td style="width: 8%">{{ data.response_time_num }}</td>
72
+        <td style="width: 8%">{{ data.arrive_time_num }}</td>
73
+        <td style="width: 8%">{{ data.execution_time_num }}</td>
74
+        <td style="width: 8%">{{ data.aveper }}</td>
75
+        <td style="width: 8%">{{ data.total_time }}</td>
76
+        <td style="width: 8%" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.five_count }}</td>
77
+        <td style="width: 8%" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.special_close }}</td>
75
       </tr>
78
       </tr>
76
     </table>
79
     </table>
77
   </ng-template>
80
   </ng-template>

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

@@ -46,7 +46,7 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
46
 
46
 
47
     }, 0)
47
     }, 0)
48
   }
48
   }
49
-	
49
+
50
 	// 数据下钻
50
 	// 数据下钻
51
 	viewDetail1(data, type){
51
 	viewDetail1(data, type){
52
 		let query = null
52
 		let query = null
@@ -104,7 +104,7 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
104
 			this.router.navigate([path], { replaceUrl: true });
104
 			this.router.navigate([path], { replaceUrl: true });
105
 		}
105
 		}
106
 	}
106
 	}
107
-	
107
+
108
 	viewDetail2(data, type){
108
 	viewDetail2(data, type){
109
 		let query = null
109
 		let query = null
110
 		if(type=='all'){
110
 		if(type=='all'){
@@ -165,7 +165,7 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
165
 			this.router.navigate([path], { replaceUrl: true });
165
 			this.router.navigate([path], { replaceUrl: true });
166
 		}
166
 		}
167
 	}
167
 	}
168
-	
168
+
169
 	viewDetail3(data, type){
169
 	viewDetail3(data, type){
170
 		let query = null
170
 		let query = null
171
 		if(type=='all'){
171
 		if(type=='all'){
@@ -232,7 +232,74 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
232
 			this.router.navigate([path], { replaceUrl: true });
232
 			this.router.navigate([path], { replaceUrl: true });
233
 		}
233
 		}
234
 	}
234
 	}
235
-	
235
+
236
+  viewDetail4(data, type){
237
+		let query = null
238
+		if(type=='all'){
239
+			query = {
240
+				startDate: this.customChangeDateComponent.startDate || undefined,
241
+				endDate: this.customChangeDateComponent.endDate || undefined,
242
+				statisticsTypeId: this.statisticsTypeId || undefined,
243
+				searchQuery:{
244
+					statusValue: 'close',
245
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
246
+					deptId: this.fieldConfig.fields.deptId || undefined,
247
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
248
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
249
+					groupId: this.fieldConfig.fields.groupId || undefined,
250
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
251
+					userId: this.fieldConfig.fields.userId || undefined,
252
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
253
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
254
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
255
+					emergencyTypeId: 300,
256
+					emergencyTypeDTO: {
257
+						"name": "是",
258
+						"id": 300
259
+					},
260
+				}
261
+			}
262
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
263
+			let flag = this.tabService.tabs.some(v => v.path === path);
264
+			flag && this.tabService.deleteRouteSnapshot(path);
265
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
266
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
267
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
268
+			this.router.navigate([path], { replaceUrl: true });
269
+		}else{
270
+			query = {
271
+				startDate: this.customChangeDateComponent.startDate || undefined,
272
+				endDate: this.customChangeDateComponent.endDate || undefined,
273
+				statisticsTypeId: this.statisticsTypeId || undefined,
274
+				searchQuery:{
275
+					statusValue: 'close',
276
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
277
+					deptId: this.fieldConfig.fields.deptId || undefined,
278
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
279
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
280
+					groupId: this.fieldConfig.fields.groupId || undefined,
281
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
282
+					userId: this.fieldConfig.fields.userId || undefined,
283
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
284
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
285
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
286
+					emergencyTypeId: 300,
287
+					emergencyTypeDTO: {
288
+						"name": "是",
289
+						"id": 300
290
+					},
291
+				}
292
+			}
293
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
294
+			let flag = this.tabService.tabs.some(v => v.path === path);
295
+			flag && this.tabService.deleteRouteSnapshot(path);
296
+			this.tabService.setQueryParams('dateRange',  [data.date + ' ' + '00:00:00', data.date + ' ' + '23:59:59']);
297
+			this.tabService.setQueryParams('defRange', null);
298
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
299
+			this.router.navigate([path], { replaceUrl: true });
300
+		}
301
+	}
302
+
236
   getQueryParams(){
303
   getQueryParams(){
237
     let queryParams = this.tabService.getQueryParams();
304
     let queryParams = this.tabService.getQueryParams();
238
     this.tabService.clearQueryParams();
305
     this.tabService.clearQueryParams();

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

@@ -34,15 +34,16 @@
34
 				<th nzWidth="12%" *ngIf="parent==1" nzShowSort nzSortKey="parentOrders" [(nzSort)]="sortCurrent.parentOrders">父级科室(编码)</th>
34
 				<th nzWidth="12%" *ngIf="parent==1" nzShowSort nzSortKey="parentOrders" [(nzSort)]="sortCurrent.parentOrders">父级科室(编码)</th>
35
 				<th [nzWidth]="parent==1 ? '8%' : '10%'" nzShowSort nzSortKey="orders" [(nzSort)]="sortCurrent.orders">科室(编码)</th>
35
 				<th [nzWidth]="parent==1 ? '8%' : '10%'" nzShowSort nzSortKey="orders" [(nzSort)]="sortCurrent.orders">科室(编码)</th>
36
 				<th [nzWidth]="parent==1 ? '8%' : '9%'" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
36
 				<th [nzWidth]="parent==1 ? '8%' : '9%'" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
37
-				<th [nzWidth]="parent==1 ? '8%' : '9%'" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
38
-				<th [nzWidth]="parent==1 ? '8%' : '9%'" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用</th>
39
-				<th [nzWidth]="parent==1 ? '8%' : '9%'" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
40
-        <th [nzWidth]="parent==1 ? '8%' : '9%'" nzShowSort nzSortKey="arrive_time_num" [(nzSort)]="sortCurrent.arrive_time_num">平均到达时间</th>
41
-				<th [nzWidth]="parent==1 ? '8%' : '9%'" nzShowSort nzSortKey="execution_time_num" [(nzSort)]="sortCurrent.execution_time_num">平均送达时间</th>
42
-				<th [nzWidth]="parent==1 ? '8%' : '9%'" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时完成达标率</th>
43
-				<th [nzWidth]="parent==1 ? '8%' : '9%'" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
44
-				<th [nzWidth]="parent==1 ? '8%' : '9%'" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
45
-				<th [nzWidth]="parent==1 ? '8%' : '9%'" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
37
+				<th [nzWidth]="parent==1 ? '8%' : '9%'" nzShowSort nzSortKey="emergency_count" [(nzSort)]="sortCurrent.emergency_count">加急工单</th>
38
+				<th [nzWidth]="parent==1 ? '8%' : '8%'" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
39
+				<th [nzWidth]="parent==1 ? '7%' : '8%'" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用</th>
40
+				<th [nzWidth]="parent==1 ? '7%' : '8%'" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
41
+        <th [nzWidth]="parent==1 ? '7%' : '8%'" nzShowSort nzSortKey="arrive_time_num" [(nzSort)]="sortCurrent.arrive_time_num">平均到达时间</th>
42
+				<th [nzWidth]="parent==1 ? '7%' : '8%'" nzShowSort nzSortKey="execution_time_num" [(nzSort)]="sortCurrent.execution_time_num">平均送达时间</th>
43
+				<th [nzWidth]="parent==1 ? '7%' : '8%'" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时完成达标率</th>
44
+				<th [nzWidth]="parent==1 ? '7%' : '8%'" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
45
+				<th [nzWidth]="parent==1 ? '7%' : '8%'" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
46
+				<th [nzWidth]="parent==1 ? '7%' : '8%'" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
46
 			</tr>
47
 			</tr>
47
 		</thead>
48
 		</thead>
48
 		<tbody>
49
 		<tbody>
@@ -50,6 +51,7 @@
50
 				<td *ngIf="parent==1">{{ data.parentName || '无' }}</td>
51
 				<td *ngIf="parent==1">{{ data.parentName || '无' }}</td>
51
 				<td>{{ data.name }}</td>
52
 				<td>{{ data.name }}</td>
52
 				<td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
53
 				<td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
54
+				<td class="text-sign" (click)="viewDetail4(data)">{{ data.emergency_count }}</td>
53
 				<td>{{ data.totalGrade }}</td>
55
 				<td>{{ data.totalGrade }}</td>
54
 				<td>{{ data.totalPrice }}</td>
56
 				<td>{{ data.totalPrice }}</td>
55
 				<td>{{ data.response_time_num }}</td>
57
 				<td>{{ data.response_time_num }}</td>
@@ -68,15 +70,16 @@
68
 					<td style="width: 10%" *ngIf="parent==0">{{ data.name }}</td>
70
 					<td style="width: 10%" *ngIf="parent==0">{{ data.name }}</td>
69
 					<td style="width: 8%" *ngIf="parent==1"></td>
71
 					<td style="width: 8%" *ngIf="parent==1"></td>
70
 					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.totalCount }}</td>
72
 					<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>
72
-					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.totalPrice }}</td>
73
-					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.response_time_num }}</td>
74
-					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.arrive_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>
77
-					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}">{{ data.total_time }}</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>
73
+					<td [ngStyle]="{width: parent==1 ? '8%' : '9%'}" class="text-sign" (click)="viewDetail4(data, 'all')">{{ data.emergency_count }}</td>
74
+					<td [ngStyle]="{width: parent==1 ? '8%' : '8%'}">{{ data.totalGrade }}</td>
75
+					<td [ngStyle]="{width: parent==1 ? '7%' : '8%'}">{{ data.totalPrice }}</td>
76
+					<td [ngStyle]="{width: parent==1 ? '7%' : '8%'}">{{ data.response_time_num }}</td>
77
+					<td [ngStyle]="{width: parent==1 ? '7%' : '8%'}">{{ data.arrive_time_num }}</td>
78
+					<td [ngStyle]="{width: parent==1 ? '7%' : '8%'}">{{ data.execution_time_num }}</td>
79
+					<td [ngStyle]="{width: parent==1 ? '7%' : '8%'}">{{ data.aveper }}</td>
80
+					<td [ngStyle]="{width: parent==1 ? '7%' : '8%'}">{{ data.total_time }}</td>
81
+					<td [ngStyle]="{width: parent==1 ? '7%' : '8%'}" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.five_count }}</td>
82
+					<td [ngStyle]="{width: parent==1 ? '7%' : '8%'}" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.special_close }}</td>
80
 				</tr>
83
 				</tr>
81
 			</table>
84
 			</table>
82
 		</ng-template>
85
 		</ng-template>

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

@@ -60,7 +60,7 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
60
 
60
 
61
     }, 0)
61
     }, 0)
62
   }
62
   }
63
-	
63
+
64
 	// 数据下钻
64
 	// 数据下钻
65
 	viewDetail1(data, type){
65
 	viewDetail1(data, type){
66
 		let query = null
66
 		let query = null
@@ -137,7 +137,7 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
137
 			  });
137
 			  });
138
 		}
138
 		}
139
 	}
139
 	}
140
-	
140
+
141
 	viewDetail2(data, type){
141
 	viewDetail2(data, type){
142
 		let query = null
142
 		let query = null
143
 		let item = null
143
 		let item = null
@@ -217,7 +217,7 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
217
 				});
217
 				});
218
 		}
218
 		}
219
 	}
219
 	}
220
-	
220
+
221
 	viewDetail3(data, type){
221
 	viewDetail3(data, type){
222
 		let query = null
222
 		let query = null
223
 		let item = null
223
 		let item = null
@@ -303,7 +303,93 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
303
 				});
303
 				});
304
 		}
304
 		}
305
 	}
305
 	}
306
-	
306
+
307
+	viewDetail4(data, type){
308
+		let query = null
309
+		let item = null
310
+		if(this.deptId){
311
+			item = this.alldepart.find(i => i.id == this.deptId)
312
+		}
313
+		if(type=='all'){
314
+			query = {
315
+				startDate: this.customChangeDateComponent.startDate || undefined,
316
+				endDate: this.customChangeDateComponent.endDate || undefined,
317
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
318
+				searchQuery:{
319
+					statusValue: 'close',
320
+					deptDTO: item || undefined,
321
+					deptId: this.deptId || undefined,
322
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
323
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
324
+					groupId: this.fieldConfig.fields.groupId || undefined,
325
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
326
+					userId: this.fieldConfig.fields.userId || undefined,
327
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
328
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
329
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
330
+					emergencyTypeId: 300,
331
+					emergencyTypeDTO: {
332
+						"name": "是",
333
+						"id": 300
334
+					},
335
+				}
336
+			}
337
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
338
+			let flag = this.tabService.tabs.some(v => v.path === path);
339
+			flag && this.tabService.deleteRouteSnapshot(path);
340
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
341
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
342
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
343
+			this.router.navigate([path], { replaceUrl: true });
344
+		}else{
345
+			let arr = data.name.split('(')
346
+			let postData: any = {
347
+			  idx: 0,
348
+			  sum: 20,
349
+			  department: {
350
+			    dept: arr[0],
351
+			    searchType: 1,
352
+			  },
353
+			};
354
+			this.mainService.getFetchDataList("simple/data", "department", postData)
355
+				.subscribe((res) => {
356
+					if (res.status == 200) {
357
+						let item = res.list.find(i =>i.id == data.deptId)
358
+						query = {
359
+							startDate: this.customChangeDateComponent.startDate || undefined,
360
+							endDate: this.customChangeDateComponent.endDate || undefined,
361
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
362
+							searchQuery:{
363
+								statusValue: 'close',
364
+								deptDTO: item || undefined,
365
+								deptId: data.deptId || undefined,
366
+								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
367
+								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
368
+								groupId: this.fieldConfig.fields.groupId || undefined,
369
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
370
+								userId: this.fieldConfig.fields.userId || undefined,
371
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
372
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
373
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
374
+								emergencyTypeId: 300,
375
+								emergencyTypeDTO: {
376
+									"name": "是",
377
+									"id": 300
378
+								},
379
+							}
380
+						}
381
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
382
+						let flag = this.tabService.tabs.some(v => v.path === path);
383
+						flag && this.tabService.deleteRouteSnapshot(path);
384
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
385
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
386
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
387
+						this.router.navigate([path], { replaceUrl: true });
388
+					}
389
+				});
390
+		}
391
+	}
392
+
307
   getQueryParams(){
393
   getQueryParams(){
308
     let queryParams = this.tabService.getQueryParams();
394
     let queryParams = this.tabService.getQueryParams();
309
     this.tabService.clearQueryParams();
395
     this.tabService.clearQueryParams();

+ 9 - 0
src/app/views/new-statistics/distribution-inspection-statistics/distribution-inspection-statistics-routing.module.ts

@@ -125,6 +125,15 @@ const routes: Routes = [
125
 			    title: '配-人员评价统计'
125
 			    title: '配-人员评价统计'
126
 			  }
126
 			  }
127
 			},
127
 			},
128
+			{
129
+			  // 人员效能统计
130
+			  path: 'distributionPersonnelEffectivenessStatistics',
131
+			  loadChildren: () => import('./distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.module').then(m => m.DistributionPersonnelEffectivenessStatisticsModule),
132
+			  data: {
133
+			    reuse: true,
134
+			    title: '配-人员效能统计'
135
+			  }
136
+			},
128
       {
137
       {
129
 			  // 24小时质控统计
138
 			  // 24小时质控统计
130
 			  path: 'hourQualityControlStatistics',
139
 			  path: 'hourQualityControlStatistics',

+ 14 - 0
src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics-routing.module.ts

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

+ 70 - 0
src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.component.html

@@ -0,0 +1,70 @@
1
+<div class="searchDataWrap">
2
+  <div class="searchData">
3
+    <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4
+    <div class="searchDataItem">
5
+      <span class="label">排除异常人员</span>:
6
+      <nz-input-number [(ngModel)]="matchUserCouont" [nzMin]="1" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
7
+    </div>
8
+  </div>
9
+  <div class="operation">
10
+    <i class="icon_transport transport-gengduo" nz-tooltip nzTooltipTitle="更多搜索" (click)="showMore()"></i>
11
+    <button nz-button class="btn default" (click)="search()">查询</button>
12
+    <button nz-button class="btn default ml8" (click)="reset()">重置</button>
13
+    <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
14
+  </div>
15
+</div>
16
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.deptDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.taskTypeDTO || fieldConfig.fields.statisticsTypeDTO">
17
+  <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
18
+  <span>{{fieldConfig.fields.userDTO?.name}}</span>
19
+  <span>{{fieldConfig.fields.statisticsTypeDTO?.name}}</span>
20
+  <span>{{fieldConfig.fields.taskTypeDTO?.taskName}}</span>
21
+	<span>{{fieldConfig.fields.buildingDTO?.buildingName}}</span>
22
+  <span>{{fieldConfig.fields.deptDTO?.dept}}</span>
23
+</div>
24
+<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
25
+  <thead (nzSortChange)="sort($event)" nzSingleSort>
26
+    <tr>
27
+      <th nzWidth="12.5%" nzShowSort nzSortKey="date" [(nzSort)]="sortCurrent.date">日期</th>
28
+      <th nzWidth="12.5%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单总量</th>
29
+      <th nzWidth="12.5%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">积分总量</th>
30
+      <th nzWidth="12.5%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总价格</th>
31
+      <th nzWidth="12.5%" nzShowSort nzSortKey="countWorker" [(nzSort)]="sortCurrent.countWorker">总人数</th>
32
+      <th nzWidth="12.5%" nzShowSort nzSortKey="avgCount" [(nzSort)]="sortCurrent.avgCount">人均单量</th>
33
+      <th nzWidth="12.5%" nzShowSort nzSortKey="avgGrade" [(nzSort)]="sortCurrent.avgGrade">人均积分</th>
34
+      <th nzWidth="12.5%" nzShowSort nzSortKey="avgPrice" [(nzSort)]="sortCurrent.avgPrice">人均费用</th>
35
+    </tr>
36
+  </thead>
37
+  <tbody>
38
+    <tr *ngFor="let data of listOfData">
39
+      <td>{{ data.date }}</td>
40
+      <td>{{ data.totalCount }}</td>
41
+      <td>{{ data.totalGrade }}</td>
42
+      <td>{{ data.totalPrice }}</td>
43
+      <td>{{ data.countWorker }}</td>
44
+      <td>{{ data.avgCount }}</td>
45
+      <td>{{ data.avgGrade }}</td>
46
+      <td>{{ data.avgPrice }}</td>
47
+    </tr>
48
+  </tbody>
49
+  <ng-template #footerTpl>
50
+    <table class="footTable">
51
+      <tr *ngFor="let data of listOfDataEnd">
52
+        <td style="width: 12.5%">{{ data.date }}</td>
53
+        <td style="width: 12.5%">{{ data.totalCount }}</td>
54
+        <td style="width: 12.5%">{{ data.totalGrade }}</td>
55
+        <td style="width: 12.5%">{{ data.totalPrice }}</td>
56
+        <td style="width: 12.5%">{{ data.countWorker }}</td>
57
+        <td style="width: 12.5%">{{ data.avgCount }}</td>
58
+        <td style="width: 12.5%">{{ data.avgGrade }}</td>
59
+        <td style="width: 12.5%">{{ data.avgPrice }}</td>
60
+      </tr>
61
+    </table>
62
+  </ng-template>
63
+</nz-table>
64
+<div class="pagination">
65
+  <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
66
+  <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" nzShowSizeChanger [nzPageSizeOptions]="[30,50,100,200]" [nzShowTotal]="totalTemplate"></nz-pagination>
67
+</div>
68
+
69
+<!-- 详细搜索 -->
70
+<app-distribution-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-distribution-search-more>

+ 71 - 0
src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.component.less

@@ -0,0 +1,71 @@
1
+@import "../../../../../../src/theme.less";
2
+:host{
3
+  position: absolute;
4
+  top: 0;
5
+  right: 0;
6
+  bottom: 0;
7
+  left: 0;
8
+  ::ng-deep .ant-table-footer{
9
+    padding: 16px 0;
10
+    width: calc(100% - 15px);
11
+    font-weight: bold;
12
+  }
13
+  tr, th{
14
+    text-align: center;
15
+  }
16
+  .searchDataWrap{
17
+    display: flex;
18
+    align-items: center;
19
+    justify-content: space-between;
20
+    .searchData{
21
+      padding: 16px;
22
+      display: flex;
23
+      align-items: center;
24
+      .searchDataItem{
25
+        margin-right: 24px;
26
+        .label{
27
+          font-size: 16px;
28
+        }
29
+        .selectItem{
30
+          width: 160px;
31
+        }
32
+      }
33
+    }
34
+    .operation{
35
+      margin-right: 16px;
36
+      display: flex;
37
+      align-items: center;
38
+      cursor: pointer;
39
+      .icon_transport{
40
+        margin-right: 16px;
41
+        font-size: 24px;
42
+      }
43
+      .btn{
44
+        &.default{
45
+          height: 32px;
46
+          line-height: 32px;
47
+          min-width: 70px;
48
+        }
49
+      }
50
+    }
51
+  }
52
+
53
+  .table{
54
+    margin: 0 8px;
55
+  }
56
+
57
+  .moreFilter{
58
+    margin-bottom: 16px;
59
+    span{
60
+      margin-left: 16px;
61
+      color: @primary-color;
62
+    }
63
+  }
64
+
65
+  .pagination{
66
+    padding: 16px;
67
+    display: flex;
68
+    justify-content: flex-end;
69
+    align-items: center;
70
+  }
71
+}

+ 245 - 0
src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.component.ts

@@ -0,0 +1,245 @@
1
+import { TabService } from '../../services/tab.service';
2
+import { debounceTime } from 'rxjs/operators';
3
+import { Subject } from 'rxjs';
4
+import { NzMessageService } from 'ng-zorro-antd/message';
5
+import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
6
+import { MainService } from 'src/app/services/main.service';
7
+import { ActivatedRoute } from '@angular/router';
8
+import { ToolService } from "../../../../services/tool.service";
9
+import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
10
+@Component({
11
+  selector: "app-distribution-personnel-effectiveness-statistics",
12
+  templateUrl: "./distribution-personnel-effectiveness-statistics.component.html",
13
+  styleUrls: ["./distribution-personnel-effectiveness-statistics.component.less"],
14
+})
15
+export class DistributionPersonnelEffectivenessStatisticsComponent implements OnInit, AfterViewInit {
16
+  @ViewChild('customChangeDate', { static: false }) customChangeDateComponent!: CustomChangeDateComponent;
17
+  constructor(
18
+    private mainService: MainService,
19
+    private message: NzMessageService,
20
+    private route: ActivatedRoute,
21
+    private tabService: TabService,
22
+		private tool: ToolService,
23
+  ) {}
24
+
25
+  listOfData: any[] = []; //表格数据
26
+  listOfDataEnd: any[] = []; //表格合计
27
+  pageIndex: number = 1; //表格当前页码
28
+  pageSize: number = 30; //表格每页展示条数
29
+  listLength: number = 0; //表格总数据量
30
+
31
+  matchUserCouont:number = 1;//排除异常人员
32
+
33
+  searchTimerSubject = new Subject();
34
+
35
+  ngOnInit() {
36
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
37
+      let fun = v[0];
38
+      fun.call(this, v[1]);
39
+    });
40
+  }
41
+
42
+  ngAfterViewInit(){
43
+    this.initSessionData();
44
+    this.getQueryParams();
45
+    setTimeout(() => {
46
+      this.search();
47
+    }, 0)
48
+    this.onResize();
49
+  }
50
+
51
+  tableHeight:number = 0;
52
+  @HostListener('window:resize')
53
+  onResize(): void {
54
+    setTimeout(() => {
55
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
56
+
57
+    }, 0)
58
+  }
59
+
60
+  getQueryParams(){
61
+    let queryParams = this.tabService.getQueryParams();
62
+    this.tabService.clearQueryParams();
63
+    if(queryParams.dateRange){
64
+      this.dateRange = queryParams.dateRange;
65
+      this.customChangeDateComponent.initByDate(this.dateRange);
66
+    }
67
+  }
68
+
69
+  get getMoreFilter(){
70
+    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.deptDTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.taskTypeDTO || this.fieldConfig.fields.statisticsTypeDTO;
71
+    return flag ? 37 : 0;
72
+  }
73
+
74
+  // 初始化缓存数据
75
+  queryType:any;
76
+  hosId:any;
77
+  dutyId:any;
78
+  parentDutyId:any;
79
+  initSessionData(){
80
+    let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
81
+    let queryType:any = newStatistics.queryType;
82
+    let hosId:any = newStatistics.hospitalId;
83
+    let dutyId:any = newStatistics.dutyId;
84
+
85
+    queryType = queryType ? +queryType : undefined;
86
+    hosId = hosId ? +hosId : undefined;
87
+    dutyId = dutyId ? +dutyId : undefined;
88
+
89
+    this.queryType = queryType;
90
+    if(queryType == 1){
91
+      this.hosId = undefined;
92
+      this.dutyId = undefined;
93
+      this.parentDutyId = undefined;
94
+    }else if(queryType == 2){
95
+      this.hosId = hosId;
96
+      this.dutyId = undefined;
97
+      this.parentDutyId = undefined;
98
+    }else if(queryType == 3){
99
+      this.hosId = undefined;
100
+      this.dutyId = dutyId;
101
+      this.parentDutyId = undefined;
102
+    }else if(queryType == 4){
103
+      this.hosId = undefined;
104
+      this.dutyId = undefined;
105
+      this.parentDutyId = dutyId;
106
+    }
107
+  }
108
+
109
+  get getHosId(){
110
+    return this.parentDutyId || this.dutyId || this.hosId;
111
+  }
112
+
113
+  // 表格数据
114
+  loading1 = false;
115
+  getList(num?: number, field?: string, sort?: string) {
116
+    if (num !== undefined) {
117
+      this.pageIndex = num;
118
+    }
119
+    let postData:any = {
120
+      idx: this.pageIndex - 1,
121
+      sum: this.pageSize,
122
+			matchUserCouont: this.matchUserCouont || undefined,
123
+			buildingId: this.fieldConfig.fields.buildingId || undefined,
124
+      startDate: this.customChangeDateComponent.startDate || undefined,
125
+      endDate: this.customChangeDateComponent.endDate || undefined,
126
+      hosId: this.getHosId,
127
+      groupId: this.fieldConfig.fields.groupId || undefined,
128
+      userId: this.fieldConfig.fields.userId || undefined,
129
+      deptId: this.fieldConfig.fields.deptId || undefined,
130
+      taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
131
+      statisticsTypeId: this.fieldConfig.fields.statisticsTypeId || undefined,
132
+    };
133
+    if (field && sort) {
134
+      postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
135
+    }
136
+    this.loading1 = true;
137
+    this.mainService
138
+      .postCustom("itsm/report", "dateUserTransOrder", postData)
139
+      .subscribe((result) => {
140
+        this.loading1 = false;
141
+        this.listOfData = result.dataList.filter((v, i) => { return i != result.dataList.length - 1 });
142
+        this.listOfDataEnd = result.dataList.filter((v, i) => { return i == result.dataList.length - 1 });
143
+        this.listLength = result.totalCount;
144
+      });
145
+  }
146
+
147
+  // 列表排序
148
+  sortCurrent:any = {};
149
+  sortCurrentKey: string = "";
150
+  sortCurrentValue: string | null = "";
151
+  sort(e) {
152
+    const { key, value } = e;
153
+    this.sortCurrentKey = key;
154
+    this.sortCurrentValue = value;
155
+    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
156
+  }
157
+
158
+  // 搜索
159
+  search() {
160
+    this.getList(1, this.sortCurrentKey, this.sortCurrentValue);
161
+  }
162
+
163
+  // 日期选择
164
+  dateRange: any = [];
165
+
166
+  // 导出
167
+  excelExportLoading:any = false;
168
+  excelExport(){
169
+    this.excelExportLoading = this.message.loading("导出中..", {
170
+      nzDuration: 0,
171
+    }).messageId;
172
+    let postData:any = {
173
+			matchUserCouont: this.matchUserCouont || undefined,
174
+			buildingId: this.fieldConfig.fields.buildingId || undefined,
175
+      startDate: this.customChangeDateComponent.startDate || undefined,
176
+      endDate: this.customChangeDateComponent.endDate || undefined,
177
+      hosId: this.getHosId,
178
+      groupId: this.fieldConfig.fields.groupId || undefined,
179
+      userId: this.fieldConfig.fields.userId || undefined,
180
+      deptId: this.fieldConfig.fields.deptId || undefined,
181
+      taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
182
+      statisticsTypeId: this.fieldConfig.fields.statisticsTypeId || undefined,
183
+    };
184
+    if (this.sortCurrentKey && this.sortCurrentValue) {
185
+      postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
186
+    }
187
+    this.mainService
188
+      .postExportCustom("itsm/exportMergeTitle", "dateUserTransOrder", postData)
189
+      .subscribe((data) => {
190
+        this.message.remove(this.excelExportLoading);
191
+        this.excelExportLoading = false;
192
+        this.message.success('导出成功');
193
+        var file = new Blob([data], {
194
+          type: "application/vnd.ms-excel",
195
+        });
196
+        //trick to download store a file having its URL
197
+        var fileURL = URL.createObjectURL(file);
198
+        var a = document.createElement("a");
199
+        a.href = fileURL;
200
+        a.target = "_blank";
201
+        a.download = `${this.route.parent.routeConfig.data.title}.xls`;
202
+        document.body.appendChild(a);
203
+        a.click();
204
+      },(err) => {
205
+        this.message.remove(this.excelExportLoading);
206
+        this.excelExportLoading = false;
207
+        this.message.error('导出失败');
208
+      });
209
+  }
210
+  // 重置
211
+  reset(){
212
+    this.sortCurrentKey = "totalCount";
213
+		this.sortCurrentValue = "descend";
214
+		this.sortCurrent = {totalCount: 'descend'};
215
+    this.dateRange = []
216
+    this.matchUserCouont = 1;
217
+    this.fieldConfig.fields = {groupId: undefined, userId: undefined, deptId: undefined, buildingId: undefined, taskTypeId: undefined, statisticsTypeId: undefined};
218
+    this.customChangeDateComponent.resetByDate();
219
+    setTimeout(_=>{
220
+    	this.search();
221
+    })
222
+  }
223
+
224
+  // 详细搜索
225
+  fieldConfig:any = {
226
+    fields: {groupId: undefined, userId: undefined, deptId: undefined, buildingId: undefined, taskTypeId: undefined, statisticsTypeId: undefined},
227
+    config: {groupAndUser: true, dept: true, building: true, taskType: true, statisticsType: true},
228
+  }
229
+  showSearchMore:boolean = false;
230
+  showMore(){
231
+    this.showSearchMore = true;
232
+  }
233
+
234
+  cancelEvent(){
235
+    this.showSearchMore = false;
236
+  }
237
+
238
+  submitEvent(fields){
239
+    this.showSearchMore = false;
240
+    this.fieldConfig.fields = fields;
241
+    console.log('this.fieldConfig.fields:', this.fieldConfig.fields)
242
+    this.search();
243
+    this.onResize();
244
+  }
245
+}

+ 23 - 0
src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.module.ts

@@ -0,0 +1,23 @@
1
+import { DistributionPersonnelEffectivenessStatisticsComponent } from './distribution-personnel-effectiveness-statistics.component';
2
+import { NgModule } from '@angular/core';
3
+import { CommonModule } from '@angular/common';
4
+
5
+import { DistributionPersonnelEffectivenessStatisticsRoutingModule } from './distribution-personnel-effectiveness-statistics-routing.module';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+import { DistributionSearchMoreModule } from '../../components/distribution-search-more/distribution-search-more.module';
8
+import { CustomChangeDateModule } from '../../components/custom-change-date/custom-change-date.module';
9
+
10
+
11
+@NgModule({
12
+  declarations: [
13
+    DistributionPersonnelEffectivenessStatisticsComponent,
14
+  ],
15
+  imports: [
16
+    CommonModule,
17
+    DistributionPersonnelEffectivenessStatisticsRoutingModule,
18
+    ShareModule,
19
+    DistributionSearchMoreModule,
20
+    CustomChangeDateModule,
21
+  ]
22
+})
23
+export class DistributionPersonnelEffectivenessStatisticsModule { }

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

@@ -30,23 +30,25 @@
30
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
30
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
31
   <thead (nzSortChange)="sort($event)" nzSingleSort>
31
   <thead (nzSortChange)="sort($event)" nzSingleSort>
32
     <tr>
32
     <tr>
33
-      <th nzWidth="10%" nzShowSort nzSortKey="date" [(nzSort)]="sortCurrent.date">时</th>
34
-      <th nzWidth="9%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
35
-      <th nzWidth="9%" nzShowSort nzSortKey="avgCount" [(nzSort)]="sortCurrent.avgCount">平均单量</th>
36
-      <th nzWidth="9%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
33
+      <th nzWidth="8%" nzShowSort nzSortKey="date" [(nzSort)]="sortCurrent.date">时</th>
34
+      <th nzWidth="8%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
35
+      <th nzWidth="8%" nzShowSort nzSortKey="emergency_count" [(nzSort)]="sortCurrent.emergency_count">加急工单</th>
36
+      <th nzWidth="8%" nzShowSort nzSortKey="avgCount" [(nzSort)]="sortCurrent.avgCount">平均单量</th>
37
+      <th nzWidth="8%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
37
 			<th nzWidth="9%" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
38
 			<th nzWidth="9%" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
38
 			<th nzWidth="9%" nzShowSort nzSortKey="arrive_time_num" [(nzSort)]="sortCurrent.arrive_time_num">平均到达时间</th>
39
 			<th nzWidth="9%" nzShowSort nzSortKey="arrive_time_num" [(nzSort)]="sortCurrent.arrive_time_num">平均到达时间</th>
39
       <th nzWidth="9%" nzShowSort nzSortKey="execution_time_num" [(nzSort)]="sortCurrent.execution_time_num">平均送达时间</th>
40
       <th nzWidth="9%" nzShowSort nzSortKey="execution_time_num" [(nzSort)]="sortCurrent.execution_time_num">平均送达时间</th>
40
       <th nzWidth="9%" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时达标率</th>
41
       <th nzWidth="9%" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时达标率</th>
41
-      <th nzWidth="9%" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
42
-      <th nzWidth="9%" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
43
-      <th nzWidth="9%" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
42
+      <th nzWidth="8%" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
43
+      <th nzWidth="8%" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
44
+      <th nzWidth="8%" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
44
     </tr>
45
     </tr>
45
   </thead>
46
   </thead>
46
   <tbody>
47
   <tbody>
47
     <tr *ngFor="let data of listOfData">
48
     <tr *ngFor="let data of listOfData">
48
       <td>{{ data.date }}</td>
49
       <td>{{ data.date }}</td>
49
       <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
50
       <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
51
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.emergency_count }}</td>
50
       <td>{{ data.avgCount }}</td>
52
       <td>{{ data.avgCount }}</td>
51
       <td>{{ data.totalGrade }}</td>
53
       <td>{{ data.totalGrade }}</td>
52
       <td>{{ data.response_time_num }}</td>
54
       <td>{{ data.response_time_num }}</td>
@@ -61,17 +63,18 @@
61
   <ng-template #footerTpl>
63
   <ng-template #footerTpl>
62
     <table class="footTable">
64
     <table class="footTable">
63
       <tr *ngFor="let data of listOfDataEnd">
65
       <tr *ngFor="let data of listOfDataEnd">
64
-        <td style="width: 10%">{{ data.date }}</td>
65
-        <td style="width: 9%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.totalCount }}</td>
66
-        <td style="width: 9%">{{ data.avgCount }}</td>
67
-        <td style="width: 9%">{{ data.totalGrade }}</td>
66
+        <td style="width: 8%">{{ data.date }}</td>
67
+        <td style="width: 8%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.totalCount }}</td>
68
+        <td style="width: 8%" class="text-sign" (click)="viewDetail4(data, 'all')">{{ data.emergency_count }}</td>
69
+        <td style="width: 8%">{{ data.avgCount }}</td>
70
+        <td style="width: 8%">{{ data.totalGrade }}</td>
68
         <td style="width: 9%">{{ data.response_time_num }}</td>
71
         <td style="width: 9%">{{ data.response_time_num }}</td>
69
         <td style="width: 9%">{{ data.arrive_time_num }}</td>
72
         <td style="width: 9%">{{ data.arrive_time_num }}</td>
70
         <td style="width: 9%">{{ data.execution_time_num }}</td>
73
         <td style="width: 9%">{{ data.execution_time_num }}</td>
71
         <td style="width: 9%">{{ data.aveper }}</td>
74
         <td style="width: 9%">{{ data.aveper }}</td>
72
-        <td style="width: 9%">{{ data.total_time }}</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
+        <td style="width: 8%">{{ data.total_time }}</td>
76
+        <td style="width: 8%" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.five_count }}</td>
77
+        <td style="width: 8%" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.special_close }}</td>
75
       </tr>
78
       </tr>
76
     </table>
79
     </table>
77
   </ng-template>
80
   </ng-template>

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

@@ -49,7 +49,7 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
49
 
49
 
50
     }, 0)
50
     }, 0)
51
   }
51
   }
52
-	
52
+
53
 	// 数据下钻
53
 	// 数据下钻
54
 	viewDetail1(data, type){
54
 	viewDetail1(data, type){
55
 		let query = null
55
 		let query = null
@@ -105,7 +105,7 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
105
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
105
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
106
 		this.router.navigate([path], { replaceUrl: true });
106
 		this.router.navigate([path], { replaceUrl: true });
107
 	}
107
 	}
108
-	
108
+
109
 	viewDetail2(data, type){
109
 	viewDetail2(data, type){
110
 		let query = null
110
 		let query = null
111
 		if(type=='all'){
111
 		if(type=='all'){
@@ -164,7 +164,7 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
164
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
164
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
165
 		this.router.navigate([path], { replaceUrl: true });
165
 		this.router.navigate([path], { replaceUrl: true });
166
 	}
166
 	}
167
-	
167
+
168
 	viewDetail3(data, type){
168
 	viewDetail3(data, type){
169
 		let query = null
169
 		let query = null
170
 		if(type=='all'){
170
 		if(type=='all'){
@@ -229,7 +229,72 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
229
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
229
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
230
 		this.router.navigate([path], { replaceUrl: true });
230
 		this.router.navigate([path], { replaceUrl: true });
231
 	}
231
 	}
232
-	
232
+
233
+  viewDetail4(data, type){
234
+		let query = null
235
+		if(type=='all'){
236
+			query = {
237
+				startDate: this.customChangeDateComponent.startDate || undefined,
238
+				endDate: this.customChangeDateComponent.endDate || undefined,
239
+				statisticsTypeId: this.statisticsTypeId || undefined,
240
+				searchQuery:{
241
+					statusValue: 'close',
242
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
243
+					deptId: this.fieldConfig.fields.deptId || undefined,
244
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
245
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
246
+					groupId: this.fieldConfig.fields.groupId || undefined,
247
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
248
+					userId: this.fieldConfig.fields.userId || undefined,
249
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
250
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
251
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
252
+					emergencyTypeId: 300,
253
+					emergencyTypeDTO: {
254
+						"name": "是",
255
+						"id": 300
256
+					},
257
+				}
258
+			}
259
+		}else{
260
+			query = {
261
+				startDate: this.customChangeDateComponent.startDate || undefined,
262
+				endDate: this.customChangeDateComponent.endDate || undefined,
263
+				statisticsTypeId: this.statisticsTypeId || undefined,
264
+				searchQuery:{
265
+					statusValue: 'close',
266
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
267
+					deptId: this.fieldConfig.fields.deptId || undefined,
268
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
269
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
270
+					groupId: this.fieldConfig.fields.groupId || undefined,
271
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
272
+					userId: this.fieldConfig.fields.userId || undefined,
273
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
274
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
275
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
276
+					emergencyTypeId: 300,
277
+					emergencyTypeDTO: {
278
+						"name": "是",
279
+						"id": 300
280
+					},
281
+					timeFrameId: data.date || undefined,
282
+					timeFrameDTO:{
283
+						"name": data.date,
284
+						"id": data.date
285
+					}
286
+				}
287
+			}
288
+		}
289
+		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
290
+		let flag = this.tabService.tabs.some(v => v.path === path);
291
+		flag && this.tabService.deleteRouteSnapshot(path);
292
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
293
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
294
+		sessionStorage.setItem('distributionData', JSON.stringify(query))
295
+		this.router.navigate([path], { replaceUrl: true });
296
+	}
297
+
233
   getQueryParams(){
298
   getQueryParams(){
234
     let queryParams = this.tabService.getQueryParams();
299
     let queryParams = this.tabService.getQueryParams();
235
     this.tabService.clearQueryParams();
300
     this.tabService.clearQueryParams();

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

@@ -20,7 +20,7 @@
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.userDTO || fieldConfig.fields.deptDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.taskTypeDTO || fieldConfig.fields.sourceDTO || fieldConfig.fields.minuteDTO || fieldConfig.fields.specialDTO || fieldConfig.fields.overtimeDTO || fieldConfig.fields.overtimeIdDTO || fieldConfig.fields.evaluateDTO || 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.emergencyTypeDTO || fieldConfig.fields.overtimeDTO || fieldConfig.fields.overtimeIdDTO || fieldConfig.fields.evaluateDTO || fieldConfig.fields.codeNumDTO || fieldConfig.fields.timeFrameDTO">
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.userDTO?.name}}</span>
26
 	<span>{{fieldConfig.fields.taskTypeDTO?.taskName}}</span>
26
 	<span>{{fieldConfig.fields.taskTypeDTO?.taskName}}</span>
@@ -34,6 +34,7 @@
34
 	<span>{{fieldConfig.fields.evaluateDTO?.name}}</span>
34
 	<span>{{fieldConfig.fields.evaluateDTO?.name}}</span>
35
 	<span>{{fieldConfig.fields.codeNumDTO}}</span>
35
 	<span>{{fieldConfig.fields.codeNumDTO}}</span>
36
 	<span>{{fieldConfig.fields.timeFrameDTO?.name}}</span>
36
 	<span>{{fieldConfig.fields.timeFrameDTO?.name}}</span>
37
+	<span>{{fieldConfig.fields.emergencyTypeDTO?.name}}</span>
37
 </div>
38
 </div>
38
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px', x: '1600px'}">
39
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px', x: '1600px'}">
39
   <thead>
40
   <thead>

+ 14 - 12
src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.ts

@@ -31,7 +31,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
31
   repairDeptId;//报修科室id
31
   repairDeptId;//报修科室id
32
 
32
 
33
   searchTimerSubject = new Subject();
33
   searchTimerSubject = new Subject();
34
-	
34
+
35
   ngOnInit() {
35
   ngOnInit() {
36
 		// 数据下钻搜索
36
 		// 数据下钻搜索
37
 		this.getRouteQuery()
37
 		this.getRouteQuery()
@@ -40,13 +40,13 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
40
       fun.call(this, v[1]);
40
       fun.call(this, v[1]);
41
     });
41
     });
42
   }
42
   }
43
-	
43
+
44
 	ngOnDestroy(){
44
 	ngOnDestroy(){
45
 		console.log(12122121)
45
 		console.log(12122121)
46
 		this.fieldConfig.fields = {}
46
 		this.fieldConfig.fields = {}
47
 		sessionStorage.removeItem('distributionData')
47
 		sessionStorage.removeItem('distributionData')
48
 	}
48
 	}
49
-	
49
+
50
   ngAfterViewInit(){
50
   ngAfterViewInit(){
51
     this.initSessionData();
51
     this.initSessionData();
52
     this.onResize(0);
52
     this.onResize(0);
@@ -60,7 +60,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
60
 
60
 
61
     }, 0)
61
     }, 0)
62
   }
62
   }
63
-	
63
+
64
 	goingType:boolean = false;
64
 	goingType:boolean = false;
65
 	gdStateId:any = null;
65
 	gdStateId:any = null;
66
 	getRouteQuery(){
66
 	getRouteQuery(){
@@ -98,7 +98,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
98
 			},50)
98
 			},50)
99
 		}
99
 		}
100
 	}
100
 	}
101
-	
101
+
102
   getQueryParams(query){
102
   getQueryParams(query){
103
     let queryParams = this.tabService.getQueryParams();
103
     let queryParams = this.tabService.getQueryParams();
104
 		console.log(43434343,queryParams)
104
 		console.log(43434343,queryParams)
@@ -121,10 +121,10 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
121
   }
121
   }
122
 
122
 
123
   get getMoreFilter(){
123
   get getMoreFilter(){
124
-    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || 
125
-		this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || 
126
-		this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO  || 
127
-		this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || 
124
+    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO ||
125
+		this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO ||
126
+		this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO  ||
127
+		this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO ||
128
 		this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
128
 		this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
129
     return flag ? 37 : 0;
129
     return flag ? 37 : 0;
130
   }
130
   }
@@ -190,6 +190,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
190
 			sourceId: this.fieldConfig.fields.sourceId || undefined,
190
 			sourceId: this.fieldConfig.fields.sourceId || undefined,
191
 			minutesClose: this.fieldConfig.fields.minuteClose || undefined,
191
 			minutesClose: this.fieldConfig.fields.minuteClose || undefined,
192
 			specialCloseFlag: this.fieldConfig.fields.specialId,
192
 			specialCloseFlag: this.fieldConfig.fields.specialId,
193
+			emergencyType: this.fieldConfig.fields.emergencyTypeId,
193
 			// timeout: this.fieldConfig.fields.overtimeId,
194
 			// timeout: this.fieldConfig.fields.overtimeId,
194
 			// abnormityType: this.fieldConfig.fields.abnormalId,
195
 			// abnormityType: this.fieldConfig.fields.abnormalId,
195
 			workOrderEvaluationId: this.fieldConfig.fields.evaluateId || undefined,
196
 			workOrderEvaluationId: this.fieldConfig.fields.evaluateId || undefined,
@@ -248,6 +249,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
248
     	sourceId: this.fieldConfig.fields.sourceId || undefined,
249
     	sourceId: this.fieldConfig.fields.sourceId || undefined,
249
     	minutesClose: this.fieldConfig.fields.minuteClose || undefined,
250
     	minutesClose: this.fieldConfig.fields.minuteClose || undefined,
250
     	specialCloseFlag: this.fieldConfig.fields.specialId,
251
     	specialCloseFlag: this.fieldConfig.fields.specialId,
252
+    	emergencyType: this.fieldConfig.fields.emergencyTypeId,
251
     	// timeout: this.fieldConfig.fields.overtimeId,
253
     	// timeout: this.fieldConfig.fields.overtimeId,
252
     	// abnormityType: this.fieldConfig.fields.abnormalId,
254
     	// abnormityType: this.fieldConfig.fields.abnormalId,
253
     	workOrderEvaluationId: this.fieldConfig.fields.evaluateId || undefined,
255
     	workOrderEvaluationId: this.fieldConfig.fields.evaluateId || undefined,
@@ -301,7 +303,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
301
     this.isLoading = true;
303
     this.isLoading = true;
302
     this.searchTimerSubject.next([fun, e]);
304
     this.searchTimerSubject.next([fun, e]);
303
   }
305
   }
304
-	
306
+
305
 	// 查看工单详情
307
 	// 查看工单详情
306
 	coopData:any;
308
 	coopData:any;
307
 	detailModalShow = false; //弹窗开关
309
 	detailModalShow = false; //弹窗开关
@@ -343,8 +345,8 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
343
 
345
 
344
   // 详细搜索
346
   // 详细搜索
345
   fieldConfig:any = {
347
   fieldConfig:any = {
346
-		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},
347
-		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},
348
+		fields: { deptId: undefined, taskTypeId: undefined, sourceId: undefined, minuteId: undefined, specialId: undefined, emergencyTypeId: undefined, overtimeId: undefined, abnormalId: undefined, evaluateId: undefined, codeNum: undefined, timeFrameId: undefined, groupId: undefined, userId: undefined, buildingId: undefined},
349
+		config: { dept: true, taskType: true, source: true, minute: true, special: true, emergencyType: true, overtime: true, abnormal: true, evaluate: true, code: true, timeFrame: true, groupAndUser: true, building: true},
348
   }
350
   }
349
   showSearchMore:boolean = false;
351
   showSearchMore:boolean = false;
350
   showMore(){
352
   showMore(){

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

@@ -30,21 +30,23 @@
30
   <thead (nzSortChange)="sort($event)" nzSingleSort>
30
   <thead (nzSortChange)="sort($event)" nzSingleSort>
31
     <tr>
31
     <tr>
32
       <th nzWidth="10%">任务类型名称</th>
32
       <th nzWidth="10%">任务类型名称</th>
33
-      <th nzWidth="10%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
34
-      <th nzWidth="10%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
35
-			<th nzWidth="10%" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
36
-			<th nzWidth="10%" nzShowSort nzSortKey="arrive_time_num" [(nzSort)]="sortCurrent.arrive_time_num">平均到达时间</th>
37
-      <th nzWidth="10%" nzShowSort nzSortKey="execution_time_num" [(nzSort)]="sortCurrent.execution_time_num">平均送达时间</th>
38
-      <th nzWidth="10%" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时达标率</th>
39
-      <th nzWidth="10%" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
40
-      <th nzWidth="10%" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
41
-      <th nzWidth="10%" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
33
+      <th nzWidth="9%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
34
+      <th nzWidth="9%" nzShowSort nzSortKey="emergency_count" [(nzSort)]="sortCurrent.emergency_count">加急工单</th>
35
+      <th nzWidth="9%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
36
+			<th nzWidth="9%" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
37
+			<th nzWidth="9%" nzShowSort nzSortKey="arrive_time_num" [(nzSort)]="sortCurrent.arrive_time_num">平均到达时间</th>
38
+      <th nzWidth="9%" nzShowSort nzSortKey="execution_time_num" [(nzSort)]="sortCurrent.execution_time_num">平均送达时间</th>
39
+      <th nzWidth="9%" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时达标率</th>
40
+      <th nzWidth="9%" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
41
+      <th nzWidth="9%" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
42
+      <th nzWidth="9%" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
42
     </tr>
43
     </tr>
43
   </thead>
44
   </thead>
44
   <tbody>
45
   <tbody>
45
     <tr *ngFor="let data of listOfData">
46
     <tr *ngFor="let data of listOfData">
46
       <td>{{ data.taskName }}</td>
47
       <td>{{ data.taskName }}</td>
47
       <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
48
       <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
49
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.emergency_count }}</td>
48
       <td>{{ data.totalGrade }}</td>
50
       <td>{{ data.totalGrade }}</td>
49
       <td>{{ data.response_time_num }}</td>
51
       <td>{{ data.response_time_num }}</td>
50
       <td>{{ data.arrive_time_num }}</td>
52
       <td>{{ data.arrive_time_num }}</td>
@@ -59,15 +61,16 @@
59
     <table class="footTable">
61
     <table class="footTable">
60
       <tr *ngFor="let data of listOfDataEnd">
62
       <tr *ngFor="let data of listOfDataEnd">
61
         <td style="width: 10%">{{ data.taskName }}</td>
63
         <td style="width: 10%">{{ data.taskName }}</td>
62
-        <td style="width: 10%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.totalCount }}</td>
63
-        <td style="width: 10%">{{ data.totalGrade }}</td>
64
-        <td style="width: 10%">{{ data.response_time_num }}</td>
65
-        <td style="width: 10%">{{ data.arrive_time_num }}</td>
66
-        <td style="width: 10%">{{ data.execution_time_num }}</td>
67
-        <td style="width: 10%">{{ data.aveper }}</td>
68
-        <td style="width: 10%">{{ data.total_time }}</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>
64
+        <td style="width: 9%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.totalCount }}</td>
65
+        <td style="width: 9%" class="text-sign" (click)="viewDetail4(data, 'all')">{{ data.emergency_count }}</td>
66
+        <td style="width: 9%">{{ data.totalGrade }}</td>
67
+        <td style="width: 9%">{{ data.response_time_num }}</td>
68
+        <td style="width: 9%">{{ data.arrive_time_num }}</td>
69
+        <td style="width: 9%">{{ data.execution_time_num }}</td>
70
+        <td style="width: 9%">{{ data.aveper }}</td>
71
+        <td style="width: 9%">{{ data.total_time }}</td>
72
+        <td style="width: 9%" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.five_count }}</td>
73
+        <td style="width: 9%" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.special_close }}</td>
71
       </tr>
74
       </tr>
72
     </table>
75
     </table>
73
   </ng-template>
76
   </ng-template>

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

@@ -57,7 +57,7 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
57
 
57
 
58
     }, 0)
58
     }, 0)
59
   }
59
   }
60
-	
60
+
61
 	// 数据下钻
61
 	// 数据下钻
62
 	viewDetail1(data, type){
62
 	viewDetail1(data, type){
63
 		let query = null
63
 		let query = null
@@ -132,7 +132,7 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
132
 			  });
132
 			  });
133
 		}
133
 		}
134
 	}
134
 	}
135
-	
135
+
136
 	viewDetail2(data, type){
136
 	viewDetail2(data, type){
137
 		let query = null
137
 		let query = null
138
 		let item = null
138
 		let item = null
@@ -211,7 +211,7 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
211
 				});
211
 				});
212
 		}
212
 		}
213
 	}
213
 	}
214
-	
214
+
215
 	viewDetail3(data, type){
215
 	viewDetail3(data, type){
216
 		let query = null
216
 		let query = null
217
 		let item = null
217
 		let item = null
@@ -296,7 +296,92 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
296
 				});
296
 				});
297
 		}
297
 		}
298
 	}
298
 	}
299
-	
299
+
300
+	viewDetail4(data, type){
301
+		let query = null
302
+		let item = null
303
+		if(this.taskTypeId){
304
+			item = this.taskTypeList.find(i => i.id == this.taskTypeId)
305
+		}
306
+		if(type=='all'){
307
+			query = {
308
+				startDate: this.customChangeDateComponent.startDate || undefined,
309
+				endDate: this.customChangeDateComponent.endDate || undefined,
310
+				taskTypeId: this.taskTypeId || undefined,
311
+				searchQuery:{
312
+					statusValue: 'close',
313
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
314
+					deptId: this.fieldConfig.fields.deptId || undefined,
315
+					taskTypeId: this.taskTypeId || undefined,
316
+					taskTypeDTO: item,
317
+					groupId: this.fieldConfig.fields.groupId || undefined,
318
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
319
+					userId: this.fieldConfig.fields.userId || undefined,
320
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
321
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
322
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
323
+					emergencyTypeId: 300,
324
+					emergencyTypeDTO: {
325
+						"name": "是",
326
+						"id": 300
327
+					},
328
+				}
329
+			}
330
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
331
+			let flag = this.tabService.tabs.some(v => v.path === path);
332
+			flag && this.tabService.deleteRouteSnapshot(path);
333
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
334
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
335
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
336
+			this.router.navigate([path], { replaceUrl: true });
337
+		}else{
338
+			let arr = data.taskName.split('-');
339
+			let postData = {
340
+			  idx: 0,
341
+			  sum: 10,
342
+			  taskType: {
343
+			    taskName: arr[arr.length-1],
344
+			  },
345
+			};
346
+			this.mainService
347
+				.getFetchDataList("configuration", "taskType", postData)
348
+				.subscribe((res) => {
349
+					if (res.status == 200) {
350
+						let item = res.list.find(i =>i.id == data.taskTypeId)
351
+						query = {
352
+							startDate: this.customChangeDateComponent.startDate || undefined,
353
+							endDate: this.customChangeDateComponent.endDate || undefined,
354
+							searchQuery:{
355
+								statusValue: 'close',
356
+								deptDTO: this.fieldConfig.fields.deptDTO || undefined,
357
+								deptId: this.fieldConfig.fields.deptId || undefined,
358
+								taskTypeId: data.taskTypeId || undefined,
359
+								taskTypeDTO: item,
360
+								groupId: this.fieldConfig.fields.groupId || undefined,
361
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
362
+								userId: this.fieldConfig.fields.userId || undefined,
363
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
364
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
365
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
366
+								emergencyTypeId: 300,
367
+								emergencyTypeDTO: {
368
+									"name": "是",
369
+									"id": 300
370
+								},
371
+							}
372
+						}
373
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
374
+						let flag = this.tabService.tabs.some(v => v.path === path);
375
+						flag && this.tabService.deleteRouteSnapshot(path);
376
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
377
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
378
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
379
+						this.router.navigate([path], { replaceUrl: true });
380
+					}
381
+				});
382
+		}
383
+	}
384
+
300
   getQueryParams(){
385
   getQueryParams(){
301
     let queryParams = this.tabService.getQueryParams();
386
     let queryParams = this.tabService.getQueryParams();
302
     this.tabService.clearQueryParams();
387
     this.tabService.clearQueryParams();

+ 25 - 22
src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.component.html

@@ -28,23 +28,25 @@
28
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
28
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
29
   <thead (nzSortChange)="sort($event)" nzSingleSort>
29
   <thead (nzSortChange)="sort($event)" nzSingleSort>
30
     <tr>
30
     <tr>
31
-      <th nzWidth="10%">人员(编码)</th>
32
-      <th nzWidth="9%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
33
-      <th nzWidth="9%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
34
-      <th nzWidth="9%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用</th>
35
-			<th nzWidth="9%" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
36
-      <th nzWidth="9%" nzShowSort nzSortKey="arrive_time_num" [(nzSort)]="sortCurrent.arrive_time_num">平均到达时间</th>
37
-      <th nzWidth="9%" nzShowSort nzSortKey="execution_time_num" [(nzSort)]="sortCurrent.execution_time_num">平均送达时间</th>
38
-      <th nzWidth="9%" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时完成达标率</th>
39
-      <th nzWidth="9%" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
40
-      <th nzWidth="9%" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
41
-      <th nzWidth="9%" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
31
+      <th nzWidth="12%">人员(编码)</th>
32
+      <th nzWidth="8%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
33
+      <th nzWidth="8%" nzShowSort nzSortKey="emergency_count" [(nzSort)]="sortCurrent.emergency_count">加急工单</th>
34
+      <th nzWidth="8%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
35
+      <th nzWidth="8%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用</th>
36
+			<th nzWidth="8%" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
37
+      <th nzWidth="8%" nzShowSort nzSortKey="arrive_time_num" [(nzSort)]="sortCurrent.arrive_time_num">平均到达时间</th>
38
+      <th nzWidth="8%" nzShowSort nzSortKey="execution_time_num" [(nzSort)]="sortCurrent.execution_time_num">平均送达时间</th>
39
+      <th nzWidth="8%" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时完成达标率</th>
40
+      <th nzWidth="8%" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
41
+      <th nzWidth="8%" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
42
+      <th nzWidth="8%" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
42
     </tr>
43
     </tr>
43
   </thead>
44
   </thead>
44
   <tbody>
45
   <tbody>
45
     <tr *ngFor="let data of listOfData">
46
     <tr *ngFor="let data of listOfData">
46
       <td>{{ data.name }}</td>
47
       <td>{{ data.name }}</td>
47
       <td>{{ data.totalCount }}</td>
48
       <td>{{ data.totalCount }}</td>
49
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.emergency_count }}</td>
48
       <td>{{ data.totalGrade }}</td>
50
       <td>{{ data.totalGrade }}</td>
49
 			<td>{{ data.totalPrice }}</td>
51
 			<td>{{ data.totalPrice }}</td>
50
       <td>{{ data.response_time_num }}</td>
52
       <td>{{ data.response_time_num }}</td>
@@ -59,17 +61,18 @@
59
   <ng-template #footerTpl>
61
   <ng-template #footerTpl>
60
     <table class="footTable">
62
     <table class="footTable">
61
       <tr *ngFor="let data of listOfDataEnd">
63
       <tr *ngFor="let data of listOfDataEnd">
62
-        <td style="width: 10%">{{ data.name }}</td>
63
-        <td style="width: 9%">{{ data.totalCount }}</td>
64
-        <td style="width: 9%">{{ data.totalGrade }}</td>
65
-				<td style="width: 9%">{{ data.totalPrice }}</td>
66
-        <td style="width: 9%">{{ data.response_time_num }}</td>
67
-        <td style="width: 9%">{{ data.arrive_time_num }}</td>
68
-        <td style="width: 9%">{{ data.execution_time_num }}</td>
69
-        <td style="width: 9%">{{ data.aveper }}</td>
70
-        <td style="width: 9%">{{ data.total_time }}</td>
71
-        <td style="width: 9%">{{ data.five_count }}</td>
72
-        <td style="width: 9%">{{ data.special_close }}</td>
64
+        <td style="width: 12%">{{ data.name }}</td>
65
+        <td style="width: 8%">{{ data.totalCount }}</td>
66
+        <td style="width: 8%" class="text-sign" (click)="viewDetail4(data, 'all')">{{ data.emergency_count }}</td>
67
+        <td style="width: 8%">{{ data.totalGrade }}</td>
68
+				<td style="width: 8%">{{ data.totalPrice }}</td>
69
+        <td style="width: 8%">{{ data.response_time_num }}</td>
70
+        <td style="width: 8%">{{ data.arrive_time_num }}</td>
71
+        <td style="width: 8%">{{ data.execution_time_num }}</td>
72
+        <td style="width: 8%">{{ data.aveper }}</td>
73
+        <td style="width: 8%">{{ data.total_time }}</td>
74
+        <td style="width: 8%">{{ data.five_count }}</td>
75
+        <td style="width: 8%">{{ data.special_close }}</td>
73
       </tr>
76
       </tr>
74
     </table>
77
     </table>
75
   </ng-template>
78
   </ng-template>

+ 4 - 0
src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-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);

+ 88 - 1
src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-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 { 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-user-quality-control-statistics",
10
   selector: "app-user-quality-control-statistics",
@@ -18,6 +18,7 @@ export class UserQualityControlStatisticsComponent implements OnInit, AfterViewI
18
     private message: NzMessageService,
18
     private message: NzMessageService,
19
     private route: ActivatedRoute,
19
     private route: ActivatedRoute,
20
     private tabService: TabService,
20
     private tabService: TabService,
21
+    private router: Router,
21
   ) {}
22
   ) {}
22
 
23
 
23
   listOfData: any[] = []; //表格数据
24
   listOfData: any[] = []; //表格数据
@@ -55,6 +56,92 @@ export class UserQualityControlStatisticsComponent implements OnInit, AfterViewI
55
     }, 0)
56
     }, 0)
56
   }
57
   }
57
 
58
 
59
+  viewDetail4(data, type){
60
+		let query = null
61
+		let item = null
62
+		if(this.userId){
63
+			item = this.userList.find(i => i.id == this.userId)
64
+		}
65
+		if(type=='all'){
66
+			query = {
67
+				startDate: this.customChangeDateComponent.startDate || undefined,
68
+				endDate: this.customChangeDateComponent.endDate || undefined,
69
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
70
+				searchQuery:{
71
+					statusValue: 'close',
72
+					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
73
+					deptId: this.fieldConfig.fields.deptId || undefined,
74
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
75
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
76
+					groupId: this.fieldConfig.fields.groupId || undefined,
77
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
78
+					userId: this.userId || undefined,
79
+					userDTO: item || undefined,
80
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
81
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
82
+					emergencyTypeId: 300,
83
+					emergencyTypeDTO: {
84
+						"name": "是",
85
+						"id": 300
86
+					},
87
+				}
88
+			}
89
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
90
+			let flag = this.tabService.tabs.some(v => v.path === path);
91
+			flag && this.tabService.deleteRouteSnapshot(path);
92
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
93
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
94
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
95
+			this.router.navigate([path], { replaceUrl: true });
96
+		}else{
97
+			let arr = data.name.split('(')
98
+			let postData: any = {
99
+			  idx: 0,
100
+			  sum: 20,
101
+			  department: {
102
+			    dept: arr[0],
103
+			    searchType: 1,
104
+			  },
105
+			};
106
+			this.mainService.getFetchDataList("simple/data", "department", postData)
107
+				.subscribe((res) => {
108
+					if (res.status == 200) {
109
+						let item = res.list.find(i =>i.id == data.deptId)
110
+						query = {
111
+							startDate: this.customChangeDateComponent.startDate || undefined,
112
+							endDate: this.customChangeDateComponent.endDate || undefined,
113
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
114
+							searchQuery:{
115
+								statusValue: 'close',
116
+								deptDTO: this.fieldConfig.fields.deptDTO || undefined,
117
+								deptId: this.fieldConfig.fields.deptId || undefined,
118
+								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
119
+								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
120
+								groupId: this.fieldConfig.fields.groupId || undefined,
121
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
122
+								userId: data.userId || undefined,
123
+								userDTO: item || undefined,
124
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
125
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
126
+								emergencyTypeId: 300,
127
+								emergencyTypeDTO: {
128
+									"name": "是",
129
+									"id": 300
130
+								},
131
+							}
132
+						}
133
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
134
+						let flag = this.tabService.tabs.some(v => v.path === path);
135
+						flag && this.tabService.deleteRouteSnapshot(path);
136
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
137
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
138
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
139
+						this.router.navigate([path], { replaceUrl: true });
140
+					}
141
+				});
142
+		}
143
+	}
144
+
58
   getQueryParams(){
145
   getQueryParams(){
59
     let queryParams = this.tabService.getQueryParams();
146
     let queryParams = this.tabService.getQueryParams();
60
     this.tabService.clearQueryParams();
147
     this.tabService.clearQueryParams();

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

@@ -20,9 +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.userDTO || fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO || fieldConfig.fields.sourceDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.floorDTO || 
24
-		fieldConfig.fields.companyDTO || fieldConfig.fields.workHourParentDTO || fieldConfig.fields.workHourSmallDTO || fieldConfig.fields.evaluateDTO || fieldConfig.fields.repairUserDTO || fieldConfig.fields.consumableDTO || 
25
-		fieldConfig.fields.isHangDTO || fieldConfig.fields.overtimeDTO || fieldConfig.fields.codeNumDTO || fieldConfig.fields.deptTypeDTO">
23
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO || fieldConfig.fields.sourceDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.floorDTO ||
24
+		fieldConfig.fields.companyDTO || fieldConfig.fields.workHourParentDTO || fieldConfig.fields.workHourSmallDTO || fieldConfig.fields.evaluateDTO || fieldConfig.fields.repairUserDTO || fieldConfig.fields.consumableDTO ||
25
+		fieldConfig.fields.isHangDTO || fieldConfig.fields.overtimeDTO || fieldConfig.fields.codeNumDTO || fieldConfig.fields.deptTypeDTO || fieldConfig.fields.priorityDTO">
26
   <span>{{fieldConfig.fields.workHourParentDTO?.workName}}</span>
26
   <span>{{fieldConfig.fields.workHourParentDTO?.workName}}</span>
27
 	<span>{{fieldConfig.fields.workHourSmallDTO?.workName}}</span>
27
 	<span>{{fieldConfig.fields.workHourSmallDTO?.workName}}</span>
28
 	<span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
28
 	<span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
@@ -41,7 +41,8 @@
41
 	<span>{{fieldConfig.fields.overtimeDTO?.name}}</span>
41
 	<span>{{fieldConfig.fields.overtimeDTO?.name}}</span>
42
 	<span>{{fieldConfig.fields.codeNumDTO}}</span>
42
 	<span>{{fieldConfig.fields.codeNumDTO}}</span>
43
 	<span>{{fieldConfig.fields.deptTypeDTO?.name}}</span>
43
 	<span>{{fieldConfig.fields.deptTypeDTO?.name}}</span>
44
-	
44
+	<span>{{fieldConfig.fields.priorityDTO?.name}}</span>
45
+
45
 </div>
46
 </div>
46
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px', x: '1600px'}">
47
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px', x: '1600px'}">
47
   <thead>
48
   <thead>

+ 47 - 50
src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.ts

@@ -33,31 +33,22 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
33
   searchTimerSubject = new Subject();
33
   searchTimerSubject = new Subject();
34
 	dateData1:any;
34
 	dateData1:any;
35
 	dateData2:any;
35
 	dateData2:any;
36
-	
37
-  ngOnInit() {
38
-		// 数据下钻搜索
39
-		this.getRouteQuery()
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
-		//   });
48
 
36
 
37
+  ngOnInit() {
49
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
38
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
50
       let fun = v[0];
39
       let fun = v[0];
51
       fun.call(this, v[1]);
40
       fun.call(this, v[1]);
52
     });
41
     });
53
   }
42
   }
54
-	
43
+
55
 	ngOnDestroy(){
44
 	ngOnDestroy(){
56
 		sessionStorage.removeItem('maintenanceData')
45
 		sessionStorage.removeItem('maintenanceData')
57
 	}
46
 	}
58
-	
47
+
59
   ngAfterViewInit(){
48
   ngAfterViewInit(){
60
     this.initSessionData();
49
     this.initSessionData();
50
+    // 数据下钻搜索
51
+		this.getRouteQuery()
61
     this.onResize(0);
52
     this.onResize(0);
62
   }
53
   }
63
 
54
 
@@ -68,37 +59,42 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
68
 			this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - height - this.getMoreFilter + 14;
59
 			this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - height - this.getMoreFilter + 14;
69
     }, 0)
60
     }, 0)
70
   }
61
   }
71
-	
62
+
72
 	goingType:boolean = false;
63
 	goingType:boolean = false;
73
-	getRouteQuery(){
64
+	async getRouteQuery(){
74
 		let data = sessionStorage.getItem('maintenanceData')
65
 		let data = sessionStorage.getItem('maintenanceData')
75
 		let query = null
66
 		let query = null
76
 		if(data){
67
 		if(data){
77
 			query = JSON.parse(data)
68
 			query = JSON.parse(data)
78
 			console.log('query==========',query)
69
 			console.log('query==========',query)
79
-			setTimeout(_=>{
80
-				if(query.repairDeptId){
81
-					this.getRepairDeptList();
82
-					this.repairDeptId = query.repairDeptId
83
-				}else{
84
-					this.repairDeptId = undefined
85
-				}
86
-				if(query.searchQuery){
87
-					this.goingType = true
88
-					this.fieldConfig.fields = query.searchQuery
89
-				}else{
90
-					this.goingType = false
91
-					this.fieldConfig.fields = {}
92
-				}
93
-				this.getQueryParams();
94
-			},50)
70
+      if(query.repairDeptId){
71
+        this.repairDeptId = query.repairDeptId
72
+        let postData = {
73
+          department: {
74
+            id: query.repairDeptId,
75
+            searchType: 1,
76
+          },
77
+          idx: 0,
78
+          sum: 1,
79
+        };
80
+        let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
81
+        this.repairDeptList = result.list || [];
82
+      }else{
83
+        this.repairDeptId = undefined
84
+      }
85
+      if(query.searchQuery){
86
+        this.goingType = true
87
+        this.fieldConfig.fields = query.searchQuery
88
+      }else{
89
+        this.goingType = false
90
+        this.fieldConfig.fields = {}
91
+      }
92
+      this.getQueryParams();
95
 		}else{
93
 		}else{
96
-			setTimeout(_=>{
97
-				this.getQueryParams();
98
-			},50)
94
+      this.getQueryParams();
99
 		}
95
 		}
100
 	}
96
 	}
101
-	
97
+
102
   getQueryParams(){
98
   getQueryParams(){
103
     let queryParams = this.tabService.getQueryParams();
99
     let queryParams = this.tabService.getQueryParams();
104
     this.tabService.clearQueryParams();
100
     this.tabService.clearQueryParams();
@@ -114,10 +110,10 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
114
   }
110
   }
115
 
111
 
116
   get getMoreFilter(){
112
   get getMoreFilter(){
117
-    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || 
118
-		this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || 
119
-		this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO  || 
120
-		this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || 
113
+    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO ||
114
+		this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO ||
115
+		this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO  ||
116
+		this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO ||
121
 		this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
117
 		this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
122
     return flag ? 37 : 0;
118
     return flag ? 37 : 0;
123
   }
119
   }
@@ -194,15 +190,16 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
194
 			wxDegreeId: this.fieldConfig.fields.evaluateId,
190
 			wxDegreeId: this.fieldConfig.fields.evaluateId,
195
 			statusValue: this.fieldConfig.fields.statusValue || undefined,
191
 			statusValue: this.fieldConfig.fields.statusValue || undefined,
196
 			deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
192
 			deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
193
+			priorityId: this.fieldConfig.fields.priorityId || undefined,
197
     };
194
     };
198
-		
195
+
199
 		if(this.fieldConfig.fields.workHourParentId && this.fieldConfig.fields.workHourSmallId){
196
 		if(this.fieldConfig.fields.workHourParentId && this.fieldConfig.fields.workHourSmallId){
200
 			postData.workHourId = this.fieldConfig.fields.workHourSmallId
197
 			postData.workHourId = this.fieldConfig.fields.workHourSmallId
201
 		}
198
 		}
202
 		if(this.fieldConfig.fields.workHourParentId && !this.fieldConfig.fields.workHourSmallId){
199
 		if(this.fieldConfig.fields.workHourParentId && !this.fieldConfig.fields.workHourSmallId){
203
 			postData.workHourId = this.fieldConfig.fields.workHourParentId
200
 			postData.workHourId = this.fieldConfig.fields.workHourParentId
204
 		}
201
 		}
205
-		
202
+
206
     this.loading1 = true;
203
     this.loading1 = true;
207
     this.mainService
204
     this.mainService
208
       .postCustom("itsm/report", "incidentWorkOrderList", postData)
205
       .postCustom("itsm/report", "incidentWorkOrderList", postData)
@@ -264,9 +261,10 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
264
     	incidentSign: this.fieldConfig.fields.codeNum,
261
     	incidentSign: this.fieldConfig.fields.codeNum,
265
 			wxDegreeId: this.fieldConfig.fields.evaluateId,
262
 			wxDegreeId: this.fieldConfig.fields.evaluateId,
266
 			statusValue: this.fieldConfig.fields.statusValue || undefined,
263
 			statusValue: this.fieldConfig.fields.statusValue || undefined,
267
-			deptTypeId: this.fieldConfig.fields.deptTypeId || undefined
264
+			deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
265
+			priorityId: this.fieldConfig.fields.priorityId || undefined,
268
     };
266
     };
269
-    
267
+
270
     if(this.fieldConfig.fields.workHourParentId && this.fieldConfig.fields.workHourSmallId){
268
     if(this.fieldConfig.fields.workHourParentId && this.fieldConfig.fields.workHourSmallId){
271
     	postData.workHourId = this.fieldConfig.fields.workHourSmallId
269
     	postData.workHourId = this.fieldConfig.fields.workHourSmallId
272
     }
270
     }
@@ -325,7 +323,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
325
     this.isLoading = true;
323
     this.isLoading = true;
326
     this.searchTimerSubject.next([fun, e]);
324
     this.searchTimerSubject.next([fun, e]);
327
   }
325
   }
328
-	
326
+
329
 	// 查看工单详情
327
 	// 查看工单详情
330
 	coopData:any;
328
 	coopData:any;
331
 	detailModalShow = false; //弹窗开关
329
 	detailModalShow = false; //弹窗开关
@@ -342,7 +340,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
342
 	  this.detailModalShow = false;
340
 	  this.detailModalShow = false;
343
 	  this.getList();
341
 	  this.getList();
344
 	}
342
 	}
345
-	
343
+
346
   openChangeRepairDept(flag){
344
   openChangeRepairDept(flag){
347
     flag && this.getRepairDeptList();
345
     flag && this.getRepairDeptList();
348
   }
346
   }
@@ -370,10 +368,9 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
370
 
368
 
371
   // 详细搜索
369
   // 详细搜索
372
   fieldConfig:any = {
370
   fieldConfig:any = {
373
-    fields: {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: 
374
-		undefined,buildingId: undefined, floorId: undefined, companyId: undefined, 
375
-		workHourParentId: undefined, workHourSmallId: undefined, evaluateId: undefined, repairUserId: undefined, consumableId: undefined, isHangId: undefined, codeNum: undefined, overtimeId: undefined, deptTypeId: undefined},
376
-    config: {groupAndUser: true, category123: true, source: true, buildingAndFloor: true, company: true, workHourParent: true, workHourSmall: true, evaluate: true, repairUser: true, consumable: true, isHang: true, code: true, overtime: true, deptType: true},
371
+    fields: {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined,buildingId: undefined, floorId: undefined, companyId: undefined,
372
+		workHourParentId: undefined, workHourSmallId: undefined, evaluateId: undefined, repairUserId: undefined, consumableId: undefined, isHangId: undefined, codeNum: undefined, overtimeId: undefined, deptTypeId: undefined, priorityId: undefined,},
373
+    config: {groupAndUser: true, category123: true, source: true, buildingAndFloor: true, company: true, workHourParent: true, workHourSmall: true, evaluate: true, repairUser: true, consumable: true, isHang: true, code: true, overtime: true, deptType: true, priority: true},
377
   }
374
   }
378
   showSearchMore:boolean = false;
375
   showSearchMore:boolean = false;
379
   showMore(){
376
   showMore(){

+ 27 - 0
src/app/views/new-statistics/maintenance-statistics/maintenance-statistics-routing.module.ts

@@ -161,6 +161,33 @@ const routes: Routes = [
161
           title: '修-工时大类统计'
161
           title: '修-工时大类统计'
162
         }
162
         }
163
       },
163
       },
164
+      {
165
+        // 人员效能统计
166
+        path: 'personnelEffectivenessStatistics',
167
+        loadChildren: () => import('./personnel-effectiveness-statistics/personnel-effectiveness-statistics.module').then(m => m.PersonnelEffectivenessStatisticsModule),
168
+        data: {
169
+          reuse: true,
170
+          title: '修-人员效能统计'
171
+        }
172
+      },
173
+      {
174
+        // 优先级日期统计
175
+        path: 'priorityDateStatistics',
176
+        loadChildren: () => import('./priority-date-statistics/priority-date-statistics.module').then(m => m.PriorityDateStatisticsModule),
177
+        data: {
178
+          reuse: true,
179
+          title: '修-优先级日期统计'
180
+        }
181
+      },
182
+      {
183
+        // 优先级质控统计
184
+        path: 'priorityQualityControlStatistics',
185
+        loadChildren: () => import('./priority-quality-control-statistics/priority-quality-control-statistics.module').then(m => m.PriorityQualityControlStatisticsModule),
186
+        data: {
187
+          reuse: true,
188
+          title: '修-优先级质控统计'
189
+        }
190
+      },
164
       {
191
       {
165
         // 人员评价统计
192
         // 人员评价统计
166
         path: 'userEvaluateStatistics',
193
         path: 'userEvaluateStatistics',

+ 14 - 0
src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics-routing.module.ts

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

+ 74 - 0
src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics.component.html

@@ -0,0 +1,74 @@
1
+<div class="searchDataWrap">
2
+  <div class="searchData">
3
+    <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4
+    <div class="searchDataItem">
5
+      <span class="label">排除异常人员</span>:
6
+      <nz-input-number [(ngModel)]="matchUserCouont" [nzMin]="1" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
7
+    </div>
8
+  </div>
9
+  <div class="operation">
10
+    <i class="icon_transport transport-gengduo" nz-tooltip nzTooltipTitle="更多搜索" (click)="showMore()"></i>
11
+    <button nz-button class="btn default" (click)="search()">查询</button>
12
+    <button nz-button class="btn default ml8" (click)="reset()">重置</button>
13
+    <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
14
+  </div>
15
+</div>
16
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.floorDTO || fieldConfig.fields.companyDTO || fieldConfig.fields.sourceDTO || fieldConfig.fields.repairDeptDTO">
17
+  <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
18
+  <span>{{fieldConfig.fields.userDTO?.name}}</span>
19
+  <span>{{fieldConfig.fields.category1DTO?.category}}</span>
20
+  <span>{{fieldConfig.fields.category2DTO?.category}}</span>
21
+  <span>{{fieldConfig.fields.category3DTO?.category}}</span>
22
+  <span>{{fieldConfig.fields.sourceDTO?.name}}</span>
23
+  <span>{{fieldConfig.fields.buildingDTO?.buildingName}}</span>
24
+  <span>{{fieldConfig.fields.floorDTO?.floorName}}</span>
25
+  <span>{{fieldConfig.fields.companyDTO?.name}}</span>
26
+  <span>{{fieldConfig.fields.repairDeptDTO?.dept}}</span>
27
+</div>
28
+<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
29
+  <thead (nzSortChange)="sort($event)" nzSingleSort>
30
+    <tr>
31
+      <th nzWidth="12.5%" nzShowSort nzSortKey="startDate" [(nzSort)]="sortCurrent.startDate">日期</th>
32
+      <th nzWidth="12.5%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单总量</th>
33
+      <th nzWidth="12.5%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总价格</th>
34
+      <th nzWidth="12.5%" nzShowSort nzSortKey="countWorker" [(nzSort)]="sortCurrent.countWorker">总人数</th>
35
+      <th nzWidth="12.5%" nzShowSort nzSortKey="totalResolvedTime" [(nzSort)]="sortCurrent.totalResolvedTime">总维修时长</th>
36
+      <th nzWidth="12.5%" nzShowSort nzSortKey="avgCount" [(nzSort)]="sortCurrent.avgCount">人均单量</th>
37
+      <th nzWidth="12.5%" nzShowSort nzSortKey="avgPrice" [(nzSort)]="sortCurrent.avgPrice">人均费用</th>
38
+      <th nzWidth="12.5%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">人均维修时长</th>
39
+    </tr>
40
+  </thead>
41
+  <tbody>
42
+    <tr *ngFor="let data of listOfData">
43
+      <td>{{ data.startDate }}</td>
44
+      <td>{{ data.totalCount }}</td>
45
+      <td>{{ data.totalPrice }}</td>
46
+      <td>{{ data.countWorker }}</td>
47
+      <td>{{ data.totalResolvedTime }}</td>
48
+      <td>{{ data.avgCount }}</td>
49
+      <td>{{ data.avgPrice }}</td>
50
+      <td>{{ data.avgResolvedTime }}</td>
51
+    </tr>
52
+  </tbody>
53
+  <ng-template #footerTpl>
54
+    <table class="footTable">
55
+      <tr *ngFor="let data of listOfDataEnd">
56
+        <td style="width: 12.5%">{{ data.startDate }}</td>
57
+        <td style="width: 12.5%">{{ data.totalCount }}</td>
58
+        <td style="width: 12.5%">{{ data.totalPrice }}</td>
59
+        <td style="width: 12.5%">{{ data.countWorker }}</td>
60
+        <td style="width: 12.5%">{{ data.totalResolvedTime }}</td>
61
+        <td style="width: 12.5%">{{ data.avgCount }}</td>
62
+        <td style="width: 12.5%">{{ data.avgPrice }}</td>
63
+        <td style="width: 12.5%">{{ data.avgResolvedTime }}</td>
64
+      </tr>
65
+    </table>
66
+  </ng-template>
67
+</nz-table>
68
+<div class="pagination">
69
+  <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
70
+  <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" nzShowSizeChanger [nzPageSizeOptions]="[30,50,100,200]" [nzShowTotal]="totalTemplate"></nz-pagination>
71
+</div>
72
+
73
+<!-- 详细搜索 -->
74
+<app-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-search-more>

+ 71 - 0
src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics.component.less

@@ -0,0 +1,71 @@
1
+@import "../../../../../../src/theme.less";
2
+:host{
3
+  position: absolute;
4
+  top: 0;
5
+  right: 0;
6
+  bottom: 0;
7
+  left: 0;
8
+  ::ng-deep .ant-table-footer{
9
+    padding: 16px 0;
10
+    width: calc(100% - 15px);
11
+    font-weight: bold;
12
+  }
13
+  tr, th{
14
+    text-align: center;
15
+  }
16
+  .searchDataWrap{
17
+    display: flex;
18
+    align-items: center;
19
+    justify-content: space-between;
20
+    .searchData{
21
+      padding: 16px;
22
+      display: flex;
23
+      align-items: center;
24
+      .searchDataItem{
25
+        margin-right: 24px;
26
+        .label{
27
+          font-size: 16px;
28
+        }
29
+        .selectItem{
30
+          width: 160px;
31
+        }
32
+      }
33
+    }
34
+    .operation{
35
+      margin-right: 16px;
36
+      display: flex;
37
+      align-items: center;
38
+      cursor: pointer;
39
+      .icon_transport{
40
+        margin-right: 16px;
41
+        font-size: 24px;
42
+      }
43
+      .btn{
44
+        &.default{
45
+          height: 32px;
46
+          line-height: 32px;
47
+          min-width: 70px;
48
+        }
49
+      }
50
+    }
51
+  }
52
+
53
+  .table{
54
+    margin: 0 8px;
55
+  }
56
+
57
+  .moreFilter{
58
+    margin-bottom: 16px;
59
+    span{
60
+      margin-left: 16px;
61
+      color: @primary-color;
62
+    }
63
+  }
64
+
65
+  .pagination{
66
+    padding: 16px;
67
+    display: flex;
68
+    justify-content: flex-end;
69
+    align-items: center;
70
+  }
71
+}

+ 255 - 0
src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics.component.ts

@@ -0,0 +1,255 @@
1
+import { TabService } from '../../services/tab.service';
2
+import { debounceTime } from 'rxjs/operators';
3
+import { Subject } from 'rxjs';
4
+import { NzMessageService } from 'ng-zorro-antd/message';
5
+import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
6
+import { MainService } from 'src/app/services/main.service';
7
+import { ActivatedRoute } from '@angular/router';
8
+import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
9
+@Component({
10
+  selector: "app-personnel-effectiveness-statistics",
11
+  templateUrl: "./personnel-effectiveness-statistics.component.html",
12
+  styleUrls: ["./personnel-effectiveness-statistics.component.less"],
13
+})
14
+export class PersonnelEffectivenessStatisticsComponent implements OnInit, AfterViewInit {
15
+  @ViewChild('customChangeDate', { static: false }) customChangeDateComponent!: CustomChangeDateComponent;
16
+  constructor(
17
+    private mainService: MainService,
18
+    private message: NzMessageService,
19
+    private route: ActivatedRoute,
20
+    private tabService: TabService,
21
+  ) {}
22
+
23
+  listOfData: any[] = []; //表格数据
24
+  listOfDataEnd: any[] = []; //表格合计
25
+  pageIndex: number = 1; //表格当前页码
26
+  pageSize: number = 30; //表格每页展示条数
27
+  listLength: number = 0; //表格总数据量
28
+
29
+  matchUserCouont:number = 1;//排除异常人员
30
+
31
+  searchTimerSubject = new Subject();
32
+
33
+  ngOnInit() {
34
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
35
+      let fun = v[0];
36
+      fun.call(this, v[1]);
37
+    });
38
+  }
39
+
40
+  ngAfterViewInit(){
41
+    this.initSessionData();
42
+    this.getQueryParams();
43
+    setTimeout(() => {
44
+      this.search();
45
+    }, 0)
46
+    this.onResize();
47
+  }
48
+
49
+  tableHeight:number = 0;
50
+  @HostListener('window:resize')
51
+  onResize(): void {
52
+    setTimeout(() => {
53
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
54
+
55
+    }, 0)
56
+  }
57
+
58
+  getQueryParams(){
59
+    let queryParams = this.tabService.getQueryParams();
60
+    this.tabService.clearQueryParams();
61
+    if(queryParams.dateRange){
62
+      this.dateRange = queryParams.dateRange;
63
+      this.customChangeDateComponent.initByDate(this.dateRange);
64
+    }
65
+  }
66
+
67
+  get getMoreFilter(){
68
+    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.sourceDTO || this.fieldConfig.fields.repairDeptDTO;
69
+    return flag ? 37 : 0;
70
+  }
71
+
72
+  // 初始化缓存数据
73
+  queryType:any;
74
+  hosId:any;
75
+  dutyId:any;
76
+  parentDutyId:any;
77
+  initSessionData(){
78
+    let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
79
+    let queryType:any = newStatistics.queryType;
80
+    let hosId:any = newStatistics.hospitalId;
81
+    let dutyId:any = newStatistics.dutyId;
82
+
83
+    queryType = queryType ? +queryType : undefined;
84
+    hosId = hosId ? +hosId : undefined;
85
+    dutyId = dutyId ? +dutyId : undefined;
86
+
87
+    this.queryType = queryType;
88
+    if(queryType == 1){
89
+      this.hosId = undefined;
90
+      this.dutyId = undefined;
91
+      this.parentDutyId = undefined;
92
+    }else if(queryType == 2){
93
+      this.hosId = hosId;
94
+      this.dutyId = undefined;
95
+      this.parentDutyId = undefined;
96
+    }else if(queryType == 3){
97
+      this.hosId = undefined;
98
+      this.dutyId = dutyId;
99
+      this.parentDutyId = undefined;
100
+    }else if(queryType == 4){
101
+      this.hosId = undefined;
102
+      this.dutyId = undefined;
103
+      this.parentDutyId = dutyId;
104
+    }
105
+  }
106
+
107
+  get getHosId(){
108
+    return this.parentDutyId || this.dutyId || this.hosId;
109
+  }
110
+
111
+  // 表格数据
112
+  loading1 = false;
113
+  getList(num?: number, field?: string, sort?: string) {
114
+    if (num !== undefined) {
115
+      this.pageIndex = num;
116
+    }
117
+    let postData:any = {
118
+      idx: this.pageIndex - 1,
119
+      sum: this.pageSize,
120
+      treeLevel: 1,
121
+      startDate: this.customChangeDateComponent.startDate || undefined,
122
+      endDate: this.customChangeDateComponent.endDate || undefined,
123
+      hosId: this.hosId || undefined,
124
+      dutyId: this.dutyId || undefined,
125
+      parentDutyId: this.parentDutyId || undefined,
126
+      matchUserCouont: this.matchUserCouont || undefined,
127
+      groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
128
+      userId: this.fieldConfig.fields.userId || undefined,
129
+      categoryId: this.fieldConfig.fields.categoryId || undefined,
130
+      hierarchy: this.fieldConfig.fields.hierarchy || undefined,
131
+      buildingId: this.fieldConfig.fields.buildingId || undefined,
132
+      placeId: this.fieldConfig.fields.floorId || undefined,
133
+      companyId: this.fieldConfig.fields.companyId || undefined,
134
+      sourceId: this.fieldConfig.fields.sourceId || undefined,
135
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
136
+    };
137
+    if (field && sort) {
138
+      postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
139
+    }
140
+    this.loading1 = true;
141
+    this.mainService
142
+      .postCustom("itsm/report", "incidentWorkOrderUser", postData)
143
+      .subscribe((result) => {
144
+        this.loading1 = false;
145
+        this.listOfData = result.dataList.filter((v, i) => { return i != result.dataList.length - 1 });
146
+        this.listOfDataEnd = result.dataList.filter((v, i) => { return i == result.dataList.length - 1 });
147
+        this.listLength = result.totalCount;
148
+      });
149
+  }
150
+
151
+  // 列表排序
152
+  sortCurrent:any = {};
153
+  sortCurrentKey: string = "";
154
+  sortCurrentValue: string | null = "";
155
+  sort(e) {
156
+    const { key, value } = e;
157
+    this.sortCurrentKey = key;
158
+    this.sortCurrentValue = value;
159
+    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
160
+  }
161
+
162
+  // 搜索
163
+  search() {
164
+    this.getList(1, this.sortCurrentKey, this.sortCurrentValue);
165
+  }
166
+
167
+  // 日期选择
168
+  dateRange: any = [];
169
+
170
+  // 导出
171
+  excelExportLoading:any = false;
172
+  excelExport(){
173
+    this.excelExportLoading = this.message.loading("导出中..", {
174
+      nzDuration: 0,
175
+    }).messageId;
176
+    let postData:any = {
177
+      treeLevel: 1,
178
+      startDate: this.customChangeDateComponent.startDate || undefined,
179
+      endDate: this.customChangeDateComponent.endDate || undefined,
180
+      hosId: this.hosId || undefined,
181
+      dutyId: this.dutyId || undefined,
182
+      parentDutyId: this.parentDutyId || undefined,
183
+      matchUserCouont: this.matchUserCouont || undefined,
184
+      groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
185
+      userId: this.fieldConfig.fields.userId || undefined,
186
+      categoryId: this.fieldConfig.fields.categoryId || undefined,
187
+      hierarchy: this.fieldConfig.fields.hierarchy || undefined,
188
+      buildingId: this.fieldConfig.fields.buildingId || undefined,
189
+      placeId: this.fieldConfig.fields.floorId || undefined,
190
+      companyId: this.fieldConfig.fields.companyId || undefined,
191
+      sourceId: this.fieldConfig.fields.sourceId || undefined,
192
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
193
+    };
194
+    if (this.sortCurrentKey && this.sortCurrentValue) {
195
+      postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
196
+    }
197
+    this.mainService
198
+      .postExportCustom("itsm/export", "incidentWorkOrderUser", postData)
199
+      .subscribe((data) => {
200
+        this.message.remove(this.excelExportLoading);
201
+        this.excelExportLoading = false;
202
+        this.message.success('导出成功');
203
+        var file = new Blob([data], {
204
+          type: "application/vnd.ms-excel",
205
+        });
206
+        //trick to download store a file having its URL
207
+        var fileURL = URL.createObjectURL(file);
208
+        var a = document.createElement("a");
209
+        a.href = fileURL;
210
+        a.target = "_blank";
211
+        a.download = `${this.route.parent.routeConfig.data.title}.xls`;
212
+        document.body.appendChild(a);
213
+        a.click();
214
+      },(err) => {
215
+        this.message.remove(this.excelExportLoading);
216
+        this.excelExportLoading = false;
217
+        this.message.error('导出失败');
218
+      });
219
+  }
220
+  // 重置
221
+  reset(){
222
+    this.sortCurrentKey = "";
223
+		this.sortCurrentValue = "";
224
+		this.sortCurrent = {};
225
+    this.dateRange = []
226
+    this.matchUserCouont = 1;
227
+    this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined, companyId: undefined, sourceId: undefined, repairDeptId: undefined};
228
+    this.customChangeDateComponent.resetByDate();
229
+    setTimeout(_=>{
230
+    	this.search();
231
+    })
232
+  }
233
+
234
+  // 详细搜索
235
+  fieldConfig:any = {
236
+    fields: {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined, companyId: undefined, sourceId: undefined, repairDeptId: undefined},
237
+    config: {groupAndUser: true, category123: true, buildingAndFloor: true, company: true, source: true, repairDept: true},
238
+  }
239
+  showSearchMore:boolean = false;
240
+  showMore(){
241
+    this.showSearchMore = true;
242
+  }
243
+
244
+  cancelEvent(){
245
+    this.showSearchMore = false;
246
+  }
247
+
248
+  submitEvent(fields){
249
+    this.showSearchMore = false;
250
+    this.fieldConfig.fields = fields;
251
+    console.log('this.fieldConfig.fields:', this.fieldConfig.fields)
252
+    this.search();
253
+    this.onResize();
254
+  }
255
+}

+ 23 - 0
src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics.module.ts

@@ -0,0 +1,23 @@
1
+import { PersonnelEffectivenessStatisticsComponent } from './personnel-effectiveness-statistics.component';
2
+import { NgModule } from '@angular/core';
3
+import { CommonModule } from '@angular/common';
4
+
5
+import { PersonnelEffectivenessStatisticsRoutingModule } from './personnel-effectiveness-statistics-routing.module';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+import { SearchMoreModule } from '../../components/search-more/search-more.module';
8
+import { CustomChangeDateModule } from '../../components/custom-change-date/custom-change-date.module';
9
+
10
+
11
+@NgModule({
12
+  declarations: [
13
+    PersonnelEffectivenessStatisticsComponent,
14
+  ],
15
+  imports: [
16
+    CommonModule,
17
+    PersonnelEffectivenessStatisticsRoutingModule,
18
+    ShareModule,
19
+    SearchMoreModule,
20
+    CustomChangeDateModule,
21
+  ]
22
+})
23
+export class PersonnelEffectivenessStatisticsModule { }

+ 14 - 0
src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics-routing.module.ts

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

+ 64 - 0
src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics.component.html

@@ -0,0 +1,64 @@
1
+<div class="searchDataWrap">
2
+  <div class="searchData">
3
+    <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4
+  </div>
5
+  <div class="operation">
6
+    <i class="icon_transport transport-gengduo" nz-tooltip nzTooltipTitle="更多搜索" (click)="showMore()"></i>
7
+    <button nz-button class="btn default" (click)="search()">查询</button>
8
+    <button nz-button class="btn default ml8" (click)="reset()">重置</button>
9
+    <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
10
+  </div>
11
+</div>
12
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO || fieldConfig.fields.sourceDTO || fieldConfig.fields.repairDeptDTO">
13
+  <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
14
+  <span>{{fieldConfig.fields.userDTO?.name}}</span>
15
+  <span>{{fieldConfig.fields.category1DTO?.category}}</span>
16
+  <span>{{fieldConfig.fields.category2DTO?.category}}</span>
17
+  <span>{{fieldConfig.fields.category3DTO?.category}}</span>
18
+  <span>{{fieldConfig.fields.sourceDTO?.name}}</span>
19
+  <span>{{fieldConfig.fields.repairDeptDTO?.dept}}</span>
20
+</div>
21
+<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
22
+  <thead (nzSortChange)="sort($event)" nzSingleSort>
23
+    <tr>
24
+      <th nzWidth="16%" nzShowSort nzSortKey="date" [(nzSort)]="sortCurrent.date">日期</th>
25
+      <th nzWidth="14%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单总数</th>
26
+      <th nzWidth="14%" nzShowSort nzSortKey="极低" [(nzSort)]="sortCurrent['极低']">极低</th>
27
+      <th nzWidth="14%" nzShowSort nzSortKey="低" [(nzSort)]="sortCurrent['低']">低</th>
28
+      <th nzWidth="14%" nzShowSort nzSortKey="中" [(nzSort)]="sortCurrent['中']">中</th>
29
+      <th nzWidth="14%" nzShowSort nzSortKey="高" [(nzSort)]="sortCurrent['高']">高</th>
30
+      <th nzWidth="14%" nzShowSort nzSortKey="极高" [(nzSort)]="sortCurrent['极高']">极高</th>
31
+    </tr>
32
+  </thead>
33
+  <tbody>
34
+    <tr *ngFor="let data of listOfData">
35
+      <td>{{ data.date }}</td>
36
+      <td class="text-sign" (click)="viewDetail1(data)">{{ data.totalCount }}</td>
37
+      <td class="text-sign" (click)="viewDetail5(data, null, '极低')">{{ data['极低']}}</td>
38
+      <td class="text-sign" (click)="viewDetail5(data, null, '低')">{{ data['低'] }}</td>
39
+      <td class="text-sign" (click)="viewDetail5(data, null, '中')">{{ data['中'] }}</td>
40
+      <td class="text-sign" (click)="viewDetail5(data, null, '高')">{{ data['高'] }}</td>
41
+      <td class="text-sign" (click)="viewDetail5(data, null, '极高')">{{ data['极高'] }}</td>
42
+    </tr>
43
+  </tbody>
44
+  <ng-template #footerTpl>
45
+    <table class="footTable">
46
+      <tr *ngFor="let data of listOfDataEnd">
47
+        <td style="width: 16%">{{ data.date }}</td>
48
+        <td style="width: 14%" class="text-sign" (click)="viewDetail1(data,'all')">{{ data.totalCount }}</td>
49
+        <td style="width: 14%" class="text-sign" (click)="viewDetail5(data,'all', '极低')">{{ data['极低'] }}</td>
50
+        <td style="width: 14%" class="text-sign" (click)="viewDetail5(data,'all', '低')">{{ data['低'] }}</td>
51
+        <td style="width: 14%" class="text-sign" (click)="viewDetail5(data,'all', '中')">{{ data['中'] }}</td>
52
+        <td style="width: 14%" class="text-sign" (click)="viewDetail5(data,'all', '高')">{{ data['高'] }}</td>
53
+        <td style="width: 14%" class="text-sign" (click)="viewDetail5(data,'all', '极高')">{{ data['极高'] }}</td>
54
+      </tr>
55
+    </table>
56
+  </ng-template>
57
+</nz-table>
58
+<div class="pagination">
59
+  <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
60
+  <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" nzShowSizeChanger [nzPageSizeOptions]="[30,50,100,200]" [nzShowTotal]="totalTemplate"></nz-pagination>
61
+</div>
62
+
63
+<!-- 详细搜索 -->
64
+<app-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-search-more>

+ 75 - 0
src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics.component.less

@@ -0,0 +1,75 @@
1
+@import "../../../../../../src/theme.less";
2
+:host{
3
+  position: absolute;
4
+  top: 0;
5
+  right: 0;
6
+  bottom: 0;
7
+  left: 0;
8
+  .text-sign{
9
+		text-decoration: underline;
10
+		cursor: pointer;
11
+	}
12
+  ::ng-deep .ant-table-footer{
13
+    padding: 16px 0;
14
+    width: calc(100% - 15px);
15
+    font-weight: bold;
16
+  }
17
+  tr, th{
18
+    text-align: center;
19
+  }
20
+  .searchDataWrap{
21
+    display: flex;
22
+    align-items: center;
23
+    justify-content: space-between;
24
+    .searchData{
25
+      padding: 16px;
26
+      display: flex;
27
+      align-items: center;
28
+      .searchDataItem{
29
+        margin-right: 24px;
30
+        .label{
31
+          font-size: 16px;
32
+        }
33
+        .selectItem{
34
+          width: 160px;
35
+        }
36
+      }
37
+    }
38
+    .operation{
39
+      margin-right: 16px;
40
+      display: flex;
41
+      align-items: center;
42
+      cursor: pointer;
43
+      .icon_transport{
44
+        margin-right: 16px;
45
+        font-size: 24px;
46
+      }
47
+      .btn{
48
+        &.default{
49
+          height: 32px;
50
+          line-height: 32px;
51
+          min-width: 70px;
52
+        }
53
+      }
54
+    }
55
+  }
56
+
57
+  .table{
58
+    margin: 0 8px;
59
+  }
60
+
61
+  .moreFilter{
62
+    margin-bottom: 16px;
63
+    span{
64
+      margin-left: 16px;
65
+      color: @primary-color;
66
+    }
67
+  }
68
+
69
+  .pagination{
70
+    padding: 16px;
71
+    display: flex;
72
+    justify-content: flex-end;
73
+    align-items: center;
74
+  }
75
+}

+ 389 - 0
src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics.component.ts

@@ -0,0 +1,389 @@
1
+import { TabService } from '../../services/tab.service';
2
+import { debounceTime } from 'rxjs/operators';
3
+import { Subject } from 'rxjs';
4
+import { NzMessageService } from 'ng-zorro-antd/message';
5
+import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
6
+import { MainService } from 'src/app/services/main.service';
7
+import { ActivatedRoute, Router } from '@angular/router';
8
+import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
9
+@Component({
10
+  selector: "app-priority-date-statistics",
11
+  templateUrl: "./priority-date-statistics.component.html",
12
+  styleUrls: ["./priority-date-statistics.component.less"],
13
+})
14
+export class PriorityDateStatisticsComponent implements OnInit, AfterViewInit {
15
+  @ViewChild('customChangeDate', { static: false }) customChangeDateComponent!: CustomChangeDateComponent;
16
+  constructor(
17
+    private mainService: MainService,
18
+    private message: NzMessageService,
19
+    private route: ActivatedRoute,
20
+    private tabService: TabService,
21
+    private router: Router,
22
+  ) {}
23
+
24
+  listOfData: any[] = []; //表格数据
25
+  listOfDataEnd: any[] = []; //表格合计
26
+  pageIndex: number = 1; //表格当前页码
27
+  pageSize: number = 30; //表格每页展示条数
28
+  listLength: number = 0; //表格总数据量
29
+
30
+  searchTimerSubject = new Subject();
31
+
32
+  ngOnInit() {
33
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
34
+      let fun = v[0];
35
+      fun.call(this, v[1]);
36
+    });
37
+  }
38
+
39
+  ngAfterViewInit(){
40
+    this.initSessionData();
41
+    this.getQueryParams();
42
+    setTimeout(() => {
43
+      this.search();
44
+    }, 0)
45
+    this.onResize();
46
+  }
47
+
48
+  tableHeight:number = 0;
49
+  @HostListener('window:resize')
50
+  onResize(): void {
51
+    setTimeout(() => {
52
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
53
+
54
+    }, 0)
55
+  }
56
+
57
+  // 数据下钻
58
+	viewDetail1(data,type){
59
+		let query = null
60
+		if(type=='all'){
61
+			query = {
62
+				startDate: this.customChangeDateComponent.startDate,
63
+				endDate: this.customChangeDateComponent.endDate,
64
+				searchQuery:{
65
+					statusValue: 'close',
66
+					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
67
+					groupId: this.fieldConfig.fields.groupId || undefined,
68
+					userId: this.fieldConfig.fields.userId || undefined,
69
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
70
+					sourceId: this.fieldConfig.fields.sourceId || undefined,
71
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
72
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
73
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
74
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
75
+					groupDTO: this.fieldConfig.fields.groupDTO,
76
+					sourceDTO: this.fieldConfig.fields.sourceDTO,
77
+					userDTO: this.fieldConfig.fields.userDTO,
78
+				}
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);
85
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
86
+			this.router.navigate([path], { replaceUrl: true });
87
+		}else{
88
+			 query = {
89
+				startDate: data.date + ' ' + '00:00:00',
90
+				endDate: data.date + ' ' + '23:59:59',
91
+				searchQuery:{
92
+					statusValue: 'close',
93
+					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
94
+					groupId: this.fieldConfig.fields.groupId || undefined,
95
+					userId: this.fieldConfig.fields.userId || undefined,
96
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
97
+					sourceId: this.fieldConfig.fields.sourceId || undefined,
98
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
99
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
100
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
101
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
102
+					groupDTO: this.fieldConfig.fields.groupDTO,
103
+					sourceDTO: this.fieldConfig.fields.sourceDTO,
104
+					userDTO: this.fieldConfig.fields.userDTO,
105
+				}
106
+			}
107
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
108
+			let flag = this.tabService.tabs.some(v => v.path === path);
109
+			flag && this.tabService.deleteRouteSnapshot(path);
110
+			this.tabService.setQueryParams('dateRange', [data.date + ' ' + '00:00:00', data.date + ' ' + '23:59:59']);
111
+			this.tabService.setQueryParams('defRange', null);
112
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
113
+			this.router.navigate([path], { replaceUrl: true });
114
+		}
115
+	}
116
+
117
+  // 数据下钻
118
+	viewDetail5(data,type,key){
119
+	console.log('data:', data)
120
+	console.log('type:', type)
121
+	console.log('key:', key)
122
+		let query = null
123
+		if(type=='all'){
124
+			query = {
125
+				startDate: this.customChangeDateComponent.startDate,
126
+				endDate: this.customChangeDateComponent.endDate,
127
+				searchQuery:{
128
+					statusValue: 'close',
129
+					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
130
+					groupId: this.fieldConfig.fields.groupId || undefined,
131
+					userId: this.fieldConfig.fields.userId || undefined,
132
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
133
+					sourceId: this.fieldConfig.fields.sourceId || undefined,
134
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
135
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
136
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
137
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
138
+					groupDTO: this.fieldConfig.fields.groupDTO,
139
+					sourceDTO: this.fieldConfig.fields.sourceDTO,
140
+					userDTO: this.fieldConfig.fields.userDTO,
141
+					priorityId: data[key + 'id'] || undefined,
142
+          priorityDTO: {
143
+            id: data[key + 'id'],
144
+            name: key,
145
+          }
146
+				}
147
+			}
148
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
149
+			let flag = this.tabService.tabs.some(v => v.path === path);
150
+			flag && this.tabService.deleteRouteSnapshot(path);
151
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
152
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
153
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
154
+			this.router.navigate([path], { replaceUrl: true });
155
+		}else{
156
+			 query = {
157
+				startDate: data.date + ' ' + '00:00:00',
158
+				endDate: data.date + ' ' + '23:59:59',
159
+				searchQuery:{
160
+					statusValue: 'close',
161
+					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
162
+					groupId: this.fieldConfig.fields.groupId || undefined,
163
+					userId: this.fieldConfig.fields.userId || undefined,
164
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
165
+					sourceId: this.fieldConfig.fields.sourceId || undefined,
166
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
167
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
168
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
169
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
170
+					groupDTO: this.fieldConfig.fields.groupDTO,
171
+					sourceDTO: this.fieldConfig.fields.sourceDTO,
172
+					userDTO: this.fieldConfig.fields.userDTO,
173
+          priorityId: data[key + 'id'] || undefined,
174
+          priorityDTO: {
175
+            id: data[key + 'id'],
176
+            name: key,
177
+          }
178
+				}
179
+			}
180
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
181
+			let flag = this.tabService.tabs.some(v => v.path === path);
182
+			flag && this.tabService.deleteRouteSnapshot(path);
183
+			this.tabService.setQueryParams('dateRange', [data.date + ' ' + '00:00:00', data.date + ' ' + '23:59:59']);
184
+			this.tabService.setQueryParams('defRange', null);
185
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
186
+			this.router.navigate([path], { replaceUrl: true });
187
+		}
188
+	}
189
+
190
+  getQueryParams(){
191
+    let queryParams = this.tabService.getQueryParams();
192
+    this.tabService.clearQueryParams();
193
+    if(queryParams.dateRange){
194
+      this.dateRange = queryParams.dateRange;
195
+      this.customChangeDateComponent.initByDate(this.dateRange);
196
+    }
197
+  }
198
+
199
+  get getMoreFilter(){
200
+    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO || this.fieldConfig.fields.repairDeptDTO;
201
+    return flag ? 37 : 0;
202
+  }
203
+
204
+  // 初始化缓存数据
205
+  queryType:any;
206
+  hosId:any;
207
+  dutyId:any;
208
+  parentDutyId:any;
209
+  initSessionData(){
210
+    let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
211
+    let queryType:any = newStatistics.queryType;
212
+    let hosId:any = newStatistics.hospitalId;
213
+    let dutyId:any = newStatistics.dutyId;
214
+
215
+    queryType = queryType ? +queryType : undefined;
216
+    hosId = hosId ? +hosId : undefined;
217
+    dutyId = dutyId ? +dutyId : undefined;
218
+
219
+    this.queryType = queryType;
220
+    if(queryType == 1){
221
+      this.hosId = undefined;
222
+      this.dutyId = undefined;
223
+      this.parentDutyId = undefined;
224
+    }else if(queryType == 2){
225
+      this.hosId = hosId;
226
+      this.dutyId = undefined;
227
+      this.parentDutyId = undefined;
228
+    }else if(queryType == 3){
229
+      this.hosId = undefined;
230
+      this.dutyId = dutyId;
231
+      this.parentDutyId = undefined;
232
+    }else if(queryType == 4){
233
+      this.hosId = undefined;
234
+      this.dutyId = undefined;
235
+      this.parentDutyId = dutyId;
236
+    }
237
+  }
238
+
239
+  get getHosId(){
240
+    return this.parentDutyId || this.dutyId || this.hosId;
241
+  }
242
+
243
+  // 表格数据
244
+  loading1 = false;
245
+  getList(num?: number, field?: string, sort?: string) {
246
+    if (num !== undefined) {
247
+      this.pageIndex = num;
248
+    }
249
+    let postData:any = {
250
+      idx: this.pageIndex - 1,
251
+      sum: this.pageSize,
252
+      startDate: this.customChangeDateComponent.startDate || undefined,
253
+      endDate: this.customChangeDateComponent.endDate || undefined,
254
+      hosId: this.hosId || undefined,
255
+      dutyId: this.dutyId || undefined,
256
+      parentDutyId: this.parentDutyId || undefined,
257
+      groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
258
+      userId: this.fieldConfig.fields.userId || undefined,
259
+      categoryId: this.fieldConfig.fields.categoryId || undefined,
260
+      hierarchy: this.fieldConfig.fields.hierarchy || undefined,
261
+      sourceId: this.fieldConfig.fields.sourceId || undefined,
262
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
263
+    };
264
+    if (field && sort) {
265
+      postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
266
+    }
267
+    this.loading1 = true;
268
+    this.mainService
269
+      .postCustom("itsm/report", "incidentPriority", postData)
270
+      .subscribe((result) => {
271
+        this.loading1 = false;
272
+        result.dataList = result.dataList || [];
273
+        // 优先级需要处理
274
+        result.dataList.forEach(v => {
275
+          for (const key in v) {
276
+            if(key.includes('_')){
277
+              let [key1, value1] = key.split('_');
278
+              v[key1] = v[key];
279
+              v[key1 + 'id'] = +value1;
280
+            }
281
+          }
282
+        })
283
+
284
+        console.log('result.dataList:', result.dataList)
285
+        this.listOfData = result.dataList.filter((v, i) => { return i != result.dataList.length - 1 });
286
+        this.listOfDataEnd = result.dataList.filter((v, i) => { return i == result.dataList.length - 1 });
287
+        this.listLength = result.totalCount;
288
+      });
289
+  }
290
+
291
+  // 列表排序
292
+  sortCurrent:any = {};
293
+  sortCurrentKey: string = "";
294
+  sortCurrentValue: string | null = "";
295
+  sort(e) {
296
+    const { key, value } = e;
297
+    this.sortCurrentKey = key;
298
+    this.sortCurrentValue = value;
299
+    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
300
+  }
301
+
302
+  // 搜索
303
+  search() {
304
+    this.getList(1, this.sortCurrentKey, this.sortCurrentValue);
305
+  }
306
+
307
+  // 日期选择
308
+  dateRange: any = [];
309
+
310
+  // 导出
311
+  excelExportLoading:any = false;
312
+  excelExport(){
313
+    this.excelExportLoading = this.message.loading("导出中..", {
314
+      nzDuration: 0,
315
+    }).messageId;
316
+    let postData:any = {
317
+      startDate: this.customChangeDateComponent.startDate || undefined,
318
+      endDate: this.customChangeDateComponent.endDate || undefined,
319
+      hosId: this.hosId || undefined,
320
+      dutyId: this.dutyId || undefined,
321
+      parentDutyId: this.parentDutyId || undefined,
322
+      groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
323
+      userId: this.fieldConfig.fields.userId || undefined,
324
+      categoryId: this.fieldConfig.fields.categoryId || undefined,
325
+      hierarchy: this.fieldConfig.fields.hierarchy || undefined,
326
+      sourceId: this.fieldConfig.fields.sourceId || undefined,
327
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
328
+    };
329
+    if (this.sortCurrentKey && this.sortCurrentValue) {
330
+      postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
331
+    }
332
+    this.mainService
333
+      .postExportCustom("itsm/export", "incidentPriority", postData)
334
+      .subscribe((data) => {
335
+        this.message.remove(this.excelExportLoading);
336
+        this.excelExportLoading = false;
337
+        this.message.success('导出成功');
338
+        var file = new Blob([data], {
339
+          type: "application/vnd.ms-excel",
340
+        });
341
+        //trick to download store a file having its URL
342
+        var fileURL = URL.createObjectURL(file);
343
+        var a = document.createElement("a");
344
+        a.href = fileURL;
345
+        a.target = "_blank";
346
+        a.download = `${this.route.parent.routeConfig.data.title}.xls`;
347
+        document.body.appendChild(a);
348
+        a.click();
349
+      },(err) => {
350
+        this.message.remove(this.excelExportLoading);
351
+        this.excelExportLoading = false;
352
+        this.message.error('导出失败');
353
+      });
354
+  }
355
+  // 重置
356
+  reset(){
357
+    this.sortCurrentKey = "";
358
+		this.sortCurrentValue = "";
359
+		this.sortCurrent = {};
360
+    this.dateRange = []
361
+    this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, repairDeptId: undefined};
362
+    this.customChangeDateComponent.resetByDate();
363
+    setTimeout(_=>{
364
+    	this.search();
365
+    })
366
+  }
367
+
368
+  // 详细搜索
369
+  fieldConfig:any = {
370
+    fields: {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, repairDeptId: undefined},
371
+    config: {groupAndUser: true, category123: true, source: true, repairDept: true},
372
+  }
373
+  showSearchMore:boolean = false;
374
+  showMore(){
375
+    this.showSearchMore = true;
376
+  }
377
+
378
+  cancelEvent(){
379
+    this.showSearchMore = false;
380
+  }
381
+
382
+  submitEvent(fields){
383
+    this.showSearchMore = false;
384
+    this.fieldConfig.fields = fields;
385
+    console.log('this.fieldConfig.fields:', this.fieldConfig.fields)
386
+    this.search();
387
+    this.onResize();
388
+  }
389
+}

+ 23 - 0
src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics.module.ts

@@ -0,0 +1,23 @@
1
+import { PriorityDateStatisticsComponent } from './priority-date-statistics.component';
2
+import { NgModule } from '@angular/core';
3
+import { CommonModule } from '@angular/common';
4
+
5
+import { PriorityDateStatisticsRoutingModule } from './priority-date-statistics-routing.module';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+import { SearchMoreModule } from '../../components/search-more/search-more.module';
8
+import { CustomChangeDateModule } from '../../components/custom-change-date/custom-change-date.module';
9
+
10
+
11
+@NgModule({
12
+  declarations: [
13
+    PriorityDateStatisticsComponent,
14
+  ],
15
+  imports: [
16
+    CommonModule,
17
+    PriorityDateStatisticsRoutingModule,
18
+    ShareModule,
19
+    SearchMoreModule,
20
+    CustomChangeDateModule,
21
+  ]
22
+})
23
+export class PriorityDateStatisticsModule { }

+ 14 - 0
src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics-routing.module.ts

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

+ 75 - 0
src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics.component.html

@@ -0,0 +1,75 @@
1
+<div class="searchDataWrap">
2
+  <div class="searchData">
3
+    <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4
+  </div>
5
+  <div class="operation">
6
+    <i class="icon_transport transport-gengduo" nz-tooltip nzTooltipTitle="更多搜索" (click)="showMore()"></i>
7
+    <button nz-button class="btn default" (click)="search()">查询</button>
8
+    <button nz-button class="btn default ml8" (click)="reset()">重置</button>
9
+    <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
10
+  </div>
11
+</div>
12
+<div class="moreFilter" *ngIf="fieldConfig.fields.buildingDTO || fieldConfig.fields.floorDTO || fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.repairDeptDTO || fieldConfig.fields.companyDTO">
13
+  <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
14
+  <span>{{fieldConfig.fields.userDTO?.name}}</span>
15
+  <span>{{fieldConfig.fields.buildingDTO?.buildingName}}</span>
16
+  <span>{{fieldConfig.fields.floorDTO?.floorName}}</span>
17
+  <span>{{fieldConfig.fields.companyDTO?.name}}</span>
18
+  <span>{{fieldConfig.fields.repairDeptDTO?.dept}}</span>
19
+</div>
20
+<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
21
+  <thead (nzSortChange)="sort($event)" nzSingleSort>
22
+    <tr>
23
+      <th nzWidth="10%">优先级</th>
24
+      <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
25
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均接单时长</th>
26
+      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时长</th>
27
+      <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
28
+      <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
29
+      <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
30
+      <th nzWidth="9%" nzShowSort nzSortKey="workHourPrice" [(nzSort)]="sortCurrent.workHourPrice">工时费用(元)</th>
31
+      <th nzWidth="9%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用(元)</th>
32
+      <th nzWidth="9%" nzShowSort nzSortKey="negativeNum" [(nzSort)]="sortCurrent.negativeNum">差评单数</th>
33
+      <th nzWidth="9%" nzShowSort nzSortKey="favorableRate" [(nzSort)]="sortCurrent.favorableRate">好评率</th>
34
+    </tr>
35
+  </thead>
36
+  <tbody>
37
+    <tr *ngFor="let data of listOfData">
38
+      <td>{{ data.priorityName }}</td>
39
+      <td class="text-sign" (click)="viewDetail1(data)">{{ data.sum }}</td>
40
+      <td>{{ data.avgResponseTime }}</td>
41
+      <td>{{ data.avgResolvedTime }}</td>
42
+      <td class="text-sign" (click)="viewDetail2(data)">{{ data.resolvedOverNum }}</td>
43
+      <td class="text-sign" (click)="viewDetail3(data)">{{ data.overTimeNum }}</td>
44
+      <td>{{ data.consumablePrice }}</td>
45
+      <td>{{ data.workHourPrice }}</td>
46
+      <td>{{ data.totalPrice }}</td>
47
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.negativeNum }}</td>
48
+      <td>{{ data.favorableRate }}</td>
49
+    </tr>
50
+  </tbody>
51
+  <ng-template #footerTpl>
52
+    <table class="footTable">
53
+      <tr *ngFor="let data of listOfDataEnd">
54
+        <td style="width: 10%">{{ data.priorityName }}</td>
55
+        <td style="width: 9%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.sum }}</td>
56
+        <td style="width: 9%">{{ data.avgResponseTime }}</td>
57
+        <td style="width: 9%">{{ data.avgResolvedTime }}</td>
58
+        <td style="width: 9%" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.resolvedOverNum }}</td>
59
+        <td style="width: 9%" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.overTimeNum }}</td>
60
+        <td style="width: 9%">{{ data.consumablePrice }}</td>
61
+        <td style="width: 9%">{{ data.workHourPrice }}</td>
62
+        <td style="width: 9%">{{ data.totalPrice }}</td>
63
+        <td style="width: 9%" class="text-sign" (click)="viewDetail4(data, 'all')">{{ data.negativeNum }}</td>
64
+        <td style="width: 9%">{{ data.favorableRate }}</td>
65
+      </tr>
66
+    </table>
67
+  </ng-template>
68
+</nz-table>
69
+<div class="pagination">
70
+  <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
71
+  <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" nzShowSizeChanger [nzPageSizeOptions]="[30,50,100,200]" [nzShowTotal]="totalTemplate"></nz-pagination>
72
+</div>
73
+
74
+<!-- 详细搜索 -->
75
+<app-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-search-more>

+ 75 - 0
src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics.component.less

@@ -0,0 +1,75 @@
1
+@import "../../../../../../src/theme.less";
2
+:host{
3
+  position: absolute;
4
+  top: 0;
5
+  right: 0;
6
+  bottom: 0;
7
+  left: 0;
8
+	.text-sign{
9
+		text-decoration: underline;
10
+		cursor: pointer;
11
+	}
12
+  ::ng-deep .ant-table-footer{
13
+    padding: 16px 0;
14
+    width: calc(100% - 15px);
15
+    font-weight: bold;
16
+  }
17
+  tr, th{
18
+    text-align: center;
19
+  }
20
+  .searchDataWrap{
21
+    display: flex;
22
+    align-items: center;
23
+    justify-content: space-between;
24
+    .searchData{
25
+      padding: 16px;
26
+      display: flex;
27
+      align-items: center;
28
+      .searchDataItem{
29
+        margin-right: 24px;
30
+        .label{
31
+          font-size: 16px;
32
+        }
33
+        .selectItem{
34
+          width: 160px;
35
+        }
36
+      }
37
+    }
38
+    .operation{
39
+      margin-right: 16px;
40
+      display: flex;
41
+      align-items: center;
42
+      cursor: pointer;
43
+      .icon_transport{
44
+        margin-right: 16px;
45
+        font-size: 24px;
46
+      }
47
+      .btn{
48
+        &.default{
49
+          height: 32px;
50
+          line-height: 32px;
51
+          min-width: 70px;
52
+        }
53
+      }
54
+    }
55
+  }
56
+
57
+  .table{
58
+    margin: 0 8px;
59
+  }
60
+
61
+  .moreFilter{
62
+    margin-bottom: 16px;
63
+    span{
64
+      margin-left: 16px;
65
+      color: @primary-color;
66
+    }
67
+  }
68
+
69
+  .pagination{
70
+    padding: 16px;
71
+    display: flex;
72
+    justify-content: flex-end;
73
+    align-items: center;
74
+  }
75
+}

+ 541 - 0
src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics.component.ts

@@ -0,0 +1,541 @@
1
+import { TabService } from './../../services/tab.service';
2
+import { NzMessageService } from 'ng-zorro-antd/message';
3
+import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
4
+import { MainService } from 'src/app/services/main.service';
5
+import { ActivatedRoute, Router } from '@angular/router';
6
+import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
7
+@Component({
8
+  selector: "app-priority-quality-control-statistics",
9
+  templateUrl: "./priority-quality-control-statistics.component.html",
10
+  styleUrls: ["./priority-quality-control-statistics.component.less"],
11
+})
12
+export class PriorityQualityControlStatisticsComponent implements OnInit, AfterViewInit {
13
+  @ViewChild('customChangeDate', { static: false }) customChangeDateComponent!: CustomChangeDateComponent;
14
+  constructor(
15
+    private mainService: MainService,
16
+    private message: NzMessageService,
17
+    private route: ActivatedRoute,
18
+		private router: Router,
19
+    private tabService: TabService,
20
+  ) {}
21
+
22
+  listOfData: any[] = []; //表格数据
23
+  listOfDataEnd: any[] = []; //表格合计
24
+  pageIndex: number = 1; //表格当前页码
25
+  pageSize: number = 30; //表格每页展示条数
26
+  listLength: number = 0; //表格总数据量
27
+
28
+  ngOnInit() {}
29
+
30
+  ngAfterViewInit(){
31
+    this.initSessionData();
32
+    this.getQueryParams();
33
+    setTimeout(() => {
34
+      this.search();
35
+    }, 0)
36
+    this.onResize();
37
+  }
38
+
39
+  tableHeight:number = 0;
40
+  @HostListener('window:resize')
41
+  onResize(): void {
42
+    setTimeout(() => {
43
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
44
+
45
+    }, 0)
46
+  }
47
+
48
+	// 数据下钻
49
+	viewDetail1(data, type){
50
+		let query = null
51
+		if(type=='all'){
52
+			query = {
53
+				startDate: this.customChangeDateComponent.startDate || undefined,
54
+				endDate: this.customChangeDateComponent.endDate || undefined,
55
+				searchQuery:{
56
+					statusValue: 'close',
57
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
58
+					floorId: this.fieldConfig.fields.floorId || undefined,
59
+					placeId: this.fieldConfig.fields.floorId || undefined,
60
+          groupId: this.fieldConfig.fields.groupId || undefined,
61
+          userId: this.fieldConfig.fields.userId || undefined,
62
+          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
63
+          companyId: this.fieldConfig.fields.companyId || undefined,
64
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
65
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
66
+          groupDTO: this.fieldConfig.fields.groupDTO || undefined,
67
+          userDTO: this.fieldConfig.fields.userDTO || undefined,
68
+          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
69
+          companyDTO: this.fieldConfig.fields.companyDTO || undefined,
70
+          priorityId: data.priorityId || undefined,
71
+          priorityDTO: {
72
+            id: data.priorityId,
73
+            name: data.priorityName,
74
+          }
75
+				}
76
+			}
77
+		}else{
78
+			query = {
79
+				startDate: this.customChangeDateComponent.startDate || undefined,
80
+				endDate: this.customChangeDateComponent.endDate || undefined,
81
+				searchQuery:{
82
+					statusValue: 'close',
83
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
84
+					floorId: this.fieldConfig.fields.floorId || undefined,
85
+					placeId: this.fieldConfig.fields.floorId || undefined,
86
+          groupId: this.fieldConfig.fields.groupId || undefined,
87
+          userId: this.fieldConfig.fields.userId || undefined,
88
+          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
89
+          companyId: this.fieldConfig.fields.companyId || undefined,
90
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
91
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
92
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
93
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
94
+          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
95
+          companyDTO: this.fieldConfig.fields.companyDTO || undefined,
96
+          priorityId: data.priorityId || undefined,
97
+          priorityDTO: {
98
+            id: data.priorityId,
99
+            name: data.priorityName,
100
+          }
101
+				}
102
+			}
103
+		}
104
+
105
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
106
+		let flag = this.tabService.tabs.some(v => v.path === path);
107
+		flag && this.tabService.deleteRouteSnapshot(path);
108
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
109
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
110
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
111
+		this.router.navigate([path], { replaceUrl: true });
112
+	}
113
+
114
+	// 数据下钻
115
+	viewDetail2(data, type){
116
+		let query = null
117
+		if(type=='all'){
118
+			query = {
119
+				startDate: this.customChangeDateComponent.startDate || undefined,
120
+				endDate: this.customChangeDateComponent.endDate || undefined,
121
+				searchQuery:{
122
+					statusValue: 'close',
123
+					overtimeId: 1,
124
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
125
+					floorId: this.fieldConfig.fields.floorId || undefined,
126
+					placeId: this.fieldConfig.fields.floorId || undefined,
127
+          groupId: this.fieldConfig.fields.groupId || undefined,
128
+          userId: this.fieldConfig.fields.userId || undefined,
129
+          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
130
+          companyId: this.fieldConfig.fields.companyId || undefined,
131
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
132
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
133
+          groupDTO: this.fieldConfig.fields.groupDTO || undefined,
134
+          userDTO: this.fieldConfig.fields.userDTO || undefined,
135
+          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
136
+          companyDTO: this.fieldConfig.fields.companyDTO || undefined,
137
+          priorityId: data.priorityId || undefined,
138
+          priorityDTO: {
139
+            id: data.priorityId,
140
+            name: data.priorityName,
141
+          },
142
+					overtimeDTO:{
143
+						id: 1,
144
+						name: "是"
145
+					},
146
+				}
147
+			}
148
+		}else{
149
+			query = {
150
+				startDate: this.customChangeDateComponent.startDate || undefined,
151
+				endDate: this.customChangeDateComponent.endDate || undefined,
152
+				searchQuery:{
153
+					statusValue: 'close',
154
+					overtimeId: 1,
155
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
156
+					floorId: this.fieldConfig.fields.floorId || undefined,
157
+					placeId: this.fieldConfig.fields.floorId || undefined,
158
+          groupId: this.fieldConfig.fields.groupId || undefined,
159
+          userId: this.fieldConfig.fields.userId || undefined,
160
+          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
161
+          companyId: this.fieldConfig.fields.companyId || undefined,
162
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
163
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
164
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
165
+          userDTO: this.fieldConfig.fields.userDTO || undefined,
166
+          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
167
+          companyDTO: this.fieldConfig.fields.companyDTO || undefined,
168
+          priorityId: data.priorityId || undefined,
169
+          priorityDTO: {
170
+            id: data.priorityId,
171
+            name: data.priorityName,
172
+          },
173
+					overtimeDTO:{
174
+						id: 1,
175
+						name: "是"
176
+					},
177
+				}
178
+			}
179
+		}
180
+
181
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
182
+		let flag = this.tabService.tabs.some(v => v.path === path);
183
+		flag && this.tabService.deleteRouteSnapshot(path);
184
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
185
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
186
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
187
+		this.router.navigate([path], { replaceUrl: true });
188
+	}
189
+
190
+	// 数据下钻
191
+	viewDetail3(data, type){
192
+		let query = null
193
+		if(type=='all'){
194
+			query = {
195
+				startDate: this.customChangeDateComponent.startDate || undefined,
196
+				endDate: this.customChangeDateComponent.endDate || undefined,
197
+				searchQuery:{
198
+					statusValue: 'close',
199
+					isHangId: 1,
200
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
201
+					floorId: this.fieldConfig.fields.floorId || undefined,
202
+					placeId: this.fieldConfig.fields.floorId || undefined,
203
+          groupId: this.fieldConfig.fields.groupId || undefined,
204
+          userId: this.fieldConfig.fields.userId || undefined,
205
+          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
206
+          companyId: this.fieldConfig.fields.companyId || undefined,
207
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
208
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
209
+          groupDTO: this.fieldConfig.fields.groupDTO || undefined,
210
+          userDTO: this.fieldConfig.fields.userDTO || undefined,
211
+          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
212
+          companyDTO: this.fieldConfig.fields.companyDTO || undefined,
213
+          priorityId: data.priorityId || undefined,
214
+          priorityDTO: {
215
+            id: data.priorityId,
216
+            name: data.priorityName,
217
+          },
218
+					isHangDTO:{
219
+						id: 1,
220
+						name: "是"
221
+					},
222
+				}
223
+			}
224
+		}else{
225
+			query = {
226
+				startDate: this.customChangeDateComponent.startDate || undefined,
227
+				endDate: this.customChangeDateComponent.endDate || undefined,
228
+				searchQuery:{
229
+					statusValue: 'close',
230
+					isHangId: 1,
231
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
232
+					floorId: this.fieldConfig.fields.floorId || undefined,
233
+					placeId: this.fieldConfig.fields.floorId || undefined,
234
+          groupId: this.fieldConfig.fields.groupId || undefined,
235
+          userId: this.fieldConfig.fields.userId || undefined,
236
+          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
237
+          companyId: this.fieldConfig.fields.companyId || undefined,
238
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
239
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
240
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
241
+          userDTO: this.fieldConfig.fields.userDTO || undefined,
242
+          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
243
+          companyDTO: this.fieldConfig.fields.companyDTO || undefined,
244
+          priorityId: data.priorityId || undefined,
245
+          priorityDTO: {
246
+            id: data.priorityId,
247
+            name: data.priorityName,
248
+          },
249
+					isHangDTO:{
250
+						id: 1,
251
+						name: "是"
252
+					},
253
+				}
254
+			}
255
+		}
256
+
257
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
258
+		let flag = this.tabService.tabs.some(v => v.path === path);
259
+		flag && this.tabService.deleteRouteSnapshot(path);
260
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
261
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
262
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
263
+		this.router.navigate([path], { replaceUrl: true });
264
+	}
265
+
266
+	// 数据下钻
267
+	viewDetail4(data, type){
268
+		let query = null
269
+		if(type=='all'){
270
+			query = {
271
+				startDate: this.customChangeDateComponent.startDate || undefined,
272
+				endDate: this.customChangeDateComponent.endDate || undefined,
273
+				searchQuery:{
274
+					statusValue: 'close',
275
+					evaluateId: 20424,
276
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
277
+					floorId: this.fieldConfig.fields.floorId || undefined,
278
+					placeId: this.fieldConfig.fields.floorId || undefined,
279
+          groupId: this.fieldConfig.fields.groupId || undefined,
280
+          userId: this.fieldConfig.fields.userId || undefined,
281
+          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
282
+          companyId: this.fieldConfig.fields.companyId || undefined,
283
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
284
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
285
+          groupDTO: this.fieldConfig.fields.groupDTO || undefined,
286
+          userDTO: this.fieldConfig.fields.userDTO || undefined,
287
+          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
288
+          companyDTO: this.fieldConfig.fields.companyDTO || undefined,
289
+          priorityId: data.priorityId || undefined,
290
+          priorityDTO: {
291
+            id: data.priorityId,
292
+            name: data.priorityName,
293
+          },
294
+					evaluateDTO: {
295
+						"id": 20424,
296
+						"key": "incident_degree",
297
+						"name": "不满意",
298
+						"value": "1",
299
+						"orders": 5,
300
+						"extra1": "",
301
+						"extra2": ""
302
+					}
303
+				}
304
+			}
305
+		}else{
306
+			query = {
307
+				startDate: this.customChangeDateComponent.startDate || undefined,
308
+				endDate: this.customChangeDateComponent.endDate || undefined,
309
+				searchQuery:{
310
+					statusValue: 'close',
311
+					evaluateId: 20424,
312
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
313
+					floorId: this.fieldConfig.fields.floorId || undefined,
314
+					placeId: this.fieldConfig.fields.floorId || undefined,
315
+          groupId: this.fieldConfig.fields.groupId || undefined,
316
+          userId: this.fieldConfig.fields.userId || undefined,
317
+          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
318
+          companyId: this.fieldConfig.fields.companyId || undefined,
319
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
320
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
321
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
322
+          userDTO: this.fieldConfig.fields.userDTO || undefined,
323
+          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
324
+          companyDTO: this.fieldConfig.fields.companyDTO || undefined,
325
+          priorityId: data.priorityId || undefined,
326
+          priorityDTO: {
327
+            id: data.priorityId,
328
+            name: data.priorityName,
329
+          },
330
+					evaluateDTO: {
331
+						"id": 20424,
332
+						"key": "incident_degree",
333
+						"name": "不满意",
334
+						"value": "1",
335
+						"orders": 5,
336
+						"extra1": "",
337
+						"extra2": ""
338
+					}
339
+				}
340
+			}
341
+		}
342
+
343
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
344
+		let flag = this.tabService.tabs.some(v => v.path === path);
345
+		flag && this.tabService.deleteRouteSnapshot(path);
346
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
347
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
348
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
349
+		this.router.navigate([path], { replaceUrl: true });
350
+	}
351
+
352
+  getQueryParams(){
353
+    let queryParams = this.tabService.getQueryParams();
354
+    this.tabService.clearQueryParams();
355
+    if(queryParams.dateRange){
356
+      this.dateRange = queryParams.dateRange;
357
+      this.customChangeDateComponent.initByDate(this.dateRange);
358
+    }
359
+  }
360
+
361
+  get getMoreFilter(){
362
+    let flag = this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.groupDTO;
363
+    return flag ? 37 : 0;
364
+  }
365
+
366
+  // 初始化缓存数据
367
+  queryType:any;
368
+  hosId:any;
369
+  dutyId:any;
370
+  parentDutyId:any;
371
+  initSessionData(){
372
+    let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
373
+    let queryType:any = newStatistics.queryType;
374
+    let hosId:any = newStatistics.hospitalId;
375
+    let dutyId:any = newStatistics.dutyId;
376
+
377
+    queryType = queryType ? +queryType : undefined;
378
+    hosId = hosId ? +hosId : undefined;
379
+    dutyId = dutyId ? +dutyId : undefined;
380
+
381
+    this.queryType = queryType;
382
+    if(queryType == 1){
383
+      this.hosId = undefined;
384
+      this.dutyId = undefined;
385
+      this.parentDutyId = undefined;
386
+    }else if(queryType == 2){
387
+      this.hosId = hosId;
388
+      this.dutyId = undefined;
389
+      this.parentDutyId = undefined;
390
+    }else if(queryType == 3){
391
+      this.hosId = undefined;
392
+      this.dutyId = dutyId;
393
+      this.parentDutyId = undefined;
394
+    }else if(queryType == 4){
395
+      this.hosId = undefined;
396
+      this.dutyId = undefined;
397
+      this.parentDutyId = dutyId;
398
+    }
399
+  }
400
+
401
+  get getHosId(){
402
+    return this.parentDutyId || this.dutyId || this.hosId;
403
+  }
404
+
405
+  // 表格数据
406
+  loading1 = false;
407
+  getList(num?: number, field?: string, sort?: string) {
408
+    if (num !== undefined) {
409
+      this.pageIndex = num;
410
+    }
411
+    let postData:any = {
412
+      idx: this.pageIndex - 1,
413
+      sum: this.pageSize,
414
+      startDate: this.customChangeDateComponent.startDate || undefined,
415
+      endDate: this.customChangeDateComponent.endDate || undefined,
416
+      hosId: this.hosId || undefined,
417
+      dutyId: this.dutyId || undefined,
418
+      parentDutyId: this.parentDutyId || undefined,
419
+      buildingId: this.fieldConfig.fields.buildingId || undefined,
420
+      placeId: this.fieldConfig.fields.floorId || undefined,
421
+      groupId: this.fieldConfig.fields.groupId || undefined,
422
+      userId: this.fieldConfig.fields.userId || undefined,
423
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
424
+      companyId: this.fieldConfig.fields.companyId || undefined,
425
+    };
426
+    if (field && sort) {
427
+      postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
428
+    }
429
+    this.loading1 = true;
430
+    this.mainService
431
+      .postCustom("itsm/report", "incidentPriorityQc", postData)
432
+      .subscribe((result) => {
433
+        this.loading1 = false;
434
+        this.listOfData = result.dataList.filter((v, i) => { return i != result.dataList.length - 1 });
435
+        this.listOfDataEnd = result.dataList.filter((v, i) => { return i == result.dataList.length - 1 });
436
+        this.listLength = result.totalCount;
437
+      });
438
+  }
439
+
440
+  // 列表排序
441
+  sortCurrent:any = {};
442
+  sortCurrentKey: string = "";
443
+  sortCurrentValue: string | null = "";
444
+  sort(e) {
445
+    const { key, value } = e;
446
+    this.sortCurrentKey = key;
447
+    this.sortCurrentValue = value;
448
+    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
449
+  }
450
+
451
+  // 搜索
452
+  search() {
453
+    this.getList(1, this.sortCurrentKey, this.sortCurrentValue);
454
+  }
455
+
456
+  // 日期选择
457
+  dateRange: any = [];
458
+
459
+  // 导出
460
+  excelExportLoading:any = false;
461
+  excelExport(){
462
+    this.excelExportLoading = this.message.loading("导出中..", {
463
+      nzDuration: 0,
464
+    }).messageId;
465
+    let postData:any = {
466
+      startDate: this.customChangeDateComponent.startDate || undefined,
467
+      endDate: this.customChangeDateComponent.endDate || undefined,
468
+      hosId: this.hosId || undefined,
469
+      dutyId: this.dutyId || undefined,
470
+      parentDutyId: this.parentDutyId || undefined,
471
+      buildingId: this.fieldConfig.fields.buildingId || undefined,
472
+      placeId: this.fieldConfig.fields.floorId || undefined,
473
+      groupId: this.fieldConfig.fields.groupId || undefined,
474
+      userId: this.fieldConfig.fields.userId || undefined,
475
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
476
+      companyId: this.fieldConfig.fields.companyId || undefined,
477
+    };
478
+    if (this.sortCurrentKey && this.sortCurrentValue) {
479
+      postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
480
+    }
481
+    this.mainService
482
+      .postExportCustom("itsm/export", "incidentPriorityQc", postData)
483
+      .subscribe((data) => {
484
+        this.message.remove(this.excelExportLoading);
485
+        this.excelExportLoading = false;
486
+        this.message.success('导出成功');
487
+        var file = new Blob([data], {
488
+          type: "application/vnd.ms-excel",
489
+        });
490
+        //trick to download store a file having its URL
491
+        var fileURL = URL.createObjectURL(file);
492
+        var a = document.createElement("a");
493
+        a.href = fileURL;
494
+        a.target = "_blank";
495
+        a.download = `${this.route.parent.routeConfig.data.title}.xls`;
496
+        document.body.appendChild(a);
497
+        a.click();
498
+      },(err) => {
499
+        this.message.remove(this.excelExportLoading);
500
+        this.excelExportLoading = false;
501
+        this.message.error('导出失败');
502
+      });
503
+  }
504
+  // 重置
505
+  reset(){
506
+    this.sortCurrentKey = "";
507
+		this.sortCurrentValue = "";
508
+		this.sortCurrent = {};
509
+    this.dateRange = []
510
+    this.fieldConfig.fields = {buildingId: undefined, floorId: undefined, groupId: undefined, userId: undefined, repairDeptId: undefined, companyId: undefined};
511
+    this.customChangeDateComponent.resetByDate();
512
+    setTimeout(_=>{
513
+    	this.search();
514
+    })
515
+  }
516
+
517
+  // 防抖
518
+  isLoading = false;
519
+
520
+  // 详细搜索
521
+  fieldConfig:any = {
522
+    fields: {buildingId: undefined, floorId: undefined, groupId: undefined, userId: undefined, repairDeptId: undefined, companyId: undefined},
523
+    config: {buildingAndFloor: true, groupAndUser: true, repairDept: true, company: true},
524
+  }
525
+  showSearchMore:boolean = false;
526
+  showMore(){
527
+    this.showSearchMore = true;
528
+  }
529
+
530
+  cancelEvent(){
531
+    this.showSearchMore = false;
532
+  }
533
+
534
+  submitEvent(fields){
535
+    this.showSearchMore = false;
536
+    this.fieldConfig.fields = fields;
537
+    console.log('this.fieldConfig.fields:', this.fieldConfig.fields)
538
+    this.search();
539
+    this.onResize();
540
+  }
541
+}

+ 23 - 0
src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics.module.ts

@@ -0,0 +1,23 @@
1
+import { PriorityQualityControlStatisticsComponent } from './priority-quality-control-statistics.component';
2
+import { NgModule } from '@angular/core';
3
+import { CommonModule } from '@angular/common';
4
+
5
+import { PriorityQualityControlStatisticsRoutingModule } from './priority-quality-control-statistics-routing.module';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+import { SearchMoreModule } from '../../components/search-more/search-more.module';
8
+import { CustomChangeDateModule } from '../../components/custom-change-date/custom-change-date.module';
9
+
10
+
11
+@NgModule({
12
+  declarations: [
13
+    PriorityQualityControlStatisticsComponent,
14
+  ],
15
+  imports: [
16
+    CommonModule,
17
+    PriorityQualityControlStatisticsRoutingModule,
18
+    ShareModule,
19
+    SearchMoreModule,
20
+    CustomChangeDateModule,
21
+  ]
22
+})
23
+export class PriorityQualityControlStatisticsModule { }

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

@@ -2,13 +2,24 @@
2
 	<div class="searchDataWrap">
2
 	<div class="searchDataWrap">
3
 		<div class="searchData">
3
 		<div class="searchData">
4
       <app-custom-change-date #customChangeDate [isShowType]="true" name="选择日期"></app-custom-change-date>
4
       <app-custom-change-date #customChangeDate [isShowType]="true" name="选择日期"></app-custom-change-date>
5
+      <div class="searchDataItem">
6
+        <span class="label">报修科室</span>:
7
+        <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
8
+          <ng-container *ngFor="let option of repairDeptList">
9
+            <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
10
+          </ng-container>
11
+          <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
12
+            <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
13
+          </nz-option>
14
+        </nz-select>
15
+      </div>
5
 		</div>
16
 		</div>
6
 		<div class="operation">
17
 		<div class="operation">
7
 			<button nz-button class="btn default" (click)="search()">搜索</button>
18
 			<button nz-button class="btn default" (click)="search()">搜索</button>
8
 			<button nz-button class="btn default ml8" (click)="reset()">重置</button>
19
 			<button nz-button class="btn default ml8" (click)="reset()">重置</button>
9
 		</div>
20
 		</div>
10
 	</div>
21
 	</div>
11
-  <ng-container *ngIf="!isLoading">
22
+  <ng-container *ngIf="!isLoading1">
12
     <div class="top1-statistics">
23
     <div class="top1-statistics">
13
       <div class="top-list">
24
       <div class="top-list">
14
         <div class="special-box cursor" (click)="viewDetail1()">
25
         <div class="special-box cursor" (click)="viewDetail1()">
@@ -169,6 +180,6 @@
169
     </div>
180
     </div>
170
   </ng-container>
181
   </ng-container>
171
 </div>
182
 </div>
172
-<div class="mask-style" *ngIf="isLoading">
183
+<div class="mask-style" *ngIf="isLoading1">
173
 	<nz-spin nzSimple class="spin-style"></nz-spin>
184
 	<nz-spin nzSimple class="spin-style"></nz-spin>
174
 </div>
185
 </div>

+ 3 - 0
src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.less

@@ -26,7 +26,10 @@
26
 			margin-bottom: 8px;
26
 			margin-bottom: 8px;
27
 		  .searchData{
27
 		  .searchData{
28
 		    padding: 16px;
28
 		    padding: 16px;
29
+        display: flex;
30
+        align-items: center;
29
 		    .searchDataItem{
31
 		    .searchDataItem{
32
+          margin-right: 24px;
30
 		      .label{
33
 		      .label{
31
 		        font-size: 16px;
34
 		        font-size: 16px;
32
 		      }
35
 		      }

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

@@ -3,6 +3,8 @@ import { Component, OnInit, ViewChild, AfterViewInit } from "@angular/core";
3
 import { MainService } from 'src/app/services/main.service';
3
 import { MainService } from 'src/app/services/main.service';
4
 import { TabService } from '../../services/tab.service';
4
 import { TabService } from '../../services/tab.service';
5
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
5
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
6
+import { debounceTime } from 'rxjs/operators';
7
+import { Subject } from 'rxjs';
6
 @Component({
8
 @Component({
7
   selector: "app-synthesize-statistics",
9
   selector: "app-synthesize-statistics",
8
   templateUrl: "./synthesize-statistics.component.html",
10
   templateUrl: "./synthesize-statistics.component.html",
@@ -16,7 +18,7 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
16
     public router: Router,
18
     public router: Router,
17
   ) {}
19
   ) {}
18
 
20
 
19
-	isLoading:Boolean = false;
21
+	isLoading1:Boolean = false;
20
 	workData:any = []; //工单统计
22
 	workData:any = []; //工单统计
21
   listOfData: any[] = []; //表格数据
23
   listOfData: any[] = []; //表格数据
22
   pageIndex: number = 1; //表格当前页码
24
   pageIndex: number = 1; //表格当前页码
@@ -62,7 +64,14 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
62
 		}
64
 		}
63
 	] //报修耗材
65
 	] //报修耗材
64
 
66
 
65
-  ngOnInit() {}
67
+  searchTimerSubject = new Subject();
68
+
69
+  ngOnInit() {
70
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
71
+      let fun = v[0];
72
+      fun.call(this, v[1]);
73
+    });
74
+  }
66
 
75
 
67
   ngAfterViewInit(){
76
   ngAfterViewInit(){
68
     setTimeout(() => {
77
     setTimeout(() => {
@@ -70,12 +79,54 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
70
     }, 0)
79
     }, 0)
71
   }
80
   }
72
 
81
 
82
+  get getHosId(){
83
+    return this.parentDutyId || this.dutyId || this.hosId;
84
+  }
85
+
86
+  // 科室搜索
87
+  changeRepairDeptInp(e) {
88
+    this.searchTimer(this.getRepairDeptList, e);
89
+  }
90
+
91
+  // 防抖
92
+  isLoading = false;
93
+  searchTimer(fun, e) {
94
+    this.isLoading = true;
95
+    this.searchTimerSubject.next([fun, e]);
96
+  }
97
+
98
+  openChangeRepairDept(flag){
99
+    flag && this.getRepairDeptList();
100
+  }
101
+
102
+  // 获取报修科室列表
103
+  repairDeptId;//报修科室id
104
+  repairDeptList:any[] = [];
105
+  getRepairDeptList(keyword?) {
106
+    let data = {
107
+      department: {
108
+        statisticalHosId: this.getHosId,
109
+        dept: keyword,
110
+        searchType: 1,
111
+      },
112
+      idx: 0,
113
+      sum: 20,
114
+    };
115
+    this.isLoading = true;
116
+    this.mainService
117
+      .getFetchDataList("data", "department", data)
118
+      .subscribe((data) => {
119
+        this.isLoading = false;
120
+        this.repairDeptList = data.list;
121
+      });
122
+  }
123
+
73
 	/*========= 数据下钻 ========*/
124
 	/*========= 数据下钻 ========*/
74
 
125
 
75
 	// 汇总
126
 	// 汇总
76
 	viewDetail1(){
127
 	viewDetail1(){
77
 		let query = {
128
 		let query = {
78
-
129
+      repairDeptId: this.repairDeptId,
79
 		}
130
 		}
80
 		let path = '/newStatistics/maintenanceStatistics/incidentList'
131
 		let path = '/newStatistics/maintenanceStatistics/incidentList'
81
 		let flag = this.tabService.tabs.some(v => v.path === path);
132
 		let flag = this.tabService.tabs.some(v => v.path === path);
@@ -92,6 +143,7 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
92
 		let query = {
143
 		let query = {
93
 			startDate: this.customChangeDateComponent.startDate,
144
 			startDate: this.customChangeDateComponent.startDate,
94
 			endDate: this.customChangeDateComponent.endDate,
145
 			endDate: this.customChangeDateComponent.endDate,
146
+      repairDeptId: this.repairDeptId,
95
 			searchQuery:{
147
 			searchQuery:{
96
 				isHangId: 1,
148
 				isHangId: 1,
97
 				isHangDTO:{
149
 				isHangDTO:{
@@ -114,6 +166,7 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
114
 		let query = {
166
 		let query = {
115
 			startDate: this.customChangeDateComponent.startDate,
167
 			startDate: this.customChangeDateComponent.startDate,
116
 			endDate: this.customChangeDateComponent.endDate,
168
 			endDate: this.customChangeDateComponent.endDate,
169
+      repairDeptId: this.repairDeptId,
117
 			searchQuery:{
170
 			searchQuery:{
118
 				overtimeId: 1,
171
 				overtimeId: 1,
119
 				overtimeDTO:{
172
 				overtimeDTO:{
@@ -136,6 +189,7 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
136
 		let query = {
189
 		let query = {
137
 			startDate: this.customChangeDateComponent.startDate,
190
 			startDate: this.customChangeDateComponent.startDate,
138
 			endDate: this.customChangeDateComponent.endDate,
191
 			endDate: this.customChangeDateComponent.endDate,
192
+      repairDeptId: this.repairDeptId,
139
 			searchQuery:{
193
 			searchQuery:{
140
 				evaluateId: 20424,
194
 				evaluateId: 20424,
141
 				evaluateDTO: {
195
 				evaluateDTO: {
@@ -163,12 +217,13 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
163
 		let query = {
217
 		let query = {
164
 			startDate: this.customChangeDateComponent.startDate,
218
 			startDate: this.customChangeDateComponent.startDate,
165
 			endDate: this.customChangeDateComponent.endDate,
219
 			endDate: this.customChangeDateComponent.endDate,
220
+      repairDeptId: this.repairDeptId,
166
 			searchQuery:{
221
 			searchQuery:{
167
 				statusValue: 'close',
222
 				statusValue: 'close',
168
 				groupId:null,
223
 				groupId:null,
169
 				groupDTO:null,
224
 				groupDTO:null,
170
 				userId:null,
225
 				userId:null,
171
-				userDTO:null
226
+				userDTO:null,
172
 			}
227
 			}
173
 		}
228
 		}
174
 		if(this.activeIndex==0){
229
 		if(this.activeIndex==0){
@@ -201,6 +256,7 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
201
 		let query = {
256
 		let query = {
202
 			startDate: this.customChangeDateComponent.startDate,
257
 			startDate: this.customChangeDateComponent.startDate,
203
 			endDate: this.customChangeDateComponent.endDate,
258
 			endDate: this.customChangeDateComponent.endDate,
259
+      repairDeptId: this.repairDeptId,
204
 			searchQuery:{
260
 			searchQuery:{
205
 				statusValue: 'close',
261
 				statusValue: 'close',
206
 				groupId:null,
262
 				groupId:null,
@@ -275,6 +331,7 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
275
 		  hosId: this.hosId,
331
 		  hosId: this.hosId,
276
 		  dutyId: this.dutyId,
332
 		  dutyId: this.dutyId,
277
 		  parentDutyId: this.parentDutyId,
333
 		  parentDutyId: this.parentDutyId,
334
+		  repairDeptId: this.repairDeptId || undefined,
278
 		};
335
 		};
279
 		this.mainService
336
 		this.mainService
280
 		  .getReportData(postData)
337
 		  .getReportData(postData)
@@ -351,6 +408,7 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
351
 		  hosId: this.hosId,
408
 		  hosId: this.hosId,
352
 		  dutyId: this.dutyId,
409
 		  dutyId: this.dutyId,
353
 		  parentDutyId: this.parentDutyId,
410
 		  parentDutyId: this.parentDutyId,
411
+      repairDeptId: this.repairDeptId || undefined,
354
 		};
412
 		};
355
 		this.mainService
413
 		this.mainService
356
 		  .getReportData(postData)
414
 		  .getReportData(postData)
@@ -429,6 +487,7 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
429
 		  hosId: this.hosId,
487
 		  hosId: this.hosId,
430
 		  dutyId: this.dutyId,
488
 		  dutyId: this.dutyId,
431
 		  parentDutyId: this.parentDutyId,
489
 		  parentDutyId: this.parentDutyId,
490
+      repairDeptId: this.repairDeptId || undefined,
432
 		};
491
 		};
433
 		this.mainService
492
 		this.mainService
434
 		  .getReportData(postData)
493
 		  .getReportData(postData)
@@ -507,6 +566,7 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
507
 	    hosId: this.hosId,
566
 	    hosId: this.hosId,
508
 	    dutyId: this.dutyId,
567
 	    dutyId: this.dutyId,
509
 	    parentDutyId: this.parentDutyId,
568
 	    parentDutyId: this.parentDutyId,
569
+      repairDeptId: this.repairDeptId || undefined,
510
 	  };
570
 	  };
511
 	  this.mainService
571
 	  this.mainService
512
 	    .getReportData(postData)
572
 	    .getReportData(postData)
@@ -524,11 +584,12 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
524
 	    hosId: this.hosId,
584
 	    hosId: this.hosId,
525
 	    dutyId: this.dutyId,
585
 	    dutyId: this.dutyId,
526
 	    parentDutyId: this.parentDutyId,
586
 	    parentDutyId: this.parentDutyId,
587
+      repairDeptId: this.repairDeptId || undefined,
527
 	  };
588
 	  };
528
 	  this.mainService
589
 	  this.mainService
529
 	    .getReportData(postData)
590
 	    .getReportData(postData)
530
 	    .subscribe((result:any) => {
591
 	    .subscribe((result:any) => {
531
-				this.isLoading = false;
592
+				this.isLoading1 = false;
532
 	      this.consumableData = result.data || [];
593
 	      this.consumableData = result.data || [];
533
 	    });
594
 	    });
534
 	}
595
 	}
@@ -553,11 +614,13 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
553
   hosId:any;
614
   hosId:any;
554
   dutyId:any;
615
   dutyId:any;
555
   parentDutyId:any;
616
   parentDutyId:any;
617
+  currentDeptDTO:any;
556
   initSessionData(){
618
   initSessionData(){
557
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
619
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
558
     let queryType:any = newStatistics.queryType;
620
     let queryType:any = newStatistics.queryType;
559
     let hosId:any = newStatistics.hospitalId;
621
     let hosId:any = newStatistics.hospitalId;
560
     let dutyId:any = newStatistics.dutyId;
622
     let dutyId:any = newStatistics.dutyId;
623
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
561
 
624
 
562
     queryType = queryType ? +queryType : undefined;
625
     queryType = queryType ? +queryType : undefined;
563
     hosId = hosId ? +hosId : undefined;
626
     hosId = hosId ? +hosId : undefined;
@@ -580,9 +643,13 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
580
       this.hosId = undefined;
643
       this.hosId = undefined;
581
       this.dutyId = undefined;
644
       this.dutyId = undefined;
582
       this.parentDutyId = dutyId;
645
       this.parentDutyId = dutyId;
646
+    }else if(queryType == 5){
647
+      this.hosId = undefined;
648
+      this.dutyId = undefined;
649
+      this.parentDutyId = dutyId;
583
     }
650
     }
584
 
651
 
585
-		this.isLoading = true
652
+		this.isLoading1 = true
586
 		this.getWorkData();
653
 		this.getWorkData();
587
 		this.getMaintainData();
654
 		this.getMaintainData();
588
 		this.repairsChart();
655
 		this.repairsChart();
@@ -626,6 +693,7 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
626
 	    hosId: this.hosId,
693
 	    hosId: this.hosId,
627
 	    dutyId: this.dutyId,
694
 	    dutyId: this.dutyId,
628
 	    parentDutyId: this.parentDutyId,
695
 	    parentDutyId: this.parentDutyId,
696
+      repairDeptId: this.repairDeptId || undefined,
629
 	  };
697
 	  };
630
 	  this.mainService
698
 	  this.mainService
631
 	    .getReportData(postData)
699
 	    .getReportData(postData)
@@ -644,6 +712,7 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
644
 	    hosId: this.hosId,
712
 	    hosId: this.hosId,
645
 	    dutyId: this.dutyId,
713
 	    dutyId: this.dutyId,
646
 	    parentDutyId: this.parentDutyId,
714
 	    parentDutyId: this.parentDutyId,
715
+      repairDeptId: this.repairDeptId || undefined,
647
 	  };
716
 	  };
648
 	  this.mainService
717
 	  this.mainService
649
 	    .getReportData(postData)
718
 	    .getReportData(postData)
@@ -654,6 +723,7 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
654
 
723
 
655
 	// 重置
724
 	// 重置
656
 	reset(){
725
 	reset(){
726
+    this.repairDeptId = undefined;
657
 		this.dateRange = [];
727
 		this.dateRange = [];
658
 		this.activeIndex = 0;
728
 		this.activeIndex = 0;
659
     this.customChangeDateComponent.resetByDate();
729
     this.customChangeDateComponent.resetByDate();

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

@@ -13,4 +13,4 @@
13
 <router-outlet></router-outlet>
13
 <router-outlet></router-outlet>
14
 
14
 
15
 <!-- 查询范围 -->
15
 <!-- 查询范围 -->
16
-<app-query-range [sign]="sign" [hospital]="hospital" [duty]="duty" [queryType]="queryType" [parent]="parent" [defaultDate]="defaultDate" (cancelQueryRange)="cancelQueryRange()" (submitQueryRange)="submitQueryRange($event)" *ngIf="queryRangeFlag"></app-query-range>
16
+<app-query-range [sign]="sign" [hospital]="hospital" [duty]="duty" [queryType]="queryType" [realQueryType]="realQueryType" [parent]="parent" [defaultDate]="defaultDate" [currentDeptDTO]="currentDeptDTO" (cancelQueryRange)="cancelQueryRange()" (submitQueryRange)="submitQueryRange($event)" *ngIf="queryRangeFlag"></app-query-range>

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

@@ -44,8 +44,10 @@ export class NewStatisticsComponent implements OnInit, OnDestroy {
44
   hospital;
44
   hospital;
45
   duty;
45
   duty;
46
   queryType;//查询范围
46
   queryType;//查询范围
47
+  realQueryType;//queryType=5的时候,查询范围
47
 	parent:any = 0;
48
 	parent:any = 0;
48
 	defaultDate:any = [];
49
 	defaultDate:any = [];
50
+	currentDeptDTO;
49
   // 初始化院区、部门显示
51
   // 初始化院区、部门显示
50
   initHospitalAndDuty(hospitalOrDuty){
52
   initHospitalAndDuty(hospitalOrDuty){
51
     let sessionData = JSON.parse(sessionStorage.getItem('newStatistics'));
53
     let sessionData = JSON.parse(sessionStorage.getItem('newStatistics'));
@@ -54,8 +56,10 @@ export class NewStatisticsComponent implements OnInit, OnDestroy {
54
       this.hospital = sessionData.hospital;
56
       this.hospital = sessionData.hospital;
55
       this.duty = sessionData.duty;
57
       this.duty = sessionData.duty;
56
       this.queryType = sessionData.queryType;
58
       this.queryType = sessionData.queryType;
59
+      this.realQueryType = sessionData.realQueryType;
57
 			this.parent = sessionData.parent;
60
 			this.parent = sessionData.parent;
58
 			this.defaultDate = sessionData.defaultDate;
61
 			this.defaultDate = sessionData.defaultDate;
62
+			this.currentDeptDTO = sessionData.currentDeptDTO;
59
       return;
63
       return;
60
     }
64
     }
61
 
65
 
@@ -85,6 +89,20 @@ export class NewStatisticsComponent implements OnInit, OnDestroy {
85
     if(this.sign === 'nurse'){
89
     if(this.sign === 'nurse'){
86
       // 护士端跳转到统计
90
       // 护士端跳转到统计
87
       this.queryType = 5;
91
       this.queryType = 5;
92
+      this.currentDeptDTO = this.tool.getCurrentUserDept();
93
+      if(this.hospital){
94
+        if(this.duty){
95
+          if(this.duty.parentDeptId){
96
+            this.realQueryType = 3;
97
+          }else{
98
+            this.realQueryType = 4;
99
+          }
100
+        }else{
101
+          this.realQueryType = 2;
102
+        }
103
+      }else{
104
+        this.realQueryType = 1;
105
+      }
88
     }else{
106
     }else{
89
       if(this.hospital){
107
       if(this.hospital){
90
         if(this.duty){
108
         if(this.duty){
@@ -107,7 +125,7 @@ export class NewStatisticsComponent implements OnInit, OnDestroy {
107
 
125
 
108
   // 缓存数据
126
   // 缓存数据
109
   sessionSave(){
127
   sessionSave(){
110
-    sessionStorage.setItem('newStatistics', JSON.stringify({queryType: this.queryType, hospitalId: this.hospital ? this.hospital.id : undefined, dutyId: this.duty ? this.duty.id : undefined, hospital: this.hospital, duty: this.duty, parent: this.parent, defaultDate: this.defaultDate}));
128
+    sessionStorage.setItem('newStatistics', JSON.stringify({queryType: this.queryType, realQueryType: this.realQueryType, hospitalId: this.hospital ? this.hospital.id : undefined, dutyId: this.duty ? this.duty.id : undefined, hospital: this.hospital, duty: this.duty, parent: this.parent, defaultDate: this.defaultDate, currentDeptDTO: this.currentDeptDTO}));
111
   }
129
   }
112
 
130
 
113
   // 查询范围
131
   // 查询范围
@@ -115,16 +133,20 @@ export class NewStatisticsComponent implements OnInit, OnDestroy {
115
   queryRangeClick(){
133
   queryRangeClick(){
116
     this.queryRangeFlag = true;
134
     this.queryRangeFlag = true;
117
   }
135
   }
118
-  submitQueryRange({queryType, hospital, duty, parent, defaultDate}) {
136
+  submitQueryRange({queryType, hospital, duty, parent, defaultDate, currentDeptDTO, realQueryType}) {
119
     console.log('queryType:', queryType)
137
     console.log('queryType:', queryType)
138
+    console.log('realQueryType:', realQueryType)
120
     console.log('hospital:', hospital)
139
     console.log('hospital:', hospital)
121
     console.log('duty:', duty)
140
     console.log('duty:', duty)
122
     console.log('defaultDate:', defaultDate)
141
     console.log('defaultDate:', defaultDate)
142
+    console.log('currentDeptDTO:', currentDeptDTO)
123
     this.queryType = queryType;
143
     this.queryType = queryType;
144
+    this.realQueryType = realQueryType;
124
     this.hospital = hospital;
145
     this.hospital = hospital;
125
     this.duty = duty;
146
     this.duty = duty;
126
 		this.parent = parent;
147
 		this.parent = parent;
127
 		this.defaultDate = defaultDate;
148
 		this.defaultDate = defaultDate;
149
+		this.currentDeptDTO = currentDeptDTO;
128
     this.queryRangeFlag = false;
150
     this.queryRangeFlag = false;
129
 
151
 
130
     this.sessionSave();
152
     this.sessionSave();