|
@@ -1,7 +1,7 @@
|
1
|
1
|
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
2
|
2
|
import { MainService } from '../../services/main.service';
|
3
|
3
|
import { ToolService } from 'src/app/services/tool.service';
|
4
|
|
-
|
|
4
|
+import { format, startOfDay, endOfDay } from 'date-fns';
|
5
|
5
|
@Component({
|
6
|
6
|
selector: 'app-businessData-detail-modal',
|
7
|
7
|
templateUrl: './businessData-detail-modal.component.html',
|
|
@@ -72,7 +72,7 @@ export class BusinessDataDetailModalComponent implements OnInit {
|
72
|
72
|
this.getSpecimen();
|
73
|
73
|
break;
|
74
|
74
|
case 'deptInspectionRateStatistics':
|
75
|
|
- this.getDeptInspectionRateStatistics(1);
|
|
75
|
+ this.getDeptInspectionRateStatistics();
|
76
|
76
|
break;
|
77
|
77
|
}
|
78
|
78
|
}
|
|
@@ -139,28 +139,28 @@ export class BusinessDataDetailModalComponent implements OnInit {
|
139
|
139
|
case 'total':
|
140
|
140
|
postData.deptId = this.dataInfo.data.deptId;
|
141
|
141
|
postData.hosId = this.hosId;
|
142
|
|
- postData.startTime = this.dataInfo.searchDto.startTime;
|
143
|
|
- postData.endTime = this.dataInfo.searchDto.endTime;
|
|
142
|
+ postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
|
|
143
|
+ postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
|
144
|
144
|
break;
|
145
|
145
|
case 'noCheckCount':
|
146
|
146
|
postData.deptId = this.dataInfo.data.deptId;
|
147
|
147
|
postData.hosId = this.hosId;
|
148
|
|
- postData.startTime = this.dataInfo.searchDto.startTime;
|
149
|
|
- postData.endTime = this.dataInfo.searchDto.endTime;
|
|
148
|
+ postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
|
|
149
|
+ postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
|
150
|
150
|
postData.reportInsState = 'noCheck';
|
151
|
151
|
break;
|
152
|
152
|
case 'checkCount':
|
153
|
153
|
postData.deptId = this.dataInfo.data.deptId;
|
154
|
154
|
postData.hosId = this.hosId;
|
155
|
|
- postData.startTime = this.dataInfo.searchDto.startTime;
|
156
|
|
- postData.endTime = this.dataInfo.searchDto.endTime;
|
|
155
|
+ postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
|
|
156
|
+ postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
|
157
|
157
|
postData.reportInsState = 'check';
|
158
|
158
|
break;
|
159
|
159
|
case 'insCount':
|
160
|
160
|
postData.deptId = this.dataInfo.data.deptId;
|
161
|
161
|
postData.hosId = this.hosId;
|
162
|
|
- postData.startTime = this.dataInfo.searchDto.startTime;
|
163
|
|
- postData.endTime = this.dataInfo.searchDto.endTime;
|
|
162
|
+ postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
|
|
163
|
+ postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
|
164
|
164
|
postData.reportInsState = 'inspect';
|
165
|
165
|
break;
|
166
|
166
|
}
|