Browse Source

护士端修改

seimin 4 months ago
parent
commit
0f9dcda80c

+ 27 - 15
src/app/components/build-quick-confirm/build-quick-confirm.component.html

@@ -1,10 +1,10 @@
1
 <div class="save add display_flex align-items_center justify-content_flex-center">
1
 <div class="save add display_flex align-items_center justify-content_flex-center">
2
-  <div class="modalBody">
3
-    <div class="title">{{buildQuickConfirmData.name}}<i class="icon_transport transport-guanbi" (click)="cancel()"></i>
2
+  <div class="modalBody" *ngIf="pagePermissionConfig.id">
3
+    <div class="title">{{pagePermissionConfig.name}}<i class="icon_transport transport-guanbi" (click)="cancel()"></i>
4
     </div>
4
     </div>
5
     <div class="contentBody">
5
     <div class="contentBody">
6
       <overlay-scrollbars #osComponentRef1 class="nav">
6
       <overlay-scrollbars #osComponentRef1 class="nav">
7
-        <div class="navItem ellipsis-oneline" [title]="item.taskName" [ngClass]="{ active: activeTabId === item.id }" (click)="clickTab(item)" *ngFor="let item of buildQuickConfirmData.taskTypeList">{{item.taskName}}</div>
7
+        <div class="navItem ellipsis-oneline" [title]="item.taskName" [ngClass]="{ active: activeTabId === item.id }" (click)="clickTab(item)" *ngFor="let item of pagePermissionConfig.taskTypeList">{{item.taskName}}</div>
8
       </overlay-scrollbars>
8
       </overlay-scrollbars>
9
       <div class="body modalBody_box">
9
       <div class="body modalBody_box">
10
         <div class="modalBody_left" *ngIf="!nLoading && activeTabId">
10
         <div class="modalBody_left" *ngIf="!nLoading && activeTabId">
@@ -124,7 +124,7 @@
124
                   </div>
124
                   </div>
125
                 </div>
125
                 </div>
126
                 <!-- 其他 (护士端一键建单展策略)起点科室和终点科室下拉展示 -->
126
                 <!-- 其他 (护士端一键建单展策略)起点科室和终点科室下拉展示 -->
127
-                <div class="content" *ngIf="buildMsg.status != 100013 && buildMsg.status != 100014 && buildMsg.status != 100015">
127
+                <div class="content" *ngIf="buildMsg.status != 100013 && buildMsg.status != 100014 && buildMsg.status != 100015 && buildMsg.status != 100009 && buildType != 'specimen'">
128
                   <div>
128
                   <div>
129
                     <form nz-form [formGroup]="shortcutForm" class="shortcutForm">
129
                     <form nz-form [formGroup]="shortcutForm" class="shortcutForm">
130
                       <nz-form-item nz-row>
130
                       <nz-form-item nz-row>
@@ -144,17 +144,23 @@
144
                 </div>
144
                 </div>
145
                 <!-- 工号 -->
145
                 <!-- 工号 -->
146
                 <div style="width: 100%; margin: 10px auto 0" *ngIf="buildMsg.reserveUserSwitch == 1">
146
                 <div style="width: 100%; margin: 10px auto 0" *ngIf="buildMsg.reserveUserSwitch == 1">
147
-                  <p><span class="red">*</span>工号:</p>
148
-                  <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="searchAccount($event)" nzPlaceHolder="请选择工号" [(ngModel)]="account" (ngModelChange)="changeAccount($event)">
149
-                    <ng-container *ngFor="let option of accountList">
150
-                      <nz-option *ngIf="!isLoading" [nzLabel]="option.account + '-' + option.name" [nzValue]="option.id">
151
-                      </nz-option>
152
-                    </ng-container>
153
-                    <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
154
-                      <i nz-icon nzType="loading" class="loading-icon"></i>
155
-                      搜索中...
156
-                    </nz-option>
157
-                  </nz-select>
147
+                  <div nz-row class="tabRow">
148
+                    <div nz-col [nzSpan]="6">
149
+                      <p><span class="red">*</span>工号:</p>
150
+                    </div>
151
+                    <div nz-col [nzSpan]="14">
152
+                      <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="searchAccount($event)" nzPlaceHolder="请选择工号" [(ngModel)]="account" (ngModelChange)="changeAccount($event)">
153
+                        <ng-container *ngFor="let option of accountList">
154
+                          <nz-option *ngIf="!isLoading" [nzLabel]="option.account + '-' + option.name" [nzValue]="option.id">
155
+                          </nz-option>
156
+                        </ng-container>
157
+                        <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
158
+                          <i nz-icon nzType="loading" class="loading-icon"></i>
159
+                          搜索中...
160
+                        </nz-option>
161
+                      </nz-select>
162
+                    </div>
163
+                  </div>
158
                 </div>
