Quellcode durchsuchen

科室检查统计

seimin vor 1 Jahr
Ursprung
Commit
6f5ab0bd4c

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

@@ -96,7 +96,7 @@
96 96
         </tbody>
97 97
       </nz-table>
98 98
       <!-- 科室检查率统计 -->
99
-      <nz-table *ngIf="type === 'deptInspectionRateStatistics'" class="hospitalTable" [nzData]="inspectionRateStatisticsList" nzSize="middle" [nzShowPagination]="false"
99
+      <nz-table *ngIf="type === 'deptInspectionRateStatistics' || type === 'deptInspectionStatistics'" class="hospitalTable" [nzData]="inspectionRateStatisticsList" nzSize="middle" [nzShowPagination]="false"
100 100
         [nzLoading]="hsLoading" [nzScroll]="{ y: '500px' }">
101 101
         <thead>
102 102
           <tr class="thead">

+ 68 - 0
src/app/share/businessData-detail-modal/businessData-detail-modal.component.ts

@@ -46,6 +46,9 @@ export class BusinessDataDetailModalComponent implements OnInit {
46 46
       case 'deptInspectionRateStatistics':
47 47
           this.getDeptInspectionRateStatistics(1);
48 48
           break;
49
+      case 'deptInspectionStatistics':
50
+        this.getDeptInspectionStatistics(1);
51
+        break;
49 52
       case 'washingException':
50 53
           this.getWashingException(1);
51 54
           break;
@@ -88,6 +91,9 @@ export class BusinessDataDetailModalComponent implements OnInit {
88 91
       case 'deptInspectionRateStatistics':
89 92
         this.getDeptInspectionRateStatistics();
90 93
         break;
94
+      case 'deptInspectionStatistics':
95
+        this.getDeptInspectionStatistics();
96
+        break;
91 97
       case 'washingException':
92 98
         this.getWashingException();
93 99
         break;
@@ -230,6 +236,68 @@ export class BusinessDataDetailModalComponent implements OnInit {
230 236
     })
231 237
 
232 238
   }
239
+
240
+  // 获取科室检查统计-详情列表
241
+  getDeptInspectionStatistics(idx?) {
242
+    if (idx) {
243
+      this.pageIndex = 1;
244
+    }
245
+    let postData:any = {
246
+      idx: this.pageIndex - 1,
247
+      sum: this.pageSize,
248
+      znDeptInspect: true,
249
+    }
250
+    switch(this.dataInfo.type){
251
+      case 'total':
252
+        postData.deptId = this.dataInfo.data[10];
253
+        postData.hosId = this.hosId;
254
+        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
255
+        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
256
+        break;
257
+      case 'cancel':
258
+        postData.deptId = this.dataInfo.data[10];
259
+        postData.hosId = this.hosId;
260
+        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
261
+        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
262
+        postData.cancel = true;
263
+        break;
264
+      case 'priority':
265
+        postData.deptId = this.dataInfo.data[10];
266
+        postData.hosId = this.hosId;
267
+        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
268
+        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
269
+        postData.priority = 1;
270
+        break;
271
+      case 'noneYY':
272
+        postData.deptId = this.dataInfo.data[10];
273
+        postData.hosId = this.hosId;
274
+        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
275
+        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
276
+        postData.noneYY = true;
277
+        break;
278
+      case 'waitCheck':
279
+        postData.deptId = this.dataInfo.data[10];
280
+        postData.hosId = this.hosId;
281
+        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
282
+        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
283
+        postData.waitCheck = true;
284
+        break;
285
+      case 'doCheck':
286
+        postData.deptId = this.dataInfo.data[10];
287
+        postData.hosId = this.hosId;
288
+        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
289
+        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
290
+        postData.doCheck = true;
291
+        break;
292
+    }
293
+    this.hsLoading = true;
294
+    this.mainService.listMsgByMain("listInspect", postData).subscribe((data: any) => {
295
+      this.hsLoading = false;
296
+      this.inspectionRateStatisticsList = data.list || [];
297
+      this.total = data.totalNum || 0;
298
+    })
299
+
300
+  }
233 301
 }
234 302
 
235 303
 

+ 1 - 1
src/app/views/dept-inspection-rate-statistics/dept-inspection-rate-statistics.service.ts

