Browse Source

调度台增加全选

seimin 3 years ago
parent
commit
4014cdee0e

+ 14 - 12
src/app/views/fuwutai/fuwutai.component.html

@@ -75,15 +75,15 @@
75
         <span class="toLastTime">刷新倒计时<span class="time">{{orderRefreshTime}}s</span></span>
75
         <span class="toLastTime">刷新倒计时<span class="time">{{orderRefreshTime}}s</span></span>
76
       </div>
76
       </div>
77
       <div class="searchBox">
77
       <div class="searchBox">
78
-        <div class="search">
79
-          <input type="text" placeholder="请输入关键字" [(ngModel)]="unassignedSearchCon">
80
-          <div class="magnifier" (click)="searchUnassigned()">
78
+        <label nz-checkbox [(ngModel)]="allUnassignedList" (ngModelChange)="changeAllUnassignedList($event)">全选</label>
79
+        <div class="search wp60">
80
+          <input class="wp75" type="text" placeholder="请输入关键字" [(ngModel)]="unassignedSearchCon">
81
+          <div class="magnifier wp20" (click)="searchUnassigned()">
81
             <i class="icon_transport transport-sousuo"></i>
82
             <i class="icon_transport transport-sousuo"></i>
82
             <span>搜索</span>
83
             <span>搜索</span>
83
           </div>
84
           </div>
84
         </div>
85
         </div>
85
-        <button nz-button nzType="primary" (click)="batchDispatch()" nzSize="small"
86
-          [disabled]="!batchType">批量派单</button>
86
+        <button nz-button nzType="primary" (click)="batchDispatch()" [disabled]="!batchType">批量派单</button>
87
       </div>
87
       </div>
88
       <div class="cots_body weifenpai" *ngIf="txtLabelCol==1">
88
       <div class="cots_body weifenpai" *ngIf="txtLabelCol==1">
89
         <overlay-scrollbars #osComponentRef2 [ngStyle]="{ height:'100%' }">
89
         <overlay-scrollbars #osComponentRef2 [ngStyle]="{ height:'100%' }">
@@ -239,15 +239,15 @@
239
         <span class="toLastTime">刷新倒计时<span class="time">{{orderRefreshTime}}s</span></span>
239
         <span class="toLastTime">刷新倒计时<span class="time">{{orderRefreshTime}}s</span></span>
240
       </div>
240
       </div>
241
       <div class="searchBox">
241
       <div class="searchBox">
242
-        <div class="search">
243
-          <input type="text" placeholder="请输入关键字" [(ngModel)]="arriveSearchCon">
244
-          <div class="magnifier" (click)="searchArrive()">
242
+        <label nz-checkbox [(ngModel)]="allArriveList" (ngModelChange)="changeAllArriveList($event)">全选</label>
243
+        <div class="search wp60">
244
+          <input class="wp75" type="text" placeholder="请输入关键字" [(ngModel)]="arriveSearchCon">
245
+          <div class="magnifier wp20" (click)="searchArrive()">
245
             <i class="icon_transport transport-sousuo"></i>
246
             <i class="icon_transport transport-sousuo"></i>
246
             <span>搜索</span>
247
             <span>搜索</span>
247
           </div>
248
           </div>
248
         </div>
249
         </div>
249
-        <button nz-button nzType="primary" (click)="batchWithdrawal()" nzSize="small"
250
-          [disabled]="!batchType1">批量撤回</button>
250
+        <button nz-button nzType="primary" (click)="batchWithdrawal()" [disabled]="!batchType1">批量撤回</button>
251
       </div>
251
       </div>
252
       <div class="cots_body daidaoda" *ngIf="txtLabelCol==1">
252
       <div class="cots_body daidaoda" *ngIf="txtLabelCol==1">
253
         <overlay-scrollbars #osComponentRef3 [ngStyle]="{ height:'100%' }">
