|
@@ -28,6 +28,7 @@ export class ConfigurationQuickComponent implements OnInit {
|
28
|
28
|
|
29
|
29
|
currentHospital:any;
|
30
|
30
|
malfunctionData:any = [];
|
|
31
|
+ malfunctionInspectData:any = [];
|
31
|
32
|
allUserGroup:any = [];
|
32
|
33
|
userData:any = [];
|
33
|
34
|
|
|
@@ -37,6 +38,8 @@ export class ConfigurationQuickComponent implements OnInit {
|
37
|
38
|
this.changeCommonInpSubject.pipe(debounceTime(500)).subscribe((v) => {
|
38
|
39
|
if(v[0] === 'taskType'){
|
39
|
40
|
this.getTaskTypeList(v[1]);
|
|
41
|
+ }else if(v[0] === 'taskTypeInspect'){
|
|
42
|
+ this.getTaskTypeInspectList(v[1]);
|
40
|
43
|
}
|
41
|
44
|
});
|
42
|
45
|
|
|
@@ -48,6 +51,7 @@ export class ConfigurationQuickComponent implements OnInit {
|
48
|
51
|
this.currentHospital = this.tool.getCurrentHospital();
|
49
|
52
|
this.getCommonFaultsList();
|
50
|
53
|
this.getTaskTypeList();
|
|
54
|
+ this.getTaskTypeInspectList();
|
51
|
55
|
this.getPagePermissionIcon();
|
52
|
56
|
this.getPagePermissionBussType();
|
53
|
57
|
this.getPagePermissionQuickOperation();
|
|
@@ -72,7 +76,7 @@ export class ConfigurationQuickComponent implements OnInit {
|
72
|
76
|
this.changeCommonInpSubject.next([type, e]);
|
73
|
77
|
}
|
74
|
78
|
|
75
|
|
- // 获取故障现象数据
|
|
79
|
+ // 获取任务类型数据-标本,其他,万能
|
76
|
80
|
isLoading:boolean = false;
|
77
|
81
|
getTaskTypeList(keyWord?){
|
78
|
82
|
let postData = {
|
|
@@ -94,6 +98,27 @@ export class ConfigurationQuickComponent implements OnInit {
|
94
|
98
|
})
|
95
|
99
|
}
|
96
|
100
|
|
|
101
|
+ // 获取任务类型数据-陪检
|
|
102
|
+ getTaskTypeInspectList(keyWord?){
|
|
103
|
+ let postData = {
|
|
104
|
+ idx: 0,
|
|
105
|
+ sum: 9999,
|
|
106
|
+ taskType: {
|
|
107
|
+ taskName: keyWord,
|
|
108
|
+ hosIds: this.hosId,
|
|
109
|
+ assTypeValues: 'inspect',
|
|
110
|
+ simpleQuery: true,
|
|
111
|
+ },
|
|
112
|
+ };
|
|
113
|
+ this.isLoading = true;
|
|
114
|
+ this.mainService.getFetchDataList('configuration', "taskType", postData).subscribe(data => {
|
|
115
|
+ this.isLoading = false;
|
|
116
|
+ if (data.status == 200) {
|
|
117
|
+ this.malfunctionInspectData = data.list || [];
|
|
118
|
+ }
|
|
119
|
+ })
|
|
120
|
+ }
|
|
121
|
+
|
97
|
122
|
// 获取字典数据-图标名称
|
98
|
123
|
pagePermissionIconList: any[] = [];
|
99
|
124
|
getPagePermissionIcon() {
|
|
@@ -135,15 +160,23 @@ export class ConfigurationQuickComponent implements OnInit {
|
135
|
160
|
console.log(e);
|
136
|
161
|
this.validatePriorityForm.controls.quickOperation.setValue(null);
|
137
|
162
|
this.validatePriorityForm.controls.taskTypeIds.setValue([]);
|
|
163
|
+ this.validatePriorityForm.controls.taskTypeInspectIds.setValue(null);
|
138
|
164
|
this.validatePriorityForm.controls.urgentIds.setValue(this.gdEmergencyList.map(v => {v.checked = false;return v;}));
|
139
|
165
|
|
140
|
166
|
if(e === 'service'){
|
141
|
167
|
this.requiredChange('quickOperation', true);
|
142
|
168
|
this.requiredChange('taskTypeIds', false);
|
|
169
|
+ this.requiredChange('taskTypeInspectIds', false);
|
143
|
170
|
this.requiredChange('urgentIds', false);
|
144
|
171
|
}else if(e === 'goods'){
|
145
|
172
|
this.requiredChange('quickOperation', false);
|
146
|
173
|
this.requiredChange('taskTypeIds', true);
|
|
174
|
+ this.requiredChange('taskTypeInspectIds', false);
|
|
175
|
+ this.requiredChange('urgentIds', false);
|
|
176
|
+ }else if(e === 'inspect'){
|
|
177
|
+ this.requiredChange('quickOperation', false);
|
|
178
|
+ this.requiredChange('taskTypeIds', false);
|
|
179
|
+ this.requiredChange('taskTypeInspectIds', true);
|
147
|
180
|
this.requiredChange('urgentIds', false);
|
148
|
181
|
}
|
149
|
182
|
}
|
|
@@ -180,14 +213,20 @@ export class ConfigurationQuickComponent implements OnInit {
|
180
|
213
|
this.coopData = data;
|
181
|
214
|
|
182
|
215
|
this.changeBussType(data.bussType.value);
|
183
|
|
- data.taskTypeIds && this.changeTaskTypeIds(data.taskTypeIds.split(',').map(v => +v));
|
|
216
|
+ if(data.bussType.value === 'goods'){
|
|
217
|
+ data.taskTypeIds && this.changeTaskTypeIds(data.taskTypeIds.split(',').map(v => +v));
|
|
218
|
+ }
|
184
|
219
|
|
185
|
220
|
this.validatePriorityForm.controls.orders.setValue(data.orders);
|
186
|
221
|
this.validatePriorityForm.controls.icon.setValue(data.icon.id);
|
187
|
222
|
this.validatePriorityForm.controls.name.setValue(data.name);
|
188
|
223
|
this.validatePriorityForm.controls.bussType.setValue(data.bussType.value);
|
189
|
224
|
data.quickOperation && this.validatePriorityForm.controls.quickOperation.setValue(data.quickOperation.id);
|
190
|
|
- data.taskTypeIds && this.validatePriorityForm.controls.taskTypeIds.setValue(data.taskTypeIds.split(',').map(v => +v));
|
|
225
|
+ if(data.bussType.value === 'goods'){
|
|
226
|
+ data.taskTypeIds && this.validatePriorityForm.controls.taskTypeIds.setValue(data.taskTypeIds.split(',').map(v => +v));
|
|
227
|
+ }else if(data.bussType.value === 'inspect'){
|
|
228
|
+ data.taskTypeIds && this.validatePriorityForm.controls.taskTypeInspectIds.setValue(+data.taskTypeIds);
|
|
229
|
+ }
|
191
|
230
|
if(data.urgentIds){
|
192
|
231
|
let ids = data.urgentIds.split(',').map(v => +v);
|
193
|
232
|
let urgentIds = this.gdEmergencyList.map(v => {
|
|
@@ -212,6 +251,12 @@ export class ConfigurationQuickComponent implements OnInit {
|
212
|
251
|
console.log(this.validatePriorityForm.value);
|
213
|
252
|
this.btnLoading = true;
|
214
|
253
|
let postData:any = {};
|
|
254
|
+ let taskTypeIds;
|
|
255
|
+ if(this.validatePriorityForm.value.bussType === 'goods'){
|
|
256
|
+ taskTypeIds = this.validatePriorityForm.value.taskTypeIds.length ? this.validatePriorityForm.value.taskTypeIds.toString() : undefined
|
|
257
|
+ }else if(this.validatePriorityForm.value.bussType === 'inspect'){
|
|
258
|
+ taskTypeIds = this.validatePriorityForm.value.taskTypeInspectIds ? this.validatePriorityForm.value.taskTypeInspectIds.toString() : undefined
|
|
259
|
+ }
|
215
|
260
|
if (this.add) {
|
216
|
261
|
//增加
|
217
|
262
|
postData = {
|
|
@@ -221,7 +266,7 @@ export class ConfigurationQuickComponent implements OnInit {
|
221
|
266
|
name: this.validatePriorityForm.value.name,
|
222
|
267
|
bussType: this.validatePriorityForm.value.bussType ? this.pagePermissionBussTypeList.find(v => v.value === this.validatePriorityForm.value.bussType) : undefined,
|
223
|
268
|
quickOperation: this.validatePriorityForm.value.quickOperation ? { id: this.validatePriorityForm.value.quickOperation } : undefined,
|
224
|
|
- taskTypeIds: this.validatePriorityForm.value.taskTypeIds.length ? this.validatePriorityForm.value.taskTypeIds.toString() : undefined,
|
|
269
|
+ taskTypeIds,
|
225
|
270
|
urgentIds: this.validatePriorityForm.value.urgentIds.length ? this.validatePriorityForm.value.urgentIds.filter(v => v.checked).map(v => v.value).toString() : undefined,
|
226
|
271
|
active: this.validatePriorityForm.value.active,
|
227
|
272
|
};
|
|
@@ -234,7 +279,7 @@ export class ConfigurationQuickComponent implements OnInit {
|
234
|
279
|
name: this.validatePriorityForm.value.name,
|
235
|
280
|
bussType: this.validatePriorityForm.value.bussType ? this.pagePermissionBussTypeList.find(v => v.value === this.validatePriorityForm.value.bussType) : undefined,
|
236
|
281
|
quickOperation: this.validatePriorityForm.value.quickOperation ? { id: this.validatePriorityForm.value.quickOperation } : undefined,
|
237
|
|
- taskTypeIds: this.validatePriorityForm.value.taskTypeIds.length ? this.validatePriorityForm.value.taskTypeIds.toString() : undefined,
|
|
282
|
+ taskTypeIds,
|
238
|
283
|
urgentIds: this.validatePriorityForm.value.urgentIds.length ? this.validatePriorityForm.value.urgentIds.filter(v => v.checked).map(v => v.value).toString() : undefined,
|
239
|
284
|
active: this.validatePriorityForm.value.active,
|
240
|
285
|
};
|
|
@@ -268,7 +313,8 @@ export class ConfigurationQuickComponent implements OnInit {
|
268
|
313
|
name: [null, [Validators.required]],//按钮名称
|
269
|
314
|
bussType: [null, [Validators.required]],//关联业务
|
270
|
315
|
quickOperation: [null, [Validators.required]],//快捷操作
|
271
|
|
- taskTypeIds: [[], [Validators.required]],//关联任务类型
|
|
316
|
+ taskTypeIds: [[], [Validators.required]],//关联任务类型-标本,其他,万能
|
|
317
|
+ taskTypeInspectIds: [null, [Validators.required]],//关联任务类型-陪检
|
272
|
318
|
urgentIds: [this.gdEmergencyList.map(v => {v.checked = false;return v;}), [Validators.required]],//是否显示标本数量
|
273
|
319
|
active: [0, [Validators.required]],//是否启用
|
274
|
320
|
});
|