Browse Source

Merge branch 'master' of http://git.dashitech.com/seimin/zy-pc

maotao 2 weeks ago
parent
commit
bf56f20cbd
64 changed files with 5873 additions and 43 deletions
  1. 12 0
      src/app/app-routing.module.ts
  2. 89 0
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-batch/configuration-inspect-batch.component.html
  3. 700 0
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-batch/configuration-inspect-batch.component.less
  4. 226 0
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-batch/configuration-inspect-batch.component.ts
  5. 20 0
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-batch/configuration-inspect-batch.module.ts
  6. 132 0
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.html
  7. 288 0
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.less
  8. 309 0
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.ts
  9. 20 0
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.module.ts
  10. 15 2
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect.component.html
  11. 2 0
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect.component.less
  12. 27 1
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect.component.ts
  13. 4 0
      src/app/components/configurationCenter/configuration-inspect/configuration-inspect.module.ts
  14. 13 0
      src/app/components/configurationCenter/configuration-quick/configuration-quick.component.html
  15. 52 6
      src/app/components/configurationCenter/configuration-quick/configuration-quick.component.ts
  16. 22 0
      src/app/guard/inspectClosedLoopView.guard.ts
  17. 38 3
      src/app/services/main.service.ts
  18. 72 0
      src/app/share/add-inspect-modal/add-inspect-modal.component.html
  19. 194 0
      src/app/share/add-inspect-modal/add-inspect-modal.component.less
  20. 192 0
      src/app/share/add-inspect-modal/add-inspect-modal.component.ts
  21. 26 0
      src/app/share/select-date-yytime/select-date-yytime.component.html
  22. 131 0
      src/app/share/select-date-yytime/select-date-yytime.component.less
  23. 53 0
      src/app/share/select-date-yytime/select-date-yytime.component.ts
  24. 24 0
      src/app/share/select-date/select-date.component.html
  25. 135 0
      src/app/share/select-date/select-date.component.less
  26. 47 0
      src/app/share/select-date/select-date.component.ts
  27. 9 0
      src/app/share/share.module.ts
  28. 17 0
      src/app/views/batch-inspection/batch-inspection-routing.module.ts
  29. 90 0
      src/app/views/batch-inspection/batch-inspection.component.html
  30. 134 0
      src/app/views/batch-inspection/batch-inspection.component.less
  31. 578 0
      src/app/views/batch-inspection/batch-inspection.component.ts
  32. 17 0
      src/app/views/batch-inspection/batch-inspection.module.ts
  33. 6 2
      src/app/views/hushijiandan/hushijiandan.component.html
  34. 12 6
      src/app/views/hushijiandan/hushijiandan.component.less
  35. 34 0
      src/app/views/hushijiandan/hushijiandan.component.ts
  36. 38 12
      src/app/views/info-search/info-search.component.html
  37. 27 2
      src/app/views/info-search/info-search.component.ts
  38. 1 1
      src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.ts
  39. 17 0
      src/app/views/inspect-closed-loop-view/inspect-closed-loop-view-routing.module.ts
  40. 79 0
      src/app/views/inspect-closed-loop-view/inspect-closed-loop-view.component.html
  41. 146 0
      src/app/views/inspect-closed-loop-view/inspect-closed-loop-view.component.less
  42. 248 0
      src/app/views/inspect-closed-loop-view/inspect-closed-loop-view.component.ts
  43. 17 0
      src/app/views/inspect-closed-loop-view/inspect-closed-loop-view.module.ts
  44. 5 0
      src/app/views/main/main-routing.module.ts
  45. 1 0
      src/app/views/main/main.component.html
  46. 10 1
      src/app/views/main/main.component.ts
  47. 25 0
      src/app/views/patient-inspect-log-detail/patient-inspect-log-detail-routing.module.ts
  48. 173 0
      src/app/views/patient-inspect-log-detail/patient-inspect-log-detail.component.html
  49. 576 0
      src/app/views/patient-inspect-log-detail/patient-inspect-log-detail.component.less
  50. 178 0
      src/app/views/patient-inspect-log-detail/patient-inspect-log-detail.component.ts
  51. 19 0
      src/app/views/patient-inspect-log-detail/patient-inspect-log-detail.module.ts
  52. 24 0
      src/app/views/patient-inspect-log/patient-inspect-log-routing.module.ts
  53. 92 0
      src/app/views/patient-inspect-log/patient-inspect-log.component.html
  54. 179 0
      src/app/views/patient-inspect-log/patient-inspect-log.component.less
  55. 215 0
      src/app/views/patient-inspect-log/patient-inspect-log.component.ts
  56. 19 0
      src/app/views/patient-inspect-log/patient-inspect-log.module.ts
  57. 26 3
      src/assets/iconfont/demo_index.html
  58. 7 3
      src/assets/iconfont/iconfont.css
  59. 1 1
      src/assets/iconfont/iconfont.js
  60. 7 0
      src/assets/iconfont/iconfont.json
  61. BIN
      src/assets/iconfont/iconfont.ttf
  62. BIN
      src/assets/iconfont/iconfont.woff
  63. BIN
      src/assets/iconfont/iconfont.woff2
  64. 3 0
      src/common.less

+ 12 - 0
src/app/app-routing.module.ts

@@ -31,6 +31,7 @@ import { DataGenerateGuard } from './guard/DataGenerate.guard';
31 31
 import { SystemConfigGuard } from './guard/SystemConfig.guard';
32 32
 // 故障实时播报权限
33 33
 import { RealtimeBroadcastGuard } from './guard/realtimeBroadcast.guard';
