Ver código fonte

配送陪检统计

seimin 1 mês atrás
pai
commit
d8f221d660
91 arquivos alterados com 4546 adições e 216 exclusões
  1. 97 0
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.html
  2. 115 0
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.less
  3. 307 0
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.ts
  4. 20 0
      src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.module.ts
  5. 45 65
      src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.html
  6. 13 2
      src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.less
  7. 44 89
      src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.ts
  8. 2 2
      src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.module.ts
  9. 14 0
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics-routing.module.ts
  10. 83 0
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.html
  11. 71 0
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.less
  12. 257 0
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.component.ts
  13. 21 0
      src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.module.ts
  14. 14 0
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics-routing.module.ts
  15. 79 0
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.html
  16. 82 0
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.less
  17. 285 0
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.ts
  18. 23 0
      src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.module.ts
  19. 14 0
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics-routing.module.ts
  20. 82 0
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.html
  21. 71 0
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.less
  22. 281 0
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.component.ts
  23. 21 0
      src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.module.ts
  24. 14 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics-routing.module.ts
  25. 82 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.html
  26. 71 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.less
  27. 281 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.ts
  28. 21 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.module.ts
  29. 14 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics-routing.module.ts
  30. 70 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.html
  31. 71 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.less
  32. 281 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.ts
  33. 21 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.module.ts
  34. 72 0
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-inspection-statistics-routing.module.ts
  35. 1 1
      src/app/views/new-statistics/distribution-inspection-statistics/distribution-inspection-statistics.component.less
  36. 14 0
      src/app/views/new-statistics/distribution-inspection-statistics/source-statistics/source-statistics-routing.module.ts
  37. 65 0
      src/app/views/new-statistics/distribution-inspection-statistics/source-statistics/source-statistics.component.html
  38. 71 0
      src/app/views/new-statistics/distribution-inspection-statistics/source-statistics/source-statistics.component.less
  39. 283 0
      src/app/views/new-statistics/distribution-inspection-statistics/source-statistics/source-statistics.component.ts
  40. 21 0
      src/app/views/new-statistics/distribution-inspection-statistics/source-statistics/source-statistics.module.ts
  41. 14 0
      src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics-routing.module.ts
  42. 79 0
      src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.component.html
  43. 82 0
      src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.component.less
  44. 284 0
      src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.component.ts
  45. 23 0
      src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.module.ts
  46. 14 0
      src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics-routing.module.ts
  47. 80 0
      src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.component.html
  48. 71 0
      src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.component.less
  49. 276 0
      src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.component.ts
  50. 21 0
      src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.module.ts
  51. 1 1
      src/app/views/new-statistics/maintenance-statistics/building-statistics/building-statistics.component.less
  52. 2 2
      src/app/views/new-statistics/maintenance-statistics/building-statistics/building-statistics.component.ts
  53. 1 1
      src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.less
  54. 2 2
      src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.ts
  55. 1 1
      src/app/views/new-statistics/maintenance-statistics/category-source-statistics/category-source-statistics.component.less
  56. 2 2
      src/app/views/new-statistics/maintenance-statistics/category-source-statistics/category-source-statistics.component.ts
  57. 1 1
      src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.less
  58. 2 2
      src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.ts
  59. 1 1
      src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.less
  60. 2 2
      src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.ts
  61. 1 1
      src/app/views/new-statistics/maintenance-statistics/consumable-statistics/consumable-statistics.component.less
  62. 2 2
      src/app/views/new-statistics/maintenance-statistics/consumable-statistics/consumable-statistics.component.ts
  63. 1 1
      src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.less
  64. 2 2
      src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.ts
  65. 1 1
      src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.less
  66. 2 2
      src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.ts
  67. 1 1
      src/app/views/new-statistics/maintenance-statistics/department-source-statistics/department-source-statistics.component.less
  68. 2 2
      src/app/views/new-statistics/maintenance-statistics/department-source-statistics/department-source-statistics.component.ts
  69. 1 1
      src/app/views/new-statistics/maintenance-statistics/floor-statistics/floor-statistics.component.less
  70. 2 2
      src/app/views/new-statistics/maintenance-statistics/floor-statistics/floor-statistics.component.ts
  71. 1 1
      src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.less
  72. 2 2
      src/app/views/new-statistics/maintenance-statistics/group-statistics/group-statistics.component.ts
  73. 1 1
      src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.less
  74. 2 2
      src/app/views/new-statistics/maintenance-statistics/incident-statistics/incident-statistics.component.ts
  75. 1 1
      src/app/views/new-statistics/maintenance-statistics/maintenance-statistics.component.less
  76. 1 1
      src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.less
  77. 2 2
      src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.ts
  78. 1 1
      src/app/views/new-statistics/maintenance-statistics/user-statistics/user-statistics.component.less
  79. 2 2
      src/app/views/new-statistics/maintenance-statistics/user-statistics/user-statistics.component.ts
  80. 1 1
      src/app/views/new-statistics/maintenance-statistics/work-hour-statistics/work-hour-statistics.component.less
  81. 2 2
      src/app/views/new-statistics/maintenance-statistics/work-hour-statistics/work-hour-statistics.component.ts
  82. 1 0
      src/app/views/new-statistics/new-statistics.component.html
  83. 15 4
      src/app/views/new-statistics/new-statistics.component.less
  84. 5 0
      src/app/views/new-statistics/new-statistics.component.ts
  85. 26 3
      src/assets/iconfont/demo_index.html
  86. 7 3
      src/assets/iconfont/iconfont.css
  87. 1 1
      src/assets/iconfont/iconfont.js
  88. 7 0
      src/assets/iconfont/iconfont.json
  89. BIN
      src/assets/iconfont/iconfont.ttf
  90. BIN
      src/assets/iconfont/iconfont.woff
  91. BIN
      src/assets/iconfont/iconfont.woff2

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

@@ -0,0 +1,97 @@
1
+<div class="save add display_flex align-items_center justify-content_flex-center">
2
+  <div class="modalBody">
3
+    <div class="title">详细搜索<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
4
+    </div>
5
+    <div class="content">
6
+      <form nz-form [formGroup]="validateForm" class="addForm">
7
+        <nz-form-item [hidden]="!fieldConfig.config.groupAndUser">
8
+          <nz-form-label [nzSpan]="6" nzFor="groupId">分<span style="visibility: hidden;">囧囧</span>组</nz-form-label>
9
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择分组!">
10
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeGroupInp($event)" formControlName="groupId" nzPlaceHolder="请选择分组" (nzOpenChange)="openChangeGroup($event)" (ngModelChange)="changeGroup($event)">
11
+              <ng-container *ngFor="let option of groupList">
12
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.groupName" [nzValue]="option.id"></nz-option>
13
+              </ng-container>
14
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
15
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
16
+              </nz-option>
17
+            </nz-select>
18
+          </nz-form-control>
19
+        </nz-form-item>
20
+
21
+        <nz-form-item [hidden]="!fieldConfig.config.groupAndUser">
22
+          <nz-form-label [nzSpan]="6" nzFor="userId">人<span style="visibility: hidden;">囧囧</span>员</nz-form-label>
23
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择人员!">
24
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeUserInp($event)" formControlName="userId" nzPlaceHolder="请选择人员" (nzOpenChange)="openChangeUser($event)" (ngModelChange)="setIsSelecting(true)">
25
+              <ng-container *ngFor="let option of userList">
26
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [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
+          </nz-form-control>
33
+        </nz-form-item>
34
+
35
+        <nz-form-item [hidden]="!fieldConfig.config.statisticsType">
36
+          <nz-form-label [nzSpan]="6" nzFor="statisticsTypeId">统计分类</nz-form-label>
37
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择统计分类!">
38
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="statisticsTypeId" nzPlaceHolder="请选择统计分类">
39
+              <ng-container *ngFor="let option of statisticsTypeList">
40
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
41
+              </ng-container>
42
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
43
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
44
+              </nz-option>
45
+            </nz-select>
46
+          </nz-form-control>
47
+        </nz-form-item>
48
+
49
+        <nz-form-item [hidden]="!fieldConfig.config.taskType">
50
+          <nz-form-label [nzSpan]="6" nzFor="taskTypeId">任务类型</nz-form-label>
51
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择任务类型!">
52
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeTaskTypeInp($event)" formControlName="taskTypeId" nzPlaceHolder="请选择任务类型" (nzOpenChange)="openChangeTaskType($event)" (ngModelChange)="setIsSelecting(true)">
53
+              <ng-container *ngFor="let option of taskTypeList">
54
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.hosId.hosName + '-' + option.taskName" [nzValue]="option.id"></nz-option>
55
+              </ng-container>
56
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
57
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
58
+              </nz-option>
59
+            </nz-select>
60
+          </nz-form-control>
61
+        </nz-form-item>
62
+
63
+        <nz-form-item [hidden]="!fieldConfig.config.building">
64
+          <nz-form-label [nzSpan]="6" nzFor="buildingId">楼<span style="visibility: hidden;">囧囧</span>栋</nz-form-label>
65
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择楼栋!">
66
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeBuildingInp($event)" formControlName="buildingId" nzPlaceHolder="请选择楼栋" (nzOpenChange)="openChangeBuilding($event)" (ngModelChange)="setIsSelecting(true)">
67
+              <ng-container *ngFor="let option of buildingList">
68
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName + '-' + option.buildingName" [nzValue]="option.id"></nz-option>
69
+              </ng-container>
70
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
71
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
72
+              </nz-option>
73
+            </nz-select>
74
+          </nz-form-control>
75
+        </nz-form-item>
76
+
77
+        <nz-form-item [hidden]="!fieldConfig.config.dept">
78
+          <nz-form-label [nzSpan]="6" nzFor="deptId">科<span style="visibility: hidden;">囧囧</span>室</nz-form-label>
79
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择科室!">
80
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" formControlName="deptId" nzPlaceHolder="请选择科室" (nzOpenChange)="openChangeRepairDept($event)" (ngModelChange)="setIsSelecting(true)">
81
+              <ng-container *ngFor="let option of deptList">
82
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
83
+              </ng-container>
84
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
85
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
86
+              </nz-option>
87
+            </nz-select>
88
+          </nz-form-control>
89
+        </nz-form-item>
90
+      </form>
91
+    </div>
92
+    <div class="display_flex justify-content_flex-center">
93
+      <button nz-button nzType="default" (click)="hideModal()">取消</button>
94
+      <button nzType="primary" nz-button (click)="submitForm()">确认</button>
95
+    </div>
96
+  </div>
97
+</div>

+ 115 - 0
src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.less

@@ -0,0 +1,115 @@
1
+.save {
2
+  position: fixed;
3
+  left: 0;
4
+  top: 0;
5
+  width: 100%;
6
+  height: 100%;
7
+  background: rgba(0, 0, 0, 0.4);
8
+  z-index: 99;
9
+
10
+  .modalBody {
11
+    width: 350px;
12
+    background: #fff;
13
+    border-radius: 5px;
14
+    padding: 10px 20px;
15
+    color: #333;
16
+
17
+    .title {
18
+      width: 100%;
19
+      text-align: center;
20
+      font-size: 16px;
21
+      position: relative;
22
+      padding: 16px 0;
23
+
24
+      i {
25
+        position: absolute;
26
+        right: 0;
27
+        top: 50%;
28
+        font-size: 20px;
29
+        color: #666;
30
+        cursor: pointer;
31
+        transform: translateY(-50%);
32
+      }
33
+    }
34
+
35
+    .content {
36
+      width: 100%;
37
+      height: 117px;
38
+      background: #f9fafb;
39
+      border: 1px solid #e5e9ed;
40
+      border-radius: 5px;
41
+      overflow: hidden;
42
+
43
+      div {
44
+        text-align: center;
45
+        margin: 0;
46
+
47
+        &.icon {
48
+          margin-top: 17px;
49
+
50
+          i {
51
+            color: #34b349;
52
+            font-size: 30px !important;
53
+
54
+            &.transport-wenhao {
55
+              color: #f5a523;
56
+            }
57
+
58
+            &.transport-shibai {
59
+              color: #ff3a52;
60
+            }
61
+          }
62
+        }
63
+
64
+        &.defeat {
65
+          color: #333;
66
+          font-size: 16px;
67
+        }
68
+
69
+        &:nth-child(3) {
70
+          font-size: 14px;
71
+          color: #666;
72
+        }
73
+      }
74
+    }
75
+
76
+    button {
77
+      margin-top: 10px;
78
+      margin-bottom: 10px;
79
+    }
80
+  }
81
+
82
+  // 新增
83
+  &.add {
84
+    .modalBody {
85
+      width: 400px;
86
+      padding: 0 24px;
87
+
88
+      .content {
89
+        width: 100%;
90
+        padding: 10px 24px 0;
91
+        height: auto;
92
+        overflow-y: auto;
93
+
94
+        .addForm {
95
+          .ant-form-item {
96
+            margin-bottom: 14px;
97
+            .ant-form-item-label {
98
+              text-align: left;
99
+            }
100
+            &.mb0{
101
+              margin-bottom: 6px;
102
+            }
103
+            .ant-radio-wrapper{
104
+              margin-right: 0;
105
+            }
106
+          }
107
+        }
108
+      }
109
+
110
+      button:nth-child(1) {
111
+        margin-right: 8px;
112
+      }
113
+    }
114
+  }
115
+}

+ 307 - 0
src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.component.ts

@@ -0,0 +1,307 @@
1
+import { Subject } from 'rxjs';
2
+import { debounceTime } from 'rxjs/operators';
3
+import { ToolService } from '../../../../services/tool.service';
4
+import { Component, OnInit, Output, Input } from '@angular/core';
5
+import { FormGroup, FormBuilder, Validators } from '@angular/forms';
6
+import { EventEmitter } from '@angular/core';
7
+import { MainService } from 'src/app/services/main.service';
8
+
9
+@Component({
10
+  selector: 'app-distribution-search-more',
11
+  templateUrl: './distribution-search-more.component.html',
12
+  styleUrls: ['./distribution-search-more.component.less']
13
+})
14
+export class DistributionSearchMoreComponent implements OnInit {
15
+  @Output() submitEvent = new EventEmitter();
16
+  @Output() cancelEvent = new EventEmitter();
17
+  @Input() fieldConfig: any = { fields: [], config: [] };
18
+  @Input() hosId: any;
19
+  @Input() parentDutyId: any;
20
+  @Input() dutyId: any;
21
+  @Input() queryType: any;
22
+  validateForm: FormGroup;//表单
23
+  searchTimerSubject = new Subject();
24
+  constructor(
25
+    private fb: FormBuilder,
26
+    private tool: ToolService,
27
+    private mainService: MainService,
28
+  ) { }
29
+
30
+  ngOnInit() {
31
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
32
+      let fun = v[0];
33
+      fun.call(this, v[1]);
34
+    });
35
+    this.initForm();
36
+    this.getSourceList();
37
+  }
38
+  // 隐藏模态框
39
+  hideModal() {
40
+    this.cancelEvent.emit()
41
+  }
42
+  // 初始化form表单
43
+  initForm() {
44
+    this.groupList = this.fieldConfig.fields.groupDTO ? [this.fieldConfig.fields.groupDTO] : [];
45
+    this.userList = this.fieldConfig.fields.userDTO ? [this.fieldConfig.fields.userDTO] : [];
46
+    this.statisticsTypeList = this.fieldConfig.fields.statisticsTypeDTO ? [this.fieldConfig.fields.statisticsTypeDTO] : [];
47
+    this.buildingList = this.fieldConfig.fields.buildingDTO ? [this.fieldConfig.fields.buildingDTO] : [];
48
+    this.taskTypeList = this.fieldConfig.fields.taskTypeDTO ? [this.fieldConfig.fields.taskTypeDTO] : [];
49
+    this.deptList = this.fieldConfig.fields.deptDTO ? [this.fieldConfig.fields.deptDTO] : [];
50
+
51
+    this.validateForm = this.fb.group({
52
+      groupId: [this.fieldConfig.fields.groupId || null],
53
+      userId: [this.fieldConfig.fields.userId === undefined ? null : this.fieldConfig.fields.userId],
54
+      statisticsTypeId: [this.fieldConfig.fields.statisticsTypeId || null],
55
+      buildingId: [this.fieldConfig.fields.buildingId || null],
56
+      taskTypeId: [this.fieldConfig.fields.taskTypeDTO ? this.fieldConfig.fields.taskTypeDTO.id  : null],
57
+      deptId: [this.fieldConfig.fields.deptDTO ? this.fieldConfig.fields.deptDTO.id  : null],
58
+    });
59
+  }
60
+  // 表单提交
61
+  submitForm(): void {
62
+    for (const i in this.validateForm.controls) {
63
+      this.validateForm.controls[i].markAsDirty({ onlySelf: true });
64
+      this.validateForm.controls[i].updateValueAndValidity();
65
+    }
66
+    if (this.validateForm.invalid) return;
67
+
68
+    let fields:any = {}
69
+    if(this.fieldConfig.config.groupAndUser){
70
+      fields.groupId = this.validateForm.value.groupId;
71
+      fields.groupDTO = this.groupList.find(item => item.id == this.validateForm.value.groupId);
72
+      fields.userId = this.validateForm.value.userId;
73
+      fields.userDTO = this.userList.find(item => item.id == this.validateForm.value.userId);
74
+    }
75
+
76
+    if(this.fieldConfig.config.statisticsType){
77
+      fields.statisticsTypeId = this.validateForm.value.statisticsTypeId;
78
+      fields.statisticsTypeDTO = this.statisticsTypeList.find(item => item.id == this.validateForm.value.statisticsTypeId);
79
+    }
80
+    if(this.fieldConfig.config.building){
81
+      fields.buildingId = this.validateForm.value.buildingId;
82
+      fields.buildingDTO = this.buildingList.find(item => item.id == this.validateForm.value.buildingId);
83
+    }
84
+    if(this.fieldConfig.config.taskType){
85
+      fields.taskTypeId = this.validateForm.value.taskTypeId;
86
+      fields.taskTypeDTO = this.taskTypeList.find(item => item.id == this.validateForm.value.taskTypeId);
87
+    }
88
+    if(this.fieldConfig.config.dept){
89
+      fields.deptId = this.validateForm.value.deptId;
90
+      fields.deptDTO = this.deptList.find(item => item.id == this.validateForm.value.deptId);
91
+    }
92
+    this.submitEvent.emit(fields);
93
+    this.hideModal();
94
+  }
95
+
96
+  get getHosId(){
97
+    return this.parentDutyId || this.dutyId || this.hosId;
98
+  }
99
+
100
+  // 防抖
101
+  isLoading = false;
102
+  isSelecting:boolean = false; // 是否在选中状态
103
+  searchTimer(fun, e) {
104
+    if (this.isSelecting) {
105
+      this.isSelecting = false; // 重置标志
106
+      return; // 跳过处理
107
+    }
108
+    this.isLoading = true;
109
+    this.searchTimerSubject.next([fun, e]);
110
+  }
111
+
112
+  // 设置标志
113
+  setIsSelecting(flag){
114
+    this.isSelecting = flag; // 设置标志
115
+  }
116
+
117
+  // =================分组===================
118
+
119
+  // 分组搜索
120
+  changeGroupInp(e) {
121
+    this.searchTimer(this.getGroupList, e);
122
+  }
123
+
124
+  // 获取分组列表
125
+  groupList:any[] = [];
126
+  getGroupList(keyword?){
127
+    let postData: any = {
128
+      idx: 0,
129
+      sum: 20,
130
+      group2: {
131
+        statisticalHosId: this.getHosId,
132
+        groupName: keyword,
133
+      },
134
+    };
135
+    this.isLoading = true;
136
+    this.mainService.getFetchDataList("simple/data", "group2", postData).subscribe(result => {
137
+      this.isLoading = false;
138
+      if(result.status == 200){
139
+        this.groupList = result.list || [];
140
+      }else{
141
+        this.groupList = [];
142
+      }
143
+    });
144
+  }
145
+  openChangeGroup(flag){
146
+    flag && this.setIsSelecting(false);
147
+    flag && this.getGroupList();
148
+  }
149
+
150
+  changeGroup(id){
151
+    this.setIsSelecting(true);
152
+    this.userList = [];
153
+    this.validateForm.controls.userId.setValue(null);
154
+    this.getUserList();
155
+  }
156
+
157
+  // =================人员===================
158
+
159
+  // 人员搜索
160
+  changeUserInp(e) {
161
+    this.searchTimer(this.getUserList, e);
162
+  }
163
+
164
+  // 获取人员列表
165
+  userList:any[] = [];
166
+  getUserList(keyword = ''){
167
+    if(!this.validateForm.value.groupId){
168
+      this.isLoading = false;
169
+      this.userList = [];
170
+      return;
171
+    }
172
+    let postData: any = {
173
+      idx: 0,
174
+      sum: 20,
175
+      user: {
176
+        name: keyword,
177
+        simpleQuery: true,
178
+        groupdata: { id: this.validateForm.value.groupId },
179
+      },
180
+    };
181
+    this.isLoading = true;
182
+    this.mainService.getFetchDataList("simple/data", "user", postData).subscribe(result => {
183
+      this.isLoading = false;
184
+      if(result.status == 200){
185
+        this.userList = result.list || [];
186
+      }else{
187
+        this.userList = [];
188
+      }
189
+    });
190
+  }
191
+  openChangeUser(flag){
192
+    flag && this.setIsSelecting(false);
193
+    flag && this.getUserList();
194
+  }
195
+
196
+  // =================统计分类===================
197
+
198
+  // 获取统计分类列表
199
+  statisticsTypeList:any[] = [];
200
+  getSourceList(){
201
+    this.mainService.getDictionary("list", "statistics_date_type").subscribe(result => {
202
+      this.statisticsTypeList = result;
203
+    });
204
+  }
205
+
206
+  // =================楼栋===================
207
+
208
+  // 楼栋搜索
209
+  changeBuildingInp(e) {
210
+    this.searchTimer(this.getBuildingList, e);
211
+  }
212
+
213
+  // 获取楼栋列表
214
+  buildingList:any[] = [];
215
+  getBuildingList(keyword?){
216
+    let postData: any = {
217
+      idx: 0,
218
+      sum: 20,
219
+      building: {
220
+        simpleQuery: true,
221
+        buildingName: keyword,
222
+        statisticalHosId:this.getHosId,
223
+      },
224
+    };
225
+    this.isLoading = true;
226
+    this.mainService.getFetchDataList("simple/data", "building", postData).subscribe(result => {
227
+      this.isLoading = false;
228
+      if(result.status == 200){
229
+        this.buildingList = result.list || [];
230
+      }else{
231
+        this.buildingList = [];
232
+      }
233
+    });
234
+  }
235
+  openChangeBuilding(flag){
236
+    flag && this.setIsSelecting(false);
237
+    flag && this.getBuildingList();
238
+  }
239
+
240
+  // =================任务类型===================
241
+
242
+  // 任务类型搜索
243
+  changeTaskTypeInp(e) {
244
+    this.searchTimer(this.getTaskTypeList, e);
245
+  }
246
+
247
+  // 获取任务类型列表
248
+  taskTypeList:any[] = [];
249
+  getTaskTypeList(keyword?){
250
+    let postData: any = {
251
+      idx: 0,
252
+      sum: 20,
253
+      taskType: {
254
+        simpleQuery: true,
255
+        taskName: keyword,
256
+        statisticalHosId: this.getHosId,
257
+      },
258
+    };
259
+    this.isLoading = true;
260
+    this.mainService.getFetchDataList("simple/data", "taskType", postData).subscribe(result => {
261
+      this.isLoading = false;
262
+      if(result.status == 200){
263
+        this.taskTypeList = result.list || [];
264
+      }else{
265
+        this.taskTypeList = [];
266
+      }
267
+    });
268
+  }
269
+  openChangeTaskType(flag){
270
+    flag && this.setIsSelecting(false);
271
+    flag && this.getTaskTypeList();
272
+  }
273
+
274
+  // =================科室===================
275
+
276
+  // 科室搜索
277
+  changeRepairDeptInp(e) {
278
+    this.searchTimer(this.getRepairDeptList, e);
279
+  }
280
+
281
+  // 获取科室列表
282
+  deptList:any[] = [];
283
+  getRepairDeptList(keyword?){
284
+    let postData: any = {
285
+      idx: 0,
286
+      sum: 20,
287
+      department: {
288
+        statisticalHosId: this.getHosId,
289
+        dept: keyword,
290
+        searchType: 1,
291
+      },
292
+    };
293
+    this.isLoading = true;
294
+    this.mainService.getFetchDataList("simple/data", "department", postData).subscribe(result => {
295
+      this.isLoading = false;
296
+      if(result.status == 200){
297
+        this.deptList = result.list || [];
298
+      }else{
299
+        this.deptList = [];
300
+      }
301
+    });
302
+  }
303
+  openChangeRepairDept(flag){
304
+    flag && this.setIsSelecting(false);
305
+    flag && this.getRepairDeptList();
306
+  }
307
+}

