Kaynağa Gözat

检查页面控制增加预约时间精准控制

seimin 1 yıl önce
ebeveyn
işleme
5619114297

+ 1 - 1
proxy.conf.json

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

+ 4 - 7
src/app/views/hushijiandan/hushijiandan.component.html

@@ -404,12 +404,9 @@
404 404
           <div
405 405
             class="nurseTitle display_flex justify-content_space-between align-items_center"
406 406
           >
407
-            <span
408
-              >护士端<span class="todayNum"
409
-                >当日建单数:{{ todayNum }}</span
410
-              ></span
411
-            >
407
+            <span>护士端<span class="todayNum">当日建单数:{{ todayNum }}</span></span>
412 408
             <p class="updateTipsForNurses red">{{ updateTipsForNurses }}</p>
409
+            <span class="todayNum">等待陪检:<span class="red">{{queuingInformationList[0]}}</span>&emsp;陪检中:<span class="red">{{queuingInformationList[1]}}</span></span>
413 410
             <div class="nurseCode" (click)="showNurseCode()">
414 411
               <i class="nurseCodeIcon icon_transport transport-erweima"></i
415 412
               >二维码
@@ -2617,7 +2614,7 @@
2617 2614
                     [nzDisabled]="!isYyInspect || !yyDateZy"
2618 2615
                     class="ml8"
2619 2616
                     nzFormat="HH:mm"
2620
-                    [nzMinuteStep]="30"
2617
+                    [nzMinuteStep]="inspectAndPatientTransportConfig.timeMod"
2621 2618
                     [nzSecondStep]="60"
2622 2619
                     [(ngModel)]="yyTimeZy"
2623 2620
                     (ngModelChange)="yyTimeZyChange($event)"
@@ -2671,7 +2668,7 @@
2671 2668
                     [nzDisabled]="!isYyInspect || !yyDate"
2672 2669
                     class="ml8"
2673 2670
                     nzFormat="HH:mm"
2674
-                    [nzMinuteStep]="30"
2671
+                    [nzMinuteStep]="inspectAndPatientTransportConfig.timeMod"
2675 2672
                     [nzSecondStep]="60"
2676 2673
                     [(ngModel)]="yyTime"
2677 2674
                     (ngModelChange)="yyTimeChange($event)"

+ 101 - 39
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -102,6 +102,7 @@ export class HushijiandanComponent implements OnInit {
102 102
   otherSearchChangeSubject = new Subject(); //其他建单搜索防抖
103 103
   incidentSearchChangeSubject = new Subject(); //故障现象搜索防抖
104 104
   isYyInspect = false; //需要预约检查
105
+  inspectAndPatientTransportConfig:any = {timeMod: 30};
105 106
   constructor(
106 107
     private message: NzMessageService,
107 108
     private fb: FormBuilder,
@@ -155,6 +156,7 @@ export class HushijiandanComponent implements OnInit {
155 156
       }
156 157
     });
157 158
     this.getItsmIncident();
159
+    this.getInspectAndPatientTransportConfigTasktype();
158 160
     this.getUpdateTipsForNurses();
159 161
     this.getCloseTimeFlag();
160 162
     this.currentDept = this.tool.getCurrentUserDept();
@@ -427,6 +429,69 @@ export class HushijiandanComponent implements OnInit {
427 429
         }
428 430
       });
429 431
   }
