Browse Source

解决冲突代码

seimin 1 month ago
parent
commit
1fdcf3ecb8
100 changed files with 6738 additions and 486 deletions
  1. 16 0
      src/app/components/configurationCenter/configuration-drug/configuration-drug.component.html
  2. 32 6
      src/app/components/configurationCenter/configuration-drug/configuration-drug.component.ts
  3. 3 3
      src/app/components/configurationCenter/configuration-manHour/configuration-manHour.component.html
  4. 69 0
      src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.html
  5. 137 4
      src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.ts
  6. 5 2
      src/app/components/order-scope/order-scope.component.ts
  7. 1 0
      src/app/services/tool.service.ts
  8. 5 1
      src/app/share/businessData-detail-info-modal/businessData-detail-info-modal.component.html
  9. 7 9
      src/app/share/businessData-detail-modal/businessData-detail-modal.component.html
  10. 15 5
      src/app/share/businessData-detail-modal/businessData-detail-modal.component.less
  11. 8 4
      src/app/views/appraise-management/appraise-management.component.html
  12. 13 5
      src/app/views/appraise-management/appraise-management.component.ts
  13. 8 1
      src/app/views/building-floor/building-floor.component.html
  14. 3 0
      src/app/views/building-floor/building-floor.component.less
  15. 18 3
      src/app/views/fuwutai/fuwutai.component.html
  16. 375 23
      src/app/views/fuwutai/fuwutai.component.ts
  17. 8 4
      src/app/views/home/home.component.html
  18. 7 1
      src/app/views/home/home.component.less
  19. 1 1
      src/app/views/incident-management/incident-management.component.html
  20. 2 2
      src/app/views/jp-search/jp-search.component.html
  21. 4 4
      src/app/views/jp-search/jp-search.component.ts
  22. 5 0
      src/app/views/main/main-routing.module.ts
  23. 34 8
      src/app/views/new-statistics/components/custom-change-date/custom-change-date.component.ts
  24. 23 23
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.html
  25. 8 3
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.less
  26. 64 23
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.ts
  27. 22 22
      src/app/views/new-statistics/components/search-more/search-more.component.html
  28. 8 3
      src/app/views/new-statistics/components/search-more/search-more.component.less
  29. 48 10
      src/app/views/new-statistics/components/search-more/search-more.component.ts
  30. 6 6
      src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.html
  31. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.less
  32. 159 3
      src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.ts
  33. 4 4
      src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.html
  34. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.less
  35. 121 9
      src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.ts
  36. 6 6
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.html
  37. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.less
  38. 192 3
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.ts
  39. 4 4
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.html
  40. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.less
  41. 152 8
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.ts
  42. 6 6
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.html
  43. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.less
  44. 249 3
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.ts
  45. 12 12
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.html
  46. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.less
  47. 543 4
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.ts
  48. 8 8
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.html
  49. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.less
  50. 350 3
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.ts
  51. 2 2
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-inspection-statistics-routing.module.ts
  52. 4 4
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.html
  53. 7 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.less
  54. 103 2
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.ts
  55. 3 1
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-user-evaluate-statistics/distribution-user-evaluate-statistics.component.ts
  56. 6 6
      src/app/views/new-statistics/distribution-inspection-statistics/hour-quality-control-statistics/hour-quality-control-statistics.component.html
  57. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/hour-quality-control-statistics/hour-quality-control-statistics.component.less
  58. 186 3
      src/app/views/new-statistics/distribution-inspection-statistics/hour-quality-control-statistics/hour-quality-control-statistics.component.ts
  59. 13 7
      src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.html
  60. 107 36
      src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.ts
  61. 3 1
      src/app/views/new-statistics/distribution-inspection-statistics/source-statistics/source-statistics.component.ts
  62. 6 6
      src/app/views/new-statistics/distribution-inspection-statistics/taskType-quality-control-statistics/taskType-quality-control-statistics.component.html
  63. 4 0
      src/app/views/new-statistics/distribution-inspection-statistics/taskType-quality-control-statistics/taskType-quality-control-statistics.component.less
  64. 245 3
      src/app/views/new-statistics/distribution-inspection-statistics/taskType-quality-control-statistics/taskType-quality-control-statistics.component.ts
  65. 3 1
      src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.component.ts
  66. 3 1
      src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.component.ts
  67. 3 1
      src/app/views/new-statistics/maintenance-statistics/building-statistics/building-statistics.component.ts
  68. 8 8
      src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.html
  69. 4 0
      src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.less
  70. 314 3
      src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.ts
  71. 3 1
      src/app/views/new-statistics/maintenance-statistics/category-source-statistics/category-source-statistics.component.ts
  72. 8 8
      src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.html
  73. 4 0
      src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.less
  74. 763 3
      src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.ts
  75. 8 8
      src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.html
  76. 4 0
      src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.less
  77. 532 3
      src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.ts
  78. 4 1
      src/app/views/new-statistics/maintenance-statistics/consumable-statistics/consumable-statistics.component.ts
  79. 12 12
      src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.html
  80. 4 0
      src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.less
  81. 463 2
      src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.ts
  82. 8 8
      src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.html
  83. 4 0
      src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.less
  84. 302 2
      src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.ts
  85. 3 1
      src/app/views/new-statistics/maintenance-statistics/department-source-statistics/department-source-statistics.component.ts
  86. 3 1
      src/app/views/new-statistics/maintenance-statistics/floor-statistics/floor-statistics.component.ts
  87. 8 8
      src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.html
  88. 4 0
      src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.less
  89. 265 2
      src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.ts
  90. 19 11
      src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.html
  91. 64 37
      src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.ts
  92. 8 8
      src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.html
  93. 4 0
      src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.less
  94. 287 3
      src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.ts
  95. 7 7
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.html
  96. 7 1
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.less
  97. 115 21
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.ts
  98. 4 4
      src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.html
  99. 4 0
      src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.less
  100. 0 0
      src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.ts

+ 16 - 0
src/app/components/configurationCenter/configuration-drug/configuration-drug.component.html

@@ -82,6 +82,11 @@
82 82
                         <nz-option *ngFor="let item of drugsManualList" [nzLabel]="item.label" [nzValue]="item.value"></nz-option>
83 83
                       </nz-select>
84 84
                     </div>
85
+										<!-- 支持拍照留存 -->
86
+										<div class="display_flex align-items_center mb8">
87
+										  <nz-form-label class="label">支持拍照留存</nz-form-label>
88
+										  <nz-checkbox-group [(ngModel)]="item.postData.drugsEndPhoto"></nz-checkbox-group>
89
+										</div>
85 90
                   </ng-container>
86 91
 									<!-- 药单显示患者 -->
87 92
 									<div class="display_flex align-items_center mb8">
@@ -102,6 +107,17 @@
102 107
                 <!-- 自动建单配置 -->
103 108
                 <div *ngIf="tabModalName=='automaticOrderCreation'">
104 109
                   <!-- 自动建单 -->
110
+									<div class="display_flex align-items_center mb8">
111
+									  <nz-form-label class="label">是否自动建单</nz-form-label>
112
+									  <nz-checkbox-group [(ngModel)]="item.postData.autoCreate"></nz-checkbox-group>
113
+									</div>
114
+									<!-- 药品自动建单状态 -->
115
+									<div class="display_flex align-items_center mb8" *ngIf="item.postData.autoCreate[0].checked">
116
+									  <nz-form-label class="label">药品自动建单状态</nz-form-label>
117
+										<nz-select class="w320px" nzPlaceHolder="请选择" [(ngModel)]="item.postData.autoCreateState" nzAllowClear>
118
+										  <nz-option *ngFor="let item of drugStateData" [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
119
+										</nz-select>
120
+									</div>
105 121
                 </div>
106 122
                 <div class="bottom">
107 123
                   <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>

+ 32 - 6
src/app/components/configurationCenter/configuration-drug/configuration-drug.component.ts

@@ -32,6 +32,7 @@ export class ConfigurationDrugComponent implements OnInit {
32 32
   ngOnInit():void {
33 33
     this.activeDictionary = this.dictionaryKeyList[0];
34 34
     this.init();
35
+		this.getDrugState();
35 36
   }
36 37
 
37 38
   // 工单模式
@@ -63,7 +64,9 @@ export class ConfigurationDrugComponent implements OnInit {
63 64
         drugsEndPhoto: [{ label:'是否开启', value: 0 }],//终点科室支持拍照留存
64 65
 				showDrugsBagTypeCount: [{ label:'是否开启', value: 0 }],//是否显示药品数、种类数
65 66
 				showDrugsBagDetails: [{ label:'是否开启', value: 0 }],//是否支持查看药品详情信息
66
-      }
67
+				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
68
+				autoCreateState: undefined // 药品自动建单状态
69
+			}
67 70
     },
68 71
     {
69 72
       name: '西药',
@@ -83,7 +86,9 @@ export class ConfigurationDrugComponent implements OnInit {
83 86
         drugsEndPhoto: [{ label:'是否开启', value: 0 }],//终点科室支持拍照留存
84 87
         showDrugsBagTypeCount: [{ label:'是否开启', value: 0 }],//是否显示药品数、种类数
85 88
 				showDrugsBagDetails: [{ label:'是否开启', value: 0 }],//是否支持查看药品详情信息
86
-      }
89
+				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
90
+				autoCreateState: undefined // 药品自动建单状态
91
+			}
87 92
     },
88 93
     {
89 94
       name: '退药',
@@ -103,7 +108,9 @@ export class ConfigurationDrugComponent implements OnInit {
103 108
         drugsEndPhoto: [{ label:'是否开启', value: 0 }],//终点科室支持拍照留存
104 109
         showDrugsBagTypeCount: [{ label:'是否开启', value: 0 }],//是否显示药品数、种类数
105 110
 				showDrugsBagDetails: [{ label:'是否开启', value: 0 }],//是否支持查看药品详情信息
106
-      }
111
+				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
112
+				autoCreateState: undefined // 药品自动建单状态
113
+			}
107 114
     },
108 115
     {
109 116
       name: '毒麻',
@@ -123,7 +130,9 @@ export class ConfigurationDrugComponent implements OnInit {
123 130
         drugsEndPhoto: [{ label:'是否开启', value: 0 }],//终点科室支持拍照留存
124 131
         showDrugsBagTypeCount: [{ label:'是否开启', value: 0 }],//是否显示药品数、种类数
125 132
 				showDrugsBagDetails: [{ label:'是否开启', value: 0 }],//是否支持查看药品详情信息
126
-      }
133
+				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
134
+				autoCreateState: undefined // 药品自动建单状态
135
+			}
127 136
     },
128 137
     {
129 138
       name: '中草药',
@@ -143,10 +152,21 @@ export class ConfigurationDrugComponent implements OnInit {
143 152
         drugsEndPhoto: [{ label:'是否开启', value: 0 }],//终点科室支持拍照留存
144 153
         showDrugsBagTypeCount: [{ label:'是否开启', value: 0 }],//是否显示药品数、种类数
145 154
 				showDrugsBagDetails: [{ label:'是否开启', value: 0 }],//是否支持查看药品详情信息
146
-      }
155
+				autoCreate: [{ label:'是否开启', value: 0 }], // 是否自动建单
156
+				autoCreateState: undefined // 药品自动建单状态
157
+			}
147 158
     },
148 159
   ];
149
-
160
+	
161
+	
162
+	// 获取药品状态
163
+	drugStateData:any = []
164
+	getDrugState(){
165
+		this.mainService.getDictionary("list", "drug_state").subscribe((data) => {
166
+			this.drugStateData = data
167
+		});
168
+	}
169
+	
150 170
   // 点击数据字典key
151 171
   activeDictionary:any;
152 172
   clickDictionaryKey(item){
@@ -218,6 +238,10 @@ export class ConfigurationDrugComponent implements OnInit {
218 238
 			showPatientInfo: this.activeDictionary.postData.showPatientInfo[0].checked ? 1 : 0,
219 239
 			showDrugsBagTypeCount: this.activeDictionary.postData.showDrugsBagTypeCount[0].checked ? 1 : 0,
220 240
 			showDrugsBagDetails: this.activeDictionary.postData.showDrugsBagDetails[0].checked ? 1 : 0,
241
+			autoCreate: this.activeDictionary.postData.autoCreate[0].checked ? 1 : 0,
242
+			autoCreateState:{
243
+				id:this.activeDictionary.postData.autoCreateState || undefined
244
+			}
221 245
 		};
222 246
     this.btnLoading = true;
223 247
     this.mainService
@@ -315,6 +339,8 @@ export class ConfigurationDrugComponent implements OnInit {
315 339
 					this.activeDictionary.postData.showPatientInfo[0].checked = this.configs.showPatientInfo == 1;
316 340
 					this.activeDictionary.postData.showDrugsBagTypeCount[0].checked = this.configs.showDrugsBagTypeCount == 1;
317 341
 					this.activeDictionary.postData.showDrugsBagDetails[0].checked = this.configs.showDrugsBagDetails == 1;
342
+					this.activeDictionary.postData.autoCreate[0].checked = this.configs.autoCreate == 1;
343
+					this.activeDictionary.postData.autoCreateState = this.configs.autoCreateState && this.configs.autoCreateState.id || undefined;
318 344
 				}
319 345
       });
320 346
   }

+ 3 - 3
src/app/components/configurationCenter/configuration-manHour/configuration-manHour.component.html

@@ -13,7 +13,7 @@
13 13
 			</div>
14 14
       <overlay-scrollbars #osComponentRef1 class="contentBody">
15 15
         <nz-spin nzSimple [nzSpinning]="categoryLoading1" class="mt8 text_align_center"></nz-spin>
16
-        <div [hidden]="categoryLoading1" class="contentItem" [title]="item.workName" [ngClass]="{ active: item.id === activeCategory1.id }" (click)="clickCategory(item, 1)" *ngFor="let item of categoryList1">{{ item.workName }} - {{item.workUnit}} - {{item.wage}}元 - {{item.integral.value}}分 - {{item.disableType==0?'停用':'启用'}}</div>
16
+        <div [hidden]="categoryLoading1" class="contentItem" [title]="item.workName" [ngClass]="{ active: item.id === activeCategory1.id }" (click)="clickCategory(item, 1)" *ngFor="let item of categoryList1">{{ item.workName }} - {{item.workUnit}} - {{item.wage}}元 - {{item.integral?item.integral.value:''}}分 - {{item.disableType==0?'停用':'启用'}}</div>
17 17
       </overlay-scrollbars>
18 18
     </div>
19 19
     <div class="address">
@@ -28,7 +28,7 @@
28 28
 			</div>
29 29
       <overlay-scrollbars #osComponentRef2 class="contentBody">
30 30
         <nz-spin nzSimple [nzSpinning]="categoryLoading2" class="mt8 text_align_center"></nz-spin>
31
-        <div [hidden]="categoryLoading2" class="contentItem" [title]="item.workName" [ngClass]="{ active: item.id === activeCategory2.id }" (click)="clickCategory(item, 2)" *ngFor="let item of categoryList2">{{ item.workName }} - {{item.workUnit}} - {{item.wage}}元 - {{item.integral.value}}分 - {{item.disableType==0?'停用':'启用'}}</div>
31
+        <div [hidden]="categoryLoading2" class="contentItem" [title]="item.workName" [ngClass]="{ active: item.id === activeCategory2.id }" (click)="clickCategory(item, 2)" *ngFor="let item of categoryList2">{{ item.workName }} - {{item.workUnit}} - {{item.wage}}元 - {{item.integral?item.integral.value:''}}分 - {{item.disableType==0?'停用':'启用'}}</div>
32 32
       </overlay-scrollbars>
33 33
     </div>
34 34
   </div>
@@ -155,7 +155,7 @@
155 155
 	            	<td>{{ data.operationType ? data.operationType.name : '-' }}</td>
156 156
 	            	<td>{{ data.operationTime|date:'yyyy-MM-dd HH:mm'}}</td>
157 157
 	            	<td>{{ data.operationUserDTO ? data.operationUserDTO.name : '-' }}</td>
158
-	            	<td>{{ data.logRemark ? data.logRemark : '-' }} <span *ngIf="data.operationType.value==6">单价:{{ data.currentPrice }} &nbsp;&nbsp;积分:{{ data.currentScore.value }}</span></td>
158
+	            	<td>{{ data.logRemark ? data.logRemark : '-' }} <span *ngIf="data.operationType.value==6">单价:{{ data.currentPrice }} &nbsp;&nbsp;积分:{{ data.currentScore?data.currentScore.value:'' }}</span></td>
159 159
 	            </tr>
160 160
 	          </tbody>
161 161
 	        </nz-table>

+ 69 - 0
src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.html

@@ -85,6 +85,75 @@
85 85
                   <nz-form-label class="label">默认扫描标本进入标本扫描页</nz-form-label>
86 86
                   <nz-checkbox-group [(ngModel)]="defaultScanSpe"></nz-checkbox-group>
87 87
                 </div>
88
+								
89
+								<!-- 是否开通收取限制 -->
90
+								<div class="display_flex align-items_center mb8">
91
+								  <nz-form-label class="label">是否开通收取限制</nz-form-label>
92
+								  <nz-checkbox-group [(ngModel)]="speCollectLimit" (ngModelChange)="changeSpeCollect($event)"></nz-checkbox-group>
93
+								</div>
94
+								
95
+								<!-- 是否支持非起点科室收取 -->
96
+								<div class="display_flex align-items_center mb8" *ngIf="speCollectLimit[0].checked">
97
+								  <nz-form-label class="label">是否支持非起点科室收取</nz-form-label>
98
+								  <nz-checkbox-group [(ngModel)]="speCollectSupportNotStartDept"></nz-checkbox-group>
99
+								</div>
100
+								
101
+								<!-- 限制标本状态收取 -->
102
+								<div class="display_flex align-items_center mb8" *ngIf="speCollectLimit[0].checked">
103
+									<nz-form-label class="label">限制标本状态收取</nz-form-label>
104
+									<nz-select class="formItem" nzMode="multiple" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzAllowClear nzPlaceHolder="请选择限制标本状态收取" [(ngModel)]="speCollectLimitState">
105
+										<ng-container *ngFor="let option of specimenStateData">
106
+											<nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
107
+										</ng-container>
108
+									</nz-select>
109
+								</div>
110
+								
111
+								<!-- 限制终点科室收取 -->
112
+								<div class="display_flex align-items_center mb8" *ngIf="speCollectLimit[0].checked">
113
+									<nz-form-label class="label">限制终点科室收取</nz-form-label>
114
+									<nz-select nzMode="multiple" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear
115
+									  (nzOnSearch)="changeEndDept($event)" nzPlaceHolder="请选择限制终点科室收取" [(ngModel)]="speCollectLimitEndDept">
116
+									  <ng-container *ngFor="let option of endDeptData">
117
+									    <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
118
+									  </ng-container>
119
+									  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
120
+									    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
121
+									  </nz-option>
122
+									</nz-select>
123
+								</div>
124
+								
125
+								<!-- 限制普通或紧急收取 -->
126
+								<div class="display_flex align-items_center mb8" *ngIf="speCollectLimit[0].checked">
127
+									<nz-form-label class="label">限制普通或紧急收取</nz-form-label>
128
+									<nz-select class="formItem" nzMode="multiple" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择限制普通或紧急收取" [(ngModel)]="speCollectLimitUrgent">
129
+										<ng-container *ngFor="let option of astrictData">
130
+											<nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
131
+										</ng-container>
132
+									</nz-select>
133
+								</div>
134
+								
135
+								<!-- 是否限制重复收取标本 -->
136
+								<div class="display_flex align-items_center mb8" *ngIf="speCollectLimit[0].checked">
137
+								  <nz-form-label class="label">是否限制重复收取标本</nz-form-label>
138
+									<nz-checkbox-group [(ngModel)]="speCollectLimitRepeat"></nz-checkbox-group>
139
+								</div>
140
+								
141
+								<!-- 是否限制试管类型收取标本 -->
142
+								<div class="display_flex align-items_center mb8" *ngIf="speCollectLimit[0].checked">
143
+								  <nz-form-label class="label">是否限制试管类型收取标本</nz-form-label>
144
+									<nz-select class="formItem" nzMode="multiple" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择是否限制重复收取标本" [(ngModel)]="speCollectLimitTubeType">
145
+										<ng-container *ngFor="let option of repetitionData">
146
+											<nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
147
+										</ng-container>
148
+									</nz-select>
149
+								</div>
150
+								
151
+								<!-- 是否开始收取前进入配置页 -->
152
+								<div class="display_flex align-items_center mb8" *ngIf="speCollectLimit[0].checked">
153
+								  <nz-form-label class="label">是否开始收取前进入配置页</nz-form-label>
154
+								  <nz-checkbox-group [(ngModel)]="speStartCollectShowConfig"></nz-checkbox-group>
155
+								</div>
156
+								
88 157
               </div>
89 158
               <!-- 自动建单配置 -->
90 159
               <div *ngIf="tabModalName=='automaticOrderCreation'">

+ 137 - 4
src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.ts

@@ -116,6 +116,38 @@ export class ConfigurationSpecimenComponent implements OnInit {
116 116
     {label:'是否开启',value: 0}
117 117
   ];
118 118
 
119
+	// 是否开通收取限制
120
+	speCollectLimit:any[] = [
121
+    {label:'是否开启',value: 0}
122
+  ];
123
+
124
+	// 是否支持非起点科室收取
125
+	speCollectSupportNotStartDept:any[] = [
126
+	  {label:'是否开启',value: 0}
127
+	];
128
+
129
+	// 限制标本状态收取
130
+	speCollectLimitState:any = [];
131
+
132
+	// 限制终点科室收取
133
+	speCollectLimitEndDept:any = [];
134
+
135
+	// 限制普通或紧急收取
136
+	speCollectLimitUrgent:any = [];
137
+
138
+	// 是否限制重复收取标本
139
+	speCollectLimitRepeat:any[]= [
140
+	  {label:'是否开启',value: 0}
141
+	];
142
+
143
+	// 是否限制试管类型收取标本
144
+	speCollectLimitTubeType:any[];
145
+
146
+	// 是否开始收取前进入配置页
147
+	speStartCollectShowConfig:any[] = [
148
+	  {label:'是否开启',value: 0}
149
+	];
150
+
119 151
 	// 速冻标本数量控制
120 152
 	pathologyFrozenSpecimenNum:any = '0';
121 153
 
@@ -129,6 +161,13 @@ export class ConfigurationSpecimenComponent implements OnInit {
129 161
   configs:any = {};
130 162
   // 任务类型
131 163
   tasktype:any = {};
164
+	specimenStateData:any = [];
165
+	endDeptData:any = [];
166
+	repetitionData:any = [];
167
+	astrictData:any = [
168
+		{name:'普通',id:'0'},
169
+		{name:'紧急',id:'1'},
170
+	]
132 171
   searchTimerSubject = new Subject();
133 172
   constructor(private mainService: MainService,private tool: ToolService,private msg: NzMessageService) {}
134 173
 
@@ -138,10 +177,63 @@ export class ConfigurationSpecimenComponent implements OnInit {
138 177
       let fun = v[0];
139 178
       fun.call(this, v[1]);
140 179
     });
180
+		this.getDeptDic();
141 181
     this.getDeptList();
142 182
     this.getTaskType();
143 183
   }
144 184
 
185
+
186
+	// 获取科室类型
187
+	deptItem:any;
188
+	getDeptDic(e:string = ''){
189
+		this.mainService.getDictionary("list", "speState").subscribe((res) => {
190
+			this.specimenStateData = res
191
+		})
192
+		this.mainService.getDictionary("list", "specimen_tube_type").subscribe((res) => {
193
+			this.repetitionData = res
194
+		})
195
+		this.mainService.getDictionary("list", "dept_type").subscribe((res2) => {
196
+			this.deptItem = res2.find(i=>i.name=='检验科室')
197
+			let data1 = {
198
+			  idx: 0,
199
+			  sum: 9999,
200
+			  department: {
201
+			    hospital: { id: this.hosId || "" },
202
+			    type: { id: this.deptItem.id || "" },
203
+					dept: e,
204
+			  },
205
+			};
206
+			this.mainService
207
+			  .getFetchDataList("data", "department", data1)
208
+			  .subscribe((res) => {
209
+			    this.endDeptData = res.list;
210
+			  });
211
+		})
212
+	}
213
+
214
+	getEndDeptData(e){
215
+		let data1 = {
216
+		  idx: 0,
217
+		  sum: 9999,
218
+		  department: {
219
+		    hospital: { id: this.hosId || "" },
220
+		    type: { id: this.deptItem.id || "" },
221
+				dept: e,
222
+		  },
223
+		};
224
+		this.mainService
225
+		  .getFetchDataList("data", "department", data1)
226
+		  .subscribe((res) => {
227
+				 this.isLoading = false;
228
+		    this.endDeptData = res.list;
229
+		  });
230
+	}
231
+
232
+	// 搜索起点科室
233
+	changeEndDept(e){
234
+		this.searchTimer(this.getEndDeptData, e);
235
+	}
236
+
145 237
 	// 点击数据字典key
146 238
 	activeDictionaryKey:any = 'examine';
147 239
 	clickDictionaryKey(item){
@@ -175,6 +267,12 @@ export class ConfigurationSpecimenComponent implements OnInit {
175 267
 		}
176 268
 	}
177 269
 
270
+	changeSpeCollect(e){
271
+		if(!e[0].checked){
272
+
273
+		}
274
+	}
275
+
178 276
   // 扫描时指定科室不提醒勾选项
179 277
   changeDeptNotAlert(e){
180 278
     console.log(e);
@@ -287,8 +385,33 @@ export class ConfigurationSpecimenComponent implements OnInit {
287 385
       bigScanArriveNotOwner: this.bigScanArriveNotOwner[0].checked ? 1 : 0,
288 386
       bigScanShowCreateBtn: this.bigScanShowCreateBtn[0].checked ? 1 : 0,
289 387
       defaultScanSpe: this.defaultScanSpe[0].checked ? 1 : 0,
290
-      deptNotAlertIds: this.deptNotAlertIds.length ? this.deptNotAlertIds.toString() : undefined,
291
-    };
388
+      deptNotAlertIds: this.deptNotAlertIds && this.deptNotAlertIds.length>0 ? this.deptNotAlertIds.toString() : undefined,
389
+			speCollectLimit: this.speCollectLimit[0].checked ? 1 : 0,
390
+			speCollectSupportNotStartDept: null,
391
+			speCollectLimitRepeat: null,
392
+			speCollectLimitTubeType: null,
393
+			speStartCollectShowConfig: null,
394
+			speCollectLimitState: null,
395
+			speCollectLimitEndDept: null,
396
+			speCollectLimitUrgent: null,
397
+		};
398
+		if(this.speCollectLimit[0].checked){
399
+			postData.speCollectSupportNotStartDept = this.speCollectSupportNotStartDept[0].checked ? 1 : 0;
400
+			postData.speCollectLimitRepeat = this.speCollectLimitRepeat[0].checked ? 1 : 0;
401
+			postData.speCollectLimitTubeType = this.speCollectLimitTubeType && this.speCollectLimitTubeType.length>0 ? this.speCollectLimitTubeType.toString() : undefined;
402
+			postData.speStartCollectShowConfig = this.speStartCollectShowConfig[0].checked ? 1 : 0;
403
+			postData.speCollectLimitState = this.speCollectLimitState && this.speCollectLimitState.length>0 ? this.speCollectLimitState.toString() : undefined;
404
+			postData.speCollectLimitEndDept = this.speCollectLimitEndDept && this.speCollectLimitEndDept.length>0 ? this.speCollectLimitEndDept.toString() : undefined;
405
+			postData.speCollectLimitUrgent = this.speCollectLimitUrgent && this.speCollectLimitUrgent.length>0 ? this.speCollectLimitUrgent.toString() : undefined;
406
+		}else{
407
+			postData.speCollectSupportNotStartDept = undefined;
408
+			postData.speCollectLimitRepeat = undefined;
409
+			postData.speCollectLimitTubeType = undefined;
410
+			postData.speStartCollectShowConfig = undefined;
411
+			postData.speCollectLimitState = undefined;
412
+			postData.speCollectLimitEndDept = undefined;
413
+			postData.speCollectLimitUrgent = undefined;
414
+		}
292 415
     this.btnLoading = true;
293 416
     this.mainService
294 417
       .simplePost("addData", "taskTypeConfig", postData)
