瀏覽代碼

工单日志完善

seimin 1 年之前
父節點
當前提交
70b74adde9

+ 4 - 4
src/app/share/order-detail/order-detail.component.html

@@ -79,11 +79,11 @@
79
             </div>
79
             </div>
80
           </div>
80
           </div>
81
           <div class="info" nz-row>
81
           <div class="info" nz-row>
82
-            <div nz-col nzSpan="6" *ngIf="orderInfo.inspectScore">
83
-              陪检方式:{{ orderInfo.inspectScore.inspectMode }}
84
-            </div>
85
             <div nz-col nzSpan="6" *ngIf="orderInfo.inspectUsers">
82
             <div nz-col nzSpan="6" *ngIf="orderInfo.inspectUsers">
86
-              陪检人员:{{ orderInfo.inspectUsers }}
83
+              执行人员:{{ orderInfo.inspectUsers }}
84
+            </div>
85
+            <div nz-col nzSpan="6" *ngIf="orderInfo.inspectUsersNum">
86
+              执行人数:{{ orderInfo.inspectUsersNum }}
87
             </div>
87
             </div>
88
           </div>
88
           </div>
89
           <div class="info" nz-row *ngIf="orderInfo.urgentDetails">
89
           <div class="info" nz-row *ngIf="orderInfo.urgentDetails">

+ 8 - 0
src/app/views/work-order-log/work-order-log-routing.module.ts

@@ -1,11 +1,19 @@
1
 import { NgModule } from '@angular/core';
1
 import { NgModule } from '@angular/core';
2
 import { Routes, RouterModule } from '@angular/router';
2
 import { Routes, RouterModule } from '@angular/router';
3
 import { WorkOrderLogComponent } from './work-order-log.component';
3
 import { WorkOrderLogComponent } from './work-order-log.component';
4
+import { OrderDetailComponent } from 'src/app/share/order-detail/order-detail.component';
4
 
5
 
5
 
6
 
6
 const routes: Routes = [{
7
 const routes: Routes = [{
7
   path: '',
8
   path: '',
8
   component: WorkOrderLogComponent,
9
   component: WorkOrderLogComponent,
10
+  children: [
11
+    {
12
+      // 查看详情
13
+      path: 'orderDetail/:id',
14
+      component: OrderDetailComponent,
15
+    }
16
+  ]
9
 }];
17
 }];
10
 
18
 
