maotao před 2 týdny
rodič
revize
c7c903e007
21 změnil soubory, kde provedl 997 přidání a 198 odebrání
  1. 105 0
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.html
  2. 6 3
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.less
  3. 156 4
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.ts
  4. 87 2
      src/app/views/new-statistics/components/search-more/search-more.component.html
  5. 2 2
      src/app/views/new-statistics/components/search-more/search-more.component.less
  6. 187 5
      src/app/views/new-statistics/components/search-more/search-more.component.ts
  7. 1 1
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-inspection-statistics.component.less
  8. 11 2
      src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list-routing.module.ts
  9. 69 55
      src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.html
  10. 13 0
      src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.less
  11. 74 62
      src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.ts
  12. 3 4
      src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.module.ts
  13. 57 26
      src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.html
  14. 5 0
      src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.less
  15. 107 22
      src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.ts
  16. 2 1
      src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.module.ts
  17. 1 1
      src/app/views/new-statistics/maintenance-statistics/maintenance-statistics.component.less
  18. 7 7
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.html
  19. 1 0
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.less
  20. 101 1
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.ts
  21. 2 0
      src/app/views/new-statistics/new-statistics.component.ts

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

@@ -101,6 +101,111 @@
101 101
             </nz-select>
102 102
           </nz-form-control>
103 103
         </nz-form-item>
104
+				
105
+				<nz-form-item [hidden]="!fieldConfig.config.source">
106
+				  <nz-form-label [nzSpan]="6" nzFor="sourceId">来<span style="visibility: hidden;">囧囧</span>源</nz-form-label>
107
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择来源!">
108
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="sourceId" nzPlaceHolder="请选择来源">
109
+				      <ng-container *ngFor="let option of sourceList">
110
+				        <nz-option [nzLabel]="option.name " [nzValue]="option.name"></nz-option>
111
+				      </ng-container>
112
+				    </nz-select>
113
+				  </nz-form-control>
114
+				</nz-form-item>
115
+				
116
+				<nz-form-item [hidden]="!fieldConfig.config.minute">
117
+				  <nz-form-label [nzSpan]="7" nzFor="minuteClose">分钟内关单</nz-form-label>
118
+				  <nz-form-control [nzSpan]="17" nzErrorTip="请输入分钟内关单!">
119
+						<nz-input-number
120
+							class="width-200"
121
+							formControlName="minuteClose"
122
+						 	[nzMin]="0"
123
+							[nzPrecision]="0"
124
+						 	[nzMax]="999999"
125
+						 	[nzStep]="1"
126
+						 	[nzPlaceHolder]="'请输入分钟内关单'"
127
+						 ></nz-input-number>
128
+					</nz-form-control>
129
+				</nz-form-item>
130
+				
131
+				<nz-form-item [hidden]="!fieldConfig.config.special">
132
+				  <nz-form-label [nzSpan]="8" nzFor="specialId">特殊情况关闭</nz-form-label>
133
+				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择特殊情况关闭!">
134
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="specialId" nzPlaceHolder="请选择特殊情况关闭">
135
+				      <ng-container *ngFor="let option of specialList">
136
+				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
137
+				      </ng-container>
138
+				    </nz-select>
139
+				  </nz-form-control>
140
+				</nz-form-item>
141
+				
142
+				<nz-form-item [hidden]="!fieldConfig.config.overtime">
143
+				  <nz-form-label [nzSpan]="6" nzFor="overtimeId">超时工单</nz-form-label>
144
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择超时工单!">
145
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="overtimeId" nzPlaceHolder="请选择超时工单">
146
+				      <ng-container *ngFor="let option of overtimeList">
147
+				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
148
+				      </ng-container>
149
+				    </nz-select>
150
+				  </nz-form-control>
151
+				</nz-form-item>
152
+				
153
+				<nz-form-item [hidden]="!fieldConfig.config.abnormal">
154
+				  <nz-form-label [nzSpan]="6" nzFor="abnormalId">异常工单</nz-form-label>
155
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择异常工单!">
156
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="abnormalId" nzPlaceHolder="请选择异常工单">
157
+				      <ng-container *ngFor="let option of abnormalList">
158
+				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
159
+				      </ng-container>
160
+				    </nz-select>
161
+				  </nz-form-control>
162
+				</nz-form-item>
163
+				
164
+				<nz-form-item [hidden]="!fieldConfig.config.evaluate">
165
+				  <nz-form-label [nzSpan]="6" nzFor="evaluateId">评<span style="visibility: hidden;">囧囧</span>价</nz-form-label>
166
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择评价!">
167
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="evaluateId" nzPlaceHolder="请选择评价">
168
+				      <ng-container *ngFor="let option of evaluateList">
169
+				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
170
+				      </ng-container>
171
+				      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
172
+				        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
173
+				      </nz-option>
174
+				    </nz-select>
175
+				  </nz-form-control>
176
+				</nz-form-item>
177
+				
178
+				<nz-form-item [hidden]="!fieldConfig.config.executeUser">
179
+				  <nz-form-label [nzSpan]="6" nzFor="executeUserId">执行人</nz-form-label>
180
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择人员!">
181
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeExecuteUserInp($event)" formControlName="executeUserId" nzPlaceHolder="请选择人员" (nzOpenChange)="openChangeExecuteUser($event)" (ngModelChange)="setIsSelecting(true)">
182
+				      <ng-container *ngFor="let option of executeUserList">
183
+				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
184
+				      </ng-container>
185
+				      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
186
+				        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
187
+				      </nz-option>
188
+				    </nz-select>
189
+				  </nz-form-control>
190
+				</nz-form-item>
191
+				
192
+				<nz-form-item [hidden]="!fieldConfig.config.timeFrame">
193
+				  <nz-form-label [nzSpan]="6" nzFor="timeFrameId">时<span style="visibility: hidden;">囧囧</span>段</nz-form-label>
194
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择人员!">
195
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzShowSearch formControlName="timeFrameId" nzPlaceHolder="请选择时段">
196
+				      <ng-container *ngFor="let option of timeFrameList">
197
+				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
198
+				      </ng-container>
199
+				    </nz-select>
200
+				  </nz-form-control>
201
+				</nz-form-item>
202
+				
203
+				<nz-form-item [hidden]="!fieldConfig.config.code">
204
+				  <nz-form-label [nzSpan]="6" nzFor="codeNum">单<span style="visibility: hidden;">囧囧</span>号</nz-form-label>
205
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请输入单号!">
206
+				    <input class="width-200" type="text" placeHolder="请输入单号" nz-input formControlName="codeNum" />
207
+				  </nz-form-control>
208
+				</nz-form-item>
104 209
       </form>
105 210
     </div>
106 211
     <div class="display_flex justify-content_flex-center">

+ 6 - 3
src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.less

@@ -34,7 +34,7 @@
34 34
 
35 35
     .content {
36 36
       width: 100%;
37
-      height: 117px;
37
+      // height: 117px;
38 38
       background: #f9fafb;
39 39
       border: 1px solid #e5e9ed;
40 40
       border-radius: 5px;
@@ -88,8 +88,8 @@
88 88
       .content {
89 89
         width: 100%;
90 90
         padding: 10px 24px 0;
91
-        height: auto;
92
-        overflow-y: auto;
91
+				 max-height: calc(100vh - 120px);
92
+				 overflow-y: auto;
93 93
 
94 94
         .addForm {
95 95
           .ant-form-item {
@@ -103,6 +103,9 @@
103 103
             .ant-radio-wrapper{
104 104
               margin-right: 0;
105 105
             }
106
+						.ant-input-number{
107
+							width: 100%;
108
+						}
106 109
           }
107 110
         }
108 111
       }

+ 156 - 4
src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.ts

@@ -26,7 +26,20 @@ export class DistributionSearchMoreComponent implements OnInit {
26 26
     private tool: ToolService,
27 27
     private mainService: MainService,
28 28
   ) { }
29
-
29
+	
30
+	minuteClose:any;
31
+	specialList:any = [
32
+		{name:'是',id:1},
33
+		{name:'否',id:0}
34
+	]
35
+	overtimeList:any = [
36
+		{name:'是',id:1},
37
+		{name:'否',id:0}
38
+	]
39
+	abnormalList:any = [
40
+		{name:'是',id:1},
41
+		{name:'否',id:0}
42
+	]
30 43
   ngOnInit() {
31 44
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
32 45
       let fun = v[0];
@@ -34,6 +47,9 @@ export class DistributionSearchMoreComponent implements OnInit {
34 47
     });
35 48
     this.initForm();
36 49
     this.getSourceList();
50
+		this.getSourceDataList();
51
+		this.getWorkHourEvaluateList();
52
+		this.getTimeFrameList();
37 53
   }
38 54
   // 隐藏模态框
