10 次代码提交 e886c5ce59 ... 66b06dadca

作者 SHA1 备注 提交日期
  seimin 66b06dadca 换色 1 天之前
  seimin 74d014f871 主题色 2 天之前
  seimin ca45aebd05 Merge branch 'master' into develop 3 天之前
  seimin 1c5449a2c0 Merge branch 'master' into develop 4 天之前
  seimin 4d755acd79 Merge branch 'master' into develop 1 周之前
  seimin da66432dba 标本添加加急标识 1 周之前
  seimin 3ecde76dc9 护士端统计 1 周之前
  seimin 571e33e3b7 Merge branch 'master' into develop 1 周之前
  seimin 42491422b7 统计暂存 1 周之前
  seimin 8158842240 暂提 2 周之前
共有 100 个文件被更改,包括 4113 次插入717 次删除
  1. 2 0
      src/app/app.component.ts
  2. 81 8
      src/app/services/tool.service.ts
  3. 1 1
      src/app/share/allocation-worker/allocation-worker.component.less
  4. 3 3
      src/app/share/appraise-detail/appraise-detail.component.less
  5. 3 3
      src/app/share/batch-orders/batch-orders.component.less
  6. 1 1
      src/app/share/detail-drug/detail-drug.component.less
  7. 3 3
      src/app/share/inspection-execute-detail/inspection-execute-detail.component.less
  8. 4 4
      src/app/share/order-detail/order-detail.component.less
  9. 3 3
      src/app/share/outgoing-record-detail/outgoing-record-detail.component.less
  10. 3 3
      src/app/views/fuwutai/fuwutai.component.html
  11. 8 4
      src/app/views/home/home.component.less
  12. 2 1
      src/app/views/hushijiandan/hushijiandan.component.html
  13. 11 0
      src/app/views/hushijiandan/hushijiandan.component.less
  14. 18 0
      src/app/views/hushijiandan/hushijiandan.component.ts
  15. 3 3
      src/app/views/inspect-active-detail/inspect-active-detail.component.less
  16. 3 3
      src/app/views/inspect-active-order-list/inspect-active-order-list.component.less
  17. 6 4
      src/app/views/inspect-search/inspect-search.component.ts
  18. 7 4
      src/app/views/login/login.component.ts
  19. 4 4
      src/app/views/main/main.component.html
  20. 13 12
      src/app/views/main/main.component.ts
  21. 6 15
      src/app/views/new-statistics/components/custom-change-date/custom-change-date.component.ts
  22. 21 10
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.html
  23. 31 21
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.ts
  24. 17 6
      src/app/views/new-statistics/components/query-range/query-range.component.html
  25. 2 3
      src/app/views/new-statistics/components/query-range/query-range.component.less
  26. 26 3
      src/app/views/new-statistics/components/query-range/query-range.component.ts
  27. 24 10
      src/app/views/new-statistics/components/search-more/search-more.component.html
  28. 65 33
      src/app/views/new-statistics/components/search-more/search-more.component.ts
  29. 21 18
      src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.html
  30. 107 21
      src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.ts
  31. 48 14
      src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.ts
  32. 25 22
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.html
  33. 116 18
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.ts
  34. 2 2
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.html
  35. 48 19
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.ts
  36. 23 20
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.html
  37. 135 24
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.ts
  38. 2 2
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.html
  39. 62 41
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.ts
  40. 2 2
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.html
  41. 55 30
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.ts
  42. 9 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-inspection-statistics-routing.module.ts
  43. 14 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics-routing.module.ts
  44. 70 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.component.html
  45. 71 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.component.less
  46. 285 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.component.ts
  47. 23 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-personnel-effectiveness-statistics/distribution-personnel-effectiveness-statistics.module.ts
  48. 13 2
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.html
  49. 3 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.less
  50. 104 12
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.ts
  51. 41 2
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-user-evaluate-statistics/distribution-user-evaluate-statistics.component.ts
  52. 17 14
      src/app/views/new-statistics/distribution-inspection-statistics/hour-quality-control-statistics/hour-quality-control-statistics.component.html
  53. 114 18
      src/app/views/new-statistics/distribution-inspection-statistics/hour-quality-control-statistics/hour-quality-control-statistics.component.ts
  54. 2 1
      src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.html
  55. 83 25
      src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.ts
  56. 1 1
      src/app/views/new-statistics/distribution-inspection-statistics/source-statistics/source-statistics.component.html
  57. 35 2
      src/app/views/new-statistics/distribution-inspection-statistics/source-statistics/source-statistics.component.ts
  58. 21 18
      src/app/views/new-statistics/distribution-inspection-statistics/taskType-quality-control-statistics/taskType-quality-control-statistics.component.html
  59. 133 18
      src/app/views/new-statistics/distribution-inspection-statistics/taskType-quality-control-statistics/taskType-quality-control-statistics.component.ts
  60. 40 3
      src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.component.ts
  61. 25 22
      src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.component.html
  62. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.component.less
  63. 125 3
      src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.component.ts
  64. 2 1
      src/app/views/new-statistics/maintenance-statistics/building-statistics/building-statistics.component.html
  65. 42 4
      src/app/views/new-statistics/maintenance-statistics/building-statistics/building-statistics.component.ts
  66. 50 10
      src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.ts
  67. 2 1
      src/app/views/new-statistics/maintenance-statistics/category-source-statistics/category-source-statistics.component.html
  68. 46 4
      src/app/views/new-statistics/maintenance-statistics/category-source-statistics/category-source-statistics.component.ts
  69. 55 15
      src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.ts
  70. 48 8
      src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.ts
  71. 1 1
      src/app/views/new-statistics/maintenance-statistics/consumable-statistics/consumable-statistics.component.html
  72. 35 2
      src/app/views/new-statistics/maintenance-statistics/consumable-statistics/consumable-statistics.component.ts
  73. 2 2
      src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.html
  74. 54 21
      src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.ts
  75. 2 2
      src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.html
  76. 50 17
      src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.ts
  77. 2 2
      src/app/views/new-statistics/maintenance-statistics/department-source-statistics/department-source-statistics.component.html
  78. 41 8
      src/app/views/new-statistics/maintenance-statistics/department-source-statistics/department-source-statistics.component.ts
  79. 2 1
      src/app/views/new-statistics/maintenance-statistics/floor-statistics/floor-statistics.component.html
  80. 42 4
      src/app/views/new-statistics/maintenance-statistics/floor-statistics/floor-statistics.component.ts
  81. 2 1
      src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.html
  82. 57 9
      src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.ts
  83. 6 5
      src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.html
  84. 82 52
      src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.ts
  85. 1 1
      src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.html
  86. 40 7
      src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.ts
  87. 27 0
      src/app/views/new-statistics/maintenance-statistics/maintenance-statistics-routing.module.ts
  88. 14 0
      src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics-routing.module.ts
  89. 74 0
      src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics.component.html
  90. 71 0
      src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics.component.less
  91. 297 0
      src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics.component.ts
  92. 23 0
      src/app/views/new-statistics/maintenance-statistics/personnel-effectiveness-statistics/personnel-effectiveness-statistics.module.ts
  93. 14 0
      src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics-routing.module.ts
  94. 64 0
      src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics.component.html
  95. 75 0
      src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics.component.less
  96. 428 0
      src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics.component.ts
  97. 23 0
      src/app/views/new-statistics/maintenance-statistics/priority-date-statistics/priority-date-statistics.module.ts
  98. 14 0
      src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics-routing.module.ts
  99. 75 0
      src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics.component.html
  100. 0 0
      src/app/views/new-statistics/maintenance-statistics/priority-quality-control-statistics/priority-quality-control-statistics.component.less

+ 2 - 0
src/app/app.component.ts

@@ -25,6 +25,8 @@ export class AppComponent {
25 25
     }
26 26
     console.log(hosId);
27 27
     this.tool.getSysNameAndLogoAsync(hosId).subscribe(result => {
28
+      // 系统颜色设置
29
+      this.tool.setUIColor(result.ui_colour);
28 30
       let marking = result.project || '';
29 31
       let logoTitle = result.sysName || '';
30 32
       let logoUrl = location.origin + '/file' + result.logo || '';

+ 81 - 8
src/app/services/tool.service.ts

@@ -12,34 +12,34 @@ export class ToolService {
12 12
 	changeInpSubject:any;
13 13
 	allSubject = new Subject();
14 14
 	allEndSubject = new Subject();
15
-	 
15
+
16 16
 	// 提供方法来触发事件
17 17
 	triggerEvent(data: any) {
18 18
 		this.allSubject.next(data);
19 19
 	}
20
-	
20
+
21 21
 	// 提供方法来触发事件
22 22
 	triggerEndEvent(data: any) {
23 23
 		this.allEndSubject.next(data);
24 24
 	}
25
-	
25
+
26 26
 	// 提供方法来订阅事件
27 27
 	getEventObservable() {
28 28
 		return this.allSubject.asObservable();
29 29
 	}
30
-	
30
+
31 31
 	// 提供方法来订阅事件
32 32
 	getEventEndObservable() {
33 33
 		return this.allEndSubject.asObservable();
34 34
 	}
35
-	
35
+
36 36
   // 附件类型
37 37
   // word,excel,pdf,txt,ppt
38 38
   attachmentsTypes:string = 'text/plain,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf,application/vnd.ms-excel,application/msword,application/vnd.openxmlformats-officedocument.presentationml.presentation';
39 39
 
40 40
   constructor(private mainService: MainService) {}
41
-	
42
-	
41
+
42
+
43 43
   // 获取logoUrl和logoTitle
44 44
   getSysNameAndLogoAsync(hosId = ''){
45 45
     return this.mainService.getSysNameAndLogo(hosId);
@@ -60,6 +60,51 @@ export class ToolService {
60 60
     this.faviconUrl = faviconUrl;
61 61
   }
62 62
 
63
+  // 系统颜色设置
64
+  setUIColor(color){
65
+    // 移除样式
66
+    if(document.getElementById('dsThemeId')){
67
+      document.getElementById('dsThemeId').remove();
68
+    }
69
+    // 创建一个新的 <style> 元素
70
+    var style = document.createElement('style');
71
+
72
+    // 设置 style 元素的类型
73
+    style.id = 'dsThemeId';
74
+    style.type = 'text/css';
75
+
76
+    // 添加 CSS 规则
77
+    style.innerHTML = `
78
+      .ant-table-thead tr{
79
+        background-image:none!important;
80
+        background-color:${color}!important;
81
+      }
82
+      #ds-menu .mainMenuOne.mainMenuSelected{
83
+        background-color:${color}!important;
84
+      }
85
+      #ds-menu .mainMenu.menuTwoSelected{
86
+        border-left-color: ${color}!important;
87
+      }
88
+      #sidebar-logo .title{
89
+        color: ${color}!important;
90
+      }
91
+      #app-header .left > .icon_transport,
92
+      #app-header .left .icon_transport.green{
93
+        color: ${color}!important;
94
+      }
95
+      #fuwutai .lists_box .right_bots .top_bot{
96
+        background-color: ${color}!important;
97
+        border-color: ${color}!important;
98
+      }
99
+      #fuwutai .lists_box .no_data{
100
+        color: ${color}!important;
101
+      }
102
+    `;
103
+
104
+    // 将 <style> 元素添加到 <head> 中
105
+    document.head.appendChild(style);
106
+  }
107
+
63 108
   // 获取权限中的院区
64 109
   getHospitalList() {
65 110
     return (
@@ -382,7 +427,7 @@ export class ToolService {
382 427
 				case "collect":
383 428
 					coopBtns.collect = true; //设置核收
384 429
 					break;
385
-				
430
+
386 431
       }
387 432
     });
388 433
     console.log(coopBtns);
@@ -485,4 +530,32 @@ export class ToolService {
485 530
   generateNumberArray(start, end){
486 531
     return Array.from(new Array(end + 1).keys()).slice(start);
487 532
   }
533
+
534
+  /**
535
+   * @description sessionStorage缓存新增,修改
536
+   * @param {number} key 名称
537
+   * @param {number} value 值
538
+   * @return {array}
539
+   */
540
+  setSessionStorage(key, value){
541
+    sessionStorage.setItem(key, JSON.stringify(value));
542
+  }
543
+
544
+  /**
545
+   * @description sessionStorage缓存获取
546
+   * @param {number} key 名称
547
+   * @return {array}
548
+   */
549
+  getSessionStorage(key){
550
+    return JSON.parse(sessionStorage.getItem(key));
551
+  }
552
+
553
+  /**
554
+   * @description sessionStorage缓存删除
555
+   * @param {number} key 名称
556
+   * @return {array}
557
+   */
558
+  removeSessionStorage(key){
559
+    sessionStorage.removeItem(key);
560
+  }
488 561
 }

+ 1 - 1
src/app/share/allocation-worker/allocation-worker.component.less

@@ -68,7 +68,7 @@
68 68
           to right,
69 69
           @bg-start,
70 70
           @bg-end 100%
71
-        ) !important;
71
+        );
72 72
 
73 73
         th {
74 74
           color: #fff !important;

+ 3 - 3
src/app/share/appraise-detail/appraise-detail.component.less

@@ -197,12 +197,12 @@
197 197
               to right,
198 198
               @bg-start,
199 199
               @bg-end 100%
200
-            ) !important;
200
+            );
201 201
             background-image: -ms-linear-gradient(
202 202
               top,
203 203
               @bg-start,
204 204
               @bg-end
205
-            ) !important;
205
+            );
206 206
 