164
                 </div>
159
                 <!-- 工单备注: -->
165
                 <!-- 工单备注: -->
160
                 <div class="w100" *ngIf="buildMsg.remarksSwitch == 1">
166
                 <div class="w100" *ngIf="buildMsg.remarksSwitch == 1">
@@ -205,4 +211,10 @@
205
       <button nzType="primary" nz-button (click)="confirm()" *ngIf="buildMsg.status != 100009 && buildMsg.status != 100010" [nzLoading]="loading5">确认</button>
211
       <button nzType="primary" nz-button (click)="confirm()" *ngIf="buildMsg.status != 100009 && buildMsg.status != 100010" [nzLoading]="loading5">确认</button>
206
     </div>
212
     </div>
207
   </div>
213
   </div>
214
+  <div class="modalBody" *ngIf="!pagePermissionConfig.id">
215
+    <div class="modalBody_left nLoading">
216
+      <img src="../../../assets/images/loading.gif" alt="" />
217
+      <div>加载中...</div>
218
+    </div>
219
+  </div>
208
 </div>
220
 </div>

+ 21 - 21
src/app/components/build-quick-confirm/build-quick-confirm.component.less

@@ -65,27 +65,6 @@
65
           color: @primary-color;
65
           color: @primary-color;
66
           cursor: pointer;
66
           cursor: pointer;
67
         }
67
         }
68
-        .modalBody_left {
69
-          width: 100%;
70
-          height: 100%;
71
-          display: flex;
72
-          flex-direction: column;
73
-          justify-content: space-between;
74
-
75
-          &.nLoading,
76
-          &.noData {
77
-            justify-content: center;
78
-            align-items: center;
79
-
80
-            img {
81
-              width: 24px;
82
-            }
83
-
84
-            div {
85
-              display: inline-block;
86
-            }
87
-          }
88
-        }
89
 
68
 
90
         .modalBody_left_box {
69
         .modalBody_left_box {
91
           height: 100%;
70
           height: 100%;
@@ -146,3 +125,24 @@
146
     }
125
     }
147
   }
126
   }
148
 }
127
 }
128
+.modalBody_left {
129
+  width: 100%;
130
+  height: 100%;
131
+  display: flex;
132
+  flex-direction: column;
133
+  justify-content: space-between;
134
+
135
+  &.nLoading,
136
+  &.noData {
137
+    justify-content: center;
138
+    align-items: center;
139
+
140
+    img {
141
+      width: 24px;
142
+    }
143
+
144
+    div {
145
+      display: inline-block;
146
+    }
147
+  }
148
+}

+ 74 - 8
src/app/components/build-quick-confirm/build-quick-confirm.component.ts

@@ -4,6 +4,8 @@ import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
4
 import { FormGroup, FormBuilder, FormControl } from '@angular/forms';
4
 import { FormGroup, FormBuilder, FormControl } from '@angular/forms';
5
 import { MainService } from 'src/app/services/main.service';
5
 import { MainService } from 'src/app/services/main.service';
6
 import { ToolService } from 'src/app/services/tool.service';
6
 import { ToolService } from 'src/app/services/tool.service';
7
+import { Subject } from 'rxjs';
8
+import { debounceTime } from 'rxjs/operators';
7
 
9
 
