ソースを参照

在系统配置管理中增加护士科室切换提示自动关闭设置

seimin 3 年 前
コミット
2e44b7d4d1

+ 8 - 4
src/app/share/hs-prompt-modal/hs-prompt-modal.component.html

@@ -1,13 +1,17 @@
1 1
 <div class="modal display_flex justify-content_flex-center align-items_center" *ngIf="show">
2 2
   <div class="modalBody" *ngIf="changeShow">
3
-    <div class="title">当前科室<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
3
+    <div class="title">当前科室<i *ngIf="closeTimeFlag<=0||closeTimeFlag>0&&closeTime===0"
4
+        class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4 5
     <div class="content">
5 6
       <div class="defeat">{{currentDept.dept}}</div>
6
-      <div class="countDown">关闭倒计时<em>{{closeTime}}s</em></div>
7
+      <div class="countDown" *ngIf="closeTimeFlag<0||closeTimeFlag>0&&closeTime>0"><span
8
+          *ngIf="closeTimeFlag<0">关闭</span>倒计时<em>{{closeTime}}s</em></div>
7 9
     </div>
8 10
     <div class="display_flex justify-content_flex-center">
9
-      <button class="btn know" nz-button nzType="primary" (click)="hideModal()">知道了</button>
10
-      <button class="btn know" nz-button nzType="primary" nzGhost (click)="changeModal()">切换科室</button>
11
+      <button *ngIf="closeTimeFlag<=0||closeTimeFlag>0&&closeTime===0" class="btn know" nz-button nzType="primary"
12
+        (click)="hideModal()">知道了</button>
13
+      <button *ngIf="closeTimeFlag<=0||closeTimeFlag>0&&closeTime===0" class="btn know" nz-button nzType="primary"
14
+        nzGhost (click)="changeModal()">切换科室</button>
11 15
     </div>
12 16
   </div>
13 17
   <div class="modalBody modalBody-search" *ngIf="!changeShow">

+ 1 - 0
src/app/share/hs-prompt-modal/hs-prompt-modal.component.ts