207 207
             th {
208 208
               color: #fff !important;
@@ -218,7 +218,7 @@
218 218
                 to right,
219 219
                 @bg-start,
220 220
                 @bg-end 50%
221
-              ) !important;
221
+              );
222 222
             }
223 223
           }
224 224
 

+ 3 - 3
src/app/share/batch-orders/batch-orders.component.less

@@ -259,7 +259,7 @@
259 259
                 to right,
260 260
                 @bg-start,
261 261
                 @bg-end 100%
262
-              ) !important;
262
+              );
263 263
 
264 264
               th {
265 265
                 color: #fff !important;
@@ -275,7 +275,7 @@
275 275
                   to right,
276 276
                   @bg-start,
277 277
                   @bg-end 50%
278
-                ) !important;
278
+                );
279 279
               }
280 280
             }
281 281
 
@@ -435,7 +435,7 @@
435 435
                 to right,
436 436
                 @bg-start,
437 437
                 @bg-end 100%
438
-              ) !important;
438
+              );
439 439
 
440 440
               th {
441 441
                 color: #fff !important;

+ 1 - 1
src/app/share/detail-drug/detail-drug.component.less

@@ -155,7 +155,7 @@
155 155
             to right,
156 156
             @bg-start,
157 157
             @bg-end 50%
158
-          ) !important;
158
+          );
159 159
 
160 160
           th {
161 161
             color: #fff !important;

+ 3 - 3
src/app/share/inspection-execute-detail/inspection-execute-detail.component.less

@@ -241,7 +241,7 @@
241 241
               to right,
242 242
               @bg-start,
243 243
               @bg-end 100%
244
-            ) !important;
244
+            );
245 245
 
246 246
             th {
247 247
               color: #fff !important;
@@ -257,7 +257,7 @@
257 257
                 to right,
258 258
                 @bg-start,
259 259
                 @bg-end 50%
260
-              ) !important;
260
+              );
261 261
             }
262 262
           }
263 263
 
@@ -418,7 +418,7 @@
418 418
               to right,
419 419
               @bg-start,
420 420
               @bg-end 100%
421
-            ) !important;
421
+            );
422 422
 
423 423
             th {
424 424
               color: #fff !important;

+ 4 - 4
src/app/share/order-detail/order-detail.component.less

@@ -208,13 +208,13 @@ img{
208 208
           min-height: 160px;
209 209
           background: #fff;
210 210
           border-radius: 5px;
211
-					
211
+
212 212
           .thead {
213 213
             background-image: repeating-linear-gradient(
214 214
               to right,
215 215
               @bg-start,
216 216
               @bg-end 100%
217
-            ) !important;
217
+            );
218 218
 
219 219
             th {
220 220
               color: #fff !important;
@@ -230,7 +230,7 @@ img{
230 230
                 to right,
231 231
                 @bg-start,
232 232
                 @bg-end 50%
233
-              ) !important;
233
+              );
234 234
             }
235 235
           }
236 236
 
@@ -391,7 +391,7 @@ img{
391 391
               to right,
392 392
               @bg-start,
393 393
               @bg-end 100%
394
-            ) !important;
394
+            );
395 395
 
396 396
             th {
397 397
               color: #fff !important;

+ 3 - 3
src/app/share/outgoing-record-detail/outgoing-record-detail.component.less

@@ -206,7 +206,7 @@
206 206
               to right,
207 207
               @bg-start,
208 208
               @bg-end 100%
209
-            ) !important;
209
+            );
210 210
 
211 211
             th {
212 212
               color: #fff !important;
@@ -222,7 +222,7 @@
222 222
                 to right,
223 223
                 @bg-start,
224 224
                 @bg-end 50%
225
-              ) !important;
225
+              );
226 226
             }
227 227
           }
228 228
 
@@ -383,7 +383,7 @@
383 383
               to right,
384 384
               @bg-start,
385 385
               @bg-end 100%
386
-            ) !important;
386
+            );
387 387
 
388 388
             th {
389 389
               color: #fff !important;

+ 3 - 3
src/app/views/fuwutai/fuwutai.component.html

@@ -1,4 +1,4 @@
1
-<div class="fuwutai">
1
+<div class="fuwutai" id="fuwutai">
2 2
   <div class="top" id="top" *ngIf="hurseInfoHiding != 1 && hsmsData.hsmsSwitch">
3 3
     <!-- 头部Tab -->
4 4
     <div class="tabBox">
@@ -2080,7 +2080,7 @@
2080 2080
 	  cancelTxt="否"
2081 2081
 	  (cancelDelEvent)="hideRepeatModal()"
2082 2082
 	></app-dialog-delete>
2083
-	
2083
+
2084 2084
 	<!-- 一键派单 -->
2085 2085
 	<app-dialog-delete
2086 2086
 	  [delModal]="sendModal"
@@ -2089,7 +2089,7 @@
2089 2089
 	  (confirmDelEvent)="confirmSecd()"
2090 2090
 	  content="您确认一键派单吗?系统会根据工作分配方案自动派单给指定人员"
2091 2091
 	></app-dialog-delete>
2092
-	
2092
+
2093 2093
 	<!-- 是否限制业务发起时间模态框 -->
2094 2094
 	<app-dialog-delete [delModal]="limitTimeModal" (hideDelModalEvent)="hideLimitTimeModal()" [btnLoading]="limitTimeLoading"
2095 2095
 	(confirmDelEvent)="confirmLimitTime()" [content]="limitTimeInfo" confirmTxt="继续建单" [isShowConfirm]="isShowConfirm" [isShowConfirmInfo]="isShowConfirmInfo"></app-dialog-delete>

+ 8 - 4
src/app/views/home/home.component.less

@@ -210,7 +210,7 @@
210 210
                 .thead {
211 211
                   th {
212 212
                     background: transparent;
213
-                    color: #333;
213
+                    color: #fff;
214 214
                     text-align: center;
215 215
                     font-size: 12px;
216 216
                     padding: 8px;
@@ -346,6 +346,10 @@
346 346
                 .box {
347 347
                   height: 100%;
348 348
 
349
+                  th{
350
+                    color: #fff;
351
+                  }
352
+
349 353
                   th,
350 354
                   td {
351 355
                     text-align: center;
@@ -421,12 +425,12 @@
421 425
                   width: 100%;
422 426
                   padding: 16px 16px 8px 16px;
423 427
                   font-size: 12px;
424
-									
428
+
425 429
 									.flex{
426 430
 										display: flex;
427 431
 										justify-content: space-between;
428 432
 									}
429
-									
433
+
430 434
                   .title {
431 435
                     color: #333;
432 436
 
@@ -450,7 +454,7 @@
450 454
                     &.noOver {
451 455
                       -webkit-line-clamp: unset;
452 456
                     }
453
-										
457
+
454 458
                   }
455 459
 
456 460
                   .up {

+ 2 - 1
src/app/views/hushijiandan/hushijiandan.component.html

@@ -182,7 +182,8 @@
182 182
             <div class="updateTipsForNurses red">{{ updateTipsForNurses }}</div>
183 183
             <div class="queuingInformation" *ngIf="!updateTipsForNurses && inspectAndPatientTransportConfig.queuingInformation == 1">等待陪检:<span class="red">{{queuingInformationList[0]}}</span>&emsp;陪检中:<span class="red">{{queuingInformationList[1]}}</span></div>
184 184
           </div>
185
-          <div class="right">
185
+          <div class="right nurseMenu">
186
+            <i class="icon_transport transport-tongji-2 green" *ngIf="coopBtns.newStatisticsNurse && newStatisticsRole" (click)="toNewStatistics()" nz-tooltip nzTooltipTitle="统计"></i>
186 187
             <div class="userInfo dropdown">
187 188
               <div class="user" (mouseenter)="showDropdown = true" (mouseleave)="showDropdown = false">
188 189
                 <img src="../../assets/images/icon_keshi.png" alt="">

+ 11 - 0
src/app/views/hushijiandan/hushijiandan.component.less

@@ -5,6 +5,17 @@
5 5
   height: 100%;
6 6
   display: flex;
7 7
 
8
+  .nurseMenu{
9
+    & > .icon_transport{
10
+      margin-left: 24px;
11
+      cursor: pointer;
12
+      font-size: 20px;
13
+      height: 48px;
14
+      line-height: 48px;
15
+      display: inline-block;
16
+    }
17
+  }
18
+
8 19
   .transport-chaoshi{
9 20
     font-size: 16px;
10 21
     margin-right: 4px;

+ 18 - 0
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -295,6 +295,12 @@ export class HushijiandanComponent implements OnInit {
295 295
 
296 296
   getCoopBtns(){
297 297
     let menu: any = JSON.parse(localStorage.getItem("menu")) || []; //菜单
298
+    menu.forEach(v => {
299
+      if (v.type == "newStatistics") {
300
+        this.newStatisticsRole = true;
301
+        console.log("新版统计");
302
+      }
303
+    })
298 304
     let coopBtns:any = {};
299 305
     let nurseMenu = menu.find(v => v.link === 'nurse');
300 306
     let nurseMenuChildren = nurseMenu.childrens || [];
@@ -321,6 +327,9 @@ export class HushijiandanComponent implements OnInit {
321 327
         case "buildOrdersForOtherTasks":
322 328
           coopBtns.buildOrdersForOtherTasks = true; //其他任务建单
323 329
           break;
330
+        case "newStatisticsNurse":
331
+          coopBtns.newStatisticsNurse = true; //护士端新版统计权限
332
+          break;
324 333
       }
325 334
     });
326 335
     this.coopBtns = coopBtns;
@@ -5827,4 +5836,13 @@ export class HushijiandanComponent implements OnInit {
5827 5836
 			  });
5828 5837
 		}
5829 5838
   }
5839
+
5840
+  // 统计
5841
+  newStatisticsRole: boolean = false; //新版统计权限
5842
+  toNewStatistics(): void {
5843
+    this.tool.setSessionStorage('newStatisticsFrom', 'nurse');//统计来源标识
5844
+    let menus = JSON.parse(localStorage.getItem("menu"));
5845
+    let firstMenu = menus.find((item) => item.type == "newStatistics");
5846
+    this.router.navigateByUrl(`newStatistics/${firstMenu.link}/${firstMenu.childrens[0].link}`);
5847
+  }
5830 5848
 }

+ 3 - 3
src/app/views/inspect-active-detail/inspect-active-detail.component.less

@@ -187,7 +187,7 @@
187 187
               to right,
188 188
               @bg-start,
189 189
               @bg-end 100%
190
-            ) !important;
190
+            );
191 191
 
192 192
             th {
193 193
               color: #fff !important;
@@ -203,7 +203,7 @@
203 203
                 to right,
204 204
                 @bg-start,
205 205
                 @bg-end 50%
206
-              ) !important;
206
+              );
207 207
             }
