浏览代码

支助人员统计及其他BUG

seimin 1 年之前
父节点
当前提交
c4a1353961

+ 40 - 25
package-lock.json

@@ -16,10 +16,12 @@
16
         "@angular/platform-browser": "~8.1.1",
16
         "@angular/platform-browser": "~8.1.1",
17
         "@angular/platform-browser-dynamic": "~8.1.1",
17
         "@angular/platform-browser-dynamic": "~8.1.1",
18
         "@angular/router": "~8.1.1",
18
         "@angular/router": "~8.1.1",
19
+        "@types/big.js": "^6.2.2",
19
         "@types/crypto-js": "^3.1.47",
20
         "@types/crypto-js": "^3.1.47",
20
         "@types/overlayscrollbars": "^1.12.1",
21
         "@types/overlayscrollbars": "^1.12.1",
21
         "@types/swiper": "^6.0.0",
22
         "@types/swiper": "^6.0.0",
22
         "atmosphere.js": "2.3.6",
23
         "atmosphere.js": "2.3.6",
24
+        "big.js": "^6.2.1",
23
         "core-js": "^3.18.3",
25
         "core-js": "^3.18.3",
24
         "crypto-js": "^3.3.0",
26
         "crypto-js": "^3.3.0",
25
         "datatables.net": "^1.11.3",
27
         "datatables.net": "^1.11.3",
@@ -997,6 +999,11 @@
997
         "npm": ">= 6.2.0"
999
         "npm": ">= 6.2.0"
998
       }
1000
       }
999
     },
1001
     },
1002
+    "node_modules/@types/big.js": {
1003
+      "version": "6.2.2",
1004
+      "resolved": "https://registry.npmmirror.com/@types/big.js/-/big.js-6.2.2.tgz",
1005
+      "integrity": "sha512-e2cOW9YlVzFY2iScnGBBkplKsrn2CsObHQ2Hiw4V1sSyiGbgWL8IyqE3zFi1Pt5o1pdAtYkDAIsF3KKUPjdzaA=="
1006
+    },
1000
     "node_modules/@types/crypto-js": {
1007
     "node_modules/@types/crypto-js": {
1001
       "version": "3.1.47",
1008
       "version": "3.1.47",
1002
       "resolved": "https://registry.npm.taobao.org/@types/crypto-js/download/@types/crypto-js-3.1.47.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fcrypto-js%2Fdownload%2F%40types%2Fcrypto-js-3.1.47.tgz",
1009
       "resolved": "https://registry.npm.taobao.org/@types/crypto-js/download/@types/crypto-js-3.1.47.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fcrypto-js%2Fdownload%2F%40types%2Fcrypto-js-3.1.47.tgz",
@@ -2155,10 +2162,9 @@
2155
       }
2162
       }
2156
     },
2163
     },
2157
     "node_modules/big.js": {
2164
     "node_modules/big.js": {
2158
-      "version": "5.2.2",
2159
-      "resolved": "https://registry.nlark.com/big.js/download/big.js-5.2.2.tgz",
2160
-      "integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg=",
2161
-      "dev": true,
2165
+      "version": "6.2.1",
2166
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-6.2.1.tgz",
2167
+      "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==",
2162
       "engines": {
2168
       "engines": {
2163
         "node": "*"
2169
         "node": "*"
2164
       }
2170
       }
@@ -6914,6 +6920,15 @@
6914
         "node": ">=4.0.0"
6920
         "node": ">=4.0.0"
6915
       }
6921
       }
6916
     },
6922
     },
6923
+    "node_modules/loader-utils/node_modules/big.js": {
6924
+      "version": "5.2.2",
6925
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
6926
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
6927
+      "dev": true,
6928
+      "engines": {
6929
+        "node": "*"
6930
+      }
6931
+    },
6917
     "node_modules/locate-path": {
6932
     "node_modules/locate-path": {
6918
       "version": "3.0.0",
6933
       "version": "3.0.0",
6919
       "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-3.0.0.tgz",
6934
       "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-3.0.0.tgz",
@@ -10098,7 +10113,6 @@
10098
     },
10113
     },