39 55
   hideModal() {
@@ -47,15 +63,31 @@ export class DistributionSearchMoreComponent implements OnInit {
47 63
     this.buildingList = this.fieldConfig.fields.buildingDTO ? [this.fieldConfig.fields.buildingDTO] : [];
48 64
     this.taskTypeList = this.fieldConfig.fields.taskTypeDTO ? [this.fieldConfig.fields.taskTypeDTO] : [];
49 65
     this.deptList = this.fieldConfig.fields.deptDTO ? [this.fieldConfig.fields.deptDTO] : [];
50
-
51
-    this.validateForm = this.fb.group({
66
+		this.sourceList = this.fieldConfig.fields.sourceDTO ? [this.fieldConfig.fields.sourceDTO] : [];
67
+		this.specialList = [{name:'是',id:1},{name:'否',id:0}];
68
+		this.overtimeList = [{name:'是',id:1},{name:'否',id:0}];
69
+		this.abnormalList = [{name:'是',id:1},{name:'否',id:0}];
70
+		this.evaluateList = this.fieldConfig.fields.evaluateDTO ? [this.fieldConfig.fields.evaluateDTO] : [];
71
+		this.executeUserList =  this.fieldConfig.fields.executeUserDTO ? [this.fieldConfig.fields.executeUserDTO] : [];
72
+		this.timeFrameList = this.fieldConfig.fields.timeFrameDTO ? [this.fieldConfig.fields.timeFrameDTO] : [];
73
+		
74
+		this.validateForm = this.fb.group({
52 75
       groupId: [this.fieldConfig.fields.groupId || null],
53 76
       userId: [this.fieldConfig.fields.userId === undefined ? null : this.fieldConfig.fields.userId],
54 77
       statisticsTypeId: [this.fieldConfig.fields.statisticsTypeId || null],
55 78
       buildingId: [this.fieldConfig.fields.buildingId || null],
56 79
       taskTypeId: [this.fieldConfig.fields.taskTypeDTO ? this.fieldConfig.fields.taskTypeDTO.id  : null],
57 80
       deptId: [this.fieldConfig.fields.deptDTO ? this.fieldConfig.fields.deptDTO.id  : null],
58
-    });
81
+			sourceId: [this.fieldConfig.fields.sourceId || null],
82
+			minuteClose: [this.fieldConfig.fields.minuteClose || null],
83
+			specialId: [this.fieldConfig.fields.specialDTO ? this.fieldConfig.fields.specialDTO.id  : null],
84
+			overtimeId: [this.fieldConfig.fields.overtimeDTO ? this.fieldConfig.fields.overtimeDTO.id  : null],
85
+			abnormalId: [this.fieldConfig.fields.abnormalDTO ? this.fieldConfig.fields.abnormalDTO.id  : null],
86
+			evaluateId: [this.fieldConfig.fields.evaluateId || null],
87
+			executeUserId: [this.fieldConfig.fields.executeUserId || null],
88
+			codeNum: [this.fieldConfig.fields.codeNum || null],
89
+			timeFrameId: [this.fieldConfig.fields.timeFrameDTO ? this.fieldConfig.fields.timeFrameDTO.id  : null],
90
+		});
59 91
   }
60 92
   // 表单提交
61 93
   submitForm(): void {
@@ -94,6 +126,43 @@ export class DistributionSearchMoreComponent implements OnInit {
94 126
       fields.deptId = this.validateForm.value.deptId;
95 127
       fields.deptDTO = this.deptList.find(item => item.id == this.validateForm.value.deptId);
96 128
     }
129
+		if(this.fieldConfig.config.source){
130
+		  fields.sourceId = this.validateForm.value.sourceId;
131
+		  fields.sourceDTO = this.sourceList.find(item => item.name == this.validateForm.value.sourceId);
132
+		}
133
+		if(this.fieldConfig.config.minute){
134
+		  fields.minuteClose = this.validateForm.value.minuteClose;
135
+		  fields.minuteDTO = this.validateForm.value.minuteClose;
136
+		}
137
+		if(this.fieldConfig.config.special){
138
+		  fields.specialId = this.validateForm.value.specialId;
139
+		  fields.specialDTO = this.specialList.find(item => item.id == this.validateForm.value.specialId);
140
+		}
141
+		if(this.fieldConfig.config.overtime){
142
+		  fields.overtimeId = this.validateForm.value.overtimeId;
143
+		  fields.overtimeDTO = this.overtimeList.find(item => item.id == this.validateForm.value.overtimeId);
144
+		}
145
+		if(this.fieldConfig.config.abnormal){
146
+		  fields.abnormalId = this.validateForm.value.abnormalId;
147
+		  fields.abnormalDTO = this.abnormalList.find(item => item.id == this.validateForm.value.abnormalId);
148
+		}
149
+		if(this.fieldConfig.config.evaluate){
150
+		  fields.evaluateId = this.validateForm.value.evaluateId;
151
+		  fields.evaluateDTO = this.evaluateList.find(item => item.id == this.validateForm.value.evaluateId);
152
+		}
153
+		if(this.fieldConfig.config.executeUser){
154
+		  fields.executeUserId = this.validateForm.value.executeUserId;
155
+		  fields.executeUserDTO = this.executeUserList.find(item => item.id == this.validateForm.value.executeUserId);
156
+		}
157
+		if(this.fieldConfig.config.code){
158
+			fields.codeNum = this.validateForm.value.codeNum;
159
+			fields.codeNumDTO = this.validateForm.value.codeNum;
160
+		}
161
+		if(this.fieldConfig.config.timeFrame){
162
+		  fields.timeFrameId = this.validateForm.value.timeFrameId;
163
+		  fields.timeFrameDTO = this.timeFrameList.find(item => item.id == this.validateForm.value.timeFrameId);
164
+		}
165
+		
97 166
     this.submitEvent.emit(fields);
98 167
     this.hideModal();
99 168
   }
@@ -310,4 +379,87 @@ export class DistributionSearchMoreComponent implements OnInit {
310 379
     flag && this.setIsSelecting(false);
311 380
     flag && this.getRepairDeptList();
312 381
   }
382
+	
383
+	// =================来源===================
384
+	
385
+	// 获取来源列表
386
+	sourceList:any[] = [];
387
+	getSourceDataList(keyword?){
388
+	  let postData:any = {
389
+	    idx: 0,
390
+	    sum: 9999,
391
+	    hosId: this.getHosId,
392
+	  };
393
+
394
+	  this.isLoading = true;
395
+	  this.mainService
396
+	    .postCustom("itsm/report", "sourceTransOrder", postData)
397
+	    .subscribe((result) => {
398
+	      this.isLoading = false;
399
+	      this.sourceList = result.dataList;
400
+	    });
401
+	}
402
+	
403
+	// =================评价===================
404
+	
405
+	// 获取评价列表 
406
+	evaluateList:any[] = [];
407
+	getWorkHourEvaluateList(){
408
+		this.isLoading = true;
409
+		this.mainService
410
+		  .getDictionary("list", "workorderEvaluation")
411
+		  .subscribe((data) => {
412
+		    this.isLoading = false;
413
+		    this.evaluateList = data;
414
+		  });
415
+	}
416
+	
417
+	// =================执行人===================
418
+	
419
+	// 执行人搜索
420
+	changeExecuteUserInp(e) {
421
+	  this.searchTimer(this.getExecuteUserList, e);
422
+	}
423
+	
424
+	// 获取执行人列表
425
+	executeUserList:any[] = [];
426
+	getExecuteUserList(keyword?){
427
+	  let postData = {
428
+	    user: {
429
+	      name: keyword,
430
+	      hospital: { id: this.getHosId },
431
+	      usertype: { id: 106 }, //配送人员
432
+	    },
433
+	    idx: 0,
434
+	    sum: 20,
435
+	  };
436
+	  this.isLoading = true;
437
+	  this.mainService
438
+	    .getFetchDataList("data", "user", postData)
439
+	    .subscribe((data) => {
440
+				this.isLoading = false;
441
+				if(data.status == 200){
442
+				  this.executeUserList = data.list || [];
443
+				}else{
444
+				  this.executeUserList = [];
445
+				}
446
+	    });
447
+	}
448
+	openChangeExecuteUser(flag){
449
+	  flag && this.setIsSelecting(false);
450
+	  flag && this.getExecuteUserList();
451
+	}
452
+	
453
+	// =================时段===================
454
+	
455
+	// 获取时段列表
456
+	timeFrameList:any[] = [];
457
+	getTimeFrameList(){
458
+	  for(let i=0; i<24; i++){
459
+			this.timeFrameList.push({
460
+				name: i,
461
+				id: i
462
+			})
463
+		}
464
+	}
313 465
 }

+ 87 - 2
src/app/views/new-statistics/components/search-more/search-more.component.html

@@ -17,7 +17,21 @@
17 17
             </nz-select>
18 18
           </nz-form-control>
19 19
         </nz-form-item>
20
-
20
+				
21
+				<nz-form-item [hidden]="!fieldConfig.config.workHourSmall">
22
+				  <nz-form-label [nzSpan]="6" nzFor="workHourSmallId">工时小类</nz-form-label>
23
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择工时小类!">
24
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeWorkHourSmallInp($event)" formControlName="workHourSmallId" nzPlaceHolder="请选择工时小类" (nzOpenChange)="openChangeWorkHourSmall($event)" (ngModelChange)="setIsSelecting(true)">
25
+				      <ng-container *ngFor="let option of workHourSmallList">
26
+				        <nz-option *ngIf="!isLoading" [nzLabel]="option.workName" [nzValue]="option.id"></nz-option>
27
+				      </ng-container>
28
+				      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
29
+				        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
30
+				      </nz-option>
31
+				    </nz-select>
32
+				  </nz-form-control>
33
+				</nz-form-item>
34
+				
21 35
         <nz-form-item [hidden]="!fieldConfig.config.group">
22 36
           <nz-form-label [nzSpan]="6" nzFor="groupId">维修分组</nz-form-label>
23 37
           <nz-form-control [nzSpan]="18" nzErrorTip="请选择维修分组!">
@@ -171,7 +185,21 @@
171 185
             </nz-select>
172 186
           </nz-form-control>
173 187
         </nz-form-item>