432
+  //获取检查页面任务类型
433
+  getInspectAndPatientTransportConfigTasktype() {
434
+    let postData = {
435
+      idx: 0,
436
+      sum: 10,
437
+      taskType: {
438
+        simpleQuery: true,
439
+        hosId: {
440
+          id: this.currentHospital.id
441
+        },
442
+        associationType: {
443
+          key:"association_types",
444
+          value: 'inspect'
445
+        }
446
+      }
447
+    };
448
+    this.mainService
449
+      .getFetchDataList("simple/data", "taskType", postData)
450
+      .subscribe((result) => {
451
+        if (result.status == 200) {
452
+          let tasktype:any = result.list[0] || {};
453
+          this.getInspectAndPatientTransportConfig(tasktype);
454
+        }
455
+      });
456
+  }
457
+  // 获取检查页面信息配置
458
+  getInspectAndPatientTransportConfig(tasktype) {
459
+    let postData = {
460
+      idx: 0,
461
+      sum: 10,
462
+      taskTypeConfig: {
463
+        taskTypeDTO: {
464
+          hosId: {
465
+            id: this.currentHospital.id
466
+          },
467
+          associationType: tasktype.associationType
468
+        }
469
+      }
470
+    };
471
+    this.mainService
472
+      .getFetchDataList("simple/data", "taskTypeConfig", postData)
473
+      .subscribe((result) => {
474
+        if (result.status == 200) {
475
+          this.inspectAndPatientTransportConfig = result.list[0] || {};
476
+
477
+          // 是否显示排队信息
478
+          if(this.inspectAndPatientTransportConfig.queuingInformation == 1){
479
+            this.getQueuingInformation();
480
+          }
481
+        }
482
+      });
483
+  }
484
+  // 获取排队信息
485
+  queuingInformationList:any[] = [];
486
+  getQueuingInformation() {
487
+    this.mainService
488
+      .coopWorkerOrder("queuingInformation", {})
489
+      .subscribe((result) => {
490
+        if(result.status == 200){
491
+          this.queuingInformationList = result.datalist || [];
492
+        }
493
+      });
494
+  }
430 495
   // 获取护士端更新提示
431 496
   updateTipsForNurses = "";
432 497
   getUpdateTipsForNurses() {
@@ -443,7 +508,7 @@ export class HushijiandanComponent implements OnInit {
443 508
         }
444 509
       });
445 510
   }
446
-  // 获取护士端更新提示
511
+  // 获取标本按钮
447 512
   specimenButton = "";
448 513
   getSpecimenButton() {
449 514
     if(this.currentDept.typeValue == 'surgery'){
@@ -597,7 +662,7 @@ export class HushijiandanComponent implements OnInit {
597 662
         let now = new Date();
598 663
         let nHour = now.getHours();
599 664
         let nMinute = now.getMinutes();
600
-        if (nMinute > 30) {
665
+        if (nMinute > (60 - this.inspectAndPatientTransportConfig.timeMod)) {
601 666
           return range(0, nHour + 1);
602 667
         } else {
603 668
           return range(0, nHour);
@@ -609,13 +674,7 @@ export class HushijiandanComponent implements OnInit {
609 674
         let nHour = now.getHours();
610 675
         let nMinute = now.getMinutes();
611 676
         if (hour === nHour || hour === undefined) {
612
-          if (nMinute == 0) {
613
-            return [];
614
-          } else if (nMinute <= 30 && nMinute > 0) {
615
-            return [0];
616
-          } else {
617
-            return [0, 30];
618
-          }
677
+          return this.integralDivision(0, nMinute, this.inspectAndPatientTransportConfig.timeMod);
619 678
         } else {
620 679
           return [];
621 680
         }
@@ -1675,11 +1734,8 @@ export class HushijiandanComponent implements OnInit {
1675 1734
           return differenceInCalendarDays(current, new Date()) < 0;
1676 1735
         };
1677 1736
       }
1678
-      if (getMinutes(this.yyTime) > 0 && getMinutes(this.yyTime) < 30) {
1679
-        this.yyTime = setMinutes(this.yyTime, 30);
1680
-      } else if (getMinutes(this.yyTime) > 30 && getMinutes(this.yyTime) < 60) {
1681
-        this.yyTime = setMinutes(this.yyTime, 0);
1682
-      }
1737
+      let end = this.getLgNumber(getMinutes(this.yyTime), this.inspectAndPatientTransportConfig.timeMod);
1738
+      this.yyTime = setMinutes(this.yyTime, end);
1683 1739
     }
1684 1740
     this.clickYYFlag = false;
1685 1741
   }
@@ -1696,17 +1752,22 @@ export class HushijiandanComponent implements OnInit {
1696 1752
           return differenceInCalendarDays(current, new Date()) < 0;
1697 1753
         };
1698 1754
       }
1699
-      if (getMinutes(this.yyTimeZy) > 0 && getMinutes(this.yyTimeZy) < 30) {
1700
-        this.yyTimeZy = setMinutes(this.yyTimeZy, 30);
1701
-      } else if (
1702
-        getMinutes(this.yyTimeZy) > 30 &&
1703
-        getMinutes(this.yyTimeZy) < 60
1704
-      ) {
1705
-        this.yyTimeZy = setMinutes(this.yyTimeZy, 0);
1706
-      }
1755
+      let end = this.getLgNumber(getMinutes(this.yyTimeZy), this.inspectAndPatientTransportConfig.timeMod);
1756
+      this.yyTimeZy = setMinutes(this.yyTimeZy, end);
1707 1757
     }
1708 1758
     this.clickYYZyFlag = false;
1709 1759
   }
