소스 검색

护士端统计

seimin 1 주 전
부모
커밋
3ecde76dc9
67개의 변경된 파일1936개의 추가작업 그리고 444개의 파일을 삭제
  1. 6 4
      src/app/views/inspect-search/inspect-search.component.ts
  2. 1 1
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.html
  3. 1 0
      src/app/views/new-statistics/components/query-range/query-range.component.ts
  4. 1 1
      src/app/views/new-statistics/components/search-more/search-more.component.html
  5. 48 18
      src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.ts
  6. 47 13
      src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.ts
  7. 49 18
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.ts
  8. 2 2
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.html
  9. 47 18
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.ts
  10. 2 2
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.html
  11. 50 25
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.ts
  12. 2 2
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.html
  13. 62 41
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.ts
  14. 2 2
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.html
  15. 55 30
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.ts
  16. 42 2
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.component.ts
  17. 13 2
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.html
  18. 3 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.less
  19. 104 12
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.ts
  20. 41 2
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-user-evaluate-statistics/distribution-user-evaluate-statistics.component.ts
  21. 49 18
      src/app/views/new-statistics/distribution-inspection-statistics/hour-quality-control-statistics/hour-quality-control-statistics.component.ts
  22. 68 12
      src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.ts
  23. 1 1
      src/app/views/new-statistics/distribution-inspection-statistics/source-statistics/source-statistics.component.html
  24. 35 2
      src/app/views/new-statistics/distribution-inspection-statistics/source-statistics/source-statistics.component.ts
  25. 48 18
      src/app/views/new-statistics/distribution-inspection-statistics/taskType-quality-control-statistics/taskType-quality-control-statistics.component.ts
  26. 39 2
      src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.component.ts
  27. 41 6
      src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.component.ts
  28. 2 1
      src/app/views/new-statistics/maintenance-statistics/building-statistics/building-statistics.component.html
  29. 42 4
      src/app/views/new-statistics/maintenance-statistics/building-statistics/building-statistics.component.ts
  30. 50 10
      src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.ts
  31. 2 1
      src/app/views/new-statistics/maintenance-statistics/category-source-statistics/category-source-statistics.component.html
  32. 46 4
      src/app/views/new-statistics/maintenance-statistics/category-source-statistics/category-source-statistics.component.ts
  33. 55 15
      src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.ts
  34. 48 8
      src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.ts
  35. 1 1
      src/app/views/new-statistics/maintenance-statistics/consumable-statistics/consumable-statistics.component.html
  36. 35 2
      src/app/views/new-statistics/maintenance-statistics/consumable-statistics/consumable-statistics.component.ts
  37. 2 2
      src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.html
  38. 54 21
      src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.ts
  39. 2 2
      src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.html
  40. 50 17
      src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.ts
  41. 2 2
      src/app/views/new-statistics/maintenance-statistics/department-source-statistics/department-source-statistics.component.html
  42. 41 8
      src/app/views/new-statistics/maintenance-statistics/department-source-statistics/department-source-statistics.component.ts
  43. 2 1
      src/app/views/new-statistics/maintenance-statistics/floor-statistics/floor-statistics.component.html
  44. 42 4
      src/app/views/new-statistics/maintenance-statistics/floor-statistics/floor-statistics.component.ts
  45. 2 1
      src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.html
  46. 57 9
      src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.ts
  47. 1 1
      src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.html
  48. 35 2
      src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.ts
  49. 1 1
      src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.html
  50. 40 7
      src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.ts
  51. 44 2
      src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics.component.ts
  52. 45 6
      src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics.component.ts
  53. 50 18
      src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics.component.ts
  54. 1 1
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.html
  55. 33 6
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.ts
  56. 45 7
      src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.ts
  57. 48 9
      src/app/views/new-statistics/maintenance-statistics/user-evaluate-statistics/user-evaluate-statistics.component.ts
  58. 2 1
      src/app/views/new-statistics/maintenance-statistics/user-statistics/user-statistics.component.html
  59. 53 4
      src/app/views/new-statistics/maintenance-statistics/user-statistics/user-statistics.component.ts
  60. 1 1
      src/app/views/new-statistics/maintenance-statistics/work-hour-big-statistics/work-hour-big-statistics.component.html
  61. 35 2
      src/app/views/new-statistics/maintenance-statistics/work-hour-big-statistics/work-hour-big-statistics.component.ts
  62. 1 1
      src/app/views/new-statistics/maintenance-statistics/work-hour-small-statistics/work-hour-small-statistics.component.html
  63. 35 2
      src/app/views/new-statistics/maintenance-statistics/work-hour-small-statistics/work-hour-small-statistics.component.ts
  64. 1 1
      src/app/views/new-statistics/phone-statistics/date-phone-statistics/date-phone-statistics.component.html
  65. 35 2
      src/app/views/new-statistics/phone-statistics/date-phone-statistics/date-phone-statistics.component.ts
  66. 1 1
      src/app/views/new-statistics/phone-statistics/department-phone-statistics/department-phone-statistics.component.html
  67. 35 2
      src/app/views/new-statistics/phone-statistics/department-phone-statistics/department-phone-statistics.component.ts

+ 6 - 4
src/app/views/inspect-search/inspect-search.component.ts

@@ -26,6 +26,7 @@ export class InspectSearchComponent implements OnInit {
26 26
   checkOptionsOne: Array<any> = [
27 27
     { label: "未标记检查科室", value: "0", checked: false },
28 28
     { label: "无预约时间检查", value: "1", checked: false },
29
+    { label: "入库时间排序", value: "0", checked: false },
29 30
   ];
30 31
 
31 32
   dateRange: any = []; //入库时间区间
@@ -46,7 +47,7 @@ export class InspectSearchComponent implements OnInit {
46 47
   listLength: number = 10; //表格总数据量
47 48
   changeInpSubject = new Subject();
48 49
 	hosId:any = this.tool.getCurrentHospital().id; //当前院区
49
-	
50
+
50 51
   ngOnInit() {
51 52
 		this.getTaskType();
52 53
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
@@ -103,7 +104,7 @@ export class InspectSearchComponent implements OnInit {
103 104
     this.allHospital = [this.tool.getCurrentHospital()];
104 105
     this.searchCriteria.hospital = this.tool.getCurrentHospital().id;
105 106
   }
106
-	
107
+
107 108
 	//获取任务类型
108 109
 	 tasktype:any = {};// 任务类型
109 110
 	getTaskType() {
@@ -130,7 +131,7 @@ export class InspectSearchComponent implements OnInit {
130 131
 	      }
131 132
 	    });
132 133
 	}
133
-	
134
+
134 135
 	 // 获取配置
135 136
 	 configs:any = {};
136 137
 	 getConfig() {
@@ -155,7 +156,7 @@ export class InspectSearchComponent implements OnInit {
155 156
 	       }
156 157
 	     });
157 158
 	 }
158
-	 
159
+
159 160
   // 查看标本历史记录
160 161
   historyPromptModalShow = false; //标本历史记录弹窗开关
161 162
   scode = ""; //查看历史记录携带
@@ -224,6 +225,7 @@ export class InspectSearchComponent implements OnInit {
224 225
       createEndTime: this.dateRange.length ? format(this.dateRange[1], 'yyyy-MM-dd HH:mm:ss') : undefined,
225 226
       noneEndDept: this.checkOptionsOne[0].checked ? true : undefined,
226 227
       noneYytime: this.checkOptionsOne[1].checked ? true : undefined,
228
+      sortType: this.checkOptionsOne[2].checked ? true : undefined,
227 229
       queryInspect: 1,//带检查项目
228 230
     };
229 231
     this.loading1 = true;

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

@@ -91,7 +91,7 @@
91 91
         <nz-form-item [hidden]="!fieldConfig.config.dept">
92 92
           <nz-form-label [nzSpan]="6" nzFor="deptId">科<span style="visibility: hidden;">囧囧</span>室</nz-form-label>
93 93
           <nz-form-control [nzSpan]="17" nzErrorTip="请选择科室!">