11
 @NgModule({
19
 @NgModule({

+ 5 - 2
src/app/views/work-order-log/work-order-log.component.html

@@ -19,7 +19,8 @@
19
         </div>
19
         </div>
20
       </div>
20
       </div>
21
       <div nz-col nzXl='7' class="list-template__btns">
21
       <div nz-col nzXl='7' class="list-template__btns">
22
-        <button nz-button class="btn default" (click)='search()'>搜索</button>
22
+        <button nz-button class="btn default ml8" (click)='search()'>搜索</button>
23
+        <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
23
       </div>
24
       </div>
24
     </div>
25
     </div>
25
     <div class="list-template__bottom">
26
     <div class="list-template__bottom">
@@ -50,7 +51,7 @@
50
             <td><button *ngIf="data.attachments" (click)="previewImageHandler(data.attachments)">查看图片</button><span *ngIf="!data.attachments">无</span></td>
51
             <td><button *ngIf="data.attachments" (click)="previewImageHandler(data.attachments)">查看图片</button><span *ngIf="!data.attachments">无</span></td>
51
             <td>
52
             <td>
52
               <div class="coop">
53
               <div class="coop">
53
-                <span (click)="del(data)">查看</span>
54
+                <span *ngIf="coopBtns.look" (click)="detail($event,data.workOrderId)">查看</span>
54
               </div>
55
               </div>
55
             </td>
56
             </td>
56
           </tr>
57
           </tr>
@@ -65,3 +66,5 @@
65
   </div>
66
   </div>
66
 </div>
67
 </div>
67
 <app-image-viewer [imageUrl]="imgs" hidden *ngIf="isPreview" [isPreviewNow]="true"></app-image-viewer>
68
 <app-image-viewer [imageUrl]="imgs" hidden *ngIf="isPreview" [isPreviewNow]="true"></app-image-viewer>
69
+<!-- 查看详情 -->
70
+<router-outlet></router-outlet>

+ 18 - 5
src/app/views/work-order-log/work-order-log.component.ts

@@ -1,10 +1,10 @@
1
 import { Component, OnInit, ViewChild } from "@angular/core";
1
 import { Component, OnInit, ViewChild } from "@angular/core";
2
-import { ActivatedRoute } from "@angular/router";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
 
3
 
4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
 import { ToolService } from "../../services/tool.service";
5
 import { ToolService } from "../../services/tool.service";
6
 import { WorkOrderLogService } from './work-order-log.service';
6
 import { WorkOrderLogService } from './work-order-log.service';
7
-import { format } from 'date-fns';
7
+import { format, startOfDay, endOfDay } from 'date-fns';
8
 
8
 
9
 @Component({
9
 @Component({
10
   selector: "app-work-order-log",
10
   selector: "app-work-order-log",
@@ -18,6 +18,7 @@ export class WorkOrderLogComponent implements OnInit {
18
   })
18
   })
19
   osComponentRef1: OverlayScrollbarsComponent;
19
   osComponentRef1: OverlayScrollbarsComponent;
20
   constructor(
20
   constructor(
21
+    private router: Router,
21
     private route: ActivatedRoute,
22
     private route: ActivatedRoute,
22
     private tool: ToolService,
23
     private tool: ToolService,
23
     private workOrderLogService: WorkOrderLogService,
24
     private workOrderLogService: WorkOrderLogService,
@@ -57,7 +58,7 @@ export class WorkOrderLogComponent implements OnInit {
57
   previewImageHandler(data) {
58
   previewImageHandler(data) {
58
     this.isPreview = false;
59
     this.isPreview = false;
59
     data = data || [];
60
     data = data || [];
60
-    this.imgs = data.map((v) => 'http://192.168.3.108/file' + v.relativeFilePath);
61
+    this.imgs = data.map((v) => location.origin + '/file' + v.relativeFilePath);
61
     this.isPreview = true;
62
     this.isPreview = true;
62
   }
63
   }
63
 
64
 
@@ -65,13 +66,25 @@ export class WorkOrderLogComponent implements OnInit {
65
   search() {
66
   search() {
66
     this.getList(true);
67
     this.getList(true);
67
   }
68
   }
69
+  // 重置
70
+  reset() {
71
+    this.searchDto = {
72
+      dateRange: [],
73
+    }
74
+    this.search();
75
+  }
76
+  // 查看
77
+  detail(e, id) {
78
+    e.stopPropagation();
79
+    this.router.navigateByUrl("/main/workOrderLog/orderDetail/" + id);
80
+  }
68
   // 表格数据
81
   // 表格数据
69
   loading1 = false;
82
   loading1 = false;
70
   getList(isResetPageIndex = false) {
83
   getList(isResetPageIndex = false) {
71
     isResetPageIndex && (this.pageIndex = 1);
84
     isResetPageIndex && (this.pageIndex = 1);
72
     let searchDto = {
85
     let searchDto = {
73
-      startTime: this.searchDto.dateRange[0] ? format(this.searchDto.dateRange[0], 'yyyy-MM-dd HH:mm:ss') : undefined,
74
-      endTime: this.searchDto.dateRange[1] ? format(this.searchDto.dateRange[1], 'yyyy-MM-dd HH:mm:ss') : undefined,
86
+      startTime: this.searchDto.dateRange[0] ? format(startOfDay(this.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined,
87
+      endTime: this.searchDto.dateRange[1] ? format(endOfDay(this.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined,
75
       logRemarks: this.searchDto.logRemarks,
88
       logRemarks: this.searchDto.logRemarks,
76
       operation: this.operationList.find(v => v.id == this.searchDto.operation),
89
       operation: this.operationList.find(v => v.id == this.searchDto.operation),
77
     }
90
     }