|
@@ -996,23 +996,18 @@ export class HushijiandanComponent implements OnInit {
|
996
|
996
|
.subscribe((data) => {
|
997
|
997
|
that.checkTypeLis = data.data;
|
998
|
998
|
// 默认选中患者陪检,没有患者陪检,则选择第一个患者其他服务的任务类型
|
999
|
|
- for (let i = 0; i < that.checkTypeLis.length; i++) {
|
|
999
|
+ let id;
|
|
1000
|
+ for (let i = that.checkTypeLis.length - 1; i >= 0; i--) {
|
1000
|
1001
|
if (that.checkTypeLis[i].associationType.value == "inspect") {
|
1001
|
|
- that.patientForm.controls.checkedType.setValue(
|
1002
|
|
- that.checkTypeLis[i].id
|
1003
|
|
- );
|
1004
|
|
- that.patientForm.value.checkedType = that.checkTypeLis[i].id;
|
|
1002
|
+ id = that.checkTypeLis[i].id;
|
1005
|
1003
|
break;
|
1006
|
1004
|
} else if (
|
1007
|
1005
|
that.checkTypeLis[i].associationType.value == "patientTransport"
|
1008
|
1006
|
) {
|
1009
|
|
- that.patientForm.controls.checkedType.setValue(
|
1010
|
|
- that.checkTypeLis[i].id
|
1011
|
|
- );
|
1012
|
|
- that.patientForm.value.checkedType = that.checkTypeLis[i].id;
|
1013
|
|
- break;
|
|
1007
|
+ id = that.checkTypeLis[i].id;
|
1014
|
1008
|
}
|
1015
|
1009
|
}
|
|
1010
|
+ that.patientForm.controls.checkedType.setValue(id);
|
1016
|
1011
|
this.changeCheckedType();
|
1017
|
1012
|
});
|
1018
|
1013
|
}
|