174
-
188
+				
189
+				<nz-form-item [hidden]="!fieldConfig.config.repairUser">
190
+				  <nz-form-label [nzSpan]="6" nzFor="repairUserId">报修人</nz-form-label>
191
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择报修人!">
192
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changerepairUserInp($event)" formControlName="repairUserId" nzPlaceHolder="请选择报修人" (nzOpenChange)="openChangerepairUser($event)" (ngModelChange)="setIsSelecting(true)">
193
+				      <ng-container *ngFor="let option of repairUserList">
194
+				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
195
+				      </ng-container>
196
+				      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
197
+				        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
198
+				      </nz-option>
199
+				    </nz-select>
200
+				  </nz-form-control>
201
+				</nz-form-item>
202
+				
175 203
 				<nz-form-item [hidden]="!fieldConfig.config.deptType">
176 204
 				  <nz-form-label [nzSpan]="6" nzFor="deptTypeId">科室类型</nz-form-label>
177 205
 				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择科室类型!">
@@ -185,6 +213,63 @@
185 213
 				    </nz-select>
186 214
 				  </nz-form-control>
187 215
 				</nz-form-item>
216
+				
217
+				<nz-form-item [hidden]="!fieldConfig.config.evaluate">
218
+				  <nz-form-label [nzSpan]="6" nzFor="evaluateId">评价</nz-form-label>
219
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择评价!">
220
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="evaluateId" nzPlaceHolder="请选择评价">
221
+				      <ng-container *ngFor="let option of evaluateList">
222
+				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
223
+				      </ng-container>
224
+				      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
225
+				        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
226
+				      </nz-option>
227
+				    </nz-select>
228
+				  </nz-form-control>
229
+				</nz-form-item>
230
+				
231
+				<nz-form-item [hidden]="!fieldConfig.config.consumable">
232
+				  <nz-form-label [nzSpan]="6" nzFor="consumableId">耗材</nz-form-label>
233
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择耗材!">
234
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeConsumableInp($event)" formControlName="consumableId" nzPlaceHolder="请选择耗材" (nzOpenChange)="openChangeConsumable($event)" (ngModelChange)="setIsSelecting(true)">
235
+				      <ng-container *ngFor="let option of consumableList">
236
+				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
237
+				      </ng-container>
238
+				      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
239
+				        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
240
+				      </nz-option>
241
+				    </nz-select>
242
+				  </nz-form-control>
243
+				</nz-form-item>
244
+				
245
+				<nz-form-item [hidden]="!fieldConfig.config.isHang">
246
+				  <nz-form-label [nzSpan]="6" nzFor="isHangId">是否挂起</nz-form-label>
247
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择是否挂起!">
248
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="isHangId" nzPlaceHolder="请选择是否挂起">
249
+				      <ng-container *ngFor="let option of isHangList">
250
+				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
251
+				      </ng-container>
252
+				    </nz-select>
253
+				  </nz-form-control>
254
+				</nz-form-item>
255
+				
256
+				<nz-form-item [hidden]="!fieldConfig.config.code">
257
+				  <nz-form-label [nzSpan]="6" nzFor="codeNum">单号</nz-form-label>
258
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请输入单号!">
259
+				    <input class="width-200" type="text" placeHolder="请输入单号" nz-input formControlName="codeNum" />
260
+				  </nz-form-control>
261
+				</nz-form-item>
262
+				
263
+				<nz-form-item [hidden]="!fieldConfig.config.overtime">
264
+				  <nz-form-label [nzSpan]="6" nzFor="overtimeId">超时工单</nz-form-label>
265
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择超时工单!">
266
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="overtimeId" nzPlaceHolder="请选择超时工单">
267
+				      <ng-container *ngFor="let option of overtimeList">
268
+				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
269
+				      </ng-container>
270
+				    </nz-select>
271
+				  </nz-form-control>
272
+				</nz-form-item>
188 273
       </form>
189 274
     </div>
190 275
     <div class="display_flex justify-content_flex-center">

+ 2 - 2
src/app/views/new-statistics/components/search-more/search-more.component.less

@@ -34,7 +34,7 @@
34 34
 
