소스 검색

一堆修改

seimin 1 년 전
부모
커밋
3476f60686
17개의 변경된 파일942개의 추가작업 그리고 14개의 파일을 삭제
  1. 7 0
      src/app/services/main.service.ts
  2. 9 0
      src/app/services/tool.service.ts
  3. 5 4
      src/app/share/businessData-detail-modal/businessData-detail-modal.component.ts
  4. 15 0
      src/app/views/building-inspection-rate-statistics/building-inspection-rate-statistics-routing.module.ts
  5. 115 0
      src/app/views/building-inspection-rate-statistics/building-inspection-rate-statistics.component.html
  6. 174 0
      src/app/views/building-inspection-rate-statistics/building-inspection-rate-statistics.component.less
  7. 205 0
      src/app/views/building-inspection-rate-statistics/building-inspection-rate-statistics.component.ts
  8. 19 0
      src/app/views/building-inspection-rate-statistics/building-inspection-rate-statistics.module.ts
  9. 39 0
      src/app/views/building-inspection-rate-statistics/building-inspection-rate-statistics.service.ts
  10. 8 0
      src/app/views/check-and-exclude-config/check-and-exclude-config.component.html
  11. 72 1
      src/app/views/check-and-exclude-config/check-and-exclude-config.component.ts
  12. 5 0
      src/app/views/check-and-exclude-config/check-and-exclude-config.service.ts
  13. 71 5
      src/app/views/dept-inspection-rate-statistics/dept-inspection-rate-statistics.component.html
  14. 48 0
      src/app/views/dept-inspection-rate-statistics/dept-inspection-rate-statistics.component.less
  15. 130 4
      src/app/views/dept-inspection-rate-statistics/dept-inspection-rate-statistics.component.ts
  16. 15 0
      src/app/views/dept-inspection-rate-statistics/dept-inspection-rate-statistics.service.ts
  17. 5 0
      src/app/views/main/main-routing.module.ts

+ 7 - 0
src/app/services/main.service.ts

@@ -741,6 +741,13 @@ export class MainService {
741 741
     });
742 742
   }
743 743
 
744
+  // 楼栋检查率统计
745
+  postReportBuilding(type, data): any {
746
+    return this.http.post(host.host + "/report/building/" + type, data, {
747
+      headers: this.headers,
748
+    });
749
+  }
750
+
744 751
   // 获取检验项目列表