@@ -11,7 +11,7 @@ export class DeptInspectionRateStatisticsService {
11 11
 
12 12
   // 列表-查
13 13
   query(postData) {
14
-    return this.mainService.postReportDept("inspect", postData);
14
+    return this.mainService.postReportDept("inspectRate", postData);
15 15
   }
16 16
 
17 17
   // 字典

+ 21 - 0
src/app/views/dept-inspection-statistics/dept-inspection-statistics-routing.module.ts

@@ -0,0 +1,21 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { DeptInspectionStatisticsComponent } from './dept-inspection-statistics.component';
4
+
5
+
6
+const routes: Routes = [{
7
+  path: '',
8
+  component: DeptInspectionStatisticsComponent,
9
+  children: [
10
+    {
11
+      path: 'workerStatisticsDetail/:workerId/:startTime/:endTime/:groupId/:type/:deptId/:countRemark',//id是workid,startTime是开始时间,endTime是结束时间,groupId是组ID,type区别类型
12
+      loadChildren: () => import('../worker-statistics-detail/worker-statistics-detail.module').then(m => m.WorkerStatisticsDetailModule)
13
+    }
14
+  ]
15
+}];
16
+
17
+@NgModule({
18
+  imports: [RouterModule.forChild(routes)],
19
+  exports: [RouterModule]
20
+})
21
+export class DeptInspectionStatisticsRoutingModule { }

+ 142 - 0
src/app/views/dept-inspection-statistics/dept-inspection-statistics.component.html

@@ -0,0 +1,142 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='17' class="list-template__searchBox">
5
+        <div class="list-template__searchItem">
6
+          <span class="label">申请时间</span>:
7
+          <nz-range-picker [(ngModel)]="searchDto.dateRange"></nz-range-picker>
8
+        </div>
9
+        <div class="list-template__searchItem">
10
+          <span class="label">楼栋</span>:
11
+          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch
12
+            nzAllowClear nzPlaceHolder="请选择楼栋" [(ngModel)]="searchDto.building">
13
+            <ng-container *ngFor="let option of buildingList">
14
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.buildingName" [nzValue]="option.id"></nz-option>
15
+            </ng-container>
16
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
17
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
18
+            </nz-option>
19
+          </nz-select>
20
+        </div>
21
+        <div class="list-template__searchItem" style="width: 100%;">
22
+          <span class="label">排除科室</span>:
23
+          <nz-select style="min-width: 135px;" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzMode="multiple"
24
+            (nzOnSearch)="changeInp($event)" nzAllowClear nzPlaceHolder="请选择排除科室" [(ngModel)]="searchDto.department">
25
+            <ng-container *ngFor="let option of alldepart">
26
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
27
+            </ng-container>
28
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
29
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
30
+            </nz-option>
31
+          </nz-select>
32
+        </div>
33
+      </div>
34
+      <div nz-col nzXl='7' class="list-template__btns">
35
+        <button nz-button class="btn default ml8" (click)='search()'>搜索</button>
36
+        <button nz-button class="btn default ml8" (click)='export()' [nzLoading]="loading2">导出</button>
37
+        <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
38
+      </div>
39
+    </div>
40
+    <div class="cont">
41
+      <div>
42
+        <span>总计</span>
43
+        <span class="rate"></span>
44
+      </div>
45
+      <div>
46
+        <span>科室数</span>
47
+        <span>{{statisticsObj[0]}}</span>
48
+      </div>
49
+      <div>
50
+        <span>总检查数</span>
51
+        <span>{{statisticsObj[1]}}</span>
52
+      </div>
53
+      <div>
54
+        <span>作废取消数</span>
55
+        <span>{{statisticsObj[2]}}</span>
56
+      </div>
57
+      <div>
58
+        <span>临时急诊数</span>
59
+        <span>{{statisticsObj[3]}}</span>
60
+      </div>
61
+      <div>
62
+        <span>未预约数</span>
63
+        <span>{{statisticsObj[4]}}</span>
64
+      </div>
65
+      <div>
66
+        <span>需检查数</span>
67
+        <span>{{statisticsObj[5]}}</span>
68
+      </div>
69
+      <div>
70
+        <span>陪检数</span>
71
+        <span>{{statisticsObj[6]}}</span>
72
+      </div>
73
+      <div>
74
+        <span>检查率</span>
75
+        <span>{{statisticsObj[7]}}</span>
76
+      </div>
77
+      <div>
78
+        <span>工单数</span>
79
+        <span>{{statisticsObj[8]}}</span>
80
+      </div>
81
+      <div>
82
+        <span>转科数</span>
83
+        <span>{{statisticsObj[9]}}</span>
84
+      </div>
85
+    </div>
86
+    <div class="list-template__bottom">
87
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
88
+        [nzLoading]="loading1">
89
+        <thead>
90
+          <tr class="thead">
91
+            <th nzWidth="5%">序号</th>
92
+            <th nzWidth="9%">科室名称</th>
93
+            <th nzWidth="9%">总检查数</th>
94
+            <th nzWidth="9%">作废取消数</th>
95
+            <th nzWidth="9%">临时急诊数</th>
96
+            <th nzWidth="9%">未预约数</th>
97
+            <th nzWidth="10%">需检查数</th>
98
+            <th nzWidth="10%">陪检数</th>
99
+            <th nzWidth="10%">检查率</th>
100
+            <th nzWidth="10%">工单数</th>
101
+            <th nzWidth="10%">转科数</th>
102
+          </tr>
103
+        </thead>
104
+        <tbody>
105
+          <tr *ngFor="let data of listOfData;let index=index;">
106
+            <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
107
+            <td>{{ data[0] }}</td>
108
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'total' }, 'deptInspectionStatistics')">{{ data[1] }}</td>
109
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'cancel' }, 'deptInspectionStatistics')">{{ data[2] }}</td>
110
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'priority' }, 'deptInspectionStatistics')">{{ data[3] }}</td>
111
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'noneYY' }, 'deptInspectionStatistics')">{{ data[4] }}</td>
112
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'waitCheck' }, 'deptInspectionStatistics')">{{ data[5] }}</td>
113
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'doCheck' }, 'deptInspectionStatistics')">{{ data[6] }}</td>
114
+            <td>{{ data[7] }}</td>
115
+            <td class="tab_hover" (click)="personDetail({ data: data, searchDto: searchDto, countRemark: '患者陪检'})">{{ data[8] }}</td>
116
+            <td class="tab_hover" (click)="personDetail({ data: data, searchDto: searchDto, countRemark: '转科'})">{{ data[9] }}</td>
117
+          </tr>
118
+        </tbody>
119
+      </nz-table>
120
+      <div class="list-template__pagination">
121
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
122
+          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
123
+        </nz-pagination>
124
+      </div>
125
+    </div>
126
+  </div>
127
+</div>
128
+<!-- 查看详情 -->
129
+<router-outlet></router-outlet>
130
+
131
+<!-- 业务数据查看 -->
132
+<app-businessData-detail-modal
133
+  *ngIf="businessDataModalShow"
134
+  [show]="businessDataModalShow"
135
+  [type]="businessDataModalType"
136
+  [dataInfo]="dataInfo"
137
+  (closeModelHs)="closeModelBlood($event)"
138
+></app-businessData-detail-modal>
139
+
140
+<!-- 操作成功/失败提示框 -->
141
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
142
+  [info]="promptInfo"></app-prompt-modal>

