|
@@ -0,0 +1,536 @@
|
|
1
|
+import { Component, OnInit, ViewChild } from "@angular/core";
|
|
2
|
+import { ActivatedRoute } from "@angular/router";
|
|
3
|
+import { NzMessageService } from "ng-zorro-antd/message";
|
|
4
|
+
|
|
5
|
+import { MainService } from "../../services/main.service";
|
|
6
|
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
|
|
7
|
+import { ToolService } from "../../services/tool.service";
|
|
8
|
+
|
|
9
|
+@Component({
|
|
10
|
+ selector: "app-inspect-auto",
|
|
11
|
+ templateUrl: "./inspect-auto.component.html",
|
|
12
|
+ styleUrls: ["./inspect-auto.component.less"],
|
|
13
|
+})
|
|
14
|
+export class InspectAutoComponent implements OnInit {
|
|
15
|
+ constructor(
|
|
16
|
+ private route: ActivatedRoute,
|
|
17
|
+ private mainService: MainService,
|
|
18
|
+ private msg: NzMessageService,
|
|
19
|
+ private tool: ToolService
|
|
20
|
+ ) {}
|
|
21
|
+ @ViewChild("osComponentRef1", {
|
|
22
|
+ read: OverlayScrollbarsComponent,
|
|
23
|
+ static: false,
|
|
24
|
+ })
|
|
25
|
+ osComponentRef1: OverlayScrollbarsComponent;
|
|
26
|
+ @ViewChild("osComponentRef2", {
|
|
27
|
+ read: OverlayScrollbarsComponent,
|
|
28
|
+ static: false,
|
|
29
|
+ })
|
|
30
|
+ osComponentRef2: OverlayScrollbarsComponent;
|
|
31
|
+ ngOnInit() {
|
|
32
|
+ this.hosId = this.tool.getCurrentHospital().id;
|
|
33
|
+ this.coopBtns = this.tool.initCoopBtns(this.route);
|
|
34
|
+ this.getInspectAutoList();
|
|
35
|
+ this.getInspectType();
|
|
36
|
+ this.getLevelOfCare();
|
|
37
|
+ this.getStateOfAnIllness();
|
|
38
|
+ }
|
|
39
|
+ checkedInspectAuto: any = {}; //选中班次
|
|
40
|
+ inspectAutoList: Array<any> = []; //检查自动建单的班次信息
|
|
41
|
+ hosId: any; //当前选择的院区id
|
|
42
|
+
|
|
43
|
+ promptContent: string; //操作提示框提示信息
|
|
44
|
+ ifSuccess: boolean; //操作成功/失败
|
|
45
|
+ promptInfo: string; //操作结果提示信息
|
|
46
|
+ promptModalShow: boolean; //是否展示提示框
|
|
47
|
+
|
|
48
|
+ saveLoading: boolean = false; //批量打印按钮loading状态
|
|
49
|
+
|
|
50
|
+ // 初始化增删改按钮
|
|
51
|
+ coopBtns: any = {};
|
|
52
|
+ // 取消选中状态
|
|
53
|
+ cancelStatus(arr: any[]) {
|
|
54
|
+ arr.forEach((item) => (item.checked = false));
|
|
55
|
+ return arr;
|
|
56
|
+ }
|
|
57
|
+ // 选择急查或者普查
|
|
58
|
+ changeInspect(flag, type) {
|
|
59
|
+ if (!flag) {
|
|
60
|
+ if (type === "urgencyInspect") {
|
|
61
|
+ //急查
|
|
62
|
+ this.inspectTypeList_u = this.cancelStatus(this.inspectTypeList_u);
|
|
63
|
+ this.levelOfCareList_u = this.cancelStatus(this.levelOfCareList_u);
|
|
64
|
+ this.stateOfAnIllnessList_u = this.cancelStatus(
|
|
65
|
+ this.stateOfAnIllnessList_u
|
|
66
|
+ );
|
|
67
|
+ this.inspectType_u = false;
|
|
68
|
+ this.levelOfCare_u = false;
|
|
69
|
+ this.stateOfAnIllness_u = false;
|
|
70
|
+ } else if (type === "ordinaryInspect") {
|
|
71
|
+ //普查
|
|
72
|
+ this.inspectTypeList_o = this.cancelStatus(this.inspectTypeList_o);
|
|
73
|
+ this.levelOfCareList_o = this.cancelStatus(this.levelOfCareList_o);
|
|
74
|
+ this.stateOfAnIllnessList_o = this.cancelStatus(
|
|
75
|
+ this.stateOfAnIllnessList_o
|
|
76
|
+ );
|
|
77
|
+ this.inspectType_o = false;
|
|
78
|
+ this.levelOfCare_o = false;
|
|
79
|
+ this.stateOfAnIllness_o = false;
|
|
80
|
+ }
|
|
81
|
+ }
|
|
82
|
+ }
|
|
83
|
+ /**
|
|
84
|
+ *
|
|
85
|
+ * @param classId 班次Id
|
|
86
|
+ */
|
|
87
|
+ loading2 = false;
|
|
88
|
+ getRules() {
|
|
89
|
+ let postData = {
|
|
90
|
+ idx: 0,
|
|
91
|
+ sum: 9999,
|
|
92
|
+ autoCreateOrderRule: {
|
|
93
|
+ hosId: this.hosId,
|
|
94
|
+ classesId: this.checkedInspectAuto.id, //班次id
|
|
95
|
+ taskTypeId: this.taskTypeId, //任务类型id
|
|
96
|
+ deleted: 0,
|
|
97
|
+ },
|
|
98
|
+ };
|
|
99
|
+ this.loading2 = true;
|
|
100
|
+ this.mainService
|
|
101
|
+ .getFetchDataList("simple/data", "autoCreateOrderRule", postData)
|
|
102
|
+ .subscribe((result) => {
|
|
103
|
+ this.loading2 = false;
|
|
104
|
+ if (result.status == 200) {
|
|
105
|
+ result.list.forEach((item) => {
|
|
106
|
+ if (item.extra1 === "1") {
|
|
107
|
+ //急查
|
|
108
|
+ this.urgencyInspect = true;
|
|
109
|
+ this.inspectType_u = this.inspectTypeList_u.some((v) => {
|
|
110
|
+ if (v.id == item.typeId) {
|
|
111
|
+ v.checked = true;
|
|
112
|
+ }
|
|
113
|
+ return v.id == item.typeId;
|
|
114
|
+ });
|
|
115
|
+ this.levelOfCare_u = this.levelOfCareList_u.some((v) => {
|
|
116
|
+ if (v.id == item.typeId2) {
|
|
117
|
+ v.checked = true;
|
|
118
|
+ }
|
|
119
|
+ return v.id == item.typeId2;
|
|
120
|
+ });
|
|
121
|
+ this.stateOfAnIllness_u = this.stateOfAnIllnessList_u.some(
|
|
122
|
+ (v) => {
|
|
123
|
+ if (v.id == item.typeId3) {
|
|
124
|
+ v.checked = true;
|
|
125
|
+ }
|
|
126
|
+ return v.id == item.typeId3;
|
|
127
|
+ }
|
|
128
|
+ );
|
|
129
|
+ }
|
|
130
|
+ if (item.extra1 === "0") {
|
|
131
|
+ //普查
|
|
132
|
+ this.ordinaryInspect = true;
|
|
133
|
+ this.inspectType_o = this.inspectTypeList_o.some((v) => {
|
|
134
|
+ if (v.id == item.typeId) {
|
|
135
|
+ v.checked = true;
|
|
136
|
+ }
|
|
137
|
+ return v.id == item.typeId;
|
|
138
|
+ });
|
|
139
|
+ this.levelOfCare_o = this.levelOfCareList_o.some((v) => {
|
|
140
|
+ if (v.id == item.typeId2) {
|
|
141
|
+ v.checked = true;
|
|
142
|
+ }
|
|
143
|
+ return v.id == item.typeId2;
|
|
144
|
+ });
|
|
145
|
+ this.stateOfAnIllness_o = this.stateOfAnIllnessList_o.some(
|
|
146
|
+ (v) => {
|
|
147
|
+ if (v.id == item.typeId3) {
|
|
148
|
+ v.checked = true;
|
|
149
|
+ }
|
|
150
|
+ return v.id == item.typeId3;
|
|
151
|
+ }
|
|
152
|
+ );
|
|
153
|
+ }
|
|
154
|
+ });
|
|
155
|
+ }
|
|
156
|
+ });
|
|
157
|
+ }
|
|
158
|
+
|
|
159
|
+ // 任务类型下班次列表
|
|
160
|
+ loading1 = false;
|
|
161
|
+ taskTypeId; //当前选中班次的任务类型ID
|
|
162
|
+ taskTypeName; //当前选中班次的任务类型名称
|
|
163
|
+ getInspectAutoList() {
|
|
164
|
+ let data = {
|
|
165
|
+ idx: 0,
|
|
166
|
+ sum: 1,
|
|
167
|
+ taskType: {
|
|
168
|
+ hosIds: this.hosId,
|
|
169
|
+ associationType: { id: 260 },
|
|
170
|
+ },
|
|
171
|
+ };
|
|
172
|
+ this.loading1 = true;
|
|
173
|
+ this.mainService
|
|
174
|
+ .getFetchDataList("configuration", "taskType", data)
|
|
175
|
+ .subscribe((data1) => {
|
|
176
|
+ this.loading1 = false;
|
|
177
|
+ if (data1.list.length) {
|
|
178
|
+ this.inspectAutoList = data1.list[0].classesIds; //班次信息
|
|
179
|
+ this.taskTypeId = data1.list[0].id;
|
|
180
|
+ this.taskTypeName = data1.list[0].taskName;
|
|
181
|
+ if (Object.keys(this.checkedInspectAuto).length) {
|
|
182
|
+ this.inspectAutoList.forEach((item) => {
|
|
183
|
+ if (item.id == this.checkedInspectAuto.id) {
|
|
184
|
+ this.checkInspectAuto(item);
|
|
185
|
+ }
|
|
186
|
+ });
|
|
187
|
+ } else {
|
|
188
|
+ this.checkInspectAuto(this.inspectAutoList[0]);
|
|
189
|
+ }
|
|
190
|
+ } else {
|
|
191
|
+ this.msg.warning("请配置患者配件业务的任务类型!");
|
|
192
|
+ }
|
|
193
|
+ });
|
|
194
|
+ }
|
|
195
|
+ // 检查类型列表
|
|
196
|
+ inspectTypeList_u = []; //检查类型列表(急查)
|
|
197
|
+ inspectTypeList_o = []; //检查类型列表(普查)
|
|
198
|
+ getInspectType() {
|
|
199
|
+ this.mainService
|
|
200
|
+ .getDictionary("list", "inspect_check_type")
|
|
201
|
+ .subscribe((result) => {
|
|
202
|
+ this.inspectTypeList_u = JSON.parse(JSON.stringify(result));
|
|
203
|
+ this.inspectTypeList_o = JSON.parse(JSON.stringify(result));
|
|
204
|
+ });
|
|
205
|
+ }
|
|
206
|
+ // 护理等级列表
|
|
207
|
+ levelOfCareList_u = []; //班次列表(急查)
|
|
208
|
+ levelOfCareList_o = []; //班次列表(普查)
|
|
209
|
+ getLevelOfCare() {
|
|
210
|
+ this.mainService
|
|
211
|
+ .getDictionary("list", "levelOfCare")
|
|
212
|
+ .subscribe((result) => {
|
|
213
|
+ this.levelOfCareList_u = JSON.parse(JSON.stringify(result));
|
|
214
|
+ this.levelOfCareList_o = JSON.parse(JSON.stringify(result));
|
|
215
|
+ });
|
|
216
|
+ }
|
|
217
|
+ // 病情级别列表
|
|
218
|
+ stateOfAnIllnessList_u = []; //病情级别列表(急查)
|
|
219
|
+ stateOfAnIllnessList_o = []; //病情级别列表(普查)
|
|
220
|
+ getStateOfAnIllness() {
|
|
221
|
+ this.mainService
|
|
222
|
+ .getDictionary("list", "stateOfAnIllness")
|
|
223
|
+ .subscribe((result) => {
|
|
224
|
+ this.stateOfAnIllnessList_u = JSON.parse(JSON.stringify(result));
|
|
225
|
+ this.stateOfAnIllnessList_o = JSON.parse(JSON.stringify(result));
|
|
226
|
+ });
|
|
227
|
+ }
|
|
228
|
+ //选择检查类型
|
|
229
|
+ inspectType_u = false; //是否选择检查类型(急查)
|
|
230
|
+ inspectType_o = false; //是否选择检查类型(普查)
|
|
231
|
+ selectInspectType(ids, type) {
|
|
232
|
+ switch (type) {
|
|
233
|
+ case "urgencyInspect": //急查
|
|
234
|
+ this.inspectType_u = ids.length > 0;
|
|
235
|
+ if (this.inspectType_u) {
|
|
236
|
+ this.inspectTypeList_u = this.cancelStatus(this.inspectTypeList_u);
|
|
237
|
+ ids.forEach((item) => {
|
|
238
|
+ this.inspectTypeList_u.forEach((v) => {
|
|
239
|
+ if (v.id == item) {
|
|
240
|
+ v.checked = true;
|
|
241
|
+ }
|
|
242
|
+ });
|
|
243
|
+ });
|
|
244
|
+ } else {
|
|
245
|
+ this.levelOfCareList_u = this.cancelStatus(this.levelOfCareList_u);
|
|
246
|
+ this.stateOfAnIllnessList_u = this.cancelStatus(
|
|
247
|
+ this.stateOfAnIllnessList_u
|
|
248
|
+ );
|
|
249
|
+ this.inspectType_u = false;
|
|
250
|
+ this.levelOfCare_u = false;
|
|
251
|
+ this.stateOfAnIllness_u = false;
|
|
252
|
+ }
|
|
253
|
+ break;
|
|
254
|
+ case "ordinaryInspect": //普查
|
|
255
|
+ this.inspectType_o = ids.length > 0;
|
|
256
|
+ if (this.inspectType_o) {
|
|
257
|
+ this.inspectTypeList_o = this.cancelStatus(this.inspectTypeList_o);
|
|
258
|
+ ids.forEach((item) => {
|
|
259
|
+ this.inspectTypeList_o.forEach((v) => {
|
|
260
|
+ if (v.id == item) {
|
|
261
|
+ v.checked = true;
|
|
262
|
+ }
|
|
263
|
+ });
|
|
264
|
+ });
|
|
265
|
+ } else {
|
|
266
|
+ this.levelOfCareList_o = this.cancelStatus(this.levelOfCareList_o);
|
|
267
|
+ this.stateOfAnIllnessList_o = this.cancelStatus(
|
|
268
|
+ this.stateOfAnIllnessList_o
|
|
269
|
+ );
|
|
270
|
+ this.inspectType_o = false;
|
|
271
|
+ this.levelOfCare_o = false;
|
|
272
|
+ this.stateOfAnIllness_o = false;
|
|
273
|
+ }
|
|
274
|
+ break;
|
|
275
|
+ }
|
|
276
|
+ }
|
|
277
|
+ //选择护理等级
|
|
278
|
+ levelOfCare_u = false; //是否选择护理等级(急查)
|
|
279
|
+ levelOfCare_o = false; //是否选择护理等级(普查)
|
|
280
|
+ selectLevelOfCare(ids, type) {
|
|
281
|
+ switch (type) {
|
|
282
|
+ case "urgencyInspect": //急查
|
|
283
|
+ this.levelOfCareList_u.forEach((item) => {
|
|
284
|
+ item.checked = false;
|
|
285
|
+ });
|
|
286
|
+ ids.forEach((item) => {
|
|
287
|
+ this.levelOfCareList_u.forEach((v) => {
|
|
288
|
+ if (v.id == item) {
|
|
289
|
+ v.checked = true;
|
|
290
|
+ }
|
|
291
|
+ });
|
|
292
|
+ });
|
|
293
|
+ this.levelOfCare_u = ids.length > 0;
|
|
294
|
+ break;
|
|
295
|
+ case "ordinaryInspect": //普查
|
|
296
|
+ this.levelOfCareList_o.forEach((item) => {
|
|
297
|
+ item.checked = false;
|
|
298
|
+ });
|
|
299
|
+ ids.forEach((item) => {
|
|
300
|
+ this.levelOfCareList_o.forEach((v) => {
|
|
301
|
+ if (v.id == item) {
|
|
302
|
+ v.checked = true;
|
|
303
|
+ }
|
|
304
|
+ });
|
|
305
|
+ });
|
|
306
|
+ this.levelOfCare_o = ids.length > 0;
|
|
307
|
+ break;
|
|
308
|
+ }
|
|
309
|
+ }
|
|
310
|
+ //选择病情级别
|
|
311
|
+ stateOfAnIllness_u = false; //是否选择病情级别(急查)
|
|
312
|
+ stateOfAnIllness_o = false; //是否选择病情级别(普查)
|
|
313
|
+ selectStateOfAnIllness(ids, type) {
|
|
314
|
+ switch (type) {
|
|
315
|
+ case "urgencyInspect": //急查
|
|
316
|
+ this.stateOfAnIllnessList_u.forEach((item) => {
|
|
317
|
+ item.checked = false;
|
|
318
|
+ });
|
|
319
|
+ ids.forEach((item) => {
|
|
320
|
+ this.stateOfAnIllnessList_u.forEach((v) => {
|
|
321
|
+ if (v.id == item) {
|
|
322
|
+ v.checked = true;
|
|
323
|
+ }
|
|
324
|
+ });
|
|
325
|
+ });
|
|
326
|
+ this.stateOfAnIllness_u = ids.length > 0;
|
|
327
|
+ break;
|
|
328
|
+ case "ordinaryInspect": //普查
|
|
329
|
+ this.stateOfAnIllnessList_o.forEach((item) => {
|
|
330
|
+ item.checked = false;
|
|
331
|
+ });
|
|
332
|
+ ids.forEach((item) => {
|
|
333
|
+ this.stateOfAnIllnessList_o.forEach((v) => {
|
|
334
|
+ if (v.id == item) {
|
|
335
|
+ v.checked = true;
|
|
336
|
+ }
|
|
337
|
+ });
|
|
338
|
+ });
|
|
339
|
+ this.stateOfAnIllness_o = ids.length > 0;
|
|
340
|
+ break;
|
|
341
|
+ }
|
|
342
|
+ }
|
|
343
|
+ // 选中班次
|
|
344
|
+ checkInspectAuto(data) {
|
|
345
|
+ this.checkedInspectAuto = data ? data : {};
|
|
346
|
+ this.urgencyInspect = false;
|
|
347
|
+ this.ordinaryInspect = false;
|
|
348
|
+ this.changeInspect(false, "urgencyInspect");
|
|
349
|
+ this.changeInspect(false, "ordinaryInspect");
|
|
350
|
+ this.getRules();
|
|
351
|
+ }
|
|
352
|
+ // 保存
|
|
353
|
+ urgencyInspect = false; //是否选择急查
|
|
354
|
+ ordinaryInspect = false; //是否选择普查
|
|
355
|
+ save() {
|
|
356
|
+ // 规则验证 start
|
|
357
|
+ //没有选择急查或普查
|
|
358
|
+ // if (!this.urgencyInspect && !this.ordinaryInspect) {
|
|
359
|
+ // this.msg.info("没有选择急查或普查,无法保存!");
|
|
360
|
+ // return;
|
|
361
|
+ // }
|
|
362
|
+ // 选择了急查,没有选择普查
|
|
363
|
+ if (this.urgencyInspect && !this.ordinaryInspect) {
|
|
364
|
+ if (!this.inspectType_u) {
|
|
365
|
+ //没有选择检查类型
|
|
366
|
+ this.msg.info("没有选择急查里的检查类型,无法保存!");
|
|
367
|
+ return;
|
|
368
|
+ } else {
|
|
369
|
+ // 选择了检查类型,没有选择护理等级
|
|
370
|
+ if (!this.levelOfCare_u) {
|
|
371
|
+ this.msg.info("没有选择急查里的护理等级,无法保存!");
|
|
372
|
+ return;
|
|
373
|
+ }
|
|
374
|
+ // 选择了检查类型,没有选择病情级别
|
|
375
|
+ if (!this.stateOfAnIllness_u) {
|
|
376
|
+ this.msg.info("没有选择急查里的病情级别,无法保存!");
|
|
377
|
+ return;
|
|
378
|
+ }
|
|
379
|
+ }
|
|
380
|
+ }
|
|
381
|
+ // 选择了普查,没有选择急查
|
|
382
|
+ if (!this.urgencyInspect && this.ordinaryInspect) {
|
|
383
|
+ if (!this.inspectType_o) {
|
|
384
|
+ //没有选择检查类型
|
|
385
|
+ this.msg.info("没有选择普查里的检查类型,无法保存!");
|
|
386
|
+ return;
|
|
387
|
+ } else {
|
|
388
|
+ // 选择了检查类型,没有选择护理等级
|
|
389
|
+ if (!this.levelOfCare_o) {
|
|
390
|
+ this.msg.info("没有选择普查里的护理等级,无法保存!");
|
|
391
|
+ return;
|
|
392
|
+ }
|
|
393
|
+ // 选择了检查类型,没有选择病情级别
|
|
394
|
+ if (!this.stateOfAnIllness_o) {
|
|
395
|
+ this.msg.info("没有选择普查里的病情级别,无法保存!");
|
|
396
|
+ return;
|
|
397
|
+ }
|
|
398
|
+ }
|
|
399
|
+ }
|
|
400
|
+ // 选择了急查和普查
|
|
401
|
+ if (this.urgencyInspect && this.ordinaryInspect) {
|
|
402
|
+ if (this.urgencyInspect) {
|
|
403
|
+ //选择了急查,没有选择检查类型
|
|
404
|
+ if (!this.inspectType_u) {
|
|
405
|
+ this.msg.info("没有选择急查里的检查类型,无法保存!");
|
|
406
|
+ return;
|
|
407
|
+ } else {
|
|
408
|
+ // 选择了检查类型,没有选择护理等级
|
|
409
|
+ if (!this.levelOfCare_u) {
|
|
410
|
+ this.msg.info("没有选择急查里的护理等级,无法保存!");
|
|
411
|
+ return;
|
|
412
|
+ }
|
|
413
|
+ // 选择了检查类型,没有选择病情级别
|
|
414
|
+ if (!this.stateOfAnIllness_u) {
|
|
415
|
+ this.msg.info("没有选择急查里的病情级别,无法保存!");
|
|
416
|
+ return;
|
|
417
|
+ }
|
|
418
|
+ }
|
|
419
|
+ }
|
|
420
|
+ if (this.ordinaryInspect) {
|
|
421
|
+ //选择了普查,没有选择检查类型
|
|
422
|
+ if (!this.inspectType_o) {
|
|
423
|
+ this.msg.info("没有选择普查里的检查类型,无法保存!");
|
|
424
|
+ return;
|
|
425
|
+ } else {
|
|
426
|
+ // 选择了检查类型,没有选择护理等级
|
|
427
|
+ if (!this.levelOfCare_o) {
|
|
428
|
+ this.msg.info("没有选择普查里的护理等级,无法保存!");
|
|
429
|
+ return;
|
|
430
|
+ }
|
|
431
|
+ // 选择了检查类型,没有选择病情级别
|
|
432
|
+ if (!this.stateOfAnIllness_o) {
|
|
433
|
+ this.msg.info("没有选择普查里的病情级别,无法保存!");
|
|
434
|
+ return;
|
|
435
|
+ }
|
|
436
|
+ }
|
|
437
|
+ }
|
|
438
|
+ }
|
|
439
|
+ // 规则验证 end
|
|
440
|
+ let postData = [];
|
|
441
|
+ // 组装数据 start
|
|
442
|
+ if (!this.urgencyInspect && !this.ordinaryInspect) {
|
|
443
|
+ postData = [
|
|
444
|
+ {
|
|
445
|
+ hosId: this.hosId,
|
|
446
|
+ taskTypeId: this.taskTypeId,
|
|
447
|
+ classesId: this.checkedInspectAuto.id,
|
|
448
|
+ deleted: true,
|
|
449
|
+ },
|
|
450
|
+ ];
|
|
451
|
+ } else {
|
|
452
|
+ // 急查数据
|
|
453
|
+ if (this.urgencyInspect) {
|
|
454
|
+ let inspectTypeList_u = this.inspectTypeList_u
|
|
455
|
+ .filter((item) => item.checked)
|
|
456
|
+ .map((item) => item.id);
|
|
457
|
+ let levelOfCareList_u = this.levelOfCareList_u
|
|
458
|
+ .filter((item) => item.checked)
|
|
459
|
+ .map((item) => item.id);
|
|
460
|
+ let stateOfAnIllnessList_u = this.stateOfAnIllnessList_u
|
|
461
|
+ .filter((item) => item.checked)
|
|
462
|
+ .map((item) => item.id);
|
|
463
|
+ // 三层循环,感觉有些傻,无奈后端非要这么传-后端陈肖让我记录的
|
|
464
|
+ inspectTypeList_u.forEach((item) => {
|
|
465
|
+ levelOfCareList_u.forEach((value) => {
|
|
466
|
+ stateOfAnIllnessList_u.forEach((v) => {
|
|
467
|
+ postData.push({
|
|
468
|
+ classesId: this.checkedInspectAuto.id, //班次id
|
|
469
|
+ taskTypeId: this.taskTypeId, //任务类型id
|
|
470
|
+ extra1: 1, //急查1,普查0
|
|
471
|
+ typeId: item, //检查类型id
|
|
472
|
+ typeId2: value, //护理等级id
|
|
473
|
+ typeId3: v, //病情级别id
|
|
474
|
+ hosId: this.hosId, //院区id
|
|
475
|
+ deleted: false, //删除true,显示false
|
|
476
|
+ });
|
|
477
|
+ });
|
|
478
|
+ });
|
|
479
|
+ });
|
|
480
|
+ }
|
|
481
|
+ // 普查数据
|
|
482
|
+ if (this.ordinaryInspect) {
|
|
483
|
+ let inspectTypeList_o = this.inspectTypeList_o
|
|
484
|
+ .filter((item) => item.checked)
|
|
485
|
+ .map((item) => item.id);
|
|
486
|
+ let levelOfCareList_o = this.levelOfCareList_o
|
|
487
|
+ .filter((item) => item.checked)
|
|
488
|
+ .map((item) => item.id);
|
|
489
|
+ let stateOfAnIllnessList_o = this.stateOfAnIllnessList_o
|
|
490
|
+ .filter((item) => item.checked)
|
|
491
|
+ .map((item) => item.id);
|
|
492
|
+ // 三层循环,感觉有些傻,无奈后端非要这么传-后端陈肖让我记录的
|
|
493
|
+ inspectTypeList_o.forEach((item) => {
|
|
494
|
+ levelOfCareList_o.forEach((value) => {
|
|
495
|
+ stateOfAnIllnessList_o.forEach((v) => {
|
|
496
|
+ postData.push({
|
|
497
|
+ classesId: this.checkedInspectAuto.id, //班次id
|
|
498
|
+ taskTypeId: this.taskTypeId, //任务类型id
|
|
499
|
+ extra1: 0, //急查1,普查0
|
|
500
|
+ typeId: item, //检查类型id
|
|
501
|
+ typeId2: value, //护理等级id
|
|
502
|
+ typeId3: v, //病情级别id
|
|
503
|
+ hosId: this.hosId, //院区id
|
|
504
|
+ deleted: false, //删除true,显示false
|
|
505
|
+ });
|
|
506
|
+ });
|
|
507
|
+ });
|
|
508
|
+ });
|
|
509
|
+ }
|
|
510
|
+ }
|
|
511
|
+ // 组装数据 end
|
|
512
|
+ this.saveLoading = true;
|
|
513
|
+ this.mainService
|
|
514
|
+ .simplePost("addListData", "autoCreateOrderRule", postData)
|
|
515
|
+ .subscribe((data) => {
|
|
516
|
+ this.saveLoading = false;
|
|
517
|
+ if (data.status == 200) {
|
|
518
|
+ this.showPromptModal("保存", true, "");
|
|
519
|
+ } else {
|
|
520
|
+ this.showPromptModal("保存", false, data.msg);
|
|
521
|
+ }
|
|
522
|
+ });
|
|
523
|
+ }
|
|
524
|
+ // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
|
|
525
|
+ showPromptModal(con, success, promptInfo?) {
|
|
526
|
+ this.promptModalShow = false;
|
|
527
|
+ this.promptContent = con;
|
|
528
|
+ this.ifSuccess = success;
|
|
529
|
+ this.promptInfo = promptInfo;
|
|
530
|
+ setTimeout(() => {
|
|
531
|
+ this.promptModalShow = true;
|
|
532
|
+ this.getInspectAutoList();
|
|
533
|
+ this.getRules();
|
|
534
|
+ }, 100);
|
|
535
|
+ }
|
|
536
|
+}
|