@@ -487,15 +610,25 @@ export class ConfigurationSpecimenComponent implements OnInit {
487 610
 						this.defaultScanSpe[0].checked = this.configs.defaultScanSpe == 1;
488 611
 						this.deptNotAlertIds = this.configs.deptNotAlertIds ? this.configs.deptNotAlertIds.split(',').map(v => +v) : [];
489 612
 						this.deptList = this.configs.deptNotAlertList || [];
613
+            this.speCollectLimit[0].checked = this.configs.speCollectLimit == 1;
614
+						if(this.configs.speCollectLimit == 1){
615
+							this.speCollectSupportNotStartDept[0].checked = this.configs.speCollectSupportNotStartDept == 1;
616
+							this.speCollectLimitRepeat[0].checked  = this.configs.speCollectLimitRepeat == 1;
617
+							this.speCollectLimitTubeType = this.configs.speCollectLimitTubeType ? this.configs.speCollectLimitTubeType.split(',').map(v => +v) : [];
618
+							this.speStartCollectShowConfig[0].checked = this.configs.speStartCollectShowConfig == 1;
619
+							this.speCollectLimitState = this.configs.speCollectLimitState ? this.configs.speCollectLimitState.split(',').map(v => +v) : [];
620
+							this.speCollectLimitEndDept = this.configs.speCollectLimitEndDept ? this.configs.speCollectLimitEndDept.split(',').map(v => +v) : [];
621
+							this.speCollectLimitUrgent = this.configs.speCollectLimitUrgent ? this.configs.speCollectLimitUrgent.split(',').map(v => v) : [];
622
+						}
490 623
 					}else if(this.activeDictionaryKey=='pathology'){
491
-						// 病理标本
624
+            // 病理标本
492 625
 						this.autoCreate[0].checked = this.configs.autoCreate == 1;
493 626
 						this.outpatientCreatePathologyForm[0].checked = this.configs.outpatientCreatePathologyForm == 1;
494 627
 						this.outpatientInVitroFixation[0].checked = this.configs.outpatientInVitroFixation == 1;
495 628
 						this.pathologyBarCode = this.configs.pathologyBarCode;
496 629
 						this.pathologyFrozenSpecimenNum = this.configs.pathologyFrozenSpecimenNum;
497 630
 						this.prompt = this.configs.prompt || '';
498
-						this.outpatientPathologyLabelSize = this.configs.outpatientPathologyLabelSize.id; //门诊病理标签样式
631
+            this.outpatientPathologyLabelSize = this.configs.outpatientPathologyLabelSize.id; //门诊病理标签样式
499 632
 						this.surgeryPathologyLabelSize = this.configs.surgeryPathologyLabelSize.id //手术病理标签样式
500 633
 					}else if(this.activeDictionaryKey=='specimenPackage'){
501 634
 						// 标本打包

+ 5 - 2
src/app/components/order-scope/order-scope.component.ts

@@ -3,7 +3,7 @@ import { EventEmitter } from '@angular/core';
3 3
 import { MainService } from 'src/app/services/main.service';
4 4
 import { ToolService } from 'src/app/services/tool.service';
5 5
 import { NzMessageService } from 'ng-zorro-antd';
6
-import { Router } from "@angular/router";
6
+import { Router, ActivatedRoute } from "@angular/router";
7 7
 
8 8
 @Component({
9 9
   selector: 'app-order-scope',
@@ -29,7 +29,8 @@ export class OrderScopeComponent implements OnInit {
29 29
     private mainService: MainService,
30 30
     private tool: ToolService,
31 31
     private message: NzMessageService,
32
-		public router: Router
32
+		public router: Router,
33
+		public route: ActivatedRoute
33 34
   ) { }
34 35
 
35 36
   user = JSON.parse(localStorage.getItem("user")); //用户信息
@@ -49,6 +50,8 @@ export class OrderScopeComponent implements OnInit {
49 50
 	menuList:any;
50 51
 
51 52
   ngOnInit() {
53
+		let btn = this.tool.initCoopBtns(this.route)
54
+		console.log(77777,btn)
52 55
 		let menuItem = JSON.parse(localStorage.getItem("menuItem"))
53 56
 		this.menuList = menuItem.find(i=>i.link=='gongdanfanwei')
54 57
     this.initItsm();

+ 1 - 0
src/app/services/tool.service.ts

@@ -314,6 +314,7 @@ export class ToolService {
314 314
 				  break;
315 315
 				case "log":
316 316
 				  coopBtns.log = true; //日志
317
+					break
317 318
 				case "viewGd":
318 319
 				  coopBtns.viewGd = true; //查看工单
319 320
 				  break;

+ 5 - 1
src/app/share/businessData-detail-info-modal/businessData-detail-info-modal.component.html

@@ -17,8 +17,9 @@
17 17
           <thead>
18 18
             <tr class="thead">
19 19
               <th nzWidth="5%">序号</th>
20
-              <th nzWidth="85%">药品名称+规格</th>
20
+              <th nzWidth="65%">药品名称+规格</th>
21 21
               <th nzWidth="10%">数量</th>
22
+							<th nzWidth="20%" *ngIf="configs.showPatientInfo==1">患者信息</th>
22 23
             </tr>
23 24
           </thead>
24 25
           <tbody>
@@ -26,6 +27,9 @@
26 27
               <td>{{i+1}}</td>
27 28
               <td>{{ data.drugsInfo }} {{ data.model }}</td>
28 29
               <td>{{ data.drugsNum }}</td>
30
+							<td nz-tooltip [nzTooltipTitle]="data.patientNames" *ngIf="configs.showPatientInfo==1">
31
+								{{ data.patientNames }}
32
+							</td>
29 33
             </tr>
30 34
           </tbody>
31 35
         </nz-table>

+ 7 - 9
src/app/share/businessData-detail-modal/businessData-detail-modal.component.html

@@ -46,20 +46,19 @@
46 46
         <thead>
47 47
           <tr class="thead">
48 48
             <th nzWidth="5%">序号</th>
49
-						<th *ngIf="configs.showPatientInfo==1">患者信息</th>
50 49
             <th nzWidth="65%">药品名称+规格</th>
51 50
             <th nzWidth="10%">数量</th>
51
+						<th nzWidth="20%" *ngIf="configs.showPatientInfo==1">患者信息</th>
52 52
           </tr>
53 53
         </thead>
54 54
         <tbody>
55 55
           <tr *ngFor="let data of drugsBugSingleList;let i = index;">
56 56
             <td>{{i+1}}</td>
57
-						<td *ngIf="configs.showPatientInfo==1">
58
-							<div>{{ data.patientName }}{{(data.bedNum)}}</div>
59
-							<div>{{data.residenceNo}}</div>
60
-						</td>
61 57
             <td>{{ data.drugsInfo }} {{ data.model }}</td>
62 58
             <td>{{ data.drugsNum }}</td>
59
+						<td nz-tooltip [nzTooltipTitle]="data.patientNames" *ngIf="configs.showPatientInfo==1">
60
+							{{ data.patientNames }}
61
+						</td>
63 62
           </tr>
64 63
         </tbody>
65 64
       </nz-table>
@@ -84,10 +83,9 @@
84 83
         <tbody>
85 84
           <tr *ngFor="let data of drugsBugMultipleList;let i = index;" (click)="viewDetail(type, data.id)" [ngStyle]="{ 'cursor': configs.showDrugsBagDetails == 1 ? 'pointer' : '' }">
86 85
             <td>{{i+1}}</td>
87
-            <td [ngStyle]="{ 'text-decoration': configs.showDrugsBagDetails == 1 ? 'underline' : '' }">{{ data.packid }}</td>
88
-						<td *ngIf="configs.showPatientInfo==1">
89
-							<div>{{ data.patientName }}{{(data.bedNum)}}</div>
90
-							<div>{{data.residenceNo}}</div>
86
+						<td [ngStyle]="{ 'text-decoration': configs.showDrugsBagDetails == 1 ? 'underline' : '' }">{{ data.packid }}</td>
87
+						<td nz-tooltip [nzTooltipTitle]="data.patientNames" *ngIf="configs.showPatientInfo==1">
88
+							{{ data.patientNames }}
91 89
 						</td>
92 90
             <td *ngIf="configs.showDrugsBagTypeCount==1">{{ data.drugsTypeCount }}</td>
93 91
             <td *ngIf="configs.showDrugsBagTypeCount==1">{{ data.drugsCount }}</td>

+ 15 - 5
src/app/share/businessData-detail-modal/businessData-detail-modal.component.less

@@ -68,12 +68,22 @@
68 68
   }
69 69
 
70 70
   .modalBody {
71
-		height: calc(100vh - 40px);
72
-    width: 700px;
73
-    background: #fff;
74
-    border-radius: 5px;
75
-    color: #333;
71
+		// height: calc(100vh - 40px);
72
+  //   width: 700px;
73
+  //   background: #fff;
74
+  //   border-radius: 5px;
75
+  //   color: #333;
76
+		// position: relative;
77
+		
78
+		height: calc(100vh - 100px);
79
+		min-height: 580px;
80
+		border-radius: 5px;
81
+		background: #fff;
82
+		color: #333;
83
+		font-size: 14px;
84
+		padding: 12px 20px;
76 85
 		position: relative;
86
+		padding-bottom: 70px;
77 87
     &.modalBody-search {
78 88
       width: 480px;
79 89
       min-height: 250px;

+ 8 - 4
src/app/views/appraise-management/appraise-management.component.html

@@ -7,7 +7,7 @@
7 7
           <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="false" nzAllowClear
8 8
             nzPlaceHolder="请选择工单类型" [(ngModel)]="taskType">
9 9
             <ng-container *ngFor="let data of allTaskType">
10
-              <nz-option nzLabel="{{data.taskName}}" nzValue="{{data.id}}"></nz-option>
10
+              <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
11 11
             </ng-container>
12 12
           </nz-select>
13 13
         </div>
@@ -42,6 +42,10 @@
42 42
             <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of handleStatus"></nz-option>
43 43
           </nz-select>
44 44
         </div>
45
+				<div class="list-template__searchItem">
46
+				  <span class="label">单号</span>:
47
+				  <input class="formItem" nz-input placeholder="请输入单号" [(ngModel)]="orderNo" />
48
+				</div>
45 49
       </div>
46 50
       <div nz-col nzXl='6' class="list-template__btns">
47 51
         <button nz-button class="btn default" (click)='search()'>搜索</button>
@@ -57,7 +61,7 @@
57 61
 						<th>工单类型</th>
58 62
             <th>单号</th>
59 63
             <th>申请科室</th>
60
-            <th>发起时间</th>
64
+            <!-- <th>发起时间</th> -->
61 65
 						<th>执行人</th>
62 66
 						<th>评价时间</th>
63 67
             <th>评价等级</th>
@@ -73,8 +77,8 @@
73 77
 						<td>{{data.orderType?data.orderType.name:'-'}}</td>
74 78
             <td>{{data.orderNo}}</td>
75 79
             <td>{{ data.startDept.dept }}</td>
76
-            <td>{{timestampToTime(data.startTime)}}</td>
77
-						<td>{{data.mediationUser?data.mediationUser.name:''}}</td>
80
+            <!-- <td>{{timestampToTime(data.startTime)}}</td> -->
81
+						<td>{{data.worker?data.worker.name:''}}</td>
78 82
 						<td>{{ data.evaluationTime?timestampToTime(data.evaluationTime):'-'}}</td>
79 83
 						<td>{{ data.evaluationLevel ? data.evaluationLevel.name:'-' }}</td>
80 84
 						<td>

+ 13 - 5
src/app/views/appraise-management/appraise-management.component.ts

@@ -29,6 +29,7 @@ export class AppraiseManagementComponent implements OnInit {
29 29
   department: any; //所属科室
30 30
   mediUser: number; //调解人
31 31
   taskType: number; //工单类型
32
+	orderNo:any;
32 33
   allTaskType: any; //所有工单类型
33 34
   allHospital: any; //所有院区
34 35
   pageIndex: number = 1; //页码
@@ -70,7 +71,6 @@ export class AppraiseManagementComponent implements OnInit {
70 71
     this.worker = null;
71 72
     this.mediUser = null;
72 73
     this.status = null;
73
-    this.getAllTaskType();
74 74
     this.getAllWorker();
75 75
     this.getAllMediUser();
76 76
   }
@@ -123,7 +123,6 @@ export class AppraiseManagementComponent implements OnInit {
123 123
       user: {
124 124
         name: e || "",
125 125
         hospital: { id: that.hospital },
126
-        usertype: { id: 107 }, //服务台
127 126
       },
128 127
       idx: 0,
129 128
       sum: 20,
@@ -167,6 +166,11 @@ export class AppraiseManagementComponent implements OnInit {
167 166
       .subscribe((data) => {
168 167
         that.handleStatus = data;
169 168
       });
169
+		that.mainService
170
+		  .getDictionary("list", "order_type")
171
+		  .subscribe((data) => {
172
+		    that.allTaskType = data;
173
+		  });
170 174
   }
171 175
 
172 176
   // 搜索
@@ -178,6 +182,7 @@ export class AppraiseManagementComponent implements OnInit {
178 182
   reset() {
179 183
     this.pageIndex = 1;
180 184
     this.taskType = null;
185
+		this.orderNo = null;
181 186
     this.worker = null;
182 187
     this.mediUser = null;
183 188
     this.status = null;
@@ -191,15 +196,18 @@ export class AppraiseManagementComponent implements OnInit {
191 196
       idx: that.pageIndex - 1,
192 197
       sum: that.pageSize,
193 198
       badEvaluationHandle: {
194
-        taskType: that.taskType || "",
199
+				orderNo: that.orderNo || "",
200
+        orderType: {
201
+					id: that.taskType || "",
202
+				},
195 203
         worker: { id: that.worker || "" },
196 204
         handleStatus: { id: that.status || "" },
197 205
         hosId: that.hospital,
198 206
         mediationUser: { id: that.mediUser },
199 207
       },
200 208
     };
201
-    if (!data.badEvaluationHandle.taskType) {
202
-      delete data.badEvaluationHandle.taskType;
209
+    if (!data.badEvaluationHandle.orderType) {
210
+      delete data.badEvaluationHandle.orderType;
203 211
     }
204 212
     if (!data.badEvaluationHandle.worker.id) {
205 213
       delete data.badEvaluationHandle.worker;

+ 8 - 1
src/app/views/building-floor/building-floor.component.html

@@ -109,7 +109,14 @@
109 109
             <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="floorName">楼层名称</nz-form-label>
110 110
             <nz-form-control nzErrorTip="请输入楼层名称!">
111 111
               <nz-input-group>
112
-                <input nz-input formControlName="floorName" placeholder="请输入楼层名称" />
112
+                <nz-input-number 
113
+								[nzMin]="0"
114
+								[nzPrecision]="0"
115
+								[nzMax]="999999"
116
+								[nzStep]="1"
117
+								formControlName="floorName" 
118
+								placeholder="请输入楼层名称">
119
+								</nz-input-number>
113 120
               </nz-input-group>
114 121
             </nz-form-control>
115 122
           </nz-form-item>

+ 3 - 0
src/app/views/building-floor/building-floor.component.less

@@ -260,6 +260,9 @@
260 260
                 line-height: 0;
261 261
                 text-align: left;
262 262
               }
263
+							.ant-input-number{
264
+								width: 100% !important;
265
+							}
263 266
             }
264 267
           }
265 268
 

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

@@ -118,7 +118,7 @@
118 118
                   <div class="gongdan" (click)="batchDispatchSelect(!data.checked, data.data.id, $event)">
119 119
                     <span class="left mr8" *ngIf="!flagList.itsmFlag1 && flagList.hsmsFlag1"><label nz-checkbox [ngModel]="data.checked" (ngModelChange)="batchDispatchSelect($event, data.data.id)"></label></span>
120 120
                     <span class="left gongdan_name" nz-tooltip [nzTooltipTitle]="data.data.taskType.taskName + (data.data.goodsRemark?'-'+data.data.goodsRemark:'')+'(' + data.data.gdcode + ')'">
121
-                      <strong>{{ data.data.taskType.taskName }}</strong><ng-container *ngIf="data.data.goodsRemark">-{{data.data.goodsRemark}}</ng-container>({{ data.data.gdcode }})
121
+                      <strong [ngStyle]="{color: data.data.taskType?data.data.taskType.renderColors:'#333'}">{{ data.data.taskType.taskName }}</strong><ng-container *ngIf="data.data.goodsRemark">-{{data.data.goodsRemark}}</ng-container>({{ data.data.gdcode }})
122 122
                     </span>
123 123
                     <div class="right_all">
124 124
                       <span nz-tooltip [nzTooltipTitle]="data.data.worker ? data.data.worker.phone : ''" class="right_all_name">{{ data.data.worker ? data.data.worker.name : "" }}</span>
@@ -315,7 +315,7 @@
315 315
                       <label nz-checkbox [ngModel]="data.checked" (ngModelChange)="batchWithdrawalSelect($event, data.data.id)"></label>
316 316
                     </span>
317 317
                     <span class="left gongdan_name" nz-tooltip [nzTooltipTitle]="data.data.taskType.taskName + (data.data.goodsRemark?'-'+data.data.goodsRemark:'')+'(' + data.data.gdcode + ')'">
318
-                      <strong>{{ data.data.taskType.taskName }}</strong><ng-container *ngIf="data.data.goodsRemark">-{{data.data.goodsRemark}}</ng-container>({{ data.data.gdcode }})
318
+                      <strong [ngStyle]="{color: data.data.taskType?data.data.taskType.renderColors:'#333'}">{{ data.data.taskType.taskName }}</strong><ng-container *ngIf="data.data.goodsRemark">-{{data.data.goodsRemark}}</ng-container>({{ data.data.gdcode }})
319 319
                     </span>
320 320
                     <div class="right_all">
321 321
                       <span nz-tooltip [nzTooltipTitle]="data.data.worker ? data.data.worker.phone : ''" class="right_all_name">{{ data.data.worker ? data.data.worker.name : "" }}</span>
@@ -500,7 +500,7 @@
500 500
                       <label nz-checkbox [ngModel]="data.checked" (ngModelChange)="batchWithdrawalSelect($event, data.data.id)"></label>
501 501
                     </span>
502 502
                     <span class="left gongdan_name" nz-tooltip [nzTooltipTitle]="data.data.taskType.taskName + (data.data.goodsRemark?'-'+data.data.goodsRemark:'')+'(' + data.data.gdcode + ')'">
503
-                      <strong>{{ data.data.taskType.taskName }}</strong><ng-container *ngIf="data.data.goodsRemark">-{{data.data.goodsRemark}}</ng-container>({{ data.data.gdcode }})
503
+                      <strong [ngStyle]="{color: data.data.taskType?data.data.taskType.renderColors:'#333'}">{{ data.data.taskType.taskName }}</strong><ng-container *ngIf="data.data.goodsRemark">-{{data.data.goodsRemark}}</ng-container>({{ data.data.gdcode }})
504 504
                     </span>
505 505
                     <div class="right_all">
506 506
                       <span nz-tooltip [nzTooltipTitle]="data.data.worker ? data.data.worker.phone : ''" class="right_all_name">{{ data.data.worker ? data.data.worker.name : "" }}</span>
@@ -1859,6 +1859,21 @@
1859 1859
     (confirmDelEvent)="confirmLogout()"
1860 1860
     content="您确认要退出系统吗?"
1861 1861
   ></app-dialog-delete>
1862
+	<!-- 重复建单策略 -->
1863
+	<app-dialog-delete
1864
+	  [delModal]="repeatModal"
1865
+	  (hideDelModalEvent)="hideRepeatModal()"
1866
+	  [btnLoading]="loadingRepeat"
1867
+	  (confirmDelEvent)="confirmRepeat()"
1868
+	  [content]="repeatMsg"
1869
+	  confirmTxt="是"
1870
+	  cancelTxt="否"
1871
+	  (cancelDelEvent)="hideRepeatModal()"
1872
+	></app-dialog-delete>
1873
+	
1874
+	<!-- 是否限制业务发起时间模态框 -->
1875
+	<app-dialog-delete [delModal]="limitTimeModal" (hideDelModalEvent)="hideLimitTimeModal()" [btnLoading]="limitTimeLoading"
1876
+	(confirmDelEvent)="confirmLimitTime()" [content]="limitTimeInfo" confirmTxt="继续建单" [isShowConfirm]="isShowConfirm" [isShowConfirmInfo]="isShowConfirmInfo"></app-dialog-delete>
1862 1877
 </div>
1863 1878
 <!-- 绑定分机 -->
1864 1879
 <app-bind-extension-number [hsmsData]="hsmsData" [itsmData]="itsmData" [coopBtns]="coopBtns" [websocketLoading]="websocketLoading" *ngIf="showBindExtensionNumberModal" (confirmModal)="checkIn($event)" (cancelModal)="cancelBindExtensionNumber($event)"></app-bind-extension-number>

+ 375 - 23
src/app/views/fuwutai/fuwutai.component.ts

@@ -441,6 +441,7 @@ export class FuwutaiComponent implements OnInit {
441 441
         console.log(data);
442 442
         this.isOkLoading = false;
443 443
         this.isGoLoading = false;
444
+				this.dataStatus = data["status"];
444 445
         if (data["status"] == 200) {
445 446
           this.newOrderShow = false; //关闭弹窗
446 447
           if (go === "&go&") {
@@ -454,9 +455,23 @@ export class FuwutaiComponent implements OnInit {
454 455
             }
455 456
             this.showPromptModal("建单", true, "", "close");
456 457
           }
457
-        } else {
458
-          this.showPromptModal("建单", false, data["msg"]);
459
-        }
458
+        } 
459
+				else if(data["status"] == 1000033){
460
+					this.newOrderShow = false; //关闭弹窗
461
+					if (go === "&go&") {
462
+					  this.applyDept = data["startDept"].id;
463
+					  this.applyStartDept = data["startDept"];
464
+					  this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
465
+					}
466
+					//重复建单那策略
467
+					this.repeatMsg = data["msg"];
468
+					this.showRepeatModal(postData, "transport", go);
469
+				}else if (data["status"] == 100043){
470
+					this.showPromptModal("建单", true, data["msg"]);
471
+				}
472
+				else{
473
+					this.showPromptModal("建单", false, data["msg"]);
474
+				}
460 475
       });
461 476
     }
462 477
   }
@@ -525,6 +540,7 @@ export class FuwutaiComponent implements OnInit {
525 540
         console.log(data);
526 541
         this.isOkLoading = false;
527 542
         this.isGoLoading = false;
543
+				this.dataStatus = data["status"];
528 544
         if (data["status"] == 200) {
529 545
           this.newOrderShow = false; //关闭弹窗
530 546
           if (go === "&go&") {
@@ -540,14 +556,36 @@ export class FuwutaiComponent implements OnInit {
540 556
           }
541 557
         } else if(data["status"] == 100042){
542 558
           this.newOrderShow = false; //关闭弹窗
543
-          this.showPromptModal("建单", false, data["msg"]);
544
-        } else {
545
-          this.showPromptModal("建单", false, data["msg"]);
546
-        }
559
+					if (go === "&go&") {
560
+						this.applyDept = data["startDept"].id;
561
+						this.applyStartDept = data["startDept"];
562
+						this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
563
+						this.showPromptModal("建单", false, data["msg"], "closeGo");
564
+					}else{
565
+						this.showPromptModal("建单", false, data["msg"]);
566
+					}
567
+        } 
568
+				else if(data["status"] == 1000033){
569
+					this.newOrderShow = false; //关闭弹窗
570
+					if (go === "&go&") {
571
+						this.applyDept = data["startDept"].id;
572
+						this.applyStartDept = data["startDept"];
573
+						this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
574
+					}
575
+					//重复建单那策略
576
+					this.repeatMsg = data["msg"];
577
+					this.showRepeatModal(postData, "inspection", go);					
578
+				}else if (data["status"] == 100043){
579
+					this.showPromptModal("建单", true, data["msg"]);
580
+				}
581
+				else{
582
+					this.showPromptModal("建单", false, data["msg"]);
583
+				}
547 584
       });
548 585
     }
549 586
   }
550 587
   // 标本配送表单提交
588
+	dataStatus:any;
551 589
   submitFormBbps(go?) {
552 590
     let postData = {
553 591
       workOrder: {
@@ -567,6 +605,7 @@ export class FuwutaiComponent implements OnInit {
567 605
     this.mainService.buildOrder(postData).subscribe((data) => {
568 606
       this.isOkLoading = false;
569 607
       this.isGoLoading = false;
608
+			this.dataStatus = data["status"];
570 609
       if (data["status"] == 200) {
571 610
         this.newOrderShow = false; //关闭弹窗
572 611
         if (go === "&go&") {
@@ -580,9 +619,21 @@ export class FuwutaiComponent implements OnInit {
580 619
           }
581 620
           this.showPromptModal("建单", true, "", "close");
582 621
         }
583
-      } else {
584
-        this.showPromptModal("建单", false, data["msg"]);
585
-      }
622
+      }else if(data["status"] == 1000033){
623
+				 this.newOrderShow = false; //关闭弹窗
624
+				 if (go === "&go&") {
625
+				 	this.applyDept = data["startDept"].id;
626
+				 	this.applyStartDept = data["startDept"];
627
+				 	this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
628
+				 }
629
+				 //重复建单那策略
630
+				 this.repeatMsg = data["msg"];
631
+				 this.showRepeatModal(postData, "specimen", go);
632
+			}else if (data["status"] == 100043){
633
+				this.showPromptModal("建单", true, data["msg"]);
634
+			} else{
635
+				this.showPromptModal("建单", false, data["msg"]);
636
+			}
586 637
     });
587 638
   }
588 639
   // 其他表单提交
@@ -629,6 +680,7 @@ export class FuwutaiComponent implements OnInit {
629 680
     this.mainService.buildOrder(postData).subscribe((data) => {
630 681
       this.isOkLoading = false;
631 682
       this.isGoLoading = false;
683
+			this.dataStatus = data["status"];
632 684
       if (data["status"] == 200) {
633 685
         this.newOrderShow = false; //关闭弹窗
634 686
         if (go === "&go&") {
@@ -642,9 +694,24 @@ export class FuwutaiComponent implements OnInit {
642 694
           }
643 695
           this.showPromptModal("建单", true, "", "close");
644 696
         }
645
-      } else {
646
-        this.showPromptModal("建单", false, data["msg"]);
647
-      }
697
+      } 
698
+			else if(data["status"] == 1000033){
699
+				this.newOrderShow = false; //关闭弹窗
700
+				if (go === "&go&") {
701
+					this.applyDept = data["startDept"].id;
702
+					this.applyStartDept = data["startDept"];
703
+					this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
704
+				}
705
+				//重复建单那策略
706
+				this.repeatMsg = data["msg"];
707
+				this.showRepeatModal(postData, "other", go);
708
+				
709
+			}else if (data["status"] == 100043){
710
+				this.showPromptModal("建单", true, data["msg"]);
711
+			}
712
+			else{
713
+				this.showPromptModal("建单", false, data["msg"]);
714
+			}
648 715
     });
649 716
   }
650 717
   // 万能交接表单提交
@@ -683,6 +750,7 @@ export class FuwutaiComponent implements OnInit {
683 750
     this.mainService.buildOrder(postData).subscribe((data) => {
684 751
       this.isOkLoading = false;
685 752
       this.isGoLoading = false;
753
+			this.dataStatus = data["status"];
686 754
       if (data["status"] == 200) {
687 755
         this.newOrderShow = false; //关闭弹窗
688 756
         if (go === "&go&") {
@@ -696,9 +764,23 @@ export class FuwutaiComponent implements OnInit {
696 764
           }
697 765
           this.showPromptModal("建单", true, "", "close");
698 766
         }
699
-      } else {
700
-        this.showPromptModal("建单", false, data["msg"]);
701
-      }
767
+      } 
768
+			else if(data["status"] == 1000033){
769
+				this.newOrderShow = false; //关闭弹窗
770
+				if (go === "&go&") {
771
+					this.applyDept = data["startDept"].id;
772
+					this.applyStartDept = data["startDept"];
773
+					this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
774
+				}
775
+				//重复建单那策略
776
+				this.repeatMsg = data["msg"];
777
+				this.showRepeatModal(postData, "ordinary", go);
778
+			}else if (data["status"] == 100043){
779
+				this.showPromptModal("建单", true, data["msg"]);
780
+			}
781
+			else{
782
+				this.showPromptModal("建单", false, data["msg"]);
783
+			}
702 784
     });
703 785
   }
704 786
   // 核酸打印
@@ -752,6 +834,7 @@ export class FuwutaiComponent implements OnInit {
752 834
     })
753 835
   }
754 836
   //获取检查页面任务类型
837
+	allTaskType:any;
755 838
   getInspectAndPatientTransportConfigTasktype() {
756 839
     if(!this.hsmsData.hsmsSwitch){
757 840
       return;
@@ -778,6 +861,23 @@ export class FuwutaiComponent implements OnInit {
778 861
           this.getInspectAndPatientTransportConfig(tasktype);
779 862
         }
780 863
       });
864
+			// let query = {
865
+			//   idx: 0,
866
+			//   sum: 9999,
867
+			//   taskType: {
868
+			//     hosId: {
869
+			//       id: this.checkedHos
870
+			//     }
871
+			//   }
872
+			// };
873
+			// this.mainService
874
+			//   .getFetchDataList("simple/data", "taskType", query)
875
+			//   .subscribe((result) => {
876
+			//     if (result.status == 200) {
877
+			//       this.allTaskType = result.list || {};
878
+			// 			this.initControlView();
879
+			//     }
880
+			//   });
781 881
   }
782 882
   // 获取检查页面信息配置
783 883
   getInspectAndPatientTransportConfig(tasktype) {
@@ -805,8 +905,10 @@ export class FuwutaiComponent implements OnInit {
805 905
         }
806 906
       });
807 907
   }
908
+	currentDept:any;
808 909
   ngOnInit() {
809 910
     this.websocketLoading = true;
911
+		this.currentDept = this.tool.getCurrentUserDept();
810 912
     this.coopBtns = this.tool.initCoopBtns(this.route);
811 913
 		// console.log(8989899,this.coopBtns)
812 914
     //防抖
@@ -869,7 +971,7 @@ export class FuwutaiComponent implements OnInit {
869 971
     this.initOrderScope();
870 972
     this.getVisitList();
871 973
     this.getMessageList();
872
-    this.initControlView();
974
+		this.initControlView();
873 975
     this.moveMenu("fixedMenu");
874 976
     this.moveMenu("fixedMenuLeft");
875 977
     this.moveMenuAll("fixedMenuAll");
@@ -2202,8 +2304,12 @@ export class FuwutaiComponent implements OnInit {
2202 2304
               item.computedReceiveFlag = this.computedReceive(item.data)
2203 2305
               item.computedEditFlag = this.computedEdit(item.data)
2204 2306
             }
2307
+						// else{
2308
+						// 	item.taskTypeConfig = this.allTaskType.find(i=>i.id == item.data.taskType.id)
2309
+						// }
2205 2310
           });
2206 2311
           this.unassignedList = unassignedList;
2312
+					console.log(5555,unassignedList)
2207 2313
           this.batchType = false;
2208 2314
           this.allUnassignedList = false;
2209 2315
           this.unassignedListClone = cloneDeep(this.unassignedList);
@@ -2228,6 +2334,9 @@ export class FuwutaiComponent implements OnInit {
2228 2334
               item.computedReceiveFlag = this.computedReceive(item.data)
2229 2335
               item.computedEditFlag = this.computedEdit(item.data)
2230 2336
             }
2337
+						// else{
2338
+						// 	item.taskTypeConfig = this.allTaskType.find(i=>i.id == item.data.taskType.id)
2339
+						// }
2231 2340
           });
2232 2341
           this.arriveList = arriveList;
2233 2342
           this.batchType1 = false;
@@ -2243,6 +2352,9 @@ export class FuwutaiComponent implements OnInit {
2243 2352
               item.computedHandleFlag = this.computedHandle(item.data)
2244 2353
               item.computedEditFlag = this.computedEdit(item.data)
2245 2354
             }
2355
+						// else{
2356
+						// 	item.taskTypeConfig = this.allTaskType.find(i=>i.id == item.data.taskType.id)
2357
+						// }
2246 2358
           });
2247 2359
           this.executionList = executionList;
2248 2360
           this.loading3 = false;
@@ -2524,6 +2636,7 @@ export class FuwutaiComponent implements OnInit {
2524 2636
       },0)
2525 2637
     }
2526 2638
     this.buildType = buildType;
