Przeglądaj źródła

调度台初步优化

seimin 7 miesięcy temu
rodzic
commit
e728428ef6
1 zmienionych plików z 25 dodań i 17 usunięć
  1. 25 17
      src/app/views/fuwutai/fuwutai.component.ts

+ 25 - 17
src/app/views/fuwutai/fuwutai.component.ts

@@ -713,7 +713,7 @@ export class FuwutaiComponent implements OnInit {
713 713
     this.getInspectAndPatientTransportConfigTasktype();
714 714
   }
715 715
   ngOnDestroy() {
716
-    clearInterval(this.refreshTimerId);
716
+    clearTimeout(this.refreshTimerId);
717 717
     this.phones.closeWs(true);
718 718
     this.sers.closeWs(true);
719 719
   }
@@ -1169,7 +1169,9 @@ export class FuwutaiComponent implements OnInit {
1169 1169
   // 定时刷新数据
1170 1170
   refreshTimerId; //定时刷新定时器
1171 1171
   refresh() {
1172
-    this.refreshTimerId = setInterval(() => {
1172
+    clearTimeout(this.refreshTimerId);
1173
+    this.refreshTimerId = setTimeout(() => {
1174
+      this.refresh()
1173 1175
       // 如果没选择复选框
1174 1176
       if (!this.batchType && !this.batchType1) {
1175 1177
         this.orderRefreshTime--;
@@ -1180,6 +1182,8 @@ export class FuwutaiComponent implements OnInit {
1180 1182
         this.getOrderList(1, true);
1181 1183
         this.getOrderList(2);
1182 1184
         this.getOrderList(3);
1185
+        this.getVisitList();
1186
+        this.getMessageList();
1183 1187
         if (this.currentRTab === 0) {
1184 1188
           this.getWorkOrders(this.applyDept);
1185 1189
         } else if (this.currentRTab === 1) {
@@ -1213,6 +1217,8 @@ export class FuwutaiComponent implements OnInit {
1213 1217
     this.getOrderList(1);
1214 1218
     this.getOrderList(2);
1215 1219
     this.getOrderList(3);
1220
+    this.getVisitList();
1221
+    this.getMessageList();
1216 1222
     if (this.currentRTab === 0) {
1217 1223
       this.getWorkOrders(this.applyDept);
1218 1224
     } else if (this.currentRTab === 1) {
@@ -1745,21 +1751,23 @@ export class FuwutaiComponent implements OnInit {
1745 1751
     this.clickYYZyFlag = false;
1746 1752
     this.clickYYFlag = false;
1747 1753
 
1748
-    // 送病人回病房
1749
-    let deathTasktypeResult: any = await this.getConfigTasktype();
1750
-    this.getConfigTasktypeLoading = false;
1751
-    if (deathTasktypeResult && deathTasktypeResult.status == 200) {
1752
-      this.deathTasktypeId = deathTasktypeResult.list[0].value;
1753
-    } else {
1754
-      return;
1755
-    }
1756
-    // 转出院记录
1757
-    let deathTasktypePatientResult: any = await this.patientLogTasktype();
1758
-    this.patientLogTasktypeLoading = false;
1759
-    if (deathTasktypePatientResult.status == 200) {
1760
-      this.deathTasktypeIdPatient = deathTasktypePatientResult.list[0].valueconfig;
1761
-    } else {
1762
-      return;
1754
+    if(!isInit && this.hsmsData.hsmsSwitch){
1755
+      // 送病人回病房
1756
+      let deathTasktypeResult: any = await this.getConfigTasktype();
1757
+      this.getConfigTasktypeLoading = false;
1758
+      if (deathTasktypeResult && deathTasktypeResult.status == 200) {
1759
+        this.deathTasktypeId = deathTasktypeResult.list[0].value;
1760
+      } else {
1761
+        return;
1762
+      }
1763
+      // 转出院记录
1764
+      let deathTasktypePatientResult: any = await this.patientLogTasktype();
1765
+      this.patientLogTasktypeLoading = false;
1766
+      if (deathTasktypePatientResult.status == 200) {
1767
+        this.deathTasktypeIdPatient = deathTasktypePatientResult.list[0].valueconfig;
1768
+      } else {
1769
+        return;
1770
+      }
1763 1771
     }
1764 1772
 
1765 1773
     this.taskBuild = null;