35 35
     .content {
36 36
       width: 100%;
37
-      height: 117px;
37
+      // height: 117px;
38 38
       background: #f9fafb;
39 39
       border: 1px solid #e5e9ed;
40 40
       border-radius: 5px;
@@ -88,7 +88,7 @@
88 88
       .content {
89 89
         width: 100%;
90 90
         padding: 10px 24px 0;
91
-        height: auto;
91
+        max-height: calc(100vh - 120px);
92 92
         overflow-y: auto;
93 93
 
94 94
         .addForm {

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

@@ -26,14 +26,25 @@ export class SearchMoreComponent implements OnInit {
26 26
     private tool: ToolService,
27 27
     private mainService: MainService,
28 28
   ) { }
29
-
29
+	
30
+	isHangList:any = [
31
+		{name:'是',id:1},
32
+		{name:'否',id:0}
33
+	]
34
+	overtimeList:any = [
35
+		{name:'是',id:1},
36
+		{name:'否',id:0}
37
+	]
38
+	
30 39
   ngOnInit() {
31 40
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
32 41
       let fun = v[0];
33 42
       fun.call(this, v[1]);
34 43
     });
44
+		console.log(4444,this.fieldConfig)
35 45
     this.initForm();
36 46
     this.getSourceList();
47
+		this.getWorkHourEvaluateList();
37 48
   }
38 49
   // 隐藏模态框
39 50
   hideModal() {
@@ -53,8 +64,13 @@ export class SearchMoreComponent implements OnInit {
53 64
     this.workHourParentList = this.fieldConfig.fields.workHourParentDTO ? [this.fieldConfig.fields.workHourParentDTO] : [];
54 65
     this.repairDeptList = this.fieldConfig.fields.repairDeptDTO ? [this.fieldConfig.fields.repairDeptDTO] : [];
55 66
 		this.deptTypeList = this.fieldConfig.fields.deptTypeDTO ? [this.fieldConfig.fields.deptTypeDTO] : [];
56
-
57
-    this.validateForm = this.fb.group({
67
+		this.evaluateList = this.fieldConfig.fields.evaluateDTO ? [this.fieldConfig.fields.evaluateDTO] : [];
68
+		this.workHourSmallList = this.fieldConfig.fields.workHourSmallDTO ? [this.fieldConfig.fields.workHourSmallDTO] : [];
69
+		this.repairUserList = this.fieldConfig.fields.repairUserDTO ? [this.fieldConfig.fields.repairUserDTO] : [];
70
+		this.isHangList = [{name:'是',id:1},{name:'否',id:0}];
71
+		this.overtimeList = [{name:'是',id:1},{name:'否',id:0}];
72
+		
73
+		this.validateForm = this.fb.group({
58 74
       groupId: [this.fieldConfig.fields.groupId || null],
59 75
       userId: [this.fieldConfig.fields.userId === undefined ? null : this.fieldConfig.fields.userId],
60 76
       category1Id: [this.fieldConfig.fields.category1DTO ? this.fieldConfig.fields.category1DTO.id  : null],
@@ -65,8 +81,15 @@ export class SearchMoreComponent implements OnInit {
65 81
       floorId: [this.fieldConfig.fields.floorId === undefined ? null : this.fieldConfig.fields.floorId],
66 82
       companyId: [this.fieldConfig.fields.companyDTO ? this.fieldConfig.fields.companyDTO.id  : null],
67 83
       workHourParentId: [this.fieldConfig.fields.workHourParentDTO ? this.fieldConfig.fields.workHourParentDTO.id  : null],
68
-      repairDeptId: [this.fieldConfig.fields.repairDeptDTO ? this.fieldConfig.fields.repairDeptDTO.id  : null],
84
+			workHourSmallId: [this.fieldConfig.fields.workHourSmallDTO ? this.fieldConfig.fields.workHourSmallDTO.id  : null],
85
+			repairDeptId: [this.fieldConfig.fields.repairDeptDTO ? this.fieldConfig.fields.repairDeptDTO.id  : null],
69 86
 			deptTypeId: [this.fieldConfig.fields.deptTypeId || null],
87
+			evaluateId: [this.fieldConfig.fields.evaluateId || null],
88
+			repairUserId: [this.fieldConfig.fields.repairUserId === undefined ? null : this.fieldConfig.fields.repairUserId],
89
+			consumableId: [this.fieldConfig.fields.consumableId || null],
90
+			isHangId: [this.fieldConfig.fields.isHangDTO ? this.fieldConfig.fields.isHangDTO.id  : null],
91
+			codeNum: [this.fieldConfig.fields.codeNum || null],
92
+			overtimeId: [this.fieldConfig.fields.overtimeDTO ? this.fieldConfig.fields.overtimeDTO.id  : null],
70 93
 		});
71 94
   }
72 95
   // 表单提交
@@ -125,6 +148,10 @@ export class SearchMoreComponent implements OnInit {
125 148
       fields.workHourParentId = this.validateForm.value.workHourParentId;
126 149
       fields.workHourParentDTO = this.workHourParentList.find(item => item.id == this.validateForm.value.workHourParentId);
127 150
     }
151
+		if(this.fieldConfig.config.workHourSmall){
152
+		  fields.workHourSmallId = this.validateForm.value.workHourSmallId;
153
+		  fields.workHourSmallDTO = this.workHourSmallList.find(item => item.id == this.validateForm.value.workHourSmallId);
154
+		}
128 155
     if(this.fieldConfig.config.repairDept){
129 156
       fields.repairDeptId = this.validateForm.value.repairDeptId;
130 157
       fields.repairDeptDTO = this.repairDeptList.find(item => item.id == this.validateForm.value.repairDeptId);
@@ -133,7 +160,38 @@ export class SearchMoreComponent implements OnInit {
133 160
 		  fields.deptTypeId = this.validateForm.value.deptTypeId;
134 161
 		  fields.deptTypeDTO = this.deptTypeList.find(item => item.id == this.validateForm.value.deptTypeId);
135 162
 		}
136
-
163
+		
164
+		if(this.fieldConfig.config.evaluate){
165
+			fields.evaluateId = this.validateForm.value.evaluateId;
166
+			fields.evaluateDTO = this.evaluateList.find(item => item.id == this.validateForm.value.evaluateId);
167
+		}
168
+		
169
+		if(this.fieldConfig.config.repairUser){
170
+			fields.repairUserId = this.validateForm.value.repairUserId;
171
+			fields.repairUserDTO = this.repairUserList.find(item => item.id == this.validateForm.value.repairUserId);
172
+		}
173
+		
174
+		if(this.fieldConfig.config.consumable){
175
+			fields.consumableId = this.validateForm.value.consumableId;
176
+			fields.consumableDTO = this.consumableList.find(item => item.id == this.validateForm.value.consumableId);
177
+		}
178
+		
179
+		if(this.fieldConfig.config.isHang){
180
+			fields.isHangId = this.validateForm.value.isHangId;
181
+			fields.isHangDTO = this.isHangList.find(item => item.id == this.validateForm.value.isHangId);
182
+		}
183
+		
184
+		
185
+		if(this.fieldConfig.config.code){
186
+			fields.codeNum = this.validateForm.value.codeNum;
187
+			fields.codeNumDTO = this.validateForm.value.codeNum;
188
+		}
189
+		
190
+		if(this.fieldConfig.config.overtime){
191
+			fields.overtimeId = this.validateForm.value.overtimeId;
192
+			fields.overtimeDTO = this.overtimeList.find(item => item.id == this.validateForm.value.overtimeId);
193
+		}
194
+				
137 195
     this.submitEvent.emit(fields);
138 196
     this.hideModal();
139 197
   }
@@ -571,7 +629,131 @@ export class SearchMoreComponent implements OnInit {
571 629
     });
572 630
   }
573 631
   openChangeWorkHourParent(flag){
632
+		this.validateForm.controls.workHourSmallId.setValue(null);
574 633
     flag && this.setIsSelecting(false);
575 634
     flag && this.getWorkHourParentList();
576 635
   }
636
+	
637
+	// =================工时小类===================
638
+	
639
+	// 工时小类搜索
640
+	changeWorkHourSmallInp(e) {
641
+	  this.searchTimer(this.getWorkHourSmallList, e);
642
+	}
643
+	
644
+	// 获取工时小类列表
645
+	workHourSmallList:any[] = [];
646
+	getWorkHourSmallList(keyword?){
647
+	  let postData: any = {
648
+	    idx: 0,
649
+	    sum: 20,
650
+	    workHourManagement: {
651
+	      keyWords: keyword,
652
+	      treeLevel: 2,
653
+				parent:{
654
+					id: this.validateForm.value.workHourParentId
655
+				},
656
+				quoteOther:0,
657
+	      statisticalHosId: this.getHosId,
658
+	    },
659
+	  };
660
+	  this.isLoading = true;
661
+	  this.mainService.getFetchDataList("simple/data", "workHourManagement", postData).subscribe(result => {
662
+	    this.isLoading = false;
663
+	    if(result.status == 200){
664
+	      this.workHourSmallList = result.list || [];
665
+	    }else{
666
+	      this.workHourSmallList = [];
667
+	    }
668
+	  });
669
+	}
670
+	openChangeWorkHourSmall(flag){
671
+	  flag && this.setIsSelecting(false);
672
+	  flag && this.getWorkHourSmallList();
673
+	}
674
+	
675
+	// =================评价===================
676
+	
677
+	// 获取评价列表 
678
+	evaluateList:any[] = [];
679
+	getWorkHourEvaluateList(){
680
+		this.isLoading = true;
681
+		this.mainService
682
+		  .getDictionary("list", "incident_degree")
683
+		  .subscribe((data) => {
684
+		    this.isLoading = false;
685
+		    this.evaluateList = data;
686
+		  });
687
+	}
688
+	
689
+	// =================申请人员===================
690
+	
691
+	// 申请人员搜索
692
+	changerepairUserInp(e) {
693
+	  this.searchTimer(this.getrepairUserList, e);
694
+	}
695
+	
696
+	// 获取申请人员列表
697
+	repairUserList:any[] = [];
698
+	getrepairUserList(keyword = ''){
699
+	  let postData: any = {
700
+	    idx: 0,
701
+	    sum: 20,
702
+			user: {
703
+			  name: keyword,
704
+			  hospital: { id: this.tool.getCurrentHospital().id },
705
+			  engineer: 1,
706
+			  simpleQuery: true,
707
+			},
708
+	  };
709
+	  this.isLoading = true;
710
+	  this.mainService.getFetchDataList("simple/data", "user", postData).subscribe(result => {
711
+	    this.isLoading = false;
712
+	    if(result.status == 200){
713
+	      this.repairUserList = result.list || [];
714
+	    }else{
715
+	      this.repairUserList = [];
716
+	    }
717
+	  });
718
+	}
719
+	openChangerepairUser(flag){
720
+	  flag && this.setIsSelecting(false);
721
+	  flag && this.getrepairUserList();
722
+	}
723
+	
724
+	// =================耗材===================
725
+	
726
+	// 耗材搜索
727
+	changeConsumableInp(e) {
728
+	  this.searchTimer(this.getConsumableList, e);
729
+	}
730
+	
731
+	// 获取耗材列表
732
+	consumableList:any[] = [];
733
+	getConsumableList(keyword = ''){
734
+	  let data = {
735
+	    idx: 0,
736
+	    sum: 20,
737
+	    consumable: {
738
+				name: keyword,
739
+	      hosId: this.tool.getCurrentHospital().id,
740
+	      quoteOther: 0,
741
+	    },
742
+	  };
743
+	  this.isLoading = true;
744
+	  this.mainService
745
+	    .getFetchDataList("simple/data", "consumable", data)
746
+	    .subscribe((data) => {
747
+	      this.isLoading = false;
748
+	      if (data.status == 200) {
749
+	        this.consumableList = data.list || [];
750
+	      }else{
751
+					this.repairUserList = [];
752
+				}
753
+	    });
754
+	}
755
+	openChangeConsumable(flag){
756
+	  flag && this.setIsSelecting(false);
757
+	  flag && this.getConsumableList();
758
+	}
577 759
 }

+ 1 - 1
src/app/views/new-statistics/distribution-inspection-statistics/distribution-inspection-statistics.component.less

@@ -30,7 +30,7 @@
30 30
 		overflow-x: hidden;
31 31
     height: 100%;
32 32
     .secondMenu{
33
-      width: 175px;
33
+      width: 160px;
34 34
       height: 100%;
35 35
       background-color: #fff;
36 36
       margin-right: 8px;

+ 11 - 2
src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list-routing.module.ts

@@ -1,10 +1,19 @@
1 1
 import { NgModule } from '@angular/core';
2 2
 import { Routes, RouterModule } from '@angular/router';
3 3
 import { IncidentListComponent } from './incident-list.component';
4
-
4
+import { OrderDetailComponent } from '../../../../share/order-detail/order-detail.component';
5 5
 
6 6
 const routes: Routes = [
7
-  { path: '', component: IncidentListComponent }
7
+  { 
8
+		path: '', component: IncidentListComponent ,
9
+		children: [
10
+		  {
11
+		    // 查看详情
12
+		    path: 'orderDetail/:id',
13
+		    component: OrderDetailComponent,
14
+		  }
15
+		]
16
+	}
8 17
 ];
9 18
 
10 19
 @NgModule({

+ 69 - 55
src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.html

@@ -1,11 +1,11 @@
1 1
 <div class="searchDataWrap">
2 2
   <div class="searchData">
3
-    <app-custom-change-date #customChangeDate [isShowType]="true"></app-custom-change-date>
3
+    <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4 4
     <div class="searchDataItem">
5
-      <span class="label">报修科室</span>:
6
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
7
-        <ng-container *ngFor="let option of repairDeptList">
8
-          <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
5
+      <span class="label">统计分类</span>:
6
+      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择统计分类" [(ngModel)]="statisticsTypeId" (nzOpenChange)="openChangeStatisticsType($event)">
7
+        <ng-container *ngFor="let option of statisticsTypeList">
8
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>
10 10
         <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
11 11
           <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -20,62 +20,73 @@
20 20
     <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
21 21
   </div>
22 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">
24
-  <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
25
-  <span>{{fieldConfig.fields.userDTO?.name}}</span>
26
-  <span>{{fieldConfig.fields.category1DTO?.category}}</span>
27
-  <span>{{fieldConfig.fields.category2DTO?.category}}</span>
28
-  <span>{{fieldConfig.fields.category3DTO?.category}}</span>
29
-  <span>{{fieldConfig.fields.sourceDTO?.name}}</span>
23
+<div class="moreFilter" *ngIf="fieldConfig.fields.deptDTO|| fieldConfig.fields.taskTypeDTO || fieldConfig.fields.sourceDTO || fieldConfig.fields.minuteDTO || fieldConfig.fields.specialDTO || fieldConfig.fields.overtimeIdDTO || fieldConfig.fields.abnormalDTO || fieldConfig.fields.evaluateDTO || fieldConfig.fields.executeUserDTO || fieldConfig.fields.codeNumDTO || fieldConfig.fields.timeFrameDTO">
24
+	<span>{{fieldConfig.fields.taskTypeDTO?.taskName}}</span>
25
+  <span>{{fieldConfig.fields.deptDTO?.dept}}</span>
26
+	<span>{{fieldConfig.fields.sourceDTO?.name}}</span>
27
+	<span>{{fieldConfig.fields.minuteDTO}}</span>
28
+	<span>{{fieldConfig.fields.specialDTO?.name}}</span>
29
+	<span>{{fieldConfig.fields.overtimeDTO?.name}}</span>
30
+	<span>{{fieldConfig.fields.abnormalDTO?.name}}</span>
31
+	<span>{{fieldConfig.fields.evaluateDTO?.name}}</span>
32
+	<span>{{fieldConfig.fields.executeUserDTO?.name}}</span>
33
+	<span>{{fieldConfig.fields.codeNumDTO}}</span>
34
+	<span>{{fieldConfig.fields.timeFrameDTO?.name}}</span>
30 35
 </div>
31
-<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
32
-  <thead (nzSortChange)="sort($event)" nzSingleSort>
36
+<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px', x: '1400px'}">
37
+  <thead>
33 38
     <tr>
34
-      <th nzWidth="10%" nzShowSort nzSortKey="startDate" [(nzSort)]="sortCurrent.startDate">时间</th>
35
-      <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
36
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均接单时长</th>
37
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时长</th>
38
-      <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
39
-      <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
40
-      <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
41
-      <th nzWidth="9%" nzShowSort nzSortKey="workHourPrice" [(nzSort)]="sortCurrent.workHourPrice">工时费用(元)</th>
42
-      <th nzWidth="9%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用(元)</th>
43
-      <th nzWidth="9%" nzShowSort nzSortKey="negativeNum" [(nzSort)]="sortCurrent.negativeNum">差评单数</th>
44
-      <th nzWidth="9%" nzShowSort nzSortKey="favorableRate" [(nzSort)]="sortCurrent.favorableRate">好评率</th>
39
+      <th nzWidth="150px">序号|单号</th>
40
+      <th nzWidth="200px">起点|终点科室</th>
41
+      <th nzWidth="150px">统计|任务类型</th>
42
+      <th nzWidth="200px">时间过程</th>
43
+      <th nzWidth="100px">时长</th>
44
+      <th nzWidth="200px">时间考核</th>
45
+      <th nzWidth="150px">状态|评价</th>
46
+      <th nzWidth="150px">费用|积分</th>
45 47
     </tr>
46 48
   </thead>
47 49
   <tbody>
48
-    <tr *ngFor="let data of listOfData">
49
-      <td>{{ data.startDate }}</td>
50
-      <td>{{ data.sum }}</td>
51
-      <td>{{ data.avgResponseTime }}</td>
52
-      <td>{{ data.avgResolvedTime }}</td>
53
-      <td>{{ data.resolvedOverNum }}</td>
54
-      <td>{{ data.overTimeNum }}</td>
55
-      <td>{{ data.consumablePrice }}</td>
56
-      <td>{{ data.workHourPrice }}</td>
57
-      <td>{{ data.totalPrice }}</td>
58
-      <td>{{ data.negativeNum }}</td>
59
-      <td>{{ data.favorableRate }}</td>
50
+    <tr *ngFor="let data of listOfData; let index = index;">
51
+      <td (click)="viewDetail(data)">
52
+				<div>{{index+(pageIndex-1) * pageSize + 1}}</div>
53
+				<div class="text-style">{{data.gdcode}}</div>
54
+			</td>
55
+      <td>
56
+				<div>{{ data.startDept }}</div>
57
+				<div>{{ data.endDept }}</div>
58
+			</td>
59
+      <td>
60
+				<div>{{data.statisticsName}}</div>
61
+				<div>{{data.taskName}}</div>
62
+			</td>
63
+			<td>
64
+				<div>申:{{ data.starttime|date:'yyyy-MM-dd HH:mm:ss' }}</div>
65
+				<div>接:{{ data.accepttime|date:'yyyy-MM-dd HH:mm:ss' }}</div>
66
+				<div>到:{{ data.arrivetime|date:'yyyy-MM-dd HH:mm:ss' }}</div>
67
+				<div>达:{{ data.completetime|date:'yyyy-MM-dd HH:mm:ss' }}</div>
68
+			</td>
69
+			<td>
70
+				<div>总时长:{{ data.totalTime }}</div>
71
+				<div>接单:{{ data.responseTime }}</div>
72
+				<div>到达:{{ data.arriveTimeNum }}</div>
73
+				<div>执行:{{ data.executionTime }}</div>
74
+			</td>
75
+			<td>
76
+				<div>接单:{{ data.estimateResponseTime|date:'yyyy-MM-dd HH:mm:ss' }}</div>
77
+				<div>到达:{{ data.estimateArriveTime|date:'yyyy-MM-dd HH:mm:ss' }}</div>
78
+				<div>执行:{{ data.estimateCompleteTime|date:'yyyy-MM-dd HH:mm:ss' }}</div>
79
+			</td>
80
+      <td>
81
+				<div>{{ data.stateName }}</div>
82
+				<div>{{ data.evaluationName }}</div>
83
+			</td>
84
+      <td>
85
+      	<div>{{ data.totalGrade }}{{data.totalGrade?'元':''}}</div>
86
+      	<div>{{ data.scorePrice }}{{data.scorePrice?'分':''}}</div>
87
+      </td>
60 88
     </tr>
61 89
   </tbody>
62
-  <ng-template #footerTpl>
63
-    <table class="footTable">
64
-      <tr *ngFor="let data of listOfDataEnd">
65
-        <td style="width: 10%">{{ data.startDate }}</td>
66
-        <td style="width: 9%">{{ data.sum }}</td>
67
-        <td style="width: 9%">{{ data.avgResponseTime }}</td>
68
-        <td style="width: 9%">{{ data.avgResolvedTime }}</td>
69
-        <td style="width: 9%">{{ data.resolvedOverNum }}</td>
70
-        <td style="width: 9%">{{ data.overTimeNum }}</td>
71
-        <td style="width: 9%">{{ data.consumablePrice }}</td>
72
-        <td style="width: 9%">{{ data.workHourPrice }}</td>
73
-        <td style="width: 9%">{{ data.totalPrice }}</td>
74
-        <td style="width: 9%">{{ data.negativeNum }}</td>
75
-        <td style="width: 9%">{{ data.favorableRate }}</td>
76
-      </tr>
77
-    </table>
78
-  </ng-template>
79 90
 </nz-table>
80 91
 <div class="pagination">
81 92
   <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
@@ -83,4 +94,7 @@
83 94
 </div>
84 95
 
85 96
 <!-- 详细搜索 -->
86
-<app-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-search-more>
97
+<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>
98
+
99
+<!-- 查看详情 -->
100
+<router-outlet></router-outlet>

+ 13 - 0
src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.less

@@ -52,6 +52,19 @@
52 52
 
53 53
   .table{
54 54
     margin: 0 8px;
55
+		.hide-describe{
56
+			// display: -webkit-box;
57
+			// -webkit-box-orient: vertical;
58
+			// -webkit-line-clamp: 2;
59
+			// overflow: hidden;
60
+			// text-overflow: ellipsis;
61
+			// word-wrap: break-word;
62
+		}
63
+		.text-style{
64
+			text-decoration: underline;
65
+			color: #0675ce;
66
+			cursor: pointer;
67
+		}
55 68
   }
56 69
 
57 70
   .moreFilter{

+ 74 - 62
src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.ts

@@ -4,7 +4,8 @@ import { Subject } from 'rxjs';
4 4
 import { NzMessageService } from 'ng-zorro-antd/message';
5 5
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
6 6
 import { MainService } from 'src/app/services/main.service';
7
-import { ActivatedRoute } from '@angular/router';
7
+import { ActivatedRoute, Router } from '@angular/router';
8
+import cloneDeep from 'lodash-es/cloneDeep'
8 9
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
9 10
 @Component({
10 11
   selector: "app-incident-list",
@@ -16,14 +17,15 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
16 17
   constructor(
17 18
     private mainService: MainService,
18 19
     private message: NzMessageService,
19
-    private route: ActivatedRoute,
20
+    public route: ActivatedRoute,
21
+    private router: Router,
20 22
     private tabService: TabService,
21 23
   ) {}
22 24
 
23 25
   listOfData: any[] = []; //表格数据
24 26
   listOfDataEnd: any[] = []; //表格合计
25 27
   pageIndex: number = 1; //表格当前页码
26
-  pageSize: number = 30; //表格每页展示条数
28
+  pageSize: number = 10; //表格每页展示条数
27 29
   listLength: number = 0; //表格总数据量
28 30
 
29 31
   repairDeptId;//报修科室id
@@ -43,14 +45,14 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
43 45
     setTimeout(() => {
44 46
       this.search();
45 47
     }, 0)
46
-    this.onResize();
48
+    this.onResize(0);
47 49
   }
48 50
 
49 51
   tableHeight:number = 0;
50 52
   @HostListener('window:resize')
51
-  onResize(): void {
53
+  onResize(height): void {
52 54
     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;
55
+      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;
54 56
 
55 57
     }, 0)
56 58
   }
@@ -65,7 +67,11 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
65 67
   }
66 68
 
67 69
   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.sourceDTO;
70
+    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || 
71
+		this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || 
72
+		this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO  || 
73
+		this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || 
74
+		this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
69 75
     return flag ? 37 : 0;
70 76
   }
71 77
 
@@ -110,6 +116,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
110 116
 
111 117
   // 表格数据
112 118
   loading1 = false;
119
+	statisticsTypeId:any;//统计分类id
113 120
   getList(num?: number, field?: string, sort?: string) {
114 121
     if (num !== undefined) {
115 122
       this.pageIndex = num;
@@ -117,29 +124,29 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
117 124
     let postData:any = {
118 125
       idx: this.pageIndex - 1,
119 126
       sum: this.pageSize,
120
-      dateType: this.customChangeDateComponent.dateType,
127
+      statisticsTypeId: this.statisticsTypeId || undefined,
121 128
       startDate: this.customChangeDateComponent.startDate || undefined,
122 129
       endDate: this.customChangeDateComponent.endDate || undefined,
123
-      hosId: this.hosId || undefined,
124
-      dutyId: this.dutyId || undefined,
125
-      parentDutyId: this.parentDutyId || undefined,
126
-      repairDeptId: this.repairDeptId || 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
-      sourceId: this.fieldConfig.fields.sourceId || undefined,
131
-      hierarchy: this.fieldConfig.fields.hierarchy || undefined,
130
+      hosId: this.getHosId,
131
+      deptId: this.fieldConfig.fields.deptId || undefined,
132
+      taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
133
+			sourceId: this.fieldConfig.fields.sourceId || undefined,
134
+			minutesClose: this.fieldConfig.fields.minuteClose || undefined,
135
+			specialCloseFlag: this.fieldConfig.fields.specialId || undefined,
136
+			timeout: this.fieldConfig.fields.overtimeId || undefined,
137
+			abnormityType: this.fieldConfig.fields.abnormalId || undefined,
138
+			workOrderEvaluationId: this.fieldConfig.fields.evaluateId || undefined,
139
+			userId: this.fieldConfig.fields.executeUserId || undefined,
140
+			hour: this.fieldConfig.fields.timeFrameId || undefined,
141
+			gdCode: this.fieldConfig.fields.codeNum || undefined
132 142
     };
133
-    if (field && sort) {
134
-      postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
135
-    }
143
+
136 144
     this.loading1 = true;
137 145
     this.mainService
138
-      .postCustom("itsm/report", "incidentWorkOrder", postData)
146
+      .postCustom("itsm/report", "workOrderList", postData)
139 147
       .subscribe((result) => {
140 148
         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 });
149
+        this.listOfData = result.dataList;
143 150
         this.listLength = result.totalCount;
144 151
       });
145 152
   }
@@ -170,24 +177,26 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
170 177
       nzDuration: 0,
171 178
     }).messageId;
172 179
     let postData:any = {
173
-      dateType: this.customChangeDateComponent.dateType,
180
+      idx: this.pageIndex - 1,
181
+      sum: this.pageSize,
182
+      statisticsTypeId: this.statisticsTypeId || undefined,
174 183
       startDate: this.customChangeDateComponent.startDate || undefined,
175 184
       endDate: this.customChangeDateComponent.endDate || undefined,
176
-      hosId: this.hosId || undefined,
177
-      dutyId: this.dutyId || undefined,
178
-      parentDutyId: this.parentDutyId || undefined,
179
-      repairDeptId: this.repairDeptId || undefined,
180
-      groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
181
-      userId: this.fieldConfig.fields.userId || undefined,
182
-      categoryId: this.fieldConfig.fields.categoryId || undefined,
183
-      sourceId: this.fieldConfig.fields.sourceId || undefined,
184
-      hierarchy: this.fieldConfig.fields.hierarchy || undefined,
185
+      hosId: this.getHosId,
186
+      deptId: this.fieldConfig.fields.deptId || undefined,
187
+      taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
188
+    	sourceId: this.fieldConfig.fields.sourceId || undefined,
189
+    	minutesClose: this.fieldConfig.fields.minuteClose || undefined,
190
+    	specialCloseFlag: this.fieldConfig.fields.specialId || undefined,
191
+    	timeout: this.fieldConfig.fields.overtimeId || undefined,
192
+    	abnormityType: this.fieldConfig.fields.abnormalId || undefined,
193
+    	workOrderEvaluationId: this.fieldConfig.fields.evaluateId || undefined,
194
+    	userId: this.fieldConfig.fields.executeUserId || undefined,
195
+    	hour: this.fieldConfig.fields.timeFrameId || undefined,
196
+    	gdCode: this.fieldConfig.fields.codeNum || undefined
185 197
     };
186
-    if (this.sortCurrentKey && this.sortCurrentValue) {
187
-      postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
188
-    }
189 198
     this.mainService
190
-      .postExportCustom("itsm/export", "incidentWorkOrder", postData)
199
+      .postExportCustom("itsm/export", "workOrderList", postData)
191 200
       .subscribe((data) => {
192 201
         this.message.remove(this.excelExportLoading);
193 202
         this.excelExportLoading = false;
@@ -215,15 +224,11 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
215 224
 		this.sortCurrentValue = "";
216 225
 		this.sortCurrent = {};
217 226
     this.dateRange = []
218
-    this.repairDeptId = undefined;
227
+    this.statisticsTypeId = undefined;
219 228
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined};
220 229
     this.customChangeDateComponent.resetByDate();
221 230
     this.search();
222
-  }
223
-
224
-  // 科室搜索
225
-  changeRepairDeptInp(e) {
226
-    this.searchTimer(this.getRepairDeptList, e);
231
+		this.onResize(0);
227 232
   }
228 233
 
229 234
   // 防抖
@@ -232,36 +237,43 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
232 237
     this.isLoading = true;
233 238
     this.searchTimerSubject.next([fun, e]);
234 239
   }