+ 20 - 0
src/app/views/new-statistics/components/distribution-search-more/distribution-search-more.module.ts

@@ -0,0 +1,20 @@
1
+import { DistributionSearchMoreComponent } from './distribution-search-more.component';
2
+import { NgModule } from '@angular/core';
3
+import { CommonModule } from '@angular/common';
4
+
5
+import { ShareModule } from 'src/app/share/share.module';
6
+
7
+
8
+@NgModule({
9
+  declarations: [
10
+    DistributionSearchMoreComponent,
11
+  ],
12
+  imports: [
13
+    CommonModule,
14
+    ShareModule,
15
+  ],
16
+  exports: [
17
+    DistributionSearchMoreComponent,
18
+  ]
19
+})
20
+export class DistributionSearchMoreModule { }

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

@@ -5,17 +5,6 @@
5 5
       <nz-range-picker [(ngModel)]="dateRange" [nzAllowClear]="false" (ngModelChange)="changeDate($event)" (nzOnCalendarChange)="onCalendarChangeDate($event)">
6 6
       </nz-range-picker>
7 7
     </div>
8
-    <div class="searchDataItem">
9
-      <span class="label">报修科室</span>:
10
-      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeRepairDeptInp($event)" nzAllowClear nzPlaceHolder="请选择报修科室" [(ngModel)]="repairDeptId" (nzOpenChange)="openChangeRepairDept($event)">
11
-        <ng-container *ngFor="let option of repairDeptList">
12
-          <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
13
-        </ng-container>
14
-        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
15
-          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
16
-        </nz-option>
17
-      </nz-select>
18
-    </div>
19 8
   </div>
20 9
   <div class="operation">
21 10
     <i class="icon_transport transport-gengduo" (click)="showMore()"></i>
@@ -24,67 +13,58 @@
24 13
     <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
25 14
   </div>
26 15
 </div>
27
-<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.category1DTO || fieldConfig.fields.category2DTO || fieldConfig.fields.category3DTO || fieldConfig.fields.sourceDTO">
16
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.deptDTO">
28 17
   <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
29 18
   <span>{{fieldConfig.fields.userDTO?.name}}</span>
30
-  <span>{{fieldConfig.fields.category1DTO?.category}}</span>
31
-  <span>{{fieldConfig.fields.category2DTO?.category}}</span>
32
-  <span>{{fieldConfig.fields.category3DTO?.category}}</span>
33
-  <span>{{fieldConfig.fields.sourceDTO?.name}}</span>
19
+  <span>{{fieldConfig.fields.buildingDTO?.buildingName}}</span>
20
+  <span>{{fieldConfig.fields.deptDTO?.dept}}</span>
34 21
 </div>
35
-<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
36
-  <thead (nzSortChange)="sort($event)" nzSingleSort>
37
-    <tr>
38
-      <th nzWidth="10%" nzShowSort nzSortKey="startDate" [(nzSort)]="sortCurrent.startDate">时间</th>
39
-      <th nzWidth="9%" nzShowSort nzSortKey="sum" [(nzSort)]="sortCurrent.sum">工单总数</th>
40
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResponseTime" [(nzSort)]="sortCurrent.avgResponseTime">平均接单时长</th>
41
-      <th nzWidth="9%" nzShowSort nzSortKey="avgResolvedTime" [(nzSort)]="sortCurrent.avgResolvedTime">平均解决时长</th>
42
-      <th nzWidth="9%" nzShowSort nzSortKey="resolvedOverNum" [(nzSort)]="sortCurrent.resolvedOverNum">超时单数</th>
43
-      <th nzWidth="9%" nzShowSort nzSortKey="overTimeNum" [(nzSort)]="sortCurrent.overTimeNum">挂起单数</th>
44
-      <th nzWidth="9%" nzShowSort nzSortKey="consumablePrice" [(nzSort)]="sortCurrent.consumablePrice">耗材费用(元)</th>
45
-      <th nzWidth="9%" nzShowSort nzSortKey="workHourPrice" [(nzSort)]="sortCurrent.workHourPrice">工时费用(元)</th>
46
-      <th nzWidth="9%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice">总费用(元)</th>
47
-      <th nzWidth="9%" nzShowSort nzSortKey="negativeNum" [(nzSort)]="sortCurrent.negativeNum">差评单数</th>
48
-      <th nzWidth="9%" nzShowSort nzSortKey="favorableRate" [(nzSort)]="sortCurrent.favorableRate">好评率</th>
49
-    </tr>
50
-  </thead>
51
-  <tbody>
52
-    <tr *ngFor="let data of listOfData">
53
-      <td>{{ data.startDate }}</td>
54
-      <td>{{ data.sum }}</td>
55
-      <td>{{ data.avgResponseTime }}</td>
56
-      <td>{{ data.avgResolvedTime }}</td>
57
-      <td>{{ data.resolvedOverNum }}</td>
58
-      <td>{{ data.overTimeNum }}</td>
59
-      <td>{{ data.consumablePrice }}</td>
60
-      <td>{{ data.workHourPrice }}</td>
61
-      <td>{{ data.totalPrice }}</td>
62
-      <td>{{ data.negativeNum }}</td>
63
-      <td>{{ data.favorableRate }}</td>
64
-    </tr>
65
-  </tbody>
66
-  <ng-template #footerTpl>
67
-    <table class="footTable">
68
-      <tr *ngFor="let data of listOfDataEnd">
69
-        <td style="width: 10%">{{ data.startDate }}</td>
70
-        <td style="width: 9%">{{ data.sum }}</td>
71
-        <td style="width: 9%">{{ data.avgResponseTime }}</td>
72
-        <td style="width: 9%">{{ data.avgResolvedTime }}</td>
73
-        <td style="width: 9%">{{ data.resolvedOverNum }}</td>
74
-        <td style="width: 9%">{{ data.overTimeNum }}</td>
75
-        <td style="width: 9%">{{ data.consumablePrice }}</td>
76
-        <td style="width: 9%">{{ data.workHourPrice }}</td>
77
-        <td style="width: 9%">{{ data.totalPrice }}</td>
78
-        <td style="width: 9%">{{ data.negativeNum }}</td>
79
-        <td style="width: 9%">{{ data.favorableRate }}</td>
22
+<div class="tableWrap">
23
+  <nz-table class="table" [ngStyle]="{ width: widthConfig.length * 100 + 20 + 'px' }" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl" [nzWidthConfig]="widthConfig" nzBordered>
24
+    <thead (nzSortChange)="sort($event)" nzSingleSort>
25
+      <tr>
26
+        <th rowspan="2" nzShowSort nzSortKey="date" [(nzSort)]="sortCurrent.date">日期</th>
27
+        <th rowspan="2" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
28
+        <th rowspan="2" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">积分总和</th>
29
+        <th colspan="2" *ngFor="let dictionary of dictionaryList">{{dictionary.name}}</th>
30
+      </tr>
31
+      <tr>
32
+        <ng-container *ngFor="let dictionary of dictionaryList">
33
+          <th nzShowSort [nzSortKey]="dictionary.value + 'Count'" [(nzSort)]="sortCurrent[dictionary.value + 'Count']">工单量</th>
34
+          <th nzShowSort [nzSortKey]="dictionary.value + 'Grade'" [(nzSort)]="sortCurrent[dictionary.value + 'Grade']">积分数</th>
35
+        </ng-container>
36
+      </tr>
37
+    </thead>
38
+    <tbody>
39
+      <tr *ngFor="let data of listOfData">
40
+        <td>{{ data.date }}</td>
41
+        <td>{{ data.totalCount }}</td>
42
+        <td>{{ data.totalGrade }}</td>
43
+        <ng-container *ngFor="let dictionary of dictionaryList">
44
+          <td>{{ data[dictionary.value + 'Count'] }}</td>
45
+          <td>{{ data[dictionary.value + 'Grade'] }}</td>
46
+        </ng-container>
80 47
       </tr>
81
-    </table>
82
-  </ng-template>
83
-</nz-table>
48
+    </tbody>
49
+    <ng-template #footerTpl>
50
+      <table class="footTable">
51
+        <tr *ngFor="let data of listOfDataEnd">
52
+          <td>{{ data.date }}</td>
53
+          <td>{{ data.totalCount }}</td>
54
+          <td>{{ data.totalGrade }}</td>
55
+          <ng-container *ngFor="let dictionary of dictionaryList">
56
+            <td>{{ data[dictionary.value + 'Count'] }}</td>
57
+            <td>{{ data[dictionary.value + 'Grade'] }}</td>
58
+          </ng-container>
59
+        </tr>
60
+      </table>
61
+    </ng-template>
62
+  </nz-table>
63
+</div>
84 64
 <div class="pagination">
85 65
   <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
86 66
   <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" nzShowSizeChanger [nzPageSizeOptions]="[30,50,100,200]" [nzShowTotal]="totalTemplate"></nz-pagination>
87 67
 </div>
88 68
 
89 69
 <!-- 详细搜索 -->
90
-<app-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-search-more>
70
+<app-distribution-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-distribution-search-more>

+ 13 - 2
src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.less

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{
@@ -50,8 +50,19 @@
50 50
     }
51 51
   }
52 52
 
53
-  .table{
53
+  .tableWrap{
54 54
     margin: 0 8px;
55
+    overflow-x: auto;
56
+    .footTable, tbody{
57
+      td{
58
+        width: 100px;
59
+        max-width: 100px;
60
+        &.width150{
61
+          width: 150px;
62
+          max-width: 150px;
63
+        }
64
+      }
65
+    }
55 66
   }
56 67
 
57 68
   .moreFilter{

+ 44 - 89
src/app/views/new-statistics/distribution-inspection-statistics/date-business-statistics/date-business-statistics.component.ts

@@ -1,6 +1,4 @@
1 1
 import { TabService } from './../../services/tab.service';
2
-import { debounceTime } from 'rxjs/operators';
3
-import { Subject } from 'rxjs';
4 2
 import { NzMessageService } from 'ng-zorro-antd/message';
5 3
 import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
6 4
 import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
@@ -24,16 +22,9 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
24 22
   pageIndex: number = 1; //表格当前页码
25 23
   pageSize: number = 30; //表格每页展示条数
26 24
   listLength: number = 0; //表格总数据量
27
-
28
-  repairDeptId;//报修科室id
29
-
30
-  searchTimerSubject = new Subject();
25
+  widthConfig: any[] = [];
31 26
 
32 27
   ngOnInit() {
33
-    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
34
-      let fun = v[0];
35
-      fun.call(this, v[1]);
36
-    });
37 28
     this.initSessionData();
38 29
     this.getQueryParams();
39 30
     this.search();
@@ -47,7 +38,7 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
47 38
   @HostListener('window:resize')
48 39
   onResize(): void {
49 40
     setTimeout(() => {
50
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
41
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter - 2;
51 42
 
52 43
     }, 0)
53 44
   }
@@ -61,8 +52,8 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
61 52
   }
62 53
 
63 54
   get getMoreFilter(){
64
-    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO;
65
-    return flag ? 21 : 0;
55
+    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.deptDTO;
56
+    return flag ? 37 : 0;
66 57
   }
67 58
 
68 59
   // 初始化缓存数据
@@ -106,37 +97,40 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
106 97
 
107 98
   // 表格数据
108 99
   loading1 = false;
