seimin 7 달 전
부모
커밋
f659bb3be0
19개의 변경된 파일475개의 추가작업 그리고 212개의 파일을 삭제
  1. 31 0
      src/app/components/incidentManagement/incident-handle-handle/incident-handle-handle.component.html
  2. 39 0
      src/app/components/incidentManagement/incident-handle-handle/incident-handle-handle.component.less
  3. 71 0
      src/app/components/incidentManagement/incident-handle-handle/incident-handle-handle.component.ts
  4. 20 0
      src/app/components/incidentManagement/incident-handle-handle/incident-handle-handle.module.ts
  5. 3 15
      src/app/components/incidentManagement/incident-handle-info-simple/incident-handle-info-simple.component.ts
  6. 1 1
      src/app/components/incidentManagement/incident-handle-info/incident-handle-info.component.html
  7. 1 9
      src/app/components/incidentManagement/incident-handle-info/incident-handle-info.component.ts
  8. 48 0
      src/app/components/incidentManagement/incident-handle-repair/incident-handle-repair.component.html
  9. 39 0
      src/app/components/incidentManagement/incident-handle-repair/incident-handle-repair.component.less
  10. 85 0
      src/app/components/incidentManagement/incident-handle-repair/incident-handle-repair.component.ts
  11. 20 0
      src/app/components/incidentManagement/incident-handle-repair/incident-handle-repair.module.ts
  12. 3 51
      src/app/components/incidentManagement/incident-handle/incident-handle.component.html
  13. 0 37
      src/app/components/incidentManagement/incident-handle/incident-handle.component.less
  14. 3 58
      src/app/components/incidentManagement/incident-handle/incident-handle.component.ts
  15. 2 0
      src/app/components/incidentManagement/incident-handle/incident-handle.module.ts
  16. 33 13
      src/app/components/incidentManagement/incident-visit/incident-visit.component.html
  17. 38 4
      src/app/components/incidentManagement/incident-visit/incident-visit.component.less
  18. 34 24
      src/app/components/incidentManagement/incident-visit/incident-visit.component.ts
  19. 4 0
      src/app/components/incidentManagement/incident-visit/incident-visit.module.ts

+ 31 - 0
src/app/components/incidentManagement/incident-handle-handle/incident-handle-handle.component.html

@@ -0,0 +1,31 @@
1
+<!--
2
+ * @Author: seimin
3
+ * @Date: 2024-08-26 11:00:55
4
+ * @LastEditors: seimin
5
+ * @LastEditTime: 2024-08-26 11:30:53
6
+ * @Description: 处理信息展示
7
+-->
8
+<div class="detailItem">
9
+  <div class="name">解决方案:</div>
10
+  <div class="value">{{incidentData.handleDescription}}</div>
11
+</div>
12
+<div class="detailItem">
13
+  <div class="name">处理人:</div>
14
+  <div class="value">{{computedHandlerUser}}</div>
15
+</div>
16
+<div class="detailItem">
17
+  <div class="name">处理时间:</div>
18
+  <div class="value">{{incidentData.handleTime | date:'yyyy-MM-dd HH:mm'}}</div>
19
+</div>
20
+<div class="detailItem">
21
+  <div class="name">接单时间:</div>
22
+  <div class="value">{{incidentData.responseHandleTime | date:'yyyy-MM-dd HH:mm'}}</div>
23
+</div>
24
+<div class="detailItem">
25
+  <div class="name">处理图片:</div>
26
+  <div class="value thumbs">
27
+    <div class="thumb" *ngFor="let item of handleImgs;let index = index;" (click)="previewImageHandler(handleImgs, index)"><img [src]="item.thumbFilePath" alt=""></div>
28
+  </div>
29
+</div>
30
+<!-- 图片预览 -->
31
+<app-image-viewer [imageUrl]="imgs" hidden *ngIf="isPreview" [isPreviewNow]="true" [initialViewIndex]="initialViewIndex"></app-image-viewer>

+ 39 - 0
src/app/components/incidentManagement/incident-handle-handle/incident-handle-handle.component.less

@@ -0,0 +1,39 @@
1
+@import "../../../../../src/theme.less";
2
+.detailItem{
3
+  display: flex;
4
+  padding-bottom: 16px;
5
+  .name{
6
+    width: 5em;
7
+    flex-shrink: 0;
8
+    text-align: left;
9
+  }
10
+  .value{
11
+    flex: 1;
12
+    text-align: justify;
13
+  }
14
+  .thumbs{
15
+    display: flex;
16
+    align-items: center;
17
+    flex-wrap: wrap;
18
+    gap: 8px;
19
+    .thumb{
20
+      width: 64px;
21
+      height: 64px;
22
+      padding: 4px;
23
+      border-radius: 4px;
24
+      border: 1px solid rgba(0,0,0,0.15);
25
+      img{
26
+        width: 100%;
27
+        height: 100%;
28
+        object-fit: cover;
29
+        object-position: center;
30
+        cursor: pointer;
31
+      }
32
+    }
33
+  }
34
+
35
+  .audio{
36
+    width: 264px;
37
+    height: 1.5em;
38
+  }
39
+}

