Browse Source

Merge branch 'lmm' into develop

seimin 3 years ago
parent
commit
7d114c59e1

+ 1 - 1
proxy.conf.json

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

+ 6 - 4
src/app/share/allocation-worker/allocation-worker.component.html

@@ -4,12 +4,13 @@
4 4
     <div nz-row class="select">
5 5
       <div nz-col nzSpan="6">
6 6
         <div class="label">人员姓名:</div>
7
-        <input nz-input placeholder="请输入人员姓名" [(ngModel)]="searchName" nzSize="default" (ngModelChange)="searchInp()" />
7
+        <input [disabled]="nameMask" nz-input placeholder="请输入人员姓名" [(ngModel)]="searchName" nzSize="default"
8
+          (ngModelChange)="searchInp('worker')" />
8 9
       </div>
9 10
       <div nz-col nzSpan="6" class="ml8">
10 11
         <div class="label">人员分组:</div>
11
-        <nz-select style="width: 220px;" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="checkedGroup"
12
-          (ngModelChange)="searchInp()" nzPlaceHolder="请选择人员分组">
12
+        <nz-select nzAllowClear [nzDisabled]="groupMask" style="width: 220px;" [nzDropdownMatchSelectWidth]="false"
13
+          [(ngModel)]="checkedGroup" (ngModelChange)="searchInp('group')" nzPlaceHolder="请选择人员分组">
13 14
           <nz-option *ngFor="let optionData of groupList" [nzLabel]="optionData.groupName" [nzValue]="optionData.id">
14 15
           </nz-option>
15 16
         </nz-select>
@@ -46,7 +47,8 @@
46 47
     </div>
47 48
   </div>
48 49
   <div class="btns display_flex justify-content_flex-center">
49
-    <button nz-button nzType="primary" [nzLoading]="btnLoading" (click)="submit()" *ngIf="mapOfCheckedId[worderId]">确认</button>
50
+    <button nz-button nzType="primary" [nzLoading]="btnLoading" (click)="submit()"
51
+      *ngIf="mapOfCheckedId[worderId]">确认</button>
50 52
     <button class=" btn cancel" nz-button nzType="default" (click)="close()">取消</button>
51 53
   </div>
52 54
 </div>

+ 34 - 32
src/app/share/allocation-worker/allocation-worker.component.ts

@@ -17,8 +17,10 @@ export class AllocationWorkerComponent implements OnInit {
17 17
   ) {}
18 18
 
19 19
   ngOnInit() {
20
+    this.groupList = JSON.parse(
21
+      localStorage.getItem("user")
22
+    ).user.scope.groupIds;
20 23
     this.getWorkerList();
21
-    // this.getGroupList();
22 24
   }
23 25
   // 支助人员数据
24 26
   workerList = [];