+ 174 - 0
src/app/views/dept-inspection-statistics/dept-inspection-statistics.component.less

@@ -0,0 +1,174 @@
1
+@import "../../../../src/theme.less";
2
+.cont {
3
+  width: 100%;
4
+  border: 1px solid #dde1e5;
5
+  padding: 8px 16px;
6
+  border-radius: 2px;
7
+  margin-bottom: 8px;
8
+
9
+  &>div {
10
+    display: inline-block;
11
+    margin-right: 4px;
12
+
13
+    &:nth-child(1) {
14
+      position: relative;
15
+      padding-left: 10px;
16
+
17
+      &::before {
18
+        content: '';
19
+        position: absolute;
20
+        left: 0;
21
+        width: 4px;
22
+        height: 100%;
23
+        background: @primary-color;
24
+        margin-right: 8px;
25
+      }
26
+    }
27
+
28
+    span {
29
+      margin-right: 8px;
30
+
31
+      &:nth-child(1) {
32
+        font-size: 12px;
33
+        color: #999;
34
+      }
35
+
36
+      &:nth-child(2) {
37
+        color: #333;
38
+        font-weight: 500;
39
+      }
40
+
41
+      &.rate {
42
+        font-size: 18px;
43
+        color: @primary-color;
44
+      }
45
+    }
46
+
47
+
48
+  }
49
+}
50
+.save {
51
+  position: fixed;
52
+  left: 0;
53
+  top: 0;
54
+  width: 100%;
55
+  height: 100%;
56
+  background: rgba(0, 0, 0, 0.4);
57
+  z-index: 99;
58
+
59
+  .modalBody {
60
+    width: 350px;
61
+    background: #fff;
62
+    border-radius: 5px;
63
+    padding: 10px 20px;
64
+    color: #333;
65
+
66
+    .title {
67
+      width: 100%;
68
+      text-align: center;
69
+      font-size: 18px;
70
+      position: relative;
71
+
72
+      i {
73
+        position: absolute;
74
+        right: 0;
75
+        top: 0;
76
+        font-size: 20px;
77
+        color: #666;
78
+        cursor: pointer;
79
+        padding: 0 5px;
80
+      }
81
+    }
82
+
83
+    .content {
84
+      width: 100%;
85
+      height: 117px;
86
+      background: #f9fafb;
87
+      border: 1px solid #e5e9ed;
88
+      border-radius: 5px;
89
+      overflow: hidden;
90
+      margin-top: 12px;
91
+
92
+      div {
93
+        text-align: center;
94
+        margin: 0;
95
+
96
+        &.icon {
97
+          margin-top: 17px;
98
+
99
+          i {
100
+            color: #34b349;
101
+            font-size: 30px !important;
102
+
103
+            &.transport-wenhao {
104
+              color: #f5a523;
105
+            }
106
+
107
+            &.transport-shibai {
108
+              color: #ff3a52;
109
+            }
110
+          }
111
+        }
112
+
113
+        &.defeat {
114
+          color: #333;
115
+          font-size: 18px;
116
+        }
117
+
118
+        &:nth-child(3) {
119
+          font-size: 14px;
120
+          color: #666;
121
+        }
122
+      }
123
+    }
124
+
125
+    button {
126
+      margin-top: 10px;
127
+
128
+      &.btn {
129
+        margin-left: 8px;
130
+      }
131
+    }
132
+  }
133
+
134
+  // 新增
135
+  &.add {
136
+    .modalBody {
137
+      width: 480px;
138
+      height: auto;
139
+
140
+      .content {
141
+        width: 100%;
142
+        height: auto;
143
+        padding: 19px 14px 0 14px;
144
+        max-height: 500px;
145
+        overflow-y: auto;
146
+
147
+        .addForm {
148
+          .ant-form-item {
149
+            margin-bottom: 8px;
150
+
151
+            .ant-form-item-label {
152
+              line-height: 14px;
153
+              text-align: left;
154
+            }
155
+          }
156
+        }
157
+
158
+        .editForm {
159
+          .ant-form-item {
160
+            margin-bottom: 14px;
161
+
162
+            .ant-form-item-label {
163
+              line-height: 0;
164
+            }
165
+          }
166
+        }
167
+      }
168
+
169
+      button:nth-child(1) {
170
+        margin-right: 20px;
171
+      }
172
+    }
173
+  }
174
+}

