Browse Source

巡检和故障工单优化

seimin 1 week ago
parent
commit
a2d96a3ec3

+ 3 - 2
src/app/components/incidentManagement/incident-detail/incident-detail.component.html

@@ -16,7 +16,8 @@
16 16
             </div>
17 17
             <div class="row">
18 18
               <div class="col">报修类型:{{incidentData.repairIncidentType?.name}}</div>
19
-              <div class="col display_flex flex2">报修录音:<audio class="audio" controls style="outline: none;" *ngIf="incidentData.reqRecord && audioRequireSrc"><source [src]="audioRequireSrc" type="audio/mp3"></audio></div>
19
+              <div class="col display_flex">报修录音:<audio class="audio" controls style="outline: none;" *ngIf="incidentData.reqRecord && audioRequireSrc"><source [src]="audioRequireSrc" type="audio/mp3"></audio></div>
20
+              <div class="col">报修来源:{{incidentData.source?.name}}</div>
20 21
             </div>
21 22
             <div class="row">
22 23
               <div class="col">故障现象:{{incidentData.category?.mutiCategory}}</div>
@@ -39,7 +40,7 @@
39 40
             </div>
40 41
             <div class="row">
41 42
               <div class="col">来电电话:{{incidentData.incomingPhone}}</div>
42
-              <div class="col"><audio class="audio" controls style="outline: none;" *ngIf="incidentData.callID && audioSrc"><source [src]="audioSrc" type="audio/wav"></audio></div>
43
+              <div class="col display_flex">来电录音:<audio class="audio" controls style="outline: none;" *ngIf="incidentData.callID && audioSrc"><source [src]="audioSrc" type="audio/wav"></audio></div>
43 44
               <div class="col"><ng-container *ngIf="incidentData.assetDTO">关联资产:{{incidentData.assetDTO?.name}}</ng-container></div>
44 45
             </div>
45 46
             <div class="row">

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

@@ -318,7 +318,7 @@
318 318
     }
319 319
   }
320 320
   .audio{
321
-    width: 264px;
321
+    width: 220px;
322 322
     height: 1.5em;
323 323
   }
324 324
 }

+ 13 - 0
src/app/share/inspection-execute-detail/inspection-execute-detail.component.html

@@ -81,6 +81,19 @@
81 81
               </div>
82 82
             </div>
83 83
           </div>
84
+          <div class="top" *ngIf="orderInfo.incidentDTO">
85
+            <div class="info" nz-row>
86
+              <div nz-col nzSpan="8">
87
+                关联故障单:{{ orderInfo.incidentDTO.incidentsign }}
88
+              </div>
89
+              <div nz-col nzSpan="8">
90
+                状态:{{ orderInfo.incidentDTO.state?.name }}
91
+              </div>
92
+              <div nz-col nzSpan="8">
93
+                处理人/组:{{ orderInfo.incidentDTO.groupORHandlerUser }}
94
+              </div>
95
+            </div>
96
+          </div>
84 97
         </div>
85 98
       </div>
86 99
     </overlay-scrollbars>

+ 8 - 0
src/app/views/incident-management/incident-management-routing.module.ts

@@ -1,12 +1,20 @@
1 1
 import { NgModule } from '@angular/core';
2 2
 import { Routes, RouterModule } from '@angular/router';
3 3
 import { IncidentManagementComponent } from './incident-management.component';
4
+import { InspectionExecuteDetailComponent } from 'src/app/share/inspection-execute-detail/inspection-execute-detail.component';
4 5
 
5 6
 
6 7
 const routes: Routes = [
7 8
   {
8 9
     path: '',
9 10
     component: IncidentManagementComponent,
11
+    children: [
12
+      {
13
+        // 查看详情
14
+        path: 'inspectionExecuteDetail/:id',
15
+        component: InspectionExecuteDetailComponent,
16
+      }
17
+    ]
10 18
   }
11 19
 ];
12 20
 

+ 13 - 0
src/app/views/incident-management/incident-management.component.html

@@ -120,6 +120,7 @@
120 120
             <td>{{ data.state?.name }}</td>
121 121
             <td>
122 122
               <div class="coop">
123
+                <span *ngIf="coopBtns.look && data.inspectionTaskId" (click)="viewInspectionDetail($event,data.inspectionTaskId)">查看巡检</span>
123 124
                 <span *ngIf="coopBtns.look" (click)="detail($event,data)">查看</span>
124 125
                 <span *ngIf="data.computedEditFlag" (click)="edit($event,data)">编辑</span>
125 126
                 <span *ngIf="data.computedVisitFlag" (click)="visit($event,data)">回访</span>
@@ -184,6 +185,15 @@
184 185
           </nz-form-control>
185 186
         </nz-form-item>
186 187
         <nz-form-item>