745 752
   specimenCount(data): any {
746 753
     return this.http.post(host.host + "/api/specimenDesc/specimenCount", data, {

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

@@ -134,6 +134,15 @@ export class ToolService {
134 134
         case "allOrders":
135 135
           coopBtns.allOrders = true; //全部工单
136 136
           break;
137
+        case "batchConversion":
138
+          coopBtns.batchConversion = true; //批量转换
139
+          break;
140
+        case "oneClickConversion":
141
+          coopBtns.oneClickConversion = true; //一键转换
142
+          break;
143
+        case "oneClickRecovery":
144
+          coopBtns.oneClickRecovery = true; //一键恢复
145
+          break;
137 146
       }
138 147
     });
139 148
     console.log(coopBtns);

+ 5 - 4
src/app/share/businessData-detail-modal/businessData-detail-modal.component.ts

@@ -162,30 +162,31 @@ export class BusinessDataDetailModalComponent implements OnInit {
162 162
     let postData:any = {
163 163
       idx: this.pageIndex - 1,
164 164
       sum: this.pageSize,
165
+      canceled: this.dataInfo.canceled ? true : undefined,
165 166
     }
166 167
     switch(this.dataInfo.type){
167 168
       case 'total':
168
-        postData.deptId = this.dataInfo.data.deptId;
169
+        postData.deptId = this.dataInfo.data.id;
169 170
         postData.hosId = this.hosId;
170 171
         postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
171 172
         postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
172 173
         break;
173 174
       case 'noCheckCount':
174
-        postData.deptId = this.dataInfo.data.deptId;
175
+        postData.deptId = this.dataInfo.data.id;
175 176
         postData.hosId = this.hosId;
176 177
         postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
177 178
         postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
178 179
         postData.reportInsState = 'noCheck';
179 180
         break;
180 181
       case 'checkCount':
181
-        postData.deptId = this.dataInfo.data.deptId;
182
+        postData.deptId = this.dataInfo.data.id;
182 183
         postData.hosId = this.hosId;
183 184
         postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
184 185
         postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
185 186
         postData.reportInsState = 'check';
186 187
         break;
187 188
       case 'insCount':
188
-        postData.deptId = this.dataInfo.data.deptId;
189
+        postData.deptId = this.dataInfo.data.id;
189 190
         postData.hosId = this.hosId;
190 191
         postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
191 192
         postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;

+ 15 - 0
src/app/views/building-inspection-rate-statistics/building-inspection-rate-statistics-routing.module.ts

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

+ 115 - 0
src/app/views/building-inspection-rate-statistics/building-inspection-rate-statistics.component.html

@@ -0,0 +1,115 @@
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="list-template__checkBoxes">
41
+      <nz-checkbox-group [(ngModel)]="checkOptionsOne" (ngModelChange)="getList(true)"></nz-checkbox-group>
42
+    </div>
43
+    <div class="cont">
44
+      <div>
45
+        <span>总计</span>
46
+        <span class="rate"></span>
47
+      </div>
48
+      <div>
49
+        <span>楼栋数</span>
50
+        <span>{{statisticsObj.count}}</span>
51
+      </div>
52
+      <div>
53
+        <span>总检查数</span>
54
+        <span>{{statisticsObj.total}}</span>
55
+      </div>
56
+      <div>
57
+        <span>无需检查数</span>
58
+        <span>{{statisticsObj.noCheckCount}}</span>
59
+      </div>
60
+      <div>
61
+        <span>需检查数</span>
62
+        <span>{{statisticsObj.checkCount}}</span>
63
+      </div>
64
+      <div>
65
+        <span>陪检数</span>
66
+        <span>{{statisticsObj.insCount}}</span>
67
+      </div>
68
+      <div>
69
+        <span>检查率</span>
70
+        <span>{{statisticsObj.inspectRate}}%</span>
71
+      </div>
72
+      <div>
73
+        <span>工单数</span>
74
+        <span>{{statisticsObj.workOrderCount}}</span>
75
+      </div>
76
+    </div>
77
+    <div class="list-template__bottom">
78
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
79
+        [nzLoading]="loading1">
80
+        <thead>
81
+          <tr class="thead">
82
+            <th nzWidth="5%">序号</th>
83
+            <th nzWidth="14%">楼栋名称</th>
84
+            <th nzWidth="14%">总检查数</th>
85
+            <th nzWidth="14%">无需检查数</th>
86
+            <th nzWidth="14%">需检查数</th>
87
+            <th nzWidth="13%">陪检数</th>
88
+            <th nzWidth="13%">检查率</th>
89
+            <th nzWidth="13%">工单数</th>
90
+          </tr>
91
+        </thead>
92
+        <tbody>
93
+          <tr *ngFor="let data of listOfData;let index=index;">
94
+            <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
95
+            <td>{{ data.name }}</td>
96
+            <td>{{ data.total }}</td>
97
+            <td>{{ data.noCheckCount }}</td>
98
+            <td>{{ data.checkCount }}</td>
99
+            <td>{{ data.insCount }}</td>
100
+            <td>{{ data.inspectRate }}%</td>
101
+            <td>{{ data.workOrderCount }}</td>
102
+          </tr>
103
+        </tbody>
104
+      </nz-table>
105
+      <div class="list-template__pagination">
106
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
107
+          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
108
+        </nz-pagination>
109
+      </div>
110
+    </div>
111
+  </div>
112
+</div>
113
+<!-- 操作成功/失败提示框 -->
114
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
115
+  [info]="promptInfo"></app-prompt-modal>

+ 174 - 0
src/app/views/building-inspection-rate-statistics/building-inspection-rate-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
+}

+ 205 - 0
src/app/views/building-inspection-rate-statistics/building-inspection-rate-statistics.component.ts

@@ -0,0 +1,205 @@
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 { BuildingInspectionRateStatisticsService } from './building-inspection-rate-statistics.service';
8
+import { Subject } from 'rxjs';
9
+import { debounceTime } from 'rxjs/operators';
10
+
11
+@Component({
12
+  selector: "app-building-inspection-rate-statistics",
13
+  templateUrl: "./building-inspection-rate-statistics.component.html",
14
+  styleUrls: ["./building-inspection-rate-statistics.component.less"],
15
+})
16
+export class BuildingInspectionRateStatisticsComponent 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 buildingInspectionRateStatisticsService: BuildingInspectionRateStatisticsService,
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
+  checkOptionsOne: Array<any> = [
59
+    { label: "不包含已取消已作废", value: "1", checked: true },
60
+  ];
61
+
62
+  // 边输入边搜索节流阀
63
+  searchTimer(fun, e) {
64
+    this.isLoading = true;
65
+    this.searchTimerSubject.next([fun, e]);
66
+  }
67
+
68
+  // 科室边输边搜节流阀
69
+  isLoading = false;
70
+  changeInp(e) {
71
+    this.searchTimer(this.getDeparts, e);
72
+  }
73
+
74
+  // 获取科室
75
+  alldepart: any = []; //科室
76
+  getDeparts(dept?) {
77
+    let data = {
78
+      department: {
79
+        cascadeHosId: this.hosId,
80
+        dept: dept,
81
+      },
82
+      idx: 0,
83
+      sum: 20,
84
+    };
85
+    this.isLoading = true;
86
+    this.buildingInspectionRateStatisticsService
87
+      .getDeparts(data)
88
+      .subscribe((data) => {
89
+        this.alldepart = data.list;
90
+        this.isLoading = false;
91
+      });
92
+  }
93
+
94
+  // 获取楼栋
95
+  buildingList: any = []; //楼栋
96
+  getBuildingList() {
97
+    let data = {
98
+      building: {
99
+        cascadeHosId: this.hosId,
100
+      },
101
+      idx: 0,
102
+      sum: 9999,
103
+    };
104
+    this.isLoading = true;
105
+    this.buildingInspectionRateStatisticsService
106
+      .getBuildingList(data)
107
+      .subscribe((data) => {
108
+        this.buildingList = data.list;
109
+        this.isLoading = false;
110
+      });
111
+  }
112
+
113
+  // 搜索
114
+  search() {
115
+    this.getList(true);
116
+  }
117
+  // 重置
118
+  reset() {
119
+    this.searchDto = {
120
+      dateRange: [startOfWeek(add(new Date(), { weeks: -1}), { weekStartsOn: 1 }), endOfWeek(add(new Date(), { weeks: -1}), { weekStartsOn: 1 })],
121
+      department: [],
122
+      buildingList: null,
123
+    }
124
+    this.search();
125
+  }
126
+  // 表格数据
127
+  loading1 = false;
128
+  statisticsObj = {};
129
+  getList(isResetPageIndex = false) {
130
+    isResetPageIndex && (this.pageIndex = 1);
131
+    let postData:any = {
132
+      idx: this.pageIndex - 1,
133
+      sum: this.pageSize,
134
+      hosId: this.hosId,
135
+      startTime: this.searchDto.dateRange[0] ? format(startOfDay(this.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined,
136
+      endTime: this.searchDto.dateRange[1] ? format(endOfDay(this.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined,
137
+      canceled: this.checkOptionsOne[0].checked ? true : undefined,
138
+      deptIds: this.searchDto.department.length ? this.searchDto.department.toString() : undefined,
139
+      buildingId: this.searchDto.building|| undefined,
140
+    };
141
+    this.loading1 = true;
142
+    this.buildingInspectionRateStatisticsService
143
+      .query(postData)
144
+      .subscribe((result) => {
145
+        this.loading1 = false;
146
+        result.list = result.list || [];
147
+        this.listOfData = result.list;
148
+        this.listLength = result.totalNum;
149
+        this.statisticsObj = result.totalAnalysis || {};
150
+      });
151
+  }
152
+
153
+  // 导出
154
+  loading2 = false;
155
+  export() {
156
+    let postData:any = {
157
+      idx: this.pageIndex - 1,
158
+      sum: this.pageSize,
159
+      hosId: this.hosId,
160
+      startTime: this.searchDto.dateRange[0] ? format(startOfDay(this.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined,
161
+      endTime: this.searchDto.dateRange[1] ? format(endOfDay(this.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined,
162
+      canceled: this.checkOptionsOne[0].checked ? true : undefined,
163
+      deptIds: this.searchDto.department.length ? this.searchDto.department.toString() : undefined,
164
+      buildingId: this.searchDto.building|| undefined,
165
+    };
166
+    this.loading2 = true;
167
+    this.buildingInspectionRateStatisticsService.exportReport(postData).subscribe(
168
+      (data) => {
169
+        this.loading2 = false;
170
+        this.showPromptModal("导出", true, "");
171
+        var file = new Blob([data], {
172
+          type: "application/vnd.ms-excel",
173
+        });
174
+        //trick to download store a file having its URL
175
+        var fileURL = URL.createObjectURL(file);
176
+        var a = document.createElement("a");
177
+        a.href = fileURL;
178
+        a.target = "_blank";
179
+        a.download = "楼栋检查率统计.xls";
180
+        document.body.appendChild(a);
181
+        a.click();
182
+      },
183
+      (err) => {
184
+        this.loading2 = false;
185
+        this.showPromptModal("导出", false, "");
186
+      }
187
+    );
188
+  }
189
+
190
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
191
+  promptContent: string; //操作提示框提示信息
192
+  ifSuccess: boolean; //操作成功/失败
193
+  promptInfo: string; //操作结果提示信息
194
+  promptModalShow: boolean; //操作提示框是否展示
195
+  showPromptModal(con, success, promptInfo?) {
196
+    this.promptModalShow = false;
197
+    this.promptContent = con;
198
+    this.ifSuccess = success;
199
+    this.promptInfo = promptInfo;
200
+    setTimeout(() => {
201
+      this.promptModalShow = true;
202
+    }, 100);
203
+  }
204
+}
205
+

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

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

+ 39 - 0
src/app/views/building-inspection-rate-statistics/building-inspection-rate-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 BuildingInspectionRateStatisticsService {
8
+  constructor(
9
+    private mainService: MainService,
10
+  ) { }
11
+
12
+  // 列表-查
13
+  query(postData) {
14
+    return this.mainService.postReportBuilding("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("buildingInspectRate", postData);
35
+  }
36
+}
37
+
38
+
39
+

+ 8 - 0
src/app/views/check-and-exclude-config/check-and-exclude-config.component.html

@@ -5,6 +5,7 @@
5 5
       </div>
6 6
       <div nz-col nzXl="12" class="list-template__btns">
7 7
         <button nz-button *ngIf="coopBtns.add" class="btn default ml8" (click)="addModal()">新增</button>
8
+        <button nz-button *ngIf="coopBtns.batchConversion" class="btn default ml8" (click)="convertOrRestore('batchConversion')">批量转换</button>
8 9
       </div>
9 10
     </div>
10 11
     <div class="list-template__bottom">
@@ -34,6 +35,8 @@
34 35
               <div class="coop">
35 36
                 <span *ngIf="coopBtns.edit" (click)="edit(data)">修改</span>
36 37
                 <span *ngIf="coopBtns.del" (click)="showDelModal(data.id, '您确认要删除吗?')">删除</span>
38
+                <span *ngIf="coopBtns.oneClickConversion" (click)="convertOrRestore('oneClickConversion', data)">一键转换</span>
39
+                <span *ngIf="coopBtns.oneClickRecovery" (click)="convertOrRestore('oneClickRecovery', data)">一键恢复</span>
37 40
               </div>
38 41
             </td>
39 42
           </tr>
@@ -93,3 +96,8 @@
93 96
 <app-prompt-modal [content]="promptModal.content" [success]="promptModal.success" [show]="promptModal.show"
94 97
   [info]="promptModal.info">
95 98
 </app-prompt-modal>
99
+<!-- 遮罩 -->
100
+<app-mask *ngIf="maskFlag"></app-mask>
101
+<!-- 模态框 -->
102
+<app-dialog-delete [delModal]="dialogConvertOrRestore.delModal" (hideDelModalEvent)="hideConvertOrRestoreModal()" [btnLoading]="dialogConvertOrRestore.btnLoading"
103
+(confirmDelEvent)="confirmConvertOrRestore()" [content]="dialogConvertOrRestore.content"></app-dialog-delete>

+ 72 - 1
src/app/views/check-and-exclude-config/check-and-exclude-config.component.ts

@@ -14,7 +14,7 @@ export class CheckAndExcludeConfigComponent implements OnInit {
14 14
     private fb: FormBuilder,
15 15
     private checkAndExcludeConfigService: CheckAndExcludeConfigService,
16 16
     private route: ActivatedRoute,
17
-    private tool: ToolService
17
+    private tool: ToolService,
18 18
   ) {}
19 19
 
20 20
   hosId: any; //当前选中院区
@@ -49,6 +49,10 @@ export class CheckAndExcludeConfigComponent implements OnInit {
49 49
   // 初始化增删改按钮
50 50
   coopBtns: any = {};
51 51
 
52
+  // 批量转换/一键转换/一键恢复
53
+  convertOrRestore(type, data?){
54
+    this.showConvertOrRestoreModal(type, data);
55
+  }
52 56
   // 表格数据
53 57
   loading = false;
54 58
   getList(isInit = false) {
@@ -194,5 +198,72 @@ export class CheckAndExcludeConfigComponent implements OnInit {
194 198
         }
195 199
       });
196 200
   }
201
+  // ---------------------------------------
202
+  // 批量转换/一键转换/一键恢复
203
+  dialogConvertOrRestore:any = {
204
+    delModal: false, //删除模态框
205
+    content: '', //提示框信息
206
+  }
207
+  coopType:string = '';
208
+  coopData:any = {};
209
+  showConvertOrRestoreModal(type, data?) {
210
+
211
+    let content = '';
212
+    switch(type){
213
+      case 'batchConversion':
214
+        content = '您确认要转换最近两个半月的所有排除项匹配的检查数据吗?';
215
+        break;
216
+      case 'oneClickConversion':
217
+        content = `您确认要转换最近两个半月的匹配“${data.key1}”检查数据吗?`;
218
+        break;
219
+      case 'oneClickRecovery':
220
+        content = `您确认要恢复最近两个半月的匹配“${data.key1}”检查数据吗?`;
221
+        break;
222
+    }
223
+
224
+    this.coopType = type;
225
+    this.coopData = data;
226
+
227
+    this.dialogConvertOrRestore = {
228
+      delModal: true,
229
+      content,
230
+    }
231
+  }
232
+  // 隐藏
233
+  hideConvertOrRestoreModal() {
234
+    this.dialogConvertOrRestore.delModal = false;
235
+  }
236
+  // 确认
237
+  confirmConvertOrRestore() {
238
+    this.dialogConvertOrRestore.btnLoading = true;
239
+    let type_back = '';
240
+    switch(this.coopType){
241
+      case 'batchConversion':
242
+        type_back = 'inspectTrans';
243
+        break;
244
+      case 'oneClickConversion':
245
+        type_back = 'inspectTrans';
246
+        break;
247
+      case 'oneClickRecovery':
248
+        type_back = 'inspectRecover';
249
+        break;
250
+    }
251
+    let postData = {
252
+      hosId:this.hosId,
253
+      type: type_back,
254
+      id: this.coopData ? this.coopData.id : undefined,
255
+    };
256
+    this.checkAndExcludeConfigService
257
+      .convertOrRestore(postData)
258
+      .subscribe((result: any) => {
259
+        this.dialogConvertOrRestore.btnLoading = false;
260
+        this.dialogConvertOrRestore.delModal = false;
261
+        if (result.state == 200) {
262
+          this.showPromptModal('操作', true);
263
+        }else{
264
+          this.showPromptModal('操作', false, result.msg);
265
+        }
266
+      });
267
+  }
197 268
 }
198 269
 

+ 5 - 0
src/app/views/check-and-exclude-config/check-and-exclude-config.service.ts

@@ -23,4 +23,9 @@ export class CheckAndExcludeConfigService {
23 23
   add(postData) {
24 24
     return this.mainService.simplePost("addData", "dataFieldRule", postData);
25 25
   }
26
+
27
+  // 批量转换/一键转换/一键恢复
28
+  convertOrRestore(postData) {
29
+    return this.mainService.coopConfig("changeInspectDataField", postData);
30
+  }
26 31
 }

+ 71 - 5
src/app/views/dept-inspection-rate-statistics/dept-inspection-rate-statistics.component.html

@@ -6,12 +6,74 @@
6 6
           <span class="label">申请时间</span>:
7 7
           <nz-range-picker [(ngModel)]="searchDto.dateRange"></nz-range-picker>
8 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>
9 33
       </div>
10 34
       <div nz-col nzXl='7' class="list-template__btns">
11 35
         <button nz-button class="btn default ml8" (click)='search()'>搜索</button>
36
+        <button nz-button class="btn default ml8" (click)='export()' [nzLoading]="loading2">导出</button>
12 37
         <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
13 38
       </div>
14 39
     </div>
40
+    <div class="list-template__checkBoxes">
41
+      <nz-checkbox-group [(ngModel)]="checkOptionsOne" (ngModelChange)="getList(true)"></nz-checkbox-group>
42
+    </div>
43
+    <div class="cont">
44
+      <div>
45
+        <span>总计</span>
46
+        <span class="rate"></span>
47
+      </div>
48
+      <div>
49
+        <span>科室数</span>
50
+        <span>{{statisticsObj.count}}</span>
51
+      </div>
52
+      <div>
53
+        <span>总检查数</span>
54
+        <span>{{statisticsObj.total}}</span>
55
+      </div>
56
+      <div>
57
+        <span>无需检查数</span>
58
+        <span>{{statisticsObj.noCheckCount}}</span>
59
+      </div>
60
+      <div>
61
+        <span>需检查数</span>
62
+        <span>{{statisticsObj.checkCount}}</span>
63
+      </div>
64
+      <div>
65
+        <span>陪检数</span>
66
+        <span>{{statisticsObj.insCount}}</span>
67
+      </div>
68
+      <div>
69
+        <span>检查率</span>
70
+        <span>{{statisticsObj.inspectRate}}%</span>
71
+      </div>
72
+      <div>
73
+        <span>工单数</span>
74
+        <span>{{statisticsObj.workOrderCount}}</span>
75
+      </div>
76
+    </div>
15 77
     <div class="list-template__bottom">
16 78
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
17 79
         [nzLoading]="loading1">
@@ -30,11 +92,11 @@
30 92
         <tbody>
31 93
           <tr *ngFor="let data of listOfData;let index=index;">
32 94
             <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
33
-            <td>{{ data.deptName }}</td>
34
-            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'total' }, 'deptInspectionRateStatistics')">{{ data.total }}</td>
35
-            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'noCheckCount' }, 'deptInspectionRateStatistics')">{{ data.noCheckCount }}</td>
36
-            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'checkCount' }, 'deptInspectionRateStatistics')">{{ data.checkCount }}</td>
37
-            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'insCount' }, 'deptInspectionRateStatistics')">{{ data.insCount }}</td>
95
+            <td>{{ data.name }}</td>
96
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, canceled: checkOptionsOne[0].checked, type: 'total' }, 'deptInspectionRateStatistics')">{{ data.total }}</td>
97
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, canceled: checkOptionsOne[0].checked, type: 'noCheckCount' }, 'deptInspectionRateStatistics')">{{ data.noCheckCount }}</td>
98
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, canceled: checkOptionsOne[0].checked, type: 'checkCount' }, 'deptInspectionRateStatistics')">{{ data.checkCount }}</td>
99
+            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, canceled: checkOptionsOne[0].checked, type: 'insCount' }, 'deptInspectionRateStatistics')">{{ data.insCount }}</td>
38 100
             <td>{{ data.inspectRate }}%</td>