+ 71 - 0
src/app/components/incidentManagement/incident-handle-handle/incident-handle-handle.component.ts

@@ -0,0 +1,71 @@
1
+import { Component, OnInit, Input } from '@angular/core';
2
+import { MainService } from '../../../services/main.service';
3
+import { NzMessageService } from 'ng-zorro-antd';
4
+import { ToolService } from 'src/app/services/tool.service';
5
+
6
+@Component({
7
+  selector: 'app-incident-handle-handle',
8
+  templateUrl: './incident-handle-handle.component.html',
9
+  styleUrls: ['./incident-handle-handle.component.less']
10
+})
11
+export class IncidentHandleHandleComponent implements OnInit {
12
+  @Input() incidentData: any = {};
13
+
14
+  constructor(
15
+    private mainService: MainService,
16
+    private message: NzMessageService,
17
+    private tool: ToolService,
18
+  ) { }
19
+
20
+  hosId:any;
21
+
22
+  ngOnInit() {
23
+    console.log(this.incidentData);
24
+    this.hosId = this.tool.getCurrentHospital().id;
25
+    this.getRepairImgs();
26
+  }
27
+
28
+  // 处理人
29
+  get computedHandlerUser(){
30
+    if(this.incidentData.state.value == 'pending' && this.incidentData.currentLog){
31
+      return this.incidentData.currentLog.workerName;
32
+    }
33
+    if(this.incidentData.state.value != 'pending' && this.incidentData.handlingPersonnelUser){
34
+      return this.incidentData.handlingPersonnelUser.name;
35
+    }
36
+  }
37
+
38
+  // 获取处理图片
39
+  handleImgs:any[] = [];//处理图片
40
+  getRepairImgs() {
41
+    this.mainService
42
+      .getPreviewImage('incident', this.incidentData.id)
43
+      .subscribe((res:any) => {
44
+        res.data = res.data || [];
45
+        res.data.forEach(v => {
46
+          v.previewUrl = location.origin + "/file" + v.relativeFilePath;
47
+          v.thumbFilePath = location.origin + "/file" + v.thumbFilePath;
48
+        })
49
+        this.handleImgs = res.data;
50
+      });
51
+  }
52
+
53
+  // 预览图片
54
+  imgs = [];
55
+  isPreview = false;
56
+  initialViewIndex:number = 0;
57
+  previewImageHandler(data = [], index = 0) {
58
+    this.initialViewIndex = index;
59
+    console.log(index)
60
+    this.isPreview = false;
61
+    data = data || [];
62
+    this.imgs = data.map((v) => location.origin + '/file' + v.relativeFilePath);
63
+    setTimeout(() => {
64
+      this.isPreview = true;
65
+    }, 0)
66
+  }
67
+}
68
+
69
+
70
+
71
+

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

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

+ 3 - 15
src/app/components/incidentManagement/incident-handle-info-simple/incident-handle-info-simple.component.ts

@@ -2,7 +2,7 @@ import { Component, OnInit, Input, Output, EventEmitter, ViewChild, OnChanges, S
2 2
 import { MainService } from '../../../services/main.service';
3 3
 import { Router } from '@angular/router';
4 4
 import { ToolService } from 'src/app/services/tool.service';
5
-import { NzMessageService, UploadFile, UploadXHRArgs } from 'ng-zorro-antd';
5
+import { NzMessageService, UploadFile } from 'ng-zorro-antd';
6 6
 import cloneDeep from 'lodash-es/cloneDeep'
7 7
 import { debounceTime } from 'rxjs/operators';
8 8
 import { Subject } from 'rxjs';
@@ -13,7 +13,7 @@ import { HttpClient, HttpEvent, HttpResponse, HttpEventType, HttpRequest } from
13 13
   templateUrl: './incident-handle-info-simple.component.html',
14 14
   styleUrls: ['./incident-handle-info-simple.component.less']
15 15
 })
