Преглед изворни кода

院区设置增加配置项

seimin пре 3 година
родитељ
комит
a47b4bc57b

+ 287 - 53
src/app/views/hospital-config/hospital-config.component.html

@@ -3,130 +3,354 @@
3 3
     <h2>院区系统配置</h2>
4 4
     <form nz-form [formGroup]="validateForm" class="forms">
5 5
       <div class="form">
6
-        <nz-form-item class="formItem" *ngFor="let config of hospitalConfigList">
6
+        <nz-form-item
7
+          class="formItem"
8
+          *ngFor="let config of hospitalConfigList"
9
+        >
7 10
           <ng-container [ngSwitch]="config.key">
8 11
             <ng-container *ngSwitchCase="'autoCreateUserRoleId'">
9
-              <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
10
-              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
11
-                <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch
12
-                  nzServerSearch>
12
+              <nz-form-label
13
+                [nzSpan]="24"
14
+                [nzFor]="config.key"
15
+                nzRequired
16
+                class="label"
17
+                >{{ config.desc }}</nz-form-label
18
+              >
19
+              <nz-form-control
20
+                [nzSpan]="24"
21
+                [nzErrorTip]="'请选择' + config.desc + '!'"
22
+              >
23
+                <nz-select
24
+                  [formControlName]="config.key"
25
+                  [nzPlaceHolder]="'请选择' + config.desc"
26
+                  nzShowSearch
27
+                  nzServerSearch
28
+                >
13 29
                   <ng-container *ngFor="let o of roleList">
14
-                    <nz-option *ngIf="true" [nzValue]="o.id" [nzLabel]="o.role"></nz-option>
30
+                    <nz-option
31
+                      *ngIf="true"
32
+                      [nzValue]="o.id"
33
+                      [nzLabel]="o.role"
34
+                    ></nz-option>
15 35
                   </ng-container>
16 36
                   <nz-option *ngIf="false" nzDisabled nzCustomContent>
17
-                    <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
37
+                    <i nz-icon nzType="loading" class="loading-icon"></i>
38
+                    正在加载中...
18 39
                   </nz-option>
19 40
                 </nz-select>
20 41
               </nz-form-control>
21 42
             </ng-container>
22 43
             <ng-container *ngSwitchCase="'autoCreateUserDeptId'">
23
-              <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
24
-              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
25
-                <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch
26
-                  nzServerSearch (nzOnSearch)="onSearch($event)">
44
+              <nz-form-label
45
+                [nzSpan]="24"
46
+                [nzFor]="config.key"
47
+                nzRequired
48
+                class="label"
49
+                >{{ config.desc }}</nz-form-label
50
+              >
51
+              <nz-form-control
52
+                [nzSpan]="24"
53
+                [nzErrorTip]="'请选择' + config.desc + '!'"
54
+              >
55
+                <nz-select
56
+                  [formControlName]="config.key"
57
+                  [nzPlaceHolder]="'请选择' + config.desc"
58
+                  nzShowSearch
59
+                  nzServerSearch
60
+                  (nzOnSearch)="onSearch($event)"
61
+                >
27 62
                   <ng-container *ngFor="let o of deptList">
28
-                    <nz-option *ngIf="!searchLoading" [nzValue]="o.id" [nzLabel]="o.dept"></nz-option>
63
+                    <nz-option
64
+                      *ngIf="!searchLoading"
65
+                      [nzValue]="o.id"
66
+                      [nzLabel]="o.dept"
67
+                    ></nz-option>
29 68
                   </ng-container>
30 69
                   <nz-option *ngIf="searchLoading" nzDisabled nzCustomContent>
31
-                    <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
70
+                    <i nz-icon nzType="loading" class="loading-icon"></i>
71
+                    正在加载中...
32 72
                   </nz-option>
33 73
                 </nz-select>
34 74
               </nz-form-control>
35 75
             </ng-container>
36 76
             <ng-container *ngSwitchCase="'autoCreateUserGroupId'">
37
-              <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
38
-              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
39
-                <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch
40
-                  nzServerSearch>
77
+              <nz-form-label
78
+                [nzSpan]="24"
79
+                [nzFor]="config.key"
80
+                nzRequired
81
+                class="label"
82
+                >{{ config.desc }}</nz-form-label
83
+              >
84
+              <nz-form-control
85
+                [nzSpan]="24"
86
+                [nzErrorTip]="'请选择' + config.desc + '!'"
87
+              >
88
+                <nz-select
89
+                  [formControlName]="config.key"
90
+                  [nzPlaceHolder]="'请选择' + config.desc"
91
+                  nzShowSearch
92
+                  nzServerSearch
93
+                >
41 94
                   <ng-container *ngFor="let o of groupList">
