Browse Source

服务台未派单增加楼栋筛选

seimin 3 years ago
parent
commit
1da386c842

+ 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": {

+ 19 - 6
src/app/views/fuwutai/fuwutai.component.html

@@ -72,9 +72,19 @@
72 72
     <div class="lists">
73 73
       <div class="head">
74 74
         <span class="auto_tit">未分派({{unassignedList.length}}条)</span>
75
-        <nz-select [(ngModel)]="unassignedBuilding" nzMode="multiple" nzPlaceHolder="请选择楼栋">
76
-          <nz-option *ngFor="let option of listOfOption" [nzLabel]="option.label" [nzValue]="option.value"></nz-option>
77
-        </nz-select>
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>
78 88
         <span class="toLastTime">刷新倒计时<span class="time">{{orderRefreshTime}}s</span></span>
79 89
       </div>
80 90
       <div class="searchBox">
@@ -97,7 +107,8 @@
97 107
                 <div class="gongdan" (click)="batchDispatchSelect(!data.checked,data.id)">
98 108
                   <span class="left mr8"><label nz-checkbox [ngModel]="data.checked"
99 109
                       (ngModelChange)="batchDispatchSelect($event,data.id)"></label></span>
100
-                  <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>
101 112
                   <span>{{data.worker?data.worker.name:''}}</span>
102 113
                   <span class="right">
103 114
                     <span [ngClass]="{'colorRed':data.timeOut==true}">{{data.gdState.name}}</span>
@@ -261,7 +272,8 @@
261 272
                 <div class="gongdan" (click)="batchWithdrawalSelect(!data.checked,data.id)">
262 273
                   <span class="left mr8"><label nz-checkbox [ngModel]="data.checked"
263 274
                       (ngModelChange)="batchWithdrawalSelect($event,data.id)"></label></span>
264
-                  <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>
265 277
                   <span>{{data.worker?data.worker.name:''}}</span>
266 278
                   <span class="right">
267 279
                     <span [ngClass]="{'colorRed':data.timeOut==true}">{{data.gdState.name}}</span>
@@ -423,7 +435,8 @@
423 435
               <div class="left_cots" (click)='openDetails(data.id,data.taskType.associationType.id)'>
424 436
                 <!-- 工单 -->
425 437
                 <div class="gongdan">
426
-                  <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>
427 440
                   <span>{{data.worker?data.worker.name:''}}</span>
428 441
                   <span class="right">
429 442
                     <span [ngClass]="{'colorRed':data.timeOut==true}">{{data.gdState.name}}</span>

+ 23 - 1
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;
@@ -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
 

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

@@ -154,6 +154,31 @@ 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
+  }
157 182
   // 选中未派单列表-全选
158 183
   changeAllUnassignedList(e) {
159 184
     this.unassignedList.forEach((v) => (v.checked = e));
@@ -835,6 +860,9 @@ export class FuwutaiComponent implements OnInit {
835 860
     };
836 861
     postData.workOrder["keyWord"] = keyWords;
837 862
     if (stateId == 1) {
863
+      if (this.unassignedBuilding.length) {
864
+        postData.workOrder["buildingIds"] = this.unassignedBuilding.toString();
865
+      }
838 866
       that.loading1 = true;
839 867
       that.loading2 = that.loading3 = false;
840 868
     } else if (stateId == 2) {
@@ -997,7 +1025,10 @@ export class FuwutaiComponent implements OnInit {
997 1025
       this.router.navigateByUrl("dispatchingDesk/detailOthers/" + id);
998 1026
     }
999 1027
   }
1000
-
1028
+  // 选择楼栋
1029
+  changeUnassignedBuilding(e) {
1030
+    this.getOrderList(1);
1031
+  }
1001 1032
   // 未分派搜索
1002 1033
   searchUnassigned() {
1003 1034
     // let that = this;