8
 @Component({
10
 @Component({
9
   selector: 'app-build-quick-confirm',
11
   selector: 'app-build-quick-confirm',
@@ -21,9 +23,9 @@ export class BuildQuickConfirmComponent implements OnInit {
21
   @Output() confirmModal = new EventEmitter();
23
   @Output() confirmModal = new EventEmitter();
22
   @Input() buildQuickConfirmData: any = {};//数据
24
   @Input() buildQuickConfirmData: any = {};//数据
23
   @Input() loading5: boolean = false;//loading
25
   @Input() loading5: boolean = false;//loading
24
-  allHospital: any;//所有院区
25
   hosLoading: boolean = false;//确定按钮的loading
26
   hosLoading: boolean = false;//确定按钮的loading
26
   configurationCenterMenus: any[] = [];//配置中心菜单
27
   configurationCenterMenus: any[] = [];//配置中心菜单
28
+  searchAccountSubject = new Subject(); //查工号防抖
27
   constructor(
29
   constructor(
28
     private mainService: MainService,
30
     private mainService: MainService,
29
     private fb: FormBuilder,
31
     private fb: FormBuilder,
@@ -31,11 +33,12 @@ export class BuildQuickConfirmComponent implements OnInit {
31
   ) { }
33
   ) { }
32
 
34
 
33
   ngOnInit() {
35
   ngOnInit() {
34
-    this.buildQuickConfirmData.taskTypeList = this.buildQuickConfirmData.taskTypeList || [];
35
-    if(this.buildQuickConfirmData.taskTypeList.length > 0){
36
-      this.clickTab(this.buildQuickConfirmData.taskTypeList[0]);
37
-    }
38
-    console.log(this.buildQuickConfirmData)
36
+    this.getPagePermissionConfigById();
37
+    //防抖
38
+    this.getAccountList();
39
+    this.searchAccountSubject.pipe(debounceTime(500)).subscribe((v:any) => {
40
+      this.getAccountList(v);
41
+    });
39
   }
42
   }
40
 
43
 
41
   activeTabId:any;
44
   activeTabId:any;
@@ -182,13 +185,76 @@ export class BuildQuickConfirmComponent implements OnInit {
182
       });
185
       });
183
   }
186
   }
184
 
187
 
188
+  // 工号输入搜索
189
+  searchAccount(e) {
190
+    this.searchAccountSubject.next(e);
191
+  }
192
+
193
+  // 根据工号获取用户
194
+  account = null;
195
+  accountList = [];
196
+  getAccountList(key = ''): void {
197
+    let postData = {
198
+      idx: 0,
199
+      sum: 10,
200
+      user: {
201
+        account: key,
202
+        hospital: {
203
+          id: this.tool.getCurrentHospital().id
204
+        }
205
+      }
206
+    };
207
+    this.isLoading = true;
208
+    this.mainService
209
+      .getFetchDataList("data", "user", postData)
210
+      .subscribe((data) => {
211
+        this.isLoading = false;
212
+        this.accountList = data.list || [];
213
+      });
214
+  }
215
+
216
+  // 修改工号
217
+  userAccount = null;
218
+  changeAccount(e){
219
+    this.userAccount =this.accountList.find(v => v.id == e);
220
+  }
221
+
222
+  // 根据ID获取快捷配置
223
+  pagePermissionConfig: any = {};
224
+  getPagePermissionConfigById() {
225
+    let data = {
226
+			idx: 0,
227
+			sum: 99999,
228
+			pagePermissionConfig: {
229
+        id: this.buildQuickConfirmData.id,
230
+        taskTypeDeptId: this.tool.getCurrentUserDept().id,
231
+      },
232
+		};
233
+		this.mainService
234
+			.getFetchDataList("simple/data", "pagePermissionConfig", data)
235
+			.subscribe((data) => {
236
+				let pagePermissionConfigList = data.list || [];
237
+        if(pagePermissionConfigList.length){
238
+          this.pagePermissionConfig = pagePermissionConfigList[0];
239
+
240
+          // 默认选中第一项
241
+          this.pagePermissionConfig.taskTypeList = this.pagePermissionConfig.taskTypeList || [];
242
+          if(this.pagePermissionConfig.taskTypeList.length > 0){
243
+            this.clickTab(this.pagePermissionConfig.taskTypeList[0]);
244
+          }
245
+        }else{
246
+          this.pagePermissionConfig = {};
247
+        }
248
+			});
249
+  }
250
+
185
   // 取消
251
   // 取消
186
   cancel() {
252
   cancel() {
187
     this.cancelModal.emit(false)
253
     this.cancelModal.emit(false)
188
   }
254
   }
189
   // 确认
255
   // 确认
190
   confirm() {
256
   confirm() {
191
-    let taskType = this.buildQuickConfirmData.taskTypeList.find(item => item.id == this.activeTabId);
192
-    this.confirmModal.emit({taskType, shortcutForm: this.shortcutForm, buildMsg: this.buildMsg, workOrderRemark: this.workOrderRemark})
257
+    let taskType = this.pagePermissionConfig.taskTypeList.find(item => item.id == this.activeTabId);
258
+    this.confirmModal.emit({taskType, shortcutForm: this.shortcutForm, buildMsg: this.buildMsg, workOrderRemark: this.workOrderRemark, userAccount: this.userAccount})
193
   }
259
   }
194
 }
260
 }

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

@@ -206,7 +206,7 @@
206
             <div class="cont">
206
             <div class="cont">
207
               <div class="top" [ngSwitch]="currentDept.typeValue">
207
               <div class="top" [ngSwitch]="currentDept.typeValue">
208
                 <div class="nums borderB" nz-row *ngSwitchCase="'outpatientService'" hidden></div>
208
                 <div class="nums borderB" nz-row *ngSwitchCase="'outpatientService'" hidden></div>
209
-                <div class="nums borderB" nz-row *ngSwitchCase="'surgery'">
209
+                <div class="nums borderB surgeryNums" nz-row *ngSwitchCase="'surgery'">
210
                   <!-- 手术未开通 -->
210
                   <!-- 手术未开通 -->
211
                   <div
211
                   <div
212
                     *ngIf="!deptTaskTypeRules.openPatientTransport && !surgeryLoading"