10099
     "node_modules/npm/node_modules/lodash._baseindexof": {
10114
     "node_modules/npm/node_modules/lodash._baseindexof": {
10100
       "version": "3.1.0",
10115
       "version": "3.1.0",
10101
-      "extraneous": true,
10102
       "inBundle": true,
10116
       "inBundle": true,
10103
       "license": "MIT"
10117
       "license": "MIT"
10104
     },
10118
     },
@@ -10113,19 +10127,16 @@
10113
     },
10127
     },
10114
     "node_modules/npm/node_modules/lodash._bindcallback": {
10128
     "node_modules/npm/node_modules/lodash._bindcallback": {
10115
       "version": "3.0.1",
10129
       "version": "3.0.1",
10116
-      "extraneous": true,
10117
       "inBundle": true,
10130
       "inBundle": true,
10118
       "license": "MIT"
10131
       "license": "MIT"
10119
     },
10132
     },
10120
     "node_modules/npm/node_modules/lodash._cacheindexof": {
10133
     "node_modules/npm/node_modules/lodash._cacheindexof": {
10121
       "version": "3.0.2",
10134
       "version": "3.0.2",
10122
-      "extraneous": true,
10123
       "inBundle": true,
10135
       "inBundle": true,
10124
       "license": "MIT"
10136
       "license": "MIT"
10125
     },
10137
     },
10126
     "node_modules/npm/node_modules/lodash._createcache": {
10138
     "node_modules/npm/node_modules/lodash._createcache": {
10127
       "version": "3.1.2",
10139
       "version": "3.1.2",
10128
-      "extraneous": true,
10129
       "inBundle": true,
10140
       "inBundle": true,
10130
       "license": "MIT",
10141
       "license": "MIT",
10131
       "dependencies": {
10142
       "dependencies": {
@@ -10139,7 +10150,6 @@
10139
     },
10150
     },
10140
     "node_modules/npm/node_modules/lodash._getnative": {
10151
     "node_modules/npm/node_modules/lodash._getnative": {
10141
       "version": "3.9.1",
10152
       "version": "3.9.1",
10142
-      "extraneous": true,
10143
       "inBundle": true,
10153
       "inBundle": true,
10144
       "license": "MIT"
10154
       "license": "MIT"
10145
     },
10155
     },
@@ -10155,7 +10165,6 @@
10155
     },
10165
     },
10156
     "node_modules/npm/node_modules/lodash.restparam": {
10166
     "node_modules/npm/node_modules/lodash.restparam": {
10157
       "version": "3.6.1",
10167
       "version": "3.6.1",
10158
-      "extraneous": true,
10159
       "inBundle": true,
10168
       "inBundle": true,
10160
       "license": "MIT"
10169
       "license": "MIT"
10161
     },
10170
     },
@@ -17801,6 +17810,11 @@
17801
         "semver-intersect": "1.4.0"
17810
         "semver-intersect": "1.4.0"
17802
       }
17811
       }
17803
     },
17812
     },
17813
+    "@types/big.js": {
17814
+      "version": "6.2.2",
17815
+      "resolved": "https://registry.npmmirror.com/@types/big.js/-/big.js-6.2.2.tgz",
17816
+      "integrity": "sha512-e2cOW9YlVzFY2iScnGBBkplKsrn2CsObHQ2Hiw4V1sSyiGbgWL8IyqE3zFi1Pt5o1pdAtYkDAIsF3KKUPjdzaA=="
17817
+    },
17804
     "@types/crypto-js": {
17818
     "@types/crypto-js": {
17805
       "version": "3.1.47",
17819
       "version": "3.1.47",
17806
       "resolved": "https://registry.npm.taobao.org/@types/crypto-js/download/@types/crypto-js-3.1.47.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fcrypto-js%2Fdownload%2F%40types%2Fcrypto-js-3.1.47.tgz",
17820
       "resolved": "https://registry.npm.taobao.org/@types/crypto-js/download/@types/crypto-js-3.1.47.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fcrypto-js%2Fdownload%2F%40types%2Fcrypto-js-3.1.47.tgz",
@@ -18822,10 +18836,9 @@
18822
       }
18836
       }
