|
@@ -630,8 +630,11 @@ export class HushijiandanComponent implements OnInit {
|
630
|
630
|
if (search === undefined) {
|
631
|
631
|
that.deptTaskTypeRules = data.data;
|
632
|
632
|
that.getOrderList();
|
633
|
|
- if (that.deptTaskTypeRules.openInspection) {
|
634
|
|
- // 陪检权限
|
|
633
|
+ if (
|
|
634
|
+ that.deptTaskTypeRules.openInspection ||
|
|
635
|
+ that.deptTaskTypeRules.openPatientTransport
|
|
636
|
+ ) {
|
|
637
|
+ // 陪检权限或转科权限
|
635
|
638
|
if (this.tabFlag) {
|
636
|
639
|
this.tabFlag = false;
|
637
|
640
|
this.getTaskTypeByInspection().subscribe((result) => {
|
|
@@ -992,13 +995,24 @@ export class HushijiandanComponent implements OnInit {
|
992
|
995
|
.postCustom("configuration", "deptTSPTaskType", {})
|
993
|
996
|
.subscribe((data) => {
|
994
|
997
|
that.checkTypeLis = data.data;
|
995
|
|
- // 默认选中患者陪检
|
996
|
|
- that.checkTypeLis.forEach((e) => {
|
997
|
|
- if (e.associationType.value == "inspect") {
|
998
|
|
- that.patientForm.controls.checkedType.setValue(e.id);
|
999
|
|
- that.patientForm.value.checkedType = e.id;
|
|
998
|
+ // 默认选中患者陪检,没有患者陪检,则选择第一个患者其他服务的任务类型
|
|
999
|
+ for (let i = 0; i < that.checkTypeLis.length; i++) {
|
|
1000
|
+ 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;
|
|
1005
|
+ break;
|
|
1006
|
+ } else if (
|
|
1007
|
+ that.checkTypeLis[i].associationType.value == "patientTransport"
|
|
1008
|
+ ) {
|
|
1009
|
+ that.patientForm.controls.checkedType.setValue(
|
|
1010
|
+ that.checkTypeLis[i].id
|
|
1011
|
+ );
|
|
1012
|
+ that.patientForm.value.checkedType = that.checkTypeLis[i].id;
|
|
1013
|
+ break;
|
1000
|
1014
|
}
|
1001
|
|
- });
|
|
1015
|
+ }
|
1002
|
1016
|
this.changeCheckedType();
|
1003
|
1017
|
});
|
1004
|
1018
|
}
|