2639
+		console.log(123,buildType)
2527 2640
     if(this.itsmData.mdv2Switch){
2528 2641
       if(this.buildType !== '继续建单' && this.buildType !== '编辑事件' && this.buildType !== '报修转事件'){
2529 2642
         this.resetOrderData();
@@ -4073,6 +4186,7 @@ export class FuwutaiComponent implements OnInit {
4073 4186
       if(this.incomingService.getSign() === 'callCenter' && this.incomingService.getPhoneNumber()){
4074 4187
         this.jry_shixian();
4075 4188
       }
4189
+			this.goType = null;
4076 4190
       this.newOrderShow = false; //关闭弹窗
4077 4191
       this.newOrderShowOpen = false; //此时可出现新的弹窗
4078 4192
       this.showPromptModal("操作", true, "", "");
@@ -4612,6 +4726,7 @@ export class FuwutaiComponent implements OnInit {
4612 4726
     console.log(this.workTypesArrange[index].value);
4613 4727
     let taskType = this.workTypesArrange[index].value.find(v => v.id == value);
4614 4728
     let patientCode;
4729
+		// this.taskType = taskType.associationTypeValue?taskType.associationTypeValue:null
4615 4730
     if(taskType.associationTypeValue === 'inspect'){
4616 4731
       patientCode = this.patientZy;
4617 4732
       this.requiredConfigChange('validateFormZy', 'startDept', false);
@@ -4749,11 +4864,16 @@ export class FuwutaiComponent implements OnInit {
4749 4864
   }
4750 4865
 
4751 4866
 	psValue:any;
4867
+	taskType:any;
4752 4868
   radioChangeQt(value) {
4753 4869
     //任务类型id
4754 4870
     if (value === "" || value === null) {
4755 4871
       return;
4756 4872
     }
4873
+		let index = this.tabIndex;
4874
+		// let item = this.workTypesArrange[1].value.find(v => v.id == value);
4875
+		// console.log(788787,item)
4876
+		// this.taskType = item.associationTypeValue?item.associationTypeValue:null
4757 4877
 		this.psValue = value
4758 4878
     this.startDeptQt = null;
4759 4879
     this.endDeptQt = null;
@@ -4815,26 +4935,33 @@ export class FuwutaiComponent implements OnInit {
4815 4935
 
4816 4936
   //新建工单->确定提交
4817 4937
   isGoLoading = false;
4938
+	goType:any;
4818 4939
   newOrderOk(go?): void {
4940
+		this.goType = go
4819 4941
     console.log(this.radioValueQt);
4820 4942
     let arr = this.workTypesArrange.find(v => v.key === this.currentTabIndex);
4821 4943
     let objQt = arr.value.find(v => v.id == this.radioValueQt);
4822 4944
     let objZy = arr.value.find(v => v.id == this.radioValueZy);
4823 4945
     if (this.isYyInspect && objQt && objQt.associationTypeValue === 'other') {
4824 4946
       this.clickYYFlag = true;
4947
+			console.log(110)
4825 4948
     } else {
4949
+			console.log(111)
4826 4950
       this.clickYYFlag = false;
4827 4951
     }
4828 4952
     if (this.isYyInspect && objZy && (objZy.associationTypeValue === 'patientTransport' || objZy.associationTypeValue === 'inspect')) {
4829 4953
       this.clickYYZyFlag = true;
4954
+			console.log(112)
4830 4955
     } else {
4831 4956
       this.clickYYZyFlag = false;
4957
+			console.log(113)
4832 4958
     }
4833 4959
 
4834 4960
     if (
4835 4961
       (!this.yyTime && objQt && objQt.associationTypeValue === 'other' && this.isYyInspect) ||
4836 4962
       (!this.yyTimeZy && objZy && (objZy.associationTypeValue === 'patientTransport' || objZy.associationTypeValue === 'inspect') && this.isYyInspect)
4837 4963
     ) {
4964
+			console.log(114)
4838 4965
       return;
4839 4966
     }
4840 4967
 
@@ -4875,6 +5002,7 @@ export class FuwutaiComponent implements OnInit {
4875 5002
     this.currentTabIndex = "";
4876 5003
     this.fixedTab = "";
4877 5004
     this.fixedMenuShangla();
5005
+		this.goType = null;
4878 5006
     this.radioValueQt = null;
4879 5007
     this.startDeptQt = null;
4880 5008
     this.endDeptQt = null;
@@ -5027,16 +5155,202 @@ export class FuwutaiComponent implements OnInit {
5027 5155
         },
5028 5156
       },
5029 5157
     };
5030
-    this.mainService.buildOrder(postData).subscribe((result) => {
5158
+    this.mainService.buildOrder(postData).subscribe((result:any) => {
5031 5159
       this.createLoading = false;
5032 5160
       this.deptFlag = false;
5161
+			this.dataStatus = result["status"];
5033 5162
       if (result["status"] == 200) {
5034 5163
         this.showPromptModal("建单", true, "");
5035
-      } else {
5036
-        this.showPromptModal("建单", false, result["msg"]);
5037
-      }
5164
+      } 
5165
+			else if(result["status"] == 1000033){
5166
+				if (this.goType === "&go&") {
5167
+					this.applyDept = result["startDept"].id;
5168
+					this.applyStartDept = result["startDept"];
5169
+					this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = result["phone"];
5170
+				}
5171
+				//重复建单那策略
5172
+				this.repeatMsg = result["msg"];
5173
+				this.showRepeatModal(postData, "ordinary", this.goType);
5174
+      }else if (result["status"] == 100043){
5175
+				this.showPromptModal("建单", true, result["msg"]);
5176
+			}
5177
+			else{
5178
+				this.showPromptModal("建单", false, result["msg"]);
5179
+			}
5038 5180
     });
5039 5181
   }
5182
+	
5183
+	limitTimeModal: boolean = false; //模态框
5184
+	limitTimeInfo:string = '';
5185
+	limitTimeItem: any = {};
5186
+	hideLimitTimeModal() {
5187
+	  this.limitTimeModal = false;
5188
+	}
5189
+	
5190
+	// 建单判断时间-护士端建单通用方法
5191
+	isShowConfirm:boolean = true;
5192
+	isShowConfirmInfo:string = '';
5193
+	newOrderTimeFun(order, fun1, fun2){
5194
+	  fun2.call(this)
5195
+	}
5196
+	
5197
+	repeatModal: boolean = false; //删除模态框
5198
+	repeatMsg = "";
5199
+	loadingRepeat = false;
5200
+	repeatPostData;
5201
+	sourceType;
5202
+	showRepeatModal(postData, sourceType, go) {
5203
+	  this.repeatModal = true;
5204
+	  this.repeatPostData = postData;
5205
+	  this.sourceType = sourceType;
5206
+		// if(this.goType=='&go&'){
5207
+		// 	this.showRepetitionModal("建单", true, "", "closeGo");
5208
+		// }
5209
+	}
5210
+	hideRepeatModal() {
5211
+	  this.repeatModal = false;
5212
+	  this.btnLoading = false;
5213
+		this.confirmType = false;
5214
+		if(this.goType=='&go&'){
5215
+			console.log('fou222222')
5216
+			this.showNewOrder("&go&");
5217
+			// this.showRepetitionModal("建单", true, "", "closeGo");
5218
+		}
5219
+	}
5220
+	
5221
+	confirmType:boolean = false;
5222
+	confirmRepeat() {
5223
+		this.confirmType = true;
5224
+	  this.loadingRepeat = true;
5225
+	  this.repeatPostData.tipsCreateOder = 1;
5226
+		let url = null;
5227
+		if(this.isYyInspect){
5228
+			url = this.mainService.postCustom("api", "appointmentOrder", this.repeatPostData)
5229
+		}else{
5230
+			url = this.mainService.buildOrder(this.repeatPostData)
5231
+		}
5232
+	 url.subscribe((data) => {
5233
+	    this.loadingRepeat = false;
5234
+	    this.repeatModal = false;
5235
+			if(this.currentDept.typeValue == 'recovery'){
5236
+			  this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.repeatPostData.workOrder.patient.patientCode}).subscribe((resultData) => {
5237
+			    this.confirmRepeatFun(data);
5238
+			  });
5239
+			}else{
5240
+			  this.confirmRepeatFun(data);
5241
+			}
5242
+	    
5243
+	  });
5244
+	}
5245
+	confirmRepeatFun(data){
5246
+		console.log(10087,this.sourceType)
5247
+	  if (this.sourceType === "specimen") {
5248
+	    // 标本建单
5249
+			if (data.status == 200){
5250
+				this.showRepetitionModal("创建", true, "");
5251
+			}else if(data.status == 100043){
5252
+				this.showRepetitionModal("创建", true, data.msg);
5253
+			}else{
5254
+				this.showRepetitionModal("创建", false, data.msg);
5255
+			}
5256
+	  //   if (data.status == 200 && (this.taskType == "other" || this.taskType == "ordinary")) {
5257
+	  //     this.showRepetitionModal("创建", true, "", this.taskType);
5258
+	  //   } else if (data.status == 200 && this.taskType == "bb") {
5259
+	  //     this.showRepetitionModal("创建", true, "", "bb");
5260
+	  //   } else if (this.taskType == "bb" && data.status == 100043) {
5261
+	  //     this.showRepetitionModal("创建", true, data.msg);
5262
+	  //   } else if (data.status == 100043){
5263
+	  //     this.showRepetitionModal("创建", true, data.msg);
5264
+	  //   } else {
5265
+			// 	this.showRepetitionModal("创建", false, data.msg);
5266
+			// }
5267
+	  } else if (this.sourceType === "other" || this.sourceType === "ordinary") {
5268
+			// 其他建单
5269
+			if (data.status == 200){
5270
+				this.showRepetitionModal("创建", true, "");
5271
+			}else if(data.status == 100043){
5272
+				this.showRepetitionModal("创建", true, data.msg);
5273
+			}else{
5274
+				this.showRepetitionModal("创建", false, data.msg);
5275
+			}
5276
+	    // if (data.status == 200 && (this.taskType == "other" || this.taskType == "ordinary")) {
5277
+	    //   this.showRepetitionModal("创建", true, "", this.taskType);
5278
+	    // } else if (data.status == 200 && this.taskType == "bb") {
5279
+	    //   this.showRepetitionModal("创建", true, "", "bb");
5280
+	    // } else if (this.taskType == "bb" && data.status == 100043) {
5281
+	    //   this.showRepetitionModal("创建", true, data.msg);
5282
+	    // } else if (data.status == 100043){
5283
+	    //   this.showRepetitionModal("创建", true, data.msg);
5284
+	    // } else {
5285
+	    //   this.showRepetitionModal("创建", false, data.msg);
5286
+	    // }
5287
+	  } else if (this.sourceType === "transport") {
5288
+	    // 转运
5289
+	    if (data.status == 200) {
5290
+	      this.showRepetitionModal("创建", true, "");
5291
+	    } else if (data.status == 100042) {
5292
+	      this.showRepetitionModal("创建", false, data.msg);
5293
+	    } else {
5294
+	      this.showRepetitionModal("创建", false, data.msg);
5295
+	    }
5296
+	  } else if (this.sourceType === "accompany1") {
5297
+	    // 陪检
5298
+	    if (data.status == 200) {
5299
+	      this.showRepetitionModal("创建", true, "");
5300
+	    } else if (data.status == 100042) {
5301
+	      this.showRepetitionModal("创建", false, data.msg);
5302
+	    } else {
5303
+	      this.showRepetitionModal("创建", false, data.msg);
5304
+	    }
5305
+	  } else if (this.sourceType === "accompany2") {
5306
+	    // 陪检
5307
+	    if (data.status == 200) {
5308
+	      this.showRepetitionModal("创建", true, "");
5309
+	    } else if (data.status == 100042) {
5310
+	      this.showRepetitionModal("创建", false, data.msg);
5311
+	    } else {
5312
+	      this.showRepetitionModal("创建", false, data.msg);
5313
+	    }
5314
+	  } else if (this.sourceType === "accompany3") {
5315
+	    // 陪检
5316
+	    if (data.status == 200) {
5317
+	      this.showRepetitionModal("创建", true, "");
5318
+	    } else if (data.status == 100042) {
5319
+	      this.showRepetitionModal("创建", false, data.msg);
5320
+	    } else {
5321
+	      this.showRepetitionModal("创建", false, data.msg);
5322
+	    }
5323
+	  } else if (this.sourceType === "accompany4") {
5324
+	    // 陪检
5325
+	    if (data.status == 200) {
5326
+	      this.showRepetitionModal("创建", true, "");
5327
+	    } else if (data.status == 100042) {
5328
+	      this.showRepetitionModal("创建", false, data.msg);
5329
+	    } else {
5330
+	      this.showRepetitionModal("创建", false, data.msg);
5331
+	    }
5332
+	  } else if (this.sourceType === "accompany5") {
5333
+	    // 陪检
5334
+	    if (data.status == 200) {
5335
+	      this.showRepetitionModal("创建", true, "");
5336
+	    } else if (data.status == 100042) {
5337
+	      this.showRepetitionModal("创建", false, data.msg);
5338
+	    } else {
5339
+	      this.showRepetitionModal("创建", false, data.msg);
5340
+	    }
5341
+	  } else {
5342
+			if (data.status == 200) {
5343
+			  this.showRepetitionModal("创建", true, "");
5344
+			} else if (data.status == 100042) {
5345
+			  this.showRepetitionModal("创建", false, data.msg);
5346
+			} else if (data.status == 100043) {
5347
+			  this.showRepetitionModal("创建", true, data.msg);
5348
+			} else {
5349
+			  this.showRepetitionModal("创建", false, data.msg);
5350
+			}
5351
+		}
5352
+	}
5353
+	
5040 5354
   // 隐藏选择转入科室的模态框
5041 5355
   deptFlagHand(e) {
5042 5356
     this.deptFlag = false;
@@ -5129,14 +5443,48 @@ export class FuwutaiComponent implements OnInit {
5129 5443
         }
5130 5444
       });
5131 5445
   }
5132
-
5446
+	
5447
+	// 确认
5448
+	jdFlagId;
5449
+	limitTimeLoading:boolean = false;
5450
+	confirmLimitTime() {
5451
+	  console.log(this.limitTimeItem);
5452
+	  this.limitTimeModal = false;
5453
+	  this.jdFlagId = this.msg.loading("正在加载中..", {
5454
+	    nzDuration: 0,
5455
+	  }).messageId;
5456
+	  this.limitTimeItem.fun2.call(this);
5457
+	}
5458
+	
5133 5459
   closeModel(e) {
5460
+		console.log(99999,e)
5134 5461
     if (e === "close") {
5462
+			this.goType = null;
5135 5463
       this.newOrderShowOpen = false; //此时可出现新的弹窗
5136 5464
     } else if (e === "closeGo") {
5465
+			console.log(1111)
5137 5466
       this.showNewOrder("&go&");
5138
-    }
5467
+    }else if(this.dataStatus==1000033 && this.goType=='&go&'){
5468
+			console.log(2222)
5469
+			this.showNewOrder("&go&");
5470
+		}
5139 5471
   }
5472
+	
5473
+	// 重复建单提示框
5474
+	showRepetitionModal(con, success, promptInfo?, back?){
5475
+		this.promptModalShow = false;
5476
+		this.promptContent = con;
5477
+		this.ifSuccess = success;
5478
+		this.promptInfo = promptInfo;
5479
+		this.back = back || "";
5480
+		setTimeout(() => {
5481
+			if(this.confirmType || this.goType=='&go&'){
5482
+				this.showPromptModalRefresh();
5483
+				this.promptModalShow = true;
5484
+			}
5485
+		}, 100);
5486
+	}
5487
+	
5140 5488
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
5141 5489
   showPromptModal(con, success, promptInfo?, back?) {
5142 5490
     this.promptModalShow = false;
@@ -5151,6 +5499,8 @@ export class FuwutaiComponent implements OnInit {
5151 5499
   }
5152 5500
 
5153 5501
   showPromptModalRefresh(){
5502
+		// this.goType = null;
5503
+		// this.confirmType = false;
5154 5504
     this.getUnassignedBuilding2();
5155 5505
     this.resetList();
5156 5506
     this.getOrderList(1);
@@ -5167,6 +5517,8 @@ export class FuwutaiComponent implements OnInit {
5167 5517
     } else if (this.currentRTab === 3) {
5168 5518
       this.getDictionaryList();
5169 5519
     }
5520
+		// this.newOrderShow = false;
5521
+		// this.newOrderShowOpen = false;
5170 5522
     this.fixedTab = "";
5171 5523
     this.fixedMenuShangla();
5172 5524
   }

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

@@ -214,11 +214,15 @@
214 214
                   </div>
215 215
                   <div [title]="data.evaluationContent"
216 216
                     [ngClass]="{'over':true,'noOver':(isOpen&&coopOpenId==data.id)}">
217
-                    意见内容:{{data.evaluationContent}}</div>
218
-                  <div class="up">
217
+                    评价内容:{{data.evaluationContent}}</div>
218
+                  <!-- <div class="up">
219 219
                     <span (click)="more(data.id)">{{(isOpen&&coopOpenId==data.id)?'收起 <<':'展开>>'}}</span>
220
-                  </div>
221
-                  <div class="time">发起时间:{{data.startTime|date:'yyyy-MM-dd HH:mm:ss'}}</div>
220
+                  </div> -->
221
+									 <div class="flex">
222
+										 <div>评价时间:{{data.evaluationTime|date:'yyyy-MM-dd HH:mm:ss' || ''}}</div>
223
+										 <div>评价等级:{{data.evaluationLevel ? data.evaluationLevel.name : '-'}}</div>
224
+									 </div>
225
+                  <!-- <div class="time">发起时间:{{data.startTime|date:'yyyy-MM-dd HH:mm:ss'}}</div> -->
222 226
                 </div>
223 227
                 <div class="btns display_flex">
224 228
                   <div class="btn flex_1" (click)="designate(data.id,data.hosId)">指派</div>

+ 7 - 1
src/app/views/home/home.component.less

@@ -421,7 +421,12 @@
421 421
                   width: 100%;
422 422
                   padding: 16px 16px 8px 16px;
423 423
                   font-size: 12px;
424
-
424
+									
425
+									.flex{
426
+										display: flex;
427
+										justify-content: space-between;
428
+									}
429
+									
425 430
                   .title {
426 431
                     color: #333;
427 432
 
@@ -445,6 +450,7 @@
445 450
                     &.noOver {
446 451
                       -webkit-line-clamp: unset;
447 452
                     }
453
+										
448 454
                   }
449 455
 
450 456
                   .up {

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

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

+ 2 - 2
src/app/views/jp-search/jp-search.component.html

@@ -4,7 +4,7 @@
4 4
       <div nz-col nzXl='16' class="list-template__searchBox">
5 5
         <div class="list-template__searchItem">
6 6
           <span class="label">静配标识:</span>
7
-          <input nz-input class="formItem" placeholder="请输入静配标识" [(ngModel)]="searchCriteria.id" />
7
+          <input nz-input class="formItem" placeholder="请输入静配标识" [(ngModel)]="searchCriteria.packid" />
8 8
         </div>
9 9
         <div class="list-template__searchItem">
10 10
           <span class="label">发药科室:</span>
@@ -82,7 +82,7 @@
82 82
             <td>{{ data.target?.dept }}</td>
83 83
             <td>{{ data.creatTime }}</td>
84 84
             <td>{{ data.jpstate?.name }}</td>
85
-            <td>{{data.id}}</td>
85
+            <td>{{data.packid}}</td>
86 86
           </tr>
87 87
         </tbody>
88 88
       </nz-table>

+ 4 - 4
src/app/views/jp-search/jp-search.component.ts

@@ -14,7 +14,7 @@ export class JpSearchComponent implements OnInit {
14 14
 
15 15
   searchCriteria = {
16 16
     //搜索条件
17
-    id: "", //静配标识
17
+    packid: "", //静配标识
18 18
     launch: null, //发药科室
19 19
     target: null, //发药科室
20 20
     jpstate: null,
@@ -52,7 +52,7 @@ export class JpSearchComponent implements OnInit {
52 52
   reset() {
53 53
     this.searchCriteria = {
54 54
       //搜索条件
55
-      id: "",
55
+      packid: "",
56 56
       launch: null,
57 57
       target: null,
58 58
       jpstate: null,
@@ -134,8 +134,8 @@ export class JpSearchComponent implements OnInit {
134 134
     if (this.searchCriteria.launch) {
135 135
       postData.jPBag.launch = { id: this.searchCriteria.launch };
136 136
     }
137
-    if (this.searchCriteria.id) {
138
-      postData.jPBag.id = this.searchCriteria.id;
137
+    if (this.searchCriteria.packid) {
138
+      postData.jPBag.packid = this.searchCriteria.packid;
139 139
     }
140 140
     this.loading1 = true;
141 141
     this.mainService

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

@@ -632,6 +632,11 @@ const routes: Routes = [
632 632
 			{
633 633
 			  path: "specimenPackage",
634 634
 			  loadChildren: () => import("../specimen-package/specimen-package.module").then((m) => m.SpecimenPackageModule),
635
+      },
636
+			// 手术信息
637
+			{
638
+			  path: "operationSearch",
639
+			  loadChildren: () => import("../operation-search/operation-search.module").then((m) => m.OperationSearchModule),
635 640
 			}
636 641
     ],
637 642
   },

+ 34 - 8
src/app/views/new-statistics/components/custom-change-date/custom-change-date.component.ts

@@ -1,17 +1,22 @@
1
-import { Component, OnInit, Input } from '@angular/core';
1
+import { Component, OnInit, Input, OnDestroy } from '@angular/core';
2 2
 import { differenceInCalendarDays, endOfMonth, endOfYear, startOfDay, format, endOfDay, startOfMonth, startOfYear } from "date-fns";
3 3
 import { DateService } from 'src/app/services/date.service';
4
+import { ActivatedRoute, Router, NavigationEnd  } from '@angular/router';
5
+import { debounceTime, filter } from 'rxjs/operators';
4 6
 
5 7
 @Component({
6 8
   selector: 'app-custom-change-date',
7 9
   templateUrl: './custom-change-date.component.html',
8 10
   styleUrls: ['./custom-change-date.component.less']
9 11
 })
10
-export class CustomChangeDateComponent implements OnInit {
12
+export class CustomChangeDateComponent implements OnInit, OnDestroy {
11 13
   @Input() isShowType: boolean = true;
14
+	// @Input() dateData1: any;
15
+	// @Input() dateData2: any;
12 16
   @Input() name: string = '建单时间';
13 17
   constructor(
14 18
     private dateService: DateService,
19
+		private router: Router,
15 20
   ) { }
16 21
 
17 22
   dateType: string = "day"; //选中时间维度
@@ -68,21 +73,42 @@ export class CustomChangeDateComponent implements OnInit {
68 73
   yearRangeEnd: any; //发起时间 年 止
69 74
 
70 75
   ngOnInit() {
71
-    this.resetByDate();
76
+		this.resetByDate();
77
+		// this.router.events
78
+		//   .pipe(filter(event => event instanceof NavigationEnd))
79
+		//   .subscribe((event: NavigationEnd) => {
80
+		//     if(event.urlAfterRedirects.endsWith('/incidentList')){
81
+		// 			this.resetByDate();
82
+		//     }
83
+		//   });
72 84
   }
73
-
85
+	
86
+	ngOnDestroy(){
87
+		// this.dateData1 = null 
88
+		// this.dateData2 = null
89
+	}
90
+	
74 91
   // 根据时间区间重置
75 92
   resetByDate(){
76
-    this.dateType = 'day';
77
-    this.changeDateType(this.dateType, 6);
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
+		})
78 104
   }
79 105
 
80 106
   // 根据时间区间初始化
81
-  initByDate(dateRange:any[]){
107
+  initByDate(dateRange:any[], dateNum:any= 6){
82 108
     setTimeout(() => {
83 109
       this.dateType = 'day';
84 110
       this.dateRange = dateRange;
85
-      this.changeDateType(this.dateType, null);
111
+      this.changeDateType(this.dateType, dateNum);
86 112
     }, 0)
87 113
   }
88 114
 

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

@@ -6,7 +6,7 @@
6 6
       <form nz-form [formGroup]="validateForm" class="addForm">
7 7
         <nz-form-item [hidden]="!fieldConfig.config.group">
8 8
           <nz-form-label [nzSpan]="6" nzFor="groupId">分<span style="visibility: hidden;">囧囧</span>组</nz-form-label>
9
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择分组!">
9
+          <nz-form-control [nzSpan]="17" nzErrorTip="请选择分组!">
10 10
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeGroupInp($event)" formControlName="groupId" nzPlaceHolder="请选择分组" (nzOpenChange)="openChangeGroup($event)" (ngModelChange)="changeGroup($event)">
11 11
               <ng-container *ngFor="let option of groupList">
12 12
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.groupName" [nzValue]="option.id"></nz-option>
@@ -20,7 +20,7 @@
20 20
 
21 21
         <nz-form-item [hidden]="!fieldConfig.config.groupAndUser">
22 22
           <nz-form-label [nzSpan]="6" nzFor="groupId">分<span style="visibility: hidden;">囧囧</span>组</nz-form-label>
23
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择分组!">
23
+          <nz-form-control [nzSpan]="17" nzErrorTip="请选择分组!">
24 24
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeGroupInp($event)" formControlName="groupId" nzPlaceHolder="请选择分组" (nzOpenChange)="openChangeGroup($event)" (ngModelChange)="changeGroup($event)">
25 25
               <ng-container *ngFor="let option of groupList">
26 26
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.groupName" [nzValue]="option.id"></nz-option>
@@ -34,7 +34,7 @@
34 34
 
35 35
         <nz-form-item [hidden]="!fieldConfig.config.groupAndUser">
36 36
           <nz-form-label [nzSpan]="6" nzFor="userId">人<span style="visibility: hidden;">囧囧</span>员</nz-form-label>
37
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择人员!">
37
+          <nz-form-control [nzSpan]="17" nzErrorTip="请选择人员!">
38 38
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeUserInp($event)" formControlName="userId" nzPlaceHolder="请选择人员" (nzOpenChange)="openChangeUser($event)" (ngModelChange)="setIsSelecting(true)">
39 39
               <ng-container *ngFor="let option of userList">
40 40
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
@@ -48,7 +48,7 @@
48 48
 
49 49
         <nz-form-item [hidden]="!fieldConfig.config.statisticsType">
50 50
           <nz-form-label [nzSpan]="6" nzFor="statisticsTypeId">统计分类</nz-form-label>
51
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择统计分类!">
51
+          <nz-form-control [nzSpan]="17" nzErrorTip="请选择统计分类!">
52 52
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="statisticsTypeId" nzPlaceHolder="请选择统计分类">
53 53
               <ng-container *ngFor="let option of statisticsTypeList">
54 54
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
@@ -62,7 +62,7 @@
62 62
 
63 63
         <nz-form-item [hidden]="!fieldConfig.config.taskType">
64 64
           <nz-form-label [nzSpan]="6" nzFor="taskTypeId">任务类型</nz-form-label>
65
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择任务类型!">
65
+          <nz-form-control [nzSpan]="17" nzErrorTip="请选择任务类型!">
66 66
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeTaskTypeInp($event)" formControlName="taskTypeId" nzPlaceHolder="请选择任务类型" (nzOpenChange)="openChangeTaskType($event)" (ngModelChange)="setIsSelecting(true)">
67 67
               <ng-container *ngFor="let option of taskTypeList">
68 68
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.hosId.hosName + '-' + option.taskName" [nzValue]="option.id"></nz-option>
@@ -76,7 +76,7 @@
76 76
 
77 77
         <nz-form-item [hidden]="!fieldConfig.config.building">
78 78
           <nz-form-label [nzSpan]="6" nzFor="buildingId">楼<span style="visibility: hidden;">囧囧</span>栋</nz-form-label>
79
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择楼栋!">
79
+          <nz-form-control [nzSpan]="17" nzErrorTip="请选择楼栋!">
80 80
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeBuildingInp($event)" formControlName="buildingId" nzPlaceHolder="请选择楼栋" (nzOpenChange)="openChangeBuilding($event)" (ngModelChange)="setIsSelecting(true)">
81 81
               <ng-container *ngFor="let option of buildingList">
82 82
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName + '-' + option.buildingName" [nzValue]="option.id"></nz-option>
@@ -90,7 +90,7 @@
90 90
 
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
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择科室!">
93
+          <nz-form-control [nzSpan]="17" nzErrorTip="请选择科室!">
94 94
             <nz-select [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>
@@ -104,17 +104,17 @@
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
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择来源!">
107
+				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择来源!">
108 108
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="sourceId" nzPlaceHolder="请选择来源">
109 109
 				      <ng-container *ngFor="let option of sourceList">
110
-				        <nz-option [nzLabel]="option.name " [nzValue]="option.name"></nz-option>
110
+				        <nz-option [nzLabel]="option.name " [nzValue]="option.sourceId"></nz-option>
111 111
 				      </ng-container>
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
-				  <nz-form-label [nzSpan]="7" nzFor="minuteClose">分钟内关单</nz-form-label>
117
+				  <nz-form-label [nzSpan]="6" nzFor="minuteClose">分钟内关单</nz-form-label>
118 118
 				  <nz-form-control [nzSpan]="17" nzErrorTip="请输入分钟内关单!">
119 119
 						<nz-input-number
120 120
 							class="width-200"
@@ -129,9 +129,9 @@
129 129
 				</nz-form-item>
130 130
 				
131 131
 				<nz-form-item [hidden]="!fieldConfig.config.special">
132
-				  <nz-form-label [nzSpan]="8" nzFor="specialId">特殊情况关闭</nz-form-label>
133
-				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择特殊情况关闭!">
134
-				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="specialId" nzPlaceHolder="请选择特殊情况关闭">
132
+				  <nz-form-label [nzSpan]="6" nzFor="specialId">特殊关闭</nz-form-label>
133
+				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择特殊关闭!">
134
+				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="specialId" nzPlaceHolder="请选择特殊关闭">
135 135
 				      <ng-container *ngFor="let option of specialList">
136 136
 				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
137 137
 				      </ng-container>
@@ -139,31 +139,31 @@
139 139
 				  </nz-form-control>
140 140
 				</nz-form-item>
141 141
 				
142
-				<nz-form-item [hidden]="!fieldConfig.config.overtime">
142
+			<!-- 	<nz-form-item [hidden]="!fieldConfig.config.overtime">
143 143
 				  <nz-form-label [nzSpan]="6" nzFor="overtimeId">超时工单</nz-form-label>
144
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择超时工单!">
144
+				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择超时工单!">
145 145
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="overtimeId" nzPlaceHolder="请选择超时工单">
146 146
 				      <ng-container *ngFor="let option of overtimeList">
147 147
 				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
148 148
 				      </ng-container>
149 149
 				    </nz-select>
150 150
 				  </nz-form-control>
151
-				</nz-form-item>
151
+				</nz-form-item> -->
152 152
 				
153
-				<nz-form-item [hidden]="!fieldConfig.config.abnormal">
153
+			<!-- 	<nz-form-item [hidden]="!fieldConfig.config.abnormal">
154 154
 				  <nz-form-label [nzSpan]="6" nzFor="abnormalId">异常工单</nz-form-label>
155
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择异常工单!">
155
+				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择异常工单!">
156 156
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="abnormalId" nzPlaceHolder="请选择异常工单">
157 157
 				      <ng-container *ngFor="let option of abnormalList">
158 158
 				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
159 159
 				      </ng-container>
160 160
 				    </nz-select>
161 161
 				  </nz-form-control>
162
-				</nz-form-item>
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
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择评价!">
166
+				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择评价!">
167 167
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="evaluateId" nzPlaceHolder="请选择评价">
168 168
 				      <ng-container *ngFor="let option of evaluateList">
169 169
 				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
@@ -177,7 +177,7 @@
177 177
 				
178 178
 				<nz-form-item [hidden]="!fieldConfig.config.executeUser">
179 179
 				  <nz-form-label [nzSpan]="6" nzFor="executeUserId">执行人</nz-form-label>
180
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择人员!">
180
+				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择人员!">
181 181
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeExecuteUserInp($event)" formControlName="executeUserId" nzPlaceHolder="请选择人员" (nzOpenChange)="openChangeExecuteUser($event)" (ngModelChange)="setIsSelecting(true)">
182 182
 				      <ng-container *ngFor="let option of executeUserList">
183 183
 				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
@@ -191,7 +191,7 @@
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
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择人员!">
194
+				  <nz-form-control [nzSpan]="17" nzErrorTip="请选择人员!">
195 195
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzShowSearch formControlName="timeFrameId" nzPlaceHolder="请选择时段">
196 196
 				      <ng-container *ngFor="let option of timeFrameList">
197 197
 				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
@@ -202,7 +202,7 @@
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
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请输入单号!">
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>

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

@@ -82,18 +82,23 @@
82 82
   // 新增
83 83
   &.add {
84 84
     .modalBody {
85
-      width: 400px;
85
+      width: 80%;
86 86
       padding: 0 24px;
87 87
 
88 88
       .content {
89 89
         width: 100%;
90
-        padding: 10px 24px 0;
90
+        padding: 10px 10px 0;
91 91
 				 max-height: calc(100vh - 120px);
92 92
 				 overflow-y: auto;
93 93
 
94 94
         .addForm {
95
+          display: flex;
96
+          flex-wrap: wrap;
97
+          justify-content: start;
95 98
           .ant-form-item {
96
-            margin-bottom: 14px;
99
+          	width: 33%;
100
+            // margin-bottom: 14px;
101
+						margin: 0 3px 14px 0;
97 102
             .ant-form-item-label {
98 103
               text-align: left;
99 104
             }

+ 64 - 23
src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.ts

@@ -19,6 +19,7 @@ export class DistributionSearchMoreComponent implements OnInit {
19 19
   @Input() parentDutyId: any;
20 20
   @Input() dutyId: any;
21 21
   @Input() queryType: any;
22
+	@Input() going: boolean = false;
22 23
   validateForm: FormGroup;//表单
23 24
   searchTimerSubject = new Subject();
24 25
   constructor(
@@ -45,6 +46,7 @@ export class DistributionSearchMoreComponent implements OnInit {
45 46
       let fun = v[0];
46 47
       fun.call(this, v[1]);
47 48
     });
49
+		console.log(4444,this.fieldConfig)
48 50
     this.initForm();
49 51
     this.getSourceList();
50 52
 		this.getSourceDataList();
@@ -88,6 +90,32 @@ export class DistributionSearchMoreComponent implements OnInit {
88 90
 			codeNum: [this.fieldConfig.fields.codeNum || null],
89 91
 			timeFrameId: [this.fieldConfig.fields.timeFrameDTO ? this.fieldConfig.fields.timeFrameDTO.id  : null],
90 92
 		});
93
+		
94
+		
95
+		if(this.going && this.fieldConfig.fields.taskTypeId){
96
+			this.getTaskTypeList();
97
+		}
98
+		
99
+		if(this.going && this.fieldConfig.fields.deptId){
100
+			this.getRepairDeptList();
101
+		}
102
+		
103
+		if(this.going && this.fieldConfig.fields.sourceId){
104
+			this.getSourceList();
105
+		}
106
+		
107
+		if(this.going && this.fieldConfig.fields.evaluateId){
108
+			this.getWorkHourEvaluateList();
109
+		}
110
+		
111
+		if(this.going && this.fieldConfig.fields.executeUserId){
112
+			this.getExecuteUserList();
113
+		}
114
+		
115
+		if(this.going && this.fieldConfig.fields.timeFrameId){
116
+			this.getTimeFrameList();
117
+		}
118
+		
91 119
   }
92 120
   // 表单提交
93 121
   submitForm(): void {
@@ -224,8 +252,8 @@ export class DistributionSearchMoreComponent implements OnInit {
224 252
 
225 253
   changeGroup(id){
226 254
     this.setIsSelecting(true);
227
-    this.userList = [];
228
-    this.validateForm.controls.userId.setValue(null);
255
+    // this.userList = [];
256
+    // this.validateForm.controls.userId.setValue(null);
229 257
     this.getUserList();
230 258
   }
231 259
 
@@ -239,24 +267,31 @@ export class DistributionSearchMoreComponent implements OnInit {
239 267
   // 获取人员列表
240 268
   userList:any[] = [];
241 269
   getUserList(keyword = ''){
242
-    if(!this.validateForm.value.groupId){
243
-      this.isLoading = false;
244
-      this.userList = [];
245
-      return;
246
-    }
270
+    // if(!this.validateForm.value.groupId){
271
+    //   this.isLoading = false;
272
+    //   this.userList = [];
273
+    //   return;
274
+    // }
247 275
     let postData: any = {
248 276
       idx: 0,
249 277
       sum: 20,
250 278
       user: {
251 279
         name: keyword,
252 280
         simpleQuery: true,
253
-        groupdata: { id: this.validateForm.value.groupId },
281
+				statisticalHosId: this.getHosId,
282
+        // groupdata: { id: this.validateForm.value.groupId },
254 283
       },
255 284
     };
256 285
     this.isLoading = true;
257 286
     this.mainService.getFetchDataList("simple/data", "user", postData).subscribe(result => {
258 287
       this.isLoading = false;
259 288
       if(result.status == 200){
289
+				if(!result.list.find(i=> i.id == -1)){
290
+					result.list.push({
291
+						name:'未知',
292
+						id:-1
293
+					})
294
+				}
260 295
         this.userList = result.list || [];
261 296
       }else{
262 297
         this.userList = [];
@@ -385,19 +420,24 @@ export class DistributionSearchMoreComponent implements OnInit {
385 420
 	// 获取来源列表
386 421
 	sourceList:any[] = [];
387 422
 	getSourceDataList(keyword?){
388
-	  let postData:any = {
389
-	    idx: 0,
390
-	    sum: 9999,
391
-	    hosId: this.getHosId,
392
-	  };
393
-
394
-	  this.isLoading = true;
395
-	  this.mainService
396
-	    .postCustom("itsm/report", "sourceTransOrder", postData)
397
-	    .subscribe((result) => {
398
-	      this.isLoading = false;
399
-	      this.sourceList = result.dataList;
400
-	    });
423
+		this.sourceList = [
424
+			{
425
+				sourceId:1,
426
+				name:"服务台"
427
+			},
428
+			{
429
+				sourceId:2,
430
+				name:"护士端"
431
+			},
432
+			{
433
+				sourceId:3,
434
+				name:"系统自动"
435
+			},
436
+			{
437
+				sourceId:4,
438
+				name:"微信端"
439
+			},
440
+		]
401 441
 	}
402 442
 	
403 443
 	// =================评价===================
@@ -455,10 +495,11 @@ export class DistributionSearchMoreComponent implements OnInit {
455 495
 	// 获取时段列表
456 496
 	timeFrameList:any[] = [];
457 497
 	getTimeFrameList(){
498
+		this.timeFrameList = [];
458 499
 	  for(let i=0; i<24; i++){
459 500
 			this.timeFrameList.push({
460
-				name: i,
461
-				id: i
501
+				name: i < 10 ? '0'+i.toString() : i.toString(),
502
+				id: i < 10 ? '0'+i.toString() : i.toString(),
462 503
 			})
463 504
 		}
464 505
 	}

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

@@ -6,7 +6,7 @@
6 6
       <form nz-form [formGroup]="validateForm" class="addForm">
7 7
         <nz-form-item [hidden]="!fieldConfig.config.workHourParent">
8 8
           <nz-form-label [nzSpan]="6" nzFor="workHourParentId">工时大类</nz-form-label>
9
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择工时大类!">
9
+          <nz-form-control [nzSpan]="16" nzErrorTip="请选择工时大类!">
10 10
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeWorkHourParentInp($event)" formControlName="workHourParentId" nzPlaceHolder="请选择工时大类" (nzOpenChange)="openChangeWorkHourParent($event)" (ngModelChange)="setIsSelecting(true)">
11 11
               <ng-container *ngFor="let option of workHourParentList">
12 12
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.workName" [nzValue]="option.id"></nz-option>
@@ -20,7 +20,7 @@
20 20
 				
21 21
 				<nz-form-item [hidden]="!fieldConfig.config.workHourSmall">
22 22
 				  <nz-form-label [nzSpan]="6" nzFor="workHourSmallId">工时小类</nz-form-label>
23
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择工时小类!">
23
+				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择工时小类!">
24 24
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeWorkHourSmallInp($event)" formControlName="workHourSmallId" nzPlaceHolder="请选择工时小类" (nzOpenChange)="openChangeWorkHourSmall($event)" (ngModelChange)="setIsSelecting(true)">
25 25
 				      <ng-container *ngFor="let option of workHourSmallList">
26 26
 				        <nz-option *ngIf="!isLoading" [nzLabel]="option.workName" [nzValue]="option.id"></nz-option>
@@ -34,7 +34,7 @@
34 34
 				
35 35
         <nz-form-item [hidden]="!fieldConfig.config.group">
36 36
           <nz-form-label [nzSpan]="6" nzFor="groupId">维修分组</nz-form-label>
37
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择维修分组!">
37
+          <nz-form-control [nzSpan]="16" nzErrorTip="请选择维修分组!">
38 38
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeGroupInp($event)" formControlName="groupId" nzPlaceHolder="请选择维修分组" (nzOpenChange)="openChangeGroup($event)" (ngModelChange)="changeGroup($event)">
39 39
               <ng-container *ngFor="let option of groupList">
40 40
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.groupName" [nzValue]="option.id"></nz-option>
@@ -48,7 +48,7 @@
48 48
 
49 49
         <nz-form-item [hidden]="!fieldConfig.config.groupAndUser">
50 50
           <nz-form-label [nzSpan]="6" nzFor="groupId">维修分组</nz-form-label>
51
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择维修分组!">
51
+          <nz-form-control [nzSpan]="16" nzErrorTip="请选择维修分组!">
52 52
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeGroupInp($event)" formControlName="groupId" nzPlaceHolder="请选择维修分组" (nzOpenChange)="openChangeGroup($event)" (ngModelChange)="changeGroup($event)">
53 53
               <ng-container *ngFor="let option of groupList">
54 54
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.groupName" [nzValue]="option.id"></nz-option>
@@ -62,7 +62,7 @@
62 62
 
63 63
         <nz-form-item [hidden]="!fieldConfig.config.groupAndUser">
64 64
           <nz-form-label [nzSpan]="6" nzFor="userId">维修人员</nz-form-label>
65
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择维修人员!">
65
+          <nz-form-control [nzSpan]="16" nzErrorTip="请选择维修人员!">
66 66
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeUserInp($event)" formControlName="userId" nzPlaceHolder="请选择维修人员" (nzOpenChange)="openChangeUser($event)" (ngModelChange)="setIsSelecting(true)">
67 67
               <ng-container *ngFor="let option of userList">
68 68
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
@@ -76,7 +76,7 @@
76 76
 
77 77
         <nz-form-item [hidden]="!fieldConfig.config.category123">
78 78
           <nz-form-label [nzSpan]="6" nzFor="category1Id">一级分类</nz-form-label>
79
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择一级分类!">
79
+          <nz-form-control [nzSpan]="16" nzErrorTip="请选择一级分类!">
80 80
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeCategory1Inp($event)" formControlName="category1Id" nzPlaceHolder="请选择一级分类" (nzOpenChange)="openChangeCategory1($event)" (ngModelChange)="changeCategory1($event)">
81 81
               <ng-container *ngFor="let option of category1List">
82 82
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.category" [nzValue]="option.id"></nz-option>
@@ -90,7 +90,7 @@
90 90
 
91 91
         <nz-form-item [hidden]="!fieldConfig.config.category123">
92 92
           <nz-form-label [nzSpan]="6" nzFor="category2Id">二级分类</nz-form-label>
93
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择二级分类!">
93
+          <nz-form-control [nzSpan]="16" nzErrorTip="请选择二级分类!">
94 94
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeCategory2Inp($event)" formControlName="category2Id" nzPlaceHolder="请选择二级分类" (nzOpenChange)="openChangeCategory2($event)" (ngModelChange)="changeCategory2($event)">
95 95
               <ng-container *ngFor="let option of category2List">
96 96
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.category" [nzValue]="option.id"></nz-option>
@@ -104,7 +104,7 @@
104 104
 
105 105
         <nz-form-item [hidden]="!fieldConfig.config.category123">
106 106
           <nz-form-label [nzSpan]="6" nzFor="category3Id">三级分类</nz-form-label>
107
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择三级分类!">
107
+          <nz-form-control [nzSpan]="16" nzErrorTip="请选择三级分类!">
108 108
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeCategory3Inp($event)" formControlName="category3Id" nzPlaceHolder="请选择三级分类" (nzOpenChange)="openChangeCategory3($event)" (ngModelChange)="setIsSelecting(true)">
109 109
               <ng-container *ngFor="let option of category3List">
110 110
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.category" [nzValue]="option.id"></nz-option>
@@ -118,7 +118,7 @@
118 118
 
119 119
         <nz-form-item [hidden]="!fieldConfig.config.source">
120 120
           <nz-form-label [nzSpan]="6" nzFor="sourceId">故障来源</nz-form-label>
121
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择故障来源!">
121
+          <nz-form-control [nzSpan]="16" nzErrorTip="请选择故障来源!">
122 122
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="sourceId" nzPlaceHolder="请选择故障来源">
123 123
               <ng-container *ngFor="let option of sourceList">
124 124
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
@@ -132,7 +132,7 @@
132 132
 
133 133
         <nz-form-item [hidden]="!fieldConfig.config.buildingAndFloor">
134 134
           <nz-form-label [nzSpan]="6" nzFor="buildingId">楼<span style="visibility: hidden;">囧囧</span>栋</nz-form-label>
135
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择楼栋!">
135
+          <nz-form-control [nzSpan]="16" nzErrorTip="请选择楼栋!">
136 136
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeBuildingInp($event)" formControlName="buildingId" nzPlaceHolder="请选择楼栋" (nzOpenChange)="openChangeBuilding($event)" (ngModelChange)="changeBuilding($event)">
137 137
               <ng-container *ngFor="let option of buildingList">
138 138
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName + '-' + option.buildingName" [nzValue]="option.id"></nz-option>
@@ -146,7 +146,7 @@
146 146
 
147 147
         <nz-form-item [hidden]="!fieldConfig.config.buildingAndFloor">
148 148
           <nz-form-label [nzSpan]="6" nzFor="floorId">楼<span style="visibility: hidden;">囧囧</span>层</nz-form-label>
149
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择楼层!">
149
+          <nz-form-control [nzSpan]="16" nzErrorTip="请选择楼层!">
150 150
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeFloorInp($event)" formControlName="floorId" nzPlaceHolder="请选择楼层" (nzOpenChange)="openChangeFloor($event)" (ngModelChange)="setIsSelecting(true)">
151 151
               <ng-container *ngFor="let option of floorList">
152 152
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.floorName" [nzValue]="option.id"></nz-option>
@@ -160,7 +160,7 @@
160 160
 
161 161
         <nz-form-item [hidden]="!fieldConfig.config.company">
162 162
           <nz-form-label [nzSpan]="6" nzFor="companyId">三方公司</nz-form-label>
163
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择三方公司!">
163
+          <nz-form-control [nzSpan]="16" nzErrorTip="请选择三方公司!">
164 164
             <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeCompanyInp($event)" formControlName="companyId" nzPlaceHolder="请选择三方公司" (nzOpenChange)="openChangeCompany($event)" (ngModelChange)="setIsSelecting(true)">
165 165
               <ng-container *ngFor="let option of companyList">
166 166
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
@@ -174,7 +174,7 @@
174 174
 
175 175
         <nz-form-item [hidden]="!fieldConfig.config.repairDept">
176 176
           <nz-form-label [nzSpan]="6" nzFor="repairDeptId">报修科室</nz-form-label>
177
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择报修科室!">
177
+          <nz-form-control [nzSpan]="16" nzErrorTip="请选择报修科室!">
178 178
             <nz-select [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>
@@ -188,10 +188,10 @@
188 188
 				
189 189
 				<nz-form-item [hidden]="!fieldConfig.config.repairUser">
190 190
 				  <nz-form-label [nzSpan]="6" nzFor="repairUserId">报修人</nz-form-label>
191
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择报修人!">
191
+				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择报修人!">
192 192
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changerepairUserInp($event)" formControlName="repairUserId" nzPlaceHolder="请选择报修人" (nzOpenChange)="openChangerepairUser($event)" (ngModelChange)="setIsSelecting(true)">
193 193
 				      <ng-container *ngFor="let option of repairUserList">
194
-				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
194
+				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name +'('+ option.account +')'" [nzValue]="option.id"></nz-option>
195 195
 				      </ng-container>
196 196
 				      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
197 197
 				        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -202,7 +202,7 @@
202 202
 				
203 203
 				<nz-form-item [hidden]="!fieldConfig.config.deptType">
204 204
 				  <nz-form-label [nzSpan]="6" nzFor="deptTypeId">科室类型</nz-form-label>
205
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择科室类型!">
205
+				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择科室类型!">
206 206
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzShowSearch formControlName="deptTypeId" nzPlaceHolder="请选择科室类型" (nzOpenChange)="openChangeDeptType($event)">
207 207
 				      <ng-container *ngFor="let option of deptTypeList">
208 208
 				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
@@ -216,7 +216,7 @@
216 216
 				
217 217
 				<nz-form-item [hidden]="!fieldConfig.config.evaluate">
218 218
 				  <nz-form-label [nzSpan]="6" nzFor="evaluateId">评价</nz-form-label>
219
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择评价!">
219
+				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择评价!">
220 220
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="evaluateId" nzPlaceHolder="请选择评价">
221 221
 				      <ng-container *ngFor="let option of evaluateList">
222 222
 				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
@@ -230,10 +230,10 @@
230 230
 				
231 231
 				<nz-form-item [hidden]="!fieldConfig.config.consumable">
232 232
 				  <nz-form-label [nzSpan]="6" nzFor="consumableId">耗材</nz-form-label>
233
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择耗材!">
233
+				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择耗材!">
234 234
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeConsumableInp($event)" formControlName="consumableId" nzPlaceHolder="请选择耗材" (nzOpenChange)="openChangeConsumable($event)" (ngModelChange)="setIsSelecting(true)">
235 235
 				      <ng-container *ngFor="let option of consumableList">
236
-				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
236
+				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name +'-'+ option.model +'-'+ option.unit +'-'+ option.price" [nzValue]="option.id"></nz-option>
237 237
 				      </ng-container>
238 238
 				      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
239 239
 				        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -244,7 +244,7 @@
244 244
 				
245 245
 				<nz-form-item [hidden]="!fieldConfig.config.isHang">
246 246
 				  <nz-form-label [nzSpan]="6" nzFor="isHangId">是否挂起</nz-form-label>
247
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择是否挂起!">
247
+				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择是否挂起!">
248 248
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="isHangId" nzPlaceHolder="请选择是否挂起">
249 249
 				      <ng-container *ngFor="let option of isHangList">
250 250
 				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
@@ -255,14 +255,14 @@
255 255
 				
256 256
 				<nz-form-item [hidden]="!fieldConfig.config.code">
257 257
 				  <nz-form-label [nzSpan]="6" nzFor="codeNum">单号</nz-form-label>
258
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请输入单号!">
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
-				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择超时工单!">
265
+				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择超时工单!">
266 266
 				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="overtimeId" nzPlaceHolder="请选择超时工单">
267 267
 				      <ng-container *ngFor="let option of overtimeList">
268 268
 				        <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>

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

@@ -82,18 +82,23 @@
82 82
   // 新增
83 83
   &.add {
84 84
     .modalBody {
85
-      width: 400px;
85
+      width: 80%;
86 86
       padding: 0 24px;
87 87
 
88 88
       .content {
89 89
         width: 100%;
90
-        padding: 10px 24px 0;
90
+        padding: 10px 10px 0;
91 91
         max-height: calc(100vh - 120px);
92 92
         overflow-y: auto;
93 93
 
94 94
         .addForm {
95
+					display: flex;
96
+					flex-wrap: wrap;
97
+					justify-content: start;
95 98
           .ant-form-item {
96
-            margin-bottom: 14px;
99
+						width: 33%;
100
+            // margin-bottom: 14px;
101
+						margin: 0 3px 14px 0;
97 102
             .ant-form-item-label {
98 103
               text-align: left;
99 104
             }

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

@@ -19,6 +19,7 @@ export class SearchMoreComponent implements OnInit {
19 19
   @Input() parentDutyId: any;
20 20
   @Input() dutyId: any;
21 21
   @Input() queryType: any;
22
+	@Input() going: boolean = false;
22 23
   validateForm: FormGroup;//表单
23 24
   searchTimerSubject = new Subject();
24 25
   constructor(
@@ -91,6 +92,40 @@ export class SearchMoreComponent implements OnInit {
91 92
 			codeNum: [this.fieldConfig.fields.codeNum || null],
92 93
 			overtimeId: [this.fieldConfig.fields.overtimeDTO ? this.fieldConfig.fields.overtimeDTO.id  : null],
93 94
 		});
95
+		
96
+		if(this.going && this.fieldConfig.fields.groupId){
97
+			this.getGroupList();
98
+		}
99
+		
100
+		if(this.going && this.fieldConfig.fields.userId){
101
+			this.getUserList();
102
+		}
103
+		
104
+		if(this.going && this.fieldConfig.fields.category1DTO){
105
+			this.getCategory1List();
106
+		}
107
+		
108
+		if(this.going && this.fieldConfig.fields.category2DTO){
109
+			this.getCategory2List();
110
+		}
111
+		
112
+		if(this.going && this.fieldConfig.fields.category3DTO){
113
+			this.getCategory3List();
114
+		}
115
+		
116
+		if(this.going && this.fieldConfig.fields.buildingId){
117
+			this.getBuildingList();
118
+		}
119
+		
120
+		if(this.going && this.fieldConfig.fields.floorId){
121
+			this.getFloorList();
122
+		}
123
+		
124
+		if(this.going && this.fieldConfig.fields.companyId){
125
+			this.getCompanyList();
126
+		}
127
+		
128
+		
94 129
   }
95 130
   // 表单提交
96 131
   submitForm(): void {
@@ -287,18 +322,18 @@ export class SearchMoreComponent implements OnInit {
287 322
   // 获取维修人员列表
288 323
   userList:any[] = [];
289 324
   getUserList(keyword = ''){
290
-    if(!this.validateForm.value.groupId){
291
-      this.isLoading = false;
292
-      this.userList = [];
293
-      return;
294
-    }
325
+    // if(!this.validateForm.value.groupId){
326
+    //   this.isLoading = false;
327
+    //   this.userList = [];
328
+    //   return;
329
+    // }
295 330
     let postData: any = {
296 331
       idx: 0,
297 332
       sum: 20,
298 333
       user: {
299 334
         name: keyword,
300 335
         simpleQuery: true,
301
-        groupdata: { id: this.validateForm.value.groupId },
336
+        // groupdata: { id: this.validateForm.value.groupId },
302 337
         roleCodes: 'first-line support,second-line support,incident manager',
303 338
         engineer: 1,
304 339
       },
@@ -644,6 +679,11 @@ export class SearchMoreComponent implements OnInit {
644 679
 	// 获取工时小类列表
645 680
 	workHourSmallList:any[] = [];
646 681
 	getWorkHourSmallList(keyword?){
682
+		if(!this.validateForm.value.workHourParentId){
683
+		  this.isLoading = false;
684
+		  this.workHourSmallList = [];
685
+		  return;
686
+		}
647 687
 	  let postData: any = {
648 688
 	    idx: 0,
649 689
 	    sum: 20,
@@ -701,9 +741,8 @@ export class SearchMoreComponent implements OnInit {
701 741
 	    sum: 20,
702 742
 			user: {
703 743
 			  name: keyword,
704
-			  hospital: { id: this.tool.getCurrentHospital().id },
705
-			  engineer: 1,
706
-			  simpleQuery: true,
744
+			  // engineer: 1,
745
+			  // simpleQuery: true,
707 746
 			},
708 747
 	  };
709 748
 	  this.isLoading = true;
@@ -736,7 +775,6 @@ export class SearchMoreComponent implements OnInit {
736 775
 	    sum: 20,
737 776
 	    consumable: {
738 777
 				name: keyword,
739
-	      hosId: this.tool.getCurrentHospital().id,
740 778
 	      quoteOther: 0,
741 779
 	    },
742 780
 	  };

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

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

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

@@ -5,6 +5,10 @@
5 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);

+ 159 - 3
src/app/views/new-statistics/distribution-inspection-statistics/business-classify-statistics/business-classify-statistics.component.ts

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

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

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

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

@@ -5,6 +5,10 @@
5 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);

+ 121 - 9
src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.ts

@@ -2,7 +2,7 @@ import { TabService } from './../../services/tab.service';
2 2
 import { NzMessageService } from 'ng-zorro-antd/message';
3 3
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
4 4
 import { MainService } from 'src/app/services/main.service';
5
-import { ActivatedRoute } from '@angular/router';
5
+import { ActivatedRoute, Router } from '@angular/router';
6 6
 import cloneDeep from 'lodash-es/cloneDeep'
7 7
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
8 8
 @Component({
@@ -16,6 +16,7 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
16 16
     private mainService: MainService,
17 17
     private message: NzMessageService,
18 18
     private route: ActivatedRoute,
19
+		private router: Router,
19 20
     private tabService: TabService,
20 21
   ) {}
21 22
 
@@ -45,7 +46,113 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
45 46
 
46 47
     }, 0)
47 48
   }
48
-
49
+	
50
+	// 数据下钻
51
+	viewDetail1(data, type){
52
+		let query = null
53
+		if(type=='all'){
54
+			query = {
55
+				startDate: this.customChangeDateComponent.startDate || undefined,
56
+				endDate: this.customChangeDateComponent.endDate || undefined,
57
+				searchQuery:{
58
+					statusValue: 'close',
59
+					deptDTO: this.fieldConfig.fields.deptDTO,
60
+					deptId: this.fieldConfig.fields.deptId,
61
+					groupId: this.fieldConfig.fields.groupId || undefined,
62
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
63
+					userId: this.fieldConfig.fields.userId || undefined,
64
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
65
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
66
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
67
+				}
68
+			}
69
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
70
+			let flag = this.tabService.tabs.some(v => v.path === path);
71
+			flag && this.tabService.deleteRouteSnapshot(path);
72
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
73
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
74
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
75
+			this.router.navigate([path], { replaceUrl: true });
76
+		}else{
77
+			query = {
78
+				startDate: data.date + ' ' + '00:00:00' || undefined,
79
+				endDate: data.date + ' ' + '23:59:59' || undefined,
80
+				searchQuery:{
81
+					statusValue: 'close',
82
+					deptDTO: this.fieldConfig.fields.deptDTO,
83
+					deptId: this.fieldConfig.fields.deptId,
84
+					groupId: this.fieldConfig.fields.groupId || undefined,
85
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
86
+					userId: this.fieldConfig.fields.userId || undefined,
87
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
88
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
89
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
90
+				}
91
+			}
92
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
93
+			let flag = this.tabService.tabs.some(v => v.path === path);
94
+			flag && this.tabService.deleteRouteSnapshot(path);
95
+			this.tabService.setQueryParams('dateRange', [data.date + ' ' + '00:00:00', data.date + ' ' + '23:59:59']);
96
+			this.tabService.setQueryParams('defRange', null);
97
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
98
+			this.router.navigate([path], { replaceUrl: true });
99
+		}
100
+	}
101
+	
102
+	// 数据下钻
103
+	viewDetail2(data, sublevel, type){
104
+		let query = null
105
+		if(type=='all'){
106
+			query = {
107
+				startDate: this.customChangeDateComponent.startDate || undefined,
108
+				endDate: this.customChangeDateComponent.endDate || undefined,
109
+				statisticsTypeId: data[sublevel.value + 'StatisticsTypeId'] ? Number(data[sublevel.value + 'StatisticsTypeId']) : -1,
110
+				searchQuery:{
111
+					statusValue: 'close',
112
+					deptDTO: this.fieldConfig.fields.deptDTO,
113
+					deptId: this.fieldConfig.fields.deptId,
114
+					groupId: this.fieldConfig.fields.groupId || undefined,
115
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
116
+					userId: this.fieldConfig.fields.userId || undefined,
117
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
118
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
119
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
120
+				}
121
+			}
122
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
123
+			let flag = this.tabService.tabs.some(v => v.path === path);
124
+			flag && this.tabService.deleteRouteSnapshot(path);
125
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
126
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
127
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
128
+			this.router.navigate([path], { replaceUrl: true });
129
+		}else{
130
+			query = {
131
+				startDate: data.date + ' ' + '00:00:00' || undefined,
132
+				endDate: data.date + ' ' + '23:59:59' || undefined,
133
+				statisticsTypeId: data[sublevel.value + 'StatisticsTypeId'] ? Number(data[sublevel.value + 'StatisticsTypeId']) : -1,
134
+				searchQuery:{
135
+					statusValue: 'close',
136
+					deptDTO: this.fieldConfig.fields.deptDTO,
137
+					deptId: this.fieldConfig.fields.deptId,
138
+					groupId: this.fieldConfig.fields.groupId || undefined,
139
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
140
+					userId: this.fieldConfig.fields.userId || undefined,
141
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
142
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
143
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
144
+				}
145
+			}
146
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
147
+			let flag = this.tabService.tabs.some(v => v.path === path);
148
+			flag && this.tabService.deleteRouteSnapshot(path);
149
+			this.tabService.setQueryParams('dateRange', [data.date + ' ' + '00:00:00', data.date + ' ' + '23:59:59']);
150
+			this.tabService.setQueryParams('defRange', null);
151
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
152
+			this.router.navigate([path], { replaceUrl: true });
153
+		}
154
+	}
155
+	
49 156
   getQueryParams(){
50 157
     let queryParams = this.tabService.getQueryParams();
51 158
     this.tabService.clearQueryParams();
@@ -104,13 +211,16 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
104 211
   dictionaryList: any[] = [];
105 212
   getList(num?: number, field?: string, sort?: string) {
106 213
     this.mainService.getDictionary('list', 'statistics_date_type').subscribe((data) => {
107
-      let dictionaryList = data || [];
108
-      dictionaryList = cloneDeep(dictionaryList);
109
-      let flag = dictionaryList.some((item) => item.value === 'dateOther');
110
-      !flag && dictionaryList.push({id: 0, name: '未知', value: 'dateOther'});
111
-      this.dictionaryList = dictionaryList;
214
+      this.dictionaryList = data || [];
215
+      // this.dictionaryList = cloneDeep(dictionaryList);
216
+      let flag = this.dictionaryList.some((item) => item.value === 'dateOther');
217
+			// if(!dictionaryList.find(i=> i.id == -1)){
218
+			// 	dictionaryList.push({id: -1, name: '未知', value: 'dateOther'});
219
+			// }
220
+      !flag && this.dictionaryList.push({id: -1, name: '未知', value: 'dateOther'});
221
+      // this.dictionaryList = dictionaryList;
112 222
       this.widthConfig = new Array(this.dictionaryList.length * 3 + 3).fill('100px');
113
-      if (num !== undefined) {
223
+			if (num !== undefined) {
114 224
         this.pageIndex = num;
115 225
       }
116 226
       let postData:any = {
@@ -209,7 +319,9 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
209 319
     this.dateRange = []
210 320
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, buildingId: undefined, deptId: undefined};
211 321
     this.customChangeDateComponent.resetByDate();
212
-    this.search();
322
+    setTimeout(_=>{
323
+    	this.search();
324
+    })
213 325
   }
214 326
 
215 327
   // 防抖

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

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

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

@@ -5,6 +5,10 @@
5 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);

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

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

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

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

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

@@ -5,6 +5,10 @@
5 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);

+ 152 - 8
src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.ts

@@ -4,7 +4,7 @@ import { Subject } from 'rxjs';
4 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 cloneDeep from 'lodash-es/cloneDeep'
9 9
 import { ToolService } from "../../../../services/tool.service";
10 10
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
@@ -20,6 +20,7 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
20 20
     private mainService: MainService,
21 21
     private message: NzMessageService,
22 22
     private route: ActivatedRoute,
23
+		private router: Router,
23 24
     private tabService: TabService,
24 25
 		private tool: ToolService,
25 26
   ) {}
@@ -62,7 +63,145 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
62 63
 
63 64
     }, 0)
64 65
   }
65
-
66
+	
67
+	// 数据下钻
68
+	viewDetail1(data, type){
69
+		let query = null
70
+		let item = null
71
+		if(this.deptId){
72
+			item = this.alldepart.find(i => i.id == this.deptId)
73
+		}
74
+		if(type=='all'){
75
+			query = {
76
+				startDate: this.customChangeDateComponent.startDate || undefined,
77
+				endDate: this.customChangeDateComponent.endDate || undefined,
78
+				searchQuery:{
79
+					statusValue: 'close',
80
+					deptDTO: item,
81
+					deptId: this.deptId,
82
+					groupId: this.fieldConfig.fields.groupId || undefined,
83
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
84
+					userId: this.fieldConfig.fields.userId || undefined,
85
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
86
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
87
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
88
+				}
89
+			}
90
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
91
+			let flag = this.tabService.tabs.some(v => v.path === path);
92
+			flag && this.tabService.deleteRouteSnapshot(path);
93
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
94
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
95
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
96
+			this.router.navigate([path], { replaceUrl: true });
97
+		}else{
98
+			let arr = data.name.split('(')
99
+			let postData: any = {
100
+			  idx: 0,
101
+			  sum: 20,
102
+			  department: {
103
+			    dept: arr[0],
104
+			    searchType: 1,
105
+			  },
106
+			};
107
+			this.mainService.getFetchDataList("simple/data", "department", postData).subscribe(res => {
108
+				let item = res.list.find(i => i.id == data.deptId)
109
+				query = {
110
+					startDate: this.customChangeDateComponent.startDate || undefined,
111
+					endDate: this.customChangeDateComponent.endDate || undefined,
112
+					searchQuery:{
113
+						statusValue: 'close',
114
+						deptDTO: item,
115
+						deptId: data.deptId,
116
+						groupId: this.fieldConfig.fields.groupId || undefined,
117
+						groupDTO: this.fieldConfig.fields.groupDTO || undefined,
118
+						userId: this.fieldConfig.fields.userId || undefined,
119
+						userDTO: this.fieldConfig.fields.userDTO || undefined,
120
+						buildingId: this.fieldConfig.fields.buildingId || undefined,
121
+						buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
122
+					}
123
+				}
124
+				let path = '/newStatistics/distributionInspectionStatistics/incidentList'
125
+				let flag = this.tabService.tabs.some(v => v.path === path);
126
+				flag && this.tabService.deleteRouteSnapshot(path);
127
+				this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
128
+				this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
129
+				sessionStorage.setItem('distributionData', JSON.stringify(query))
130
+				this.router.navigate([path], { replaceUrl: true });
131
+			});
132
+		}
133
+	}
134
+	
135
+	// 数据下钻
136
+	viewDetail2(data, sublevel, type){
137
+		let query = null
138
+		let item = null
139
+		if(this.deptId){
140
+			item = this.alldepart.find(i => i.id == this.deptId)
141
+		}
142
+		if(type=='all'){
143
+			query = {
144
+				startDate: this.customChangeDateComponent.startDate || undefined,
145
+				endDate: this.customChangeDateComponent.endDate || undefined,
146
+				statisticsTypeId: data[sublevel.value + 'StatisticsTypeId'] ? Number(data[sublevel.value + 'StatisticsTypeId']) : -1,
147
+				searchQuery:{
148
+					statusValue: 'close',
149
+					deptDTO: item,
150
+					deptId: this.deptId,
151
+					groupId: this.fieldConfig.fields.groupId || undefined,
152
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
153
+					userId: this.fieldConfig.fields.userId || undefined,
154
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
155
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
156
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
157
+				}
158
+			}
159
+			let path = '/newStatistics/distributionInspectionStatistics/incidentList'
160
+			let flag = this.tabService.tabs.some(v => v.path === path);
161
+			flag && this.tabService.deleteRouteSnapshot(path);
162
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
163
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
164
+			sessionStorage.setItem('distributionData', JSON.stringify(query))
165
+			this.router.navigate([path], { replaceUrl: true });
166
+		}else{
167
+			let arr = data.name.split('(')
168
+			let postData: any = {
169
+			  idx: 0,
170
+			  sum: 20,
171
+			  department: {
172
+			    dept: arr[0],
173
+			    searchType: 1,
174
+			  },
175
+			};
176
+			this.mainService.getFetchDataList("simple/data", "department", postData).subscribe(res => {
177
+				let item = res.list.find(i => i.id == data.deptId)
178
+				query = {
179
+					startDate: this.customChangeDateComponent.startDate || undefined,
180
+					endDate: this.customChangeDateComponent.endDate || undefined,
181
+					statisticsTypeId: data[sublevel.value + 'StatisticsTypeId'] ? Number(data[sublevel.value + 'StatisticsTypeId']) : -1,
182
+					searchQuery:{
183
+						statusValue: 'close',
184
+						deptDTO: item,
185
+						deptId: data.deptId,
186
+						groupId: this.fieldConfig.fields.groupId || undefined,
187
+						groupDTO: this.fieldConfig.fields.groupDTO || undefined,
188
+						userId: this.fieldConfig.fields.userId || undefined,
189
+						userDTO: this.fieldConfig.fields.userDTO || undefined,
190
+						buildingId: this.fieldConfig.fields.buildingId || undefined,
191
+						buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
192
+					}
193
+				}
194
+				let path = '/newStatistics/distributionInspectionStatistics/incidentList'
195
+				let flag = this.tabService.tabs.some(v => v.path === path);
196
+				flag && this.tabService.deleteRouteSnapshot(path);
197
+				this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
198
+				this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
199
+				sessionStorage.setItem('distributionData', JSON.stringify(query))
200
+				this.router.navigate([path], { replaceUrl: true });
201
+			});
202
+		}
203
+	}
204
+	
66 205
   getQueryParams(){
67 206
     let queryParams = this.tabService.getQueryParams();
68 207
     this.tabService.clearQueryParams();
@@ -124,11 +263,14 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
124 263
 	widthValue:any;
125 264
   getList(num?: number, field?: string, sort?: string) {
126 265
     this.mainService.getDictionary('list', 'statistics_date_type').subscribe((data) => {
127
-      let dictionaryList = data || [];
128
-      dictionaryList = cloneDeep(dictionaryList);
129
-      let flag = dictionaryList.some((item) => item.value === 'dateOther');
130
-      !flag && dictionaryList.push({id: 0, name: '未知', value: 'dateOther'});
131
-      this.dictionaryList = dictionaryList;
266
+     this.dictionaryList = data || [];
267
+     // this.dictionaryList = cloneDeep(dictionaryList);
268
+     let flag = this.dictionaryList.some((item) => item.value === 'dateOther');
269
+     // if(!dictionaryList.find(i=> i.id == -1)){
270
+     // 	dictionaryList.push({id: -1, name: '未知', value: 'dateOther'});
271
+     // }
272
+     !flag && this.dictionaryList.push({id: -1, name: '未知', value: 'dateOther'});
273
+     // this.dictionaryList = dictionaryList;
132 274
       this.widthConfig = new Array(this.dictionaryList.length * 3 + 3).fill('100px').map((v, i) => { return (i == 0 || i == 1 && this.parent==1) || (i == 0 && this.parent==0) ? '150px' : '100px' });
133 275
       if(this.parent==1){
134 276
 				this.widthValue = this.widthConfig.length * 100 + 300 * 1 + 20
@@ -235,7 +377,9 @@ export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewI
235 377
     this.deptId = undefined;
236 378
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, buildingId: undefined};
237 379
     this.customChangeDateComponent.resetByDate();
238
-    this.search();
380
+    setTimeout(_=>{
381
+    	this.search();
382
+    })
239 383
   }
240 384
 
241 385
   // 楼栋搜索

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

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

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

@@ -5,6 +5,10 @@
5 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);

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

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

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

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

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

@@ -5,6 +5,10 @@
5 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);

+ 543 - 4
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.ts

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

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

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

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

@@ -5,6 +5,10 @@
5 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);

+ 350 - 3
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.ts

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

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

@@ -135,12 +135,12 @@ const routes: Routes = [
135 135
 			  }
136 136
 			},
137 137
 			{
138
-			  // 故障工单列表
138
+			  // 工单列表
139 139
 			  path: 'incidentList',
140 140
 			  loadChildren: () => import('./incident-list/incident-list.module').then(m => m.IncidentListModule),
141 141
 			  data: {
142 142
 			    reuse: true,
143
-			    title: '配-故障工单列表'
143
+			    title: '配-工单列表'
144 144
 			  }
145 145
 			},
146 146
     ]

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

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

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

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

+ 103 - 2
src/app/views/new-statistics/distribution-inspection-statistics/distribution-synthesize-statistics/distribution-synthesize-statistics.component.ts

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

+ 3 - 1
src/app/views/new-statistics/distribution-inspection-statistics/distribution-user-evaluate-statistics/distribution-user-evaluate-statistics.component.ts

@@ -214,7 +214,9 @@ export class DistributionUserEvaluateStatisticsComponent implements OnInit, Afte
214 214
     this.userId = undefined;
215 215
     this.fieldConfig.fields = {groupId: undefined, deptId: undefined, buildingId: undefined, taskTypeId: undefined, statisticsTypeId: undefined};
216 216
     this.customChangeDateComponent.resetByDate();
217
-    this.search();
217
+    setTimeout(_=>{
218
+    	this.search();
219
+    })
218 220
   }
219 221
 
220 222
   // 人员搜索

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

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

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

@@ -5,6 +5,10 @@
5 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);

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

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

+ 13 - 7
src/app/views/new-statistics/distribution-inspection-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" nzAllowClear nzPlaceHolder="请选择统计分类" [(ngModel)]="statisticsTypeId" (nzOpenChange)="openChangeStatisticsType($event)">
6
+      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择统计分类" [(ngModel)]="statisticsTypeId" (nzOpenChange)="openChangeStatisticsType()">
7 7
         <ng-container *ngFor="let option of statisticsTypeList">
8 8
           <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
9 9
         </ng-container>
@@ -20,23 +20,26 @@
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.deptDTO|| fieldConfig.fields.taskTypeDTO || fieldConfig.fields.sourceDTO || fieldConfig.fields.minuteDTO || fieldConfig.fields.specialDTO || fieldConfig.fields.overtimeIdDTO || fieldConfig.fields.abnormalDTO || fieldConfig.fields.evaluateDTO || fieldConfig.fields.executeUserDTO || fieldConfig.fields.codeNumDTO || fieldConfig.fields.timeFrameDTO">
23
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.deptDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.taskTypeDTO || fieldConfig.fields.sourceDTO || fieldConfig.fields.minuteDTO || fieldConfig.fields.specialDTO || fieldConfig.fields.overtimeDTO || fieldConfig.fields.overtimeIdDTO || fieldConfig.fields.evaluateDTO || fieldConfig.fields.codeNumDTO || fieldConfig.fields.timeFrameDTO">
24
+	<span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
25
+	<span>{{fieldConfig.fields.userDTO?.name}}</span>
24 26
 	<span>{{fieldConfig.fields.taskTypeDTO?.taskName}}</span>
27
+	<span>{{fieldConfig.fields.buildingDTO?.buildingName}}</span>
25 28
   <span>{{fieldConfig.fields.deptDTO?.dept}}</span>
26 29
 	<span>{{fieldConfig.fields.sourceDTO?.name}}</span>
27 30
 	<span>{{fieldConfig.fields.minuteDTO}}</span>
28 31
 	<span>{{fieldConfig.fields.specialDTO?.name}}</span>
29 32
 	<span>{{fieldConfig.fields.overtimeDTO?.name}}</span>
30
-	<span>{{fieldConfig.fields.abnormalDTO?.name}}</span>
33
+	<!-- <span>{{fieldConfig.fields.abnormalDTO?.name}}</span> -->
31 34
 	<span>{{fieldConfig.fields.evaluateDTO?.name}}</span>
32
-	<span>{{fieldConfig.fields.executeUserDTO?.name}}</span>
33 35
 	<span>{{fieldConfig.fields.codeNumDTO}}</span>
34 36
 	<span>{{fieldConfig.fields.timeFrameDTO?.name}}</span>
35 37
 </div>
36
-<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px', x: '1400px'}">
38
+<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px', x: '1600px'}">
37 39
   <thead>
38 40
     <tr>
39 41
       <th nzWidth="150px">序号|单号</th>
42
+			<th nzWidth="100px">申请科室</th>
40 43
       <th nzWidth="200px">起点|终点科室</th>
41 44
       <th nzWidth="150px">统计|任务类型</th>
42 45
       <th nzWidth="200px">时间过程</th>
@@ -44,6 +47,7 @@
44 47
       <th nzWidth="200px">时间考核</th>
45 48
       <th nzWidth="150px">状态|评价</th>
46 49
       <th nzWidth="150px">费用|积分</th>
50
+			<th nzWidth="100px">执行人</th>
47 51
     </tr>
48 52
   </thead>
49 53
   <tbody>
@@ -52,6 +56,7 @@
52 56
 				<div>{{index+(pageIndex-1) * pageSize + 1}}</div>
53 57
 				<div class="text-style">{{data.gdcode}}</div>
54 58
 			</td>
59
+			<td>{{ data.createDept }}</td>
55 60
       <td>
56 61
 				<div>{{ data.startDept }}</div>
57 62
 				<div>{{ data.endDept }}</div>
@@ -82,9 +87,10 @@
82 87
 				<div>{{ data.evaluationName }}</div>
83 88
 			</td>
84 89
       <td>
85
-      	<div>{{ data.totalGrade }}{{data.totalGrade?'元':''}}</div>
86
-      	<div>{{ data.scorePrice }}{{data.scorePrice?'分':''}}</div>
90
+      	<div>{{ data.scorePrice }}{{data.scorePrice ? '元' : ''}}</div>
91
+      	<div>{{ data.totalGrade }}{{data.totalGrade ? '分' : ''}}</div>
87 92
       </td>
93
+			<td>{{data.workerName}}</td>
88 94
     </tr>
89 95
   </tbody>
90 96
 </nz-table>

+ 107 - 36
src/app/views/new-statistics/distribution-inspection-statistics/incident-list/incident-list.component.ts

@@ -1,10 +1,10 @@
1 1
 import { TabService } from './../../services/tab.service';
2
-import { debounceTime } from 'rxjs/operators';
2
+import { debounceTime, filter } from 'rxjs/operators';
3 3
 import { Subject } from 'rxjs';
4 4
 import { NzMessageService } from 'ng-zorro-antd/message';
5
-import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
5
+import { Component, OnInit, HostListener, AfterViewInit, ViewChild, OnDestroy } from "@angular/core";
6 6
 import { MainService } from 'src/app/services/main.service';
7
-import { ActivatedRoute, Router } from '@angular/router';
7
+import { ActivatedRoute, Router, NavigationEnd } from '@angular/router';
8 8
 import cloneDeep from 'lodash-es/cloneDeep'
9 9
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
10 10
 @Component({
@@ -12,7 +12,7 @@ import { CustomChangeDateComponent } from '../../components/custom-change-date/c
12 12
   templateUrl: "./incident-list.component.html",
13 13
   styleUrls: ["./incident-list.component.less"],
14 14
 })
15
-export class IncidentListComponent implements OnInit, AfterViewInit {
15
+export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
16 16
   @ViewChild('customChangeDate', { static: false }) customChangeDateComponent!: CustomChangeDateComponent;
17 17
   constructor(
18 18
     private mainService: MainService,
@@ -31,20 +31,24 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
31 31
   repairDeptId;//报修科室id
32 32
 
33 33
   searchTimerSubject = new Subject();
34
-
34
+	
35 35
   ngOnInit() {
36
+		// 数据下钻搜索
37
+		this.getRouteQuery()
36 38
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
37 39
       let fun = v[0];
38 40
       fun.call(this, v[1]);
39 41
     });
40 42
   }
41
-
43
+	
44
+	ngOnDestroy(){
45
+		console.log(12122121)
46
+		this.fieldConfig.fields = {}
47
+		sessionStorage.removeItem('distributionData')
48
+	}
49
+	
42 50
   ngAfterViewInit(){
43 51
     this.initSessionData();
44
-    this.getQueryParams();
45
-    setTimeout(() => {
46
-      this.search();
47
-    }, 0)
48 52
     this.onResize(0);
49 53
   }
50 54
 
@@ -56,14 +60,64 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
56 60
 
57 61
     }, 0)
58 62
   }
59
-
60
-  getQueryParams(){
63
+	
64
+	goingType:boolean = false;
65
+	gdStateId:any = null;
66
+	getRouteQuery(){
67
+		let data = sessionStorage.getItem('distributionData')
68
+		let query = null
69
+		if(data){
70
+			query = JSON.parse(data)
71
+			console.log('query==========',query)
72
+			setTimeout(_=>{
73
+				// 统计分类
74
+				if(query.statisticsTypeId){
75
+					this.getStatisticsTypeList();
76
+					this.statisticsTypeId = query.statisticsTypeId
77
+				}else{
78
+					this.statisticsTypeId = undefined
79
+				}
80
+				if(query.searchQuery){
81
+					this.goingType = true
82
+					this.fieldConfig.fields = query.searchQuery
83
+				}else{
84
+					this.goingType = false
85
+					this.fieldConfig.fields = {}
86
+				}
87
+				if(!query.isGdId){
88
+					this.gdStateId = '73,74'
89
+				}else{
90
+					this.gdStateId = undefined;
91
+				}
92
+				this.getQueryParams(query);
93
+			},50)
94
+		}else{
95
+			this.gdStateId = undefined;
96
+			setTimeout(_=>{
97
+				this.getQueryParams('');
98
+			},50)
99
+		}
100
+	}
101
+	
102
+  getQueryParams(query){
61 103
     let queryParams = this.tabService.getQueryParams();
62
-    this.tabService.clearQueryParams();
104
+		console.log(43434343,queryParams)
63 105
     if(queryParams.dateRange){
106
+			console.log(555555)
64 107
       this.dateRange = queryParams.dateRange;
65
-      this.customChangeDateComponent.initByDate(this.dateRange);
66
-    }
108
+      this.customChangeDateComponent.initByDate(this.dateRange, queryParams.defRange);
109
+		}else{
110
+			this.tabService.clearQueryParams();
111
+			console.log(666666)
112
+			if(query){
113
+				this.dateRange = [query.startDate, query.endDate];
114
+				this.customChangeDateComponent.initByDate(this.dateRange, queryParams.defRange);
115
+			}
116
+		}
117
+		setTimeout(_=>{
118
+			this.search();
119
+			this.onResize(37);
120
+		},100)
67 121
   }
68 122
 
69 123
   get getMoreFilter(){
@@ -129,16 +183,19 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
129 183
       endDate: this.customChangeDateComponent.endDate || undefined,
130 184
       hosId: this.getHosId,
131 185
       deptId: this.fieldConfig.fields.deptId || undefined,
132
-      taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
186
+			groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
187
+			userId: this.fieldConfig.fields.userId || undefined,
188
+			taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
189
+			buildingId: this.fieldConfig.fields.buildingId || undefined,
133 190
 			sourceId: this.fieldConfig.fields.sourceId || undefined,
134 191
 			minutesClose: this.fieldConfig.fields.minuteClose || undefined,
135
-			specialCloseFlag: this.fieldConfig.fields.specialId || undefined,
136
-			timeout: this.fieldConfig.fields.overtimeId || undefined,
137
-			abnormityType: this.fieldConfig.fields.abnormalId || undefined,
192
+			specialCloseFlag: this.fieldConfig.fields.specialId,
193
+			// timeout: this.fieldConfig.fields.overtimeId,
194
+			// abnormityType: this.fieldConfig.fields.abnormalId,
138 195
 			workOrderEvaluationId: this.fieldConfig.fields.evaluateId || undefined,
139
-			userId: this.fieldConfig.fields.executeUserId || undefined,
140
-			hour: this.fieldConfig.fields.timeFrameId || undefined,
141
-			gdCode: this.fieldConfig.fields.codeNum || undefined
196
+			hour: this.fieldConfig.fields.timeFrameId != null ? this.fieldConfig.fields.timeFrameId : undefined,
197
+			gdCode: this.fieldConfig.fields.codeNum || undefined,
198
+			gdStateId: this.gdStateId
142 199
     };
143 200
 
144 201
     this.loading1 = true;
@@ -184,16 +241,19 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
184 241
       endDate: this.customChangeDateComponent.endDate || undefined,
185 242
       hosId: this.getHosId,
186 243
       deptId: this.fieldConfig.fields.deptId || undefined,
187
-      taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
244
+			groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
245
+			userId: this.fieldConfig.fields.userId || undefined,
246
+			taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
247
+			buildingId: this.fieldConfig.fields.buildingId || undefined,
188 248
     	sourceId: this.fieldConfig.fields.sourceId || undefined,
189 249
     	minutesClose: this.fieldConfig.fields.minuteClose || undefined,
190
-    	specialCloseFlag: this.fieldConfig.fields.specialId || undefined,
191
-    	timeout: this.fieldConfig.fields.overtimeId || undefined,
192
-    	abnormityType: this.fieldConfig.fields.abnormalId || undefined,
250
+    	specialCloseFlag: this.fieldConfig.fields.specialId,
251
+    	// timeout: this.fieldConfig.fields.overtimeId,
252
+    	// abnormityType: this.fieldConfig.fields.abnormalId,
193 253
     	workOrderEvaluationId: this.fieldConfig.fields.evaluateId || undefined,
194
-    	userId: this.fieldConfig.fields.executeUserId || undefined,
195
-    	hour: this.fieldConfig.fields.timeFrameId || undefined,
196
-    	gdCode: this.fieldConfig.fields.codeNum || undefined
254
+    	hour: this.fieldConfig.fields.timeFrameId != null ? this.fieldConfig.fields.timeFrameId : undefined,
255
+    	gdCode: this.fieldConfig.fields.codeNum || undefined,
256
+			gdStateId: this.gdStateId
197 257
     };
198 258
     this.mainService
199 259
       .postExportCustom("itsm/export", "workOrderList", postData)
@@ -225,10 +285,14 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
225 285
 		this.sortCurrent = {};
226 286
     this.dateRange = []
227 287
     this.statisticsTypeId = undefined;
288
+		this.gdStateId = undefined;
228 289
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined};
229 290
     this.customChangeDateComponent.resetByDate();
230
-    this.search();
231
-		this.onResize(0);
291
+		sessionStorage.removeItem('distributionData');
292
+		setTimeout(_=>{
293
+			this.search();
294
+			this.onResize(0);
295
+		})
232 296
   }
233 297
 
234 298
   // 防抖
@@ -254,26 +318,33 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
254 318
 	  this.getList();
255 319
 	}
256 320
 
257
-  openChangeStatisticsType(flag){
258
-    flag && this.getStatisticsTypeList();
321
+  openChangeStatisticsType(){
322
+    this.getStatisticsTypeList();
259 323
   }
260 324
 
261 325
   // 获取统计分类列表
262 326
   statisticsTypeList:any[] = [];
263
-  getStatisticsTypeList(keyword?) {
327
+  getStatisticsTypeList() {
264 328
     this.isLoading = true;
265 329
     this.mainService
266 330
       .getDictionary("list", "statistics_date_type")
267 331
       .subscribe((data) => {
332
+				this.statisticsTypeList = []
268 333
         this.isLoading = false;
334
+				if(!data.find(i=> i.id == -1)){
335
+					data.push({
336
+						name:'未知',
337
+						id:-1
338
+					})
339
+				}
269 340
         this.statisticsTypeList = data;
270 341
       });
271 342
   }
272 343
 
273 344
   // 详细搜索
274 345
   fieldConfig:any = {
275
-		fields: { deptId: undefined, taskTypeId: undefined, sourceId: undefined, minuteId: undefined, specialId: undefined, overtimeId: undefined, abnormalId: undefined, evaluateId: undefined, executeUserId: undefined, codeNum: undefined, timeFrameId: undefined},
276
-		config: { dept: true, taskType: true, source: true, minute: true, special: true, overtime: true, abnormal: true, evaluate: true, executeUser:true, code: true, timeFrame: true},
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},
277 348
   }
278 349
   showSearchMore:boolean = false;
279 350
   showMore(){

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

@@ -212,7 +212,9 @@ export class SourceStatisticsComponent implements OnInit, AfterViewInit {
212 212
     this.deptId = undefined;
213 213
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, taskTypeId: undefined, buildingId: undefined, statisticsTypeId: undefined};
214 214
     this.customChangeDateComponent.resetByDate();
215
-    this.search();
215
+    setTimeout(_=>{
216
+    	this.search();
217
+    })
216 218
   }
217 219
 
218 220
   // 科室搜索

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

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

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

@@ -5,6 +5,10 @@
5 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);

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

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

+ 3 - 1
src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.component.ts

@@ -219,7 +219,9 @@ export class UserBusinessStatisticsComponent implements OnInit, AfterViewInit {
219 219
     this.userId = undefined;
220 220
     this.fieldConfig.fields = {buildingId: undefined, deptId: undefined, groupId: undefined};
221 221
     this.customChangeDateComponent.resetByDate();
222
-    this.search();
222
+    setTimeout(_=>{
223
+    	this.search();
224
+    })
223 225
   }
224 226
 
225 227
   // 人员搜索

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

@@ -208,7 +208,9 @@ export class UserQualityControlStatisticsComponent implements OnInit, AfterViewI
208 208
     this.userId = undefined;
209 209
     this.fieldConfig.fields = {buildingId: undefined, deptId: undefined, groupId: undefined};
210 210
     this.customChangeDateComponent.resetByDate();
211
-    this.search();
211
+    setTimeout(_=>{
212
+    	this.search();
213
+    })
212 214
   }
213 215
 
214 216
   // 人员搜索

+ 3 - 1
src/app/views/new-statistics/maintenance-statistics/building-statistics/building-statistics.component.ts

@@ -196,7 +196,9 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
196 196
     this.dateRange = []
197 197
     this.fieldConfig.fields = {category123: true};
198 198
     this.customChangeDateComponent.resetByDate();
199
-    this.search();
199
+    setTimeout(_=>{
200
+    	this.search();
201
+    })
200 202
   }
201 203
 
202 204
   // 防抖

+ 8 - 8
src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.html

@@ -36,15 +36,15 @@
36 36
   <tbody>
37 37
     <tr *ngFor="let data of listOfData">
38 38
       <td>{{ data.category }}</td>
39
-      <td>{{ data.sum }}</td>
39
+      <td class="text-sign" (click)="viewDetail1(data)">{{ data.sum }}</td>
40 40
       <td>{{ data.avgResponseTime }}</td>
41 41
       <td>{{ data.avgResolvedTime }}</td>
42
-      <td>{{ data.resolvedOverNum }}</td>
43
-      <td>{{ data.overTimeNum }}</td>
42
+      <td class="text-sign" (click)="viewDetail2(data)">{{ data.resolvedOverNum }}</td>
43
+      <td class="text-sign" (click)="viewDetail3(data)">{{ data.overTimeNum }}</td>
44 44
       <td>{{ data.consumablePrice }}</td>
45 45
       <td>{{ data.workHourPrice }}</td>
46 46
       <td>{{ data.totalPrice }}</td>
47
-      <td>{{ data.negativeNum }}</td>
47
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.negativeNum }}</td>
48 48
       <td>{{ data.favorableRate }}</td>
49 49
     </tr>
50 50
   </tbody>
@@ -52,15 +52,15 @@
52 52
     <table class="footTable">
53 53
       <tr *ngFor="let data of listOfDataEnd">
54 54
         <td style="width: 10%">{{ data.category }}</td>
55
-        <td style="width: 9%">{{ data.sum }}</td>
55
+        <td style="width: 9%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.sum }}</td>
56 56
         <td style="width: 9%">{{ data.avgResponseTime }}</td>
57 57
         <td style="width: 9%">{{ data.avgResolvedTime }}</td>
58
-        <td style="width: 9%">{{ data.resolvedOverNum }}</td>
59
-        <td style="width: 9%">{{ data.overTimeNum }}</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 60
         <td style="width: 9%">{{ data.consumablePrice }}</td>
61 61
         <td style="width: 9%">{{ data.workHourPrice }}</td>
62 62
         <td style="width: 9%">{{ data.totalPrice }}</td>
63
-        <td style="width: 9%">{{ data.negativeNum }}</td>
63
+        <td style="width: 9%" class="text-sign" (click)="viewDetail4(data, 'all')">{{ data.negativeNum }}</td>
64 64
         <td style="width: 9%">{{ data.favorableRate }}</td>
65 65
       </tr>
66 66
     </table>

+ 4 - 0
src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-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);

+ 314 - 3
src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.ts

@@ -2,7 +2,7 @@ import { TabService } from './../../services/tab.service';
2 2
 import { NzMessageService } from 'ng-zorro-antd/message';
3 3
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
4 4
 import { MainService } from 'src/app/services/main.service';
5
-import { ActivatedRoute } from '@angular/router';
5
+import { ActivatedRoute, Router } from '@angular/router';
6 6
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
7 7
 @Component({
8 8
   selector: "app-category-one-statistics",
@@ -15,6 +15,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
15 15
     private mainService: MainService,
16 16
     private message: NzMessageService,
17 17
     private route: ActivatedRoute,
18
+		private router: Router,
18 19
     private tabService: TabService,
19 20
   ) {}
20 21
 
@@ -27,6 +28,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
27 28
   ngOnInit() {}
28 29
 
29 30
   ngAfterViewInit(){
31
+		this.getCategory1List();
30 32
     this.initSessionData();
31 33
     this.getQueryParams();
32 34
     setTimeout(() => {
@@ -43,7 +45,291 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
43 45
 
44 46
     }, 0)
45 47
   }
48
+	
49
+	// 数据下钻
50
+	viewDetail1(data, type){
51
+		let query = null
52
+		let item = null;
53
+		if(data.categoryId){
54
+		  item = this.category1List.find(item => item.id == data.categoryId);
55
+		}
56
+		if(type=='all'){
57
+			query = {
58
+				startDate: this.customChangeDateComponent.startDate || undefined,
59
+				endDate: this.customChangeDateComponent.endDate || undefined,
60
+				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
61
+				searchQuery:{
62
+					statusValue: 'close',
63
+					groupId: this.fieldConfig.fields.groupId || undefined,
64
+					userId: this.fieldConfig.fields.userId || undefined,
65
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
66
+					placeId: this.fieldConfig.fields.floorId || undefined,
67
+					floorId: this.fieldConfig.fields.floorId || undefined,
68
+					companyId: this.fieldConfig.fields.companyId || undefined,
69
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
70
+					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
71
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
72
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
73
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
74
+				}
75
+			}
76
+		}else{
77
+			query = {
78
+				startDate: this.customChangeDateComponent.startDate || undefined,
79
+				endDate: this.customChangeDateComponent.endDate || undefined,
80
+				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
81
+				searchQuery:{
82
+					statusValue: 'close',
83
+					hierarchy: data.hierarchy,
84
+					categoryId: data.categoryId,
85
+					groupId: this.fieldConfig.fields.groupId || undefined,
86
+					userId: this.fieldConfig.fields.userId || undefined,
87
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
88
+					placeId: this.fieldConfig.fields.floorId || undefined,
89
+					floorId: this.fieldConfig.fields.floorId || undefined,
90
+					companyId: this.fieldConfig.fields.companyId || undefined,
91
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
92
+					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
93
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
94
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
95
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
96
+					category1DTO: item || undefined,
97
+				}
98
+			}
99
+		}
46 100
 
101
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
102
+		let flag = this.tabService.tabs.some(v => v.path === path);
103
+		flag && this.tabService.deleteRouteSnapshot(path);
104
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
105
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
106
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
107
+		this.router.navigate([path], { replaceUrl: true });
108
+	}
109
+	
110
+	// 数据下钻
111
+	viewDetail2(data, type){
112
+		let query = null
113
+		let item = null;
114
+		if(data.categoryId){
115
+		  item = this.category1List.find(item => item.id == data.categoryId);
116
+		}
117
+		if(type=='all'){
118
+			query = {
119
+				startDate: this.customChangeDateComponent.startDate || undefined,
120
+				endDate: this.customChangeDateComponent.endDate || undefined,
121
+				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
122
+				searchQuery:{
123
+					statusValue: 'close',
124
+					overtimeId: 1,
125
+					groupId: this.fieldConfig.fields.groupId || undefined,
126
+					userId: this.fieldConfig.fields.userId || undefined,
127
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
128
+					placeId: this.fieldConfig.fields.floorId || undefined,
129
+					floorId: this.fieldConfig.fields.floorId || undefined,
130
+					companyId: this.fieldConfig.fields.companyId || undefined,
131
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
132
+					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
133
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
134
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
135
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
136
+					overtimeDTO:{
137
+						id: 1,
138
+						name: "是"
139
+					},
140
+				}
141
+			}
142
+		}else{
143
+			query = {
144
+				startDate: this.customChangeDateComponent.startDate || undefined,
145
+				endDate: this.customChangeDateComponent.endDate || undefined,
146
+				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
147
+				searchQuery:{
148
+					statusValue: 'close',
149
+					hierarchy: data.hierarchy,
150
+					categoryId: data.categoryId,
151
+					overtimeId: 1,
152
+					groupId: this.fieldConfig.fields.groupId || undefined,
153
+					userId: this.fieldConfig.fields.userId || undefined,
154
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
155
+					placeId: this.fieldConfig.fields.floorId || undefined,
156
+					floorId: this.fieldConfig.fields.floorId || undefined,
157
+					companyId: this.fieldConfig.fields.companyId || undefined,
158
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
159
+					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
160
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
161
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
162
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
163
+					overtimeDTO:{
164
+						id: 1,
165
+						name: "是"
166
+					},
167
+					category1DTO: item || undefined,
168
+				}
169
+			}
170
+		}
171
+
172
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
173
+		let flag = this.tabService.tabs.some(v => v.path === path);
174
+		flag && this.tabService.deleteRouteSnapshot(path);
175
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
176
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
177
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
178
+		this.router.navigate([path], { replaceUrl: true });
179
+	}
180
+	
181
+	// 数据下钻
182
+	viewDetail3(data, type){
183
+		let query = null
184
+		let item = null;
185
+		if(data.categoryId){
186
+		  item = this.category1List.find(item => item.id == data.categoryId);
187
+		}
188
+		if(type=='all'){
189
+			query = {
190
+				startDate: this.customChangeDateComponent.startDate || undefined,
191
+				endDate: this.customChangeDateComponent.endDate || undefined,
192
+				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
193
+				searchQuery:{
194
+					statusValue: 'close',
195
+					isHangId: 1,
196
+					groupId: this.fieldConfig.fields.groupId || undefined,
197
+					userId: this.fieldConfig.fields.userId || undefined,
198
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
199
+					placeId: this.fieldConfig.fields.floorId || undefined,
200
+					floorId: this.fieldConfig.fields.floorId || undefined,
201
+					companyId: this.fieldConfig.fields.companyId || undefined,
202
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
203
+					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
204
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
205
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
206
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
207
+					isHangDTO: {
208
+						id: 1,
209
+						name: "是"
210
+					},
211
+				}
212
+			}
213
+		}else{
214
+			query = {
215
+				startDate: this.customChangeDateComponent.startDate || undefined,
216
+				endDate: this.customChangeDateComponent.endDate || undefined,
217
+				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
218
+				searchQuery:{
219
+					statusValue: 'close',
220
+					hierarchy: data.hierarchy,
221
+					categoryId: data.categoryId,
222
+					isHangId: 1,
223
+					groupId: this.fieldConfig.fields.groupId || undefined,
224
+					userId: this.fieldConfig.fields.userId || undefined,
225
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
226
+					placeId: this.fieldConfig.fields.floorId || undefined,
227
+					floorId: this.fieldConfig.fields.floorId || undefined,
228
+					companyId: this.fieldConfig.fields.companyId || undefined,
229
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
230
+					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
231
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
232
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
233
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
234
+					isHangDTO: {
235
+						id: 1,
236
+						name: "是"
237
+					},
238
+					category1DTO: item || undefined,
239
+				}
240
+			}
241
+		}
242
+
243
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
244
+		let flag = this.tabService.tabs.some(v => v.path === path);
245
+		flag && this.tabService.deleteRouteSnapshot(path);
246
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
247
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
248
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
249
+		this.router.navigate([path], { replaceUrl: true });
250
+	}
251
+	
252
+	// 数据下钻
253
+	viewDetail4(data, type){
254
+		let query = null
255
+		let item = null;
256
+		if(data.categoryId){
257
+		  item = this.category1List.find(item => item.id == data.categoryId);
258
+		}
259
+		if(type=='all'){
260
+			query = {
261
+				startDate: this.customChangeDateComponent.startDate || undefined,
262
+				endDate: this.customChangeDateComponent.endDate || undefined,
263
+				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
264
+				searchQuery:{
265
+					statusValue: 'close',
266
+					evaluateId: 20424,
267
+					groupId: this.fieldConfig.fields.groupId || undefined,
268
+					userId: this.fieldConfig.fields.userId || undefined,
269
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
270
+					placeId: this.fieldConfig.fields.floorId || undefined,
271
+					floorId: this.fieldConfig.fields.floorId || undefined,
272
+					companyId: this.fieldConfig.fields.companyId || undefined,
273
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
274
+					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
275
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
276
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
277
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
278
+					evaluateDTO: {
279
+							"id": 20424,
280
+							"key": "incident_degree",
281
+							"name": "不满意",
282
+							"value": "1",
283
+							"orders": 5,
284
+							"extra1": "",
285
+							"extra2": ""
286
+					},
287
+				}
288
+			}
289
+		}else{
290
+			query = {
291
+				startDate: this.customChangeDateComponent.startDate || undefined,
292
+				endDate: this.customChangeDateComponent.endDate || undefined,
293
+				repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
294
+				searchQuery:{
295
+					statusValue: 'close',
296
+					hierarchy: data.hierarchy,
297
+					categoryId: data.categoryId,
298
+					evaluateId: 20424,
299
+					groupId: this.fieldConfig.fields.groupId || undefined,
300
+					userId: this.fieldConfig.fields.userId || undefined,
301
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
302
+					placeId: this.fieldConfig.fields.floorId || undefined,
303
+					floorId: this.fieldConfig.fields.floorId || undefined,
304
+					companyId: this.fieldConfig.fields.companyId || undefined,
305
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
306
+					companyDTO: this.fieldConfig.fields.companyDTO || undefined,
307
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
308
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
309
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
310
+					evaluateDTO: {
311
+							"id": 20424,
312
+							"key": "incident_degree",
313
+							"name": "不满意",
314
+							"value": "1",
315
+							"orders": 5,
316
+							"extra1": "",
317
+							"extra2": ""
318
+					},
319
+					category1DTO: item || undefined,
320
+				}
321
+			}
322
+		}
323
+		
324
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
325
+		let flag = this.tabService.tabs.some(v => v.path === path);
326
+		flag && this.tabService.deleteRouteSnapshot(path);
327
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
328
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
329
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
330
+		this.router.navigate([path], { replaceUrl: true });
331
+	}
332
+	
47 333
   getQueryParams(){
48 334
     let queryParams = this.tabService.getQueryParams();
49 335
     this.tabService.clearQueryParams();
@@ -96,7 +382,27 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
96 382
   get getHosId(){
97 383
     return this.parentDutyId || this.dutyId || this.hosId;
98 384
   }
99
-
385
+	
386
+	// 获取一级分类列表
387
+	category1List:any[] = [];
388
+	getCategory1List(keyword?) {
389
+	  let data = {
390
+	    category: {
391
+	      category: keyword,
392
+	      selectType: 'mutlQuery',
393
+	      statisticalHosId: this.getHosId,
394
+	      hierarchy: 1,
395
+	    },
396
+	  };
397
+	  this.isLoading = true;
398
+	  this.mainService
399
+	    .incidentPost("listIncidentCategory", data)
400
+	    .subscribe((data) => {
401
+	      this.isLoading = false;
402
+	      this.category1List = data.data;
403
+	    });
404
+	}
405
+	
100 406
   // 表格数据
101 407
   loading1 = false;
102 408
   getList(num?: number, field?: string, sort?: string) {
@@ -115,6 +421,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
115 421
       userId: this.fieldConfig.fields.userId || undefined,
116 422
       buildingId: this.fieldConfig.fields.buildingId || undefined,
117 423
       placeId: this.fieldConfig.fields.floorId || undefined,
424
+      floorId: this.fieldConfig.fields.floorId || undefined,
118 425
       companyId: this.fieldConfig.fields.companyId || undefined,
119 426
       repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
120 427
       categoryLevel: 1,
@@ -168,6 +475,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
168 475
       userId: this.fieldConfig.fields.userId || undefined,
169 476
       buildingId: this.fieldConfig.fields.buildingId || undefined,
170 477
       placeId: this.fieldConfig.fields.floorId || undefined,
478
+      floorId: this.fieldConfig.fields.floorId || undefined,
171 479
       companyId: this.fieldConfig.fields.companyId || undefined,
172 480
       repairDeptId: this.fieldConfig.fields.repairDeptId || undefined,
173 481
       categoryLevel: 1,
@@ -206,7 +514,10 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
206 514
     this.dateRange = []
207 515
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, buildingId: undefined, floorId: undefined, companyId: undefined, repairDeptId: undefined};
208 516
     this.customChangeDateComponent.resetByDate();
209
-    this.search();
517
+		sessionStorage.removeItem('maintenanceData');
518
+    setTimeout(_=>{
519
+    	this.search();
520
+    })
210 521
   }
211 522
 
212 523
   // 防抖

+ 3 - 1
src/app/views/new-statistics/maintenance-statistics/category-source-statistics/category-source-statistics.component.ts

@@ -204,7 +204,9 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
204 204
     this.dateRange = []
205 205
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined};
206 206
     this.customChangeDateComponent.resetByDate();
207
-    this.search();
207
+    setTimeout(_=>{
208
+    	this.search();
209
+    })
208 210
   }
209 211
 
210 212
   // 防抖

+ 8 - 8
src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.html

@@ -56,15 +56,15 @@
56 56
   <tbody>
57 57
     <tr *ngFor="let data of listOfData">
58 58
       <td>{{ data.category }}</td>
59
-      <td>{{ data.sum }}</td>
59
+      <td class="text-sign" (click)="viewDetail1(data)">{{ data.sum }}</td>
60 60
       <td>{{ data.avgResponseTime }}</td>
61 61
       <td>{{ data.avgResolvedTime }}</td>
62
-      <td>{{ data.resolvedOverNum }}</td>
63
-      <td>{{ data.overTimeNum }}</td>
62
+      <td class="text-sign" (click)="viewDetail2(data)">{{ data.resolvedOverNum }}</td>
63
+      <td class="text-sign" (click)="viewDetail3(data)">{{ data.overTimeNum }}</td>
64 64
       <td>{{ data.consumablePrice }}</td>
65 65
       <td>{{ data.workHourPrice }}</td>
66 66
       <td>{{ data.totalPrice }}</td>
67
-      <td>{{ data.negativeNum }}</td>
67
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.negativeNum }}</td>
68 68
       <td>{{ data.favorableRate }}</td>
69 69
     </tr>
70 70
   </tbody>
@@ -72,15 +72,15 @@
72 72
     <table class="footTable">
73 73
       <tr *ngFor="let data of listOfDataEnd">
74 74
         <td style="width: 10%">{{ data.category }}</td>
75
-        <td style="width: 9%">{{ data.sum }}</td>
75
+        <td style="width: 9%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.sum }}</td>
76 76
         <td style="width: 9%">{{ data.avgResponseTime }}</td>
77 77
         <td style="width: 9%">{{ data.avgResolvedTime }}</td>
78
-        <td style="width: 9%">{{ data.resolvedOverNum }}</td>
79
-        <td style="width: 9%">{{ data.overTimeNum }}</td>
78
+        <td style="width: 9%" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.resolvedOverNum }}</td>
79
+        <td style="width: 9%" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.overTimeNum }}</td>
80 80
         <td style="width: 9%">{{ data.consumablePrice }}</td>
81 81
         <td style="width: 9%">{{ data.workHourPrice }}</td>
82 82
         <td style="width: 9%">{{ data.totalPrice }}</td>
83
-        <td style="width: 9%">{{ data.negativeNum }}</td>
83
+        <td style="width: 9%" class="text-sign" (click)="viewDetail4(data, 'all')">{{ data.negativeNum }}</td>
84 84
         <td style="width: 9%">{{ data.favorableRate }}</td>
85 85
       </tr>
86 86
     </table>

+ 4 - 0
src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-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);

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

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

@@ -46,15 +46,15 @@
46 46
   <tbody>
47 47
     <tr *ngFor="let data of listOfData">
48 48
       <td>{{ data.category }}</td>
49
-      <td>{{ data.sum }}</td>
49
+      <td class="text-sign" (click)="viewDetail1(data)">{{ data.sum }}</td>
50 50
       <td>{{ data.avgResponseTime }}</td>
51 51
       <td>{{ data.avgResolvedTime }}</td>
52
-      <td>{{ data.resolvedOverNum }}</td>
53
-      <td>{{ data.overTimeNum }}</td>
52
+      <td class="text-sign" (click)="viewDetail2(data)">{{ data.resolvedOverNum }}</td>
53
+      <td class="text-sign" (click)="viewDetail3(data)">{{ data.overTimeNum }}</td>
54 54
       <td>{{ data.consumablePrice }}</td>
55 55
       <td>{{ data.workHourPrice }}</td>
56 56
       <td>{{ data.totalPrice }}</td>
57
-      <td>{{ data.negativeNum }}</td>
57
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.negativeNum }}</td>
58 58
       <td>{{ data.favorableRate }}</td>
59 59
     </tr>
60 60
   </tbody>
@@ -62,15 +62,15 @@
62 62
     <table class="footTable">
63 63
       <tr *ngFor="let data of listOfDataEnd">
64 64
         <td style="width: 10%">{{ data.category }}</td>
65
-        <td style="width: 9%">{{ data.sum }}</td>
65
+        <td style="width: 9%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.sum }}</td>
66 66
         <td style="width: 9%">{{ data.avgResponseTime }}</td>
67 67
         <td style="width: 9%">{{ data.avgResolvedTime }}</td>
68
-        <td style="width: 9%">{{ data.resolvedOverNum }}</td>
69
-        <td style="width: 9%">{{ data.overTimeNum }}</td>
68
+        <td style="width: 9%" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.resolvedOverNum }}</td>
69
+        <td style="width: 9%" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.overTimeNum }}</td>
70 70
         <td style="width: 9%">{{ data.consumablePrice }}</td>
71 71
         <td style="width: 9%">{{ data.workHourPrice }}</td>
72 72
         <td style="width: 9%">{{ data.totalPrice }}</td>
73
-        <td style="width: 9%">{{ data.negativeNum }}</td>
73
+        <td style="width: 9%" class="text-sign" (click)="viewDetail4(data, 'all')">{{ data.negativeNum }}</td>
74 74
         <td style="width: 9%">{{ data.favorableRate }}</td>
75 75
       </tr>
76 76
     </table>

+ 4 - 0
src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-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);

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

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

@@ -220,7 +220,10 @@ export class ConsumableStatisticsComponent implements OnInit, AfterViewInit {
220 220
     this.repairDeptId = undefined;
221 221
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined, companyId: undefined};
222 222
     this.customChangeDateComponent.resetByDate();
223
-    this.search();
223
+		sessionStorage.removeItem('maintenanceData');
224
+    setTimeout(_=>{
225
+    	this.search();
226
+    })
224 227
   }
225 228
 
226 229
   // 科室搜索

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

@@ -51,13 +51,13 @@
51 51
 			<tr *ngFor="let data of listOfData">
52 52
 				<td *ngIf="parent==1">{{ data.parentName || '无' }}<ng-container *ngIf="parent==1 && data.parentName">({{ data.parentCode }})</ng-container></td>
53 53
 				<td>{{ data.deptName }}<ng-container *ngIf="data.deptCode">({{ data.deptCode }})</ng-container></td>
54
-				<td>{{ data.sum }}</td>
54
+				<td class="text-sign" (click)="viewDetail1(data)">{{ data.sum }}</td>
55 55
 				<td>{{ data.degreeCount }}</td>
56
-				<td>{{ data.oneStar }}</td>
57
-				<td>{{ data.twoStar }}</td>
58
-				<td>{{ data.threeStar }}</td>
59
-				<td>{{ data.fourStar }}</td>
60
-				<td>{{ data.fiveStar }}</td>
56
+				<td class="text-sign" (click)="viewDetail2(data)">{{ data.oneStar }}</td>
57
+				<td class="text-sign" (click)="viewDetail3(data)">{{ data.twoStar }}</td>
58
+				<td class="text-sign" (click)="viewDetail4(data)">{{ data.threeStar }}</td>
59
+				<td class="text-sign" (click)="viewDetail5(data)">{{ data.fourStar }}</td>
60
+				<td class="text-sign" (click)="viewDetail6(data)">{{ data.fiveStar }}</td>
61 61
 				<td>{{ data.totalStar }}</td>
62 62
 				<td>{{ data.avgStar }}</td>
63 63
 			</tr>
@@ -68,13 +68,13 @@
68 68
 					<td [ngStyle]="{width:widthStyle}" *ngIf="parent==1">{{ data.parentCode }}</td>
69 69
 					<td [ngStyle]="{width:widthStyle}" *ngIf="parent==0">{{ data.deptCode }}</td>
70 70
 					<td [ngStyle]="{width:widthStyle}" *ngIf="parent==1"></td>
71
-					<td [ngStyle]="{width:widthStyle}">{{ data.sum }}</td>
71
+					<td [ngStyle]="{width:widthStyle}" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.sum }}</td>
72 72
 					<td [ngStyle]="{width:widthStyle}">{{ data.degreeCount }}</td>