240
+	
241
+	// 查看工单详情
242
+	coopData:any;
243
+	detailModalShow = false; //弹窗开关
244
+	viewDetail(data) {
245
+	  this.router.navigateByUrl("/newStatistics/distributionInspectionStatistics/incidentList/orderDetail/" + data.id);
246
+	}
247
+	// 关闭弹窗
248
+	closeDetailModelOrder(e) {
249
+	  this.detailModalShow = JSON.parse(e).show;
250
+	}
251
+	// 弹窗确定
252
+	confirmDetailModelOrder(e){
253
+	  this.detailModalShow = false;
254
+	  this.getList();
255
+	}
235 256
 
236
-  openChangeRepairDept(flag){
237
-    flag && this.getRepairDeptList();
257
+  openChangeStatisticsType(flag){
258
+    flag && this.getStatisticsTypeList();
238 259
   }
239 260
 
240
-  // 获取报修科室列表
241
-  repairDeptList:any[] = [];
242
-  getRepairDeptList(keyword?) {
243
-    let data = {
244
-      department: {
245
-        statisticalHosId: this.getHosId,
246
-        dept: keyword,
247
-        searchType: 1,
248
-      },
249
-      idx: 0,
250
-      sum: 20,
251
-    };
261
+  // 获取统计分类列表
262
+  statisticsTypeList:any[] = [];
263
+  getStatisticsTypeList(keyword?) {
252 264
     this.isLoading = true;
253 265
     this.mainService
254
-      .getFetchDataList("data", "department", data)
266
+      .getDictionary("list", "statistics_date_type")
255 267
       .subscribe((data) => {
256 268
         this.isLoading = false;
257
-        this.repairDeptList = data.list;
269
+        this.statisticsTypeList = data;
258 270
       });
259 271
   }
260 272
 
261 273
   // 详细搜索
262 274
   fieldConfig:any = {
263
-    fields: {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined},
264
-    config: {groupAndUser: true, category123: true, source: true},
275
+		fields: { deptId: undefined, taskTypeId: undefined, sourceId: undefined, minuteId: undefined, specialId: undefined, overtimeId: undefined, abnormalId: undefined, evaluateId: undefined, executeUserId: undefined, codeNum: undefined, timeFrameId: undefined},
276
+		config: { dept: true, taskType: true, source: true, minute: true, special: true, overtime: true, abnormal: true, evaluate: true, executeUser:true, code: true, timeFrame: true},
265 277
   }
266 278
   showSearchMore:boolean = false;
267 279
   showMore(){
@@ -277,6 +289,6 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
277 289
     this.fieldConfig.fields = fields;
278 290
     console.log('this.fieldConfig.fields:', this.fieldConfig.fields)
279 291
     this.search();
280
-    this.onResize();
292
+    this.onResize(37);
281 293
   }
282 294
 }

+ 3 - 4
src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.module.ts

@@ -5,10 +5,9 @@ import { CommonModule } from '@angular/common';
5 5
 import { IncidentListRoutingModule } from './incident-list-routing.module';
6 6
 import { ShareModule } from 'src/app/share/share.module';
7 7
 import { VirtualScrollerModule } from 'ngx-virtual-scroller';
8
-import { SearchMoreModule } from '../../components/search-more/search-more.module';
8
+import { DistributionSearchMoreModule } from '../../components/distribution-search-more/distribution-search-more.module';
9 9
 import { CustomChangeDateModule } from '../../components/custom-change-date/custom-change-date.module';
10 10
 
11
-
12 11
 @NgModule({
13 12
   declarations: [
14 13
     IncidentListComponent,
@@ -18,8 +17,8 @@ import { CustomChangeDateModule } from '../../components/custom-change-date/cust
18 17
     IncidentListRoutingModule,
19 18
     ShareModule,
20 19
     VirtualScrollerModule,
21
-    SearchMoreModule,
22
-    CustomChangeDateModule,
20
+    DistributionSearchMoreModule,
21
+    CustomChangeDateModule
23 22
   ]
24 23
 })
25 24
 export class IncidentListModule { }

Diff nebyl zobrazen, protože je příliš veliký
+ 57 - 26
src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.html


+ 5 - 0
src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.less

@@ -60,6 +60,11 @@
60 60
 			// text-overflow: ellipsis;
61 61
 			// word-wrap: break-word;
62 62
 		}