16
-export class IncidentHandleInfoSimpleComponent implements OnInit, OnChanges {
16
+export class IncidentHandleInfoSimpleComponent implements OnInit {
17 17
   @Input() incidentData:any = {};
18 18
   @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
19 19
   @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
@@ -30,19 +30,6 @@ export class IncidentHandleInfoSimpleComponent implements OnInit, OnChanges {
30 30
 
31 31
   changeInpSubject = new Subject(); //防抖
32 32
 
33
-  ngOnChanges(changes: SimpleChanges){
34
-    console.log('changes:', changes)
35
-
36
-    // 初始化
37
-    if(changes.incidentData && !changes.incidentData.firstChange && changes.incidentData.currentValue && changes.incidentData.previousValue && !changes.incidentData.previousValue.id){
38
-      this.init();
39
-    }
40
-
41
-    if(changes.incidentData && changes.incidentData.firstChange && changes.incidentData.currentValue && !changes.incidentData.previousValue){
42
-      this.init();
43
-    }
44
-  }
45
-
46 33
   ngOnInit() {
47 34
     //防抖
48 35
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
@@ -52,6 +39,7 @@ export class IncidentHandleInfoSimpleComponent implements OnInit, OnChanges {
52 39
         this.getAssetProductList(v[1]);
53 40
       }
54 41
     });
42
+    this.init();
55 43
   }
56 44
 
57 45
   init(){

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
src/app/components/incidentManagement/incident-handle-info/incident-handle-info.component.html


+ 1 - 9
src/app/components/incidentManagement/incident-handle-info/incident-handle-info.component.ts

@@ -36,15 +36,6 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
36 36
     if(changes.incidentData && !changes.incidentData.firstChange && changes.incidentData.currentValue){
37 37
       this.incidentDataCopy.handleDescription = changes.incidentData.currentValue.handleDescription;
38 38
     }
39
-
40
-    // 初始化
41
-    if(changes.incidentData && !changes.incidentData.firstChange && changes.incidentData.currentValue && changes.incidentData.previousValue && !changes.incidentData.previousValue.id){
42
-      this.init();
43
-    }
44
-
45
-    if(changes.incidentData && changes.incidentData.firstChange && changes.incidentData.currentValue && !changes.incidentData.previousValue){
46
-      this.init();
47
-    }
48 39
   }
49 40
 
50 41
   ngOnInit() {
@@ -59,6 +50,7 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
59 50
         this.getIncidentCategoryList(v[1]);
60 51
       }
61 52
     });
53
+    this.init();
62 54
   }
63 55
 