18823
     },
18837
     },
18824
     "big.js": {
18838
     "big.js": {
18825
-      "version": "5.2.2",
18826
-      "resolved": "https://registry.nlark.com/big.js/download/big.js-5.2.2.tgz",
18827
-      "integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg=",
18828
-      "dev": true
18839
+      "version": "6.2.1",
18840
+      "resolved": "https://registry.npmmirror.com/big.js/-/big.js-6.2.1.tgz",
18841
+      "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ=="
18829
     },
18842
     },
18830
     "binary-extensions": {
18843
     "binary-extensions": {
18831
       "version": "2.2.0",
18844
       "version": "2.2.0",
@@ -22819,6 +22832,14 @@
22819
         "big.js": "^5.2.2",
22832
         "big.js": "^5.2.2",
22820
         "emojis-list": "^2.0.0",
22833
         "emojis-list": "^2.0.0",
22821
         "json5": "^1.0.1"
22834
         "json5": "^1.0.1"
22835
+      },
22836
+      "dependencies": {
22837
+        "big.js": {
22838
+          "version": "5.2.2",
22839
+          "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
22840
+          "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
22841
+          "dev": true
22842
+        }
22822
       }
22843
       }
22823
     },
22844
     },
22824
     "locate-path": {
22845
     "locate-path": {
@@ -25170,8 +25191,7 @@
25170
         },
25191
         },
25171
         "lodash._baseindexof": {
25192
         "lodash._baseindexof": {
25172
           "version": "3.1.0",
25193
           "version": "3.1.0",
25173
-          "bundled": true,
25174
-          "extraneous": true
25194
+          "bundled": true
25175
         },
25195
         },
25176
         "lodash._baseuniq": {
25196
         "lodash._baseuniq": {
25177
           "version": "4.6.0",
25197
           "version": "4.6.0",
@@ -25183,18 +25203,15 @@
25183
         },
25203
         },
25184
         "lodash._bindcallback": {
25204
         "lodash._bindcallback": {
25185
           "version": "3.0.1",
25205
           "version": "3.0.1",
25186
-          "bundled": true,
25187
-          "extraneous": true
25206
+          "bundled": true
25188
         },
25207
         },
25189
         "lodash._cacheindexof": {
25208
         "lodash._cacheindexof": {
25190
           "version": "3.0.2",
25209
           "version": "3.0.2",
25191
-          "bundled": true,
25192
-          "extraneous": true
25210
+          "bundled": true
25193
         },
25211
         },
25194
         "lodash._createcache": {
25212
         "lodash._createcache": {
25195
           "version": "3.1.2",
25213
           "version": "3.1.2",
25196
           "bundled": true,
25214
           "bundled": true,
25197
-          "extraneous": true,
25198
           "requires": {
25215
           "requires": {
25199
             "lodash._getnative": "^3.0.0"
25216
             "lodash._getnative": "^3.0.0"
25200
           }
25217
           }
@@ -25205,8 +25222,7 @@
25205
         },
25222
         },
25206
         "lodash._getnative": {
25223
         "lodash._getnative": {
25207
           "version": "3.9.1",
25224
           "version": "3.9.1",
25208
-          "bundled": true,
25209
-          "extraneous": true
25225
+          "bundled": true
25210
         },
25226
         },
25211
         "lodash._root": {
25227
         "lodash._root": {
25212
           "version": "3.0.1",
25228
           "version": "3.0.1",
@@ -25218,8 +25234,7 @@
25218
         },
25234
         },
25219
         "lodash.restparam": {
25235
         "lodash.restparam": {
25220
           "version": "3.6.1",
25236
           "version": "3.6.1",
25221
-          "bundled": true,
25222
-          "extraneous": true
25237
+          "bundled": true
25223
         },
25238
         },
