Explorar o código

调度台列表

seimin hai 7 meses
pai
achega
4fc5b2b36f

+ 22 - 0
src/app/components/incidentManagement/incident-reject/incident-reject.component.html

@@ -0,0 +1,22 @@
1
+<div class="save display_flex justify-content_flex-center align-items_center add">
2
+  <div class="modalBody">
3
+    <div class="title">不受理<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <div class="content">
5
+      <form nz-form [formGroup]="validateForm" class="addForm">
6
+        <nz-form-item>
7
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="rejectRemark">不受理原因</nz-form-label>
8
+          <nz-form-control [nzSpan]="18" nzErrorTip="请填写不受理原因!">
9
+            <textarea rows="4" nz-input formControlName="rejectRemark" placeholder="请填写不受理原因"></textarea>
10
+          </nz-form-control>
11
+        </nz-form-item>
12
+      </form>
13
+    </div>
14
+    <div class="display_flex justify-content_flex-center">
15
+      <button nz-button nzType="primary" (click)="submitForm()"[nzLoading]="isLoading">确认</button>
16
+      <button nz-button nzType="default" class="btn cancel" (click)="hideModal()">取消</button>
17
+    </div>
18
+  </div>
19
+</div>
20
+
21
+<!-- 遮罩 -->
22
+<app-mask *ngIf="maskFlag"></app-mask>

+ 125 - 0
src/app/components/incidentManagement/incident-reject/incident-reject.component.less

@@ -0,0 +1,125 @@
1
+@import "../../../../../src/theme.less";
2
+.save {
3
+  position: fixed;
4
+  left: 0;
5
+  top: 0;
6
+  width: 100%;
7
+  height: 100%;
8
+  background: rgba(0, 0, 0, 0.4);
9
+  z-index: 999;
10
+
11
+  .modalBody {
12
+    width: 350px;
13
+    background: #fff;
14
+    border-radius: 5px;
15
+    padding: 10px 20px;
16
+    color: #333;
17
+
18
+    .title {
19
+      width: 100%;
20
+      text-align: center;
21
+      font-size: 18px;
22
+      position: relative;
23
+
24
+      i {
25
+        position: absolute;
26
+        right: 0;
27
+        top: 0;
28
+        font-size: 20px;
29
+        color: #666;
30
+        cursor: pointer;
31
+        padding: 0 5px;
32
+      }
33
+    }
34
+
35
+    .content {
36
+      width: 100%;
37
+      height: 117px;
38
+      background: #f9fafb;
39
+      border: 1px solid #e5e9ed;
40
+      border-radius: 5px;
41
+      overflow: hidden;
42
+      margin-top: 12px;
43
+
44
+      div {
45
+        text-align: center;
46
+        margin: 0;
47
+
48
+        &.icon {
49
+          margin-top: 17px;
50
+
51
+          i {
52
+            color: #34b349;
53
+            font-size: 30px !important;
54
+
55
+            &.transport-wenhao {
56
+              color: #f5a523;
57
+            }
58
+
59
+            &.transport-shibai {
60
+              color: #ff3a52;
61
+            }
62
+          }
63
+        }
64
+
65
+        &.defeat {
66
+          color: #333;
67
+          font-size: 16px;
68
+        }
69
+
70
+        &:nth-child(3) {
71
+          font-size: 14px;
72
+          color: #666;
73
+        }
74
+      }
75
+    }
76
+
77
+    button {
78
+      margin-top: 10px;
79
+
80
+      &.btn {
81
+        margin-left: 8px;
82
+      }
83
+    }
84
+  }
85
+
86
+  // 新增
87
+  &.add {
88
+    .modalBody {
89
+      width: 480px;
90
+      height: auto;
91
+
92
+      .content {
93
+        width: 100%;
94
+        height: auto;
95
+        padding: 19px 14px 0 14px;
96
+        max-height: 500px;
97
+        overflow-y: auto;
98
+
99
+        .addForm {
100
+          .ant-form-item {
101
+            margin-bottom: 14px;
102
+
103
+            .ant-form-item-label {
104
+              text-align: left;
105
+            }
106
+          }
107
+        }
108
+
109
+        .editForm {
110
+          .ant-form-item {
111
+            margin-bottom: 14px;
112
+
113
+            .ant-form-item-label {
114
+              line-height: 0;
115
+            }
116
+          }
117
+        }
118
+      }
119
+
120
+      button:nth-child(1) {
121
+        margin-right: 20px;
122
+      }
123
+    }
124
+  }
125
+}

+ 65 - 0
src/app/components/incidentManagement/incident-reject/incident-reject.component.ts

@@ -0,0 +1,65 @@
1
+import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';
2
+import { MainService } from '../../../services/main.service';
3
+import { Router, ActivatedRoute } from '@angular/router';
4
+import { NzMessageService } from 'ng-zorro-antd';
5
+import { ToolService } from 'src/app/services/tool.service';
6
+import { FormGroup, Validators, FormBuilder } from '@angular/forms';
7
+
8
+@Component({
9
+  selector: 'app-incident-reject',
10
+  templateUrl: './incident-reject.component.html',
11
+  styleUrls: ['./incident-reject.component.less']
12
+})
13
+export class IncidentRejectComponent implements OnInit {
14
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
15
+  @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
16
+
17
+  @Input() id: any;
18
+
19
+  constructor(
20
+    private mainService: MainService,
21
+    private router: Router,
22
+    private route: ActivatedRoute,
23
+    private message: NzMessageService,
24
+    private tool: ToolService,
25
+    private fb: FormBuilder,
26
+  ) { }
27
+
28
+  isLoading = false;
29
+
30
+  ngOnInit() {
31
+    this.initForm();
32
+  }
33
+
34
+  // 初始化新增form表单
35
+  validateForm: FormGroup; //新增/编辑表单
36
+  initForm() {
37
+    this.validateForm = this.fb.group({
38
+      rejectRemark: [null, [Validators.required]],//不受理原因
39
+    });
40
+    console.log(this.validateForm.controls)
41
+  }
42
+
43
+  // 关闭弹窗
44
+  hideModal() {
45
+    this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
46
+  }
47
+
48
+  // 表单提交
49
+  maskFlag:any = false;
50
+  submitForm(): void {
51
+    for (const i in this.validateForm.controls) {
52
+      this.validateForm.controls[i].markAsDirty();
53
+      this.validateForm.controls[i].updateValueAndValidity();
54
+    }
55
+    if (this.validateForm.invalid) {
56
+      return;
57
+    }
58
+
59
+    this.confirmModelHs.emit(this.validateForm.value.rejectRemark);
60
+  }
61
+}
62
+
63
+
64
+
65
+

+ 20 - 0
src/app/components/incidentManagement/incident-reject/incident-reject.module.ts

@@ -0,0 +1,20 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { IncidentRejectComponent } from './incident-reject.component';
5
+import { ShareModule } from 'src/app/share/share.module';
6
+
7
+
8
+@NgModule({
9
+  declarations: [
10
+    IncidentRejectComponent,
11
+  ],
12
+  imports: [
13
+    CommonModule,
14
+    ShareModule,
15
+  ],
16
+  exports: [
17
+    IncidentRejectComponent,
18
+  ]
19
+})
20
+export class IncidentRejectModule { }

+ 1 - 1
src/app/components/incidentManagement/incident-substitution/incident-substitution.component.less

@@ -12,7 +12,7 @@
12 12
   width: 100%;
13 13
   height: 100%;
14 14
   background: rgba(0, 0, 0, 0.4);
15
-  z-index: 8;
15
+  z-index: 18;
16 16
   .ji {
17 17
     position: absolute;
18 18
     right: 0px;

+ 17 - 0
src/app/services/tool.service.ts

@@ -116,6 +116,14 @@ export class ToolService {
116 116
         jurisdiction = e.childrens || []; //匹配路由后,取得对应的权限
117 117
       }
118 118
     });