100
+  dictionaryList: any[] = [];
109 101
   getList(num?: number, field?: string, sort?: string) {
110
-    if (num !== undefined) {
111
-      this.pageIndex = num;
112
-    }
113
-    let postData:any = {
114
-      idx: this.pageIndex - 1,
115
-      sum: this.pageSize,
116
-      startDate: this.dateRange[0] || undefined,
117
-      endDate: this.dateRange[1] || undefined,
118
-      hosId: this.hosId || undefined,
119
-      dutyId: this.dutyId || undefined,
120
-      parentDutyId: this.parentDutyId || undefined,
121
-      repairDeptId: this.repairDeptId || undefined,
122
-      groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
123
-      userId: this.fieldConfig.fields.userId || undefined,
124
-      categoryId: this.fieldConfig.fields.categoryId || undefined,
125
-      sourceId: this.fieldConfig.fields.sourceId || undefined,
126
-      hierarchy: this.fieldConfig.fields.hierarchy || undefined,
127
-    };
128
-    if (field && sort) {
129
-      postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
130
-    }
131
-    this.loading1 = true;
132
-    this.mainService
133
-      .postCustom("itsm/report", "incidentWorkOrder", postData)
134
-      .subscribe((result) => {
135
-        this.loading1 = false;
136
-        this.listOfData = result.dataList.filter((v, i) => { return i != result.dataList.length - 1 });
137
-        this.listOfDataEnd = result.dataList.filter((v, i) => { return i == result.dataList.length - 1 });
138
-        this.listLength = result.totalCount;
139
-      });
102
+    this.mainService.getDictionary('list', 'statistics_date_type').subscribe((data) => {
103
+      let dictionaryList = data || [];
104
+      dictionaryList.push({id: 0, name: '其他', value: 'dateOther'});
105
+      this.dictionaryList = dictionaryList;
106
+      this.widthConfig = new Array(this.dictionaryList.length * 2 + 3).fill('100px');
107
+      if (num !== undefined) {
108
+        this.pageIndex = num;
109
+      }
110
+      let postData:any = {
111
+        idx: this.pageIndex - 1,
112
+        sum: this.pageSize,
113
+        startDate: this.dateRange[0] || undefined,
114
+        endDate: this.dateRange[1] || undefined,
115
+        hosId: this.getHosId,
116
+        groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
117
+        userId: this.fieldConfig.fields.userId || undefined,
118
+        buildingId: this.fieldConfig.fields.buildingId || undefined,
119
+        deptId: this.fieldConfig.fields.deptId || undefined,
120
+      };
121
+      if (field && sort) {
122
+        postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
123
+      }
124
+      this.loading1 = true;
125
+      this.mainService
126
+        .postCustom("itsm/report", "dateTransOrder", postData)
127
+        .subscribe((result) => {
128
+          this.loading1 = false;
129
+          this.listOfData = result.dataList.filter((v, i) => { return i != result.dataList.length - 1 });
130
+          this.listOfDataEnd = result.dataList.filter((v, i) => { return i == result.dataList.length - 1 });
131
+          this.listLength = result.totalCount;
132
+        });
133
+    });
140 134
   }
141 135
 
142 136
   // 列表排序
@@ -179,21 +173,17 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
179 173
     let postData:any = {
180 174
       startDate: this.dateRange[0] || undefined,
181 175
       endDate: this.dateRange[1] || undefined,
182
-      hosId: this.hosId || undefined,
183
-      dutyId: this.dutyId || undefined,
184
-      parentDutyId: this.parentDutyId || undefined,
185
-      repairDeptId: this.repairDeptId || undefined,
176
+      hosId: this.getHosId,
186 177
       groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
187 178
       userId: this.fieldConfig.fields.userId || undefined,
188
-      categoryId: this.fieldConfig.fields.categoryId || undefined,
189
-      sourceId: this.fieldConfig.fields.sourceId || undefined,
190
-      hierarchy: this.fieldConfig.fields.hierarchy || undefined,
179
+      buildingId: this.fieldConfig.fields.buildingId || undefined,
180
+      deptId: this.fieldConfig.fields.deptId || undefined,
191 181
     };
192 182
     if (this.sortCurrentKey && this.sortCurrentValue) {
193 183
       postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
194 184
     }
195 185
     this.mainService