@@ -23,6 +23,7 @@ export class HsPromptModalComponent implements OnInit {
23 23
   @Input() show: Boolean;
24 24
   @Input() changeShow: Boolean;
25 25
   @Input() closeTime: Number;
26
+  @Input() closeTimeFlag;
26 27
 
27 28
   @Output() closeModelHs = new EventEmitter<any>(); //1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
28 29
   @Output() clearModelHs = new EventEmitter<any>(); //1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件

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

@@ -1268,7 +1268,7 @@
1268 1268
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
1269 1269
   [info]="promptInfo" [back]="back" (closeModel)="closeModel($event)"></app-prompt-modal>
1270 1270
 <!-- 护士端科室切换提示框 -->
1271
-<app-hs-prompt-modal [changeShow]="changeShow" [closeTime]="closeTime" [show]="hsPromptModalShow"
1271
+<app-hs-prompt-modal [changeShow]="changeShow" [closeTime]="closeTime" [closeTimeFlag]="closeTimeFlag" [show]="hsPromptModalShow"
1272 1272
   (closeModelHs)="closeModelHs($event)" (clearModelHs)="clearModelHs($event)"></app-hs-prompt-modal>
1273 1273
 <!-- 标本历史记录查看 -->
1274 1274
 <app-history-prompt-modal *ngIf="historyPromptModalShow" [show]="historyPromptModalShow" [scode]="scode"

+ 34 - 5
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -122,6 +122,7 @@ export class HushijiandanComponent implements OnInit {
122 122
   }
123 123
   // 关闭倒计时
124 124
   closeTime = 3;
125
+  closeTimeFlag;
125 126
   timerCloseTime = null;
126 127
   changeShow = true;
127 128
   currentHospital; //当前院区
@@ -130,6 +131,7 @@ export class HushijiandanComponent implements OnInit {
130 131
   logTime = 0; //综合日志自动刷新秒数
131 132
   logTimeConst = 30; //综合日志自动刷新秒数
132 133
   ngOnInit() {
134
+    this.getCloseTimeFlag();
133 135
     this.currentUser = this.tool.getCurrentUserDept();
134 136
     console.log(this.currentUser, this.tabSearchCont);
135 137
     //防抖
@@ -140,7 +142,7 @@ export class HushijiandanComponent implements OnInit {
140 142
       this.getDeptTaskType(v);
141 143
     });
142 144
     this.currentHospital = this.tool.getCurrentHospital();
143
-    this.changeKs();
145
+
144 146
     this.initLogin();
145 147
     this.getDeptTaskType();
146 148
     this.initForm();
@@ -210,6 +212,25 @@ export class HushijiandanComponent implements OnInit {
210 212
     this.remarksEle.nativeElement.focus();
211 213
     this.workOrderRemark += item;
212 214
   }
215
+  // 获取护士端弹窗的配置
216
+  // (1)	当用户设置为正数时,用户必须查看此窗体指定秒数。
217
+  // (2)	当用户设置为负数时,用户可点击知道了也可倒计时自动关闭。
218
+  // (3)	如果用户填写0则为无自动关闭和强制查看时间。
219
+  getCloseTimeFlag() {
220
+    let postData = {
221
+      idx: 0,
222
+      sum: 1,
223
+      systemConfiguration: { keyconfig: "nurseDeptSwitchTip" },
224
+    };
225
+    this.mainService
226
+      .getFetchDataList("simple/data", "systemConfiguration", postData)
227
+      .subscribe((result) => {
228
+        if (result.status == 200) {
229
+          this.closeTimeFlag = result.list[0].valueconfig - 0;
230
+          this.changeKs();
231
+        }
232
+      });
233
+  }
213 234
   //获取综合日志
214 235
   rLoading = false;
215 236
   listDeptOrderRecords: any = [];
@@ -349,12 +370,20 @@ export class HushijiandanComponent implements OnInit {
349 370
   // 切换科室
350 371
   changeKs() {
351 372
     this.hsPromptModalShow = true;
352
-    this.closeTime = 3;
373
+    // (1)	当用户设置为正数时,用户必须查看此窗体指定秒数。
374
+    // (2)	当用户设置为负数时,用户可点击知道了也可倒计时自动关闭。
375
+    // (3)	如果用户填写0则为无自动关闭和强制查看时间。
376
+    if (this.closeTimeFlag === 0) {
377
+      return;
378
+    }
379
+    this.closeTime = Math.abs(this.closeTimeFlag);
353 380
     clearInterval(this.timerCloseTime);
354 381
     this.timerCloseTime = setInterval(() => {
355
-      this.closeTime = Math.max(--this.closeTime, -1);
356
-      if (this.closeTime === -1) {
357
-        this.hsPromptModalShow = false;
382
+      this.closeTime = Math.max(--this.closeTime, 0);
383
+      if (this.closeTime === 0) {
384
+        if (this.closeTimeFlag <= 0) {
385
+          this.hsPromptModalShow = false;
386
+        }
358 387
         clearInterval(this.timerCloseTime);
359 388
       }
360 389
     }, 1000);

+ 7 - 0
src/app/views/sys-config/sys-config.component.html

@@ -92,6 +92,13 @@
92 92
             </nz-select>
93 93
           </nz-form-control>
94 94
         </nz-form-item>
95
+        <nz-form-item class="formItem">
96
+          <nz-form-label [nzSpan]="13" nzFor="nurseDeptSwitchTip" nzRequired class="label">护士科室切换提示自动关闭设置
97
+          </nz-form-label>
98
+          <nz-form-control [nzSpan]="11" nzErrorTip="护士科室切换提示自动关闭设置是必填项!">
99
+            <nz-input-number class="w100" formControlName="nurseDeptSwitchTip" [nzStep]="1"></nz-input-number>
100
+          </nz-form-control>
101
+        </nz-form-item>
95 102
       </div>
96 103
     </form>
97 104
   </div>

+ 7 - 0
src/app/views/sys-config/sys-config.component.ts

@@ -37,6 +37,7 @@ export class SysConfigComponent implements OnInit {
37 37
       orderClearUserSwitch: [null, [Validators.required]],
38 38
       deptQRCode: [null, [Validators.required]],
39 39
       workOrderSettings: [5, [Validators.required]],
40
+      nurseDeptSwitchTip: [0, [Validators.required]],
40 41
       defaultRoleOfNurse: [null, [Validators.required]],
41 42
       formUrl: [{ value: null, disabled: true }, [Validators.required]],
42 43
       serviceUrl: [{ value: null, disabled: true }, [Validators.required]],
@@ -94,6 +95,7 @@ export class SysConfigComponent implements OnInit {
94 95
         item.keyconfig === "orderClearUserSwitch" ||
95 96
         item.keyconfig === "deptQRCode" ||
96 97
         item.keyconfig === "workOrderSettings" ||
98
+        item.keyconfig === "nurseDeptSwitchTip" ||
97 99
         item.keyconfig === "defaultRoleOfNurse" ||
98 100
         item.keyconfig === "busiViewDeptId"
99 101
     );
@@ -109,6 +111,8 @@ export class SysConfigComponent implements OnInit {
109 111
         item.valueconfig = this.validateForm.controls.deptQRCode.value;
110 112
       } else if (item.keyconfig === "workOrderSettings") {
111 113
         item.valueconfig = this.validateForm.controls.workOrderSettings.value;
114
+      } else if (item.keyconfig === "nurseDeptSwitchTip") {
115
+        item.valueconfig = this.validateForm.controls.nurseDeptSwitchTip.value;
112 116
       } else if (item.keyconfig === "defaultRoleOfNurse") {
113 117
         item.valueconfig = this.validateForm.controls.defaultRoleOfNurse.value;
114 118
       } else if (item.keyconfig === "busiViewDeptId") {
@@ -176,6 +180,9 @@ export class SysConfigComponent implements OnInit {
176 180
                 case "workOrderSettings":
177 181
                   this.validateForm.controls.workOrderSettings.setValue(c[1]);
178 182
                   break;
183
+                case "nurseDeptSwitchTip":
184
+                  this.validateForm.controls.nurseDeptSwitchTip.setValue(c[1]);
185
+                  break;
179 186
                 case "defaultRoleOfNurse":
180 187
                   this.validateForm.controls.defaultRoleOfNurse.setValue(
181 188
                     c[1] - 0