seimin 1 년 전
부모
커밋
1de19b3af6
1개의 변경된 파일35개의 추가작업 그리고 20개의 파일을 삭제
  1. 35 20
      src/app/views/hushijiandan/hushijiandan.component.ts

+ 35 - 20
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -1170,33 +1170,48 @@ export class HushijiandanComponent implements OnInit {
1170 1170
       idx: this.infoPageIdx - 1,
1171 1171
       sum: 10,
1172 1172
     };
1173
-    // 患者信息
1174
-    postData["surgery"] = {
1175
-      searchKey: e ? e : this.tabSearchCont,
1176
-      applyDateStart: format(startOfDay(new Date()), "yyyy-MM-dd HH:mm:ss"),
1177
-      applyDateEnd: format(endOfDay(new Date()), "yyyy-MM-dd HH:mm:ss"),
1178
-      hosId: this.currentHospital.id,
1179
-    };
1180
-    // 查询父级科室患者
1181
-    // postData["surgery"]["parentIdOnly"] = true;
1182
-    if (
1183
-      this.currentDept.typeValue == "checkRoom2" ||
1184
-      this.currentDept.typeValue == "outpatientDept" ||
1185
-      this.currentDept.typeValue == "checkRoom"
1186
-    ) {
1187
-      delete postData["surgery"]["surgeryDept"]; //搜索范围为全院在院患者
1188
-    } else {
1189
-      postData["surgery"]["surgeryDept"] = this.loginUserDeptId;
1173
+    if(this.currentDept.typeValue == 'surgery'){
1174
+      // 手术安排信息
1175
+      postData["surgery"] = {
1176
+        searchKey: e ? e : this.tabSearchCont,
1177
+        applyDateStart: format(startOfDay(new Date()), "yyyy-MM-dd HH:mm:ss"),
1178
+        applyDateEnd: format(endOfDay(new Date()), "yyyy-MM-dd HH:mm:ss"),
1179
+        hosId: this.currentHospital.id,
1180
+        surgeryDept: this.loginUserDeptId
1181
+      };
1182
+    }else{
1183
+      // 患者信息
1184
+      postData["patient"] = {
1185
+        keyWord: e ? e : this.tabSearchCont,
1186
+      };
1187
+      // 查询父级科室患者
1188
+      postData["patient"]["parentIdOnly"] = true;
1189
+      if (
1190
+        this.currentDept.typeValue == "checkRoom2" ||
1191
+        this.currentDept.typeValue == "outpatientDept" ||
1192
+        this.currentDept.typeValue == "checkRoom"
1193
+      ) {
1194
+        delete postData["patient"]["department"]; //搜索范围为全院在院患者
1195
+      } else {
1196
+        postData["patient"]["department"] = { id: this.loginUserDeptId };
1197
+      }
1190 1198
     }
1199
+    
1191 1200
     this.snum++;
1192 1201
     this.mainService
1193
-      .getFetchDataList("simple/data", "surgery", postData)
1202
+      .getFetchDataList(this.currentDept.typeValue == 'surgery' ? "simple/data" : 'nurse', this.currentDept.typeValue == 'surgery' ? "surgery" : 'patient', postData)
1194 1203
       .subscribe((data) => {
1195 1204
         this.snum--;
1196 1205
         if (data.list.length > 0) {
1197 1206
           data.list.forEach((item) => {
1198
-            if (item.patientDTO && item.patientDTO.focusPatient === undefined) {
1199
-              item.patientDTO.focusPatient = 0;
1207
+            if(this.currentDept.typeValue == 'surgery'){
1208
+              if (item.patientDTO && item.patientDTO.focusPatient === undefined) {
1209
+                item.patientDTO.focusPatient = 0;
1210
+              }
1211
+            }else{
1212
+              if (item.focusPatient === undefined) {
1213
+                item.focusPatient = 0;
1214
+              }
1200 1215
             }
1201 1216
           });
1202 1217
         }