25224
         "lodash.union": {
25239
         "lodash.union": {
25225
           "version": "4.6.0",
25240
           "version": "4.6.0",

+ 2 - 0
package.json

@@ -23,10 +23,12 @@
23
     "@angular/platform-browser": "~8.1.1",
23
     "@angular/platform-browser": "~8.1.1",
24
     "@angular/platform-browser-dynamic": "~8.1.1",
24
     "@angular/platform-browser-dynamic": "~8.1.1",
25
     "@angular/router": "~8.1.1",
25
     "@angular/router": "~8.1.1",
26
+    "@types/big.js": "^6.2.2",
26
     "@types/crypto-js": "^3.1.47",
27
     "@types/crypto-js": "^3.1.47",
27
     "@types/overlayscrollbars": "^1.12.1",
28
     "@types/overlayscrollbars": "^1.12.1",
28
     "@types/swiper": "^6.0.0",
29
     "@types/swiper": "^6.0.0",
29
     "atmosphere.js": "2.3.6",
30
     "atmosphere.js": "2.3.6",
31
+    "big.js": "^6.2.1",
30
     "core-js": "^3.18.3",
32
     "core-js": "^3.18.3",
31
     "crypto-js": "^3.3.0",
33
     "crypto-js": "^3.3.0",
32
     "datatables.net": "^1.11.3",
34
     "datatables.net": "^1.11.3",

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1
 {
1
 {
2
   "/service": {
2
   "/service": {
3
-    "target": "http://192.168.3.108",
3
+    "target": "http://192.168.4.240",
4
     "logLevel": "debug",
4
     "logLevel": "debug",
5
     "changeOrigin": true,
5
     "changeOrigin": true,
6
     "pathRewrite": {
6
     "pathRewrite": {

+ 4 - 4
src/app/share/excel-export/excel-export.component.html

@@ -10,13 +10,13 @@
10
       ></i>
10
       ></i>
11
     </div>
11
     </div>
12
     <div class="content">
12
     <div class="content">
13
-      <div>
13
+      <!-- <div>
14
         <label nz-checkbox [(ngModel)]="isGroup">是否按组导出</label>
14
         <label nz-checkbox [(ngModel)]="isGroup">是否按组导出</label>
15
-      </div>
15
+      </div> -->
16
       <div class="isNumOrIntegral">
16
       <div class="isNumOrIntegral">
17
         <nz-radio-group [(ngModel)]="isNumOrIntegral">
17
         <nz-radio-group [(ngModel)]="isNumOrIntegral">
18
-          <label nz-radio nzValue="byOrderNum">按工单数量排序</label>
19
-          <label nz-radio nzValue="byIntegral">按积分排序</label>
18
+          <label nz-radio nzValue="none">基础信息</label>
19
+          <label nz-radio nzValue="isGroup">按组导出</label>
20
           <label nz-radio nzValue="buildingAndInspectMode">人员工单积分信息</label>
20
           <label nz-radio nzValue="buildingAndInspectMode">人员工单积分信息</label>
21
         </nz-radio-group>
21
         </nz-radio-group>
22
       </div>
22
       </div>

+ 1 - 1
src/app/share/excel-export/excel-export.component.less

@@ -58,7 +58,7 @@
58
       .content {
58
       .content {
59
         width: 100%;
59
         width: 100%;
60
         height: auto;
60
         height: auto;
61
-        padding: 19px 14px 0 14px;
61
+        padding: 0 14px;
62
         max-height: 500px;
62
         max-height: 500px;
63
         overflow-y: auto;
63
         overflow-y: auto;
64
         .isNumOrIntegral {
64
         .isNumOrIntegral {

+ 2 - 3
src/app/share/excel-export/excel-export.component.ts

@@ -12,8 +12,7 @@ export class ExcelExportComponent implements OnInit {
12
   @Input() isShow: boolean = false; //模态框
12
   @Input() isShow: boolean = false; //模态框
13
   @Input() loading: boolean = false; //确定按钮的loading
13
   @Input() loading: boolean = false; //确定按钮的loading
14
   deptList = []; //护理单元科室列表
14
   deptList = []; //护理单元科室列表
15
-  isGroup = false; //是否按组导出
16
-  isNumOrIntegral = "byOrderNum";
15
+  isNumOrIntegral = "none";
17
   constructor() {}
16
   constructor() {}
18
 
17
 
19
   ngOnInit() {}
18
   ngOnInit() {}
@@ -23,6 +22,6 @@ export class ExcelExportComponent implements OnInit {
23
   }
22
   }
24
   // 表单提交
23
   // 表单提交
25
   submitForm(): void {
24
   submitForm(): void {
26
-    this.submitFormHand.emit({isGroup:this.isGroup,isNumOrIntegral:this.isNumOrIntegral});
25
+    this.submitFormHand.emit({isNumOrIntegral:this.isNumOrIntegral});
27
   }
26
   }
28
 }
27
 }

+ 1 - 1
src/app/share/order-detail/order-detail.component.html

@@ -1134,7 +1134,7 @@
1134
                 </td>
1134
                 </td>
1135
               </tr>
1135
               </tr>
1136
               <tr>
1136
               <tr>
1137
-                <td>科室追加分</td>
1137
+                <td>特殊科室追加分</td>
1138
                 <td>
1138
                 <td>
1139
                   {{ orderInfo.grade ? orderInfo.grade.estimateDeptGrade : "-" }}
1139
                   {{ orderInfo.grade ? orderInfo.grade.estimateDeptGrade : "-" }}
1140
                 </td>
1140
                 </td>

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

@@ -3,7 +3,7 @@ import { ActivatedRoute, Router } from "@angular/router";
3
 
3
 
4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
 import { ToolService } from "../../services/tool.service";
5
 import { ToolService } from "../../services/tool.service";
6
-import { format, startOfDay, endOfDay } from 'date-fns';
6
+import { format, startOfDay, endOfDay, previousMonday, previousSunday } from 'date-fns';
7
 import { DeptInspectionRateStatisticsService } from './dept-inspection-rate-statistics.service';
7
 import { DeptInspectionRateStatisticsService } from './dept-inspection-rate-statistics.service';
8
 
8
 
9
 @Component({
9
 @Component({
@@ -26,7 +26,7 @@ export class DeptInspectionRateStatisticsComponent implements OnInit {
26
 
26
 
27
   listOfData: any[] = []; //表格数据
27
   listOfData: any[] = []; //表格数据
28
   searchDto: any = {
28
   searchDto: any = {
29
-    dateRange: [],
29
+    dateRange: [previousMonday(new Date()), previousSunday(new Date())],
30
   }
30
   }
31
 
31
 
32
   hosId: any; //院区(搜索)
32
   hosId: any; //院区(搜索)
@@ -50,7 +50,7 @@ export class DeptInspectionRateStatisticsComponent implements OnInit {
50
   // 重置
50
   // 重置
51
   reset() {
51
   reset() {
52
     this.searchDto = {
52
     this.searchDto = {
53
-      dateRange: [],
53
+      dateRange: [previousMonday(new Date()), previousSunday(new Date())],
54
     }
54
     }
55
     this.search();
55
     this.search();
56
   }
56
   }

+ 21 - 20
src/app/views/task-type-management/task-type-management.component.ts

@@ -8,6 +8,7 @@ import { Subject } from "rxjs";
8
 import { debounceTime } from "rxjs/operators";
8
 import { debounceTime } from "rxjs/operators";
9
 import { NzMessageService } from "ng-zorro-antd";
9
 import { NzMessageService } from "ng-zorro-antd";
10
 import { format, startOfSecond } from 'date-fns';
10
 import { format, startOfSecond } from 'date-fns';
11
+import Big from 'big.js';
11
 export interface Data {
12
 export interface Data {
12
   id: number;
13
   id: number;
13
   name: string;
14
   name: string;
@@ -674,17 +675,17 @@ export class TaskTypeManagementComponent implements OnInit {
674
               arr[1].sumTime =
675
               arr[1].sumTime =
675
                 arr[1].responseTime + arr[1].arriveTime + arr[1].executeTime;
676
                 arr[1].responseTime + arr[1].arriveTime + arr[1].executeTime;
676
               arr[0].sumScore =
677
               arr[0].sumScore =
677
-                arr[0].responseScore +
678
-                arr[0].arriveScore +
679
-                arr[0].executeScore +
680
-                arr[0].basicsScore +
681
-                arr[0].deptsScore;
678
+                Big(arr[0].responseScore)
679
+                .plus(arr[0].arriveScore)
680
+                .plus(arr[0].executeScore)
681
+                .plus(arr[0].basicsScore)
682
+                .plus(arr[0].deptsScore);
682
               arr[1].sumScore =
683
               arr[1].sumScore =
683
-                arr[1].responseScore +
684
-                arr[1].arriveScore +
685
-                arr[1].executeScore +
686
-                arr[1].basicsScore +
687
-                arr[1].deptsScore;
684
+                Big(arr[1].responseScore)
685
+                .plus(arr[1].arriveScore)
686
+                .plus(arr[1].executeScore)
687
+                .plus(arr[1].basicsScore)
688
+                .plus(arr[1].deptsScore);
688
               this.allTaskType[i].integralDetailedRules = arr;
689
               this.allTaskType[i].integralDetailedRules = arr;
689
             }
690
             }
690
           }
691
           }
@@ -1626,20 +1627,20 @@ export class TaskTypeManagementComponent implements OnInit {
1626
   Change(data) {
1627
   Change(data) {
1627
     data.sumTime = data.responseTime + data.arriveTime + data.executeTime;
1628
     data.sumTime = data.responseTime + data.arriveTime + data.executeTime;
1628
     data.sumScore =
1629
     data.sumScore =
1629
-      data.responseScore +
1630
-      data.arriveScore +
1631
-      data.executeScore +
1632
-      data.basicsScore +
1633
-      data.deptsScore;
1630
+      Big(data.responseScore)
1631
+      .plus(data.arriveScore)
1632
+      .plus(data.executeScore)
1633
+      .plus(data.basicsScore)
1634
+      .plus(data.deptsScore);
1634
   }
1635
   }
1635
   Change1(data) {
1636
   Change1(data) {
1636
     data.sumTime = data.responseTime + data.arriveTime + data.executeTime;
1637
     data.sumTime = data.responseTime + data.arriveTime + data.executeTime;
1637
     data.sumScore =
1638
     data.sumScore =
1638
-      data.responseScore +
1639
-      data.arriveScore +
1640
-      data.executeScore +
1641
-      data.basicsScore +
1642
-      data.deptsScore;
1639
+    Big(data.responseScore)
1640
+    .plus(data.arriveScore)
1641
+    .plus(data.executeScore)
1642
+    .plus(data.basicsScore)
1643
+    .plus(data.deptsScore);
1643
   }
1644
   }
1644
   getList1() {
1645
   getList1() {
1645
     this.getCourseList(this.pageSize);
1646
     this.getCourseList(this.pageSize);

+ 2 - 2
src/app/views/work-order-log/work-order-log.component.ts

@@ -26,7 +26,7 @@ export class WorkOrderLogComponent implements OnInit {
26
 
26
 
27
   listOfData: any[] = []; //表格数据
27
   listOfData: any[] = []; //表格数据
28
   searchDto: any = {
28
   searchDto: any = {
29
-    dateRange: [],
29
+    dateRange: [new Date(), new Date()],
30
   }
30
   }
31
 
31
 
32
   hosId: any; //院区(搜索)
32
   hosId: any; //院区(搜索)
@@ -69,7 +69,7 @@ export class WorkOrderLogComponent implements OnInit {
69
   // 重置
69
   // 重置
70
   reset() {
70
   reset() {
71
     this.searchDto = {
71
     this.searchDto = {
72
-      dateRange: [],
72
+      dateRange: [new Date(), new Date()],
73
     }
73
     }
74
     this.search();
74
     this.search();
75
   }
75
   }

+ 5 - 5
src/app/views/worker-statistics/worker-statistics.component.html

@@ -65,11 +65,11 @@
65
         [nzShowPagination]="false"
65
         [nzShowPagination]="false"
66
         [nzLoading]="loading1"
66
         [nzLoading]="loading1"
67
       >
67
       >
68
-        <thead>
68
+        <thead (nzSortChange)="sort($event)" nzSingleSort>
69
           <tr class="thead">
69
           <tr class="thead">
70
             <th nzWidth="5%">序号</th>
70
             <th nzWidth="5%">序号</th>
71
             <th nzWidth="8%">姓名</th>
71
             <th nzWidth="8%">姓名</th>
72
-            <th nzWidth="8%">工单总数</th>
72
+            <th nzWidth="8%" nzShowSort nzSortKey="byOrderNum" [(nzSort)]="sortCurrent.byOrderNum">工单总数</th>
73
             <th nzWidth="16%">五分钟内工单<br>特殊关闭数</th>
73
             <th nzWidth="16%">五分钟内工单<br>特殊关闭数</th>
74
             <!-- <th nzWidth="8%"></th> -->
74
             <!-- <th nzWidth="8%"></th> -->
75
             <th nzWidth="16%">平均到达时长<br>平均完成时长</th>
75
             <th nzWidth="16%">平均到达时长<br>平均完成时长</th>
@@ -77,7 +77,7 @@
77
             <th nzWidth="8%">按时完成达标率</th>
77
             <th nzWidth="8%">按时完成达标率</th>
78
             <th nzWidth="8%">楼栋分<br>陪检方式分</th>
78
             <th nzWidth="8%">楼栋分<br>陪检方式分</th>
79
             <!-- <th nzWidth="8%"></th> -->
79
             <!-- <th nzWidth="8%"></th> -->
80
-            <th nzWidth="16%">总积分</th>
80
+            <th nzWidth="16%" nzShowSort nzSortKey="byIntegral" [(nzSort)]="sortCurrent.byIntegral">总积分</th>
81
             <th nzWidth="15%">操作</th>
81
             <th nzWidth="15%">操作</th>
82
           </tr>
82
           </tr>
83
         </thead>
83
         </thead>
@@ -109,8 +109,8 @@
109
           [(nzTotal)]="listLength"
109
           [(nzTotal)]="listLength"
110
           nzShowSizeChanger
110
           nzShowSizeChanger
111
           [(nzPageSize)]="pageSize"
111
           [(nzPageSize)]="pageSize"
112
-          (nzPageIndexChange)="getList()"
113
-          (nzPageSizeChange)="getList()"
112
+          (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)"
113
+          (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)"
114
         >
114
         >
115
         </nz-pagination>
115
         </nz-pagination>
116
       </div>
116
       </div>

+ 31 - 15
src/app/views/worker-statistics/worker-statistics.component.ts

@@ -69,13 +69,13 @@ export class WorkerStatisticsComponent implements OnInit {
69
       that.hospital = that.searchData["hosId"];
69
       that.hospital = that.searchData["hosId"];
70
       that.changeDate(that.searchData["range"]);
70
       that.changeDate(that.searchData["range"]);
71
       that.defRange = that.searchData["defRange"];
71
       that.defRange = that.searchData["defRange"];
72
-      that.search();
72
+      // that.search();
73
     });
73
     });
74
     // 不是从综合报表页面跳转过来的
74
     // 不是从综合报表页面跳转过来的
75
     setTimeout(() => {
75
     setTimeout(() => {
76
       if (!sub["isStopped"]) {
76
       if (!sub["isStopped"]) {
77
         that.changeDateRange(that.defRange);
77
         that.changeDateRange(that.defRange);
78
-        that.search();
78
+        // that.search();
79
       }
79
       }
80
     }, 100);
80
     }, 100);
81
   }
81
   }
@@ -91,9 +91,9 @@ export class WorkerStatisticsComponent implements OnInit {
91
       };
91
       };
92
     }
92
     }
93
     if (num !== undefined) {
93
     if (num !== undefined) {
94
-      this.getList(num);
94
+      this.getList(num, this.sortCurrentKey, this.sortCurrentValue);
95
     } else {
95
     } else {
96
-      this.getList();
96
+      this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
97
     }
97
     }
98
   }
98
   }
99
   // 导出-model-确定
99
   // 导出-model-确定
@@ -119,17 +119,16 @@ export class WorkerStatisticsComponent implements OnInit {
119
       endTime: this.endDate + " " + "23:59:59",
119
       endTime: this.endDate + " " + "23:59:59",
120
       groupId: this.group || "",
120
       groupId: this.group || "",
121
     };
121
     };
122
-    if (obj.isGroup) {
123
-      postData.byGroup = "true";
122
+    if (this.sortCurrentKey && this.sortCurrentValue) {
123
+      postData[this.sortCurrentKey] = this.sortCurrentValue === "ascend" ? `asc` : `desc`;
124
     }
124
     }
125
     switch (obj.isNumOrIntegral) {
125
     switch (obj.isNumOrIntegral) {
126
-      case "byOrderNum":
127
-        //按工单数量排序
128
-        postData.byOrderNum = "true";
126
+      case "none":
127
+        //基础信息
129
         break;
128
         break;
130
-      case "byIntegral":
131
-        //按积分排序
132
-        postData.byIntegral = "true";
129
+      case "isGroup":
130
+        //按组导出
131
+        postData.byGroup = "true";
133
         break;
132
         break;
134
       case "buildingAndInspectMode":
133
       case "buildingAndInspectMode":
135
         //人员工单积分信息
134
         //人员工单积分信息
@@ -164,15 +163,15 @@ export class WorkerStatisticsComponent implements OnInit {
164
   reset() {
163
   reset() {
165
     this.changeDateRange("1");
164
     this.changeDateRange("1");
166
     this.group = 0;
165
     this.group = 0;
167
-    this.search();
166
+    // this.search();
168
   }
167
   }
169
   // 表格数据
168
   // 表格数据
170
   loading1 = false;
169
   loading1 = false;
171
-  getList(num?: number) {
170
+  getList(num?: number, field?: string, sort?: string) {
172
     if (num !== undefined) {
171
     if (num !== undefined) {
173
       this.pageIndex = num;
172
       this.pageIndex = num;
174
     }
173
     }
175
-    let postData = {
174
+    let postData:any = {
176
       idx: this.pageIndex - 1,
175
       idx: this.pageIndex - 1,
177
       sum: this.pageSize,
176
       sum: this.pageSize,
178
       startTime: this.searchData.dateRange.start,
177
       startTime: this.searchData.dateRange.start,
@@ -180,6 +179,9 @@ export class WorkerStatisticsComponent implements OnInit {
180
       hosId: this.searchData.hosId,
179
       hosId: this.searchData.hosId,
181
       groupId: this.group || "",
180
       groupId: this.group || "",
182
     };
181
     };
182
+    if (field && sort) {
183
+      postData[field] = sort === "ascend" ? `asc` : `desc`;
184
+    }
183
     this.loading1 = true;
185
     this.loading1 = true;
184
     this.mainService
186
     this.mainService
185
       .postCustom("report", "user", postData)
187
       .postCustom("report", "user", postData)
@@ -189,6 +191,20 @@ export class WorkerStatisticsComponent implements OnInit {
189
         this.listLength = result.totalNum;
191
         this.listLength = result.totalNum;
190
       });
192
       });
191
   }
193
   }
194
+
195
+  // 列表排序
196
+  sortCurrent = {
197
+    byOrderNum: null,
198
+    byIntegral: null,
199
+  };
200
+  sortCurrentKey: string = "";
201
+  sortCurrentValue: string | null = "";
202
+  sort(e) {
203
+    const { key, value } = e;
204
+    this.sortCurrentKey = key;
205
+    this.sortCurrentValue = value;
206
+    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
207
+  }
192
   // 获取院区/分组
208
   // 获取院区/分组
193
   hospital: string; //选中院区
209
   hospital: string; //选中院区
194
   group: number = 0; //选中组
210
   group: number = 0; //选中组