208 208
           }
209 209
 
@@ -363,7 +363,7 @@
363 363
               to right,
364 364
               @bg-start,
365 365
               @bg-end 100%
366
-            ) !important;
366
+            );
367 367
 
368 368
             th {
369 369
               color: #fff !important;

+ 3 - 3
src/app/views/inspect-active-order-list/inspect-active-order-list.component.less

@@ -187,7 +187,7 @@
187 187
               to right,
188 188
               @bg-start,
189 189
               @bg-end 100%
190
-            ) !important;
190
+            );
191 191
 
192 192
             th {
193 193
               color: #fff !important;
@@ -203,7 +203,7 @@
203 203
                 to right,
204 204
                 @bg-start,
205 205
                 @bg-end 50%
206
-              ) !important;
206
+              );
207 207
             }
208 208
           }
209 209
 
@@ -363,7 +363,7 @@
363 363
               to right,
364 364
               @bg-start,
365 365
               @bg-end 100%
366
-            ) !important;
366
+            );
367 367
 
368 368
             th {
369 369
               color: #fff !important;

+ 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;

+ 7 - 4
src/app/views/login/login.component.ts

@@ -152,7 +152,7 @@ export class LoginComponent implements OnInit {
152 152
       remember: [Boolean(localStorage.getItem("remember"))],
153 153
 			code: [null, [Validators.required]]
154 154
     });
155
-		
155
+
156 156
 		if(this.isSingleSignOn){
157 157
 			this.validateForm.removeControl('code');
158 158
 		}else{
@@ -163,7 +163,7 @@ export class LoginComponent implements OnInit {
163 163
 	resetCode(){
164 164
 		this.getCode()
165 165
 	}
166
-	
166
+
167 167
 	// 获取系统安全配置
168 168
 	verificationCode:any;
169 169
 	getSysConfig(){
@@ -174,7 +174,7 @@ export class LoginComponent implements OnInit {
174 174
 			}
175 175
 		})
176 176
 	}
177
-	
177
+
178 178
 	// 获取验证码
179 179
 	loginImg:any;
180 180
 	captchaId:any;
@@ -186,7 +186,7 @@ export class LoginComponent implements OnInit {
186 186
 			}
187 187
 		})
188 188
 	}
189
-	
189
+
190 190
   // enter触发
191 191
   enterUp(e): void {
192 192
     let keyCode = e.which || e.keyCode || 0;
@@ -254,6 +254,9 @@ export class LoginComponent implements OnInit {
254 254
         console.log(data.user);
255 255
         let hosId = data.user.user.currentHospital ? data.user.user.currentHospital.id : ''
256 256
         this.tool.getSysNameAndLogoAsync(hosId).subscribe(result => {
257
+          // 系统颜色设置
258
+          this.tool.setUIColor(result.ui_colour);
259
+
257 260
 					// this.verificationCode = result.verificationCode;
258 261
           let marking = result.project || '';
259 262
           let logoTitle = result.sysName || '';

+ 4 - 4
src/app/views/main/main.component.html

@@ -1,6 +1,6 @@
1 1
 <nz-layout class="app-layout display_flex flex_auto ant-layout-has-sider">
2 2
   <overlay-scrollbars #osComponentRef1 class="menu-sidebar">
3
-    <div class="sidebar-logo display_flex align-items_center justify-content_flex-center">
3
+    <div class="sidebar-logo display_flex align-items_center justify-content_flex-center" id="sidebar-logo">
4 4
       <div class="display_flex align-items_center justify-content_flex-center logoTitle">
5 5
         <div class="title ellipsis-multiline" nz-tooltip nzTooltipTitle="{{tool.logoTitle}}">{{tool.logoTitle}}</div>
6 6
       </div>
@@ -28,7 +28,7 @@
28 28
   </overlay-scrollbars>
29 29
   <nz-layout style="background:#fff;display: flex;flex-direction: column;position: relative;">
30 30
     <nz-header>
31
-      <div class="app-header display_flex justify-content_space-between align-items_center">
31
+      <div class="app-header display_flex justify-content_space-between align-items_center" id="app-header">
32 32
         <div class="left">
33 33
 					<!-- <i class="icon_transport transport-xiaoxi green" (click)="toMessage()" nz-tooltip nzTooltipTitle="个人消息通知"></i> -->
34 34
           <div class="dropdown">
@@ -316,7 +316,7 @@
316 316
 											</nz-option>
317 317
 										</nz-select>
318 318
 									</div>
319
-									
319
+
320 320
 									<div class="col">
321 321
 										<span class="name required">故障现象:</span>
322 322
 										<nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('category', $event)" nzPlaceHolder="请选择故障现象" [(ngModel)]="incidentModel.category" (ngModelChange)="changeApplyCategory($event)" (nzOpenChange)="openChangeApplyCategory($event)">
@@ -640,7 +640,7 @@
640 640
 </div>
641 641
 
642 642
 <!-- 查询范围 -->
643
-<app-query-range [hospital]="hospital" [duty]="duty" [queryType]="queryType" [parent]="parent" [hiddenParent]="true" (cancelQueryRange)="cancelQueryRange()" (submitQueryRange)="submitQueryRange($event)" *ngIf="queryRangeFlag"></app-query-range>
643
+<app-query-range sign="largeScreen" [hospital]="hospital" [duty]="duty" [queryType]="queryType" [parent]="parent" [hiddenParent]="true" [hiddenDefaultDate]="true" (cancelQueryRange)="cancelQueryRange()" (submitQueryRange)="submitQueryRange($event)" *ngIf="queryRangeFlag"></app-query-range>
644 644
 
645 645
 <!-- 知识库查看 -->
646 646
 <app-knowledge-look (cancelKnowledgeModal)="cancelKnowledgeModal()" *ngIf="isShowKnowledge" [knowledgeData]="coopData"></app-knowledge-look>

+ 13 - 12
src/app/views/main/main.component.ts

@@ -585,7 +585,7 @@ export class MainComponent implements OnInit, OnDestroy {
585 585
 	searchPatientListSubject = new Subject();
586 586
 	inspectSubject = new Subject();
587 587
 	changeAssetInpSubject = new Subject();
588
-	
588
+
589 589
 	// 运维相关
590 590
 	incidentModel:any = {};
591 591
 	incidentMsg:any = {};
@@ -1092,7 +1092,7 @@ export class MainComponent implements OnInit, OnDestroy {
1092 1092
 	      }
1093 1093
 	    });
1094 1094
 	}
1095
-	
1095
+
1096 1096
 	// 引入知识库
1097 1097
 	importKnowage(item){
1098 1098
 	  console.log(item)
@@ -1105,11 +1105,11 @@ export class MainComponent implements OnInit, OnDestroy {
1105 1105
 	  this.coopData = data || {};
1106 1106
 	  this.isShowKnowledge = true;
1107 1107
 	}
1108
-	
1108
+
1109 1109
 	cancelKnowledgeModal(flag) {
1110 1110
 	  this.isShowKnowledge = false;
1111 1111
 	}
1112
-	
1112
+
1113 1113
 	// 获取患者信息
1114 1114
 	searchPatientList(id, searchWords) {
1115 1115
 	  this.searchPatientListSubject.next([id, searchWords]);
@@ -3951,11 +3951,11 @@ export class MainComponent implements OnInit, OnDestroy {
3951 3951
 		    this.getPatientByResidenceNo(v[1]);
3952 3952
 		  }
3953 3953
 		});
3954
-		
3954
+
3955 3955
 		this.changeAssetInpSubject.pipe(debounceTime(500)).subscribe((v) => {
3956 3956
 		  this.getAssetData(v);
3957 3957
 		});
3958
-		
3958
+
3959 3959
 		this.onSearchTaskBuildSubject.pipe(debounceTime(500)).subscribe((v) => {
3960 3960
 		  this.getTasktypeByPhone(v);
3961 3961
 		});
@@ -4026,7 +4026,7 @@ export class MainComponent implements OnInit, OnDestroy {
4026 4026
 									}else{
4027 4027
 										this.cmdbRepair = false
4028 4028
 									}
4029
-									break;	
4029
+									break;
4030 4030
 							}
4031 4031
 						});
4032 4032
 						if(this.eventData){
@@ -4048,7 +4048,7 @@ export class MainComponent implements OnInit, OnDestroy {
4048 4048
 							}
4049 4049
 							this.searchApplicationBuilding()
4050 4050
 						}
4051
-						
4051
+
4052 4052
 						if(this.cmdbRepair && this.hospitalModel==1){
4053 4053
 							this.getAssetData()
4054 4054
 						}
@@ -4056,11 +4056,11 @@ export class MainComponent implements OnInit, OnDestroy {
4056 4056
 				}
4057 4057
 			});
4058 4058
 	 }
4059
-	
4059
+
4060 4060
 	changeAsset(e){
4061 4061
 		this.changeAssetInpSubject.next(e);
4062 4062
 	}
4063
-	
4063
+
4064 4064
   // 获取资产列表
4065 4065
 	assetData:any = [];
4066 4066
 	getAssetData(name?){
@@ -4075,7 +4075,7 @@ export class MainComponent implements OnInit, OnDestroy {
4075 4075
 		    name: name
4076 4076
 		  },
4077 4077
 		};
4078
-		
4078
+
4079 4079
 		this.mainService
4080 4080
 		  .getFetchDataList("simple/data", "asset", data)
4081 4081
 		  .subscribe((data) => {
@@ -4084,7 +4084,7 @@ export class MainComponent implements OnInit, OnDestroy {
4084 4084
 		    }
4085 4085
 		  });
4086 4086
 	}
4087
-	
4087
+
4088 4088
 	// 新增报修