63
+		.text-style{
64
+			text-decoration: underline;
65
+			color: #0675ce;
66
+			cursor: pointer;
67
+		}
63 68
   }
64 69
 
65 70
   .moreFilter{

+ 107 - 22
src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.ts

@@ -1,10 +1,11 @@
1 1
 import { TabService } from './../../services/tab.service';
2
-import { debounceTime } from 'rxjs/operators';
2
+import { debounceTime, filter } from 'rxjs/operators';
3 3
 import { Subject } from 'rxjs';
4 4
 import { NzMessageService } from 'ng-zorro-antd/message';
5 5
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
6 6
 import { MainService } from 'src/app/services/main.service';
7
-import { ActivatedRoute } from '@angular/router';
7
+import { ActivatedRoute, Router, NavigationEnd  } from '@angular/router';
8
+import cloneDeep from 'lodash-es/cloneDeep'
8 9
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
9 10
 @Component({
10 11
   selector: "app-incident-list",
@@ -17,13 +18,14 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
17 18
     private mainService: MainService,
18 19
     private message: NzMessageService,
19 20
     private route: ActivatedRoute,
21
+		private router: Router,
20 22
     private tabService: TabService,
21 23
   ) {}
22 24
 
23 25
   listOfData: any[] = []; //表格数据
24 26
   listOfDataEnd: any[] = []; //表格合计
25 27
   pageIndex: number = 1; //表格当前页码
26
-  pageSize: number = 30; //表格每页展示条数
28
+  pageSize: number = 10; //表格每页展示条数
27 29
   listLength: number = 0; //表格总数据量
28 30
 
29 31
   repairDeptId;//报修科室id
@@ -31,6 +33,15 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
31 33
   searchTimerSubject = new Subject();
32 34
 
33 35
   ngOnInit() {
36
+		this.getRouteQuery()
37
+		this.router.events
38
+		  .pipe(filter(event => event instanceof NavigationEnd))
39
+		  .subscribe((event: NavigationEnd) => {
40
+		    if(event.urlAfterRedirects=='/newStatistics/maintenanceStatistics/incidentList'){
41
+					this.getRouteQuery()
42
+		    }
43
+		  });
44
+
34 45
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
35 46
       let fun = v[0];
36 47
       fun.call(this, v[1]);
@@ -43,18 +54,38 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
43 54
     setTimeout(() => {
44 55
       this.search();
45 56
     }, 0)
46
-    this.onResize();
57
+    this.onResize(0);
47 58
   }
48 59
 
49 60
   tableHeight:number = 0;
50 61
   @HostListener('window:resize')
51
-  onResize(): void {
62
+  onResize(height): void {
52 63
     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
-
64
+			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;
55 65
     }, 0)
56 66
   }
57
-
67
+	
68
+	getRouteQuery(){
69
+		let data = sessionStorage.getItem('maintenanceData')
70
+		let query = null
71
+		if(data){
72
+			query = JSON.parse(data)
73
+			console.log('query==========',query)
74
+			if(query.startData){
75
+				this.customChangeDateComponent.startDate = query.startData
76
+			}
77
+			if(query.endDate){
78
+				this.customChangeDateComponent.startDate = query.endDate
79
+			}
80
+			if(query.searchQuery){
81
+				this.fieldConfig.fields = query.searchQuery
82
+			}
83
+			
84
+			this.search();
85
+			this.onResize(37);
86
+		}
87
+	}
88
+	
58 89
   getQueryParams(){
59 90
     let queryParams = this.tabService.getQueryParams();
60 91
     this.tabService.clearQueryParams();
@@ -65,7 +96,11 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
65 96
   }
66 97
 
67 98
   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.sourceDTO;
99
+    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || 
100
+		this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || 
101
+		this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO  || 
102
+		this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || 
103
+		this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
69 104
     return flag ? 37 : 0;
70 105
   }