64 56
   init(){

+ 48 - 0
src/app/components/incidentManagement/incident-handle-repair/incident-handle-repair.component.html

@@ -0,0 +1,48 @@
1
+<div class="detailItem">
2
+  <div class="name">申请时间:</div>
3
+  <div class="value">{{incidentData.startDate | date:'yyyy-MM-dd HH:mm'}}</div>
4
+</div>
5
+<div class="detailItem">
6
+  <div class="name">登记时间:</div>
7
+  <div class="value">{{incidentData.acceptDate | date:'yyyy-MM-dd HH:mm'}}</div>
8
+</div>
9
+<div class="detailItem">
10
+  <div class="name">故障描述:</div>
11
+  <div class="value">{{incidentData.description}}</div>
12
+</div>
13
+<div class="detailItem">
14
+  <div class="name">报修科室:</div>
15
+  <div class="value">{{incidentData.department?.dept}}</div>
16
+</div>
17
+<div class="detailItem">
18
+  <div class="name">详细地址:</div>
19
+  <div class="value">{{ incidentData.place ? incidentData.place.building.buildingName : '' }}{{ incidentData.place ? incidentData.place.floorName : '' }}{{ incidentData.houseNumber }}</div>
20
+</div>
21
+<div class="detailItem">
22
+  <div class="name">报修图片:</div>
23
+  <div class="value thumbs">
24
+    <div class="thumb" *ngFor="let item of repairImgs;let index = index;" (click)="previewImageHandler(repairImgs, index)"><img [src]="item.thumbFilePath" alt=""></div>
25
+  </div>
26
+</div>
27
+<div class="detailItem">
28
+  <div class="name">联系人:</div>
29
+  <div class="value">{{incidentData.contacts}}</div>
30
+</div>
31
+<div class="detailItem">
32
+  <div class="name">联系电话:</div>
33
+  <div class="value">{{incidentData.contactsInformation}}</div>
34
+</div>
35
+<div class="detailItem">
36
+  <div class="name">来电电话:</div>
37
+  <div class="value">{{incidentData.incomingPhone}}</div>
38
+</div>
39
+<div class="detailItem">
40
+  <div class="name">电话录音:</div>
41
+  <div class="value">
42
+    <audio class="audio" controls style="outline: none;" *ngIf="incidentData.callID">
43
+      <source [src]="audioSrc">
44
+    </audio>
45
+  </div>
46
+</div>
47
+<!-- 图片预览 -->
48
+<app-image-viewer [imageUrl]="imgs" hidden *ngIf="isPreview" [isPreviewNow]="true" [initialViewIndex]="initialViewIndex"></app-image-viewer>

+ 39 - 0
src/app/components/incidentManagement/incident-handle-repair/incident-handle-repair.component.less

@@ -0,0 +1,39 @@
1
+@import "../../../../../src/theme.less";
2
+.detailItem{
3
+  display: flex;
4
+  padding-bottom: 16px;
5
+  .name{
6
+    width: 5em;
7
+    flex-shrink: 0;
8
+    text-align: left;
9
+  }
10
+  .value{
11
+    flex: 1;
12
+    text-align: justify;
13
+  }
14
+  .thumbs{
15
+    display: flex;
16
+    align-items: center;
17
+    flex-wrap: wrap;
18
+    gap: 8px;
19
+    .thumb{
20
+      width: 64px;
21
+      height: 64px;
22
+      padding: 4px;
23
+      border-radius: 4px;
24
+      border: 1px solid rgba(0,0,0,0.15);
25
+      img{
26
+        width: 100%;
27
+        height: 100%;
28
+        object-fit: cover;
29
+        object-position: center;
30
+        cursor: pointer;
31
+      }
32
+    }
33
+  }
34
+
35
+  .audio{
36
+    width: 264px;
37
+    height: 1.5em;
38
+  }
39
+}

+ 85 - 0
src/app/components/incidentManagement/incident-handle-repair/incident-handle-repair.component.ts

@@ -0,0 +1,85 @@
1
+import { Component, OnInit, Input } from '@angular/core';
2
+import { MainService } from '../../../services/main.service';
3
+import { NzMessageService } from 'ng-zorro-antd';
4
+import { ToolService } from 'src/app/services/tool.service';
5
+
6
+@Component({
7
+  selector: 'app-incident-handle-repair',
8
+  templateUrl: './incident-handle-repair.component.html',
9
+  styleUrls: ['./incident-handle-repair.component.less']
10
+})
11
+export class IncidentHandleRepairComponent implements OnInit {
12
+  @Input() incidentData: any = {};
13
+
14
+  constructor(
15
+    private mainService: MainService,
16
+    private message: NzMessageService,
17
+    private tool: ToolService,
18
+  ) { }
19
+
20
+  hosId:any;
21
+
22
+  ngOnInit() {
23
+    this.hosId = this.tool.getCurrentHospital().id;
24
+    this.incidentData.callID && this.getCallrecord();
25
+    this.incidentData.reqAttachment && this.getRepairImgs();
26
+  }
27
+
28
+  // 获取通话音频
29
+  audioSrc =  '';//音频
30
+  getCallrecord() {
31
+    let postData = {
32
+      idx: 0,
33
+      sum: 1,
34
+      callrecord: {callAccept: this.incidentData.callID},
35
+    };
36
+    this.mainService
37
+      .getFetchDataList('simple/data', 'callrecord', postData)
38
+      .subscribe((result) => {
39
+        if(result.status == 200){
40
+          result.list = result.list || [];
41
+          if(result.list.length){
42
+            this.audioSrc = location.origin + result.list[0].recordingFileName;
43
+          }else{
44
+            this.audioSrc = '';
45
+          }
46
+        }else{
47
+          this.message.error(result.msg || '请求数据失败!');
48
+        }
49
+      });
50
+  }
51
+
52
+  // 获取报修图片
53
+  repairImgs:any[] = [];//报修图片
54
+  getRepairImgs() {
55
+    this.mainService
56
+      .getPreviewImage('wechatRequesterIncident', this.incidentData.id)
57
+      .subscribe((res:any) => {
58
+        res.data = res.data || [];
59
+        res.data.forEach(v => {
60
+          v.previewUrl = location.origin + "/file" + v.relativeFilePath;
61
+          v.thumbFilePath = location.origin + "/file" + v.thumbFilePath;
62
+        })
63
+        this.repairImgs = res.data;
64
+      });
65
+  }
66
+
67
+  // 预览图片
68
+  imgs = [];
69
+  isPreview = false;
70
+  initialViewIndex:number = 0;
71
+  previewImageHandler(data = [], index = 0) {
72
+    this.initialViewIndex = index;
73
+    console.log(index)
74
+    this.isPreview = false;
75
+    data = data || [];
76
+    this.imgs = data.map((v) => location.origin + '/file' + v.relativeFilePath);
77
+    setTimeout(() => {
78
+      this.isPreview = true;
79
+    }, 0)
80
+  }
81
+}
82
+
83
+
84
+
85
+

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

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

+ 3 - 51
src/app/components/incidentManagement/incident-handle/incident-handle.component.html

@@ -1,54 +1,9 @@
1
-<div class="modal display_flex justify-content_flex-center align-items_center">
1
+<div class="modal display_flex justify-content_flex-center align-items_center" *ngIf="incidentData">
2 2
   <div class="modalBody">
3 3
     <div class="title">详细处理<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
-    <div class="content" [ngStyle]="{'visibility': incidentData.id ? 'visible' : 'hidden'}">
4
+    <div class="content">
5 5
       <overlay-scrollbars #osComponentRef1 class="detail">
6
-        <div class="detailItem">
7
-          <div class="name">申请时间:</div>
8
-          <div class="value">{{incidentData.startDate | date:'yyyy-MM-dd HH:mm'}}</div>
9
-        </div>
10
-        <div class="detailItem">
11
-          <div class="name">登记时间:</div>
12
-          <div class="value">{{incidentData.acceptDate | date:'yyyy-MM-dd HH:mm'}}</div>
13
-        </div>
14
-        <div class="detailItem">
15
-          <div class="name">故障描述:</div>
16
-          <div class="value">{{incidentData.description}}</div>
17
-        </div>
18
-        <div class="detailItem">
19
-          <div class="name">报修科室:</div>
20
-          <div class="value">{{incidentData.department?.dept}}</div>
21
-        </div>
22
-        <div class="detailItem">
23
-          <div class="name">详细地址:</div>
24
-          <div class="value">{{ incidentData.place ? incidentData.place.building.buildingName : '' }}{{ incidentData.place ? incidentData.place.floorName : '' }}{{ incidentData.houseNumber }}</div>
25
-        </div>
26
-        <div class="detailItem">
27
-          <div class="name">报修图片:</div>
28
-          <div class="value thumbs">
29
-            <div class="thumb" *ngFor="let item of repairImgs;let index = index;" (click)="previewImageHandler(repairImgs, index)"><img [src]="item.thumbFilePath" alt=""></div>
30
-          </div>
31
-        </div>
32
-        <div class="detailItem">
33
-          <div class="name">联系人:</div>
34
-          <div class="value">{{incidentData.contacts}}</div>
35
-        </div>
36
-        <div class="detailItem">
37
-          <div class="name">联系电话:</div>
38
-          <div class="value">{{incidentData.contactsInformation}}</div>
39
-        </div>
40
-        <div class="detailItem">
41
-          <div class="name">来电电话:</div>
42
-          <div class="value">{{incidentData.incomingPhone}}</div>
43
-        </div>
44
-        <div class="detailItem">
45
-          <div class="name">电话录音:</div>
46
-          <div class="value">
47
-            <audio class="audio" controls style="outline: none;" *ngIf="incidentData.callID">
48
-              <source [src]="audioSrc">
49
-            </audio>
50
-          </div>
51
-        </div>
6
+        <app-incident-handle-repair [incidentData]="incidentData"></app-incident-handle-repair>
52 7
       </overlay-scrollbars>
53 8
       <overlay-scrollbars #osComponentRef2 class="workingArea">
54 9
         <div class="tabs">
@@ -82,9 +37,6 @@
82 37
   </div>
83 38
 </div>
84 39
 
85
-<!-- 图片预览 -->
86
-<app-image-viewer [imageUrl]="imgs" hidden *ngIf="isPreview" [isPreviewNow]="true" [initialViewIndex]="initialViewIndex"></app-image-viewer>
87
-
88 40
 <!-- 知识库查看 -->
89 41
 <app-knowledge-look (cancelKnowledgeModal)="cancelKnowledgeModal()" *ngIf="isShowKnowledge" [knowledgeData]="coopData"></app-knowledge-look>
90 42
 

+ 0 - 37
src/app/components/incidentManagement/incident-handle/incident-handle.component.less

@@ -82,43 +82,6 @@
82 82
         height: 100%;
83 83
         padding: 16px;
84 84
         border-right: 1px solid #E9E9E9;
85
-        .detailItem{
86
-          display: flex;
87
-          margin-bottom: 16px;
88
-          .name{
89
-            width: 5em;
90
-            flex-shrink: 0;
91
-          }
92
-          .value{
93
-            flex: 1;
94
-            text-align: justify;
95
-          }
96
-          .thumbs{
97
-            display: flex;
98
-            align-items: center;
99
-            flex-wrap: wrap;
100
-            gap: 8px;
101
-            .thumb{
102
-              width: 64px;
103
-              height: 64px;
104
-              padding: 4px;
105
-              border-radius: 4px;
106
-              border: 1px solid rgba(0,0,0,0.15);
107
-              img{
108
-                width: 100%;
109
-                height: 100%;
110
-                object-fit: cover;
111
-                object-position: center;
112
-                cursor: pointer;
113
-              }
114
-            }
115
-          }
116
-
117
-          .audio{
118
-            width: 264px;
119
-            height: 1.5em;
120
-          }
121
-        }
122 85
       }