4089 4089
 	speedinessAdd(): void {
4090 4090
 		this.addOrder();
@@ -4159,6 +4159,7 @@ export class MainComponent implements OnInit, OnDestroy {
4159 4159
 	}
4160 4160
   // 统计
4161 4161
   toNewStatistics(): void {
4162
+    this.tool.setSessionStorage('newStatisticsFrom', 'main');//统计来源标识
4162 4163
     let menus = JSON.parse(localStorage.getItem("menu"));
4163 4164
     let firstMenu = menus.find((item) => item.type == "newStatistics");
4164 4165
     this.router.navigateByUrl(`newStatistics/${firstMenu.link}/${firstMenu.childrens[0].link}`);

+ 6 - 15
src/app/views/new-statistics/components/custom-change-date/custom-change-date.component.ts

@@ -82,29 +82,20 @@ export class CustomChangeDateComponent implements OnInit, OnDestroy {
82 82
 		//     }
83 83
 		//   });
84 84
   }
85
-	
85
+
86 86
 	ngOnDestroy(){
87
-		// this.dateData1 = null 
87
+		// this.dateData1 = null
88 88
 		// this.dateData2 = null
89 89
 	}
90
-	
90
+
91 91
   // 根据时间区间重置
92 92
   resetByDate(){
93
-		setTimeout(_=>{
94
-			// console.log(2222,this.dateData1, this.dateData2)
95
-			// if(this.dateData1 && this.dateData2){
96
-			// 	this.dateRange = [this.dateData1, this.dateData2]
97
-			// }else{
98
-			// 	this.dateType = 'day';
99
-			// 	this.changeDateType(this.dateType, 6);
100
-			// }
101
-			this.dateType = 'day';
102
-			this.changeDateType(this.dateType, 6);
103
-		})
93
+    let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
94
+		this.initByDate(newStatistics.defaultDate)
104 95
   }
105 96
 
106 97
   // 根据时间区间初始化
107
-  initByDate(dateRange:any[], dateNum:any= 6){
98
+  initByDate(dateRange:any[], dateNum:any = null){
108 99
     setTimeout(() => {
109 100
       this.dateType = 'day';
110 101
       this.dateRange = dateRange;

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

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

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

+ 17 - 6
src/app/views/new-statistics/components/query-range/query-range.component.html

@@ -8,10 +8,11 @@
8 8
           <nz-form-label [nzSpan]="4" nzRequired nzFor="queryType">查询范围</nz-form-label>
9 9
           <nz-form-control [nzSpan]="20" nzErrorTip="请选择查询范围!">
10 10
             <nz-radio-group formControlName="queryType" (ngModelChange)="changeQueryType($event)">
11
-              <label nz-radio [nzValue]="1">全院查询</label>
12
-              <label nz-radio [nzValue]="2">院区查询</label>
13
-              <label nz-radio [nzValue]="3">部门查询</label>
14
-              <label nz-radio [nzValue]="4">垂直部门查询</label>
11
+              <label nz-radio [nzValue]="1" *ngIf="sign !== 'nurse'">全院查询</label>
12
+              <label nz-radio [nzValue]="2" *ngIf="sign !== 'nurse'">院区查询</label>
13
+              <label nz-radio [nzValue]="3" *ngIf="sign !== 'nurse'">部门查询</label>
14
+              <label nz-radio [nzValue]="4" *ngIf="sign !== 'nurse'">垂直部门查询</label>
15
+              <label nz-radio [nzValue]="5" *ngIf="sign === 'nurse'">申请科室查询</label>
15 16
             </nz-radio-group>
16 17
           </nz-form-control>
17 18
         </nz-form-item>
@@ -41,16 +42,26 @@
41 42
               </nz-option>
42 43
             </nz-select>
43 44
           </nz-form-control>
45
+        </nz-form-item>
46
+        <nz-form-item [hidden]="validateForm.value.queryType != 5">
47
+          <nz-form-label nzRequired [nzSpan]="4">申请科室</nz-form-label>
48
+          <nz-form-control [nzSpan]="20">{{currentDept.dept}}</nz-form-control>
44 49
         </nz-form-item>
45 50
 				<nz-form-item class="mb0" [ngStyle]="{ visibility: !hiddenParent ? 'visible' : 'hidden'}" style="visibility: hidden;">
46
-				  <nz-form-label [nzSpan]="7" nzRequired nzFor="parent">是否显示父级科室</nz-form-label>
47
-				  <nz-form-control [nzSpan]="15" nzErrorTip="请选择是否显示父级科室!">
51
+				  <nz-form-label [nzSpan]="6" nzRequired nzFor="parent">是否显示父级科室</nz-form-label>
52
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择是否显示父级科室!">
48 53
 				    <nz-radio-group formControlName="parent">
49 54
 				      <label nz-radio [nzValue]="1">是</label>
50 55
 				      <label nz-radio [nzValue]="0">否</label>
51 56
 				    </nz-radio-group>
52 57
 				  </nz-form-control>
53 58
 				</nz-form-item>
59
+				<nz-form-item class="mb0" [ngStyle]="{ visibility: !hiddenDefaultDate ? 'visible' : 'hidden'}" style="visibility: hidden;">
60
+				  <nz-form-label [nzSpan]="4" nzRequired nzFor="defaultDate">默认时间</nz-form-label>
61
+				  <nz-form-control [nzSpan]="20" nzErrorTip="请选择默认时间!">
62
+            <nz-range-picker [nzAllowClear]="false" formControlName="defaultDate" [nzAllowClear]='false'></nz-range-picker>
63
+				  </nz-form-control>
64
+				</nz-form-item>
54 65
       </form>
55 66
     </div>
56 67
     <div class="display_flex justify-content_flex-center">

+ 2 - 3
src/app/views/new-statistics/components/query-range/query-range.component.less

@@ -82,19 +82,18 @@
82 82
   // 新增
83 83
   &.add {
84 84
     .modalBody {
85
-      width: 578px;
85
+      width: 700px;
86 86
       padding: 0 24px;
87 87
 
88 88
       .content {
89 89
         width: 100%;
90
-        min-height: 166px;
91 90
         padding: 10px 24px 0;
92 91
         height: auto;
93 92
         overflow-y: auto;
94 93
 
95 94
         .addForm {
96 95
           .ant-form-item {
97
-            margin-bottom: 14px;
96
+            margin-bottom: 8px;
98 97
             .ant-form-item-label {
99 98
               text-align: left;
100 99
             }

+ 26 - 3
src/app/views/new-statistics/components/query-range/query-range.component.ts

@@ -3,6 +3,8 @@ import { Component, OnInit, Output, Input } from '@angular/core';
3 3
 import { FormGroup, FormBuilder, Validators } from '@angular/forms';
4 4
 import { EventEmitter } from '@angular/core';
5 5
 import { MainService } from 'src/app/services/main.service';
6
+import { DateService } from 'src/app/services/date.service';
7
+import { startOfDay, endOfDay, format } from 'date-fns';
6 8
 
7 9
 @Component({
8 10
   selector: 'app-query-range',
@@ -13,18 +15,32 @@ export class QueryRangeComponent implements OnInit {
13 15
   @Output() submitQueryRange = new EventEmitter();
14 16
   @Output() cancelQueryRange = new EventEmitter();
15 17
   @Input() queryType: number;
18
+  @Input() realQueryType: number;
16 19
   @Input() hospital: any;
17 20
   @Input() duty: any;
18 21
 	@Input() parent: any;
22
+	@Input() defaultDate: any = [];
23
+	@Input() currentDeptDTO;
24
+  // sign = largeScreen 大屏
25
+  // sign = main 管理端
26
+  // sign = nurse 护士端
27
+	@Input() sign: any = '';
19 28
 	@Input() hiddenParent: any = false;
29
+	@Input() hiddenDefaultDate: any = false;
20 30
   validateForm: FormGroup;//表单
31
+  currentDept:any = {};//当前登录人所在科室
21 32
   constructor(
22 33
     private fb: FormBuilder,
23 34
     private tool: ToolService,
24 35
     private mainService: MainService,
36
+    private dateService: DateService,
25 37
   ) { }
26 38
 
27 39
   ngOnInit() {
40
+    this.currentDept = this.tool.getCurrentUserDept();
41
+
42
+    console.log('this.sign:', this.sign)
43
+
28 44
     this.getHospitalList();
29 45
     this.queryType == 3 && this.getDutyList(this.hospital.id);
30 46
     this.getDutyOneList();
@@ -36,12 +52,15 @@ export class QueryRangeComponent implements OnInit {
36 52
   }
37 53
   // 初始化新增form表单
38 54
   initForm() {
55
+    let lastmonthstartdate = this.dateService.date().lastMonthStartDate;
56
+    let lastmonthenddate = this.dateService.date().lastMonthEndDate;
39 57
     this.validateForm = this.fb.group({
40 58
       queryType: [this.queryType, [Validators.required]],
41 59
       hospital: [(this.hospital && (this.queryType == 2 || this.queryType == 3)) ? this.hospital.id : null],
42 60
       duty: [(this.duty && this.queryType == 3) ? this.duty.id : null],
43 61
       dutyOne: [(this.duty && this.queryType == 4) ? this.duty.id : null],
44
-			parent :[this.parent?1:0, [Validators.required]]
62
+			parent :[this.parent?1:0, [Validators.required]],
63
+      defaultDate: [this.defaultDate.length ? this.defaultDate : [lastmonthstartdate, lastmonthenddate], [Validators.required]],
45 64
     });
46 65
   }
47 66
   // 表单提交
@@ -53,6 +72,8 @@ export class QueryRangeComponent implements OnInit {
53 72
     if (this.validateForm.invalid) return;
54 73
     let queryType = this.validateForm.value.queryType;
55 74
 		let parent = this.validateForm.value.parent;
75
+		let defaultDate = this.validateForm.value.defaultDate;
76
+    let currentDeptDTO;
56 77
     let hospital;
57 78
     let duty;
58 79
     switch (queryType) {
@@ -69,8 +90,11 @@ export class QueryRangeComponent implements OnInit {
69 90
         hospital = this.dutyOneList.find(v => v.id == this.validateForm.value.dutyOne).parent;
70 91
         duty = this.dutyOneList.find(v => v.id == this.validateForm.value.dutyOne);
71 92
         break;
93
+      case 5:
94
+        currentDeptDTO = this.currentDept;
95
+        break;
72 96
     }
73
-    this.submitQueryRange.emit({queryType, hospital, duty, parent});
97
+    this.submitQueryRange.emit({queryType, hospital, duty, parent, defaultDate, currentDeptDTO});
74 98
     this.hideModal();
75 99
   }
76 100
 
@@ -184,5 +208,4 @@ export class QueryRangeComponent implements OnInit {
184 208
       }
185 209
     });
186 210
   }
187
-
188 211
 }

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

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

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

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

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

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

+ 107 - 21
src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.ts

@@ -46,7 +46,7 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
46 46
 
47 47
     }, 0)
48 48
   }
49
-	
49
+
50 50
 	// 数据下钻
51 51
 	viewDetail1(data, type){
52 52
 		let query = null
@@ -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,
@@ -84,7 +82,7 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
84 82
 				}
85 83
 			}
86 84
 		}
87
-	
85
+
88 86
 		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
89 87
 		let flag = this.tabService.tabs.some(v => v.path === path);
90 88
 		flag && this.tabService.deleteRouteSnapshot(path);
@@ -93,17 +91,16 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
93 91
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
94 92
 		this.router.navigate([path], { replaceUrl: true });
95 93
 	}
96
-	
94
+
97 95
 	viewDetail2(data, type){
98 96
 		let query = null
99 97
 		if(type=='all'){
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,
@@ -134,7 +130,7 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
134 130
 				}
135 131
 			}
136 132
 		}
137
-	
133
+
138 134
 		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
139 135
 		let flag = this.tabService.tabs.some(v => v.path === path);
140 136
 		flag && this.tabService.deleteRouteSnapshot(path);
@@ -143,17 +139,16 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
143 139
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
144 140
 		this.router.navigate([path], { replaceUrl: true });
145 141
 	}
146
-	
142
+
147 143
 	viewDetail3(data, type){
148 144
 		let query = null
149 145
 		if(type=='all'){
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,
@@ -190,7 +184,7 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
190 184
 				}
191 185
 			}
192 186
 		}
193
-	
187
+
194 188
 		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
195 189
 		let flag = this.tabService.tabs.some(v => v.path === path);
196 190
 		flag && this.tabService.deleteRouteSnapshot(path);
@@ -199,7 +193,61 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
199 193
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
200 194
 		this.router.navigate([path], { replaceUrl: true });
201 195
 	}
202
-	
196
+
197
+  viewDetail4(data, type){
198
+		let query = null
199
+		if(type=='all'){
200
+			query = {
201
+				startDate: this.customChangeDateComponent.startDate || undefined,
202
+				endDate: this.customChangeDateComponent.endDate || undefined,
203
+        deptId: this.fieldConfig.fields.deptId || undefined,
204
+				searchQuery:{
205
+					statusValue: 'close',
206
+					groupId: this.fieldConfig.fields.groupId || undefined,
207
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
208
+					userId: this.fieldConfig.fields.userId || undefined,
209
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
210
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
211
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
212
+					emergencyTypeId: 300,
213
+					emergencyTypeDTO: {
214
+						"name": "是",
215
+						"id": 300
216
+					},
217
+				}
218
+			}
219
+		}else{
220
+			query = {
221
+				startDate: this.customChangeDateComponent.startDate || undefined,
222
+				endDate: this.customChangeDateComponent.endDate || undefined,
223
+				statisticsTypeId: data.statisticsTypeId || undefined,
224
+        deptId: this.fieldConfig.fields.deptId || undefined,
225
+				searchQuery:{
226
+					statusValue: 'close',
227
+					groupId: this.fieldConfig.fields.groupId || undefined,
228
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
229
+					userId: this.fieldConfig.fields.userId || undefined,
230
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
231
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
232
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
233
+					emergencyTypeId: 300,
234
+					emergencyTypeDTO: {
235
+						"name": "是",
236
+						"id": 300
237
+					},
238
+				}
239
+			}
240
+		}
241
+
242
+		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
243
+		let flag = this.tabService.tabs.some(v => v.path === path);
244
+		flag && this.tabService.deleteRouteSnapshot(path);
245
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
246
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
247
+		sessionStorage.setItem('distributionData', JSON.stringify(query))
248
+		this.router.navigate([path], { replaceUrl: true });
249
+	}
250
+
203 251
   getQueryParams(){
204 252
     let queryParams = this.tabService.getQueryParams();
205 253
     this.tabService.clearQueryParams();
@@ -219,13 +267,16 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
219 267
   hosId:any;
220 268
   dutyId:any;
221 269
   parentDutyId:any;
222
-  initSessionData(){
270
+  async initSessionData(){
223 271
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
224 272
     let queryType:any = newStatistics.queryType;
273
+    let realQueryType:any = newStatistics.realQueryType;
225 274
     let hosId:any = newStatistics.hospitalId;
226 275
     let dutyId:any = newStatistics.dutyId;
276
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
227 277
 
228 278
     queryType = queryType ? +queryType : undefined;
279
+    realQueryType = realQueryType ? +realQueryType : undefined;
229 280
     hosId = hosId ? +hosId : undefined;
230 281
     dutyId = dutyId ? +dutyId : undefined;
231 282
 
@@ -246,6 +297,35 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
246 297
       this.hosId = undefined;
247 298
       this.dutyId = undefined;
248 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
+      }
249 329
     }
250 330
   }
251 331
 
@@ -350,7 +430,13 @@ export class BusinessClassifyStatisticsComponent implements OnInit, AfterViewIni
350 430
 		this.sortCurrentValue = "";
351 431
 		this.sortCurrent = {};
352 432
     this.dateRange = []
353
-    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
+    };
354 440
     this.customChangeDateComponent.resetByDate();
355 441
     setTimeout(_=>{
356 442
     	this.search();

+ 48 - 14
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
 
@@ -210,7 +238,7 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
210 238
   loading1 = false;
211 239
   dictionaryList: any[] = [];
212 240
   getList(num?: number, field?: string, sort?: string) {
213
-    this.mainService.getDictionary('list', 'statistics_date_type').subscribe((data) => {
241
+    this.mainService.getDictionary('list', 'statistics_date_type', true).subscribe((data) => {
214 242
       this.dictionaryList = data || [];
215 243
       // this.dictionaryList = cloneDeep(dictionaryList);
216 244
       let flag = this.dictionaryList.some((item) => item.value === 'dateOther');
@@ -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();

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

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

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

@@ -46,7 +46,7 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
46 46
 
47 47
     }, 0)
48 48
   }
49
-	
49
+
50 50
 	// 数据下钻
51 51
 	viewDetail1(data, type){
52 52
 		let query = null
@@ -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,
@@ -104,7 +102,7 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
104 102
 			this.router.navigate([path], { replaceUrl: true });
105 103
 		}
106 104
 	}
107
-	
105
+
108 106
 	viewDetail2(data, type){
109 107
 		let query = null
110 108
 		if(type=='all'){
@@ -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,
@@ -165,7 +161,7 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
165 161
 			this.router.navigate([path], { replaceUrl: true });
166 162
 		}
167 163
 	}
168
-	
164
+
169 165
 	viewDetail3(data, type){
170 166
 		let query = null
171 167
 		if(type=='all'){
@@ -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,
@@ -232,7 +226,72 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
232 226
 			this.router.navigate([path], { replaceUrl: true });
233 227
 		}
234 228
 	}
235
-	
229
+
230
+  viewDetail4(data, type){
231
+		let query = null
232
+		if(type=='all'){
233
+			query = {
234
+				startDate: this.customChangeDateComponent.startDate || undefined,
235
+				endDate: this.customChangeDateComponent.endDate || undefined,
236
+				statisticsTypeId: this.statisticsTypeId || undefined,
237
+        deptId: this.fieldConfig.fields.deptId || undefined,
238
+				searchQuery:{
239
+					statusValue: 'close',
240
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
241
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
242
+					groupId: this.fieldConfig.fields.groupId || undefined,
243
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
244
+					userId: this.fieldConfig.fields.userId || undefined,
245
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
246
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
247
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
248
+					emergencyTypeId: 300,
249
+					emergencyTypeDTO: {
250
+						"name": "是",
251
+						"id": 300
252
+					},
253
+				}
254
+			}
255
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
256
+			let flag = this.tabService.tabs.some(v => v.path === path);
257
+			flag && this.tabService.deleteRouteSnapshot(path);
258
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
259
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
260
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
261
+			this.router.navigate([path], { replaceUrl: true });
262
+		}else{
263
+			query = {
264
+				startDate: this.customChangeDateComponent.startDate || undefined,
265
+				endDate: this.customChangeDateComponent.endDate || undefined,
266
+				statisticsTypeId: this.statisticsTypeId || undefined,
267
+        deptId: this.fieldConfig.fields.deptId || undefined,
268
+				searchQuery:{
269
+					statusValue: 'close',
270
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
271
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
272
+					groupId: this.fieldConfig.fields.groupId || undefined,
273
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
274
+					userId: this.fieldConfig.fields.userId || undefined,
275
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
276
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
277
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
278
+					emergencyTypeId: 300,
279
+					emergencyTypeDTO: {
280
+						"name": "是",
281
+						"id": 300
282
+					},
283
+				}
284
+			}
285
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
286
+			let flag = this.tabService.tabs.some(v => v.path === path);
287
+			flag && this.tabService.deleteRouteSnapshot(path);
288
+			this.tabService.setQueryParams('dateRange',  [data.date + ' ' + '00:00:00', data.date + ' ' + '23:59:59']);
289
+			this.tabService.setQueryParams('defRange', null);
290
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
291
+			this.router.navigate([path], { replaceUrl: true });
292
+		}
293
+	}
294
+
236 295
   getQueryParams(){
237 296
     let queryParams = this.tabService.getQueryParams();
238 297
     this.tabService.clearQueryParams();
@@ -252,13 +311,16 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
252 311
   hosId:any;
253 312
   dutyId:any;
254 313
   parentDutyId:any;
255
-  initSessionData(){
314
+  async initSessionData(){
256 315
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
257 316
     let queryType:any = newStatistics.queryType;
317
+    let realQueryType:any = newStatistics.realQueryType;
258 318
     let hosId:any = newStatistics.hospitalId;
259 319
     let dutyId:any = newStatistics.dutyId;
320
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
260 321
 
261 322
     queryType = queryType ? +queryType : undefined;
323
+    realQueryType = realQueryType ? +realQueryType : undefined;
262 324
     hosId = hosId ? +hosId : undefined;
263 325
     dutyId = dutyId ? +dutyId : undefined;
264 326
 
@@ -279,6 +341,35 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
279 341
       this.hosId = undefined;
280 342
       this.dutyId = undefined;
281 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
+      }
282 373
     }
283 374
   }
284 375
 
@@ -390,7 +481,14 @@ export class DateQualityControlStatisticsComponent implements OnInit, AfterViewI
390 481
 		this.sortCurrent = {};
391 482
     this.dateRange = []
392 483
     this.statisticsTypeId = undefined;
393
-    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
+    };
394 492
     this.customChangeDateComponent.resetByDate();
395 493
     setTimeout(_=>{
396 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>

+ 48 - 19
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
 
@@ -262,7 +290,7 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
262 290
   dictionaryList: any[] = [];
263 291
 	widthValue:any;
264 292
   getList(num?: number, field?: string, sort?: string) {
265
-    this.mainService.getDictionary('list', 'statistics_date_type').subscribe((data) => {
293
+    this.mainService.getDictionary('list', 'statistics_date_type', true).subscribe((data) => {
266 294
      this.dictionaryList = data || [];
267 295
      // this.dictionaryList = cloneDeep(dictionaryList);
268 296
      let flag = this.dictionaryList.some((item) => item.value === 'dateOther');
@@ -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
 

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

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

@@ -60,23 +60,22 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
60 60
 
61 61
     }, 0)
62 62
   }
63
-	
63
+
64 64
 	// 数据下钻
65 65
 	viewDetail1(data, type){
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,
@@ -137,22 +135,21 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
137 135
 			  });
138 136
 		}
139 137
 	}
140
-	
138
+
141 139
 	viewDetail2(data, type){
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,
@@ -217,22 +213,21 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
217 213
 				});
218 214
 		}
219 215
 	}
220
-	
216
+
221 217
 	viewDetail3(data, type){
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,
@@ -303,7 +297,91 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
303 297
 				});