73
-					<td [ngStyle]="{width:widthStyle}">{{ data.oneStar }}</td>
74
-					<td [ngStyle]="{width:widthStyle}">{{ data.twoStar }}</td>
75
-					<td [ngStyle]="{width:widthStyle}">{{ data.threeStar }}</td>
76
-					<td [ngStyle]="{width:widthStyle}">{{ data.fourStar }}</td>
77
-					<td [ngStyle]="{width:widthStyle}">{{ data.fiveStar }}</td>
73
+					<td [ngStyle]="{width:widthStyle}" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.oneStar }}</td>
74
+					<td [ngStyle]="{width:widthStyle}" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.twoStar }}</td>
75
+					<td [ngStyle]="{width:widthStyle}" class="text-sign" (click)="viewDetail4(data, 'all')">{{ data.threeStar }}</td>
76
+					<td [ngStyle]="{width:widthStyle}" class="text-sign" (click)="viewDetail5(data, 'all')">{{ data.fourStar }}</td>
77
+					<td [ngStyle]="{width:widthStyle}" class="text-sign" (click)="viewDetail6(data, 'all')">{{ data.fiveStar }}</td>
78 78
 					<td [ngStyle]="{width:widthStyle}">{{ data.totalStar }}</td>
79 79
 					<td [ngStyle]="{width:widthStyle}">{{ data.avgStar }}</td>