42
-                    <nz-option *ngIf="true" [nzValue]="o.id" [nzLabel]="o.groupName"></nz-option>
95
+                    <nz-option
96
+                      *ngIf="true"
97
+                      [nzValue]="o.id"
98
+                      [nzLabel]="o.groupName"
99
+                    ></nz-option>
43 100
                   </ng-container>
44 101
                   <nz-option *ngIf="false" nzDisabled nzCustomContent>
45
-                    <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
102
+                    <i nz-icon nzType="loading" class="loading-icon"></i>
103
+                    正在加载中...
46 104
                   </nz-option>
47 105
                 </nz-select>
48 106
               </nz-form-control>
49 107
             </ng-container>
50 108
             <ng-container *ngSwitchCase="'phone_num_port'">
51 109
               <nz-form-label [nzSpan]="24" [nzFor]="config.key" class="label">
52
-                {{config.desc}}</nz-form-label>
53
-              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
110
+                {{ config.desc }}</nz-form-label
111
+              >
112
+              <nz-form-control
113
+                [nzSpan]="24"
114
+                [nzErrorTip]="'请选择' + config.desc + '!'"
115
+              >
54 116
                 <div class="phone">
55
-                  <input [formControlName]="config.key" nz-input [placeholder]="'请选择'+config.desc" />
117
+                  <input
118
+                    [formControlName]="config.key"
119
+                    nz-input
120
+                    [placeholder]="'请选择' + config.desc"
121
+                  />
56 122
                   <input nz-input [value]="config.value2" disabled />
57 123
                 </div>
58 124
               </nz-form-control>
59 125
             </ng-container>
60 126
             <ng-container *ngSwitchCase="'phone_num_port1'">
61 127
               <nz-form-label [nzSpan]="24" [nzFor]="config.key" class="label">
62
-                {{config.desc}}</nz-form-label>
63
-              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
128
+                {{ config.desc }}</nz-form-label
129
+              >
130
+              <nz-form-control
131
+                [nzSpan]="24"
132
+                [nzErrorTip]="'请选择' + config.desc + '!'"
133
+              >
64 134
                 <div class="phone">
65
-                  <input [formControlName]="config.key" nz-input [placeholder]="'请选择'+config.desc" />
135
+                  <input
136
+                    [formControlName]="config.key"
137
+                    nz-input
138
+                    [placeholder]="'请选择' + config.desc"
139
+                  />
66 140
                   <input nz-input [value]="config.value2" disabled />
67 141
                 </div>
68 142
               </nz-form-control>
69 143
             </ng-container>
70 144
             <ng-container *ngSwitchCase="'phone_num_port2'">
71 145
               <nz-form-label [nzSpan]="24" [nzFor]="config.key" class="label">
72
-                {{config.desc}}</nz-form-label>
73
-              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
146
+                {{ config.desc }}</nz-form-label
147
+              >
148
+              <nz-form-control
149
+                [nzSpan]="24"
150
+                [nzErrorTip]="'请选择' + config.desc + '!'"
151
+              >
74 152
                 <div class="phone">
75
-                  <input [formControlName]="config.key" nz-input [placeholder]="'请选择'+config.desc" />
153
+                  <input
154
+                    [formControlName]="config.key"
155
+                    nz-input
156
+                    [placeholder]="'请选择' + config.desc"
157
+                  />
76 158
                   <input nz-input [value]="config.value2" disabled />
77 159
                 </div>
78 160
               </nz-form-control>
79 161
             </ng-container>
80 162
             <ng-container *ngSwitchCase="'phone_num_port3'">
81 163
               <nz-form-label [nzSpan]="24" [nzFor]="config.key" class="label">
82
-                {{config.desc}}</nz-form-label>
83
-              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
164
+                {{ config.desc }}</nz-form-label
165
+              >
166
+              <nz-form-control
167
+                [nzSpan]="24"
168
+                [nzErrorTip]="'请选择' + config.desc + '!'"
169
+              >
84 170
                 <div class="phone">