+ 225 - 0
src/app/views/dept-inspection-statistics/dept-inspection-statistics.component.ts

@@ -0,0 +1,225 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+
4
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
+import { ToolService } from "../../services/tool.service";
6
+import { format, startOfDay, endOfDay, startOfWeek, endOfWeek, add } from 'date-fns';
7
+import { DeptInspectionStatisticsService } from './dept-inspection-statistics.service';
8
+import { Subject } from 'rxjs';
9
+import { debounceTime } from 'rxjs/operators';
10
+
11
+@Component({
12
+  selector: "app-dept-inspection-statistics",
13
+  templateUrl: "./dept-inspection-statistics.component.html",
14
+  styleUrls: ["./dept-inspection-statistics.component.less"],
15
+})
16
+export class DeptInspectionStatisticsComponent implements OnInit {
17
+  @ViewChild("osComponentRef1", {
18
+    read: OverlayScrollbarsComponent,
19
+    static: false,
20
+  })
21
+  osComponentRef1: OverlayScrollbarsComponent;
22
+  constructor(
23
+    private router: Router,
24
+    private route: ActivatedRoute,
25
+    private tool: ToolService,
26
+    private deptInspectionStatisticsService: DeptInspectionStatisticsService,
27
+  ) {}
28
+
29
+  listOfData: any[] = []; //表格数据
30
+  searchDto: any = {
31
+    dateRange: [startOfWeek(add(new Date(), { weeks: -1}), { weekStartsOn: 1 }), endOfWeek(add(new Date(), { weeks: -1}), { weekStartsOn: 1 })],
32
+    department: [],
33
+    buildingList: null,
34
+  }
35
+
36
+  hosId: any; //院区(搜索)
37
+  pageIndex: number = 1; //页码
38
+  listLength: number = 10; //总条数
39
+  pageSize: number = 10; //每页条数
40
+
41
+  // 初始化增删改按钮
42
+  coopBtns: any = {};
43
+
44
+  searchTimerSubject = new Subject();
45
+
46
+  ngOnInit() {
47
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
48
+      let fun = v[0];
49
+      fun.call(this, v[1]);
50
+    });
51
+    this.coopBtns = this.tool.initCoopBtns(this.route);
52
+    this.hosId = this.tool.getCurrentHospital().id;
53
+    this.getList(true);
54
+    this.getDeparts();
55
+    this.getBuildingList();
56
+  }
57
+
58
+  // 边输入边搜索节流阀
59
+  searchTimer(fun, e) {
60
+    this.isLoading = true;
61
+    this.searchTimerSubject.next([fun, e]);
62
+  }
63
+
64
+  // 科室边输边搜节流阀
65
+  isLoading = false;
66
+  changeInp(e) {
67
+    this.searchTimer(this.getDeparts, e);
68
+  }
69
+
70
+  // 获取科室
71
+  alldepart: any = []; //科室
72
+  getDeparts(dept?) {
73
+    let data = {
74
+      department: {
75
+        cascadeHosId: this.hosId,
76
+        dept: dept,
77
+      },
78
+      idx: 0,
79
+      sum: 20,
80
+    };
81
+    this.isLoading = true;
82
+    this.deptInspectionStatisticsService
83
+      .getDeparts(data)
84
+      .subscribe((data) => {
85
+        this.alldepart = data.list;
86
+        this.isLoading = false;
87
+      });
88
+  }
89
+
90
+  // 获取楼栋
91
+  buildingList: any = []; //楼栋
92
+  getBuildingList() {
93
+    let data = {
94
+      building: {
95
+        cascadeHosId: this.hosId,
96
+      },
97
+      idx: 0,
98
+      sum: 9999,
99
+    };
100
+    this.isLoading = true;
101
+    this.deptInspectionStatisticsService
102
+      .getBuildingList(data)
103
+      .subscribe((data) => {
104
+        this.buildingList = data.list;
105
+        this.isLoading = false;
106
+      });
107
+  }
108
+
109
+  // 搜索
110
+  search() {
111
+    this.getList(true);
112
+  }
113
+  // 重置
114
+  reset() {
115
+    this.searchDto = {
116
+      dateRange: [startOfWeek(add(new Date(), { weeks: -1}), { weekStartsOn: 1 }), endOfWeek(add(new Date(), { weeks: -1}), { weekStartsOn: 1 })],
117
+      department: [],
118
+      buildingList: null,
119
+    }
120
+    this.search();
121
+  }
122
+  // 表格数据
123
+  loading1 = false;
124
+  statisticsObj:any = [];
125
+  getList(isResetPageIndex = false) {
126
+    isResetPageIndex && (this.pageIndex = 1);
127
+    let postData:any = {
128
+      idx: this.pageIndex - 1,
129
+      sum: this.pageSize,
130
+      hosId: this.hosId,
131
+      startTime: this.searchDto.dateRange[0] ? format(startOfDay(this.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined,
132
+      endTime: this.searchDto.dateRange[1] ? format(endOfDay(this.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined,
133
+      deptIds: this.searchDto.department.length ? this.searchDto.department.toString() : undefined,
134
+      buildingId: this.searchDto.building|| undefined,
135
+    };
136
+    this.loading1 = true;
137
+    this.deptInspectionStatisticsService
138
+      .query(postData)
139
+      .subscribe((result) => {
140
+        this.loading1 = false;
141
+        result.data = result.data || [];
142
+        this.listOfData = result.data;
143
+        this.listLength = result.totalNum;
144
+        let summary = result.summary || [];
145
+        this.statisticsObj = summary.length ? summary[0] : [];
146
+      });
147
+  }
148
+
149
+  // 查看业务数据
150
+  businessDataModalShow = false; //业务数据弹窗开关
151
+  businessDataModalType = ''; //业务数据类型
152
+  dataInfo = null; //查看业务数据携带
153
+  viewDetail(data, type) {
154
+    this.dataInfo = data;
155
+    this.businessDataModalType = type;
156
+    this.businessDataModalShow = true;
157
+  }
158
+  // 关闭业务数据弹窗
159
+  closeModelBlood(e) {
160
+    this.businessDataModalShow = JSON.parse(e).show;
161
+  }
162
+
163
+  // 导出
164
+  loading2 = false;
165
+  export() {
166
+    let postData:any = {
167
+      idx: this.pageIndex - 1,
168
+      sum: this.pageSize,
169
+      hosId: this.hosId,
170
+      startTime: this.searchDto.dateRange[0] ? format(startOfDay(this.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined,
171
+      endTime: this.searchDto.dateRange[1] ? format(endOfDay(this.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined,
172
+      deptIds: this.searchDto.department.length ? this.searchDto.department.toString() : undefined,
173
+      buildingId: this.searchDto.building|| undefined,
174
+    };
175
+    this.loading2 = true;
176
+    this.deptInspectionStatisticsService.exportReport(postData).subscribe(
177
+      (data) => {
178
+        this.loading2 = false;
179
+        this.showPromptModal("导出", true, "");
180
+        var file = new Blob([data], {
181
+          type: "application/vnd.ms-excel",
182
+        });
183
+        //trick to download store a file having its URL
184
+        var fileURL = URL.createObjectURL(file);
185
+        var a = document.createElement("a");
186
+        a.href = fileURL;
187
+        a.target = "_blank";
188
+        a.download = "科室检查统计.xls";
189
+        document.body.appendChild(a);
190
+        a.click();
191
+      },
192
+      (err) => {
193
+        this.loading2 = false;
194
+        this.showPromptModal("导出", false, "");
195
+      }
196
+    );
197
+  }
198
+
199
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
200
+  promptContent: string; //操作提示框提示信息
201
+  ifSuccess: boolean; //操作成功/失败
202
+  promptInfo: string; //操作结果提示信息
203
+  promptModalShow: boolean; //操作提示框是否展示
204
+  showPromptModal(con, success, promptInfo?) {
205
+    this.promptModalShow = false;
206
+    this.promptContent = con;
207
+    this.ifSuccess = success;
208
+    this.promptInfo = promptInfo;
209
+    setTimeout(() => {
210
+      this.promptModalShow = true;
211
+    }, 100);
212
+  }
213
+
214
+  personDetail(dataInfo){
215
+    console.log(dataInfo);
216
+    let startDate = dataInfo.searchDto.dateRange[0] ? format(startOfDay(dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : 'null';
217
+    let endDate = dataInfo.searchDto.dateRange[1] ? format(endOfDay(dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : 'null';
218
+    let deptId = dataInfo.data[10] || 'null';
219
+    let countRemark = dataInfo.countRemark || 'null';
220
+    this.router.navigateByUrl(
221
+      `/main/deptInspectionStatistics/workerStatisticsDetail/null/${startDate}/${endDate}/null/deptInspectionStatistics/${deptId}/${countRemark}`
222
+    );
223
+  }
224
+}
225
+

+ 19 - 0
src/app/views/dept-inspection-statistics/dept-inspection-statistics.module.ts

@@ -0,0 +1,19 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { DeptInspectionStatisticsRoutingModule } from './dept-inspection-statistics-routing.module';
5
+import { DeptInspectionStatisticsComponent } from './dept-inspection-statistics.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [
11
+    DeptInspectionStatisticsComponent,
12
+  ],
13
+  imports: [
14
+    CommonModule,
15
+    DeptInspectionStatisticsRoutingModule,
16
+    ShareModule,
17
+  ]
18
+})
19
+export class DeptInspectionStatisticsModule { }

+ 39 - 0
src/app/views/dept-inspection-statistics/dept-inspection-statistics.service.ts

@@ -0,0 +1,39 @@
1
+import { Injectable } from '@angular/core';
2
+import { MainService } from 'src/app/services/main.service';
3
+
4
+@Injectable({
5
+  providedIn: 'root'
6
+})
7
+export class DeptInspectionStatisticsService {
8
+  constructor(
9
+    private mainService: MainService,
10
+  ) { }
11
+
12
+  // 列表-查
13
+  query(postData) {
14
+    return this.mainService.postReportDept("inspect", postData);
15
+  }
16
+
17
+  // 字典
18
+  getDictionary(type) {
19
+    return this.mainService.getDictionary("list", type);
20
+  }
21
+
22
+  // 科室
23
+  getDeparts(postData) {
24
+    return this.mainService.getFetchDataList("data", "department", postData);
25
+  }
26
+
27
+  // 楼栋
28
+  getBuildingList(postData) {
29
+    return this.mainService.getFetchDataList("simple/data", "building", postData);
30
+  }
31
+
32
+  // 导出
33
+  exportReport(postData) {
34
+    return this.mainService.exportReport("deptInspectRate2", postData);
35
+  }
36
+}
37
+
38
+
39
+

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

@@ -228,6 +228,11 @@ const routes: Routes = [
228 228
         path: "buildingInspectionRateStatistics",
229 229
         loadChildren: () => import("../building-inspection-rate-statistics/building-inspection-rate-statistics.module").then((m) => m.BuildingInspectionRateStatisticsModule),
230 230
       },
231
+      // 统计分析-科室检查统计
232
+      {
233
+        path: "deptInspectionStatistics",
234
+        loadChildren: () => import("../dept-inspection-statistics/dept-inspection-statistics.module").then((m) => m.DeptInspectionStatisticsModule),
235
+      },
231 236
       // 轮巡计划列表
232 237
       {
233 238
         path: "roundRobin",

+ 5 - 0
src/app/views/worker-statistics-detail/worker-statistics-detail.component.ts

@@ -18,6 +18,7 @@ export class WorkerStatisticsDetailComponent implements OnInit {
18 18
   groupId; //当前组ID
19 19
   type; //区别跳转页面类型
20 20
   deptId; //当前科室
21
+  countRemark; //标识
21 22
   listOfData = []; //获取选中配送人员的工单列表
22 23
   pageIndex: number = 1; //页码
23 24
   listLength: number = 0; //总数据条目数
@@ -40,6 +41,7 @@ export class WorkerStatisticsDetailComponent implements OnInit {
40 41
     this.groupId = this.route.snapshot.params.groupId;
41 42
     this.type = this.route.snapshot.params.type;
42 43
     this.deptId = this.route.snapshot.params.deptId;
44
+    this.countRemark = this.route.snapshot.params.countRemark;
43 45
     this.getOrdersByPerson(this.hosId, this.currentPersonId);
44 46
   }
45 47
 
@@ -81,6 +83,9 @@ export class WorkerStatisticsDetailComponent implements OnInit {
81 83
       postData.worker = currentPersonId;
82 84
     }else if(this.type === 'deptInspectionRateStatistics'){
83 85
       postData.deptId = this.deptId === 'null' ? undefined : this.deptId;
86
+    }else if(this.type === 'deptInspectionStatistics'){
87
+      postData.deptId = this.deptId === 'null' ? undefined : this.deptId;
88
+      postData.countRemark = this.countRemark === 'null' ? undefined : this.countRemark;
84 89
     }
85 90
     this.mainService.postCustom("report", "userDetails", postData).subscribe(
86 91
       (result) => {

+ 1 - 1
src/main.ts

@@ -8,7 +8,7 @@ if (environment.production) {
8 8
   enableProdMode();
9 9
   if (window) {
10 10
     window.console.log = function () { };
11
-    console.info('v2.4.52');
11
+    console.info('v2.4.53');
12 12
   }
13 13
 }
14 14
 platformBrowserDynamic().bootstrapModule(AppModule)