304 298
 		}
305 299
 	}
306
-	
300
+
301
+	viewDetail4(data, type){
302
+		let query = null
303
+		let item = null
304
+		if(this.deptId){
305
+			item = this.deptList.find(i => i.id == this.deptId)
306
+		}
307
+		if(type=='all'){
308
+			query = {
309
+				startDate: this.customChangeDateComponent.startDate || undefined,
310
+				endDate: this.customChangeDateComponent.endDate || undefined,
311
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
312
+        deptId: this.deptId || undefined,
313
+				searchQuery:{
314
+					statusValue: 'close',
315
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
316
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
317
+					groupId: this.fieldConfig.fields.groupId || undefined,
318
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
319
+					userId: this.fieldConfig.fields.userId || undefined,
320
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
321
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
322
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
323
+					emergencyTypeId: 300,
324
+					emergencyTypeDTO: {
325
+						"name": "是",
326
+						"id": 300
327
+					},
328
+				}
329
+			}
330
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
331
+			let flag = this.tabService.tabs.some(v => v.path === path);
332
+			flag && this.tabService.deleteRouteSnapshot(path);
333
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
334
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
335
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
336
+			this.router.navigate([path], { replaceUrl: true });
337
+		}else{
338
+			let arr = data.name.split('(')
339
+			let postData: any = {
340
+			  idx: 0,
341
+			  sum: 20,
342
+			  department: {
343
+			    dept: arr[0],
344
+			    searchType: 1,
345
+			  },
346
+			};
347
+			this.mainService.getFetchDataList("simple/data", "department", postData)
348
+				.subscribe((res) => {
349
+					if (res.status == 200) {
350
+						let item = res.list.find(i =>i.id == data.deptId)
351
+						query = {
352
+							startDate: this.customChangeDateComponent.startDate || undefined,
353
+							endDate: this.customChangeDateComponent.endDate || undefined,
354
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
355
+              deptId: data.deptId || undefined,
356
+							searchQuery:{
357
+								statusValue: 'close',
358
+								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
359
+								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
360
+								groupId: this.fieldConfig.fields.groupId || undefined,
361
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
362
+								userId: this.fieldConfig.fields.userId || undefined,
363
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
364
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
365
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
366
+								emergencyTypeId: 300,
367
+								emergencyTypeDTO: {
368
+									"name": "是",
369
+									"id": 300
370
+								},
371
+							}
372
+						}
373
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
374
+						let flag = this.tabService.tabs.some(v => v.path === path);
375
+						flag && this.tabService.deleteRouteSnapshot(path);
376
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
377
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
378
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
379
+						this.router.navigate([path], { replaceUrl: true });
380
+					}
381
+				});
382
+		}
383
+	}
384
+
307 385
   getQueryParams(){
308 386
     let queryParams = this.tabService.getQueryParams();
309 387
     this.tabService.clearQueryParams();
@@ -324,14 +402,17 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
324 402
   dutyId:any;
325 403
   parentDutyId:any;
326 404
   parent:any;
327
-  initSessionData(){
405
+  async initSessionData(){
328 406
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
329 407
     let queryType:any = newStatistics.queryType;
408
+    let realQueryType:any = newStatistics.realQueryType;
330 409
     let hosId:any = newStatistics.hospitalId;
331 410
     let dutyId:any = newStatistics.dutyId;
332
-  	this.parent = newStatistics.parent;
411
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
412
+    this.parent = newStatistics.parent;
333 413
 
334 414
     queryType = queryType ? +queryType : undefined;
415
+    realQueryType = realQueryType ? +realQueryType : undefined;
335 416
     hosId = hosId ? +hosId : undefined;
336 417
     dutyId = dutyId ? +dutyId : undefined;
337 418
 
@@ -352,6 +433,35 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
352 433
       this.hosId = undefined;
353 434
       this.dutyId = undefined;
354 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
+      }
355 465
     }
356 466
   }