188
+          <nz-form-label [nzSpan]="5" nzFor="sourceValue">报修来源</nz-form-label>
189
+          <nz-form-control [nzSpan]="19" nzErrorTip="请选择报修来源!">
190
+            <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="false" nzAllowClear
191
+            nzPlaceHolder="请选择报修来源" formControlName="sourceValue">
192
+              <nz-option [nzLabel]="data.name" [nzValue]="data.value" *ngFor="let data of sourceList"></nz-option>
193
+            </nz-select>
194
+          </nz-form-control>
195
+        </nz-form-item>
196
+        <nz-form-item>
187 197
           <nz-form-label [nzSpan]="5" nzFor="deleteFlag">是否已删除</nz-form-label>
188 198
           <nz-form-control [nzSpan]="19" nzErrorTip="请选择是否已删除!">
189 199
             <nz-radio-group formControlName="deleteFlag">
@@ -201,6 +211,9 @@
201 211
   </div>
202 212
 </div>
203 213
 
214
+<!-- 查看详情 -->
215
+<router-outlet></router-outlet>
216
+
204 217
 <!-- 处理 -->
205 218
 <app-incident-handle [id]="coopData.id" *ngIf="handleModalShow" (closeModelHs)="closeHandleModelOrder($event)" (confirmModelHs)="confirmHandleModelOrder($event)"></app-incident-handle>
206 219
 

+ 18 - 0
src/app/views/incident-management/incident-management.component.ts

@@ -36,6 +36,7 @@ export class IncidentManagementComponent implements OnInit, OnDestroy {
36 36
   gdState: number; //选择工单状态
37 37
   gdStates: any; //工单状态列表
38 38
   overdueStates: any; //逾期查询列表
39
+  sourceList: any; //报修来源列表
39 40
   pageIndex: number = 1; //页码
40 41
   listLength: number = 10; //总条数
41 42
   pageSize: number = 10; //每页条数
@@ -111,6 +112,7 @@ export class IncidentManagementComponent implements OnInit, OnDestroy {
111 112
     this.initTabs();
112 113
     this.getGdStates();
113 114
     this.getOverdueStates();
115
+    this.getSourceList();
114 116
     this.getIncidentCategoryList();
115 117
     this.loading1 = true;
116 118
     this.debounceSubject.next(true);
@@ -358,6 +360,7 @@ export class IncidentManagementComponent implements OnInit, OnDestroy {
358 360
         levelCategory: this.validateSearchForm.value.levelCategory ? { id: this.validateSearchForm.value.levelCategory } : undefined,
359 361
         acceptUser: this.validateSearchForm.value.acceptUser ? { id: this.validateSearchForm.value.acceptUser } : undefined,
360 362
         selectType: this.validateSearchForm.value.selectType || undefined,
363
+        source: this.validateSearchForm.value.sourceValue ? { value: this.validateSearchForm.value.sourceValue } : undefined,
361 364
         deleteFlag: this.validateSearchForm.value.deleteFlag,
362 365
 				candidateGroupId: null,
363 366
       },
@@ -514,6 +517,13 @@ export class IncidentManagementComponent implements OnInit, OnDestroy {
514 517
     });
515 518
   }
516 519
 
520
+  // 获取报修来源
521
+  getSourceList() {
522
+    this.mainService.getDictionary("list", "incident_source").subscribe((data) => {
523
+      this.sourceList = data || [];
524
+    });
525
+  }
526
+
517 527
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
518 528
   showPromptModal(con, success, promptInfo?) {
519 529
     this.promptModalShow = false;
@@ -599,6 +609,12 @@ export class IncidentManagementComponent implements OnInit, OnDestroy {
599 609
     this.getList(true);
600 610
   }
601 611
 
612
+  // 查看巡检
613
+  viewInspectionDetail(e, id) {
614
+    e.stopPropagation();
615
+    this.router.navigateByUrl("/main/incidentManagement/inspectionExecuteDetail/" + id);
616
+  }
617
+
602 618
   // 延期处理-弹窗
603 619
   postponeModalShow = false; //弹窗开关
604 620
   postpone(e, data) {
@@ -688,6 +704,7 @@ export class IncidentManagementComponent implements OnInit, OnDestroy {
688 704
         levelCategory: this.validateSearchForm.value.levelCategory ? { id: this.validateSearchForm.value.levelCategory } : undefined,
689 705
         acceptUser: this.validateSearchForm.value.acceptUser ? { id: this.validateSearchForm.value.acceptUser } : undefined,
690 706
         selectType: this.validateSearchForm.value.selectType || undefined,
707
+        source: this.validateSearchForm.value.sourceValue ? { value: this.validateSearchForm.value.sourceValue } : undefined,
691 708
         deleteFlag: this.validateSearchForm.value.deleteFlag,
692 709
 				candidateGroupId: undefined
693 710
       },
@@ -797,6 +814,7 @@ export class IncidentManagementComponent implements OnInit, OnDestroy {
797 814
       acceptUser: [null],
798 815
       selectType: [null],
799 816
       deleteFlag: [0],
817
+      sourceValue: [null],
800 818
     });
801 819
   }
802 820
 

+ 15 - 9
src/app/views/inspection-execute/inspection-execute.component.html