196
-      .postExportCustom("itsm/export", "incidentWorkOrder", postData)
186
+      .postExportCustom("itsm/exportMergeTitle", "dateTransOrder", postData)
197 187
       .subscribe((data) => {
198 188
         this.message.remove(this.excelExportLoading);
199 189
         this.excelExportLoading = false;
@@ -221,52 +211,17 @@ export class DateBusinessStatisticsComponent implements OnInit, AfterViewInit {
221 211
 		this.sortCurrentValue = "";
222 212
 		this.sortCurrent = {};
223 213
     this.dateRange = [format(startOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss'), format(endOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss')]
224
-    this.repairDeptId = undefined;
225
-    this.fieldConfig.fields = {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined};
214
+    this.fieldConfig.fields = {groupId: undefined, userId: undefined, buildingId: undefined, deptId: undefined};
226 215
     this.search();
227 216
   }
228 217
 
229
-  // 科室搜索
230
-  changeRepairDeptInp(e) {
231
-    this.searchTimer(this.getRepairDeptList, e);
232
-  }
233
-
234 218
   // 防抖
235 219
   isLoading = false;
236
-  searchTimer(fun, e) {
237
-    this.isLoading = true;
238
-    this.searchTimerSubject.next([fun, e]);
239
-  }
240
-
241
-  openChangeRepairDept(flag){
242
-    flag && this.getRepairDeptList();
243
-  }
244
-
245
-  // 获取报修科室列表
246
-  repairDeptList:any[] = [];
247
-  getRepairDeptList(keyword?) {
248
-    let data = {
249
-      department: {
250
-        statisticalHosId: this.getHosId,
251
-        dept: keyword,
252
-        searchType: 1,
253
-      },
254
-      idx: 0,
255
-      sum: 20,
256
-    };
257
-    this.isLoading = true;
258
-    this.mainService
259
-      .getFetchDataList("data", "department", data)
260
-      .subscribe((data) => {
261
-        this.isLoading = false;
262
-        this.repairDeptList = data.list;
263
-      });
264
-  }
265 220
 
266 221
   // 详细搜索
267 222
   fieldConfig:any = {
268
-    fields: {groupId: undefined, userId: undefined, categoryId: undefined, sourceId: undefined, hierarchy: undefined},
269
-    config: {groupAndUser: true, category123: true, source: true},
223
+    fields: {groupId: undefined, userId: undefined, buildingId: undefined, deptId: undefined},
224
+    config: {groupAndUser: true, building: true, dept: true},
270 225
   }
271 226
   showSearchMore:boolean = false;
272 227
   showMore(){

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

@@ -5,7 +5,7 @@ import { CommonModule } from '@angular/common';
5 5
 import { DateBusinessStatisticsRoutingModule } from './date-business-statistics-routing.module';
6 6
 import { ShareModule } from 'src/app/share/share.module';
7 7
 import { VirtualScrollerModule } from 'ngx-virtual-scroller';
8
-import { SearchMoreModule } from '../../components/search-more/search-more.module';
8
+import { DistributionSearchMoreModule } from '../../components/distribution-search-more/distribution-search-more.module';
9 9
 
10 10
 
11 11
 @NgModule({
@@ -17,7 +17,7 @@ import { SearchMoreModule } from '../../components/search-more/search-more.modul
17 17
     DateBusinessStatisticsRoutingModule,
18 18
     ShareModule,
19 19
     VirtualScrollerModule,
20
-    SearchMoreModule,
20
+    DistributionSearchMoreModule,
21 21
   ]
22 22
 })
23 23
 export class DateBusinessStatisticsModule { }

+ 14 - 0
src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics-routing.module.ts

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

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

@@ -0,0 +1,83 @@
1
+<div class="searchDataWrap">
2
+  <div class="searchData">
3
+    <div class="searchDataItem">
4
+      <span class="label">建单时间</span>:
5
+      <nz-range-picker [(ngModel)]="dateRange" [nzAllowClear]="false" (ngModelChange)="changeDate($event)" (nzOnCalendarChange)="onCalendarChangeDate($event)">
6
+      </nz-range-picker>
7
+    </div>
8
+    <div class="searchDataItem">
9
+      <span class="label">统计分类</span>:
10
+      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzAllowClear nzPlaceHolder="请选择统计分类" [(ngModel)]="statisticsTypeId" (nzOpenChange)="openChangeStatisticsType($event)">
11
+        <ng-container *ngFor="let option of statisticsTypeList">
12
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
13
+        </ng-container>
14
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
15
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
16
+        </nz-option>
17
+      </nz-select>
18
+    </div>
19
+  </div>
20
+  <div class="operation">
21
+    <i class="icon_transport transport-gengduo" (click)="showMore()"></i>
22
+    <button nz-button class="btn default" (click)="search()">查询</button>
23
+    <button nz-button class="btn default ml8" (click)="reset()">重置</button>
24
+    <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
25
+  </div>
26
+</div>
27
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.taskTypeDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.deptDTO">
28
+  <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
29
+  <span>{{fieldConfig.fields.userDTO?.name}}</span>
30
+  <span>{{fieldConfig.fields.taskTypeDTO?.taskName}}</span>
31
+  <span>{{fieldConfig.fields.buildingDTO?.buildingName}}</span>
32
+  <span>{{fieldConfig.fields.deptDTO?.dept}}</span>
33
+</div>
34
+<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
35
+  <thead (nzSortChange)="sort($event)" nzSingleSort>
36
+    <tr>
37
+      <th nzWidth="12%" nzShowSort nzSortKey="date" [(nzSort)]="sortCurrent.date">日期</th>
38
+      <th nzWidth="11%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
39
+      <th nzWidth="11%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
40
+      <th nzWidth="11%" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
41
+      <th nzWidth="11%" nzShowSort nzSortKey="arrive_time_num" [(nzSort)]="sortCurrent.arrive_time_num">平均送达时间</th>
42
+      <th nzWidth="11%" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时完成达标率</th>
43
+      <th nzWidth="11%" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
44
+      <th nzWidth="11%" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
45
+      <th nzWidth="11%" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
46
+    </tr>
47
+  </thead>
48
+  <tbody>
49
+    <tr *ngFor="let data of listOfData">
50
+      <td>{{ data.date }}</td>
51
+      <td>{{ data.totalCount }}</td>
52
+      <td>{{ data.totalGrade }}</td>
53
+      <td>{{ data.response_time_num }}</td>
54
+      <td>{{ data.arrive_time_num }}</td>
55
+      <td>{{ data.aveper }}</td>
56
+      <td>{{ data.total_time }}</td>
57
+      <td>{{ data.five_count }}</td>
58
+      <td>{{ data.special_close }}</td>
59
+    </tr>
60
+  </tbody>
61
+  <ng-template #footerTpl>
62
+    <table class="footTable">
63
+      <tr *ngFor="let data of listOfDataEnd">
64
+        <td style="width: 12%">{{ data.date }}</td>
65
+        <td style="width: 11%">{{ data.totalCount }}</td>
66
+        <td style="width: 11%">{{ data.totalGrade }}</td>
67
+        <td style="width: 11%">{{ data.response_time_num }}</td>
68
+        <td style="width: 11%">{{ data.arrive_time_num }}</td>
69
+        <td style="width: 11%">{{ data.aveper }}</td>
70
+        <td style="width: 11%">{{ data.total_time }}</td>
71
+        <td style="width: 11%">{{ data.five_count }}</td>
72
+        <td style="width: 11%">{{ data.special_close }}</td>
73
+      </tr>
74
+    </table>
75
+  </ng-template>
76
+</nz-table>
77
+<div class="pagination">
78
+  <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
79
+  <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" nzShowSizeChanger [nzPageSizeOptions]="[30,50,100,200]" [nzShowTotal]="totalTemplate"></nz-pagination>
80
+</div>
81
+
82
+<!-- 详细搜索 -->
83
+<app-distribution-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-distribution-search-more>

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

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

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

@@ -0,0 +1,257 @@
1
+import { TabService } from './../../services/tab.service';
2
+import { NzMessageService } from 'ng-zorro-antd/message';
3
+import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
4
+import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
5
+import { MainService } from 'src/app/services/main.service';
6
+import { ActivatedRoute } from '@angular/router';
7
+@Component({
8
+  selector: "app-date-quality-control-statistics",
9
+  templateUrl: "./date-quality-control-statistics.component.html",
10
+  styleUrls: ["./date-quality-control-statistics.component.less"],
11
+})
12
+export class DateQualityControlStatisticsComponent implements OnInit, AfterViewInit {
13
+  constructor(
14
+    private mainService: MainService,
15
+    private message: NzMessageService,
16
+    private route: ActivatedRoute,
17
+    private tabService: TabService,
18
+  ) {}
19
+
20
+  listOfData: any[] = []; //表格数据
21
+  listOfDataEnd: any[] = []; //表格合计
22
+  pageIndex: number = 1; //表格当前页码
23
+  pageSize: number = 30; //表格每页展示条数
24
+  listLength: number = 0; //表格总数据量
25
+
26
+  statisticsTypeId;//科室类型id
27
+
28
+  ngOnInit() {
29
+    this.initSessionData();
30
+    this.getQueryParams();
31
+    this.search();
32
+  }
33
+
34
+  ngAfterViewInit(){
35
+    this.onResize();
36
+  }
37
+
38
+  tableHeight:number = 0;
39
+  @HostListener('window:resize')
40
+  onResize(): void {
41
+    setTimeout(() => {
42
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
43
+
44
+    }, 0)
45
+  }
46
+
47
+  getQueryParams(){
48
+    let queryParams = this.tabService.getQueryParams();
49
+    this.tabService.clearQueryParams();
50
+    if(queryParams.dateRange){
51
+      this.dateRange = queryParams.dateRange;
52
+    }
53
+  }
54
+
55
+  get getMoreFilter(){
56
+    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.taskTypeDTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.deptDTO;
57
+    return flag ? 37 : 0;
58
+  }
59
+
60
+  // 初始化缓存数据
61
+  queryType:any;
62
+  hosId:any;
63
+  dutyId:any;
64
+  parentDutyId:any;
65
+  initSessionData(){
66
+    let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
67
+    let queryType:any = newStatistics.queryType;
68
+    let hosId:any = newStatistics.hospitalId;
69
+    let dutyId:any = newStatistics.dutyId;
70
+
71
+    queryType = queryType ? +queryType : undefined;
72
+    hosId = hosId ? +hosId : undefined;
73
+    dutyId = dutyId ? +dutyId : undefined;
74
+
75
+    this.queryType = queryType;
76
+    if(queryType == 1){
77
+      this.hosId = undefined;
78
+      this.dutyId = undefined;
79
+      this.parentDutyId = undefined;
80
+    }else if(queryType == 2){
81
+      this.hosId = hosId;
82
+      this.dutyId = undefined;
83
+      this.parentDutyId = undefined;
84
+    }else if(queryType == 3){
85
+      this.hosId = undefined;
86
+      this.dutyId = dutyId;
87
+      this.parentDutyId = undefined;
88
+    }else if(queryType == 4){
89
+      this.hosId = undefined;
90
+      this.dutyId = undefined;
91
+      this.parentDutyId = dutyId;
92
+    }
93
+  }
94
+
95
+  get getHosId(){
96
+    return this.parentDutyId || this.dutyId || this.hosId;
97
+  }
98
+
99
+  // 表格数据
100
+  loading1 = false;
101
+  getList(num?: number, field?: string, sort?: string) {
102
+    if (num !== undefined) {
103
+      this.pageIndex = num;
104
+    }
105
+    let postData:any = {
106
+      idx: this.pageIndex - 1,
107
+      sum: this.pageSize,
108
+      startDate: this.dateRange[0] || undefined,
109
+      endDate: this.dateRange[1] || undefined,
110
+      hosId: this.hosId || undefined,
111
+      statisticsTypeId: this.statisticsTypeId || undefined,
112
+      groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
113
+      userId: this.fieldConfig.fields.userId || undefined,
114
+      taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
115
+      buildingId: this.fieldConfig.fields.buildingId || undefined,
116
+      deptId: this.fieldConfig.fields.deptId || undefined,
117
+    };
118
+    if (field && sort) {
119
+      postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
120
+    }
121
+    this.loading1 = true;
122
+    this.mainService
123
+      .postCustom("itsm/report", "dateTransOrderQc", postData)
124
+      .subscribe((result) => {
125
+        this.loading1 = false;
126
+        this.listOfData = result.dataList.filter((v, i) => { return i != result.dataList.length - 1 });
127
+        this.listOfDataEnd = result.dataList.filter((v, i) => { return i == result.dataList.length - 1 });
128
+        this.listLength = result.totalCount;
129
+      });
130
+  }
131
+
132
+  // 列表排序
133
+  sortCurrent:any = {};
134
+  sortCurrentKey: string = "";
135
+  sortCurrentValue: string | null = "";
136
+  sort(e) {
137
+    const { key, value } = e;
138
+    this.sortCurrentKey = key;
139
+    this.sortCurrentValue = value;
140
+    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
141
+  }
142
+
143
+  // 搜索
144
+  search() {
145
+    this.getList(1, this.sortCurrentKey, this.sortCurrentValue);
146
+  }
147
+
148
+  // 日期选择
149
+  dateRange: any = [format(startOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss'), format(endOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss')];
150
+  changeDate(result?): void {
151
+    result[0] = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
152
+    result[1] = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
153
+    this.dateRange = result;
154
+  }
155
+
156
+  onCalendarChangeDate(dateArr){
157
+    console.log(dateArr)
158
+    if(dateArr.length == 2){
159
+      this.dateRange = [format(startOfDay(dateArr[0]), 'yyyy-MM-dd HH:mm:ss'), format(endOfDay(dateArr[1]), 'yyyy-MM-dd HH:mm:ss')];
160
+    }
161
+  }
162
+
163
+  // 导出
164
+  excelExportLoading:any = false;
165
+  excelExport(){
166
+    this.excelExportLoading = this.message.loading("导出中..", {
167
+      nzDuration: 0,
168
+    }).messageId;
169
+    let postData:any = {
170
+      startDate: this.dateRange[0] || undefined,
171
+      endDate: this.dateRange[1] || undefined,
172
+      hosId: this.hosId || undefined,
173
+      statisticsTypeId: this.statisticsTypeId || undefined,
174
+      groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
175
+      userId: this.fieldConfig.fields.userId || undefined,
176
+      taskTypeId: this.fieldConfig.fields.taskTypeId || undefined,
177
+      buildingId: this.fieldConfig.fields.buildingId || undefined,
178
+      deptId: this.fieldConfig.fields.deptId || undefined,
179
+    };
180
+    if (this.sortCurrentKey && this.sortCurrentValue) {
181
+      postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
182
+    }
183
+    this.mainService
184
+      .postExportCustom("itsm/exportMergeTitle", "dateTransOrderQc", postData)
185
+      .subscribe((data) => {
186
+        this.message.remove(this.excelExportLoading);
187
+        this.excelExportLoading = false;
188
+        this.message.success('导出成功');
189
+        var file = new Blob([data], {
190
+          type: "application/vnd.ms-excel",
191
+        });
192
+        //trick to download store a file having its URL
193
+        var fileURL = URL.createObjectURL(file);
194
+        var a = document.createElement("a");
195
+        a.href = fileURL;
196
+        a.target = "_blank";
197
+        a.download = `${this.route.parent.routeConfig.data.title}.xls`;
198
+        document.body.appendChild(a);
199
+        a.click();
200
+      },(err) => {
201
+        this.message.remove(this.excelExportLoading);
202
+        this.excelExportLoading = false;
203
+        this.message.error('导出失败');
204
+      });
205
+  }
206
+  // 重置
207
+  reset(){
208
+    this.sortCurrentKey = "";
209
+		this.sortCurrentValue = "";
210
+		this.sortCurrent = {};
211
+    this.dateRange = [format(startOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss'), format(endOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss')]
212
+    this.statisticsTypeId = undefined;
213
+    this.fieldConfig.fields = {groupId: undefined, userId: undefined, taskTypeId: undefined, buildingId: undefined, deptId: undefined};
214
+    this.search();
215
+  }
216
+
217
+  // 防抖
218
+  isLoading = false;
219
+
220
+  openChangeStatisticsType(flag){
221
+    flag && this.getStatisticsTypeList();
222
+  }
223
+
224
+  // 获取统计分类列表
225
+  statisticsTypeList:any[] = [];
226
+  getStatisticsTypeList(keyword?) {
227
+    this.isLoading = true;
228
+    this.mainService
229
+      .getDictionary("list", "statistics_date_type")
230
+      .subscribe((data) => {
231
+        this.isLoading = false;
232
+        this.statisticsTypeList = data;
233
+      });
234
+  }
235
+
236
+  // 详细搜索
237
+  fieldConfig:any = {
238
+    fields: {groupId: undefined, userId: undefined, taskTypeId: undefined, buildingId: undefined, deptId: undefined},
239
+    config: {groupAndUser: true, taskType: true, building: true, dept: true},
240
+  }
241
+  showSearchMore:boolean = false;
242
+  showMore(){
243
+    this.showSearchMore = true;
244
+  }
245
+
246
+  cancelEvent(){
247
+    this.showSearchMore = false;
248
+  }
249
+
250
+  submitEvent(fields){
251
+    this.showSearchMore = false;
252
+    this.fieldConfig.fields = fields;
253
+    console.log('this.fieldConfig.fields:', this.fieldConfig.fields)
254
+    this.search();
255
+    this.onResize();
256
+  }
257
+}

+ 21 - 0
src/app/views/new-statistics/distribution-inspection-statistics/date-quality-control-statistics/date-quality-control-statistics.module.ts

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

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

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

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

@@ -0,0 +1,79 @@
1
+<div class="searchDataWrap">
2
+  <div class="searchData">
3
+    <div class="searchDataItem">
4
+      <span class="label">建单时间</span>:
5
+      <nz-range-picker [(ngModel)]="dateRange" [nzAllowClear]="false" (ngModelChange)="changeDate($event)" (nzOnCalendarChange)="onCalendarChangeDate($event)">
6
+      </nz-range-picker>
7
+    </div>
8
+    <div class="searchDataItem">
9
+      <span class="label">楼栋</span>:
10
+      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeBuildingInp($event)" nzAllowClear nzPlaceHolder="请选择楼栋" [(ngModel)]="buildingId" (nzOpenChange)="openChangeBuilding($event)">
11
+        <ng-container *ngFor="let option of buildingList">
12
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName + '-' + option.buildingName" [nzValue]="option.id"></nz-option>
13
+        </ng-container>
14
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
15
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
16
+        </nz-option>
17
+      </nz-select>
18
+    </div>
19
+  </div>
20
+  <div class="operation">
21
+    <i class="icon_transport transport-gengduo" (click)="showMore()"></i>
22
+    <button nz-button class="btn default" (click)="search()">查询</button>
23
+    <button nz-button class="btn default ml8" (click)="reset()">重置</button>
24
+    <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
25
+  </div>
26
+</div>
27
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO">
28
+  <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
29
+  <span>{{fieldConfig.fields.userDTO?.name}}</span>
30
+</div>
31
+<div class="tableWrap">
32
+  <nz-table class="table" [ngStyle]="{ width: widthConfig.length * 100 + 50 * 1 + 20 + 'px' }" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl" [nzWidthConfig]="widthConfig" nzBordered>
33
+    <thead (nzSortChange)="sort($event)" nzSingleSort>
34
+      <tr>
35
+        <th rowspan="2">科室(编码)</th>
36
+        <th rowspan="2" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
37
+        <th rowspan="2" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">积分总和</th>
38
+        <th colspan="2" *ngFor="let dictionary of dictionaryList">{{dictionary.name}}</th>
39
+      </tr>
40
+      <tr>
41
+        <ng-container *ngFor="let dictionary of dictionaryList">
42
+          <th nzShowSort [nzSortKey]="dictionary.value + 'Count'" [(nzSort)]="sortCurrent[dictionary.value + 'Count']">工单量</th>
43
+          <th nzShowSort [nzSortKey]="dictionary.value + 'Grade'" [(nzSort)]="sortCurrent[dictionary.value + 'Grade']">积分数</th>
44
+        </ng-container>
45
+      </tr>
46
+    </thead>
47
+    <tbody>
48
+      <tr *ngFor="let data of listOfData">
49
+        <td class="width150">{{ data.name }}<ng-container *ngIf="data.code">({{ data.code }})</ng-container></td>
50
+        <td>{{ data.totalCount }}</td>
51
+        <td>{{ data.totalGrade }}</td>
52
+        <ng-container *ngFor="let dictionary of dictionaryList">
53
+          <td>{{ data[dictionary.value + 'Count'] }}</td>
54
+          <td>{{ data[dictionary.value + 'Grade'] }}</td>
55
+        </ng-container>
56
+      </tr>
57
+    </tbody>
58
+    <ng-template #footerTpl>
59
+      <table class="footTable">
60
+        <tr *ngFor="let data of listOfDataEnd">
61
+          <td class="width150">{{ data.code }}</td>
62
+          <td>{{ data.totalCount }}</td>
63
+          <td>{{ data.totalGrade }}</td>
64
+          <ng-container *ngFor="let dictionary of dictionaryList">
65
+            <td>{{ data[dictionary.value + 'Count'] }}</td>
66
+            <td>{{ data[dictionary.value + 'Grade'] }}</td>
67
+          </ng-container>
68
+        </tr>
69
+      </table>
70
+    </ng-template>
71
+  </nz-table>
72
+</div>
73
+<div class="pagination">
74
+  <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
75
+  <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" nzShowSizeChanger [nzPageSizeOptions]="[30,50,100,200]" [nzShowTotal]="totalTemplate"></nz-pagination>
76
+</div>
77
+
78
+<!-- 详细搜索 -->
79
+<app-distribution-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-distribution-search-more>

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

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

+ 285 - 0
src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.component.ts

@@ -0,0 +1,285 @@
1
+import { TabService } from './../../services/tab.service';
2
+import { debounceTime } from 'rxjs/operators';
3
+import { Subject } from 'rxjs';
4
+import { NzMessageService } from 'ng-zorro-antd/message';
5
+import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
6
+import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
7
+import { MainService } from 'src/app/services/main.service';
8
+import { ActivatedRoute } from '@angular/router';
9
+@Component({
10
+  selector: "app-department-business-statistics",
11
+  templateUrl: "./department-business-statistics.component.html",
12
+  styleUrls: ["./department-business-statistics.component.less"],
13
+})
14
+export class DepartmentBusinessStatisticsComponent implements OnInit, AfterViewInit {
15
+  constructor(
16
+    private mainService: MainService,
17
+    private message: NzMessageService,
18
+    private route: ActivatedRoute,
19
+    private tabService: TabService,
20
+  ) {}
21
+
22
+  listOfData: any[] = []; //表格数据
23
+  listOfDataEnd: any[] = []; //表格合计
24
+  pageIndex: number = 1; //表格当前页码
25
+  pageSize: number = 30; //表格每页展示条数
26
+  listLength: number = 0; //表格总数据量
27
+  widthConfig: any[] = [];
28
+
29
+  buildingId;//楼栋id
30
+
31
+  searchTimerSubject = new Subject();
32
+
33
+  ngOnInit() {
34
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
35
+      let fun = v[0];
36
+      fun.call(this, v[1]);
37
+    });
38
+    this.initSessionData();
39
+    this.getQueryParams();
40
+    this.search();
41
+  }
42
+
43
+  ngAfterViewInit(){
44
+    this.onResize();
45
+  }
46
+
47
+  tableHeight:number = 0;
48
+  @HostListener('window:resize')
49
+  onResize(): void {
50
+    setTimeout(() => {
51
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter - 2;
52
+
53
+    }, 0)
54
+  }
55
+
56
+  getQueryParams(){
57
+    let queryParams = this.tabService.getQueryParams();
58
+    this.tabService.clearQueryParams();
59
+    if(queryParams.dateRange){
60
+      this.dateRange = queryParams.dateRange;
61
+    }
62
+  }
63
+
64
+  get getMoreFilter(){
65
+    let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO;
66
+    return flag ? 37 : 0;
67
+  }
68
+
69
+  // 初始化缓存数据
70
+  queryType:any;
71
+  hosId:any;
72
+  dutyId:any;
73
+  parentDutyId:any;
74
+  initSessionData(){
75
+    let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
76
+    let queryType:any = newStatistics.queryType;
77
+    let hosId:any = newStatistics.hospitalId;
78
+    let dutyId:any = newStatistics.dutyId;
79
+
80
+    queryType = queryType ? +queryType : undefined;
81
+    hosId = hosId ? +hosId : undefined;
82
+    dutyId = dutyId ? +dutyId : undefined;
83
+
84
+    this.queryType = queryType;
85
+    if(queryType == 1){
86
+      this.hosId = undefined;
87
+      this.dutyId = undefined;
88
+      this.parentDutyId = undefined;
89
+    }else if(queryType == 2){
90
+      this.hosId = hosId;
91
+      this.dutyId = undefined;
92
+      this.parentDutyId = undefined;
93
+    }else if(queryType == 3){
94
+      this.hosId = undefined;
95
+      this.dutyId = dutyId;
96
+      this.parentDutyId = undefined;
97
+    }else if(queryType == 4){
98
+      this.hosId = undefined;
99
+      this.dutyId = undefined;
100
+      this.parentDutyId = dutyId;
101
+    }
102
+  }
103
+
104
+  get getHosId(){
105
+    return this.parentDutyId || this.dutyId || this.hosId;
106
+  }
107
+
108
+  // 表格数据
109
+  loading1 = false;
110
+  dictionaryList: any[] = [];
111
+  getList(num?: number, field?: string, sort?: string) {
112
+    this.mainService.getDictionary('list', 'statistics_date_type').subscribe((data) => {
113
+      let dictionaryList = data || [];
114
+      dictionaryList.push({id: 0, name: '其他', value: 'dateOther'});
115
+      this.dictionaryList = dictionaryList;
116
+      this.widthConfig = new Array(this.dictionaryList.length * 2 + 3).fill('100px').map((v, i) => { return i == 0 ? '150px' : '100px' });;
117
+      if (num !== undefined) {
118
+        this.pageIndex = num;
119
+      }
120
+      let postData:any = {
121
+        idx: this.pageIndex - 1,
122
+        sum: this.pageSize,
123
+        startDate: this.dateRange[0] || undefined,
124
+        endDate: this.dateRange[1] || undefined,
125
+        hosId: this.getHosId,
126
+        groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
127
+        userId: this.fieldConfig.fields.userId || undefined,
128
+        buildingId: this.buildingId || undefined,
129
+      };
130
+      if (field && sort) {
131
+        postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
132
+      }
133
+      this.loading1 = true;
134
+      this.mainService
135
+        .postCustom("itsm/report", "deptTransOrder", postData)
136
+        .subscribe((result) => {
137
+          this.loading1 = false;
138
+          this.listOfData = result.dataList.filter((v, i) => { return i != result.dataList.length - 1 });
139
+          this.listOfDataEnd = result.dataList.filter((v, i) => { return i == result.dataList.length - 1 });
140
+          this.listLength = result.totalCount;
141
+        });
142
+    });
143
+  }
144
+
145
+  // 列表排序
146
+  sortCurrent:any = {};
147
+  sortCurrentKey: string = "";
148
+  sortCurrentValue: string | null = "";
149
+  sort(e) {
150
+    const { key, value } = e;
151
+    this.sortCurrentKey = key;
152
+    this.sortCurrentValue = value;
153
+    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
154
+  }
155
+
156
+  // 搜索
157
+  search() {
158
+    this.getList(1, this.sortCurrentKey, this.sortCurrentValue);
159
+  }
160
+
161
+  // 日期选择
162
+  dateRange: any = [format(startOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss'), format(endOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss')];
163
+  changeDate(result?): void {
164
+    result[0] = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
165
+    result[1] = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
166
+    this.dateRange = result;
167
+  }
168
+
169
+  onCalendarChangeDate(dateArr){
170
+    console.log(dateArr)
171
+    if(dateArr.length == 2){
172
+      this.dateRange = [format(startOfDay(dateArr[0]), 'yyyy-MM-dd HH:mm:ss'), format(endOfDay(dateArr[1]), 'yyyy-MM-dd HH:mm:ss')];
173
+    }
174
+  }
175
+
176
+  // 导出
177
+  excelExportLoading:any = false;
178
+  excelExport(){
179
+    this.excelExportLoading = this.message.loading("导出中..", {
180
+      nzDuration: 0,
181
+    }).messageId;
182
+    let postData:any = {
183
+      startDate: this.dateRange[0] || undefined,
184
+      endDate: this.dateRange[1] || undefined,
185
+      hosId: this.getHosId,
186
+      groupId: this.fieldConfig.fields.userId ? undefined : (this.fieldConfig.fields.groupId || undefined),
187
+      userId: this.fieldConfig.fields.userId || undefined,
188
+      buildingId: this.buildingId || undefined,
189
+    };
190
+    if (this.sortCurrentKey && this.sortCurrentValue) {
191
+      postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
192
+    }
193
+    this.mainService
194
+      .postExportCustom("itsm/exportMergeTitle", "deptTransOrder", postData)
195
+      .subscribe((data) => {
196
+        this.message.remove(this.excelExportLoading);
197
+        this.excelExportLoading = false;
198
+        this.message.success('导出成功');
199
+        var file = new Blob([data], {
200
+          type: "application/vnd.ms-excel",
201
+        });
202
+        //trick to download store a file having its URL
203
+        var fileURL = URL.createObjectURL(file);
204
+        var a = document.createElement("a");
205
+        a.href = fileURL;
206
+        a.target = "_blank";
207
+        a.download = `${this.route.parent.routeConfig.data.title}.xls`;
208
+        document.body.appendChild(a);
209
+        a.click();
210
+      },(err) => {
211
+        this.message.remove(this.excelExportLoading);
212
+        this.excelExportLoading = false;
213
+        this.message.error('导出失败');
214
+      });
215
+  }
216
+  // 重置
217
+  reset(){
218
+    this.sortCurrentKey = "";
219
+		this.sortCurrentValue = "";
220
+		this.sortCurrent = {};
221
+    this.dateRange = [format(startOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss'), format(endOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss')]
222
+    this.buildingId = undefined;
223
+    this.fieldConfig.fields = {groupId: undefined, userId: undefined};
224
+    this.search();
225
+  }
226
+
227
+  // 楼栋搜索
228
+  changeBuildingInp(e) {
229
+    this.searchTimer(this.getBuildingList, e);
230
+  }
231
+
232
+  // 防抖
233
+  isLoading = false;
234
+  searchTimer(fun, e) {
235
+    this.isLoading = true;
236
+    this.searchTimerSubject.next([fun, e]);
237
+  }
238
+
239
+  openChangeBuilding(flag){
240
+    flag && this.getBuildingList();
241
+  }
242
+
243
+  // 获取报修科室列表
244
+  buildingList:any[] = [];
245
+  getBuildingList(keyword?) {
246
+    let data = {
247
+      building: {
248
+        simpleQuery: true,
249
+        buildingName: keyword,
250
+        statisticalHosId:this.getHosId,
251
+      },
252
+      idx: 0,
253
+      sum: 20,
254
+    };
255
+    this.isLoading = true;
256
+    this.mainService
257
+      .getFetchDataList("data", "building", data)
258
+      .subscribe((data) => {
259
+        this.isLoading = false;
260
+        this.buildingList = data.list;
261
+      });
262
+  }
263
+
264
+  // 详细搜索
265
+  fieldConfig:any = {
266
+    fields: {groupId: undefined, userId: undefined},
267
+    config: {groupAndUser: true},
268
+  }
269
+  showSearchMore:boolean = false;
270
+  showMore(){
271
+    this.showSearchMore = true;
272
+  }
273
+
274
+  cancelEvent(){
275
+    this.showSearchMore = false;
276
+  }
277
+
278
+  submitEvent(fields){
279
+    this.showSearchMore = false;
280
+    this.fieldConfig.fields = fields;
281
+    console.log('this.fieldConfig.fields:', this.fieldConfig.fields)
282
+    this.search();
283
+    this.onResize();
284
+  }
285
+}

+ 23 - 0
src/app/views/new-statistics/distribution-inspection-statistics/department-business-statistics/department-business-statistics.module.ts

@@ -0,0 +1,23 @@
1
+import { DepartmentBusinessStatisticsComponent } from './department-business-statistics.component';
2
+import { NgModule } from '@angular/core';
3
+import { CommonModule } from '@angular/common';
4
+
5
+import { DepartmentBusinessStatisticsRoutingModule } from './department-business-statistics-routing.module';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+import { VirtualScrollerModule } from 'ngx-virtual-scroller';
8
+import { DistributionSearchMoreModule } from '../../components/distribution-search-more/distribution-search-more.module';
9
+
10
+
11
+@NgModule({
12
+  declarations: [
13
+    DepartmentBusinessStatisticsComponent,
14
+  ],
15
+  imports: [
16
+    CommonModule,
17
+    DepartmentBusinessStatisticsRoutingModule,
18
+    ShareModule,
19
+    VirtualScrollerModule,
20
+    DistributionSearchMoreModule,
21
+  ]
22
+})
23
+export class DepartmentBusinessStatisticsModule { }

