浏览代码

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

seimin 3 年之前
父节点
当前提交
5892257bdf

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

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

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

@@ -55,8 +55,34 @@
55
               </div>
55
               </div>
56
             </nz-form-control>
56
             </nz-form-control>
57
           </ng-container>
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
           <ng-container
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
             <nz-form-label [nzSpan]="24" [nzFor]="config.key" [nzRequired]="config.required" class="label">
86
             <nz-form-label [nzSpan]="24" [nzFor]="config.key" [nzRequired]="config.required" class="label">
61
               {{config.desc}}</nz-form-label>
87
               {{config.desc}}</nz-form-label>
62
             <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
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
   searchLoading: boolean = false;
20
   searchLoading: boolean = false;
21
   hospitalConfigList = []; //院区系统配置列表
21
   hospitalConfigList = []; //院区系统配置列表
22
   roleList = []; //角色列表
22
   roleList = []; //角色列表
23
+  taskTypeList = []; //任务类型列表
23
   deptList = []; //科室列表
24
   deptList = []; //科室列表
24
   groupList = []; //组列表
25
   groupList = []; //组列表
25
   onSearchSubject = new Subject(); //搜索防抖
26
   onSearchSubject = new Subject(); //搜索防抖
@@ -56,6 +57,7 @@ export class HospitalConfigComponent implements OnInit {
56
       this.getRoleList(),
57
       this.getRoleList(),
57
       this.getDeptList(this.hosId),
58
       this.getDeptList(this.hosId),
58
       this.getGroupList(this.hosId),
59
       this.getGroupList(this.hosId),
60
+      this.getTaskTypeList(),
59
     ])
61
     ])
60
       .then((result) => {
62
       .then((result) => {
61
         if (result[0].status == 200) {
63
         if (result[0].status == 200) {
@@ -67,6 +69,9 @@ export class HospitalConfigComponent implements OnInit {
67
         if (result[2].status == 200) {
69
         if (result[2].status == 200) {
68
           this.groupList = result[2].list;
70
           this.groupList = result[2].list;
69
         }
71
         }
72
+        if (result[3].status == 200) {
73
+          this.taskTypeList = result[3].list;
74
+        }
70
         this.getHospitalConfigList(this.hosId).subscribe((res) => {
75
         this.getHospitalConfigList(this.hosId).subscribe((res) => {
71
           if (res.status == 200) {
76
           if (res.status == 200) {
72
             this.hospitalConfigList = res.list;
77
             this.hospitalConfigList = res.list;
@@ -85,8 +90,13 @@ export class HospitalConfigComponent implements OnInit {
85
             this.validateForm = this.fb.group(fbGroup);
90
             this.validateForm = this.fb.group(fbGroup);
86
             //赋值
91
             //赋值
87
             this.hospitalConfigList.forEach((config) => {
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
                 this.validateForm.controls[config.key].setValue(
100
                 this.validateForm.controls[config.key].setValue(
91
                   config.value - 0
101
                   config.value - 0
92
                 );
102
                 );
@@ -112,11 +122,6 @@ export class HospitalConfigComponent implements OnInit {
112
                 this.validateForm.controls[config.key].setValue(
122
                 this.validateForm.controls[config.key].setValue(
113
                   config.value - 0
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
               } else {
125
               } else {
121
                 this.validateForm.controls[config.key].setValue(config.value);
126
                 this.validateForm.controls[config.key].setValue(config.value);
122
               }
127
               }
@@ -146,6 +151,21 @@ export class HospitalConfigComponent implements OnInit {
146
       .getFetchDataList("user/data", "role", postData)
151
       .getFetchDataList("user/data", "role", postData)
147
       .toPromise();
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
    * @param hosId 院区id
171
    * @param hosId 院区id