Browse Source

调度台初步优化

seimin 8 months ago
parent
commit
e728428ef6
1 changed files with 25 additions and 17 deletions
  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
     this.getInspectAndPatientTransportConfigTasktype();
713
     this.getInspectAndPatientTransportConfigTasktype();
714
   }
714
   }
715
   ngOnDestroy() {
715
   ngOnDestroy() {
716
-    clearInterval(this.refreshTimerId);
716
+    clearTimeout(this.refreshTimerId);
717
     this.phones.closeWs(true);
717
     this.phones.closeWs(true);
718
     this.sers.closeWs(true);
718
     this.sers.closeWs(true);
719
   }
719
   }
@@ -1169,7 +1169,9 @@ export class FuwutaiComponent implements OnInit {
1169
   // 定时刷新数据
1169
   // 定时刷新数据
1170
   refreshTimerId; //定时刷新定时器
1170
   refreshTimerId; //定时刷新定时器
1171
   refresh() {
1171
   refresh() {
1172
-    this.refreshTimerId = setInterval(() => {
1172
+    clearTimeout(this.refreshTimerId);
1173
+    this.refreshTimerId = setTimeout(() => {
1174
+      this.refresh()
1173
       // 如果没选择复选框
1175
       // 如果没选择复选框
1174
       if (!this.batchType && !this.batchType1) {
1176
       if (!this.batchType && !this.batchType1) {
1175
         this.orderRefreshTime--;
1177
         this.orderRefreshTime--;
@@ -1180,6 +1182,8 @@ export class FuwutaiComponent implements OnInit {
1180
         this.getOrderList(1, true);
1182
         this.getOrderList(1, true);
1181
         this.getOrderList(2);
1183
         this.getOrderList(2);
1182
         this.getOrderList(3);
1184
         this.getOrderList(3);
1185
+        this.getVisitList();
1186
+        this.getMessageList();
1183
         if (this.currentRTab === 0) {
1187
         if (this.currentRTab === 0) {
1184
           this.getWorkOrders(this.applyDept);
1188
           this.getWorkOrders(this.applyDept);
1185
         } else if (this.currentRTab === 1) {
1189
         } else if (this.currentRTab === 1) {
@@ -1213,6 +1217,8 @@ export class FuwutaiComponent implements OnInit {
1213
     this.getOrderList(1);
1217
     this.getOrderList(1);
1214
     this.getOrderList(2);
1218
     this.getOrderList(2);
1215
     this.getOrderList(3);
1219
     this.getOrderList(3);
1220
+    this.getVisitList();
1221
+    this.getMessageList();
1216
     if (this.currentRTab === 0) {
1222
     if (this.currentRTab === 0) {
1217
       this.getWorkOrders(this.applyDept);
1223
       this.getWorkOrders(this.applyDept);
1218
     } else if (this.currentRTab === 1) {
1224
     } else if (this.currentRTab === 1) {
@@ -1745,21 +1751,23 @@ export class FuwutaiComponent implements OnInit {
1745
     this.clickYYZyFlag = false;
1751
     this.clickYYZyFlag = false;
1746
     this.clickYYFlag = false;
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
     this.taskBuild = null;
1773
     this.taskBuild = null;