253
         <overlay-scrollbars #osComponentRef3 [ngStyle]="{ height:'100%' }">
@@ -266,7 +266,8 @@
266
                 </div>
266
                 </div>
267
                 <!-- 地点 -->
267
                 <!-- 地点 -->
268
                 <div class="didian" (click)='openDetails(data.id,data.taskType.associationType.id)'>
268
                 <div class="didian" (click)='openDetails(data.id,data.taskType.associationType.id)'>
269
-                  <span class="left" *ngIf="data.taskType.associationType&&data.taskType.associationType.value=='inspect'">
269
+                  <span class="left"
270
+                    *ngIf="data.taskType.associationType&&data.taskType.associationType.value=='inspect'">
270
                     {{data.startDept?data.startDept.dept:''}}
271
                     {{data.startDept?data.startDept.dept:''}}
271
                     <span *ngFor="let item of data.middleDept">
272
                     <span *ngFor="let item of data.middleDept">
272
                       ->{{item.dept}}
273
                       ->{{item.dept}}
@@ -427,7 +428,8 @@
427
                 </div>
428
                 </div>
428
                 <!-- 地点 -->
429
                 <!-- 地点 -->
429
                 <div class="didian">
430
                 <div class="didian">
430
-                  <span class="left" *ngIf="data.taskType.associationType&&data.taskType.associationType.value=='inspect'">
431
+                  <span class="left"
432
+                    *ngIf="data.taskType.associationType&&data.taskType.associationType.value=='inspect'">
431
                     {{data.startDept?data.startDept.dept:''}}
433
                     {{data.startDept?data.startDept.dept:''}}
432
                     <span *ngFor="let item of data.middleDept">
434
                     <span *ngFor="let item of data.middleDept">
433
                       ->{{item.dept}}
435
                       ->{{item.dept}}

+ 1 - 1
src/app/views/fuwutai/fuwutai.component.less

@@ -364,7 +364,7 @@
364
 
364
 