@@ -66,15 +66,16 @@
66 66
         <thead>
67 67
           <tr class="thead">
68 68
             <th nzWidth="5%" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked" (nzCheckedChange)="checkAll($event)"></th>
69
-            <th nzWidth="10%">单号</th>
70
-            <th nzWidth="10%">计划主题|批次号</th>
71
-            <th nzWidth="10%">巡检点|巡检单</th>
72
-            <th nzWidth="10%">截至时间</th>
73
-            <th nzWidth="10%">签到方式</th>
74
-            <th nzWidth="10%">执行人|组</th>
75
-            <th nzWidth="10%">是否异常</th>
76
-            <th nzWidth="10%">状态</th>
77
-            <th nzWidth="15%">操作</th>
69
+            <th nzWidth="9%">单号</th>
70
+            <th nzWidth="9%">计划主题|批次号</th>
71
+            <th nzWidth="9%">巡检点|巡检单</th>
72
+            <th nzWidth="9%">截至时间</th>
73
+            <th nzWidth="9%">签到方式</th>
74
+            <th nzWidth="9%">执行人|组</th>
75
+            <th nzWidth="9%">是否异常</th>
76
+            <th nzWidth="9%">状态</th>
77
+            <th nzWidth="9%">故障单号|状态</th>
78
+            <th nzWidth="14%">操作</th>
78 79
           </tr>
79 80
         </thead>
80 81
         <tbody>
@@ -88,8 +89,10 @@
88 89
             <td>{{data.userDTO?.name || data.groupDTO?.groupName}}</td>
89 90
             <td [ngClass]="{ red: data.exception === 1 }">{{data.exception === 1 ? '是' : '否'}}</td>
90 91
             <td>{{data.status?.name}}</td>
92
+            <td>{{data.incidentDTO?.incidentsign}}<br>{{data.incidentDTO?.state?.name}}</td>
91 93
             <td>
92 94
               <div class="coop">
95
+                <span *ngIf="coopBtns.look && data.incidentId" (click)="viewIncidentDetail($event, data)">查看故障单</span>
93 96
                 <span *ngIf="coopBtns.look" (click)="detail($event,data.id)">查看</span>
94 97
                 <span *ngIf="coopBtns.designate && data.status.value == 1" (click)="showInspectionExecuteAssign(data)">指派</span>
95 98
                 <span *ngIf="coopBtns.del" (click)="showDelModal(data,'您确认要删除选中的巡检任务吗?','删除','del')">删除</span>
@@ -127,3 +130,6 @@
127 130
 
128 131
 <!-- 查看详情 -->
129 132
 <router-outlet></router-outlet>
133
+
134
+<!-- 详情 -->
135
+<app-incident-detail [id]="coopData.incidentId" *ngIf="detailModalShow" (closeModelHs)="closeDetailModelOrder($event)" (confirmModelHs)="confirmDetailModelOrder($event)"></app-incident-detail>

+ 17 - 0
src/app/views/inspection-execute/inspection-execute.component.ts

@@ -69,6 +69,23 @@ export class InspectionExecuteComponent implements OnInit {
69 69
     this.router.navigateByUrl("/main/inspectionExecute/inspectionExecuteDetail/" + id);
70 70
   }
71 71
 
72
+  // 查看故障单详情-弹窗
73
+  detailModalShow = false; //弹窗开关
74
+  viewIncidentDetail(e, data) {
75
+    e.stopPropagation();
76
+    this.coopData = data;
77
+    this.detailModalShow = true;
78
+  }
79
+  // 关闭弹窗
80
+  closeDetailModelOrder(e) {
81
+    this.detailModalShow = JSON.parse(e).show;
82
+  }
83
+  // 弹窗确定
84
+  confirmDetailModelOrder(e){
85
+    console.log(e);
86
+    this.detailModalShow = false;
87
+  }
88
+
72 89
   // 派单给人
73 90
   inspectionExecuteAssignPromptModalShow = false;
74 91
   showInspectionExecuteAssign(data?) {

+ 3 - 1
src/app/views/inspection-execute/inspection-execute.module.ts

@@ -4,6 +4,7 @@ import { CommonModule } from '@angular/common';
4 4
 import { InspectionExecuteRoutingModule } from './inspection-execute-routing.module';
5 5
 import { InspectionExecuteComponent } from './inspection-execute.component';
6 6
 import { ShareModule } from 'src/app/share/share.module';
7
+import { IncidentDetailModule } from 'src/app/components/incidentManagement/incident-detail/incident-detail.module';
7 8
 
8 9
 
9 10
 @NgModule({
@@ -13,7 +14,8 @@ import { ShareModule } from 'src/app/share/share.module';
13 14
   imports: [
14 15
     CommonModule,
15 16
     InspectionExecuteRoutingModule,
16
-    ShareModule
17
+    ShareModule,
18
+    IncidentDetailModule,
17 19
   ]
18 20
 })
19 21
 export class InspectionExecuteModule { }