123 86
       .workingArea{
124 87
         flex: 1;

+ 3 - 58
src/app/components/incidentManagement/incident-handle/incident-handle.component.ts

@@ -105,7 +105,7 @@ export class IncidentHandleComponent implements OnInit {
105 105
   }
106 106
 
107 107
   // 获取详情数据
108
-  incidentData:any = {};
108
+  incidentData:any;
109 109
   maskFlag:any = false;
110 110
   getDetail() {
111 111
     this.maskFlag = this.message.loading("正在加载中..", {
@@ -117,37 +117,11 @@ export class IncidentHandleComponent implements OnInit {
117 117
         this.message.remove(this.maskFlag);
118 118
         this.maskFlag = false;
119 119
         this.incidentData = result.data || {};
120
-        this.incidentData.callID && this.getCallrecord();
121
-        this.incidentData.reqAttachment && this.getRepairImgs();
122 120
 
123 121
         this.getDictionaryList();
124 122
       });
125 123
   }
126 124
 
127
-  // 获取通话音频
128
-  audioSrc =  '';//音频
129
-  getCallrecord() {
130
-    let postData = {
131
-      idx: 0,
132
-      sum: 1,
133
-      callrecord: {callAccept: this.incidentData.callID},
134
-    };
135
-    this.mainService
136
-      .getFetchDataList('simple/data', 'callrecord', postData)
137
-      .subscribe((result) => {
138
-        if(result.status == 200){
139
-          result.list = result.list || [];
140
-          if(result.list.length){
141
-            this.audioSrc = location.origin + result.list[0].recordingFileName;
142
-          }else{
143
-            this.audioSrc = '';
144
-          }
145
-        }else{
146
-          this.message.error(result.msg || '请求数据失败!');
147
-        }
148
-      });
149
-  }
150
-
151 125
   //获取知识库状态/类型
152 126
   knowageLoading:boolean = false;
153 127
   getDictionaryList() {
@@ -215,36 +189,6 @@ export class IncidentHandleComponent implements OnInit {
215 189
     this.isShowKnowledge = false;
216 190
   }
217 191
 
218
-  // 获取报修图片
219
-  repairImgs:any[] = [];//报修图片
220
-  getRepairImgs() {
221
-    this.mainService
222
-      .getPreviewImage('wechatRequesterIncident', this.id)
223
-      .subscribe((res:any) => {
224
-        res.data = res.data || [];
225
-        res.data.forEach(v => {
226
-          v.previewUrl = location.origin + "/file" + v.relativeFilePath;
227
-          v.thumbFilePath = location.origin + "/file" + v.thumbFilePath;
228
-        })
229
-        this.repairImgs = res.data;
230
-      });
231
-  }
232
-
233
-  // 预览图片
234
-  imgs = [];
235
-  isPreview = false;
236
-  initialViewIndex:number = 0;
237
-  previewImageHandler(data = [], index = 0) {
238
-    this.initialViewIndex = index;
239
-    console.log(index)
240
-    this.isPreview = false;
241
-    data = data || [];
242
-    this.imgs = data.map((v) => location.origin + '/file' + v.relativeFilePath);
243
-    setTimeout(() => {
244
-      this.isPreview = true;
245
-    }, 0)
246
-  }
247
-
248 192
   // 图片上传
249 193
   uploadImages(file, id){
250 194
     const formData = new FormData();
@@ -280,7 +224,7 @@ export class IncidentHandleComponent implements OnInit {
280 224
     if(this.itsmSimpleHandle.value == 0){
281 225
       // 详细处理
282 226
       console.log(this.incidentHandleInfoComponent)
283
-      return;
227
+      // return;
284 228
       if(!this.incidentHandleInfoComponent.incidentDataCopy.handleDescription){
285 229
         this.message.warning('请选择解决方案!');
286 230
         return;
@@ -351,6 +295,7 @@ export class IncidentHandleComponent implements OnInit {
351 295
     }else if(this.itsmSimpleHandle.value == 1){
352 296
       // 简单处理
353 297
       console.log(this.incidentHandleInfoSimpleComponent)
298
+      // return;
354 299
       if(!this.incidentHandleInfoSimpleComponent.incidentDataCopy.handleCategory){
355 300
         this.message.warning('请选择处理方式!');
356 301
         return;

+ 2 - 0
src/app/components/incidentManagement/incident-handle/incident-handle.module.ts

@@ -7,6 +7,7 @@ import { IncidentHandleInfoComponent } from '../incident-handle-info/incident-ha
7 7
 import { IncidentHandleInfoSimpleComponent } from '../incident-handle-info-simple/incident-handle-info-simple.component';
8 8
 import { IncidentHandleOrderComponent } from '../incident-handle-order/incident-handle-order.component';
9 9
 import { KnowledgeLookModule } from '../../knowledge-look/knowledge-look.module';
10
+import { IncidentHandleRepairModule } from '../incident-handle-repair/incident-handle-repair.module';
10 11
 
11 12
 
12 13
 @NgModule({
@@ -20,6 +21,7 @@ import { KnowledgeLookModule } from '../../knowledge-look/knowledge-look.module'
20 21
     CommonModule,
21 22
     ShareModule,
22 23
     KnowledgeLookModule,
24
+    IncidentHandleRepairModule,
23 25
   ],
24 26
   exports: [
25 27
     IncidentHandleComponent,

+ 33 - 13
src/app/components/incidentManagement/incident-visit/incident-visit.component.html

@@ -1,13 +1,33 @@
1
+<!--
2
+ * @Author: seimin
3
+ * @Date: 2024-08-23 16:49:04
4
+ * @LastEditors: seimin
5
+ * @LastEditTime: 2024-08-26 11:36:09
6
+ * @Description: 回访
7
+-->
1 8
 <div class="save display_flex justify-content_flex-center align-items_center add">
2 9
   <div class="modalBody">
3
-    <div class="title">延期处理<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
10
+    <div class="title">回访<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4 11
     <div class="content">
12
+      <overlay-scrollbars #osComponentRef1 class="workingArea">
13
+        <div class="tabs">
14
+          <div class="tab" *ngFor="let item of tabs" (click)="clickTbab(item)" [ngClass]="{ active: activeTabValue === item.value }">{{ item.name }}</div>
15
+        </div>
16
+        <div class="detail">
17
+          <ng-container *ngIf="activeTabValue === 1">
18
+            <app-incident-handle-repair [incidentData]="incidentData"></app-incident-handle-repair>
19
+          </ng-container>
20
+          <ng-container *ngIf="activeTabValue === 2">
21
+            <app-incident-handle-handle [incidentData]="incidentData"></app-incident-handle-handle>
22
+          </ng-container>
23
+        </div>
24
+      </overlay-scrollbars>
5 25
       <form nz-form [formGroup]="validateForm" class="addForm">
6 26
         <nz-form-item>
7
-          <nz-form-label [nzSpan]="6" nzRequired nzFor="repairTypeId">延期原因</nz-form-label>
8
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择延期原因!">
9
-            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="repairTypeId" nzPlaceHolder="请选择延期原因" nzServerSearch>
10
-              <ng-container *ngFor="let data of repairTypeList">
27
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="degree">满意度评价</nz-form-label>
28
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择满意度评价!">
29
+            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="degree" nzPlaceHolder="请选择满意度评价" nzServerSearch>
30
+              <ng-container *ngFor="let data of deferralDayList">
11 31
                 <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
12 32
               </ng-container>
13 33
               <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
@@ -17,11 +37,11 @@
17 37
           </nz-form-control>
18 38
         </nz-form-item>
19 39
         <nz-form-item>
20
-          <nz-form-label [nzSpan]="6" nzRequired nzFor="deferralDayId">延期天数</nz-form-label>
21
-          <nz-form-control [nzSpan]="18" nzErrorTip="请选择延期天数!">
22
-            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="deferralDayId" nzPlaceHolder="请选择延期天数" nzServerSearch>
23
-              <ng-container *ngFor="let data of deferralDayList">
24
-                <nz-option *ngIf="!isLoading" [nzLabel]="data.text" [nzValue]="data.value"></nz-option>
40
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="handleResult">回访处理结果</nz-form-label>
41
+          <nz-form-control [nzSpan]="18" nzErrorTip="请选择回访处理结果!">
42
+            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="handleResult" nzPlaceHolder="请选择回访处理结果" nzServerSearch>
43
+              <ng-container *ngFor="let data of repairTypeList">
44
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
25 45
               </ng-container>
26 46
               <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
27 47
                 <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -30,10 +50,10 @@
30 50
           </nz-form-control>
31 51
         </nz-form-item>
32 52
         <nz-form-item>
33
-          <nz-form-label [nzSpan]="6" nzRequired nzFor="deferralRemark">延期说明</nz-form-label>
34
-          <nz-form-control [nzSpan]="18" nzErrorTip="请输入延期说明!">
53
+          <nz-form-label [nzSpan]="6" nzFor="visitRemarks" style="text-indent: 11px;">回访备注</nz-form-label>
54
+          <nz-form-control [nzSpan]="18" nzErrorTip="请输入回访备注!">
35 55
             <nz-input-group>
36
-              <textarea formControlName="deferralRemark" nz-input rows="3" placeholder="请输入延期说明"></textarea>
56
+              <textarea formControlName="visitRemarks" nz-input rows="3" placeholder="请输入回访备注"></textarea>
37 57
             </nz-input-group>
38 58
           </nz-form-control>
39 59
         </nz-form-item>

+ 38 - 4
src/app/components/incidentManagement/incident-visit/incident-visit.component.less

@@ -86,17 +86,19 @@
86 86
   // 新增
87 87
   &.add {
88 88
     .modalBody {
89
-      width: 480px;
89
+      width: 944px;
90 90
       height: auto;
91 91
 
92 92
       .content {
93 93
         width: 100%;
94
-        height: auto;
95
-        padding: 19px 14px 0 14px;
96
-        max-height: 500px;
94
+        height: 529px;
97 95
         overflow-y: auto;
96
+        display: flex;
98 97
 
99 98
         .addForm {
99
+          width: 50%;
100
+          height: 100%;
101
+          padding: 16px;
100 102
           .ant-form-item {
101 103
             margin-bottom: 14px;
102 104
 
@@ -122,4 +124,36 @@
122 124
       }
123 125
     }
124 126
   }
127
+
128
+  .workingArea{
129
+    width: 50%;
130
+    height: 100%;
131
+    border-right: 1px solid #D9D9D9;
132
+    .detail{
133
+      padding: 16px 16px 0;
134
+    }
135
+    .tabs{
136
+      height: 60px;
137
+      border-bottom: 1px solid #D9D9D9;
138
+      display: flex;
139
+      align-items: center;
140
+      background-color: #fff;
141
+      .tab{
142
+        flex: 1;
143
+        display: flex;
144
+        height: 100%;
145
+        justify-content: center;
146
+        align-items: center;
147
+        border-right: 1px solid #D9D9D9;
148
+        font-size: #333;
149
+        cursor: pointer;
150
+        &:last-of-type{
151
+          border-right: none;
152
+        }
153
+        &.active{
154
+          background-color: #F0F6ED;
155
+        }
156
+      }
157
+    }
158
+  }
125 159
 }

+ 34 - 24
src/app/components/incidentManagement/incident-visit/incident-visit.component.ts

@@ -40,41 +40,49 @@ export class IncidentVisitComponent implements OnInit {
40 40
     this.getDeferralDayList();
41 41
   }
42 42
 
43
+  tabs:any[] = [
44
+    { name: '报修信息', value: 1 },
45
+    { name: '处理信息', value: 2 },
46
+  ]
47
+
48
+  // 点击tab
49
+  activeTabValue:any = 1;
50
+  clickTbab(item){
51
+    this.activeTabValue = item.value;
52
+  }
53
+
43 54
   // 初始化新增form表单
44 55
   validateForm: FormGroup; //新增/编辑表单
45 56
   initForm() {
46 57
     this.validateForm = this.fb.group({
47
-      repairTypeId: [null, [Validators.required]],//延期原因
48
-      deferralDayId: [null, [Validators.required]],//延期天数
49
-      deferralRemark: [null, [Validators.required]],//延期说明
58
+      handleResult: [null, [Validators.required]],//回访处理结果
59
+      degree: [null, [Validators.required]],//满意度评价
60
+      visitRemarks: [null],//回访备注
50 61
     });
51 62
     console.log(this.validateForm.controls)
52 63
   }
53 64
 
54
-  // 获取延期原因
65
+  // 获取回访处理结果
55 66
   repairTypeList: any = [];
56 67
   getRepairTypeList() {
57 68
     this.mainService
58
-    .getDictionary('list', 'repair_type')
69
+    .getDictionary('list', 'incident_closecode')
59 70
     .subscribe((data) => {
60 71
       this.repairTypeList = data || [];
61 72
     });
62 73
   }
63 74
 
64
-  // 获取延期天数
75
+  // 获取满意度评价
65 76
   deferralDayList: any = [];
66 77
   getDeferralDayList() {
67
-    this.deferralDayList = this.tool.generateNumberArray(1, 15).map(v => ({
68
-      text: v + '天',
69
-      value: v,
70
-    }));
71
-		this.deferralDayList.unshift({
72
-			text: '0.5天',
73
-			value: 0.5,
74
-		})
78
+    this.mainService
79
+    .getDictionary('list', 'incident_degree')
80
+    .subscribe((data) => {
81
+      this.deferralDayList = data || [];
82
+    });
75 83
   }
76 84
 
77
-  // 操作权限
85
+  // 事件详情
78 86
   incidentData:any = {};
79 87
   getDetail(){
80 88
     this.maskFlag = this.message.loading("正在加载中..", {
@@ -110,26 +118,28 @@ export class IncidentVisitComponent implements OnInit {
110 118
     }).messageId;
111 119
 
112 120
     let postData = {
113
-      incident: this.incidentData,
121
+      incident: {
122
+        ...this.incidentData,
123
+        visitRemarks: this.validateForm.value.visitRemarks,
124
+        handleResult: this.validateForm.value.handleResult ? { id: this.validateForm.value.handleResult } : undefined,
125
+        degree: this.validateForm.value.degree ? { id: this.validateForm.value.degree } : undefined,
126
+      },
114 127
     }
115 128
 
116
-    postData.incident.currentLog = {
117
-      remark: this.validateForm.value.deferralRemark,
118
-      extra1: this.validateForm.value.repairTypeId,
119
-      extra2: this.validateForm.value.deferralDayId,
120
-    }
129
+    console.log(postData);
130
+    // return;
121 131
 
122 132
     this.mainService
123
-    .flowPost("incident/task/overtime", postData)
133
+    .flowPost("incident/task/callback", postData)
124 134
     .subscribe((result) => {
125 135
       this.message.remove(this.maskFlag);
126 136
       this.maskFlag = false;
127 137
       this.confirmModelHs.emit();
128 138
 
129 139
       if (result.state == 200) {
130
-        this.message.success('操作成功');
140
+        this.message.success('回访成功');
131 141
       } else {
132
-        this.message.error('操作失败');
142
+        this.message.error('回访失败');
133 143
       }
134 144
     });
135 145
   }

+ 4 - 0
src/app/components/incidentManagement/incident-visit/incident-visit.module.ts

@@ -3,6 +3,8 @@ import { CommonModule } from '@angular/common';
3 3
 
4 4
 import { IncidentVisitComponent } from './incident-visit.component';
5 5
 import { ShareModule } from 'src/app/share/share.module';
6
+import { IncidentHandleRepairModule } from '../incident-handle-repair/incident-handle-repair.module';
7
+import { IncidentHandleHandleModule } from '../incident-handle-handle/incident-handle-handle.module';
6 8
 
7 9
 
8 10
 @NgModule({
@@ -12,6 +14,8 @@ import { ShareModule } from 'src/app/share/share.module';
12 14
   imports: [
13 15
     CommonModule,
14 16
     ShareModule,
17
+    IncidentHandleRepairModule,
18
+    IncidentHandleHandleModule,
15 19
   ],
16 20
   exports: [
17 21
     IncidentVisitComponent,