39 101
             <td class="tab_hover" (click)="personDetail({ data: data, searchDto: searchDto})">{{ data.workOrderCount }}</td>
40 102
           </tr>
@@ -59,3 +121,7 @@
59 121
   [dataInfo]="dataInfo"
60 122
   (closeModelHs)="closeModelBlood($event)"
61 123
 ></app-businessData-detail-modal>
124
+
125
+<!-- 操作成功/失败提示框 -->
126
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
127
+  [info]="promptInfo"></app-prompt-modal>

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

@@ -1,4 +1,52 @@
1 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
+}
2 50
 .save {
3 51
   position: fixed;
4 52
   left: 0;

+ 130 - 4
src/app/views/dept-inspection-rate-statistics/dept-inspection-rate-statistics.component.ts

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

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

@@ -18,6 +18,21 @@ export class DeptInspectionRateStatisticsService {
18 18
   getDictionary(type) {
19 19
     return this.mainService.getDictionary("list", type);
20 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("deptInspectRate", postData);
35
+  }
21 36
 }
22 37
 
23 38
 

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

@@ -208,6 +208,11 @@ const routes: Routes = [
208 208
         path: "deptInspectionRateStatistics",
209 209
         loadChildren: () => import("../dept-inspection-rate-statistics/dept-inspection-rate-statistics.module").then((m) => m.DeptInspectionRateStatisticsModule),
210 210
       },
211
+      // 统计分析-楼栋检查率统计
212
+      {
213
+        path: "buildingInspectionRateStatistics",
214
+        loadChildren: () => import("../building-inspection-rate-statistics/building-inspection-rate-statistics.module").then((m) => m.BuildingInspectionRateStatisticsModule),
215
+      },
211 216
       // 轮巡计划列表
212 217
       {
213 218
         path: "roundRobin",