357 467
 
@@ -462,7 +572,8 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
462 572
 		this.sortCurrentValue = "descend";
463 573
 		this.sortCurrent = {totalCount: 'descend'};
464 574
     this.dateRange = []
465
-    this.deptId = undefined;
575
+    this.deptId = this.queryType == 5 ? this.deptId : undefined;
576
+    this.deptList = this.queryType == 5 ? this.deptList : undefined;
466 577
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, statisticsTypeId: undefined, taskTypeId: undefined, buildingId: undefined};
467 578
     this.customChangeDateComponent.resetByDate();
468 579
     setTimeout(_=>{
@@ -492,7 +603,7 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
492 603
 	}
493 604
 
494 605
 	// 获取所有科室
495
-	alldepart:any;
606
+	deptList:any[] = [];
496 607
 	getDeparts(dept?) {
497 608
 	  let data = {
498 609
 	    department: {
@@ -507,7 +618,7 @@ export class DepartmentQualityControlStatisticsComponent implements OnInit, Afte
507 618
 	    .getFetchDataList("data", "department", data)
508 619
 	    .subscribe((data) => {
509 620
 				this.isLoading = false;
510
-	      this.alldepart = data.list;
621
+	      this.deptList = data.list;
511 622
 	    });
512 623
 	}
513 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
 

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

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

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

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

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

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

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

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

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

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

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

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

+ 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();

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

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

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

@@ -49,7 +49,7 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
49 49
 
50 50
     }, 0)
51 51
   }
52
-	
52
+
53 53
 	// 数据下钻
54 54
 	viewDetail1(data, type){
55 55
 		let query = null
@@ -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,
@@ -105,7 +103,7 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
105 103
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
106 104
 		this.router.navigate([path], { replaceUrl: true });
107 105
 	}
108
-	
106
+
109 107
 	viewDetail2(data, type){
110 108
 		let query = null
111 109
 		if(type=='all'){
@@ -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,
@@ -164,7 +160,7 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
164 160
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
165 161
 		this.router.navigate([path], { replaceUrl: true });
166 162
 	}
167
-	
163
+
168 164
 	viewDetail3(data, type){
169 165
 		let query = null
170 166
 		if(type=='all'){
@@ -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,
@@ -229,7 +223,70 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
229 223
 		sessionStorage.setItem('distributionData', JSON.stringify(query))
230 224
 		this.router.navigate([path], { replaceUrl: true });
231 225
 	}
232
-	
226
+
227
+  viewDetail4(data, type){
228
+		let query = null
229
+		if(type=='all'){
230
+			query = {
231
+				startDate: this.customChangeDateComponent.startDate || undefined,
232
+				endDate: this.customChangeDateComponent.endDate || undefined,
233
+				statisticsTypeId: this.statisticsTypeId || undefined,
234
+        deptId: this.fieldConfig.fields.deptId || undefined,
235
+				searchQuery:{
236
+					statusValue: 'close',
237
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
238
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
239
+					groupId: this.fieldConfig.fields.groupId || undefined,
240
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
241
+					userId: this.fieldConfig.fields.userId || undefined,
242
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
243
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
244
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
245
+					emergencyTypeId: 300,
246
+					emergencyTypeDTO: {
247
+						"name": "是",
248
+						"id": 300
249
+					},
250
+				}
251
+			}
252
+		}else{
253
+			query = {
254
+				startDate: this.customChangeDateComponent.startDate || undefined,
255
+				endDate: this.customChangeDateComponent.endDate || undefined,
256
+				statisticsTypeId: this.statisticsTypeId || undefined,
257
+        deptId: this.fieldConfig.fields.deptId || undefined,
258
+				searchQuery:{
259
+					statusValue: 'close',
260
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
261
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
262
+					groupId: this.fieldConfig.fields.groupId || undefined,
263
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
264
+					userId: this.fieldConfig.fields.userId || undefined,
265
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
266
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
267
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
268
+					emergencyTypeId: 300,
269
+					emergencyTypeDTO: {
270
+						"name": "是",
271
+						"id": 300
272
+					},
273
+					timeFrameId: data.date || undefined,
274
+					timeFrameDTO:{
275
+						"name": data.date,
276
+						"id": data.date
277
+					}
278
+				}
279
+			}
280
+		}
281
+		let path = '/newStatistics/distributionInspectionStatistics/incidentList'
282
+		let flag = this.tabService.tabs.some(v => v.path === path);
283
+		flag && this.tabService.deleteRouteSnapshot(path);
284
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
285
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
286
+		sessionStorage.setItem('distributionData', JSON.stringify(query))
287
+		this.router.navigate([path], { replaceUrl: true });
288
+	}
289
+
233 290
   getQueryParams(){
234 291
     let queryParams = this.tabService.getQueryParams();
235 292
     this.tabService.clearQueryParams();
@@ -249,13 +306,16 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
249 306
   hosId:any;
250 307
   dutyId:any;
251 308
   parentDutyId:any;
252
-  initSessionData(){
309
+  async initSessionData(){
253 310
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
254 311
     let queryType:any = newStatistics.queryType;
312
+    let realQueryType:any = newStatistics.realQueryType;
255 313
     let hosId:any = newStatistics.hospitalId;
256 314
     let dutyId:any = newStatistics.dutyId;
315
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
257 316
 
258 317
     queryType = queryType ? +queryType : undefined;
318
+    realQueryType = realQueryType ? +realQueryType : undefined;
259 319
     hosId = hosId ? +hosId : undefined;
260 320
     dutyId = dutyId ? +dutyId : undefined;
261 321
 
@@ -276,6 +336,35 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
276 336
       this.hosId = undefined;
277 337
       this.dutyId = undefined;
278 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
+      }
279 368
     }
280 369
   }
281 370
 
@@ -385,7 +474,14 @@ export class HourQualityControlStatisticsComponent implements OnInit, AfterViewI
385 474
 		this.sortCurrent = {};
386 475
     this.dateRange = []
387 476
     this.statisticsTypeId = undefined;
388
-    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
+    };
389 485
     this.customChangeDateComponent.resetByDate();
390 486
     setTimeout(_=>{
391 487
     	this.search();

+ 2 - 1
src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.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.deptDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.taskTypeDTO || fieldConfig.fields.sourceDTO || fieldConfig.fields.minuteDTO || fieldConfig.fields.specialDTO || fieldConfig.fields.overtimeDTO || fieldConfig.fields.overtimeIdDTO || fieldConfig.fields.evaluateDTO || fieldConfig.fields.codeNumDTO || fieldConfig.fields.timeFrameDTO">
23
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.deptDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.taskTypeDTO || fieldConfig.fields.sourceDTO || fieldConfig.fields.minuteDTO || fieldConfig.fields.specialDTO || fieldConfig.fields.emergencyTypeDTO || fieldConfig.fields.overtimeDTO || fieldConfig.fields.overtimeIdDTO || fieldConfig.fields.evaluateDTO || fieldConfig.fields.codeNumDTO || fieldConfig.fields.timeFrameDTO">
24 24
 	<span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
25 25
 	<span>{{fieldConfig.fields.userDTO?.name}}</span>
26 26
 	<span>{{fieldConfig.fields.taskTypeDTO?.taskName}}</span>
@@ -34,6 +34,7 @@
34 34
 	<span>{{fieldConfig.fields.evaluateDTO?.name}}</span>
35 35
 	<span>{{fieldConfig.fields.codeNumDTO}}</span>
36 36
 	<span>{{fieldConfig.fields.timeFrameDTO?.name}}</span>
37
+	<span>{{fieldConfig.fields.emergencyTypeDTO?.name}}</span>
37 38
 </div>
38 39
 <nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px', x: '1600px'}">
39 40
   <thead>

+ 83 - 25
src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.ts

@@ -28,27 +28,25 @@ 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]);
41 37
     });
42 38
   }
43
-	
39
+
44 40
 	ngOnDestroy(){
45 41
 		console.log(12122121)
46 42
 		this.fieldConfig.fields = {}
47 43
 		sessionStorage.removeItem('distributionData')
48 44
 	}
49
-	
45
+
50 46
   ngAfterViewInit(){
51 47
     this.initSessionData();
48
+    // 数据下钻搜索
49
+		this.getRouteQuery()
52 50
     this.onResize(0);
53 51
   }
54 52
 
@@ -60,16 +58,16 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
60 58
 
61 59
     }, 0)
62 60
   }
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,21 +83,38 @@ 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
+
102 118
   getQueryParams(query){
103 119
     let queryParams = this.tabService.getQueryParams();
104 120
 		console.log(43434343,queryParams)
@@ -121,11 +137,11 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
121 137
   }
122 138
 
123 139
   get getMoreFilter(){
124
-    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || 
125
-		this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || 
126
-		this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO  || 
127
-		this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || 
128
-		this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
140
+    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO ||
141
+		this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO ||
142
+		this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO  ||
143
+		this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO ||
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
 
@@ -190,6 +238,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
190 238
 			sourceId: this.fieldConfig.fields.sourceId || undefined,
191 239
 			minutesClose: this.fieldConfig.fields.minuteClose || undefined,
192 240
 			specialCloseFlag: this.fieldConfig.fields.specialId,
241
+			emergencyType: this.fieldConfig.fields.emergencyTypeId,
193 242
 			// timeout: this.fieldConfig.fields.overtimeId,
194 243
 			// abnormityType: this.fieldConfig.fields.abnormalId,
195 244
 			workOrderEvaluationId: this.fieldConfig.fields.evaluateId || undefined,
@@ -248,6 +297,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
248 297
     	sourceId: this.fieldConfig.fields.sourceId || undefined,
249 298
     	minutesClose: this.fieldConfig.fields.minuteClose || undefined,
250 299
     	specialCloseFlag: this.fieldConfig.fields.specialId,
300
+    	emergencyType: this.fieldConfig.fields.emergencyTypeId,
251 301
     	// timeout: this.fieldConfig.fields.overtimeId,
252 302
     	// abnormityType: this.fieldConfig.fields.abnormalId,
253 303
     	workOrderEvaluationId: this.fieldConfig.fields.evaluateId || undefined,
@@ -286,7 +336,15 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
286 336
     this.dateRange = []
287 337
     this.statisticsTypeId = undefined;
288 338
 		this.gdStateId = undefined;
289
-    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
+    };
290 348
     this.customChangeDateComponent.resetByDate();