119
+    if(!jurisdiction.length){
120
+      // type为panel路由
121
+      menu.forEach(v => {
122
+        if(v.type === 'panel' && v.link == link && v.childrens){
123
+          jurisdiction = v.childrens || []; //匹配路由后,取得对应的权限
124
+        }
125
+      })
126
+    }
119 127
     jurisdiction.forEach((e) => {
120 128
       switch (e.link) {
121 129
         case "look":
@@ -265,6 +273,15 @@ export class ToolService {
265 273
         case "visit":
266 274
           coopBtns.visit = true; //回访
267 275
           break;
276
+        case "continue":
277
+            coopBtns.continue = true; //继续建单
278
+            break;
279
+        case "generate":
280
+          coopBtns.generate = true; //生成
281
+          break;
282
+        case "reject":
283
+          coopBtns.reject = true; //不受理
284
+          break;
268 285
       }
269 286
     });
270 287
     console.log(coopBtns);

+ 160 - 309
src/app/views/fuwutai/fuwutai.component.html

@@ -239,7 +239,7 @@
239 239
                   <!-- 加急单 -->
240 240
                   <img *ngIf="data.data.emergencyType && data.data.emergencyType.id == 301" src="../../assets/images/icon_jiaji.png" alt="" class="ji" />
241 241
                 </div>
242
-                <div class="right_bots display_flex col-flex align-items_center justify-content_space-around">
242
+                <div class="right_bots display_flex col-flex align-items_center justify-content_flex-center gap8">
243 243
                   <input type="button" *ngIf="data.data.gdState.value == 2" class="top_bot" value="派单" (click)="allotWorker(data.data.id, data.data.gdState.id)" />
244 244
                   <input type="button" *ngIf="!data.data.worker && data.data.gdState.value != 2" class="top_bot" value="派单" (click)="allotWorker(data.data.id, data.data.gdState.id, 1)" />
245 245
                   <input type="button" *ngIf="data.data.gdState.value == 2 || ((data.data.gdState.value == 3 || data.data.gdState.value == 4) && data.data.worker)" class="btm_bot" value="删除" (click)="openDelModal(data.data.id, 'hsms')" />
@@ -291,14 +291,14 @@
291 291
                     </span>
292 292
                   </div>
293 293
                 </div>
294
-                <div class="right_bots display_flex col-flex align-items_center justify-content_space-around">
295
-                  <input type="button" *ngIf="data.data.state.value == 'accept'" class="top_bot" value="生成" (click)="generateOrder(data.data)" />
296
-                  <input type="button" *ngIf="data.data.state.value == 'accept'" class="top_bot" value="不受理" (click)="generateOrder(data.data)" />
297
-                  <input type="button" *ngIf="data.data.state.value == 'storage'" class="top_bot" value="继续建单" (click)="generateOrder(data.data)" />
298
-                  <input type="button" class="btm_bot" value="删除" (click)="openDelModal(data.data.id, 'itsm')" />
294
+                <div class="right_bots display_flex col-flex align-items_center justify-content_flex-center gap8">
295
+                  <input type="button" *ngIf="coopBtns.generate && data.data.state.value == 'accept'" class="top_bot" value="生成" (click)="generateOrder(data.data)" />
296
+                  <input type="button" *ngIf="coopBtns.reject && data.data.state.value == 'accept'" class="top_bot" value="不受理" (click)="rejectFn(data.data)" />
297
+                  <input type="button" *ngIf="coopBtns.continue && data.data.state.value == 'storage'" class="top_bot" value="继续建单" (click)="storageSj(data.data)" />
298
+                  <input type="button" *ngIf="coopBtns.del" class="btm_bot" value="删除" (click)="openDelModal(data.data.id, 'itsm')" />
299 299
                 </div>
300
-                <div *ngIf="data.data.timeOut != true" class="slider sgreen" [ngStyle]="{ width: data.data.percent + '%' }"></div>
301
-                <div *ngIf="data.data.timeOut == true" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
300
+                <div *ngIf="data.data.overtimePercent <= 100" class="slider sgreen" [ngStyle]="{ width: data.data.overtimePercent + '%' }"></div>
301
+                <div *ngIf="data.data.overtimePercent > 100" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
302 302
               </ng-container>
303 303
             </div>
304 304
           </ng-container>
@@ -350,28 +350,16 @@
350 350
         </overlay-scrollbars>
351 351
       </div>
352 352
     </div>
353
-    <!-- 待到达 -->
353
+    <!-- 待到达/待接单 -->
354 354
     <div class="lists">
355 355
       <div class="head">
356
-        <span class="auto_tit">待到达({{ arriveList.length }}条)</span>
357
-        <span class="toLastTime"
358
-          >刷新倒计时<span class="time">{{ orderRefreshTime }}s</span></span
359
-        >
356
+        <span class="auto_tit"><span *ngIf="flagList.hsmsFlag2">待到达</span><span *ngIf="flagList.itsmFlag2 && flagList.hsmsFlag2">/</span><span *ngIf="flagList.itsmFlag2">待接单</span>({{ arriveList.length }}条)</span>
357
+        <span class="toLastTime"><span class="itsmOrHsms" [ngClass]="{bold: flagList.itsmFlag2}" *ngIf="itsmData.mdv2Switch" (click)="filterOrderList('itsm', 2)">运维</span><span class="itsmOrHsms" *ngIf="itsmData.mdv2Switch && hsmsData.hsmsSwitch">|</span><span class="itsmOrHsms" [ngClass]="{bold: flagList.hsmsFlag2}" *ngIf="hsmsData.hsmsSwitch" (click)="filterOrderList('hsms', 2)">配送</span><span class="time">{{ orderRefreshTime }}s</span></span>
360 358
       </div>
361
-      <div class="searchBox">
362
-        <label
363
-          nz-checkbox
364
-          [(ngModel)]="allArriveList"
365
-          (ngModelChange)="changeAllArriveList($event)"
366
-          >全选</label
367
-        >
359
+      <div class="searchBox" *ngIf="!flagList.itsmFlag2 && flagList.hsmsFlag2">
360
+        <label nz-checkbox [(ngModel)]="allArriveList" (ngModelChange)="changeAllArriveList($event)">全选</label>
368 361
         <div class="search wp60">
369
-          <input
370
-            class="wp75"
371
-            type="text"
372
-            placeholder="请输入关键字"
373
-            [(ngModel)]="arriveSearchCon"
374
-          />
362
+          <input class="wp75" type="text" placeholder="请输入关键字" [(ngModel)]="arriveSearchCon" />
375 363
           <div class="magnifier wp20" (click)="searchArrive()">
376 364
             <i class="icon_transport transport-sousuo"></i>
377 365
             <span>搜索</span>
@@ -386,296 +374,150 @@
386 374
           批量撤回
387 375
         </button>
388 376
       </div>
389
-      <div
390
-        class="cots_body daidaoda"
391
-        *ngIf="txtLabelCol == 1"
392
-        [ngClass]="{ top185: hurseInfoHiding != '1' }"
393
-      >
377
+      <div class="cots_body daidaoda" *ngIf="(txtLabelCol == 1 && hsmsData.hsmsSwitch && !itsmData.mdv2Switch) || itsmData.mdv2Switch" [ngClass]="{ top185: hurseInfoHiding != '1', top185_1: flagList.itsmFlag2 }">
394 378
         <overlay-scrollbars #osComponentRef3 [ngStyle]="{ height: '100%' }">
395 379
           <ng-container *ngIf="arriveList.length && !loading2">
396 380
             <div class="list listsTypeColor" *ngFor="let data of arriveList">
397
-              <div class="left_cots">
398
-                <!-- 工单 -->
399
-                <div
400
-                  class="gongdan"
401
-                  (click)="batchWithdrawalSelect(!data.checked, data.id)"
402
-                >
403
-                  <span class="left mr8"
404
-                    ><label
405
-                      nz-checkbox
406
-                      [ngModel]="data.checked"
407
-                      (ngModelChange)="batchWithdrawalSelect($event, data.id)"
408
-                    ></label
409
-                  ></span>
410
-                  <span class="left gongdan_name" nz-tooltip [nzTooltipTitle]="data.taskType.taskName + (data.goodsRemark?'-'+data.goodsRemark:'')+'(' + data.gdcode + ')'">
411
-                    {{ data.isHalfInspect === 1 ? "半程陪检" : data.taskType.taskName }}<ng-container *ngIf="data.goodsRemark">-{{data.goodsRemark}}</ng-container>({{ data.gdcode }})
412
-                  </span>
413
-                  <div class="right_all">
414
-                    <span nz-tooltip [nzTooltipTitle]="data.worker ? data.worker.phone : ''" class="right_all_name">{{ data.worker ? data.worker.name : "" }}</span>
415
-                    <span class="right">
416
-                      <span [ngClass]="{ colorRed: data.timeOut == true }">{{ data.gdState.name }}</span>
381
+              <!-- 配送 -->
382
+              <ng-container *ngIf="data.type === 'hsms'">
383
+                <div class="left_cots">
384
+                  <!-- 工单 -->
385
+                  <div class="gongdan" (click)="batchWithdrawalSelect(!data.data.checked, data.data.id)">
386
+                    <span class="left mr8">
387
+                      <label nz-checkbox [ngModel]="data.data.checked" (ngModelChange)="batchWithdrawalSelect($event, data.data.id)"></label>
388
+                    </span>
389
+                    <span class="left gongdan_name" nz-tooltip [nzTooltipTitle]="data.data.taskType.taskName + (data.data.goodsRemark?'-'+data.data.goodsRemark:'')+'(' + data.data.gdcode + ')'">
390
+                      {{ data.data.isHalfInspect === 1 ? "半程陪检" : data.data.taskType.taskName }}<ng-container *ngIf="data.data.goodsRemark">-{{data.data.goodsRemark}}</ng-container>({{ data.data.gdcode }})
391
+                    </span>
392
+                    <div class="right_all">
393
+                      <span nz-tooltip [nzTooltipTitle]="data.data.worker ? data.data.worker.phone : ''" class="right_all_name">{{ data.data.worker ? data.data.worker.name : "" }}</span>
394
+                      <span class="right">
395
+                        <span [ngClass]="{ colorRed: data.data.timeOut == true }">{{ data.gdState.name }}</span>
396
+                      </span>
397
+                    </div>
398
+                  </div>
399
+                  <!-- 地点 -->
400
+                  <div class="didian" (click)="openDetails(data.data)">
401
+                    <span class="left" *ngIf="data.data.taskType.associationType && data.data.taskType.associationType.value == 'inspect'">
402
+                      {{ data.data.startDept ? data.data.startDept.dept : "" }}
403
+                      <span *ngFor="let item of data.data.middleDept">
404
+                        ->{{ item.dept }}
405
+                      </span>
406
+                    </span>
407
+                    <span class="left" *ngIf="data.data.taskType.associationType && data.data.taskType.associationType.id != 260">
408
+                      {{ data.data.startDept ? data.data.startDept.dept : "" }}{{ data.data.endDepts ? " -> " + data.data.endDepts[0].dept : "" }}
409
+                    </span>
410
+                    <span class="right" *ngIf="data.data.goods">
411
+                      <i class="icon_transport transport-icon3"></i>
412
+                      <span>{{ data.data.goods }}</span>
413
+                    </span>
414
+                    <span class="right" *ngIf="data.data.workOrderRemark" [title]="data.data.workOrderRemark">
415
+                      <i class="icon_transport transport-icon3"></i>
416
+                      <span>{{ data.data.workOrderRemark }}</span>
417 417
                     </span>
418 418
                   </div>
419
+                  <!-- 时间 -->
420
+                  <div class="shijian" (click)="openDetails(data.data)">
421
+                    <span class="left" *ngIf="data.data.expectTimeNum && data.data.timeOut != true">
422
+                      <i class="icon_transport transport-shouye10" nz-tooltip nzTooltipTitle="进行中"></i>
423
+                      <ng-container *ngIf="(data.data.taskType.associationType.value == 'patientTransport' || data.data.taskType.associationType.value == 'inspect') && data.data.patient?.illnessState">
424
+                        <i *ngIf="data.data.patient.illnessState.value === '2'" class="colorRed icon_transport transport-tubiao_wei" nz-tooltip nzTooltipTitle="病危"></i>
425
+                        <i *ngIf="data.data.patient.illnessState.value === '3'" class="colorRed icon_transport transport-zhong" nz-tooltip nzTooltipTitle="病重"></i>
426
+                      </ng-container>
427
+                      <ng-container *ngIf="(data.data.taskType.associationType.value == 'patientTransport' || data.data.taskType.associationType.value == 'inspect') && data.data.patient?.careLevel">
428
+                        <i *ngIf="data.data.patient.careLevel.value === '0'" class="icon_transport transport-te1" nz-tooltip nzTooltipTitle="特级护理"></i>
429
+                        <i *ngIf="data.data.patient.careLevel.value === '1'" class="icon_transport transport-1_round_solid" nz-tooltip nzTooltipTitle="一级护理"></i>
430
+                        <i *ngIf="data.data.patient.careLevel.value === '2'" class="icon_transport transport-2_round_solid" nz-tooltip nzTooltipTitle="二级护理"></i>
431
+                        <i *ngIf="data.data.patient.careLevel.value === '3'" class="icon_transport transport-3_round_solid" nz-tooltip nzTooltipTitle="三级护理"></i>
432
+                      </ng-container>
433
+                      <span nz-tooltip nzTooltipTitle="患者姓名(住院号)" *ngIf="data.data.taskType.associationType.value == 'patientTransport' || data.data.taskType.associationType.value == 'inspect'">{{ data.data.patient.patientName }}<span *ngIf="data.data.patient.residenceNo">({{ data.data.patient.residenceNo }})</span></span>
434
+                    </span>
435
+                    <span class="left" *ngIf="data.data.timeOutLength && data.data.timeOut == true">
436
+                      <i class="colorRed icon_transport transport-daojishi" nz-tooltip nzTooltipTitle="超时"></i>
437
+                      <ng-container *ngIf="(data.data.taskType.associationType.value == 'patientTransport' || data.data.taskType.associationType.value == 'inspect') && data.data.patient?.illnessState">
438
+                        <i *ngIf="data.data.patient.illnessState.value === '2'" class="colorRed icon_transport transport-tubiao_wei" nz-tooltip nzTooltipTitle="病危"></i>
439
+                        <i *ngIf="data.data.patient.illnessState.value === '3'" class="colorRed icon_transport transport-zhong" nz-tooltip nzTooltipTitle="病重"></i>
440
+                      </ng-container>
441
+                      <ng-container *ngIf="(data.data.taskType.associationType.value == 'patientTransport' || data.data.taskType.associationType.value == 'inspect') && data.data.patient?.careLevel">
442
+                        <i *ngIf="data.data.patient.careLevel.value === '0'" class="icon_transport transport-te1" nz-tooltip nzTooltipTitle="特级护理"></i>
443
+                        <i *ngIf="data.data.patient.careLevel.value === '1'" class="icon_transport transport-1_round_solid" nz-tooltip nzTooltipTitle="一级护理"></i>
444
+                        <i *ngIf="data.data.patient.careLevel.value === '2'" class="icon_transport transport-2_round_solid" nz-tooltip nzTooltipTitle="二级护理"></i>
445
+                        <i *ngIf="data.data.patient.careLevel.value === '3'" class="icon_transport transport-3_round_solid" nz-tooltip nzTooltipTitle="三级护理"></i>
446
+                      </ng-container>
447
+                      <span nz-tooltip nzTooltipTitle="患者姓名(住院号)" *ngIf="data.data.taskType.associationType.value == 'patientTransport' || data.data.taskType.associationType.value == 'inspect'">{{ data.data.patient.patientName }}<span *ngIf="data.data.patient.residenceNo">({{ data.data.patient.residenceNo }})</span></span>
448
+                    </span>
449
+                    <span class="right" nz-tooltip [nzTooltipTitle]="'总时长' + formatTime(data.data.expectTimeNum / 1000)">
450
+                      {{ data.data.showCreateTime }}
451
+                    </span>
452
+                  </div>
453
+                  <!-- 急单 -->
454
+                  <img *ngIf="data.data.emergencyType && data.data.emergencyType.id == 300" src="../../assets/images/icon_ji.png" alt="" class="ji" />
455
+                  <!-- 加急单 -->
456
+                  <img *ngIf="data.data.emergencyType && data.data.emergencyType.id == 301" src="../../assets/images/icon_jiaji.png" alt="" class="ji" />
419 457
                 </div>
420
-                <!-- 地点 -->
421
-                <div
422
-                  class="didian"
423
-                  (click)="
424
-                    openDetails(data)
425
-                  "
426
-                >
427
-                  <span
428
-                    class="left"
429
-                    *ngIf="
430
-                      data.taskType.associationType &&
431
-                      data.taskType.associationType.value == 'inspect'
432
-                    "
433
-                  >
434
-                    {{ data.startDept ? data.startDept.dept : "" }}
435
-                    <span *ngFor="let item of data.middleDept">
436
-                      ->{{ item.dept }}
458
+                <div class="right_bots display_flex col-flex align-items_center justify-content_space-around">
459
+                  <input type="button" *ngIf="data.data.gdState.value == 2" class="top_bot" value="派单" (click)="allotWorker(data.data.id, data.data.gdState.id)" />
460
+                  <input type="button" *ngIf="data.data.gdState.value == 3 || data.data.gdState.value == 4" class="mid_bot" value="撤回" (click)="openRecallModal(data.data.id)" />
461
+                  <input type="button" *ngIf="data.data.gdState.value == 2 || data.data.gdState.value == 3 || data.data.gdState.value == 4" class="btm_bot" value="删除" (click)="openDelModal(data.data.id, 'hsms')" />
462
+                </div>
463
+                <div *ngIf="data.data.timeOut != true" class="slider sgreen" [ngStyle]="{ width: data.data.percent + '%' }"></div>
464
+                <div *ngIf="data.data.timeOut == true" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
465
+              </ng-container>
466
+              <!-- 运维 -->
467
+              <ng-container *ngIf="data.type === 'mdv2'">
468
+                <div class="left_cots">
469
+                  <div class="gongdan" (click)="batchDispatchSelect(!data.checked, data.data.id)">
470
+                    <span class="left gongdan_name">
471
+                      <span [ngClass]="priorityColor(data.priorityId)">{{ data.data.priorityDTO?.name }}</span>{{ data.data.incidentsign }} <span nz-tooltip [nzTooltipTitle]="data.data.hosName + data.data.department?.dept">{{ data.data.hosName }}{{ data.data.department?.dept }}</span>
437 472
                     </span>
438
-                  </span>
439
-                  <span
440
-                    class="left"
441
-                    *ngIf="
442
-                      data.taskType.associationType &&
443
-                      data.taskType.associationType.id != 260
444
-                    "
445
-                  >
446
-                    {{ data.startDept ? data.startDept.dept : ""
447
-                    }}{{ data.endDepts ? " -> " + data.endDepts[0].dept : "" }}
448
-                  </span>
449
-                  <span class="right" *ngIf="data.goods">
450
-                    <i class="icon_transport transport-icon3"></i>
451
-                    <span>{{ data.goods }}</span>
452
-                  </span>
453
-                  <span class="right" *ngIf="data.workOrderRemark" [title]="data.workOrderRemark">
454
-                    <i class="icon_transport transport-icon3"></i>
455
-                    <span>{{ data.workOrderRemark }}</span>
456
-                  </span>
473
+                    <div class="right_all">
474
+                      <span class="right">
475
+                        <span>{{ data.data.state.name }}</span>
476
+                      </span>
477
+                    </div>
478
+                  </div>
479
+
480
+                  <div class="didian" (click)="openItsmDetails(data.data)">
481
+                    <span class="left">
482
+                      <span nz-tooltip [nzTooltipTitle]="data.data.description">{{ data.data.description }}</span>
483
+                    </span>
484
+                  </div>
485
+
486
+                  <div class="didian" (click)="openItsmDetails(data.data)">
487
+                    <span class="left">
488
+                      <span nz-tooltip [nzTooltipTitle]="(data.data.place ? data.data.place.building.buildingName : '') + (data.data.place ? data.data.place.floorName : '') + data.data.houseNumber">{{ data.data.place ? data.data.place.building.buildingName : '' }}{{ data.data.place ? data.data.place.floorName : '' }}{{ data.data.houseNumber }}</span>
489
+                      <i class="icon_transport transport-a-11111 ml8" *ngIf="data.data.reqAttachment"></i>
490
+                    </span>
491
+                  </div>
492
+
493
+                  <div class="didian" (click)="openItsmDetails(data.data)" *ngIf="transferHandlerLog(data.data.currentLog)">
494
+                    <span class="left">
495
+                      <span [innerHTML]="transferHandlerLog(data.data.currentLog)" nz-tooltip [nzTooltipTitle]="transferHandlerLog(data.data.currentLog)"></span>
496
+                    </span>
497
+                  </div>
498
+                  <!-- 时间 -->
499
+                  <div class="shijian" (click)="openItsmDetails(data.data)">
500
+                    <span class="left">
501
+                      <span>
502
+                        申请人:{{ data.data.requester?.name }}
503
+                      </span>
504
+                    </span>
505
+                    <span class="right">
506
+                      {{ data.data.startDate | date: 'yyyy-MM-dd HH:mm'}}
507
+                    </span>
508
+                  </div>
457 509
                 </div>
458
-                <!-- 时间 -->
459
-                <div
460
-                  class="shijian"
461
-                  (click)="
462
-                    openDetails(data)
463
-                  "
464
-                >
465
-                  <span
466
-                    class="left"
467
-                    *ngIf="data.expectTimeNum && data.timeOut != true"
468
-                  >
469
-                    <i
470
-                      class="icon_transport transport-shouye10"
471
-                      nz-tooltip
472
-                      nzTooltipTitle="进行中"
473
-                    ></i>
474
-                    <ng-container
475
-                      *ngIf="
476
-                        (data.taskType.associationType.value ==
477
-                          'patientTransport' ||
478
-                          data.taskType.associationType.value == 'inspect') &&
479
-                        data.patient?.illnessState
480
-                      "
481
-                    >
482
-                      <i
483
-                        *ngIf="data.patient.illnessState.value === '2'"
484
-                        class="colorRed icon_transport transport-tubiao_wei"
485
-                        nz-tooltip
486
-                        nzTooltipTitle="病危"
487
-                      ></i>
488
-                      <i
489
-                        *ngIf="data.patient.illnessState.value === '3'"
490
-                        class="colorRed icon_transport transport-zhong"
491
-                        nz-tooltip
492
-                        nzTooltipTitle="病重"
493
-                      ></i>
494
-                    </ng-container>
495
-                    <ng-container
496
-                      *ngIf="
497
-                        (data.taskType.associationType.value ==
498
-                          'patientTransport' ||
499
-                          data.taskType.associationType.value == 'inspect') &&
500
-                        data.patient?.careLevel
501
-                      "
502
-                    >
503
-                      <i
504
-                        *ngIf="data.patient.careLevel.value === '0'"
505
-                        class="icon_transport transport-te1"
506
-                        nz-tooltip
507
-                        nzTooltipTitle="特级护理"
508
-                      ></i>
509
-                      <i
510
-                        *ngIf="data.patient.careLevel.value === '1'"
511
-                        class="icon_transport transport-1_round_solid"
512
-                        nz-tooltip
513
-                        nzTooltipTitle="一级护理"
514
-                      ></i>
515
-                      <i
516
-                        *ngIf="data.patient.careLevel.value === '2'"
517
-                        class="icon_transport transport-2_round_solid"
518
-                        nz-tooltip
519
-                        nzTooltipTitle="二级护理"
520
-                      ></i>
521
-                      <i
522
-                        *ngIf="data.patient.careLevel.value === '3'"
523
-                        class="icon_transport transport-3_round_solid"
524
-                        nz-tooltip
525
-                        nzTooltipTitle="三级护理"
526
-                      ></i>
527
-                    </ng-container>
528
-                    <span nz-tooltip nzTooltipTitle="患者姓名(住院号)" *ngIf="data.taskType.associationType.value == 'patientTransport' || data.taskType.associationType.value == 'inspect'">{{ data.patient.patientName }}<span *ngIf="data.patient.residenceNo">({{ data.patient.residenceNo }})</span></span>
529
-                    <!-- <span>总时长{{formatTime(data.expectTimeNum/1000)}}</span> -->
530
-                  </span>
531
-                  <span
532
-                    class="left"
533
-                    *ngIf="data.timeOutLength && data.timeOut == true"
534
-                  >
535
-                    <i
536
-                      class="colorRed icon_transport transport-daojishi"
537
-                      nz-tooltip
538
-                      nzTooltipTitle="超时"
539
-                    ></i>
540
-                    <ng-container
541
-                      *ngIf="
542
-                        (data.taskType.associationType.value ==
543
-                          'patientTransport' ||
544
-                          data.taskType.associationType.value == 'inspect') &&
545
-                        data.patient?.illnessState
546
-                      "
547
-                    >
548
-                      <i
549
-                        *ngIf="data.patient.illnessState.value === '2'"
550
-                        class="colorRed icon_transport transport-tubiao_wei"
551
-                        nz-tooltip
552
-                        nzTooltipTitle="病危"
553
-                      ></i>
554
-                      <i
555
-                        *ngIf="data.patient.illnessState.value === '3'"
556
-                        class="colorRed icon_transport transport-zhong"
557
-                        nz-tooltip
558
-                        nzTooltipTitle="病重"
559
-                      ></i>
560
-                    </ng-container>
561
-                    <ng-container
562
-                      *ngIf="
563
-                        (data.taskType.associationType.value ==
564
-                          'patientTransport' ||
565
-                          data.taskType.associationType.value == 'inspect') &&
566
-                        data.patient?.careLevel
567
-                      "
568
-                    >
569
-                      <i
570
-                        *ngIf="data.patient.careLevel.value === '0'"
571
-                        class="icon_transport transport-te1"
572
-                        nz-tooltip
573
-                        nzTooltipTitle="特级护理"
574
-                      ></i>
575
-                      <i
576
-                        *ngIf="data.patient.careLevel.value === '1'"
577
-                        class="icon_transport transport-1_round_solid"
578
-                        nz-tooltip
579
-                        nzTooltipTitle="一级护理"
580
-                      ></i>
581
-                      <i
582
-                        *ngIf="data.patient.careLevel.value === '2'"
583
-                        class="icon_transport transport-2_round_solid"
584
-                        nz-tooltip
585
-                        nzTooltipTitle="二级护理"
586
-                      ></i>
587
-                      <i
588
-                        *ngIf="data.patient.careLevel.value === '3'"
589
-                        class="icon_transport transport-3_round_solid"
590
-                        nz-tooltip
591
-                        nzTooltipTitle="三级护理"
592
-                      ></i>
593
-                    </ng-container>
594
-                    <span nz-tooltip nzTooltipTitle="患者姓名(住院号)" *ngIf="data.taskType.associationType.value == 'patientTransport' || data.taskType.associationType.value == 'inspect'">{{ data.patient.patientName }}<span *ngIf="data.patient.residenceNo">({{ data.patient.residenceNo }})</span></span>
595
-                    <!-- <span>已超时{{formatTime(data.timeOutLength/1000)}}</span> -->
596
-                  </span>
597
-                  <span
598
-                    class="right"
599
-                    nz-tooltip
600
-                    [nzTooltipTitle]="
601
-                      '总时长' + formatTime(data.expectTimeNum / 1000)
602
-                    "
603
-                  >
604
-                    {{ data.showCreateTime }}
605
-                  </span>
510
+                <div class="right_bots display_flex col-flex align-items_center justify-content_flex-center gap8">
511
+                  <input type="button" *ngIf="computedSubstitution(data.data)" class="top_bot" value="换人处理" (click)="substitution(data.data)" />
512
+                  <input type="button" *ngIf="computedReceive(data.data)" class="top_bot" value="接单" (click)="showDelModal($event, data.data,'您确认要接单吗?','接单','receive')" />
513
+                  <input type="button" *ngIf="coopBtns.del" class="btm_bot" value="删除" (click)="openDelModal(data.data.id, 'itsm')" />
606 514
                 </div>
607
-                <!-- 急单 -->
608
-                <img
609
-                  *ngIf="data.emergencyType && data.emergencyType.id == 300"
610
-                  src="../../assets/images/icon_ji.png"
611
-                  alt=""
612
-                  class="ji"
613
-                />
614
-                <!-- 加急单 -->
615
-                <img
616
-                  *ngIf="data.emergencyType && data.emergencyType.id == 301"
617
-                  src="../../assets/images/icon_jiaji.png"
618
-                  alt=""
619
-                  class="ji"
620
-                />
621
-              </div>
622
-              <div
623
-                class="
624
-                  right_bots
625
-                  display_flex
626
-                  col-flex
627
-                  align-items_center
628
-                  justify-content_space-around
629
-                "
630
-              >
631
-                <input
632
-                  type="button"
633
-                  *ngIf="data.gdState.value == 2"
634
-                  class="top_bot"
635
-                  value="派单"
636
-                  (click)="allotWorker(data.id, data.gdState.id)"
637
-                />
638
-                <input
639
-                  type="button"
640
-                  *ngIf="data.gdState.value == 3 || data.gdState.value == 4"
641
-                  class="mid_bot"
642
-                  value="撤回"
643
-                  (click)="openRecallModal(data.id)"
644
-                />
645
-                <input
646
-                  type="button"
647
-                  *ngIf="
648
-                    data.gdState.value == 2 ||
649
-                    data.gdState.value == 3 ||
650
-                    data.gdState.value == 4
651
-                  "
652
-                  class="btm_bot"
653
-                  value="删除"
654
-                  (click)="openDelModal(data.id, 'hsms')"
655
-                />
656
-              </div>
657
-              <div
658
-                *ngIf="data.timeOut != true"
659
-                class="slider sgreen"
660
-                [ngStyle]="{ width: data.percent + '%' }"
661
-              ></div>
662
-              <div
663
-                *ngIf="data.timeOut == true"
664
-                class="slider sred"
665
-                [ngStyle]="{ width: '100%' }"
666
-              ></div>
515
+                <div *ngIf="data.data.overtimePercent <= 100" class="slider sgreen" [ngStyle]="{ width: data.data.overtimePercent + '%' }"></div>
516
+                <div *ngIf="data.data.overtimePercent > 100" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
517
+              </ng-container>
667 518
             </div>
668 519
           </ng-container>
669
-          <div
670
-            class="
671
-              loading
672
-              display_flex
673
-              col-flex
674
-              justify-content_flex-center
675
-              align-items_center
676
-            "
677
-            *ngIf="loading2"
678
-          >
520
+          <div class="loading display_flex col-flex justify-content_flex-center align-items_center"  *ngIf="loading2">
679 521
             <img src="../../assets/images/loading.gif" alt="" />
680 522
           </div>
681 523
           <div class="no_data" *ngIf="arriveList.length == 0 && !loading2">
@@ -1693,7 +1535,7 @@
1693 1535
           </div>
1694 1536
           <div class="newTopItem">
1695 1537
             <span class="grayFont">申请人:</span>
1696
-            <ng-container *ngIf="buildType === '微信转事件'">{{incidentMsg.requesterName}}</ng-container>
1538
+            <ng-container *ngIf="buildType === '报修转事件'">{{incidentMsg.requesterName}}</ng-container>
1697 1539
             <ng-container *ngIf="!buildType">
1698 1540
               <nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('requester', $event)" nzPlaceHolder="请选择申请人" [(ngModel)]="incidentModel.requester" (ngModelChange)="changeApplyRequester($event)" nzAllowClear>
1699 1541
                 <ng-container *ngFor="let option of applicationRequesterList">
@@ -2600,7 +2442,7 @@
2600 2442
                     <!-- 加急单 -->
2601 2443
                     <img *ngIf="data.emergencyType && data.emergencyType.id == 301" src="../../assets/images/icon_jiaji.png" alt="" class="ji" />
2602 2444
                   </div>
2603
-                  <div class="right_bots display_flex col-flex align-items_center justify-content_space-around">
2445
+                  <div class="right_bots display_flex col-flex align-items_center justify-content_flex-center gap8">
2604 2446
                     <input type="button" *ngIf="data.gdState.value == 2" class="top_bot" value="派单" (click)="allotWorker(data.id, data.gdState.id)" />
2605 2447
                     <input type="button" *ngIf="data.gdState.value == 3 || data.gdState.value == 4" class="mid_bot" value="撤回" (click)="openRecallModal(data.id)" />
2606 2448
                     <input type="button" *ngIf="data.gdState.value == 2 || data.gdState.value == 3 || data.gdState.value == 4" class="btm_bot" value="删除" (click)="openDelModal(data.id, 'hsms')" />
@@ -2763,13 +2605,16 @@
2763 2605
           </button>
2764 2606
         </ng-container>
2765 2607
         <ng-container *ngIf="currentTabIndex === '99999'">
2766
-          <label nz-checkbox [(ngModel)]="isBuildOrderAgagin" *ngIf="buildType !== '微信转事件'">是否连续建单</label>
2608
+          <label nz-checkbox [(ngModel)]="isBuildOrderAgagin" *ngIf="buildType !== '报修转事件'">是否连续建单</label>
2767 2609
           <button nz-button class="btn" nzType="primary" (click)="directOrder()">
2768 2610
             直接解决
2769 2611
           </button>
2770
-          <button nz-button class="btn" nzType="primary" (click)="assignOrder()" [nzLoading]="isItsmSubmitLoading">
2612
+          <button nz-button class="btn" nzType="primary" (click)="assignOrder()">
2771 2613
             建单并派单
2772 2614
           </button>
2615
+          <button nz-button class="btn" nzType="primary" (click)="temporaryStorage()">
2616
+            暂存
2617
+          </button>
2773 2618
         </ng-container>
2774 2619
         <button class="btn cancel" nz-button nzType="default" (click)="newOrderCancel()">
2775 2620
           取消
@@ -2902,3 +2747,9 @@
2902 2747
 
2903 2748
 <!-- 图片预览 -->
2904 2749
 <app-image-viewer [imageUrl]="imgs" hidden *ngIf="isPreview" [isPreviewNow]="true" [initialViewIndex]="initialViewIndex"></app-image-viewer>
2750
+
2751
+<!-- 不受理 -->
2752
+<app-incident-reject [id]="coopData.id" *ngIf="rejectModalShow" (closeModelHs)="closeRejectModelOrder($event)" (confirmModelHs)="confirmRejectModelOrder($event)"></app-incident-reject>
2753
+
2754
+<!-- 换人处理 -->
2755
+<app-incident-substitution [id]="coopData.id" *ngIf="substitutionModalShow" (closeModelHs)="closeSubstitutionModelOrder($event)" (confirmModelHs)="confirmSubstitutionModelOrder($event)"></app-incident-substitution>

+ 218 - 18
src/app/views/fuwutai/fuwutai.component.ts

@@ -6,7 +6,7 @@ import {
6 6
   ElementRef,
7 7
 } from "@angular/core";
8 8
 import { FormBuilder, FormGroup, Validators } from "@angular/forms";
9
-import { Router } from "@angular/router";
9
+import { Router, ActivatedRoute } from "@angular/router";
10 10
 
11 11
 import { MainService } from "../../services/main.service";
12 12
 import { WebsocketPhoneService } from "../../services/websocket-phone.service";
@@ -139,6 +139,7 @@ export class FuwutaiComponent implements OnInit {
139 139
     private sers: WebsocketSerService,
140 140
     private tool: ToolService,
141 141
     private http: HttpClient,
142
+    public route: ActivatedRoute,
142 143
   ) {}
143 144
   validateFormZy!: FormGroup;
144 145
   validateFormQt!: FormGroup;
@@ -193,6 +194,9 @@ export class FuwutaiComponent implements OnInit {
193 194
   incidentModel:any = {};
194 195
   incidentMsg:any = {};
195 196
 
197
+  // 初始化增删改按钮
198
+  coopBtns: any = {};
199
+
196 200
   // 获取院区配置配置,是否核酸打印
197 201
   isShowNucleicAcidPrinting = false;
198 202
   getHospitalConfigList(key) {
@@ -669,6 +673,7 @@ export class FuwutaiComponent implements OnInit {
669 673
       });
670 674
   }
671 675
   ngOnInit() {
676
+    this.coopBtns = this.tool.initCoopBtns(this.route);
672 677
     //防抖
673 678
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
674 679
       v[1] !== '' && this.searchApplicationDepartment(v[0], v[1]);
@@ -1324,13 +1329,25 @@ export class FuwutaiComponent implements OnInit {
1324 1329
     // 运维
1325 1330
     if(this.flagList['itsmFlag' + stateId]){
1326 1331
       postData.incidentQuery = {
1327
-        incident: {
1328
-          "queryTask": "storageAccept",
1329
-          "assignee": this.tool.getCurrentUserId(),
1330
-        },
1331 1332
         idx: 0,
1332 1333
         sum: 1,
1333 1334
       }
1335
+      if(stateId == 1){
1336
+        postData.incidentQuery.incident = {
1337
+          "groupIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.scopeGroups.map(v => v.id).toString() || undefined),
1338
+          "urgentType": +this.itsmData.orderScopeRadio + 1,
1339
+          "queryTask": "storageAccept",
1340
+          "assignee": this.tool.getCurrentUserId(),
1341
+        }
1342
+      }else if(stateId == 2){
1343
+        postData.incidentQuery.incident = {
1344
+          "groupIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.scopeGroups.map(v => v.id).toString() || undefined),
1345
+          "urgentType": +this.itsmData.orderScopeRadio + 1,
1346
+          "queryTask": "todoReassign",
1347
+        }
1348
+      }else if(stateId == 3){
1349
+        return;
1350
+      }
1334 1351
     }
1335 1352
 
1336 1353
     console.log(postData);
@@ -1359,7 +1376,7 @@ export class FuwutaiComponent implements OnInit {
1359 1376
           this.loading1 = false;
1360 1377
         } else if (stateId == 2) {
1361 1378
           // 待到达
1362
-          this.arriveList = data.list || [];
1379
+          this.arriveList = data.data || [];
1363 1380
           this.arriveList.forEach((item) => {
1364 1381
             item.checked = false;
1365 1382
           });
@@ -1941,7 +1958,7 @@ export class FuwutaiComponent implements OnInit {
1941 1958
     this.incidentModel.department = undefined;
1942 1959
     this.searchApplicationDepartment('itsm');
1943 1960
 
1944
-    if(this.buildType !== '微信转事件'){
1961
+    if(this.buildType !== '报修转事件'){
1945 1962
       this.incidentModel.requester = undefined;
1946 1963
     }
1947 1964
     this.applicationRequesterList = [];
@@ -2116,7 +2133,7 @@ export class FuwutaiComponent implements OnInit {
2116 2133
     this.incidentModel = {...this.incidentModel, ...incidentModel};
2117 2134
 
2118 2135
     let category = this.applicationCategoryList.find(v => v.id == this.incidentModel.category);
2119
-    let postData = {
2136
+    let postData:any = {
2120 2137
       solutionId: this.solutionId,
2121 2138
       "incident": {
2122 2139
         "id": this.incidentModel.id || undefined,
@@ -2148,6 +2165,9 @@ export class FuwutaiComponent implements OnInit {
2148 2165
     };
2149 2166
 
2150 2167
     if(this.buildType){
2168
+      if(this.buildType === '报修转事件'){
2169
+        postData.incident.fromWx = true;
2170
+      }
2151 2171
       Object.assign(postData.incident, this.editOrder);
2152 2172
     }
2153 2173
 
@@ -2166,7 +2186,7 @@ export class FuwutaiComponent implements OnInit {
2166 2186
             })
2167 2187
           }
2168 2188
           this.directOrderModalShow = false;
2169
-          this.msg.success('直接解决成功');
2189
+          // this.msg.success('直接解决成功');
2170 2190
           this.isBuildOrderAgaginFn();
2171 2191
         } else {
2172 2192
           this.msg.error('直接解决失败');
@@ -2427,7 +2447,7 @@ export class FuwutaiComponent implements OnInit {
2427 2447
   }
2428 2448
   // 修改关联查
2429 2449
   changeApplyRelatedDepartment(e){
2430
-    if(this.buildType !== '微信转事件'){
2450
+    if(this.buildType !== '报修转事件'){
2431 2451
       this.incidentModel.requester = undefined;
2432 2452
     }
2433 2453
     this.searchApplicationRequester();
@@ -2584,7 +2604,7 @@ export class FuwutaiComponent implements OnInit {
2584 2604
     }
2585 2605
 
2586 2606
     // 刷新申请人列表
2587
-    if(this.buildType !== '微信转事件'){
2607
+    if(this.buildType !== '报修转事件'){
2588 2608
       this.incidentModel.requester = undefined;
2589 2609
     }
2590 2610
     this.searchApplicationRequester();
@@ -2774,7 +2794,7 @@ export class FuwutaiComponent implements OnInit {
2774 2794
       nzDuration: 0,
2775 2795
     }).messageId;
2776 2796
 
2777
-    let postData = {
2797
+    let postData:any = {
2778 2798
       solutionId: this.solutionId,
2779 2799
       "incident": {
2780 2800
         "id": this.incidentModel.id || undefined,
@@ -2802,6 +2822,9 @@ export class FuwutaiComponent implements OnInit {
2802 2822
       }
2803 2823
     };
2804 2824
     if(this.buildType){
2825
+      if(this.buildType === '报修转事件'){
2826
+        postData.incident.fromWx = true;
2827
+      }
2805 2828
       Object.assign(postData.incident, this.editOrder);
2806 2829
     }
2807 2830
     console.log(postData);
@@ -2821,7 +2844,7 @@ export class FuwutaiComponent implements OnInit {
2821 2844
               await this.uploadImages(file, result.data.id);
2822 2845
             })
2823 2846
           }
2824
-          this.msg.success('建单并派单成功');
2847
+          // this.msg.success('建单并派单成功');
2825 2848
           this.isBuildOrderAgaginFn();
2826 2849
         } else {
2827 2850
           this.msg.error('建单并派单失败');
@@ -2829,6 +2852,75 @@ export class FuwutaiComponent implements OnInit {
2829 2852
       });
2830 2853
   }
2831 2854
 
2855
+  // 运维-暂存
2856
+  temporaryStorage(){
2857
+    this.maskFlag = this.msg.loading("正在加载中..", {
2858
+      nzDuration: 0,
2859
+    }).messageId;
2860
+
2861
+    let category;
2862
+    if(this.incidentModel.category){
2863
+      category = this.applicationCategoryList.find(v => v.id == this.incidentModel.category);
2864
+    }
2865
+
2866
+    let postData:any = {
2867
+      solutionId: this.solutionId,
2868
+      "incident": {
2869
+        "id": this.incidentModel.id || undefined,
2870
+        "deleteFlag": 0,
2871
+        "duty": this.incidentModel.duty ? { id: this.incidentModel.duty.id } : undefined,
2872
+        "department": this.incidentModel.department ? { id: this.incidentModel.department } : undefined,
2873
+        "contactsInformation": this.incidentModel.contactsInformation,
2874
+        "contacts": this.incidentModel.contacts,
2875
+        "hosId": this.incidentModel.hosId || undefined,
2876
+        "area": this.incidentModel.area ? { id: this.incidentModel.area } : undefined,
2877
+        "place": this.incidentModel.place ? { id: this.incidentModel.place } : undefined,
2878
+        "houseNumber": this.incidentModel.houseNumber,
2879
+        "category": this.incidentModel.category ? { id: this.incidentModel.category } : undefined,
2880
+        "priorityId": this.incidentModel.priorityId || undefined,
2881
+        "source": this.incidentModel.source ? { id: this.incidentModel.source } : undefined,
2882
+        "title": category ? category.mutiCategory : '',
2883
+        "description": this.incidentModel.description,
2884
+        "yyTime": this.incidentModel.yyTime ? format(this.incidentModel.yyTime, 'yyyy-MM-dd HH:mm:ss') : undefined,
2885
+        "requester": this.incidentModel.requester ? { id: this.incidentModel.requester } : undefined,
2886
+        "acceptUser": { id: this.tool.getCurrentUserId() },
2887
+        "callID": this.incidentModel.callID || undefined,
2888
+        "incomingPhone": this.incidentModel.incomingPhone || undefined,
2889
+        "candidateGroups": this.incidentModel.group || undefined,
2890
+        "assignee": this.incidentModel.user || undefined,
2891
+      }
2892
+    };
2893
+    if(this.buildType){
2894
+      if(this.buildType === '报修转事件'){
2895
+        postData.incident.fromWx = true;
2896
+      }
2897
+      Object.assign(postData.incident, this.editOrder);
2898
+    }
2899
+    console.log(postData);
2900
+    // return;
2901
+
2902
+    this.mainService
2903
+      .flowPost("incident/task/storage", postData)
2904
+      .subscribe((result) => {
2905
+        this.msg.remove(this.maskFlag);
2906
+        this.maskFlag = false;
2907
+
2908
+        if (result.state == 200) {
2909
+          // 图片上传
2910
+          if(this.fileList.length){
2911
+            console.log(this.fileList.map(v => v.originFileObj));
2912
+            this.fileList.map(v => v.originFileObj).forEach(async file => {
2913
+              await this.uploadImages(file, result.data.id);
2914
+            })
2915
+          }
2916
+          // this.msg.success('暂存成功');
2917
+          this.isBuildOrderAgaginFn();
2918
+        } else {
2919
+          this.msg.error('暂存失败');
2920
+        }
2921
+      });
2922
+  }
2923
+
2832 2924
   // 是否连续建单
2833 2925
   isBuildOrderAgaginFn(){
2834 2926
     if(this.isBuildOrderAgagin){
@@ -2836,10 +2928,10 @@ export class FuwutaiComponent implements OnInit {
2836 2928
       this.incidentModel.category = undefined;
2837 2929
       this.incidentModel.user = undefined;
2838 2930
       this.incidentModel.group = undefined;
2839
-      this.showPromptModal("建单", true, "", "");
2931
+      this.showPromptModal("操作", true, "", "");
2840 2932
     }else{
2841 2933
       this.newOrderShow = false; //关闭弹窗
2842
-      this.showPromptModal("建单", true, "", "");
2934
+      this.showPromptModal("操作", true, "", "");
2843 2935
     }
2844 2936
   }
2845 2937
 
@@ -3625,7 +3717,12 @@ export class FuwutaiComponent implements OnInit {
3625 3717
     this.promptInfo = promptInfo;
3626 3718
     this.back = back || "";
3627 3719
     setTimeout(() => {
3628
-      this.getUnassignedBuilding2();
3720
+      this.showPromptModalRefresh();
3721
+    }, 100);
3722
+  }
3723
+
3724
+  showPromptModalRefresh(){
3725
+    this.getUnassignedBuilding2();
3629 3726
       this.resetList();
3630 3727
       this.getOrderList(1);
3631 3728
       this.getOrderList(2);
@@ -3642,7 +3739,6 @@ export class FuwutaiComponent implements OnInit {
3642 3739
       this.promptModalShow = true;
3643 3740
       this.fixedTab = "";
3644 3741
       this.fixedMenuShangla();
3645
-    }, 100);
3646 3742
   }
3647 3743
 
3648 3744
   // 格式化时分秒
@@ -3799,7 +3895,34 @@ export class FuwutaiComponent implements OnInit {
3799 3895
     this.incidentMsg = incidentMsg;
3800 3896
     console.log('this.applicationDeptList:', this.applicationDeptList)
3801 3897
     console.log('incidentModel:', incidentModel)
3802
-    this.showNewOrder('', '', true, '微信转事件');
3898
+    this.showNewOrder('', '', true, '报修转事件');
3899
+
3900
+    // 查询报修图片
3901
+    this.getRepairImgs(data.id);
3902
+  }
3903
+
3904
+  // 继续建单
3905
+  storageSj(data){
3906
+    this.editOrder = cloneDeep(data);
3907
+    let incidentModel = cloneDeep(data);
3908
+    let incidentMsg:any = {};
3909
+    console.log('data:', data)
3910
+    // incidentModel.department && (this.applicationDeptList = [cloneDeep(incidentModel.department)]);
3911
+    incidentModel.department && (incidentMsg.deptManyPhone = incidentModel.department.manyPhone);
3912
+    incidentModel.department && (incidentMsg.deptName = incidentModel.department.dept);
3913
+    incidentModel.department && (incidentModel.department = incidentModel.department.id);
3914
+    incidentModel.requester && (this.applicationRequesterList = [cloneDeep(incidentModel.requester)]);
3915
+    incidentModel.requester && (incidentMsg.requesterPhone = incidentModel.requester.phone);
3916
+    incidentModel.requester && (incidentMsg.requesterName = incidentModel.requester.name);
3917
+    incidentModel.requester && (incidentModel.requester = incidentModel.requester.id);
3918
+    incidentModel.source && (incidentModel.source = incidentModel.source.id);
3919
+    incidentModel.area && (incidentModel.area = incidentModel.area.id);
3920
+    incidentModel.place && (incidentModel.place = incidentModel.place.id);
3921
+    this.incidentModel = incidentModel;
3922
+    this.incidentMsg = incidentMsg;
3923
+    console.log('this.applicationDeptList:', this.applicationDeptList)
3924
+    console.log('incidentModel:', incidentModel)
3925
+    this.showNewOrder('', '', true, '继续建单');
3803 3926
 
3804 3927
     // 查询报修图片
3805 3928
     this.getRepairImgs(data.id);
@@ -3834,4 +3957,81 @@ export class FuwutaiComponent implements OnInit {
3834 3957
       this.isPreview = true;
3835 3958
     }, 0)
3836 3959
   }
3960
+
3961
+  // 不受理-弹窗
3962
+  rejectModalShow = false; //弹窗开关
3963
+  rejectFn(data) {
3964
+    this.coopData = data;
3965
+    this.rejectModalShow = true;
3966
+  }
3967
+  // 关闭弹窗
3968
+  closeRejectModelOrder(e) {
3969
+    this.rejectModalShow = JSON.parse(e).show;
3970
+  }
3971
+  // 弹窗确定
3972
+  confirmRejectModelOrder(rejectRemark){
3973
+    this.maskFlag = this.msg.loading("正在加载中..", {
3974
+      nzDuration: 0,
3975
+    }).messageId;
3976
+
3977
+    let postData = {
3978
+      incident: {
3979
+        ...this.coopData,
3980
+        rejectRemark,
3981
+      },
3982
+    }
3983
+
3984
+    console.log(postData);
3985
+    // return;
3986
+    this.mainService
3987
+    .flowPost("incident/task/reject", postData)
3988
+    .subscribe((result) => {
3989
+      this.msg.remove(this.maskFlag);
3990
+      this.maskFlag = false;
3991
+
3992
+      if (result.state == 200) {
3993
+        this.rejectModalShow = false;
3994
+        this.showPromptModal("不受理", true, "", "");
3995
+      } else {
3996
+        this.msg.error('不受理失败');
3997
+      }
3998
+    });
3999
+  }
4000
+
4001
+  // 换人处理-弹窗
4002
+  substitutionModalShow = false; //弹窗开关
4003
+  substitution(data) {
4004
+    this.coopData = data;
4005
+    this.substitutionModalShow = true;
4006
+  }
4007
+  // 关闭弹窗
4008
+  closeSubstitutionModelOrder(e) {
4009
+    this.substitutionModalShow = JSON.parse(e).show;
4010
+  }
4011
+  // 弹窗确定
4012
+  confirmSubstitutionModelOrder(e){
4013
+    console.log(e);
4014
+    this.substitutionModalShow = false;
4015
+    this.showPromptModalRefresh();
4016
+  }
4017
+
4018
+  // 是否显示接单按钮
4019
+  computedReceive(data){
4020
+    let inUser = data.currentLog && data.currentLog.workerId == this.tool.getCurrentUserId();
4021
+    let inGroup = false;
4022
+    let groupList = this.tool.getCurrentGroupList();
4023
+    groupList.forEach(item => {
4024
+        if(data.currentLog){
4025
+            if (item.id == data.currentLog.groupId) {
4026
+                inGroup = true;
4027
+            }
4028
+        }
4029
+    })
4030
+    return data.state.value === 'pending' && (inUser || inGroup) && this.coopBtns.receive && data.deleteFlag !== 1;
4031
+  }
4032
+
4033
+  // 是否显示换人处理按钮
4034
+  computedSubstitution(data){
4035
+    return (data.state.value === 'pending' || data.state.value === 'handler' || (data.state.value === 'reassign' && this.coopBtns.assign)) && data.deleteFlag !== 1;
4036
+  }
3837 4037
 }

+ 4 - 0
src/app/views/fuwutai/fuwutai.module.ts

@@ -10,6 +10,8 @@ import { OrderScopeModule } from 'src/app/components/order-scope/order-scope.mod
10 10
 import { IncidentDicrectOrderModule } from 'src/app/components/incidentManagement/incident-direct-order/incident-direct-order.module';
11 11
 import { KnowledgeLookModule } from 'src/app/components/knowledge-look/knowledge-look.module';
12 12
 import { IncidentDetailModule } from 'src/app/components/incidentManagement/incident-detail/incident-detail.module';
13
+import { IncidentRejectModule } from 'src/app/components/incidentManagement/incident-reject/incident-reject.module';
14
+import { IncidentSubstitutionModule } from 'src/app/components/incidentManagement/incident-substitution/incident-substitution.module';
13 15
 
14 16
 
15 17
 @NgModule({
@@ -25,6 +27,8 @@ import { IncidentDetailModule } from 'src/app/components/incidentManagement/inci
25 27
     IncidentDicrectOrderModule,
26 28
     KnowledgeLookModule,
27 29
     IncidentDetailModule,
30
+    IncidentRejectModule,
31
+    IncidentSubstitutionModule,
28 32
   ]
29 33
 })
30 34
 export class FuwutaiModule { }

+ 2 - 2
src/app/views/incident-management/incident-management.component.ts

@@ -250,7 +250,7 @@ export class IncidentManagementComponent implements OnInit {
250 250
 
251 251
   // 是否显示换人处理按钮
252 252
   computedSubstitution(data){
253
-    return data.state.value === 'pending' || data.state.value === 'handler' || (data.state.value === 'reassign' && this.coopBtns.assign) && data.deleteFlag !== 1;
253
+    return (data.state.value === 'pending' || data.state.value === 'handler' || (data.state.value === 'reassign' && this.coopBtns.assign)) && data.deleteFlag !== 1;
254 254
   }
255 255
 
256 256
   // 是否显示延期处理按钮
@@ -690,7 +690,7 @@ export class IncidentManagementComponent implements OnInit {
690 690
     this.getList(true);
691 691
   }
692 692
 
693
-  // 处理-弹窗
693
+  // 换人处理-弹窗
694 694
   substitutionModalShow = false; //弹窗开关
695 695
   substitution(e, data) {
696 696
     e.stopPropagation();

+ 3 - 0
src/common.less

@@ -19,6 +19,9 @@
19 19
 .ml16 {
20 20
   margin-left: 16px !important;
21 21
 }
22
+.gap8{
23
+  gap: 8px !important;
24
+}
22 25
 .line_height_normal{
23 26
   line-height: normal !important;
24 27
 }