85
-                  <input [formControlName]="config.key" nz-input [placeholder]="'请选择'+config.desc" />
171
+                  <input
172
+                    [formControlName]="config.key"
173
+                    nz-input
174
+                    [placeholder]="'请选择' + config.desc"
175
+                  />
86 176
                   <input nz-input [value]="config.value2" disabled />
87 177
                 </div>
88 178
               </nz-form-control>
89 179
             </ng-container>
90 180
             <ng-container *ngSwitchCase="'rebackPatientTypeId'">
91
-              <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
92
-              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
93
-                <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch
94
-                  nzServerSearch>
181
+              <nz-form-label
182
+                [nzSpan]="24"
183
+                [nzFor]="config.key"
184
+                nzRequired
185
+                class="label"
186
+                >{{ config.desc }}</nz-form-label
187
+              >
188
+              <nz-form-control
189
+                [nzSpan]="24"
190
+                [nzErrorTip]="'请选择' + config.desc + '!'"
191
+              >
192
+                <nz-select
193
+                  [formControlName]="config.key"
194
+                  [nzPlaceHolder]="'请选择' + config.desc"
195
+                  nzShowSearch
196
+                  nzServerSearch
197
+                >
95 198
                   <ng-container *ngFor="let o of taskTypeList">
96
-                    <nz-option *ngIf="true" [nzValue]="o.id" [nzLabel]="o.taskName"></nz-option>
199
+                    <nz-option
200
+                      *ngIf="true"
201
+                      [nzValue]="o.id"
202
+                      [nzLabel]="o.taskName"
203
+                    ></nz-option>
97 204
                   </ng-container>
98 205
                   <nz-option *ngIf="false" nzDisabled nzCustomContent>
99
-                    <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
206
+                    <i nz-icon nzType="loading" class="loading-icon"></i>
207
+                    正在加载中...
100 208
                   </nz-option>
101 209
                 </nz-select>
102 210
               </nz-form-control>
103 211
             </ng-container>
104 212
             <ng-container *ngSwitchCase="'transDeptTypeId'">
105
-              <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
106
-              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
107
-                <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch
108
-                  nzServerSearch>
213
+              <nz-form-label
214
+                [nzSpan]="24"
215
+                [nzFor]="config.key"
216
+                nzRequired
217
+                class="label"
218
+                >{{ config.desc }}</nz-form-label
219
+              >
220
+              <nz-form-control
221
+                [nzSpan]="24"
222
+                [nzErrorTip]="'请选择' + config.desc + '!'"
223
+              >
224
+                <nz-select
225
+                  [formControlName]="config.key"
226
+                  [nzPlaceHolder]="'请选择' + config.desc"
227
+                  nzShowSearch
228
+                  nzServerSearch
229
+                >
109 230
                   <ng-container *ngFor="let o of taskTypeList">
110
-                    <nz-option *ngIf="true" [nzValue]="o.id" [nzLabel]="o.taskName"></nz-option>
231
+                    <nz-option
232
+                      *ngIf="true"
233
+                      [nzValue]="o.id"
234
+                      [nzLabel]="o.taskName"
235
+                    ></nz-option>
111 236
                   </ng-container>
112 237
                   <nz-option *ngIf="false" nzDisabled nzCustomContent>
113
-                    <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
238
+                    <i nz-icon nzType="loading" class="loading-icon"></i>
239
+                    正在加载中...
114 240
                   </nz-option>
115 241
                 </nz-select>
116 242
               </nz-form-control>
117 243
             </ng-container>
118 244
             <ng-container *ngSwitchCase="'rushNoticeShift'">
119
-              <nz-form-label [nzSpan]="24" [nzFor]="config.key" class="label">{{config.desc}}</nz-form-label>
120
-              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
245
+              <nz-form-label [nzSpan]="24" [nzFor]="config.key" class="label">{{
246
+                config.desc
247
+              }}</nz-form-label>
248
+              <nz-form-control
249
+                [nzSpan]="24"
250
+                [nzErrorTip]="'请选择' + config.desc + '!'"
251
+              >
121 252
                 <nz-checkbox-group [formControlName]="config.key">
122 253
                 </nz-checkbox-group>
123 254
               </nz-form-control>
124 255
             </ng-container>