@@ -42,13 +44,13 @@ export class AllocationWorkerComponent implements OnInit {
42 44
 
43 45
   // 支助人员数据
44 46
   groupList: Array<{ groupName: string; id: string }> = []; //分组下拉框
45
-  groupIds;
46 47
   snum = 0;
47 48
   loading1 = false;
49
+  nameMask = false; //是否禁用
50
+  groupMask = false; //是否禁用
48 51
   getWorkerList(pageIndex?) {
49
-    let that = this;
50
-    that.id = that.route.snapshot.paramMap.get("id");
51
-    that.stateId = that.route.snapshot.paramMap.get("stateId");
52
+    this.id = this.route.snapshot.paramMap.get("id");
53
+    this.stateId = this.route.snapshot.paramMap.get("stateId");
52 54
     this.pageIndex = pageIndex ? pageIndex : this.pageIndex;
53 55
 
54 56
     let groupsId = [];
@@ -58,18 +60,25 @@ export class AllocationWorkerComponent implements OnInit {
58 60
       }
59 61
     );
60 62
 
61
-    let postData = {
63
+    let postData: any = {
62 64
       idx: this.pageIndex - 1,
63
-      sum: that.pageSize,
64
-      // workOrderId: that.id,
65
-      groupId: that.checkedGroup ? that.checkedGroup : "",
66
-      groupIds: that.groupIds ? that.groupIds : "",
67
-      name: that.searchName,
65
+      sum: this.pageSize,
66
+      groupIds: "",
68 67
       hosId: this.route.snapshot.paramMap.get("hosId"),
69 68
     };
69
+    if (this.searchName) {
70
+      postData.name = this.searchName;
71
+    } else {
72
+      delete postData.name;
73
+    }
74
+    if (this.checkedGroup) {
75
+      postData.groupId = this.checkedGroup;
76
+    } else {
77
+      delete postData.groupId;
78
+    }
70 79
     this.snum++;
71 80
     this.loading1 = true;
72
-    that.mainService
81
+    this.mainService
73 82
       .getSerInfo("getOnlineWorker", postData)
74 83
       .subscribe((data) => {
75 84
         this.snum--;
@@ -77,36 +86,29 @@ export class AllocationWorkerComponent implements OnInit {
77 86
           this.loading1 = false;
78 87
         }
79 88
         console.log(data);
80
-        that.workerList = data.data;
81
-        that.listLength = data.totalNum;
82
-        if (data.groupIds) {
83
-          // 获取分组
84
-          that.groupIds = data.groupIds;
85
-          that.mainService
86
-            .coopData("group", "findGroup", { groupIds: data.groupIds })
87
-            .subscribe((res) => {
88
-              that.groupList = res.data;
89
-            });
90
-        } else {
91
-          that.groupList = [];
92
-        }
89
+        this.workerList = data.data;
90
+        this.listLength = data.totalNum;
93 91
       });
94 92
   }
95 93
 
96 94
   // 输入用户信息搜索节流阀
97 95
   time: any;
98
-  searchInp() {
99
-    let that = this;
100
-    // clearTimeout(that.time);
101
-    // that.time = setTimeout(() => {
102
-    that.getWorkerList(1);
103
-    // }, 2000);
96
+  searchInp(type) {
97
+    this.getWorkerList(1);
98
+    console.log(type);
99
+    if (type == "worker") {
100
+      this.groupMask = Boolean(this.searchName);
101
+    } else if (type == "group") {
102
+      this.nameMask = Boolean(this.checkedGroup);
103
+    }
104 104
   }
105 105
 
106 106
   // 选择分配支助人员
107 107
   worderId = 0; //支助人员id
108 108
   checkAllotWorker(id, flag?): void {
109
-    this.mapOfCheckedId = { [id]: flag?!this.mapOfCheckedId[id]:this.mapOfCheckedId[id] };
109
+    this.mapOfCheckedId = {
110
+      [id]: flag ? !this.mapOfCheckedId[id] : this.mapOfCheckedId[id],
111
+    };
110 112
     this.worderId = id;
111 113
   }
112 114
 

+ 33 - 15
src/app/views/fuwutai/fuwutai.component.html

@@ -72,18 +72,31 @@
72 72
     <div class="lists">
73 73
       <div class="head">
74 74
         <span class="auto_tit">未分派({{unassignedList.length}}条)</span>
75
+        <div class="ml8 auto_building">
76
+          <nz-select class="auto_building_select" [(ngModel)]="unassignedBuilding" nzMode="multiple"
77
+            nzPlaceHolder="请选择楼栋" (nzOpenChange)="openChangeUnassignedBuilding($event)"
78
+            (ngModelChange)="changeUnassignedBuilding($event)">
79
+            <ng-container *ngFor="let option of unassignedBuildings">
80
+              <nz-option *ngIf="!bLoading" [nzLabel]="option[0]+'('+option[2]+')'" [nzValue]="option[3]">
81
+              </nz-option>
82
+            </ng-container>
83
+            <nz-option *ngIf="bLoading" nzDisabled nzCustomContent>
84
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
85
+            </nz-option>
86
+          </nz-select>
87
+        </div>
75 88
         <span class="toLastTime">刷新倒计时<span class="time">{{orderRefreshTime}}s</span></span>
76 89
       </div>
77 90
       <div class="searchBox">
78
-        <div class="search">
79
-          <input type="text" placeholder="请输入关键字" [(ngModel)]="unassignedSearchCon">
80
-          <div class="magnifier" (click)="searchUnassigned()">
91
+        <label nz-checkbox [(ngModel)]="allUnassignedList" (ngModelChange)="changeAllUnassignedList($event)">全选</label>
92
+        <div class="search wp60">
93
+          <input class="wp75" type="text" placeholder="请输入关键字" [(ngModel)]="unassignedSearchCon">
94
+          <div class="magnifier wp20" (click)="searchUnassigned()">
81 95
             <i class="icon_transport transport-sousuo"></i>
82 96
             <span>搜索</span>
83 97
           </div>
84 98
         </div>
85
-        <button nz-button nzType="primary" (click)="batchDispatch()" nzSize="small"
86
-          [disabled]="!batchType">批量派单</button>
99
+        <button nz-button nzType="primary" (click)="batchDispatch()" [disabled]="!batchType">批量派单</button>
87 100
       </div>
88 101
       <div class="cots_body weifenpai" *ngIf="txtLabelCol==1">
89 102
         <overlay-scrollbars #osComponentRef2 [ngStyle]="{ height:'100%' }">
@@ -94,7 +107,8 @@
94 107
                 <div class="gongdan" (click)="batchDispatchSelect(!data.checked,data.id)">
95 108
                   <span class="left mr8"><label nz-checkbox [ngModel]="data.checked"
96 109
                       (ngModelChange)="batchDispatchSelect($event,data.id)"></label></span>
97
-                  <span class="left">{{data.taskType.taskName}}({{data.gdcode}})</span>
110
+                  <span class="left gongdan_name" nz-tooltip
111
+                    [nzTooltipTitle]="data.taskType.taskName+'('+data.gdcode+')'">{{data.taskType.taskName}}({{data.gdcode}})</span>
98 112
                   <span>{{data.worker?data.worker.name:''}}</span>
99 113
                   <span class="right">
100 114
                     <span [ngClass]="{'colorRed':data.timeOut==true}">{{data.gdState.name}}</span>
@@ -239,15 +253,15 @@
239 253
         <span class="toLastTime">刷新倒计时<span class="time">{{orderRefreshTime}}s</span></span>
240 254
       </div>
241 255
       <div class="searchBox">
242
-        <div class="search">
243
-          <input type="text" placeholder="请输入关键字" [(ngModel)]="arriveSearchCon">
244
-          <div class="magnifier" (click)="searchArrive()">
256
+        <label nz-checkbox [(ngModel)]="allArriveList" (ngModelChange)="changeAllArriveList($event)">全选</label>
257
+        <div class="search wp60">
258
+          <input class="wp75" type="text" placeholder="请输入关键字" [(ngModel)]="arriveSearchCon">
259
+          <div class="magnifier wp20" (click)="searchArrive()">
245 260
             <i class="icon_transport transport-sousuo"></i>
246 261
             <span>搜索</span>
247 262
           </div>
248 263
         </div>
249
-        <button nz-button nzType="primary" (click)="batchWithdrawal()" nzSize="small"
250
-          [disabled]="!batchType1">批量撤回</button>
264
+        <button nz-button nzType="primary" (click)="batchWithdrawal()" [disabled]="!batchType1">批量撤回</button>
251 265
       </div>
252 266
       <div class="cots_body daidaoda" *ngIf="txtLabelCol==1">
253 267
         <overlay-scrollbars #osComponentRef3 [ngStyle]="{ height:'100%' }">
@@ -258,7 +272,8 @@
258 272
                 <div class="gongdan" (click)="batchWithdrawalSelect(!data.checked,data.id)">
259 273
                   <span class="left mr8"><label nz-checkbox [ngModel]="data.checked"
260 274
                       (ngModelChange)="batchWithdrawalSelect($event,data.id)"></label></span>
261
-                  <span class="left">{{data.taskType.taskName}}({{data.gdcode}})</span>
275
+                  <span class="left gongdan_name" nz-tooltip
276
+                    [nzTooltipTitle]="data.taskType.taskName+'('+data.gdcode+')'">{{data.taskType.taskName}}({{data.gdcode}})</span>
262 277
                   <span>{{data.worker?data.worker.name:''}}</span>
263 278
                   <span class="right">
264 279
                     <span [ngClass]="{'colorRed':data.timeOut==true}">{{data.gdState.name}}</span>
@@ -266,7 +281,8 @@
266 281
                 </div>
267 282
                 <!-- 地点 -->
268 283
                 <div class="didian" (click)='openDetails(data.id,data.taskType.associationType.id)'>
269
-                  <span class="left" *ngIf="data.taskType.associationType&&data.taskType.associationType.value=='inspect'">
284
+                  <span class="left"
285
+                    *ngIf="data.taskType.associationType&&data.taskType.associationType.value=='inspect'">
270 286
                     {{data.startDept?data.startDept.dept:''}}
271 287
                     <span *ngFor="let item of data.middleDept">
272 288
                       ->{{item.dept}}
@@ -419,7 +435,8 @@
419 435
               <div class="left_cots" (click)='openDetails(data.id,data.taskType.associationType.id)'>
420 436
                 <!-- 工单 -->
421 437
                 <div class="gongdan">
422
-                  <span class="left">{{data.taskType.taskName}}({{data.gdcode}})</span>
438
+                  <span class="left gongdan_name" nz-tooltip
439
+                    [nzTooltipTitle]="data.taskType.taskName+'('+data.gdcode+')'">{{data.taskType.taskName}}({{data.gdcode}})</span>
423 440
                   <span>{{data.worker?data.worker.name:''}}</span>
424 441
                   <span class="right">
425 442
                     <span [ngClass]="{'colorRed':data.timeOut==true}">{{data.gdState.name}}</span>
@@ -427,7 +444,8 @@
427 444
                 </div>
428 445
                 <!-- 地点 -->
429 446
                 <div class="didian">
430
-                  <span class="left" *ngIf="data.taskType.associationType&&data.taskType.associationType.value=='inspect'">
447
+                  <span class="left"
448
+                    *ngIf="data.taskType.associationType&&data.taskType.associationType.value=='inspect'">
431 449
                     {{data.startDept?data.startDept.dept:''}}
432 450
                     <span *ngFor="let item of data.middleDept">
433 451
                       ->{{item.dept}}

+ 24 - 2
src/app/views/fuwutai/fuwutai.component.less

@@ -305,6 +305,8 @@
305 305
 
306 306
   /* 头部 */
307 307
   .lists .head {
308
+    display: flex;
309
+    align-items: center;
308 310
     width: 100%;
309 311
     height: 40px;
310 312
     line-height: 40px;
@@ -336,6 +338,20 @@
336 338
     font-weight: bold;
337 339
     font-size: 16px;
338 340
   }
341
+  .lists .head .auto_building {
342
+    display: inline-block;
343
+    width: 160px;
344
+    height: 32px;
345
+    overflow: hidden;
346
+    .auto_building_select {
347
+      width: 100%;
348
+      height: 100%;
349
+      /deep/ .ant-select-selection {
350
+        height: 100%;
351
+        overflow: hidden;
352
+      }
353
+    }
354
+  }
339 355
 
340 356
   .lists .head .shuaxin {
341 357
     float: right;
@@ -364,7 +380,7 @@
364 380
 
365 381
     .search {
366 382
       height: 34px;
367
-      width: 80%;
383
+      width: 90%;
368 384
       background-color: white;
369 385
       border: 1px rgb(225, 229, 232) solid;
370 386
       border-radius: 20px;
@@ -561,6 +577,12 @@
561 577
     color: #333;
562 578
     font-size: 14px;
563 579
   }
580
+  .gongdan_name {
581
+    max-width: 60% !important;
582
+    overflow: hidden !important;
583
+    text-overflow: ellipsis !important;
584
+    white-space: nowrap !important;
585
+  }
564 586
 
565 587
   .weifenpai .left_cots .gongdan .right {
566 588
     float: right;
@@ -1226,7 +1248,7 @@
1226 1248
   }
1227 1249
 
1228 1250
   .toLastTime {
1229
-    float: right;
1251
+    margin-left: auto;
1230 1252
     color: #999999;
1231 1253
     font-size: 12px;
1232 1254
 

+ 72 - 1
src/app/views/fuwutai/fuwutai.component.ts

@@ -154,6 +154,55 @@ export class FuwutaiComponent implements OnInit {
154 154
   searchHosDepartmentSubject = new Subject();
155 155
   searchHosDepartmentQtSubject = new Subject();
156 156
   searchPatientListSubject = new Subject();
157
+  // 打开选择楼栋多选框
158
+  openChangeUnassignedBuilding(e) {
159
+    if (e) {
160
+      this.getUnassignedBuilding();
161
+    }
162
+  }
163
+  // 获取楼栋-未派单
164
+  unassignedBuildings = [];
165
+  unassignedBuilding = [];
166
+  bLoading = false;
167
+  getUnassignedBuilding() {
168
+    let postData = {
169
+      hosId: this.checkedHos,
170
+      unassignedOder: 1, //未派单
171
+    };
172
+    this.bLoading = true;
173
+    this.mainService
174
+      .getBuildingOrFloor("building", postData)
175
+      .subscribe((result) => {
176
+        this.bLoading = false;
177
+        if (result.status == 200) {
178
+          this.unassignedBuildings = result.data;
179
+        }
180
+      });
181
+  }
182
+  // 选中未派单列表-全选
183
+  changeAllUnassignedList(e) {
184
+    this.unassignedList.forEach((v) => (v.checked = e));
185
+    this.unassignedList.forEach((item1) => {
186
+      this.unassignedListClone.forEach((item2) => {
187
+        if (item1.id == item2.id) {
188
+          item2.checked = item1.checked;
189
+        }
190
+      });
191
+    });
192
+    this.batchType = this.unassignedListClone.some((item) => item.checked);
193
+  }
194
+  // 选中待到达列表-全选
195
+  changeAllArriveList(e) {
196
+    this.arriveList.forEach((v) => (v.checked = e));
197
+    this.arriveList.forEach((item1) => {
198
+      this.arriveListClone.forEach((item2) => {
199
+        if (item1.id == item2.id) {
200
+          item2.checked = item1.checked;
201
+        }
202
+      });
203
+    });
204
+    this.batchType1 = this.arriveListClone.some((item) => item.checked);
205
+  }
157 206
   // 添加备注
158 207
   addRemarks(item) {
159 208
     this.remarksEle.nativeElement.focus();
@@ -198,6 +247,7 @@ export class FuwutaiComponent implements OnInit {
198 247
     this.openRecallModal(ids.join("-"));
199 248
   }
200 249
   // 批量分派选中
250
+  allUnassignedList = false;
201 251
   batchDispatchSelect(e, id) {
202 252
     this.unassignedList.forEach((item) => {
203 253
       if (item.id == id) {
@@ -212,8 +262,16 @@ export class FuwutaiComponent implements OnInit {
212 262
       });
213 263
     });
214 264
     this.batchType = this.unassignedListClone.some((item) => item.checked);
265
+    if (this.unassignedListClone.length) {
266
+      this.allUnassignedList = this.unassignedListClone.every(
267
+        (item) => item.checked
268
+      );
269
+    } else {
270
+      this.allUnassignedList = false;
271
+    }
215 272
   }
216 273
   // 批量撤回选中
274
+  allArriveList = false;
217 275
   batchWithdrawalSelect(e, id) {
218 276
     this.arriveList.forEach((item) => {
219 277
       if (item.id == id) {
@@ -228,6 +286,11 @@ export class FuwutaiComponent implements OnInit {
228 286
       });
229 287
     });
230 288
     this.batchType1 = this.arriveListClone.some((item) => item.checked);
289
+    if (this.arriveListClone.length) {
290
+      this.allArriveList = this.arriveListClone.every((item) => item.checked);
291
+    } else {
292
+      this.allArriveList = false;
293
+    }
231 294
   }
232 295
 
233 296
   // 获取科室
@@ -797,6 +860,9 @@ export class FuwutaiComponent implements OnInit {
797 860
     };
798 861
     postData.workOrder["keyWord"] = keyWords;
799 862
     if (stateId == 1) {
863
+      if (this.unassignedBuilding.length) {
864
+        postData.workOrder["buildingIds"] = this.unassignedBuilding.toString();
865
+      }
800 866
       that.loading1 = true;
801 867
       that.loading2 = that.loading3 = false;
802 868
     } else if (stateId == 2) {
@@ -818,6 +884,7 @@ export class FuwutaiComponent implements OnInit {
818 884
               item.checked = false;
819 885
             });
820 886
             that.batchType = false;
887
+            that.allUnassignedList = false;
821 888
             that.unassignedListClone = JSON.parse(
822 889
               JSON.stringify(that.unassignedList)
823 890
             );
@@ -855,6 +922,7 @@ export class FuwutaiComponent implements OnInit {
855 922
               item.checked = false;
856 923
             });
857 924
             that.batchType1 = false;
925
+            that.allArriveList = false;
858 926
             that.arriveListClone = JSON.parse(JSON.stringify(that.arriveList));
859 927
           } else {
860 928
             that.arriveList.forEach((item1) => {
@@ -957,7 +1025,10 @@ export class FuwutaiComponent implements OnInit {
957 1025
       this.router.navigateByUrl("dispatchingDesk/detailOthers/" + id);
958 1026
     }
959 1027
   }
960
-
1028
+  // 选择楼栋
1029
+  changeUnassignedBuilding(e) {
1030
+    this.getOrderList(1);
1031
+  }
961 1032
   // 未分派搜索
962 1033
   searchUnassigned() {
963 1034
     // let that = this;

+ 9 - 0
src/common.less

@@ -16,6 +16,15 @@
16 16
 .w100 {
17 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 28
 .dib {
20 29
   display: inline-block !important;
21 30
 }