+ 14 - 0
src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics-routing.module.ts

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

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

@@ -0,0 +1,82 @@
1
+<div class="searchDataWrap">
2
+  <div class="searchData">
3
+    <div class="searchDataItem">
4
+      <span class="label">建单时间</span>:
5
+      <nz-range-picker [(ngModel)]="dateRange" [nzAllowClear]="false" (ngModelChange)="changeDate($event)" (nzOnCalendarChange)="onCalendarChangeDate($event)">
6
+      </nz-range-picker>
7
+    </div>
8
+    <div class="searchDataItem">
9
+      <span class="label">楼栋</span>:
10
+      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeBuildingInp($event)" nzAllowClear nzPlaceHolder="请选择楼栋" [(ngModel)]="buildingId" (nzOpenChange)="openChangeBuilding($event)">
11
+        <ng-container *ngFor="let option of buildingList">
12
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName + '-' + option.buildingName" [nzValue]="option.id"></nz-option>
13
+        </ng-container>
14
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
15
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
16
+        </nz-option>
17
+      </nz-select>
18
+    </div>
19
+  </div>
20
+  <div class="operation">
21
+    <i class="icon_transport transport-gengduo" (click)="showMore()"></i>
22
+    <button nz-button class="btn default" (click)="search()">查询</button>
23
+    <button nz-button class="btn default ml8" (click)="reset()">重置</button>
24
+    <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
25
+  </div>
26
+</div>
27
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.taskTypeDTO || fieldConfig.fields.statisticsTypeDTO">
28
+  <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
29
+  <span>{{fieldConfig.fields.userDTO?.name}}</span>
30
+  <span>{{fieldConfig.fields.statisticsTypeDTO?.name}}</span>
31
+  <span>{{fieldConfig.fields.taskTypeDTO?.taskName}}</span>
32
+</div>
33
+<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
34
+  <thead (nzSortChange)="sort($event)" nzSingleSort>
35
+    <tr>
36
+      <th nzWidth="12%">科室(编码)</th>
37
+      <th nzWidth="11%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
38
+      <th nzWidth="11%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
39
+      <th nzWidth="11%" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
40
+      <th nzWidth="11%" nzShowSort nzSortKey="arrive_time_num" [(nzSort)]="sortCurrent.arrive_time_num">平均送达时间</th>
41
+      <th nzWidth="11%" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时完成达标率</th>
42
+      <th nzWidth="11%" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
43
+      <th nzWidth="11%" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
44
+      <th nzWidth="11%" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
45
+    </tr>
46
+  </thead>
47
+  <tbody>
48
+    <tr *ngFor="let data of listOfData">
49
+      <td>{{ data.name }}<ng-container *ngIf="data.code">({{ data.code }})</ng-container></td>
50
+      <td>{{ data.totalCount }}</td>
51
+      <td>{{ data.totalGrade }}</td>
52
+      <td>{{ data.response_time_num }}</td>
53
+      <td>{{ data.arrive_time_num }}</td>
54
+      <td>{{ data.aveper }}</td>
55
+      <td>{{ data.total_time }}</td>
56
+      <td>{{ data.five_count }}</td>
57
+      <td>{{ data.special_close }}</td>
58
+    </tr>
59
+  </tbody>
60
+  <ng-template #footerTpl>
61
+    <table class="footTable">
62
+      <tr *ngFor="let data of listOfDataEnd">
63
+        <td style="width: 12%">{{ data.code }}</td>
64
+        <td style="width: 11%">{{ data.totalCount }}</td>
65
+        <td style="width: 11%">{{ data.totalGrade }}</td>
66
+        <td style="width: 11%">{{ data.response_time_num }}</td>
67
+        <td style="width: 11%">{{ data.arrive_time_num }}</td>
68
+        <td style="width: 11%">{{ data.aveper }}</td>
69
+        <td style="width: 11%">{{ data.total_time }}</td>
70
+        <td style="width: 11%">{{ data.five_count }}</td>
71
+        <td style="width: 11%">{{ data.special_close }}</td>
72
+      </tr>
73
+    </table>
74
+  </ng-template>
75
+</nz-table>
76
+<div class="pagination">
77
+  <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
78
+  <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" nzShowSizeChanger [nzPageSizeOptions]="[30,50,100,200]" [nzShowTotal]="totalTemplate"></nz-pagination>
79
+</div>
80
+
81
+<!-- 详细搜索 -->
82
+<app-distribution-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-distribution-search-more>

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

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

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

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

+ 21 - 0
src/app/views/new-statistics/distribution-inspection-statistics/department-quality-control-statistics/department-quality-control-statistics.module.ts

@@ -0,0 +1,21 @@
1
+import { DepartmentQualityControlStatisticsComponent } from './department-quality-control-statistics.component';
2
+import { NgModule } from '@angular/core';
3
+import { CommonModule } from '@angular/common';
4
+
5
+import { DepartmentQualityControlStatisticsRoutingModule } from './department-quality-control-statistics-routing.module';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+import { DistributionSearchMoreModule } from '../../components/distribution-search-more/distribution-search-more.module';
8
+
9
+
10
+@NgModule({
11
+  declarations: [
12
+    DepartmentQualityControlStatisticsComponent,
13
+  ],
14
+  imports: [
15
+    CommonModule,
16
+    DepartmentQualityControlStatisticsRoutingModule,
17
+    ShareModule,
18
+    DistributionSearchMoreModule,
19
+  ]
20
+})
21
+export class DepartmentQualityControlStatisticsModule { }

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

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

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

@@ -0,0 +1,82 @@
1
+<div class="searchDataWrap">
2
+  <div class="searchData">
3
+    <div class="searchDataItem">
4
+      <span class="label">建单时间</span>:
5
+      <nz-range-picker [(ngModel)]="dateRange" [nzAllowClear]="false" (ngModelChange)="changeDate($event)" (nzOnCalendarChange)="onCalendarChangeDate($event)">
6
+      </nz-range-picker>
7
+    </div>
8
+    <div class="searchDataItem">
9
+      <span class="label">楼栋</span>:
10
+      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeBuildingInp($event)" nzAllowClear nzPlaceHolder="请选择楼栋" [(ngModel)]="buildingId" (nzOpenChange)="openChangeBuilding($event)">
11
+        <ng-container *ngFor="let option of buildingList">
12
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName + '-' + option.buildingName" [nzValue]="option.id"></nz-option>
13
+        </ng-container>
14
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
15
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
16
+        </nz-option>
17
+      </nz-select>
18
+    </div>
19
+  </div>
20
+  <div class="operation">
21
+    <i class="icon_transport transport-gengduo" (click)="showMore()"></i>
22
+    <button nz-button class="btn default" (click)="search()">查询</button>
23
+    <button nz-button class="btn default ml8" (click)="reset()">重置</button>
24
+    <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
25
+  </div>
26
+</div>
27
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.taskTypeDTO || fieldConfig.fields.statisticsTypeDTO">
28
+  <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
29
+  <span>{{fieldConfig.fields.userDTO?.name}}</span>
30
+  <span>{{fieldConfig.fields.statisticsTypeDTO?.name}}</span>
31
+  <span>{{fieldConfig.fields.taskTypeDTO?.taskName}}</span>
32
+</div>
33
+<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
34
+  <thead (nzSortChange)="sort($event)" nzSingleSort>
35
+    <tr>
36
+      <th nzWidth="12%">科室(编码)</th>
37
+      <th nzWidth="11%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
38
+      <th nzWidth="11%" nzShowSort nzSortKey="evaCount" [(nzSort)]="sortCurrent.evaCount">评价总工单数</th>
39
+      <th nzWidth="11%" nzShowSort nzSortKey="eva1" [(nzSort)]="sortCurrent.eva1">一星评价数</th>
40
+      <th nzWidth="11%" nzShowSort nzSortKey="eva2" [(nzSort)]="sortCurrent.eva2">二星评价数</th>
41
+      <th nzWidth="11%" nzShowSort nzSortKey="eva3" [(nzSort)]="sortCurrent.eva3">三星评价数</th>
42
+      <th nzWidth="11%" nzShowSort nzSortKey="eva4" [(nzSort)]="sortCurrent.eva4">四星评价数</th>
43
+      <th nzWidth="11%" nzShowSort nzSortKey="eva5" [(nzSort)]="sortCurrent.eva5">五星评价数</th>
44
+      <th nzWidth="11%" nzShowSort nzSortKey="avgCount" [(nzSort)]="sortCurrent.avgCount">平均总星级</th>
45
+    </tr>
46
+  </thead>
47
+  <tbody>
48
+    <tr *ngFor="let data of listOfData">
49
+      <td>{{ data.name }}<ng-container *ngIf="data.code">({{ data.code }})</ng-container></td>
50
+      <td>{{ data.totalCount }}</td>
51
+      <td>{{ data.evaCount }}</td>
52
+      <td>{{ data.eva1 }}</td>
53
+      <td>{{ data.eva2 }}</td>
54
+      <td>{{ data.eva3 }}</td>
55
+      <td>{{ data.eva4 }}</td>
56
+      <td>{{ data.eva5 }}</td>
57
+      <td>{{ data.avgCount }}</td>
58
+    </tr>
59
+  </tbody>
60
+  <ng-template #footerTpl>
61
+    <table class="footTable">
62
+      <tr *ngFor="let data of listOfDataEnd">
63
+        <td style="width: 12%">{{ data.code }}</td>
64
+        <td style="width: 11%">{{ data.totalCount }}</td>
65
+        <td style="width: 11%">{{ data.evaCount }}</td>
66
+        <td style="width: 11%">{{ data.eva1 }}</td>
67
+        <td style="width: 11%">{{ data.eva2 }}</td>
68
+        <td style="width: 11%">{{ data.eva3 }}</td>
69
+        <td style="width: 11%">{{ data.eva4 }}</td>
70
+        <td style="width: 11%">{{ data.eva5 }}</td>
71
+        <td style="width: 11%">{{ data.avgCount }}</td>
72
+      </tr>
73
+    </table>
74
+  </ng-template>
75
+</nz-table>
76
+<div class="pagination">
77
+  <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
78
+  <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" nzShowSizeChanger [nzPageSizeOptions]="[30,50,100,200]" [nzShowTotal]="totalTemplate"></nz-pagination>
79
+</div>
80
+
81
+<!-- 详细搜索 -->
82
+<app-distribution-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-distribution-search-more>

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

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

+ 281 - 0
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.component.ts

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

+ 21 - 0
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.module.ts

@@ -0,0 +1,21 @@
1
+import { DistributionDepartmentEvaluateStatisticsComponent } from './distribution-department-evaluate-statistics.component';
2
+import { NgModule } from '@angular/core';
3
+import { CommonModule } from '@angular/common';
4
+
5
+import { DistributionDepartmentEvaluateStatisticsRoutingModule } from './distribution-department-evaluate-statistics-routing.module';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+import { DistributionSearchMoreModule } from '../../components/distribution-search-more/distribution-search-more.module';
8
+
9
+
10
+@NgModule({
11
+  declarations: [
12
+    DistributionDepartmentEvaluateStatisticsComponent,
13
+  ],
14
+  imports: [
15
+    CommonModule,
16
+    DistributionDepartmentEvaluateStatisticsRoutingModule,
17
+    ShareModule,
18
+    DistributionSearchMoreModule,
19
+  ]
20
+})
21
+export class DistributionDepartmentEvaluateStatisticsModule { }

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

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

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

@@ -0,0 +1,70 @@
1
+<div class="searchDataWrap">
2
+  <div class="searchData">
3
+    <div class="searchDataItem">
4
+      <span class="label">建单时间</span>:
5
+      <nz-range-picker [(ngModel)]="dateRange" [nzAllowClear]="false" (ngModelChange)="changeDate($event)" (nzOnCalendarChange)="onCalendarChangeDate($event)">
6
+      </nz-range-picker>
7
+    </div>
8
+    <div class="searchDataItem">
9
+      <span class="label">楼栋</span>:
10
+      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeBuildingInp($event)" nzAllowClear nzPlaceHolder="请选择楼栋" [(ngModel)]="buildingId" (nzOpenChange)="openChangeBuilding($event)">
11
+        <ng-container *ngFor="let option of buildingList">
12
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName + '-' + option.buildingName" [nzValue]="option.id"></nz-option>
13
+        </ng-container>
14
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
15
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
16
+        </nz-option>
17
+      </nz-select>
18
+    </div>
19
+  </div>
20
+  <div class="operation">
21
+    <i class="icon_transport transport-gengduo" (click)="showMore()"></i>
22
+    <button nz-button class="btn default" (click)="search()">查询</button>
23
+    <button nz-button class="btn default ml8" (click)="reset()">重置</button>
24
+    <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
25
+  </div>
26
+</div>
27
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.taskTypeDTO || fieldConfig.fields.statisticsTypeDTO">
28
+  <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
29
+  <span>{{fieldConfig.fields.userDTO?.name}}</span>
30
+  <span>{{fieldConfig.fields.statisticsTypeDTO?.name}}</span>
31
+  <span>{{fieldConfig.fields.taskTypeDTO?.taskName}}</span>
32
+</div>
33
+<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
34
+  <thead (nzSortChange)="sort($event)" nzSingleSort>
35
+    <tr>
36
+      <th nzWidth="20%">科室(编码)</th>
37
+      <th nzWidth="20%" nzShowSort nzSortKey="service" [(nzSort)]="sortCurrent.service">服务台建单数</th>
38
+      <th nzWidth="20%" nzShowSort nzSortKey="nurse" [(nzSort)]="sortCurrent.nurse">护士端建单数</th>
39
+      <th nzWidth="20%" nzShowSort nzSortKey="system" [(nzSort)]="sortCurrent.system">系统自动建单数</th>
40
+      <th nzWidth="20%" nzShowSort nzSortKey="wechat" [(nzSort)]="sortCurrent.wechat">微信端建单数量</th>
41
+    </tr>
42
+  </thead>
43
+  <tbody>
44
+    <tr *ngFor="let data of listOfData">
45
+      <td>{{ data.name }}<ng-container *ngIf="data.code">({{ data.code }})</ng-container></td>
46
+      <td>{{ data.service }}</td>
47
+      <td>{{ data.nurse }}</td>
48
+      <td>{{ data.system }}</td>
49
+      <td>{{ data.wechat }}</td>
50
+    </tr>
51
+  </tbody>
52
+  <ng-template #footerTpl>
53
+    <table class="footTable">
54
+      <tr *ngFor="let data of listOfDataEnd">
55
+        <td style="width: 20%">{{ data.code }}</td>
56
+        <td style="width: 20%">{{ data.service }}</td>
57
+        <td style="width: 20%">{{ data.nurse }}</td>
58
+        <td style="width: 20%">{{ data.system }}</td>
59
+        <td style="width: 20%">{{ data.wechat }}</td>
60
+      </tr>
61
+    </table>
62
+  </ng-template>
63
+</nz-table>
64
+<div class="pagination">
65
+  <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
66
+  <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" nzShowSizeChanger [nzPageSizeOptions]="[30,50,100,200]" [nzShowTotal]="totalTemplate"></nz-pagination>
67
+</div>
68
+
69
+<!-- 详细搜索 -->
70
+<app-distribution-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-distribution-search-more>

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

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

+ 281 - 0
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.component.ts

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

+ 21 - 0
src/app/views/new-statistics/distribution-inspection-statistics/distribution-department-source-statistics/distribution-department-source-statistics.module.ts

@@ -0,0 +1,21 @@
1
+import { DistributionDepartmentSourceStatisticsComponent } from './distribution-department-source-statistics.component';
2
+import { NgModule } from '@angular/core';
3
+import { CommonModule } from '@angular/common';
4
+
5
+import { DistributionDepartmentSourceStatisticsRoutingModule } from './distribution-department-source-statistics-routing.module';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+import { DistributionSearchMoreModule } from '../../components/distribution-search-more/distribution-search-more.module';
8
+
9
+
10
+@NgModule({
11
+  declarations: [
12
+    DistributionDepartmentSourceStatisticsComponent,
13
+  ],
14
+  imports: [
15
+    CommonModule,
16
+    DistributionDepartmentSourceStatisticsRoutingModule,
17
+    ShareModule,
18
+    DistributionSearchMoreModule,
19
+  ]
20
+})
21
+export class DistributionDepartmentSourceStatisticsModule { }

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

@@ -17,6 +17,78 @@ const routes: Routes = [
17 17
           title: '日期业务统计'
18 18
         }
19 19
       },
20
+      {
21
+        // 日期质控统计
22
+        path: 'dateQualityControlStatistics',
23
+        loadChildren: () => import('./date-quality-control-statistics/date-quality-control-statistics.module').then(m => m.DateQualityControlStatisticsModule),
24
+        data: {
25
+          reuse: true,
26
+          title: '日期质控统计'
27
+        }
28
+      },
29
+      {
30
+        // 科室业务统计
31
+        path: 'departmentBusinessStatistics',
32
+        loadChildren: () => import('./department-business-statistics/department-business-statistics.module').then(m => m.DepartmentBusinessStatisticsModule),
33
+        data: {
34
+          reuse: true,
35
+          title: '科室业务统计'
36
+        }
37
+      },
38
+      {
39
+        // 科室质控统计
40
+        path: 'departmentQualityControlStatistics',
41
+        loadChildren: () => import('./department-quality-control-statistics/department-quality-control-statistics.module').then(m => m.DepartmentQualityControlStatisticsModule),
42
+        data: {
43
+          reuse: true,
44
+          title: '科室质控统计'
45
+        }
46
+      },
47
+      {
48
+        // 科室评价统计
49
+        path: 'distributionDepartmentEvaluateStatistics',
50
+        loadChildren: () => import('./distribution-department-evaluate-statistics/distribution-department-evaluate-statistics.module').then(m => m.DistributionDepartmentEvaluateStatisticsModule),
51
+        data: {
52
+          reuse: true,
53
+          title: '科室评价统计'
54
+        }
55
+      },
56
+      {
57
+        // 科室来源统计
58
+        path: 'distributionDepartmentSourceStatistics',
59
+        loadChildren: () => import('./distribution-department-source-statistics/distribution-department-source-statistics.module').then(m => m.DistributionDepartmentSourceStatisticsModule),
60
+        data: {
61
+          reuse: true,
62
+          title: '科室来源统计'
63
+        }
64
+      },
65
+      {
66
+        // 人员业务统计
67
+        path: 'userBusinessStatistics',
68
+        loadChildren: () => import('./user-business-statistics/user-business-statistics.module').then(m => m.UserBusinessStatisticsModule),
69
+        data: {
70
+          reuse: true,
71
+          title: '人员业务统计'
72
+        }
73
+      },
74
+      {
75
+        // 人员质控统计
76
+        path: 'userQualityControlStatistics',
77
+        loadChildren: () => import('./user-quality-control-statistics/user-quality-control-statistics.module').then(m => m.UserQualityControlStatisticsModule),
78
+        data: {
79
+          reuse: true,
80
+          title: '人员质控统计'
81
+        }
82
+      },
83
+      {
84
+        // 来源统计
85
+        path: 'sourceStatistics',
86
+        loadChildren: () => import('./source-statistics/source-statistics.module').then(m => m.SourceStatisticsModule),
87
+        data: {
88
+          reuse: true,
89
+          title: '来源统计'
90
+        }
91
+      },
20 92
     ]