80 80
 				</tr>

+ 4 - 0
src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-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);

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

@@ -2,7 +2,7 @@ import { TabService } from './../../services/tab.service';
2 2
 import { NzMessageService } from 'ng-zorro-antd/message';
3 3
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
4 4
 import { MainService } from 'src/app/services/main.service';
5
-import { ActivatedRoute } from '@angular/router';
5
+import { ActivatedRoute, Router } from '@angular/router';
6 6
 import { ToolService } from "../../../../services/tool.service";
7 7
 import { Subject } from "rxjs";
8 8
 import { debounceTime } from "rxjs/operators";
@@ -19,6 +19,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
19 19
     private mainService: MainService,
20 20
     private message: NzMessageService,
21 21
     private route: ActivatedRoute,
22
+		private router: Router,
22 23
     private tabService: TabService,
23 24
 		private tool: ToolService,
24 25
   ) {}
@@ -59,7 +60,464 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
59 60
 
60 61
     }, 0)
61 62
   }
63
+	
64
+	// 数据下钻
65
+	viewDetail1(data, type){
66
+		let query = null
67
+		if(type=='all'){
68
+			query = {
69
+				startDate: this.customChangeDateComponent.startDate || undefined,
70
+				endDate: this.customChangeDateComponent.endDate || undefined,
71
+				repairDeptId: this.deptId || undefined,
72
+				searchQuery:{
73
+					statusValue: 'close',
74
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
75
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
76
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
77
+					floorId: this.fieldConfig.fields.floorId || undefined,
78
+					groupId: this.fieldConfig.fields.groupId || undefined,
79
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
80
+					userId: this.fieldConfig.fields.userId || undefined,
81
+					placeId: this.fieldConfig.fields.floorId || undefined,
82
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
83
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
84
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
85
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
86
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
87
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
88
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
89
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
90
+				}
91
+			}
92
+		}else{
93
+			query = {
94
+				startDate: this.customChangeDateComponent.startDate || undefined,
95
+				endDate: this.customChangeDateComponent.endDate || undefined,
96
+				repairDeptId: data.repairDeptId || undefined,
97
+				searchQuery:{
98
+					statusValue: 'close',
99
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
100
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
101
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
102
+					floorId: this.fieldConfig.fields.floorId || undefined,
103
+					groupId: this.fieldConfig.fields.groupId || undefined,
104
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
105
+					userId: this.fieldConfig.fields.userId || undefined,
106
+					placeId: this.fieldConfig.fields.floorId || undefined,
107
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
108
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
109
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
110
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
111
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
112
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
113
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
114
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
115
+				}
116
+			}
117
+		}
118
+
119
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
120
+		let flag = this.tabService.tabs.some(v => v.path === path);
121
+		flag && this.tabService.deleteRouteSnapshot(path);
122
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
123
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
124
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
125
+		this.router.navigate([path], { replaceUrl: true });
126
+	}
127
+	
128
+	// 数据下钻
129
+	viewDetail2(data, type){
130
+		let query = null
131
+		if(type=='all'){
132
+			query = {
133
+				startDate: this.customChangeDateComponent.startDate || undefined,
134
+				endDate: this.customChangeDateComponent.endDate || undefined,
135
+				repairDeptId: this.deptId || undefined,
136
+				searchQuery:{
137
+					statusValue: 'close',
138
+					evaluateId: 20424,
139
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
140
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
141
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
142
+					floorId: this.fieldConfig.fields.floorId || undefined,
143
+					groupId: this.fieldConfig.fields.groupId || undefined,
144
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
145
+					userId: this.fieldConfig.fields.userId || undefined,
146
+					placeId: this.fieldConfig.fields.floorId || undefined,
147
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
148
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
149
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
150
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
151
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
152
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
153
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
154
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
155
+					evaluateDTO: {
156
+						"id": 20424,
157
+						"key": "incident_degree",
158
+						"name": "不满意",
159
+						"value": "1",
160
+						"orders": 5,
161
+						"extra1": "",
162
+						"extra2": ""
163
+					}
164
+				}
165
+			}
166
+		}else{
167
+			query = {
168
+				startDate: this.customChangeDateComponent.startDate || undefined,
169
+				endDate: this.customChangeDateComponent.endDate || undefined,
170
+				repairDeptId: data.repairDeptId || undefined,
171
+				searchQuery:{
172
+					statusValue: 'close',
173
+					evaluateId: 20424,
174
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
175
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
176
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
177
+					floorId: this.fieldConfig.fields.floorId || undefined,
178
+					groupId: this.fieldConfig.fields.groupId || undefined,
179
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
180
+					userId: this.fieldConfig.fields.userId || undefined,
181
+					placeId: this.fieldConfig.fields.floorId || undefined,
182
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
183
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
184
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
185
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
186
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
187
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
188
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
189
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
190
+					evaluateDTO: {
191
+						"id": 20424,
192
+						"key": "incident_degree",
193
+						"name": "不满意",
194
+						"value": "1",
195
+						"orders": 5,
196
+						"extra1": "",
197
+						"extra2": ""
198
+					}
199
+				}
200
+			}
201
+		}
202
+
203
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
204
+		let flag = this.tabService.tabs.some(v => v.path === path);
205
+		flag && this.tabService.deleteRouteSnapshot(path);
206
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
207
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
208
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
209
+		this.router.navigate([path], { replaceUrl: true });
210
+	}
211
+	
212
+	// 数据下钻
213
+	viewDetail3(data, type){
214
+		let query = null
215
+		if(type=='all'){
216
+			query = {
217
+				startDate: this.customChangeDateComponent.startDate || undefined,
218
+				endDate: this.customChangeDateComponent.endDate || undefined,
219
+				repairDeptId: this.deptId || undefined,
220
+				searchQuery:{
221
+					statusValue: 'close',
222
+					evaluateId: 20423,
223
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
224
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
225
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
226
+					floorId: this.fieldConfig.fields.floorId || undefined,
227
+					groupId: this.fieldConfig.fields.groupId || undefined,
228
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
229
+					userId: this.fieldConfig.fields.userId || undefined,
230
+					placeId: this.fieldConfig.fields.floorId || undefined,
231
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
232
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
233
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
234
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
235
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
236
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
237
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
238
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
239
+					evaluateDTO: {
240
+						"id": 20423,
241
+						"key": "incident_degree",
242
+						"name": "一般",
243
+						"value": "2",
244
+						"orders": 4,
245
+						"extra1": "",
246
+						"extra2": ""
247
+					}
248
+				}
249
+			}
250
+		}else{
251
+			query = {
252
+				startDate: this.customChangeDateComponent.startDate || undefined,
253
+				endDate: this.customChangeDateComponent.endDate || undefined,
254
+				repairDeptId: data.repairDeptId || undefined,
255
+				searchQuery:{
256
+					statusValue: 'close',
257
+					evaluateId: 20423,
258
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
259
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
260
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
261
+					floorId: this.fieldConfig.fields.floorId || undefined,
262
+					groupId: this.fieldConfig.fields.groupId || undefined,
263
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
264
+					userId: this.fieldConfig.fields.userId || undefined,
265
+					placeId: this.fieldConfig.fields.floorId || undefined,
266
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
267
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
268
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
269
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
270
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
271
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
272
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
273
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
274
+					evaluateDTO: {
275
+						"id": 20423,
276
+						"key": "incident_degree",
277
+						"name": "一般",
278
+						"value": "2",
279
+						"orders": 4,
280
+						"extra1": "",
281
+						"extra2": ""
282
+					}
283
+				}
284
+			}
285
+		}
286
+
287
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
288
+		let flag = this.tabService.tabs.some(v => v.path === path);
289
+		flag && this.tabService.deleteRouteSnapshot(path);
290
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
291
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
292
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
293
+		this.router.navigate([path], { replaceUrl: true });
294
+	}
295
+	
296
+	// 数据下钻
297
+	viewDetail4(data, type){
298
+		let query = null
299
+		if(type=='all'){
300
+			query = {
301
+				startDate: this.customChangeDateComponent.startDate || undefined,
302
+				endDate: this.customChangeDateComponent.endDate || undefined,
303
+				repairDeptId: this.deptId || undefined,
304
+				searchQuery:{
305
+					statusValue: 'close',
306
+					evaluateId: 20422,
307
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
308
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
309
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
310
+					floorId: this.fieldConfig.fields.floorId || undefined,
311
+					groupId: this.fieldConfig.fields.groupId || undefined,
312
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
313
+					userId: this.fieldConfig.fields.userId || undefined,
314
+					placeId: this.fieldConfig.fields.floorId || undefined,
315
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
316
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
317
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
318
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
319
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
320
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
321
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
322
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
323
+					evaluateDTO: {
324
+						"id": 20422,
325
+						"key": "incident_degree",
326
+						"name": "满意",
327
+						"value": "3",
328
+						"orders": 3,
329
+						"extra1": "",
330
+						"extra2": ""
331
+					}
332
+				}
333
+			}
334
+		}else{
335
+			query = {
336
+				startDate: this.customChangeDateComponent.startDate || undefined,
337
+				endDate: this.customChangeDateComponent.endDate || undefined,
338
+				repairDeptId: data.repairDeptId || undefined,
339
+				searchQuery:{
340
+					statusValue: 'close',
341
+					evaluateId: 20422,
342
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
343
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
344
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
345
+					floorId: this.fieldConfig.fields.floorId || undefined,
346
+					groupId: this.fieldConfig.fields.groupId || undefined,
347
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
348
+					userId: this.fieldConfig.fields.userId || undefined,
349
+					placeId: this.fieldConfig.fields.floorId || undefined,
350
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
351
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
352
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
353
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
354
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
355
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
356
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
357
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
358
+					evaluateDTO: {
359
+						"id": 20422,
360
+						"key": "incident_degree",
361
+						"name": "满意",
362
+						"value": "3",
363
+						"orders": 3,
364
+						"extra1": "",
365
+						"extra2": ""
366
+					}
367
+				}
368
+			}
369
+		}
370
+
371
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
372
+		let flag = this.tabService.tabs.some(v => v.path === path);
373
+		flag && this.tabService.deleteRouteSnapshot(path);
374
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
375
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
376
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
377
+		this.router.navigate([path], { replaceUrl: true });
378
+	}
379
+	
380
+	// 数据下钻
381
+	viewDetail5(data, type){
382
+		let query = null
383
+		if(type=='all'){
384
+			query = {
385
+				startDate: this.customChangeDateComponent.startDate || undefined,
386
+				endDate: this.customChangeDateComponent.endDate || undefined,
387
+				repairDeptId: this.deptId || undefined,
388
+				searchQuery:{
389
+					statusValue: 'close',
390
+					evaluateId: 20421,
391
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
392
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
393
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
394
+					floorId: this.fieldConfig.fields.floorId || undefined,
395
+					groupId: this.fieldConfig.fields.groupId || undefined,
396
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
397
+					userId: this.fieldConfig.fields.userId || undefined,
398
+					placeId: this.fieldConfig.fields.floorId || undefined,
399
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
400
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
401
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
402
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
403
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
404
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
405
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
406
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
407
+					evaluateDTO: {
408
+						"id": 20421,
409
+						"key": "incident_degree",
410
+						"name": "较满意",
411
+						"value": "2",
412
+						"orders": 2,
413
+						"extra1": "",
414
+						"extra2": ""
415
+					}
416
+				}
417
+			}
418
+		}else{
419
+			query = {
420
+				startDate: this.customChangeDateComponent.startDate || undefined,
421
+				endDate: this.customChangeDateComponent.endDate || undefined,
422
+				repairDeptId: data.repairDeptId || undefined,
423
+				searchQuery:{
424
+					statusValue: 'close',
425
+					evaluateId: 20421,
426
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
427
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
428
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
429
+					floorId: this.fieldConfig.fields.floorId || undefined,
430
+					groupId: this.fieldConfig.fields.groupId || undefined,
431
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
432
+					userId: this.fieldConfig.fields.userId || undefined,
433
+					placeId: this.fieldConfig.fields.floorId || undefined,
434
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
435
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
436
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
437
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
438
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
439
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
440
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
441
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
442
+					evaluateDTO: {
443
+						"id": 20421,
444
+						"key": "incident_degree",
445
+						"name": "较满意",
446
+						"value": "2",
447
+						"orders": 2,
448
+						"extra1": "",
449
+						"extra2": ""
450
+					}
451
+				}
452
+			}
453
+		}
62 454
 
455
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
456
+		let flag = this.tabService.tabs.some(v => v.path === path);
457
+		flag && this.tabService.deleteRouteSnapshot(path);
458
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
459
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
460
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
461
+		this.router.navigate([path], { replaceUrl: true });
462
+	}
463
+	
464
+	// 数据下钻
465
+	viewDetail6(data, type){
466
+		let query = null
467
+		if(type=='all'){
468
+			query = {
469
+				startDate: this.customChangeDateComponent.startDate || undefined,
470
+				endDate: this.customChangeDateComponent.endDate || undefined,
471
+				repairDeptId: this.deptId || undefined,
472
+				searchQuery:{
473
+					statusValue: 'close',
474
+					evaluateId: 20420,
475
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
476
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
477
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
478
+					floorId: this.fieldConfig.fields.floorId || undefined,
479
+					groupId: this.fieldConfig.fields.groupId || undefined,
480
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
481
+					userId: this.fieldConfig.fields.userId || undefined,
482
+				}
483
+			}
484
+		}else{
485
+			query = {
486
+				startDate: this.customChangeDateComponent.startDate || undefined,
487
+				endDate: this.customChangeDateComponent.endDate || undefined,
488
+				repairDeptId: data.repairDeptId || undefined,
489
+				searchQuery:{
490
+					statusValue: 'close',
491
+					evaluateId: 20420,
492
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
493
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
494
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
495
+					floorId: this.fieldConfig.fields.floorId || undefined,
496
+					groupId: this.fieldConfig.fields.groupId || undefined,
497
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
498
+					userId: this.fieldConfig.fields.userId || undefined,
499
+					evaluateDTO: {
500
+						"id": 20420,
501
+						"key": "incident_degree",
502
+						"name": "非常满意",
503
+						"value": "1",
504
+						"orders": 1,
505
+						"extra1": "",
506
+						"extra2": ""
507
+					}
508
+				}
509
+			}
510
+		}
511
+
512
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
513
+		let flag = this.tabService.tabs.some(v => v.path === path);
514
+		flag && this.tabService.deleteRouteSnapshot(path);
515
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
516
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
517
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
518
+		this.router.navigate([path], { replaceUrl: true });
519
+	}
520
+	
63 521
   getQueryParams(){
64 522
     let queryParams = this.tabService.getQueryParams();
65 523
     this.tabService.clearQueryParams();
@@ -241,7 +699,10 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
241 699
     this.deptId = undefined;
242 700
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined, deptTypeId: undefined};
243 701
     this.customChangeDateComponent.resetByDate();