71 106
 
@@ -129,17 +164,31 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
129 164
       categoryId: this.fieldConfig.fields.categoryId || undefined,
130 165
       sourceId: this.fieldConfig.fields.sourceId || undefined,
131 166
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
167
+			workHourId: undefined,
168
+			buildingId: this.fieldConfig.fields.buildingId || undefined,
169
+			placeId: this.fieldConfig.fields.floorId || undefined,
170
+			companyId: this.fieldConfig.fields.companyId || undefined,
171
+			repairUserId: this.fieldConfig.fields.repairUserId || undefined,
172
+			consumableId: this.fieldConfig.fields.consumableId || undefined,
173
+			timeout: this.fieldConfig.fields.overtimeId==0 ? undefined : this.fieldConfig.fields.overtimeId,
174
+			hangUp: this.fieldConfig.fields.isHangId==0 ? undefined : this.fieldConfig.fields.isHangId,
175
+			incidentSign: this.fieldConfig.fields.codeNum,
176
+			wxDegreeId: this.fieldConfig.fields.evaluateId,
132 177
     };
133
-    if (field && sort) {
134
-      postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
135
-    }
178
+		
179
+		if(this.fieldConfig.fields.workHourParentId && this.fieldConfig.fields.workHourSmallId){
180
+			postData.workHourId = this.fieldConfig.fields.workHourSmallId
181
+		}
182
+		if(this.fieldConfig.fields.workHourParentId && !this.fieldConfig.fields.workHourSmallId){
183
+			postData.workHourId = this.fieldConfig.fields.workHourParentId
184
+		}
185
+		
136 186
     this.loading1 = true;
137 187
     this.mainService
138
-      .postCustom("itsm/report", "incidentWorkOrder", postData)
188
+      .postCustom("itsm/report", "incidentWorkOrderList", postData)
139 189
       .subscribe((result) => {
140 190
         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 });
191
+        this.listOfData = result.dataList;
143 192
         this.listLength = result.totalCount;
144 193
       });
145 194
   }
@@ -170,6 +219,8 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
170 219
       nzDuration: 0,
171 220
     }).messageId;
172 221
     let postData:any = {
222
+      idx: this.pageIndex - 1,
223
+      sum: this.pageSize,
173 224
       dateType: this.customChangeDateComponent.dateType,
174 225
       startDate: this.customChangeDateComponent.startDate || undefined,
175 226
       endDate: this.customChangeDateComponent.endDate || undefined,
@@ -182,12 +233,26 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
182 233
       categoryId: this.fieldConfig.fields.categoryId || undefined,
183 234
       sourceId: this.fieldConfig.fields.sourceId || undefined,
184 235
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
236
+    	workHourId: undefined,
237
+    	buildingId: this.fieldConfig.fields.buildingId || undefined,
238
+    	placeId: this.fieldConfig.fields.floorId || undefined,
239
+    	companyId: this.fieldConfig.fields.companyId || undefined,
240
+    	repairUserId: this.fieldConfig.fields.repairUserId || undefined,
241
+    	consumableId: this.fieldConfig.fields.consumableId || undefined,
242
+    	timeout: this.fieldConfig.fields.overtimeId==0 ? undefined : this.fieldConfig.fields.overtimeId,
243
+    	hangUp: this.fieldConfig.fields.isHangId==0 ? undefined : this.fieldConfig.fields.isHangId,
244
+    	incidentSign: this.fieldConfig.fields.codeNum,
245
+			wxDegreeId: this.fieldConfig.fields.evaluateId,
185 246
     };
186
-    if (this.sortCurrentKey && this.sortCurrentValue) {
187
-      postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
247
+    
248
+    if(this.fieldConfig.fields.workHourParentId && this.fieldConfig.fields.workHourSmallId){
249
+    	postData.workHourId = this.fieldConfig.fields.workHourSmallId
250
+    }
251
+    if(this.fieldConfig.fields.workHourParentId && !this.fieldConfig.fields.workHourSmallId){
252
+    	postData.workHourId = this.fieldConfig.fields.workHourParentId
188 253
     }
189 254
     this.mainService
190
-      .postExportCustom("itsm/export", "incidentWorkOrder", postData)
255
+      .postExportCustom("itsm/export", "incidentWorkOrderList", postData)
191 256
       .subscribe((data) => {
192 257
         this.message.remove(this.excelExportLoading);
193 258
         this.excelExportLoading = false;
@@ -219,6 +284,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
219 284
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined};
220 285
     this.customChangeDateComponent.resetByDate();
221 286
     this.search();
287
+		this.onResize(0);
222 288
   }
223 289
 
224 290
   // 科室搜索
@@ -232,7 +298,24 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
232 298
     this.isLoading = true;
233 299
     this.searchTimerSubject.next([fun, e]);
234 300
   }
235
-
301
+	
302
+	// 查看工单详情
303
+	coopData:any;
304
+	detailModalShow = false; //弹窗开关
305
+	viewDetail(data) {
306
+	  this.coopData = data;
307
+	  this.detailModalShow = true;
308
+	}
309
+	// 关闭弹窗
310
+	closeDetailModelOrder(e) {
311
+	  this.detailModalShow = JSON.parse(e).show;
312
+	}
313
+	// 弹窗确定
314
+	confirmDetailModelOrder(e){
315
+	  this.detailModalShow = false;
316
+	  this.getList();
317
+	}
318
+	
236 319
   openChangeRepairDept(flag){
237 320
     flag && this.getRepairDeptList();
238 321
   }