21 93
   }
22 94
 ];

+ 1 - 1
src/app/views/new-statistics/distribution-inspection-statistics/distribution-inspection-statistics.component.less

@@ -3,7 +3,7 @@
3 3
 :host{
4 4
   background-color: #F0F2F5;
5 5
   width: 100%;
6
-  height: 100vh;
6
+  height: calc(100vh - 48px);
7 7
   font-size: 14px;
8 8
   display: flex;
9 9
   flex-direction: column;

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

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

+ 65 - 0
src/app/views/new-statistics/distribution-inspection-statistics/source-statistics/source-statistics.component.html

@@ -0,0 +1,65 @@
1
+<div class="searchDataWrap">
2
+  <div class="searchData">
3
+    <div class="searchDataItem">
4
+      <span class="label">建单时间</span>:
5
+      <nz-range-picker [(ngModel)]="dateRange" [nzAllowClear]="false" (ngModelChange)="changeDate($event)" (nzOnCalendarChange)="onCalendarChangeDate($event)">
6
+      </nz-range-picker>
7
+    </div>
8
+    <div class="searchDataItem">
9
+      <span class="label">科室</span>:
10
+      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" nzAllowClear nzPlaceHolder="请选择科室" [(ngModel)]="deptId" (nzOpenChange)="openChangeDept($event)">
11
+        <ng-container *ngFor="let option of deptList">
12
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
13
+        </ng-container>
14
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
15
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
16
+        </nz-option>
17
+      </nz-select>
18
+    </div>
19
+  </div>
20
+  <div class="operation">
21
+    <i class="icon_transport transport-gengduo" (click)="showMore()"></i>
22
+    <button nz-button class="btn default" (click)="search()">查询</button>
23
+    <button nz-button class="btn default ml8" (click)="reset()">重置</button>
24
+    <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
25
+  </div>
26
+</div>
27
+<div class="moreFilter" *ngIf="fieldConfig.fields.groupDTO || fieldConfig.fields.userDTO || fieldConfig.fields.taskTypeDTO || fieldConfig.fields.buildingDTO || fieldConfig.fields.statisticsTypeDTO">
28
+  <span>{{fieldConfig.fields.groupDTO?.groupName}}</span>
29
+  <span>{{fieldConfig.fields.userDTO?.name}}</span>
30
+  <span>{{fieldConfig.fields.taskTypeDTO?.taskName}}</span>
31
+  <span>{{fieldConfig.fields.buildingDTO?.buildingName}}</span>
32
+  <span>{{fieldConfig.fields.statisticsTypeDTO?.name}}</span>
33
+</div>
34
+<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
35
+  <thead (nzSortChange)="sort($event)" nzSingleSort>
36
+    <tr>
37
+      <th nzWidth="34%">来源名称</th>
38
+      <th nzWidth="33%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
39
+      <th nzWidth="33%" nzShowSort nzSortKey="percent" [(nzSort)]="sortCurrent.percent">占比</th>
40
+    </tr>
41
+  </thead>
42
+  <tbody>
43
+    <tr *ngFor="let data of listOfData">
44
+      <td>{{ data.name }}</td>
45
+      <td>{{ data.totalCount }}</td>
46
+      <td>{{ data.percent }}</td>
47
+    </tr>
48
+  </tbody>
49
+  <ng-template #footerTpl>
50
+    <table class="footTable">
51
+      <tr *ngFor="let data of listOfDataEnd">
52
+        <td style="width: 34%">{{ data.name }}</td>
53
+        <td style="width: 33%">{{ data.totalCount }}</td>
54
+        <td style="width: 33%">{{ data.percent }}</td>
55
+      </tr>
56
+    </table>
57
+  </ng-template>
58
+</nz-table>
59
+<div class="pagination">
60
+  <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
61
+  <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" nzShowSizeChanger [nzPageSizeOptions]="[30,50,100,200]" [nzShowTotal]="totalTemplate"></nz-pagination>
62
+</div>
63
+
64
+<!-- 详细搜索 -->
65
+<app-distribution-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-distribution-search-more>

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

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

+ 283 - 0
src/app/views/new-statistics/distribution-inspection-statistics/source-statistics/source-statistics.component.ts

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

+ 21 - 0
src/app/views/new-statistics/distribution-inspection-statistics/source-statistics/source-statistics.module.ts

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

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

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

+ 79 - 0
src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.component.html

@@ -0,0 +1,79 @@
1
+<div class="searchDataWrap">
2
+  <div class="searchData">
3
+    <div class="searchDataItem">
4
+      <span class="label">建单时间</span>:
5
+      <nz-range-picker [(ngModel)]="dateRange" [nzAllowClear]="false" (ngModelChange)="changeDate($event)" (nzOnCalendarChange)="onCalendarChangeDate($event)">
6
+      </nz-range-picker>
7
+    </div>
8
+    <div class="searchDataItem">
9
+      <span class="label">分组</span>:
10
+      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeGroupInp($event)" nzAllowClear nzPlaceHolder="请选择分组" [(ngModel)]="groupId" (nzOpenChange)="openChangeGroup($event)">
11
+        <ng-container *ngFor="let option of groupList">
12
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.groupName" [nzValue]="option.id"></nz-option>
13
+        </ng-container>
14
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
15
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
16
+        </nz-option>
17
+      </nz-select>
18
+    </div>
19
+  </div>
20
+  <div class="operation">
21
+    <i class="icon_transport transport-gengduo" (click)="showMore()"></i>
22
+    <button nz-button class="btn default" (click)="search()">查询</button>
23
+    <button nz-button class="btn default ml8" (click)="reset()">重置</button>
24
+    <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
25
+  </div>
26
+</div>
27
+<div class="moreFilter" *ngIf="fieldConfig.fields.buildingDTO || fieldConfig.fields.deptDTO">
28
+  <span>{{fieldConfig.fields.buildingDTO?.buildingName}}</span>
29
+  <span>{{fieldConfig.fields.deptDTO?.dept}}</span>
30
+</div>
31
+<div class="tableWrap">
32
+  <nz-table class="table" [ngStyle]="{ width: widthConfig.length * 100 + 50 * 1 + 20 + 'px' }" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl" [nzWidthConfig]="widthConfig" nzBordered>
33
+    <thead (nzSortChange)="sort($event)" nzSingleSort>
34
+      <tr>
35
+        <th rowspan="2">人员(编码)</th>
36
+        <th rowspan="2" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
37
+        <th rowspan="2" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">积分总和</th>
38
+        <th colspan="2" *ngFor="let dictionary of dictionaryList">{{dictionary.name}}</th>
39
+      </tr>
40
+      <tr>
41
+        <ng-container *ngFor="let dictionary of dictionaryList">
42
+          <th nzShowSort [nzSortKey]="dictionary.value + 'Count'" [(nzSort)]="sortCurrent[dictionary.value + 'Count']">工单量</th>
43
+          <th nzShowSort [nzSortKey]="dictionary.value + 'Grade'" [(nzSort)]="sortCurrent[dictionary.value + 'Grade']">积分数</th>
44
+        </ng-container>
45
+      </tr>
46
+    </thead>
47
+    <tbody>
48
+      <tr *ngFor="let data of listOfData">
49
+        <td class="width150">{{ data.name }}<ng-container *ngIf="data.account">({{ data.account }})</ng-container></td>
50
+        <td>{{ data.totalCount }}</td>
51
+        <td>{{ data.totalGrade }}</td>
52
+        <ng-container *ngFor="let dictionary of dictionaryList">
53
+          <td>{{ data[dictionary.value + 'Count'] }}</td>
54
+          <td>{{ data[dictionary.value + 'Grade'] }}</td>
55
+        </ng-container>
56
+      </tr>
57
+    </tbody>
58
+    <ng-template #footerTpl>
59
+      <table class="footTable">
60
+        <tr *ngFor="let data of listOfDataEnd">
61
+          <td class="width150">{{ data.account }}</td>
62
+          <td>{{ data.totalCount }}</td>
63
+          <td>{{ data.totalGrade }}</td>
64
+          <ng-container *ngFor="let dictionary of dictionaryList">
65
+            <td>{{ data[dictionary.value + 'Count'] }}</td>
66
+            <td>{{ data[dictionary.value + 'Grade'] }}</td>
67
+          </ng-container>
68
+        </tr>
69
+      </table>
70
+    </ng-template>
71
+  </nz-table>
72
+</div>
73
+<div class="pagination">
74
+  <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
75
+  <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" nzShowSizeChanger [nzPageSizeOptions]="[30,50,100,200]" [nzShowTotal]="totalTemplate"></nz-pagination>
76
+</div>
77
+
78
+<!-- 详细搜索 -->
79
+<app-distribution-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-distribution-search-more>

+ 82 - 0
src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.component.less

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

+ 284 - 0
src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.component.ts

@@ -0,0 +1,284 @@
1
+import { TabService } from './../../services/tab.service';
2
+import { debounceTime } from 'rxjs/operators';
3
+import { Subject } from 'rxjs';
4
+import { NzMessageService } from 'ng-zorro-antd/message';
5
+import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
6
+import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
7
+import { MainService } from 'src/app/services/main.service';
8
+import { ActivatedRoute } from '@angular/router';
9
+@Component({
10
+  selector: "app-user-business-statistics",
11
+  templateUrl: "./user-business-statistics.component.html",
12
+  styleUrls: ["./user-business-statistics.component.less"],
13
+})
14
+export class UserBusinessStatisticsComponent implements OnInit, AfterViewInit {
15
+  constructor(
16
+    private mainService: MainService,
17
+    private message: NzMessageService,
18
+    private route: ActivatedRoute,
19
+    private tabService: TabService,
20
+  ) {}
21
+
22
+  listOfData: any[] = []; //表格数据
23
+  listOfDataEnd: any[] = []; //表格合计
24
+  pageIndex: number = 1; //表格当前页码
25
+  pageSize: number = 30; //表格每页展示条数
26
+  listLength: number = 0; //表格总数据量
27
+  widthConfig: any[] = [];
28
+
29
+  groupId;//分组id
30
+
31
+  searchTimerSubject = new Subject();
32
+
33
+  ngOnInit() {
34
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
35
+      let fun = v[0];
36
+      fun.call(this, v[1]);
37
+    });
38
+    this.initSessionData();
39
+    this.getQueryParams();
40
+    this.search();
41
+  }
42
+
43
+  ngAfterViewInit(){
44
+    this.onResize();
45
+  }
46
+
47
+  tableHeight:number = 0;
48
+  @HostListener('window:resize')
49
+  onResize(): void {
50
+    setTimeout(() => {
51
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter - 2;
52
+
53
+    }, 0)
54
+  }
55
+
56
+  getQueryParams(){
57
+    let queryParams = this.tabService.getQueryParams();
58
+    this.tabService.clearQueryParams();
59
+    if(queryParams.dateRange){
60
+      this.dateRange = queryParams.dateRange;
61
+    }
62
+  }
63
+
64
+  get getMoreFilter(){
65
+    let flag = this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.deptDTO;
66
+    return flag ? 37 : 0;
67
+  }
68
+
69
+  // 初始化缓存数据
70
+  queryType:any;
71
+  hosId:any;
72
+  dutyId:any;
73
+  parentDutyId:any;
74
+  initSessionData(){
75
+    let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
76
+    let queryType:any = newStatistics.queryType;
77
+    let hosId:any = newStatistics.hospitalId;
78
+    let dutyId:any = newStatistics.dutyId;
79
+
80
+    queryType = queryType ? +queryType : undefined;
81
+    hosId = hosId ? +hosId : undefined;
82
+    dutyId = dutyId ? +dutyId : undefined;
83
+
84
+    this.queryType = queryType;
85
+    if(queryType == 1){
86
+      this.hosId = undefined;
87
+      this.dutyId = undefined;
88
+      this.parentDutyId = undefined;
89
+    }else if(queryType == 2){
90
+      this.hosId = hosId;
91
+      this.dutyId = undefined;
92
+      this.parentDutyId = undefined;
93
+    }else if(queryType == 3){
94
+      this.hosId = undefined;
95
+      this.dutyId = dutyId;
96
+      this.parentDutyId = undefined;
97
+    }else if(queryType == 4){
98
+      this.hosId = undefined;
99
+      this.dutyId = undefined;
100
+      this.parentDutyId = dutyId;
101
+    }
102
+  }
103
+
104
+  get getHosId(){
105
+    return this.parentDutyId || this.dutyId || this.hosId;
106
+  }
107
+
108
+  // 表格数据
109
+  loading1 = false;
110
+  dictionaryList: any[] = [];
111
+  getList(num?: number, field?: string, sort?: string) {
112
+    this.mainService.getDictionary('list', 'statistics_date_type').subscribe((data) => {
113
+      let dictionaryList = data || [];
114
+      dictionaryList.push({id: 0, name: '其他', value: 'dateOther'});
115
+      this.dictionaryList = dictionaryList;
116
+      this.widthConfig = new Array(this.dictionaryList.length * 2 + 3).fill('100px').map((v, i) => { return i == 0 ? '150px' : '100px' });
117
+      if (num !== undefined) {
118
+        this.pageIndex = num;
119
+      }
120
+      let postData:any = {
121
+        idx: this.pageIndex - 1,
122
+        sum: this.pageSize,
123
+        startDate: this.dateRange[0] || undefined,
124
+        endDate: this.dateRange[1] || undefined,
125
+        hosId: this.getHosId,
126
+        buildingId: this.fieldConfig.fields.buildingId || undefined,
127
+        deptId: this.fieldConfig.fields.deptId || undefined,
128
+        groupId: this.groupId || undefined,
129
+      };
130
+      if (field && sort) {
131
+        postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
132
+      }
133
+      this.loading1 = true;
134
+      this.mainService
135
+        .postCustom("itsm/report", "userTransOrder", postData)
136
+        .subscribe((result) => {
137
+          this.loading1 = false;
138
+          this.listOfData = result.dataList.filter((v, i) => { return i != result.dataList.length - 1 });
139
+          this.listOfDataEnd = result.dataList.filter((v, i) => { return i == result.dataList.length - 1 });
140
+          this.listLength = result.totalCount;
141
+        });
142
+    });
143
+  }
144
+
145
+  // 列表排序
146
+  sortCurrent:any = {};
147
+  sortCurrentKey: string = "";
148
+  sortCurrentValue: string | null = "";
149
+  sort(e) {
150
+    const { key, value } = e;
151
+    this.sortCurrentKey = key;
152
+    this.sortCurrentValue = value;
153
+    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
154
+  }
155
+
156
+  // 搜索
157
+  search() {
158
+    this.getList(1, this.sortCurrentKey, this.sortCurrentValue);
159
+  }
160
+
161
+  // 日期选择
162
+  dateRange: any = [format(startOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss'), format(endOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss')];
163
+  changeDate(result?): void {
164
+    result[0] = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
165
+    result[1] = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
166
+    this.dateRange = result;
167
+  }
168
+
169
+  onCalendarChangeDate(dateArr){
170
+    console.log(dateArr)
171
+    if(dateArr.length == 2){
172
+      this.dateRange = [format(startOfDay(dateArr[0]), 'yyyy-MM-dd HH:mm:ss'), format(endOfDay(dateArr[1]), 'yyyy-MM-dd HH:mm:ss')];
173
+    }
174
+  }
175
+
176
+  // 导出
177
+  excelExportLoading:any = false;
178
+  excelExport(){
179
+    this.excelExportLoading = this.message.loading("导出中..", {
180
+      nzDuration: 0,
181
+    }).messageId;
182
+    let postData:any = {
183
+      startDate: this.dateRange[0] || undefined,
184
+      endDate: this.dateRange[1] || undefined,
185
+      hosId: this.getHosId,
186
+      buildingId: this.fieldConfig.fields.buildingId || undefined,
187
+      deptId: this.fieldConfig.fields.deptId || undefined,
188
+      groupId: this.groupId || undefined,
189
+    };
190
+    if (this.sortCurrentKey && this.sortCurrentValue) {
191
+      postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
192
+    }
193
+    this.mainService
194
+      .postExportCustom("itsm/export", "userTransOrder", postData)
195
+      .subscribe((data) => {
196
+        this.message.remove(this.excelExportLoading);
197
+        this.excelExportLoading = false;
198
+        this.message.success('导出成功');
199
+        var file = new Blob([data], {
200
+          type: "application/vnd.ms-excel",
201
+        });
202
+        //trick to download store a file having its URL
203
+        var fileURL = URL.createObjectURL(file);
204
+        var a = document.createElement("a");
205
+        a.href = fileURL;
206
+        a.target = "_blank";
207
+        a.download = `${this.route.parent.routeConfig.data.title}.xls`;
208
+        document.body.appendChild(a);
209
+        a.click();
210
+      },(err) => {
211
+        this.message.remove(this.excelExportLoading);
212
+        this.excelExportLoading = false;
213
+        this.message.error('导出失败');
214
+      });
215
+  }
216
+  // 重置
217
+  reset(){
218
+    this.sortCurrentKey = "";
219
+		this.sortCurrentValue = "";
220
+		this.sortCurrent = {};
221
+    this.dateRange = [format(startOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss'), format(endOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss')]
222
+    this.groupId = undefined;
223
+    this.fieldConfig.fields = {buildingId: undefined, deptId: undefined};
224
+    this.search();
225
+  }
226
+
227
+  // 分组搜索
228
+  changeGroupInp(e) {
229
+    this.searchTimer(this.getGroupList, e);
230
+  }
231
+
232
+  // 防抖
233
+  isLoading = false;
234
+  searchTimer(fun, e) {
235
+    this.isLoading = true;
236
+    this.searchTimerSubject.next([fun, e]);
237
+  }
238
+
239
+  openChangeGroup(flag){
240
+    flag && this.getGroupList();
241
+  }
242
+
243
+  // 获取分组列表
244
+  groupList:any[] = [];
245
+  getGroupList(keyword?) {
246
+    let data = {
247
+      group2: {
248
+        statisticalHosId: this.getHosId,
249
+        groupName: keyword,
250
+      },
251
+      idx: 0,
252
+      sum: 20,
253
+    };
254
+    this.isLoading = true;
255
+    this.mainService
256
+      .getFetchDataList("data", "group2", data)
257
+      .subscribe((data) => {
258
+        this.isLoading = false;
259
+        this.groupList = data.list;
260
+      });
261
+  }
262
+
263
+  // 详细搜索
264
+  fieldConfig:any = {
265
+    fields: {buildingId: undefined, deptId: undefined},
266
+    config: {building: true, dept: true},
267
+  }
268
+  showSearchMore:boolean = false;
269
+  showMore(){
270
+    this.showSearchMore = true;
271
+  }
272
+
273
+  cancelEvent(){
274
+    this.showSearchMore = false;
275
+  }
276
+
277
+  submitEvent(fields){
278
+    this.showSearchMore = false;
279
+    this.fieldConfig.fields = fields;
280
+    console.log('this.fieldConfig.fields:', this.fieldConfig.fields)
281
+    this.search();
282
+    this.onResize();
283
+  }
284
+}