244
-    this.search();
702
+		sessionStorage.removeItem('maintenanceData');
703
+    setTimeout(_=>{
704
+    	this.search();
705
+    })
245 706
   }
246 707
 
247 708
 	// 防抖

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

@@ -52,15 +52,15 @@
52 52
 			<tr *ngFor="let data of listOfData">
53 53
 				<td *ngIf="parent==1">{{ data.parentName || '无' }}<ng-container *ngIf="parent==1 && data.parentName">({{ data.parentCode }})</ng-container></td>
54 54
 				<td>{{ data.deptName }}<ng-container *ngIf="data.deptCode">({{ data.deptCode }})</ng-container></td>
55
-				<td>{{ data.sum }}</td>
55
+				<td class="text-sign" (click)="viewDetail1(data)">{{ data.sum }}</td>
56 56
 				<td>{{ data.avgResponseTime }}</td>
57 57
 				<td>{{ data.avgResolvedTime }}</td>
58
-				<td>{{ data.resolvedOverNum }}</td>
59
-				<td>{{ data.overTimeNum }}</td>
58
+				<td class="text-sign" (click)="viewDetail2(data)">{{ data.resolvedOverNum }}</td>
59
+				<td class="text-sign" (click)="viewDetail3(data)">{{ data.overTimeNum }}</td>
60 60
 				<td>{{ data.consumablePrice }}</td>