291 349
 		sessionStorage.removeItem('distributionData');
292 350
 		setTimeout(_=>{
@@ -301,7 +359,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
301 359
     this.isLoading = true;
302 360
     this.searchTimerSubject.next([fun, e]);
303 361
   }
304
-	
362
+
305 363
 	// 查看工单详情
306 364
 	coopData:any;
307 365
 	detailModalShow = false; //弹窗开关
@@ -327,7 +385,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
327 385
   getStatisticsTypeList() {
328 386
     this.isLoading = true;
329 387
     this.mainService
330
-      .getDictionary("list", "statistics_date_type")
388
+      .getDictionary("list", "statistics_date_type", true)
331 389
       .subscribe((data) => {
332 390
 				this.statisticsTypeList = []
333 391
         this.isLoading = false;
@@ -343,8 +401,8 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
343 401
 
344 402
   // 详细搜索
345 403
   fieldConfig:any = {
346
-		fields: { deptId: undefined, taskTypeId: undefined, sourceId: undefined, minuteId: undefined, specialId: undefined, overtimeId: undefined, abnormalId: undefined, evaluateId: undefined, codeNum: undefined, timeFrameId: undefined, groupId: undefined, userId: undefined, buildingId: undefined},
347
-		config: { dept: true, taskType: true, source: true, minute: true, special: true, overtime: true, abnormal: true, evaluate: true, code: true, timeFrame: true, groupAndUser: true, building: true},
404
+		fields: { deptId: undefined, taskTypeId: undefined, sourceId: undefined, minuteId: undefined, specialId: undefined, emergencyTypeId: undefined, overtimeId: undefined, abnormalId: undefined, evaluateId: undefined, codeNum: undefined, timeFrameId: undefined, groupId: undefined, userId: undefined, buildingId: undefined},
405
+		config: { dept: true, taskType: true, source: true, minute: true, special: true, emergencyType: true, overtime: true, abnormal: true, evaluate: true, code: true, timeFrame: true, groupAndUser: true, building: true},
348 406
   }
349 407
   showSearchMore:boolean = false;
350 408
   showMore(){

+ 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(_=>{

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

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

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

@@ -57,7 +57,7 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
57 57
 
58 58
     }, 0)
59 59
   }
60
-	
60
+
61 61
 	// 数据下钻
62 62
 	viewDetail1(data, type){
63 63
 		let query = null
@@ -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,
@@ -132,7 +130,7 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
132 130
 			  });
133 131
 		}
134 132
 	}
135
-	
133
+
136 134
 	viewDetail2(data, type){
137 135
 		let query = null
138 136
 		let item = null
@@ -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,
@@ -211,7 +207,7 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
211 207
 				});
212 208
 		}
213 209
 	}
214
-	
210
+
215 211
 	viewDetail3(data, type){
216 212
 		let query = null
217 213
 		let item = null
@@ -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,
@@ -296,7 +290,90 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
296 290
 				});
297 291
 		}
298 292
 	}
299
-	
293
+
294
+	viewDetail4(data, type){
295
+		let query = null
296
+		let item = null
297
+		if(this.taskTypeId){
298
+			item = this.taskTypeList.find(i => i.id == this.taskTypeId)
299
+		}
300
+		if(type=='all'){
301
+			query = {
302
+				startDate: this.customChangeDateComponent.startDate || undefined,
303
+				endDate: this.customChangeDateComponent.endDate || undefined,
304
+				taskTypeId: this.taskTypeId || undefined,
305
+        deptId: this.fieldConfig.fields.deptId || undefined,
306
+				searchQuery:{
307
+					statusValue: 'close',
308
+					taskTypeId: this.taskTypeId || undefined,
309
+					taskTypeDTO: item,
310
+					groupId: this.fieldConfig.fields.groupId || undefined,
311
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
312
+					userId: this.fieldConfig.fields.userId || undefined,
313
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
314
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
315
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
316
+					emergencyTypeId: 300,
317
+					emergencyTypeDTO: {
318
+						"name": "是",
319
+						"id": 300
320
+					},
321
+				}
322
+			}
323
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
324
+			let flag = this.tabService.tabs.some(v => v.path === path);
325
+			flag && this.tabService.deleteRouteSnapshot(path);
326
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
327
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
328
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
329
+			this.router.navigate([path], { replaceUrl: true });
330
+		}else{
331
+			let arr = data.taskName.split('-');
332
+			let postData = {
333
+			  idx: 0,
334
+			  sum: 10,
335
+			  taskType: {
336
+			    taskName: arr[arr.length-1],
337
+			  },
338
+			};
339
+			this.mainService
340
+				.getFetchDataList("configuration", "taskType", postData)
341
+				.subscribe((res) => {
342
+					if (res.status == 200) {
343
+						let item = res.list.find(i =>i.id == data.taskTypeId)
344
+						query = {
345
+							startDate: this.customChangeDateComponent.startDate || undefined,
346
+							endDate: this.customChangeDateComponent.endDate || undefined,
347
+              deptId: this.fieldConfig.fields.deptId || undefined,
348
+							searchQuery:{
349
+								statusValue: 'close',
350
+								taskTypeId: data.taskTypeId || undefined,
351
+								taskTypeDTO: item,
352
+								groupId: this.fieldConfig.fields.groupId || undefined,
353
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
354
+								userId: this.fieldConfig.fields.userId || undefined,
355
+								userDTO: this.fieldConfig.fields.userDTO || undefined,
356
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
357
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
358
+								emergencyTypeId: 300,
359
+								emergencyTypeDTO: {
360
+									"name": "是",
361
+									"id": 300
362
+								},
363
+							}
364
+						}
365
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
366
+						let flag = this.tabService.tabs.some(v => v.path === path);
367
+						flag && this.tabService.deleteRouteSnapshot(path);
368
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
369
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
370
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
371
+						this.router.navigate([path], { replaceUrl: true });
372
+					}
373
+				});
374
+		}
375
+	}
376
+
300 377
   getQueryParams(){
301 378
     let queryParams = this.tabService.getQueryParams();
302 379
     this.tabService.clearQueryParams();
@@ -316,13 +393,16 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
316 393
   hosId:any;
317 394
   dutyId:any;
318 395
   parentDutyId:any;
319
-  initSessionData(){
396
+  async initSessionData(){
320 397
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
321 398
     let queryType:any = newStatistics.queryType;
399
+    let realQueryType:any = newStatistics.realQueryType;
322 400
     let hosId:any = newStatistics.hospitalId;
323 401
     let dutyId:any = newStatistics.dutyId;
402
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
324 403
 
325 404
     queryType = queryType ? +queryType : undefined;
405
+    realQueryType = realQueryType ? +realQueryType : undefined;
326 406
     hosId = hosId ? +hosId : undefined;
327 407
     dutyId = dutyId ? +dutyId : undefined;
328 408
 
@@ -343,6 +423,35 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
343 423
       this.hosId = undefined;
344 424
       this.dutyId = undefined;
345 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
+      }
346 455
     }
347 456
   }
348 457
 
@@ -450,7 +559,13 @@ export class TaskTypeQualityControlStatisticsComponent implements OnInit, AfterV
450 559
 		this.sortCurrent = {};
451 560
     this.dateRange = []
452 561
     this.taskTypeId = undefined;
453
-    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
+    };
454 569
     this.customChangeDateComponent.resetByDate();