+ 23 - 0
src/app/views/new-statistics/distribution-inspection-statistics/user-business-statistics/user-business-statistics.module.ts

@@ -0,0 +1,23 @@
1
+import { UserBusinessStatisticsComponent } from './user-business-statistics.component';
2
+import { NgModule } from '@angular/core';
3
+import { CommonModule } from '@angular/common';
4
+
5
+import { UserBusinessStatisticsRoutingModule } from './user-business-statistics-routing.module';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+import { VirtualScrollerModule } from 'ngx-virtual-scroller';
8
+import { DistributionSearchMoreModule } from '../../components/distribution-search-more/distribution-search-more.module';
9
+
10
+
11
+@NgModule({
12
+  declarations: [
13
+    UserBusinessStatisticsComponent,
14
+  ],
15
+  imports: [
16
+    CommonModule,
17
+    UserBusinessStatisticsRoutingModule,
18
+    ShareModule,
19
+    VirtualScrollerModule,
20
+    DistributionSearchMoreModule,
21
+  ]
22
+})
23
+export class UserBusinessStatisticsModule { }

+ 14 - 0
src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics-routing.module.ts

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

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

@@ -0,0 +1,80 @@
1
+<div class="searchDataWrap">
2
+  <div class="searchData">
3
+    <div class="searchDataItem">
4
+      <span class="label">建单时间</span>:
5
+      <nz-range-picker [(ngModel)]="dateRange" [nzAllowClear]="false" (ngModelChange)="changeDate($event)" (nzOnCalendarChange)="onCalendarChangeDate($event)">
6
+      </nz-range-picker>
7
+    </div>
8
+    <div class="searchDataItem">
9
+      <span class="label">分组</span>:
10
+      <nz-select class="selectItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeGroupInp($event)" nzAllowClear nzPlaceHolder="请选择分组" [(ngModel)]="groupId" (nzOpenChange)="openChangeGroup($event)">
11
+        <ng-container *ngFor="let option of groupList">
12
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.groupName" [nzValue]="option.id"></nz-option>
13
+        </ng-container>
14
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
15
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
16
+        </nz-option>
17
+      </nz-select>
18
+    </div>
19
+  </div>
20
+  <div class="operation">
21
+    <i class="icon_transport transport-gengduo" (click)="showMore()"></i>
22
+    <button nz-button class="btn default" (click)="search()">查询</button>
23
+    <button nz-button class="btn default ml8" (click)="reset()">重置</button>
24
+    <button nz-button class="btn default ml8" (click)="excelExport()" [nzLoading]="excelExportLoading">导出</button>
25
+  </div>
26
+</div>
27
+<div class="moreFilter" *ngIf="fieldConfig.fields.buildingDTO || fieldConfig.fields.deptDTO">
28
+  <span>{{fieldConfig.fields.buildingDTO?.buildingName}}</span>
29
+  <span>{{fieldConfig.fields.deptDTO?.dept}}</span>
30
+</div>
31
+<nz-table class="table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1" [nzScroll]="{ y: tableHeight + 'px' }" [nzFooter]="footerTpl">
32
+  <thead (nzSortChange)="sort($event)" nzSingleSort>
33
+    <tr>
34
+      <th nzWidth="12%">人员(编码)</th>
35
+      <th nzWidth="11%" nzShowSort nzSortKey="totalCount" [(nzSort)]="sortCurrent.totalCount">工单数量</th>
36
+      <th nzWidth="11%" nzShowSort nzSortKey="totalGrade" [(nzSort)]="sortCurrent.totalGrade">总积分</th>
37
+      <th nzWidth="11%" nzShowSort nzSortKey="response_time_num" [(nzSort)]="sortCurrent.response_time_num">平均响应时间</th>
38
+      <th nzWidth="11%" nzShowSort nzSortKey="arrive_time_num" [(nzSort)]="sortCurrent.arrive_time_num">平均送达时间</th>
39
+      <th nzWidth="11%" nzShowSort nzSortKey="aveper" [(nzSort)]="sortCurrent.aveper">按时完成达标率</th>
40
+      <th nzWidth="11%" nzShowSort nzSortKey="total_time" [(nzSort)]="sortCurrent.total_time">平均总时间</th>
41
+      <th nzWidth="11%" nzShowSort nzSortKey="five_count" [(nzSort)]="sortCurrent.five_count">五分钟内工单</th>
42
+      <th nzWidth="11%" nzShowSort nzSortKey="special_close" [(nzSort)]="sortCurrent.special_close">特殊关闭数</th>
43
+    </tr>
44
+  </thead>
45
+  <tbody>
46
+    <tr *ngFor="let data of listOfData">
47
+      <td>{{ data.name }}<ng-container *ngIf="data.account">({{ data.account }})</ng-container></td>
48
+      <td>{{ data.totalCount }}</td>
49
+      <td>{{ data.totalGrade }}</td>
50
+      <td>{{ data.response_time_num }}</td>
51
+      <td>{{ data.arrive_time_num }}</td>
52
+      <td>{{ data.aveper }}</td>
53
+      <td>{{ data.total_time }}</td>
54
+      <td>{{ data.five_count }}</td>
55
+      <td>{{ data.special_close }}</td>
56
+    </tr>
57
+  </tbody>
58
+  <ng-template #footerTpl>
59
+    <table class="footTable">
60
+      <tr *ngFor="let data of listOfDataEnd">
61
+        <td style="width: 12%">{{ data.account }}</td>
62
+        <td style="width: 11%">{{ data.totalCount }}</td>
63
+        <td style="width: 11%">{{ data.totalGrade }}</td>
64
+        <td style="width: 11%">{{ data.response_time_num }}</td>
65
+        <td style="width: 11%">{{ data.arrive_time_num }}</td>
66
+        <td style="width: 11%">{{ data.aveper }}</td>
67
+        <td style="width: 11%">{{ data.total_time }}</td>
68
+        <td style="width: 11%">{{ data.five_count }}</td>
69
+        <td style="width: 11%">{{ data.special_close }}</td>
70
+      </tr>
71
+    </table>
72
+  </ng-template>
73
+</nz-table>
74
+<div class="pagination">
75
+  <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
76
+  <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)" nzShowSizeChanger [nzPageSizeOptions]="[30,50,100,200]" [nzShowTotal]="totalTemplate"></nz-pagination>
77
+</div>
78
+
79
+<!-- 详细搜索 -->
80
+<app-distribution-search-more [fieldConfig]="fieldConfig" *ngIf="showSearchMore" [hosId]="hosId" [queryType]="queryType"  [dutyId]="dutyId"  [parentDutyId]="parentDutyId" (cancelEvent)="cancelEvent()" (submitEvent)="submitEvent($event)"></app-distribution-search-more>

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

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

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