61 61
 				<td>{{ data.workHourPrice }}</td>
62 62
 				<td>{{ data.totalPrice }}</td>
63
-				<td>{{ data.negativeNum }}</td>
63
+				<td class="text-sign" (click)="viewDetail4(data)">{{ data.negativeNum }}</td>
64 64
 				<td>{{ data.favorableRate }}</td>
65 65
 			</tr>
66 66
 		</tbody>
@@ -70,15 +70,15 @@
70 70
 					<td [ngStyle]="{width:widthStyle}" *ngIf="parent==1">{{ data.parentCode }}</td>
71 71
 					<td [ngStyle]="{width:widthStyle}" *ngIf="parent==0">{{ data.deptCode}}</td>
72 72
 					<td [ngStyle]="{width:widthStyle}" *ngIf="parent==1"></td>
73
-					<td [ngStyle]="{width:widthStyle}">{{ data.sum }}</td>
73
+					<td [ngStyle]="{width:widthStyle}" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.sum }}</td>
74 74
 					<td [ngStyle]="{width:widthStyle}">{{ data.avgResponseTime }}</td>
75 75
 					<td [ngStyle]="{width:widthStyle}">{{ data.avgResolvedTime }}</td>
76
-					<td [ngStyle]="{width:widthStyle}">{{ data.resolvedOverNum }}</td>
77
-					<td [ngStyle]="{width:widthStyle}">{{ data.overTimeNum }}</td>
76
+					<td [ngStyle]="{width:widthStyle}" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.resolvedOverNum }}</td>
77
+					<td [ngStyle]="{width:widthStyle}" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.overTimeNum }}</td>
78 78
 					<td [ngStyle]="{width:widthStyle}">{{ data.consumablePrice }}</td>
79 79
 					<td [ngStyle]="{width:widthStyle}">{{ data.workHourPrice }}</td>
80 80
 					<td [ngStyle]="{width:widthStyle}">{{ data.totalPrice }}</td>
81
-					<td [ngStyle]="{width:widthStyle}">{{ data.negativeNum }}</td>
81
+					<td [ngStyle]="{width:widthStyle}" class="text-sign" (click)="viewDetail4(data, 'all')">{{ data.negativeNum }}</td>
82 82
 					<td [ngStyle]="{width:widthStyle}">{{ data.favorableRate }}</td>
83 83
 				</tr>
84 84
 			</table>

+ 4 - 0
src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-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);

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

@@ -2,7 +2,7 @@ import { TabService } from './../../services/tab.service';
2 2
 import { NzMessageService } from 'ng-zorro-antd/message';
3 3
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
4 4
 import { MainService } from 'src/app/services/main.service';
5
-import { ActivatedRoute } from '@angular/router';
5
+import { ActivatedRoute, Router } from '@angular/router';
6 6
 import { ToolService } from "../../../../services/tool.service";
7 7
 import { Subject } from "rxjs";
8 8
 import { debounceTime } from "rxjs/operators";
@@ -19,6 +19,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
19 19
     private mainService: MainService,
20 20
     private message: NzMessageService,
21 21
     private route: ActivatedRoute,
22
+		private router: Router,
22 23
     private tabService: TabService,
23 24
 		private tool: ToolService,
24 25
   ) {}
@@ -59,7 +60,303 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
59 60
 
60 61
     }, 0)
61 62
   }
63
+	
64
+	// 数据下钻
65
+	viewDetail1(data, type){
66
+		let query = null
67
+		if(type=='all'){
68
+			query = {
69
+				startDate: this.customChangeDateComponent.startDate || undefined,
70
+				endDate: this.customChangeDateComponent.endDate || undefined,
71
+				repairDeptId: this.deptId,
72
+				searchQuery:{
73
+					statusValue: 'close',
74
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
75
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
76
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
77
+					floorId: this.fieldConfig.fields.floorId || undefined,
78
+					groupId: this.fieldConfig.fields.groupId || undefined,
79
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
80
+					userId: this.fieldConfig.fields.userId || undefined,
81
+					placeId: this.fieldConfig.fields.floorId || undefined,
82
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
83
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
84
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
85
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
86
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
87
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
88
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
89
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
90
+				}
91
+			}
92
+		}else{
93
+			query = {
94
+				startDate: this.customChangeDateComponent.startDate || undefined,
95
+				endDate: this.customChangeDateComponent.endDate || undefined,
96
+				repairDeptId: data.repairDeptId || undefined,
97
+				searchQuery:{
98
+					statusValue: 'close',
99
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
100
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
101
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
102
+					floorId: this.fieldConfig.fields.floorId || undefined,
103
+					groupId: this.fieldConfig.fields.groupId || undefined,
104
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
105
+					userId: this.fieldConfig.fields.userId || undefined,
106
+					placeId: this.fieldConfig.fields.floorId || undefined,
107
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
108
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
109
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
110
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
111
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
112
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
113
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
114
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
115
+				}
116
+			}
117
+		}
118
+
119
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
120
+		let flag = this.tabService.tabs.some(v => v.path === path);
121
+		flag && this.tabService.deleteRouteSnapshot(path);
122
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
123
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
124
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
125
+		this.router.navigate([path], { replaceUrl: true });
126
+	}
127
+	
128
+	// 数据下钻
129
+	viewDetail2(data, type){
130
+		let query = null
131
+		if(type=='all'){
132
+			query = {
133
+				startDate: this.customChangeDateComponent.startDate || undefined,
134
+				endDate: this.customChangeDateComponent.endDate || undefined,
135
+				repairDeptId: this.deptId,
136
+				searchQuery:{
137
+					statusValue: 'close',
138
+					overtimeId: 1,
139
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
140
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
141
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
142
+					floorId: this.fieldConfig.fields.floorId || undefined,
143
+					groupId: this.fieldConfig.fields.groupId || undefined,
144
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
145
+					userId: this.fieldConfig.fields.userId || undefined,
146
+					placeId: this.fieldConfig.fields.floorId || undefined,
147
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
148
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
149
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
150
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
151
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
152
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
153
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
154
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
155
+					overtimeDTO:{
156
+						id: 1,
157
+						name: "是"
158
+					},
159
+				}
160
+			}
161
+		}else{
162
+			query = {
163
+				startDate: this.customChangeDateComponent.startDate || undefined,
164
+				endDate: this.customChangeDateComponent.endDate || undefined,
165
+				repairDeptId: data.repairDeptId || undefined,
166
+				searchQuery:{
167
+					statusValue: 'close',
168
+					overtimeId: 1,
169
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
170
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
171
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
172
+					floorId: this.fieldConfig.fields.floorId || undefined,
173
+					groupId: this.fieldConfig.fields.groupId || undefined,
174
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
175
+					userId: this.fieldConfig.fields.userId || undefined,
176
+					placeId: this.fieldConfig.fields.floorId || undefined,
177
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
178
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
179
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
180
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
181
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
182
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
183
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
184
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
185
+					overtimeDTO:{
186
+						id: 1,
187
+						name: "是"
188
+					},
189
+				}
190
+			}
191
+		}
192
+
193
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
194
+		let flag = this.tabService.tabs.some(v => v.path === path);
195
+		flag && this.tabService.deleteRouteSnapshot(path);
196
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
197
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
198
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
199
+		this.router.navigate([path], { replaceUrl: true });
200
+	}
201
+	
202
+	// 数据下钻
203
+	viewDetail3(data, type){
204
+		let query = null
205
+		if(type=='all'){
206
+			query = {
207
+				startDate: this.customChangeDateComponent.startDate || undefined,
208
+				endDate: this.customChangeDateComponent.endDate || undefined,
209
+				repairDeptId: this.deptId,
210
+				searchQuery:{
211
+					statusValue: 'close',
212
+					isHangId: 1,
213
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
214
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
215
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
216
+					floorId: this.fieldConfig.fields.floorId || undefined,
217
+					groupId: this.fieldConfig.fields.groupId || undefined,
218
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
219
+					userId: this.fieldConfig.fields.userId || undefined,
220
+					placeId: this.fieldConfig.fields.floorId || undefined,
221
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
222
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
223
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
224
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
225
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
226
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
227
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
228
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
229
+					isHangDTO:{
230
+						id: 1,
231
+						name: "是"
232
+					},
233
+				}
234
+			}
235
+		}else{
236
+			query = {
237
+				startDate: this.customChangeDateComponent.startDate || undefined,
238
+				endDate: this.customChangeDateComponent.endDate || undefined,
239
+				repairDeptId: data.repairDeptId || undefined,
240
+				searchQuery:{
241
+					statusValue: 'close',
242
+					isHangId: 1,
243
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
244
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
245
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
246
+					floorId: this.fieldConfig.fields.floorId || undefined,
247
+					groupId: this.fieldConfig.fields.groupId || undefined,
248
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
249
+					userId: this.fieldConfig.fields.userId || undefined,
250
+					placeId: this.fieldConfig.fields.floorId || undefined,
251
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
252
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
253
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
254
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
255
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
256
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
257
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
258
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
259
+					isHangDTO:{
260
+						id: 1,
261
+						name: "是"
262
+					},
263
+				}
264
+			}
265
+		}
266
+
267
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
268
+		let flag = this.tabService.tabs.some(v => v.path === path);
269
+		flag && this.tabService.deleteRouteSnapshot(path);
270
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
271
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
272
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
273
+		this.router.navigate([path], { replaceUrl: true });
274
+	}
275
+	
276
+	// 数据下钻
277
+	viewDetail4(data, type){
278
+		let query = null
279
+		if(type=='all'){
280
+			query = {
281
+				startDate: this.customChangeDateComponent.startDate || undefined,
282
+				endDate: this.customChangeDateComponent.endDate || undefined,
283
+				repairDeptId: this.deptId,
284
+				searchQuery:{
285
+					statusValue: 'close',
286
+					evaluateId: 20424,
287
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
288
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
289
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
290
+					floorId: this.fieldConfig.fields.floorId || undefined,
291
+					groupId: this.fieldConfig.fields.groupId || undefined,
292
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
293
+					userId: this.fieldConfig.fields.userId || undefined,
294
+					placeId: this.fieldConfig.fields.floorId || undefined,
295
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
296
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
297
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
298
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
299
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
300
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
301
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
302
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
303
+					evaluateDTO: {
304
+						"id": 20424,
305
+						"key": "incident_degree",
306
+						"name": "不满意",
307
+						"value": "1",
308
+						"orders": 5,
309
+						"extra1": "",
310
+						"extra2": ""
311
+					}
312
+				}
313
+			}
314
+		}else{
315
+			query = {
316
+				startDate: this.customChangeDateComponent.startDate || undefined,
317
+				endDate: this.customChangeDateComponent.endDate || undefined,
318
+				repairDeptId: data.repairDeptId || undefined,
319
+				searchQuery:{
320
+					statusValue: 'close',
321
+					evaluateId: 20424,
322
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
323
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
324
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
325
+					floorId: this.fieldConfig.fields.floorId || undefined,
326
+					groupId: this.fieldConfig.fields.groupId || undefined,
327
+					deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
328
+					userId: this.fieldConfig.fields.userId || undefined,
329
+					placeId: this.fieldConfig.fields.floorId || undefined,
330
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
331
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
332
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
333
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
334
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
335
+					groupDTO: this.fieldConfig.fields.groupDTO || undefined,
336
+					userDTO: this.fieldConfig.fields.userDTO || undefined,
337
+					deptTypeDTO: this.fieldConfig.fields.deptTypeDTO || undefined,
338
+					evaluateDTO: {
339
+						"id": 20424,
340
+						"key": "incident_degree",
341
+						"name": "不满意",
342
+						"value": "1",
343
+						"orders": 5,
344
+						"extra1": "",
345
+						"extra2": ""
346
+					}
347
+				}
348
+			}
349
+		}
62 350
 
351
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
352
+		let flag = this.tabService.tabs.some(v => v.path === path);
353
+		flag && this.tabService.deleteRouteSnapshot(path);
354
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
355
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
356
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
357
+		this.router.navigate([path], { replaceUrl: true });
358
+	}
359
+	
63 360
   getQueryParams(){
64 361
     let queryParams = this.tabService.getQueryParams();
65 362
     this.tabService.clearQueryParams();
@@ -241,7 +538,10 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
241 538
     this.deptId = undefined;
242 539
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined, deptTypeId: undefined};
243 540
     this.customChangeDateComponent.resetByDate();
244
-    this.search();
541
+		sessionStorage.removeItem('maintenanceData');
542
+    setTimeout(_=>{
543
+    	this.search();
544
+    })
245 545
   }
246 546
 
247 547
   // 防抖

+ 3 - 1
src/app/views/new-statistics/maintenance-statistics/department-source-statistics/department-source-statistics.component.ts

@@ -229,7 +229,9 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
229 229
     this.deptId = undefined;
230 230
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, buildingId: undefined, floorId: undefined, deptTypeId: undefined};
231 231
     this.customChangeDateComponent.resetByDate();
232
-    this.search();
232
+    setTimeout(_=>{
233
+    	this.search();
234
+    })
233 235
   }
234 236
 
235 237
   // 防抖

+ 3 - 1
src/app/views/new-statistics/maintenance-statistics/floor-statistics/floor-statistics.component.ts

@@ -210,7 +210,9 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
210 210
     this.buildingId = undefined;
211 211
     this.fieldConfig.fields = {categoryId: undefined};
212 212
     this.customChangeDateComponent.resetByDate();
213
-    this.search();
213
+    setTimeout(_=>{
214
+    	this.search();
215
+    })
214 216
   }
215 217
 
216 218
   // 楼栋搜索

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

@@ -35,15 +35,15 @@
35 35
   <tbody>
36 36
     <tr *ngFor="let data of listOfData">
37 37
       <td>{{ data.groupName }}</td>
38
-      <td>{{ data.sum }}</td>
38
+      <td class="text-sign" (click)="viewDetail1(data)">{{ data.sum }}</td>
39 39
       <td>{{ data.avgResponseTime }}</td>
40 40
       <td>{{ data.avgResolvedTime }}</td>
41
-      <td>{{ data.resolvedOverNum }}</td>
42
-      <td>{{ data.overTimeNum }}</td>
41
+      <td class="text-sign" (click)="viewDetail2(data)">{{ data.resolvedOverNum }}</td>
42
+      <td class="text-sign" (click)="viewDetail3(data)">{{ data.overTimeNum }}</td>
43 43
       <td>{{ data.consumablePrice }}</td>
44 44
       <td>{{ data.workHourPrice }}</td>
45 45
       <td>{{ data.totalPrice }}</td>
46
-      <td>{{ data.negativeNum }}</td>
46
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.negativeNum }}</td>
47 47
       <td>{{ data.favorableRate }}</td>
48 48
     </tr>
49 49
   </tbody>
@@ -51,15 +51,15 @@
51 51
     <table class="footTable">
52 52
       <tr *ngFor="let data of listOfDataEnd">
53 53
         <td style="width: 10%">{{ data.groupName }}</td>
54
-        <td style="width: 9%">{{ data.sum }}</td>
54
+        <td style="width: 9%" class="text-sign" (click)="viewDetail1(data, 'all')">{{ data.sum }}</td>
55 55
         <td style="width: 9%">{{ data.avgResponseTime }}</td>
56 56
         <td style="width: 9%">{{ data.avgResolvedTime }}</td>
57
-        <td style="width: 9%">{{ data.resolvedOverNum }}</td>
58
-        <td style="width: 9%">{{ data.overTimeNum }}</td>
57
+        <td style="width: 9%" class="text-sign" (click)="viewDetail2(data, 'all')">{{ data.resolvedOverNum }}</td>
58
+        <td style="width: 9%" class="text-sign" (click)="viewDetail3(data, 'all')">{{ data.overTimeNum }}</td>
59 59
         <td style="width: 9%">{{ data.consumablePrice }}</td>
60 60
         <td style="width: 9%">{{ data.workHourPrice }}</td>
61 61
         <td style="width: 9%">{{ data.totalPrice }}</td>
62
-        <td style="width: 9%">{{ data.negativeNum }}</td>
62
+        <td style="width: 9%" class="text-sign" (click)="viewDetail4(data, 'all')">{{ data.negativeNum }}</td>
63 63
         <td style="width: 9%">{{ data.favorableRate }}</td>
64 64
       </tr>
65 65
     </table>

+ 4 - 0
src/app/views/new-statistics/maintenance-statistics/group-statistics/group-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);

+ 265 - 2
src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.ts

@@ -2,7 +2,7 @@ import { TabService } from './../../services/tab.service';
2 2
 import { NzMessageService } from 'ng-zorro-antd/message';
3 3
 import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
4 4
 import { MainService } from 'src/app/services/main.service';
5
-import { ActivatedRoute } from '@angular/router';
5
+import { ActivatedRoute, Router } from '@angular/router';
6 6
 import { CustomChangeDateComponent } from '../../components/custom-change-date/custom-change-date.component';
7 7
 @Component({
8 8
   selector: "app-group-statistics",
@@ -15,6 +15,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
15 15
     private mainService: MainService,
16 16
     private message: NzMessageService,
17 17
     private route: ActivatedRoute,
18
+		private router: Router,
18 19
     private tabService: TabService,
19 20
   ) {}
20 21
 
@@ -43,7 +44,267 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
43 44
 
44 45
     }, 0)
45 46
   }
47
+	
48
+	// 数据下钻
49
+	viewDetail1(data, type){
50
+		let query = null
51
+		if(type=='all'){
52
+			query = {
53
+				startDate: this.customChangeDateComponent.startDate || undefined,
54
+				endDate: this.customChangeDateComponent.endDate || undefined,
55
+				searchQuery:{
56
+					statusValue: 'close',
57
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
58
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
59
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
60
+					floorId: this.fieldConfig.fields.floorId || undefined,
61
+					placeId: this.fieldConfig.fields.floorId || undefined,
62
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
63
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
64
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
65
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
66
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
67
+				}
68
+			}
69
+		}else{
70
+			query = {
71
+				startDate: this.customChangeDateComponent.startDate || undefined,
72
+				endDate: this.customChangeDateComponent.endDate || undefined,
73
+				searchQuery:{
74
+					statusValue: 'close',
75
+					groupId: data.groupId ? data.groupId : -1,
76
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
77
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
78
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
79
+					floorId: this.fieldConfig.fields.floorId || undefined,
80
+					placeId: this.fieldConfig.fields.floorId || undefined,
81
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
82
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
83
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
84
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
85
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
86
+					groupDTO:{
87
+						groupName: data.groupName,
88
+						id: data.groupId ? data.groupId : -1,
89
+					}
90
+				}
91
+			}
92
+		}
46 93
 
94
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
95
+		let flag = this.tabService.tabs.some(v => v.path === path);
96
+		flag && this.tabService.deleteRouteSnapshot(path);
97
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
98
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
99
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
100
+		this.router.navigate([path], { replaceUrl: true });
101
+	}
102
+	
103
+	// 数据下钻
104
+	viewDetail2(data, type){
105
+		let query = null
106
+		if(type=='all'){
107
+			query = {
108
+				startDate: this.customChangeDateComponent.startDate || undefined,
109
+				endDate: this.customChangeDateComponent.endDate || undefined,
110
+				searchQuery:{
111
+					statusValue: 'close',
112
+					overtimeId: 1,
113
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
114
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
115
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
116
+					floorId: this.fieldConfig.fields.floorId || undefined,
117
+					placeId: this.fieldConfig.fields.floorId || undefined,
118
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
119
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
120
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
121
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
122
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
123
+					overtimeDTO:{
124
+						id: 1,
125
+						name: "是"
126
+					},
127
+				}
128
+			}
129
+		}else{
130
+			query = {
131
+				startDate: this.customChangeDateComponent.startDate || undefined,
132
+				endDate: this.customChangeDateComponent.endDate || undefined,
133
+				searchQuery:{
134
+					statusValue: 'close',
135
+					groupId: data.groupId ? data.groupId : -1,
136
+					overtimeId: 1,
137
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
138
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
139
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
140
+					floorId: this.fieldConfig.fields.floorId || undefined,
141
+					placeId: this.fieldConfig.fields.floorId || undefined,
142
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
143
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
144
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
145
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
146
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
147
+					groupDTO:{
148
+						groupName: data.groupName,
149
+						id: data.groupId ? data.groupId : -1,
150
+					},
151
+					overtimeDTO:{
152
+						id: 1,
153
+						name: "是"
154
+					},
155
+				}
156
+			}
157
+		}
158
+
159
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
160
+		let flag = this.tabService.tabs.some(v => v.path === path);
161
+		flag && this.tabService.deleteRouteSnapshot(path);
162
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
163
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
164
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
165
+		this.router.navigate([path], { replaceUrl: true });
166
+	}
167
+	
168
+	// 数据下钻
169
+	viewDetail3(data, type){
170
+		let query = null
171
+		if(type=='all'){
172
+			query = {
173
+				startDate: this.customChangeDateComponent.startDate || undefined,
174
+				endDate: this.customChangeDateComponent.endDate || undefined,
175
+				searchQuery:{
176
+					statusValue: 'close',
177
+					isHangId: 1,
178
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
179
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
180
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
181
+					floorId: this.fieldConfig.fields.floorId || undefined,
182
+					placeId: this.fieldConfig.fields.floorId || undefined,
183
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
184
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
185
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
186
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
187
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
188
+					isHangDTO:{
189
+						id: 1,
190
+						name: "是"
191
+					},
192
+				}
193
+			}
194
+		}else{
195
+			query = {
196
+				startDate: this.customChangeDateComponent.startDate || undefined,
197
+				endDate: this.customChangeDateComponent.endDate || undefined,
198
+				searchQuery:{
199
+					statusValue: 'close',
200
+					groupId: data.groupId ? data.groupId : -1,
201
+					isHangId: 1,
202
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
203
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
204
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
205
+					floorId: this.fieldConfig.fields.floorId || undefined,
206
+					placeId: this.fieldConfig.fields.floorId || undefined,
207
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
208
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
209
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
210
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
211
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
212
+					groupDTO:{
213
+						groupName: data.groupName,
214
+						id: data.groupId ? data.groupId : -1,
215
+					},
216
+					isHangDTO:{
217
+						id: 1,
218
+						name: "是"
219
+					},
220
+				}
221
+			}
222
+		}
223
+
224
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
225
+		let flag = this.tabService.tabs.some(v => v.path === path);
226
+		flag && this.tabService.deleteRouteSnapshot(path);
227
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
228
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
229
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
230
+		this.router.navigate([path], { replaceUrl: true });
231
+	}
232
+	
233
+	// 数据下钻
234
+	viewDetail4(data, type){
235
+		let query = null
236
+		if(type=='all'){
237
+			query = {
238
+				startDate: this.customChangeDateComponent.startDate || undefined,
239
+				endDate: this.customChangeDateComponent.endDate || undefined,
240
+				searchQuery:{
241
+					statusValue: 'close',
242
+					evaluateId: 20424,
243
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
244
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
245
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
246
+					floorId: this.fieldConfig.fields.floorId || undefined,
247
+					placeId: this.fieldConfig.fields.floorId || undefined,
248
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
249
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
250
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
251
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
252
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
253
+					evaluateDTO: {
254
+						"id": 20424,
255
+						"key": "incident_degree",
256
+						"name": "不满意",
257
+						"value": "1",
258
+						"orders": 5,
259
+						"extra1": "",
260
+						"extra2": ""
261
+					}
262
+				}
263
+			}
264
+		}else{
265
+			query = {
266
+				startDate: this.customChangeDateComponent.startDate || undefined,
267
+				endDate: this.customChangeDateComponent.endDate || undefined,
268
+				searchQuery:{
269
+					statusValue: 'close',
270
+					groupId: data.groupId ? data.groupId : -1,
271
+					evaluateId: 20424,
272
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
273
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
274
+					buildingId: this.fieldConfig.fields.buildingId || undefined,
275
+					floorId: this.fieldConfig.fields.floorId || undefined,
276
+					placeId: this.fieldConfig.fields.floorId || undefined,
277
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
278
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
279
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
280
+					buildingDTO: this.fieldConfig.fields.buildingDTO || undefined,
281
+					floorDTO: this.fieldConfig.fields.floorDTO || undefined,
282
+					groupDTO:{
283
+						groupName: data.groupName,
284
+						id: data.groupId ? data.groupId : -1,
285
+					},
286
+					evaluateDTO: {
287
+						"id": 20424,
288
+						"key": "incident_degree",
289
+						"name": "不满意",
290
+						"value": "1",
291
+						"orders": 5,
292
+						"extra1": "",
293
+						"extra2": ""
294
+					}
295
+				}
296
+			}
297
+		}
298
+
299
+		let path = '/newStatistics/maintenanceStatistics/incidentList'
300
+		let flag = this.tabService.tabs.some(v => v.path === path);
301
+		flag && this.tabService.deleteRouteSnapshot(path);
302
+		this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
303
+		this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
304
+		sessionStorage.setItem('maintenanceData', JSON.stringify(query))
305
+		this.router.navigate([path], { replaceUrl: true });
306
+	}
307
+	
47 308
   getQueryParams(){
48 309
     let queryParams = this.tabService.getQueryParams();
49 310
     this.tabService.clearQueryParams();
@@ -200,7 +461,9 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
200 461
     this.dateRange = []
201 462
     this.fieldConfig.fields = {categoryId: undefined, buildingId: undefined, floorId: undefined};
202 463
     this.customChangeDateComponent.resetByDate();
203
-    this.search();
464
+    setTimeout(_=>{
465
+    	this.search();
466
+    })
204 467
   }
