|
@@ -27,8 +27,6 @@ export class PharmacyComponent implements OnInit {
|
27
|
27
|
constructor(private mainService: MainService, public router: Router) {}
|
28
|
28
|
//待配药数据
|
29
|
29
|
codes = [];
|
30
|
|
- // 登录切换效果
|
31
|
|
- loginFlag = false;
|
32
|
30
|
// 待配药
|
33
|
31
|
printPharmacyList = []; //数据列表
|
34
|
32
|
printPharmacyIdx = 0; //页码
|
|
@@ -47,19 +45,20 @@ export class PharmacyComponent implements OnInit {
|
47
|
45
|
pharmacyFlag = false;
|
48
|
46
|
pharmacySearchKey = "";
|
49
|
47
|
pharmacyLoad = false;
|
50
|
|
- //当前登录人所属科室
|
51
|
|
- currentDept = "";
|
|
48
|
+
|
|
49
|
+ // other
|
|
50
|
+ loginUser: any = localStorage.getItem("user")
|
|
51
|
+ ? JSON.parse(localStorage.getItem("user")).user
|
|
52
|
+ : null; //登录人信息
|
52
|
53
|
|
53
|
54
|
ngOnInit() {
|
|
55
|
+ this.changeKs();
|
54
|
56
|
// 待配药列表
|
55
|
57
|
this.getPharmacyList(this.printPharmacyIdx, 1, this.printPharmacySearchKey);
|
56
|
58
|
// 配药中列表
|
57
|
59
|
this.getPharmacyList(this.waitPharmacyIdx, 2, this.waitPharmacySearchKey);
|
58
|
60
|
// 核对中列表
|
59
|
61
|
this.getPharmacyList(this.pharmacyIdx, 3, this.pharmacySearchKey);
|
60
|
|
- //当前登录人所属科室
|
61
|
|
- this.currentDept = JSON.parse(localStorage.getItem("user")).user.dept.dept;
|
62
|
|
-
|
63
|
62
|
this.initRole();
|
64
|
63
|
}
|
65
|
64
|
// 药房端药房列表查询、搜索
|
|
@@ -225,10 +224,6 @@ export class PharmacyComponent implements OnInit {
|
225
|
224
|
}
|
226
|
225
|
});
|
227
|
226
|
}
|
228
|
|
- // 退出按钮切换效果
|
229
|
|
- toggleLogin() {
|
230
|
|
- this.loginFlag = !this.loginFlag;
|
231
|
|
- }
|
232
|
227
|
//待配药
|
233
|
228
|
print(id?) {
|
234
|
229
|
let arr = [];
|
|
@@ -327,4 +322,50 @@ export class PharmacyComponent implements OnInit {
|
327
|
322
|
this.fixedTab = type;
|
328
|
323
|
}
|
329
|
324
|
}
|
|
325
|
+ //药房端科室切换
|
|
326
|
+ changeShow = true;
|
|
327
|
+ closeTime = 3;
|
|
328
|
+ closeTimeFlag = 0;
|
|
329
|
+ hsPromptModalShow: boolean = true; //科室切换提示框是否展示
|
|
330
|
+ timerCloseTime = null;
|
|
331
|
+ deptDisplay = 1; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
|
|
332
|
+ //子传父接收
|
|
333
|
+ closeModelHs(e) {
|
|
334
|
+ this.hsPromptModalShow = JSON.parse(e).show;
|
|
335
|
+ this.changeShow = JSON.parse(e).changeShow;
|
|
336
|
+ }
|
|
337
|
+ //子传父接收
|
|
338
|
+ clearModelHs(e) {
|
|
339
|
+ if (JSON.parse(e).clear === true) {
|
|
340
|
+ clearInterval(this.timerCloseTime);
|
|
341
|
+ }
|
|
342
|
+ this.changeShow = JSON.parse(e).changeShow;
|
|
343
|
+ }
|
|
344
|
+ // 头部切换科室
|
|
345
|
+ changeKsNow() {
|
|
346
|
+ this.hsPromptModalShow = true;
|
|
347
|
+ clearInterval(this.timerCloseTime);
|
|
348
|
+ this.changeShow = false;
|
|
349
|
+ }
|
|
350
|
+ // 切换科室
|
|
351
|
+ changeKs() {
|
|
352
|
+ this.hsPromptModalShow = true;
|
|
353
|
+ // (1) 当用户设置为正数时,用户必须查看此窗体指定秒数。
|
|
354
|
+ // (2) 当用户设置为负数时,用户可点击知道了也可倒计时自动关闭。
|
|
355
|
+ // (3) 如果用户填写0则为无自动关闭和强制查看时间。
|
|
356
|
+ if (this.closeTimeFlag === 0) {
|
|
357
|
+ return;
|
|
358
|
+ }
|
|
359
|
+ this.closeTime = Math.abs(this.closeTimeFlag);
|
|
360
|
+ clearInterval(this.timerCloseTime);
|
|
361
|
+ this.timerCloseTime = setInterval(() => {
|
|
362
|
+ this.closeTime = Math.max(--this.closeTime, 0);
|
|
363
|
+ if (this.closeTime === 0) {
|
|
364
|
+ if (this.closeTimeFlag <= 0) {
|
|
365
|
+ this.hsPromptModalShow = false;
|
|
366
|
+ }
|
|
367
|
+ clearInterval(this.timerCloseTime);
|
|
368
|
+ }
|
|
369
|
+ }, 1000);
|
|
370
|
+ }
|
330
|
371
|
}
|