|
@@ -46,6 +46,34 @@ export class WorkAssignmentComponent implements OnInit {
|
46
|
46
|
nextSchemeName = ""; //下一个开启的方案名称
|
47
|
47
|
modelName = ""; //模态框名称
|
48
|
48
|
|
|
49
|
+ busyList:any[] = [
|
|
50
|
+ {
|
|
51
|
+ id: 1,
|
|
52
|
+ busyContent: '',
|
|
53
|
+ busyMinute: 1,
|
|
54
|
+ },
|
|
55
|
+ {
|
|
56
|
+ id: 2,
|
|
57
|
+ busyContent: '',
|
|
58
|
+ busyMinute: 1,
|
|
59
|
+ },
|
|
60
|
+ {
|
|
61
|
+ id: 3,
|
|
62
|
+ busyContent: '',
|
|
63
|
+ busyMinute: 1,
|
|
64
|
+ },
|
|
65
|
+ {
|
|
66
|
+ id: 4,
|
|
67
|
+ busyContent: '',
|
|
68
|
+ busyMinute: 1,
|
|
69
|
+ },
|
|
70
|
+ {
|
|
71
|
+ id: 5,
|
|
72
|
+ busyContent: '',
|
|
73
|
+ busyMinute: 1,
|
|
74
|
+ },
|
|
75
|
+ ]
|
|
76
|
+
|
49
|
77
|
ngOnInit() {
|
50
|
78
|
this.currentHospital = this.tool.getCurrentHospital();
|
51
|
79
|
this.coopBtns = this.tool.initCoopBtns(this.route);
|
|
@@ -124,6 +152,7 @@ export class WorkAssignmentComponent implements OnInit {
|
124
|
152
|
this.validateForm = this.fb.group({
|
125
|
153
|
workAssignmentName: [null, [Validators.required]],
|
126
|
154
|
workAssignmentType: ["1", [Validators.required]],
|
|
155
|
+ showBusy: [0, [Validators.required]],
|
127
|
156
|
workAssignmentDescribe: [null, [Validators.required]],
|
128
|
157
|
});
|
129
|
158
|
}
|
|
@@ -134,6 +163,36 @@ export class WorkAssignmentComponent implements OnInit {
|
134
|
163
|
});
|
135
|
164
|
}
|
136
|
165
|
|
|
166
|
+ changeShowBusy(){
|
|
167
|
+ this.busyList = [
|
|
168
|
+ {
|
|
169
|
+ id: 1,
|
|
170
|
+ busyContent: '',
|
|
171
|
+ busyMinute: 1,
|
|
172
|
+ },
|
|
173
|
+ {
|
|
174
|
+ id: 2,
|
|
175
|
+ busyContent: '',
|
|
176
|
+ busyMinute: 1,
|
|
177
|
+ },
|
|
178
|
+ {
|
|
179
|
+ id: 3,
|
|
180
|
+ busyContent: '',
|
|
181
|
+ busyMinute: 1,
|
|
182
|
+ },
|
|
183
|
+ {
|
|
184
|
+ id: 4,
|
|
185
|
+ busyContent: '',
|
|
186
|
+ busyMinute: 1,
|
|
187
|
+ },
|
|
188
|
+ {
|
|
189
|
+ id: 5,
|
|
190
|
+ busyContent: '',
|
|
191
|
+ busyMinute: 1,
|
|
192
|
+ },
|
|
193
|
+ ];
|
|
194
|
+ }
|
|
195
|
+
|
137
|
196
|
// 新增/编辑表单提交
|
138
|
197
|
btnLoading1 = false; //完成
|
139
|
198
|
submitForm(noGoTo?): void {
|
|
@@ -149,7 +208,7 @@ export class WorkAssignmentComponent implements OnInit {
|
149
|
208
|
} else {
|
150
|
209
|
this.btnLoading = true;
|
151
|
210
|
}
|
152
|
|
- let data = {};
|
|
211
|
+ let data:any = {};
|
153
|
212
|
|
154
|
213
|
if (this.add) {
|
155
|
214
|
//增加
|
|
@@ -157,6 +216,7 @@ export class WorkAssignmentComponent implements OnInit {
|
157
|
216
|
workScheme: {
|
158
|
217
|
name: this.validateForm.value.workAssignmentName,
|
159
|
218
|
workType: this.validateForm.value.workAssignmentType,
|
|
219
|
+ showBusy: this.validateForm.value.showBusy,
|
160
|
220
|
describe: this.validateForm.value.workAssignmentDescribe,
|
161
|
221
|
status: 0,
|
162
|
222
|
hosId: this.currentHospital.id,
|
|
@@ -169,6 +229,7 @@ export class WorkAssignmentComponent implements OnInit {
|
169
|
229
|
id: this.coopId.id,
|
170
|
230
|
name: this.validateForm.value.workAssignmentName,
|
171
|
231
|
workType: this.validateForm.value.workAssignmentType,
|
|
232
|
+ showBusy: this.validateForm.value.showBusy,
|
172
|
233
|
describe: this.validateForm.value.workAssignmentDescribe,
|
173
|
234
|
hosId: this.currentHospital.id,
|
174
|
235
|
},
|
|
@@ -180,6 +241,7 @@ export class WorkAssignmentComponent implements OnInit {
|
180
|
241
|
workScheme: {
|
181
|
242
|
name: this.validateForm.value.workAssignmentName,
|
182
|
243
|
workType: this.validateForm.value.workAssignmentType,
|
|
244
|
+ showBusy: this.validateForm.value.showBusy,
|
183
|
245
|
describe: this.validateForm.value.workAssignmentDescribe,
|
184
|
246
|
status: 0,
|
185
|
247
|
copy: 1,
|
|
@@ -188,6 +250,13 @@ export class WorkAssignmentComponent implements OnInit {
|
188
|
250
|
},
|
189
|
251
|
};
|
190
|
252
|
}
|
|
253
|
+ // 示忙原因
|
|
254
|
+ this.busyList.forEach(v => {
|
|
255
|
+ if(v.busyContent.trim()){
|
|
256
|
+ data.workScheme['busyContent' + v.id] = v.busyContent.trim();
|
|
257
|
+ data.workScheme['busyMinute' + v.id] = v.busyMinute;
|
|
258
|
+ }
|
|
259
|
+ })
|
191
|
260
|
this.mainService
|
192
|
261
|
.coopTypeConfig("addData", "workScheme", data)
|
193
|
262
|
.subscribe((result) => {
|
|
@@ -307,6 +376,13 @@ export class WorkAssignmentComponent implements OnInit {
|
307
|
376
|
this.copyModel = false;
|
308
|
377
|
this.validateForm.controls.workAssignmentName.setValue(data.name); //名称
|
309
|
378
|
this.validateForm.controls.workAssignmentType.setValue(data.workType + ""); //类型
|
|
379
|
+ this.validateForm.controls.showBusy.setValue(data.showBusy || 0);
|
|
380
|
+ if(this.validateForm.value.showBusy == 1){
|
|
381
|
+ this.busyList.forEach(v => {
|
|
382
|
+ v.busyContent = data['busyContent' + v.id];
|
|
383
|
+ v.busyMinute = data['busyMinute' + v.id] || 0;
|
|
384
|
+ })
|
|
385
|
+ }
|
310
|
386
|
this.validateForm.controls.workAssignmentDescribe.setValue(data.describe); //描述
|
311
|
387
|
}
|
312
|
388
|
//复制
|
|
@@ -318,6 +394,13 @@ export class WorkAssignmentComponent implements OnInit {
|
318
|
394
|
this.coopId = data;
|
319
|
395
|
this.validateForm.controls.workAssignmentName.setValue(data.name); //名称
|
320
|
396
|
this.validateForm.controls.workAssignmentType.setValue(data.workType + ""); //类型
|
|
397
|
+ this.validateForm.controls.showBusy.setValue(data.showBusy || 0);
|
|
398
|
+ if(this.validateForm.value.showBusy == 1){
|
|
399
|
+ this.busyList.forEach(v => {
|
|
400
|
+ v.busyContent = data['busyContent' + v.id];
|
|
401
|
+ v.busyMinute = data['busyMinute' + v.id] || 0;
|
|
402
|
+ })
|
|
403
|
+ }
|
321
|
404
|
this.validateForm.controls.workAssignmentDescribe.setValue(data.describe); //描述
|
322
|
405
|
}
|
323
|
406
|
|