Преглед на файлове

院区设置增加微信端送病人回病房,转出院记录的配置

seimin преди 3 години
родител
ревизия
5892257bdf

+ 7 - 4
src/app/views/fuwutai/fuwutai.component.ts

@@ -1080,12 +1080,15 @@ export class FuwutaiComponent implements OnInit {
1080 1080
     let postData = {
1081 1081
       idx: 0,
1082 1082
       sum: 1,
1083
-      systemConfiguration: {
1084
-        keyconfig: "rebackPatientTypeId",
1083
+      hospitalConfig: {
1084
+        hosId: this.checkedHos,
1085
+        key: "transDeptTypeId",
1085 1086
       },
1086 1087
     };
1087 1088
     this.getConfigTasktypeLoading = true;
1088
-    return this.mainService.systemConfiguration(postData).toPromise();
1089
+    return this.mainService
1090
+      .getFetchDataList("simple/data", "hospitalConfig", postData)
1091
+      .toPromise();
1089 1092
   }
1090 1093
   // 获取配置文件写死的任务类型ID(转科,给转出院记录用6)
1091 1094
   patientLogTasktypeLoading: boolean = false;
@@ -1108,7 +1111,7 @@ export class FuwutaiComponent implements OnInit {
1108 1111
     let deathTasktypeResult: any = await this.getConfigTasktype();
1109 1112
     this.getConfigTasktypeLoading = false;
1110 1113
     if (deathTasktypeResult.status == 200) {
1111
-      this.deathTasktypeId = deathTasktypeResult.list[0].valueconfig;
1114
+      this.deathTasktypeId = deathTasktypeResult.list[0].value;
1112 1115
     } else {
1113 1116
       return;
1114 1117
     }

+ 27 - 1
src/app/views/hospital-config/hospital-config.component.html

@@ -55,8 +55,34 @@
55 55
               </div>
56 56
             </nz-form-control>
57 57
           </ng-container>
58
+          <ng-container *ngIf="config.key === 'rebackPatientTypeId'">
59
+            <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
60
+            <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
61
+              <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch nzServerSearch>
62
+                <ng-container *ngFor="let o of taskTypeList">
63
+                  <nz-option *ngIf="true" [nzValue]="o.id" [nzLabel]="o.taskName"></nz-option>
64
+                </ng-container>
65
+                <nz-option *ngIf="false" nzDisabled nzCustomContent>
66
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
67
+                </nz-option>
68
+              </nz-select>
69
+            </nz-form-control>
70
+          </ng-container>
71
+          <ng-container *ngIf="config.key === 'transDeptTypeId'">
72
+            <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
73
+            <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
74
+              <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch nzServerSearch>
75
+                <ng-container *ngFor="let o of taskTypeList">
76
+                  <nz-option *ngIf="true" [nzValue]="o.id" [nzLabel]="o.taskName"></nz-option>
77
+                </ng-container>
78
+                <nz-option *ngIf="false" nzDisabled nzCustomContent>
79
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
80
+                </nz-option>
81
+              </nz-select>
82
+            </nz-form-control>
83
+          </ng-container>
58 84
           <ng-container
59
-            *ngIf="(config.key !== 'autoCreateUserRoleId'&&config.key !== 'autoCreateUserDeptId'&&config.key !== 'autoCreateUserGroupId'&&config.key !== 'phone_num_port'&&config.key !== 'phone_num_port1'&&config.key !== 'phone_num_port2'&&config.key !== 'phone_num_port3')">
85
+            *ngIf="(config.key !== 'autoCreateUserRoleId'&&config.key !== 'autoCreateUserDeptId'&&config.key !== 'autoCreateUserGroupId'&&config.key !== 'phone_num_port'&&config.key !== 'phone_num_port1'&&config.key !== 'phone_num_port2'&&config.key !== 'phone_num_port3'&&config.key !== 'rebackPatientTypeId'&&config.key !== 'transDeptTypeId')">
60 86
             <nz-form-label [nzSpan]="24" [nzFor]="config.key" [nzRequired]="config.required" class="label">
61 87
               {{config.desc}}</nz-form-label>
62 88
             <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">

+ 27 - 7
src/app/views/hospital-config/hospital-config.component.ts

@@ -20,6 +20,7 @@ export class HospitalConfigComponent implements OnInit {
20 20
   searchLoading: boolean = false;
21 21
   hospitalConfigList = []; //院区系统配置列表
22 22
   roleList = []; //角色列表
23
+  taskTypeList = []; //任务类型列表
23 24
   deptList = []; //科室列表
24 25
   groupList = []; //组列表
25 26
   onSearchSubject = new Subject(); //搜索防抖
@@ -56,6 +57,7 @@ export class HospitalConfigComponent implements OnInit {
56 57
       this.getRoleList(),
57 58
       this.getDeptList(this.hosId),
58 59
       this.getGroupList(this.hosId),
60
+      this.getTaskTypeList(),
59 61
     ])
60 62
       .then((result) => {
61 63
         if (result[0].status == 200) {
@@ -67,6 +69,9 @@ export class HospitalConfigComponent implements OnInit {
67 69
         if (result[2].status == 200) {
68 70
           this.groupList = result[2].list;
69 71
         }
72
+        if (result[3].status == 200) {
73
+          this.taskTypeList = result[3].list;
74
+        }
70 75
         this.getHospitalConfigList(this.hosId).subscribe((res) => {
71 76
           if (res.status == 200) {
72 77
             this.hospitalConfigList = res.list;
@@ -85,8 +90,13 @@ export class HospitalConfigComponent implements OnInit {
85 90
             this.validateForm = this.fb.group(fbGroup);
86 91
             //赋值
87 92
             this.hospitalConfigList.forEach((config) => {
88
-              //默认角色
89
-              if (config.key === "autoCreateUserRoleId") {
93
+              //默认角色,默认组
94
+              if (
95
+                config.key === "autoCreateUserRoleId" ||
96
+                config.key === "rebackPatientTypeId" ||
97
+                config.key === "transDeptTypeId" ||
98
+                config.key === "autoCreateUserGroupId"
99
+              ) {
90 100
                 this.validateForm.controls[config.key].setValue(
91 101
                   config.value - 0
92 102
                 );
@@ -112,11 +122,6 @@ export class HospitalConfigComponent implements OnInit {
112 122
                 this.validateForm.controls[config.key].setValue(
113 123
                   config.value - 0
114 124
                 );
115
-              } else if (config.key === "autoCreateUserGroupId") {
116
-                //默认组
117
-                this.validateForm.controls[config.key].setValue(
118
-                  config.value - 0
119
-                );
120 125
               } else {
121 126
                 this.validateForm.controls[config.key].setValue(config.value);
122 127
               }
@@ -146,6 +151,21 @@ export class HospitalConfigComponent implements OnInit {
146 151
       .getFetchDataList("user/data", "role", postData)
147 152
       .toPromise();
148 153
   }
154
+  // 获取任务类型列表(患者其他服务)
155
+  getTaskTypeList() {
156
+    let postData = {
157
+      idx: 0,
158
+      sum: 999,
159
+      taskType: {
160
+        hosIds: this.hosId,
161
+        simpleQuery: true,
162
+        associationType: { id: 255 },
163
+      },
164
+    };
165
+    return this.mainService
166
+      .getFetchDataList("configuration", "taskType", postData)
167
+      .toPromise();
168
+  }
149 169
   /**
150 170
    * 获取科室列表
151 171
    * @param hosId 院区id