1760
+
1761
+  // 获取大于x,并且是n的倍数的数字
1762
+  getLgNumber(x: number, n:number): number{
1763
+    for(let i = x; i < 60; i++){
1764
+      if(i % n === 0){
1765
+        return i;
1766
+      }
1767
+    }
1768
+    return 0;
1769
+  }
1770
+
1710 1771
   hidePatientOrder() {
1711 1772
     this.patientModal = false;
1712 1773
     this.clickYYFlag = false;
@@ -2124,13 +2185,9 @@ export class HushijiandanComponent implements OnInit {
2124 2185
       console.log(this.appointmentZyBuildFlag, "seimin");
2125 2186
       this.yyDateZy = new Date();
2126 2187
       this.yyTimeZy = new Date();
2127
-      if (this.yyTimeZy.getMinutes() >= 0 && this.yyTimeZy.getMinutes() <= 30) {
2128
-        this.yyTimeZy.setMinutes(30);
2129
-      } else if (
2130
-        this.yyTimeZy.getMinutes() > 30 &&
2131
-        this.yyTimeZy.getMinutes() < 60
2132
-      ) {
2133
-        this.yyTimeZy.setMinutes(0);
2188
+      let end = this.getLgNumber(this.yyTimeZy.getMinutes(), this.inspectAndPatientTransportConfig.timeMod);
2189
+      this.yyTimeZy.setMinutes(end);
2190
+      if(end === 0){
2134 2191
         this.yyTimeZy.setHours(this.yyTimeZy.getHours() + 1);
2135 2192
       }
2136 2193
     } else {
@@ -2371,34 +2428,39 @@ export class HushijiandanComponent implements OnInit {
2371 2428
     }
2372 2429
   }
2373 2430
   // 禁用小时
2374
-  disabledHours(): number[] {
2431
+  disabledHours = (): number[] => {
2375 2432
     let now = new Date();
2376 2433
     let nHour = now.getHours();
2377 2434
     let nMinute = now.getMinutes();
2378
-    if (nMinute > 30) {
2435
+    if (nMinute > (60 - this.inspectAndPatientTransportConfig.timeMod)) {
2379 2436
       return range(0, nHour + 1);
2380 2437
     } else {
2381 2438
       return range(0, nHour);
2382 2439
     }
2383 2440
   }
2384 2441
   // 禁用分钟
2385
-  disabledMinutes(hour: number): number[] {
2442
+  disabledMinutes = (hour: number): number[] => {
2386 2443
     let now = new Date();
2387 2444
     let nHour = now.getHours();
2388 2445
     let nMinute = now.getMinutes();
2389 2446
     if (hour === nHour || hour === undefined) {
2390
-      if (nMinute == 0) {
2391
-        return [];
2392
-      } else if (nMinute <= 30 && nMinute > 0) {
2393
-        return [0];
2394
-      } else {
2395
-        return [0, 30];
2396
-      }
2447
+      return this.integralDivision(0, nMinute, this.inspectAndPatientTransportConfig.timeMod);
2397 2448
     } else {
2398 2449
       return [];
2399 2450
     }
2400 2451
   }
2401 2452
 
2453
+  // start和end之间能被n整除的所有数字集合
2454
+  integralDivision(start:number, end:number, n:number): number[]{
2455
+    let arr = [];
2456
+    for(let i = start; i <= end; i++){
2457
+      if(i % n === 0){
2458
+        arr.push(i);
2459
+      }
2460
+    }
2461
+    return arr;
2462
+  }
2463
+
2402 2464
   // 快捷一键发起建单
2403 2465
   shortcutMsg; //一键发起信息
2404 2466
   buildMsg: any = {}; //一键发起返回信息

+ 18 - 0
src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.html

@@ -30,6 +30,24 @@
30 30
           <nz-form-label class="label">签到方式</nz-form-label>
31 31
           <nz-checkbox-group class="w320px" [(ngModel)]="checkInModes"></nz-checkbox-group>
32 32
         </div>
33
+        <!-- 检查预约时间是否精准填写 -->
34
+        <div class="display_flex align-items_center mb8">
35
+          <nz-form-label class="label">检查预约时间是否精准填写</nz-form-label>
36
+          <nz-checkbox-group [(ngModel)]="accurateTimeFilling" (ngModelChange)="changeAccurateTimeFilling($event)"></nz-checkbox-group>
37
+          <nz-select *ngIf="accurateTimeFilling[0].checked" class="w320px" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择精确时间模式" [(ngModel)]="timeMod">
38
+            <ng-container *ngFor="let option of timeModes">
39
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
40
+            </ng-container>
41
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
42
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
43
+            </nz-option>
44
+          </nz-select>
45
+        </div>
46
+        <!-- 是否显示排队信息 -->
47
+        <div class="display_flex align-items_center mb8">
48
+          <nz-form-label class="label">是否显示排队信息</nz-form-label>
49
+          <nz-checkbox-group [(ngModel)]="queuingInformation"></nz-checkbox-group>
50
+        </div>
33 51
         <!-- 多人模式支持 -->
34 52
         <div class="display_flex align-items_center mb8">
35 53
           <nz-form-label class="label">多人模式支持</nz-form-label>

+ 34 - 0
src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.ts

@@ -13,6 +13,21 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
13 13
   btnLoading:boolean = false; //提交按钮的loading
14 14
   tabModalName:string = 'characteristics'; //当前选中的tab
15 15
   hosId = this.tool.getCurrentHospital().id; //当前院区
16
+  // 检查预约时间是否精准填写-时间模式
17
+  timeModes:any[] = [
18
+    {id: 1, name: '每分钟'},
19
+    {id: 10, name: '每10分钟'},
20
+    {id: 30, name: '每30分钟'},
21
+  ];
22
+  // 是否开通送回病房
23
+  accurateTimeFilling:any[] = [
24
+    {label:'是否开启',value: 0}
25
+  ];
26
+  // 是否显示排队信息
27
+  queuingInformation:any[] = [
28
+    {label:'是否开启',value: 0}
29
+  ];
30
+  timeMod:any;
16 31
   // 交接方式
17 32
   // handoverMode:any;
18 33
   // handoverModes:any[] = [];
@@ -56,6 +71,14 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
56 71
       this.integralCalculationMethod = null;
57 72
     }
58 73
   }
74
+  // 修改检查预约时间是否精准填写
75
+  changeAccurateTimeFilling(e){
76
+    console.log(e);
77
+    if(!e[0].checked){
78
+      // todo
79
+      this.timeMod = null;
80
+    }
81
+  }
59 82
   //获取积分计算方式
60 83
   integralCalculationMethods:any = [];
61 84
   dLoading = false;
@@ -90,6 +113,10 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
90 113
       this.msg.create("warning", "请选择积分计算方式!");
91 114
       return;
92 115
     }
116
+    if(this.accurateTimeFilling[0].checked && !this.timeMod){
117
+      this.msg.create("warning", "请选择精确时间模式!");
118
+      return;
119
+    }
93 120
     // if(!this.handoverMode){
94 121
     //   this.msg.create("warning", "请选择交接方式!");
95 122
     //   return;
@@ -106,6 +133,9 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
106 133
       hosId: this.hosId,
107 134
       multiplayerMode: this.multiplayerMode[0].checked ? 1 : 0,
108 135
       integralCalculationMethod: this.multiplayerMode[0].checked ? this.integralCalculationMethod : undefined,
136
+      accurateTimeFilling: this.accurateTimeFilling[0].checked ? 1 : 0,
137
+      queuingInformation: this.queuingInformation[0].checked ? 1 : 0,
138
+      timeMod: this.timeMod || undefined,
109 139
       // autoCreate: this.autoCreateOrders[0].checked ? 1 : 0,
110 140
       // autoDept: this.autoDepts[0].checked ? 1 : 0,
111 141
       // handoverType: {id: this.handoverMode},
@@ -212,6 +242,10 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
212 242
           }
213 243
           this.multiplayerMode[0].checked = this.configs.multiplayerMode == 1;
214 244
           this.integralCalculationMethod = this.configs.integralCalculationMethod;
245
+          this.accurateTimeFilling[0].checked = this.configs.accurateTimeFilling == 1;
246
+          this.timeMod = this.configs.timeMod || null;
247
+          this.queuingInformation[0].checked = this.configs.queuingInformation == 1;
248
+
215 249
 
216 250
           // if(this.configs.closeTypeIds){
217 251
           //   let ids = this.configs.closeTypeIds.split(',');