256
+            <ng-container *ngSwitchCase="'repairSpecimenStatus'">
257
+              <nz-form-label
258
+                [nzSpan]="24"
259
+                [nzFor]="config.key"
260
+                class="label"
261
+                [nzRequired]="config.required"
262
+                >是否执行标本验证机制</nz-form-label
263
+              >
264
+              <nz-form-control
265
+                [nzSpan]="24"
266
+                [nzErrorTip]="'请选择是否执行标本验证机制!'"
267
+              >
268
+                <nz-radio-group
269
+                  [formControlName]="config.key"
270
+                  (ngModelChange)="changeRepairSpecimenStatus($event)"
271
+                >
272
+                  <label nz-radio nzValue="1">是</label>
273
+                  <label nz-radio nzValue="0">否</label>
274
+                </nz-radio-group>
275
+              </nz-form-control>
276
+            </ng-container>
277
+            <ng-container *ngSwitchCase="'repairSpecimenStatusMinute'">
278
+              <ng-container *ngIf="config.show">
279
+                <nz-form-label
280
+                  [nzSpan]="24"
281
+                  [nzFor]="config.key"
282
+                  class="label"
283
+                  [nzRequired]="config.required"
284
+                  >验证时间</nz-form-label
285
+                >
286
+                <nz-form-control [nzSpan]="24" [nzErrorTip]="'请填写验证时间!'">
287
+                  <nz-input-number
288
+                    [formControlName]="config.key"
289
+                    [nzFormatter]="formatterDollar"
290
+                    [nzMin]="0"
291
+                    [nzStep]="1"
292
+                    [nzSize]="'small'"
293
+                  >
294
+                  </nz-input-number>
295
+                  分钟
296
+                </nz-form-control>
297
+              </ng-container>
298
+            </ng-container>
299
+            <ng-container *ngSwitchCase="'repairSpecimenStatusCheckDeptIds'">
300
+              <ng-container *ngIf="config.show">
301
+                <nz-form-label
302
+                  [nzSpan]="24"
303
+                  [nzFor]="config.key"
304
+                  class="label"
305
+                  [nzRequired]="config.required"
306
+                  >验证检验科室范围</nz-form-label
307
+                >
308
+                <nz-form-control
309
+                  [nzSpan]="24"
310
+                  [nzErrorTip]="'请选择验证检验科室范围!'"
311
+                >
312
+                  <nz-select
313
+                    nzMode="multiple"
314
+                    [nzDropdownMatchSelectWidth]="false"
315
+                    nzShowSearch
316
+                    nzAllowClear
317
+                    nzPlaceHolder="请选择验证检验科室范围"
318
+                    nzServerSearch
319
+                    [formControlName]="config.key"
320
+                  >
321
+                    <ng-container *ngFor="let o of deptList2">
322
+                      <nz-option
323
+                        *ngIf="!searchLoading"
324
+                        [nzLabel]="o.dept"
325
+                        [nzValue]="o.id"
326
+                      ></nz-option>
327
+                    </ng-container>
328
+                    <nz-option *ngIf="searchLoading" nzDisabled nzCustomContent>
329
+                      <i nz-icon nzType="loading" class="loading-icon"></i>
330
+                      搜索中...
331
+                    </nz-option>
332
+                  </nz-select>
333
+                </nz-form-control>
334
+              </ng-container>
335
+            </ng-container>
125 336
             <ng-container *ngSwitchDefault>
126
-              <nz-form-label [nzSpan]="24" [nzFor]="config.key" [nzRequired]="config.required" class="label">
127
-                {{config.desc}}</nz-form-label>
128
-              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
129
-                <input [formControlName]="config.key" nz-input [placeholder]="'请选择'+config.desc" />
337
+              <nz-form-label
338
+                [nzSpan]="24"
339
+                [nzFor]="config.key"
340
+                [nzRequired]="config.required"
341
+                class="label"
342
+              >
343
+                {{ config.desc }}</nz-form-label
344
+              >
345
+              <nz-form-control
346
+                [nzSpan]="24"
347
+                [nzErrorTip]="'请选择' + config.desc + '!'"
348
+              >
349
+                <input
350
+                  [formControlName]="config.key"
351
+                  nz-input
352
+                  [placeholder]="'请选择' + config.desc"
353
+                />
130 354
               </nz-form-control>
131 355
             </ng-container>
132 356
           </ng-container>
@@ -135,14 +359,24 @@
135 359
     </form>
136 360
   </div>
137 361
   <div class="submit">
138
-    <button [disabled]="!coopBtns.edit" nz-button nzType="primary" class="save" (click)="submitForm()"
139
-      [nzLoading]="saveLoading">保存</button>
362
+    <button
363
+      [disabled]="!coopBtns.edit"
364
+      nz-button
365
+      nzType="primary"
366
+      class="save"
367
+      (click)="submitForm()"
368
+      [nzLoading]="saveLoading"
369
+    >
370
+      保存
371
+    </button>
140 372
   </div>