@@ -260,8 +343,10 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
260 343
 
261 344
   // 详细搜索
262 345
   fieldConfig:any = {
263
-    fields: {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined},
264
-    config: {groupAndUser: true, category123: true, source: true},
346
+    fields: {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: 
347
+		undefined,buildingId: undefined, floorId: undefined, companyId: undefined, 
348
+		workHourParentId: undefined, workHourSmallId: undefined, evaluateId: undefined, repairUserId: undefined, consumableId: undefined, isHangId: undefined, codeNum: undefined, overtimeId: undefined},
349
+    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},
265 350
   }
266 351
   showSearchMore:boolean = false;
267 352
   showMore(){
@@ -277,6 +362,6 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
277 362
     this.fieldConfig.fields = fields;
278 363
     console.log('this.fieldConfig.fields:', this.fieldConfig.fields)
279 364
     this.search();
280
-    this.onResize();
365
+    this.onResize(37);
281 366
   }
282 367
 }

+ 2 - 1
src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.module.ts

@@ -7,7 +7,7 @@ import { ShareModule } from 'src/app/share/share.module';
7 7
 import { VirtualScrollerModule } from 'ngx-virtual-scroller';
8 8
 import { SearchMoreModule } from '../../components/search-more/search-more.module';
9 9
 import { CustomChangeDateModule } from '../../components/custom-change-date/custom-change-date.module';
10
-
10
+import { IncidentDetailModule } from 'src/app/components/incidentManagement/incident-detail/incident-detail.module';
11 11
 
12 12
 @NgModule({
13 13
   declarations: [
@@ -20,6 +20,7 @@ import { CustomChangeDateModule } from '../../components/custom-change-date/cust
20 20
     VirtualScrollerModule,
21 21
     SearchMoreModule,
22 22
     CustomChangeDateModule,
23
+		IncidentDetailModule
23 24
   ]
24 25
 })
25 26
 export class IncidentListModule { }

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

@@ -30,7 +30,7 @@
30 30
 		overflow-x: hidden;
31 31
     height: 100%;
32 32
     .secondMenu{
33
-      width: 175px;
33
+      width: 160px;
34 34
       height: 100%;
35 35
       background-color: #fff;
36 36
       margin-right: 8px;

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

@@ -11,7 +11,7 @@
11 11
   <ng-container *ngIf="!isLoading">
12 12
     <div class="top1-statistics">
13 13
       <div class="top-list">
14
-        <div class="special-box">
14
+        <div class="special-box" (click)="viewDetail1()">
15 15
           <div class="num">{{workData.gd_total || 0}}</div>
16 16
           <div class="describe">工单总数</div>
17 17
         </div>
@@ -34,21 +34,21 @@
34 34
         <div class="border"></div>
35 35
       </div>
36 36
       <div class="top-list">
37
-        <div class="special-box">
37
+        <div class="special-box" (click)="viewDetail2()">
38 38
           <div class="num">{{workData.gd_postpone || 0}}</div>
39 39
           <div class="describe">挂起单数</div>
40 40
         </div>
41 41
         <div class="border"></div>
42 42
       </div>
43 43
       <div class="top-list">
44
-        <div class="special-box">
44
+        <div class="special-box" (click)="viewDetail3()">
45 45
           <div class="num">{{workData.gd_overtime || 0}}</div>
46 46
           <div class="describe">超时单数</div>
47 47
         </div>
48 48
         <div class="border"></div>
49 49
       </div>
50 50
       <div class="top-list">
51
-        <div class="special-box">
51
+        <div class="special-box" (click)="viewDetail4()">
52 52
           <div class="num">{{workData.gd_degree}}</div>
53 53
           <div class="describe">差评单数</div>
54 54
         </div>
@@ -83,10 +83,10 @@
83 83
               <span *ngIf="index !=0 && index !=1 && index !=2">{{index+1}}</span>
84 84
             </div>
85 85
             <div class="table-list">{{item.name}}</div>
86
-            <div class="table-list">{{item.count || 0}}</div>
86
+            <div class="table-list" (click)="viewMaintain1(item)">{{item.count || 0}}</div>
87 87
             <div class="table-list">{{item.avg_response}}分</div>
88 88
             <div class="table-list">{{item.avg_handle }}分</div>
89
-            <div class="table-list">{{item.overtime || 0}}</div>
89
+            <div class="table-list" (click)="viewMaintain2(item)">{{item.overtime || 0}}</div>
90 90
           </div>
91 91
         </div>
92 92
       </div>
@@ -140,7 +140,7 @@
140 140
           <div class="th" *ngFor="let item of deptCostData; let index = index;">
141 141
             <div class="table-list-4">{{index+1}}</div>
142 142
             <div class="table-list-4 ellipsis-oneline" title="{{item.dept}}">{{item.dept}}</div>
143
-            <div class="table-list-4">{{item.sum || 0}}</div>
143
+            <div class="table-list-4" (click)="viewDept(item)">{{item.sum || 0}}</div>
144 144
             <div class="table-list-4">{{item.sum_price || 0}}</div>
145 145
           </div>
146 146
         </div>

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

@@ -48,6 +48,7 @@
48 48
 					right: 0;
49 49
 				}
50 50
 				.special-box{
51
+					cursor: pointer;
51 52
 					text-align: center;
52 53
 					position: relative;
53 54
 					top: -5px;

+ 101 - 1
src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.ts

@@ -69,7 +69,107 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
69 69
       this.search();
70 70
     }, 0)
71 71
   }
72
-
72
+	
73
+	/*========= 数据下钻 ========*/
74
+	
75
+	// 汇总
76
+	viewDetail1(){
77
+		let query = {
78
+			startDate: this.customChangeDateComponent.startDate,
79
+			endDate: this.customChangeDateComponent.endDate
80
+		}
81
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
82
+		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
83
+	}
84
+	
85
+	// 挂起
86
+	viewDetail2(){
87
+		let query = {
88
+			startDate: this.customChangeDateComponent.startDate,
89
+			endDate: this.customChangeDateComponent.endDate,
90
+			searchQuery:{
91
+				isHangId: 1
92
+			}
93
+		}
94
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
95
+		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
96
+	}
97
+	
98
+	// 超时
99
+	viewDetail3(){
100
+		let query = {
101
+			startDate: this.customChangeDateComponent.startDate,
102
+			endDate: this.customChangeDateComponent.endDate,
103
+			searchQuery:{
104
+				overtimeId: 1
105
+			}
106
+		}
107
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
108
+		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
109
+	}
110
+	
111
+	// 差评
112
+	viewDetail4(){
113
+		let query = {
114
+			startDate: this.customChangeDateComponent.startDate,
115
+			endDate: this.customChangeDateComponent.endDate,
116
+			searchQuery:{
117
+				wxDegreeId: 20424
118
+			}
119
+		}
120
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
121
+		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
122
+	}
123
+	
124
+	// 维修处理top5
125
+	viewMaintain1(data){
126
+		let query = {
127
+			startDate: this.customChangeDateComponent.startDate,
128
+			endDate: this.customChangeDateComponent.endDate,
129
+			searchQuery:{
130
+				statusValue: 'close',
131
+				groupId:null,
132
+				userId:null
133
+			}
134
+		}
135
+		if(this.activeIndex==0){
136
+			query.searchQuery.userId = data.userId
137
+			delete query.searchQuery.groupId
138
+		}else{
139
+			query.searchQuery.groupId = data.groupId
140
+			delete query.searchQuery.userId
141
+		}
142
+		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
143
+		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
144
+	}
145
+	
146
+	viewMaintain2(data){
147
+		let query = {
148
+			startDate: this.customChangeDateComponent.startDate,
149
+			endDate: this.customChangeDateComponent.endDate,
150
+			searchQuery:{
151
+				statusValue: 'close',
152
+				groupId:null,
153
+				userId:null,
154
+				overtimeId: 1
155
+			}
156
+		}
157
+		if(this.activeIndex==0){
158
+			query.searchQuery.userId = data.userId
159
+			delete query.searchQuery.groupId
160
+		}else{
161
+			query.searchQuery.groupId = data.groupId
162
+			delete query.searchQuery.userId
163
+		}
164
+		sessionStorage.setItem('maintenanceData',JSON.stringify(query))
165
+		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
166
+	}
167
+	
168
+	// 课科室费用top5
169
+	viewDept(data){
170
+		this.router.navigateByUrl('/newStatistics/maintenanceStatistics/incidentList')
171
+	}
172
+	
73 173
 	// 维修处理类型切换
74 174
 	selectCheck(type){
75 175
 		this.activeIndex = type

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

@@ -24,6 +24,7 @@ export class NewStatisticsComponent implements OnInit, OnDestroy {
24 24
   }
25 25
 
26 26
   ngOnDestroy(){
27
+		sessionStorage.removeItem('maintenanceData')
27 28
     this.tabService.deleteAllRouteSnapshot();
28 29
   }
29 30
 
@@ -121,5 +122,6 @@ export class NewStatisticsComponent implements OnInit, OnDestroy {
121 122
   // 返回
122 123
   goBack(){
123 124
     this.router.navigate(['/main/home']);
125
+		sessionStorage.removeItem('maintenanceData')
124 126
   }
125 127
 }