34
+import { InspectClosedLoopViewGuard } from './guard/inspectClosedLoopView.guard';
34 35
 const routes: Routes = [
35 36
   // 默认
36 37
   {
@@ -194,6 +195,17 @@ const routes: Routes = [
194 195
     path: "newStatistics",
195 196
     loadChildren: () => import("./views/new-statistics/new-statistics.module").then((m) => m.NewStatisticsModule),
196 197
   },
198
+  // 批量发起陪检
199
+  {
200
+    path: 'batchInspection',
201
+    loadChildren: () => import('./views/batch-inspection/batch-inspection.module').then(m => m.BatchInspectionModule),
202
+  },
203
+  // 陪检闭环视图
204
+  {
205
+    path: 'inspectClosedLoopView',
206
+    loadChildren: () => import('./views/inspect-closed-loop-view/inspect-closed-loop-view.module').then(m => m.InspectClosedLoopViewModule),
207
+    canActivate: [InspectClosedLoopViewGuard]
208
+  },
197 209
   // 临时路由
198 210
   {
199 211
     path: "redirect",

+ 89 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-batch/configuration-inspect-batch.component.html

@@ -0,0 +1,89 @@
1
+<div class="TaskTypeManagement">
2
+  <div class="taskTypeInfo">
3
+    <div class="top">
4
+      <div class="item" (click)="tabModal('characteristics')" [ngClass]="{'items':tabModalName=='characteristics'}">
5
+        特性配置
6
+      </div>
7
+      <div class="item" (click)="tabModal('automaticOrderCreation')" [ngClass]="{'items':tabModalName=='automaticOrderCreation'}">
8
+        自动建单配置
9
+      </div>
10
+    </div>
11
+    <ng-container *ngFor="let item of dictionaryKeyList">
12
+      <div class="list" *ngIf="!loading && activeDictionaryKey.id === item.id">
13
+        <!-- 特性配置 -->
14
+        <div *ngIf="tabModalName=='characteristics'">
15
+          <div class="timeRange">
16
+            <div class="timeRangeTitle green">默认时间区间1</div>
17
+            <div class="timeRangeActive">
18
+              有效时间范围:
19
+              <span>
20
+                <nz-time-picker [(ngModel)]="item.postData.ibActiveStartTime1" nzFormat="HH:mm" nzPlaceHolder="开始时间1"></nz-time-picker>
21
+                ~
22
+                <nz-time-picker [(ngModel)]="item.postData.ibActiveEndTime1" nzFormat="HH:mm" nzPlaceHolder="结束时间1"></nz-time-picker>
23
+              </span>
24
+              <span class="ml16">
25
+                <nz-time-picker [(ngModel)]="item.postData.ibActiveStartTime2" nzFormat="HH:mm" nzPlaceHolder="开始时间2"></nz-time-picker>
26
+                ~
27
+                <nz-time-picker [(ngModel)]="item.postData.ibActiveEndTime2" nzFormat="HH:mm" nzPlaceHolder="结束时间2"></nz-time-picker>
28
+              </span>
29
+            </div>
30
+            <div class="timeRangeDefault">
31
+              默认时间:
32
+              <span style="visibility: hidden;">囧囧</span>
33
+              <span>
34
+                <nz-time-picker [(ngModel)]="item.postData.ibDefaultStartTime" nzFormat="HH:mm" nzPlaceHolder="开始时间"></nz-time-picker>
35
+                <nz-checkbox-group class="timeRangeCheckbox" [(ngModel)]="item.postData.ibDefaultDayStart"></nz-checkbox-group>
36
+                ~
37
+                <nz-time-picker class="ml8" [(ngModel)]="item.postData.ibDefaultEndTime" nzFormat="HH:mm" nzPlaceHolder="结束时间"></nz-time-picker>
38
+                <nz-checkbox-group class="timeRangeCheckbox" [(ngModel)]="item.postData.ibDefaultDayEnd"></nz-checkbox-group>
39
+              </span>
40
+            </div>
41
+          </div>
42
+
43
+          <div class="timeRange">
44
+            <div class="timeRangeTitle green">默认时间区间2</div>
45
+            <div class="timeRangeActive">
46
+              有效时间范围:
47
+              <span>
48
+                <nz-time-picker [(ngModel)]="item.postData.ib2ActiveStartTime1" nzFormat="HH:mm" nzPlaceHolder="开始时间1"></nz-time-picker>
49
+                ~
50
+                <nz-time-picker [(ngModel)]="item.postData.ib2ActiveEndTime1" nzFormat="HH:mm" nzPlaceHolder="结束时间1"></nz-time-picker>
51
+              </span>
52
+              <span class="ml16">
53
+                <nz-time-picker [(ngModel)]="item.postData.ib2ActiveStartTime2" nzFormat="HH:mm" nzPlaceHolder="开始时间2"></nz-time-picker>
54
+                ~
55
+                <nz-time-picker [(ngModel)]="item.postData.ib2ActiveEndTime2" nzFormat="HH:mm" nzPlaceHolder="结束时间2"></nz-time-picker>
56
+              </span>
57
+            </div>
58
+            <div class="timeRangeDefault">
59
+              默认时间:
60
+              <span style="visibility: hidden;">囧囧</span>
61
+              <span>
62
+                <nz-time-picker [(ngModel)]="item.postData.ib2DefaultStartTime" nzFormat="HH:mm" nzPlaceHolder="开始时间"></nz-time-picker>
63
+                <nz-checkbox-group class="timeRangeCheckbox" [(ngModel)]="item.postData.ib2DefaultDayStart"></nz-checkbox-group>
64
+                ~
65
+                <nz-time-picker class="ml8" [(ngModel)]="item.postData.ib2DefaultEndTime" nzFormat="HH:mm" nzPlaceHolder="结束时间"></nz-time-picker>
66
+                <nz-checkbox-group class="timeRangeCheckbox" [(ngModel)]="item.postData.ib2DefaultDayEnd"></nz-checkbox-group>
67
+              </span>
68
+            </div>
69
+          </div>
70
+        </div>
71
+        <!-- 自动建单配置 -->
72
+        <div *ngIf="tabModalName=='automaticOrderCreation'">
73
+          <!-- 自动建单 -->
74
+        </div>
75
+        <div class="bottom">
76
+          <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>
77
+        </div>
78
+      </div>
79
+    </ng-container>
80
+    <div class="list" *ngIf="loading">
81
+      <div class="loadingFull display_flex justify-content_flex-center align-items_center">
82
+        <div class="loadingFullInner">
83
+          <img src="../../../assets/images/loading.gif" alt="">
84
+          <div>加载中...</div>
85
+        </div>
86
+      </div>
87
+    </div>
88
+  </div>
89
+</div>

+ 700 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-batch/configuration-inspect-batch.component.less

@@ -0,0 +1,700 @@
1
+@import "../../../../../../src/theme.less";
2
+:host {
3
+  .TaskTypeManagement {
4
+    height: calc(100vh - 136px);
5
+    background: #f9fafb;
6
+    overflow: hidden;
7
+    padding: 16px 20px;
8
+
9
+    .pagination {
10
+      margin-top: 14px;
11
+      margin-bottom: 14px;
12
+      bottom: 12px;
13
+      right: 5px;
14
+    }
15
+
16
+    .taskType {
17
+      float: left;
18
+      width: 24%;
19
+      height: 100%;
20
+      border: 1px solid #e5e9ed;
21
+      background: #fff;
22
+      color: #333;
23
+      font-size: 14px;
24
+      position: relative;
25
+      overflow: hidden;
26
+
27
+      .title {
28
+        width: 100%;
29
+        height: 40px;
30
+        line-height: 40px;
31
+        padding-left: 16px;
32
+        border-bottom: 1px solid #e5e9ed;
33
+        position: relative;
34
+        background: #fff;
35
+        z-index: 2;
36
+      }
37
+
38
+      .operate {
39
+        width: 100%;
40
+        border-bottom: 1px solid #e5e9ed;
41
+        position: relative;
42
+        background: #fff;
43
+        z-index: 2;
44
+        display: flex;
45
+
46
+        .item {
47
+          flex: 1;
48
+          height: 34px;
49
+          line-height: 34px;
50
+          border-right: 1px solid #e5e9ed;
51
+          text-align: center;
52
+          color: #666; // cursor: default;
53
+          cursor: pointer;
54
+
55
+          &:hover {
56
+            color: @primary-color;
57
+            background: #f0f6ed;
58
+          }
59
+
60
+          &:nth-last-child(1) {
61
+            border: none;
62
+          }
63
+        }
64
+      }
65
+
66
+      .taskTypes {
67
+        // width: 110%;
68
+        width: 100%;
69
+        height: 92%;
70
+        // padding-right: 10%;
71
+        overflow-y: auto;
72
+        z-index: 1;
73
+        padding-bottom: 30px;
74
+
75
+        .itemChoice {
76
+          color: @primary-color;
77
+          background: #f0f6ed;
78
+        }
79
+
80
+        .item {
81
+          width: 100%;
82
+          height: 34px;
83
+          line-height: 34px;
84
+          text-align: center;
85
+          cursor: pointer;
86
+          overflow: hidden;
87
+          text-overflow: ellipsis;
88
+          white-space: nowrap;
89
+
90
+          &:hover {
91
+            color: @primary-color;
92
+            background: #f0f6ed;
93
+          }
94
+
95
+          &.checked {
96
+            color: @primary-color;
97
+            background: #f0f6ed;
98
+          }
99
+        }
100
+      }
101
+    }
102
+
103
+    //任务类型管理-主体
104
+    .taskTypeInfo {
105
+      height: 100%;
106
+      border: 1px solid #e5e9ed;
107
+      background: #fff;
108
+      color: #333;
109
+      position: relative;
110
+
111
+      .top {
112
+        height: 61px;
113
+        line-height: 60px;
114
+        display: flex;
115
+        align-items: center;
116
+        border-bottom: 1px solid #e5e9ed;
117
+        position: relative;
118
+        z-index: 2;
119
+
120
+        .items {
121
+          background: #f0f6ed;
122
+        }
123
+
124
+        & > div {
125
+          border-right: 1px solid #e5e9ed;
126
+          width: 30%;
127
+          text-align: center; // display: flex;
128
+          // align-items: center;
129
+          cursor: pointer;
130
+
131
+          &:hover {
132
+            background: #f0f6ed;
133
+          }
134
+        }
135
+
136
+        &:nth-last-child(4) {
137
+          border: none;
138
+        }
139
+      }
140
+
141
+      .list {
142
+        width: 100%; // height: 100%;
143
+        padding: 16px; // position: absolute;
144
+        // top: 0;
145
+        // padding-top: 90px;
146
+        background: #fff;
147
+        height: 89%;
148
+        overflow: auto;
149
+
150
+        nz-form-label {
151
+          margin-left: 0px !important;
152
+        }
153
+
154
+        & > div {
155
+          background: #f9fafb;
156
+          border: 1px solid #e5e9ed;
157
+          border-radius: 10px 10px 0px 0px;
158
+          padding: 24px 120px;
159
+
160
+          .label {
161
+            margin-left: 16px;
162
+            font-size: 14px;
163
+            color: #333;
164
+          }
165
+        }
166
+
167
+        // 规则信息
168
+        .ruleList {
169
+          padding: 15px 15px 0px 15px;
170
+          background: #fff;
171
+
172
+          .table {
173
+            width: 100%;
174
+            height: 100%;
175
+
176
+            .box {
177
+              // background: #f9fafb;
178
+              // border: 1px solid #e5e9ed;
179
+              border-radius: 5px;
180
+              position: relative;
181
+
182
+              .table_title {
183
+                font-size: 18px;
184
+                margin: 14px 0px;
185
+                text-align: center;
186
+              }
187
+
188
+              .thead {
189
+                background-image: linear-gradient(to right, @bg-start, @bg-end);
190
+
191
+                th {
192
+                  background: transparent;
193
+                  color: #fff;
194
+                  text-align: center;
195
+                  font-size: 14px;
196
+                }
197
+              }
198
+
199
+              .ant-table-body {
200
+                border-bottom: 1px solid #e5e9ed;
201
+                background: #f9fafb;
202
+              }
203
+
204
+              .ant-table-tbody {
205
+                background: #f9fafb;
206
+                border: 1px solid #e5e9ed;
207
+
208
+                .zzBontton {
209
+                  & > td {
210
+                    border-bottom: 1px solid #e5e9ed;
211
+                  }
212
+                }
213
+
214
+                tr {
215
+                  text-align: center;
216
+                  font-size: 14px;
217
+                  border: none;
218
+                  color: #333;
219
+                  overflow: hidden;
220
+
221
+                  .lin {
222
+                    width: 68.2%;
223
+                    height: 2rem;
224
+                    border-bottom: 0.1rem solid #e5e9ed;
225
+                    position: absolute;
226
+                    text-align: center;
227
+                    margin-left: 0%;
228
+                    margin-top: -0.8%;
229
+                    transform: rotate(6.5deg);
230
+                  }
231
+
232
+                  td {
233
+                    border: none;
234
+
235
+                    nz-input-number {
236
+                      width: 50px;
237
+                    }
238
+
239
+                    .coop {
240
+                      .line {
241
+                        margin: 10px;
242
+                      }
243
+
244
+                      span:nth-child(2n-1) {
245
+                        cursor: pointer;
246
+
247
+                        &:hover {
248
+                          color: @primary-color;
249
+                        }
250
+
251
+                        &:active {
252
+                          color: @primary-color;
253
+                        }
254
+                      }
255
+                    }
256
+                  }
257
+                }
258
+
259
+                tr:nth-child(even) {
260
+                  background: #fff;
261
+                }
262
+              }
263
+            }
264
+          }
265
+        }
266
+
267
+        //运送过程
268
+        .ysgcItem {
269
+          padding: 0px 0px 0px 0px; // background: #fff;
270
+
271
+          .ysgc_top {
272
+            height: 88px;
273
+            background: #fff;
274
+            border-radius: 10px 10px 0px 0px;
275
+            padding: 15px 22px 0px 22px;
276
+
277
+            .title {
278
+              span {
279
+                font-size: 18px;
280
+              }
281
+            }
282
+
283
+            .carrItems {
284
+              color: @primary-color;
285
+              border-color: @primary-color !important;
286
+            }
287
+
288
+            .process {
289
+              width: 80%;
290
+              display: flex;
291
+              justify-content: center;
292
+              align-items: center;
293
+              margin: 5px auto;
294
+              font-size: 14px;
295
+
296
+              .carrItem {
297
+                height: 40px;
298
+                line-height: 28px;
299
+                cursor: pointer;
300
+                display: flex;
301
+                justify-content: center;
302
+                align-items: center;
303
+
304
+                .carrItem_icon {
305
+                  width: 35px;
306
+                  height: 35px;
307
+                  border: 1px solid #e5e9ed;
308
+                  border-radius: 50%;
309
+                  text-align: center;
310
+                  line-height: 35px;
311
+                  margin-right: 10px;
312
+
313
+                  i {
314
+                    font-size: 18px;
315
+                  }
316
+                }
317
+              }
318
+
319
+              .carrItem1 {
320
+                float: left;
321
+                width: 45%;
322
+                height: 40px;
323
+                line-height: 28px;
324
+                padding-left: 10%;
325
+                cursor: pointer;
326
+
327
+                .carrItem_icon {
328
+                  width: 35px;
329
+                  height: 35px;
330
+                  border: 1px solid #e5e9ed;
331
+                  border-radius: 50%;
332
+                  text-align: center;
333
+                  line-height: 35px;
334
+                  float: left;
335
+                  margin-right: 10px;
336
+
337
+                  i {
338
+                    font-size: 18px;
339
+                  }
340
+                }
341
+              }
342
+            }
343
+          }
344
+
345
+          .ysgc_cont {
346
+            padding: 0px 240px 24px 240px;
347
+
348
+            textarea {
349
+              padding-right: 10%;
350
+            }
351
+
352
+            .icon_btn {
353
+              cursor: pointer;
354
+              font-size: 18px;
355
+            }
356
+
357
+            .icon_text {
358
+              display: block;
359
+              cursor: pointer;
360
+              position: relative;
361
+              right: 5px;
362
+            }
363
+
364
+            .item_type_cont {
365
+              height: 70px;
366
+              padding-top: 4px;
367
+
368
+              & > div {
369
+                height: 65px;
370
+                border: 1px solid #e5e9ed;
371
+                border-radius: 5px;
372
+                background: #fff;
373
+
374
+                .item_type_cont_L {
375
+                  height: 100%;
376
+                  width: 90%;
377
+                  float: left;
378
+                  padding: 2px 12px;
379
+                  overflow: auto;
380
+
381
+                  .item_yq {
382
+                    width: 24%;
383
+                    height: 28px;
384
+                    display: inline-block;
385
+                    border: 1px solid #e5e9ed;
386
+                    border-radius: 20px;
387
+                    text-align: center;
388
+                    line-height: 26px;
389
+                    background: #f9fafb;
390
+                    margin-right: 1%;
391
+                    margin-bottom: 2px;
392
+                    font-size: 12px;
393
+                    padding-left: 8px;
394
+
395
+                    span {
396
+                      width: 75%;
397
+                      float: left;
398
+                      overflow: hidden;
399
+                      text-overflow: ellipsis;
400
+                      white-space: nowrap;
401
+                    }
402
+
403
+                    i {
404
+                      font-size: 14px;
405
+                      color: #999;
406
+                      cursor: pointer;
407
+                    }
408
+                  }
409
+                }
410
+
411
+                .item_type_cont_R {
412
+                  height: 100%;
413
+                  width: 10%;
414
+                  float: right;
415
+                  text-align: center;
416
+                  padding-top: 15px;
417
+                  border-left: 1px solid #e5e9ed;
418
+                  cursor: pointer;
419
+
420
+                  i {
421
+                    display: block;
422
+                    font-size: 16px;
423
+                  }
424
+
425
+                  i:hover {
426
+                    color: @primary-color;
427
+                  }
428
+
429
+                  .icon_text {
430
+                    right: 1px;
431
+                  }
432
+                }
433
+              }
434
+            }
435
+          }
436
+        }
437
+
438
+        //关联信息
439
+        .glxxItem {
440
+          padding: 10px 15px 0px 15px;
441
+          background: #fff;
442
+
443
+          .tab_btn {
444
+            cursor: pointer;
445
+          }
446
+
447
+          .tab_btn:hover {
448
+            color: @primary-color;
449
+          }
450
+
451
+          .table_title {
452
+            font-size: 18px;
453
+            margin: 14px 0px;
454
+            text-align: center;
455
+          }
456
+
457
+          .thead {
458
+            background-image: linear-gradient(to right, @bg-start, @bg-end);
459
+
460
+            th {
461
+              background: transparent;
462
+              color: #fff;
463
+              text-align: center;
464
+              font-size: 14px;
465
+            }
466
+          }
467
+
468
+          .ant-table-body {
469
+            // border-bottom: 1px solid #e5e9ed;
470
+            background: #f9fafb;
471
+          }
472
+
473
+          .ant-table-tbody {
474
+            background: #f9fafb;
475
+            border: 1px solid #e5e9ed;
476
+
477
+            tr {
478
+              text-align: center;
479
+              font-size: 14px;
480
+              border: none;
481
+              color: #333;
482
+
483
+              td {
484
+                border: none; // font-size: 14px;
485
+
486
+                nz-input-number {
487
+                  width: 40px;
488
+                }
489
+
490
+                .coop {
491
+                  .line {
492
+                    margin: 10px;
493
+                  }
494
+
495
+                  span:nth-child(2n-1) {
496
+                    cursor: pointer;
497
+
498
+                    &:hover {
499
+                      color: @primary-color;
500
+                    }
501
+
502
+                    &:active {
503
+                      color: @primary-color;
504
+                    }
505
+                  }
506
+                }
507
+              }
508
+            }
509
+
510
+            tr:nth-child(even) {
511
+              background: #fff;
512
+            }
513
+          }
514
+        }
515
+
516
+        // 开通科室
517
+        .ktksItem {
518
+          padding: 0px 0px 0px 0px;
519
+          background: #fff;
520
+
521
+          .top {
522
+            width: 100%; // padding-bottom: 7px;
523
+            // border-bottom: 1px solid #e5e9ed;
524
+            position: relative;
525
+            overflow: hidden;
526
+            z-index: 2;
527
+            display: flex;
528
+            align-items: center;
529
+            justify-content: space-between;
530
+
531
+            .top_L {
532
+              width: 70%;
533
+              text-align: left;
534
+              display: flex;
535
+              flex-wrap: wrap;
536
+              align-items: center;
537
+              padding: 0 4px;
538
+              .top_L_item {
539
+                margin-left: 4px;
540
+              }
541
+
542
+              .label {
543
+                font-size: 14px;
544
+                color: #333;
545
+                margin-left: 0;
546
+              }
547
+
548
+              nz-select {
549
+                font-size: 12px;
550
+                width: 100px;
551
+              }
552
+
553
+              input {
554
+                font-size: 12px;
555
+                width: 100px;
556
+              }
557
+            }
558
+
559
+            .top_R {
560
+              border: 0px;
561
+
562
+              .btn {
563
+                margin-left: 10px;
564
+              }
565
+            }
566
+          }
567
+
568
+          .ktksItemList {
569
+            padding: 10px 15px 0px 15px;
570
+            .table {
571
+              min-height: 528px;
572
+            }
573
+
574
+            .operate {
575
+              float: right;
576
+              margin-bottom: 5px;
577
+
578
+              span {
579
+                font-size: 14px;
580
+              }
581
+
582
+              .num {
583
+                font-size: 18px;
584
+                color: @primary-color;
585
+              }
586
+            }
587
+
588
+            .thead {
589
+              background-image: linear-gradient(to right, @bg-start, @bg-end);
590
+
591
+              th {
592
+                background: transparent;
593
+                color: #fff;
594
+                text-align: center;
595
+                font-size: 14px;
596
+              }
597
+            }
598
+
599
+            .ant-table-body {
600
+              border-bottom: 1px solid #e5e9ed;
601
+              background: #f9fafb;
602
+            }
603
+
604
+            .ant-table-tbody {
605
+              background: #f9fafb;
606
+              border: 1px solid #e5e9ed;
607
+
608
+              .zzBontton {
609
+                & > td {
610
+                  border-bottom: 1px solid #e5e9ed;
611
+                }
612
+              }
613
+
614
+              tr {
615
+                text-align: center;
616
+                font-size: 14px;
617
+                border: none;
618
+                color: #333;
619
+
620
+                td {
621
+                  border: none; // font-size: 14px;
622
+
623
+                  nz-input-number {
624
+                    width: 40px;
625
+                  }
626
+
627
+                  .coop {
628
+                    .line {
629
+                      margin: 10px;
630
+                    }
631
+
632
+                    span:nth-child(2n-1) {
633
+                      cursor: pointer;
634
+
635
+                      &:hover {
636
+                        color: @primary-color;
637
+                      }
638
+
639
+                      &:active {
640
+                        color: @primary-color;
641
+                      }
642
+                    }
643
+                  }
644
+                }
645
+              }
646
+
647
+              tr:nth-child(even) {
648
+                background: #fff;
649
+              }
650
+            }
651
+          }
652
+
653
+          .pagination {
654
+            margin-top: 25px;
655
+            margin-bottom: 14px;
656
+            bottom: 12px;
657
+            right: 5px;
658
+            position: relative;
659
+            height: 30px;
660
+            .page {
661
+              position: absolute;
662
+              right: 5px;
663
+            }
664
+          }
665
+        }
666
+
667
+        .bottom {
668
+          height: 60px;
669
+          border-radius: 0px 0px 10px 10px;
670
+          padding: 10px 240px 0px 240px;
671
+          border-top: 0px;
672
+
673
+          button {
674
+            width: 80px;
675
+            height: 34px;
676
+            display: block;
677
+            margin: 0 auto;
678
+          }
679
+        }
680
+      }
681
+    }
682
+  }
683
+  .timeRange{
684
+    margin-bottom: 56px;
685
+    &:last-of-type{
686
+      margin-bottom: 0;
687
+    }
688
+    .timeRangeActive{
689
+      margin-top: 16px;
690
+      padding-left: 60px;
691
+    }
692
+    .timeRangeDefault{
693
+      margin-top: 16px;
694
+      padding-left: 60px;
695
+    }
696
+    .timeRangeCheckbox{
697
+      margin-left: 16px;
698
+    }
699
+  }
700
+}

+ 226 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-batch/configuration-inspect-batch.component.ts

@@ -0,0 +1,226 @@
1
+import { Component, OnInit, ViewChild, Input } from "@angular/core";
2
+import { ToolService } from 'src/app/services/tool.service';
3
+import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
4
+import { NzMessageService } from 'ng-zorro-antd';
5
+import { v4 as uuidv4, validate as uuidValidate } from 'uuid';
6
+import { addDays, startOfMinute, endOfMinute, set, getYear, getMonth, getDate, format } from 'date-fns';
7
+import { MainService } from 'src/app/services/main.service';
8
+
9
+@Component({
10
+  selector: "app-configuration-inspect-batch",
11
+  templateUrl: "./configuration-inspect-batch.component.html",
12
+  styleUrls: ["./configuration-inspect-batch.component.less"],
13
+})
14
+export class ConfigurationInspectBatchComponent implements OnInit {
15
+  @Input() activeDictionaryKey: any;
16
+  @Input() dictionaryKeyList: any;
17
+  constructor(
18
+    private mainService: MainService,
19
+    private tool: ToolService,
20
+    private message: NzMessageService,
21
+  ) {}
22
+
23
+  ngOnInit() {
24
+    this.tabModal('characteristics');
25
+    this.init();
26
+  }
27
+
28
+ tabModalName:string = 'characteristics'; //当前选中的tab
29
+ loading:boolean = false; //页面加载的loading
30
+ hosId = this.tool.getCurrentHospital().id; //当前院区
31
+ tasktype:any = {};// 任务类型
32
+ configs:any = {};// 配置
33
+ // 切换tab
34
+ tabModal(tabModalName:string){
35
+   this.tabModalName = tabModalName;
36
+ }
37
+ // 保存
38
+ btnLoading: boolean = false; //提交按钮loading状态
39
+ submitForm() {
40
+   if(!this.tasktype.id){
41
+     this.message.create("warning", "请先配置任务类型!");
42
+     return;
43
+   }
44
+
45
+   // 默认时间区间1
46
+
47
+   if(
48
+     (this.activeDictionaryKey.postData.ibActiveStartTime1 && !this.activeDictionaryKey.postData.ibActiveEndTime1) ||
49
+     (!this.activeDictionaryKey.postData.ibActiveStartTime1 && this.activeDictionaryKey.postData.ibActiveEndTime1) ||
50
+     (this.activeDictionaryKey.postData.ibActiveStartTime2 && !this.activeDictionaryKey.postData.ibActiveEndTime2) ||
51
+     (!this.activeDictionaryKey.postData.ibActiveStartTime2 && this.activeDictionaryKey.postData.ibActiveEndTime2)
52
+   ){
53
+     this.message.create("warning", "【默认时间区间1】的【有效时间范围】请完整填写开始时间与结束时间!");
54
+     return;
55
+   }else if(
56
+     (this.activeDictionaryKey.postData.ibActiveStartTime1 && this.activeDictionaryKey.postData.ibActiveEndTime1 && +this.activeDictionaryKey.postData.ibActiveStartTime1 > +this.activeDictionaryKey.postData.ibActiveEndTime1) ||
57
+     (this.activeDictionaryKey.postData.ibActiveStartTime2 && this.activeDictionaryKey.postData.ibActiveEndTime2 && +this.activeDictionaryKey.postData.ibActiveStartTime2 > +this.activeDictionaryKey.postData.ibActiveEndTime2)
58
+   ){
59
+    // 王满测试说有问题,要求去掉校验
60
+    // 开发无法复现问题,暂时注释
61
+    //  this.message.create("warning", "【默认时间区间1】的【有效时间范围】开始时间不能大于结束时间!");
62
+    //  return;
63
+   }
64
+
65
+   if(
66
+     (this.activeDictionaryKey.postData.ibDefaultStartTime && !this.activeDictionaryKey.postData.ibDefaultEndTime) ||
67
+     (!this.activeDictionaryKey.postData.ibDefaultStartTime && this.activeDictionaryKey.postData.ibDefaultEndTime)
68
+   ){
69
+     this.message.create("warning", "【默认时间区间1】的【默认时间】请完整填写开始时间与结束时间!");
70
+     return;
71
+   }else if(
72
+     this.activeDictionaryKey.postData.ibDefaultStartTime &&
73
+     this.activeDictionaryKey.postData.ibDefaultEndTime &&
74
+     (this.activeDictionaryKey.postData.ibDefaultDayStart[0].checked ? +addDays(this.activeDictionaryKey.postData.ibDefaultStartTime, 1) : +this.activeDictionaryKey.postData.ibDefaultStartTime) > (this.activeDictionaryKey.postData.ibDefaultDayEnd[0].checked ? +addDays(this.activeDictionaryKey.postData.ibDefaultEndTime, 1) : +this.activeDictionaryKey.postData.ibDefaultEndTime)
75
+   ){
76
+     this.message.create("warning", "【默认时间区间1】的【默认时间】开始时间不能大于结束时间!");
77
+     return;
78
+   }
79
+
80
+   // 默认时间区间2
81
+
82
+   if(
83
+     (this.activeDictionaryKey.postData.ib2ActiveStartTime1 && !this.activeDictionaryKey.postData.ib2ActiveEndTime1) ||
84
+     (!this.activeDictionaryKey.postData.ib2ActiveStartTime1 && this.activeDictionaryKey.postData.ib2ActiveEndTime1) ||
85
+     (this.activeDictionaryKey.postData.ib2ActiveStartTime2 && !this.activeDictionaryKey.postData.ib2ActiveEndTime2) ||
86
+     (!this.activeDictionaryKey.postData.ib2ActiveStartTime2 && this.activeDictionaryKey.postData.ib2ActiveEndTime2)
87
+   ){
88
+     this.message.create("warning", "【默认时间区间1】的【有效时间范围】请完整填写开始时间与结束时间!");
89
+     return;
90
+   }else if(
91
+     (this.activeDictionaryKey.postData.ib2ActiveStartTime1 && this.activeDictionaryKey.postData.ib2ActiveEndTime1 && +this.activeDictionaryKey.postData.ib2ActiveStartTime1 > +this.activeDictionaryKey.postData.ib2ActiveEndTime1) ||
92
+     (this.activeDictionaryKey.postData.ib2ActiveStartTime2 && this.activeDictionaryKey.postData.ib2ActiveEndTime2 && +this.activeDictionaryKey.postData.ib2ActiveStartTime2 > +this.activeDictionaryKey.postData.ib2ActiveEndTime2)
93
+   ){
94
+    // 王满测试说有问题,要求去掉校验
95
+    // 开发无法复现问题,暂时注释
96
+    //  this.message.create("warning", "【默认时间区间1】的【有效时间范围】开始时间不能大于结束时间!");
97
+    //  return;
98
+   }
99
+
100
+   if(
101
+     (this.activeDictionaryKey.postData.ib2DefaultStartTime && !this.activeDictionaryKey.postData.ib2DefaultEndTime) ||
102
+     (!this.activeDictionaryKey.postData.ib2DefaultStartTime && this.activeDictionaryKey.postData.ib2DefaultEndTime)
103
+   ){
104
+     this.message.create("warning", "【默认时间区间1】的【默认时间】请完整填写开始时间与结束时间!");
105
+     return;
106
+   }else if(
107
+     this.activeDictionaryKey.postData.ib2DefaultStartTime &&
108
+     this.activeDictionaryKey.postData.ib2DefaultEndTime &&
109
+     (this.activeDictionaryKey.postData.ib2DefaultDayStart[0].checked ? +addDays(this.activeDictionaryKey.postData.ib2DefaultStartTime, 1) : +this.activeDictionaryKey.postData.ib2DefaultStartTime) > (this.activeDictionaryKey.postData.ib2DefaultDayEnd[0].checked ? +addDays(this.activeDictionaryKey.postData.ib2DefaultEndTime, 1) : +this.activeDictionaryKey.postData.ib2DefaultEndTime)
110
+   ){
111
+     this.message.create("warning", "【默认时间区间1】的【默认时间】开始时间不能大于结束时间!");
112
+     return;
113
+   }
114
+
115
+   let postData:any = {
116
+     ...this.configs,
117
+     taskType: this.tasktype.id,
118
+     hosId: this.hosId,
119
+     ibActiveStartTime1: this.activeDictionaryKey.postData.ibActiveStartTime1 ? format(startOfMinute(this.activeDictionaryKey.postData.ibActiveStartTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
120
+     ibActiveEndTime1: this.activeDictionaryKey.postData.ibActiveEndTime1 ? format(endOfMinute(this.activeDictionaryKey.postData.ibActiveEndTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
121
+     ibActiveStartTime2: this.activeDictionaryKey.postData.ibActiveStartTime2 ? format(startOfMinute(this.activeDictionaryKey.postData.ibActiveStartTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
122
+     ibActiveEndTime2: this.activeDictionaryKey.postData.ibActiveEndTime2 ? format(endOfMinute(this.activeDictionaryKey.postData.ibActiveEndTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
123
+     ibDefaultStartTime: this.activeDictionaryKey.postData.ibDefaultStartTime ? format(startOfMinute(this.activeDictionaryKey.postData.ibDefaultStartTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
124
+     ibDefaultEndTime: this.activeDictionaryKey.postData.ibDefaultEndTime ? format(endOfMinute(this.activeDictionaryKey.postData.ibDefaultEndTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
125
+     ibDefaultDayStart: this.activeDictionaryKey.postData.ibDefaultDayStart[0].checked ? 1 : 0,
126
+     ibDefaultDayEnd: this.activeDictionaryKey.postData.ibDefaultDayEnd[0].checked ? 1 : 0,
127
+     ib2ActiveStartTime1: this.activeDictionaryKey.postData.ib2ActiveStartTime1 ? format(startOfMinute(this.activeDictionaryKey.postData.ib2ActiveStartTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
128
+     ib2ActiveEndTime1: this.activeDictionaryKey.postData.ib2ActiveEndTime1 ? format(endOfMinute(this.activeDictionaryKey.postData.ib2ActiveEndTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
129
+     ib2ActiveStartTime2: this.activeDictionaryKey.postData.ib2ActiveStartTime2 ? format(startOfMinute(this.activeDictionaryKey.postData.ib2ActiveStartTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
130
+     ib2ActiveEndTime2: this.activeDictionaryKey.postData.ib2ActiveEndTime2 ? format(endOfMinute(this.activeDictionaryKey.postData.ib2ActiveEndTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
131
+     ib2DefaultStartTime: this.activeDictionaryKey.postData.ib2DefaultStartTime ? format(startOfMinute(this.activeDictionaryKey.postData.ib2DefaultStartTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
132
+     ib2DefaultEndTime: this.activeDictionaryKey.postData.ib2DefaultEndTime ? format(endOfMinute(this.activeDictionaryKey.postData.ib2DefaultEndTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
133
+     ib2DefaultDayStart: this.activeDictionaryKey.postData.ib2DefaultDayStart[0].checked ? 1 : 0,
134
+     ib2DefaultDayEnd: this.activeDictionaryKey.postData.ib2DefaultDayEnd[0].checked ? 1 : 0,
135
+   };
136
+   console.log(postData);
137
+   this.btnLoading = true;
138
+   this.mainService
139
+     .simplePost("addData", "taskTypeConfig", postData)
140
+     .subscribe((result) => {
141
+       this.btnLoading = false;
142
+       if (result.status == 200) {
143
+         this.message.success("保存成功!");
144
+         this.getConfig();
145
+       }else{
146
+         this.message.success("保存失败!");
147
+       }
148
+     });
149
+ }
150
+
151
+ //初始化
152
+ init() {
153
+   this.loading = true;
154
+   this.getTaskType();
155
+ }
156
+
157
+ //获取任务类型
158
+ getTaskType() {
159
+   this.loading = true;
160
+   let postData = {
161
+     idx: 0,
162
+     sum: 1,
163
+     taskType: {
164
+       simpleQuery: true,
165
+       hosId: {
166
+         id: this.hosId
167
+       },
168
+       associationType: {
169
+         key: 'association_types',
170
+         value: 'inspect',
171
+       }
172
+     }
173
+   };
174
+   this.mainService
175
+     .getFetchDataList("simple/data", "taskType", postData)
176
+     .subscribe((result) => {
177
+       this.loading = false;
178
+       if (result.status == 200) {
179
+         this.tasktype = result.list[0] || {};
180
+         this.getConfig();
181
+       }
182
+     });
183
+ }
184
+
185
+ // 获取配置
186
+ getConfig() {
187
+   this.loading = true;
188
+   let postData = {
189
+     idx: 0,
190
+     sum: 1,
191
+     taskTypeConfig: {
192
+       taskTypeDTO: {
193
+         hosId: {
194
+           id: this.hosId
195
+         },
196
+         associationType: this.tasktype.associationType,
197
+       }
198
+     }
199
+   };
200
+   this.mainService
201
+     .getFetchDataList("simple/data", "taskTypeConfig", postData)
202
+     .subscribe((result) => {
203
+       this.loading = false;
204
+       if (result.status == 200) {
205
+         this.configs = result.list[0] || {};
206
+         this.activeDictionaryKey.postData.ibActiveStartTime1 = this.configs.ibActiveStartTime1 ? new Date(this.configs.ibActiveStartTime1) : undefined;
207
+         this.activeDictionaryKey.postData.ibActiveEndTime1 = this.configs.ibActiveEndTime1 ? new Date(this.configs.ibActiveEndTime1) : undefined;
208
+         this.activeDictionaryKey.postData.ibActiveStartTime2 = this.configs.ibActiveStartTime2 ? new Date(this.configs.ibActiveStartTime2) : undefined;
209
+         this.activeDictionaryKey.postData.ibActiveEndTime2 = this.configs.ibActiveEndTime2 ? new Date(this.configs.ibActiveEndTime2) : undefined;
210
+         this.activeDictionaryKey.postData.ibDefaultStartTime = this.configs.ibDefaultStartTime ? new Date(this.configs.ibDefaultStartTime) : undefined;
211
+         this.activeDictionaryKey.postData.ibDefaultEndTime = this.configs.ibDefaultEndTime ? new Date(this.configs.ibDefaultEndTime) : undefined;
212
+         this.activeDictionaryKey.postData.ibDefaultDayStart[0].checked = this.configs.ibDefaultDayStart == 1;
213
+         this.activeDictionaryKey.postData.ibDefaultDayEnd[0].checked = this.configs.ibDefaultDayEnd == 1;
214
+
215
+         this.activeDictionaryKey.postData.ib2ActiveStartTime1 = this.configs.ib2ActiveStartTime1 ? new Date(this.configs.ib2ActiveStartTime1) : undefined;
216
+         this.activeDictionaryKey.postData.ib2ActiveEndTime1 = this.configs.ib2ActiveEndTime1 ? new Date(this.configs.ib2ActiveEndTime1) : undefined;
217
+         this.activeDictionaryKey.postData.ib2ActiveStartTime2 = this.configs.ib2ActiveStartTime2 ? new Date(this.configs.ib2ActiveStartTime2) : undefined;
218
+         this.activeDictionaryKey.postData.ib2ActiveEndTime2 = this.configs.ib2ActiveEndTime2 ? new Date(this.configs.ib2ActiveEndTime2) : undefined;
219
+         this.activeDictionaryKey.postData.ib2DefaultStartTime = this.configs.ib2DefaultStartTime ? new Date(this.configs.ib2DefaultStartTime) : undefined;
220
+         this.activeDictionaryKey.postData.ib2DefaultEndTime = this.configs.ib2DefaultEndTime ? new Date(this.configs.ib2DefaultEndTime) : undefined;
221
+         this.activeDictionaryKey.postData.ib2DefaultDayStart[0].checked = this.configs.ib2DefaultDayStart == 1;
222
+         this.activeDictionaryKey.postData.ib2DefaultDayEnd[0].checked = this.configs.ib2DefaultDayEnd == 1;
223
+       }
224
+     });
225
+ }
226
+}

+ 20 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-batch/configuration-inspect-batch.module.ts

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

+ 132 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.html

@@ -0,0 +1,132 @@
1
+<div class="content priority">
2
+  <div class="contentInner">
3
+    <div class="list-template" id="wechatTable">
4
+      <div class="list-template__content">
5
+        <div class="list-template__bottom">
6
+          <div class="list-template__top" nz-row>
7
+            <div nz-col nzXl='17' class="list-template__searchBox">
8
+              <div class="list-template__searchItem">
9
+                <span class="label">检查类型</span>:
10
+                <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择检查类型" [(ngModel)]="queryData.extra5" nzAllowClear nzServerSearch>
11
+                  <nz-option *ngFor="let option of typeList" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
12
+                </nz-select>
13
+              </div>
14
+              <div class="list-template__searchItem">
15
+                <span class="label">检查科室</span>:
16
+                <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择检查科室" [(ngModel)]="queryData.extra4" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" (nzOpenChange)="openChangeDept($event)" (ngModelChange)="setIsSelecting(true)">
17
+                  <ng-container *ngFor="let option of deptList">
18
+                    <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
19
+                  </ng-container>
20
+                  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
21
+                    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
22
+                  </nz-option>
23
+                </nz-select>
24
+              </div>
25
+              <div class="list-template__searchItem">
26
+                <span class="label">项目名称</span>:
27
+                <input nz-input class="formItem" placeholder="请输入项目名称" [(ngModel)]="queryData.name" />
28
+              </div>
29
+            </div>
30
+            <div nz-col nzXl="7" class="list-template__btns">
31
+              <button nz-button class="btn default" (click)="addWechatModal()">新增</button>
32
+              <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
33
+              <button nz-button class="btn default ml8" (click)='getList()'>搜索</button>
34
+            </div>
35
+          </div>
36
+          <nz-table class="list-template__nzTable" [nzData]="dataList" nzSize="middle" [nzShowPagination]="false"
37
+            [nzLoading]="loading1" [nzScroll]="{ y: tableWechatHeight + 'px' }">
38
+            <thead>
39
+              <tr class="thead">
40
+                <th nzWidth="20%">排序号</th>
41
+                <th nzWidth="20%">项目名称</th>
42
+                <th nzWidth="20%">检查科室</th>
43
+                <th nzWidth="20%">检查类型</th>
44
+                <th nzWidth="20%">操作</th>
45
+              </tr>
46
+            </thead>
47
+            <tbody>
48
+              <tr *ngFor="let data of dataList;let i = index">
49
+                <td>{{data.orders}}</td>
50
+                <td>{{data.name}}</td>
51
+                <td>{{data.extra4DTO?.dept}}</td>
52
+                <td>{{data.extra5DTO?.name}}</td>
53
+                <td>
54
+                  <div class="coop">
55
+                    <span (click)="showDelModal(data,'您确认要删除吗?','删除','del')">删除</span>
56
+                    <span (click)="editWechat(data)">编辑</span>
57
+                  </div>
58
+                </td>
59
+              </tr>
60
+            </tbody>
61
+          </nz-table>
62
+        </div>
63
+      </div>
64
+    </div>
65
+  </div>
66
+</div>
67
+
68
+<!-- 操作成功/失败提示框 -->
69
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
70
+  [info]="promptInfo">
71
+</app-prompt-modal>
72
+
73
+<!-- 删除模态框 -->
74
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
75
+(confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
76
+
77
+<!-- 新增/编辑模态框 -->
78
+<div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modalWechat">
79
+  <div class="modalBody">
80
+    <div class="title">{{modelName}}<i class="icon_transport transport-guanbi" (click)="hideWechatModal()"></i></div>
81
+    <div class="content">
82
+      <form nz-form [formGroup]="validateForm" class="addForm">
83
+        <nz-form-item>
84
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="orders">排序号</nz-form-label>
85
+          <nz-form-control [nzSpan]="18" nzErrorTip="请输入排序号!">
86
+            <nz-input-group>
87
+              <nz-input-number class="w100" formControlName="orders" nzPlaceHolder="请输入排序号" [nzMin]="0" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
88
+            </nz-input-group>
89
+          </nz-form-control>
90
+        </nz-form-item>
91
+        <nz-form-item>
92
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="name">项目名称</nz-form-label>
93
+          <nz-form-control [nzSpan]="18" nzErrorTip="请输入项目名称!">
94
+            <nz-input-group>
95
+              <input formControlName="name" nz-input placeholder="请输入项目名称">
96
+            </nz-input-group>
97
+          </nz-form-control>
98
+        </nz-form-item>
99
+        <nz-form-item>
100
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="extra4">检查科室</nz-form-label>
101
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择检查科室!">
102
+            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="extra4" nzPlaceHolder="请选择检查科室" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" (nzOpenChange)="openChangeDept($event)" (ngModelChange)="setIsSelecting(true)">
103
+              <ng-container *ngFor="let option of deptList">
104
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
105
+              </ng-container>
106
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
107
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
108
+              </nz-option>
109
+            </nz-select>
110
+          </nz-form-control>
111
+        </nz-form-item>
112
+        <nz-form-item>
113
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="extra5">检查项目</nz-form-label>
114
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择检查项目!">
115
+            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="extra5" nzPlaceHolder="请选择检查项目" nzServerSearch>
116
+              <ng-container *ngFor="let data of typeList">
117
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
118
+              </ng-container>
119
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
120
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
121
+              </nz-option>
122
+            </nz-select>
123
+          </nz-form-control>
124
+        </nz-form-item>
125
+      </form>
126
+    </div>
127
+    <div class=" display_flex justify-content_flex-center">
128
+      <button nzType="primary" nz-button (click)="submitWechatForm()" [nzLoading]="btnLoading">确认</button>
129
+      <button class="btn cancel" nz-button nzType="default" (click)="hideWechatModal()">取消</button>
130
+    </div>
131
+  </div>
132
+</div>

+ 288 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.less

@@ -0,0 +1,288 @@
1
+@import "../../../../../../src/theme.less";
2
+:host {
3
+  height: 100%;
4
+  display: flex;
5
+  flex-direction: column;
6
+  justify-content: space-between;
7
+  background-color: #F0F2F5;
8
+  .list-template__nzTable,
9
+  .list-template__bottom{
10
+    padding: 0!important;
11
+    border: none!important;
12
+    background: #fff!important;
13
+  }
14
+  .list-template{
15
+    width: 100%!important;
16
+    height: 100%!important;
17
+    padding: 0!important;
18
+  }
19
+  .content{
20
+    flex: 1;
21
+    min-height: 0;
22
+    display: flex;
23
+    flex-direction: column;
24
+    justify-content: space-between;
25
+    border: 1px solid #EEF3F9;
26
+    &.priority{
27
+      background-color: #fff;
28
+      .contentInner{
29
+        padding: 0 16px 16px;
30
+        border: 1px solid #E8EBEF;
31
+      }
32
+    }
33
+    .contentItem{
34
+      padding: 4px 16px;
35
+      cursor: pointer;
36
+      overflow: hidden;
37
+      text-overflow: ellipsis;
38
+      white-space: nowrap;
39
+      &.active{
40
+        color: @primary-color;
41
+        background-color: #F0F6ED;
42
+        border-radius: 4px;
43
+      }
44
+    }
45
+    .contentInner{
46
+      flex: 1;
47
+      display: flex;
48
+      justify-content: space-between;
49
+      align-items: center;
50
+      padding: 0 16px;
51
+      gap: 16px;
52
+      .contentHead{
53
+        height: 45px;
54
+        display: flex;
55
+        justify-content: space-between;
56
+        align-items: center;
57
+        gap: 16px;
58
+        padding: 0 16px;
59
+        font-size: 16px;
60
+        font-weight: bold;
61
+        border-bottom: 1px solid #D9D9D9;
62
+        .title{
63
+          overflow: hidden;
64
+          text-overflow: ellipsis;
65
+          white-space: nowrap;
66
+        }
67
+        .btns{
68
+          flex-shrink: 0;
69
+        }
70
+      }
71
+      .contentBody{
72
+        padding: 0 8px;
73
+        margin: 4px 0;
74
+        flex: 1;
75
+      }
76
+      .address{
77
+        flex: 1;
78
+        height: 100%;
79
+        background: #FFFFFF;
80
+        border: 1px solid #E8EBEF;
81
+        display: flex;
82
+        flex-direction: column;
83
+        width: 0;
84
+      }
85
+      .addressAssign{
86
+        flex: 3;
87
+        height: 100%;
88
+        background: #FFFFFF;
89
+        border: 1px solid #E8EBEF;
90
+        display: flex;
91
+        flex-direction: column;
92
+        width: 0;
93
+      }
94
+      .list-template__searchItem {
95
+        .label {
96
+          color: #333;
97
+          display: inline-block;
98
+          width: 70px;
99
+          text-align-last: justify;
100
+          text-align: justify;
101
+          &.label--big {
102
+            width: 100px;
103
+          }
104
+        }
105
+        .formItem {
106
+          width: 135px;
107
+        }
108
+      }
109
+    }
110
+    .contentBtns{
111
+      margin-bottom: 16px;
112
+      display: flex;
113
+      justify-content: center;
114
+      align-items: center;
115
+    }
116
+  }
117
+
118
+  .save {
119
+    position: fixed;
120
+    left: 0;
121
+    top: 0;
122
+    width: 100%;
123
+    height: 100%;
124
+    background: rgba(0, 0, 0, 0.4);
125
+    z-index: 99;
126
+
127
+    .tips{
128
+      margin-bottom: 16px!important;
129
+    }
130
+
131
+    .modalBody {
132
+      width: 350px;
133
+      background: #fff;
134
+      border-radius: 5px;
135
+      padding: 10px 20px;
136
+      color: #333;
137
+
138
+      .title {
139
+        width: 100%;
140
+        text-align: center;
141
+        font-size: 18px;
142
+        position: relative;
143
+
144
+        i {
145
+          position: absolute;
146
+          right: 0;
147
+          top: 0;
148
+          font-size: 20px;
149
+          color: #666;
150
+          cursor: pointer;
151
+          padding: 0 5px;
152
+        }
153
+      }
154
+
155
+      .content {
156
+        width: 310px;
157
+        background: #f9fafb;
158
+        border: 1px solid #e5e9ed;
159
+        border-radius: 5px;
160
+        overflow: hidden;
161
+        margin-top: 12px;
162
+        padding: 16px 0;
163
+
164
+        .busyList{
165
+          display: flex;
166
+          margin-bottom: 8px;
167
+          .busyContent{
168
+            margin-right: 8px;
169
+            flex: 1;
170
+          }
171
+        }
172
+
173
+        & > div {
174
+          text-align: center;
175
+          margin: 0;
176
+
177
+          &.icon {
178
+            // margin-top: 17px;
179
+
180
+            i {
181
+              color: #34b349;
182
+              font-size: 30px !important;
183
+
184
+              &.transport-wenhao {
185
+                color: #f5a523;
186
+              }
187
+
188
+              &.transport-shibai {
189
+                color: #ff3a52;
190
+              }
191
+            }
192
+          }
193
+
194
+          &.defeat {
195
+            color: #333;
196
+            font-size: 14px;
197
+          }
198
+
199
+          &:nth-child(3) {
200
+            font-size: 14px;
201
+            color: #666;
202
+          }
203
+        }
204
+        .workAssignmentTips {
205
+          font-size: 12px;
206
+        }
207
+      }
208
+
209
+      button {
210
+        margin-top: 10px;
211
+
212
+        &.btn {
213
+          margin-left: 8px;
214
+        }
215
+      }
216
+    }
217
+
218
+    // 新增
219
+    &.add {
220
+      .modalBody {
221
+        width: 480px;
222
+        height: auto;
223
+
224
+        .content {
225
+          width: 100%;
226
+          height: auto;
227
+          padding: 16px;
228
+          max-height: 497px;
229
+          overflow-y: auto;
230
+
231
+          .addForm {
232
+            .ant-form-item {
233
+              margin-bottom: 0;
234
+
235
+              .ant-form-item-label {
236
+                text-align: left;
237
+              }
238
+
239
+              .desc {
240
+                margin-top: 5px;
241
+              }
242
+            }
243
+
244
+            .datesControl {
245
+              margin-top: -16px;
246
+
247
+              .ant-form-item-label {
248
+                line-height: 40px;
249
+              }
250
+            }
251
+
252
+            .timer {
253
+              .ant-form-item-label {
254
+                width: 100%;
255
+                text-align: left;
256
+              }
257
+
258
+              .numInp {
259
+                margin-right: 5px;
260
+              }
261
+
262
+              .line {
263
+                margin-right: 5px;
264
+              }
265
+            }
266
+
267
+            .timer2 {
268
+              .ant-form-item-label {
269
+                line-height: 20px;
270
+              }
271
+            }
272
+          }
273
+
274
+          .editForm {
275
+            .ant-form-item {
276
+              margin-bottom: 15px;
277
+
278
+              .ant-form-item-label {
279
+                line-height: 14px;
280
+                text-align: left;
281
+              }
282
+            }
283
+          }
284
+        }
285
+      }
286
+    }
287
+  }
288
+}

+ 309 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.component.ts

@@ -0,0 +1,309 @@
1
+import { Component, OnInit, Input } from "@angular/core";
2
+import { Subject } from 'rxjs';
3
+import { debounceTime } from 'rxjs/operators';
4
+import { Validators, FormGroup, FormBuilder } from '@angular/forms';
5
+import { ToolService } from 'src/app/services/tool.service';
6
+import { NzMessageService } from 'ng-zorro-antd';
7
+import { MainService } from 'src/app/services/main.service';
8
+
9
+@Component({
10
+  selector: "app-configuration-inspect-inspects",
11
+  templateUrl: "./configuration-inspect-inspects.component.html",
12
+  styleUrls: ["./configuration-inspect-inspects.component.less"],
13
+})
14
+export class ConfigurationInspectInspectsComponent implements OnInit {
15
+  constructor(
16
+    private mainService: MainService,
17
+    private fb: FormBuilder,
18
+    private tool: ToolService,
19
+    private message: NzMessageService,
20
+  ) {}
21
+
22
+  coopData: any = {}; //当前操作列
23
+  hosId: any = this.tool.getCurrentHospital().id;
24
+
25
+  searchTimerSubject = new Subject();
26
+
27
+  ngOnInit() {
28
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
29
+      let fun = v[0];
30
+      fun.call(this, v[1]);
31
+    });
32
+    setTimeout(() => {
33
+      this.tableWechatHeight = document.querySelector('#wechatTable').clientHeight - document.querySelector('#wechatTable .list-template__top').clientHeight - 8 - document.querySelector('#wechatTable .thead').clientHeight;
34
+    }, 0)
35
+    this.getTypes();
36
+    this.getList();
37
+  }
38
+
39
+  // 新增弹框
40
+  modelName = ""; //模态框名称
41
+  modalWechat: boolean = false; //新增/编辑模态框
42
+  add: boolean; //true:新增;false:编辑
43
+  addWechatModal() {
44
+    this.modelName = "新增";
45
+    this.add = true; //新增
46
+    this.modalWechat = true;
47
+    this.initWechatForm();
48
+  }
49
+  //关闭新增/编辑弹框
50
+  hideWechatModal() {
51
+    this.modalWechat = false;
52
+  }
53
+
54
+  // 编辑
55
+  editWechat(data) {
56
+    console.log(data);
57
+    this.modelName = "编辑";
58
+    this.add = false;
59
+    this.modalWechat = true;
60
+    this.initWechatForm();
61
+    this.coopData = data;
62
+    this.validateForm.controls.orders.setValue(data.orders);
63
+    this.validateForm.controls.name.setValue(data.name);
64
+    this.validateForm.controls.extra4.setValue(data.extra4DTO ? data.extra4DTO.id : null);
65
+    this.validateForm.controls.extra5.setValue(data.extra5DTO ? data.extra5DTO.id : null);
66
+
67
+    data.extra4DTO && (this.deptList = [data.extra4DTO]);
68
+  }
69
+
70
+  // 新增/编辑表单提交
71
+  btnLoading: boolean = false; //提交按钮loading状态
72
+  submitWechatForm(): void {
73
+    for (const i in this.validateForm.controls) {
74
+      this.validateForm.controls[i].markAsDirty();
75
+      this.validateForm.controls[i].updateValueAndValidity();
76
+    }
77
+    if (this.validateForm.invalid) {
78
+      return;
79
+    }
80
+    console.log(this.validateForm.value);
81
+    this.btnLoading = true;
82
+    let postData:any = {};
83
+
84
+    let arr = this.dataList.filter(
85
+      (item) => item.name == this.validateForm.value.name && item.id != this.coopData.id
86
+    );
87
+
88
+    //有重复名称
89
+    if (arr.length > 0) {
90
+      this.btnLoading = false;
91
+      this.showPromptModal(
92
+        this.add ? "新增" : "编辑",
93
+        false,
94
+        `存在重复的检查项目名称【${this.validateForm.value.name}】请修改后再保存!`
95
+      );
96
+      return;
97
+    }
98
+
99
+    if (this.add) {
100
+      //增加
101
+      let n = 0;
102
+      if (this.dataList.length > 0) {
103
+        let sortArr = this.dataList.map((item) => Number(item.value));
104
+        n = Math.max.apply(null, sortArr);
105
+      } else {
106
+        n = 0;
107
+      }
108
+      postData = {
109
+        // dictionary: {
110
+          key: "inspect_check_type",
111
+          value: n + 1,
112
+          desc: "检查项目",
113
+          orders: this.validateForm.value.orders,
114
+          name: this.validateForm.value.name,
115
+          extra4: this.validateForm.value.extra4,
116
+          extra5: this.validateForm.value.extra5,
117
+        // }
118
+      };
119
+    } else {
120
+      //编辑
121
+      postData = {
122
+        // dictionary: {
123
+          ...this.coopData,
124
+          ...{
125
+            orders: this.validateForm.value.orders,
126
+            name: this.validateForm.value.name,
127
+            extra4: this.validateForm.value.extra4,
128
+            extra5: this.validateForm.value.extra5,
129
+          }
130
+        // }
131
+      };
132
+    }
133
+    this.mainService
134
+      .simplePost("addData", "dictionary", postData)
135
+      .subscribe((result) => {
136
+        this.btnLoading = false;
137
+        this.hideWechatModal();
138
+        let msg = "";
139
+        if (this.add) {
140
+          msg = "新增";
141
+        } else {
142
+          msg = "修改";
143
+        }
144
+        if (result.status == 200) {
145
+          this.showPromptModal(msg, true, '');
146
+        } else {
147
+          this.showPromptModal(msg, false, result.msg);
148
+        }
149
+      });
150
+  }
151
+
152
+  // 初始化新增form表单
153
+  validateForm: FormGroup; //新增/编辑表单
154
+  initWechatForm() {
155
+    this.validateForm = this.fb.group({
156
+      orders: [null, [Validators.required]],
157
+      name: [null, [Validators.required]],
158
+      extra4: [null, [Validators.required]],
159
+      extra5: [null, [Validators.required]],
160
+    });
161
+  }
162
+
163
+  // 重置
164
+  queryData: any = {}
165
+  reset(){
166
+    this.queryData = {};
167
+    this.getList();
168
+  }
169
+
170
+  // 获取列表
171
+  loading1:boolean = false;
172
+  dataList: any[] = []; //表格数据
173
+  tableWechatHeight:number = 0;
174
+  getList() {
175
+    let data = {
176
+      idx: 0,
177
+      sum: 9999,
178
+      dictionary: {
179
+        key: "inspect_check_type",
180
+        name: this.queryData.name,
181
+        extra4: this.queryData.extra4,
182
+        extra5: this.queryData.extra5,
183
+      },
184
+    };
185
+    this.loading1 = true;
186
+    this.mainService
187
+      .getFetchDataList("simple/data", "dictionary", data)
188
+      .subscribe((data) => {
189
+        this.loading1 = false;
190
+        if (data.status == 200) {
191
+          this.dataList = data.list || [];
192
+        }else{
193
+          this.message.error(data.msg || "请求数据失败");
194
+        }
195
+      });
196
+  }
197
+
198
+  // 防抖
199
+  isLoading = false;
200
+  isSelecting:boolean = false; // 是否在选中状态
201
+  searchTimer(fun, e) {
202
+    if (this.isSelecting) {
203
+      this.isSelecting = false; // 重置标志
204
+      return; // 跳过处理
205
+    }
206
+    this.isLoading = true;
207
+    this.searchTimerSubject.next([fun, e]);
208
+  }
209
+
210
+  // 设置标志
211
+  setIsSelecting(flag){
212
+    this.isSelecting = flag; // 设置标志
213
+  }
214
+
215
+  openChangeDept(flag){
216
+    flag && this.setIsSelecting(false);
217
+    flag && this.getDeptList();
218
+  }
219
+
220
+  // 科室搜索
221
+  changeDeptInp(e) {
222
+    this.searchTimer(this.getDeptList, e);
223
+  }
224
+
225
+  // 获取检查科室
226
+  deptList: any = [];
227
+  getDeptList(e = undefined) {
228
+    let postData = {
229
+      idx: 0,
230
+      sum: 20,
231
+      department: {
232
+        searchType: 1,// 简单查询
233
+        cascadeHosId: this.hosId,
234
+        dept: e,
235
+      }
236
+    };
237
+    this.isLoading = true;
238
+    this.mainService
239
+      .getFetchDataList("simple/data", "department", postData)
240
+      .subscribe((data) => {
241
+        this.isLoading = false;
242
+        this.deptList = data.list || [];
243
+      });
244
+  }
245
+
246
+  // 获取检查类型
247
+  typeList: any = [];
248
+  getTypes() {
249
+    this.mainService.getDictionary('list', 'inspect_check_item').subscribe((data) => {
250
+      this.isLoading = false;
251
+      this.typeList = data || [];
252
+    });
253
+  }
254
+
255
+  delModal: boolean = false; //删除模态框
256
+  tipsMsg1: string; //提示框信息
257
+  tipsMsg2: string; //操作后信息
258
+  confirmDelType: string; //确认的类型(启用/停用,删除)
259
+  showDelModal(
260
+    data,
261
+    tipsMsg1: string,
262
+    tipsMsg2: string,
263
+    type: string,
264
+  ) {
265
+    this.confirmDelType = type;
266
+    this.delModal = true;
267
+    this.coopData = data;
268
+    this.tipsMsg1 = tipsMsg1;
269
+    this.tipsMsg2 = tipsMsg2;
270
+  }
271
+  // 隐藏删除框
272
+  hideDelModal() {
273
+    this.delModal = false;
274
+  }
275
+  // 确认删除
276
+  confirmDel() {
277
+    this.btnLoading = true;
278
+    if (this.confirmDelType === "del") {
279
+      //删除
280
+      this.mainService
281
+        .simplePost("rmvData", "dictionary", [this.coopData.id])
282
+        .subscribe((data) => {
283
+          this.btnLoading = false;
284
+          this.delModal = false;
285
+          if (data.status == 200) {
286
+            this.showPromptModal(this.tipsMsg2, true, "");
287
+          } else {
288
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
289
+          }
290
+        });
291
+    }
292
+  }
293
+
294
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
295
+  promptContent: string; //操作提示框提示信息
296
+  ifSuccess: boolean; //操作成功/失败
297
+  promptInfo: string; //操作结果提示信息
298
+  promptModalShow: boolean; //操作提示框是否展示
299
+  showPromptModal(con, success, promptInfo?) {
300
+    this.promptModalShow = false;
301
+    this.promptContent = con;
302
+    this.ifSuccess = success;
303
+    this.promptInfo = promptInfo;
304
+    setTimeout(() => {
305
+      this.promptModalShow = true;
306
+    }, 100);
307
+    this.getList();
308
+  }
309
+}

+ 20 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect-inspects/configuration-inspect-inspects.module.ts

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

+ 15 - 2
src/app/components/configurationCenter/configuration-inspect/configuration-inspect.component.html

@@ -6,7 +6,8 @@
6 6
       </overlay-scrollbars>
7 7
     </div>
8 8
     <div class="addressAssign">
9
-      <div class="contentBody">
9
+      <!-- 注意事项 -->
10
+      <div class="contentBody" [hidden]="activeDictionaryKey.id != 1">
10 11
         <div class="dictionaryRow">
11 12
           <div class="orders">排序号</div>
12 13
           <div class="name">注意事项</div>
@@ -48,9 +49,21 @@
48 49
           </form>
49 50
         </overlay-scrollbars>
50 51
       </div>
51
-      <div class="contentBtns">
52
+      <div class="contentBtns" [hidden]="activeDictionaryKey.id != 1">
52 53
         <button nz-button nzType="primary" class="ml8" (click)="saveDictionary()">保存</button>
53 54
       </div>
55
+      <!-- 批量建单设置 -->
56
+      <ng-container *ngIf="activeDictionaryKey.id == 2">
57
+        <div class="contentBody2">
58
+          <app-configuration-inspect-batch [activeDictionaryKey]="activeDictionaryKey" [dictionaryKeyList]="dictionaryKeyList"></app-configuration-inspect-batch>
59
+        </div>
60
+      </ng-container>
61
+      <!-- 检查项目 -->
62
+      <ng-container *ngIf="activeDictionaryKey.id == 3">
63
+        <div class="contentBody2">
64
+          <app-configuration-inspect-inspects></app-configuration-inspect-inspects>
65
+        </div>
66
+      </ng-container>
54 67
     </div>
55 68
   </div>
56 69
 </div>

+ 2 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect.component.less

@@ -175,4 +175,6 @@
175 175
       align-items: center;
176 176
     }
177 177
   }
178
+
179
+
178 180
 }

+ 27 - 1
src/app/components/configurationCenter/configuration-inspect/configuration-inspect.component.ts

@@ -6,6 +6,7 @@ import { ToolService } from 'src/app/services/tool.service';
6 6
 import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
7 7
 import { NzMessageService } from 'ng-zorro-antd';
8 8
 import { v4 as uuidv4, validate as uuidValidate } from 'uuid';
9
+import { addDays, startOfMinute, endOfMinute, set, getYear, getMonth, getDate, format } from 'date-fns';
9 10
 
10 11
 @Component({
11 12
   selector: "app-configuration-inspect",
@@ -41,13 +42,35 @@ export class ConfigurationInspectComponent implements OnInit {
41 42
   // 数据字典key列表
42 43
   dictionaryKeyList:any[] = [
43 44
     { id: 1, name: '注意事项', key: "inspect_notes"},
45
+    { id: 2, name: '批量建单配置', key: "", postData: {
46
+      ibActiveStartTime1: undefined,
47
+      ibActiveEndTime1: undefined,
48
+      ibActiveStartTime2: undefined,
49
+      ibActiveEndTime2: undefined,
50
+      ibDefaultStartTime: undefined,
51
+      ibDefaultEndTime: undefined,
52
+      ibDefaultDayStart: [{ label:'+1天', value: 0 }],
53
+      ibDefaultDayEnd: [{ label:'+1天', value: 0 }],
54
+      ib2ActiveStartTime1: undefined,
55
+      ib2ActiveEndTime1: undefined,
56
+      ib2ActiveStartTime2: undefined,
57
+      ib2ActiveEndTime2: undefined,
58
+      ib2DefaultStartTime: undefined,
59
+      ib2DefaultEndTime: undefined,
60
+      ib2DefaultDayStart: [{ label:'+1天', value: 0 }],
61
+      ib2DefaultDayEnd: [{ label:'+1天', value: 0 }],
62
+    }},
63
+    { id: 3, name: '检查项目', key: ""},
44 64
   ]
45 65
 
46 66
   // 点击数据字典key
47 67
   activeDictionaryKey:any;
48 68
   clickDictionaryKey(item){
49 69
     this.activeDictionaryKey = item;
50
-    this.getDictionaryList();
70
+    if(this.activeDictionaryKey.id == 1){
71
+      this.getDictionaryList();
72
+      this.initDictionaryForm();
73
+    }
51 74
   }
52 75
 
53 76
   btnLoading: boolean = false; //提交按钮loading状态
@@ -254,4 +277,7 @@ export class ConfigurationInspectComponent implements OnInit {
254 277
         }
255 278
       });
256 279
   }
280
+
281
+
282
+
257 283
 }

+ 4 - 0
src/app/components/configurationCenter/configuration-inspect/configuration-inspect.module.ts

@@ -3,6 +3,8 @@ import { CommonModule } from '@angular/common';
3 3
 
4 4
 import { ConfigurationInspectComponent } from './configuration-inspect.component';
5 5
 import { ShareModule } from '../../../share/share.module';
6
+import { ConfigurationInspectBatchModule } from './configuration-inspect-batch/configuration-inspect-batch.module';
7
+import { ConfigurationInspectInspectsModule } from './configuration-inspect-inspects/configuration-inspect-inspects.module';
6 8
 
7 9
 
8 10
 @NgModule({
@@ -12,6 +14,8 @@ import { ShareModule } from '../../../share/share.module';
12 14
   imports: [
13 15
     CommonModule,
14 16
     ShareModule,
17
+    ConfigurationInspectBatchModule,
18
+    ConfigurationInspectInspectsModule,
15 19
   ],
16 20
   exports: [
17 21
     ConfigurationInspectComponent,

+ 13 - 0
src/app/components/configurationCenter/configuration-quick/configuration-quick.component.html

@@ -125,6 +125,19 @@
125 125
 						</nz-select>
126 126
           </nz-form-control>
127 127
         </nz-form-item>
128
+        <nz-form-item *ngIf="validatePriorityForm.value.bussType === 'inspect'">
129
+          <nz-form-label nzFor="taskTypeInspectIds" nzRequired [nzSpan]="6">任务类型</nz-form-label>
130
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择任务类型!">
131
+						<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear nzPlaceHolder="请选择任务类型" formControlName="taskTypeInspectIds" (nzOnSearch)="changeCommonInp('taskTypeInspect', $event)">
132
+						  <ng-container *ngFor="let option of malfunctionInspectData">
133
+						    <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
134
+						  </ng-container>
135
+						  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
136
+						    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
137
+						  </nz-option>
138
+						</nz-select>
139
+          </nz-form-control>
140
+        </nz-form-item>
128 141
         <nz-form-item *ngIf="validatePriorityForm.value.bussType === 'goods' && hasSpecimen">
129 142
           <nz-form-label nzFor="urgentIds" [nzSpan]="8">是否显示标本数量</nz-form-label>
130 143
           <nz-form-control [nzSpan]="16" nzErrorTip="请选择是否显示标本数量!">

+ 52 - 6
src/app/components/configurationCenter/configuration-quick/configuration-quick.component.ts

@@ -28,6 +28,7 @@ export class ConfigurationQuickComponent implements OnInit {
28 28
 
29 29
 	currentHospital:any;
30 30
 	malfunctionData:any = [];
31
+	malfunctionInspectData:any = [];
31 32
 	allUserGroup:any = [];
32 33
 	userData:any = [];
33 34
 
@@ -37,6 +38,8 @@ export class ConfigurationQuickComponent implements OnInit {
37 38
 		this.changeCommonInpSubject.pipe(debounceTime(500)).subscribe((v) => {
38 39
       if(v[0] === 'taskType'){
39 40
         this.getTaskTypeList(v[1]);
41
+      }else if(v[0] === 'taskTypeInspect'){
42
+        this.getTaskTypeInspectList(v[1]);
40 43
       }
41 44
     });
42 45
 
@@ -48,6 +51,7 @@ export class ConfigurationQuickComponent implements OnInit {
48 51
 		this.currentHospital = this.tool.getCurrentHospital();
49 52
     this.getCommonFaultsList();
50 53
 		this.getTaskTypeList();
54
+		this.getTaskTypeInspectList();
51 55
     this.getPagePermissionIcon();
52 56
     this.getPagePermissionBussType();
53 57
     this.getPagePermissionQuickOperation();
@@ -72,7 +76,7 @@ export class ConfigurationQuickComponent implements OnInit {
72 76
     this.changeCommonInpSubject.next([type, e]);
73 77
   }
74 78
 
75
-	// 获取故障现象数据
79
+	// 获取任务类型数据-标本,其他,万能
76 80
   isLoading:boolean = false;
77 81
 	getTaskTypeList(keyWord?){
78 82
 		let postData = {
@@ -94,6 +98,27 @@ export class ConfigurationQuickComponent implements OnInit {
94 98
 		})
95 99
 	}
96 100
 
101
+	// 获取任务类型数据-陪检
102
+	getTaskTypeInspectList(keyWord?){
103
+		let postData = {
104
+      idx: 0,
105
+      sum: 9999,
106
+		  taskType: {
107
+        taskName: keyWord,
108
+        hosIds: this.hosId,
109
+        assTypeValues: 'inspect',
110
+        simpleQuery: true,
111
+		  },
112
+		};
113
+    this.isLoading = true;
114
+		this.mainService.getFetchDataList('configuration', "taskType", postData).subscribe(data => {
115
+		  this.isLoading = false;
116
+      if (data.status == 200) {
117
+        this.malfunctionInspectData = data.list || [];
118
+      }
119
+		})
120
+	}
121
+
97 122
   // 获取字典数据-图标名称
98 123
   pagePermissionIconList: any[] = [];
99 124
   getPagePermissionIcon() {
@@ -135,15 +160,23 @@ export class ConfigurationQuickComponent implements OnInit {
135 160
     console.log(e);
136 161
     this.validatePriorityForm.controls.quickOperation.setValue(null);
137 162
     this.validatePriorityForm.controls.taskTypeIds.setValue([]);
163
+    this.validatePriorityForm.controls.taskTypeInspectIds.setValue(null);
138 164
     this.validatePriorityForm.controls.urgentIds.setValue(this.gdEmergencyList.map(v => {v.checked = false;return v;}));
139 165
 
140 166
     if(e === 'service'){
141 167
       this.requiredChange('quickOperation', true);
142 168
       this.requiredChange('taskTypeIds', false);
169
+      this.requiredChange('taskTypeInspectIds', false);
143 170
       this.requiredChange('urgentIds', false);
144 171
     }else if(e === 'goods'){
145 172
       this.requiredChange('quickOperation', false);
146 173
       this.requiredChange('taskTypeIds', true);
174
+      this.requiredChange('taskTypeInspectIds', false);
175
+      this.requiredChange('urgentIds', false);
176
+    }else if(e === 'inspect'){
177
+      this.requiredChange('quickOperation', false);
178
+      this.requiredChange('taskTypeIds', false);
179
+      this.requiredChange('taskTypeInspectIds', true);
147 180
       this.requiredChange('urgentIds', false);
148 181
     }
149 182
   }
@@ -180,14 +213,20 @@ export class ConfigurationQuickComponent implements OnInit {
180 213
     this.coopData = data;
181 214
 
182 215
     this.changeBussType(data.bussType.value);
183
-    data.taskTypeIds && this.changeTaskTypeIds(data.taskTypeIds.split(',').map(v => +v));
216
+    if(data.bussType.value === 'goods'){
217
+      data.taskTypeIds && this.changeTaskTypeIds(data.taskTypeIds.split(',').map(v => +v));
218
+    }
184 219
 
185 220
     this.validatePriorityForm.controls.orders.setValue(data.orders);
186 221
     this.validatePriorityForm.controls.icon.setValue(data.icon.id);
187 222
     this.validatePriorityForm.controls.name.setValue(data.name);
188 223
     this.validatePriorityForm.controls.bussType.setValue(data.bussType.value);
189 224
     data.quickOperation && this.validatePriorityForm.controls.quickOperation.setValue(data.quickOperation.id);
190
-    data.taskTypeIds && this.validatePriorityForm.controls.taskTypeIds.setValue(data.taskTypeIds.split(',').map(v => +v));
225
+    if(data.bussType.value === 'goods'){
226
+      data.taskTypeIds && this.validatePriorityForm.controls.taskTypeIds.setValue(data.taskTypeIds.split(',').map(v => +v));
227
+    }else if(data.bussType.value === 'inspect'){
228
+      data.taskTypeIds && this.validatePriorityForm.controls.taskTypeInspectIds.setValue(+data.taskTypeIds);
229
+    }
191 230
     if(data.urgentIds){
192 231
       let ids = data.urgentIds.split(',').map(v => +v);
193 232
       let urgentIds = this.gdEmergencyList.map(v => {
@@ -212,6 +251,12 @@ export class ConfigurationQuickComponent implements OnInit {
212 251
     console.log(this.validatePriorityForm.value);
213 252
     this.btnLoading = true;
214 253
     let postData:any = {};
254
+    let taskTypeIds;
255
+    if(this.validatePriorityForm.value.bussType === 'goods'){
256
+      taskTypeIds = this.validatePriorityForm.value.taskTypeIds.length ? this.validatePriorityForm.value.taskTypeIds.toString() : undefined
257
+    }else if(this.validatePriorityForm.value.bussType === 'inspect'){
258
+      taskTypeIds = this.validatePriorityForm.value.taskTypeInspectIds ? this.validatePriorityForm.value.taskTypeInspectIds.toString() : undefined
259
+    }
215 260
     if (this.add) {
216 261
       //增加
217 262
       postData = {
@@ -221,7 +266,7 @@ export class ConfigurationQuickComponent implements OnInit {
221 266
         name: this.validatePriorityForm.value.name,
222 267
         bussType: this.validatePriorityForm.value.bussType ? this.pagePermissionBussTypeList.find(v => v.value === this.validatePriorityForm.value.bussType) : undefined,
223 268
         quickOperation: this.validatePriorityForm.value.quickOperation ? { id: this.validatePriorityForm.value.quickOperation } : undefined,
224
-        taskTypeIds: this.validatePriorityForm.value.taskTypeIds.length ? this.validatePriorityForm.value.taskTypeIds.toString() : undefined,
269
+        taskTypeIds,
225 270
         urgentIds: this.validatePriorityForm.value.urgentIds.length ? this.validatePriorityForm.value.urgentIds.filter(v => v.checked).map(v => v.value).toString() : undefined,
226 271
         active: this.validatePriorityForm.value.active,
227 272
       };
@@ -234,7 +279,7 @@ export class ConfigurationQuickComponent implements OnInit {
234 279
         name: this.validatePriorityForm.value.name,
235 280
         bussType: this.validatePriorityForm.value.bussType ? this.pagePermissionBussTypeList.find(v => v.value === this.validatePriorityForm.value.bussType) : undefined,
236 281
         quickOperation: this.validatePriorityForm.value.quickOperation ? { id: this.validatePriorityForm.value.quickOperation } : undefined,
237
-        taskTypeIds: this.validatePriorityForm.value.taskTypeIds.length ? this.validatePriorityForm.value.taskTypeIds.toString() : undefined,
282
+        taskTypeIds,
238 283
         urgentIds: this.validatePriorityForm.value.urgentIds.length ? this.validatePriorityForm.value.urgentIds.filter(v => v.checked).map(v => v.value).toString() : undefined,
239 284
         active: this.validatePriorityForm.value.active,
240 285
       };
@@ -268,7 +313,8 @@ export class ConfigurationQuickComponent implements OnInit {
268 313
       name: [null, [Validators.required]],//按钮名称
269 314
       bussType: [null, [Validators.required]],//关联业务
270 315
       quickOperation: [null, [Validators.required]],//快捷操作
271
-      taskTypeIds: [[], [Validators.required]],//关联任务类型
316
+      taskTypeIds: [[], [Validators.required]],//关联任务类型-标本,其他,万能
317
+      taskTypeInspectIds: [null, [Validators.required]],//关联任务类型-陪检
272 318
       urgentIds: [this.gdEmergencyList.map(v => {v.checked = false;return v;}), [Validators.required]],//是否显示标本数量
273 319
       active: [0, [Validators.required]],//是否启用
274 320
     });

+ 22 - 0
src/app/guard/inspectClosedLoopView.guard.ts

@@ -0,0 +1,22 @@
1
+import { Injectable } from '@angular/core';
2
+import { CanActivate, Router } from '@angular/router';
3
+
4
+@Injectable({
5
+  providedIn: 'root'
6
+})
7
+export class InspectClosedLoopViewGuard implements CanActivate  {
8
+  constructor(public router: Router) { }
9
+
10
+  canActivate(): boolean {
11
+    const menus = JSON.parse(localStorage.getItem('menu'));
12
+    let can = false;
13
+    if (menus) {
14
+      can = menus.some(e => e.link == 'inspectClosedLoopView');
15
+    }
16
+    if (!can) {
17
+      this.router.navigate(['login']);
18
+      return false
19
+    }
20
+    return true;
21
+  }
22
+}

+ 38 - 3
src/app/services/main.service.ts

@@ -2,7 +2,7 @@ import { Injectable } from "@angular/core";
2 2
 import { HttpClient, HttpHeaders } from "@angular/common/http";
3 3
 
4 4
 import host from "../../assets/js/http";
5
-import { Observable } from "rxjs";
5
+import { Observable, of } from "rxjs";
6 6
 import { AES, mode, pad, enc } from "crypto-js";
7 7
 import { MarkingService } from './marking.service';
8 8
 
@@ -1119,12 +1119,47 @@ export class MainService {
1119 1119
 		  headers: this.headers,
1120 1120
 		});
1121 1121
 	}
1122
-	
1122
+
1123 1123
 	// 闭环数据生成-查询数据
1124 1124
 	queryCount(data){
1125 1125
 		return this.http.post(host.host + `/api/patchData/queryCount`, data, {
1126 1126
 		  headers: this.headers,
1127 1127
 		});
1128 1128
 	}
1129
-	
1129
+
1130
+  // 根据当前日期查询陪检批量建单设置中的默认时间
1131
+	getPatientInspectTime(data = {}){
1132
+		return this.http.post(host.host + `/nurse/patientInspect/getPatientInspectTime`, data, {
1133
+		  headers: this.headers,
1134
+		});
1135
+	}
1136
+
1137
+  // 根据当前日期查询陪检批量建单设置中的默认时间
1138
+	bindPatientInspect(data = {}){
1139
+		return this.http.post(host.host + `/nurse/patientInspect/bindPatientInspect`, data, {
1140
+		  headers: this.headers,
1141
+		});
1142
+	}
1143
+
1144
+  // 根据当患者查检查
1145
+	getPatientInspectList(data = {}){
1146
+		return this.http.post(host.host + `/nurse/patientInspect/getPatientInspectList`, data, {
1147
+		  headers: this.headers,
1148
+		});
1149
+	}
1150
+
1151
+  // 批量-检查项目转检验项目
1152
+	addPatientInspectList(data = {}){
1153
+		return this.http.post(host.host + `/nurse/patientInspect/addPatientInspectList`, data, {
1154
+		  headers: this.headers,
1155
+		});
1156
+	}
1157
+
1158
+  // 护士端-批量陪检图标下两个数字
1159
+	getPatientInspectCount(data = {}){
1160
+		return this.http.post(host.host + `/nurse/patientInspect/getPatientInspectCount`, data, {
1161
+		  headers: this.headers,
1162
+		});
1163
+	}
1164
+
1130 1165
 }

+ 72 - 0
src/app/share/add-inspect-modal/add-inspect-modal.component.html

@@ -0,0 +1,72 @@
1
+<div class="modal display_flex justify-content_flex-center align-items_center">
2
+  <div class="modalBody" style="width: 1200px;">
3
+    <div class="title">追加项目<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <div class="content">
5
+      <div class="patient">
6
+        <span>患者姓名:{{patientInspectLogDTO.patientName}}</span>
7
+        <span *ngIf="patientInspectLogDTO.patientType && patientInspectLogDTO.patientType.value == 'I'">住院号:{{patientInspectLogDTO.patientCode}}({{patientInspectLogDTO.bedNum}})</span>
8
+        <span *ngIf="patientInspectLogDTO.patientType && patientInspectLogDTO.patientType.value == 'O'">门诊号:{{patientInspectLogDTO.patientCode}}</span>
9
+        <span *ngIf="patientInspectLogDTO.patientType && patientInspectLogDTO.patientType.value == 'E'">急诊号:{{patientInspectLogDTO.patientCode}}</span>
10
+        <span>护理级别:{{patientInspectLogDTO.careLevel?.name}}</span>
11
+        <span>危重等级:{{patientInspectLogDTO.illnessState?.name}}</span>
12
+      </div>
13
+      <div class="tabs">
14
+        <div class="tab" [ngClass]="{ active: activeTabId == item.id }" *ngFor="let item of tabList" (click)="selectTab(item.id)">{{item.name}}</div>
15
+      </div>
16
+      <div class="tableWrap">
17
+        <ng-container *ngIf="activeTabId == 1">
18
+          <nz-table class="hospitalTable" [nzData]="data1List" nzSize="middle" [nzShowPagination]="false"
19
+            [nzLoading]="hsLoading" (nzCurrentPageDataChange)="currentPageData1Change($event)" [nzScroll]="{ y: '385px' }">
20
+            <thead>
21
+              <tr class="thead">
22
+                <th nzWidth="4%" nzShowCheckbox [(nzChecked)]="isAllDisplayData1Checked" [nzIndeterminate]="isIndeterminateData1"
23
+                  (nzCheckedChange)="checkAllData1($event)"></th>
24
+                <th nzWidth="32%">检查项目</th>
25
+                <th nzWidth="32%">检查地点</th>
26
+                <th nzWidth="32%">预约时间</th>
27
+              </tr>
28
+            </thead>
29
+            <tbody>
30
+              <tr *ngFor="let data of data1List;let i = index;" (click)="selectedListData1(data.id)">
31
+                <td nzShowCheckbox [(nzChecked)]="mapOfCheckedData1Id[data.id]" (nzCheckedChange)="refreshData1Status()"></td>
32
+                <td>{{ data.inspectName}}</td>
33
+                <td>{{ deptDisplay == 2 ? data.execDept?.deptalias : data.execDept?.dept }}</td>
34
+                <td>{{ data.yyTime | date:"yyyy-MM-dd HH:mm" }}</td>
35
+              </tr>
36
+            </tbody>
37
+          </nz-table>
38
+        </ng-container>
39
+
40
+        <ng-container *ngIf="activeTabId == 2">
41
+          <div class="inspectType">
42
+            检查类型:<u *ngFor="let item of inspectCheckItemList" (click)="clickInspectCheckItem(item.id)" [ngClass]="{ active: activeInspectCheckItemId == item.id }">{{item.name}}</u>
43
+          </div>
44
+          <nz-table class="hospitalTable" [nzData]="data2List" nzSize="middle" [nzShowPagination]="false"
45
+            [nzLoading]="hsLoading" (nzCurrentPageDataChange)="currentPageData2Change($event)" [nzScroll]="{ y: '385px' }">
46
+            <thead>
47
+              <tr class="thead">
48
+                <th nzWidth="4%" nzShowCheckbox [(nzChecked)]="isAllDisplayData2Checked" [nzIndeterminate]="isIndeterminateData2"
49
+                  (nzCheckedChange)="checkAllData2($event)"></th>
50
+                <th nzWidth="32%">检查项目</th>
51
+                <th nzWidth="32%">检查地点</th>
52
+                <th nzWidth="32%">检查类型</th>
53
+              </tr>
54
+            </thead>
55
+            <tbody>
56
+              <tr *ngFor="let data of data2List;let i = index;" (click)="selectedListData2(data.id)">
57
+                <td nzShowCheckbox [(nzChecked)]="mapOfCheckedData2Id[data.id]" (nzCheckedChange)="refreshData2Status()"></td>
58
+                <td>{{ data.name}}</td>
59
+                <td>{{ deptDisplay == 2 ? data.extra4DTO?.deptalias : data.extra4DTO?.dept }}</td>
60
+                <td>{{ data.extra5DTO?.name }}</td>
61
+              </tr>
62
+            </tbody>
63
+          </nz-table>
64
+        </ng-container>
65
+      </div>
66
+    </div>
67
+    <div class="display_flex justify-content_flex-center">
68
+      <button class="btn" nz-button nzType="primary" (click)="confirmModal()">确认</button>
69
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
70
+    </div>
71
+  </div>
72
+</div>

+ 194 - 0
src/app/share/add-inspect-modal/add-inspect-modal.component.less

@@ -0,0 +1,194 @@
1
+@import "../../../../src/theme.less";
2
+.patient{
3
+  display: flex;
4
+  align-items: center;
5
+  justify-content: space-between;
6
+  height: 56px;
7
+  font-size: 18px;
8
+  padding: 0 24px;
9
+}
10
+.tabs{
11
+  display: flex;
12
+  align-items: center;
13
+  justify-content: space-between;
14
+  height: 45px;
15
+  font-size: 14px;
16
+  border-top: 1px solid #e5e9ed;
17
+  border-bottom: 1px solid #e5e9ed;
18
+  .tab{
19
+    flex: 1;
20
+    display: flex;
21
+    align-items: center;
22
+    justify-content: center;
23
+    height: 100%;
24
+    cursor: pointer;
25
+    &.active{
26
+      background-color: #F0F6ED;
27
+    }
28
+  }
29
+}
30
+.tableWrap{
31
+  padding: 16px;
32
+  .inspectType{
33
+    padding-bottom: 16px;
34
+    text-align: left!important;
35
+    u{
36
+      margin-right: 8px;
37
+      cursor: pointer;
38
+      &.active{
39
+        color: @primary-color;
40
+      }
41
+    }
42
+  }
43
+}
44
+.modal {
45
+  position: fixed;
46
+  left: 0;
47
+  top: 0;
48
+  width: 100%;
49
+  height: 100%;
50
+  background: rgba(0, 0, 0, 0.4);
51
+  z-index: 999;
52
+  .hospitalTable {
53
+    width: 100%;
54
+    td {
55
+      text-align: center !important;
56
+      position: relative;
57
+      word-break: break-all;
58
+    }
59
+    .thead {
60
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
61
+      th {
62
+        text-align: center !important;
63
+        color: #fff;
64
+        background: transparent;
65
+      }
66
+    }
67
+  }
68
+
69
+  .ji {
70
+    position: absolute;
71
+    right: 0px;
72
+    top: -3px;
73
+    width: 30px;
74
+  }
75
+
76
+  .list-template__top{
77
+    div{
78
+      text-align: left!important;
79
+    }
80
+  }
81
+
82
+  .modalBody {
83
+    width: 700px;
84
+    min-height: 220px;
85
+    background: #fff;
86
+    border-radius: 5px;
87
+    padding: 10px 20px;
88
+    color: #333;
89
+    &.modalBody-search {
90
+      width: 480px;
91
+      min-height: 250px;
92
+    }
93
+
94
+    .title {
95
+      width: 100%;
96
+      text-align: center;
97
+      font-size: 18px;
98
+      position: relative;
99
+
100
+      i {
101
+        position: absolute;
102
+        right: 0;
103
+        top: 0;
104
+        font-size: 20px;
105
+        color: #666;
106
+        cursor: pointer;
107
+        padding: 0 5px;
108
+      }
109
+    }
110
+
111
+    .content {
112
+      height: 603px;
113
+      min-height: 117px;
114
+      background: #f9fafb;
115
+      border: 1px solid #e5e9ed;
116
+      border-radius: 5px;
117
+      overflow: hidden;
118
+      margin-top: 12px;
119
+
120
+      div {
121
+        text-align: center;
122
+        margin: 0;
123
+
124
+        &.defeat {
125
+          color: #333;
126
+          font-size: 28px;
127
+        }
128
+        &.countDown {
129
+          font-size: 14px;
130
+          color: 666;
131
+          em {
132
+            font-style: normal;
133
+            color: @primary-color;
134
+          }
135
+        }
136
+
137
+        &.pagination {
138
+          font-size: 14px;
139
+          color: #666;
140
+          padding-top: 16px;
141
+          padding-bottom: 16px;
142
+        }
143
+      }
144
+    }
145
+
146
+    button {
147
+      margin-top: 10px;
148
+
149
+      &.btn {
150
+        margin-left: 8px;
151
+      }
152
+    }
153
+  }
154
+
155
+  // 新增
156
+  &.add {
157
+    .modalBody {
158
+      width: 480px;
159
+      height: auto;
160
+
161
+      .content {
162
+        width: 100%;
163
+        height: auto;
164
+        padding: 18px 14px 0 14px;
165
+
166
+        .addForm {
167
+          .ant-form-item {
168
+            margin-bottom: 15px;
169
+
170
+            .ant-form-item-label {
171
+              line-height: 0;
172
+            }
173
+          }
174
+        }
175
+
176
+        .editForm {
177
+          .ant-form-item {
178
+            margin-bottom: 15px;
179
+
180
+            .ant-form-item-label {
181
+              line-height: 0;
182
+            }
183
+          }
184
+        }
185
+      }
186
+
187
+      button {
188
+        &:nth-child(1) {
189
+          margin-right: 20px;
190
+        }
191
+      }
192
+    }
193
+  }
194
+}

+ 192 - 0
src/app/share/add-inspect-modal/add-inspect-modal.component.ts

@@ -0,0 +1,192 @@
1
+import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2
+import { MainService } from '../../services/main.service';
3
+import { ToolService } from 'src/app/services/tool.service';
4
+import { startOfDay, format } from 'date-fns';
5
+import { NzMessageService } from 'ng-zorro-antd';
6
+@Component({
7
+  selector: 'app-add-inspect-modal',
8
+  templateUrl: './add-inspect-modal.component.html',
9
+  styleUrls: ['./add-inspect-modal.component.less']
10
+})
11
+export class AddInspectModalComponent implements OnInit {
12
+  // 切换科室,切换弹窗
13
+  isAllDisplayData1Checked = false;
14
+  isAllDisplayData2Checked = false;
15
+  listOfDisplayData1: any[] = [];
16
+  listOfDisplayData2: any[] = [];
17
+  mapOfCheckedData1Id: { [key: string]: boolean } = {};
18
+  mapOfCheckedData2Id: { [key: string]: boolean } = {};
19
+  isIndeterminateData1 = false;
20
+  isIndeterminateData2 = false;
21
+  currentDept; //当前科室
22
+
23
+  hosId;
24
+  hsLoading = false;
25
+  data1List: any = [];// 列表
26
+  data2List: any = [];// 列表
27
+
28
+  tabList:any[] = [
29
+    {id: 1, name: '检查项目'},
30
+    {id: 2, name: '手动添加'},
31
+  ]
32
+  activeTabId: number = 1;
33
+  @Input() patientInspectLogDTO: any;
34
+  @Input() deptDisplay: any;
35
+
36
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
37
+  @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
38
+
39
+  constructor(
40
+    private mainService: MainService,
41
+    private tool: ToolService,
42
+    private message: NzMessageService,
43
+  ) { }
44
+
45
+  ngOnInit() {
46
+    this.hosId = this.tool.getCurrentHospital().id;
47
+    this.currentDept = this.tool.getCurrentUserDept();
48
+    this.getList();
49
+  }
50
+
51
+  // 选择tab
52
+  selectTab(id){
53
+    this.activeTabId = id;
54
+    this.getList();
55
+  }
56
+
57
+  currentPageData1Change($event: any[]): void {
58
+    this.listOfDisplayData1 = this.data1List; //改变页数,长度也要变
59
+    this.refreshData1Status();
60
+  }
61
+
62
+  currentPageData2Change($event: any[]): void {
63
+    this.listOfDisplayData2 = this.data2List; //改变页数,长度也要变
64
+    this.refreshData2Status();
65
+  }
66
+
67
+  refreshData1Status(): void {
68
+    this.isAllDisplayData1Checked = this.listOfDisplayData1.length ? this.listOfDisplayData1.every(
69
+      (item) => this.mapOfCheckedData1Id[item.id]
70
+    ) : false;
71
+    this.isIndeterminateData1 = this.listOfDisplayData1.some((item) => this.mapOfCheckedData1Id[item.id]) && !this.isAllDisplayData1Checked;
72
+  }
73
+
74
+  refreshData2Status(): void {
75
+    this.isAllDisplayData2Checked = this.listOfDisplayData2.length ? this.listOfDisplayData2.every(
76
+      (item) => this.mapOfCheckedData2Id[item.id]
77
+    ) : false;
78
+    this.isIndeterminateData2 = this.listOfDisplayData2.some((item) => this.mapOfCheckedData2Id[item.id]) && !this.isAllDisplayData2Checked;
79
+  }
80
+
81
+  // 开通科室选择整行
82
+  selectedListData1(id) {
83
+    this.mapOfCheckedData1Id[id] = !this.mapOfCheckedData1Id[id];
84
+    this.refreshData1Status();
85
+  }
86
+
87
+  // 开通科室选择整行
88
+  selectedListData2(id) {
89
+    this.mapOfCheckedData2Id[id] = !this.mapOfCheckedData2Id[id];
90
+    this.refreshData2Status();
91
+  }
92
+
93
+  checkAllData1(value: boolean): void {
94
+    this.listOfDisplayData1.forEach(
95
+      (item) => (this.mapOfCheckedData1Id[item.id] = value)
96
+    );
97
+    this.refreshData1Status();
98
+  }
99
+
100
+  checkAllData2(value: boolean): void {
101
+    this.listOfDisplayData2.forEach(
102
+      (item) => (this.mapOfCheckedData2Id[item.id] = value)
103
+    );
104
+    this.refreshData2Status();
105
+  }
106
+
107
+  // 确认弹窗
108
+  confirmModal() {
109
+    console.log(this[`mapOfCheckedData${this.activeTabId}Id`]);
110
+    let list = [];
111
+    for (const key in this[`mapOfCheckedData${this.activeTabId}Id`]) {
112
+      if (this[`mapOfCheckedData${this.activeTabId}Id`][key]) {
113
+        list.push({id: key});
114
+      }
115
+    }
116
+    if(list.length == 0){
117
+      this.message.warning('请选择数据');
118
+      return;
119
+    }
120
+    this.confirmModelHs.emit(JSON.stringify({ show: false, list, type: this.activeTabId }));//emits(向上弹射)事件
121
+  }
122
+
123
+  // 关闭弹窗
124
+  hideModal() {
125
+    this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
126
+  }
127
+
128
+  getList(){
129
+    if(this.activeTabId == 1){
130
+      this.getList1();
131
+    }else if(this.activeTabId == 2){
132
+      this.getInspectCheckItem();
133
+      this.getList2();
134
+    }
135
+  }
136
+
137
+  // 获取列表数据
138
+  getList1() {
139
+    let postData = {
140
+      startTime: format(startOfDay(new Date()), 'yyyy-MM-dd HH:mm:ss'),
141
+      patientCodes: this.patientInspectLogDTO.patientCode,
142
+      inspectStateValue: 1,//待陪检
143
+      noneGdid: 1,//未绑定工单
144
+      nonePilId: 1,//未绑定患者闭环
145
+      deptId: this.currentDept.id,
146
+    }
147
+    this.hsLoading = true;
148
+    this.mainService.getPatientInspectList(postData).subscribe((data: any) => {
149
+      this.hsLoading = false;
150
+      this.data1List = data.list || [];
151
+    })
152
+  }
153
+
154
+  // 获取列表数据
155
+  getList2() {
156
+    let postData = {
157
+      idx: 0,
158
+      sum: 9999,
159
+      dictionary: {
160
+        key: 'inspect_check_type',
161
+        extra5: this.activeInspectCheckItemId,
162
+      }
163
+    }
164
+    this.hsLoading = true;
165
+    this.mainService.getFetchDataList('simple/data','dictionary',postData).subscribe(data => {
166
+      this.hsLoading = false;
167
+      this.data2List = data.list || [];
168
+    })
169
+  }
170
+
171
+  // 获取检查项目
172
+  inspectCheckItemList:any[] = [];
173
+  activeInspectCheckItemId;
174
+  getInspectCheckItem() {
175
+    this.mainService.getDictionary("list", "inspect_check_item").subscribe((data) => {
176
+			this.inspectCheckItemList = data || [];
177
+		});
178
+  }
179
+
180
+  clickInspectCheckItem(id){
181
+    if(this.activeInspectCheckItemId == id){
182
+      this.activeInspectCheckItemId = undefined;
183
+    }else{
184
+      this.activeInspectCheckItemId = id;
185
+    }
186
+    this.getList2();
187
+  }
188
+
189
+}
190
+
191
+
192
+

+ 26 - 0
src/app/share/select-date-yytime/select-date-yytime.component.html

@@ -0,0 +1,26 @@
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
+      <div class="tips">是否需要预约执行,如需预约请您选择时间</div>
7
+      <div class="addForm">
8
+        <div class="display_flex align-items_center">
9
+          <div>
10
+            <nz-date-picker [(ngModel)]="yyDate" [nzShowToday]="false"></nz-date-picker>
11
+            <nz-time-picker [nzDisabled]="!yyDate" class="ml8" nzFormat="HH:mm" [(ngModel)]="yyTime" [nzAllowEmpty]="false">
12
+            </nz-time-picker>
13
+            <button [disabled]="!yyDate" nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">
14
+              下一日
15
+            </button>
16
+          </div>
17
+        </div>
18
+      </div>
19
+    </div>
20
+    <div class="display_flex justify-content_flex-center">
21
+      <button class="btn" nzType="primary" nz-button (click)="submitFormYytime()">预约陪检</button>
22
+      <button class="btn" nzType="primary" nz-button (click)="submitFormDirect()">立即执行</button>
23
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
24
+    </div>
25
+  </div>
26
+</div>

+ 131 - 0
src/app/share/select-date-yytime/select-date-yytime.component.less

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

+ 53 - 0
src/app/share/select-date-yytime/select-date-yytime.component.ts

@@ -0,0 +1,53 @@
1
+import { Component, OnInit, Output, Input } from '@angular/core';
2
+import { EventEmitter } from '@angular/core';
3
+import { NzMessageService } from 'ng-zorro-antd';
4
+import { addDays, startOfMinute, format } from 'date-fns';
5
+
6
+@Component({
7
+  selector: 'app-select-date-yytime',
8
+  templateUrl: './select-date-yytime.component.html',
9
+  styleUrls: ['./select-date-yytime.component.less']
10
+})
11
+export class SelectDateYytimeComponent implements OnInit {
12
+  @Input() date:any;
13
+  @Output() submitFormYytimeE = new EventEmitter();
14
+  @Output() submitFormDirectE = new EventEmitter();
15
+  @Output() cancelFlagHand = new EventEmitter();
16
+  yyDate = null; //预约日期-患者其他服务
17
+  yyTime = null; //预约时间-患者其他服务
18
+  constructor(
19
+    private message: NzMessageService,
20
+  ) { }
21
+
22
+  ngOnInit() {
23
+    if(this.date){
24
+      this.yyDate = startOfMinute(new Date(this.date));
25
+      this.yyTime = startOfMinute(new Date(this.date));
26
+    }
27
+  }
28
+
29
+  // 下一日(患者其他服务)
30
+  nextDay() {
31
+    this.yyDate = addDays(this.yyDate, 1);
32
+  }
33
+
34
+  // 隐藏模态框
35
+  hideModal() {
36
+    this.cancelFlagHand.emit(false)
37
+  }
38
+
39
+  // 预约陪检
40
+  submitFormYytime(): void {
41
+    if(!this.yyDate || !this.yyTime) {
42
+      this.message.warning('请选择完整预约时间');
43
+      return;
44
+    }
45
+    this.submitFormYytimeE.emit(format(this.yyDate, 'yyyy-MM-dd') + ' ' + format(startOfMinute(this.yyTime), 'HH:mm:ss'));
46
+  }
47
+
48
+  // 立即执行
49
+  submitFormDirect(): void {
50
+    this.submitFormDirectE.emit();
51
+  }
52
+}
53
+

+ 24 - 0
src/app/share/select-date/select-date.component.html

@@ -0,0 +1,24 @@
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
+      <div class="addForm">
7
+        <div class="display_flex align-items_center">
8
+          <div>
9
+            <nz-date-picker [(ngModel)]="yyDate" [nzShowToday]="false"></nz-date-picker>
10
+            <nz-time-picker [nzDisabled]="!yyDate" class="ml8" nzFormat="HH:mm" [(ngModel)]="yyTime" [nzAllowEmpty]="false">
11
+            </nz-time-picker>
12
+            <button [disabled]="!yyDate" nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">
13
+              下一日
14
+            </button>
15
+          </div>
16
+        </div>
17
+      </div>
18
+    </div>
19
+    <div class="display_flex justify-content_flex-center">
20
+      <button nzType="primary" nz-button (click)="submitForm()">确认</button>
21
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
22
+    </div>
23
+  </div>
24
+</div>

+ 135 - 0
src/app/share/select-date/select-date.component.less

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

+ 47 - 0
src/app/share/select-date/select-date.component.ts

@@ -0,0 +1,47 @@
1
+import { Component, OnInit, Output, Input } from '@angular/core';
2
+import { EventEmitter } from '@angular/core';
3
+import { NzMessageService } from 'ng-zorro-antd';
4
+import { addDays, startOfMinute, format } from 'date-fns';
5
+
6
+@Component({
7
+  selector: 'app-select-date',
8
+  templateUrl: './select-date.component.html',
9
+  styleUrls: ['./select-date.component.less']
10
+})
11
+export class SelectDateComponent implements OnInit {
12
+  @Input() date:any;
13
+  @Output() submitFormHand = new EventEmitter();
14
+  @Output() cancelFlagHand = new EventEmitter();
15
+  yyDate = null; //预约日期-患者其他服务
16
+  yyTime = null; //预约时间-患者其他服务
17
+  constructor(
18
+    private message: NzMessageService,
19
+  ) { }
20
+
21
+  ngOnInit() {
22
+    if(this.date){
23
+      this.yyDate = new Date(this.date);
24
+      this.yyTime = new Date(this.date);
25
+    }
26
+  }
27
+
28
+  // 下一日(患者其他服务)
29
+  nextDay() {
30
+    this.yyDate = addDays(this.yyDate, 1);
31
+  }
32
+
33
+  // 隐藏模态框
34
+  hideModal() {
35
+    this.cancelFlagHand.emit(false)
36
+  }
37
+
38
+  // 表单提交
39
+  submitForm(): void {
40
+    if(!this.yyDate || !this.yyTime) {
41
+      this.message.warning('请选择完整预约时间');
42
+      return;
43
+    }
44
+    this.submitFormHand.emit(format(this.yyDate, 'yyyy-MM-dd') + ' ' + format(startOfMinute(this.yyTime), 'HH:mm:ss'));
45
+  }
46
+}
47
+

+ 9 - 0
src/app/share/share.module.ts

@@ -59,6 +59,9 @@ import { PathologyAddComponent } from './pathology-add/pathology-add.component';
59 59
 import { PathologyDetailComponent } from './pathology-detail/pathology-detail.component';
60 60
 import { StringToFirstValuePipe } from '../pipes/string-to-first-name.pipe';
61 61
 import { BusinessDataDetailInfoModalComponent } from './businessData-detail-info-modal/businessData-detail-info-modal.component';
62
+import { SelectDateComponent } from './select-date/select-date.component';
63
+import { AddInspectModalComponent } from './add-inspect-modal/add-inspect-modal.component';
64
+import { SelectDateYytimeComponent } from './select-date-yytime/select-date-yytime.component';
62 65
 
63 66
 @NgModule({
64 67
   declarations: [
@@ -121,6 +124,9 @@ import { BusinessDataDetailInfoModalComponent } from './businessData-detail-info
121 124
     BloodHistoryPromptModalComponent,
122 125
     MedicalWasteHistoryPromptModalComponent,
123 126
     MedicalWasteLogPromptModalComponent,
127
+    SelectDateComponent,
128
+    AddInspectModalComponent,
129
+    SelectDateYytimeComponent,
124 130
   ],
125 131
   imports: [
126 132
     CommonModule,
@@ -191,6 +197,9 @@ import { BusinessDataDetailInfoModalComponent } from './businessData-detail-info
191 197
     BloodHistoryPromptModalComponent,
192 198
     MedicalWasteHistoryPromptModalComponent,
193 199
     MedicalWasteLogPromptModalComponent,
200
+    SelectDateComponent,
201
+    AddInspectModalComponent,
202
+    SelectDateYytimeComponent,
194 203
   ]
195 204
 })
196 205
 export class ShareModule { }

+ 17 - 0
src/app/views/batch-inspection/batch-inspection-routing.module.ts

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

File diff suppressed because it is too large
+ 90 - 0
src/app/views/batch-inspection/batch-inspection.component.html


+ 134 - 0
src/app/views/batch-inspection/batch-inspection.component.less

@@ -0,0 +1,134 @@
1
+@import "../../../../src/theme.less";
2
+
3
+:host {
4
+  width: 100vw;
5
+  height: 100vh;
6
+  overflow: hidden;
7
+  background-color: #F0F2F5;
8
+  display: flex;
9
+  flex-direction: column;
10
+  .header{
11
+    height: 64px;
12
+    background-color: #fff;
13
+    display: flex;
14
+    align-items: center;
15
+    justify-content: space-between;
16
+    padding: 0 24px;
17
+    font-size: 16px;
18
+    .dept{
19
+      margin-right: 48px;
20
+    }
21
+    .patient{
22
+      margin-left: 24px;
23
+    }
24
+    .label{
25
+      padding-right: 16px;
26
+      font-size: 14px;
27
+    }
28
+    .formItem{
29
+      width: 173px;
30
+    }
31
+    .info{
32
+      margin-left: 48px;
33
+    }
34
+  }
35
+  .table{
36
+    flex: 1;
37
+    min-height: 0;
38
+    margin-top: 10px;
39
+    background-color: #fff;
40
+    overflow: auto;
41
+    padding: 8px 16px;
42
+    .patient{
43
+      position: relative;
44
+      .circle{
45
+        width: 8px;
46
+        height: 8px;
47
+        border-radius: 50%;
48
+        background-color: @primary-color;
49
+        position: absolute;
50
+        top: 50%;
51
+        left: -8px;
52
+        transform: translate(-50%,-50%);
53
+        &.red{
54
+          background-color: red;
55
+        }
56
+      }
57
+    }
58
+    .transport-weibiaoti2010104{
59
+      font-size: 15px;
60
+      color: #999;
61
+      margin-left: 10px;
62
+      margin-top: 3px;
63
+      cursor: pointer;
64
+    }
65
+    .transport-shanchu1{
66
+      font-size: 15px;
67
+      color: #999;
68
+      margin-left: 5px;
69
+      margin-top: 3px;
70
+      cursor: pointer;
71
+    }
72
+    .thead{
73
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
74
+      th {
75
+        background: transparent;
76
+        color: #fff;
77
+        text-align: center;
78
+      }
79
+    }
80
+    .ant-table-body {
81
+      border-bottom: 1px solid #e5e9ed;
82
+    }
83
+
84
+    .ant-table-tbody {
85
+      tr {
86
+        text-align: center;
87
+        color: #333;
88
+
89
+        td {
90
+          border: none;
91
+
92
+          &.tab_hover:hover{
93
+            text-decoration: underline;
94
+            cursor: pointer;
95
+          }
96
+
97
+          .coop {
98
+            button{
99
+              color: #333;
100
+            }
101
+            span,button {
102
+              display: inline-block;
103
+              padding: 0 8px;
104
+              cursor: pointer;
105
+              position: relative;
106
+
107
+              &::after {
108
+                content: "|";
109
+                position: absolute;
110
+                top: 0;
111
+                right: 0;
112
+              }
113
+
114
+              &:hover,
115
+              &:active {
116
+                color: @primary-color;
117
+              }
118
+
119
+              &:nth-last-child(1) {
120
+                &::after {
121
+                  content: "";
122
+                }
123
+              }
124
+            }
125
+          }
126
+        }
127
+      }
128
+    }
129
+  }
130
+  .footer{
131
+    height: 60px;
132
+    background-color: #fff;
133
+  }
134
+}

+ 578 - 0
src/app/views/batch-inspection/batch-inspection.component.ts

@@ -0,0 +1,578 @@
1
+import { Component, OnInit } from '@angular/core';
2
+import { ToolService } from 'src/app/services/tool.service';
3
+import { MainService } from 'src/app/services/main.service';
4
+import { NzMessageService } from 'ng-zorro-antd';
5
+import { startOfDay, endOfDay, format } from 'date-fns';
6
+import { Subject } from 'rxjs';
7
+import { debounceTime } from 'rxjs/operators';
8
+import { Location } from '@angular/common';
9
+import cloneDeep from 'lodash-es/cloneDeep'
10
+@Component({
11
+  selector: 'app-batch-inspection',
12
+  templateUrl: './batch-inspection.component.html',
13
+  styleUrls: ['./batch-inspection.component.less']
14
+})
15
+export class BatchInspectionComponent implements OnInit {
16
+
17
+  constructor(
18
+    private mainService: MainService,
19
+    private tool: ToolService,
20
+    private message: NzMessageService,
21
+    private _location: Location,
22
+  ) { }
23
+
24
+  dateRange: any = []; //预约时间
25
+  patientId: any; //患者
26
+  hosId:any = this.tool.getCurrentHospital().id; //当前院区
27
+  deptDTO:any = this.tool.getCurrentUserDept(); //当前科室
28
+  deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
29
+  listOfData: any[] = []; //表格数据
30
+
31
+  searchTimerSubject = new Subject(); //防抖
32
+
33
+  ngOnInit() {
34
+    //防抖
35
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
36
+      let fun = v[0];
37
+      fun.call(this, v[1]);
38
+    });
39
+
40
+    this.tool.getDeptDisplay().subscribe((result) => {
41
+      if (result.status == 200) {
42
+        this.deptDisplay = result.list[0].valueconfig;
43
+      }
44
+    });
45
+
46
+    this.init();
47
+  }
48
+
49
+  // 修改出行方式
50
+  changeTripType(tripTypeId, id){
51
+    this.maskFlag = this.message.loading("正在加载中..", {
52
+      nzDuration: 0,
53
+    }).messageId;
54
+    let postData = this.listOfData.find(v => v.id == id);
55
+    this.mainService
56
+    .simplePost("addData", 'patientInspectLog', postData)
57
+    .subscribe((data) => {
58
+      this.message.remove(this.maskFlag);
59
+      this.maskFlag = false;
60
+      this.getList();
61
+      if (data.status == 200) {
62
+        this.message.success("修改出行方式成功");
63
+      } else {
64
+        this.message.success(data.msg || "修改出行方式失败");
65
+      }
66
+    });
67
+  }
68
+
69
+  init(){
70
+    this.getPatientInspectTime();
71
+    this.getWorkOrderInspectScore();
72
+    this.getList();
73
+  }
74
+
75
+  // 获取批量建单设置中的默认时间
76
+  getPatientInspectTime(){
77
+    this.mainService.getPatientInspectTime().subscribe((result:any) => {
78
+      if(result.startTime && result.endTime){
79
+        this.dateRange = [new Date(result.startTime), new Date(result.endTime)];
80
+      }else{
81
+        this.dateRange = [];
82
+      }
83
+    });
84
+  }
85
+
86
+  // 日期选择
87
+  onCalendarChangeDate(dateArr){
88
+    if(dateArr.length == 2){
89
+      this.dateRange = [startOfDay(dateArr[0]), endOfDay(dateArr[1])];
90
+    }
91
+  }
92
+
93
+  // 防抖
94
+  isLoading = false;
95
+  isSelecting:boolean = false; // 是否在选中状态
96
+  searchTimer(fun, e) {
97
+    if (this.isSelecting) {
98
+      this.isSelecting = false; // 重置标志
99
+      return; // 跳过处理
100
+    }
101
+    this.isLoading = true;
102
+    this.searchTimerSubject.next([fun, e]);
103
+  }
104
+
105
+  // 搜索
106
+  changeInp(type, e) {
107
+    if(type === 'patient'){
108
+      this.searchTimer(this.getPatientList, e);
109
+    }
110
+  }
111
+
112
+  // 设置标志
113
+  setIsSelecting(flag){
114
+    this.isSelecting = flag; // 设置标志
115
+  }
116
+
117
+
118
+  openChangePatient(flag){
119
+    flag && this.setIsSelecting(false);
120
+    flag && this.getPatientList();
121
+  }
122
+
123
+  // 获取患者
124
+  patientList: any = [];
125
+  getPatientList(e = undefined) {
126
+    let postData = {
127
+      idx: 0,
128
+      sum: 20,
129
+      patient: {
130
+        department: this.deptDTO,
131
+        keyWord: e,
132
+      }
133
+    };
134
+    this.isLoading = true;
135
+    this.mainService
136
+      .getFetchDataList("simple/data", "patient", postData)
137
+      .subscribe((data) => {
138
+        this.isLoading = false;
139
+        this.patientList = data.list || [];
140
+      });
141
+  }
142
+
143
+  maskFlag: any = false;
144
+
145
+  addPatientList(){
146
+    if(!this.dateRange.length){
147
+      this.message.info('请选择预约时间!');
148
+      return;
149
+    }
150
+
151
+    this.maskFlag = this.message.loading("正在加载中..", {
152
+      nzDuration: 0,
153
+    }).messageId;
154
+
155
+    let postData = {
156
+      startTime: this.dateRange.length ? format(this.dateRange[0], 'yyyy-MM-dd HH:mm:ss') : undefined,
157
+      endTime: this.dateRange.length ? format(this.dateRange[1], 'yyyy-MM-dd HH:mm:ss') : undefined,
158
+      inspectStateValue: 1,//待陪检
159
+      noneGdid: 1,//未绑定工单
160
+      nonePilId: 1,//未绑定患者闭环
161
+      deptId: this.deptDTO.id,
162
+    };
163
+
164
+    this.mainService
165
+      .getPatientInspectList(postData)
166
+      .subscribe((result:any) => {
167
+        this.message.remove(this.maskFlag);
168
+        this.maskFlag = false;
169
+        this.inspectActiveList = result.list || [];
170
+        this.patientActiveList = result.patientList || [];
171
+        if(this.patientActiveList.length){
172
+          this.showDelModal(this.patientActiveList, `您确认添加“<b class="red">${this.patientActiveList.length}</b>”位患者共“<b class="red">${this.inspectActiveList.length}</b>”项检查吗?`,'批量添加患者','add');
173
+        }else{
174
+          this.message.info('当前时间区间没有检查!');
175
+        }
176
+      });
177
+  }
178
+
179
+  changePatientId(id){
180
+    this.setIsSelecting(true);
181
+    setTimeout(() => {
182
+      this.patientId = null;
183
+    }, 0)
184
+
185
+    if(!id){
186
+      return;
187
+    }
188
+
189
+    if(!this.dateRange.length){
190
+      this.message.info('请选择预约时间!');
191
+      return;
192
+    }
193
+
194
+    let patientDTO = this.patientList.find(v => v.id == id);
195
+    this.patientActiveList = [patientDTO];
196
+    let postData = {
197
+      startTime: this.dateRange.length ? format(this.dateRange[0], 'yyyy-MM-dd HH:mm:ss') : undefined,
198
+      endTime: this.dateRange.length ? format(this.dateRange[1], 'yyyy-MM-dd HH:mm:ss') : undefined,
199
+      patientCodes: patientDTO.patientCode,
200
+      inspectStateValue: 1,//待陪检
201
+      noneGdid: 1,//未绑定工单
202
+      nonePilId: 1,//未绑定患者闭环
203
+      deptId: this.deptDTO.id,
204
+    };
205
+    this.maskFlag = this.message.loading("正在加载中..", {
206
+      nzDuration: 0,
207
+    }).messageId;
208
+    this.mainService
209
+      .getPatientInspectList(postData)
210
+      .subscribe((result:any) => {
211
+        this.message.remove(this.maskFlag);
212
+        this.maskFlag = false;
213
+        this.inspectActiveList = result.list || [];
214
+        this.showDelModal(this.patientActiveList, `<b class="red">${patientDTO.patientName}</b>在时间范围内有<b class="red">${this.inspectActiveList.length}</b>项检查项目,是否确认添加?`,'添加','add');
215
+      });
216
+  }
217
+
218
+  inspectActiveList: any = [];//选中检查列表
219
+  patientActiveList: any = [];//选中患者列表
220
+
221
+  coopData: any = {}; //当前操作列
222
+  btnLoading: boolean = false; //提交按钮loading状态
223
+
224
+  delModal: boolean = false; //删除模态框
225
+  tipsMsg1: string; //提示框信息
226
+  tipsMsg2: string; //操作后信息
227
+  confirmDelType: string; //确认的类型(启用/停用,删除)
228
+  showDelModal(
229
+    data,
230
+    tipsMsg1: string,
231
+    tipsMsg2: string,
232
+    type: string,
233
+  ) {
234
+    this.confirmDelType = type;
235
+    this.delModal = true;
236
+    this.coopData = data;
237
+    this.tipsMsg1 = tipsMsg1;
238
+    this.tipsMsg2 = tipsMsg2;
239
+  }
240
+  // 隐藏删除框
241
+  hideDelModal() {
242
+    this.delModal = false;
243
+  }
244
+  // 确认删除
245
+  confirmDel() {
246
+    this.btnLoading = true;
247
+    if (this.confirmDelType === "del") {
248
+      //删除-移除患者
249
+      this.mainService
250
+        .simplePost("rmvData", "patientInspectLog", [this.coopData.id])
251
+        .subscribe((data) => {
252
+          this.btnLoading = false;
253
+          this.delModal = false;
254
+          if (data.status == 200) {
255
+            this.showPromptModal(this.tipsMsg2, true, "");
256
+          } else {
257
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
258
+          }
259
+        });
260
+    }else if (this.confirmDelType === "delInspect") {
261
+      //删除-检验项目
262
+      this.coopData.data.inspectList.forEach(v => {
263
+        if(v.id == this.coopData.inspect.id){
264
+          v.pilId = undefined;
265
+        }
266
+      })
267
+      let postData = {
268
+        type: 'plan',
269
+        pilList: [{
270
+          ...this.patientInspectLogDTO,
271
+          inspectList: this.coopData.data.inspectList.filter(v => v.id == this.coopData.inspect.id),
272
+        }]
273
+      }
274
+      this.mainService
275
+        .addPatientInspectList(postData)
276
+        .subscribe((data:any) => {
277
+          this.btnLoading = false;
278
+          this.delModal = false;
279
+          if (data.state == 200) {
280
+            this.showPromptModal('删除', true, "");
281
+          } else {
282
+            this.showPromptModal('删除', false, data.msg);
283
+          }
284
+        });
285
+    }else if (this.confirmDelType === "add") {
286
+      //新增-患者陪检闭环
287
+      let postData = {
288
+        patientIds: this.inspectActiveList.length === 0 ? this.patientActiveList.map(v => v.id).toString() : undefined,
289
+        inspectIds: this.inspectActiveList.length !== 0 ? this.inspectActiveList.map(v => v.id).toString() : undefined,
290
+      }
291
+      this.mainService
292
+        .bindPatientInspect(postData)
293
+        .subscribe((data:any) => {
294
+          this.btnLoading = false;
295
+          this.delModal = false;
296
+          if (data.state == 200) {
297
+            this.showPromptModal(this.tipsMsg2, true, "");
298
+          } else {
299
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
300
+          }
301
+        });
302
+    }else if (this.confirmDelType === "reset") {
303
+      //重置
304
+      let ids = this.listOfData.filter(v => v.state.value == 1).map(v => v.id);
305
+      this.mainService
306
+        .simplePost("rmvData", "patientInspectLog", ids)
307
+        .subscribe((data) => {
308
+          this.btnLoading = false;
309
+          this.delModal = false;
310
+          if (data.status == 200) {
311
+            this.showPromptModal(this.tipsMsg2, true, "");
312
+          } else {
313
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
314
+          }
315
+        });
316
+    }
317
+  }
318
+
319
+  // 修改检验项目
320
+  isShowSelectDate:boolean = false;
321
+  editInspect(data){
322
+    this.isShowSelectDate = true;
323
+    this.coopData = data;
324
+  }
325
+
326
+  // 修改检验项目-确定
327
+  submitSelectDate(date){
328
+    console.log(date)
329
+    this.coopData.data.inspectList.forEach(v => {
330
+      if(v.id == this.coopData.inspect.id){
331
+        v.yyTime = date;
332
+      }
333
+    })
334
+    let postData = {
335
+      type: 'plan',
336
+      pilList: [{
337
+        ...this.coopData.data,
338
+        inspectList: this.coopData.data.inspectList.filter(v => v.id == this.coopData.inspect.id),
339
+      }]
340
+    }
341
+    this.maskFlag = this.message.loading("正在加载中..", {
342
+      nzDuration: 0,
343
+    }).messageId;
344
+    this.mainService
345
+      .addPatientInspectList(postData)
346
+      .subscribe((data:any) => {
347
+        this.message.remove(this.maskFlag);
348
+        this.maskFlag = false;
349
+        if (data.state == 200) {
350
+          this.isShowSelectDate = false;
351
+          this.showPromptModal('修改', true, "");
352
+        } else {
353
+          this.showPromptModal('修改', false, data.msg);
354
+        }
355
+      });
356
+  }
357
+
358
+  // 修改检验项目-取消
359
+  cancelSelectDate(e) {
360
+    this.isShowSelectDate = false;
361
+  }
362
+
363
+
364
+  // 批量发起陪检
365
+  isShowSelectDateYytime:boolean = false;
366
+  addYytime(){
367
+    let obj1 = this.listOfData.find(v => !v.tripType);
368
+    if(obj1){
369
+      this.message.warning(`${obj1.patientName}患者没有选择出行方式,请调整后提交申请!`)
370
+      return;
371
+    }
372
+
373
+    let obj2 = this.listOfData.find(v => !v.inspectList || v.inspectList.length == 0);
374
+    if(obj2){
375
+      this.message.warning(`${obj2.patientName}患者没有检验项目,请调整后提交申请!`)
376
+      return;
377
+    }
378
+    this.isShowSelectDateYytime = true;
379
+  }
380
+
381
+  // 批量发起陪检-预约陪检
382
+  submitSelectDateYytime(date){
383
+    console.log(date)
384
+    if(+date <= +new Date()){
385
+      this.message.warning(`预约时间不能小于当前时间!`)
386
+      return;
387
+    }
388
+    let pilList = cloneDeep(this.listOfData);
389
+    pilList.forEach(v => {
390
+      v.yyTime = date;
391
+      delete v.inspectList;
392
+    })
393
+    let postData = {
394
+      type: 'appointment',
395
+      pilList,
396
+    }
397
+    this.maskFlag = this.message.loading("正在加载中..", {
398
+      nzDuration: 0,
399
+    }).messageId;
400
+    this.mainService
401
+      .addPatientInspectList(postData)
402
+      .subscribe((data:any) => {
403
+        this.message.remove(this.maskFlag);
404
+        this.maskFlag = false;
405
+        if (data.state == 200) {
406
+          this.isShowSelectDateYytime = false;
407
+          this.showPromptModal('操作', true, "");
408
+        } else {
409
+          this.showPromptModal('操作', false, data.msg);
410
+        }
411
+      });
412
+  }
413
+
414
+  // 批量发起陪检-立即执行
415
+  submitSelectDateDirect(){
416
+    let pilList = cloneDeep(this.listOfData);
417
+    pilList.forEach(v => {
418
+      delete v.inspectList;
419
+    })
420
+    let postData = {
421
+      type: 'action',
422
+      pilList,
423
+    }
424
+    this.maskFlag = this.message.loading("正在加载中..", {
425
+      nzDuration: 0,
426
+    }).messageId;
427
+    this.mainService
428
+      .addPatientInspectList(postData)
429
+      .subscribe((data:any) => {
430
+        this.message.remove(this.maskFlag);
431
+        this.maskFlag = false;
432
+        if (data.state == 200) {
433
+          this.isShowSelectDateYytime = false;
434
+          this.showPromptModal('操作', true, "");
435
+        } else {
436
+          this.showPromptModal('操作', false, data.msg);
437
+        }
438
+      });
439
+  }
440
+
441
+  // 批量发起陪检-取消
442
+  cancelSelectDateYytime(e) {
443
+    this.isShowSelectDateYytime = false;
444
+  }
445
+
446
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
447
+  promptContent: string; //操作提示框提示信息
448
+  ifSuccess: boolean; //操作成功/失败
449
+  promptInfo: string; //操作结果提示信息
450
+  promptModalShow: boolean; //操作提示框是否展示
451
+  showPromptModal(con, success, promptInfo?) {
452
+    this.promptModalShow = false;
453
+    this.promptContent = con;
454
+    this.ifSuccess = success;
455
+    this.promptInfo = promptInfo;
456
+    setTimeout(() => {
457
+      this.promptModalShow = true;
458
+    }, 100);
459
+    this.getList();
460
+  }
461
+
462
+  loading1:boolean = false;
463
+  inspectTotalCount:number = 0;
464
+
465
+  getList(){
466
+    let data = {
467
+      idx: 0,
468
+      sum: 9999,
469
+      patientInspectLog: {
470
+        state: { value: '1,2' },
471
+        deptId: this.deptDTO ? this.deptDTO.id : undefined,
472
+      },
473
+    };
474
+    this.loading1 = true;
475
+    this.mainService
476
+      .getFetchDataList("simple/data", "patientInspectLog", data)
477
+      .subscribe((data) => {
478
+        this.loading1 = false;
479
+        if (data.status == 200) {
480
+          this.listOfData = data.list;
481
+          this.inspectTotalCount = this.listOfData.reduce((v, i) => v + i.planInspectCount, 0);
482
+        }else{
483
+          this.message.error(data.msg || "请求数据失败");
484
+        }
485
+      });
486
+  }
487
+
488
+  //获取出行方式
489
+  workOrderInspectScoreList:any[] = [];
490
+  getWorkOrderInspectScore() {
491
+    let postData = { idx: 0, sum: 9999, workOrderInspectScore: { hosId: this.hosId } };
492
+    this.mainService
493
+      .getFetchDataList("simple/data", "workOrderInspectScore", postData)
494
+      .subscribe((result) => {
495
+        if (result.status == 200) {
496
+          this.workOrderInspectScoreList = result.list || [];
497
+        } else {
498
+          this.message.error("请求数据失败");
499
+        }
500
+      });
501
+  }
502
+
503
+  // 返回
504
+  goBack(){
505
+    this._location.back();
506
+  }
507
+
508
+  // 追加项目
509
+  patientInspectLogDTO:any = {};
510
+  isShowAddInspect = false; //弹窗开关
511
+  addInspect(patientInspectLogDTO){
512
+    this.patientInspectLogDTO = patientInspectLogDTO;
513
+    this.isShowAddInspect = true;
514
+  }
515
+  // 关闭弹窗
516
+  closeAddInspectModel(e) {
517
+    this.isShowAddInspect = JSON.parse(e).show;
518
+  }
519
+  // 确定弹窗
520
+  confirmAddInspectModel(e) {
521
+    console.log(e);
522
+    let obj = JSON.parse(e);
523
+    this.isShowAddInspect = obj.show;
524
+    if(obj.type == 1){
525
+      //检验项目
526
+      let postData = {
527
+        inspectIds: obj.list.map(v => v.id).toString() || undefined,
528
+      }
529
+      this.maskFlag = this.message.loading("正在加载中..", {
530
+        nzDuration: 0,
531
+      }).messageId;
532
+      this.mainService
533
+        .bindPatientInspect(postData)
534
+        .subscribe((data:any) => {
535
+          this.message.remove(this.maskFlag);
536
+          this.maskFlag = false;
537
+          if (data.state == 200) {
538
+            this.showPromptModal('添加', true, "");
539
+          } else {
540
+            this.showPromptModal('添加', false, data.msg);
541
+          }
542
+        });
543
+    }else if(obj.type == 2){
544
+      // 手动添加
545
+      let postData = {
546
+        type: 'plan',
547
+        pilList: [{
548
+          ...this.patientInspectLogDTO,
549
+          inspectList: obj.list.map(v => ({
550
+            patientCode: this.patientInspectLogDTO.patientCode,
551
+            patientName: this.patientInspectLogDTO.patientName,
552
+            barCode: this.patientInspectLogDTO.barCode,
553
+            inspectCheckType: { id: v.id },
554
+            applyDeptId: this.patientInspectLogDTO.deptId,
555
+            bedNum: this.patientInspectLogDTO.bedNum,
556
+            hosId: this.patientInspectLogDTO.hosId,
557
+            pilId: this.patientInspectLogDTO.id,
558
+            yyTime: this.dateRange.length ? format(this.dateRange[0], 'yyyy-MM-dd HH:mm:ss') : undefined,
559
+          })) || undefined,
560
+        }]
561
+      }
562
+      this.maskFlag = this.message.loading("正在加载中..", {
563
+        nzDuration: 0,
564
+      }).messageId;
565
+      this.mainService
566
+        .addPatientInspectList(postData)
567
+        .subscribe((data:any) => {
568
+          this.message.remove(this.maskFlag);
569
+          this.maskFlag = false;
570
+          if (data.state == 200) {
571
+            this.showPromptModal('添加', true, "");
572
+          } else {
573
+            this.showPromptModal('添加', false, data.msg);
574
+          }
575
+        });
576
+    }
577
+  }
578
+}

+ 17 - 0
src/app/views/batch-inspection/batch-inspection.module.ts

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

+ 6 - 2
src/app/views/hushijiandan/hushijiandan.component.html

@@ -353,10 +353,14 @@
353 353
                       <div class="navIcon" [ngClass]="backColorComputed(item.icon.extra1)"><i class="icon_transport" [ngClass]="[item.icon.extra1]"></i></div>
354 354
                       <div class="navContent">
355 355
                         <h2>{{item.name}}</h2>
356
-                        <div class="navSpecimen" *ngIf="(item.urgentFlag || item.ordinaryFlag) && deptTaskTypeRules.openSpecimen">
356
+                        <div class="navSpecimen" *ngIf="item.urgentFlag || item.ordinaryFlag">
357 357
                           <span *ngIf="item.urgentFlag" (click)="changeSpeDetail($event, 1)">急:<span class="red">{{ specimenWorkOrderMsg.specimenCount ? specimenWorkOrderMsg.specimenCount.urgent : 0 }}</span></span>
358 358
                           <span *ngIf="item.ordinaryFlag" (click)="changeSpeDetail($event, 0)">普:{{ specimenWorkOrderMsg.specimenCount ? specimenWorkOrderMsg.specimenCount.noUrgent : 0 }}</span>
359 359
                         </div>
360
+                        <div class="navSpecimen" *ngIf="item.bussType.value === 'inspect'">
361
+                          <span (click)="changeInspectClosedLoopView($event, '2')">预:{{patientInspectCountMsg.data ? patientInspectCountMsg.data[0].yyCount : 0}}</span>
362
+                          <span (click)="changeInspectClosedLoopView($event, '3,4')">检:{{patientInspectCountMsg.data ? patientInspectCountMsg.data[0].workingCount : 0}}</span>
363
+                        </div>
360 364
                       </div>
361 365
                     </div>
362 366
                   </div>
@@ -964,7 +968,7 @@
964 968
                       </thead>
965 969
                       <tbody>
966 970
                         <tr *ngFor="let item of outpatientHelpAppointmentList;let i = index">
967
-                          <td>{{ item.patientName }}<br>{{ item.sex?.name }}<ng-container *ngIf="item.age !== undefined"> {{item.age}}岁</ng-container></td>
971
+                          <td>{{ item.patientName }}<br>{{ item.sex?.name }}<ng-container *ngIf="item && item.age !== undefined"> {{item.age}}岁</ng-container></td>
968 972
                           <td>{{ item.applyType?.name }}<br>{{ item.equipment?.name }}</td>
969 973
                           <td>患者:{{ item.patientPhone }}<br>代表:{{ item.agent_phone }}</td>
970 974
                           <td>{{ item.escortTime | date:'yyyy-MM-dd HH:mm' }}<br>{{ item.status?.name }}</td>

+ 12 - 6
src/app/views/hushijiandan/hushijiandan.component.less

@@ -270,7 +270,7 @@
270 270
         padding: 0 5px;
271 271
       }
272 272
     }
273
-		
273
+
274 274
 		.new-title {
275 275
 		  width: 100%;
276 276
 		  text-align: center;
@@ -286,7 +286,7 @@
286 286
 		    padding: 0 5px;
287 287
 		  }
288 288
 		}
289
-		
289
+
290 290
 		.title-weight{
291 291
 			font-weight: bold;
292 292
 			font-size: 15px;
@@ -402,7 +402,7 @@
402 402
 				            text-decoration: underline;
403 403
 				            cursor: pointer;
404 404
 				          }
405
-									
405
+
406 406
 									.coop-btn{
407 407
 										button{
408 408
 											margin-top: 0 !important;
@@ -415,14 +415,14 @@
415 415
 										  display: inline-block;
416 416
 										  cursor: pointer;
417 417
 										  position: relative;
418
-										
418
+
419 419
 										  &::after {
420 420
 										    content: "|";
421 421
 										    position: absolute;
422 422
 										    top: 0;
423 423
 										    right: 0;
424 424
 										  }
425
-										
425
+
426 426
 										  &:nth-last-child(1) {
427 427
 										    &::after {
428 428
 										      content: "";
@@ -430,7 +430,7 @@
430 430
 										  }
431 431
 										}
432 432
 									}
433
-									
433
+
434 434
 				          .coop {
435 435
 				            button{
436 436
 				              color: #333;
@@ -1461,6 +1461,12 @@
1461 1461
                           font-size: 24px;
1462 1462
                         }
1463 1463
                       }
1464
+                      &.inspect{
1465
+                        background: linear-gradient( 41deg, #28EDD9 0%, #0FBBE2 100%);
1466
+                        .icon_transport{
1467
+                          font-size: 24px;
1468
+                        }
1469
+                      }
1464 1470
                     }
1465 1471
                     h2{
1466 1472
                       font-size: 12px;

+ 34 - 0
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -789,6 +789,8 @@ export class HushijiandanComponent implements OnInit {
789 789
       return 'drugbag';
790 790
     }else if(icon === 'transport-baoxiu'){
791 791
       return 'incident';
792
+    }else if(icon === 'transport-peihuguanli'){
793
+      return 'inspect';
792 794
     }else{
793 795
       return '';
794 796
     }
@@ -1245,6 +1247,7 @@ export class HushijiandanComponent implements OnInit {
1245 1247
   refreshSpecimenWorkOrderMsg() {
1246 1248
     this.msgTimerId = setInterval(() => {
1247 1249
       this.getSpecimenWorkOrderMsg();
1250
+      this.getPatientInspectCountMsg();
1248 1251
     }, 60000);
1249 1252
   }
1250 1253
 
@@ -1274,6 +1277,23 @@ export class HushijiandanComponent implements OnInit {
1274 1277
       });
1275 1278
   }
1276 1279
 
1280
+  // 护士端-批量陪检图标下两个数字
1281
+  patientInspectCountMsg: any = {};
1282
+  getPatientInspectCountMsg() {
1283
+    if(this.currentDept.typeValue == 'surgery' && !this.tabSearchCont){
1284
+      return;
1285
+    }
1286
+    let that = this;
1287
+
1288
+    that.mainService
1289
+      .getPatientInspectCount({
1290
+        deptId: JSON.parse(localStorage.getItem("user")).user.dept.id,
1291
+      })
1292
+      .subscribe((data) => {
1293
+        that.patientInspectCountMsg = data;
1294
+      });
1295
+  }
1296
+
1277 1297
   // 手术提示信息
1278 1298
   surgeryLoading = false;
1279 1299
 	now:any = new Date();
@@ -1748,6 +1768,7 @@ export class HushijiandanComponent implements OnInit {
1748 1768
             that.deptTaskTypeRules.openInspection ||
1749 1769
             that.deptTaskTypeRules.openPatientTransport
1750 1770
           ) {
1771
+            this.getPatientInspectCountMsg();
1751 1772
             // 陪检权限或转科权限
1752 1773
             if (this.tabFlag) {
1753 1774
               this.tabFlag = false;
@@ -4473,6 +4494,16 @@ export class HushijiandanComponent implements OnInit {
4473 4494
         }
4474 4495
       });
4475 4496
   }
4497
+
4498
+  // 跳转患者陪检闭环视图
4499
+  changeInspectClosedLoopView(e, stateValue){
4500
+    e.stopPropagation();
4501
+    let queryParams = {
4502
+      department: { id: this.currentDept.id, dept: this.currentDept.dept },
4503
+      stateValue,
4504
+    }
4505
+    this.router.navigateByUrl(`/inspectClosedLoopView?queryParams=${JSON.stringify(queryParams)}`);
4506
+  }
4476 4507
   // 隐藏查看标本详情弹层
4477 4508
   hideSpeDetailModel() {
4478 4509
     this.detailModel = false;
@@ -5208,6 +5239,9 @@ export class HushijiandanComponent implements OnInit {
5208 5239
       // 物品配送
5209 5240
       this.buildQuickConfirmData = data || {};
5210 5241
       this.isShowBuildQuickConfirm = true;
5242
+    }else if(data.bussType.value === 'inspect'){
5243
+      // 陪检
5244
+      this.router.navigateByUrl("/batchInspection");
5211 5245
     }
5212 5246
   }
5213 5247
   cancelBuildQuickConfirm(e){

+ 38 - 12
src/app/views/info-search/info-search.component.html

@@ -32,7 +32,7 @@
32 32
             <!-- 检查列表 -->
33 33
             <div *ngSwitchCase="'inspectList'" class="list-template__bottom">
34 34
               <nz-table class="list-template__nzTable" #inspectListTpl [nzData]="panel.list" nzSize="middle"
35
-                [nzShowPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
35
+                [nzFrontPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
36 36
                 <thead>
37 37
                   <tr class="thead">
38 38
                     <th nzWidth="130px">序号</th>
@@ -105,7 +105,7 @@
105 105
             <!-- 工单信息 -->
106 106
             <div *ngSwitchCase="'order'" class="list-template__bottom">
107 107
               <nz-table class="list-template__nzTable" #orderTpl [nzData]="panel.list" nzSize="middle"
108
-                [nzShowPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
108
+                [nzFrontPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
109 109
                 <thead>
110 110
                   <tr class="thead">
111 111
                     <th nzWidth="130px">序号</th>
@@ -207,7 +207,7 @@
207 207
             <!-- 工单日志 -->
208 208
             <div *ngSwitchCase="'orderLogs'" class="list-template__bottom">
209 209
               <nz-table class="list-template__nzTable" #orderLogsTpl [nzData]="panel.list" nzSize="middle"
210
-                [nzShowPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
210
+                [nzFrontPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
211 211
                 <thead>
212 212
                   <tr class="thead">
213 213
                     <th nzWidth="130px">序号</th>
@@ -231,7 +231,7 @@
231 231
             <!-- 检查日志 -->
232 232
             <div *ngSwitchCase="'inspectLogs'" class="list-template__bottom">
233 233
               <nz-table class="list-template__nzTable" #inspectLogsTpl [nzData]="panel.list" nzSize="middle"
234
-                [nzShowPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
234
+                [nzFrontPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
235 235
                 <thead>
236 236
                   <tr class="thead">
237 237
                     <th nzWidth="130px">序号</th>
@@ -253,7 +253,7 @@
253 253
             <!-- 标本列表 -->
254 254
             <div *ngSwitchCase="'specimenList'" class="list-template__bottom">
255 255
               <nz-table class="list-template__nzTable" #specimenListTpl [nzData]="panel.list" nzSize="middle"
256
-                [nzShowPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
256
+                [nzFrontPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
257 257
                 <thead>
258 258
                   <tr class="thead">
259 259
                     <th nzWidth="130px">序号</th>
@@ -330,7 +330,7 @@
330 330
             <!-- 标本日志 -->
331 331
             <div *ngSwitchCase="'specimenLogs'" class="list-template__bottom">
332 332
               <nz-table class="list-template__nzTable" #specimenLogsTpl [nzData]="panel.list" nzSize="middle"
333
-                [nzShowPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
333
+                [nzFrontPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
334 334
                 <thead>
335 335
                   <tr class="thead">
336 336
                     <th nzWidth="130px">序号</th>
@@ -352,7 +352,7 @@
352 352
             <!-- 药品列表 -->
353 353
             <div *ngSwitchCase="'drugsBagList'" class="list-template__bottom">
354 354
               <nz-table class="list-template__nzTable" #drugsBagListTpl [nzData]="panel.list" nzSize="middle"
355
-                [nzShowPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
355
+                [nzFrontPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
356 356
                 <thead>
357 357
                   <tr class="thead">
358 358
                     <th nzWidth="130px">序号</th>
@@ -420,7 +420,7 @@
420 420
             <!-- 药包日志 -->
421 421
             <div *ngSwitchCase="'drugsBagLogs'" class="list-template__bottom">
422 422
               <nz-table class="list-template__nzTable" #drugsBagLogsTpl [nzData]="panel.list" nzSize="middle"
423
-                [nzShowPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
423
+                [nzFrontPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
424 424
                 <thead>
425 425
                   <tr class="thead">
426 426
                     <th nzWidth="130px">序号</th>
@@ -442,7 +442,7 @@
442 442
             <!-- 药品日志 -->
443 443
             <div *ngSwitchCase="'drugsLogs'" class="list-template__bottom">
444 444
               <nz-table class="list-template__nzTable" #drugsLogsTpl [nzData]="panel.list" nzSize="middle"
445
-                [nzShowPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
445
+                [nzFrontPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
446 446
                 <thead>
447 447
                   <tr class="thead">
448 448
                     <th nzWidth="130px">序号</th>
@@ -464,7 +464,7 @@
464 464
             <!-- 静配包列表 -->
465 465
             <div *ngSwitchCase="'jpBagList'" class="list-template__bottom">
466 466
               <nz-table class="list-template__nzTable" #jpBagListTpl [nzData]="panel.list" nzSize="middle"
467
-                [nzShowPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
467
+                [nzFrontPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
468 468
                 <thead>
469 469
                   <tr class="thead">
470 470
                     <th nzWidth="130px">序号</th>
@@ -515,7 +515,7 @@
515 515
             <!-- 静配包日志 -->
516 516
             <div *ngSwitchCase="'jpBagLogs'" class="list-template__bottom">
517 517
               <nz-table class="list-template__nzTable" #jpBagLogsTpl [nzData]="panel.list" nzSize="middle"
518
-                [nzShowPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
518
+                [nzFrontPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
519 519
                 <thead>
520 520
                   <tr class="thead">
521 521
                     <th nzWidth="130px">序号</th>
@@ -537,7 +537,7 @@
537 537
             <!-- 静配日志 -->
538 538
             <div *ngSwitchCase="'jpLogs'" class="list-template__bottom">
539 539
               <nz-table class="list-template__nzTable" #jpLogsTpl [nzData]="panel.list" nzSize="middle"
540
-                [nzShowPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
540
+                [nzFrontPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
541 541
                 <thead>
542 542
                   <tr class="thead">
543 543
                     <th nzWidth="130px">序号</th>
@@ -556,6 +556,32 @@
556 556
                 </tbody>
557 557
               </nz-table>
558 558
             </div>
559
+            <!-- 原始数据日志 -->
560
+            <div *ngSwitchCase="'dataSourceList'" class="list-template__bottom">
561
+              <nz-table class="list-template__nzTable" #dataSourceTpl [nzData]="panel.list" nzSize="middle"
562
+                [nzFrontPagination]="false" [nzLoading]="loading1" [ngStyle]="{width:panel.list[0].length*130+292+'px'}">
563
+                <thead>
564
+                  <tr class="thead">
565
+                    <th nzWidth="110px">业务标识</th>
566
+                    <th nzWidth="150px">时间</th>
567
+                    <th nzWidth="800px">原始数据</th>
568
+                    <th nzWidth="110px">优先级</th>
569
+                    <th nzWidth="110px">状态标识</th>
570
+                    <th nzWidth="150px">业务唯一标识</th>
571
+                  </tr>
572
+                </thead>
573
+                <tbody>
574
+                  <tr *ngFor="let data of dataSourceTpl.data;let i = index">
575
+                    <td>{{data[5]}}</td>
576
+                    <td>{{data[1]|date:'yyyy-MM-dd HH:mm:ss'}}</td>
577
+                    <td (click)="toSource(data[2], '原始数据')" class="wordBreak">{{data[2]}}</td>
578
+                    <td>{{data[3]}}</td>
579
+                    <td>{{data[4]}}</td>
580
+                    <td>{{data[6]}}</td>
581
+                  </tr>
582
+                </tbody>
583
+              </nz-table>
584
+            </div>
559 585
           </ng-container>
560 586
         </app-collapse-panel>
561 587
       </app-collapse>

+ 27 - 2
src/app/views/info-search/info-search.component.ts

@@ -1,7 +1,7 @@
1 1
 import { Component, OnInit } from "@angular/core";
2 2
 import { MainService } from "src/app/services/main.service";
3 3
 import { ToolService } from "src/app/services/tool.service";
4
-import { NzModalService } from "ng-zorro-antd";
4
+import { NzModalService, NzMessageService } from "ng-zorro-antd";
5 5
 
6 6
 @Component({
7 7
   selector: "app-info-search",
@@ -12,7 +12,8 @@ export class InfoSearchComponent implements OnInit {
12 12
   constructor(
13 13
     private mainService: MainService,
14 14
     private tool: ToolService,
15
-    private modalService: NzModalService
15
+    private modalService: NzModalService,
16
+    private message: NzMessageService,
16 17
   ) {}
17 18
 
18 19
   searchCriteria = {
@@ -41,6 +42,10 @@ export class InfoSearchComponent implements OnInit {
41 42
       type: "jpBag",
42 43
       name: "静配",
43 44
     },
45
+    {
46
+      type: "dataSource",
47
+      name: "原始数据",
48
+    },
44 49
   ]; // 类型列表
45 50
   hosId;
46 51
   ngOnInit() {
@@ -155,6 +160,12 @@ export class InfoSearchComponent implements OnInit {
155 160
       extra: "jpLogs",
156 161
       list: [],
157 162
     },
163
+    {
164
+      active: true,
165
+      name: "原始数据日志",
166
+      extra: "dataSourceList",
167
+      list: [],
168
+    },
158 169
   ];
159 170
   // 获取数据
160 171
   getList() {
@@ -181,4 +192,18 @@ export class InfoSearchComponent implements OnInit {
181 192
       nzMaskClosable: true,
182 193
     });
183 194
   }
195
+  // 弹窗
196
+  toSource(string, name) {
197
+    this.modalService.info({
198
+      nzTitle: name,
199
+      nzContent: "<pre>" + string + "</pre>",
200
+      nzWidth: 1000,
201
+      nzMaskClosable: true,
202
+      nzOkText: '复制',
203
+      nzOnOk: () => {
204
+        navigator.clipboard.writeText(string);
205
+        this.message.info(`复制${name}成功`);
206
+      }
207
+    });
208
+  }
184 209
 }

+ 1 - 1
src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.ts

@@ -262,7 +262,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
262 262
     let signTypeIds = this.checkInModes.filter(v => v.checked).map(v => v.value).toString();
263 263
     // let closeTypeIds = this.automaticCustomsOrders.filter(v => v.checked).map(v => v.value).toString();
264 264
     let postData:any = {
265
-      id: this.configs.id,
265
+      ...this.configs,
266 266
       taskType: this.tasktype.id,
267 267
       hosId: this.hosId,
268 268
       multiplayerMode: this.multiplayerMode[0].checked ? 1 : 0,

+ 17 - 0
src/app/views/inspect-closed-loop-view/inspect-closed-loop-view-routing.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { InspectClosedLoopViewComponent } from './inspect-closed-loop-view.component';
4
+
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: "",
9
+    component: InspectClosedLoopViewComponent,
10
+  },
11
+];
12
+
13
+@NgModule({
14
+  imports: [RouterModule.forChild(routes)],
15
+  exports: [RouterModule]
16
+})
17
+export class InspectClosedLoopViewRoutingModule { }

+ 79 - 0
src/app/views/inspect-closed-loop-view/inspect-closed-loop-view.component.html

@@ -0,0 +1,79 @@
1
+<div class="header">
2
+  <div class="display_flex align-items_center flex-wrap">
3
+    <div class="dept"><i class="icon icon_transport transport-fanhui" (click)='goBack()'></i></div>
4
+    <div class="patient">
5
+      <span class="label">预约时间:</span>
6
+      <nz-range-picker nzShowTime [(ngModel)]="dateRange" (nzOnCalendarChange)="onCalendarChangeDate($event)"></nz-range-picker>
7
+    </div>
8
+    <div class="patient">
9
+      <span class="label">科室:</span>
10
+      <nz-select class="formItem" [nzDisabled]="disableDept" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择科室" [(ngModel)]="searchDto.deptId" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeInp('department', $event)" (nzOpenChange)="openChangeDepartment($event)" (ngModelChange)="setIsSelecting(true)">
11
+        <ng-container *ngFor="let option of departmentList">
12
+          <nz-option *ngIf="!isLoading" [nzLabel]="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 class="patient">
20
+      <span class="label">患者:</span>
21
+      <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择患者" [(ngModel)]="searchDto.patientId" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeInp('patient', $event)" (nzOpenChange)="openChangePatient($event)" (ngModelChange)="setIsSelecting(true)">
22
+        <ng-container *ngFor="let option of patientList">
23
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.patientName" [nzValue]="option.id"></nz-option>
24
+        </ng-container>
25
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
26
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
27
+        </nz-option>
28
+      </nz-select>
29
+    </div>
30
+    <div class="patient">
31
+      <span class="label">状态:</span>
32
+      <nz-select nzMode="multiple" class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择状态" [(ngModel)]="searchDto.stateValue" nzAllowClear>
33
+        <ng-container *ngFor="let option of statusList">
34
+          <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.value"></nz-option>
35
+        </ng-container>
36
+        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
37
+          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
38
+        </nz-option>
39
+      </nz-select>
40
+    </div>
41
+    <div class="patient">
42
+      <label nz-checkbox [(ngModel)]="autoRefresh" (ngModelChange)="changeAutoRefresh($event)">自动刷新</label>
43
+      <nz-input-number [(ngModel)]="autoRefreshSecond" [nzMin]="15" [nzStep]="1" [nzPrecision]="0" [nzParser]="parserPercent" [nzFormatter]="formatterPercent"></nz-input-number>
44
+    </div>
45
+  </div>
46
+  <div class="display_flex align-items_center ml8">
47
+    <button nz-button class="btn default" (click)='reset()'>重置</button>
48
+    <button nz-button class="btn default ml8" (click)='search()'>搜索</button>
49
+  </div>
50
+</div>
51
+<div class="table">
52
+  <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1">
53
+    <thead>
54
+      <tr class="thead">
55
+        <th nzWidth="14%">科室信息</th>
56
+        <th nzWidth="14%">患者信息</th>
57
+        <th nzWidth="14%">护理信息</th>
58
+        <th nzWidth="14%">出行方式</th>
59
+        <th nzWidth="16%">检查项目</th>
60
+        <th nzWidth="14%">签到信息</th>
61
+        <th nzWidth="14%">状态</th>
62
+      </tr>
63
+    </thead>
64
+    <tbody>
65
+      <tr *ngFor="let data of listOfData">
66
+        <td>{{data.deptName}}<br>{{data.deptDTO?.pcode}}</td>
67
+        <td>{{data.patientName}}<ng-container *ngIf="data.age !== undefined">({{data.age}}岁)</ng-container><br><ng-container *ngIf="data.patientType && data.patientType.value == 'I'">住:{{data.patientCode}}({{data.bedNum}})</ng-container><ng-container *ngIf="data.patientType && data.patientType.value == 'O'">门诊:{{data.patientCode}}</ng-container><ng-container *ngIf="data.patientType && data.patientType.value == 'E'">急:{{data.patientCode}}</ng-container></td>
68
+        <td>{{data.careLevel?.name}}<br>{{data.illnessState?.name}}</td>
69
+        <td>{{data.tripTypeDTO?.inspectMode}}</td>
70
+        <td><ng-container *ngFor="let item of data.inspectList;let last = last">{{item.inspectName}}<ng-container *ngIf="!last"><br></ng-container></ng-container></td>
71
+        <td>{{ data.signTime | date: "yyyy-MM-dd HH:mm" }}<br>{{ data.signDeptDTO?.dept }}<br>{{ data.signUserDTO?.name }}</td>
72
+        <td>{{data.state?.name}}</td>
73
+      </tr>
74
+    </tbody>
75
+  </nz-table>
76
+</div>
77
+<div class="footer display_flex align-items_center justify-content_flex-end">
78
+  <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" nzShowSizeChanger (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)"></nz-pagination>
79
+</div>

+ 146 - 0
src/app/views/inspect-closed-loop-view/inspect-closed-loop-view.component.less

@@ -0,0 +1,146 @@
1
+@import "../../../../src/theme.less";
2
+
3
+:host {
4
+  width: 100vw;
5
+  height: 100vh;
6
+  overflow: hidden;
7
+  background-color: #F0F2F5;
8
+  display: flex;
9
+  flex-direction: column;
10
+  .header{
11
+    background-color: #fff;
12
+    display: flex;
13
+    align-items: center;
14
+    justify-content: space-between;
15
+    padding: 16px 24px 0;
16
+    font-size: 16px;
17
+    .dept{
18
+      margin-right: 24px;
19
+      margin-bottom: 16px;
20
+      i{
21
+        font-size: 24px;
22
+        color: #8A8A8A;
23
+        cursor: pointer;
24
+      }
25
+    }
26
+    .patient{
27
+      margin-right: 16px;
28
+      display: flex;
29
+      align-items: center;
30
+      margin-bottom: 16px;
31
+    }
32
+    .label{
33
+      padding-right: 16px;
34
+      font-size: 14px;
35
+      flex-shrink: 0;
36
+    }
37
+    .formItem{
38
+      min-width: 120px;
39
+    }
40
+    .info{
41
+      margin-left: 48px;
42
+    }
43
+    .btn{
44
+      margin-bottom: 16px;
45
+    }
46
+  }
47
+  .table{
48
+    flex: 1;
49
+    min-height: 0;
50
+    margin-top: 10px;
51
+    background-color: #fff;
52
+    overflow: auto;
53
+    padding: 8px 16px;
54
+    .patient{
55
+      position: relative;
56
+      .circle{
57
+        width: 8px;
58
+        height: 8px;
59
+        border-radius: 50%;
60
+        background-color: @primary-color;
61
+        position: absolute;
62
+        top: 50%;
63
+        left: -8px;
64
+        transform: translate(-50%,-50%);
65
+        &.red{
66
+          background-color: red;
67
+        }
68
+      }
69
+    }
70
+    .transport-weibiaoti2010104{
71
+      font-size: 15px;
72
+      color: #999;
73
+      margin-left: 10px;
74
+      margin-top: 3px;
75
+      cursor: pointer;
76
+    }
77
+    .transport-shanchu1{
78
+      font-size: 15px;
79
+      color: #999;
80
+      margin-left: 5px;
81
+      margin-top: 3px;
82
+      cursor: pointer;
83
+    }
84
+    .thead{
85
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
86
+      th {
87
+        background: transparent;
88
+        color: #fff;
89
+        text-align: center;
90
+      }
91
+    }
92
+    .ant-table-body {
93
+      border-bottom: 1px solid #e5e9ed;
94
+    }
95
+
96
+    .ant-table-tbody {
97
+      tr {
98
+        text-align: center;
99
+        color: #333;
100
+
101
+        td {
102
+          border: none;
103
+
104
+          &.tab_hover:hover{
105
+            text-decoration: underline;
106
+            cursor: pointer;
107
+          }
108
+
109
+          .coop {
110
+            button{
111
+              color: #333;
112
+            }
113
+            span,button {
114
+              display: inline-block;
115
+              padding: 0 8px;
116
+              cursor: pointer;
117
+              position: relative;
118
+
119
+              &::after {
120
+                content: "|";
121
+                position: absolute;
122
+                top: 0;
123
+                right: 0;
124
+              }
125
+
126
+              &:hover,
127
+              &:active {
128
+                color: @primary-color;
129
+              }
130
+
131
+              &:nth-last-child(1) {
132
+                &::after {
133
+                  content: "";
134
+                }
135
+              }
136
+            }
137
+          }
138
+        }
139
+      }
140
+    }
141
+  }
142
+  .footer{
143
+    height: 60px;
144
+    background-color: #fff;
145
+  }
146
+}

+ 248 - 0
src/app/views/inspect-closed-loop-view/inspect-closed-loop-view.component.ts

@@ -0,0 +1,248 @@
1
+import { Component, OnInit, OnDestroy } from '@angular/core';
2
+import { ToolService } from 'src/app/services/tool.service';
3
+import { MainService } from 'src/app/services/main.service';
4
+import { NzMessageService } from 'ng-zorro-antd';
5
+import { startOfDay, endOfDay, format } from 'date-fns';
6
+import { Subject } from 'rxjs';
7
+import { debounceTime } from 'rxjs/operators';
8
+import { Location } from '@angular/common';
9
+import cloneDeep from 'lodash-es/cloneDeep'
10
+import { ActivatedRoute } from '@angular/router';
11
+@Component({
12
+  selector: 'app-inspect-closed-loop-view',
13
+  templateUrl: './inspect-closed-loop-view.component.html',
14
+  styleUrls: ['./inspect-closed-loop-view.component.less']
15
+})
16
+export class InspectClosedLoopViewComponent implements OnInit, OnDestroy {
17
+
18
+  constructor(
19
+    private mainService: MainService,
20
+    private tool: ToolService,
21
+    private message: NzMessageService,
22
+    private _location: Location,
23
+    private route: ActivatedRoute,
24
+  ) { }
25
+
26
+  hosId:any = this.tool.getCurrentHospital().id; //当前院区
27
+  deptDTO:any = this.tool.getCurrentUserDept(); //当前科室
28
+  listOfData: any[] = []; //表格数据
29
+  pageIndex: number = 1; //表格当前页码
30
+  pageSize: number = 10; //表格每页展示条数
31
+  listLength: number = 10; //表格总数据量
32
+  searchDto: any = {};
33
+  autoRefresh:boolean = false;
34
+  autoRefreshSecond: number = 15;
35
+
36
+  dateRange: any = []; //预约时间
37
+
38
+  formatterPercent = (value: number) => `${value} 秒`;
39
+  parserPercent = (value: string) => value.replace(' 秒', '');
40
+
41
+
42
+  searchTimerSubject = new Subject(); //防抖
43
+
44
+  ngOnInit() {
45
+    //防抖
46
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
47
+      let fun = v[0];
48
+      fun.call(this, v[1]);
49
+    });
50
+
51
+    this.init();
52
+  }
53
+
54
+  ngOnDestroy() {
55
+    clearInterval(this.timer);
56
+  }
57
+
58
+  // 日期选择
59
+  onCalendarChangeDate(dateArr){
60
+    if(dateArr.length == 2){
61
+      this.dateRange = [startOfDay(dateArr[0]), endOfDay(dateArr[1])];
62
+    }
63
+  }
64
+
65
+  // 修改自动刷新时间
66
+  timer;
67
+  time: number = 15;
68
+  changeAutoRefresh(flag){
69
+    if(flag){
70
+      this.time = this.autoRefreshSecond;
71
+      console.log('this.time:', this.time)
72
+      clearInterval(this.timer);
73
+      this.timer = setInterval(() => {
74
+        this.time--;
75
+        console.log('this.time:', this.time)
76
+        if(this.time === 0){
77
+          this.time = this.autoRefreshSecond;
78
+          this.search();
79
+        }
80
+      }, 1000);
81
+    }else{
82
+      clearInterval(this.timer);
83
+    }
84
+  }
85
+
86
+  // 搜索
87
+  search() {
88
+    this.getList(1);
89
+  }
90
+
91
+  // 重置
92
+  reset() {
93
+    if(this.disableDept){
94
+      this.searchDto = { deptId: this.searchDto.deptId };
95
+    }else{
96
+      this.searchDto = {};
97
+    }
98
+    this.dateRange = [];
99
+    this.getList(1);
100
+  }
101
+
102
+  disableDept:boolean = false;
103
+  init(){
104
+    const queryParams = this.route.snapshot.queryParams.queryParams ? JSON.parse(this.route.snapshot.queryParams.queryParams) : undefined;
105
+    if(queryParams){
106
+      if(queryParams.department){
107
+        this.searchDto.deptId = queryParams.department.id;
108
+        this.departmentList = [queryParams.department];
109
+        this.disableDept = true;
110
+      }
111
+
112
+      if(queryParams.stateValue){
113
+        this.searchDto.stateValue = queryParams.stateValue.split(',');
114
+      }
115
+    }
116
+    this.getStatusList();
117
+    this.search();
118
+  }
119
+
120
+  // 防抖
121
+  isLoading = false;
122
+  isSelecting:boolean = false; // 是否在选中状态
123
+  searchTimer(fun, e) {
124
+    if (this.isSelecting) {
125
+      this.isSelecting = false; // 重置标志
126
+      return; // 跳过处理
127
+    }
128
+    this.isLoading = true;
129
+    this.searchTimerSubject.next([fun, e]);
130
+  }
131
+
132
+  // 搜索
133
+  changeInp(type, e) {
134
+    if(type === 'patient'){
135
+      this.searchTimer(this.getPatientList, e);
136
+    }else if(type === 'department'){
137
+      this.searchTimer(this.getDepartmentList, e);
138
+    }
139
+  }
140
+
141
+  // 设置标志
142
+  setIsSelecting(flag){
143
+    this.isSelecting = flag; // 设置标志
144
+  }
145
+
146
+
147
+  openChangePatient(flag){
148
+    flag && this.setIsSelecting(false);
149
+    flag && this.getPatientList();
150
+  }
151
+
152
+  // 获取患者
153
+  patientList: any = [];
154
+  getPatientList(e = undefined) {
155
+    let postData = {
156
+      idx: 0,
157
+      sum: 20,
158
+      patient: {
159
+        hosId: this.hosId,
160
+        keyWord: e,
161
+      }
162
+    };
163
+    this.isLoading = true;
164
+    this.mainService
165
+      .getFetchDataList("simple/data", "patient", postData)
166
+      .subscribe((data) => {
167
+        this.isLoading = false;
168
+        this.patientList = data.list || [];
169
+      });
170
+  }
171
+
172
+  openChangeDepartment(flag){
173
+    flag && this.setIsSelecting(false);
174
+    flag && this.getDepartmentList();
175
+  }
176
+
177
+  // 获取科室
178
+  departmentList: any = [];
179
+  getDepartmentList(e = undefined) {
180
+    let postData = {
181
+      idx: 0,
182
+      sum: 20,
183
+      department: {
184
+        searchType: 1,// 简单查询
185
+        hospital: { id: this.hosId },
186
+        dept: e,
187
+      }
188
+    };
189
+    this.isLoading = true;
190
+    this.mainService
191
+      .getFetchDataList("simple/data", "department", postData)
192
+      .subscribe((data) => {
193
+        this.isLoading = false;
194
+        this.departmentList = data.list || [];
195
+      });
196
+  }
197
+
198
+  // 获取状态
199
+  statusList: any = [];
200
+  getStatusList() {
201
+    this.mainService.getDictionary('list', 'patient_inspect_state').subscribe((data) => {
202
+      this.statusList = data || [];
203
+    });
204
+  }
205
+
206
+  loading1:boolean = false;
207
+
208
+  // 表格数据
209
+  getList(type) {
210
+    if (type == 1) {
211
+      this.pageIndex = 1;
212
+    }
213
+    let data = {
214
+      idx: this.pageIndex - 1,
215
+      sum: this.pageSize,
216
+      patientInspectLog: {
217
+        startTime: this.dateRange.length ? format(this.dateRange[0], 'yyyy-MM-dd HH:mm:ss') : undefined,
218
+        endTime: this.dateRange.length ? format(this.dateRange[1], 'yyyy-MM-dd HH:mm:ss') : undefined,
219
+        hosId: this.hosId,
220
+        deptId: this.searchDto.deptId || undefined,
221
+        patientId: this.searchDto.patientId || undefined,
222
+        state: this.searchDto.stateValue ? { value: this.searchDto.stateValue.toString() } : undefined,
223
+      },
224
+    };
225
+    this.loading1 = true;
226
+    this.mainService
227
+      .getFetchDataList("simple/data", "patientInspectLog", data)
228
+      .subscribe((data) => {
229
+        this.loading1 = false;
230
+        if (data.status == 200) {
231
+          let list = data.list || [];
232
+          list.forEach(v => {
233
+            v.inspectNames = v.inspectList ? v.inspectList.map(v => v.inspectName).join(',') : '';
234
+          })
235
+          this.listOfData = list;
236
+          this.listLength = data.totalNum;
237
+        }else{
238
+          this.message.error(data.msg || "请求数据失败");
239
+        }
240
+      });
241
+  }
242
+
243
+  // 返回
244
+  goBack(){
245
+    this._location.back();
246
+  }
247
+
248
+}

+ 17 - 0
src/app/views/inspect-closed-loop-view/inspect-closed-loop-view.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { InspectClosedLoopViewRoutingModule } from './inspect-closed-loop-view-routing.module';
5
+import { InspectClosedLoopViewComponent } from './inspect-closed-loop-view.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [InspectClosedLoopViewComponent],
11
+  imports: [
12
+    CommonModule,
13
+    InspectClosedLoopViewRoutingModule,
14
+    ShareModule,
15
+  ]
16
+})
17
+export class InspectClosedLoopViewModule { }

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

@@ -622,6 +622,11 @@ const routes: Routes = [
622 622
 			{
623 623
 			  path: "shareSpecimen",
624 624
 			  loadChildren: () => import("../share-specimen/share-specimen.module").then((m) => m.ShareSpecimenModule),
625
+			},
626
+			// 患者陪检闭环
627
+			{
628
+			  path: "patientInspectLog",
629
+			  loadChildren: () => import("../patient-inspect-log/patient-inspect-log.module").then((m) => m.PatientInspectLogModule),
625 630
 			}
626 631
     ],
627 632
   },

+ 1 - 0
src/app/views/main/main.component.html

@@ -51,6 +51,7 @@
51 51
 							<div class="dropdownItem" *ngIf="communicationBook" (click)="toCommunicationBook()">病理交接本</div>
52 52
 							<div class="dropdownItem" *ngIf="disinfectionSupplyRole" (click)="toDisinfectionSupply()">全局业务查看</div>
53 53
 							<div class="dropdownItem" *ngIf="realtimeBroadcastRole" (click)="toRealtimeBroadcast()">故障实时播报</div>
54
+							<div class="dropdownItem" *ngIf="inspectClosedLoopViewRole" (click)="toInspectClosedLoopView()">陪检闭环视图</div>
54 55
             </div>
55 56
           </div>
56 57
         </div>

+ 10 - 1
src/app/views/main/main.component.ts

@@ -34,7 +34,8 @@ export class MainComponent implements OnInit {
34 34
 	sampling: boolean = false; //门诊病理采样端权限
35 35
 	communicationBook: boolean = false; //病理交接本权限
36 36
   disinfectionSupplyRole: boolean = false; //全局业务查看权限
37
-  realtimeBroadcastRole: boolean = false; //全局业务查看权限
37
+  realtimeBroadcastRole: boolean = false; //故障实时播报
38
+  inspectClosedLoopViewRole: boolean = false; //陪检闭环视图
38 39
   incidentConfigRole: boolean = false; //事件配置权限
39 40
   otherConfigRole: boolean = false; //三方配置权限
40 41
   pageConfigRole: boolean = false; //业务页面控制权限
@@ -322,6 +323,10 @@ export class MainComponent implements OnInit {
322 323
         this.realtimeBroadcastRole = true;
323 324
         console.log("故障实时播报权限");
324 325
       }
326
+      if (e.link == "inspectClosedLoopView") {
327
+        this.inspectClosedLoopViewRole = true;
328
+        console.log("陪检闭环视图权限");
329
+      }
325 330
       if (e.link == "incidentConfig") {
326 331
         this.incidentConfigRole = true;
327 332
         console.log("事件配置权限");
@@ -477,6 +482,10 @@ export class MainComponent implements OnInit {
477 482
   toRealtimeBroadcast(): void {
478 483
     this.router.navigateByUrl("realtimeBroadcast");
479 484
   }
485
+  // 陪检闭环视图
486
+  toInspectClosedLoopView(): void {
487
+    this.router.navigateByUrl("inspectClosedLoopView");
488
+  }
480 489
   // 配置中心
481 490
   toConfigurationCenter(): void {
482 491
     this.iShowMenuModal = true;

+ 25 - 0
src/app/views/patient-inspect-log-detail/patient-inspect-log-detail-routing.module.ts

@@ -0,0 +1,25 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { OrderDetailComponent } from 'src/app/share/order-detail/order-detail.component';
4
+import { PatientInspectLogDetailComponent } from './patient-inspect-log-detail.component';
5
+
6
+
7
+const routes: Routes = [
8
+  {
9
+    path: '',
10
+    component: PatientInspectLogDetailComponent,
11
+    children: [
12
+      {
13
+        // 查看详情
14
+        path: 'orderDetail/:id',
15
+        component: OrderDetailComponent,
16
+      }
17
+    ]
18
+  }
19
+];
20
+
21
+@NgModule({
22
+  imports: [RouterModule.forChild(routes)],
23
+  exports: [RouterModule]
24
+})
25
+export class PatientInspectLogDetailRoutingModule { }

+ 173 - 0
src/app/views/patient-inspect-log-detail/patient-inspect-log-detail.component.html

@@ -0,0 +1,173 @@
1
+<div class="detail" *ngIf="!maskFlag">
2
+  <div class="title">
3
+    查看<i class="icon_transport transport-guanbi" (click)="close()"></i>
4
+  </div>
5
+  <div class="box">
6
+    <div class="tab display_flex">
7
+      <div [ngClass]="{ item: true, flex_1: true, checked: tabType == 1 }" (click)="checkTab(1)">基本信息</div>
8
+      <div [ngClass]="{ item: true, flex_1: true, checked: tabType == 2 }" (click)="checkTab(2)">日志</div>
9
+      <div [ngClass]="{ item: true, flex_1: true, checked: tabType == 3 }" (click)="checkTab(3)">检查项目</div>
10
+      <div [ngClass]="{ item: true, flex_1: true, checked: tabType == 4 }" (click)="checkTab(4)">陪检工单</div>
11
+    </div>
12
+
13
+    <!-- 基本信息 -->
14
+    <overlay-scrollbars #osComponentRef1 style="height: 90%; flex: 1" *ngIf="tabType == 1">
15
+      <div class="content orders">
16
+        <div class="top">
17
+          <div class="info" nz-row>
18
+            <div nz-col nzSpan="6">科室名称:{{ orderInfo.deptName }}</div>
19
+            <div nz-col nzSpan="6">患者信息:{{ orderInfo.patientName }}</div>
20
+            <div nz-col nzSpan="6">床号:{{ orderInfo.bedNum }}</div>
21
+            <div nz-col nzSpan="6">年龄:<ng-container *ngIf="orderInfo.age !== undefined">{{ orderInfo.age }}岁</ng-container></div>
22
+          </div>
23
+
24
+          <div class="info" nz-row>
25
+            <div nz-col nzSpan="6">护理级别:{{ orderInfo.careLevel?.name }}</div>
26
+            <div nz-col nzSpan="6">危重等级:{{ orderInfo.illnessState?.name }}</div>
27
+            <div nz-col nzSpan="6">出科时间:{{ orderInfo.outDeptTime | date:'yyyy-MM-dd HH:mm' }}</div>
28
+            <div nz-col nzSpan="6">出科陪检人:{{ orderInfo.outDeptUserDTO?.name }}</div>
29
+          </div>
30
+
31
+          <div class="info" nz-row>
32
+            <div nz-col nzSpan="6">回科时间:{{ orderInfo.backDeptTime | date:'yyyy-MM-dd HH:mm' }}</div>
33
+            <div nz-col nzSpan="6">回科陪检人:{{ orderInfo.backDeptUserDTO?.name }}</div>
34
+            <div nz-col nzSpan="6">签到科室:{{ orderInfo.signDeptDTO?.dept }}</div>
35
+            <div nz-col nzSpan="6"></div>
36
+          </div>
37
+
38
+          <div class="info" nz-row>
39
+            <div nz-col nzSpan="6">签到时间:{{ orderInfo.signTime | date: "yyyy-MM-dd HH:mm" }}</div>
40
+            <div nz-col nzSpan="6">签到人:{{ orderInfo.signUserDTO?.name }}</div>
41
+            <div nz-col nzSpan="6">关联工单数:{{ orderInfo.state && (orderInfo.state.value == 1 || orderInfo.state.value == 2) ? orderInfo.planOrderCount : orderInfo.orderCount }}</div>
42
+            <div nz-col nzSpan="6"></div>
43
+          </div>
44
+
45
+          <div class="info" nz-row>
46
+            <div nz-col nzSpan="6">关联检查项目:{{ orderInfo.state && (orderInfo.state.value == 1 || orderInfo.state.value == 2) ? orderInfo.planInspectCount : orderInfo. inspectCount }}</div>
47
+            <div nz-col nzSpan="6">状态:{{ orderInfo.state?.name }}</div>
48
+            <div nz-col nzSpan="6">携带设备:{{ orderInfo.goodsNames }}</div>
49
+            <div nz-col nzSpan="6">出行方式:{{ orderInfo.tripTypeDTO?.inspectMode }}</div>
50
+          </div>
51
+
52
+          <div class="info" nz-row>
53
+            <div nz-col nzSpan="6">预约时间:{{ orderInfo.yyTime | date: "yyyy-MM-dd HH:mm" }}</div>
54
+            <div nz-col nzSpan="6"><ng-container *ngIf="orderInfo.patientType && orderInfo.patientType.value == 'I'">住院号:{{orderInfo.patientCode}}({{orderInfo.bedNum}})</ng-container><ng-container *ngIf="orderInfo.patientType && orderInfo.patientType.value == 'O'">门诊号:{{orderInfo.patientCode}}</ng-container><ng-container *ngIf="orderInfo.patientType && orderInfo.patientType.value == 'E'">急诊号:{{orderInfo.patientCode}}</ng-container></div>
55
+            <div nz-col nzSpan="6"></div>
56
+            <div nz-col nzSpan="6"></div>
57
+          </div>
58
+        </div>
59
+      </div>
60
+    </overlay-scrollbars>
61
+    <!-- 日志 -->
62
+    <overlay-scrollbars #osComponentRef2 style="height: 90%;flex:1;" *ngIf="tabType == 2">
63
+      <div class="content jifen">
64
+        <div class="table">
65
+          <nz-table class="integralTable" [nzData]="logList" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1">
66
+            <thead>
67
+              <tr class="thead">
68
+                <th nzWidth="15%">动作</th>
69
+                <th nzWidth="15%">操作时间</th>
70
+                <th nzWidth="10%">操作人</th>
71
+                <th nzWidth="10%">原负责人</th>
72
+                <th nzWidth="10%">接收负责人</th>
73
+                <th nzWidth="40%">备注</th>
74
+              </tr>
75
+            </thead>
76
+            <tbody>
77
+              <tr *ngFor="let item of logList; let i = index">
78
+                <td>{{ item.operationType?.name }}</td>
79
+                <td>{{ item.operationTime | date: 'yyyy-MM-dd HH:mm' }}</td>
80
+                <td>{{ item.username }}</td>
81
+                <td></td>
82
+                <td></td>
83
+                <td>{{ item.remark }}</td>
84
+              </tr>
85
+            </tbody>
86
+          </nz-table>
87
+        </div>
88
+      </div>
89
+    </overlay-scrollbars>
90
+    <!-- 检查项目 -->
91
+    <overlay-scrollbars #osComponentRef3 style="height: 90%;flex:1;" *ngIf="tabType == 3">
92
+      <div class="content jifen">
93
+        <div class="table">
94
+          <nz-table class="integralTable" [nzData]="inspectList" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1">
95
+            <thead>
96
+              <tr class="thead">
97
+                <th nzWidth="20%">检查单号</th>
98
+                <th nzWidth="20%">检查项目</th>
99
+                <th nzWidth="20%">检查地点</th>
100
+                <th nzWidth="20%">预约时间</th>
101
+                <th nzWidth="20%">状态</th>
102
+              </tr>
103
+            </thead>
104
+            <tbody>
105
+              <tr *ngFor="let item of inspectList; let i = index">
106
+                <td>{{ item.inspectCode }}</td>
107
+                <td>{{ item.inspectName }}</td>
108
+                <td>{{ item.execDept?.dept }}</td>
109
+                <td>{{ item.yyTime | date:"yyyy-MM-dd HH:mm" }}</td>
110
+                <td>{{ item.inspectState?.name }}</td>
111
+              </tr>
112
+            </tbody>
113
+          </nz-table>
114
+        </div>
115
+      </div>
116
+    </overlay-scrollbars>
117
+    <!-- 陪检工单 -->
118
+    <overlay-scrollbars #osComponentRef4 style="height: 90%;flex:1;" *ngIf="tabType == 4">
119
+      <div class="content jifen">
120
+        <div class="table">
121
+          <nz-table class="integralTable" [nzData]="orderList" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1">
122
+            <thead>
123
+              <tr class="thead">
124
+                <th nzWidth="17%">终点科室</th>
125
+                <th nzWidth="17%">任务类型</th>
126
+                <th nzWidth="17%">发起时间</th>
127
+                <th nzWidth="17%">执行人</th>
128
+                <th nzWidth="17%">状态</th>
129
+                <th nzWidth="15%">操作</th>
130
+              </tr>
131
+            </thead>
132
+            <tbody>
133
+              <tr *ngFor="let item of orderList; let i = index">
134
+                <td>{{ item.endDeptsName }}</td>
135
+                <td>{{ item.taskType.taskName }}</td>
136
+                <td>{{ item.startTime | date:'yyyy-MM-dd HH:mm' }}</td>
137
+                <td>{{ item.worker?.name }}</td>
138
+                <td>{{ item.gdState.name }}</td>
139
+                <td>
140
+                  <div class="coop">
141
+                    <span (click)="detail($event, item.id)">查看</span>
142
+                  </div>
143
+                </td>
144
+              </tr>
145
+            </tbody>
146
+          </nz-table>
147
+        </div>
148
+      </div>
149
+    </overlay-scrollbars>
150
+  </div>
151
+  <div class="btns">
152
+    <button class="btn cancel" nz-button nzType="default" (click)="close()">
153
+      关闭
154
+    </button>
155
+  </div>
156
+</div>
157
+<!-- 操作成功/失败提示框 -->
158
+<app-prompt-modal
159
+  *ngIf="promptModalShow"
160
+  [content]="promptContent"
161
+  [success]="ifSuccess"
162
+  [show]="promptModalShow"
163
+  [info]="promptInfo"
164
+  (closeModel)="close()"
165
+>
166
+  <!-- 2.父组件调用子组件时绑定到这个事件属性,并在事件发生时作出回应。(closeModel)="close()" -->
167
+</app-prompt-modal>
168
+
169
+<!-- 遮罩 -->
170
+<app-mask *ngIf="maskFlag"></app-mask>
171
+
172
+<!-- 查看详情 -->
173
+<router-outlet></router-outlet>

+ 576 - 0
src/app/views/patient-inspect-log-detail/patient-inspect-log-detail.component.less

@@ -0,0 +1,576 @@
1
+@import "../../../../src/theme.less";
2
+
3
+img{
4
+	cursor: pointer;
5
+}
6
+
7
+.img-box{
8
+	display: flex;
9
+	img{
10
+		margin: 0 2px;
11
+	}
12
+}
13
+
14
+:host {
15
+  width: 100%;
16
+  height: 100%;
17
+  position: fixed;
18
+  left: 0;
19
+  top: 0;
20
+  background: rgba(0, 0, 0, 0.4);
21
+  z-index: 99;
22
+
23
+  display: flex;
24
+  justify-content: center;
25
+  align-items: center;
26
+}
27
+
28
+.coop {
29
+  button{
30
+    color: #333;
31
+  }
32
+  span,button {
33
+    display: inline-block;
34
+    padding: 0 8px;
35
+    cursor: pointer;
36
+    position: relative;
37
+
38
+    &::after {
39
+      content: "|";
40
+      position: absolute;
41
+      top: 0;
42
+      right: 0;
43
+    }
44
+
45
+    &:hover,
46
+    &:active {
47
+      color: @primary-color;
48
+    }
49
+
50
+    &:nth-last-child(1) {
51
+      &::after {
52
+        content: "";
53
+      }
54
+    }
55
+  }
56
+}
57
+
58
+.detail {
59
+  display: flex;
60
+  flex-direction: column;
61
+  width: 1200px;
62
+  height: calc(100vh - 100px);
63
+  min-height: 580px;
64
+  border-radius: 5px;
65
+  background: #fff;
66
+  color: #333;
67
+  font-size: 14px;
68
+  padding: 12px 20px;
69
+  position: relative;
70
+  padding-bottom: 70px;
71
+
72
+  .title {
73
+    font-size: 18px;
74
+    text-align: center;
75
+    line-height: 24px;
76
+    margin: 0;
77
+    margin-bottom: 12px;
78
+    position: relative;
79
+
80
+    i {
81
+      position: absolute;
82
+      right: 0;
83
+      top: 0;
84
+      font-size: 20px;
85
+      color: #666;
86
+      cursor: pointer;
87
+      padding: 0 5px;
88
+    }
89
+  }
90
+
91
+  & > .box {
92
+    width: 1160px;
93
+    border: 1px solid #e5e9ed;
94
+    border-radius: 5px;
95
+    flex: 1;
96
+    overflow: hidden;
97
+    display: flex;
98
+    flex-direction: column;
99
+
100
+    .tab {
101
+      width: 100%;
102
+      height: 60px;
103
+      border-bottom: 1px solid #e5e9ed;
104
+      cursor: pointer;
105
+
106
+      .item {
107
+        text-align: center;
108
+        line-height: 60px;
109
+        height: 100%;
110
+        // border-right: 1px solid #e5e9ed;
111
+
112
+        &:nth-last-child(1) {
113
+          border: none;
114
+        }
115
+
116
+        &.checked {
117
+          background: #F0F6ED;
118
+        }
119
+      }
120
+    }
121
+
122
+    .content {
123
+      width: 100%;
124
+      // min-height: 453px;
125
+      display: flex;
126
+      flex-direction: column;
127
+
128
+      &.orders {
129
+        background: #f9fafb;
130
+      }
131
+
132
+      & > .top {
133
+        padding: 16px 24px;
134
+        overflow: hidden;
135
+        background: #fff;
136
+
137
+        .num {
138
+          font-size: 16px;
139
+          overflow: hidden;
140
+          margin-bottom: 6px;
141
+
142
+          .left {
143
+            float: left;
144
+            font-weight: 600;
145
+          }
146
+
147
+          .right {
148
+            float: right;
149
+          }
150
+        }
151
+
152
+        .info {
153
+          color: #666;
154
+
155
+          & > div {
156
+            margin: 8px 0;
157
+          }
158
+
159
+          .jiaji {
160
+            margin: 0;
161
+            margin-top: 8px;
162
+          }
163
+        }
164
+      }
165
+
166
+      & > .center {
167
+        padding: 27px 0 17px 0;
168
+        border-bottom: 1px solid #e5e9ed;
169
+        font-size: 12px;
170
+        background: #fff;
171
+
172
+        .box {
173
+          display: flex;
174
+          justify-content: center;
175
+
176
+          .steps {
177
+            &:nth-last-child(1) {
178
+              .line {
179
+                display: none !important;
180
+              }
181
+            }
182
+
183
+            .step {
184
+              .info {
185
+                width: 90px;
186
+                text-align: center;
187
+                display: inline-block;
188
+                vertical-align: top;
189
+
190
+                i {
191
+                  color: #e5e9ed;
192
+
193
+                  &.green {
194
+                    color: @primary-color;
195
+                  }
196
+                }
197
+              }
198
+
199
+              p {
200
+                margin: 0;
201
+              }
202
+
203
+              .line {
204
+                display: inline-block;
205
+                width: 60px;
206
+                height: 2px;
207
+                background: #e5e9ed;
208
+              }
209
+            }
210
+          }
211
+        }
212
+      }
213
+
214
+      & > .bottom {
215
+        flex: 1;
216
+        padding: 25px 32px;
217
+        background: #f9fafb;
218
+
219
+        .amplification {
220
+          display: flex;
221
+          justify-content: flex-end;
222
+          margin-bottom: 8px;
223
+        }
224
+
225
+        .urgent {
226
+          input {
227
+            width: 600px;
228
+          }
229
+
230
+          .candelBtn {
231
+            margin-left: 20px;
232
+          }
233
+        }
234
+
235
+        .table {
236
+          width: 100%;
237
+          height: 100%;
238
+          background: #fff;
239
+          border-radius: 5px;
240
+
241
+          .thead {
242
+            background-image: repeating-linear-gradient(
243
+              to right,
244
+              @bg-start,
245
+              @bg-end 100%
246
+            ) !important;
247
+
248
+            th {
249
+              color: #fff !important;
250
+              text-align: center;
251
+              font-size: 12px;
252
+              border: none;
253
+            }
254
+          }
255
+
256
+          .detailDrugTable {
257
+            .thead {
258
+              background-image: repeating-linear-gradient(
259
+                to right,
260
+                @bg-start,
261
+                @bg-end 50%
262
+              ) !important;
263
+            }
264
+          }
265
+
266
+          .ant-table-tbody {
267
+            tr {
268
+              text-align: center;
269
+              font-size: 12px;
270
+              border: none;
271
+
272
+              td {
273
+                border: none;
274
+                position: relative;
275
+              }
276
+            }
277
+
278
+            tr:nth-child(2n) {
279
+              background: #f9fafb;
280
+            }
281
+          }
282
+        }
283
+
284
+        .info {
285
+          width: 100%;
286
+          height: 100%;
287
+          background: #fff;
288
+          border-radius: 5px;
289
+          border: 1px solid #e5e9ed;
290
+          padding: 24px 28px 14px 28px;
291
+          margin-bottom: 8px;
292
+
293
+          .top {
294
+            .left {
295
+              border-right: 1px dashed #e5e9ed;
296
+
297
+              p {
298
+                padding: 0 70px 0 102px;
299
+                overflow: hidden;
300
+
301
+                & > span:nth-child(1) {
302
+                  float: left;
303
+                }
304
+
305
+                & > span:nth-child(2) {
306
+                  float: right;
307
+                  color: #666;
308
+                  text-align: right;
309
+                  max-width: 175px;
310
+                }
311
+              }
312
+            }
313
+
314
+            .right {
315
+              p {
316
+                padding: 0 102px 0 70px;
317
+                overflow: hidden;
318
+
319
+                span:nth-child(1) {
320
+                  float: left;
321
+                }
322
+
323
+                span:nth-child(2) {
324
+                  float: right;
325
+                  color: #666;
326
+                  text-align: right;
327
+                }
328
+              }
329
+            }
330
+          }
331
+
332
+          .wait {
333
+            text-align: center;
334
+            margin-top: 7px;
335
+
336
+            i {
337
+              font-size: 24px;
338
+              color: #62c26d;
339
+            }
340
+
341
+            span {
342
+              color: #62c26d;
343
+            }
344
+          }
345
+        }
346
+      }
347
+
348
+      &.pingjia {
349
+        .msg {
350
+          width: 100%;
351
+          height: 50px;
352
+          line-height: 50px;
353
+          padding-left: 32px;
354
+          border-bottom: 1px solid #e5e9ed;
355
+
356
+          div {
357
+            display: inline-block;
358
+            margin-right: 100px;
359
+          }
360
+        }
361
+
362
+        .con {
363
+          padding: 16px 32px;
364
+          min-height: 360px;
365
+        }
366
+      }
367
+
368
+      & > .form {
369
+        .ant-form-item {
370
+          padding: 0 32px 13px 32px;
371
+          margin-bottom: 0;
372
+          border-bottom: 1px solid #e5e9ed;
373
+
374
+          &:nth-last-child(1) {
375
+            border: none;
376
+          }
377
+        }
378
+
379
+        .ant-form-item-label {
380
+          line-height: 34px;
381
+          text-align: left;
382
+        }
383
+      }
384
+
385
+      & > .mediation {
386
+        padding: 16px 32px;
387
+
388
+        .item {
389
+          border-bottom: 1px solid #e5e9ed;
390
+          padding-top: 10px;
391
+
392
+          .label {
393
+            line-height: 28px;
394
+            margin-top: 10px;
395
+          }
396
+
397
+          .info {
398
+            line-height: 28px;
399
+            color: #999;
400
+            padding-bottom: 20px;
401
+          }
402
+        }
403
+      }
404
+
405
+      &.jifen {
406
+        padding: 32px;
407
+
408
+        & > .table {
409
+          width: 100%;
410
+          height: 100%;
411
+          padding: 6px;
412
+          background: #fff;
413
+          border: 1px solid #e5e9ed;
414
+          border-radius: 5px;
415
+          overflow: hidden;
416
+
417
+          .thead {
418
+            background-image: repeating-linear-gradient(
419
+              to right,
420
+              @bg-start,
421
+              @bg-end 100%
422
+            ) !important;
423
+
424
+            th {
425
+              color: #fff !important;
426
+              text-align: center;
427
+              font-size: 12px;
428
+              border: none;
429
+              background: transparent;
430
+            }
431
+          }
432
+
433
+          .ant-table-tbody {
434
+            tr {
435
+              text-align: center;
436
+              font-size: 12px;
437
+              border: none;
438
+
439
+              td {
440
+                border: none;
441
+              }
442
+            }
443
+
444
+            tr:nth-child(2n) {
445
+              background: #f9fafb;
446
+            }
447
+          }
448
+        }
449
+      }
450
+    }
451
+  }
452
+
453
+  .btns {
454
+    display: flex;
455
+    justify-content: center;
456
+    align-items: center;
457
+    width: 100%;
458
+    position: absolute;
459
+    left: 0;
460
+    bottom: 20px;
461
+
462
+    .btn {
463
+      margin: 9px;
464
+      margin-bottom: 0;
465
+    }
466
+  }
467
+
468
+  .ant-table {
469
+    border: none !important;
470
+  }
471
+}
472
+
473
+// 撤回工单
474
+.recallOrder {
475
+  position: fixed;
476
+  left: 0;
477
+  top: 0;
478
+  width: 100%;
479
+  height: 100%;
480
+
481
+  display: flex;
482
+  justify-content: center;
483
+  align-items: center;
484
+  background: rgba(0, 0, 0, 0.4);
485
+  z-index: 99;
486
+
487
+  .modalBody {
488
+    width: 350px;
489
+    height: 220px;
490
+    background: #fff;
491
+    border-radius: 5px;
492
+    padding: 10px 20px;
493
+    color: #333;
494
+
495
+    .title {
496
+      width: 100%;
497
+      text-align: center;
498
+      font-size: 18px;
499
+      position: relative;
500
+
501
+      i {
502
+        position: absolute;
503
+        right: 0;
504
+        top: 0;
505
+        font-size: 20px;
506
+        color: #666;
507
+        cursor: pointer;
508
+        padding: 0 5px;
509
+      }
510
+    }
511
+
512
+    .content {
513
+      width: 310px;
514
+      height: 117px;
515
+      background: #f9fafb;
516
+      border: 1px solid #e5e9ed;
517
+      border-radius: 5px;
518
+      overflow: hidden;
519
+      margin-top: 12px;
520
+
521
+      div {
522
+        text-align: center;
523
+        margin: 0;
524
+
525
+        &.icon {
526
+          margin-top: 17px;
527
+
528
+          i {
529
+            color: #ff3b53;
530
+            font-size: 30px !important;
531
+
532
+            &.transport-wenhao {
533
+              color: #f5a523;
534
+            }
535
+          }
536
+        }
537
+
538
+        &.defeat {
539
+          color: #333;
540
+          font-size: 18px;
541
+        }
542
+
543
+        &:nth-child(3) {
544
+          font-size: 14px;
545
+          color: #666;
546
+        }
547
+      }
548
+
549
+      .conditions {
550
+        padding: 16px 20px;
551
+
552
+        div {
553
+          text-align: left;
554
+        }
555
+      }
556
+    }
557
+
558
+    button {
559
+      margin-top: 10px;
560
+
561
+      &.btn {
562
+        margin-left: 8px;
563
+      }
564
+    }
565
+  }
566
+}
567
+
568
+.txtC {
569
+  text-align: center;
570
+}
571
+.ji {
572
+  position: absolute;
573
+  right: 0px;
574
+  top: -3px;
575
+  width: 30px;
576
+}

+ 178 - 0
src/app/views/patient-inspect-log-detail/patient-inspect-log-detail.component.ts

@@ -0,0 +1,178 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { MainService } from "../../services/main.service";
3
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
4
+import { NzMessageService } from "ng-zorro-antd";
5
+import { ActivatedRoute, Router } from '@angular/router';
6
+import { ToolService } from 'src/app/services/tool.service';
7
+@Component({
8
+  selector: "app-patient-inspect-log-detail",
9
+  templateUrl: "./patient-inspect-log-detail.component.html",
10
+  styleUrls: ["./patient-inspect-log-detail.component.less"],
11
+})
12
+export class PatientInspectLogDetailComponent implements OnInit {
13
+  @ViewChild("osComponentRef1", {
14
+    read: OverlayScrollbarsComponent,
15
+    static: false,
16
+  })
17
+  osComponentRef1: OverlayScrollbarsComponent;
18
+  @ViewChild("osComponentRef2", {
19
+    read: OverlayScrollbarsComponent,
20
+    static: false,
21
+  })
22
+  osComponentRef2: OverlayScrollbarsComponent;
23
+  @ViewChild("osComponentRef3", {
24
+    read: OverlayScrollbarsComponent,
25
+    static: false,
26
+  })
27
+  osComponentRef3: OverlayScrollbarsComponent;
28
+  @ViewChild("osComponentRef4", {
29
+    read: OverlayScrollbarsComponent,
30
+    static: false,
31
+  })
32
+  osComponentRef4: OverlayScrollbarsComponent;
33
+  constructor(
34
+    private message: NzMessageService,
35
+    private mainService: MainService,
36
+    private route: ActivatedRoute,
37
+    private router: Router,
38
+    private tool: ToolService,
39
+  ) {}
40
+  maskFlag: any = false;
41
+  id: number; //工单id
42
+  orderInfo: any = {}; //详情信息
43
+  promptContent: string; //操作提示框提示信息
44
+  ifSuccess: boolean; //操作成功/失败
45
+  promptInfo: string; //操作结果提示信息
46
+  promptModalShow: boolean; //是否展示提示框
47
+
48
+  loading1:boolean = false;
49
+
50
+  ngOnInit() {
51
+    this.id = +this.route.snapshot.paramMap.get("id");
52
+    this.checkTab(1);
53
+  }
54
+
55
+  // 获取详情
56
+  getInfo(isInit = false) {
57
+    if(isInit){
58
+      this.maskFlag = this.message.loading("正在加载中..", {
59
+        nzDuration: 0,
60
+      }).messageId;
61
+    }
62
+    this.mainService
63
+      .getFetchData("simple/data", "patientInspectLog", this.id)
64
+      .subscribe((data) => {
65
+        if(isInit){
66
+          this.message.remove(this.maskFlag);
67
+          this.maskFlag = false;
68
+        }
69
+        let orderInfo = data.data || {};
70
+        if(orderInfo.goodsList){
71
+          orderInfo.goodsNames = orderInfo.goodsList.map(v => v.name).toString();
72
+        }
73
+        this.orderInfo = orderInfo;
74
+      });
75
+  }
76
+
77
+  // 获取日志
78
+  logList: any = [];
79
+  getWorkOrderRecord() {
80
+    this.loading1 = true;
81
+    let postData = {
82
+      idx: 0,
83
+      sum: 9999,
84
+      patientInspectLogLog: {
85
+        pilId: this.id,
86
+      },
87
+    };
88
+    this.mainService
89
+      .getFetchDataList("simple/data", "patientInspectLogLog", postData)
90
+      .subscribe((data) => {
91
+        this.loading1 = false;
92
+        if (data.status == 200) {
93
+          this.logList = data.list || [];
94
+        }else{
95
+          this.message.error(data.msg || "请求数据失败");
96
+        }
97
+      });
98
+  }
99
+  // 获取检查项目
100
+  inspectList: any = [];
101
+  getInspectList() {
102
+    this.loading1 = true;
103
+    let postData = {
104
+      pilId: this.id,
105
+    };
106
+    this.mainService
107
+      .getPatientInspectList(postData)
108
+      .subscribe((data:any) => {
109
+        this.loading1 = false;
110
+        if (data.status == 200) {
111
+          this.inspectList = data.list || [];
112
+        }else{
113
+          this.message.error(data.msg || "请求数据失败");
114
+        }
115
+      });
116
+  }
117
+
118
+  // 获取工单
119
+  orderList: any = [];
120
+  getOrderList() {
121
+    this.loading1 = true;
122
+    let postData = {
123
+      idx: 0,
124
+      sum: 9999,
125
+      workOrder: {
126
+        pilId: this.id,
127
+        simpleQuery: true,
128
+      },
129
+    };
130
+    this.mainService
131
+      .getFetchDataList("data", "workOrder", postData)
132
+      .subscribe((data) => {
133
+        this.loading1 = false;
134
+        if (data.status == 200) {
135
+          this.orderList = data.list.map(v => ({...v, endDeptsName: v.endDepts ? v.endDepts.map(v => v.dept).toString() : ''}));
136
+        }else{
137
+          this.message.error(data.msg || "请求数据失败");
138
+        }
139
+      });
140
+  }
141
+  // 切换tab栏
142
+  tabType: number = 1; //tab栏
143
+  checkTab(type, isInit = false) {
144
+    this.tabType = type;
145
+    if(type == 1){
146
+      this.getInfo(isInit);
147
+    }else if(type == 2){
148
+      this.getWorkOrderRecord();
149
+    }else if(type == 3){
150
+      this.getInspectList();
151
+    }else if(type == 4){
152
+      this.getOrderList();
153
+    }
154
+  }
155
+
156
+  // 关闭弹框
157
+  close() {
158
+    history.go(-1);
159
+  }
160
+
161
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
162
+  showPromptModal(con, success, promptInfo?) {
163
+    this.promptModalShow = false;
164
+    this.promptContent = con;
165
+    this.ifSuccess = success;
166
+    this.promptInfo = promptInfo;
167
+    setTimeout(() => {
168
+      this.promptModalShow = true;
169
+    }, 100);
170
+  }
171
+
172
+  // 查看
173
+  detail(e, id) {
174
+    e.stopPropagation();
175
+    this.router.navigateByUrl(`/main/patientInspectLog/patientInspectLogDetail/${this.id}/orderDetail/${id}`);
176
+  }
177
+
178
+}

+ 19 - 0
src/app/views/patient-inspect-log-detail/patient-inspect-log-detail.module.ts

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

+ 24 - 0
src/app/views/patient-inspect-log/patient-inspect-log-routing.module.ts

@@ -0,0 +1,24 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { PatientInspectLogComponent } from './patient-inspect-log.component';
4
+
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: '',
9
+    component: PatientInspectLogComponent,
10
+    children: [
11
+      {
12
+        // 查看详情
13
+        path: 'patientInspectLogDetail/:id',
14
+        loadChildren: () => import('../patient-inspect-log-detail/patient-inspect-log-detail.module').then(m => m.PatientInspectLogDetailModule),
15
+      }
16
+    ]
17
+  }
18
+];
19
+
20
+@NgModule({
21
+  imports: [RouterModule.forChild(routes)],
22
+  exports: [RouterModule]
23
+})
24
+export class PatientInspectLogRoutingModule { }

+ 92 - 0
src/app/views/patient-inspect-log/patient-inspect-log.component.html

@@ -0,0 +1,92 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='16' class="list-template__searchBox">
5
+        <div class="list-template__searchItem">
6
+          <span class="label">科室</span>:
7
+          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择科室" [(ngModel)]="searchDto.deptId" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeInp('department', $event)" (nzOpenChange)="openChangeDept($event)" (ngModelChange)="setIsSelecting(true)">
8
+            <ng-container *ngFor="let option of deptList">
9
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
10
+            </ng-container>
11
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
12
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
13
+            </nz-option>
14
+          </nz-select>
15
+        </div>
16
+        <div class="list-template__searchItem">
17
+          <span class="label">患者</span>:
18
+          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择患者" [(ngModel)]="searchDto.patientId" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeInp('patient', $event)" (nzOpenChange)="openChangePatient($event)" (ngModelChange)="setIsSelecting(true)">
19
+            <ng-container *ngFor="let option of patientList">
20
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.patientName" [nzValue]="option.id"></nz-option>
21
+            </ng-container>
22
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
23
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
24
+            </nz-option>
25
+          </nz-select>
26
+        </div>
27
+        <div class="list-template__searchItem">
28
+          <span class="label">状态</span>:
29
+          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzAllowClear nzPlaceHolder="请选择状态" [(ngModel)]="searchDto.stateId">
30
+            <ng-container *ngFor="let option of stateList">
31
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
32
+            </ng-container>
33
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
34
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
35
+            </nz-option>
36
+          </nz-select>
37
+        </div>
38
+      </div>
39
+      <div nz-col nzLg="8" class="list-template__btns">
40
+        <button nz-button class="btn default ml8" (click)='search()'>搜索</button>
41
+        <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
42
+      </div>
43
+    </div>
44
+    <div class="list-template__bottom">
45
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
46
+        [nzLoading]="loading1">
47
+        <thead>
48
+          <tr class="thead">
49
+            <th nzWidth="12%">科室</th>
50
+            <th nzWidth="11%">患者信息</th>
51
+            <th nzWidth="11%">护理信息</th>
52
+            <th nzWidth="11%">出科信息</th>
53
+            <th nzWidth="11%">回科信息</th>
54
+            <th nzWidth="11%">备注信息</th>
55
+            <th nzWidth="11%">预约时间</th>
56
+            <th nzWidth="11%">状态</th>
57
+            <th nzWidth="11%">操作</th>
58
+          </tr>
59
+        </thead>
60
+        <tbody>
61
+          <tr *ngFor="let data of listOfData;let i = index">
62
+            <td>{{data.deptName}}<br>{{data.deptDTO?.pcode}}</td>
63
+            <td>{{data.patientName}}<ng-container *ngIf="data.age !== undefined">({{data.age}}岁)</ng-container><br><ng-container *ngIf="data.patientType && data.patientType.value == 'I'">住:{{data.patientCode}}({{data.bedNum}})</ng-container><ng-container *ngIf="data.patientType && data.patientType.value == 'O'">门诊:{{data.patientCode}}</ng-container><ng-container *ngIf="data.patientType && data.patientType.value == 'E'">急:{{data.patientCode}}</ng-container></td>
64
+            <td>{{data.careLevel?.name}}<br>{{data.illnessState?.name}}</td>
65
+            <td>{{data.outDeptTime | date:'yyyy-MM-dd HH:mm'}}<br>{{data.outDeptUserDTO?.name}}</td>
66
+            <td>{{data.backDeptTime | date:'yyyy-MM-dd HH:mm'}}<br>{{data.backDeptUserDTO?.name}}</td>
67
+            <td>{{data.goodsNames}}<br>{{data.tripTypeDTO?.inspectMode}}</td>
68
+            <td>{{data.yyTime | date:'yyyy-MM-dd HH:mm'}}</td>
69
+            <td>{{data.state?.name}}</td>
70
+            <td>
71
+              <div class="coop">
72
+                <span *ngIf="coopBtns.look" (click)="detail($event,data.id)">查看</span>
73
+              </div>
74
+            </td>
75
+          </tr>
76
+        </tbody>
77
+      </nz-table>
78
+      <div class="list-template__pagination">
79
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" nzShowSizeChanger
80
+          (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
81
+        </nz-pagination>
82
+      </div>
83
+    </div>
84
+  </div>
85
+</div>
86
+<!-- 操作成功/失败提示框 -->
87
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
88
+  [info]="promptInfo">
89
+</app-prompt-modal>
90
+
91
+<!-- 查看详情 -->
92
+<router-outlet></router-outlet>

+ 179 - 0
src/app/views/patient-inspect-log/patient-inspect-log.component.less

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

+ 215 - 0
src/app/views/patient-inspect-log/patient-inspect-log.component.ts

@@ -0,0 +1,215 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import { FormBuilder, Validators, FormGroup } from "@angular/forms";
4
+
5
+import { MainService } from "../../services/main.service";
6
+import { ToolService } from "../../services/tool.service";
7
+import { NzMessageService } from 'ng-zorro-antd';
8
+import { Subject } from 'rxjs';
9
+import { debounceTime } from 'rxjs/operators';
10
+@Component({
11
+  selector: "app-patient-inspect-log",
12
+  templateUrl: "./patient-inspect-log.component.html",
13
+  styleUrls: ["./patient-inspect-log.component.less"],
14
+})
15
+export class PatientInspectLogComponent implements OnInit {
16
+  constructor(
17
+    private fb: FormBuilder,
18
+    private mainService: MainService,
19
+    private route: ActivatedRoute,
20
+    private router: Router,
21
+    private tool: ToolService,
22
+    private message: NzMessageService,
23
+  ) {}
24
+
25
+  listOfData: any[] = []; //表格数据
26
+  pageIndex: number = 1; //表格当前页码
27
+  pageSize: number = 10; //表格每页展示条数
28
+  listLength: number = 10; //表格总数据量
29
+  modal: boolean = false; //新增/编辑模态框
30
+  add: boolean; //true:新增;false:编辑
31
+  validateForm: FormGroup; //新增/编辑表单
32
+  coopData: any; //当前操作列
33
+  currentHospital; //当前院区
34
+
35
+  btnLoading: boolean = false; //提交按钮loading状态
36
+
37
+  promptContent: string; //操作提示框提示信息
38
+  ifSuccess: boolean; //操作成功/失败
39
+  promptInfo: string; //操作结果提示信息
40
+  promptModalShow: boolean; //操作提示框是否展示
41
+  nextSchemeName = ""; //下一个开启的方案名称
42
+  modelName = ""; //模态框名称
43
+
44
+  searchTimerSubject = new Subject(); //防抖
45
+  showDropdown:boolean = false;
46
+
47
+  ngOnInit() {
48
+    //防抖
49
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
50
+      let fun = v[0];
51
+      fun.call(this, v[1]);
52
+    });
53
+    this.currentHospital = this.tool.getCurrentHospital();
54
+    this.coopBtns = this.tool.initCoopBtns(this.route);
55
+    this.getList(1);
56
+    this.getStatus();
57
+  }
58
+
59
+  // 初始化增删改按钮
60
+  coopBtns: any = {};
61
+
62
+  // 查看
63
+  detail(e, id) {
64
+    e.stopPropagation();
65
+    this.router.navigateByUrl("/main/patientInspectLog/patientInspectLogDetail/" + id);
66
+  }
67
+
68
+  // 搜索
69
+  search() {
70
+    this.getList(1);
71
+  }
72
+  // 重置
73
+  reset() {
74
+    this.searchDto = {};
75
+    this.getList(1);
76
+  }
77
+
78
+  // 表格数据
79
+  searchDto: any = {};
80
+  loading1 = false;
81
+  getList(type) {
82
+    if (type == 1) {
83
+      this.pageIndex = 1;
84
+    }
85
+    let data = {
86
+      idx: this.pageIndex - 1,
87
+      sum: this.pageSize,
88
+      patientInspectLog: {
89
+        hosId: this.currentHospital.id,
90
+        deptId: this.searchDto.deptId || undefined,
91
+        patientId: this.searchDto.patientId || undefined,
92
+        state: this.searchDto.stateId ? { id: this.searchDto.stateId } : undefined,
93
+      },
94
+    };
95
+    this.loading1 = true;
96
+    this.mainService
97
+      .getFetchDataList("simple/data", "patientInspectLog", data)
98
+      .subscribe((data) => {
99
+        this.loading1 = false;
100
+        if (data.status == 200) {
101
+          let listOfData = data.list || [];
102
+          listOfData.forEach((v) => {
103
+            if(v.goodsList){
104
+              v.goodsNames = v.goodsList.map(v => v.name).toString();
105
+            }else{
106
+              v.goodsNames = "";
107
+            }
108
+          })
109
+          this.listOfData = listOfData;
110
+          this.listLength = data.totalNum;
111
+        }else{
112
+          this.message.error(data.msg || "请求数据失败");
113
+        }
114
+      });
115
+  }
116
+
117
+  // 防抖
118
+  isLoading = false;
119
+  isSelecting:boolean = false; // 是否在选中状态
120
+  searchTimer(fun, e) {
121
+    if (this.isSelecting) {
122
+      this.isSelecting = false; // 重置标志
123
+      return; // 跳过处理
124
+    }
125
+    this.isLoading = true;
126
+    this.searchTimerSubject.next([fun, e]);
127
+  }
128
+
129
+  // 搜索
130
+  changeInp(type, e) {
131
+    if(type === 'department'){
132
+      this.searchTimer(this.getDeptList, e);
133
+    }else if(type === 'patient'){
134
+      this.searchTimer(this.getPatientList, e);
135
+    }
136
+  }
137
+
138
+  // 设置标志
139
+  setIsSelecting(flag){
140
+    this.isSelecting = flag; // 设置标志
141
+  }
142
+
143
+  openChangeDept(flag){
144
+    flag && this.setIsSelecting(false);
145
+    flag && this.getDeptList();
146
+  }
147
+
148
+  // 获取科室
149
+  deptList: any = [];
150
+  getDeptList(e = undefined) {
151
+    let postData = {
152
+      idx: 0,
153
+      sum: 20,
154
+      department: {
155
+        searchType: 1,// 简单查询
156
+        cascadeHosId: this.currentHospital.id,
157
+        dept: e,
158
+      }
159
+    };
160
+    this.isLoading = true;
161
+    this.mainService
162
+      .getFetchDataList("simple/data", "department", postData)
163
+      .subscribe((data) => {
164
+        this.isLoading = false;
165
+        this.deptList = data.list || [];
166
+      });
167
+  }
168
+
169
+  openChangePatient(flag){
170
+    flag && this.setIsSelecting(false);
171
+    flag && this.getPatientList();
172
+  }
173
+
174
+  // 获取患者
175
+  patientList: any = [];
176
+  getPatientList(e = undefined) {
177
+    let postData = {
178
+      idx: 0,
179
+      sum: 20,
180
+      patient: {
181
+        hosId: this.currentHospital.id,
182
+        keyWord: e,
183
+      }
184
+    };
185
+    this.isLoading = true;
186
+    this.mainService
187
+      .getFetchDataList("simple/data", "patient", postData)
188
+      .subscribe((data) => {
189
+        this.isLoading = false;
190
+        this.patientList = data.list || [];
191
+      });
192
+  }
193
+
194
+  //获取状态
195
+  stateList:any[] = [];
196
+  getStatus() {
197
+    this.mainService
198
+    .getDictionary('list', 'patient_inspect_state')
199
+    .subscribe((data) => {
200
+      this.stateList = data || [];
201
+    });
202
+  }
203
+
204
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
205
+  showPromptModal(con, success, promptInfo?) {
206
+    this.promptModalShow = false;
207
+    this.promptContent = con;
208
+    this.ifSuccess = success;
209
+    this.promptInfo = promptInfo;
210
+    setTimeout(() => {
211
+      this.promptModalShow = true;
212
+    }, 100);
213
+    this.getList(0);
214
+  }
215
+}

+ 19 - 0
src/app/views/patient-inspect-log/patient-inspect-log.module.ts

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

+ 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">&#xe670;</span>
59
+                <div class="name">陪护管理</div>
60
+                <div class="code-name">&amp;#xe670;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
58 64
               <span class="icon icon_transport">&#xe6e1;</span>
59 65
                 <div class="name">数据生成规则</div>
60 66
                 <div class="code-name">&amp;#xe6e1;</div>
@@ -1068,9 +1074,9 @@
1068 1074
 <pre><code class="language-css"
1069 1075
 >@font-face {
1070 1076
   font-family: 'icon_transport';
1071
-  src: url('iconfont.woff2?t=1743147201353') format('woff2'),
1072
-       url('iconfont.woff?t=1743147201353') format('woff'),
1073
-       url('iconfont.ttf?t=1743147201353') format('truetype');
1077
+  src: url('iconfont.woff2?t=1743992402666') format('woff2'),
1078
+       url('iconfont.woff?t=1743992402666') format('woff'),
1079
+       url('iconfont.ttf?t=1743992402666') format('truetype');
1074 1080
 }
1075 1081
 </code></pre>
1076 1082
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -1097,6 +1103,15 @@
1097 1103
         <ul class="icon_lists dib-box">
1098 1104
           
1099 1105
           <li class="dib">
1106
+            <span class="icon icon_transport transport-peihuguanli"></span>
1107
+            <div class="name">
1108
+              陪护管理
1109
+            </div>
1110
+            <div class="code-name">.transport-peihuguanli
1111
+            </div>
1112
+          </li>
1113
+          
1114
+          <li class="dib">
1100 1115
             <span class="icon icon_transport transport-shujushengchengguize"></span>
1101 1116
             <div class="name">
1102 1117
               数据生成规则
@@ -2619,6 +2634,14 @@
2619 2634
           
2620 2635
             <li class="dib">
2621 2636
                 <svg class="icon svg-icon" aria-hidden="true">
2637
+                  <use xlink:href="#transport-peihuguanli"></use>
2638
+                </svg>
2639
+                <div class="name">陪护管理</div>
2640
+                <div class="code-name">#transport-peihuguanli</div>
2641
+            </li>
2642
+          
2643
+            <li class="dib">
2644
+                <svg class="icon svg-icon" aria-hidden="true">
2622 2645
                   <use xlink:href="#transport-shujushengchengguize"></use>
2623 2646
                 </svg>
2624 2647
                 <div class="name">数据生成规则</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=1743147201353') format('woff2'),
4
-       url('iconfont.woff?t=1743147201353') format('woff'),
5
-       url('iconfont.ttf?t=1743147201353') format('truetype');
3
+  src: url('iconfont.woff2?t=1743992402666') format('woff2'),
4
+       url('iconfont.woff?t=1743992402666') format('woff'),
5
+       url('iconfont.ttf?t=1743992402666') 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-peihuguanli:before {
17
+  content: "\e670";
18
+}
19
+
16 20
 .transport-shujushengchengguize:before {
17 21
   content: "\e6e1";
18 22
 }

File diff suppressed because it is too large
+ 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": "24101601",
10
+      "name": "陪护管理",
11
+      "font_class": "peihuguanli",
12
+      "unicode": "e670",
13
+      "unicode_decimal": 58992
14
+    },
15
+    {
9 16
       "icon_id": "18532319",
10 17
       "name": "数据生成规则",
11 18
       "font_class": "shujushengchengguize",

BIN
src/assets/iconfont/iconfont.ttf


BIN
src/assets/iconfont/iconfont.woff


BIN
src/assets/iconfont/iconfont.woff2


+ 3 - 0
src/common.less

@@ -1,6 +1,9 @@
1 1
 .ant-table-tbody tr:nth-of-type(2n){
2 2
   background-color: #e9f7e9!important;
3 3
 }
4
+.display_block{
5
+  display: block!important;
6
+}
4 7
 .padding8{
5 8
   padding: 8px!important
6 9
 }