|
@@ -63,100 +63,54 @@ export class InspectionExecuteComponent implements OnInit {
|
63
|
63
|
// 初始化增删改按钮
|
64
|
64
|
coopBtns: any = {};
|
65
|
65
|
|
66
|
|
- // 批量关联科室
|
67
|
|
- inspectionAddressDepartmentPromptModalShow = false; //标本历史记录弹窗开关
|
68
|
|
- showInspectionAddressDepartment() {
|
69
|
|
- this.inspectionAddressDepartmentPromptModalShow = true;
|
70
|
|
- }
|
71
|
|
- // 关闭弹窗
|
72
|
|
- closeModelInspectionAddressDepartment(e) {
|
73
|
|
- this.inspectionAddressDepartmentPromptModalShow = JSON.parse(e).show;
|
74
|
|
- }
|
75
|
|
- // 确认弹窗
|
76
|
|
- checkedDepIdsModel = [];
|
77
|
|
- confirmModelInspectionAddressDepartment(checkedDepIds) {
|
78
|
|
- this.inspectionAddressDepartmentPromptModalShow = true;
|
79
|
|
- this.checkedDepIdsModel = checkedDepIds;
|
80
|
|
- console.log(checkedDepIds)
|
81
|
|
- this.showInspectionAddressTag();
|
82
|
|
- }
|
83
|
|
-
|
84
|
|
- // 批量关联科室-标签
|
85
|
|
- inspectionAddressTagPromptModalShow = false; //标本历史记录弹窗开关
|
86
|
|
- showInspectionAddressTag() {
|
87
|
|
- this.inspectionAddressTagPromptModalShow = true;
|
|
66
|
+ // 派单给人
|
|
67
|
+ inspectionExecuteAssignPromptModalShow = false;
|
|
68
|
+ showInspectionExecuteAssign(data?) {
|
|
69
|
+ this.coopData = data;
|
|
70
|
+ this.inspectionExecuteAssignPromptModalShow = true;
|
88
|
71
|
}
|
89
|
72
|
// 关闭弹窗
|
90
|
|
- closeModelInspectionAddressTag(e) {
|
91
|
|
- this.inspectionAddressTagPromptModalShow = JSON.parse(e).show;
|
|
73
|
+ closeModelInspectionExecuteAssign(e) {
|
|
74
|
+ this.inspectionExecuteAssignPromptModalShow = JSON.parse(e).show;
|
92
|
75
|
}
|
93
|
76
|
// 确认弹窗
|
94
|
77
|
maskFlag: any = false;
|
95
|
|
- confirmModelInspectionAddressTag(tags) {
|
|
78
|
+ confirmModelInspectionExecuteAssign(userId) {
|
96
|
79
|
this.maskFlag = this.message.loading("正在加载中..", {
|
97
|
80
|
nzDuration: 0,
|
98
|
81
|
}).messageId;
|
99
|
|
- this.inspectionAddressTagPromptModalShow = true;
|
100
|
|
- console.log(this.checkedDepIdsModel, tags);
|
|
82
|
+ this.inspectionExecuteAssignPromptModalShow = true;
|
|
83
|
+ console.log(userId);
|
101
|
84
|
let postData:any = {
|
102
|
|
- deptIds: this.checkedDepIdsModel.toString(),
|
103
|
|
- hosId: this.currentHospital.id,
|
104
|
|
- tagIds: tags.toString(),
|
|
85
|
+ taskIds: this.coopData ? this.coopData.id.toString() : this.checkedDepIds.toString(),
|
|
86
|
+ userId,
|
105
|
87
|
};
|
106
|
88
|
console.log(postData);
|
107
|
89
|
this.btnLoading = true;
|
108
|
90
|
this.mainService
|
109
|
|
- .inspectionPost("batchBindFormNode", postData)
|
|
91
|
+ .inspectionPost("batchAssignTask", postData)
|
110
|
92
|
.subscribe((result) => {
|
111
|
93
|
this.message.remove(this.maskFlag);
|
112
|
94
|
this.maskFlag = false;
|
113
|
95
|
this.btnLoading = false;
|
114
|
96
|
if (result.status == 200) {
|
115
|
|
- this.inspectionAddressDepartmentPromptModalShow = false;
|
116
|
|
- this.inspectionAddressTagPromptModalShow = false;
|
|
97
|
+ this.inspectionExecuteAssignPromptModalShow = false;
|
117
|
98
|
this.showPromptModal('操作', true, '');
|
118
|
|
- } else if (result.status == 501) {
|
119
|
|
- this.inspectionAddressDepartmentPromptModalShow = false;
|
120
|
|
- this.inspectionAddressTagPromptModalShow = false;
|
121
|
|
- this.showPromptModal('操作', true, result.msg);
|
122
|
99
|
} else {
|
123
|
100
|
this.showPromptModal('操作', false, result.msg);
|
124
|
101
|
}
|
125
|
102
|
});
|
126
|
103
|
}
|
127
|
104
|
|
128
|
|
- // 打印
|
129
|
|
- codes = []; //二维码
|
130
|
|
- printLoading: boolean = false; //批量打印按钮loading状态
|
131
|
|
- print(e, batch, id?) {
|
132
|
|
- e.stopPropagation();
|
133
|
|
- this.printLoading = true;
|
134
|
|
- this.mainService
|
135
|
|
- .inspectionPost("getNodeQrCode", batch ? { nodeIds: this.checkedDepIds.toString() } : [id])
|
136
|
|
- .subscribe((data) => {
|
137
|
|
- this.codes = data.data;
|
138
|
|
- this.printLoading = false;
|
139
|
|
- setTimeout(() => {
|
140
|
|
- const printContent = document.getElementById("report");
|
141
|
|
- const WindowPrt = window.open("", "", "width=700,height=900");
|
142
|
|
- WindowPrt.document.write(printContent.innerHTML);
|
143
|
|
- WindowPrt.document.close();
|
144
|
|
- WindowPrt.focus();
|
145
|
|
- WindowPrt.print();
|
146
|
|
- WindowPrt.close();
|
147
|
|
- }, 100);
|
148
|
|
- });
|
149
|
|
- }
|
150
|
|
-
|
151
|
105
|
// 选中表格单列
|
152
|
106
|
mapOfCheckedId: { [key: string]: boolean } = {};
|
153
|
|
- checkedDepIds = []; //已选中单列id
|
|
107
|
+ checkedDepIds:any[] = []; //已选中单列id
|
154
|
108
|
refreshStatus(): void {
|
155
|
109
|
let listOfData = this.listOfData;
|
156
|
110
|
this.isAllDisplayDataChecked = listOfData.every(
|
157
|
111
|
(item) => this.mapOfCheckedId[item.id]
|
158
|
112
|
);
|
159
|
|
- let arr = [];
|
|
113
|
+ let arr:any[] = [];
|
160
|
114
|
for (var k in this.mapOfCheckedId) {
|
161
|
115
|
if (this.mapOfCheckedId[k]) {
|
162
|
116
|
arr.push(Number(k));
|
|
@@ -348,22 +302,6 @@ export class InspectionExecuteComponent implements OnInit {
|
348
|
302
|
this.showPromptModal(this.tipsMsg2, false, data.msg);
|
349
|
303
|
}
|
350
|
304
|
});
|
351
|
|
- } else if (this.confirmDelType === "resetList") {
|
352
|
|
- //批量重置
|
353
|
|
- let postData = {
|
354
|
|
- nodeIds: this.checkedDepIds.toString(),
|
355
|
|
- }
|
356
|
|
- this.mainService
|
357
|
|
- .inspectionPost("batchResetNodeCode", postData)
|
358
|
|
- .subscribe((data) => {
|
359
|
|
- this.btnLoading = false;
|
360
|
|
- this.delModal = false;
|
361
|
|
- if (data.status == 200) {
|
362
|
|
- this.showPromptModal(this.tipsMsg2, true, "");
|
363
|
|
- } else {
|
364
|
|
- this.showPromptModal(this.tipsMsg2, false, data.msg);
|
365
|
|
- }
|
366
|
|
- });
|
367
|
305
|
}
|
368
|
306
|
}
|
369
|
307
|
}
|