94
-            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" formControlName="deptId" nzPlaceHolder="请选择科室" (nzOpenChange)="openChangeRepairDept($event)" (ngModelChange)="setIsSelecting(true)">
94
+            <nz-select [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" formControlName="deptId" nzPlaceHolder="请选择科室" (nzOpenChange)="openChangeRepairDept($event)" (ngModelChange)="setIsSelecting(true)">
95 95
               <ng-container *ngFor="let option of deptList">
96 96
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
97 97
               </ng-container>

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

@@ -15,6 +15,7 @@ export class QueryRangeComponent implements OnInit {
15 15
   @Output() submitQueryRange = new EventEmitter();
16 16
   @Output() cancelQueryRange = new EventEmitter();
17 17
   @Input() queryType: number;
18
+  @Input() realQueryType: number;
18 19
   @Input() hospital: any;
19 20
   @Input() duty: any;
20 21
 	@Input() parent: any;

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

@@ -175,7 +175,7 @@
175 175
         <nz-form-item [hidden]="!fieldConfig.config.repairDept">
176 176
           <nz-form-label [nzSpan]="6" nzFor="repairDeptId">报修科室</nz-form-label>
177 177
           <nz-form-control [nzSpan]="16" nzErrorTip="请选择报修科室!">
178
-            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" formControlName="repairDeptId" nzPlaceHolder="请选择报修科室" (nzOpenChange)="openChangeRepairDept($event)" (ngModelChange)="setIsSelecting(true)">
178
+            <nz-select [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" formControlName="repairDeptId" nzPlaceHolder="请选择报修科室" (nzOpenChange)="openChangeRepairDept($event)" (ngModelChange)="setIsSelecting(true)">
179 179
               <ng-container *ngFor="let option of repairDeptList">
180 180
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
181 181
               </ng-container>

+ 48 - 18
src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.ts

@@ -54,10 +54,9 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
54 54
 			query = {
55 55
 				startDate: this.customChangeDateComponent.startDate || undefined,
56 56
 				endDate: this.customChangeDateComponent.endDate || undefined,
57
+        deptId: this.fieldConfig.fields.deptId || undefined,
57 58
 				searchQuery:{
58 59
 					statusValue: 'close',
59
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
60
-					deptId: this.fieldConfig.fields.deptId || undefined,
61 60
 					groupId: this.fieldConfig.fields.groupId || undefined,
62 61
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
63 62
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -71,10 +70,9 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
71 70
 				startDate: this.customChangeDateComponent.startDate || undefined,
72 71
 				endDate: this.customChangeDateComponent.endDate || undefined,
73 72
 				statisticsTypeId: data.statisticsTypeId || undefined,
73
+        deptId: this.fieldConfig.fields.deptId || undefined,
74 74
 				searchQuery:{
75 75
 					statusValue: 'close',
76
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
77
-					deptId: this.fieldConfig.fields.deptId || undefined,
78 76
 					groupId: this.fieldConfig.fields.groupId || undefined,
79 77
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
80 78
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -100,10 +98,9 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
100 98
 			query = {
101 99
 				startDate: this.customChangeDateComponent.startDate || undefined,
102 100
 				endDate: this.customChangeDateComponent.endDate || undefined,
101
+        deptId: this.fieldConfig.fields.deptId || undefined,
103 102
 				searchQuery:{
104 103
 					statusValue: 'close',
105
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
106
-					deptId: this.fieldConfig.fields.deptId || undefined,
107 104
 					groupId: this.fieldConfig.fields.groupId || undefined,
108 105
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
109 106
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -119,10 +116,9 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
119 116
 				startDate: this.customChangeDateComponent.startDate || undefined,
120 117
 				endDate: this.customChangeDateComponent.endDate || undefined,
121 118
 				statisticsTypeId: data.statisticsTypeId || undefined,
119
+        deptId: this.fieldConfig.fields.deptId || undefined,
122 120
 				searchQuery:{
123 121
 					statusValue: 'close',
124
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
125
-					deptId: this.fieldConfig.fields.deptId || undefined,
126 122
 					groupId: this.fieldConfig.fields.groupId || undefined,
127 123
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
128 124
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -150,10 +146,9 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
150 146
 			query = {
151 147
 				startDate: this.customChangeDateComponent.startDate || undefined,
152 148
 				endDate: this.customChangeDateComponent.endDate || undefined,
149
+        deptId: this.fieldConfig.fields.deptId || undefined,
153 150
 				searchQuery:{
154 151
 					statusValue: 'close',
155
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
156
-					deptId: this.fieldConfig.fields.deptId || undefined,
157 152
 					groupId: this.fieldConfig.fields.groupId || undefined,
158 153
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
159 154
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -172,10 +167,9 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
172 167
 				startDate: this.customChangeDateComponent.startDate || undefined,
173 168
 				endDate: this.customChangeDateComponent.endDate || undefined,
174 169
 				statisticsTypeId: data.statisticsTypeId || undefined,
170
+        deptId: this.fieldConfig.fields.deptId || undefined,
175 171
 				searchQuery:{
176 172
 					statusValue: 'close',
177
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
178
-					deptId: this.fieldConfig.fields.deptId || undefined,
179 173
 					groupId: this.fieldConfig.fields.groupId || undefined,
180 174
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
181 175
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -206,10 +200,9 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
206 200
 			query = {
207 201
 				startDate: this.customChangeDateComponent.startDate || undefined,
208 202
 				endDate: this.customChangeDateComponent.endDate || undefined,
203
+        deptId: this.fieldConfig.fields.deptId || undefined,
209 204
 				searchQuery:{
210 205
 					statusValue: 'close',
211
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
212
-					deptId: this.fieldConfig.fields.deptId || undefined,
213 206
 					groupId: this.fieldConfig.fields.groupId || undefined,
214 207
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
215 208
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -228,10 +221,9 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
228 221
 				startDate: this.customChangeDateComponent.startDate || undefined,
229 222
 				endDate: this.customChangeDateComponent.endDate || undefined,
230 223
 				statisticsTypeId: data.statisticsTypeId || undefined,
224
+        deptId: this.fieldConfig.fields.deptId || undefined,
231 225
 				searchQuery:{
232 226
 					statusValue: 'close',
233
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
234
-					deptId: this.fieldConfig.fields.deptId || undefined,
235 227
 					groupId: this.fieldConfig.fields.groupId || undefined,
236 228
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
237 229
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -275,13 +267,16 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
275 267
   hosId:any;
276 268
   dutyId:any;
277 269
   parentDutyId:any;
278
-  initSessionData(){
270
+  async initSessionData(){
279 271
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
280 272
     let queryType:any = newStatistics.queryType;
273
+    let realQueryType:any = newStatistics.realQueryType;
281 274
     let hosId:any = newStatistics.hospitalId;
282 275
     let dutyId:any = newStatistics.dutyId;
276
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
283 277
 
284 278
     queryType = queryType ? +queryType : undefined;
279
+    realQueryType = realQueryType ? +realQueryType : undefined;
285 280
     hosId = hosId ? +hosId : undefined;
286 281
     dutyId = dutyId ? +dutyId : undefined;
287 282
 
@@ -302,6 +297,35 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
302 297
       this.hosId = undefined;
303 298
       this.dutyId = undefined;
304 299
       this.parentDutyId = dutyId;
300
+    }else if(queryType == 5){
301
+      this.fieldConfig.fields.deptId = currentDeptDTO.id;
302
+      let postData = {
303
+        department: {
304
+          id: currentDeptDTO.id,
305
+          searchType: 1,
306
+        },
307
+        idx: 0,
308
+        sum: 1,
309
+      };
310
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
311
+      this.fieldConfig.fields.deptDTO = result.list.length ? result.list[0] : undefined;
312
+      if(realQueryType == 1){
313
+        this.hosId = undefined;
314
+        this.dutyId = undefined;
315
+        this.parentDutyId = undefined;
316
+      }else if(realQueryType == 2){
317
+        this.hosId = hosId;
318
+        this.dutyId = undefined;
319
+        this.parentDutyId = undefined;
320
+      }else if(realQueryType == 3){
321
+        this.hosId = undefined;
322
+        this.dutyId = dutyId;
323
+        this.parentDutyId = undefined;
324
+      }else if(realQueryType == 4){
325
+        this.hosId = undefined;
326
+        this.dutyId = undefined;
327
+        this.parentDutyId = dutyId;
328
+      }
305 329
     }
306 330
   }
307 331
 
@@ -406,7 +430,13 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
406 430
 		this.sortCurrentValue = "";
407 431
 		this.sortCurrent = {};
408 432
     this.dateRange = []
409
-    this.fieldConfig.fields = {groupId: undefined, userId: undefined, buildingId: undefined, deptId: undefined};
433
+    this.fieldConfig.fields = {
434
+      groupId: undefined,
435
+      userId: undefined,
436
+      buildingId: undefined,
437
+      deptId: this.queryType == 5 ? this.fieldConfig.fields.deptId : undefined,
438
+      deptDTO: this.queryType == 5 ? this.fieldConfig.fields.deptDTO : undefined,
439
+    };
410 440
     this.customChangeDateComponent.resetByDate();
411 441
     setTimeout(_=>{
412 442
     	this.search();

+ 47 - 13
src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.ts

@@ -46,7 +46,7 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
46 46
 
47 47
     }, 0)
48 48
   }
49
-	
49
+
50 50
 	// 数据下钻
51 51
 	viewDetail1(data, type){
52 52
 		let query = null
@@ -54,10 +54,9 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
54 54
 			query = {
55 55
 				startDate: this.customChangeDateComponent.startDate || undefined,
56 56
 				endDate: this.customChangeDateComponent.endDate || undefined,
57
+				deptId: this.fieldConfig.fields.deptId,
57 58
 				searchQuery:{
58 59
 					statusValue: 'close',
59
-					deptDTO: this.fieldConfig.fields.deptDTO,
60
-					deptId: this.fieldConfig.fields.deptId,
61 60
 					groupId: this.fieldConfig.fields.groupId || undefined,
62 61
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
63 62
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -77,10 +76,9 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
77 76
 			query = {
78 77
 				startDate: data.date + ' ' + '00:00:00' || undefined,
79 78
 				endDate: data.date + ' ' + '23:59:59' || undefined,
79
+        deptId: this.fieldConfig.fields.deptId,
80 80
 				searchQuery:{
81 81
 					statusValue: 'close',
82
-					deptDTO: this.fieldConfig.fields.deptDTO,
83
-					deptId: this.fieldConfig.fields.deptId,
84 82
 					groupId: this.fieldConfig.fields.groupId || undefined,
85 83
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
86 84
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -98,7 +96,7 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
98 96
 			this.router.navigate([path], { replaceUrl: true });
99 97
 		}
100 98
 	}
101
-	
99
+
102 100
 	// 数据下钻
103 101
 	viewDetail2(data, sublevel, type){
104 102
 		let query = null
@@ -107,10 +105,9 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
107 105
 				startDate: this.customChangeDateComponent.startDate || undefined,
108 106
 				endDate: this.customChangeDateComponent.endDate || undefined,
109 107
 				statisticsTypeId: data[sublevel.value + 'StatisticsTypeId'] ? Number(data[sublevel.value + 'StatisticsTypeId']) : -1,
108
+        deptId: this.fieldConfig.fields.deptId,
110 109
 				searchQuery:{
111 110
 					statusValue: 'close',
112
-					deptDTO: this.fieldConfig.fields.deptDTO,
113
-					deptId: this.fieldConfig.fields.deptId,
114 111
 					groupId: this.fieldConfig.fields.groupId || undefined,
115 112
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
116 113
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -131,10 +128,9 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
131 128
 				startDate: data.date + ' ' + '00:00:00' || undefined,
132 129
 				endDate: data.date + ' ' + '23:59:59' || undefined,
133 130
 				statisticsTypeId: data[sublevel.value + 'StatisticsTypeId'] ? Number(data[sublevel.value + 'StatisticsTypeId']) : -1,
131
+        deptId: this.fieldConfig.fields.deptId,
134 132
 				searchQuery:{
135 133
 					statusValue: 'close',
136
-					deptDTO: this.fieldConfig.fields.deptDTO,
137
-					deptId: this.fieldConfig.fields.deptId,
138 134
 					groupId: this.fieldConfig.fields.groupId || undefined,
139 135
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
140 136
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -152,7 +148,7 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
152 148
 			this.router.navigate([path], { replaceUrl: true });
153 149
 		}
154 150
 	}
155
-	
151
+
156 152
   getQueryParams(){
157 153
     let queryParams = this.tabService.getQueryParams();
158 154
     this.tabService.clearQueryParams();
@@ -172,13 +168,16 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
172 168
   hosId:any;
173 169
   dutyId:any;
174 170
   parentDutyId:any;
175
-  initSessionData(){
171
+  async initSessionData(){
176 172
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
177 173
     let queryType:any = newStatistics.queryType;
174
+    let realQueryType:any = newStatistics.realQueryType;
178 175
     let hosId:any = newStatistics.hospitalId;
179 176
     let dutyId:any = newStatistics.dutyId;
177
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
180 178
 
181 179
     queryType = queryType ? +queryType : undefined;
180
+    realQueryType = realQueryType ? +realQueryType : undefined;
182 181
     hosId = hosId ? +hosId : undefined;
183 182
     dutyId = dutyId ? +dutyId : undefined;
184 183
 
@@ -199,6 +198,35 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
199 198
       this.hosId = undefined;
200 199
       this.dutyId = undefined;
201 200
       this.parentDutyId = dutyId;
201
+    }else if(queryType == 5){
202
+      this.fieldConfig.fields.deptId = currentDeptDTO.id;
203
+      let postData = {
204
+        department: {
205
+          id: currentDeptDTO.id,
206
+          searchType: 1,
207
+        },
208
+        idx: 0,
209
+        sum: 1,
210
+      };
211
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
212
+      this.fieldConfig.fields.deptDTO = result.list.length ? result.list[0] : undefined;
213
+      if(realQueryType == 1){
214
+        this.hosId = undefined;
215
+        this.dutyId = undefined;
216
+        this.parentDutyId = undefined;
217
+      }else if(realQueryType == 2){
218
+        this.hosId = hosId;
219
+        this.dutyId = undefined;
220
+        this.parentDutyId = undefined;
221
+      }else if(realQueryType == 3){
222
+        this.hosId = undefined;
223
+        this.dutyId = dutyId;
224
+        this.parentDutyId = undefined;
225
+      }else if(realQueryType == 4){
226
+        this.hosId = undefined;
227
+        this.dutyId = undefined;
228
+        this.parentDutyId = dutyId;
229
+      }
202 230
     }
203 231
   }
204 232
 
@@ -317,7 +345,13 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
317 345
 		this.sortCurrentValue = "";
318 346
 		this.sortCurrent = {};
319 347
     this.dateRange = []
320
-    this.fieldConfig.fields = {groupId: undefined, userId: undefined, buildingId: undefined, deptId: undefined};
348
+    this.fieldConfig.fields = {
349
+      groupId: undefined,
350
+      userId: undefined,
351
+      buildingId: undefined,
352
+      deptId: this.queryType == 5 ? this.fieldConfig.fields.deptId : undefined,
353
+      deptDTO: this.queryType == 5 ? this.fieldConfig.fields.deptDTO : undefined,
354
+    };
321 355
     this.customChangeDateComponent.resetByDate();
322 356
     setTimeout(_=>{
323 357
     	this.search();

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

@@ -55,10 +55,9 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
55 55
 				startDate: this.customChangeDateComponent.startDate || undefined,
56 56
 				endDate: this.customChangeDateComponent.endDate || undefined,
57 57
 				statisticsTypeId: this.statisticsTypeId || undefined,
58
+        deptId: this.fieldConfig.fields.deptId || undefined,
58 59
 				searchQuery:{
59 60
 					statusValue: 'close',
60
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
61
-					deptId: this.fieldConfig.fields.deptId || undefined,
62 61
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
63 62
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
64 63
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -81,10 +80,9 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
81 80
 				startDate: this.customChangeDateComponent.startDate || undefined,
82 81
 				endDate: this.customChangeDateComponent.endDate || undefined,
83 82
 				statisticsTypeId: this.statisticsTypeId || undefined,
83
+        deptId: this.fieldConfig.fields.deptId || undefined,
84 84
 				searchQuery:{
85 85
 					statusValue: 'close',
86
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
87
-					deptId: this.fieldConfig.fields.deptId || undefined,
88 86
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
89 87
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
90 88
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -112,10 +110,9 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
112 110
 				startDate: this.customChangeDateComponent.startDate || undefined,
113 111
 				endDate: this.customChangeDateComponent.endDate || undefined,
114 112
 				statisticsTypeId: this.statisticsTypeId || undefined,
113
+        deptId: this.fieldConfig.fields.deptId || undefined,
115 114
 				searchQuery:{
116 115
 					statusValue: 'close',
117
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
118
-					deptId: this.fieldConfig.fields.deptId || undefined,
119 116
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
120 117
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
121 118
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -140,10 +137,9 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
140 137
 				startDate: this.customChangeDateComponent.startDate || undefined,
141 138
 				endDate: this.customChangeDateComponent.endDate || undefined,
142 139
 				statisticsTypeId: data.statisticsTypeId || undefined,
140
+        deptId: this.fieldConfig.fields.deptId || undefined,
143 141
 				searchQuery:{
144 142
 					statusValue: 'close',
145
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
146
-					deptId: this.fieldConfig.fields.deptId || undefined,
147 143
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
148 144
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
149 145
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -173,10 +169,9 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
173 169
 				startDate: this.customChangeDateComponent.startDate || undefined,
174 170
 				endDate: this.customChangeDateComponent.endDate || undefined,
175 171
 				statisticsTypeId: this.statisticsTypeId || undefined,
172
+        deptId: this.fieldConfig.fields.deptId || undefined,
176 173
 				searchQuery:{
177 174
 					statusValue: 'close',
178
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
179
-					deptId: this.fieldConfig.fields.deptId || undefined,
180 175
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
181 176
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
182 177
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -204,10 +199,9 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
204 199
 				startDate: this.customChangeDateComponent.startDate || undefined,
205 200
 				endDate: this.customChangeDateComponent.endDate || undefined,
206 201
 				statisticsTypeId: this.statisticsTypeId || undefined,
202
+        deptId: this.fieldConfig.fields.deptId || undefined,
207 203
 				searchQuery:{
208 204
 					statusValue: 'close',
209
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
210
-					deptId: this.fieldConfig.fields.deptId || undefined,
211 205
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
212 206
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
213 207
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -240,10 +234,9 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
240 234
 				startDate: this.customChangeDateComponent.startDate || undefined,
241 235
 				endDate: this.customChangeDateComponent.endDate || undefined,
242 236
 				statisticsTypeId: this.statisticsTypeId || undefined,
237
+        deptId: this.fieldConfig.fields.deptId || undefined,
243 238
 				searchQuery:{
244 239
 					statusValue: 'close',
245
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
246
-					deptId: this.fieldConfig.fields.deptId || undefined,
247 240
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
248 241
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
249 242
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -271,10 +264,9 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
271 264
 				startDate: this.customChangeDateComponent.startDate || undefined,
272 265
 				endDate: this.customChangeDateComponent.endDate || undefined,
273 266
 				statisticsTypeId: this.statisticsTypeId || undefined,
267
+        deptId: this.fieldConfig.fields.deptId || undefined,
274 268
 				searchQuery:{
275 269
 					statusValue: 'close',
276
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
277
-					deptId: this.fieldConfig.fields.deptId || undefined,
278 270
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
279 271
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
280 272
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -319,13 +311,16 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
319 311
   hosId:any;
320 312
   dutyId:any;
321 313
   parentDutyId:any;
322
-  initSessionData(){
314
+  async initSessionData(){
323 315
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
324 316
     let queryType:any = newStatistics.queryType;
317
+    let realQueryType:any = newStatistics.realQueryType;
325 318
     let hosId:any = newStatistics.hospitalId;
326 319
     let dutyId:any = newStatistics.dutyId;
320
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
327 321
 
328 322
     queryType = queryType ? +queryType : undefined;
323
+    realQueryType = realQueryType ? +realQueryType : undefined;
329 324
     hosId = hosId ? +hosId : undefined;
330 325
     dutyId = dutyId ? +dutyId : undefined;
331 326
 
@@ -346,6 +341,35 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
346 341
       this.hosId = undefined;
347 342
       this.dutyId = undefined;
348 343
       this.parentDutyId = dutyId;
344
+    }else if(queryType == 5){
345
+      this.fieldConfig.fields.deptId = currentDeptDTO.id;
346
+      let postData = {
347
+        department: {
348
+          id: currentDeptDTO.id,
349
+          searchType: 1,
350
+        },
351
+        idx: 0,
352
+        sum: 1,
353
+      };
354
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
355
+      this.fieldConfig.fields.deptDTO = result.list.length ? result.list[0] : undefined;
356
+      if(realQueryType == 1){
357
+        this.hosId = undefined;
358
+        this.dutyId = undefined;
359
+        this.parentDutyId = undefined;
360
+      }else if(realQueryType == 2){
361
+        this.hosId = hosId;
362
+        this.dutyId = undefined;
363
+        this.parentDutyId = undefined;
364
+      }else if(realQueryType == 3){
365
+        this.hosId = undefined;
366
+        this.dutyId = dutyId;
367
+        this.parentDutyId = undefined;
368
+      }else if(realQueryType == 4){
369
+        this.hosId = undefined;
370
+        this.dutyId = undefined;
371
+        this.parentDutyId = dutyId;
372
+      }
349 373
     }
350 374
   }
351 375
 
@@ -457,7 +481,14 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
457 481
 		this.sortCurrent = {};
458 482
     this.dateRange = []
459 483
     this.statisticsTypeId = undefined;
460
-    this.fieldConfig.fields = {groupId: undefined, userId: undefined, taskTypeId: undefined, buildingId: undefined, deptId: undefined};
484
+    this.fieldConfig.fields = {
485
+      groupId: undefined,
486
+      userId: undefined,
487
+      taskTypeId: undefined,
488
+      buildingId: undefined,
489
+      deptId: this.queryType == 5 ? this.fieldConfig.fields.deptId : undefined,
490
+      deptDTO: this.queryType == 5 ? this.fieldConfig.fields.deptDTO : undefined,
491
+    };
461 492
     this.customChangeDateComponent.resetByDate();
462 493
     setTimeout(_=>{
463 494
     	this.search();

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

@@ -4,8 +4,8 @@
4 4
 
5 5
 		<div class="searchDataItem">
6 6
 		  <span class="label">科室</span>:
7
-		  <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" nzServerSearch nzShowSearch (nzOnSearch)="changeInp($event)">
8
-		    <ng-container *ngFor="let option of alldepart">
7
+		  <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" nzServerSearch nzShowSearch (nzOnSearch)="changeInp($event)">
8
+		    <ng-container *ngFor="let option of deptList">
9 9
 		      <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
10 10
 		    </ng-container>
11 11
 		    <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>

+ 47 - 18
src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.ts

@@ -63,22 +63,21 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
63 63
 
64 64
     }, 0)
65 65
   }
66
-	
66
+
67 67
 	// 数据下钻
68 68
 	viewDetail1(data, type){
69 69
 		let query = null
70 70
 		let item = null
71 71
 		if(this.deptId){
72
-			item = this.alldepart.find(i => i.id == this.deptId)
72
+			item = this.deptList.find(i => i.id == this.deptId)
73 73
 		}
74 74
 		if(type=='all'){
75 75
 			query = {
76 76
 				startDate: this.customChangeDateComponent.startDate || undefined,
77 77
 				endDate: this.customChangeDateComponent.endDate || undefined,
78
+        deptId: this.deptId,
78 79
 				searchQuery:{
79 80
 					statusValue: 'close',
80
-					deptDTO: item,
81
-					deptId: this.deptId,
82 81
 					groupId: this.fieldConfig.fields.groupId || undefined,
83 82
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
84 83
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -109,10 +108,9 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
109 108
 				query = {
110 109
 					startDate: this.customChangeDateComponent.startDate || undefined,
111 110
 					endDate: this.customChangeDateComponent.endDate || undefined,
111
+          deptId: data.deptId,
112 112
 					searchQuery:{
113 113
 						statusValue: 'close',
114
-						deptDTO: item,
115
-						deptId: data.deptId,
116 114
 						groupId: this.fieldConfig.fields.groupId || undefined,
117 115
 						groupDTO: this.fieldConfig.fields.groupDTO || undefined,
118 116
 						userId: this.fieldConfig.fields.userId || undefined,
@@ -131,23 +129,22 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
131 129
 			});
132 130
 		}
133 131
 	}
134
-	
132
+
135 133
 	// 数据下钻
136 134
 	viewDetail2(data, sublevel, type){
137 135
 		let query = null
138 136
 		let item = null
139 137
 		if(this.deptId){
140
-			item = this.alldepart.find(i => i.id == this.deptId)
138
+			item = this.deptList.find(i => i.id == this.deptId)
141 139
 		}
142 140
 		if(type=='all'){
143 141
 			query = {
144 142
 				startDate: this.customChangeDateComponent.startDate || undefined,
145 143
 				endDate: this.customChangeDateComponent.endDate || undefined,
146 144
 				statisticsTypeId: data[sublevel.value + 'StatisticsTypeId'] ? Number(data[sublevel.value + 'StatisticsTypeId']) : -1,
145
+        deptId: this.deptId,
147 146
 				searchQuery:{
148 147
 					statusValue: 'close',
149
-					deptDTO: item,
150
-					deptId: this.deptId,
151 148
 					groupId: this.fieldConfig.fields.groupId || undefined,
152 149
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
153 150
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -179,10 +176,9 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
179 176
 					startDate: this.customChangeDateComponent.startDate || undefined,
180 177
 					endDate: this.customChangeDateComponent.endDate || undefined,
181 178
 					statisticsTypeId: data[sublevel.value + 'StatisticsTypeId'] ? Number(data[sublevel.value + 'StatisticsTypeId']) : -1,
179
+          deptId: data.deptId,
182 180
 					searchQuery:{
183 181
 						statusValue: 'close',
184
-						deptDTO: item,
185
-						deptId: data.deptId,
186 182
 						groupId: this.fieldConfig.fields.groupId || undefined,
187 183
 						groupDTO: this.fieldConfig.fields.groupDTO || undefined,
188 184
 						userId: this.fieldConfig.fields.userId || undefined,
@@ -201,7 +197,7 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
201 197
 			});
202 198
 		}
203 199
 	}
204
-	
200
+
205 201
   getQueryParams(){
206 202
     let queryParams = this.tabService.getQueryParams();
207 203
     this.tabService.clearQueryParams();
@@ -222,14 +218,17 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
222 218
   dutyId:any;
223 219
   parentDutyId:any;
224 220
   parent:any;
225
-  initSessionData(){
221
+  async initSessionData(){
226 222
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
227 223
     let queryType:any = newStatistics.queryType;
224
+    let realQueryType:any = newStatistics.realQueryType;
228 225
     let hosId:any = newStatistics.hospitalId;
229 226
     let dutyId:any = newStatistics.dutyId;
230
-  	this.parent = newStatistics.parent;
227
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
228
+    this.parent = newStatistics.parent;
231 229
 
232 230
     queryType = queryType ? +queryType : undefined;
231
+    realQueryType = realQueryType ? +realQueryType : undefined;
233 232
     hosId = hosId ? +hosId : undefined;
234 233
     dutyId = dutyId ? +dutyId : undefined;
235 234
 
@@ -250,6 +249,35 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
250 249
       this.hosId = undefined;
251 250
       this.dutyId = undefined;
252 251
       this.parentDutyId = dutyId;
252
+    }else if(queryType == 5){
253
+      this.deptId = currentDeptDTO.id;
254
+      let postData = {
255
+        department: {
256
+          id: currentDeptDTO.id,
257
+          searchType: 1,
258
+        },
259
+        idx: 0,
260
+        sum: 1,
261
+      };
262
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
263
+      this.deptList = result.list || [];
264
+      if(realQueryType == 1){
265
+        this.hosId = undefined;
266
+        this.dutyId = undefined;
267
+        this.parentDutyId = undefined;
268
+      }else if(realQueryType == 2){
269
+        this.hosId = hosId;
270
+        this.dutyId = undefined;
271
+        this.parentDutyId = undefined;
272
+      }else if(realQueryType == 3){
273
+        this.hosId = undefined;
274
+        this.dutyId = dutyId;
275
+        this.parentDutyId = undefined;
276
+      }else if(realQueryType == 4){
277
+        this.hosId = undefined;
278
+        this.dutyId = undefined;
279
+        this.parentDutyId = dutyId;
280
+      }
253 281
     }
254 282
   }
255 283
 
@@ -374,7 +402,8 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
374 402
 		this.sortCurrentValue = "descend";
375 403
 		this.sortCurrent = {totalCount: 'descend'};
376 404
     this.dateRange = []
377
-    this.deptId = undefined;
405
+    this.deptId = this.queryType == 5 ? this.deptId : undefined;
406
+    this.deptList = this.queryType == 5 ? this.deptList : undefined;
378 407
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, buildingId: undefined};
379 408
     this.customChangeDateComponent.resetByDate();
380 409
     setTimeout(_=>{
@@ -404,7 +433,7 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
404 433
 	}
405 434
 
406 435
 	// 获取所有科室
407
-	alldepart:any;
436
+	deptList:any[] = [];
408 437
 	getDeparts(dept?) {
409 438
 	  let data = {
410 439
 	    department: {
@@ -419,7 +448,7 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
419 448
 	    .getFetchDataList("data", "department", data)
420 449
 	    .subscribe((data) => {
421 450
 				this.isLoading = false;
422
-	      this.alldepart = data.list;
451
+	      this.deptList = data.list;
423 452
 	    });
424 453
 	}
425 454
 

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

@@ -3,8 +3,8 @@
3 3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4 4
     <div class="searchDataItem">
5 5
       <span class="label">科室</span>:
6
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" nzServerSearch nzShowSearch (nzOnSearch)="changeInp($event)">
7
-        <ng-container *ngFor="let option of alldepart">
6
+      <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" nzServerSearch nzShowSearch (nzOnSearch)="changeInp($event)">
7
+        <ng-container *ngFor="let option of deptList">
8 8
           <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>
10 10
         <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>

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

@@ -66,17 +66,16 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
66 66
 		let query = null
67 67
 		let item = null
68 68
 		if(this.deptId){
69
-			item = this.alldepart.find(i => i.id == this.deptId)
69
+			item = this.deptList.find(i => i.id == this.deptId)
70 70
 		}
71 71
 		if(type=='all'){
72 72
 			query = {
73 73
 				startDate: this.customChangeDateComponent.startDate || undefined,
74 74
 				endDate: this.customChangeDateComponent.endDate || undefined,
75 75
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
76
+				deptId: this.deptId || undefined,
76 77
 				searchQuery:{
77 78
 					statusValue: 'close',
78
-					deptDTO: item || undefined,
79
-					deptId: this.deptId || undefined,
80 79
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
81 80
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
82 81
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -112,10 +111,9 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
112 111
 			      	startDate: this.customChangeDateComponent.startDate || undefined,
113 112
 			      	endDate: this.customChangeDateComponent.endDate || undefined,
114 113
 			      	statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
114
+              deptId: data.deptId || undefined,
115 115
 							searchQuery:{
116 116
 			      		statusValue: 'close',
117
-			      		deptDTO: item || undefined,
118
-			      		deptId: data.deptId || undefined,
119 117
 			      		taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
120 118
 			      		taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
121 119
 			      		groupId: this.fieldConfig.fields.groupId || undefined,
@@ -142,17 +140,16 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
142 140
 		let query = null
143 141
 		let item = null
144 142
 		if(this.deptId){
145
-			item = this.alldepart.find(i => i.id == this.deptId)
143
+			item = this.deptList.find(i => i.id == this.deptId)
146 144
 		}
147 145
 		if(type=='all'){
148 146
 			query = {
149 147
 				startDate: this.customChangeDateComponent.startDate || undefined,
150 148
 				endDate: this.customChangeDateComponent.endDate || undefined,
151 149
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
150
+        deptId: this.deptId || undefined,
152 151
 				searchQuery:{
153 152
 					statusValue: 'close',
154
-					deptDTO: item || undefined,
155
-					deptId: this.deptId || undefined,
156 153
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
157 154
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
158 155
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -190,10 +187,9 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
190 187
 							startDate: this.customChangeDateComponent.startDate || undefined,
191 188
 							endDate: this.customChangeDateComponent.endDate || undefined,
192 189
 							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
190
+              deptId: data.deptId || undefined,
193 191
 							searchQuery:{
194 192
 								statusValue: 'close',
195
-								deptDTO: item || undefined,
196
-								deptId: data.deptId || undefined,
197 193
 								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
198 194
 								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
199 195
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -222,17 +218,16 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
222 218
 		let query = null
223 219
 		let item = null
224 220
 		if(this.deptId){
225
-			item = this.alldepart.find(i => i.id == this.deptId)
221
+			item = this.deptList.find(i => i.id == this.deptId)
226 222
 		}
227 223
 		if(type=='all'){
228 224
 			query = {
229 225
 				startDate: this.customChangeDateComponent.startDate || undefined,
230 226
 				endDate: this.customChangeDateComponent.endDate || undefined,
231 227
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
228
+        deptId: this.deptId || undefined,
232 229
 				searchQuery:{
233 230
 					statusValue: 'close',
234
-					deptDTO: item || undefined,
235
-					deptId: this.deptId || undefined,
236 231
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
237 232
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
238 233
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -273,10 +268,9 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
273 268
 							startDate: this.customChangeDateComponent.startDate || undefined,
274 269
 							endDate: this.customChangeDateComponent.endDate || undefined,
275 270
 							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
271
+              deptId: data.deptId || undefined,
276 272
 							searchQuery:{
277 273
 								statusValue: 'close',
278
-								deptDTO: item || undefined,
279
-								deptId: data.deptId || undefined,
280 274
 								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
281 275
 								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
282 276
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -308,17 +302,16 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
308 302
 		let query = null
309 303
 		let item = null
310 304
 		if(this.deptId){
311
-			item = this.alldepart.find(i => i.id == this.deptId)
305
+			item = this.deptList.find(i => i.id == this.deptId)
312 306
 		}
313 307
 		if(type=='all'){
314 308
 			query = {
315 309
 				startDate: this.customChangeDateComponent.startDate || undefined,
316 310
 				endDate: this.customChangeDateComponent.endDate || undefined,
317 311
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
312
+        deptId: this.deptId || undefined,
318 313
 				searchQuery:{
319 314
 					statusValue: 'close',
320
-					deptDTO: item || undefined,
321
-					deptId: this.deptId || undefined,
322 315
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
323 316
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
324 317
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -359,10 +352,9 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
359 352
 							startDate: this.customChangeDateComponent.startDate || undefined,
360 353
 							endDate: this.customChangeDateComponent.endDate || undefined,
361 354
 							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
355
+              deptId: data.deptId || undefined,
362 356
 							searchQuery:{
363 357
 								statusValue: 'close',
364
-								deptDTO: item || undefined,
365
-								deptId: data.deptId || undefined,
366 358
 								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
367 359
 								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
368 360
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -410,14 +402,17 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
410 402
   dutyId:any;
411 403
   parentDutyId:any;
412 404
   parent:any;
413
-  initSessionData(){
405
+  async initSessionData(){
414 406
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
415 407
     let queryType:any = newStatistics.queryType;
408
+    let realQueryType:any = newStatistics.realQueryType;
416 409
     let hosId:any = newStatistics.hospitalId;
417 410
     let dutyId:any = newStatistics.dutyId;
418
-  	this.parent = newStatistics.parent;
411
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
412
+    this.parent = newStatistics.parent;
419 413
 
420 414
     queryType = queryType ? +queryType : undefined;
415
+    realQueryType = realQueryType ? +realQueryType : undefined;
421 416
     hosId = hosId ? +hosId : undefined;
422 417
     dutyId = dutyId ? +dutyId : undefined;
423 418
 
@@ -438,6 +433,35 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
438 433
       this.hosId = undefined;
439 434
       this.dutyId = undefined;
440 435
       this.parentDutyId = dutyId;
436
+    }else if(queryType == 5){
437
+      this.deptId = currentDeptDTO.id;
438
+      let postData = {
439
+        department: {
440
+          id: currentDeptDTO.id,
441
+          searchType: 1,
442
+        },
443
+        idx: 0,
444
+        sum: 1,
445
+      };
446
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
447
+      this.deptList = result.list || [];
448
+      if(realQueryType == 1){
449
+        this.hosId = undefined;
450
+        this.dutyId = undefined;
451
+        this.parentDutyId = undefined;
452
+      }else if(realQueryType == 2){
453
+        this.hosId = hosId;
454
+        this.dutyId = undefined;
455
+        this.parentDutyId = undefined;
456
+      }else if(realQueryType == 3){
457
+        this.hosId = undefined;
458
+        this.dutyId = dutyId;
459
+        this.parentDutyId = undefined;
460
+      }else if(realQueryType == 4){
461
+        this.hosId = undefined;
462
+        this.dutyId = undefined;
463
+        this.parentDutyId = dutyId;
464
+      }
441 465
     }
442 466
   }
443 467
 
@@ -548,7 +572,8 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
548 572
 		this.sortCurrentValue = "descend";
549 573
 		this.sortCurrent = {totalCount: 'descend'};
550 574
     this.dateRange = []
551
-    this.deptId = undefined;
575
+    this.deptId = this.queryType == 5 ? this.deptId : undefined;
576
+    this.deptList = this.queryType == 5 ? this.deptList : undefined;
552 577
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, statisticsTypeId: undefined, taskTypeId: undefined, buildingId: undefined};
553 578
     this.customChangeDateComponent.resetByDate();
554 579
     setTimeout(_=>{
@@ -578,7 +603,7 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
578 603
 	}
579 604
 
580 605
 	// 获取所有科室
581
-	alldepart:any;
606
+	deptList:any[] = [];
582 607
 	getDeparts(dept?) {
583 608
 	  let data = {
584 609
 	    department: {
@@ -593,7 +618,7 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
593 618
 	    .getFetchDataList("data", "department", data)
594 619
 	    .subscribe((data) => {
595 620
 				this.isLoading = false;
596
-	      this.alldepart = data.list;
621
+	      this.deptList = data.list;
597 622
 	    });
598 623
 	}
599 624
 

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

@@ -3,8 +3,8 @@
3 3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4 4
     <div class="searchDataItem">
5 5
       <span class="label">科室</span>:
6
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" nzServerSearch nzShowSearch (nzOnSearch)="changeInp($event)">
7
-        <ng-container *ngFor="let option of alldepart">
6
+      <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" nzServerSearch nzShowSearch (nzOnSearch)="changeInp($event)">
7
+        <ng-container *ngFor="let option of deptList">
8 8
           <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>
10 10
         <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>

+ 62 - 41
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.ts

@@ -58,23 +58,22 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
58 58
 
59 59
     }, 0)
60 60
   }
61
-	
61
+
62 62
 	// 数据下钻
63 63
 	viewDetail1(data, type){
64 64
 		let query = null
65 65
 		let item = null
66 66
 		if(this.deptId){
67
-			item = this.alldepart.find(i => i.id == this.deptId)
67
+			item = this.deptList.find(i => i.id == this.deptId)
68 68
 		}
69 69
 		if(type=='all'){
70 70
 			query = {
71 71
 				startDate: this.customChangeDateComponent.startDate || undefined,
72 72
 				endDate: this.customChangeDateComponent.endDate || undefined,
73 73
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
74
+        deptId: this.deptId || undefined,
74 75
 				searchQuery:{
75 76
 					statusValue: 'close',
76
-					deptDTO: item || undefined,
77
-					deptId: this.deptId || undefined,
78 77
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
79 78
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
80 79
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -110,10 +109,9 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
110 109
 			      	startDate: this.customChangeDateComponent.startDate || undefined,
111 110
 			      	endDate: this.customChangeDateComponent.endDate || undefined,
112 111
 			      	statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
112
+              deptId: data.deptId || undefined,
113 113
 							searchQuery:{
114 114
 			      		statusValue: 'close',
115
-			      		deptDTO: item || undefined,
116
-			      		deptId: data.deptId || undefined,
117 115
 			      		taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
118 116
 			      		taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
119 117
 			      		groupId: this.fieldConfig.fields.groupId || undefined,
@@ -135,22 +133,21 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
135 133
 			  });
136 134
 		}
137 135
 	}
138
-	
136
+
139 137
 	viewDetail2(data, type){
140 138
 		let query = null
141 139
 		let item = null
142 140
 		if(this.deptId){
143
-			item = this.alldepart.find(i => i.id == this.deptId)
141
+			item = this.deptList.find(i => i.id == this.deptId)
144 142
 		}
145 143
 		if(type=='all'){
146 144
 			query = {
147 145
 				startDate: this.customChangeDateComponent.startDate || undefined,
148 146
 				endDate: this.customChangeDateComponent.endDate || undefined,
149 147
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
148
+        deptId: data.deptId || undefined,
150 149
 				searchQuery:{
151 150
 					statusValue: 'close',
152
-					deptDTO: item || undefined,
153
-					deptId: data.deptId || undefined,
154 151
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
155 152
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
156 153
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -194,10 +191,9 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
194 191
 							startDate: this.customChangeDateComponent.startDate || undefined,
195 192
 							endDate: this.customChangeDateComponent.endDate || undefined,
196 193
 							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
194
+              deptId: data.deptId || undefined,
197 195
 							searchQuery:{
198 196
 								statusValue: 'close',
199
-								deptDTO: item || undefined,
200
-								deptId: data.deptId || undefined,
201 197
 								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
202 198
 								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
203 199
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -227,22 +223,21 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
227 223
 				});
228 224
 		}
229 225
 	}
230
-	
226
+
231 227
 	viewDetail3(data, type){
232 228
 		let query = null
233 229
 		let item = null
234 230
 		if(this.deptId){
235
-			item = this.alldepart.find(i => i.id == this.deptId)
231
+			item = this.deptList.find(i => i.id == this.deptId)
236 232
 		}
237 233
 		if(type=='all'){
238 234
 			query = {
239 235
 				startDate: this.customChangeDateComponent.startDate || undefined,
240 236
 				endDate: this.customChangeDateComponent.endDate || undefined,
241 237
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
238
+        deptId: this.deptId || undefined,
242 239
 				searchQuery:{
243 240
 					statusValue: 'close',
244
-					deptDTO: item || undefined,
245
-					deptId: this.deptId || undefined,
246 241
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
247 242
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
248 243
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -286,10 +281,9 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
286 281
 							startDate: this.customChangeDateComponent.startDate || undefined,
287 282
 							endDate: this.customChangeDateComponent.endDate || undefined,
288 283
 							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
284
+              deptId: data.deptId || undefined,
289 285
 							searchQuery:{
290 286
 								statusValue: 'close',
291
-								deptDTO: item || undefined,
292
-								deptId: data.deptId || undefined,
293 287
 								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
294 288
 								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
295 289
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -319,22 +313,21 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
319 313
 				});
320 314
 		}
321 315
 	}
322
-	
316
+
323 317
 	viewDetail4(data, type){
324 318
 		let query = null
325 319
 		let item = null
326 320
 		if(this.deptId){
327
-			item = this.alldepart.find(i => i.id == this.deptId)
321
+			item = this.deptList.find(i => i.id == this.deptId)
328 322
 		}
329 323
 		if(type=='all'){
330 324
 			query = {
331 325
 				startDate: this.customChangeDateComponent.startDate || undefined,
332 326
 				endDate: this.customChangeDateComponent.endDate || undefined,
333 327
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
328
+        deptId: this.deptId || undefined,
334 329
 				searchQuery:{
335 330
 					statusValue: 'close',
336
-					deptDTO: item || undefined,
337
-					deptId: this.deptId || undefined,
338 331
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
339 332
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
340 333
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -378,10 +371,9 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
378 371
 							startDate: this.customChangeDateComponent.startDate || undefined,
379 372
 							endDate: this.customChangeDateComponent.endDate || undefined,
380 373
 							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
374
+              deptId: data.deptId || undefined,
381 375
 							searchQuery:{
382 376
 								statusValue: 'close',
383
-								deptDTO: item || undefined,
384
-								deptId: data.deptId || undefined,
385 377
 								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
386 378
 								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
387 379
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -411,22 +403,21 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
411 403
 				});
412 404
 		}
413 405
 	}
414
-	
406
+
415 407
 	viewDetail5(data, type){
416 408
 		let query = null
417 409
 		let item = null
418 410
 		if(this.deptId){
419
-			item = this.alldepart.find(i => i.id == this.deptId)
411
+			item = this.deptList.find(i => i.id == this.deptId)
420 412
 		}
421 413
 		if(type=='all'){
422 414
 			query = {
423 415
 				startDate: this.customChangeDateComponent.startDate || undefined,
424 416
 				endDate: this.customChangeDateComponent.endDate || undefined,
425 417
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
418
+        deptId: this.deptId || undefined,
426 419
 				searchQuery:{
427 420
 					statusValue: 'close',
428
-					deptDTO: item || undefined,
429
-					deptId: this.deptId || undefined,
430 421
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
431 422
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
432 423
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -470,10 +461,9 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
470 461
 							startDate: this.customChangeDateComponent.startDate || undefined,
471 462
 							endDate: this.customChangeDateComponent.endDate || undefined,
472 463
 							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
464
+              deptId: data.deptId || undefined,
473 465
 							searchQuery:{
474 466
 								statusValue: 'close',
475
-								deptDTO: item || undefined,
476
-								deptId: data.deptId || undefined,
477 467
 								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
478 468
 								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
479 469
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -503,22 +493,21 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
503 493
 				});
504 494
 		}
505 495
 	}
506
-	
496
+
507 497
 	viewDetail6(data, type){
508 498
 		let query = null
509 499
 		let item = null
510 500
 		if(this.deptId){
511
-			item = this.alldepart.find(i => i.id == this.deptId)
501
+			item = this.deptList.find(i => i.id == this.deptId)
512 502
 		}
513 503
 		if(type=='all'){
514 504
 			query = {
515 505
 				startDate: this.customChangeDateComponent.startDate || undefined,
516 506
 				endDate: this.customChangeDateComponent.endDate || undefined,
517 507
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
508
+        deptId: this.deptId || undefined,
518 509
 				searchQuery:{
519 510
 					statusValue: 'close',
520
-					deptDTO: item || undefined,
521
-					deptId: this.deptId || undefined,
522 511
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
523 512
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
524 513
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -562,10 +551,9 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
562 551
 							startDate: this.customChangeDateComponent.startDate || undefined,
563 552
 							endDate: this.customChangeDateComponent.endDate || undefined,
564 553
 							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
554
+              deptId: data.deptId || undefined,
565 555
 							searchQuery:{
566 556
 								statusValue: 'close',
567
-								deptDTO: item || undefined,
568
-								deptId: data.deptId || undefined,
569 557
 								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
570 558
 								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
571 559
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -615,14 +603,17 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
615 603
   dutyId:any;
616 604
   parentDutyId:any;
617 605
   parent:any;
618
-  initSessionData(){
606
+  async initSessionData(){
619 607
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
620 608
     let queryType:any = newStatistics.queryType;
609
+    let realQueryType:any = newStatistics.realQueryType;
621 610
     let hosId:any = newStatistics.hospitalId;
622 611
     let dutyId:any = newStatistics.dutyId;
623
-  	this.parent = newStatistics.parent;
612
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
613
+    this.parent = newStatistics.parent;
624 614
 
625 615
     queryType = queryType ? +queryType : undefined;
616
+    realQueryType = realQueryType ? +realQueryType : undefined;
626 617
     hosId = hosId ? +hosId : undefined;
627 618
     dutyId = dutyId ? +dutyId : undefined;
628 619
 
@@ -643,6 +634,35 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
643 634
       this.hosId = undefined;
644 635
       this.dutyId = undefined;
645 636
       this.parentDutyId = dutyId;
637
+    }else if(queryType == 5){
638
+      this.deptId = currentDeptDTO.id;
639
+      let postData = {
640
+        department: {
641
+          id: currentDeptDTO.id,
642
+          searchType: 1,
643
+        },
644
+        idx: 0,
645
+        sum: 1,
646
+      };
647
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
648
+      this.deptList = result.list || [];
649
+      if(realQueryType == 1){
650
+        this.hosId = undefined;
651
+        this.dutyId = undefined;
652
+        this.parentDutyId = undefined;
653
+      }else if(realQueryType == 2){
654
+        this.hosId = hosId;
655
+        this.dutyId = undefined;
656
+        this.parentDutyId = undefined;
657
+      }else if(realQueryType == 3){
658
+        this.hosId = undefined;
659
+        this.dutyId = dutyId;
660
+        this.parentDutyId = undefined;
661
+      }else if(realQueryType == 4){
662
+        this.hosId = undefined;
663
+        this.dutyId = undefined;
664
+        this.parentDutyId = dutyId;
665
+      }
646 666
     }
647 667
   }
648 668
 
@@ -762,7 +782,8 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
762 782
 		this.sortCurrentValue = "descend";
763 783
 		this.sortCurrent = {totalCount: 'descend'};
764 784
     this.dateRange = []
765
-    this.deptId = undefined;
785
+    this.deptId = this.queryType == 5 ? this.deptId : undefined;
786
+    this.deptList = this.queryType == 5 ? this.deptList : undefined;
766 787
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, statisticsTypeId: undefined, taskTypeId: undefined, buildingId: undefined};
767 788
     this.customChangeDateComponent.resetByDate();
768 789
     setTimeout(_=>{
@@ -781,7 +802,7 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
781 802
 	}
782 803
 
783 804
 	// 获取所有科室
784
-	alldepart:any;
805
+	deptList:any[] = [];
785 806
 	getDeparts(dept?) {
786 807
 	  let data = {
787 808
 	    department: {
@@ -796,7 +817,7 @@ export class DistributionDepartmentEvaluateStatisticsComponent implements OnInit
796 817
 	    .getFetchDataList("data", "department", data)
797 818
 	    .subscribe((data) => {
798 819
 				this.isLoading = false;
799
-	      this.alldepart = data.list;
820
+	      this.deptList = data.list;
800 821
 	    });
801 822
 	}
802 823
 

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

@@ -3,8 +3,8 @@
3 3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4 4
     <div class="searchDataItem">
5 5
       <span class="label">科室</span>:
6
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" nzServerSearch nzShowSearch (nzOnSearch)="changeInp($event)">
7
-        <ng-container *ngFor="let option of alldepart">
6
+      <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" nzServerSearch nzShowSearch (nzOnSearch)="changeInp($event)">
7
+        <ng-container *ngFor="let option of deptList">
8 8
           <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>
10 10
         <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>

+ 55 - 30
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.ts

@@ -60,22 +60,21 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
60 60
 
61 61
     }, 0)
62 62
   }
63
-	
63
+
64 64
 	viewDetail1(data, type){
65 65
 		let query = null
66 66
 		let item = null
67 67
 		if(this.deptId){
68
-			item = this.alldepart.find(i => i.id == this.deptId)
68
+			item = this.deptList.find(i => i.id == this.deptId)
69 69
 		}
70 70
 		if(type=='all'){
71 71
 			query = {
72 72
 				startDate: this.customChangeDateComponent.startDate || undefined,
73 73
 				endDate: this.customChangeDateComponent.endDate || undefined,
74 74
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
75
+				deptId: this.deptId || undefined,
75 76
 				searchQuery:{
76 77
 					statusValue: 'close',
77
-					deptDTO: item || undefined,
78
-					deptId: data.deptId || undefined,
79 78
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
80 79
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
81 80
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -116,10 +115,9 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
116 115
 							startDate: this.customChangeDateComponent.startDate || undefined,
117 116
 							endDate: this.customChangeDateComponent.endDate || undefined,
118 117
 							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
118
+							deptId: data.deptId || undefined,
119 119
 							searchQuery:{
120 120
 								statusValue: 'close',
121
-								deptDTO: item || undefined,
122
-								deptId: data.deptId || undefined,
123 121
 								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
124 122
 								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
125 123
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -146,22 +144,21 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
146 144
 				});
147 145
 		}
148 146
 	}
149
-	
147
+
150 148
 	viewDetail2(data, type){
151 149
 		let query = null
152 150
 		let item = null
153 151
 		if(this.deptId){
154
-			item = this.alldepart.find(i => i.id == this.deptId)
152
+			item = this.deptList.find(i => i.id == this.deptId)
155 153
 		}
156 154
 		if(type=='all'){
157 155
 			query = {
158 156
 				startDate: this.customChangeDateComponent.startDate || undefined,
159 157
 				endDate: this.customChangeDateComponent.endDate || undefined,
160 158
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
159
+        deptId: this.deptId || undefined,
161 160
 				searchQuery:{
162 161
 					statusValue: 'close',
163
-					deptDTO: item || undefined,
164
-					deptId: this.deptId || undefined,
165 162
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
166 163
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
167 164
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -202,10 +199,9 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
202 199
 							startDate: this.customChangeDateComponent.startDate || undefined,
203 200
 							endDate: this.customChangeDateComponent.endDate || undefined,
204 201
 							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
202
+              deptId: data.deptId || undefined,
205 203
 							searchQuery:{
206 204
 								statusValue: 'close',
207
-								deptDTO: item || undefined,
208
-								deptId: data.deptId || undefined,
209 205
 								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
210 206
 								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
211 207
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -232,22 +228,21 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
232 228
 				});
233 229
 		}
234 230
 	}
235
-	
231
+
236 232
 	viewDetail3(data, type){
237 233
 		let query = null
238 234
 		let item = null
239 235
 		if(this.deptId){
240
-			item = this.alldepart.find(i => i.id == this.deptId)
236
+			item = this.deptList.find(i => i.id == this.deptId)
241 237
 		}
242 238
 		if(type=='all'){
243 239
 			query = {
244 240
 				startDate: this.customChangeDateComponent.startDate || undefined,
245 241
 				endDate: this.customChangeDateComponent.endDate || undefined,
246 242
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
243
+        deptId: this.deptId || undefined,
247 244
 				searchQuery:{
248 245
 					statusValue: 'close',
249
-					deptDTO: item || undefined,
250
-					deptId: this.deptId || undefined,
251 246
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
252 247
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
253 248
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -288,10 +283,9 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
288 283
 							startDate: this.customChangeDateComponent.startDate || undefined,
289 284
 							endDate: this.customChangeDateComponent.endDate || undefined,
290 285
 							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
286
+              deptId: data.deptId || undefined,
291 287
 							searchQuery:{
292 288
 								statusValue: 'close',
293
-								deptDTO: item || undefined,
294
-								deptId: data.deptId || undefined,
295 289
 								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
296 290
 								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
297 291
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -318,22 +312,21 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
318 312
 				});
319 313
 		}
320 314
 	}
321
-	
315
+
322 316
 	viewDetail4(data, type){
323 317
 		let query = null
324 318
 		let item = null
325 319
 		if(this.deptId){
326
-			item = this.alldepart.find(i => i.id == this.deptId)
320
+			item = this.deptList.find(i => i.id == this.deptId)
327 321
 		}
328 322
 		if(type=='all'){
329 323
 			query = {
330 324
 				startDate: this.customChangeDateComponent.startDate || undefined,
331 325
 				endDate: this.customChangeDateComponent.endDate || undefined,
332 326
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
327
+        deptId: this.deptId || undefined,
333 328
 				searchQuery:{
334 329
 					statusValue: 'close',
335
-					deptDTO: item || undefined,
336
-					deptId: this.deptId || undefined,
337 330
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
338 331
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
339 332
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -374,10 +367,9 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
374 367
 							startDate: this.customChangeDateComponent.startDate || undefined,
375 368
 							endDate: this.customChangeDateComponent.endDate || undefined,
376 369
 							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
370
+              deptId: data.deptId || undefined,
377 371
 							searchQuery:{
378 372
 								statusValue: 'close',
379
-								deptDTO: item || undefined,
380
-								deptId: data.deptId || undefined,
381 373
 								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
382 374
 								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
383 375
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -404,7 +396,7 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
404 396
 				});
405 397
 		}
406 398
 	}
407
-	
399
+
408 400
   getQueryParams(){
409 401
     let queryParams = this.tabService.getQueryParams();
410 402
     this.tabService.clearQueryParams();
@@ -425,14 +417,17 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
425 417
   dutyId:any;
426 418
   parentDutyId:any;
427 419
   parent:any;
428
-  initSessionData(){
420
+  async initSessionData(){
429 421
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
430 422
     let queryType:any = newStatistics.queryType;
423
+    let realQueryType:any = newStatistics.realQueryType;
431 424
     let hosId:any = newStatistics.hospitalId;
432 425
     let dutyId:any = newStatistics.dutyId;
433
-  	this.parent = newStatistics.parent;
426
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
427
+    this.parent = newStatistics.parent;
434 428
 
435 429
     queryType = queryType ? +queryType : undefined;
430
+    realQueryType = realQueryType ? +realQueryType : undefined;
436 431
     hosId = hosId ? +hosId : undefined;
437 432
     dutyId = dutyId ? +dutyId : undefined;
438 433
 
@@ -453,6 +448,35 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
453 448
       this.hosId = undefined;
454 449
       this.dutyId = undefined;
455 450
       this.parentDutyId = dutyId;
451
+    }else if(queryType == 5){
452
+      this.deptId = currentDeptDTO.id;
453
+      let postData = {
454
+        department: {
455
+          id: currentDeptDTO.id,
456
+          searchType: 1,
457
+        },
458
+        idx: 0,
459
+        sum: 1,
460
+      };
461
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
462
+      this.deptList = result.list || [];
463
+      if(realQueryType == 1){
464
+        this.hosId = undefined;
465
+        this.dutyId = undefined;
466
+        this.parentDutyId = undefined;
467
+      }else if(realQueryType == 2){
468
+        this.hosId = hosId;
469
+        this.dutyId = undefined;
470
+        this.parentDutyId = undefined;
471
+      }else if(realQueryType == 3){
472
+        this.hosId = undefined;
473
+        this.dutyId = dutyId;
474
+        this.parentDutyId = undefined;
475
+      }else if(realQueryType == 4){
476
+        this.hosId = undefined;
477
+        this.dutyId = undefined;
478
+        this.parentDutyId = dutyId;
479
+      }
456 480
     }
457 481
   }
458 482
 
@@ -563,7 +587,8 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
563 587
 		this.sortCurrentValue = "";
564 588
 		this.sortCurrent = {};
565 589
     this.dateRange = []
566
-		this.deptId = undefined;
590
+		this.deptId = this.queryType == 5 ? this.deptId : undefined;
591
+    this.deptList = this.queryType == 5 ? this.deptList : undefined;
567 592
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, statisticsTypeId: undefined, taskTypeId: undefined, buildingId: undefined};
568 593
     this.customChangeDateComponent.resetByDate();
569 594
     setTimeout(_=>{
@@ -582,7 +607,7 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
582 607
 	}
583 608
 
584 609
 	// 获取所有科室
585
-	alldepart:any;
610
+	deptList:any[] = [];
586 611
 	getDeparts(dept?) {
587 612
 	  let data = {
588 613
 	    department: {
@@ -597,7 +622,7 @@ export class DistributionDepartmentSourceStatisticsComponent implements OnInit,
597 622
 	    .getFetchDataList("data", "department", data)
598 623
 	    .subscribe((data) => {
599 624
 				this.isLoading = false;
600
-	      this.alldepart = data.list;
625
+	      this.deptList = data.list;
601 626
 	    });
602 627
 	}
603 628
 

+ 42 - 2
src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.component.ts

@@ -76,13 +76,16 @@ export class DistributionPersonnelEffectivenessStatisticsComponent implements On
76 76
   hosId:any;
77 77
   dutyId:any;
78 78
   parentDutyId:any;
79
-  initSessionData(){
79
+  async initSessionData(){
80 80
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
81 81
     let queryType:any = newStatistics.queryType;
82
+    let realQueryType:any = newStatistics.realQueryType;
82 83
     let hosId:any = newStatistics.hospitalId;
83 84
     let dutyId:any = newStatistics.dutyId;
85
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
84 86
 
85 87
     queryType = queryType ? +queryType : undefined;
88
+    realQueryType = realQueryType ? +realQueryType : undefined;
86 89
     hosId = hosId ? +hosId : undefined;
87 90
     dutyId = dutyId ? +dutyId : undefined;
88 91
 
@@ -103,6 +106,35 @@ export class DistributionPersonnelEffectivenessStatisticsComponent implements On
103 106
       this.hosId = undefined;
104 107
       this.dutyId = undefined;
105 108
       this.parentDutyId = dutyId;
109
+    }else if(queryType == 5){
110
+      this.fieldConfig.fields.deptId = currentDeptDTO.id;
111
+      let postData = {
112
+        department: {
113
+          id: currentDeptDTO.id,
114
+          searchType: 1,
115
+        },
116
+        idx: 0,
117
+        sum: 1,
118
+      };
119
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
120
+      this.fieldConfig.fields.deptDTO = result.list.length ? result.list[0] : undefined;
121
+      if(realQueryType == 1){
122
+        this.hosId = undefined;
123
+        this.dutyId = undefined;
124
+        this.parentDutyId = undefined;
125
+      }else if(realQueryType == 2){
126
+        this.hosId = hosId;
127
+        this.dutyId = undefined;
128
+        this.parentDutyId = undefined;
129
+      }else if(realQueryType == 3){
130
+        this.hosId = undefined;
131
+        this.dutyId = dutyId;
132
+        this.parentDutyId = undefined;
133
+      }else if(realQueryType == 4){
134
+        this.hosId = undefined;
135
+        this.dutyId = undefined;
136
+        this.parentDutyId = dutyId;
137
+      }
106 138
     }
107 139
   }
108 140
 
@@ -214,7 +246,15 @@ export class DistributionPersonnelEffectivenessStatisticsComponent implements On
214 246
 		this.sortCurrent = {totalCount: 'descend'};
215 247
     this.dateRange = []
216 248
     this.matchUserCouont = 1;
217
-    this.fieldConfig.fields = {groupId: undefined, userId: undefined, deptId: undefined, buildingId: undefined, taskTypeId: undefined, statisticsTypeId: undefined};
249
+    this.fieldConfig.fields = {
250
+      groupId: undefined,
251
+      userId: undefined,
252
+      buildingId: undefined,
253
+      taskTypeId: undefined,
254
+      statisticsTypeId: undefined,
255
+      deptId: this.queryType == 5 ? this.fieldConfig.fields.deptId : undefined,
256
+      deptDTO: this.queryType == 5 ? this.fieldConfig.fields.deptDTO : undefined,
257
+    };
218 258
     this.customChangeDateComponent.resetByDate();
219 259
     setTimeout(_=>{
220 260
     	this.search();

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

@@ -2,13 +2,24 @@
2 2
 	<div class="searchDataWrap">
3 3
 		<div class="searchData">
4 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" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" (nzOpenChange)="openChangeDept($event)">
8
+          <ng-container *ngFor="let option of deptList">
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 16
 		</div>
6 17
 		<div class="operation">
7 18
 			<button nz-button class="btn default" (click)="search()">搜索</button>
8 19
 			<button nz-button class="btn default ml8" (click)="reset()">重置</button>
9 20
 		</div>
10 21
 	</div>
11
-  <ng-container *ngIf="!isLoading">
22
+  <ng-container *ngIf="!isLoading1">
12 23
     <div class="top1-statistics">
13 24
       <div class="top-list">
14 25
         <div class="special-box cursor" (click)="viewDetail1()">
@@ -164,6 +175,6 @@
164 175
     </div>
165 176
   </ng-container>
166 177
 </div>
167
-<div class="mask-style" *ngIf="isLoading">
178
+<div class="mask-style" *ngIf="isLoading1">
168 179
 	<nz-spin nzSimple class="spin-style"></nz-spin>
169 180
 </div>

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

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

+ 104 - 12
src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.ts

@@ -3,6 +3,8 @@ import { Component, OnInit, ViewChild, AfterViewInit } from "@angular/core";
3 3
 import { MainService } from 'src/app/services/main.service';
4 4
 import { TabService } from '../../services/tab.service';
5 5
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
6
+import { debounceTime } from 'rxjs/operators';
7
+import { Subject } from 'rxjs';
6 8
 @Component({
7 9
   selector: "app-distribution-synthesize-statistics",
8 10
   templateUrl: "./distribution-synthesize-statistics.component.html",
@@ -16,7 +18,7 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
16 18
     public router: Router,
17 19
   ) {}
18 20
 
19
-	isLoading:Boolean = false;
21
+	isLoading1:Boolean = false;
20 22
 	workData:any = []; //工单统计
21 23
 	businessData:any = []; //业务统计
22 24
   listOfData: any[] = []; //表格数据
@@ -61,14 +63,24 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
61 63
 			name:'王'
62 64
 		}
63 65
 	] //人员top5
64
-  ngOnInit() {}
65
-	
66
+  deptId;//科室id
67
+
68
+  searchTimerSubject = new Subject();
69
+
70
+  ngOnInit() {
71
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
72
+      let fun = v[0];
73
+      fun.call(this, v[1]);
74
+    });
75
+  }
76
+
66 77
 	/*========= 数据下钻 ========*/
67
-	
78
+
68 79
 	// 汇总
69 80
 	viewDetail1(){
70 81
 		let query = {
71 82
 			isGdId: true,
83
+      deptId: this.deptId,
72 84
 		}
73 85
 		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
74 86
 		let flag = this.tabService.tabs.some(v => v.path === path);
@@ -78,13 +90,14 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
78 90
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
79 91
 		this.router.navigate([path], { replaceUrl: true });
80 92
 	}
81
-	
93
+
82 94
 	// 差评
83 95
 	viewDetail4(){
84 96
 		let query = {
85 97
 			isGdId: true,
86 98
 			startDate: this.customChangeDateComponent.startDate,
87 99
 			endDate: this.customChangeDateComponent.endDate,
100
+      deptId: this.deptId,
88 101
 			searchQuery:{
89 102
 				evaluateId: 358,
90 103
 				evaluateDTO: {
@@ -104,7 +117,7 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
104 117
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
105 118
 		this.router.navigate([path], { replaceUrl: true });
106 119
 	}
107
-	
120
+
108 121
 	// 科室top5
109 122
 	viewMaintain1(data){
110 123
 		let postData: any = {
@@ -121,7 +134,7 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
121 134
 			let query = {
122 135
 				startDate: this.customChangeDateComponent.startDate,
123 136
 				endDate: this.customChangeDateComponent.endDate,
124
-				repairDeptId: data.deptId,
137
+				deptId: data.deptId,
125 138
 				searchQuery:{
126 139
 					statusValue: 'close',
127 140
 					deptDTO: item,
@@ -137,12 +150,13 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
137 150
 			this.router.navigate([path], { replaceUrl: true });
138 151
 		});
139 152
 	}
140
-	
153
+
141 154
 	// 人员top5
142 155
 	viewMaintain2(data){
143 156
 		let query = {
144 157
 			startDate: this.customChangeDateComponent.startDate,
145 158
 			endDate: this.customChangeDateComponent.endDate,
159
+      deptId: this.deptId,
146 160
 			searchQuery:{
147 161
 				statusValue: 'close',
148 162
 				userDTO: {
@@ -160,7 +174,7 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
160 174
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
161 175
 		this.router.navigate([path], { replaceUrl: true });
162 176
 	}
163
-	
177
+
164 178
   ngAfterViewInit(){
165 179
     setTimeout(() => {
166 180
       this.search();
@@ -181,6 +195,7 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
181 195
 			type: 'sourceCount',
182 196
 	    hosId: this.getHosId,
183 197
 	    businessType: 'hsms',
198
+      deptId: this.deptId || undefined,
184 199
 	  };
185 200
 		this.mainService
186 201
 		  .getReportData(postData)
@@ -258,6 +273,7 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
258 273
 	    businessType: 'hsms',
259 274
 	    dateType: this.activeIndex,
260 275
       statisticsTypeId: this.statisticsTypeId || undefined,
276
+      deptId: this.deptId || undefined,
261 277
 	  };
262 278
 		this.mainService
263 279
 		  .getReportData(postData)
@@ -342,6 +358,7 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
342 358
 			type: 'statisticsDateTypeTop5',
343 359
 	    hosId: this.getHosId,
344 360
 	    businessType: 'hsms',
361
+      deptId: this.deptId || undefined,
345 362
 	  };
346 363
 		this.mainService
347 364
 		  .getReportData(postData)
@@ -424,6 +441,7 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
424 441
 			type: 'deptTop5',
425 442
 	    hosId: this.getHosId,
426 443
 	    businessType: 'hsms',
444
+      deptId: this.deptId || undefined,
427 445
 	  };
428 446
 	  this.mainService
429 447
 	    .getReportData(postData)
@@ -440,11 +458,12 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
440 458
 			type: 'userTop5',
441 459
 	    hosId: this.getHosId,
442 460
 	    businessType: 'hsms',
461
+      deptId: this.deptId || undefined,
443 462
 	  };
444 463
 	  this.mainService
445 464
 	    .getReportData(postData)
446 465
 	    .subscribe((result:any) => {
447
-				this.isLoading = false;
466
+				this.isLoading1 = false;
448 467
 	      this.userTopData = result.data || [];
449 468
 	    });
450 469
 	}
@@ -472,13 +491,16 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
472 491
   hosId:any;
473 492
   dutyId:any;
474 493
   parentDutyId:any;
475
-  initSessionData(){
494
+  async initSessionData(){
476 495
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
477 496
     let queryType:any = newStatistics.queryType;
497
+    let realQueryType:any = newStatistics.realQueryType;
478 498
     let hosId:any = newStatistics.hospitalId;
479 499
     let dutyId:any = newStatistics.dutyId;
500
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
480 501
 
481 502
     queryType = queryType ? +queryType : undefined;
503
+    realQueryType = realQueryType ? +realQueryType : undefined;
482 504
     hosId = hosId ? +hosId : undefined;
483 505
     dutyId = dutyId ? +dutyId : undefined;
484 506
 
@@ -499,9 +521,38 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
499 521
       this.hosId = undefined;
500 522
       this.dutyId = undefined;
501 523
       this.parentDutyId = dutyId;
524
+    }else if(queryType == 5){
525
+      this.deptId = currentDeptDTO.id;
526
+      let postData = {
527
+        department: {
528
+          id: currentDeptDTO.id,
529
+          searchType: 1,
530
+        },
531
+        idx: 0,
532
+        sum: 1,
533
+      };
534
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
535
+      this.deptList = result.list || [];
536
+      if(realQueryType == 1){
537
+        this.hosId = undefined;
538
+        this.dutyId = undefined;
539
+        this.parentDutyId = undefined;
540
+      }else if(realQueryType == 2){
541
+        this.hosId = hosId;
542
+        this.dutyId = undefined;
543
+        this.parentDutyId = undefined;
544
+      }else if(realQueryType == 3){
545
+        this.hosId = undefined;
546
+        this.dutyId = dutyId;
547
+        this.parentDutyId = undefined;
548
+      }else if(realQueryType == 4){
549
+        this.hosId = undefined;
550
+        this.dutyId = undefined;
551
+        this.parentDutyId = dutyId;
552
+      }
502 553
     }
503 554
 
504
-		this.isLoading = true
555
+		this.isLoading1 = true
505 556
     this.getStatisticsTypeList();
506 557
 		this.getWorkData();
507 558
 		// this.getBusinessData();
@@ -545,6 +596,7 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
545 596
 			type: 'headerCount',
546 597
 	    hosId: this.getHosId,
547 598
 	    businessType: 'hsms',
599
+      deptId: this.deptId || undefined,
548 600
 	  };
549 601
 	  this.mainService
550 602
 	    .getReportData(postData)
@@ -561,6 +613,7 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
561 613
 			type: 'businessCount',
562 614
 	    hosId: this.getHosId,
563 615
 	    businessType: 'hsms',
616
+      deptId: this.deptId || undefined,
564 617
 	  };
565 618
 	  this.mainService
566 619
 	    .getReportData(postData)
@@ -571,6 +624,8 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
571 624
 
572 625
 	// 重置
573 626
 	reset(){
627
+    this.deptId = this.queryType == 5 ? this.deptId : undefined;
628
+    this.deptList = this.queryType == 5 ? this.deptList : [];
574 629
 		this.dateRange = [];
575 630
 		this.activeIndex = 'day';
576 631
     this.customChangeDateComponent.resetByDate();
@@ -580,6 +635,43 @@ export class DistributionSynthesizeStatisticsComponent implements OnInit, AfterV
580 635
 		})
581 636
 	}
582 637
 
638
+  // 科室搜索
639
+  changeDeptInp(e) {
640
+    this.searchTimer(this.getDeptList, e);
641
+  }
642
+
643
+  // 防抖
644
+  isLoading = false;
645
+  searchTimer(fun, e) {
646
+    this.isLoading = true;
647
+    this.searchTimerSubject.next([fun, e]);
648
+  }
649
+
650
+  openChangeDept(flag){
651
+    flag && this.getDeptList();
652
+  }
653
+
654
+  // 获取科室列表
655
+  deptList:any[] = [];
656
+  getDeptList(keyword?) {
657
+    let data = {
658
+      department: {
659
+        statisticalHosId: this.getHosId,
660
+        dept: keyword,
661
+        searchType: 1,
662
+      },
663
+      idx: 0,
664
+      sum: 20,
665
+    };
666
+    this.isLoading = true;
667
+    this.mainService
668
+      .getFetchDataList("data", "department", data)
669
+      .subscribe((data) => {
670
+        this.isLoading = false;
671
+        this.deptList = data.list;
672
+      });
673
+  }
674
+
583 675
   // 搜索
584 676
   search() {
585 677
 		this.initSessionData();

+ 41 - 2
src/app/views/new-statistics/distribution-inspection-statistics/distribution-user-evaluate-statistics/distribution-user-evaluate-statistics.component.ts

@@ -76,13 +76,16 @@ export class DistributionUserEvaluateStatisticsComponent implements OnInit, Afte
76 76
   hosId:any;
77 77
   dutyId:any;
78 78
   parentDutyId:any;
79
-  initSessionData(){
79
+  async initSessionData(){
80 80
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
81 81
     let queryType:any = newStatistics.queryType;
82
+    let realQueryType:any = newStatistics.realQueryType;
82 83
     let hosId:any = newStatistics.hospitalId;
83 84
     let dutyId:any = newStatistics.dutyId;
85
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
84 86
 
85 87
     queryType = queryType ? +queryType : undefined;
88
+    realQueryType = realQueryType ? +realQueryType : undefined;
86 89
     hosId = hosId ? +hosId : undefined;
87 90
     dutyId = dutyId ? +dutyId : undefined;
88 91
 
@@ -103,6 +106,35 @@ export class DistributionUserEvaluateStatisticsComponent implements OnInit, Afte
103 106
       this.hosId = undefined;
104 107
       this.dutyId = undefined;
105 108
       this.parentDutyId = dutyId;
109
+    }else if(queryType == 5){
110
+      this.fieldConfig.fields.deptId = currentDeptDTO.id;
111
+      let postData = {
112
+        department: {
113
+          id: currentDeptDTO.id,
114
+          searchType: 1,
115
+        },
116
+        idx: 0,
117
+        sum: 1,
118
+      };
119
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
120
+      this.fieldConfig.fields.deptDTO = result.list.length ? result.list[0] : undefined;
121
+      if(realQueryType == 1){
122
+        this.hosId = undefined;
123
+        this.dutyId = undefined;
124
+        this.parentDutyId = undefined;
125
+      }else if(realQueryType == 2){
126
+        this.hosId = hosId;
127
+        this.dutyId = undefined;
128
+        this.parentDutyId = undefined;
129
+      }else if(realQueryType == 3){
130
+        this.hosId = undefined;
131
+        this.dutyId = dutyId;
132
+        this.parentDutyId = undefined;
133
+      }else if(realQueryType == 4){
134
+        this.hosId = undefined;
135
+        this.dutyId = undefined;
136
+        this.parentDutyId = dutyId;
137
+      }
106 138
     }
107 139
   }
108 140
 
@@ -212,7 +244,14 @@ export class DistributionUserEvaluateStatisticsComponent implements OnInit, Afte
212 244
 		this.sortCurrent = {totalCount: 'descend'};
213 245
     this.dateRange = []
214 246
     this.userId = undefined;
215
-    this.fieldConfig.fields = {groupId: undefined, deptId: undefined, buildingId: undefined, taskTypeId: undefined, statisticsTypeId: undefined};
247
+    this.fieldConfig.fields = {
248
+      groupId: undefined,
249
+      buildingId: undefined,
250
+      taskTypeId: undefined,
251
+      statisticsTypeId: undefined,
252
+      deptId: this.queryType == 5 ? this.fieldConfig.fields.deptId : undefined,
253
+      deptDTO: this.queryType == 5 ? this.fieldConfig.fields.deptDTO : undefined,
254
+    };
216 255
     this.customChangeDateComponent.resetByDate();
217 256
     setTimeout(_=>{
218 257
     	this.search();

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

@@ -58,10 +58,9 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
58 58
 				startDate: this.customChangeDateComponent.startDate || undefined,
59 59
 				endDate: this.customChangeDateComponent.endDate || undefined,
60 60
 				statisticsTypeId: this.statisticsTypeId || undefined,
61
+        deptId: this.fieldConfig.fields.deptId || undefined,
61 62
 				searchQuery:{
62 63
 					statusValue: 'close',
63
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
64
-					deptId: this.fieldConfig.fields.deptId || undefined,
65 64
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
66 65
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
67 66
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -77,10 +76,9 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
77 76
 				startDate: this.customChangeDateComponent.startDate || undefined,
78 77
 				endDate: this.customChangeDateComponent.endDate || undefined,
79 78
 				statisticsTypeId: this.statisticsTypeId || undefined,
79
+        deptId: this.fieldConfig.fields.deptId || undefined,
80 80
 				searchQuery:{
81 81
 					statusValue: 'close',
82
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
83
-					deptId: this.fieldConfig.fields.deptId || undefined,
84 82
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
85 83
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
86 84
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -113,10 +111,9 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
113 111
 				startDate: this.customChangeDateComponent.startDate || undefined,
114 112
 				endDate: this.customChangeDateComponent.endDate || undefined,
115 113
 				statisticsTypeId: this.statisticsTypeId || undefined,
114
+        deptId: this.fieldConfig.fields.deptId || undefined,
116 115
 				searchQuery:{
117 116
 					statusValue: 'close',
118
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
119
-					deptId: this.fieldConfig.fields.deptId || undefined,
120 117
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
121 118
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
122 119
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -134,10 +131,9 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
134 131
 				startDate: this.customChangeDateComponent.startDate || undefined,
135 132
 				endDate: this.customChangeDateComponent.endDate || undefined,
136 133
 				statisticsTypeId: data.statisticsTypeId || undefined,
134
+        deptId: this.fieldConfig.fields.deptId || undefined,
137 135
 				searchQuery:{
138 136
 					statusValue: 'close',
139
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
140
-					deptId: this.fieldConfig.fields.deptId || undefined,
141 137
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
142 138
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
143 139
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -172,10 +168,9 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
172 168
 				startDate: this.customChangeDateComponent.startDate || undefined,
173 169
 				endDate: this.customChangeDateComponent.endDate || undefined,
174 170
 				statisticsTypeId: this.statisticsTypeId || undefined,
171
+        deptId: this.fieldConfig.fields.deptId || undefined,
175 172
 				searchQuery:{
176 173
 					statusValue: 'close',
177
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
178
-					deptId: this.fieldConfig.fields.deptId || undefined,
179 174
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
180 175
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
181 176
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -196,10 +191,9 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
196 191
 				startDate: this.customChangeDateComponent.startDate || undefined,
197 192
 				endDate: this.customChangeDateComponent.endDate || undefined,
198 193
 				statisticsTypeId: this.statisticsTypeId || undefined,
194
+        deptId: this.fieldConfig.fields.deptId || undefined,
199 195
 				searchQuery:{
200 196
 					statusValue: 'close',
201
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
202
-					deptId: this.fieldConfig.fields.deptId || undefined,
203 197
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
204 198
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
205 199
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -237,10 +231,9 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
237 231
 				startDate: this.customChangeDateComponent.startDate || undefined,
238 232
 				endDate: this.customChangeDateComponent.endDate || undefined,
239 233
 				statisticsTypeId: this.statisticsTypeId || undefined,
234
+        deptId: this.fieldConfig.fields.deptId || undefined,
240 235
 				searchQuery:{
241 236
 					statusValue: 'close',
242
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
243
-					deptId: this.fieldConfig.fields.deptId || undefined,
244 237
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
245 238
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
246 239
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -261,10 +254,9 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
261 254
 				startDate: this.customChangeDateComponent.startDate || undefined,
262 255
 				endDate: this.customChangeDateComponent.endDate || undefined,
263 256
 				statisticsTypeId: this.statisticsTypeId || undefined,
257
+        deptId: this.fieldConfig.fields.deptId || undefined,
264 258
 				searchQuery:{
265 259
 					statusValue: 'close',
266
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
267
-					deptId: this.fieldConfig.fields.deptId || undefined,
268 260
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
269 261
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
270 262
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -314,13 +306,16 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
314 306
   hosId:any;
315 307
   dutyId:any;
316 308
   parentDutyId:any;
317
-  initSessionData(){
309
+  async initSessionData(){
318 310
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
319 311
     let queryType:any = newStatistics.queryType;
312
+    let realQueryType:any = newStatistics.realQueryType;
320 313
     let hosId:any = newStatistics.hospitalId;
321 314
     let dutyId:any = newStatistics.dutyId;
315
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
322 316
 
323 317
     queryType = queryType ? +queryType : undefined;
318
+    realQueryType = realQueryType ? +realQueryType : undefined;
324 319
     hosId = hosId ? +hosId : undefined;
325 320
     dutyId = dutyId ? +dutyId : undefined;
326 321
 
@@ -341,6 +336,35 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
341 336
       this.hosId = undefined;
342 337
       this.dutyId = undefined;
343 338
       this.parentDutyId = dutyId;
339
+    }else if(queryType == 5){
340
+      this.fieldConfig.fields.deptId = currentDeptDTO.id;
341
+      let postData = {
342
+        department: {
343
+          id: currentDeptDTO.id,
344
+          searchType: 1,
345
+        },
346
+        idx: 0,
347
+        sum: 1,
348
+      };
349
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
350
+      this.fieldConfig.fields.deptDTO = result.list.length ? result.list[0] : undefined;
351
+      if(realQueryType == 1){
352
+        this.hosId = undefined;
353
+        this.dutyId = undefined;
354
+        this.parentDutyId = undefined;
355
+      }else if(realQueryType == 2){
356
+        this.hosId = hosId;
357
+        this.dutyId = undefined;
358
+        this.parentDutyId = undefined;
359
+      }else if(realQueryType == 3){
360
+        this.hosId = undefined;
361
+        this.dutyId = dutyId;
362
+        this.parentDutyId = undefined;
363
+      }else if(realQueryType == 4){
364
+        this.hosId = undefined;
365
+        this.dutyId = undefined;
366
+        this.parentDutyId = dutyId;
367
+      }
344 368
     }
345 369
   }
346 370
 
@@ -450,7 +474,14 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
450 474
 		this.sortCurrent = {};
451 475
     this.dateRange = []
452 476
     this.statisticsTypeId = undefined;
453
-    this.fieldConfig.fields = {groupId: undefined, userId: undefined, deptId: undefined, buildingId: undefined, taskTypeId: undefined};
477
+    this.fieldConfig.fields = {
478
+      groupId: undefined,
479
+      userId: undefined,
480
+      buildingId: undefined,
481
+      taskTypeId: undefined,
482
+      deptId: this.queryType == 5 ? this.fieldConfig.fields.deptId : undefined,
483
+      deptDTO: this.queryType == 5 ? this.fieldConfig.fields.deptDTO : undefined,
484
+    };
454 485
     this.customChangeDateComponent.resetByDate();
455 486
     setTimeout(_=>{
456 487
     	this.search();

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

@@ -28,13 +28,9 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
28 28
   pageSize: number = 10; //表格每页展示条数
29 29
   listLength: number = 0; //表格总数据量
30 30
 
31
-  repairDeptId;//报修科室id
32
-
33 31
   searchTimerSubject = new Subject();
34 32
 
35 33
   ngOnInit() {
36
-		// 数据下钻搜索
37
-		this.getRouteQuery()
38 34
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
39 35
       let fun = v[0];
40 36
       fun.call(this, v[1]);
@@ -49,6 +45,8 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
49 45
 
50 46
   ngAfterViewInit(){
51 47
     this.initSessionData();
48
+    // 数据下钻搜索
49
+		this.getRouteQuery()
52 50
     this.onResize(0);
53 51
   }
54 52
 
@@ -63,13 +61,13 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
63 61
 
64 62
 	goingType:boolean = false;
65 63
 	gdStateId:any = null;
66
-	getRouteQuery(){
64
+	async getRouteQuery(){
67 65
 		let data = sessionStorage.getItem('distributionData')
68 66
 		let query = null
69 67
 		if(data){
70 68
 			query = JSON.parse(data)
71 69
 			console.log('query==========',query)
72
-			setTimeout(_=>{
70
+			// setTimeout(_=>{
73 71
 				// 统计分类
74 72
 				if(query.statisticsTypeId){
75 73
 					this.getStatisticsTypeList();
@@ -77,6 +75,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
77 75
 				}else{
78 76
 					this.statisticsTypeId = undefined
79 77
 				}
78
+
80 79
 				if(query.searchQuery){
81 80
 					this.goingType = true
82 81
 					this.fieldConfig.fields = query.searchQuery
@@ -84,18 +83,35 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
84 83
 					this.goingType = false
85 84
 					this.fieldConfig.fields = {}
86 85
 				}
86
+
87
+        if(query.deptId){
88
+          this.fieldConfig.fields.deptId = query.deptId
89
+          let postData = {
90
+            department: {
91
+              id: query.deptId,
92
+              searchType: 1,
93
+            },
94
+            idx: 0,
95
+            sum: 1,
96
+          };
97
+          let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
98
+          this.fieldConfig.fields.deptDTO = result.list.length ? result.list[0] : undefined;
99
+        }else{
100
+          this.fieldConfig.fields.deptId = undefined
101
+        }
102
+
87 103
 				if(!query.isGdId){
88 104
 					this.gdStateId = '73,74'
89 105
 				}else{
90 106
 					this.gdStateId = undefined;
91 107
 				}
92 108
 				this.getQueryParams(query);
93
-			},50)
109
+			// },50)
94 110
 		}else{
95 111
 			this.gdStateId = undefined;
96
-			setTimeout(_=>{
112
+			// setTimeout(_=>{
97 113
 				this.getQueryParams('');
98
-			},50)
114
+			// },50)
99 115
 		}
100 116
 	}
101 117
 
@@ -125,7 +141,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
125 141
 		this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO ||
126 142
 		this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO  ||
127 143
 		this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO ||
128
-		this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
144
+		this.fieldConfig.fields.companyDTO;
129 145
     return flag ? 37 : 0;
130 146
   }
131 147
 
@@ -134,13 +150,16 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
134 150
   hosId:any;
135 151
   dutyId:any;
136 152
   parentDutyId:any;
137
-  initSessionData(){
153
+  async initSessionData(){
138 154
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
139 155
     let queryType:any = newStatistics.queryType;
156
+    let realQueryType:any = newStatistics.realQueryType;
140 157
     let hosId:any = newStatistics.hospitalId;
141 158
     let dutyId:any = newStatistics.dutyId;
159
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
142 160
 
143 161
     queryType = queryType ? +queryType : undefined;
162
+    realQueryType = realQueryType ? +realQueryType : undefined;
144 163
     hosId = hosId ? +hosId : undefined;
145 164
     dutyId = dutyId ? +dutyId : undefined;
146 165
 
@@ -161,6 +180,35 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
161 180
       this.hosId = undefined;
162 181
       this.dutyId = undefined;
163 182
       this.parentDutyId = dutyId;
183
+    }else if(queryType == 5){
184
+      this.fieldConfig.fields.deptId = currentDeptDTO.id;
185
+      let postData = {
186
+        department: {
187
+          id: currentDeptDTO.id,
188
+          searchType: 1,
189
+        },
190
+        idx: 0,
191
+        sum: 1,
192
+      };
193
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
194
+      this.fieldConfig.fields.deptDTO = result.list.length ? result.list[0] : undefined;
195
+      if(realQueryType == 1){
196
+        this.hosId = undefined;
197
+        this.dutyId = undefined;
198
+        this.parentDutyId = undefined;
199
+      }else if(realQueryType == 2){
200
+        this.hosId = hosId;
201
+        this.dutyId = undefined;
202
+        this.parentDutyId = undefined;
203
+      }else if(realQueryType == 3){
204
+        this.hosId = undefined;
205
+        this.dutyId = dutyId;
206
+        this.parentDutyId = undefined;
207
+      }else if(realQueryType == 4){
208
+        this.hosId = undefined;
209
+        this.dutyId = undefined;
210
+        this.parentDutyId = dutyId;
211
+      }
164 212
     }
165 213
   }
166 214
 
@@ -288,7 +336,15 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
288 336
     this.dateRange = []
289 337
     this.statisticsTypeId = undefined;
290 338
 		this.gdStateId = undefined;
291
-    this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined};
339
+    this.fieldConfig.fields = {
340
+      groupId: undefined,
341
+      userId: undefined,
342
+      categoryId: undefined,
343
+      sourceId: undefined,
344
+      hierarchy: undefined,
345
+      deptId: this.queryType == 5 ? this.fieldConfig.fields.deptId : undefined,
346
+      deptDTO: this.queryType == 5 ? this.fieldConfig.fields.deptDTO : undefined,
347
+    };
292 348
     this.customChangeDateComponent.resetByDate();
293 349
 		sessionStorage.removeItem('distributionData');
294 350
 		setTimeout(_=>{

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

@@ -3,7 +3,7 @@
3 3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4 4
     <div class="searchDataItem">
5 5
       <span class="label">科室</span>:
6
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" (nzOpenChange)="openChangeDept($event)">
6
+      <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" (nzOpenChange)="openChangeDept($event)">
7 7
         <ng-container *ngFor="let option of deptList">
8 8
           <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>

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

@@ -74,13 +74,16 @@ export class SourceStatisticsComponent implements OnInit, AfterViewInit {
74 74
   hosId:any;
75 75
   dutyId:any;
76 76
   parentDutyId:any;
77
-  initSessionData(){
77
+  async initSessionData(){
78 78
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
79 79
     let queryType:any = newStatistics.queryType;
80
+    let realQueryType:any = newStatistics.realQueryType;
80 81
     let hosId:any = newStatistics.hospitalId;
81 82
     let dutyId:any = newStatistics.dutyId;
83
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
82 84
 
83 85
     queryType = queryType ? +queryType : undefined;
86
+    realQueryType = realQueryType ? +realQueryType : undefined;
84 87
     hosId = hosId ? +hosId : undefined;
85 88
     dutyId = dutyId ? +dutyId : undefined;
86 89
 
@@ -101,6 +104,35 @@ export class SourceStatisticsComponent implements OnInit, AfterViewInit {
101 104
       this.hosId = undefined;
102 105
       this.dutyId = undefined;
103 106
       this.parentDutyId = dutyId;
107
+    }else if(queryType == 5){
108
+      this.deptId = currentDeptDTO.id;
109
+      let postData = {
110
+        department: {
111
+          id: currentDeptDTO.id,
112
+          searchType: 1,
113
+        },
114
+        idx: 0,
115
+        sum: 1,
116
+      };
117
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
118
+      this.deptList = result.list || [];
119
+      if(realQueryType == 1){
120
+        this.hosId = undefined;
121
+        this.dutyId = undefined;
122
+        this.parentDutyId = undefined;
123
+      }else if(realQueryType == 2){
124
+        this.hosId = hosId;
125
+        this.dutyId = undefined;
126
+        this.parentDutyId = undefined;
127
+      }else if(realQueryType == 3){
128
+        this.hosId = undefined;
129
+        this.dutyId = dutyId;
130
+        this.parentDutyId = undefined;
131
+      }else if(realQueryType == 4){
132
+        this.hosId = undefined;
133
+        this.dutyId = undefined;
134
+        this.parentDutyId = dutyId;
135
+      }
104 136
     }
105 137
   }
106 138
 
@@ -209,7 +241,8 @@ export class SourceStatisticsComponent implements OnInit, AfterViewInit {
209 241
 		this.sortCurrentValue = "";
210 242
 		this.sortCurrent = {};
211 243
     this.dateRange = []
212
-    this.deptId = undefined;
244
+    this.deptId = this.queryType == 5 ? this.deptId : undefined;
245
+    this.deptList = this.queryType == 5 ? this.deptList : undefined;
213 246
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, taskTypeId: undefined, buildingId: undefined, statisticsTypeId: undefined};
214 247
     this.customChangeDateComponent.resetByDate();
215 248
     setTimeout(_=>{

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

@@ -69,10 +69,9 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
69 69
 			query = {
70 70
 				startDate: this.customChangeDateComponent.startDate || undefined,
71 71
 				endDate: this.customChangeDateComponent.endDate || undefined,
72
+        deptId: this.fieldConfig.fields.deptId || undefined,
72 73
 				searchQuery:{
73 74
 					statusValue: 'close',
74
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
75
-					deptId: this.fieldConfig.fields.deptId || undefined,
76 75
 					taskTypeId: this.taskTypeId || undefined,
77 76
 					taskTypeDTO: item,
78 77
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -107,10 +106,9 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
107 106
 			      query = {
108 107
 			      	startDate: this.customChangeDateComponent.startDate || undefined,
109 108
 			      	endDate: this.customChangeDateComponent.endDate || undefined,
109
+              deptId: this.fieldConfig.fields.deptId || undefined,
110 110
 			      	searchQuery:{
111 111
 			      		statusValue: 'close',
112
-			      		deptDTO: this.fieldConfig.fields.deptDTO || undefined,
113
-			      		deptId: this.fieldConfig.fields.deptId || undefined,
114 112
 			      		taskTypeId: data.taskTypeId || undefined,
115 113
 			      		taskTypeDTO: item,
116 114
 			      		groupId: this.fieldConfig.fields.groupId || undefined,
@@ -144,10 +142,9 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
144 142
 				startDate: this.customChangeDateComponent.startDate || undefined,
145 143
 				endDate: this.customChangeDateComponent.endDate || undefined,
146 144
 				taskTypeId: this.taskTypeId || undefined,
145
+        deptId: this.fieldConfig.fields.deptId || undefined,
147 146
 				searchQuery:{
148 147
 					statusValue: 'close',
149
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
150
-					deptId: this.fieldConfig.fields.deptId || undefined,
151 148
 					taskTypeId: this.taskTypeId || undefined,
152 149
 					taskTypeDTO: item,
153 150
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -184,10 +181,9 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
184 181
 						query = {
185 182
 							startDate: this.customChangeDateComponent.startDate || undefined,
186 183
 							endDate: this.customChangeDateComponent.endDate || undefined,
184
+              deptId: this.fieldConfig.fields.deptId || undefined,
187 185
 							searchQuery:{
188 186
 								statusValue: 'close',
189
-								deptDTO: this.fieldConfig.fields.deptDTO || undefined,
190
-								deptId: this.fieldConfig.fields.deptId || undefined,
191 187
 								taskTypeId: data.taskTypeId || undefined,
192 188
 								taskTypeDTO: item,
193 189
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -223,10 +219,9 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
223 219
 				startDate: this.customChangeDateComponent.startDate || undefined,
224 220
 				endDate: this.customChangeDateComponent.endDate || undefined,
225 221
 				taskTypeId: this.taskTypeId || undefined,
222
+        deptId: this.fieldConfig.fields.deptId || undefined,
226 223
 				searchQuery:{
227 224
 					statusValue: 'close',
228
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
229
-					deptId: this.fieldConfig.fields.deptId || undefined,
230 225
 					taskTypeId: this.taskTypeId || undefined,
231 226
 					taskTypeDTO: item,
232 227
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -266,10 +261,9 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
266 261
 						query = {
267 262
 							startDate: this.customChangeDateComponent.startDate || undefined,
268 263
 							endDate: this.customChangeDateComponent.endDate || undefined,
264
+              deptId: this.fieldConfig.fields.deptId || undefined,
269 265
 							searchQuery:{
270 266
 								statusValue: 'close',
271
-								deptDTO: this.fieldConfig.fields.deptDTO || undefined,
272
-								deptId: this.fieldConfig.fields.deptId || undefined,
273 267
 								taskTypeId: data.taskTypeId || undefined,
274 268
 								taskTypeDTO: item,
275 269
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -308,10 +302,9 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
308 302
 				startDate: this.customChangeDateComponent.startDate || undefined,
309 303
 				endDate: this.customChangeDateComponent.endDate || undefined,
310 304
 				taskTypeId: this.taskTypeId || undefined,
305
+        deptId: this.fieldConfig.fields.deptId || undefined,
311 306
 				searchQuery:{
312 307
 					statusValue: 'close',
313
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
314
-					deptId: this.fieldConfig.fields.deptId || undefined,
315 308
 					taskTypeId: this.taskTypeId || undefined,
316 309
 					taskTypeDTO: item,
317 310
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -351,10 +344,9 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
351 344
 						query = {
352 345
 							startDate: this.customChangeDateComponent.startDate || undefined,
353 346
 							endDate: this.customChangeDateComponent.endDate || undefined,
347
+              deptId: this.fieldConfig.fields.deptId || undefined,
354 348
 							searchQuery:{
355 349
 								statusValue: 'close',
356
-								deptDTO: this.fieldConfig.fields.deptDTO || undefined,
357
-								deptId: this.fieldConfig.fields.deptId || undefined,
358 350
 								taskTypeId: data.taskTypeId || undefined,
359 351
 								taskTypeDTO: item,
360 352
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -401,13 +393,16 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
401 393
   hosId:any;
402 394
   dutyId:any;
403 395
   parentDutyId:any;
404
-  initSessionData(){
396
+  async initSessionData(){
405 397
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
406 398
     let queryType:any = newStatistics.queryType;
399
+    let realQueryType:any = newStatistics.realQueryType;
407 400
     let hosId:any = newStatistics.hospitalId;
408 401
     let dutyId:any = newStatistics.dutyId;
402
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
409 403
 
410 404
     queryType = queryType ? +queryType : undefined;
405
+    realQueryType = realQueryType ? +realQueryType : undefined;
411 406
     hosId = hosId ? +hosId : undefined;
412 407
     dutyId = dutyId ? +dutyId : undefined;
413 408
 
@@ -428,6 +423,35 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
428 423
       this.hosId = undefined;
429 424
       this.dutyId = undefined;
430 425
       this.parentDutyId = dutyId;
426
+    }else if(queryType == 5){
427
+      this.fieldConfig.fields.deptId = currentDeptDTO.id;
428
+      let postData = {
429
+        department: {
430
+          id: currentDeptDTO.id,
431
+          searchType: 1,
432
+        },
433
+        idx: 0,
434
+        sum: 1,
435
+      };
436
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
437
+      this.fieldConfig.fields.deptDTO = result.list.length ? result.list[0] : undefined;
438
+      if(realQueryType == 1){
439
+        this.hosId = undefined;
440
+        this.dutyId = undefined;
441
+        this.parentDutyId = undefined;
442
+      }else if(realQueryType == 2){
443
+        this.hosId = hosId;
444
+        this.dutyId = undefined;
445
+        this.parentDutyId = undefined;
446
+      }else if(realQueryType == 3){
447
+        this.hosId = undefined;
448
+        this.dutyId = dutyId;
449
+        this.parentDutyId = undefined;
450
+      }else if(realQueryType == 4){
451
+        this.hosId = undefined;
452
+        this.dutyId = undefined;
453
+        this.parentDutyId = dutyId;
454
+      }
431 455
     }
432 456
   }
433 457
 
@@ -535,7 +559,13 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
535 559
 		this.sortCurrent = {};
536 560
     this.dateRange = []
537 561
     this.taskTypeId = undefined;
538
-    this.fieldConfig.fields = {groupId: undefined, userId: undefined, deptId: undefined, buildingId: undefined};
562
+    this.fieldConfig.fields = {
563
+      groupId: undefined,
564
+      userId: undefined,
565
+      buildingId: undefined,
566
+      deptId: this.queryType == 5 ? this.fieldConfig.fields.deptId : undefined,
567
+      deptDTO: this.queryType == 5 ? this.fieldConfig.fields.deptDTO : undefined,
568
+    };
539 569
     this.customChangeDateComponent.resetByDate();
540 570
     setTimeout(_=>{
541 571
     	this.search();

+ 39 - 2
src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.component.ts

@@ -76,13 +76,16 @@ export class UserBusinessStatisticsComponent implements OnInit, AfterViewInit {
76 76
   hosId:any;
77 77
   dutyId:any;
78 78
   parentDutyId:any;
79
-  initSessionData(){
79
+  async initSessionData(){
80 80
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
81 81
     let queryType:any = newStatistics.queryType;
82
+    let realQueryType:any = newStatistics.realQueryType;
82 83
     let hosId:any = newStatistics.hospitalId;
83 84
     let dutyId:any = newStatistics.dutyId;
85
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
84 86
 
85 87
     queryType = queryType ? +queryType : undefined;
88
+    realQueryType = realQueryType ? +realQueryType : undefined;
86 89
     hosId = hosId ? +hosId : undefined;
87 90
     dutyId = dutyId ? +dutyId : undefined;
88 91
 
@@ -103,6 +106,35 @@ export class UserBusinessStatisticsComponent implements OnInit, AfterViewInit {
103 106
       this.hosId = undefined;
104 107
       this.dutyId = undefined;
105 108
       this.parentDutyId = dutyId;
109
+    }else if(queryType == 5){
110
+      this.fieldConfig.fields.deptId = currentDeptDTO.id;
111
+      let postData = {
112
+        department: {
113
+          id: currentDeptDTO.id,
114
+          searchType: 1,
115
+        },
116
+        idx: 0,
117
+        sum: 1,
118
+      };
119
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
120
+      this.fieldConfig.fields.deptDTO = result.list.length ? result.list[0] : undefined;
121
+      if(realQueryType == 1){
122
+        this.hosId = undefined;
123
+        this.dutyId = undefined;
124
+        this.parentDutyId = undefined;
125
+      }else if(realQueryType == 2){
126
+        this.hosId = hosId;
127
+        this.dutyId = undefined;
128
+        this.parentDutyId = undefined;
129
+      }else if(realQueryType == 3){
130
+        this.hosId = undefined;
131
+        this.dutyId = dutyId;
132
+        this.parentDutyId = undefined;
133
+      }else if(realQueryType == 4){
134
+        this.hosId = undefined;
135
+        this.dutyId = undefined;
136
+        this.parentDutyId = dutyId;
137
+      }
106 138
     }
107 139
   }
108 140
 
@@ -217,7 +249,12 @@ export class UserBusinessStatisticsComponent implements OnInit, AfterViewInit {
217 249
 		this.sortCurrent = {totalCount: 'descend'};
218 250
     this.dateRange = []
219 251
     this.userId = undefined;
220
-    this.fieldConfig.fields = {buildingId: undefined, deptId: undefined, groupId: undefined};
252
+    this.fieldConfig.fields = {
253
+      buildingId: undefined,
254
+      groupId: undefined,
255
+      deptId: this.queryType == 5 ? this.fieldConfig.fields.deptId : undefined,
256
+      deptDTO: this.queryType == 5 ? this.fieldConfig.fields.deptDTO : undefined,
257
+    };
221 258
     this.customChangeDateComponent.resetByDate();
222 259
     setTimeout(_=>{
223 260
     	this.search();

+ 41 - 6
src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.component.ts

@@ -67,10 +67,9 @@ export class UserQualityControlStatisticsComponent implements OnInit, AfterViewI
67 67
 				startDate: this.customChangeDateComponent.startDate || undefined,
68 68
 				endDate: this.customChangeDateComponent.endDate || undefined,
69 69
 				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
70
+        deptId: this.fieldConfig.fields.deptId || undefined,
70 71
 				searchQuery:{
71 72
 					statusValue: 'close',
72
-					deptDTO: this.fieldConfig.fields.deptDTO || undefined,
73
-					deptId: this.fieldConfig.fields.deptId || undefined,
74 73
 					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
75 74
 					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
76 75
 					groupId: this.fieldConfig.fields.groupId || undefined,
@@ -111,10 +110,9 @@ export class UserQualityControlStatisticsComponent implements OnInit, AfterViewI
111 110
 							startDate: this.customChangeDateComponent.startDate || undefined,
112 111
 							endDate: this.customChangeDateComponent.endDate || undefined,
113 112
 							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
113
+              deptId: this.fieldConfig.fields.deptId || undefined,
114 114
 							searchQuery:{
115 115
 								statusValue: 'close',
116
-								deptDTO: this.fieldConfig.fields.deptDTO || undefined,
117
-								deptId: this.fieldConfig.fields.deptId || undefined,
118 116
 								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
119 117
 								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
120 118
 								groupId: this.fieldConfig.fields.groupId || undefined,
@@ -161,13 +159,16 @@ export class UserQualityControlStatisticsComponent implements OnInit, AfterViewI
161 159
   hosId:any;
162 160
   dutyId:any;
163 161
   parentDutyId:any;
164
-  initSessionData(){
162
+  async initSessionData(){
165 163
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
166 164
     let queryType:any = newStatistics.queryType;
165
+    let realQueryType:any = newStatistics.realQueryType;
167 166
     let hosId:any = newStatistics.hospitalId;
168 167
     let dutyId:any = newStatistics.dutyId;
168
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
169 169
 
170 170
     queryType = queryType ? +queryType : undefined;
171
+    realQueryType = realQueryType ? +realQueryType : undefined;
171 172
     hosId = hosId ? +hosId : undefined;
172 173
     dutyId = dutyId ? +dutyId : undefined;
173 174
 
@@ -188,6 +189,35 @@ export class UserQualityControlStatisticsComponent implements OnInit, AfterViewI
188 189
       this.hosId = undefined;
189 190
       this.dutyId = undefined;
190 191
       this.parentDutyId = dutyId;
192
+    }else if(queryType == 5){
193
+      this.fieldConfig.fields.deptId = currentDeptDTO.id;
194
+      let postData = {
195
+        department: {
196
+          id: currentDeptDTO.id,
197
+          searchType: 1,
198
+        },
199
+        idx: 0,
200
+        sum: 1,
201
+      };
202
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
203
+      this.fieldConfig.fields.deptDTO = result.list.length ? result.list[0] : undefined;
204
+      if(realQueryType == 1){
205
+        this.hosId = undefined;
206
+        this.dutyId = undefined;
207
+        this.parentDutyId = undefined;
208
+      }else if(realQueryType == 2){
209
+        this.hosId = hosId;
210
+        this.dutyId = undefined;
211
+        this.parentDutyId = undefined;
212
+      }else if(realQueryType == 3){
213
+        this.hosId = undefined;
214
+        this.dutyId = dutyId;
215
+        this.parentDutyId = undefined;
216
+      }else if(realQueryType == 4){
217
+        this.hosId = undefined;
218
+        this.dutyId = undefined;
219
+        this.parentDutyId = dutyId;
220
+      }
191 221
     }
192 222
   }
193 223
 
@@ -293,7 +323,12 @@ export class UserQualityControlStatisticsComponent implements OnInit, AfterViewI
293 323
 		this.sortCurrent = {totalGrade: 'descend'};
294 324
     this.dateRange = []
295 325
     this.userId = undefined;
296
-    this.fieldConfig.fields = {buildingId: undefined, deptId: undefined, groupId: undefined};
326
+    this.fieldConfig.fields = {
327
+      buildingId: undefined,
328
+      groupId: undefined,
329
+      deptId: this.queryType == 5 ? this.fieldConfig.fields.deptId : undefined,
330
+      deptDTO: this.queryType == 5 ? this.fieldConfig.fields.deptDTO : undefined,
331
+    };
297 332
     this.customChangeDateComponent.resetByDate();
298 333
     setTimeout(_=>{
299 334
     	this.search();

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

@@ -9,10 +9,11 @@
9 9
     <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
10 10
   </div>
11 11
 </div>
12
-<div class="moreFilter" *ngIf="fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO">
12
+<div class="moreFilter" *ngIf="fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO || fieldConfig.fields.repairDeptDTO">
13 13
   <span>{{fieldConfig.fields.category1DTO?.category}}</span>
14 14
   <span>{{fieldConfig.fields.category2DTO?.category}}</span>
15 15
   <span>{{fieldConfig.fields.category3DTO?.category}}</span>
16
+  <span>{{fieldConfig.fields.repairDeptDTO?.dept}}</span>
16 17
 </div>
17 18
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
18 19
   <thead (nzSortChange)="sort($event)" nzSingleSort>

+ 42 - 4
src/app/views/new-statistics/maintenance-statistics/building-statistics/building-statistics.component.ts

@@ -63,13 +63,16 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
63 63
   hosId:any;
64 64
   dutyId:any;
65 65
   parentDutyId:any;
66
-  initSessionData(){
66
+  async initSessionData(){
67 67
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
68 68
     let queryType:any = newStatistics.queryType;
69
+    let realQueryType:any = newStatistics.realQueryType;
69 70
     let hosId:any = newStatistics.hospitalId;
70 71
     let dutyId:any = newStatistics.dutyId;
72
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
71 73
 
72 74
     queryType = queryType ? +queryType : undefined;
75
+    realQueryType = realQueryType ? +realQueryType : undefined;
73 76
     hosId = hosId ? +hosId : undefined;
74 77
     dutyId = dutyId ? +dutyId : undefined;
75 78
 
@@ -90,6 +93,35 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
90 93
       this.hosId = undefined;
91 94
       this.dutyId = undefined;
92 95
       this.parentDutyId = dutyId;
96
+    }else if(queryType == 5){
97
+      this.fieldConfig.fields.repairDeptId = currentDeptDTO.id;
98
+      let postData = {
99
+        department: {
100
+          id: currentDeptDTO.id,
101
+          searchType: 1,
102
+        },
103
+        idx: 0,
104
+        sum: 1,
105
+      };
106
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
107
+      this.fieldConfig.fields.repairDeptDTO = result.list.length ? result.list[0] : undefined;
108
+      if(realQueryType == 1){
109
+        this.hosId = undefined;
110
+        this.dutyId = undefined;
111
+        this.parentDutyId = undefined;
112
+      }else if(realQueryType == 2){
113
+        this.hosId = hosId;
114
+        this.dutyId = undefined;
115
+        this.parentDutyId = undefined;
116
+      }else if(realQueryType == 3){
117
+        this.hosId = undefined;
118
+        this.dutyId = dutyId;
119
+        this.parentDutyId = undefined;
120
+      }else if(realQueryType == 4){
121
+        this.hosId = undefined;
122
+        this.dutyId = undefined;
123
+        this.parentDutyId = dutyId;
124
+      }
93 125
     }
94 126
   }
95 127
 
@@ -113,6 +145,7 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
113 145
       parentDutyId: this.parentDutyId || undefined,
114 146
       categoryId: this.fieldConfig.fields.categoryId || undefined,
115 147
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
148
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
116 149
     };
117 150
     if (field && sort) {
118 151
       postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
@@ -161,6 +194,7 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
161 194
       parentDutyId: this.parentDutyId || undefined,
162 195
       categoryId: this.fieldConfig.fields.categoryId || undefined,
163 196
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
197
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
164 198
     };
165 199
     if (this.sortCurrentKey && this.sortCurrentValue) {
166 200
       postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
@@ -194,7 +228,11 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
194 228
 		this.sortCurrentValue = "";
195 229
 		this.sortCurrent = {};
196 230
     this.dateRange = []
197
-    this.fieldConfig.fields = {category123: true};
231
+    this.fieldConfig.fields = {
232
+      categoryId: undefined,
233
+      repairDeptId: this.queryType == 5 ? this.fieldConfig.fields.repairDeptId : undefined,
234
+      repairDeptDTO: this.queryType == 5 ? this.fieldConfig.fields.repairDeptDTO : undefined,
235
+    };
198 236
     this.customChangeDateComponent.resetByDate();
199 237
     setTimeout(_=>{
200 238
     	this.search();
@@ -206,8 +244,8 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
206 244
 
207 245
   // 详细搜索
208 246
   fieldConfig:any = {
209
-    fields: {categoryId: undefined},
210
-    config: {category123: true},
247
+    fields: {categoryId: undefined, repairDeptId: undefined},
248
+    config: {category123: true, repairDept: true},
211 249
   }
212 250
   showSearchMore:boolean = false;
213 251
   showMore(){

+ 50 - 10
src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.ts

@@ -45,7 +45,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
45 45
 
46 46
     }, 0)
47 47
   }
48
-	
48
+
49 49
 	// 数据下钻
50 50
 	viewDetail1(data, type){
51 51
 		let query = null
@@ -106,7 +106,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
106 106
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
107 107
 		this.router.navigate([path], { replaceUrl: true });
108 108
 	}
109
-	
109
+
110 110
 	// 数据下钻
111 111
 	viewDetail2(data, type){
112 112
 		let query = null
@@ -177,7 +177,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
177 177
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
178 178
 		this.router.navigate([path], { replaceUrl: true });
179 179
 	}
180
-	
180
+
181 181
 	// 数据下钻
182 182
 	viewDetail3(data, type){
183 183
 		let query = null
@@ -248,7 +248,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
248 248
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
249 249
 		this.router.navigate([path], { replaceUrl: true });
250 250
 	}
251
-	
251
+
252 252
 	// 数据下钻
253 253
 	viewDetail4(data, type){
254 254
 		let query = null
@@ -320,7 +320,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
320 320
 				}
321 321
 			}
322 322
 		}
323
-		
323
+
324 324
 		let path = '/newStatistics/maintenanceStatistics/incidentList'
325 325
 		let flag = this.tabService.tabs.some(v => v.path === path);
326 326
 		flag && this.tabService.deleteRouteSnapshot(path);
@@ -329,7 +329,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
329 329
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
330 330
 		this.router.navigate([path], { replaceUrl: true });
331 331
 	}
332
-	
332
+
333 333
   getQueryParams(){
334 334
     let queryParams = this.tabService.getQueryParams();
335 335
     this.tabService.clearQueryParams();
@@ -349,13 +349,16 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
349 349
   hosId:any;
350 350
   dutyId:any;
351 351
   parentDutyId:any;
352
-  initSessionData(){
352
+  async initSessionData(){
353 353
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
354 354
     let queryType:any = newStatistics.queryType;
355
+    let realQueryType:any = newStatistics.realQueryType;
355 356
     let hosId:any = newStatistics.hospitalId;
356 357
     let dutyId:any = newStatistics.dutyId;
358
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
357 359
 
358 360
     queryType = queryType ? +queryType : undefined;
361
+    realQueryType = realQueryType ? +realQueryType : undefined;
359 362
     hosId = hosId ? +hosId : undefined;
360 363
     dutyId = dutyId ? +dutyId : undefined;
361 364
 
@@ -376,13 +379,42 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
376 379
       this.hosId = undefined;
377 380
       this.dutyId = undefined;
378 381
       this.parentDutyId = dutyId;
382
+    }else if(queryType == 5){
383
+      this.fieldConfig.fields.repairDeptId = currentDeptDTO.id;
384
+      let postData = {
385
+        department: {
386
+          id: currentDeptDTO.id,
387
+          searchType: 1,
388
+        },
389
+        idx: 0,
390
+        sum: 1,
391
+      };
392
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
393
+      this.fieldConfig.fields.repairDeptDTO = result.list.length ? result.list[0] : undefined;
394
+      if(realQueryType == 1){
395
+        this.hosId = undefined;
396
+        this.dutyId = undefined;
397
+        this.parentDutyId = undefined;
398
+      }else if(realQueryType == 2){
399
+        this.hosId = hosId;
400
+        this.dutyId = undefined;
401
+        this.parentDutyId = undefined;
402
+      }else if(realQueryType == 3){
403
+        this.hosId = undefined;
404
+        this.dutyId = dutyId;
405
+        this.parentDutyId = undefined;
406
+      }else if(realQueryType == 4){
407
+        this.hosId = undefined;
408
+        this.dutyId = undefined;
409
+        this.parentDutyId = dutyId;
410
+      }
379 411
     }
380 412
   }
381 413
 
382 414
   get getHosId(){
383 415
     return this.parentDutyId || this.dutyId || this.hosId;
384 416
   }
385
-	
417
+
386 418
 	// 获取一级分类列表
387 419
 	category1List:any[] = [];
388 420
 	getCategory1List(keyword?) {
@@ -402,7 +434,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
402 434
 	      this.category1List = data.data;
403 435
 	    });
404 436
 	}
405
-	
437
+
406 438
   // 表格数据
407 439
   loading1 = false;
408 440
   getList(num?: number, field?: string, sort?: string) {
@@ -512,7 +544,15 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
512 544
 		this.sortCurrentValue = "";
513 545
 		this.sortCurrent = {};
514 546
     this.dateRange = []
515
-    this.fieldConfig.fields = {groupId: undefined, userId: undefined, buildingId: undefined, floorId: undefined, companyId: undefined, repairDeptId: undefined};
547
+    this.fieldConfig.fields = {
548
+      groupId: undefined,
549
+      userId: undefined,
550
+      buildingId: undefined,
551
+      floorId: undefined,
552
+      companyId: undefined,
553
+      repairDeptId: this.queryType == 5 ? this.fieldConfig.fields.repairDeptId : undefined,
554
+      repairDeptDTO: this.queryType == 5 ? this.fieldConfig.fields.repairDeptDTO : undefined,
555
+    };
516 556
     this.customChangeDateComponent.resetByDate();
517 557
 		sessionStorage.removeItem('maintenanceData');
518 558
     setTimeout(_=>{

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

@@ -9,7 +9,7 @@
9 9
     <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
10 10
   </div>
11 11
 </div>
12
-<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">
12
+<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.repairDeptDTO">
13 13
   <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
14 14
   <span>{{fieldConfig.fields.userDTO?.name}}</span>
15 15
   <span>{{fieldConfig.fields.category1DTO?.category}}</span>
@@ -17,6 +17,7 @@
17 17
   <span>{{fieldConfig.fields.category3DTO?.category}}</span>
18 18
   <span>{{fieldConfig.fields.buildingDTO?.buildingName}}</span>
19 19
   <span>{{fieldConfig.fields.floorDTO?.floorName}}</span>
20
+  <span>{{fieldConfig.fields.repairDeptDTO?.dept}}</span>
20 21
 </div>
21 22
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
22 23
   <thead (nzSortChange)="sort($event)" nzSingleSort>

+ 46 - 4
src/app/views/new-statistics/maintenance-statistics/category-source-statistics/category-source-statistics.component.ts

@@ -63,13 +63,16 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
63 63
   hosId:any;
64 64
   dutyId:any;
65 65
   parentDutyId:any;
66
-  initSessionData(){
66
+  async initSessionData(){
67 67
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
68 68
     let queryType:any = newStatistics.queryType;
69
+    let realQueryType:any = newStatistics.realQueryType;
69 70
     let hosId:any = newStatistics.hospitalId;
70 71
     let dutyId:any = newStatistics.dutyId;
72
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
71 73
 
72 74
     queryType = queryType ? +queryType : undefined;
75
+    realQueryType = realQueryType ? +realQueryType : undefined;
73 76
     hosId = hosId ? +hosId : undefined;
74 77
     dutyId = dutyId ? +dutyId : undefined;
75 78
 
@@ -90,6 +93,35 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
90 93
       this.hosId = undefined;
91 94
       this.dutyId = undefined;
92 95
       this.parentDutyId = dutyId;
96
+    }else if(queryType == 5){
97
+      this.fieldConfig.fields.repairDeptId = currentDeptDTO.id;
98
+      let postData = {
99
+        department: {
100
+          id: currentDeptDTO.id,
101
+          searchType: 1,
102
+        },
103
+        idx: 0,
104
+        sum: 1,
105
+      };
106
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
107
+      this.fieldConfig.fields.repairDeptDTO = result.list.length ? result.list[0] : undefined;
108
+      if(realQueryType == 1){
109
+        this.hosId = undefined;
110
+        this.dutyId = undefined;
111
+        this.parentDutyId = undefined;
112
+      }else if(realQueryType == 2){
113
+        this.hosId = hosId;
114
+        this.dutyId = undefined;
115
+        this.parentDutyId = undefined;
116
+      }else if(realQueryType == 3){
117
+        this.hosId = undefined;
118
+        this.dutyId = dutyId;
119
+        this.parentDutyId = undefined;
120
+      }else if(realQueryType == 4){
121
+        this.hosId = undefined;
122
+        this.dutyId = undefined;
123
+        this.parentDutyId = dutyId;
124
+      }
93 125
     }
94 126
   }
95 127
 
@@ -117,6 +149,7 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
117 149
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
118 150
       buildingId: this.fieldConfig.fields.buildingId || undefined,
119 151
       placeId: this.fieldConfig.fields.floorId || undefined,
152
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
120 153
     };
121 154
     if (field && sort) {
122 155
       postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
@@ -169,6 +202,7 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
169 202
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
170 203
       buildingId: this.fieldConfig.fields.buildingId || undefined,
171 204
       placeId: this.fieldConfig.fields.floorId || undefined,
205
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
172 206
     };
173 207
     if (this.sortCurrentKey && this.sortCurrentValue) {
174 208
       postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
@@ -202,7 +236,15 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
202 236
 		this.sortCurrentValue = "";
203 237
 		this.sortCurrent = {};
204 238
     this.dateRange = []
205
-    this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined};
239
+    this.fieldConfig.fields = {
240
+      groupId: undefined,
241
+      userId: undefined,
242
+      categoryId: undefined,
243
+      buildingId: undefined,
244
+      floorId: undefined,
245
+      repairDeptId: this.queryType == 5 ? this.fieldConfig.fields.repairDeptId : undefined,
246
+      repairDeptDTO: this.queryType == 5 ? this.fieldConfig.fields.repairDeptDTO : undefined,
247
+    };
206 248
     this.customChangeDateComponent.resetByDate();
207 249
     setTimeout(_=>{
208 250
     	this.search();
@@ -214,8 +256,8 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
214 256
 
215 257
   // 详细搜索
216 258
   fieldConfig:any = {
217
-    fields: {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined},
218
-    config: {groupAndUser: true, category123: true, buildingAndFloor: true},
259
+    fields: {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined, repairDeptId: undefined},
260
+    config: {groupAndUser: true, category123: true, buildingAndFloor: true, repairDept: true},
219 261
   }
220 262
   showSearchMore:boolean = false;
221 263
   showMore(){

+ 55 - 15
src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.ts

@@ -55,7 +55,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
55 55
 
56 56
     }, 0)
57 57
   }
58
-	
58
+
59 59
 	// 数据下钻
60 60
 	viewDetail1(data, type){
61 61
 		let query = null
@@ -145,7 +145,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
145 145
 						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
146 146
 						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
147 147
 						this.router.navigate([path], { replaceUrl: true });
148
-				});	
148
+				});
149 149
 			}else if(item1){
150 150
 				let category1 = null
151 151
 				let category2 = null
@@ -188,7 +188,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
188 188
 						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
189 189
 						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
190 190
 						this.router.navigate([path], { replaceUrl: true });
191
-				});	
191
+				});
192 192
 			}else{
193 193
 				query = {
194 194
 					startDate: this.customChangeDateComponent.startDate || undefined,
@@ -227,7 +227,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
227 227
 			}
228 228
 		}
229 229
 	}
230
-	
230
+
231 231
 	// 数据下钻
232 232
 	viewDetail2(data, type){
233 233
 		let query = null
@@ -323,7 +323,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
323 323
 						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
324 324
 						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
325 325
 						this.router.navigate([path], { replaceUrl: true });
326
-				});	
326
+				});
327 327
 			}else if(item1){
328 328
 				let category1 = null
329 329
 				let category2 = null
@@ -371,7 +371,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
371 371
 						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
372 372
 						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
373 373
 						this.router.navigate([path], { replaceUrl: true });
374
-				});	
374
+				});
375 375
 			}else{
376 376
 				query = {
377 377
 					startDate: this.customChangeDateComponent.startDate || undefined,
@@ -415,7 +415,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
415 415
 			}
416 416
 		}
417 417
 	}
418
-	
418
+
419 419
 	// 数据下钻
420 420
 	viewDetail3(data, type){
421 421
 		let query = null
@@ -511,7 +511,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
511 511
 						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
512 512
 						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
513 513
 						this.router.navigate([path], { replaceUrl: true });
514
-				});	
514
+				});
515 515
 			}else if(item1){
516 516
 				let category1 = null
517 517
 				let category2 = null
@@ -559,7 +559,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
559 559
 						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
560 560
 						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
561 561
 						this.router.navigate([path], { replaceUrl: true });
562
-				});	
562
+				});
563 563
 			}else{
564 564
 				query = {
565 565
 					startDate: this.customChangeDateComponent.startDate || undefined,
@@ -603,7 +603,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
603 603
 			}
604 604
 		}
605 605
 	}
606
-	
606
+
607 607
 	// 数据下钻
608 608
 	viewDetail4(data, type){
609 609
 		let query = null
@@ -709,7 +709,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
709 709
 						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
710 710
 						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
711 711
 						this.router.navigate([path], { replaceUrl: true });
712
-				});	
712
+				});
713 713
 			}else if(item1){
714 714
 				let category1 = null
715 715
 				let category2 = null
@@ -762,7 +762,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
762 762
 						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
763 763
 						sessionStorage.setItem('maintenanceData', JSON.stringify(query))
764 764
 						this.router.navigate([path], { replaceUrl: true });
765
-				});	
765
+				});
766 766
 			}else{
767 767
 				query = {
768 768
 					startDate: this.customChangeDateComponent.startDate || undefined,
@@ -811,7 +811,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
811 811
 			}
812 812
 		}
813 813
 	}
814
-	
814
+
815 815
   getQueryParams(){
816 816
     let queryParams = this.tabService.getQueryParams();
817 817
     this.tabService.clearQueryParams();
@@ -831,13 +831,16 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
831 831
   hosId:any;
832 832
   dutyId:any;
833 833
   parentDutyId:any;
834
-  initSessionData(){
834
+  async initSessionData(){
835 835
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
836 836
     let queryType:any = newStatistics.queryType;
837
+    let realQueryType:any = newStatistics.realQueryType;
837 838
     let hosId:any = newStatistics.hospitalId;
838 839
     let dutyId:any = newStatistics.dutyId;
840
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
839 841
 
840 842
     queryType = queryType ? +queryType : undefined;
843
+    realQueryType = realQueryType ? +realQueryType : undefined;
841 844
     hosId = hosId ? +hosId : undefined;
842 845
     dutyId = dutyId ? +dutyId : undefined;
843 846
 
@@ -858,6 +861,35 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
858 861
       this.hosId = undefined;
859 862
       this.dutyId = undefined;
860 863
       this.parentDutyId = dutyId;
864
+    }else if(queryType == 5){
865
+      this.fieldConfig.fields.repairDeptId = currentDeptDTO.id;
866
+      let postData = {
867
+        department: {
868
+          id: currentDeptDTO.id,
869
+          searchType: 1,
870
+        },
871
+        idx: 0,
872
+        sum: 1,
873
+      };
874
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
875
+      this.fieldConfig.fields.repairDeptDTO = result.list.length ? result.list[0] : undefined;
876
+      if(realQueryType == 1){
877
+        this.hosId = undefined;
878
+        this.dutyId = undefined;
879
+        this.parentDutyId = undefined;
880
+      }else if(realQueryType == 2){
881
+        this.hosId = hosId;
882
+        this.dutyId = undefined;
883
+        this.parentDutyId = undefined;
884
+      }else if(realQueryType == 3){
885
+        this.hosId = undefined;
886
+        this.dutyId = dutyId;
887
+        this.parentDutyId = undefined;
888
+      }else if(realQueryType == 4){
889
+        this.hosId = undefined;
890
+        this.dutyId = undefined;
891
+        this.parentDutyId = dutyId;
892
+      }
861 893
     }
862 894
   }
863 895
 
@@ -978,7 +1010,15 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
978 1010
     this.dateRange = []
979 1011
     this.category1Id = undefined;
980 1012
     this.category2Id = undefined;
981
-    this.fieldConfig.fields = {groupId: undefined, userId: undefined, buildingId: undefined, floorId: undefined, companyId: undefined, repairDeptId: undefined};
1013
+    this.fieldConfig.fields = {
1014
+      groupId: undefined,
1015
+      userId: undefined,
1016
+      buildingId: undefined,
1017
+      floorId: undefined,
1018
+      companyId: undefined,
1019
+      repairDeptId: this.queryType == 5 ? this.fieldConfig.fields.repairDeptId : undefined,
1020
+      repairDeptDTO: this.queryType == 5 ? this.fieldConfig.fields.repairDeptDTO : undefined,
1021
+    };
982 1022
     this.customChangeDateComponent.resetByDate();
983 1023
 		sessionStorage.removeItem('maintenanceData');
984 1024
     setTimeout(_=>{

+ 48 - 8
src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.ts

@@ -55,7 +55,7 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
55 55
 
56 56
     }, 0)
57 57
   }
58
-	
58
+
59 59
 	// 数据下钻
60 60
 	viewDetail1(data, type){
61 61
 		let query = null;
@@ -63,7 +63,7 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
63 63
 		if(this.category1Id){
64 64
 		  item = this.category1List.find(item => item.id == this.category1Id);
65 65
 		}
66
-		
66
+
67 67
 		if(type=='all'){
68 68
 			query = {
69 69
 				startDate: this.customChangeDateComponent.startDate || undefined,
@@ -172,7 +172,7 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
172 172
 			}
173 173
 		}
174 174
 	}
175
-	
175
+
176 176
 	// 数据下钻
177 177
 	viewDetail2(data, type){
178 178
 		let query = null
@@ -303,7 +303,7 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
303 303
 			}
304 304
 		}
305 305
 	}
306
-	
306
+
307 307
 	// 数据下钻
308 308
 	viewDetail3(data, type){
309 309
 		let query = null
@@ -434,7 +434,7 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
434 434
 			}
435 435
 		}
436 436
 	}
437
-	
437
+
438 438
 	// 数据下钻
439 439
 	viewDetail4(data, type){
440 440
 		let query = null
@@ -580,7 +580,7 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
580 580
 			}
581 581
 		}
582 582
 	}
583
-	
583
+
584 584
   getQueryParams(){
585 585
     let queryParams = this.tabService.getQueryParams();
586 586
     this.tabService.clearQueryParams();
@@ -600,13 +600,16 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
600 600
   hosId:any;
601 601
   dutyId:any;
602 602
   parentDutyId:any;
603
-  initSessionData(){
603
+  async initSessionData(){
604 604
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
605 605
     let queryType:any = newStatistics.queryType;
606
+    let realQueryType:any = newStatistics.realQueryType;
606 607
     let hosId:any = newStatistics.hospitalId;
607 608
     let dutyId:any = newStatistics.dutyId;
609
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
608 610
 
609 611
     queryType = queryType ? +queryType : undefined;
612
+    realQueryType = realQueryType ? +realQueryType : undefined;
610 613
     hosId = hosId ? +hosId : undefined;
611 614
     dutyId = dutyId ? +dutyId : undefined;
612 615
 
@@ -627,6 +630,35 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
627 630
       this.hosId = undefined;
628 631
       this.dutyId = undefined;
629 632
       this.parentDutyId = dutyId;
633
+    }else if(queryType == 5){
634
+      this.fieldConfig.fields.repairDeptId = currentDeptDTO.id;
635
+      let postData = {
636
+        department: {
637
+          id: currentDeptDTO.id,
638
+          searchType: 1,
639
+        },
640
+        idx: 0,
641
+        sum: 1,
642
+      };
643
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
644
+      this.fieldConfig.fields.repairDeptDTO = result.list.length ? result.list[0] : undefined;
645
+      if(realQueryType == 1){
646
+        this.hosId = undefined;
647
+        this.dutyId = undefined;
648
+        this.parentDutyId = undefined;
649
+      }else if(realQueryType == 2){
650
+        this.hosId = hosId;
651
+        this.dutyId = undefined;
652
+        this.parentDutyId = undefined;
653
+      }else if(realQueryType == 3){
654
+        this.hosId = undefined;
655
+        this.dutyId = dutyId;
656
+        this.parentDutyId = undefined;
657
+      }else if(realQueryType == 4){
658
+        this.hosId = undefined;
659
+        this.dutyId = undefined;
660
+        this.parentDutyId = dutyId;
661
+      }
630 662
     }
631 663
   }
632 664
 
@@ -746,7 +778,15 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
746 778
 		this.sortCurrent = {};
747 779
     this.dateRange = []
748 780
     this.category1Id = undefined;
749
-    this.fieldConfig.fields = {groupId: undefined, userId: undefined, buildingId: undefined, floorId: undefined, companyId: undefined, repairDeptId: undefined};
781
+    this.fieldConfig.fields = {
782
+      groupId: undefined,
783
+      userId: undefined,
784
+      buildingId: undefined,
785
+      floorId: undefined,
786
+      companyId: undefined,
787
+      repairDeptId: this.queryType == 5 ? this.fieldConfig.fields.repairDeptId : undefined,
788
+      repairDeptDTO: this.queryType == 5 ? this.fieldConfig.fields.repairDeptDTO : undefined,
789
+    };
750 790
     this.customChangeDateComponent.resetByDate();
751 791
 		sessionStorage.removeItem('maintenanceData');
752 792
     setTimeout(_=>{

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

@@ -3,7 +3,7 @@
3 3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4 4
     <div class="searchDataItem">
5 5
       <span class="label">报修科室</span>:
6
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
6
+      <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
7 7
         <ng-container *ngFor="let option of repairDeptList">
8 8
           <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>

+ 35 - 2
src/app/views/new-statistics/maintenance-statistics/consumable-statistics/consumable-statistics.component.ts

@@ -74,13 +74,16 @@ export class ConsumableStatisticsComponent implements OnInit, AfterViewInit {
74 74
   hosId:any;
75 75
   dutyId:any;
76 76
   parentDutyId:any;
77
-  initSessionData(){
77
+  async initSessionData(){
78 78
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
79 79
     let queryType:any = newStatistics.queryType;
80
+    let realQueryType:any = newStatistics.realQueryType;
80 81
     let hosId:any = newStatistics.hospitalId;
81 82
     let dutyId:any = newStatistics.dutyId;
83
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
82 84
 
83 85
     queryType = queryType ? +queryType : undefined;
86
+    realQueryType = realQueryType ? +realQueryType : undefined;
84 87
     hosId = hosId ? +hosId : undefined;
85 88
     dutyId = dutyId ? +dutyId : undefined;
86 89
 
@@ -101,6 +104,35 @@ export class ConsumableStatisticsComponent implements OnInit, AfterViewInit {
101 104
       this.hosId = undefined;
102 105
       this.dutyId = undefined;
103 106
       this.parentDutyId = dutyId;
107
+    }else if(queryType == 5){
108
+      this.repairDeptId = currentDeptDTO.id;
109
+      let postData = {
110
+        department: {
111
+          id: currentDeptDTO.id,
112
+          searchType: 1,
113
+        },
114
+        idx: 0,
115
+        sum: 1,
116
+      };
117
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
118
+      this.repairDeptList = result.list || [];
119
+      if(realQueryType == 1){
120
+        this.hosId = undefined;
121
+        this.dutyId = undefined;
122
+        this.parentDutyId = undefined;
123
+      }else if(realQueryType == 2){
124
+        this.hosId = hosId;
125
+        this.dutyId = undefined;
126
+        this.parentDutyId = undefined;
127
+      }else if(realQueryType == 3){
128
+        this.hosId = undefined;
129
+        this.dutyId = dutyId;
130
+        this.parentDutyId = undefined;
131
+      }else if(realQueryType == 4){
132
+        this.hosId = undefined;
133
+        this.dutyId = undefined;
134
+        this.parentDutyId = dutyId;
135
+      }
104 136
     }
105 137
   }
106 138
 
@@ -217,7 +249,8 @@ export class ConsumableStatisticsComponent implements OnInit, AfterViewInit {
217 249
 		this.sortCurrentValue = "";
218 250
 		this.sortCurrent = {};
219 251
     this.dateRange = []
220
-    this.repairDeptId = undefined;
252
+    this.repairDeptId = this.queryType == 5 ? this.repairDeptId : undefined;
253
+    this.repairDeptList = this.queryType == 5 ? this.repairDeptList : [];
221 254
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined, companyId: undefined};
222 255
     this.customChangeDateComponent.resetByDate();
223 256
 		sessionStorage.removeItem('maintenanceData');

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

@@ -3,8 +3,8 @@
3 3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4 4
     <div class="searchDataItem">
5 5
       <span class="label">科室</span>:
6
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" nzServerSearch nzShowSearch (nzOnSearch)="changeInp($event)">
7
-        <ng-container *ngFor="let option of alldepart">
6
+      <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="repairDeptId" nzServerSearch nzShowSearch (nzOnSearch)="changeInp($event)">
7
+        <ng-container *ngFor="let option of repairDeptList">
8 8
           <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>
10 10
         <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>

+ 54 - 21
src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.ts

@@ -31,7 +31,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
31 31
   listLength: number = 0; //表格总数据量
32 32
 	hospital:any;
33 33
 	deptTypeId;//科室类型id
34
-	deptId;
34
+	repairDeptId;
35 35
 	searchTimerSubject = new Subject();
36 36
 
37 37
   ngOnInit() {
@@ -60,7 +60,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
60 60
 
61 61
     }, 0)
62 62
   }
63
-	
63
+
64 64
 	// 数据下钻
65 65
 	viewDetail1(data, type){
66 66
 		let query = null
@@ -68,7 +68,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
68 68
 			query = {
69 69
 				startDate: this.customChangeDateComponent.startDate || undefined,
70 70
 				endDate: this.customChangeDateComponent.endDate || undefined,
71
-				repairDeptId: this.deptId || undefined,
71
+				repairDeptId: this.repairDeptId || undefined,
72 72
 				searchQuery:{
73 73
 					statusValue: 'close',
74 74
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
@@ -124,7 +124,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
124 124
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
125 125
 		this.router.navigate([path], { replaceUrl: true });
126 126
 	}
127
-	
127
+
128 128
 	// 数据下钻
129 129
 	viewDetail2(data, type){
130 130
 		let query = null
@@ -132,7 +132,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
132 132
 			query = {
133 133
 				startDate: this.customChangeDateComponent.startDate || undefined,
134 134
 				endDate: this.customChangeDateComponent.endDate || undefined,
135
-				repairDeptId: this.deptId || undefined,
135
+				repairDeptId: this.repairDeptId || undefined,
136 136
 				searchQuery:{
137 137
 					statusValue: 'close',
138 138
 					evaluateId: 20424,
@@ -208,7 +208,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
208 208
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
209 209
 		this.router.navigate([path], { replaceUrl: true });
210 210
 	}
211
-	
211
+
212 212
 	// 数据下钻
213 213
 	viewDetail3(data, type){
214 214
 		let query = null
@@ -216,7 +216,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
216 216
 			query = {
217 217
 				startDate: this.customChangeDateComponent.startDate || undefined,
218 218
 				endDate: this.customChangeDateComponent.endDate || undefined,
219
-				repairDeptId: this.deptId || undefined,
219
+				repairDeptId: this.repairDeptId || undefined,
220 220
 				searchQuery:{
221 221
 					statusValue: 'close',
222 222
 					evaluateId: 20423,
@@ -292,7 +292,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
292 292
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
293 293
 		this.router.navigate([path], { replaceUrl: true });
294 294
 	}
295
-	
295
+
296 296
 	// 数据下钻
297 297
 	viewDetail4(data, type){
298 298
 		let query = null
@@ -300,7 +300,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
300 300
 			query = {
301 301
 				startDate: this.customChangeDateComponent.startDate || undefined,
302 302
 				endDate: this.customChangeDateComponent.endDate || undefined,
303
-				repairDeptId: this.deptId || undefined,
303
+				repairDeptId: this.repairDeptId || undefined,
304 304
 				searchQuery:{
305 305
 					statusValue: 'close',
306 306
 					evaluateId: 20422,
@@ -376,7 +376,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
376 376
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
377 377
 		this.router.navigate([path], { replaceUrl: true });
378 378
 	}
379
-	
379
+
380 380
 	// 数据下钻
381 381
 	viewDetail5(data, type){
382 382
 		let query = null
@@ -384,7 +384,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
384 384
 			query = {
385 385
 				startDate: this.customChangeDateComponent.startDate || undefined,
386 386
 				endDate: this.customChangeDateComponent.endDate || undefined,
387
-				repairDeptId: this.deptId || undefined,
387
+				repairDeptId: this.repairDeptId || undefined,
388 388
 				searchQuery:{
389 389
 					statusValue: 'close',
390 390
 					evaluateId: 20421,
@@ -460,7 +460,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
460 460
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
461 461
 		this.router.navigate([path], { replaceUrl: true });
462 462
 	}
463
-	
463
+
464 464
 	// 数据下钻
465 465
 	viewDetail6(data, type){
466 466
 		let query = null
@@ -468,7 +468,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
468 468
 			query = {
469 469
 				startDate: this.customChangeDateComponent.startDate || undefined,
470 470
 				endDate: this.customChangeDateComponent.endDate || undefined,
471
-				repairDeptId: this.deptId || undefined,
471
+				repairDeptId: this.repairDeptId || undefined,
472 472
 				searchQuery:{
473 473
 					statusValue: 'close',
474 474
 					evaluateId: 20420,
@@ -517,7 +517,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
517 517
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
518 518
 		this.router.navigate([path], { replaceUrl: true });
519 519
 	}
520
-	
520
+
521 521
   getQueryParams(){
522 522
     let queryParams = this.tabService.getQueryParams();
523 523
     this.tabService.clearQueryParams();
@@ -538,14 +538,17 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
538 538
   dutyId:any;
539 539
   parentDutyId:any;
540 540
 	parent:any;
541
-  initSessionData(){
541
+  async initSessionData(){
542 542
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
543 543
     let queryType:any = newStatistics.queryType;
544
+    let realQueryType:any = newStatistics.realQueryType;
544 545
     let hosId:any = newStatistics.hospitalId;
545 546
     let dutyId:any = newStatistics.dutyId;
546
-		this.parent = newStatistics.parent;
547
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
548
+    this.parent = newStatistics.parent;
547 549
 
548 550
     queryType = queryType ? +queryType : undefined;
551
+    realQueryType = realQueryType ? +realQueryType : undefined;
549 552
     hosId = hosId ? +hosId : undefined;
550 553
     dutyId = dutyId ? +dutyId : undefined;
551 554
 
@@ -566,6 +569,35 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
566 569
       this.hosId = undefined;
567 570
       this.dutyId = undefined;
568 571
       this.parentDutyId = dutyId;
572
+    }else if(queryType == 5){
573
+      this.repairDeptId = currentDeptDTO.id;
574
+      let postData = {
575
+        department: {
576
+          id: currentDeptDTO.id,
577
+          searchType: 1,
578
+        },
579
+        idx: 0,
580
+        sum: 1,
581
+      };
582
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
583
+      this.repairDeptList = result.list || [];
584
+      if(realQueryType == 1){
585
+        this.hosId = undefined;
586
+        this.dutyId = undefined;
587
+        this.parentDutyId = undefined;
588
+      }else if(realQueryType == 2){
589
+        this.hosId = hosId;
590
+        this.dutyId = undefined;
591
+        this.parentDutyId = undefined;
592
+      }else if(realQueryType == 3){
593
+        this.hosId = undefined;
594
+        this.dutyId = dutyId;
595
+        this.parentDutyId = undefined;
596
+      }else if(realQueryType == 4){
597
+        this.hosId = undefined;
598
+        this.dutyId = undefined;
599
+        this.parentDutyId = dutyId;
600
+      }
569 601
     }
570 602
   }
571 603
 
@@ -590,7 +622,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
590 622
       endDate: this.customChangeDateComponent.endDate || undefined,
591 623
       hosId: this.hosId || undefined,
592 624
       dutyId: this.dutyId || undefined,
593
-      repairDeptId: this.deptId || undefined,
625
+      repairDeptId: this.repairDeptId || undefined,
594 626
       parentDutyId: this.parentDutyId || undefined,
595 627
       deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
596 628
       groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
@@ -656,7 +688,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
656 688
       dutyId: this.dutyId || undefined,
657 689
       parentDutyId: this.parentDutyId || undefined,
658 690
       deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
659
-      repairDeptId: this.deptId || undefined,
691
+      repairDeptId: this.repairDeptId || undefined,
660 692
       groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
661 693
       userId: this.fieldConfig.fields.userId || undefined,
662 694
       categoryId: this.fieldConfig.fields.categoryId || undefined,
@@ -696,7 +728,8 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
696 728
 		this.sortCurrentValue = "";
697 729
 		this.sortCurrent = {};
698 730
     this.dateRange = []
699
-    this.deptId = undefined;
731
+    this.repairDeptId = this.queryType == 5 ? this.repairDeptId : undefined;
732
+    this.repairDeptList = this.queryType == 5 ? this.repairDeptList : [];
700 733
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined, deptTypeId: undefined};
701 734
     this.customChangeDateComponent.resetByDate();
702 735
 		sessionStorage.removeItem('maintenanceData');
@@ -723,7 +756,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
723 756
 	}
724 757
 
725 758
 	// 获取所有科室
726
-	alldepart:any;
759
+	repairDeptList:any;
727 760
 	getDeparts(dept?) {
728 761
 	  let data = {
729 762
 	    department: {
@@ -738,7 +771,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
738 771
 	    .getFetchDataList("data", "department", data)
739 772
 	    .subscribe((data) => {
740 773
 				this.isLoading = false;
741
-	      this.alldepart = data.list;
774
+	      this.repairDeptList = data.list;
742 775
 	    });
743 776
 	}
744 777
 

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

@@ -3,8 +3,8 @@
3 3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4 4
 		<div class="searchDataItem">
5 5
 		  <span class="label">科室</span>:
6
-		  <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" nzServerSearch nzShowSearch (nzOnSearch)="changeInp($event)">
7
-		    <ng-container *ngFor="let option of alldepart">
6
+		  <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="repairDeptId" nzServerSearch nzShowSearch (nzOnSearch)="changeInp($event)">
7
+		    <ng-container *ngFor="let option of repairDeptList">
8 8
 		      <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
9 9
 		    </ng-container>
10 10
 		    <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>

+ 50 - 17
src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.ts

@@ -31,7 +31,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
31 31
   listLength: number = 0; //表格总数据量
32 32
 	hospital:any;
33 33
   deptTypeId;//科室类型id
34
-	deptId;
34
+	repairDeptId;
35 35
 	searchTimerSubject = new Subject();
36 36
 
37 37
   ngOnInit() {
@@ -60,7 +60,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
60 60
 
61 61
     }, 0)
62 62
   }
63
-	
63
+
64 64
 	// 数据下钻
65 65
 	viewDetail1(data, type){
66 66
 		let query = null
@@ -68,7 +68,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
68 68
 			query = {
69 69
 				startDate: this.customChangeDateComponent.startDate || undefined,
70 70
 				endDate: this.customChangeDateComponent.endDate || undefined,
71
-				repairDeptId: this.deptId,
71
+				repairDeptId: this.repairDeptId,
72 72
 				searchQuery:{
73 73
 					statusValue: 'close',
74 74
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
@@ -124,7 +124,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
124 124
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
125 125
 		this.router.navigate([path], { replaceUrl: true });
126 126
 	}
127
-	
127
+
128 128
 	// 数据下钻
129 129
 	viewDetail2(data, type){
130 130
 		let query = null
@@ -132,7 +132,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
132 132
 			query = {
133 133
 				startDate: this.customChangeDateComponent.startDate || undefined,
134 134
 				endDate: this.customChangeDateComponent.endDate || undefined,
135
-				repairDeptId: this.deptId,
135
+				repairDeptId: this.repairDeptId,
136 136
 				searchQuery:{
137 137
 					statusValue: 'close',
138 138
 					overtimeId: 1,
@@ -198,7 +198,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
198 198
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
199 199
 		this.router.navigate([path], { replaceUrl: true });
200 200
 	}
201
-	
201
+
202 202
 	// 数据下钻
203 203
 	viewDetail3(data, type){
204 204
 		let query = null
@@ -206,7 +206,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
206 206
 			query = {
207 207
 				startDate: this.customChangeDateComponent.startDate || undefined,
208 208
 				endDate: this.customChangeDateComponent.endDate || undefined,
209
-				repairDeptId: this.deptId,
209
+				repairDeptId: this.repairDeptId,
210 210
 				searchQuery:{
211 211
 					statusValue: 'close',
212 212
 					isHangId: 1,
@@ -272,7 +272,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
272 272
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
273 273
 		this.router.navigate([path], { replaceUrl: true });
274 274
 	}
275
-	
275
+
276 276
 	// 数据下钻
277 277
 	viewDetail4(data, type){
278 278
 		let query = null
@@ -280,7 +280,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
280 280
 			query = {
281 281
 				startDate: this.customChangeDateComponent.startDate || undefined,
282 282
 				endDate: this.customChangeDateComponent.endDate || undefined,
283
-				repairDeptId: this.deptId,
283
+				repairDeptId: this.repairDeptId,
284 284
 				searchQuery:{
285 285
 					statusValue: 'close',
286 286
 					evaluateId: 20424,
@@ -356,7 +356,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
356 356
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
357 357
 		this.router.navigate([path], { replaceUrl: true });
358 358
 	}
359
-	
359
+
360 360
   getQueryParams(){
361 361
     let queryParams = this.tabService.getQueryParams();
362 362
     this.tabService.clearQueryParams();
@@ -377,14 +377,17 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
377 377
   dutyId:any;
378 378
 	parent:any;
379 379
   parentDutyId:any;
380
-  initSessionData(){
380
+  async initSessionData(){
381 381
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
382 382
     let queryType:any = newStatistics.queryType;
383
+    let realQueryType:any = newStatistics.realQueryType;
383 384
     let hosId:any = newStatistics.hospitalId;
384 385
     let dutyId:any = newStatistics.dutyId;
385
-		this.parent = newStatistics.parent;
386
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
387
+    this.parent = newStatistics.parent;
386 388
 
387 389
     queryType = queryType ? +queryType : undefined;
390
+    realQueryType = realQueryType ? +realQueryType : undefined;
388 391
     hosId = hosId ? +hosId : undefined;
389 392
     dutyId = dutyId ? +dutyId : undefined;
390 393
 
@@ -405,6 +408,35 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
405 408
       this.hosId = undefined;
406 409
       this.dutyId = undefined;
407 410
       this.parentDutyId = dutyId;
411
+    }else if(queryType == 5){
412
+      this.repairDeptId = currentDeptDTO.id;
413
+      let postData = {
414
+        department: {
415
+          id: currentDeptDTO.id,
416
+          searchType: 1,
417
+        },
418
+        idx: 0,
419
+        sum: 1,
420
+      };
421
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
422
+      this.repairDeptList = result.list || [];
423
+      if(realQueryType == 1){
424
+        this.hosId = undefined;
425
+        this.dutyId = undefined;
426
+        this.parentDutyId = undefined;
427
+      }else if(realQueryType == 2){
428
+        this.hosId = hosId;
429
+        this.dutyId = undefined;
430
+        this.parentDutyId = undefined;
431
+      }else if(realQueryType == 3){
432
+        this.hosId = undefined;
433
+        this.dutyId = dutyId;
434
+        this.parentDutyId = undefined;
435
+      }else if(realQueryType == 4){
436
+        this.hosId = undefined;
437
+        this.dutyId = undefined;
438
+        this.parentDutyId = dutyId;
439
+      }
408 440
     }
409 441
   }
410 442
 
@@ -429,7 +461,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
429 461
       endDate: this.customChangeDateComponent.endDate || undefined,
430 462
       hosId: this.hosId || undefined,
431 463
       dutyId: this.dutyId || undefined,
432
-			repairDeptId: this.deptId || undefined,
464
+			repairDeptId: this.repairDeptId || undefined,
433 465
       parentDutyId: this.parentDutyId || undefined,
434 466
       deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
435 467
       groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
@@ -495,7 +527,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
495 527
       dutyId: this.dutyId || undefined,
496 528
       parentDutyId: this.parentDutyId || undefined,
497 529
 			deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
498
-			repairDeptId: this.deptId || undefined,
530
+			repairDeptId: this.repairDeptId || undefined,
499 531
       groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
500 532
       userId: this.fieldConfig.fields.userId || undefined,
501 533
       categoryId: this.fieldConfig.fields.categoryId || undefined,
@@ -535,7 +567,8 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
535 567
 		this.sortCurrentValue = "";
536 568
 		this.sortCurrent = {};
537 569
     this.dateRange = []
538
-    this.deptId = undefined;
570
+    this.repairDeptId = this.queryType == 5 ? this.repairDeptId : undefined;
571
+    this.repairDeptList = this.queryType == 5 ? this.repairDeptList : [];
539 572
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined, deptTypeId: undefined};
540 573
     this.customChangeDateComponent.resetByDate();
541 574
 		sessionStorage.removeItem('maintenanceData');
@@ -562,7 +595,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
562 595
 	}
563 596
 
564 597
 	// 获取所有科室
565
-	alldepart:any;
598
+	repairDeptList:any;
566 599
 	getDeparts(dept?) {
567 600
 	  let data = {
568 601
 			department: {
@@ -577,7 +610,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
577 610
 	    .getFetchDataList("data", "department", data)
578 611
 	    .subscribe((data) => {
579 612
 				this.isLoading = false;
580
-	      this.alldepart = data.list;
613
+	      this.repairDeptList = data.list;
581 614
 	    });
582 615
 	}
583 616
 

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

@@ -3,8 +3,8 @@
3 3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4 4
     <div class="searchDataItem">
5 5
       <span class="label">科室</span>:
6
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" nzServerSearch nzShowSearch (nzOnSearch)="changeInp($event)">
7
-        <ng-container *ngFor="let option of alldepart">
6
+      <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="repairDeptId" nzServerSearch nzShowSearch (nzOnSearch)="changeInp($event)">
7
+        <ng-container *ngFor="let option of repairDeptList">
8 8
           <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>
10 10
         <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>

+ 41 - 8
src/app/views/new-statistics/maintenance-statistics/department-source-statistics/department-source-statistics.component.ts

@@ -30,7 +30,7 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
30 30
 
31 31
   hospital:any;
32 32
   deptTypeId;//科室类型id
33
-  deptId;
33
+  repairDeptId;
34 34
   searchTimerSubject = new Subject();
35 35
 
36 36
   ngOnInit() {
@@ -80,14 +80,17 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
80 80
   dutyId:any;
81 81
   parentDutyId:any;
82 82
 	parent:any;
83
-  initSessionData(){
83
+  async initSessionData(){
84 84
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
85 85
     let queryType:any = newStatistics.queryType;
86
+    let realQueryType:any = newStatistics.realQueryType;
86 87
     let hosId:any = newStatistics.hospitalId;
87 88
     let dutyId:any = newStatistics.dutyId;
88
-		this.parent = newStatistics.parent;
89
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
90
+    this.parent = newStatistics.parent;
89 91
 
90 92
     queryType = queryType ? +queryType : undefined;
93
+    realQueryType = realQueryType ? +realQueryType : undefined;
91 94
     hosId = hosId ? +hosId : undefined;
92 95
     dutyId = dutyId ? +dutyId : undefined;
93 96
 
@@ -108,6 +111,35 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
108 111
       this.hosId = undefined;
109 112
       this.dutyId = undefined;
110 113
       this.parentDutyId = dutyId;
114
+    }else if(queryType == 5){
115
+      this.repairDeptId = currentDeptDTO.id;
116
+      let postData = {
117
+        department: {
118
+          id: currentDeptDTO.id,
119
+          searchType: 1,
120
+        },
121
+        idx: 0,
122
+        sum: 1,
123
+      };
124
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
125
+      this.repairDeptList = result.list || [];
126
+      if(realQueryType == 1){
127
+        this.hosId = undefined;
128
+        this.dutyId = undefined;
129
+        this.parentDutyId = undefined;
130
+      }else if(realQueryType == 2){
131
+        this.hosId = hosId;
132
+        this.dutyId = undefined;
133
+        this.parentDutyId = undefined;
134
+      }else if(realQueryType == 3){
135
+        this.hosId = undefined;
136
+        this.dutyId = dutyId;
137
+        this.parentDutyId = undefined;
138
+      }else if(realQueryType == 4){
139
+        this.hosId = undefined;
140
+        this.dutyId = undefined;
141
+        this.parentDutyId = dutyId;
142
+      }
111 143
     }
112 144
   }
113 145
 
@@ -129,7 +161,7 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
129 161
       endDate: this.customChangeDateComponent.endDate || undefined,
130 162
 			hosId: this.hosId || undefined,
131 163
 			dutyId: this.dutyId || undefined,
132
-			repairDeptId: this.deptId || undefined,
164
+			repairDeptId: this.repairDeptId || undefined,
133 165
 			parentDutyId: this.parentDutyId || undefined,
134 166
 			deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
135 167
       groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
@@ -186,7 +218,7 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
186 218
 			dutyId: this.dutyId || undefined,
187 219
 			parentDutyId: this.parentDutyId || undefined,
188 220
 			deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
189
-			repairDeptId: this.deptId || undefined,
221
+			repairDeptId: this.repairDeptId || undefined,
190 222
       groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
191 223
       userId: this.fieldConfig.fields.userId || undefined,
192 224
       categoryId: this.fieldConfig.fields.categoryId || undefined,
@@ -226,7 +258,8 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
226 258
 		this.sortCurrentValue = "";
227 259
 		this.sortCurrent = {};
228 260
     this.dateRange = []
229
-    this.deptId = undefined;
261
+    this.repairDeptId = this.queryType == 5 ? this.repairDeptId : undefined;
262
+    this.repairDeptList = this.queryType == 5 ? this.repairDeptList : [];
230 263
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined, deptTypeId: undefined};
231 264
     this.customChangeDateComponent.resetByDate();
232 265
     setTimeout(_=>{
@@ -252,7 +285,7 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
252 285
   }
253 286
 
254 287
   // 获取所有科室
255
-  alldepart:any;
288
+  repairDeptList:any;
256 289
   getDeparts(dept?) {
257 290
     let data = {
258 291
       department: {
@@ -267,7 +300,7 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
267 300
       .getFetchDataList("data", "department", data)
268 301
       .subscribe((data) => {
269 302
   			this.isLoading = false;
270
-        this.alldepart = data.list;
303
+        this.repairDeptList = data.list;
271 304
       });
272 305
   }
273 306
 

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

@@ -20,10 +20,11 @@
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.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO">
23
+<div class="moreFilter" *ngIf="fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO || fieldConfig.fields.repairDeptDTO">
24 24
   <span>{{fieldConfig.fields.category1DTO?.category}}</span>
25 25
   <span>{{fieldConfig.fields.category2DTO?.category}}</span>
26 26
   <span>{{fieldConfig.fields.category3DTO?.category}}</span>
27
+  <span>{{fieldConfig.fields.repairDeptDTO?.dept}}</span>
27 28
 </div>
28 29
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
29 30
   <thead (nzSortChange)="sort($event)" nzSingleSort>

+ 42 - 4
src/app/views/new-statistics/maintenance-statistics/floor-statistics/floor-statistics.component.ts

@@ -74,13 +74,16 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
74 74
   hosId:any;
75 75
   dutyId:any;
76 76
   parentDutyId:any;
77
-  initSessionData(){
77
+  async initSessionData(){
78 78
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
79 79
     let queryType:any = newStatistics.queryType;
80
+    let realQueryType:any = newStatistics.realQueryType;
80 81
     let hosId:any = newStatistics.hospitalId;
81 82
     let dutyId:any = newStatistics.dutyId;
83
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
82 84
 
83 85
     queryType = queryType ? +queryType : undefined;
86
+    realQueryType = realQueryType ? +realQueryType : undefined;
84 87
     hosId = hosId ? +hosId : undefined;
85 88
     dutyId = dutyId ? +dutyId : undefined;
86 89
 
@@ -101,6 +104,35 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
101 104
       this.hosId = undefined;
102 105
       this.dutyId = undefined;
103 106
       this.parentDutyId = dutyId;
107
+    }else if(queryType == 5){
108
+      this.fieldConfig.fields.repairDeptId = currentDeptDTO.id;
109
+      let postData = {
110
+        department: {
111
+          id: currentDeptDTO.id,
112
+          searchType: 1,
113
+        },
114
+        idx: 0,
115
+        sum: 1,
116
+      };
117
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
118
+      this.fieldConfig.fields.repairDeptDTO = result.list.length ? result.list[0] : undefined;
119
+      if(realQueryType == 1){
120
+        this.hosId = undefined;
121
+        this.dutyId = undefined;
122
+        this.parentDutyId = undefined;
123
+      }else if(realQueryType == 2){
124
+        this.hosId = hosId;
125
+        this.dutyId = undefined;
126
+        this.parentDutyId = undefined;
127
+      }else if(realQueryType == 3){
128
+        this.hosId = undefined;
129
+        this.dutyId = dutyId;
130
+        this.parentDutyId = undefined;
131
+      }else if(realQueryType == 4){
132
+        this.hosId = undefined;
133
+        this.dutyId = undefined;
134
+        this.parentDutyId = dutyId;
135
+      }
104 136
     }
105 137
   }
106 138
 
@@ -125,6 +157,7 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
125 157
       buildingId: this.buildingId || undefined,
126 158
       categoryId: this.fieldConfig.fields.categoryId || undefined,
127 159
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
160
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
128 161
     };
129 162
     if (field && sort) {
130 163
       postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
@@ -174,6 +207,7 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
174 207
       buildingId: this.buildingId || undefined,
175 208
       categoryId: this.fieldConfig.fields.categoryId || undefined,
176 209
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
210
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
177 211
     };
178 212
     if (this.sortCurrentKey && this.sortCurrentValue) {
179 213
       postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
@@ -208,7 +242,11 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
208 242
 		this.sortCurrent = {};
209 243
     this.dateRange = []
210 244
     this.buildingId = undefined;
211
-    this.fieldConfig.fields = {categoryId: undefined};
245
+    this.fieldConfig.fields = {
246
+      categoryId: undefined,
247
+      repairDeptId: this.queryType == 5 ? this.fieldConfig.fields.repairDeptId : undefined,
248
+      repairDeptDTO: this.queryType == 5 ? this.fieldConfig.fields.repairDeptDTO : undefined,
249
+    };
212 250
     this.customChangeDateComponent.resetByDate();
213 251
     setTimeout(_=>{
214 252
     	this.search();
@@ -254,8 +292,8 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
254 292
 
255 293
   // 详细搜索
256 294
   fieldConfig:any = {
257
-    fields: {categoryId: undefined},
258
-    config: {category123: true},
295
+    fields: {categoryId: undefined, repairDeptId: undefined},
296
+    config: {category123: true, repairDept: true},
259 297
   }
260 298
   showSearchMore:boolean = false;
261 299
   showMore(){

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

@@ -9,12 +9,13 @@
9 9
     <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
10 10
   </div>
11 11
 </div>
12
-<div class="moreFilter" *ngIf="fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.floorDTO">
12
+<div class="moreFilter" *ngIf="fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.floorDTO || fieldConfig.fields.repairDeptDTO">
13 13
   <span>{{fieldConfig.fields.category1DTO?.category}}</span>
14 14
   <span>{{fieldConfig.fields.category2DTO?.category}}</span>
15 15
   <span>{{fieldConfig.fields.category3DTO?.category}}</span>
16 16
   <span>{{fieldConfig.fields.buildingDTO?.buildingName}}</span>
17 17
   <span>{{fieldConfig.fields.floorDTO?.floorName}}</span>
18
+  <span>{{fieldConfig.fields.repairDeptDTO?.dept}}</span>
18 19
 </div>
19 20
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
20 21
   <thead (nzSortChange)="sort($event)" nzSingleSort>

+ 57 - 9
src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.ts

@@ -44,7 +44,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
44 44
 
45 45
     }, 0)
46 46
   }
47
-	
47
+
48 48
 	// 数据下钻
49 49
 	viewDetail1(data, type){
50 50
 		let query = null
@@ -52,6 +52,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
52 52
 			query = {
53 53
 				startDate: this.customChangeDateComponent.startDate || undefined,
54 54
 				endDate: this.customChangeDateComponent.endDate || undefined,
55
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
55 56
 				searchQuery:{
56 57
 					statusValue: 'close',
57 58
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
@@ -70,6 +71,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
70 71
 			query = {
71 72
 				startDate: this.customChangeDateComponent.startDate || undefined,
72 73
 				endDate: this.customChangeDateComponent.endDate || undefined,
74
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
73 75
 				searchQuery:{
74 76
 					statusValue: 'close',
75 77
 					groupId: data.groupId ? data.groupId : -1,
@@ -99,7 +101,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
99 101
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
100 102
 		this.router.navigate([path], { replaceUrl: true });
101 103
 	}
102
-	
104
+
103 105
 	// 数据下钻
104 106
 	viewDetail2(data, type){
105 107
 		let query = null
@@ -107,6 +109,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
107 109
 			query = {
108 110
 				startDate: this.customChangeDateComponent.startDate || undefined,
109 111
 				endDate: this.customChangeDateComponent.endDate || undefined,
112
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
110 113
 				searchQuery:{
111 114
 					statusValue: 'close',
112 115
 					overtimeId: 1,
@@ -130,6 +133,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
130 133
 			query = {
131 134
 				startDate: this.customChangeDateComponent.startDate || undefined,
132 135
 				endDate: this.customChangeDateComponent.endDate || undefined,
136
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
133 137
 				searchQuery:{
134 138
 					statusValue: 'close',
135 139
 					groupId: data.groupId ? data.groupId : -1,
@@ -164,7 +168,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
164 168
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
165 169
 		this.router.navigate([path], { replaceUrl: true });
166 170
 	}
167
-	
171
+
168 172
 	// 数据下钻
169 173
 	viewDetail3(data, type){
170 174
 		let query = null
@@ -172,6 +176,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
172 176
 			query = {
173 177
 				startDate: this.customChangeDateComponent.startDate || undefined,
174 178
 				endDate: this.customChangeDateComponent.endDate || undefined,
179
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
175 180
 				searchQuery:{
176 181
 					statusValue: 'close',
177 182
 					isHangId: 1,
@@ -195,6 +200,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
195 200
 			query = {
196 201
 				startDate: this.customChangeDateComponent.startDate || undefined,
197 202
 				endDate: this.customChangeDateComponent.endDate || undefined,
203
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
198 204
 				searchQuery:{
199 205
 					statusValue: 'close',
200 206
 					groupId: data.groupId ? data.groupId : -1,
@@ -229,7 +235,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
229 235
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
230 236
 		this.router.navigate([path], { replaceUrl: true });
231 237
 	}
232
-	
238
+
233 239
 	// 数据下钻
234 240
 	viewDetail4(data, type){
235 241
 		let query = null
@@ -237,6 +243,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
237 243
 			query = {
238 244
 				startDate: this.customChangeDateComponent.startDate || undefined,
239 245
 				endDate: this.customChangeDateComponent.endDate || undefined,
246
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
240 247
 				searchQuery:{
241 248
 					statusValue: 'close',
242 249
 					evaluateId: 20424,
@@ -265,6 +272,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
265 272
 			query = {
266 273
 				startDate: this.customChangeDateComponent.startDate || undefined,
267 274
 				endDate: this.customChangeDateComponent.endDate || undefined,
275
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
268 276
 				searchQuery:{
269 277
 					statusValue: 'close',
270 278
 					groupId: data.groupId ? data.groupId : -1,
@@ -304,7 +312,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
304 312
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
305 313
 		this.router.navigate([path], { replaceUrl: true });
306 314
 	}
307
-	
315
+
308 316
   getQueryParams(){
309 317
     let queryParams = this.tabService.getQueryParams();
310 318
     this.tabService.clearQueryParams();
@@ -324,13 +332,16 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
324 332
   hosId:any;
325 333
   dutyId:any;
326 334
   parentDutyId:any;
327
-  initSessionData(){
335
+  async initSessionData(){
328 336
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
329 337
     let queryType:any = newStatistics.queryType;
338
+    let realQueryType:any = newStatistics.realQueryType;
330 339
     let hosId:any = newStatistics.hospitalId;
331 340
     let dutyId:any = newStatistics.dutyId;
341
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
332 342
 
333 343
     queryType = queryType ? +queryType : undefined;
344
+    realQueryType = realQueryType ? +realQueryType : undefined;
334 345
     hosId = hosId ? +hosId : undefined;
335 346
     dutyId = dutyId ? +dutyId : undefined;
336 347
 
@@ -351,6 +362,35 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
351 362
       this.hosId = undefined;
352 363
       this.dutyId = undefined;
353 364
       this.parentDutyId = dutyId;
365
+    }else if(queryType == 5){
366
+      this.fieldConfig.fields.repairDeptId = currentDeptDTO.id;
367
+      let postData = {
368
+        department: {
369
+          id: currentDeptDTO.id,
370
+          searchType: 1,
371
+        },
372
+        idx: 0,
373
+        sum: 1,
374
+      };
375
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
376
+      this.fieldConfig.fields.repairDeptDTO = result.list.length ? result.list[0] : undefined;
377
+      if(realQueryType == 1){
378
+        this.hosId = undefined;
379
+        this.dutyId = undefined;
380
+        this.parentDutyId = undefined;
381
+      }else if(realQueryType == 2){
382
+        this.hosId = hosId;
383
+        this.dutyId = undefined;
384
+        this.parentDutyId = undefined;
385
+      }else if(realQueryType == 3){
386
+        this.hosId = undefined;
387
+        this.dutyId = dutyId;
388
+        this.parentDutyId = undefined;
389
+      }else if(realQueryType == 4){
390
+        this.hosId = undefined;
391
+        this.dutyId = undefined;
392
+        this.parentDutyId = dutyId;
393
+      }
354 394
     }
355 395
   }
356 396
 
@@ -376,6 +416,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
376 416
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
377 417
       buildingId: this.fieldConfig.fields.buildingId || undefined,
378 418
       placeId: this.fieldConfig.fields.floorId || undefined,
419
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
379 420
     };
380 421
     if (field && sort) {
381 422
       postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
@@ -426,6 +467,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
426 467
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
427 468
       buildingId: this.fieldConfig.fields.buildingId || undefined,
428 469
       placeId: this.fieldConfig.fields.floorId || undefined,
470
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
429 471
     };
430 472
     if (this.sortCurrentKey && this.sortCurrentValue) {
431 473
       postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
@@ -459,7 +501,13 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
459 501
 		this.sortCurrentValue = "";
460 502
 		this.sortCurrent = {};
461 503
     this.dateRange = []
462
-    this.fieldConfig.fields = {categoryId: undefined, buildingId: undefined, floorId: undefined};
504
+    this.fieldConfig.fields = {
505
+      categoryId: undefined,
506
+      buildingId: undefined,
507
+      floorId: undefined,
508
+      repairDeptId: this.queryType == 5 ? this.fieldConfig.fields.repairDeptId : undefined,
509
+      repairDeptDTO: this.queryType == 5 ? this.fieldConfig.fields.repairDeptDTO : undefined,
510
+    };
463 511
     this.customChangeDateComponent.resetByDate();
464 512
     setTimeout(_=>{
465 513
     	this.search();
@@ -471,8 +519,8 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
471 519
 
472 520
   // 详细搜索
473 521
   fieldConfig:any = {
474
-    fields: {categoryId: undefined, buildingId: undefined, floorId: undefined},
475
-    config: {category123: true, buildingAndFloor: true},
522
+    fields: {categoryId: undefined, buildingId: undefined, floorId: undefined, repairDeptId: undefined},
523
+    config: {category123: true, buildingAndFloor: true, repairDept: true},
476 524
   }
477 525
   showSearchMore:boolean = false;
478 526
   showMore(){

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

@@ -3,7 +3,7 @@
3 3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4 4
     <div class="searchDataItem">
5 5
       <span class="label">报修科室</span>:
6
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
6
+      <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
7 7
         <ng-container *ngFor="let option of repairDeptList">
8 8
           <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>

+ 35 - 2
src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.ts

@@ -123,13 +123,16 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
123 123
   hosId:any;
124 124
   dutyId:any;
125 125
   parentDutyId:any;
126
-  initSessionData(){
126
+  async initSessionData(){
127 127
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
128 128
     let queryType:any = newStatistics.queryType;
129
+    let realQueryType:any = newStatistics.realQueryType;
129 130
     let hosId:any = newStatistics.hospitalId;
130 131
     let dutyId:any = newStatistics.dutyId;
132
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
131 133
 
132 134
     queryType = queryType ? +queryType : undefined;
135
+    realQueryType = realQueryType ? +realQueryType : undefined;
133 136
     hosId = hosId ? +hosId : undefined;
134 137
     dutyId = dutyId ? +dutyId : undefined;
135 138
 
@@ -150,6 +153,35 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
150 153
       this.hosId = undefined;
151 154
       this.dutyId = undefined;
152 155
       this.parentDutyId = dutyId;
156
+    }else if(queryType == 5){
157
+      this.repairDeptId = currentDeptDTO.id;
158
+      let postData = {
159
+        department: {
160
+          id: currentDeptDTO.id,
161
+          searchType: 1,
162
+        },
163
+        idx: 0,
164
+        sum: 1,
165
+      };
166
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
167
+      this.repairDeptList = result.list || [];
168
+      if(realQueryType == 1){
169
+        this.hosId = undefined;
170
+        this.dutyId = undefined;
171
+        this.parentDutyId = undefined;
172
+      }else if(realQueryType == 2){
173
+        this.hosId = hosId;
174
+        this.dutyId = undefined;
175
+        this.parentDutyId = undefined;
176
+      }else if(realQueryType == 3){
177
+        this.hosId = undefined;
178
+        this.dutyId = dutyId;
179
+        this.parentDutyId = undefined;
180
+      }else if(realQueryType == 4){
181
+        this.hosId = undefined;
182
+        this.dutyId = undefined;
183
+        this.parentDutyId = dutyId;
184
+      }
153 185
     }
154 186
   }
155 187
 
@@ -302,7 +334,8 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
302 334
     this.dateRange = []
303 335
 		this.dateData1 = null;
304 336
 		this.dateData2 = null;
305
-    this.repairDeptId = undefined;
337
+    this.repairDeptId = this.queryType == 5 ? this.repairDeptId : undefined;
338
+    this.repairDeptList = this.queryType == 5 ? this.repairDeptList : [];
306 339
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined};
307 340
     this.customChangeDateComponent.resetByDate();
308 341
 		sessionStorage.removeItem('maintenanceData');

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

@@ -3,7 +3,7 @@
3 3
     <app-custom-change-date #customChangeDate [isShowType]="true"></app-custom-change-date>
4 4
     <div class="searchDataItem">
5 5
       <span class="label">报修科室</span>:
6
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
6
+      <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
7 7
         <ng-container *ngFor="let option of repairDeptList">
8 8
           <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>

+ 40 - 7
src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.ts

@@ -55,7 +55,7 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
55 55
 
56 56
     }, 0)
57 57
   }
58
-	
58
+
59 59
 	// 数据下钻
60 60
 	viewDetail1(data,type){
61 61
 		let query = null
@@ -115,7 +115,7 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
115 115
 			this.router.navigate([path], { replaceUrl: true });
116 116
 		}
117 117
 	}
118
-	
118
+
119 119
 	// 数据下钻
120 120
 	viewDetail2(data, type){
121 121
 		let query = null
@@ -185,7 +185,7 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
185 185
 			this.router.navigate([path], { replaceUrl: true });
186 186
 		}
187 187
 	}
188
-	
188
+
189 189
 	// 数据下钻
190 190
 	viewDetail3(data, type){
191 191
 		let query = null;
@@ -255,7 +255,7 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
255 255
 			this.router.navigate([path], { replaceUrl: true });
256 256
 		}
257 257
 	}
258
-	
258
+
259 259
 	// 数据下钻
260 260
 	viewDetail4(data, type){
261 261
 		let query = null
@@ -335,7 +335,7 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
335 335
 			this.router.navigate([path], { replaceUrl: true });
336 336
 		}
337 337
 	}
338
-	
338
+
339 339
   getQueryParams(){
340 340
     let queryParams = this.tabService.getQueryParams();
341 341
     this.tabService.clearQueryParams();
@@ -355,13 +355,16 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
355 355
   hosId:any;
356 356
   dutyId:any;
357 357
   parentDutyId:any;
358
-  initSessionData(){
358
+  async initSessionData(){
359 359
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
360 360
     let queryType:any = newStatistics.queryType;
361
+    let realQueryType:any = newStatistics.realQueryType;
361 362
     let hosId:any = newStatistics.hospitalId;
362 363
     let dutyId:any = newStatistics.dutyId;
364
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
363 365
 
364 366
     queryType = queryType ? +queryType : undefined;
367
+    realQueryType = realQueryType ? +realQueryType : undefined;
365 368
     hosId = hosId ? +hosId : undefined;
366 369
     dutyId = dutyId ? +dutyId : undefined;
367 370
 
@@ -382,6 +385,35 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
382 385
       this.hosId = undefined;
383 386
       this.dutyId = undefined;
384 387
       this.parentDutyId = dutyId;
388
+    }else if(queryType == 5){
389
+      this.repairDeptId = currentDeptDTO.id;
390
+      let postData = {
391
+        department: {
392
+          id: currentDeptDTO.id,
393
+          searchType: 1,
394
+        },
395
+        idx: 0,
396
+        sum: 1,
397
+      };
398
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
399
+      this.repairDeptList = result.list || [];
400
+      if(realQueryType == 1){
401
+        this.hosId = undefined;
402
+        this.dutyId = undefined;
403
+        this.parentDutyId = undefined;
404
+      }else if(realQueryType == 2){
405
+        this.hosId = hosId;
406
+        this.dutyId = undefined;
407
+        this.parentDutyId = undefined;
408
+      }else if(realQueryType == 3){
409
+        this.hosId = undefined;
410
+        this.dutyId = dutyId;
411
+        this.parentDutyId = undefined;
412
+      }else if(realQueryType == 4){
413
+        this.hosId = undefined;
414
+        this.dutyId = undefined;
415
+        this.parentDutyId = dutyId;
416
+      }
385 417
     }
386 418
   }
387 419
 
@@ -496,7 +528,8 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
496 528
 		this.sortCurrentValue = "";
497 529
 		this.sortCurrent = {};
498 530
     this.dateRange = []
499
-    this.repairDeptId = undefined;
531
+    this.repairDeptId = this.queryType == 5 ? this.repairDeptId : undefined;
532
+    this.repairDeptList = this.queryType == 5 ? this.repairDeptList : [];
500 533
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined};
501 534
     this.customChangeDateComponent.resetByDate();
502 535
 		sessionStorage.removeItem('maintenanceData');

+ 44 - 2
src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics.component.ts

@@ -74,13 +74,16 @@ export class PersonnelEffectivenessStatisticsComponent implements OnInit, AfterV
74 74
   hosId:any;
75 75
   dutyId:any;
76 76
   parentDutyId:any;
77
-  initSessionData(){
77
+  async initSessionData(){
78 78
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
79 79
     let queryType:any = newStatistics.queryType;
80
+    let realQueryType:any = newStatistics.realQueryType;
80 81
     let hosId:any = newStatistics.hospitalId;
81 82
     let dutyId:any = newStatistics.dutyId;
83
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
82 84
 
83 85
     queryType = queryType ? +queryType : undefined;
86
+    realQueryType = realQueryType ? +realQueryType : undefined;
84 87
     hosId = hosId ? +hosId : undefined;
85 88
     dutyId = dutyId ? +dutyId : undefined;
86 89
 
@@ -101,6 +104,35 @@ export class PersonnelEffectivenessStatisticsComponent implements OnInit, AfterV
101 104
       this.hosId = undefined;
102 105
       this.dutyId = undefined;
103 106
       this.parentDutyId = dutyId;
107
+    }else if(queryType == 5){
108
+      this.fieldConfig.fields.repairDeptId = currentDeptDTO.id;
109
+      let postData = {
110
+        department: {
111
+          id: currentDeptDTO.id,
112
+          searchType: 1,
113
+        },
114
+        idx: 0,
115
+        sum: 1,
116
+      };
117
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
118
+      this.fieldConfig.fields.repairDeptDTO = result.list.length ? result.list[0] : undefined;
119
+      if(realQueryType == 1){
120
+        this.hosId = undefined;
121
+        this.dutyId = undefined;
122
+        this.parentDutyId = undefined;
123
+      }else if(realQueryType == 2){
124
+        this.hosId = hosId;
125
+        this.dutyId = undefined;
126
+        this.parentDutyId = undefined;
127
+      }else if(realQueryType == 3){
128
+        this.hosId = undefined;
129
+        this.dutyId = dutyId;
130
+        this.parentDutyId = undefined;
131
+      }else if(realQueryType == 4){
132
+        this.hosId = undefined;
133
+        this.dutyId = undefined;
134
+        this.parentDutyId = dutyId;
135
+      }
104 136
     }
105 137
   }
106 138
 
@@ -224,7 +256,17 @@ export class PersonnelEffectivenessStatisticsComponent implements OnInit, AfterV
224 256
 		this.sortCurrent = {};
225 257
     this.dateRange = []
226 258
     this.matchUserCouont = 1;
227
-    this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined, companyId: undefined, sourceId: undefined, repairDeptId: undefined};
259
+    this.fieldConfig.fields = {
260
+      groupId: undefined,
261
+      userId: undefined,
262
+      categoryId: undefined,
263
+      buildingId: undefined,
264
+      floorId: undefined,
265
+      companyId: undefined,
266
+      sourceId: undefined,
267
+      repairDeptId: this.queryType == 5 ? this.fieldConfig.fields.repairDeptId : undefined,
268
+      repairDeptDTO: this.queryType == 5 ? this.fieldConfig.fields.repairDeptDTO : undefined,
269
+    };
228 270
     this.customChangeDateComponent.resetByDate();
229 271
     setTimeout(_=>{
230 272
     	this.search();

+ 45 - 6
src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics.component.ts

@@ -61,9 +61,9 @@ export class PriorityDateStatisticsComponent implements OnInit, AfterViewInit {
61 61
 			query = {
62 62
 				startDate: this.customChangeDateComponent.startDate,
63 63
 				endDate: this.customChangeDateComponent.endDate,
64
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
64 65
 				searchQuery:{
65 66
 					statusValue: 'close',
66
-					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
67 67
 					groupId: this.fieldConfig.fields.groupId || undefined,
68 68
 					userId: this.fieldConfig.fields.userId || undefined,
69 69
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
@@ -88,9 +88,9 @@ export class PriorityDateStatisticsComponent implements OnInit, AfterViewInit {
88 88
 			 query = {
89 89
 				startDate: data.date + ' ' + '00:00:00',
90 90
 				endDate: data.date + ' ' + '23:59:59',
91
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
91 92
 				searchQuery:{
92 93
 					statusValue: 'close',
93
-					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
94 94
 					groupId: this.fieldConfig.fields.groupId || undefined,
95 95
 					userId: this.fieldConfig.fields.userId || undefined,
96 96
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
@@ -124,9 +124,9 @@ export class PriorityDateStatisticsComponent implements OnInit, AfterViewInit {
124 124
 			query = {
125 125
 				startDate: this.customChangeDateComponent.startDate,
126 126
 				endDate: this.customChangeDateComponent.endDate,
127
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
127 128
 				searchQuery:{
128 129
 					statusValue: 'close',
129
-					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
130 130
 					groupId: this.fieldConfig.fields.groupId || undefined,
131 131
 					userId: this.fieldConfig.fields.userId || undefined,
132 132
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
@@ -156,9 +156,9 @@ export class PriorityDateStatisticsComponent implements OnInit, AfterViewInit {
156 156
 			 query = {
157 157
 				startDate: data.date + ' ' + '00:00:00',
158 158
 				endDate: data.date + ' ' + '23:59:59',
159
+				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
159 160
 				searchQuery:{
160 161
 					statusValue: 'close',
161
-					repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
162 162
 					groupId: this.fieldConfig.fields.groupId || undefined,
163 163
 					userId: this.fieldConfig.fields.userId || undefined,
164 164
 					categoryId: this.fieldConfig.fields.categoryId || undefined,
@@ -206,13 +206,16 @@ export class PriorityDateStatisticsComponent implements OnInit, AfterViewInit {
206 206
   hosId:any;
207 207
   dutyId:any;
208 208
   parentDutyId:any;
209
-  initSessionData(){
209
+  async initSessionData(){
210 210
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
211 211
     let queryType:any = newStatistics.queryType;
212
+    let realQueryType:any = newStatistics.realQueryType;
212 213
     let hosId:any = newStatistics.hospitalId;
213 214
     let dutyId:any = newStatistics.dutyId;
215
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
214 216
 
215 217
     queryType = queryType ? +queryType : undefined;
218
+    realQueryType = realQueryType ? +realQueryType : undefined;
216 219
     hosId = hosId ? +hosId : undefined;
217 220
     dutyId = dutyId ? +dutyId : undefined;
218 221
 
@@ -233,6 +236,35 @@ export class PriorityDateStatisticsComponent implements OnInit, AfterViewInit {
233 236
       this.hosId = undefined;
234 237
       this.dutyId = undefined;
235 238
       this.parentDutyId = dutyId;
239
+    }else if(queryType == 5){
240
+      this.fieldConfig.fields.repairDeptId = currentDeptDTO.id;
241
+      let postData = {
242
+        department: {
243
+          id: currentDeptDTO.id,
244
+          searchType: 1,
245
+        },
246
+        idx: 0,
247
+        sum: 1,
248
+      };
249
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
250
+      this.fieldConfig.fields.repairDeptDTO = result.list.length ? result.list[0] : undefined;
251
+      if(realQueryType == 1){
252
+        this.hosId = undefined;
253
+        this.dutyId = undefined;
254
+        this.parentDutyId = undefined;
255
+      }else if(realQueryType == 2){
256
+        this.hosId = hosId;
257
+        this.dutyId = undefined;
258
+        this.parentDutyId = undefined;
259
+      }else if(realQueryType == 3){
260
+        this.hosId = undefined;
261
+        this.dutyId = dutyId;
262
+        this.parentDutyId = undefined;
263
+      }else if(realQueryType == 4){
264
+        this.hosId = undefined;
265
+        this.dutyId = undefined;
266
+        this.parentDutyId = dutyId;
267
+      }
236 268
     }
237 269
   }
238 270
 
@@ -358,7 +390,14 @@ export class PriorityDateStatisticsComponent implements OnInit, AfterViewInit {
358 390
 		this.sortCurrentValue = "";
359 391
 		this.sortCurrent = {};
360 392
     this.dateRange = []
361
-    this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, repairDeptId: undefined};
393
+    this.fieldConfig.fields = {
394
+      groupId: undefined,
395
+      userId: undefined,
396
+      categoryId: undefined,
397
+      sourceId: undefined,
398
+      repairDeptId: this.queryType == 5 ? this.fieldConfig.fields.repairDeptId : undefined,
399
+      repairDeptDTO: this.queryType == 5 ? this.fieldConfig.fields.repairDeptDTO : undefined,
400
+    };
362 401
     this.customChangeDateComponent.resetByDate();
363 402
     setTimeout(_=>{
364 403
     	this.search();

+ 50 - 18
src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics.component.ts

@@ -52,6 +52,7 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
52 52
 			query = {
53 53
 				startDate: this.customChangeDateComponent.startDate || undefined,
54 54
 				endDate: this.customChangeDateComponent.endDate || undefined,
55
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
55 56
 				searchQuery:{
56 57
 					statusValue: 'close',
57 58
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
@@ -59,13 +60,11 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
59 60
 					placeId: this.fieldConfig.fields.floorId || undefined,
60 61
           groupId: this.fieldConfig.fields.groupId || undefined,
61 62
           userId: this.fieldConfig.fields.userId || undefined,
62
-          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
63 63
           companyId: this.fieldConfig.fields.companyId || undefined,
64 64
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
65 65
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
66 66
           groupDTO: this.fieldConfig.fields.groupDTO || undefined,
67 67
           userDTO: this.fieldConfig.fields.userDTO || undefined,
68
-          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
69 68
           companyDTO: this.fieldConfig.fields.companyDTO || undefined,
70 69
           priorityId: data.priorityId || undefined,
71 70
           priorityDTO: {
@@ -78,6 +77,7 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
78 77
 			query = {
79 78
 				startDate: this.customChangeDateComponent.startDate || undefined,
80 79
 				endDate: this.customChangeDateComponent.endDate || undefined,
80
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
81 81
 				searchQuery:{
82 82
 					statusValue: 'close',
83 83
 					buildingId: this.fieldConfig.fields.buildingId || undefined,
@@ -85,13 +85,11 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
85 85
 					placeId: this.fieldConfig.fields.floorId || undefined,
86 86
           groupId: this.fieldConfig.fields.groupId || undefined,
87 87
           userId: this.fieldConfig.fields.userId || undefined,
88
-          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
89 88
           companyId: this.fieldConfig.fields.companyId || undefined,
90 89
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
91 90
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
92 91
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
93 92
 					userDTO: this.fieldConfig.fields.userDTO || undefined,
94
-          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
95 93
           companyDTO: this.fieldConfig.fields.companyDTO || undefined,
96 94
           priorityId: data.priorityId || undefined,
97 95
           priorityDTO: {
@@ -118,6 +116,7 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
118 116
 			query = {
119 117
 				startDate: this.customChangeDateComponent.startDate || undefined,
120 118
 				endDate: this.customChangeDateComponent.endDate || undefined,
119
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
121 120
 				searchQuery:{
122 121
 					statusValue: 'close',
123 122
 					overtimeId: 1,
@@ -126,13 +125,11 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
126 125
 					placeId: this.fieldConfig.fields.floorId || undefined,
127 126
           groupId: this.fieldConfig.fields.groupId || undefined,
128 127
           userId: this.fieldConfig.fields.userId || undefined,
129
-          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
130 128
           companyId: this.fieldConfig.fields.companyId || undefined,
131 129
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
132 130
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
133 131
           groupDTO: this.fieldConfig.fields.groupDTO || undefined,
134 132
           userDTO: this.fieldConfig.fields.userDTO || undefined,
135
-          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
136 133
           companyDTO: this.fieldConfig.fields.companyDTO || undefined,
137 134
           priorityId: data.priorityId || undefined,
138 135
           priorityDTO: {
@@ -149,6 +146,7 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
149 146
 			query = {
150 147
 				startDate: this.customChangeDateComponent.startDate || undefined,
151 148
 				endDate: this.customChangeDateComponent.endDate || undefined,
149
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
152 150
 				searchQuery:{
153 151
 					statusValue: 'close',
154 152
 					overtimeId: 1,
@@ -157,13 +155,11 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
157 155
 					placeId: this.fieldConfig.fields.floorId || undefined,
158 156
           groupId: this.fieldConfig.fields.groupId || undefined,
159 157
           userId: this.fieldConfig.fields.userId || undefined,
160
-          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
161 158
           companyId: this.fieldConfig.fields.companyId || undefined,
162 159
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
163 160
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
164 161
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
165 162
           userDTO: this.fieldConfig.fields.userDTO || undefined,
166
-          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
167 163
           companyDTO: this.fieldConfig.fields.companyDTO || undefined,
168 164
           priorityId: data.priorityId || undefined,
169 165
           priorityDTO: {
@@ -194,6 +190,7 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
194 190
 			query = {
195 191
 				startDate: this.customChangeDateComponent.startDate || undefined,
196 192
 				endDate: this.customChangeDateComponent.endDate || undefined,
193
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
197 194
 				searchQuery:{
198 195
 					statusValue: 'close',
199 196
 					isHangId: 1,
@@ -202,13 +199,11 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
202 199
 					placeId: this.fieldConfig.fields.floorId || undefined,
203 200
           groupId: this.fieldConfig.fields.groupId || undefined,
204 201
           userId: this.fieldConfig.fields.userId || undefined,
205
-          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
206 202
           companyId: this.fieldConfig.fields.companyId || undefined,
207 203
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
208 204
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
209 205
           groupDTO: this.fieldConfig.fields.groupDTO || undefined,
210 206
           userDTO: this.fieldConfig.fields.userDTO || undefined,
211
-          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
212 207
           companyDTO: this.fieldConfig.fields.companyDTO || undefined,
213 208
           priorityId: data.priorityId || undefined,
214 209
           priorityDTO: {
@@ -225,6 +220,7 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
225 220
 			query = {
226 221
 				startDate: this.customChangeDateComponent.startDate || undefined,
227 222
 				endDate: this.customChangeDateComponent.endDate || undefined,
223
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
228 224
 				searchQuery:{
229 225
 					statusValue: 'close',
230 226
 					isHangId: 1,
@@ -233,13 +229,11 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
233 229
 					placeId: this.fieldConfig.fields.floorId || undefined,
234 230
           groupId: this.fieldConfig.fields.groupId || undefined,
235 231
           userId: this.fieldConfig.fields.userId || undefined,
236
-          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
237 232
           companyId: this.fieldConfig.fields.companyId || undefined,
238 233
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
239 234
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
240 235
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
241 236
           userDTO: this.fieldConfig.fields.userDTO || undefined,
242
-          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
243 237
           companyDTO: this.fieldConfig.fields.companyDTO || undefined,
244 238
           priorityId: data.priorityId || undefined,
245 239
           priorityDTO: {
@@ -270,6 +264,7 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
270 264
 			query = {
271 265
 				startDate: this.customChangeDateComponent.startDate || undefined,
272 266
 				endDate: this.customChangeDateComponent.endDate || undefined,
267
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
273 268
 				searchQuery:{
274 269
 					statusValue: 'close',
275 270
 					evaluateId: 20424,
@@ -278,13 +273,11 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
278 273
 					placeId: this.fieldConfig.fields.floorId || undefined,
279 274
           groupId: this.fieldConfig.fields.groupId || undefined,
280 275
           userId: this.fieldConfig.fields.userId || undefined,
281
-          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
282 276
           companyId: this.fieldConfig.fields.companyId || undefined,
283 277
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
284 278
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
285 279
           groupDTO: this.fieldConfig.fields.groupDTO || undefined,
286 280
           userDTO: this.fieldConfig.fields.userDTO || undefined,
287
-          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
288 281
           companyDTO: this.fieldConfig.fields.companyDTO || undefined,
289 282
           priorityId: data.priorityId || undefined,
290 283
           priorityDTO: {
@@ -306,6 +299,7 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
306 299
 			query = {
307 300
 				startDate: this.customChangeDateComponent.startDate || undefined,
308 301
 				endDate: this.customChangeDateComponent.endDate || undefined,
302
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
309 303
 				searchQuery:{
310 304
 					statusValue: 'close',
311 305
 					evaluateId: 20424,
@@ -314,13 +308,11 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
314 308
 					placeId: this.fieldConfig.fields.floorId || undefined,
315 309
           groupId: this.fieldConfig.fields.groupId || undefined,
316 310
           userId: this.fieldConfig.fields.userId || undefined,
317
-          repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
318 311
           companyId: this.fieldConfig.fields.companyId || undefined,
319 312
 					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
320 313
 					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
321 314
 					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
322 315
           userDTO: this.fieldConfig.fields.userDTO || undefined,
323
-          repairDeptDTO: this.fieldConfig.fields.repairDeptDTO || undefined,
324 316
           companyDTO: this.fieldConfig.fields.companyDTO || undefined,
325 317
           priorityId: data.priorityId || undefined,
326 318
           priorityDTO: {
@@ -368,13 +360,16 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
368 360
   hosId:any;
369 361
   dutyId:any;
370 362
   parentDutyId:any;
371
-  initSessionData(){
363
+  async initSessionData(){
372 364
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
373 365
     let queryType:any = newStatistics.queryType;
366
+    let realQueryType:any = newStatistics.realQueryType;
374 367
     let hosId:any = newStatistics.hospitalId;
375 368
     let dutyId:any = newStatistics.dutyId;
369
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
376 370
 
377 371
     queryType = queryType ? +queryType : undefined;
372
+    realQueryType = realQueryType ? +realQueryType : undefined;
378 373
     hosId = hosId ? +hosId : undefined;
379 374
     dutyId = dutyId ? +dutyId : undefined;
380 375
 
@@ -395,6 +390,35 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
395 390
       this.hosId = undefined;
396 391
       this.dutyId = undefined;
397 392
       this.parentDutyId = dutyId;
393
+    }else if(queryType == 5){
394
+      this.fieldConfig.fields.repairDeptId = currentDeptDTO.id;
395
+      let postData = {
396
+        department: {
397
+          id: currentDeptDTO.id,
398
+          searchType: 1,
399
+        },
400
+        idx: 0,
401
+        sum: 1,
402
+      };
403
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
404
+      this.fieldConfig.fields.repairDeptDTO = result.list.length ? result.list[0] : undefined;
405
+      if(realQueryType == 1){
406
+        this.hosId = undefined;
407
+        this.dutyId = undefined;
408
+        this.parentDutyId = undefined;
409
+      }else if(realQueryType == 2){
410
+        this.hosId = hosId;
411
+        this.dutyId = undefined;
412
+        this.parentDutyId = undefined;
413
+      }else if(realQueryType == 3){
414
+        this.hosId = undefined;
415
+        this.dutyId = dutyId;
416
+        this.parentDutyId = undefined;
417
+      }else if(realQueryType == 4){
418
+        this.hosId = undefined;
419
+        this.dutyId = undefined;
420
+        this.parentDutyId = dutyId;
421
+      }
398 422
     }
399 423
   }
400 424
 
@@ -507,7 +531,15 @@ export class PriorityQualityControlStatisticsComponent implements OnInit, AfterV
507 531
 		this.sortCurrentValue = "";
508 532
 		this.sortCurrent = {};
509 533
     this.dateRange = []
510
-    this.fieldConfig.fields = {buildingId: undefined, floorId: undefined, groupId: undefined, userId: undefined, repairDeptId: undefined, companyId: undefined};
534
+    this.fieldConfig.fields = {
535
+      buildingId: undefined,
536
+      floorId: undefined,
537
+      groupId: undefined,
538
+      userId: undefined,
539
+      companyId: undefined,
540
+      repairDeptId: this.queryType == 5 ? this.fieldConfig.fields.repairDeptId : undefined,
541
+      repairDeptDTO: this.queryType == 5 ? this.fieldConfig.fields.repairDeptDTO : undefined,
542
+    };
511 543
     this.customChangeDateComponent.resetByDate();
512 544
     setTimeout(_=>{
513 545
     	this.search();

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

@@ -4,7 +4,7 @@
4 4
       <app-custom-change-date #customChangeDate [isShowType]="true" name="选择日期"></app-custom-change-date>
5 5
       <div class="searchDataItem">
6 6
         <span class="label">报修科室</span>:
7
-        <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
7
+        <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
8 8
           <ng-container *ngFor="let option of repairDeptList">
9 9
             <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
10 10
           </ng-container>

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

@@ -614,15 +614,16 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
614 614
   hosId:any;
615 615
   dutyId:any;
616 616
   parentDutyId:any;
617
-  currentDeptDTO:any;
618
-  initSessionData(){
617
+  async initSessionData(){
619 618
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
620 619
     let queryType:any = newStatistics.queryType;
620
+    let realQueryType:any = newStatistics.realQueryType;
621 621
     let hosId:any = newStatistics.hospitalId;
622 622
     let dutyId:any = newStatistics.dutyId;
623 623
     let currentDeptDTO:any = newStatistics.currentDeptDTO;
624 624
 
625 625
     queryType = queryType ? +queryType : undefined;
626
+    realQueryType = realQueryType ? +realQueryType : undefined;
626 627
     hosId = hosId ? +hosId : undefined;
627 628
     dutyId = dutyId ? +dutyId : undefined;
628 629
 
@@ -644,9 +645,34 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
644 645
       this.dutyId = undefined;
645 646
       this.parentDutyId = dutyId;
646 647
     }else if(queryType == 5){
647
-      this.hosId = undefined;
648
-      this.dutyId = undefined;
649
-      this.parentDutyId = dutyId;
648
+      this.repairDeptId = currentDeptDTO.id;
649
+      let postData = {
650
+        department: {
651
+          id: currentDeptDTO.id,
652
+          searchType: 1,
653
+        },
654
+        idx: 0,
655
+        sum: 1,
656
+      };
657
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
658
+      this.repairDeptList = result.list || [];
659
+      if(realQueryType == 1){
660
+        this.hosId = undefined;
661
+        this.dutyId = undefined;
662
+        this.parentDutyId = undefined;
663
+      }else if(realQueryType == 2){
664
+        this.hosId = hosId;
665
+        this.dutyId = undefined;
666
+        this.parentDutyId = undefined;
667
+      }else if(realQueryType == 3){
668
+        this.hosId = undefined;
669
+        this.dutyId = dutyId;
670
+        this.parentDutyId = undefined;
671
+      }else if(realQueryType == 4){
672
+        this.hosId = undefined;
673
+        this.dutyId = undefined;
674
+        this.parentDutyId = dutyId;
675
+      }
650 676
     }
651 677
 
652 678
 		this.isLoading1 = true
@@ -723,7 +749,8 @@ export class SynthesizeStatisticsComponent implements OnInit, AfterViewInit {
723 749
 
724 750
 	// 重置
725 751
 	reset(){
726
-    this.repairDeptId = undefined;
752
+    this.repairDeptId = this.queryType == 5 ? this.repairDeptId : undefined;
753
+    this.repairDeptList = this.queryType == 5 ? this.repairDeptList : [];
727 754
 		this.dateRange = [];
728 755
 		this.activeIndex = 0;
729 756
     this.customChangeDateComponent.resetByDate();

+ 45 - 7
src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.ts

@@ -54,7 +54,7 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
54 54
 
55 55
     }, 0)
56 56
   }
57
-	
57
+
58 58
 	// 数据下钻
59 59
 	viewDetail1(data, type){
60 60
 		let query = null
@@ -118,7 +118,7 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
118 118
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
119 119
 		this.router.navigate([path], { replaceUrl: true });
120 120
 	}
121
-	
121
+
122 122
 	// 数据下钻
123 123
 	viewDetail2(data, type){
124 124
 		let query = null
@@ -193,7 +193,7 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
193 193
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
194 194
 		this.router.navigate([path], { replaceUrl: true });
195 195
 	}
196
-	
196
+
197 197
 	// 数据下钻
198 198
 	viewDetail3(data, type){
199 199
 		let query = null
@@ -268,7 +268,7 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
268 268
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
269 269
 		this.router.navigate([path], { replaceUrl: true });
270 270
 	}
271
-	
271
+
272 272
 	// 数据下钻
273 273
 	viewDetail4(data, type){
274 274
 		let query = null
@@ -353,7 +353,7 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
353 353
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
354 354
 		this.router.navigate([path], { replaceUrl: true });
355 355
 	}
356
-	
356
+
357 357
   getQueryParams(){
358 358
     let queryParams = this.tabService.getQueryParams();
359 359
     this.tabService.clearQueryParams();
@@ -373,13 +373,16 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
373 373
   hosId:any;
374 374
   dutyId:any;
375 375
   parentDutyId:any;
376
-  initSessionData(){
376
+  async initSessionData(){
377 377
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
378 378
     let queryType:any = newStatistics.queryType;
379
+    let realQueryType:any = newStatistics.realQueryType;
379 380
     let hosId:any = newStatistics.hospitalId;
380 381
     let dutyId:any = newStatistics.dutyId;
382
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
381 383
 
382 384
     queryType = queryType ? +queryType : undefined;
385
+    realQueryType = realQueryType ? +realQueryType : undefined;
383 386
     hosId = hosId ? +hosId : undefined;
384 387
     dutyId = dutyId ? +dutyId : undefined;
385 388
 
@@ -400,6 +403,35 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
400 403
       this.hosId = undefined;
401 404
       this.dutyId = undefined;
402 405
       this.parentDutyId = dutyId;
406
+    }else if(queryType == 5){
407
+      this.fieldConfig.fields.repairDeptId = currentDeptDTO.id;
408
+      let postData = {
409
+        department: {
410
+          id: currentDeptDTO.id,
411
+          searchType: 1,
412
+        },
413
+        idx: 0,
414
+        sum: 1,
415
+      };
416
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
417
+      this.fieldConfig.fields.repairDeptDTO = result.list.length ? result.list[0] : undefined;
418
+      if(realQueryType == 1){
419
+        this.hosId = undefined;
420
+        this.dutyId = undefined;
421
+        this.parentDutyId = undefined;
422
+      }else if(realQueryType == 2){
423
+        this.hosId = hosId;
424
+        this.dutyId = undefined;
425
+        this.parentDutyId = undefined;
426
+      }else if(realQueryType == 3){
427
+        this.hosId = undefined;
428
+        this.dutyId = dutyId;
429
+        this.parentDutyId = undefined;
430
+      }else if(realQueryType == 4){
431
+        this.hosId = undefined;
432
+        this.dutyId = undefined;
433
+        this.parentDutyId = dutyId;
434
+      }
403 435
     }
404 436
   }
405 437
 
@@ -513,7 +545,13 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
513 545
 		this.sortCurrent = {};
514 546
     this.dateRange = []
515 547
     this.companyId = undefined;
516
-    this.fieldConfig.fields = {categoryId: undefined, buildingId: undefined, floorId: undefined, repairDeptId: undefined};
548
+    this.fieldConfig.fields = {
549
+      categoryId: undefined,
550
+      buildingId: undefined,
551
+      floorId: undefined,
552
+      repairDeptId: this.queryType == 5 ? this.fieldConfig.fields.repairDeptId : undefined,
553
+      repairDeptDTO: this.queryType == 5 ? this.fieldConfig.fields.repairDeptDTO : undefined,
554
+    };
517 555
     this.customChangeDateComponent.resetByDate();
518 556
 		sessionStorage.removeItem('maintenanceData');
519 557
     setTimeout(_=>{

+ 48 - 9
src/app/views/new-statistics/maintenance-statistics/user-evaluate-statistics/user-evaluate-statistics.component.ts

@@ -55,7 +55,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
55 55
 
56 56
     }, 0)
57 57
   }
58
-	
58
+
59 59
 	// 数据下钻
60 60
 	viewDetail1(data, type){
61 61
 		let query = null
@@ -122,7 +122,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
122 122
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
123 123
 		this.router.navigate([path], { replaceUrl: true });
124 124
 	}
125
-	
125
+
126 126
 	// 数据下钻
127 127
 	viewDetail2(data, type){
128 128
 		let query = null
@@ -209,7 +209,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
209 209
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
210 210
 		this.router.navigate([path], { replaceUrl: true });
211 211
 	}
212
-	
212
+
213 213
 	// 数据下钻
214 214
 	viewDetail3(data, type){
215 215
 		let query = null
@@ -296,7 +296,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
296 296
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
297 297
 		this.router.navigate([path], { replaceUrl: true });
298 298
 	}
299
-	
299
+
300 300
 	// 数据下钻
301 301
 	viewDetail4(data, type){
302 302
 		let query = null
@@ -383,7 +383,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
383 383
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
384 384
 		this.router.navigate([path], { replaceUrl: true });
385 385
 	}
386
-	
386
+
387 387
 	// 数据下钻
388 388
 	viewDetail5(data, type){
389 389
 		let query = null
@@ -470,7 +470,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
470 470
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
471 471
 		this.router.navigate([path], { replaceUrl: true });
472 472
 	}
473
-	
473
+
474 474
 	// 数据下钻
475 475
 	viewDetail6(data, type){
476 476
 		let query = null
@@ -548,7 +548,7 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
548 548
 		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
549 549
 		this.router.navigate([path], { replaceUrl: true });
550 550
 	}
551
-	
551
+
552 552
   getQueryParams(){
553 553
     let queryParams = this.tabService.getQueryParams();
554 554
     this.tabService.clearQueryParams();
@@ -568,13 +568,16 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
568 568
   hosId:any;
569 569
   dutyId:any;
570 570
   parentDutyId:any;
571
-  initSessionData(){
571
+  async initSessionData(){
572 572
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
573 573
     let queryType:any = newStatistics.queryType;
574
+    let realQueryType:any = newStatistics.realQueryType;
574 575
     let hosId:any = newStatistics.hospitalId;
575 576
     let dutyId:any = newStatistics.dutyId;
577
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
576 578
 
577 579
     queryType = queryType ? +queryType : undefined;
580
+    realQueryType = realQueryType ? +realQueryType : undefined;
578 581
     hosId = hosId ? +hosId : undefined;
579 582
     dutyId = dutyId ? +dutyId : undefined;
580 583
 
@@ -595,6 +598,35 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
595 598
       this.hosId = undefined;
596 599
       this.dutyId = undefined;
597 600
       this.parentDutyId = dutyId;
601
+    }else if(queryType == 5){
602
+      this.fieldConfig.fields.repairDeptId = currentDeptDTO.id;
603
+      let postData = {
604
+        department: {
605
+          id: currentDeptDTO.id,
606
+          searchType: 1,
607
+        },
608
+        idx: 0,
609
+        sum: 1,
610
+      };
611
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
612
+      this.fieldConfig.fields.repairDeptDTO = result.list.length ? result.list[0] : undefined;
613
+      if(realQueryType == 1){
614
+        this.hosId = undefined;
615
+        this.dutyId = undefined;
616
+        this.parentDutyId = undefined;
617
+      }else if(realQueryType == 2){
618
+        this.hosId = hosId;
619
+        this.dutyId = undefined;
620
+        this.parentDutyId = undefined;
621
+      }else if(realQueryType == 3){
622
+        this.hosId = undefined;
623
+        this.dutyId = dutyId;
624
+        this.parentDutyId = undefined;
625
+      }else if(realQueryType == 4){
626
+        this.hosId = undefined;
627
+        this.dutyId = undefined;
628
+        this.parentDutyId = dutyId;
629
+      }
598 630
     }
599 631
   }
600 632
 
@@ -710,7 +742,14 @@ export class UserEvaluateStatisticsComponent implements OnInit, AfterViewInit {
710 742
 		this.sortCurrent = {};
711 743
     this.dateRange = []
712 744
     this.userId = undefined;
713
-    this.fieldConfig.fields = {buildingId: undefined, floorId: undefined, categoryId: undefined, groupId: undefined, repairDeptId: undefined};
745
+    this.fieldConfig.fields = {
746
+      buildingId: undefined,
747
+      floorId: undefined,
748
+      categoryId: undefined,
749
+      groupId: undefined,
750
+      repairDeptId: this.queryType == 5 ? this.fieldConfig.fields.repairDeptId : undefined,
751
+      repairDeptDTO: this.queryType == 5 ? this.fieldConfig.fields.repairDeptDTO : undefined,
752
+    };
714 753
     this.customChangeDateComponent.resetByDate();
715 754
 		sessionStorage.removeItem('maintenanceData');
716 755
     setTimeout(_=>{

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

@@ -20,7 +20,7 @@
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.buildingDTO || fieldConfig.fields.floorDTO || fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO">
23
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.floorDTO || fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO || fieldConfig.fields.repairDeptDTO">
24 24
   <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
25 25
 	<span>{{fieldConfig.fields.userDTO?.name}}</span>
26 26
   <span>{{fieldConfig.fields.category1DTO?.category}}</span>
@@ -28,6 +28,7 @@
28 28
   <span>{{fieldConfig.fields.category3DTO?.category}}</span>
29 29
   <span>{{fieldConfig.fields.buildingDTO?.buildingName}}</span>
30 30
   <span>{{fieldConfig.fields.floorDTO?.floorName}}</span>
31
+  <span>{{fieldConfig.fields.repairDeptDTO?.dept}}</span>
31 32
 </div>
32 33
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
33 34
   <thead (nzSortChange)="sort($event)" nzSingleSort>

+ 53 - 4
src/app/views/new-statistics/maintenance-statistics/user-statistics/user-statistics.component.ts

@@ -63,6 +63,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
63 63
 			query = {
64 64
 				startDate: this.customChangeDateComponent.startDate || undefined,
65 65
 				endDate: this.customChangeDateComponent.endDate || undefined,
66
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
66 67
 				searchQuery:{
67 68
 					statusValue: 'close',
68 69
 					userId: this.fieldConfig.fields.userId || undefined,
@@ -85,6 +86,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
85 86
 			query = {
86 87
 				startDate: this.customChangeDateComponent.startDate || undefined,
87 88
 				endDate: this.customChangeDateComponent.endDate || undefined,
89
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
88 90
 				searchQuery:{
89 91
 					statusValue: 'close',
90 92
 					userId: data.userId ? data.userId : -1 || undefined,
@@ -128,6 +130,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
128 130
 			query = {
129 131
 				startDate: this.customChangeDateComponent.startDate || undefined,
130 132
 				endDate: this.customChangeDateComponent.endDate || undefined,
133
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
131 134
 				searchQuery:{
132 135
 					statusValue: 'close',
133 136
 					overtimeId: 1,
@@ -155,6 +158,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
155 158
 			query = {
156 159
 				startDate: this.customChangeDateComponent.startDate || undefined,
157 160
 				endDate: this.customChangeDateComponent.endDate || undefined,
161
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
158 162
 				searchQuery:{
159 163
 					statusValue: 'close',
160 164
 					userId: data.userId ? data.userId : -1,
@@ -203,6 +207,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
203 207
 			query = {
204 208
 				startDate: this.customChangeDateComponent.startDate || undefined,
205 209
 				endDate: this.customChangeDateComponent.endDate || undefined,
210
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
206 211
 				searchQuery:{
207 212
 					statusValue: 'close',
208 213
 					isHangId: 1,
@@ -230,6 +235,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
230 235
 			query = {
231 236
 				startDate: this.customChangeDateComponent.startDate || undefined,
232 237
 				endDate: this.customChangeDateComponent.endDate || undefined,
238
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
233 239
 				searchQuery:{
234 240
 					statusValue: 'close',
235 241
 					userId: data.userId ? data.userId : -1,
@@ -278,6 +284,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
278 284
 			query = {
279 285
 				startDate: this.customChangeDateComponent.startDate || undefined,
280 286
 				endDate: this.customChangeDateComponent.endDate || undefined,
287
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
281 288
 				searchQuery:{
282 289
 					statusValue: 'close',
283 290
 					evaluateId: 20424,
@@ -310,6 +317,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
310 317
 			query = {
311 318
 				startDate: this.customChangeDateComponent.startDate || undefined,
312 319
 				endDate: this.customChangeDateComponent.endDate || undefined,
320
+        repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
313 321
 				searchQuery:{
314 322
 					statusValue: 'close',
315 323
 					userId: data.userId ? data.userId : -1,
@@ -371,13 +379,16 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
371 379
   hosId:any;
372 380
   dutyId:any;
373 381
   parentDutyId:any;
374
-  initSessionData(){
382
+  async initSessionData(){
375 383
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
376 384
     let queryType:any = newStatistics.queryType;
385
+    let realQueryType:any = newStatistics.realQueryType;
377 386
     let hosId:any = newStatistics.hospitalId;
378 387
     let dutyId:any = newStatistics.dutyId;
388
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
379 389
 
380 390
     queryType = queryType ? +queryType : undefined;
391
+    realQueryType = realQueryType ? +realQueryType : undefined;
381 392
     hosId = hosId ? +hosId : undefined;
382 393
     dutyId = dutyId ? +dutyId : undefined;
383 394
 
@@ -398,6 +409,35 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
398 409
       this.hosId = undefined;
399 410
       this.dutyId = undefined;
400 411
       this.parentDutyId = dutyId;
412
+    }else if(queryType == 5){
413
+      this.fieldConfig.fields.repairDeptId = currentDeptDTO.id;
414
+      let postData = {
415
+        department: {
416
+          id: currentDeptDTO.id,
417
+          searchType: 1,
418
+        },
419
+        idx: 0,
420
+        sum: 1,
421
+      };
422
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
423
+      this.fieldConfig.fields.repairDeptDTO = result.list.length ? result.list[0] : undefined;
424
+      if(realQueryType == 1){
425
+        this.hosId = undefined;
426
+        this.dutyId = undefined;
427
+        this.parentDutyId = undefined;
428
+      }else if(realQueryType == 2){
429
+        this.hosId = hosId;
430
+        this.dutyId = undefined;
431
+        this.parentDutyId = undefined;
432
+      }else if(realQueryType == 3){
433
+        this.hosId = undefined;
434
+        this.dutyId = dutyId;
435
+        this.parentDutyId = undefined;
436
+      }else if(realQueryType == 4){
437
+        this.hosId = undefined;
438
+        this.dutyId = undefined;
439
+        this.parentDutyId = dutyId;
440
+      }
401 441
     }
402 442
   }
403 443
 
@@ -425,6 +465,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
425 465
       categoryId: this.fieldConfig.fields.categoryId || undefined,
426 466
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
427 467
 			groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
468
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
428 469
     };
429 470
     if (field && sort) {
430 471
       postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
@@ -477,6 +518,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
477 518
       categoryId: this.fieldConfig.fields.categoryId || undefined,
478 519
       hierarchy: this.fieldConfig.fields.hierarchy || undefined,
479 520
       groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
521
+      repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
480 522
     };
481 523
     if (this.sortCurrentKey && this.sortCurrentValue) {
482 524
       postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
@@ -511,7 +553,14 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
511 553
 		this.sortCurrent = {};
512 554
     this.dateRange = []
513 555
     // this.userId = undefined;
514
-    this.fieldConfig.fields = {buildingId: undefined, floorId: undefined, categoryId: undefined, groupId: undefined};
556
+    this.fieldConfig.fields = {
557
+      buildingId: undefined,
558
+      floorId: undefined,
559
+      categoryId: undefined,
560
+      groupId: undefined,
561
+      repairDeptId: this.queryType == 5 ? this.fieldConfig.fields.repairDeptId : undefined,
562
+      repairDeptDTO: this.queryType == 5 ? this.fieldConfig.fields.repairDeptDTO : undefined,
563
+    };
515 564
     this.customChangeDateComponent.resetByDate();
516 565
 		sessionStorage.removeItem('maintenanceData');
517 566
     setTimeout(_=>{
@@ -560,8 +609,8 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
560 609
 
561 610
   // 详细搜索
562 611
   fieldConfig:any = {
563
-    fields: {buildingId: undefined, floorId: undefined, categoryId: undefined, groupId: undefined, userId: undefined},
564
-    config: {buildingAndFloor: true, category123: true, groupAndUser: true},
612
+    fields: {buildingId: undefined, floorId: undefined, categoryId: undefined, groupId: undefined, userId: undefined, repairDeptId: undefined},
613
+    config: {buildingAndFloor: true, category123: true, groupAndUser: true, repairDept: true},
565 614
   }
566 615
   showSearchMore:boolean = false;
567 616
   showMore(){

+ 1 - 1
src/app/views/new-statistics/maintenance-statistics/work-hour-big-statistics/work-hour-big-statistics.component.html

@@ -3,7 +3,7 @@
3 3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4 4
     <div class="searchDataItem">
5 5
       <span class="label">报修科室</span>:
6
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
6
+      <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
7 7
         <ng-container *ngFor="let option of repairDeptList">
8 8
           <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>

+ 35 - 2
src/app/views/new-statistics/maintenance-statistics/work-hour-big-statistics/work-hour-big-statistics.component.ts

@@ -74,13 +74,16 @@ export class WorkHourBigStatisticsComponent implements OnInit, AfterViewInit {
74 74
   hosId:any;
75 75
   dutyId:any;
76 76
   parentDutyId:any;
77
-  initSessionData(){
77
+  async initSessionData(){
78 78
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
79 79
     let queryType:any = newStatistics.queryType;
80
+    let realQueryType:any = newStatistics.realQueryType;
80 81
     let hosId:any = newStatistics.hospitalId;
81 82
     let dutyId:any = newStatistics.dutyId;
83
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
82 84
 
83 85
     queryType = queryType ? +queryType : undefined;
86
+    realQueryType = realQueryType ? +realQueryType : undefined;
84 87
     hosId = hosId ? +hosId : undefined;
85 88
     dutyId = dutyId ? +dutyId : undefined;
86 89
 
@@ -101,6 +104,35 @@ export class WorkHourBigStatisticsComponent implements OnInit, AfterViewInit {
101 104
       this.hosId = undefined;
102 105
       this.dutyId = undefined;
103 106
       this.parentDutyId = dutyId;
107
+    }else if(queryType == 5){
108
+      this.repairDeptId = currentDeptDTO.id;
109
+      let postData = {
110
+        department: {
111
+          id: currentDeptDTO.id,
112
+          searchType: 1,
113
+        },
114
+        idx: 0,
115
+        sum: 1,
116
+      };
117
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
118
+      this.repairDeptList = result.list || [];
119
+      if(realQueryType == 1){
120
+        this.hosId = undefined;
121
+        this.dutyId = undefined;
122
+        this.parentDutyId = undefined;
123
+      }else if(realQueryType == 2){
124
+        this.hosId = hosId;
125
+        this.dutyId = undefined;
126
+        this.parentDutyId = undefined;
127
+      }else if(realQueryType == 3){
128
+        this.hosId = undefined;
129
+        this.dutyId = dutyId;
130
+        this.parentDutyId = undefined;
131
+      }else if(realQueryType == 4){
132
+        this.hosId = undefined;
133
+        this.dutyId = undefined;
134
+        this.parentDutyId = dutyId;
135
+      }
104 136
     }
105 137
   }
106 138
 
@@ -219,7 +251,8 @@ export class WorkHourBigStatisticsComponent implements OnInit, AfterViewInit {
219 251
 		this.sortCurrentValue = "";
220 252
 		this.sortCurrent = {};
221 253
     this.dateRange = []
222
-    this.repairDeptId = undefined;
254
+    this.repairDeptId = this.queryType == 5 ? this.repairDeptId : undefined;
255
+    this.repairDeptList = this.queryType == 5 ? this.repairDeptList : [];
223 256
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined, companyId: undefined};
224 257
     this.customChangeDateComponent.resetByDate();
225 258
     setTimeout(_=>{

+ 1 - 1
src/app/views/new-statistics/maintenance-statistics/work-hour-small-statistics/work-hour-small-statistics.component.html

@@ -3,7 +3,7 @@
3 3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4 4
     <div class="searchDataItem">
5 5
       <span class="label">报修科室</span>:
6
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
6
+      <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
7 7
         <ng-container *ngFor="let option of repairDeptList">
8 8
           <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>

+ 35 - 2
src/app/views/new-statistics/maintenance-statistics/work-hour-small-statistics/work-hour-small-statistics.component.ts

@@ -74,13 +74,16 @@ export class WorkHourSmallStatisticsComponent implements OnInit, AfterViewInit {
74 74
   hosId:any;
75 75
   dutyId:any;
76 76
   parentDutyId:any;
77
-  initSessionData(){
77
+  async initSessionData(){
78 78
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
79 79
     let queryType:any = newStatistics.queryType;
80
+    let realQueryType:any = newStatistics.realQueryType;
80 81
     let hosId:any = newStatistics.hospitalId;
81 82
     let dutyId:any = newStatistics.dutyId;
83
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
82 84
 
83 85
     queryType = queryType ? +queryType : undefined;
86
+    realQueryType = realQueryType ? +realQueryType : undefined;
84 87
     hosId = hosId ? +hosId : undefined;
85 88
     dutyId = dutyId ? +dutyId : undefined;
86 89
 
@@ -101,6 +104,35 @@ export class WorkHourSmallStatisticsComponent implements OnInit, AfterViewInit {
101 104
       this.hosId = undefined;
102 105
       this.dutyId = undefined;
103 106
       this.parentDutyId = dutyId;
107
+    }else if(queryType == 5){
108
+      this.repairDeptId = currentDeptDTO.id;
109
+      let postData = {
110
+        department: {
111
+          id: currentDeptDTO.id,
112
+          searchType: 1,
113
+        },
114
+        idx: 0,
115
+        sum: 1,
116
+      };
117
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
118
+      this.repairDeptList = result.list || [];
119
+      if(realQueryType == 1){
120
+        this.hosId = undefined;
121
+        this.dutyId = undefined;
122
+        this.parentDutyId = undefined;
123
+      }else if(realQueryType == 2){
124
+        this.hosId = hosId;
125
+        this.dutyId = undefined;
126
+        this.parentDutyId = undefined;
127
+      }else if(realQueryType == 3){
128
+        this.hosId = undefined;
129
+        this.dutyId = dutyId;
130
+        this.parentDutyId = undefined;
131
+      }else if(realQueryType == 4){
132
+        this.hosId = undefined;
133
+        this.dutyId = undefined;
134
+        this.parentDutyId = dutyId;
135
+      }
104 136
     }
105 137
   }
106 138
 
@@ -221,7 +253,8 @@ export class WorkHourSmallStatisticsComponent implements OnInit, AfterViewInit {
221 253
 		this.sortCurrentValue = "";
222 254
 		this.sortCurrent = {};
223 255
     this.dateRange = []
224
-    this.repairDeptId = undefined;
256
+    this.repairDeptId = this.queryType == 5 ? this.repairDeptId : undefined;
257
+    this.repairDeptList = this.queryType == 5 ? this.repairDeptList : [];
225 258
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined, companyId: undefined, workHourParentId: undefined};
226 259
     this.customChangeDateComponent.resetByDate();
227 260
     setTimeout(_=>{

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

@@ -3,7 +3,7 @@
3 3
     <app-custom-change-date #customChangeDate [isShowType]="true"></app-custom-change-date>
4 4
     <div class="searchDataItem">
5 5
       <span class="label">科室</span>:
6
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" (nzOpenChange)="openChangeDept($event)">
6
+      <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" (nzOpenChange)="openChangeDept($event)">
7 7
         <ng-container *ngFor="let option of deptList">
8 8
           <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>

+ 35 - 2
src/app/views/new-statistics/phone-statistics/date-phone-statistics/date-phone-statistics.component.ts

@@ -74,13 +74,16 @@ export class DatePhoneStatisticsComponent implements OnInit, AfterViewInit {
74 74
   hosId:any;
75 75
   dutyId:any;
76 76
   parentDutyId:any;
77
-  initSessionData(){
77
+  async initSessionData(){
78 78
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
79 79
     let queryType:any = newStatistics.queryType;
80
+    let realQueryType:any = newStatistics.realQueryType;
80 81
     let hosId:any = newStatistics.hospitalId;
81 82
     let dutyId:any = newStatistics.dutyId;
83
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
82 84
 
83 85
     queryType = queryType ? +queryType : undefined;
86
+    realQueryType = realQueryType ? +realQueryType : undefined;
84 87
     hosId = hosId ? +hosId : undefined;
85 88
     dutyId = dutyId ? +dutyId : undefined;
86 89
 
@@ -101,6 +104,35 @@ export class DatePhoneStatisticsComponent implements OnInit, AfterViewInit {
101 104
       this.hosId = undefined;
102 105
       this.dutyId = undefined;
103 106
       this.parentDutyId = dutyId;
107
+    }else if(queryType == 5){
108
+      this.deptId = currentDeptDTO.id;
109
+      let postData = {
110
+        department: {
111
+          id: currentDeptDTO.id,
112
+          searchType: 1,
113
+        },
114
+        idx: 0,
115
+        sum: 1,
116
+      };
117
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
118
+      this.deptList = result.list || [];
119
+      if(realQueryType == 1){
120
+        this.hosId = undefined;
121
+        this.dutyId = undefined;
122
+        this.parentDutyId = undefined;
123
+      }else if(realQueryType == 2){
124
+        this.hosId = hosId;
125
+        this.dutyId = undefined;
126
+        this.parentDutyId = undefined;
127
+      }else if(realQueryType == 3){
128
+        this.hosId = undefined;
129
+        this.dutyId = dutyId;
130
+        this.parentDutyId = undefined;
131
+      }else if(realQueryType == 4){
132
+        this.hosId = undefined;
133
+        this.dutyId = undefined;
134
+        this.parentDutyId = dutyId;
135
+      }
104 136
     }
105 137
   }
106 138
 
@@ -207,7 +239,8 @@ export class DatePhoneStatisticsComponent implements OnInit, AfterViewInit {
207 239
 		this.sortCurrentValue = "";
208 240
 		this.sortCurrent = {};
209 241
     this.dateRange = []
210
-    this.deptId = undefined;
242
+    this.deptId = this.queryType == 5 ? this.deptId : undefined;
243
+    this.deptList = this.queryType == 5 ? this.deptList : undefined;
211 244
     this.fieldConfig.fields = {buildingId: undefined, floorId: undefined, deptTypeId: undefined};
212 245
     this.customChangeDateComponent.resetByDate();
213 246
     this.search();

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

@@ -3,7 +3,7 @@
3 3
     <app-custom-change-date #customChangeDate [isShowType]="false"></app-custom-change-date>
4 4
     <div class="searchDataItem">
5 5
       <span class="label">科室</span>:
6
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" (nzOpenChange)="openChangeDept($event)">
6
+      <nz-select class="selectItem" [nzDisabled]="queryType == 5" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" (nzOpenChange)="openChangeDept($event)">
7 7
         <ng-container *ngFor="let option of deptList">
8 8
           <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>

+ 35 - 2
src/app/views/new-statistics/phone-statistics/department-phone-statistics/department-phone-statistics.component.ts

@@ -74,13 +74,16 @@ export class DepartmentPhoneStatisticsComponent implements OnInit, AfterViewInit
74 74
   hosId:any;
75 75
   dutyId:any;
76 76
   parentDutyId:any;
77
-  initSessionData(){
77
+  async initSessionData(){
78 78
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
79 79
     let queryType:any = newStatistics.queryType;
80
+    let realQueryType:any = newStatistics.realQueryType;
80 81
     let hosId:any = newStatistics.hospitalId;
81 82
     let dutyId:any = newStatistics.dutyId;
83
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
82 84
 
83 85
     queryType = queryType ? +queryType : undefined;
86
+    realQueryType = realQueryType ? +realQueryType : undefined;
84 87
     hosId = hosId ? +hosId : undefined;
85 88
     dutyId = dutyId ? +dutyId : undefined;
86 89
 
@@ -101,6 +104,35 @@ export class DepartmentPhoneStatisticsComponent implements OnInit, AfterViewInit
101 104
       this.hosId = undefined;
102 105
       this.dutyId = undefined;
103 106
       this.parentDutyId = dutyId;
107
+    }else if(queryType == 5){
108
+      this.deptId = currentDeptDTO.id;
109
+      let postData = {
110
+        department: {
111
+          id: currentDeptDTO.id,
112
+          searchType: 1,
113
+        },
114
+        idx: 0,
115
+        sum: 1,
116
+      };
117
+      let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
118
+      this.deptList = result.list || [];
119
+      if(realQueryType == 1){
120
+        this.hosId = undefined;
121
+        this.dutyId = undefined;
122
+        this.parentDutyId = undefined;
123
+      }else if(realQueryType == 2){
124
+        this.hosId = hosId;
125
+        this.dutyId = undefined;
126
+        this.parentDutyId = undefined;
127
+      }else if(realQueryType == 3){
128
+        this.hosId = undefined;
129
+        this.dutyId = dutyId;
130
+        this.parentDutyId = undefined;
131
+      }else if(realQueryType == 4){
132
+        this.hosId = undefined;
133
+        this.dutyId = undefined;
134
+        this.parentDutyId = dutyId;
135
+      }
104 136
     }
105 137
   }
106 138
 
@@ -205,7 +237,8 @@ export class DepartmentPhoneStatisticsComponent implements OnInit, AfterViewInit
205 237
 		this.sortCurrentValue = "";
206 238
 		this.sortCurrent = {};
207 239
     this.dateRange = []
208
-    this.deptId = undefined;
240
+    this.deptId = this.queryType == 5 ? this.deptId : undefined;
241
+    this.deptList = this.queryType == 5 ? this.deptList : undefined;
209 242
     this.fieldConfig.fields = {buildingId: undefined, floorId: undefined, deptTypeId: undefined};
210 243
     this.customChangeDateComponent.resetByDate();
211 244
     this.search();