seimin пре 3 година
родитељ
комит
a603facc58

+ 18 - 0
src/app/services/main.service.ts

@@ -434,4 +434,22 @@ export class MainService {
434 434
       headers: this.headers,
435 435
     });
436 436
   }
437
+  // 护士端定时预约工单立即执行
438
+  executeNow(id) {
439
+    return this.http.get(host.host + "/api/directStartOrder/" + id, {
440
+      headers: this.headers,
441
+    });
442
+  }
443
+  //定时下班列表立即执行
444
+  executeNowClassesJob(data) {
445
+    return this.http.post(host.host + "/configuration/directOffDuty", data, {
446
+      headers: this.headers,
447
+    });
448
+  }
449
+  //轮巡计划列表立即执行
450
+  executeNowOrderPlan(id) {
451
+    return this.http.get(host.host + "/orderPlan/directOrderPlan/" + id, {
452
+      headers: this.headers,
453
+    });
454
+  }
437 455
 }

+ 3 - 0
src/app/services/tool.service.ts

@@ -91,6 +91,9 @@ export class ToolService {
91 91
         case "deleted":
92 92
           coopBtns.deleted = true; //已删除
93 93
           break;
94
+        case "executeNow":
95
+          coopBtns.executeNow = true; //立即执行
96
+          break;
94 97
       }
95 98
     });
96 99
     console.log(coopBtns);

+ 6 - 2
src/app/views/hushijiandan/hushijiandan.component.html

@@ -615,7 +615,7 @@
615 615
             </div>
616 616
             <div nz-col nzSpan="7" class="orders">
617 617
               <div class="orderTit display_flex justify-content_space-between align-items_center">
618
-                <span>工单列表</span>
618
+                <span>工单列表<b style="font-size: 14px;">({{orderListTime}}秒)</b></span>
619 619
                 <div>
620 620
                   <nz-select style="width: 100px;" [(ngModel)]="orderStateSelected"
621 621
                     (ngModelChange)="changeOrderState($event)" nzPlaceHolder="请选择工单状态">
@@ -705,6 +705,8 @@
705 705
                           <div
706 706
                             *ngIf="item.gdState.id==69||item.gdState.id==70||item.gdState.id==71||item.gdState.id==433"
707 707
                             class="btn flex_1 revocation borderR" (click)="openRecallModal(item.id)">撤销</div>
708
+                          <div *ngIf="item.gdState.id==433" class="btn flex_1 revocation borderR"
709
+                            (click)="openExecModal(item)">立即执行</div>
708 710
                           <div
709 711
                             *ngIf="(item.gdState.id==69||item.gdState.id==71)&&item.taskType.allowUrgent==1&&!item.urgentDetails"
710 712
                             class="btn flex_1 urgent" (click)="showJiaji(item.id)">加急
@@ -1109,7 +1111,9 @@
1109 1111
 <!-- 撤销工单 -->
1110 1112
 <app-dialog-delete [delModal]="recallOrderModal" (hideDelModalEvent)="closeRecallOrderModal()" [btnLoading]="btnLoading"
1111 1113
   (confirmDelEvent)="confirmRec()" content="您确认要撤销工单吗?撤销工单我们会通知服务台、支助人员不再执行此工单,请谨慎操作,如确认撤销请点击确认。"></app-dialog-delete>
1112
-
1114
+<!-- 立即执行定时预约工单 -->
1115
+<app-dialog-delete [delModal]="execModal" (hideDelModalEvent)="closeExecModal()" [btnLoading]="btnLoading"
1116
+  (confirmDelEvent)="confirmExec()" content="您确认要立即执行该工单吗?"></app-dialog-delete>
1113 1117
 <!-- 评价模态框 -->
1114 1118
 <div class="save display_flex align-items_center justify-content_flex-center appraise" *ngIf="appraiseModal">
1115 1119
   <div class="modalBody">

