Selaa lähdekoodia

封装批量建单设置组件

seimin 1 kuukausi sitten
vanhempi
commit
e98ecfd305

+ 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
+}

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

@@ -0,0 +1,222 @@
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
+     this.message.create("warning", "【默认时间区间1】的【有效时间范围】开始时间不能大于结束时间!");
60
+     return;
61
+   }
62
+
63
+   if(
64
+     (this.activeDictionaryKey.postData.ibDefaultStartTime && !this.activeDictionaryKey.postData.ibDefaultEndTime) ||
65
+     (!this.activeDictionaryKey.postData.ibDefaultStartTime && this.activeDictionaryKey.postData.ibDefaultEndTime)
66
+   ){
67
+     this.message.create("warning", "【默认时间区间1】的【默认时间】请完整填写开始时间与结束时间!");
68
+     return;
69
+   }else if(
70
+     this.activeDictionaryKey.postData.ibDefaultStartTime &&
71
+     this.activeDictionaryKey.postData.ibDefaultEndTime &&
72
+     (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)
73
+   ){
74
+     this.message.create("warning", "【默认时间区间1】的【默认时间】开始时间不能大于结束时间!");
75
+     return;
76
+   }
77
+
78
+   // 默认时间区间2
79
+
80
+   if(
81
+     (this.activeDictionaryKey.postData.ib2ActiveStartTime1 && !this.activeDictionaryKey.postData.ib2ActiveEndTime1) ||
82
+     (!this.activeDictionaryKey.postData.ib2ActiveStartTime1 && this.activeDictionaryKey.postData.ib2ActiveEndTime1) ||
83
+     (this.activeDictionaryKey.postData.ib2ActiveStartTime2 && !this.activeDictionaryKey.postData.ib2ActiveEndTime2) ||
84
+     (!this.activeDictionaryKey.postData.ib2ActiveStartTime2 && this.activeDictionaryKey.postData.ib2ActiveEndTime2)
85
+   ){
86
+     this.message.create("warning", "【默认时间区间1】的【有效时间范围】请完整填写开始时间与结束时间!");
87
+     return;
88
+   }else if(
89
+     (this.activeDictionaryKey.postData.ib2ActiveStartTime1 && this.activeDictionaryKey.postData.ib2ActiveEndTime1 && +this.activeDictionaryKey.postData.ib2ActiveStartTime1 > +this.activeDictionaryKey.postData.ib2ActiveEndTime1) ||
90
+     (this.activeDictionaryKey.postData.ib2ActiveStartTime2 && this.activeDictionaryKey.postData.ib2ActiveEndTime2 && +this.activeDictionaryKey.postData.ib2ActiveStartTime2 > +this.activeDictionaryKey.postData.ib2ActiveEndTime2)
91
+   ){
92
+     this.message.create("warning", "【默认时间区间1】的【有效时间范围】开始时间不能大于结束时间!");
93
+     return;
94
+   }
95
+
96
+   if(
97
+     (this.activeDictionaryKey.postData.ib2DefaultStartTime && !this.activeDictionaryKey.postData.ib2DefaultEndTime) ||
98
+     (!this.activeDictionaryKey.postData.ib2DefaultStartTime && this.activeDictionaryKey.postData.ib2DefaultEndTime)
99
+   ){
100
+     this.message.create("warning", "【默认时间区间1】的【默认时间】请完整填写开始时间与结束时间!");
101
+     return;
102
+   }else if(
103
+     this.activeDictionaryKey.postData.ib2DefaultStartTime &&
104
+     this.activeDictionaryKey.postData.ib2DefaultEndTime &&
105
+     (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)
106
+   ){
107
+     this.message.create("warning", "【默认时间区间1】的【默认时间】开始时间不能大于结束时间!");
108
+     return;
109
+   }
110
+
111
+   let postData:any = {
112
+     ...this.configs,
113
+     taskType: this.tasktype.id,
114
+     hosId: this.hosId,
115
+     ibActiveStartTime1: this.activeDictionaryKey.postData.ibActiveStartTime1 ? format(startOfMinute(this.activeDictionaryKey.postData.ibActiveStartTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
116
+     ibActiveEndTime1: this.activeDictionaryKey.postData.ibActiveEndTime1 ? format(endOfMinute(this.activeDictionaryKey.postData.ibActiveEndTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
117
+     ibActiveStartTime2: this.activeDictionaryKey.postData.ibActiveStartTime2 ? format(startOfMinute(this.activeDictionaryKey.postData.ibActiveStartTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
118
+     ibActiveEndTime2: this.activeDictionaryKey.postData.ibActiveEndTime2 ? format(endOfMinute(this.activeDictionaryKey.postData.ibActiveEndTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
119
+     ibDefaultStartTime: this.activeDictionaryKey.postData.ibDefaultStartTime ? format(startOfMinute(this.activeDictionaryKey.postData.ibDefaultStartTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
120
+     ibDefaultEndTime: this.activeDictionaryKey.postData.ibDefaultEndTime ? format(endOfMinute(this.activeDictionaryKey.postData.ibDefaultEndTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
121
+     ibDefaultDayStart: this.activeDictionaryKey.postData.ibDefaultDayStart[0].checked ? 1 : 0,
122
+     ibDefaultDayEnd: this.activeDictionaryKey.postData.ibDefaultDayEnd[0].checked ? 1 : 0,
123
+     ib2ActiveStartTime1: this.activeDictionaryKey.postData.ib2ActiveStartTime1 ? format(startOfMinute(this.activeDictionaryKey.postData.ib2ActiveStartTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
124
+     ib2ActiveEndTime1: this.activeDictionaryKey.postData.ib2ActiveEndTime1 ? format(endOfMinute(this.activeDictionaryKey.postData.ib2ActiveEndTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
125
+     ib2ActiveStartTime2: this.activeDictionaryKey.postData.ib2ActiveStartTime2 ? format(startOfMinute(this.activeDictionaryKey.postData.ib2ActiveStartTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
126
+     ib2ActiveEndTime2: this.activeDictionaryKey.postData.ib2ActiveEndTime2 ? format(endOfMinute(this.activeDictionaryKey.postData.ib2ActiveEndTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
127
+     ib2DefaultStartTime: this.activeDictionaryKey.postData.ib2DefaultStartTime ? format(startOfMinute(this.activeDictionaryKey.postData.ib2DefaultStartTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
128
+     ib2DefaultEndTime: this.activeDictionaryKey.postData.ib2DefaultEndTime ? format(endOfMinute(this.activeDictionaryKey.postData.ib2DefaultEndTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
129
+     ib2DefaultDayStart: this.activeDictionaryKey.postData.ib2DefaultDayStart[0].checked ? 1 : 0,
130
+     ib2DefaultDayEnd: this.activeDictionaryKey.postData.ib2DefaultDayEnd[0].checked ? 1 : 0,
131
+   };
132
+   console.log(postData);
133
+   this.btnLoading = true;
134
+   this.mainService
135
+     .simplePost("addData", "taskTypeConfig", postData)
136
+     .subscribe((result) => {
137
+       this.btnLoading = false;
138
+       if (result.status == 200) {
139
+         this.message.success("保存成功!");
140
+         this.getConfig();
141
+       }else{
142
+         this.message.success("保存失败!");
143
+       }
144
+     });
145
+ }
146
+
147
+ //初始化
148
+ init() {
149
+   this.loading = true;
150
+   this.getTaskType();
151
+ }
152
+
153
+ //获取任务类型
154
+ getTaskType() {
155
+   this.loading = true;
156
+   let postData = {
157
+     idx: 0,
158
+     sum: 1,
159
+     taskType: {
160
+       simpleQuery: true,
161
+       hosId: {
162
+         id: this.hosId
163
+       },
164
+       associationType: {
165
+         key: 'association_types',
166
+         value: 'inspect',
167
+       }
168
+     }
169
+   };
170
+   this.mainService
171
+     .getFetchDataList("simple/data", "taskType", postData)
172
+     .subscribe((result) => {
173
+       this.loading = false;
174
+       if (result.status == 200) {
175
+         this.tasktype = result.list[0] || {};
176
+         this.getConfig();
177
+       }
178
+     });
179
+ }
180
+
181
+ // 获取配置
182
+ getConfig() {
183
+   this.loading = true;
184
+   let postData = {
185
+     idx: 0,
186
+     sum: 1,
187
+     taskTypeConfig: {
188
+       taskTypeDTO: {
189
+         hosId: {
190
+           id: this.hosId
191
+         },
192
+         associationType: this.tasktype.associationType,
193
+       }
194
+     }
195
+   };
196
+   this.mainService
197
+     .getFetchDataList("simple/data", "taskTypeConfig", postData)
198
+     .subscribe((result) => {
199
+       this.loading = false;
200
+       if (result.status == 200) {
201
+         this.configs = result.list[0] || {};
202
+         this.activeDictionaryKey.postData.ibActiveStartTime1 = this.configs.ibActiveStartTime1 || undefined;
203
+         this.activeDictionaryKey.postData.ibActiveEndTime1 = this.configs.ibActiveEndTime1 || undefined;
204
+         this.activeDictionaryKey.postData.ibActiveStartTime2 = this.configs.ibActiveStartTime2 || undefined;
205
+         this.activeDictionaryKey.postData.ibActiveEndTime2 = this.configs.ibActiveEndTime2 || undefined;
206
+         this.activeDictionaryKey.postData.ibDefaultStartTime = this.configs.ibDefaultStartTime || undefined;
207
+         this.activeDictionaryKey.postData.ibDefaultEndTime = this.configs.ibDefaultEndTime || undefined;
208
+         this.activeDictionaryKey.postData.ibDefaultDayStart[0].checked = this.configs.ibDefaultDayStart == 1;
209
+         this.activeDictionaryKey.postData.ibDefaultDayEnd[0].checked = this.configs.ibDefaultDayEnd == 1;
210
+
211
+         this.activeDictionaryKey.postData.ib2ActiveStartTime1 = this.configs.ib2ActiveStartTime1 || undefined;
212
+         this.activeDictionaryKey.postData.ib2ActiveEndTime1 = this.configs.ib2ActiveEndTime1 || undefined;
213
+         this.activeDictionaryKey.postData.ib2ActiveStartTime2 = this.configs.ib2ActiveStartTime2 || undefined;
214
+         this.activeDictionaryKey.postData.ib2ActiveEndTime2 = this.configs.ib2ActiveEndTime2 || undefined;
215
+         this.activeDictionaryKey.postData.ib2DefaultStartTime = this.configs.ib2DefaultStartTime || undefined;
216
+         this.activeDictionaryKey.postData.ib2DefaultEndTime = this.configs.ib2DefaultEndTime || undefined;
217
+         this.activeDictionaryKey.postData.ib2DefaultDayStart[0].checked = this.configs.ib2DefaultDayStart == 1;
218
+         this.activeDictionaryKey.postData.ib2DefaultDayEnd[0].checked = this.configs.ib2DefaultDayEnd == 1;
219
+       }
220
+     });
221
+ }
222
+}

+ 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 { }

+ 46 - 134
src/app/components/configurationCenter/configuration-inspect/configuration-inspect.component.html

@@ -6,144 +6,56 @@
6 6
       </overlay-scrollbars>
7 7
     </div>
8 8
     <div class="addressAssign">
9
-      <ng-container *ngIf="activeDictionaryKey.id == 1">
10
-        <div class="contentBody">
11
-          <div class="dictionaryRow">
12
-            <div class="orders">排序号</div>
13
-            <div class="name">注意事项</div>
14
-            <div class="value">备注</div>
15
-          </div>
16
-          <overlay-scrollbars #osComponentRef2 class="contentBody2">
17
-            <form nz-form [formGroup]="validateDictionaryForm" class="w100">
18
-              <div class="dictionaryRow" *ngFor="let data of dictionaryList;let i = index;">
19
-                <div class="orders">
20
-                  <nz-form-item>
21
-                    <nz-form-control [nzSpan]="24" nzErrorTip="请输入排序号!">
22
-                      <nz-input-group>
23
-                        <nz-input-number [formControlName]="'orders_' + data.id" class="ordersInput"></nz-input-number>
24
-                      </nz-input-group>
25
-                    </nz-form-control>
26
-                  </nz-form-item>
27
-                </div>
28
-                <div class="name">
29
-                  <nz-form-item class="w100">
30
-                    <nz-form-control [nzSpan]="24" nzErrorTip="请输入注意事项!">
31
-                      <nz-input-group>
32
-                        <input [formControlName]="'name_' + data.id" nz-input class="nameInput">
33
-                      </nz-input-group>
34
-                    </nz-form-control>
35
-                  </nz-form-item>
36
-                </div>
37
-                <div class="value">
38
-                  <nz-form-item>
39
-                    <nz-form-control [nzSpan]="24" nzErrorTip="请输入备注!">
40
-                      <nz-input-group>
41
-                        <input [formControlName]="'value_' + data.id" nz-input class="valueInput">
42
-                      </nz-input-group>
43
-                    </nz-form-control>
44
-                  </nz-form-item>
45
-                  <i class="icon_transport transport-tag27fuben ml8" (click)="addField(i)" *ngIf="!(activeDictionaryKey.key === 'incident_status' || activeDictionaryKey.key === 'incident_degree')"></i>
46
-                  <i class="icon_transport transport-shanchu1 ml8" *ngIf="dictionaryList.length > 1 && !data.system && !(activeDictionaryKey.key === 'incident_status' || activeDictionaryKey.key === 'incident_degree')" (click)="removeField(data, i)"></i>
47
-                </div>
48
-              </div>
49
-            </form>
50
-          </overlay-scrollbars>
51
-        </div>
52
-        <div class="contentBtns">
53
-          <button nz-button nzType="primary" class="ml8" (click)="saveDictionary()">保存</button>
9
+      <!-- 注意事项 -->
10
+      <div class="contentBody" [hidden]="activeDictionaryKey.id != 1">
11
+        <div class="dictionaryRow">
12
+          <div class="orders">排序号</div>
13
+          <div class="name">注意事项</div>
14
+          <div class="value">备注</div>
54 15
         </div>
55
-      </ng-container>
56
-      <ng-container *ngIf="activeDictionaryKey.id == 2">
57
-        <div class="contentBody2">
58
-          <div class="TaskTypeManagement">
59
-            <div class="taskTypeInfo">
60
-              <div class="top">
61
-                <div class="item" (click)="tabModal('characteristics')" [ngClass]="{'items':tabModalName=='characteristics'}">
62
-                  特性配置
63
-                </div>
64
-                <div class="item" (click)="tabModal('automaticOrderCreation')" [ngClass]="{'items':tabModalName=='automaticOrderCreation'}">
65
-                  自动建单配置
66
-                </div>
16
+        <overlay-scrollbars #osComponentRef2 class="contentBody2">
17
+          <form nz-form [formGroup]="validateDictionaryForm" class="w100">
18
+            <div class="dictionaryRow" *ngFor="let data of dictionaryList;let i = index;">
19
+              <div class="orders">
20
+                <nz-form-item>
21
+                  <nz-form-control [nzSpan]="24" nzErrorTip="请输入排序号!">
22
+                    <nz-input-group>
23
+                      <nz-input-number [formControlName]="'orders_' + data.id" class="ordersInput"></nz-input-number>
24
+                    </nz-input-group>
25
+                  </nz-form-control>
26
+                </nz-form-item>
67 27
               </div>
68
-              <ng-container *ngFor="let item of dictionaryKeyList">
69
-                <div class="list" *ngIf="!loading && activeDictionaryKey.id === item.id">
70
-                  <!-- 特性配置 -->
71
-                  <div *ngIf="tabModalName=='characteristics'">
72
-                    <div class="timeRange">
73
-                      <div class="timeRangeTitle green">默认时间区间1</div>
74
-                      <div class="timeRangeActive">
75
-                        有效时间范围:
76
-                        <span>
77
-                          <nz-time-picker [(ngModel)]="item.postData.ibActiveStartTime1" nzFormat="HH:mm" nzPlaceHolder="开始时间1"></nz-time-picker>
78
-                          ~
79
-                          <nz-time-picker [(ngModel)]="item.postData.ibActiveEndTime1" nzFormat="HH:mm" nzPlaceHolder="结束时间1"></nz-time-picker>
80
-                        </span>
81
-                        <span class="ml16">
82
-                          <nz-time-picker [(ngModel)]="item.postData.ibActiveStartTime2" nzFormat="HH:mm" nzPlaceHolder="开始时间2"></nz-time-picker>
83
-                          ~
84
-                          <nz-time-picker [(ngModel)]="item.postData.ibActiveEndTime2" nzFormat="HH:mm" nzPlaceHolder="结束时间2"></nz-time-picker>
85
-                        </span>
86
-                      </div>
87
-                      <div class="timeRangeDefault">
88
-                        默认时间:
89
-                        <span style="visibility: hidden;">囧囧</span>
90
-                        <span>
91
-                          <nz-time-picker [(ngModel)]="item.postData.ibDefaultStartTime" nzFormat="HH:mm" nzPlaceHolder="开始时间"></nz-time-picker>
92
-                          <nz-checkbox-group class="timeRangeCheckbox" [(ngModel)]="item.postData.ibDefaultDayStart"></nz-checkbox-group>
93
-                          ~
94
-                          <nz-time-picker class="ml8" [(ngModel)]="item.postData.ibDefaultEndTime" nzFormat="HH:mm" nzPlaceHolder="结束时间"></nz-time-picker>
95
-                          <nz-checkbox-group class="timeRangeCheckbox" [(ngModel)]="item.postData.ibDefaultDayEnd"></nz-checkbox-group>
96
-                        </span>
97
-                      </div>
98
-                    </div>
99
-
100
-                    <div class="timeRange">
101
-                      <div class="timeRangeTitle green">默认时间区间2</div>
102
-                      <div class="timeRangeActive">
103
-                        有效时间范围:
104
-                        <span>
105
-                          <nz-time-picker [(ngModel)]="item.postData.ib2ActiveStartTime1" nzFormat="HH:mm" nzPlaceHolder="开始时间1"></nz-time-picker>
106
-                          ~
107
-                          <nz-time-picker [(ngModel)]="item.postData.ib2ActiveEndTime1" nzFormat="HH:mm" nzPlaceHolder="结束时间1"></nz-time-picker>
108
-                        </span>
109
-                        <span class="ml16">
110
-                          <nz-time-picker [(ngModel)]="item.postData.ib2ActiveStartTime2" nzFormat="HH:mm" nzPlaceHolder="开始时间2"></nz-time-picker>
111
-                          ~
112
-                          <nz-time-picker [(ngModel)]="item.postData.ib2ActiveEndTime2" nzFormat="HH:mm" nzPlaceHolder="结束时间2"></nz-time-picker>
113
-                        </span>
114
-                      </div>
115
-                      <div class="timeRangeDefault">
116
-                        默认时间:
117
-                        <span style="visibility: hidden;">囧囧</span>
118
-                        <span>
119
-                          <nz-time-picker [(ngModel)]="item.postData.ib2DefaultStartTime" nzFormat="HH:mm" nzPlaceHolder="开始时间"></nz-time-picker>
120
-                          <nz-checkbox-group class="timeRangeCheckbox" [(ngModel)]="item.postData.ib2DefaultDayStart"></nz-checkbox-group>
121
-                          ~
122
-                          <nz-time-picker class="ml8" [(ngModel)]="item.postData.ib2DefaultEndTime" nzFormat="HH:mm" nzPlaceHolder="结束时间"></nz-time-picker>
123
-                          <nz-checkbox-group class="timeRangeCheckbox" [(ngModel)]="item.postData.ib2DefaultDayEnd"></nz-checkbox-group>
124
-                        </span>
125
-                      </div>
126
-                    </div>
127
-                  </div>
128
-                  <!-- 自动建单配置 -->
129
-                  <div *ngIf="tabModalName=='automaticOrderCreation'">
130
-                    <!-- 自动建单 -->
131
-                  </div>
132
-                  <div class="bottom">
133
-                    <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>
134
-                  </div>
135
-                </div>
136
-              </ng-container>
137
-              <div class="list" *ngIf="loading">
138
-                <div class="loadingFull display_flex justify-content_flex-center align-items_center">
139
-                  <div class="loadingFullInner">
140
-                    <img src="../../../assets/images/loading.gif" alt="">
141
-                    <div>加载中...</div>
142
-                  </div>
143
-                </div>
28
+              <div class="name">
29
+                <nz-form-item class="w100">
30
+                  <nz-form-control [nzSpan]="24" nzErrorTip="请输入注意事项!">
31
+                    <nz-input-group>
32
+                      <input [formControlName]="'name_' + data.id" nz-input class="nameInput">
33
+                    </nz-input-group>
34
+                  </nz-form-control>
35
+                </nz-form-item>
36
+              </div>
37
+              <div class="value">
38
+                <nz-form-item>
39
+                  <nz-form-control [nzSpan]="24" nzErrorTip="请输入备注!">
40
+                    <nz-input-group>
41
+                      <input [formControlName]="'value_' + data.id" nz-input class="valueInput">
42
+                    </nz-input-group>
43
+                  </nz-form-control>
44
+                </nz-form-item>
45
+                <i class="icon_transport transport-tag27fuben ml8" (click)="addField(i)" *ngIf="!(activeDictionaryKey.key === 'incident_status' || activeDictionaryKey.key === 'incident_degree')"></i>
46
+                <i class="icon_transport transport-shanchu1 ml8" *ngIf="dictionaryList.length > 1 && !data.system && !(activeDictionaryKey.key === 'incident_status' || activeDictionaryKey.key === 'incident_degree')" (click)="removeField(data, i)"></i>
144 47
               </div>
145 48
             </div>
146
-          </div>
49
+          </form>
50
+        </overlay-scrollbars>
51
+      </div>
52
+      <div class="contentBtns" [hidden]="activeDictionaryKey.id != 1">
53
+        <button nz-button nzType="primary" class="ml8" (click)="saveDictionary()">保存</button>
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>
147 59
         </div>
148 60
       </ng-container>
149 61
     </div>

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

@@ -176,701 +176,5 @@
176 176
     }
177 177
   }
178 178
 
179
-  .TaskTypeManagement {
180
-    height: calc(100vh - 136px);
181
-    background: #f9fafb;
182
-    overflow: hidden;
183
-    padding: 16px 20px;
184 179
 
185
-    .pagination {
186
-      margin-top: 14px;
187
-      margin-bottom: 14px;
188
-      bottom: 12px;
189
-      right: 5px;
190
-    }
191
-
192
-    .taskType {
193
-      float: left;
194
-      width: 24%;
195
-      height: 100%;
196
-      border: 1px solid #e5e9ed;
197
-      background: #fff;
198
-      color: #333;
199
-      font-size: 14px;
200
-      position: relative;
201
-      overflow: hidden;
202
-
203
-      .title {
204
-        width: 100%;
205
-        height: 40px;
206
-        line-height: 40px;
207
-        padding-left: 16px;
208
-        border-bottom: 1px solid #e5e9ed;
209
-        position: relative;
210
-        background: #fff;
211
-        z-index: 2;
212
-      }
213
-
214
-      .operate {
215
-        width: 100%;
216
-        border-bottom: 1px solid #e5e9ed;
217
-        position: relative;
218
-        background: #fff;
219
-        z-index: 2;
220
-        display: flex;
221
-
222
-        .item {
223
-          flex: 1;
224
-          height: 34px;
225
-          line-height: 34px;
226
-          border-right: 1px solid #e5e9ed;
227
-          text-align: center;
228
-          color: #666; // cursor: default;
229
-          cursor: pointer;
230
-
231
-          &:hover {
232
-            color: @primary-color;
233
-            background: #f0f6ed;
234
-          }
235
-
236
-          &:nth-last-child(1) {
237
-            border: none;
238
-          }
239
-        }
240
-      }
241
-
242
-      .taskTypes {
243
-        // width: 110%;
244
-        width: 100%;
245
-        height: 92%;
246
-        // padding-right: 10%;
247
-        overflow-y: auto;
248
-        z-index: 1;
249
-        padding-bottom: 30px;
250
-
251
-        .itemChoice {
252
-          color: @primary-color;
253
-          background: #f0f6ed;
254
-        }
255
-
256
-        .item {
257
-          width: 100%;
258
-          height: 34px;
259
-          line-height: 34px;
260
-          text-align: center;
261
-          cursor: pointer;
262
-          overflow: hidden;
263
-          text-overflow: ellipsis;
264
-          white-space: nowrap;
265
-
266
-          &:hover {
267
-            color: @primary-color;
268
-            background: #f0f6ed;
269
-          }
270
-
271
-          &.checked {
272
-            color: @primary-color;
273
-            background: #f0f6ed;
274
-          }
275
-        }
276
-      }
277
-    }
278
-
279
-    //任务类型管理-主体
280
-    .taskTypeInfo {
281
-      height: 100%;
282
-      border: 1px solid #e5e9ed;
283
-      background: #fff;
284
-      color: #333;
285
-      position: relative;
286
-
287
-      .top {
288
-        height: 61px;
289
-        line-height: 60px;
290
-        display: flex;
291
-        align-items: center;
292
-        border-bottom: 1px solid #e5e9ed;
293
-        position: relative;
294
-        z-index: 2;
295
-
296
-        .items {
297
-          background: #f0f6ed;
298
-        }
299
-
300
-        & > div {
301
-          border-right: 1px solid #e5e9ed;
302
-          width: 30%;
303
-          text-align: center; // display: flex;
304
-          // align-items: center;
305
-          cursor: pointer;
306
-
307
-          &:hover {
308
-            background: #f0f6ed;
309
-          }
310
-        }
311
-
312
-        &:nth-last-child(4) {
313
-          border: none;
314
-        }
315
-      }
316
-
317
-      .list {
318
-        width: 100%; // height: 100%;
319
-        padding: 16px; // position: absolute;
320
-        // top: 0;
321
-        // padding-top: 90px;
322
-        background: #fff;
323
-        height: 89%;
324
-        overflow: auto;
325
-
326
-        nz-form-label {
327
-          margin-left: 0px !important;
328
-        }
329
-
330
-        & > div {
331
-          background: #f9fafb;
332
-          border: 1px solid #e5e9ed;
333
-          border-radius: 10px 10px 0px 0px;
334
-          padding: 24px 120px;
335
-
336
-          .label {
337
-            margin-left: 16px;
338
-            font-size: 14px;
339
-            color: #333;
340
-          }
341
-        }
342
-
343
-        // 规则信息
344
-        .ruleList {
345
-          padding: 15px 15px 0px 15px;
346
-          background: #fff;
347
-
348
-          .table {
349
-            width: 100%;
350
-            height: 100%;
351
-
352
-            .box {
353
-              // background: #f9fafb;
354
-              // border: 1px solid #e5e9ed;
355
-              border-radius: 5px;
356
-              position: relative;
357
-
358
-              .table_title {
359
-                font-size: 18px;
360
-                margin: 14px 0px;
361
-                text-align: center;
362
-              }
363
-
364
-              .thead {
365
-                background-image: linear-gradient(to right, @bg-start, @bg-end);
366
-
367
-                th {
368
-                  background: transparent;
369
-                  color: #fff;
370
-                  text-align: center;
371
-                  font-size: 14px;
372
-                }
373
-              }
374
-
375
-              .ant-table-body {
376
-                border-bottom: 1px solid #e5e9ed;
377
-                background: #f9fafb;
378
-              }
379
-
380
-              .ant-table-tbody {
381
-                background: #f9fafb;
382
-                border: 1px solid #e5e9ed;
383
-
384
-                .zzBontton {
385
-                  & > td {
386
-                    border-bottom: 1px solid #e5e9ed;
387
-                  }
388
-                }
389
-
390
-                tr {
391
-                  text-align: center;
392
-                  font-size: 14px;
393
-                  border: none;
394
-                  color: #333;
395
-                  overflow: hidden;
396
-
397
-                  .lin {
398
-                    width: 68.2%;
399
-                    height: 2rem;
400
-                    border-bottom: 0.1rem solid #e5e9ed;
401
-                    position: absolute;
402
-                    text-align: center;
403
-                    margin-left: 0%;
404
-                    margin-top: -0.8%;
405
-                    transform: rotate(6.5deg);
406
-                  }
407
-
408
-                  td {
409
-                    border: none;
410
-
411
-                    nz-input-number {
412
-                      width: 50px;
413
-                    }
414
-
415
-                    .coop {
416
-                      .line {
417
-                        margin: 10px;
418
-                      }
419
-
420
-                      span:nth-child(2n-1) {
421
-                        cursor: pointer;
422
-
423
-                        &:hover {
424
-                          color: @primary-color;
425
-                        }
426
-
427
-                        &:active {
428
-                          color: @primary-color;
429
-                        }
430
-                      }
431
-                    }
432
-                  }
433
-                }
434
-
435
-                tr:nth-child(even) {
436
-                  background: #fff;
437
-                }
438
-              }
439
-            }
440
-          }
441
-        }
442
-
443
-        //运送过程
444
-        .ysgcItem {
445
-          padding: 0px 0px 0px 0px; // background: #fff;
446
-
447
-          .ysgc_top {
448
-            height: 88px;
449
-            background: #fff;
450
-            border-radius: 10px 10px 0px 0px;
451
-            padding: 15px 22px 0px 22px;
452
-
453
-            .title {
454
-              span {
455
-                font-size: 18px;
456
-              }
457
-            }
458
-
459
-            .carrItems {
460
-              color: @primary-color;
461
-              border-color: @primary-color !important;
462
-            }
463
-
464
-            .process {
465
-              width: 80%;
466
-              display: flex;
467
-              justify-content: center;
468
-              align-items: center;
469
-              margin: 5px auto;
470
-              font-size: 14px;
471
-
472
-              .carrItem {
473
-                height: 40px;
474
-                line-height: 28px;
475
-                cursor: pointer;
476
-                display: flex;
477
-                justify-content: center;
478
-                align-items: center;
479
-
480
-                .carrItem_icon {
481
-                  width: 35px;
482
-                  height: 35px;
483
-                  border: 1px solid #e5e9ed;
484
-                  border-radius: 50%;
485
-                  text-align: center;
486
-                  line-height: 35px;
487
-                  margin-right: 10px;
488
-
489
-                  i {
490
-                    font-size: 18px;
491
-                  }
492
-                }
493
-              }
494
-
495
-              .carrItem1 {
496
-                float: left;
497
-                width: 45%;
498
-                height: 40px;
499
-                line-height: 28px;
500
-                padding-left: 10%;
501
-                cursor: pointer;
502
-
503
-                .carrItem_icon {
504
-                  width: 35px;
505
-                  height: 35px;
506
-                  border: 1px solid #e5e9ed;
507
-                  border-radius: 50%;
508
-                  text-align: center;
509
-                  line-height: 35px;
510
-                  float: left;
511
-                  margin-right: 10px;
512
-
513
-                  i {
514
-                    font-size: 18px;
515
-                  }
516
-                }
517
-              }
518
-            }
519
-          }
520
-
521
-          .ysgc_cont {
522
-            padding: 0px 240px 24px 240px;
523
-
524
-            textarea {
525
-              padding-right: 10%;
526
-            }
527
-
528
-            .icon_btn {
529
-              cursor: pointer;
530
-              font-size: 18px;
531
-            }
532
-
533
-            .icon_text {
534
-              display: block;
535
-              cursor: pointer;
536
-              position: relative;
537
-              right: 5px;
538
-            }
539
-
540
-            .item_type_cont {
541
-              height: 70px;
542
-              padding-top: 4px;
543
-
544
-              & > div {
545
-                height: 65px;
546
-                border: 1px solid #e5e9ed;
547
-                border-radius: 5px;
548
-                background: #fff;
549
-
550
-                .item_type_cont_L {
551
-                  height: 100%;
552
-                  width: 90%;
553
-                  float: left;
554
-                  padding: 2px 12px;
555
-                  overflow: auto;
556
-
557
-                  .item_yq {
558
-                    width: 24%;
559
-                    height: 28px;
560
-                    display: inline-block;
561
-                    border: 1px solid #e5e9ed;
562
-                    border-radius: 20px;
563
-                    text-align: center;
564
-                    line-height: 26px;
565
-                    background: #f9fafb;
566
-                    margin-right: 1%;
567
-                    margin-bottom: 2px;
568
-                    font-size: 12px;
569
-                    padding-left: 8px;
570
-
571
-                    span {
572
-                      width: 75%;
573
-                      float: left;
574
-                      overflow: hidden;
575
-                      text-overflow: ellipsis;
576
-                      white-space: nowrap;
577
-                    }
578
-
579
-                    i {
580
-                      font-size: 14px;
581
-                      color: #999;
582
-                      cursor: pointer;
583
-                    }
584
-                  }
585
-                }
586
-
587
-                .item_type_cont_R {
588
-                  height: 100%;
589
-                  width: 10%;
590
-                  float: right;
591
-                  text-align: center;
592
-                  padding-top: 15px;
593
-                  border-left: 1px solid #e5e9ed;
594
-                  cursor: pointer;
595
-
596
-                  i {
597
-                    display: block;
598
-                    font-size: 16px;
599
-                  }
600
-
601
-                  i:hover {
602
-                    color: @primary-color;
603
-                  }
604
-
605
-                  .icon_text {
606
-                    right: 1px;
607
-                  }
608
-                }
609
-              }
610
-            }
611
-          }
612
-        }
613
-
614
-        //关联信息
615
-        .glxxItem {
616
-          padding: 10px 15px 0px 15px;
617
-          background: #fff;
618
-
619
-          .tab_btn {
620
-            cursor: pointer;
621
-          }
622
-
623
-          .tab_btn:hover {
624
-            color: @primary-color;
625
-          }
626
-
627
-          .table_title {
628
-            font-size: 18px;
629
-            margin: 14px 0px;
630
-            text-align: center;
631
-          }
632
-
633
-          .thead {
634
-            background-image: linear-gradient(to right, @bg-start, @bg-end);
635
-
636
-            th {
637
-              background: transparent;
638
-              color: #fff;
639
-              text-align: center;
640
-              font-size: 14px;
641
-            }
642
-          }
643
-
644
-          .ant-table-body {
645
-            // border-bottom: 1px solid #e5e9ed;
646
-            background: #f9fafb;
647
-          }
648
-
649
-          .ant-table-tbody {
650
-            background: #f9fafb;
651
-            border: 1px solid #e5e9ed;
652
-
653
-            tr {
654
-              text-align: center;
655
-              font-size: 14px;
656
-              border: none;
657
-              color: #333;
658
-
659
-              td {
660
-                border: none; // font-size: 14px;
661
-
662
-                nz-input-number {
663
-                  width: 40px;
664
-                }
665
-
666
-                .coop {
667
-                  .line {
668
-                    margin: 10px;
669
-                  }
670
-
671
-                  span:nth-child(2n-1) {
672
-                    cursor: pointer;
673
-
674
-                    &:hover {
675
-                      color: @primary-color;
676
-                    }
677
-
678
-                    &:active {
679
-                      color: @primary-color;
680
-                    }
681
-                  }
682
-                }
683
-              }
684
-            }
685
-
686
-            tr:nth-child(even) {
687
-              background: #fff;
688
-            }
689
-          }
690
-        }
691
-
692
-        // 开通科室
693
-        .ktksItem {
694
-          padding: 0px 0px 0px 0px;
695
-          background: #fff;
696
-
697
-          .top {
698
-            width: 100%; // padding-bottom: 7px;
699
-            // border-bottom: 1px solid #e5e9ed;
700
-            position: relative;
701
-            overflow: hidden;
702
-            z-index: 2;
703
-            display: flex;
704
-            align-items: center;
705
-            justify-content: space-between;
706
-
707
-            .top_L {
708
-              width: 70%;
709
-              text-align: left;
710
-              display: flex;
711
-              flex-wrap: wrap;
712
-              align-items: center;
713
-              padding: 0 4px;
714
-              .top_L_item {
715
-                margin-left: 4px;
716
-              }
717
-
718
-              .label {
719
-                font-size: 14px;
720
-                color: #333;
721
-                margin-left: 0;
722
-              }
723
-
724
-              nz-select {
725
-                font-size: 12px;
726
-                width: 100px;
727
-              }
728
-
729
-              input {
730
-                font-size: 12px;
731
-                width: 100px;
732
-              }
733
-            }
734
-
735
-            .top_R {
736
-              border: 0px;
737
-
738
-              .btn {
739
-                margin-left: 10px;
740
-              }
741
-            }
742
-          }
743
-
744
-          .ktksItemList {
745
-            padding: 10px 15px 0px 15px;
746
-            .table {
747
-              min-height: 528px;
748
-            }
749
-
750
-            .operate {
751
-              float: right;
752
-              margin-bottom: 5px;
753
-
754
-              span {
755
-                font-size: 14px;
756
-              }
757
-
758
-              .num {
759
-                font-size: 18px;
760
-                color: @primary-color;
761
-              }
762
-            }
763
-
764
-            .thead {
765
-              background-image: linear-gradient(to right, @bg-start, @bg-end);
766
-
767
-              th {
768
-                background: transparent;
769
-                color: #fff;
770
-                text-align: center;
771
-                font-size: 14px;
772
-              }
773
-            }
774
-
775
-            .ant-table-body {
776
-              border-bottom: 1px solid #e5e9ed;
777
-              background: #f9fafb;
778
-            }
779
-
780
-            .ant-table-tbody {
781
-              background: #f9fafb;
782
-              border: 1px solid #e5e9ed;
783
-
784
-              .zzBontton {
785
-                & > td {
786
-                  border-bottom: 1px solid #e5e9ed;
787
-                }
788
-              }
789
-
790
-              tr {
791
-                text-align: center;
792
-                font-size: 14px;
793
-                border: none;
794
-                color: #333;
795
-
796
-                td {
797
-                  border: none; // font-size: 14px;
798
-
799
-                  nz-input-number {
800
-                    width: 40px;
801
-                  }
802
-
803
-                  .coop {
804
-                    .line {
805
-                      margin: 10px;
806
-                    }
807
-
808
-                    span:nth-child(2n-1) {
809
-                      cursor: pointer;
810
-
811
-                      &:hover {
812
-                        color: @primary-color;
813
-                      }
814
-
815
-                      &:active {
816
-                        color: @primary-color;
817
-                      }
818
-                    }
819
-                  }
820
-                }
821
-              }
822
-
823
-              tr:nth-child(even) {
824
-                background: #fff;
825
-              }
826
-            }
827
-          }
828
-
829
-          .pagination {
830
-            margin-top: 25px;
831
-            margin-bottom: 14px;
832
-            bottom: 12px;
833
-            right: 5px;
834
-            position: relative;
835
-            height: 30px;
836
-            .page {
837
-              position: absolute;
838
-              right: 5px;
839
-            }
840
-          }
841
-        }
842
-
843
-        .bottom {
844
-          height: 60px;
845
-          border-radius: 0px 0px 10px 10px;
846
-          padding: 10px 240px 0px 240px;
847
-          border-top: 0px;
848
-
849
-          button {
850
-            width: 80px;
851
-            height: 34px;
852
-            display: block;
853
-            margin: 0 auto;
854
-          }
855
-        }
856
-      }
857
-    }
858
-  }
859
-  .timeRange{
860
-    margin-bottom: 56px;
861
-    &:last-of-type{
862
-      margin-bottom: 0;
863
-    }
864
-    .timeRangeActive{
865
-      margin-top: 16px;
866
-      padding-left: 60px;
867
-    }
868
-    .timeRangeDefault{
869
-      margin-top: 16px;
870
-      padding-left: 60px;
871
-    }
872
-    .timeRangeCheckbox{
873
-      margin-left: 16px;
874
-    }
875
-  }
876 180
 }

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

@@ -69,9 +69,6 @@ export class ConfigurationInspectComponent implements OnInit {
69 69
     if(this.activeDictionaryKey.id == 1){
70 70
       this.getDictionaryList();
71 71
       this.initDictionaryForm();
72
-    }else{
73
-      this.tabModal('characteristics');
74
-      this.init();
75 72
     }
76 73
   }
77 74
 
@@ -281,198 +278,5 @@ export class ConfigurationInspectComponent implements OnInit {
281 278
   }
282 279
 
283 280
 
284
-  // ==============================页面控制============================
285
-  tabModalName:string = 'characteristics'; //当前选中的tab
286
-  loading:boolean = false; //页面加载的loading
287
-  hosId = this.tool.getCurrentHospital().id; //当前院区
288
-  tasktype:any = {};// 任务类型
289
-  configs:any = {};// 配置
290
-  // 切换tab
291
-  tabModal(tabModalName:string){
292
-    this.tabModalName = tabModalName;
293
-  }
294
-  // 保存
295
-  submitForm() {
296
-    if(!this.tasktype.id){
297
-      this.message.create("warning", "请先配置任务类型!");
298
-      return;
299
-    }
300
-
301
-    // 默认时间区间1
302
-
303
-    if(
304
-      (this.activeDictionaryKey.postData.ibActiveStartTime1 && !this.activeDictionaryKey.postData.ibActiveEndTime1) ||
305
-      (!this.activeDictionaryKey.postData.ibActiveStartTime1 && this.activeDictionaryKey.postData.ibActiveEndTime1) ||
306
-      (this.activeDictionaryKey.postData.ibActiveStartTime2 && !this.activeDictionaryKey.postData.ibActiveEndTime2) ||
307
-      (!this.activeDictionaryKey.postData.ibActiveStartTime2 && this.activeDictionaryKey.postData.ibActiveEndTime2)
308
-    ){
309
-      this.message.create("warning", "【默认时间区间1】的【有效时间范围】请完整填写开始时间与结束时间!");
310
-      return;
311
-    }else if(
312
-      (this.activeDictionaryKey.postData.ibActiveStartTime1 && this.activeDictionaryKey.postData.ibActiveEndTime1 && +this.activeDictionaryKey.postData.ibActiveStartTime1 > +this.activeDictionaryKey.postData.ibActiveEndTime1) ||
313
-      (this.activeDictionaryKey.postData.ibActiveStartTime2 && this.activeDictionaryKey.postData.ibActiveEndTime2 && +this.activeDictionaryKey.postData.ibActiveStartTime2 > +this.activeDictionaryKey.postData.ibActiveEndTime2)
314
-    ){
315
-      this.message.create("warning", "【默认时间区间1】的【有效时间范围】开始时间不能大于结束时间!");
316
-      return;
317
-    }
318
-
319
-    if(
320
-      (this.activeDictionaryKey.postData.ibDefaultStartTime && !this.activeDictionaryKey.postData.ibDefaultEndTime) ||
321
-      (!this.activeDictionaryKey.postData.ibDefaultStartTime && this.activeDictionaryKey.postData.ibDefaultEndTime)
322
-    ){
323
-      this.message.create("warning", "【默认时间区间1】的【默认时间】请完整填写开始时间与结束时间!");
324
-      return;
325
-    }else if(
326
-      this.activeDictionaryKey.postData.ibDefaultStartTime &&
327
-      this.activeDictionaryKey.postData.ibDefaultEndTime &&
328
-      (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)
329
-    ){
330
-      this.message.create("warning", "【默认时间区间1】的【默认时间】开始时间不能大于结束时间!");
331
-      return;
332
-    }
333
-
334
-    // 默认时间区间2
335
-
336
-    if(
337
-      (this.activeDictionaryKey.postData.ib2ActiveStartTime1 && !this.activeDictionaryKey.postData.ib2ActiveEndTime1) ||
338
-      (!this.activeDictionaryKey.postData.ib2ActiveStartTime1 && this.activeDictionaryKey.postData.ib2ActiveEndTime1) ||
339
-      (this.activeDictionaryKey.postData.ib2ActiveStartTime2 && !this.activeDictionaryKey.postData.ib2ActiveEndTime2) ||
340
-      (!this.activeDictionaryKey.postData.ib2ActiveStartTime2 && this.activeDictionaryKey.postData.ib2ActiveEndTime2)
341
-    ){
342
-      this.message.create("warning", "【默认时间区间1】的【有效时间范围】请完整填写开始时间与结束时间!");
343
-      return;
344
-    }else if(
345
-      (this.activeDictionaryKey.postData.ib2ActiveStartTime1 && this.activeDictionaryKey.postData.ib2ActiveEndTime1 && +this.activeDictionaryKey.postData.ib2ActiveStartTime1 > +this.activeDictionaryKey.postData.ib2ActiveEndTime1) ||
346
-      (this.activeDictionaryKey.postData.ib2ActiveStartTime2 && this.activeDictionaryKey.postData.ib2ActiveEndTime2 && +this.activeDictionaryKey.postData.ib2ActiveStartTime2 > +this.activeDictionaryKey.postData.ib2ActiveEndTime2)
347
-    ){
348
-      this.message.create("warning", "【默认时间区间1】的【有效时间范围】开始时间不能大于结束时间!");
349
-      return;
350
-    }
351
-
352
-    if(
353
-      (this.activeDictionaryKey.postData.ib2DefaultStartTime && !this.activeDictionaryKey.postData.ib2DefaultEndTime) ||
354
-      (!this.activeDictionaryKey.postData.ib2DefaultStartTime && this.activeDictionaryKey.postData.ib2DefaultEndTime)
355
-    ){
356
-      this.message.create("warning", "【默认时间区间1】的【默认时间】请完整填写开始时间与结束时间!");
357
-      return;
358
-    }else if(
359
-      this.activeDictionaryKey.postData.ib2DefaultStartTime &&
360
-      this.activeDictionaryKey.postData.ib2DefaultEndTime &&
361
-      (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)
362
-    ){
363
-      this.message.create("warning", "【默认时间区间1】的【默认时间】开始时间不能大于结束时间!");
364
-      return;
365
-    }
366 281
 
367
-    let postData:any = {
368
-      ...this.configs,
369
-      taskType: this.tasktype.id,
370
-      hosId: this.hosId,
371
-      ibActiveStartTime1: this.activeDictionaryKey.postData.ibActiveStartTime1 ? format(startOfMinute(this.activeDictionaryKey.postData.ibActiveStartTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
372
-      ibActiveEndTime1: this.activeDictionaryKey.postData.ibActiveEndTime1 ? format(endOfMinute(this.activeDictionaryKey.postData.ibActiveEndTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
373
-      ibActiveStartTime2: this.activeDictionaryKey.postData.ibActiveStartTime2 ? format(startOfMinute(this.activeDictionaryKey.postData.ibActiveStartTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
374
-      ibActiveEndTime2: this.activeDictionaryKey.postData.ibActiveEndTime2 ? format(endOfMinute(this.activeDictionaryKey.postData.ibActiveEndTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
375
-      ibDefaultStartTime: this.activeDictionaryKey.postData.ibDefaultStartTime ? format(startOfMinute(this.activeDictionaryKey.postData.ibDefaultStartTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
376
-      ibDefaultEndTime: this.activeDictionaryKey.postData.ibDefaultEndTime ? format(endOfMinute(this.activeDictionaryKey.postData.ibDefaultEndTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
377
-      ibDefaultDayStart: this.activeDictionaryKey.postData.ibDefaultDayStart[0].checked ? 1 : 0,
378
-      ibDefaultDayEnd: this.activeDictionaryKey.postData.ibDefaultDayEnd[0].checked ? 1 : 0,
379
-      ib2ActiveStartTime1: this.activeDictionaryKey.postData.ib2ActiveStartTime1 ? format(startOfMinute(this.activeDictionaryKey.postData.ib2ActiveStartTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
380
-      ib2ActiveEndTime1: this.activeDictionaryKey.postData.ib2ActiveEndTime1 ? format(endOfMinute(this.activeDictionaryKey.postData.ib2ActiveEndTime1), 'yyyy-MM-dd HH:mm:ss') : undefined,
381
-      ib2ActiveStartTime2: this.activeDictionaryKey.postData.ib2ActiveStartTime2 ? format(startOfMinute(this.activeDictionaryKey.postData.ib2ActiveStartTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
382
-      ib2ActiveEndTime2: this.activeDictionaryKey.postData.ib2ActiveEndTime2 ? format(endOfMinute(this.activeDictionaryKey.postData.ib2ActiveEndTime2), 'yyyy-MM-dd HH:mm:ss') : undefined,
383
-      ib2DefaultStartTime: this.activeDictionaryKey.postData.ib2DefaultStartTime ? format(startOfMinute(this.activeDictionaryKey.postData.ib2DefaultStartTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
384
-      ib2DefaultEndTime: this.activeDictionaryKey.postData.ib2DefaultEndTime ? format(endOfMinute(this.activeDictionaryKey.postData.ib2DefaultEndTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
385
-      ib2DefaultDayStart: this.activeDictionaryKey.postData.ib2DefaultDayStart[0].checked ? 1 : 0,
386
-      ib2DefaultDayEnd: this.activeDictionaryKey.postData.ib2DefaultDayEnd[0].checked ? 1 : 0,
387
-    };
388
-    console.log(postData);
389
-    this.btnLoading = true;
390
-    this.mainService
391
-      .simplePost("addData", "taskTypeConfig", postData)
392
-      .subscribe((result) => {
393
-        this.btnLoading = false;
394
-        if (result.status == 200) {
395
-          this.message.success("保存成功!");
396
-          this.getConfig();
397
-        }else{
398
-          this.message.success("保存失败!");
399
-        }
400
-      });
401
-  }
402
-
403
-  //初始化
404
-  init() {
405
-    this.loading = true;
406
-    this.getTaskType();
407
-  }
408
-
409
-  //获取任务类型
410
-  getTaskType() {
411
-    this.loading = true;
412
-    let postData = {
413
-      idx: 0,
414
-      sum: 1,
415
-      taskType: {
416
-        simpleQuery: true,
417
-        hosId: {
418
-          id: this.hosId
419
-        },
420
-        associationType: {
421
-          key: 'association_types',
422
-          value: 'inspect',
423
-        }
424
-      }
425
-    };
426
-    this.mainService
427
-      .getFetchDataList("simple/data", "taskType", postData)
428
-      .subscribe((result) => {
429
-        this.loading = false;
430
-        if (result.status == 200) {
431
-          this.tasktype = result.list[0] || {};
432
-          this.getConfig();
433
-        }
434
-      });
435
-  }
436
-
437
-  // 获取配置
438
-  getConfig() {
439
-    this.loading = true;
440
-    let postData = {
441
-      idx: 0,
442
-      sum: 1,
443
-      taskTypeConfig: {
444
-        taskTypeDTO: {
445
-          hosId: {
446
-            id: this.hosId
447
-          },
448
-          associationType: this.tasktype.associationType,
449
-        }
450
-      }
451
-    };
452
-    this.mainService
453
-      .getFetchDataList("simple/data", "taskTypeConfig", postData)
454
-      .subscribe((result) => {
455
-        this.loading = false;
456
-        if (result.status == 200) {
457
-          this.configs = result.list[0] || {};
458
-          this.activeDictionaryKey.postData.ibActiveStartTime1 = this.configs.ibActiveStartTime1 || undefined;
459
-          this.activeDictionaryKey.postData.ibActiveEndTime1 = this.configs.ibActiveEndTime1 || undefined;
460
-          this.activeDictionaryKey.postData.ibActiveStartTime2 = this.configs.ibActiveStartTime2 || undefined;
461
-          this.activeDictionaryKey.postData.ibActiveEndTime2 = this.configs.ibActiveEndTime2 || undefined;
462
-          this.activeDictionaryKey.postData.ibDefaultStartTime = this.configs.ibDefaultStartTime || undefined;
463
-          this.activeDictionaryKey.postData.ibDefaultEndTime = this.configs.ibDefaultEndTime || undefined;
464
-          this.activeDictionaryKey.postData.ibDefaultDayStart[0].checked = this.configs.ibDefaultDayStart == 1;
465
-          this.activeDictionaryKey.postData.ibDefaultDayEnd[0].checked = this.configs.ibDefaultDayEnd == 1;
466
-
467
-          this.activeDictionaryKey.postData.ib2ActiveStartTime1 = this.configs.ib2ActiveStartTime1 || undefined;
468
-          this.activeDictionaryKey.postData.ib2ActiveEndTime1 = this.configs.ib2ActiveEndTime1 || undefined;
469
-          this.activeDictionaryKey.postData.ib2ActiveStartTime2 = this.configs.ib2ActiveStartTime2 || undefined;
470
-          this.activeDictionaryKey.postData.ib2ActiveEndTime2 = this.configs.ib2ActiveEndTime2 || undefined;
471
-          this.activeDictionaryKey.postData.ib2DefaultStartTime = this.configs.ib2DefaultStartTime || undefined;
472
-          this.activeDictionaryKey.postData.ib2DefaultEndTime = this.configs.ib2DefaultEndTime || undefined;
473
-          this.activeDictionaryKey.postData.ib2DefaultDayStart[0].checked = this.configs.ib2DefaultDayStart == 1;
474
-          this.activeDictionaryKey.postData.ib2DefaultDayEnd[0].checked = this.configs.ib2DefaultDayEnd == 1;
475
-        }
476
-      });
477
-  }
478 282
 }

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

@@ -3,6 +3,7 @@ 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';
6 7
 
7 8
 
8 9
 @NgModule({
@@ -12,6 +13,7 @@ import { ShareModule } from '../../../share/share.module';
12 13
   imports: [
13 14
     CommonModule,
14 15
     ShareModule,
16
+    ConfigurationInspectBatchModule,
15 17
   ],
16 18
   exports: [
17 19
     ConfigurationInspectComponent,