|
@@ -27,15 +27,19 @@ export class HospitalConfigComponent implements OnInit {
|
27
|
27
|
hospitalConfigList = []; //院区系统配置列表
|
28
|
28
|
roleList = []; //角色列表
|
29
|
29
|
taskTypeList = []; //任务类型列表
|
|
30
|
+ allTaskTypeList = []; //任务类型列表
|
30
|
31
|
deptList = []; //科室列表
|
31
|
32
|
deptList2 = []; //科室列表
|
32
|
33
|
groupList = []; //组列表
|
33
|
34
|
onSearchSubject = new Subject(); //搜索防抖
|
34
|
35
|
onSearchInspectionDepartmentScopeSubject = new Subject(); //搜索防抖
|
|
36
|
+ onSearchNucleicAcidPrintingTaskTypeSubject = new Subject(); //搜索防抖
|
35
|
37
|
coopBtns: any = {};
|
36
|
38
|
repairSpecimenStatus = "0"; //是否执行标本验证机制
|
37
|
39
|
repairSpecimenStatusMinute = 0; //验证时间
|
38
|
40
|
repairSpecimenStatusCheckDeptIds = []; //验证检验科范围
|
|
41
|
+ allowNucleicAcidPrinting = "0"; //是否允许核酸打印
|
|
42
|
+ nucleicAcidPrintingTaskType = []; //核酸打印任务类型
|
39
|
43
|
formatterDollar = (value) => Number(value);
|
40
|
44
|
constructor(
|
41
|
45
|
private mainService: MainService,
|
|
@@ -67,6 +71,15 @@ export class HospitalConfigComponent implements OnInit {
|
67
|
71
|
}
|
68
|
72
|
});
|
69
|
73
|
});
|
|
74
|
+ // liao
|
|
75
|
+ this.onSearchNucleicAcidPrintingTaskTypeSubject.pipe(debounceTime(500)).subscribe((v) => {
|
|
76
|
+ this.getTaskTypeList(undefined, v).then((result) => {
|
|
77
|
+ this.searchLoading = false;
|
|
78
|
+ if (result.status == 200) {
|
|
79
|
+ this.allTaskTypeList = result.list;
|
|
80
|
+ }
|
|
81
|
+ });
|
|
82
|
+ });
|
70
|
83
|
this.coopBtns = this.tool.initCoopBtns(this.route);
|
71
|
84
|
this.getInit();
|
72
|
85
|
}
|
|
@@ -114,6 +127,37 @@ export class HospitalConfigComponent implements OnInit {
|
114
|
127
|
});
|
115
|
128
|
}
|
116
|
129
|
}
|
|
130
|
+ // 选择是否允许核酸打印
|
|
131
|
+ changeAllowNucleicAcidPrinting(e) {
|
|
132
|
+ if (e == 1) {
|
|
133
|
+ this.validateForm.addControl(
|
|
134
|
+ "nucleicAcidPrintingTaskType",
|
|
135
|
+ new FormControl(null, Validators.required)
|
|
136
|
+ );
|
|
137
|
+ //赋值
|
|
138
|
+ this.hospitalConfigList.forEach((config) => {
|
|
139
|
+ if (
|
|
140
|
+ config.key === "nucleicAcidPrintingTaskType"
|
|
141
|
+ ) {
|
|
142
|
+ config.show = true;
|
|
143
|
+ }
|
|
144
|
+ if (config.key === "nucleicAcidPrintingTaskType") {
|
|
145
|
+ this.validateForm.controls[config.key].setValue(
|
|
146
|
+ config.value ? config.value.split(",").map(Number) : []
|
|
147
|
+ );
|
|
148
|
+ }
|
|
149
|
+ });
|
|
150
|
+ } else {
|
|
151
|
+ this.validateForm.removeControl("nucleicAcidPrintingTaskType");
|
|
152
|
+ this.hospitalConfigList.forEach((v) => {
|
|
153
|
+ if (
|
|
154
|
+ v.key === "nucleicAcidPrintingTaskType"
|
|
155
|
+ ) {
|
|
156
|
+ v.show = false;
|
|
157
|
+ }
|
|
158
|
+ });
|
|
159
|
+ }
|
|
160
|
+ }
|
117
|
161
|
//初始化请求数据
|
118
|
162
|
getInit() {
|
119
|
163
|
this.isLoading = true;
|
|
@@ -124,6 +168,7 @@ export class HospitalConfigComponent implements OnInit {
|
124
|
168
|
this.getTaskTypeList([255]),
|
125
|
169
|
this.getClassesList(),
|
126
|
170
|
this.getDeptList2(this.hosId),
|
|
171
|
+ this.getTaskTypeList(),
|
127
|
172
|
])
|
128
|
173
|
.then((result) => {
|
129
|
174
|
if (result[0].status == 200) {
|
|
@@ -149,6 +194,9 @@ export class HospitalConfigComponent implements OnInit {
|
149
|
194
|
if (result[5].status == 200) {
|
150
|
195
|
this.deptList2 = result[5].list;
|
151
|
196
|
}
|
|
197
|
+ if (result[6].status == 200) {
|
|
198
|
+ this.allTaskTypeList = result[6].list;
|
|
199
|
+ }
|
152
|
200
|
this.getHospitalConfigList(this.hosId).subscribe((res) => {
|
153
|
201
|
if (res.status == 200) {
|
154
|
202
|
this.hospitalConfigList = res.list;
|
|
@@ -171,6 +219,21 @@ export class HospitalConfigComponent implements OnInit {
|
171
|
219
|
} else {
|
172
|
220
|
item.show = true;
|
173
|
221
|
}
|
|
222
|
+ if (
|
|
223
|
+ item.key === "nucleicAcidPrintingTaskType"
|
|
224
|
+ ) {
|
|
225
|
+ if (
|
|
226
|
+ this.hospitalConfigList.filter(
|
|
227
|
+ (v) => v.key === "allowNucleicAcidPrinting"
|
|
228
|
+ )[0].value == 1
|
|
229
|
+ ) {
|
|
230
|
+ item.show = true;
|
|
231
|
+ } else {
|
|
232
|
+ item.show = false;
|
|
233
|
+ }
|
|
234
|
+ } else {
|
|
235
|
+ item.show = true;
|
|
236
|
+ }
|
174
|
237
|
if (item.key.includes("phone_num_port")) {
|
175
|
238
|
//坐席号码
|
176
|
239
|
fbGroup[item.key] = [null];
|
|
@@ -251,6 +314,8 @@ export class HospitalConfigComponent implements OnInit {
|
251
|
314
|
}
|
252
|
315
|
})
|
253
|
316
|
this.validateForm.controls[config.key].setValue(arr);
|
|
317
|
+ } else if (config.key === "nucleicAcidPrintingTaskType") {
|
|
318
|
+ this.validateForm.controls[config.key].setValue(parseInt(config.value));
|
254
|
319
|
} else {
|
255
|
320
|
this.validateForm.controls[config.key].setValue(config.value);
|
256
|
321
|
}
|
|
@@ -296,12 +361,13 @@ export class HospitalConfigComponent implements OnInit {
|
296
|
361
|
.toPromise();
|
297
|
362
|
}
|
298
|
363
|
// 获取任务类型列表(患者其他服务)
|
299
|
|
- getTaskTypeList(associationTypeIds?) {
|
|
364
|
+ getTaskTypeList(associationTypeIds?,keyword?) {
|
300
|
365
|
let postData: any = {
|
301
|
366
|
idx: 0,
|
302
|
367
|
sum: 999,
|
303
|
368
|
taskType: {
|
304
|
369
|
hosIds: this.hosId,
|
|
370
|
+ taskName: keyword,
|
305
|
371
|
simpleQuery: true,
|
306
|
372
|
},
|
307
|
373
|
};
|
|
@@ -374,6 +440,12 @@ export class HospitalConfigComponent implements OnInit {
|
374
|
440
|
this.onSearchInspectionDepartmentScopeSubject.next(e);
|
375
|
441
|
}
|
376
|
442
|
|
|
443
|
+ //核酸打印任务类型
|
|
444
|
+ onSearchNucleicAcidPrintingTaskType(e){
|
|
445
|
+ this.searchLoading = true;
|
|
446
|
+ this.onSearchNucleicAcidPrintingTaskTypeSubject.next(e);
|
|
447
|
+ }
|
|
448
|
+
|
377
|
449
|
// 保存
|
378
|
450
|
submitForm(): void {
|
379
|
451
|
for (const i in this.validateForm.controls) {
|
|
@@ -394,6 +466,9 @@ export class HospitalConfigComponent implements OnInit {
|
394
|
466
|
} else if (config.key === "repairSpecimenStatusCheckDeptIds") {
|
395
|
467
|
config.value =
|
396
|
468
|
this.validateForm.controls[config.key].value.toString();
|
|
469
|
+ } else if (config.key === "nucleicAcidPrintingTaskType") {
|
|
470
|
+ config.value =
|
|
471
|
+ this.validateForm.controls[config.key].value.toString();
|
397
|
472
|
} else {
|
398
|
473
|
config.value = this.validateForm.controls[config.key].value;
|
399
|
474
|
}
|