365
     .search {
365
     .search {
366
       height: 34px;
366
       height: 34px;
367
-      width: 80%;
367
+      width: 90%;
368
       background-color: white;
368
       background-color: white;
369
       border: 1px rgb(225, 229, 232) solid;
369
       border: 1px rgb(225, 229, 232) solid;
370
       border-radius: 20px;
370
       border-radius: 20px;

+ 40 - 0
src/app/views/fuwutai/fuwutai.component.ts

@@ -154,6 +154,30 @@ export class FuwutaiComponent implements OnInit {
154
   searchHosDepartmentSubject = new Subject();
154
   searchHosDepartmentSubject = new Subject();
155
   searchHosDepartmentQtSubject = new Subject();
155
   searchHosDepartmentQtSubject = new Subject();
156
   searchPatientListSubject = new Subject();
156
   searchPatientListSubject = new Subject();
157
+  // 选中未派单列表-全选
158
+  changeAllUnassignedList(e) {
159
+    this.unassignedList.forEach((v) => (v.checked = e));
160
+    this.unassignedList.forEach((item1) => {
161
+      this.unassignedListClone.forEach((item2) => {
162
+        if (item1.id == item2.id) {
163
+          item2.checked = item1.checked;
164
+        }
165
+      });
166
+    });
167
+    this.batchType = this.unassignedListClone.some((item) => item.checked);
168
+  }
169
+  // 选中待到达列表-全选
170
+  changeAllArriveList(e) {
171
+    this.arriveList.forEach((v) => (v.checked = e));
172
+    this.arriveList.forEach((item1) => {
173
+      this.arriveListClone.forEach((item2) => {
174
+        if (item1.id == item2.id) {
175
+          item2.checked = item1.checked;
176
+        }
177
+      });
178
+    });
179
+    this.batchType1 = this.arriveListClone.some((item) => item.checked);
180
+  }
157
   // 添加备注
181
   // 添加备注
158
   addRemarks(item) {
182
   addRemarks(item) {
159
     this.remarksEle.nativeElement.focus();
183
     this.remarksEle.nativeElement.focus();
@@ -198,6 +222,7 @@ export class FuwutaiComponent implements OnInit {
198
     this.openRecallModal(ids.join("-"));
222
     this.openRecallModal(ids.join("-"));
199
   }
223
   }
200
   // 批量分派选中
224
   // 批量分派选中
225
+  allUnassignedList = false;
201
   batchDispatchSelect(e, id) {
226
   batchDispatchSelect(e, id) {
202
     this.unassignedList.forEach((item) => {
227
     this.unassignedList.forEach((item) => {
203
       if (item.id == id) {
228
       if (item.id == id) {
@@ -212,8 +237,16 @@ export class FuwutaiComponent implements OnInit {
212
       });
237
       });
213
     });
238
     });
214
     this.batchType = this.unassignedListClone.some((item) => item.checked);
239
     this.batchType = this.unassignedListClone.some((item) => item.checked);
240
+    if (this.unassignedListClone.length) {
241
+      this.allUnassignedList = this.unassignedListClone.every(
242
+        (item) => item.checked
243
+      );
244
+    } else {
245
+      this.allUnassignedList = false;
246
+    }
215
   }
247
   }
216
   // 批量撤回选中
248
   // 批量撤回选中
249
+  allArriveList = false;
217
   batchWithdrawalSelect(e, id) {
250
   batchWithdrawalSelect(e, id) {
218
     this.arriveList.forEach((item) => {
251
     this.arriveList.forEach((item) => {
219
       if (item.id == id) {
252
       if (item.id == id) {
@@ -228,6 +261,11 @@ export class FuwutaiComponent implements OnInit {
228
       });
261
       });
229
     });
262
     });
230
     this.batchType1 = this.arriveListClone.some((item) => item.checked);
263
     this.batchType1 = this.arriveListClone.some((item) => item.checked);
264
+    if (this.arriveListClone.length) {
265
+      this.allArriveList = this.arriveListClone.every((item) => item.checked);
266
+    } else {
267
+      this.allArriveList = false;
268
+    }
231
   }
269
   }
232
 
270
 
233
   // 获取科室
271
   // 获取科室
@@ -818,6 +856,7 @@ export class FuwutaiComponent implements OnInit {
818
               item.checked = false;
856
               item.checked = false;
819
             });
857
             });
820
             that.batchType = false;
858
             that.batchType = false;
859
+            that.allUnassignedList = false;
821
             that.unassignedListClone = JSON.parse(
860
             that.unassignedListClone = JSON.parse(
822
               JSON.stringify(that.unassignedList)
861
               JSON.stringify(that.unassignedList)
823
             );
862
             );
@@ -855,6 +894,7 @@ export class FuwutaiComponent implements OnInit {
855
               item.checked = false;
894
               item.checked = false;
856
             });
895
             });
857
             that.batchType1 = false;
896
             that.batchType1 = false;
897
+            that.allArriveList = false;
858
             that.arriveListClone = JSON.parse(JSON.stringify(that.arriveList));
898
             that.arriveListClone = JSON.parse(JSON.stringify(that.arriveList));
859
           } else {
899
           } else {
860
             that.arriveList.forEach((item1) => {
900
             that.arriveList.forEach((item1) => {

+ 9 - 0
src/common.less

@@ -16,6 +16,15 @@
16
 .w100 {
16
 .w100 {
17
   width: 100% !important;
17
   width: 100% !important;
18
 }
18
 }
19
+.wp75 {
20
+  width: 75% !important;
21
+}
22
+.wp60 {
23
+  width: 60% !important;
24
+}
25
+.wp20 {
26
+  width: 20% !important;
27
+}
19
 .dib {
28
 .dib {
20
   display: inline-block !important;
29
   display: inline-block !important;
21
 }
30
 }