455 570
     setTimeout(_=>{
456 571
     	this.search();

+ 40 - 3
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
 
@@ -114,7 +146,7 @@ export class UserBusinessStatisticsComponent implements OnInit, AfterViewInit {
114 146
   loading1 = false;
115 147
   dictionaryList: any[] = [];
116 148
   getList(num?: number, field?: string, sort?: string) {
117
-    this.mainService.getDictionary('list', 'statistics_date_type').subscribe((data) => {
149
+    this.mainService.getDictionary('list', 'statistics_date_type', true).subscribe((data) => {
118 150
       let dictionaryList = data || [];
119 151
       dictionaryList = cloneDeep(dictionaryList);
120 152
       let flag = dictionaryList.some((item) => item.value === 'dateOther');
@@ -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();

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

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

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

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

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

@@ -4,7 +4,7 @@ import { Subject } from 'rxjs';
4 4
 import { NzMessageService } from 'ng-zorro-antd/message';
5 5
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
6 6
 import { MainService } from 'src/app/services/main.service';
7
-import { ActivatedRoute } from '@angular/router';
7
+import { ActivatedRoute, Router } from '@angular/router';
8 8
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
9 9
 @Component({
10 10
   selector: "app-user-quality-control-statistics",
@@ -18,6 +18,7 @@ export class UserQualityControlStatisticsComponent implements OnInit, AfterViewI
18 18
     private message: NzMessageService,
19 19
     private route: ActivatedRoute,
20 20
     private tabService: TabService,
21
+    private router: Router,
21 22
   ) {}
22 23
 
23 24
   listOfData: any[] = []; //表格数据
@@ -55,6 +56,90 @@ export class UserQualityControlStatisticsComponent implements OnInit, AfterViewI
55 56
     }, 0)
56 57
   }
57 58
 
59
+  viewDetail4(data, type){
60
+		let query = null
61
+		let item = null
62
+		if(this.userId){
63
+			item = this.userList.find(i => i.id == this.userId)
64
+		}
65
+		if(type=='all'){
66
+			query = {
67
+				startDate: this.customChangeDateComponent.startDate || undefined,
68
+				endDate: this.customChangeDateComponent.endDate || undefined,
69
+				statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
70
+        deptId: this.fieldConfig.fields.deptId || undefined,
71
+				searchQuery:{
72
+					statusValue: 'close',
73
+					taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
74
+					taskTypeDTO: this.fieldConfig.fields.taskTypeDTO || undefined,
75
+					groupId: this.fieldConfig.fields.groupId || undefined,
76
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
77
+					userId: this.userId || undefined,
78
+					userDTO: item || undefined,
79
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
80
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
81
+					emergencyTypeId: 300,
82
+					emergencyTypeDTO: {
83
+						"name": "是",
84
+						"id": 300
85
+					},
86
+				}
87
+			}
88
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
89
+			let flag = this.tabService.tabs.some(v => v.path === path);
90
+			flag && this.tabService.deleteRouteSnapshot(path);
91
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
92
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
93
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
94
+			this.router.navigate([path], { replaceUrl: true });
95
+		}else{
96
+			let arr = data.name.split('(')
97
+			let postData: any = {
98
+			  idx: 0,
99
+			  sum: 20,
100
+			  department: {
101
+			    dept: arr[0],
102
+			    searchType: 1,
103
+			  },
104
+			};
105
+			this.mainService.getFetchDataList("simple/data", "department", postData)
106
+				.subscribe((res) => {
107
+					if (res.status == 200) {
108
+						let item = res.list.find(i =>i.id == data.deptId)
109
+						query = {
110
+							startDate: this.customChangeDateComponent.startDate || undefined,
111
+							endDate: this.customChangeDateComponent.endDate || undefined,
112
+							statisticsTypeId: this.fieldConfig.fields.statisticsTypeId,
113
+              deptId: this.fieldConfig.fields.deptId || undefined,
114
+							searchQuery:{
115
+								statusValue: 'close',
116
+								taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
117
+								taskTypeDTO: this.fieldConfig.fields.taskTypeDTO,
118
+								groupId: this.fieldConfig.fields.groupId || undefined,
119
+								groupDTO: this.fieldConfig.fields.groupDTO || undefined,
120
+								userId: data.userId || undefined,
121
+								userDTO: item || undefined,
122
+								buildingId: this.fieldConfig.fields.buildingId || undefined,
123
+								buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
124
+								emergencyTypeId: 300,
125
+								emergencyTypeDTO: {
126
+									"name": "是",
127
+									"id": 300
128
+								},
129
+							}
130
+						}
131
+						let path = '/newStatistics/distributionInspectionStatistics/incidentList'
132
+						let flag = this.tabService.tabs.some(v => v.path === path);
133
+						flag && this.tabService.deleteRouteSnapshot(path);
134
+						this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
135
+						this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
136
+						sessionStorage.setItem('distributionData', JSON.stringify(query))
137
+						this.router.navigate([path], { replaceUrl: true });
138
+					}
139
+				});
140
+		}
141
+	}
142
+
58 143
   getQueryParams(){
59 144
     let queryParams = this.tabService.getQueryParams();
60 145
     this.tabService.clearQueryParams();
@@ -74,13 +159,16 @@ export class UserQualityControlStatisticsComponent implements OnInit, AfterViewI
74 159
   hosId:any;
75 160
   dutyId:any;
76 161
   parentDutyId:any;
77
-  initSessionData(){
162
+  async initSessionData(){
78 163
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
79 164
     let queryType:any = newStatistics.queryType;
165
+    let realQueryType:any = newStatistics.realQueryType;
80 166
     let hosId:any = newStatistics.hospitalId;
81 167
     let dutyId:any = newStatistics.dutyId;
168
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
82 169
 
83 170
     queryType = queryType ? +queryType : undefined;
171
+    realQueryType = realQueryType ? +realQueryType : undefined;
84 172
     hosId = hosId ? +hosId : undefined;
85 173
     dutyId = dutyId ? +dutyId : undefined;
86 174
 
@@ -101,6 +189,35 @@ export class UserQualityControlStatisticsComponent implements OnInit, AfterViewI
101 189
       this.hosId = undefined;
102 190
       this.dutyId = undefined;
103 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
+      }
104 221
     }
105 222
   }
106 223
 
@@ -206,7 +323,12 @@ export class UserQualityControlStatisticsComponent implements OnInit, AfterViewI
206 323
 		this.sortCurrent = {totalGrade: 'descend'};
207 324
     this.dateRange = []
208 325
     this.userId = undefined;
209
-    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
+    };
210 332
     this.customChangeDateComponent.resetByDate();
211 333
     setTimeout(_=>{
212 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(){

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

+ 82 - 52
src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.ts

@@ -33,31 +33,22 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
33 33
   searchTimerSubject = new Subject();
34 34
 	dateData1:any;
35 35
 	dateData2:any;
36
-	
37
-  ngOnInit() {
38
-		// 数据下钻搜索
39
-		this.getRouteQuery()
40
-		// this.router.events
41
-		//   .pipe(filter(event => event instanceof NavigationEnd))
42
-		//   .subscribe((event: NavigationEnd) => {
43
-		//     if(event.urlAfterRedirects=='/newStatistics/maintenanceStatistics/incidentList'){
44
-		// 			console.log('维修=================')
45
-		// 			this.getRouteQuery()
46
-		//     }
47
-		//   });
48 36
 
37
+  ngOnInit() {
49 38
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
50 39
       let fun = v[0];
51 40
       fun.call(this, v[1]);
52 41
     });
53 42
   }
54
-	
43
+
55 44
 	ngOnDestroy(){
56 45
 		sessionStorage.removeItem('maintenanceData')
57 46
 	}
58
-	
47
+
59 48
   ngAfterViewInit(){
60 49
     this.initSessionData();
50
+    // 数据下钻搜索
51
+		this.getRouteQuery()
61 52
     this.onResize(0);
62 53
   }
63 54
 
@@ -68,37 +59,42 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
68 59
 			this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - height - this.getMoreFilter + 14;
69 60
     }, 0)
70 61
   }
71
-	
62
+
72 63
 	goingType:boolean = false;
73
-	getRouteQuery(){
64
+	async getRouteQuery(){
74 65
 		let data = sessionStorage.getItem('maintenanceData')
75 66
 		let query = null
76 67
 		if(data){
77 68
 			query = JSON.parse(data)
78 69
 			console.log('query==========',query)
79
-			setTimeout(_=>{
80
-				if(query.repairDeptId){
81
-					this.getRepairDeptList();
82
-					this.repairDeptId = query.repairDeptId
83
-				}else{
84
-					this.repairDeptId = undefined
85
-				}
86
-				if(query.searchQuery){
87
-					this.goingType = true
88
-					this.fieldConfig.fields = query.searchQuery
89
-				}else{
90
-					this.goingType = false
91
-					this.fieldConfig.fields = {}
92
-				}
93
-				this.getQueryParams();
94
-			},50)
70
+      if(query.repairDeptId){
71
+        this.repairDeptId = query.repairDeptId
72
+        let postData = {
73
+          department: {
74
+            id: query.repairDeptId,
75
+            searchType: 1,
76
+          },
77
+          idx: 0,
78
+          sum: 1,
79
+        };
80
+        let result:any = await this.mainService.getFetchDataList("data", "department", postData).toPromise();
81
+        this.repairDeptList = result.list || [];
82
+      }else{
83
+        this.repairDeptId = undefined
84
+      }
85
+      if(query.searchQuery){
86
+        this.goingType = true
87
+        this.fieldConfig.fields = query.searchQuery
88
+      }else{
89
+        this.goingType = false
90
+        this.fieldConfig.fields = {}
91
+      }
92
+      this.getQueryParams();
95 93
 		}else{
96
-			setTimeout(_=>{
97
-				this.getQueryParams();
98
-			},50)
94
+      this.getQueryParams();
99 95
 		}
100 96
 	}
101
-	
97
+
102 98
   getQueryParams(){
103 99
     let queryParams = this.tabService.getQueryParams();
104 100
     this.tabService.clearQueryParams();
@@ -114,10 +110,10 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
114 110
   }
115 111
 
116 112
   get getMoreFilter(){
117
-    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || 
118
-		this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || 
119
-		this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO  || 
120
-		this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || 
113
+    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO ||
114
+		this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO ||
115
+		this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO  ||
116
+		this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO ||
121 117
 		this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
122 118
     return flag ? 37 : 0;
123 119
   }
@@ -127,13 +123,16 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
127 123
   hosId:any;
128 124
   dutyId:any;
129 125
   parentDutyId:any;
130
-  initSessionData(){
126
+  async initSessionData(){
131 127
     let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
132 128
     let queryType:any = newStatistics.queryType;
129
+    let realQueryType:any = newStatistics.realQueryType;
133 130
     let hosId:any = newStatistics.hospitalId;
134 131
     let dutyId:any = newStatistics.dutyId;
132
+    let currentDeptDTO:any = newStatistics.currentDeptDTO;
135 133
 
136 134
     queryType = queryType ? +queryType : undefined;
135
+    realQueryType = realQueryType ? +realQueryType : undefined;
137 136
     hosId = hosId ? +hosId : undefined;
138 137
     dutyId = dutyId ? +dutyId : undefined;
139 138
 
@@ -154,6 +153,35 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
154 153
       this.hosId = undefined;
155 154
       this.dutyId = undefined;
156 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
+      }
157 185
     }
158 186
   }
159 187
 
@@ -194,15 +222,16 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
194 222
 			wxDegreeId: this.fieldConfig.fields.evaluateId,
195 223
 			statusValue: this.fieldConfig.fields.statusValue || undefined,
196 224
 			deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
225
+			priorityId: this.fieldConfig.fields.priorityId || undefined,
197 226
     };
198
-		
227
+
199 228
 		if(this.fieldConfig.fields.workHourParentId && this.fieldConfig.fields.workHourSmallId){
200 229
 			postData.workHourId = this.fieldConfig.fields.workHourSmallId
201 230
 		}
202 231
 		if(this.fieldConfig.fields.workHourParentId && !this.fieldConfig.fields.workHourSmallId){
203 232
 			postData.workHourId = this.fieldConfig.fields.workHourParentId
204 233
 		}
205
-		
234
+
206 235
     this.loading1 = true;
207 236
     this.mainService
208 237
       .postCustom("itsm/report", "incidentWorkOrderList", postData)
@@ -264,9 +293,10 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
264 293
     	incidentSign: this.fieldConfig.fields.codeNum,
265 294
 			wxDegreeId: this.fieldConfig.fields.evaluateId,
266 295
 			statusValue: this.fieldConfig.fields.statusValue || undefined,
267
-			deptTypeId: this.fieldConfig.fields.deptTypeId || undefined
296
+			deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
297
+			priorityId: this.fieldConfig.fields.priorityId || undefined,
268 298
     };
269
-    
299
+
270 300
     if(this.fieldConfig.fields.workHourParentId && this.fieldConfig.fields.workHourSmallId){
271 301
     	postData.workHourId = this.fieldConfig.fields.workHourSmallId
272 302
     }
@@ -304,7 +334,8 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
304 334
     this.dateRange = []
305 335
 		this.dateData1 = null;
306 336
 		this.dateData2 = null;
307
-    this.repairDeptId = undefined;
337
+    this.repairDeptId = this.queryType == 5 ? this.repairDeptId : undefined;
338
+    this.repairDeptList = this.queryType == 5 ? this.repairDeptList : [];
308 339
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined};
309 340
     this.customChangeDateComponent.resetByDate();
310 341
 		sessionStorage.removeItem('maintenanceData');
@@ -325,7 +356,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
325 356
     this.isLoading = true;
326 357
     this.searchTimerSubject.next([fun, e]);
327 358
   }
328
-	
359
+
329 360
 	// 查看工单详情
330 361
 	coopData:any;
331 362
 	detailModalShow = false; //弹窗开关
@@ -342,7 +373,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
342 373
 	  this.detailModalShow = false;
343 374
 	  this.getList();
344 375
 	}
345
-	
376
+
346 377
   openChangeRepairDept(flag){
347 378
     flag && this.getRepairDeptList();
348 379
   }
@@ -370,10 +401,9 @@ export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
370 401
 
371 402
   // 详细搜索
372 403
   fieldConfig:any = {
373
-    fields: {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: 
374
-		undefined,buildingId: undefined, floorId: undefined, companyId: undefined, 
375
-		workHourParentId: undefined, workHourSmallId: undefined, evaluateId: undefined, repairUserId: undefined, consumableId: undefined, isHangId: undefined, codeNum: undefined, overtimeId: undefined, deptTypeId: undefined},
376
-    config: {groupAndUser: true, category123: true, source: true, buildingAndFloor: true, company: true, workHourParent: true, workHourSmall: true, evaluate: true, repairUser: true, consumable: true, isHang: true, code: true, overtime: true, deptType: true},
404
+    fields: {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined,buildingId: undefined, floorId: undefined, companyId: undefined,
405
+		workHourParentId: undefined, workHourSmallId: undefined, evaluateId: undefined, repairUserId: undefined, consumableId: undefined, isHangId: undefined, codeNum: undefined, overtimeId: undefined, deptTypeId: undefined, priorityId: undefined,},
406
+    config: {groupAndUser: true, category123: true, source: true, buildingAndFloor: true, company: true, workHourParent: true, workHourSmall: true, evaluate: true, repairUser: true, consumable: true, isHang: true, code: true, overtime: true, deptType: true, priority: true},
377 407
   }
378 408
   showSearchMore:boolean = false;
379 409
   showMore(){

+ 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');

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


部分文件因为文件数量过多而无法显示