+ 86 - 3
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -133,7 +133,10 @@ export class HushijiandanComponent implements OnInit {
133 133
   currentUser; //当前用户
134 134
   logTimer = null; //综合日志定时器
135 135
   logTime = 0; //综合日志自动刷新秒数
136
-  logTimeConst = 30; //综合日志自动刷新秒数
136
+  logTimeConst = 60; //综合日志自动刷新秒数
137
+  orderListTimer = null; //工单列表定时器
138
+  orderListTime = 0; //工单列表自动刷新秒数
139
+  orderListTimeConst = 60; //工单列表自动刷新秒数
137 140
   deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
138 141
   ngOnInit() {
139 142
     this.tool.getDeptDisplay().subscribe((result) => {
@@ -166,6 +169,7 @@ export class HushijiandanComponent implements OnInit {
166 169
     this.initRole();
167 170
     this.getWebsocket();
168 171
     this.listDeptOrderRecord();
172
+    // 综合日志倒计时 start
169 173
     this.logTime = this.logTimeConst;
170 174
     clearInterval(this.logTimer);
171 175
     this.logTimer = setInterval(() => {
@@ -175,6 +179,18 @@ export class HushijiandanComponent implements OnInit {
175 179
         this.listDeptOrderRecord();
176 180
       }
177 181
     }, 1000);
182
+    // 综合日志倒计时 end
183
+    // 工单列表倒计时 start
184
+    this.orderListTime = this.orderListTimeConst;
185
+    clearInterval(this.orderListTimer);
186
+    this.orderListTimer = setInterval(() => {
187
+      this.orderListTime--;
188
+      if (this.orderListTime === 0) {
189
+        this.orderListTime = this.orderListTimeConst;
190
+        this.getOrderList();
191
+      }
192
+    }, 1000);
193
+    // 工单列表倒计时 end
178 194
   }
179 195
   ngOnDestroy() {
180 196
     console.log("关闭护士端", this.webs.ws);
@@ -182,6 +198,7 @@ export class HushijiandanComponent implements OnInit {
182 198
     clearInterval(this.moveId1);
183 199
     clearInterval(this.msgTimerId);
184 200
     clearInterval(this.logTimer);
201
+    clearInterval(this.orderListTimer);
185 202
     this.webs.closeWs();
186 203
   }
187 204
   loginUser: any = localStorage.getItem("user")
@@ -232,6 +249,62 @@ export class HushijiandanComponent implements OnInit {
232 249
     this.remarksEle1.nativeElement.focus();
233 250
     this.workOrderRemark1 += item;
234 251
   }
252
+  // 立即执行
253
+  coopItem: any = {};
254
+  execModal: boolean = false;
255
+  // 打开立即执行模态框
256
+  openExecModal(item) {
257
+    this.coopItem = item;
258
+    this.execModal = true;
259
+  }
260
+  // 确认立即执行
261
+  confirmExec() {
262
+    this.btnLoading = true;
263
+    // let postData: any = {
264
+    //   workOderId: this.coopItem.id,
265
+    //   workOrder: {
266
+    //     sourceId: this.coopItem.sourceId,
267
+    //     taskType: {
268
+    //       id: this.coopItem.taskType.id,
269
+    //     },
270
+    //     startDept: {
271
+    //       id: this.coopItem.startDept.id,
272
+    //     },
273
+    //     endDepts: this.coopItem.endDepts.map((v) => ({ id: v.id })),
274
+    //     createDept: this.coopItem.createDept,
275
+    //     patient: {
276
+    //       patientCode: this.coopItem.patient.patientCode,
277
+    //     },
278
+    //     goods: this.coopItem.goods,
279
+    //     platform: 2,
280
+    //     isAccompany: this.coopItem.isAccompany,
281
+    //   },
282
+    // };
283
+    // if (this.coopItem.isRemand !== undefined) {
284
+    //   postData.workOrder.isRemand = this.coopItem.isRemand;
285
+    // }
286
+    // if (this.coopItem.taskType.associationType.value == 'inspect') {
287
+    //   postData.workOrder.taskType.isHalfInspect = this.coopItem.taskType.isHalfInspect;
288
+    // }
289
+    // checkList:[
290
+    //   {
291
+    //     "id": 1165517
292
+    //   }
293
+    // ]
294
+    this.mainService.executeNow(this.coopItem.id).subscribe((result: any) => {
295
+      this.closeExecModal();
296
+      if (result.status == 200) {
297
+        this.showPromptModal("立即执行", true, "");
298
+        this.getOrderList();
299
+      } else {
300
+        this.showPromptModal("立即执行", false, result.msg);
301
+      }
302
+    });
303
+  }
304
+  // 关闭立即执行模态框
305
+  closeExecModal() {
306
+    this.execModal = false;
307
+  }
235 308
   // 获取护士端更新提示
236 309
   updateTipsForNurses = "";
237 310
   getUpdateTipsForNurses() {
@@ -791,7 +864,12 @@ export class HushijiandanComponent implements OnInit {
791 864
 
792 865
   // 切换左侧tab
793 866
   changeInfo() {
794
-    if (!this.deptTaskTypeRules.openInspection&&!this.deptTaskTypeRules.openPatientTransport) return;
867
+    if (
868
+      !this.deptTaskTypeRules.openInspection &&
869
+      !this.deptTaskTypeRules.openPatientTransport
870
+    ) {
871
+      return;
872
+    }
795 873
     this.infoPageIdx = 1;
796 874
     this.getPatient();
797 875
   }
@@ -850,7 +928,12 @@ export class HushijiandanComponent implements OnInit {
850 928
 
851 929
   // tab输入搜索节流阀
852 930
   searchTabInp(e) {
853
-    if (!this.deptTaskTypeRules.openInspection&&!this.deptTaskTypeRules.openPatientTransport) return;
931
+    if (
932
+      !this.deptTaskTypeRules.openInspection &&
933
+      !this.deptTaskTypeRules.openPatientTransport
934
+    ) {
935
+      return;
936
+    }
854 937
     this.searchTabInpSubject.next(e);
855 938
   }
856 939
   // 下一日(陪检)

+ 6 - 2
src/app/views/regular-off-duty/regular-off-duty.component.html

@@ -16,8 +16,8 @@
16 16
             <th nzWidth="10%">重复策略</th>
17 17
             <th nzWidth="15%">定时发送时间</th>
18 18
             <th nzWidth="10%">状态</th>
19
-            <th nzWidth="35%">定时下班班次</th>
20
-            <th nzWidth="15%">操作</th>
19
+            <th nzWidth="25%">定时下班班次</th>
20
+            <th nzWidth="25%">操作</th>
21 21
           </tr>
22 22
         </thead>
23 23
         <tbody>
@@ -44,6 +44,7 @@
44 44
                 <span *ngIf="coopBtns.del" (click)="showDelModal(data,'您确认要删除吗?','删除','del')">删除</span>
45 45
                 <span *ngIf="coopBtns.isStartUp"
46 46
                   (click)="showDelModal(data,data.active?'您确认要停用吗?':'您确认要启用吗?',data.active?'停用':'启用','switch',data.active)">{{data.active?'停用':'启用'}}</span>
47
+                <span *ngIf="coopBtns.executeNow" (click)="openExecModal(data)">立即执行</span>
47 48
               </div>
48 49
             </td>
49 50
           </tr>
@@ -161,5 +162,8 @@
161 162
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
162 163
   [info]="promptInfo">
163 164
 </app-prompt-modal>
165
+<!-- 立即执行 -->
166
+<app-dialog-delete [delModal]="execModal" (hideDelModalEvent)="closeExecModal()" [btnLoading]="btnLoading"
167
+  (confirmDelEvent)="confirmExec()" content="您确认要立即执行该定时下班策略吗?"></app-dialog-delete>
164 168
 <!-- 遮罩 -->
165 169
 <app-mask *ngIf="maskFlag"></app-mask>

+ 25 - 0
src/app/views/regular-off-duty/regular-off-duty.component.ts

@@ -59,6 +59,31 @@ export class RegularOffDutyComponent implements OnInit {
59 59
     this.coopBtns = this.tool.initCoopBtns(this.route);
60 60
     this.initForm();
61 61
   }
62
+  // 立即执行
63
+  coopItem: any = {};
64
+  execModal: boolean = false;
65
+  // 打开立即执行模态框
66
+  openExecModal(item) {
67
+    this.coopItem = item;
68
+    this.execModal = true;
69
+  }
70
+  // 确认立即执行
71
+  confirmExec() {
72
+    this.btnLoading = true;
73
+    let posData = this.coopItem.classesIds.split(',');
74
+    this.mainService.executeNowClassesJob(posData).subscribe((result: any) => {
75
+      this.closeExecModal();
76
+      if (result.status == 200) {
77
+        this.showPromptModal("当前班次下班", true, "");
78
+      } else {
79
+        this.showPromptModal("当前班次下班", false, result.msg);
80
+      }
81
+    });
82
+  }
83
+  // 关闭立即执行模态框
84
+  closeExecModal() {
85
+    this.execModal = false;
86
+  }
62 87
   // 新增/编辑弹框
63 88
   add: boolean; //true:新增;false:编辑
64 89
   addModal() {

+ 4 - 0
src/app/views/round-robin/round-robin.component.html

@@ -74,6 +74,7 @@
74 74
                 <span *ngIf="coopBtns.del" (click)="showDelModal(data.id,'您确认要删除此轮巡计划吗?','删除','del')">删除</span>
75 75
                 <span *ngIf="coopBtns.isStartUp"
76 76
                   (click)="showDelModal(data.id,data.flag?'您确认要停用该计划吗?':'您确认要启用该计划吗?',data.flag?'停用':'启用','switch',data.flag)">{{data.flag?'停用':'启用'}}</span>
77
+                <span *ngIf="coopBtns.executeNow" (click)="openExecModal(data)">立即执行</span>
77 78
               </div>
78 79
             </td>
79 80
           </tr>
@@ -248,6 +249,9 @@
248 249
 </app-prompt-modal>
249 250
 <!-- 查看详情 -->
250 251
 <router-outlet></router-outlet>
252
+<!-- 立即执行 -->
253
+<app-dialog-delete [delModal]="execModal" (hideDelModalEvent)="closeExecModal()" [btnLoading]="btnLoading"
254
+  (confirmDelEvent)="confirmExec()" content="您确认要立即执行该轮巡计划吗?"></app-dialog-delete>
251 255
 <!-- 遮罩 -->
252 256
 <app-mask *ngIf="maskFlag"></app-mask>
253 257
 <!-- 批量建单设置 -->

+ 26 - 1
src/app/views/round-robin/round-robin.component.ts

@@ -646,7 +646,32 @@ export class RoundRobinComponent implements OnInit {
646 646
       this.oneOption[1]["checked"] = true;
647 647
     }
648 648
   }
649
-
649
+  // 立即执行
650
+  coopItem: any = {};
651
+  execModal: boolean = false;
652
+  // 打开立即执行模态框
653
+  openExecModal(item) {
654
+    this.coopItem = item;
655
+    this.execModal = true;
656
+  }
657
+  // 确认立即执行
658
+  confirmExec() {
659
+    this.btnLoading = true;
660
+    this.mainService
661
+      .executeNowOrderPlan(this.coopItem.id)
662
+      .subscribe((result: any) => {
663
+        this.closeExecModal();
664
+        if (result.status == 200) {
665
+          this.showPromptModal("立即执行", true, "");
666
+        } else {
667
+          this.showPromptModal("立即执行", false, result.msg);
668
+        }
669
+      });
670
+  }
671
+  // 关闭立即执行模态框
672
+  closeExecModal() {
673
+    this.execModal = false;
674
+  }
650 675
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
651 676
   showPromptModal(con, success, promptInfo?) {
652 677
     this.promptModalShow = false;