@@ -0,0 +1,276 @@
1
+import { TabService } from './../../services/tab.service';
2
+import { debounceTime } from 'rxjs/operators';
3
+import { Subject } from 'rxjs';
4
+import { NzMessageService } from 'ng-zorro-antd/message';
5
+import { format, addMonths, startOfMonth, endOfMonth, startOfDay, endOfDay } from 'date-fns';
6
+import { Component, OnInit, HostListener, AfterViewInit } from "@angular/core";
7
+import { MainService } from 'src/app/services/main.service';
8
+import { ActivatedRoute } from '@angular/router';
9
+@Component({
10
+  selector: "app-user-quality-control-statistics",
11
+  templateUrl: "./user-quality-control-statistics.component.html",
12
+  styleUrls: ["./user-quality-control-statistics.component.less"],
13
+})
14
+export class UserQualityControlStatisticsComponent implements OnInit, AfterViewInit {
15
+  constructor(
16
+    private mainService: MainService,
17
+    private message: NzMessageService,
18
+    private route: ActivatedRoute,
19
+    private tabService: TabService,
20
+  ) {}
21
+
22
+  listOfData: any[] = []; //表格数据
23
+  listOfDataEnd: any[] = []; //表格合计
24
+  pageIndex: number = 1; //表格当前页码
25
+  pageSize: number = 30; //表格每页展示条数
26
+  listLength: number = 0; //表格总数据量
27
+
28
+  groupId;//分组id
29
+
30
+  searchTimerSubject = new Subject();
31
+
32
+  ngOnInit() {
33
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
34
+      let fun = v[0];
35
+      fun.call(this, v[1]);
36
+    });
37
+    this.initSessionData();
38
+    this.getQueryParams();
39
+    this.search();
40
+  }
41
+
42
+  ngAfterViewInit(){
43
+    this.onResize();
44
+  }
45
+
46
+  tableHeight:number = 0;
47
+  @HostListener('window:resize')
48
+  onResize(): void {
49
+    setTimeout(() => {
50
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
51
+
52
+    }, 0)
53
+  }
54
+
55
+  getQueryParams(){
56
+    let queryParams = this.tabService.getQueryParams();
57
+    this.tabService.clearQueryParams();
58
+    if(queryParams.dateRange){
59
+      this.dateRange = queryParams.dateRange;
60
+    }
61
+  }
62
+
63
+  get getMoreFilter(){
64
+    let flag = this.fieldConfig.fields.userDTO || this.fieldConfig.fields.deptDTO || this.fieldConfig.fields.buildingDTO;
65
+    return flag ? 37 : 0;
66
+  }
67
+
68
+  // 初始化缓存数据
69
+  queryType:any;
70
+  hosId:any;
71
+  dutyId:any;
72
+  parentDutyId:any;
73
+  initSessionData(){
74
+    let newStatistics = JSON.parse(sessionStorage.getItem('newStatistics'));
75
+    let queryType:any = newStatistics.queryType;
76
+    let hosId:any = newStatistics.hospitalId;
77
+    let dutyId:any = newStatistics.dutyId;
78
+
79
+    queryType = queryType ? +queryType : undefined;
80
+    hosId = hosId ? +hosId : undefined;
81
+    dutyId = dutyId ? +dutyId : undefined;
82
+
83
+    this.queryType = queryType;
84
+    if(queryType == 1){
85
+      this.hosId = undefined;
86
+      this.dutyId = undefined;
87
+      this.parentDutyId = undefined;
88
+    }else if(queryType == 2){
89
+      this.hosId = hosId;
90
+      this.dutyId = undefined;
91
+      this.parentDutyId = undefined;
92
+    }else if(queryType == 3){
93
+      this.hosId = undefined;
94
+      this.dutyId = dutyId;
95
+      this.parentDutyId = undefined;
96
+    }else if(queryType == 4){
97
+      this.hosId = undefined;
98
+      this.dutyId = undefined;
99
+      this.parentDutyId = dutyId;
100
+    }
101
+  }
102
+
103
+  get getHosId(){
104
+    return this.parentDutyId || this.dutyId || this.hosId;
105
+  }
106
+
107
+  // 表格数据
108
+  loading1 = false;
109
+  getList(num?: number, field?: string, sort?: string) {
110
+    if (num !== undefined) {
111
+      this.pageIndex = num;
112
+    }
113
+    let postData:any = {
114
+      idx: this.pageIndex - 1,
115
+      sum: this.pageSize,
116
+      startDate: this.dateRange[0] || undefined,
117
+      endDate: this.dateRange[1] || undefined,
118
+      hosId: this.hosId || undefined,
119
+      groupId: this.groupId || undefined,
120
+      buildingId: this.fieldConfig.fields.buildingId || undefined,
121
+      deptId: this.fieldConfig.fields.deptId || undefined,
122
+    };
123
+    if (field && sort) {
124
+      postData.sort = `${field} ${sort === "ascend" ? `asc` : `desc`}`
125
+    }
126
+    this.loading1 = true;
127
+    this.mainService
128
+      .postCustom("itsm/report", "userTransOrderQc", postData)
129
+      .subscribe((result) => {
130
+        this.loading1 = false;
131
+        this.listOfData = result.dataList.filter((v, i) => { return i != result.dataList.length - 1 });
132
+        this.listOfDataEnd = result.dataList.filter((v, i) => { return i == result.dataList.length - 1 });
133
+        this.listLength = result.totalCount;
134
+      });
135
+  }
136
+
137
+  // 列表排序
138
+  sortCurrent:any = {};
139
+  sortCurrentKey: string = "";
140
+  sortCurrentValue: string | null = "";
141
+  sort(e) {
142
+    const { key, value } = e;
143
+    this.sortCurrentKey = key;
144
+    this.sortCurrentValue = value;
145
+    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
146
+  }
147
+
148
+  // 搜索
149
+  search() {
150
+    this.getList(1, this.sortCurrentKey, this.sortCurrentValue);
151
+  }
152
+
153
+  // 日期选择
154
+  dateRange: any = [format(startOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss'), format(endOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss')];
155
+  changeDate(result?): void {
156
+    result[0] = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
157
+    result[1] = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
158
+    this.dateRange = result;
159
+  }
160
+
161
+  onCalendarChangeDate(dateArr){
162
+    console.log(dateArr)
163
+    if(dateArr.length == 2){
164
+      this.dateRange = [format(startOfDay(dateArr[0]), 'yyyy-MM-dd HH:mm:ss'), format(endOfDay(dateArr[1]), 'yyyy-MM-dd HH:mm:ss')];
165
+    }
166
+  }
167
+
168
+  // 导出
169
+  excelExportLoading:any = false;
170
+  excelExport(){
171
+    this.excelExportLoading = this.message.loading("导出中..", {
172
+      nzDuration: 0,
173
+    }).messageId;
174
+    let postData:any = {
175
+      startDate: this.dateRange[0] || undefined,
176
+      endDate: this.dateRange[1] || undefined,
177
+      hosId: this.hosId || undefined,
178
+      groupId: this.groupId || undefined,
179
+      buildingId: this.fieldConfig.fields.buildingId || undefined,
180
+      deptId: this.fieldConfig.fields.deptId || undefined,
181
+    };
182
+    if (this.sortCurrentKey && this.sortCurrentValue) {
183
+      postData.sort = `${this.sortCurrentKey} ${this.sortCurrentValue === "ascend" ? `asc` : `desc`}`
184
+    }
185
+    this.mainService
186
+      .postExportCustom("itsm/exportMergeTitle", "userTransOrderQc", postData)
187
+      .subscribe((data) => {
188
+        this.message.remove(this.excelExportLoading);
189
+        this.excelExportLoading = false;
190
+        this.message.success('导出成功');
191
+        var file = new Blob([data], {
192
+          type: "application/vnd.ms-excel",
193
+        });
194
+        //trick to download store a file having its URL
195
+        var fileURL = URL.createObjectURL(file);
196
+        var a = document.createElement("a");
197
+        a.href = fileURL;
198
+        a.target = "_blank";
199
+        a.download = `${this.route.parent.routeConfig.data.title}.xls`;
200
+        document.body.appendChild(a);
201
+        a.click();
202
+      },(err) => {
203
+        this.message.remove(this.excelExportLoading);
204
+        this.excelExportLoading = false;
205
+        this.message.error('导出失败');
206
+      });
207
+  }
208
+  // 重置
209
+  reset(){
210
+    this.sortCurrentKey = "";
211
+		this.sortCurrentValue = "";
212
+		this.sortCurrent = {};
213
+    this.dateRange = [format(startOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss'), format(endOfMonth(addMonths(new Date(), -1)), 'yyyy-MM-dd HH:mm:ss')]
214
+    this.groupId = undefined;
215
+    this.fieldConfig.fields = {buildingId: undefined, deptId: undefined};
216
+    this.search();
217
+  }
218
+
219
+  // 楼栋搜索
220
+  changeGroupInp(e) {
221
+    this.searchTimer(this.getGroupList, e);
222
+  }
223
+
224
+  // 防抖
225
+  isLoading = false;
226
+  searchTimer(fun, e) {
227
+    this.isLoading = true;
228
+    this.searchTimerSubject.next([fun, e]);
229
+  }
230
+
231
+  openChangeGroup(flag){
232
+    flag && this.getGroupList();
233
+  }
234
+
235
+  // 获取分组列表
236
+  groupList:any[] = [];
237
+  getGroupList(keyword?) {
238
+    let data = {
239
+      group2: {
240
+        statisticalHosId: this.getHosId,
241
+        groupName: keyword,
242
+      },
243
+      idx: 0,
244
+      sum: 20,
245
+    };
246
+    this.isLoading = true;
247
+    this.mainService
248
+      .getFetchDataList("data", "group2", data)
249
+      .subscribe((data) => {
250
+        this.isLoading = false;
251
+        this.groupList = data.list;
252
+      });
253
+  }
254
+
255
+  // 详细搜索
256
+  fieldConfig:any = {
257
+    fields: {buildingId: undefined, deptId: undefined},
258
+    config: {building: true, dept: true},
259
+  }
260
+  showSearchMore:boolean = false;
261
+  showMore(){
262
+    this.showSearchMore = true;
263
+  }
264
+
265
+  cancelEvent(){
266
+    this.showSearchMore = false;
267
+  }
268
+
269
+  submitEvent(fields){
270
+    this.showSearchMore = false;
271
+    this.fieldConfig.fields = fields;
272
+    console.log('this.fieldConfig.fields:', this.fieldConfig.fields)
273
+    this.search();
274
+    this.onResize();
275
+  }
276
+}

+ 21 - 0
src/app/views/new-statistics/distribution-inspection-statistics/user-quality-control-statistics/user-quality-control-statistics.module.ts

@@ -0,0 +1,21 @@
1
+import { UserQualityControlStatisticsComponent } from './user-quality-control-statistics.component';
2
+import { NgModule } from '@angular/core';
3
+import { CommonModule } from '@angular/common';
4
+
5
+import { UserQualityControlStatisticsRoutingModule } from './user-quality-control-statistics-routing.module';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+import { DistributionSearchMoreModule } from '../../components/distribution-search-more/distribution-search-more.module';
8
+
9
+
10
+@NgModule({
11
+  declarations: [
12
+    UserQualityControlStatisticsComponent,
13
+  ],
14
+  imports: [
15
+    CommonModule,
16
+    UserQualityControlStatisticsRoutingModule,
17
+    ShareModule,
18
+    DistributionSearchMoreModule,
19
+  ]
20
+})
21
+export class UserQualityControlStatisticsModule { }

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

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

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

@@ -37,7 +37,7 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
37 37
   @HostListener('window:resize')
38 38
   onResize(): void {
39 39
     setTimeout(() => {
40
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
40
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
41 41
 
42 42
     }, 0)
43 43
   }
@@ -52,7 +52,7 @@ export class BuildingStatisticsComponent implements OnInit, AfterViewInit {
52 52
 
53 53
   get getMoreFilter(){
54 54
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO;
55
-    return flag ? 21 : 0;
55
+    return flag ? 37 : 0;
56 56
   }
57 57
 
58 58
   // 初始化缓存数据

+ 1 - 1
src/app/views/new-statistics/maintenance-statistics/category-one-statistics/category-one-statistics.component.less

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

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

@@ -37,7 +37,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
37 37
   @HostListener('window:resize')
38 38
   onResize(): void {
39 39
     setTimeout(() => {
40
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
40
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
41 41
 
42 42
     }, 0)
43 43
   }
@@ -52,7 +52,7 @@ export class CategoryOneStatisticsComponent implements OnInit, AfterViewInit {
52 52
 
53 53
   get getMoreFilter(){
54 54
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
55
-    return flag ? 21 : 0;
55
+    return flag ? 37 : 0;
56 56
   }
57 57
 
58 58
   // 初始化缓存数据

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

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

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

@@ -37,7 +37,7 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
37 37
   @HostListener('window:resize')
38 38
   onResize(): void {
39 39
     setTimeout(() => {
40
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
40
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
41 41
 
42 42
     }, 0)
43 43
   }
@@ -52,7 +52,7 @@ export class CategorySourceStatisticsComponent implements OnInit, AfterViewInit
52 52
 
53 53
   get getMoreFilter(){
54 54
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
55
-    return flag ? 21 : 0;
55
+    return flag ? 37 : 0;
56 56
   }
57 57
 
58 58
   // 初始化缓存数据

+ 1 - 1
src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.less

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

+ 2 - 2
src/app/views/new-statistics/maintenance-statistics/category-three-statistics/category-three-statistics.component.ts

@@ -48,7 +48,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
48 48
   @HostListener('window:resize')
49 49
   onResize(): void {
50 50
     setTimeout(() => {
51
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
51
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
52 52
 
53 53
     }, 0)
54 54
   }
@@ -63,7 +63,7 @@ export class CategoryThreeStatisticsComponent implements OnInit, AfterViewInit {
63 63
 
64 64
   get getMoreFilter(){
65 65
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
66
-    return flag ? 21 : 0;
66
+    return flag ? 37 : 0;
67 67
   }
68 68
 
69 69
   // 初始化缓存数据

+ 1 - 1
src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.less

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

+ 2 - 2
src/app/views/new-statistics/maintenance-statistics/category-two-statistics/category-two-statistics.component.ts

@@ -47,7 +47,7 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
47 47
   @HostListener('window:resize')
48 48
   onResize(): void {
49 49
     setTimeout(() => {
50
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
50
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
51 51
 
52 52
     }, 0)
53 53
   }
@@ -62,7 +62,7 @@ export class CategoryTwoStatisticsComponent implements OnInit, AfterViewInit {
62 62
 
63 63
   get getMoreFilter(){
64 64
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.companyDTO || this.fieldConfig.fields.repairDeptDTO;
65
-    return flag ? 21 : 0;
65
+    return flag ? 37 : 0;
66 66
   }
67 67
 
68 68
   // 初始化缓存数据

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

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

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

@@ -47,7 +47,7 @@ export class ConsumableStatisticsComponent implements OnInit, AfterViewInit {
47 47
   @HostListener('window:resize')
48 48
   onResize(): void {
49 49
     setTimeout(() => {
50
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
50
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
51 51
 
52 52
     }, 0)
53 53
   }
@@ -62,7 +62,7 @@ export class ConsumableStatisticsComponent implements OnInit, AfterViewInit {
62 62
 
63 63
   get getMoreFilter(){
64 64
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.companyDTO;
65
-    return flag ? 21 : 0;
65
+    return flag ? 37 : 0;
66 66
   }
67 67
 
68 68
   // 初始化缓存数据

+ 1 - 1
src/app/views/new-statistics/maintenance-statistics/department-evaluate-statistics/department-evaluate-statistics.component.less

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

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

@@ -39,7 +39,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
39 39
   @HostListener('window:resize')
40 40
   onResize(): void {
41 41
     setTimeout(() => {
42
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
42
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
43 43
 
44 44
     }, 0)
45 45
   }
@@ -54,7 +54,7 @@ export class DepartmentEvaluateStatisticsComponent implements OnInit, AfterViewI
54 54
 
55 55
   get getMoreFilter(){
56 56
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
57
-    return flag ? 21 : 0;
57
+    return flag ? 37 : 0;
58 58
   }
59 59
 
60 60
   // 初始化缓存数据

+ 1 - 1
src/app/views/new-statistics/maintenance-statistics/department-incident-statistics/department-incident-statistics.component.less

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

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

@@ -39,7 +39,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
39 39
   @HostListener('window:resize')
40 40
   onResize(): void {
41 41
     setTimeout(() => {
42
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
42
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
43 43
 
44 44
     }, 0)
45 45
   }
@@ -54,7 +54,7 @@ export class DepartmentIncidentStatisticsComponent implements OnInit, AfterViewI
54 54
 
55 55
   get getMoreFilter(){
56 56
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
57
-    return flag ? 21 : 0;
57
+    return flag ? 37 : 0;
58 58
   }
59 59
 
60 60
   // 初始化缓存数据

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

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

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

@@ -39,7 +39,7 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
39 39
   @HostListener('window:resize')
40 40
   onResize(): void {
41 41
     setTimeout(() => {
42
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
42
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
43 43
 
44 44
     }, 0)
45 45
   }
@@ -54,7 +54,7 @@ export class DepartmentSourceStatisticsComponent implements OnInit, AfterViewIni
54 54
 
55 55
   get getMoreFilter(){
56 56
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
57
-    return flag ? 21 : 0;
57
+    return flag ? 37 : 0;
58 58
   }
59 59
 
60 60
   // 初始化缓存数据

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

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

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

@@ -47,7 +47,7 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
47 47
   @HostListener('window:resize')
48 48
   onResize(): void {
49 49
     setTimeout(() => {
50
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
50
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
51 51
 
52 52
     }, 0)
53 53
   }
@@ -62,7 +62,7 @@ export class FloorStatisticsComponent implements OnInit, AfterViewInit {
62 62
 
63 63
   get getMoreFilter(){
64 64
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO;
65
-    return flag ? 21 : 0;
65
+    return flag ? 37 : 0;
66 66
   }
67 67
 
68 68
   // 初始化缓存数据

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

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

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

@@ -37,7 +37,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
37 37
   @HostListener('window:resize')
38 38
   onResize(): void {
39 39
     setTimeout(() => {
40
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
40
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
41 41
 
42 42
     }, 0)
43 43
   }
@@ -52,7 +52,7 @@ export class GroupStatisticsComponent implements OnInit, AfterViewInit {
52 52
 
53 53
   get getMoreFilter(){
54 54
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
55
-    return flag ? 21 : 0;
55
+    return flag ? 37 : 0;
56 56
   }
57 57
 
58 58
   // 初始化缓存数据

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

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

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

@@ -47,7 +47,7 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
47 47
   @HostListener('window:resize')
48 48
   onResize(): void {
49 49
     setTimeout(() => {
50
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
50
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
51 51
 
52 52
     }, 0)
53 53
   }
@@ -62,7 +62,7 @@ export class IncidentStatisticsComponent implements OnInit, AfterViewInit {
62 62
 
63 63
   get getMoreFilter(){
64 64
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.sourceDTO;
65
-    return flag ? 21 : 0;
65
+    return flag ? 37 : 0;
66 66
   }
67 67
 
68 68
   // 初始化缓存数据

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

@@ -3,7 +3,7 @@
3 3
 :host{
4 4
   background-color: #F0F2F5;
5 5
   width: 100%;
6
-  height: 100vh;
6
+  height: calc(100vh - 48px);
7 7
   font-size: 14px;
8 8
   display: flex;
9 9
   flex-direction: column;

+ 1 - 1
src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.less

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

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

@@ -47,7 +47,7 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
47 47
   @HostListener('window:resize')
48 48
   onResize(): void {
49 49
     setTimeout(() => {
50
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
50
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
51 51
 
52 52
     }, 0)
53 53
   }
@@ -62,7 +62,7 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
62 62
 
63 63
   get getMoreFilter(){
64 64
     let flag = this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO;
65
-    return flag ? 21 : 0;
65
+    return flag ? 37 : 0;
66 66
   }
67 67
 
68 68
   // 初始化缓存数据

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

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

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

@@ -47,7 +47,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
47 47
   @HostListener('window:resize')
48 48
   onResize(): void {
49 49
     setTimeout(() => {
50
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
50
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
51 51
 
52 52
     }, 0)
53 53
   }
@@ -62,7 +62,7 @@ export class UserStatisticsComponent implements OnInit, AfterViewInit {
62 62
 
63 63
   get getMoreFilter(){
64 64
     let flag = this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO;
65
-    return flag ? 21 : 0;
65
+    return flag ? 37 : 0;
66 66
   }
67 67
 
68 68
   // 初始化缓存数据

+ 1 - 1
src/app/views/new-statistics/maintenance-statistics/work-hour-statistics/work-hour-statistics.component.less

@@ -7,7 +7,7 @@
7 7
   left: 0;
8 8
   ::ng-deep .ant-table-footer{
9 9
     padding: 16px 0;
10
-    width: calc(100% - 16px);
10
+    width: calc(100% - 15px);
11 11
     font-weight: bold;
12 12
   }
13 13
   tr, th{

+ 2 - 2
src/app/views/new-statistics/maintenance-statistics/work-hour-statistics/work-hour-statistics.component.ts

@@ -47,7 +47,7 @@ export class WorkHourStatisticsComponent implements OnInit, AfterViewInit {
47 47
   @HostListener('window:resize')
48 48
   onResize(): void {
49 49
     setTimeout(() => {
50
-      this.tableHeight = window.innerHeight - document.querySelector('.searchDataWrap').clientHeight - 64 - 36 - 48 - 8 - document.querySelector('.ant-table-header').clientHeight - 55 - this.getMoreFilter - 2;
50
+      this.tableHeight = window.innerHeight - (document.querySelector('.searchDataWrap') as HTMLElement).offsetHeight - 64 - 36 - 48 - 8 - (document.querySelector('.ant-table-header') as HTMLElement).offsetHeight - 55 - this.getMoreFilter + 14;
51 51
 
52 52
     }, 0)
53 53
   }
@@ -62,7 +62,7 @@ export class WorkHourStatisticsComponent implements OnInit, AfterViewInit {
62 62
 
63 63
   get getMoreFilter(){
64 64
     let flag = this.fieldConfig.fields.groupDTO || this.fieldConfig.fields.userDTO || this.fieldConfig.fields.category1DTO || this.fieldConfig.fields.category2DTO || this.fieldConfig.fields.category3DTO || this.fieldConfig.fields.buildingDTO || this.fieldConfig.fields.floorDTO || this.fieldConfig.fields.companyDTO;
65
-    return flag ? 21 : 0;
65
+    return flag ? 37 : 0;
66 66
   }
67 67
 
68 68
   // 初始化缓存数据

+ 1 - 0
src/app/views/new-statistics/new-statistics.component.html

@@ -1,4 +1,5 @@
1 1
 <div class="header">
2
+  <i class="icon_transport transport-fanhui" (click)="goBack()"></i>
2 3
   <a replaceUrl routerLinkActive="active" [routerLink]="'/newStatistics/' + data.link" class="title" *ngFor="let data of menuList">{{data.title}}</a>
3 4
   <div class="hospital" (click)="queryRangeClick()">
4 5
     <ng-container *ngIf="queryType == 1">查询范围:全院查询</ng-container>

+ 15 - 4
src/app/views/new-statistics/new-statistics.component.less

@@ -11,14 +11,16 @@
11 11
     align-items: center;
12 12
     position: relative;
13 13
     .title{
14
-      margin-right: 16px;
15 14
       cursor: pointer;
16 15
       color: rgba(0,0,0,0.65);
17
-      &:last-of-type{
18
-        margin-right: 0;
19
-      }
16
+      display: flex;
17
+      align-items: center;
18
+      justify-content: center;
19
+      width: 104px;
20
+      height: 100%;
20 21
       &.active{
21 22
         color: @primary-color;
23
+        background: #F0F6ED;
22 24
       }
23 25
     }
24 26
     .hospital{
@@ -38,5 +40,14 @@
38 40
         top: 2px;
39 41
       }
40 42
     }
43
+    .transport-fanhui{
44
+      position: absolute;
45
+      left: 24px;
46
+      top: 50%;
47
+      transform: translateY(-50%);
48
+      color: #666666;
49
+      font-size: 20px;
50
+      cursor: pointer;
51
+    }
41 52
   }
42 53
 }

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

@@ -114,4 +114,9 @@ export class NewStatisticsComponent implements OnInit, OnDestroy {
114 114
   cancelQueryRange() {
115 115
     this.queryRangeFlag = false;
116 116
   }
117
+
118
+  // 返回
119
+  goBack(){
120
+    this.router.navigate(['/main/home']);
121
+  }
117 122
 }

+ 26 - 3
src/assets/iconfont/demo_index.html

@@ -55,6 +55,12 @@
55 55
           <ul class="icon_lists dib-box">
56 56
           
57 57
             <li class="dib">
58
+              <span class="icon icon_transport">&#xe67a;</span>
59
+                <div class="name">返回</div>
60
+                <div class="code-name">&amp;#xe67a;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
58 64
               <span class="icon icon_transport">&#xe66c;</span>
59 65
                 <div class="name">top2</div>
60 66
                 <div class="code-name">&amp;#xe66c;</div>
@@ -1056,9 +1062,9 @@
1056 1062
 <pre><code class="language-css"
1057 1063
 >@font-face {
1058 1064
   font-family: 'icon_transport';
1059
-  src: url('iconfont.woff2?t=1740462451907') format('woff2'),
1060
-       url('iconfont.woff?t=1740462451907') format('woff'),
1061
-       url('iconfont.ttf?t=1740462451907') format('truetype');
1065
+  src: url('iconfont.woff2?t=1741080510824') format('woff2'),
1066
+       url('iconfont.woff?t=1741080510824') format('woff'),
1067
+       url('iconfont.ttf?t=1741080510824') format('truetype');
1062 1068
 }
1063 1069
 </code></pre>
1064 1070
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -1085,6 +1091,15 @@
1085 1091
         <ul class="icon_lists dib-box">
1086 1092
           
1087 1093
           <li class="dib">
1094
+            <span class="icon icon_transport transport-fanhui"></span>
1095
+            <div class="name">
1096
+              返回
1097
+            </div>
1098
+            <div class="code-name">.transport-fanhui
1099
+            </div>
1100
+          </li>
1101
+          
1102
+          <li class="dib">
1088 1103
             <span class="icon icon_transport transport-top1"></span>
1089 1104
             <div class="name">
1090 1105
               top2
@@ -2589,6 +2604,14 @@
2589 2604
           
2590 2605
             <li class="dib">
2591 2606
                 <svg class="icon svg-icon" aria-hidden="true">
2607
+                  <use xlink:href="#transport-fanhui"></use>
2608
+                </svg>
2609
+                <div class="name">返回</div>
2610
+                <div class="code-name">#transport-fanhui</div>
2611
+            </li>
2612
+          
2613
+            <li class="dib">
2614
+                <svg class="icon svg-icon" aria-hidden="true">
2592 2615
                   <use xlink:href="#transport-top1"></use>
2593 2616
                 </svg>
2594 2617
                 <div class="name">top2</div>

+ 7 - 3
src/assets/iconfont/iconfont.css

@@ -1,8 +1,8 @@
1 1
 @font-face {
2 2
   font-family: "icon_transport"; /* Project id 4543613 */
3
-  src: url('iconfont.woff2?t=1740462451907') format('woff2'),
4
-       url('iconfont.woff?t=1740462451907') format('woff'),
5
-       url('iconfont.ttf?t=1740462451907') format('truetype');
3
+  src: url('iconfont.woff2?t=1741080510824') format('woff2'),
4
+       url('iconfont.woff?t=1741080510824') format('woff'),
5
+       url('iconfont.ttf?t=1741080510824') format('truetype');
6 6
 }
7 7
 
8 8
 .icon_transport {
@@ -13,6 +13,10 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
+.transport-fanhui:before {
17
+  content: "\e67a";
18
+}
19
+
16 20
 .transport-top1:before {
17 21
   content: "\e66c";
18 22
 }

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
src/assets/iconfont/iconfont.js


+ 7 - 0
src/assets/iconfont/iconfont.json

@@ -6,6 +6,13 @@
6 6
   "description": "",
7 7
   "glyphs": [
8 8
     {
9
+      "icon_id": "2569862",
10
+      "name": "返回",
11
+      "font_class": "fanhui",
12
+      "unicode": "e67a",
13
+      "unicode_decimal": 59002
14
+    },
15
+    {
9 16
       "icon_id": "6020437",
10 17
       "name": "top2",
11 18
       "font_class": "top1",

BIN
src/assets/iconfont/iconfont.ttf


BIN
src/assets/iconfont/iconfont.woff


BIN
src/assets/iconfont/iconfont.woff2