|
@@ -22,16 +22,20 @@ export class ConfigurationPriorityComponent implements OnInit {
|
22
|
22
|
) {}
|
23
|
23
|
|
24
|
24
|
coopData: any = {}; //当前操作列
|
|
25
|
+ currentHospital; //当前院区
|
25
|
26
|
|
26
|
27
|
formatterMinute = (value: number) => `${value} 分钟`;
|
27
|
28
|
parserMinute = (value: string) => value.replace(' 分钟', '');
|
28
|
29
|
|
29
|
30
|
ngOnInit() {
|
|
31
|
+ this.currentHospital = this.tool.getCurrentHospital();
|
30
|
32
|
// 优先级
|
31
|
33
|
setTimeout(() => {
|
32
|
34
|
this.tablePriorityHeight = document.querySelector('#priorityTable').clientHeight - document.querySelector('#priorityTable .list-template__top').clientHeight - 8 - document.querySelector('#priorityTable .thead').clientHeight;
|
33
|
35
|
}, 0)
|
34
|
36
|
this.getPriorityList();
|
|
37
|
+ this.getClassList(1);
|
|
38
|
+ this.getClassList(2);
|
35
|
39
|
}
|
36
|
40
|
|
37
|
41
|
// 新增优先级弹框
|
|
@@ -61,6 +65,8 @@ export class ConfigurationPriorityComponent implements OnInit {
|
61
|
65
|
this.validatePriorityForm.controls.orders.setValue(data.orders);
|
62
|
66
|
this.validatePriorityForm.controls.responseTime.setValue(data.responseTime);
|
63
|
67
|
this.validatePriorityForm.controls.handleTime.setValue(data.handleTime);
|
|
68
|
+ this.validatePriorityForm.controls.holidayClassId.setValue(data.holidayClassId);
|
|
69
|
+ this.validatePriorityForm.controls.workdayClassId.setValue(data.workdayClassId);
|
64
|
70
|
}
|
65
|
71
|
|
66
|
72
|
// 新增/编辑表单提交
|
|
@@ -85,6 +91,8 @@ export class ConfigurationPriorityComponent implements OnInit {
|
85
|
91
|
orders: this.validatePriorityForm.value.orders,
|
86
|
92
|
responseTime: this.validatePriorityForm.value.responseTime,
|
87
|
93
|
handleTime: this.validatePriorityForm.value.handleTime,
|
|
94
|
+ holidayClassId: this.validatePriorityForm.value.holidayClassId,
|
|
95
|
+ workdayClassId: this.validatePriorityForm.value.workdayClassId,
|
88
|
96
|
// }
|
89
|
97
|
};
|
90
|
98
|
} else {
|
|
@@ -97,6 +105,8 @@ export class ConfigurationPriorityComponent implements OnInit {
|
97
|
105
|
orders: this.validatePriorityForm.value.orders,
|
98
|
106
|
responseTime: this.validatePriorityForm.value.responseTime,
|
99
|
107
|
handleTime: this.validatePriorityForm.value.handleTime,
|
|
108
|
+ holidayClassId: this.validatePriorityForm.value.holidayClassId,
|
|
109
|
+ workdayClassId: this.validatePriorityForm.value.workdayClassId,
|
100
|
110
|
}
|
101
|
111
|
// }
|
102
|
112
|
};
|
|
@@ -128,6 +138,8 @@ export class ConfigurationPriorityComponent implements OnInit {
|
128
|
138
|
orders: [null, [Validators.required]],//排序号
|
129
|
139
|
responseTime: [0, [Validators.required]],//响应时间
|
130
|
140
|
handleTime: [0, [Validators.required]],//解决时间
|
|
141
|
+ holidayClassId: [null],//节假日班次
|
|
142
|
+ workdayClassId: [null],//工作日班次
|
131
|
143
|
});
|
132
|
144
|
console.log(this.validatePriorityForm.controls)
|
133
|
145
|
}
|
|
@@ -155,6 +167,28 @@ export class ConfigurationPriorityComponent implements OnInit {
|
155
|
167
|
});
|
156
|
168
|
}
|
157
|
169
|
|
|
170
|
+ // 获取班次
|
|
171
|
+ isLoading:boolean = false;
|
|
172
|
+ classList1: any = [];
|
|
173
|
+ classList2: any = [];
|
|
174
|
+ // type: 1工作日,2节假日
|
|
175
|
+ getClassList(type:number) {
|
|
176
|
+ let postData = {
|
|
177
|
+ idx: 0,
|
|
178
|
+ sum: 9999,
|
|
179
|
+ scheduleClass: {
|
|
180
|
+ hospital: { id: this.currentHospital.id },
|
|
181
|
+ type,
|
|
182
|
+ },
|
|
183
|
+ };
|
|
184
|
+ this.mainService
|
|
185
|
+ .getFetchDataList("simple/data", "scheduleClass", postData)
|
|
186
|
+ .subscribe((data) => {
|
|
187
|
+ this.isLoading = false;
|
|
188
|
+ this['classList' + type] = data.list || [];
|
|
189
|
+ });
|
|
190
|
+ }
|
|
191
|
+
|
158
|
192
|
delModal: boolean = false; //删除模态框
|
159
|
193
|
tipsMsg1: string; //提示框信息
|
160
|
194
|
tipsMsg2: string; //操作后信息
|