205 468
 
206 469
   // 防抖

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

@@ -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 || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || 
24
-		this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.workHourParentDTO || this.fieldConfig.fields.workHourSmallDTO || this.fieldConfig.fields.evaluateDTO || this.fieldConfig.fields.repairUserDTO || this.fieldConfig.fields.consumableDTO || 
25
-		this.fieldConfig.fields.isHangDTO || this.fieldConfig.fields.overtimeDTO || this.fieldConfig.fields.codeNumDTO">
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">
26 26
   <span>{{fieldConfig.fields.workHourParentDTO?.workName}}</span>
27 27
 	<span>{{fieldConfig.fields.workHourSmallDTO?.workName}}</span>
28 28
 	<span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
@@ -40,13 +40,15 @@
40 40
 	<span>{{fieldConfig.fields.isHangDTO?.name}}</span>
41 41
 	<span>{{fieldConfig.fields.overtimeDTO?.name}}</span>
42 42
 	<span>{{fieldConfig.fields.codeNumDTO}}</span>
43
+	<span>{{fieldConfig.fields.deptTypeDTO?.name}}</span>
44
+	
43 45
 </div>
44
-<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px', x: '1550px'}">
46
+<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px', x: '1600px'}">
45 47
   <thead>
46 48
     <tr>
47 49
       <th nzWidth="150px">序号|单号</th>
48 50
       <th nzWidth="300px">故障描述</th>
49
-      <th nzWidth="150px">详细地址</th>
51
+      <th nzWidth="200px">详细地址</th>
50 52
       <th nzWidth="100px">受|处理人/组</th>
51 53
       <th nzWidth="200px">时间过程</th>
52 54
       <th nzWidth="100px">时长</th>
@@ -59,11 +61,17 @@
59 61
   <tbody>
60 62
     <tr *ngFor="let data of listOfData; let index = index;">
61 63
       <td (click)="viewDetail(data)">
62
-				<div>{{index+(pageIndex-1) * pageSize + 1}}</div>
64
+				<div>{{index+(pageIndex-1) * pageSize + 1}} {{data.priorityName}}</div>
63 65
 				<div class="text-style">{{data.incidentsign}}</div>
64 66
 			</td>
65
-      <td class="hide-describe">{{data.description}}</td>
66
-      <td>{{ data.housenumber }}</td>
67
+      <td class="hide-describe">
68
+				<div>{{data.mutiCategory}}</div>
69
+				<div>{{data.description}}</div>
70
+			</td>
71
+      <td>
72
+				<div>{{data.hosName}}-{{data.repairDept}}</div>
73
+				<div>{{ data.housenumber }}</div>
74
+			</td>
67 75
       <td>
68 76
 				<div>{{data.creator}}</div>
69 77
 				<div>{{data.groupOrHandlerUser}}</div>
@@ -79,8 +87,8 @@
79 87
 				<div>解决:{{data.resolvedTime}}</div>
80 88
 			</td>
81 89
       <td>
82
-      	<div>预接:{{data.overdueTime|date:'yyyy-MM-dd HH:mm:ss'}}</div>
83
-      	<div>预解:{{data.overdueResponseDate|date:'yyyy-MM-dd HH:mm:ss'}}</div>
90
+      	<div>预接:{{data.overdueResponseDate|date:'yyyy-MM-dd HH:mm:ss'}}</div>
91
+      	<div>预解:{{data.overdueTime|date:'yyyy-MM-dd HH:mm:ss'}}</div>
84 92
       </td>
85 93
       <td>{{ data.remark }}</td>
86 94
       <td>
@@ -101,7 +109,7 @@
101 109
 </div>
102 110
 
103 111
 <!-- 详细搜索 -->
104
-<app-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-search-more>
112
+<app-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)" [going]="goingType"></app-search-more>
105 113
 
106 114
 <!-- 详情 -->
107 115
 <app-incident-detail [id]="coopData.id" *ngIf="detailModalShow" (closeModelHs)="closeDetailModelOrder($event)" (confirmModelHs)="confirmDetailModelOrder($event)"></app-incident-detail>

+ 64 - 37
src/app/views/new-statistics/maintenance-statistics/incident-list/incident-list.component.ts

@@ -2,7 +2,7 @@ import { TabService } from './../../services/tab.service';
2 2
 import { debounceTime, filter } from 'rxjs/operators';
3 3
 import { Subject } from 'rxjs';
4 4
 import { NzMessageService } from 'ng-zorro-antd/message';
5
-import { Component, OnInit, HostListener, AfterViewInit, ViewChild } from "@angular/core";
5
+import { Component, OnInit, HostListener, AfterViewInit, ViewChild, OnDestroy } from "@angular/core";
6 6
 import { MainService } from 'src/app/services/main.service';
7 7
 import { ActivatedRoute, Router, NavigationEnd  } from '@angular/router';
8 8
 import cloneDeep from 'lodash-es/cloneDeep'
@@ -12,7 +12,7 @@ import { CustomChangeDateComponent } from '../../components/custom-change-date/c
12 12
   templateUrl: "./incident-list.component.html",
13 13
   styleUrls: ["./incident-list.component.less"],
14 14
 })
15
-export class IncidentListComponent implements OnInit, AfterViewInit {
15
+export class IncidentListComponent implements OnInit, AfterViewInit, OnDestroy {
16 16
   @ViewChild('customChangeDate', { static: false }) customChangeDateComponent!: CustomChangeDateComponent;
17 17
   constructor(
18 18
     private mainService: MainService,
@@ -31,29 +31,33 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
31 31
   repairDeptId;//报修科室id
32 32
 
33 33
   searchTimerSubject = new Subject();
34
-
34
+	dateData1:any;
35
+	dateData2:any;
36
+	
35 37
   ngOnInit() {
38
+		// 数据下钻搜索
36 39
 		this.getRouteQuery()
37
-		this.router.events
38
-		  .pipe(filter(event => event instanceof NavigationEnd))
39
-		  .subscribe((event: NavigationEnd) => {
40
-		    if(event.urlAfterRedirects=='/newStatistics/maintenanceStatistics/incidentList'){
41
-					this.getRouteQuery()
42
-		    }
43
-		  });
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
+		//   });
44 48
 
45 49
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
46 50
       let fun = v[0];
47 51
       fun.call(this, v[1]);
48 52
     });
49 53
   }
50
-
54
+	
55
+	ngOnDestroy(){
56
+		sessionStorage.removeItem('maintenanceData')
57
+	}
58
+	
51 59
   ngAfterViewInit(){
52 60
     this.initSessionData();
53
-    this.getQueryParams();
54
-    setTimeout(() => {
55
-      this.search();
56
-    }, 0)
57 61
     this.onResize(0);
58 62
   }
59 63
 
@@ -65,34 +69,48 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
65 69
     }, 0)
66 70
   }
67 71
 	
72
+	goingType:boolean = false;
68 73
 	getRouteQuery(){
69 74
 		let data = sessionStorage.getItem('maintenanceData')
70 75
 		let query = null
71 76
 		if(data){
72 77
 			query = JSON.parse(data)
73 78
 			console.log('query==========',query)
74
-			if(query.startData){
75
-				this.customChangeDateComponent.startDate = query.startData
76
-			}
77
-			if(query.endDate){
78
-				this.customChangeDateComponent.startDate = query.endDate
79
-			}
80
-			if(query.searchQuery){
81
-				this.fieldConfig.fields = query.searchQuery
82
-			}
83
-			
84
-			this.search();
85
-			this.onResize(37);
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)
95
+		}else{
96
+			setTimeout(_=>{
97
+				this.getQueryParams();
98
+			},50)
86 99
 		}
87 100
 	}
88 101
 	
89 102
   getQueryParams(){
90 103
     let queryParams = this.tabService.getQueryParams();
91 104
     this.tabService.clearQueryParams();
105
+		console.log(8989898,queryParams)
92 106
     if(queryParams.dateRange){
93 107
       this.dateRange = queryParams.dateRange;
94
-      this.customChangeDateComponent.initByDate(this.dateRange);
108
+      this.customChangeDateComponent.initByDate(this.dateRange, queryParams.defRange);
95 109
     }
110
+		setTimeout(_=>{
111
+			this.search();
112
+			this.onResize(37);
113
+		},50)
96 114
   }
97 115
 
98 116
   get getMoreFilter(){
@@ -152,7 +170,7 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
152 170
     let postData:any = {
153 171
       idx: this.pageIndex - 1,
154 172
       sum: this.pageSize,
155
-      dateType: this.customChangeDateComponent.dateType,
173
+      dateType: this.customChangeDateComponent.dateType || undefined,
156 174
       startDate: this.customChangeDateComponent.startDate || undefined,
157 175
       endDate: this.customChangeDateComponent.endDate || undefined,
158 176
       hosId: this.hosId || undefined,
@@ -170,10 +188,12 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
170 188
 			companyId: this.fieldConfig.fields.companyId || undefined,
171 189
 			repairUserId: this.fieldConfig.fields.repairUserId || undefined,
172 190
 			consumableId: this.fieldConfig.fields.consumableId || undefined,
173
-			timeout: this.fieldConfig.fields.overtimeId==0 ? undefined : this.fieldConfig.fields.overtimeId,
174
-			hangUp: this.fieldConfig.fields.isHangId==0 ? undefined : this.fieldConfig.fields.isHangId,
191
+			timeout: this.fieldConfig.fields.overtimeId,
192
+			hangUp: this.fieldConfig.fields.isHangId,
175 193
 			incidentSign: this.fieldConfig.fields.codeNum,
176 194
 			wxDegreeId: this.fieldConfig.fields.evaluateId,
195
+			statusValue: this.fieldConfig.fields.statusValue || undefined,
196
+			deptTypeId: this.fieldConfig.fields.deptTypeId || undefined,
177 197
     };
178 198
 		
179 199
 		if(this.fieldConfig.fields.workHourParentId && this.fieldConfig.fields.workHourSmallId){
@@ -239,10 +259,12 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
239 259
     	companyId: this.fieldConfig.fields.companyId || undefined,
240 260
     	repairUserId: this.fieldConfig.fields.repairUserId || undefined,
241 261
     	consumableId: this.fieldConfig.fields.consumableId || undefined,
242
-    	timeout: this.fieldConfig.fields.overtimeId==0 ? undefined : this.fieldConfig.fields.overtimeId,
243
-    	hangUp: this.fieldConfig.fields.isHangId==0 ? undefined : this.fieldConfig.fields.isHangId,
262
+    	timeout: this.fieldConfig.fields.overtimeId,
263
+    	hangUp: this.fieldConfig.fields.isHangId,
244 264
     	incidentSign: this.fieldConfig.fields.codeNum,
245 265
 			wxDegreeId: this.fieldConfig.fields.evaluateId,
266
+			statusValue: this.fieldConfig.fields.statusValue || undefined,
267
+			deptTypeId: this.fieldConfig.fields.deptTypeId || undefined
246 268
     };
247 269
     
248 270
     if(this.fieldConfig.fields.workHourParentId && this.fieldConfig.fields.workHourSmallId){
@@ -280,11 +302,16 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
280 302
 		this.sortCurrentValue = "";
281 303
 		this.sortCurrent = {};
282 304
     this.dateRange = []
305
+		this.dateData1 = null;
306
+		this.dateData2 = null;
283 307
     this.repairDeptId = undefined;
284 308
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined};
285 309
     this.customChangeDateComponent.resetByDate();
286
-    this.search();
287
-		this.onResize(0);
310
+		sessionStorage.removeItem('maintenanceData');
311
+		setTimeout(_=>{
312
+			this.search();
313
+			this.onResize(0);
314
+		})
288 315
   }
289 316
 
290 317
   // 科室搜索
@@ -345,8 +372,8 @@ export class IncidentListComponent implements OnInit, AfterViewInit {
345 372
   fieldConfig:any = {
346 373
     fields: {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: 
347 374
 		undefined,buildingId: undefined, floorId: undefined, companyId: undefined, 
348
-		workHourParentId: undefined, workHourSmallId: undefined, evaluateId: undefined, repairUserId: undefined, consumableId: undefined, isHangId: undefined, codeNum: undefined, overtimeId: undefined},
349
-    config: {groupAndUser: true, category123: true, source: true, buildingAndFloor: true, company: true, workHourParent: true, workHourSmall: true, evaluate: true, repairUser: true, consumable: true, isHang: true, code: true, overtime: true},
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},
350 377
   }
351 378
   showSearchMore:boolean = false;
352 379
   showMore(){

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

@@ -47,15 +47,15 @@
47 47
   <tbody>
48 48
     <tr *ngFor="let data of listOfData">
49 49
       <td>{{ data.startDate }}</td>
50
-      <td>{{ data.sum }}</td>
50
+      <td class="text-sign" (click)="viewDetail1(data)">{{ data.sum }}</td>
51 51
       <td>{{ data.avgResponseTime }}</td>
52 52
       <td>{{ data.avgResolvedTime }}</td>
53
-      <td>{{ data.resolvedOverNum }}</td>
54
-      <td>{{ data.overTimeNum }}</td>
53
+      <td class="text-sign" (click)="viewDetail2(data)">{{ data.resolvedOverNum }}</td>
54
+      <td class="text-sign" (click)="viewDetail3(data)">{{ data.overTimeNum }}</td>
55 55
       <td>{{ data.consumablePrice }}</td>
56 56
       <td>{{ data.workHourPrice }}</td>
57 57
       <td>{{ data.totalPrice }}</td>
58
-      <td>{{ data.negativeNum }}</td>
58
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.negativeNum }}</td>
59 59
       <td>{{ data.favorableRate }}</td>
60 60
     </tr>
61 61
   </tbody>
@@ -63,15 +63,15 @@
63 63
     <table class="footTable">
64 64
       <tr *ngFor="let data of listOfDataEnd">
65 65
         <td style="width: 10%">{{ data.startDate }}</td>
66
-        <td style="width: 9%">{{ data.sum }}</td>
66
+        <td style="width: 9%" class="text-sign" (click)="viewDetail1(data,'all')">{{ data.sum }}</td>
67 67
         <td style="width: 9%">{{ data.avgResponseTime }}</td>
68 68
         <td style="width: 9%">{{ data.avgResolvedTime }}</td>
69
-        <td style="width: 9%">{{ data.resolvedOverNum }}</td>
70
-        <td style="width: 9%">{{ data.overTimeNum }}</td>
69
+        <td style="width: 9%" class="text-sign" (click)="viewDetail2(data,'all')">{{ data.resolvedOverNum }}</td>
70
+        <td style="width: 9%" class="text-sign" (click)="viewDetail3(data,'all')">{{ data.overTimeNum }}</td>
71 71
         <td style="width: 9%">{{ data.consumablePrice }}</td>
72 72
         <td style="width: 9%">{{ data.workHourPrice }}</td>
73 73
         <td style="width: 9%">{{ data.totalPrice }}</td>
74
-        <td style="width: 9%">{{ data.negativeNum }}</td>
74
+        <td style="width: 9%" class="text-sign" (click)="viewDetail4(data,'all')">{{ data.negativeNum }}</td>
75 75
         <td style="width: 9%">{{ data.favorableRate }}</td>
76 76
       </tr>
77 77
     </table>

+ 4 - 0
src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-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);

+ 287 - 3
src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-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-incident-statistics",
@@ -17,6 +17,7 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
17 17
     private mainService: MainService,
18 18
     private message: NzMessageService,
19 19
     private route: ActivatedRoute,
20
+		private router: Router,
20 21
     private tabService: TabService,
21 22
   ) {}
22 23
 
@@ -54,7 +55,287 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
54 55
 
55 56
     }, 0)
56 57
   }
57
-
58
+	
59
+	// 数据下钻
60
+	viewDetail1(data,type){
61
+		let query = null
62
+		if(type=='all'){
63
+			query = {
64
+				startDate: this.customChangeDateComponent.startDate,
65
+				endDate: this.customChangeDateComponent.endDate,
66
+				repairDeptId: this.repairDeptId || undefined,
67
+				searchQuery:{
68
+					statusValue: 'close',
69
+					groupId: this.fieldConfig.fields.groupId || undefined,
70
+					userId: this.fieldConfig.fields.userId || undefined,
71
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
72
+					sourceId: this.fieldConfig.fields.sourceId || undefined,
73
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
74
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
75
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
76
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
77
+					groupDTO: this.fieldConfig.fields.groupDTO,
78
+					sourceDTO: this.fieldConfig.fields.sourceDTO,
79
+					userDTO: this.fieldConfig.fields.userDTO,
80
+				}
81
+			}
82
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
83
+			let flag = this.tabService.tabs.some(v => v.path === path);
84
+			flag && this.tabService.deleteRouteSnapshot(path);
85
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
86
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
87
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
88
+			this.router.navigate([path], { replaceUrl: true });
89
+		}else{
90
+			 query = {
91
+				startDate: data.startDate + ' ' + '00:00:00',
92
+				endDate: data.startDate + ' ' + '23:59:59',
93
+				repairDeptId: this.repairDeptId || undefined,
94
+				searchQuery:{
95
+					statusValue: 'close',
96
+					groupId: this.fieldConfig.fields.groupId || undefined,
97
+					userId: this.fieldConfig.fields.userId || undefined,
98
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
99
+					sourceId: this.fieldConfig.fields.sourceId || undefined,
100
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
101
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
102
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
103
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
104
+					groupDTO: this.fieldConfig.fields.groupDTO,
105
+					sourceDTO: this.fieldConfig.fields.sourceDTO,
106
+					userDTO: this.fieldConfig.fields.userDTO,
107
+				}
108
+			}
109
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
110
+			let flag = this.tabService.tabs.some(v => v.path === path);
111
+			flag && this.tabService.deleteRouteSnapshot(path);
112
+			this.tabService.setQueryParams('dateRange', [data.startDate + ' ' + '00:00:00', data.startDate + ' ' + '23:59:59']);
113
+			this.tabService.setQueryParams('defRange', null);
114
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
115
+			this.router.navigate([path], { replaceUrl: true });
116
+		}
117
+	}
118
+	
119
+	// 数据下钻
120
+	viewDetail2(data, type){
121
+		let query = null
122
+		if(type=='all'){
123
+			query = {
124
+				startDate: this.customChangeDateComponent.startDate,
125
+				endDate: this.customChangeDateComponent.endDate,
126
+				repairDeptId: this.repairDeptId || undefined,
127
+				searchQuery:{
128
+					statusValue: 'close',
129
+					overtimeId: 1,
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
+					overtimeDTO:{
142
+						id: 1,
143
+						name: "是"
144
+					},
145
+				}
146
+			}
147
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
148
+			let flag = this.tabService.tabs.some(v => v.path === path);
149
+			flag && this.tabService.deleteRouteSnapshot(path);
150
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
151
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
152
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
153
+			this.router.navigate([path], { replaceUrl: true });
154
+		}else{
155
+			query = {
156
+				startDate: data.startDate + ' ' + '00:00:00',
157
+				endDate: data.startDate + ' ' + '23:59:59',
158
+				repairDeptId: this.repairDeptId || undefined,
159
+				searchQuery:{
160
+					statusValue: 'close',
161
+					overtimeId: 1,
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
+					overtimeDTO:{
174
+						id: 1,
175
+						name: "是"
176
+					},
177
+				}
178
+			}
179
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
180
+			let flag = this.tabService.tabs.some(v => v.path === path);
181
+			flag && this.tabService.deleteRouteSnapshot(path);
182
+			this.tabService.setQueryParams('dateRange', [data.startDate + ' ' + '00:00:00', data.startDate + ' ' + '23:59:59']);
183
+			this.tabService.setQueryParams('defRange', null);
184
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
185
+			this.router.navigate([path], { replaceUrl: true });
186
+		}
187
+	}
188
+	
189
+	// 数据下钻
190
+	viewDetail3(data, type){
191
+		let query = null;
192
+		if(type=='all'){
193
+			query = {
194
+				startDate: this.customChangeDateComponent.startDate,
195
+				endDate: this.customChangeDateComponent.endDate,
196
+				repairDeptId: this.repairDeptId || undefined,
197
+				searchQuery:{
198
+					statusValue: 'close',
199
+					isHangId: 1,
200
+					groupId: this.fieldConfig.fields.groupId || undefined,
201
+					userId: this.fieldConfig.fields.userId || undefined,
202
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
203
+					sourceId: this.fieldConfig.fields.sourceId || undefined,
204
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
205
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
206
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
207
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
208
+					groupDTO: this.fieldConfig.fields.groupDTO,
209
+					sourceDTO: this.fieldConfig.fields.sourceDTO,
210
+					userDTO: this.fieldConfig.fields.userDTO,
211
+					isHangDTO: {
212
+						id: 1,
213
+						name: "是"
214
+					},
215
+				}
216
+			}
217
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
218
+			let flag = this.tabService.tabs.some(v => v.path === path);
219
+			flag && this.tabService.deleteRouteSnapshot(path);
220
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
221
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
222
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
223
+			this.router.navigate([path], { replaceUrl: true });
224
+		}else{
225
+			query = {
226
+				startDate: data.startDate + ' ' + '00:00:00',
227
+				endDate: data.startDate + ' ' + '23:59:59',
228
+				repairDeptId: this.repairDeptId || undefined,
229
+				searchQuery:{
230
+					statusValue: 'close',
231
+					isHangId: 1,
232
+					groupId: this.fieldConfig.fields.groupId || undefined,
233
+					userId: this.fieldConfig.fields.userId || undefined,
234
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
235
+					sourceId: this.fieldConfig.fields.sourceId || undefined,
236
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
237
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
238
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
239
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
240
+					groupDTO: this.fieldConfig.fields.groupDTO,
241
+					sourceDTO: this.fieldConfig.fields.sourceDTO,
242
+					userDTO: this.fieldConfig.fields.userDTO,
243
+					isHangDTO: {
244
+						id: 1,
245
+						name: "是"
246
+					},
247
+				}
248
+			}
249
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
250
+			let flag = this.tabService.tabs.some(v => v.path === path);
251
+			flag && this.tabService.deleteRouteSnapshot(path);
252
+			this.tabService.setQueryParams('dateRange', [data.startDate + ' ' + '00:00:00', data.startDate + ' ' + '23:59:59']);
253
+			this.tabService.setQueryParams('defRange', null);
254
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
255
+			this.router.navigate([path], { replaceUrl: true });
256
+		}
257
+	}
258
+	
259
+	// 数据下钻
260
+	viewDetail4(data, type){
261
+		let query = null
262
+		if(type=='all'){
263
+			query = {
264
+				startDate: this.customChangeDateComponent.startDate,
265
+				endDate: this.customChangeDateComponent.endDate,
266
+				repairDeptId: this.repairDeptId || undefined,
267
+				searchQuery:{
268
+					statusValue: 'close',
269
+					evaluateId: 20424,
270
+					groupId: this.fieldConfig.fields.groupId || undefined,
271
+					userId: this.fieldConfig.fields.userId || undefined,
272
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
273
+					sourceId: this.fieldConfig.fields.sourceId || undefined,
274
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
275
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
276
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
277
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
278
+					groupDTO: this.fieldConfig.fields.groupDTO,
279
+					sourceDTO: this.fieldConfig.fields.sourceDTO,
280
+					userDTO: this.fieldConfig.fields.userDTO,
281
+					evaluateDTO: {
282
+						"id": 20424,
283
+						"key": "incident_degree",
284
+						"name": "不满意",
285
+						"value": "1",
286
+						"orders": 5,
287
+						"extra1": "",
288
+						"extra2": ""
289
+					},
290
+				}
291
+			}
292
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
293
+			let flag = this.tabService.tabs.some(v => v.path === path);
294
+			flag && this.tabService.deleteRouteSnapshot(path);
295
+			this.tabService.setQueryParams('dateRange', [this.customChangeDateComponent.startDate, this.customChangeDateComponent.endDate]);
296
+			this.tabService.setQueryParams('defRange', this.customChangeDateComponent.defRange);
297
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
298
+			this.router.navigate([path], { replaceUrl: true });
299
+		}else{
300
+			query = {
301
+				startDate: data.startDate + ' ' + '00:00:00',
302
+				endDate: data.startDate + ' ' + '23:59:59',
303
+				repairDeptId: this.repairDeptId || undefined,
304
+				searchQuery:{
305
+					statusValue: 'close',
306
+					evaluateId: 20424,
307
+					groupId: this.fieldConfig.fields.groupId || undefined,
308
+					userId: this.fieldConfig.fields.userId || undefined,
309
+					categoryId: this.fieldConfig.fields.categoryId || undefined,
310
+					sourceId: this.fieldConfig.fields.sourceId || undefined,
311
+					hierarchy: this.fieldConfig.fields.hierarchy || undefined,
312
+					category1DTO: this.fieldConfig.fields.category1DTO || undefined,
313
+					category2DTO: this.fieldConfig.fields.category2DTO || undefined,
314
+					category3DTO: this.fieldConfig.fields.category3DTO || undefined,
315
+					groupDTO: this.fieldConfig.fields.groupDTO,
316
+					sourceDTO: this.fieldConfig.fields.sourceDTO,
317
+					userDTO: this.fieldConfig.fields.userDTO,
318
+					evaluateDTO: {
319
+						"id": 20424,
320
+						"key": "incident_degree",
321
+						"name": "不满意",
322
+						"value": "1",
323
+						"orders": 5,
324
+						"extra1": "",
325
+						"extra2": ""
326
+					},
327
+				}
328
+			}
329
+			let path = '/newStatistics/maintenanceStatistics/incidentList'
330
+			let flag = this.tabService.tabs.some(v => v.path === path);
331
+			flag && this.tabService.deleteRouteSnapshot(path);
332
+			this.tabService.setQueryParams('dateRange', [data.startDate + ' ' + '00:00:00', data.startDate + ' ' + '23:59:59']);
333
+			this.tabService.setQueryParams('defRange', null);
334
+			sessionStorage.setItem('maintenanceData', JSON.stringify(query))
335
+			this.router.navigate([path], { replaceUrl: true });
336
+		}
337
+	}
338
+	
58 339
   getQueryParams(){
59 340
     let queryParams = this.tabService.getQueryParams();
60 341
     this.tabService.clearQueryParams();
@@ -218,7 +499,10 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
218 499
     this.repairDeptId = undefined;
219 500
     this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined};
220 501
     this.customChangeDateComponent.resetByDate();
221
-    this.search();
502
+		sessionStorage.removeItem('maintenanceData');
503
+    setTimeout(_=>{
504
+    	this.search();
505
+    })
222 506
   }
223 507
 
224 508
   // 科室搜索

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

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

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

@@ -5,6 +5,13 @@
5 5
   right: 0;
6 6
   bottom: 0;
7 7
   left: 0;
8
+	.cursor{
9
+		cursor: pointer;
10
+	}
11
+	.text-sign{
12
+		text-decoration: underline;
13
+		cursor: pointer;
14
+	}
8 15
 	.synthesize-box{
9 16
 		background: #F0F2F5 !important;
10 17
 		height: calc((100vh - 92px));
@@ -48,7 +55,6 @@
48 55
 					right: 0;
49 56
 				}
50 57
 				.special-box{
51
-					cursor: pointer;
52 58
 					text-align: center;
53 59
 					position: relative;
54 60
 					top: -5px;

+ 115 - 21
src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.ts

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

+ 4 - 4
src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.html

@@ -47,15 +47,15 @@
47 47
   <tbody>
48 48
     <tr *ngFor="let data of listOfData">
49 49
       <td>{{ data.companyName }}</td>
50
-      <td>{{ data.sum }}</td>
50
+      <td class="text-sign" (click)="viewDetail1(data)">{{ data.sum }}</td>
51 51
       <td>{{ data.avgResponseTime }}</td>
52 52
       <td>{{ data.avgResolvedTime }}</td>
53
-      <td>{{ data.resolvedOverNum }}</td>
54
-      <td>{{ data.overTimeNum }}</td>
53
+      <td class="text-sign" (click)="viewDetail2(data)">{{ data.resolvedOverNum }}</td>
54
+      <td class="text-sign" (click)="viewDetail3(data)">{{ data.overTimeNum }}</td>
55 55
       <td>{{ data.consumablePrice }}</td>
56 56
       <td>{{ data.workHourPrice }}</td>
57 57
       <td>{{ data.totalPrice }}</td>
58
-      <td>{{ data.negativeNum }}</td>
58
+      <td class="text-sign" (click)="viewDetail4(data)">{{ data.negativeNum }}</td>
59 59
       <td>{{ data.favorableRate }}</td>
60 60
     </tr>
61 61
   </tbody>

+ 4 - 0
src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-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);

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


Some files were not shown because too many files changed in this diff