141 373
 </div>
142 374
 <div class="hospitalConfig" *ngIf="isLoading">
143
-  <div class="loadingFull display_flex justify-content_flex-center align-items_center">
375
+  <div
376
+    class="loadingFull display_flex justify-content_flex-center align-items_center"
377
+  >
144 378
     <div class="loadingFullInner">
145
-      <img src="../../assets/images/loading.gif" alt="">
379
+      <img src="../../assets/images/loading.gif" alt="" />
146 380
       <div>加载中...</div>
147 381
     </div>
148 382
   </div>

+ 112 - 10
src/app/views/hospital-config/hospital-config.component.ts

@@ -1,5 +1,10 @@
1 1
 import { Component, OnInit } from "@angular/core";
2
-import { FormBuilder, FormGroup, Validators } from "@angular/forms";
2
+import {
3
+  FormBuilder,
4
+  FormGroup,
5
+  Validators,
6
+  FormControl,
7
+} from "@angular/forms";
3 8
 import { ActivatedRoute } from "@angular/router";
4 9
 import { NzMessageService } from "ng-zorro-antd";
5 10
 import { Subject } from "rxjs";
@@ -22,9 +27,14 @@ export class HospitalConfigComponent implements OnInit {
22 27
   roleList = []; //角色列表
23 28
   taskTypeList = []; //任务类型列表
24 29
   deptList = []; //科室列表
30
+  deptList2 = []; //科室列表
25 31
   groupList = []; //组列表
26 32
   onSearchSubject = new Subject(); //搜索防抖
27
-  coopBtns:any = {};
33
+  coopBtns: any = {};
34
+  repairSpecimenStatus = "0"; //是否执行标本验证机制
35
+  repairSpecimenStatusMinute = 0; //验证时间
36
+  repairSpecimenStatusCheckDeptIds = []; //验证检验科范围
37
+  formatterDollar = (value) => Number(value);
28 38
   constructor(
29 39
     private mainService: MainService,
30 40
     private fb: FormBuilder,
@@ -50,6 +60,46 @@ export class HospitalConfigComponent implements OnInit {
50 60
   getDeptById(id) {
51 61
     return this.mainService.getFetchData("data", "department", id);
52 62
   }
63
+  // 选择是否执行标本验证机制
64
+  changeRepairSpecimenStatus(e) {
65
+    if (e == 1) {
66
+      this.validateForm.addControl(
67
+        "repairSpecimenStatusMinute",
68
+        new FormControl(null, Validators.required)
69
+      );
70
+      this.validateForm.addControl(
71
+        "repairSpecimenStatusCheckDeptIds",
72
+        new FormControl(null, Validators.required)
73
+      );
74
+      //赋值
75
+      this.hospitalConfigList.forEach((config) => {
76
+        if (
77
+          config.key === "repairSpecimenStatusMinute" ||
78
+          config.key === "repairSpecimenStatusCheckDeptIds"
79
+        ) {
80
+          config.show = true;
81
+        }
82
+        if (config.key === "repairSpecimenStatusMinute") {
83
+          this.validateForm.controls[config.key].setValue(Number(config.value));
84
+        } else if (config.key === "repairSpecimenStatusCheckDeptIds") {
85
+          this.validateForm.controls[config.key].setValue(
86
+            config.value ? config.value.split(",").map(Number) : []
87
+          );
88
+        }
89
+      });
90
+    } else {
91
+      this.validateForm.removeControl("repairSpecimenStatusMinute");
92
+      this.validateForm.removeControl("repairSpecimenStatusCheckDeptIds");
93
+      this.hospitalConfigList.forEach((v) => {
94
+        if (
95
+          v.key === "repairSpecimenStatusMinute" ||
96
+          v.key === "repairSpecimenStatusCheckDeptIds"
97
+        ) {
98
+          v.show = false;
99
+        }
100
+      });
101
+    }
102
+  }
53 103
   //初始化请求数据
54 104
   getInit() {
55 105
     this.isLoading = true;
@@ -59,6 +109,7 @@ export class HospitalConfigComponent implements OnInit {
59 109
       this.getGroupList(this.hosId),
60 110
       this.getTaskTypeList([255]),
61 111
       this.getClassesList(),
112
+      this.getDeptList2(this.hosId),
62 113
     ])
63 114
       .then((result) => {
64 115
         if (result[0].status == 200) {
@@ -81,12 +132,31 @@ export class HospitalConfigComponent implements OnInit {
81 132
             checked: false,
82 133
           }));
83 134
         }
135
+        if (result[5].status == 200) {
136
+          this.deptList2 = result[5].list;
137
+        }
84 138
         this.getHospitalConfigList(this.hosId).subscribe((res) => {
85 139
           if (res.status == 200) {
86 140
             this.hospitalConfigList = res.list;
87 141
             //创建表单
88 142
             let fbGroup = {};
89 143
             this.hospitalConfigList.forEach((item) => {
144
+              if (
145
+                item.key === "repairSpecimenStatusMinute" ||
146
+                item.key === "repairSpecimenStatusCheckDeptIds"
147
+              ) {
148
+                if (
149
+                  this.hospitalConfigList.filter(
150
+                    (v) => v.key === "repairSpecimenStatus"
151
+                  )[0].value == 1
152
+                ) {
153
+                  item.show = true;
154
+                } else {
155
+                  item.show = false;
156
+                }
157
+              } else {
158
+                item.show = true;
159
+              }
90 160
               if (item.key.includes("phone_num_port")) {
91 161
                 //坐席号码
92 162
                 fbGroup[item.key] = [null];
@@ -96,8 +166,10 @@ export class HospitalConfigComponent implements OnInit {
96 166
                 fbGroup[item.key] = [];
97 167
                 item.required = false;
98 168
               } else {
99
-                fbGroup[item.key] = [null, [Validators.required]];
100
-                item.required = true;
169
+                if(item.show){
170
+                  fbGroup[item.key] = [null, [Validators.required]];
171
+                  item.required = true;
172
+                }
101 173
               }
102 174
             });
103 175
             this.validateForm = this.fb.group(fbGroup);
@@ -143,6 +215,10 @@ export class HospitalConfigComponent implements OnInit {
143 215
                 this.validateForm.controls[config.key].setValue(
144 216
                   this.classesList
145 217
                 );
218
+              } else if (config.key === "repairSpecimenStatusCheckDeptIds") {
219
+                this.validateForm.controls[config.key].setValue(
220
+                  config.value ? config.value.split(",").map(Number) : []
221
+                );
146 222
               } else {
147 223
                 this.validateForm.controls[config.key].setValue(config.value);
148 224
               }
@@ -223,6 +299,25 @@ export class HospitalConfigComponent implements OnInit {
223 299
       .toPromise();
224 300
   }
225 301
   /**
302
+   * 获取检验科室列表
303
+   * @param hosId 院区id
304
+   * @param dept 模糊搜索
305
+   * @returns
306
+   */
307
+  getDeptList2(hosId) {
308
+    let postData = {
309
+      idx: 0,
310
+      sum: 10,
311
+      department: {
312
+        hospital: { id: hosId },
313
+        type: { id: "282" },
314
+      },
315
+    };
316
+    return this.mainService
317
+      .getFetchDataList("data", "department", postData)
318
+      .toPromise();
319
+  }
320
+  /**
226 321
    * 获取组列表
227 322
    * @param hosId 院区id
228 323
    * @returns
@@ -250,13 +345,20 @@ export class HospitalConfigComponent implements OnInit {
250 345
       JSON.stringify(this.hospitalConfigList)
251 346
     );
252 347
     hospitalConfigList.forEach((config) => {
253
-      if (config.key === "rushNoticeShift") {
254
-        config.value = this.validateForm.controls[config.key].value
255
-          .filter((item) => item.checked)
256
-          .map((item) => item.value)
257
-          .toString();
348
+      if (config.show) {
349
+        if (config.key === "rushNoticeShift") {
350
+          config.value = this.validateForm.controls[config.key].value
351
+            .filter((item) => item.checked)
352
+            .map((item) => item.value)
353
+            .toString();
354
+        } else if (config.key === "repairSpecimenStatusCheckDeptIds") {
355
+          config.value =
356
+            this.validateForm.controls[config.key].value.toString();
357
+        } else {
358
+          config.value = this.validateForm.controls[config.key].value;
359
+        }
258 360
       } else {
259
-        config.value = this.validateForm.controls[config.key].value;
361
+        config.value = "";
260 362
       }
261 363
       delete config.required;
262 364
     });