소스 검색

送回复苏室可选择固定科室或固定科室范围

seimin 1 년 전
부모
커밋
14e7e4a476

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "/service": {
3
-    "target": "http://192.168.3.108",
3
+    "target": "http://192.168.4.240",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 6
     "pathRewrite": {

+ 14 - 3
src/app/share/dialog-delete/dialog-delete.component.html

@@ -1,14 +1,25 @@
1 1
 <!-- 删除模态框 -->
2
-<div class="dialog-delete" *ngIf="delModal">
3
-  <div class="modalBody">
2
+<div class="dialog-delete" *ngIf="delModal" [ngStyle]="{'z-index': isSelected ? '9' : '9999999'}">
3
+  <div class="modalBody" [ngStyle]="{'height': isSelected ? 'auto' : '220px'}">
4 4
     <div class="title">提示<i class="icon_transport transport-guanbi" (click)="hideDelModal('x')"></i></div>
5 5
     <div class="content">
6 6
       <div class="icon"><i class="icon_transport transport-wenhao"></i></div>
7 7
       <div class="defeat" [innerHTML]="content | htmlTransform"></div>
8 8
       <div class="tips red" *ngIf="tips">({{tips}})</div>
9
-      <div *ngIf="isChecked">
9
+      <div [hidden]="!isChecked">
10 10
         <label nz-checkbox [(ngModel)]="isRemandClean" [ngModelOptions]="{ standalone: true }">是否同步建立手术清洁任务工单</label>
11 11
       </div>
12
+      <div [hidden]="!isSelected" class="mt8 mb8 w100">
13
+        <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择苏醒室" [(ngModel)]="recoveryRoom">
14
+          <ng-container *ngFor="let option of isSelectedArr">
15
+            <nz-option *ngIf="!isLoading" [nzLabel]="deptDisplay == 2 ? option.deptalias : option.dept" [nzValue]="option.id"></nz-option>
16
+          </ng-container>
17
+          <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
18
+            <i nz-icon nzType="loading" class="loading-icon"></i>
19
+            搜索中...
20
+          </nz-option>
21
+        </nz-select>
22
+      </div>
12 23
     </div>
13 24
     <div class="operate">
14 25
       <button nz-button nzType="primary" (click)="confirmDel()" [nzLoading]="btnLoading">{{confirmTxt}}</button>

+ 34 - 5
src/app/share/dialog-delete/dialog-delete.component.ts

@@ -1,11 +1,11 @@
1
-import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
2
-
1
+import { Component, EventEmitter, Input, OnInit, Output, OnChanges, SimpleChanges } from "@angular/core";
2
+import { NzMessageService } from 'ng-zorro-antd';
3 3
 @Component({
4 4
   selector: "app-dialog-delete",
5 5
   templateUrl: "./dialog-delete.component.html",
6 6
   styleUrls: ["./dialog-delete.component.less"],
7 7
 })
8
-export class DialogDeleteComponent implements OnInit {
8
+export class DialogDeleteComponent implements OnInit, OnChanges {
9 9
   @Output() hideDelModalEvent = new EventEmitter<any>();
10 10
   @Output() confirmDelEvent = new EventEmitter<any>();
11 11
   @Output() cancelDelEvent = new EventEmitter<any>();
@@ -17,19 +17,48 @@ export class DialogDeleteComponent implements OnInit {
17 17
   @Input() confirmTxt: string = "确定";
18 18
   @Input() cancelTxt: string = "取消";
19 19
   @Input() isChecked: boolean = false;
20
-  constructor() {}
20
+  @Input() isSelected: boolean = false;
21
+  @Input() isSelectedArr: any[] = [];
22
+  @Input() deptDisplay: number = 0;
23
+  constructor(private message: NzMessageService) {}
21 24
 
22 25
   isRemandClean:boolean = true;
26
+  isLoading:boolean = false;
27
+  recoveryRoom:any = null;
23 28
 
24 29
   ngOnInit() {}
30
+
31
+  ngOnChanges(changes: SimpleChanges){
32
+    if(changes.isSelected && changes.isSelectedArr){
33
+      if(changes.isSelectedArr.currentValue.length === 1){
34
+        this.recoveryRoom = changes.isSelectedArr.currentValue[0].id;
35
+      }
36
+    }
37
+  }
38
+
25 39
   // 隐藏
26 40
   hideDelModal(e: string) {
27 41
     this.hideDelModalEvent.emit(e);
28 42
   }
43
+
29 44
   // 确认删除
30 45
   confirmDel() {
31
-    this.confirmDelEvent.emit(this.isChecked ? this.isRemandClean : false);
46
+    // 如何送回苏醒室开启,并且未选择苏醒室
47
+    if(this.isSelected && !this.recoveryRoom){
48
+      this.message.info('请选择苏醒科室!');
49
+      return;
50
+    }
51
+    let data:any = {};
52
+    if(this.isChecked){
53
+      data.isRemandClean = this.isRemandClean;
54
+    }
55
+    if(this.isSelected){
56
+      data.recoveryRoom = this.recoveryRoom;
57
+    }
58
+    this.confirmDelEvent.emit(data);
32 59
   }
60
+
61
+  // 取消|否
33 62
   cancel(type: string) {
34 63
     if (type == "cancel") {
35 64
       //取消

+ 1 - 1
src/app/views/hushijiandan/hushijiandan.component.html

@@ -3704,4 +3704,4 @@
3704 3704
 
3705 3705
 <!-- 手术中患者-送回苏醒区 -->
3706 3706
 <app-dialog-delete [delModal]="sendAwakeningRoomModal" (hideDelModalEvent)="hideSendAwakeningRoomModal()" [btnLoading]="sLoading2"
3707
-(confirmDelEvent)="confirmSendAwakeningRoom($event)" [content]="sendAwakeningRoomInfo" [isChecked]="surgeryConfigs && surgeryConfigs.remandClean == 1"></app-dialog-delete>
3707
+(confirmDelEvent)="confirmSendAwakeningRoom($event)" [content]="sendAwakeningRoomInfo" [isChecked]="surgeryConfigs && surgeryConfigs.remandClean == 1" [isSelected]="surgeryCarryingCourse && (surgeryCarryingCourse.departmentStrategy.value == 2 || surgeryCarryingCourse.departmentStrategy.value == 3)" [isSelectedArr]="surgeryCarryingCourseDepts" [deptDisplay]="deptDisplay"></app-dialog-delete>

+ 26 - 8
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -17,7 +17,7 @@ import http from "../../../assets/js/http";
17 17
 import { MainService } from "../../services/main.service";
18 18
 import { WebsocketNurseService } from "../../services/websocket-nurse.service";
19 19
 
20
-import { NzMessageService } from "ng-zorro-antd/message";
20
+import { NzMessageService } from "ng-zorro-antd";
21 21
 import { NzNotificationService } from "ng-zorro-antd/notification";
22 22
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
23 23
 import { ToolService } from "../../services/tool.service";
@@ -107,7 +107,6 @@ export class HushijiandanComponent implements OnInit {
107 107
     private fb: FormBuilder,
108 108
     public router: Router,
109 109
     private mainService: MainService,
110
-    private msg: NzMessageService,
111 110
     private notification: NzNotificationService,
112 111
     private webs: WebsocketNurseService,
113 112
     private tool: ToolService
@@ -687,7 +686,7 @@ export class HushijiandanComponent implements OnInit {
687 686
   initLogin() {
688 687
     let that = this;
689 688
     if (!localStorage.getItem("user")) {
690
-      that.msg.error("您的登录已失效,请重新登录!", {
689
+      that.message.error("您的登录已失效,请重新登录!", {
691 690
         nzDuration: 3000,
692 691
       });
693 692
       setTimeout(() => {
@@ -767,14 +766,18 @@ export class HushijiandanComponent implements OnInit {
767 766
     this.mainService
768 767
       .getFetchDataList("simple/data", "surgery", postData)
769 768
       .subscribe((data) => {
769
+        data.list = Array.isArray(data.list) ? data.list : [];
770 770
         this.surgeryLoading = false;
771
-        this.surgeryWKOMsg = Array.isArray(data.list) ? (data.list[0] ? data.list[0] : {}) : {};
771
+        this.surgeryWKOMsg = data.list[0] || {};
772 772
       });
773 773
   }
774 774
 
775 775
   // 获取手术配置信息
776 776
   surgeryField = null; //手术关联业务
777 777
   surgeryConfigs:any = {};
778
+  // 送回苏醒室的运输过程终点科室信息
779
+  surgeryCarryingCourse:any = null;
780
+  surgeryCarryingCourseDepts: any[] = [];
778 781
   getSurgeryConfig() {
779 782
     this.mainService
780 783
       .getDictionary("list", "ordinary_field")
@@ -794,6 +797,15 @@ export class HushijiandanComponent implements OnInit {
794 797
             .subscribe((result) => {
795 798
               if (result.status == 200) {
796 799
                 this.surgeryConfigs = result.list[0] || {};
800
+                // 送回苏醒室开关开启 并且 有对应的任务类型
801
+                if(this.surgeryConfigs.remandRecovery == 1 && this.surgeryConfigs.recoveryType){
802
+                  this.surgeryCarryingCourse = this.surgeryConfigs.recoveryType.carryingCourses ? this.surgeryConfigs.recoveryType.carryingCourses.find(v => v.nodeId ? v.nodeId.value == 'finish' : false) : null;
803
+        
804
+                  // 运输过程终点科室配置是固定科室或者固定科室范围-苏醒室
805
+                  if(this.surgeryCarryingCourse && (this.surgeryCarryingCourse.departmentStrategy.value == 2 || this.surgeryCarryingCourse.departmentStrategy.value == 3)){
806
+                    this.surgeryCarryingCourseDepts = this.surgeryCarryingCourse.departmentDTOS || [];
807
+                  }
808
+                }
797 809
               }
798 810
             });
799 811
         }
@@ -1525,7 +1537,7 @@ export class HushijiandanComponent implements OnInit {
1525 1537
   }
1526 1538
   // 确认
1527 1539
   sLoading1 = false;
1528
-  confirmSendWard(isRemandClean) {
1540
+  confirmSendWard(data) {
1529 1541
     console.log(this.sendWardItem);
1530 1542
     this.sLoading1 = true;
1531 1543
     this.mainService
@@ -1535,7 +1547,7 @@ export class HushijiandanComponent implements OnInit {
1535 1547
         orderId: this.sendWardItem.gdid,
1536 1548
         configId: this.surgeryConfigs.id,
1537 1549
         remandType: 'clinical',
1538
-        remandClean: isRemandClean ? 1 : 0,
1550
+        remandClean: data.isRemandClean ? 1 : 0,
1539 1551
       })
1540 1552
       .subscribe((result:any) => {
1541 1553
         this.sLoading1 = false;
@@ -1565,8 +1577,13 @@ export class HushijiandanComponent implements OnInit {
1565 1577
   }
1566 1578
   // 确认
1567 1579
   sLoading2 = false;
1568
-  confirmSendAwakeningRoom(isRemandClean) {
1580
+  confirmSendAwakeningRoom(data) {
1569 1581
     console.log(this.sendAwakeningRoomItem);
1582
+    console.log(this.surgeryConfigs);
1583
+    if(!data.recoveryRoom){
1584
+      this.message.info(`<span class="red">${this.surgeryConfigs.recoveryType.taskName}</span>任务类型-运输过程-终点科室-默认科室配置错误!`);
1585
+      return;
1586
+    }
1570 1587
     this.sLoading2 = true;
1571 1588
     this.mainService
1572 1589
       .createRemandOrder({
@@ -1575,7 +1592,8 @@ export class HushijiandanComponent implements OnInit {
1575 1592
         orderId: this.sendAwakeningRoomItem.gdid,
1576 1593
         configId: this.surgeryConfigs.id,
1577 1594
         remandType: 'recovery',
1578
-        remandClean: isRemandClean ? 1 : 0,
1595
+        remandClean: data.isRemandClean ? 1 : 0,
1596
+        endDept: data.recoveryRoom || undefined,
1579 1597
       })
1580 1598
       .subscribe((result:any) => {
1581 1599
         this.sLoading2 = false;

+ 3 - 0
src/app/views/operation-config/operation-config.component.html

@@ -37,6 +37,7 @@
37 37
             </nz-option>
38 38
           </nz-select>
39 39
         </div>
40
+        <!-- 送回病房科室 -->
40 41
         <div class="display_flex align-items_center mb8">
41 42
           <nz-form-label class="label">是否开通送回病房</nz-form-label>
42 43
           <nz-checkbox-group [(ngModel)]="autoSendWard" (ngModelChange)="changeAutoSendWard($event)"></nz-checkbox-group>
@@ -50,6 +51,7 @@
50 51
             </nz-option>
51 52
           </nz-select>
52 53
         </div>
54
+        <!-- 送回苏醒室科室 -->
53 55
         <div class="display_flex align-items_center mb8">
54 56
           <nz-form-label class="label">是否开通送回苏醒室</nz-form-label>
55 57
           <nz-checkbox-group [(ngModel)]="autoSendAwakeningRoom" (ngModelChange)="changeAutoSendAwakeningRoom($event)"></nz-checkbox-group>
@@ -63,6 +65,7 @@
63 65
             </nz-option>
64 66
           </nz-select>
65 67
         </div>
68
+        <!-- 关联手术清洁 -->
66 69
         <div class="display_flex align-items_center mb8">
67 70
           <nz-form-label class="label">是否开通关联手术清洁建单</nz-form-label>
68 71
           <nz-checkbox-group [(ngModel)]="autoRemandClean" (ngModelChange)="changeAutoRemandClean($event)"></nz-checkbox-group>

+ 39 - 3
src/app/views/operation-config/operation-config.component.ts

@@ -176,7 +176,7 @@ export class OperationConfigComponent implements OnInit {
176 176
     isFirst && (this.loading = true);
177 177
     let postData:any = {
178 178
       idx: 0,
179
-      sum: 9999,
179
+      sum: 10,
180 180
       taskType: {
181 181
         taskName: e,
182 182
         simpleQuery: true,
@@ -258,22 +258,58 @@ export class OperationConfigComponent implements OnInit {
258 258
               this.loading = false;
259 259
               if (result.status == 200) {
260 260
                 this.configs = result.list[0] || {};
261
+
262
+                // 接手术关联任务类型
261 263
                 this.tasktypeId = this.configs.taskTypeDTO ? this.configs.taskTypeDTO.id : null;
264
+                if(this.tasktypeId && this.configs.taskTypeDTO){
265
+                  let isInArr = this.taskTypes1.some(v => v.id == this.tasktypeId);
266
+                  if(!isInArr){
267
+                    this.taskTypes1.unshift(this.configs.taskTypeDTO);
268
+                  }
269
+                }
270
+
271
+                // 苏醒室科室
262 272
                 this.recoveryDeptId = this.configs.recoveryDeptId || null;
263 273
                 if(this.recoveryDeptId && this.configs.recoveryDeptDTO){
264
-                  let isInRecoveryDepts = this.recoveryDepts.some(v => v.id == this.recoveryDeptId);
265
-                  if(!isInRecoveryDepts){
274
+                  let isInArr = this.recoveryDepts.some(v => v.id == this.recoveryDeptId);
275
+                  if(!isInArr){
266 276
                     this.recoveryDepts.unshift(this.configs.recoveryDeptDTO);
267 277
                   }
268 278
                 }
279
+
269 280
                 this.autoCreateOrders[0].checked = this.configs.autoCreate == 1;
270 281
                 this.autoTime = this.configs.createTime ? new Date(this.configs.createTime) : null;
271 282
                 this.autoSendWard[0].checked = this.configs.remandClinical == 1;
283
+
284
+                // 送回病房科室
272 285
                 this.tasktype1Id = this.configs.clinicalTypeId || null;
286
+                if(this.tasktype1Id && this.configs.clinicalTypeDTO){
287
+                  let isInArr = this.taskTypes1.some(v => v.id == this.tasktype1Id);
288
+                  if(!isInArr){
289
+                    this.taskTypes1.unshift(this.configs.clinicalTypeDTO);
290
+                  }
291
+                }
273 292
                 this.autoSendAwakeningRoom[0].checked = this.configs.remandRecovery == 1;
293
+
294
+                // 送回苏醒室科室
274 295
                 this.tasktype2Id = this.configs.recoveryTypeId || null;
296
+                if(this.tasktype2Id && this.configs.recoveryType){
297
+                  let isInArr = this.taskTypes1.some(v => v.id == this.tasktype2Id);
298
+                  if(!isInArr){
299
+                    this.taskTypes1.unshift(this.configs.recoveryType);
300
+                  }
301
+                }
302
+
275 303
                 this.autoRemandClean[0].checked = this.configs.remandClean == 1;
304
+
305
+                // 关联手术清洁
276 306
                 this.cleanTypeId = this.configs.cleanTypeId || null;
307
+                if(this.cleanTypeId && this.configs.cleanType){
308
+                  let isInArr = this.taskTypes2.some(v => v.id == this.cleanTypeId);
309
+                  if(!isInArr){
310
+                    this.taskTypes2.unshift(this.configs.cleanType);
311
+                  }
312
+                }
277 313
               }
278 314
             });
279 315
         }else{

+ 1 - 0
src/app/views/task-type-management/task-type-management.component.html

@@ -638,6 +638,7 @@
638 638
           <nz-form-label class="label" nzRequired>名称</nz-form-label>
639 639
           <input nz-input class="mb8 w100" [(ngModel)]="carryingCourses[indexs].name" placeholder="请选择科室名称" nzSize="" />
640 640
           <nz-form-label class="label" nzRequired>默认科室</nz-form-label>
641
+          <span class="red" *ngIf="(carryingCourses[indexs]?.nodeId?.value == 'finish') && currentChoice?.associationType?.value == 'patientTransport'">(苏醒科室只支持固定科室或固定科室范围)</span>
641 642
           <nz-select class="mb8 w100" nzShowSearch nzAllowClear nzPlaceHolder="请选择默认科室"
642 643
             [ngModel]="departmentStrategy.idv" (ngModelChange)="depa(departmentStrategy,$event,'clear')"
643 644
             [nzLoading]="yLoading">