212
                     *ngIf="!deptTaskTypeRules.openPatientTransport && !surgeryLoading"
@@ -353,7 +353,7 @@
353
                       <div class="navIcon" [ngClass]="backColorComputed(item.icon.extra1)"><i class="icon_transport" [ngClass]="[item.icon.extra1]"></i></div>
353
                       <div class="navIcon" [ngClass]="backColorComputed(item.icon.extra1)"><i class="icon_transport" [ngClass]="[item.icon.extra1]"></i></div>
354
                       <div class="navContent">
354
                       <div class="navContent">
355
                         <h2>{{item.name}}</h2>
355
                         <h2>{{item.name}}</h2>
356
-                        <div class="navSpecimen" *ngIf="item.urgentFlag || item.ordinaryFlag">
356
+                        <div class="navSpecimen" *ngIf="(item.urgentFlag || item.ordinaryFlag) && deptTaskTypeRules.openSpecimen">
357
                           <span *ngIf="item.urgentFlag" (click)="changeSpeDetail($event, 1)">急:<span class="red">{{ specimenWorkOrderMsg.specimenCount ? specimenWorkOrderMsg.specimenCount.urgent : 0 }}</span></span>
357
                           <span *ngIf="item.urgentFlag" (click)="changeSpeDetail($event, 1)">急:<span class="red">{{ specimenWorkOrderMsg.specimenCount ? specimenWorkOrderMsg.specimenCount.urgent : 0 }}</span></span>
358
                           <span *ngIf="item.ordinaryFlag" (click)="changeSpeDetail($event, 0)">普:{{ specimenWorkOrderMsg.specimenCount ? specimenWorkOrderMsg.specimenCount.noUrgent : 0 }}</span>
358
                           <span *ngIf="item.ordinaryFlag" (click)="changeSpeDetail($event, 0)">普:{{ specimenWorkOrderMsg.specimenCount ? specimenWorkOrderMsg.specimenCount.noUrgent : 0 }}</span>
359
                         </div>
359
                         </div>

+ 3 - 0
src/app/views/hushijiandan/hushijiandan.component.less

@@ -1346,6 +1346,9 @@
1346
             .nums {
1346
             .nums {
1347
               height: 57px;
1347
               height: 57px;
1348
               position: relative;
1348
               position: relative;
1349
+              &.surgeryNums{
1350
+                height: 88px;
1351
+              }
1349
               &.nurseNav{
1352
               &.nurseNav{
1350
                 display: flex;
1353
                 display: flex;
1351
                 align-items: center;
1354
                 align-items: center;

+ 2 - 2
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -660,7 +660,6 @@ export class HushijiandanComponent implements OnInit {
660
 			pagePermissionConfig: {
660
 			pagePermissionConfig: {
661
         hosId: this.currentHospital.id,
661
         hosId: this.currentHospital.id,
662
         active: 1,
662
         active: 1,
663
-        taskTypeDeptId: this.loginUser.dept.id,
664
       },
663
       },
665
 		};
664
 		};
666
 		this.mainService
665
 		this.mainService
@@ -4933,7 +4932,7 @@ export class HushijiandanComponent implements OnInit {
4933
   }
4932
   }
4934
   loadingQuick:boolean = false;
4933
   loadingQuick:boolean = false;
4935
   confirmBuildQuickConfirm(options){
4934
   confirmBuildQuickConfirm(options){
4936
-    let { taskType, shortcutForm, buildMsg, workOrderRemark } = options;
4935
+    let { taskType, shortcutForm, buildMsg, workOrderRemark, userAccount } = options;
4937
     if(taskType.associationType.value === 'other' || taskType.associationType.value === 'ordinary'){
4936
     if(taskType.associationType.value === 'other' || taskType.associationType.value === 'ordinary'){
4938
       // 其他临床服务|万能交接
4937
       // 其他临床服务|万能交接
4939
       this.loadingQuick = this.loading5;
4938
       this.loadingQuick = this.loading5;
@@ -4941,6 +4940,7 @@ export class HushijiandanComponent implements OnInit {
4941
       this.shortcutMsg = taskType;
4940
       this.shortcutMsg = taskType;
4942
       this.buildMsg = buildMsg;
4941
       this.buildMsg = buildMsg;
4943
       this.workOrderRemark = workOrderRemark;
4942
       this.workOrderRemark = workOrderRemark;
4943
+      this.userAccount = userAccount;
4944
       this.confirmShortcut(shortcutForm, taskType.associationType.value);
4944
       this.confirmShortcut(shortcutForm, taskType.associationType.value);
4945
     }else if(taskType.associationType.value === 'specimen'){
4945
     }else if(taskType.associationType.value === 'specimen'){
4946
       // 标本配送
4946
       // 标本配送