Browse Source

巡检详情

seimin 9 months ago
parent
commit
80e2c115d2

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1
 {
1
 {
2
   "/service": {
2
   "/service": {
3
-		"target": "http://192.168.3.108",
3
+		"target": "http://192.168.4.105",
4
     "logLevel": "debug",
4
     "logLevel": "debug",
5
     "changeOrigin": true,
5
     "changeOrigin": true,
6
     "pathRewrite": {
6
     "pathRewrite": {

+ 23 - 2
src/app/share/inspection-execute-detail/inspection-execute-detail.component.html

@@ -10,6 +10,9 @@
10
       >
10
       >
11
         基础信息
11
         基础信息
12
       </div>
12
       </div>
13
+      <div [ngClass]="{ item: true, flex_1: true, checked: tabType == 2 }" (click)="checkTab(2)" *ngIf="orderInfo.status.value === '2'">
14
+        巡检信息
15
+      </div>
13
       <div
16
       <div
14
         [ngClass]="{ item: true, flex_1: true, checked: tabType == 4 }"
17
         [ngClass]="{ item: true, flex_1: true, checked: tabType == 4 }"
15
         (click)="checkTab(4)"
18
         (click)="checkTab(4)"
@@ -20,7 +23,7 @@
20
 
23
 
21
     <!-- 基础信息 -->
24
     <!-- 基础信息 -->
22
     <overlay-scrollbars
25
     <overlay-scrollbars
23
-      #osComponentRef3
26
+      #osComponentRef1
24
       style="flex: 1"
27
       style="flex: 1"
25
       *ngIf="tabType == 1"
28
       *ngIf="tabType == 1"
26
     >
29
     >
@@ -81,9 +84,27 @@
81
         </div>
84
         </div>
82
       </div>
85
       </div>
83
     </overlay-scrollbars>
86
     </overlay-scrollbars>
84
-    <!-- 日志 -->
87
+    <!-- 巡检信息 -->
85
     <overlay-scrollbars
88
     <overlay-scrollbars
86
       #osComponentRef2
89
       #osComponentRef2
90
+      style="flex: 1"
91
+      *ngIf="tabType == 2"
92
+    >
93
+      <div class="content orders">
94
+        <div class="inner">
95
+          <div class="top" *ngFor="let item of valueList">
96
+            <div class="info" nz-row>
97
+              <div nz-col nzSpan="8" *ngFor="let value of item">
98
+                {{ value.name }}:<span [ngClass]="value.exception === 1 ? 'red': ''">{{ getValuex(value) }}</span>
99
+              </div>
100
+            </div>
101
+          </div>
102
+        </div>
103
+      </div>
104
+    </overlay-scrollbars>
105
+    <!-- 日志 -->
106
+    <overlay-scrollbars
107
+      #osComponentRef4
87
       style="flex:1;"
108
       style="flex:1;"
88
       *ngIf="tabType == 4"
109
       *ngIf="tabType == 4"
89
     >
110
     >

+ 37 - 0
src/app/share/inspection-execute-detail/inspection-execute-detail.component.ts

@@ -4,6 +4,7 @@ import { MainService } from "../../services/main.service";
4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
 import { NzMessageService } from "ng-zorro-antd";
5
 import { NzMessageService } from "ng-zorro-antd";
6
 import { ToolService } from 'src/app/services/tool.service';
6
 import { ToolService } from 'src/app/services/tool.service';
7
+import chunk from 'lodash-es/chunk'
7
 @Component({
8
 @Component({
8
   selector: "app-inspection-execute-detail",
9
   selector: "app-inspection-execute-detail",
9
   templateUrl: "./inspection-execute-detail.component.html",
10
   templateUrl: "./inspection-execute-detail.component.html",
@@ -20,6 +21,11 @@ export class InspectionExecuteDetailComponent implements OnInit {
20
     static: false,
21
     static: false,
21
   })
22
   })
22
   osComponentRef2: OverlayScrollbarsComponent;
23
   osComponentRef2: OverlayScrollbarsComponent;
24
+  @ViewChild("osComponentRef4", {
25
+    read: OverlayScrollbarsComponent,
26
+    static: false,
27
+  })
28
+  osComponentRef4: OverlayScrollbarsComponent;
23
   constructor(
29
   constructor(
24
     private message: NzMessageService,
30
     private message: NzMessageService,
25
     private route: ActivatedRoute,
31
     private route: ActivatedRoute,
@@ -37,6 +43,10 @@ export class InspectionExecuteDetailComponent implements OnInit {
37
     this.getInfo();
43
     this.getInfo();
38
   }
44
   }
39
 
45
 
46
+  getValuex(value){
47
+    return value.formItemConfigList ? value.formItemConfigList.map(v => v.valuex).toString() : value.valuex;
48
+  }
49
+
40
   // 获取详情
50
   // 获取详情
41
   hsLoading:boolean = false;
51
   hsLoading:boolean = false;
42
   getInfo() {
52
   getInfo() {
@@ -54,6 +64,30 @@ export class InspectionExecuteDetailComponent implements OnInit {
54
       });
64
       });
55
   }
65
   }
56
 
66
 
67
+  // 获取巡检信息
68
+  valueList:any[] = [];
69
+  getValue() {
70
+    this.id = +this.route.snapshot.paramMap.get("id");
71
+    this.maskFlag = this.message.loading("正在加载中..", {
72
+      nzDuration: 0,
73
+    }).messageId;
74
+    let postData = {
75
+      idx: 0,
76
+      sum: 9999,
77
+      inspectionFormValues: {
78
+        taskId: this.id,
79
+      }
80
+    }
81
+    this.mainService
82
+      .getFetchDataList("simple/data", "inspectionFormValues", postData)
83
+      .subscribe((data) => {
84
+        let valueList = data.list || [];
85
+        this.valueList = chunk(valueList, 3);
86
+        this.message.remove(this.maskFlag);
87
+        this.maskFlag = false;
88
+      });
89
+  }
90
+
57
   // 获取列表
91
   // 获取列表
58
   pageIndex: number = 1;//表格当前页码
92
   pageIndex: number = 1;//表格当前页码
59
   pageSize: number = 10;//表格每页展示条数
93
   pageSize: number = 10;//表格每页展示条数
@@ -63,6 +97,9 @@ export class InspectionExecuteDetailComponent implements OnInit {
63
   tabType: number = 1; //tab栏
97
   tabType: number = 1; //tab栏
64
   checkTab(type) {
98
   checkTab(type) {
65
     this.tabType = type;
99
     this.tabType = type;
100
+    if(type === 2){
101
+      this.getValue();
102
+    }
66
   }
103
   }
67
 
104
 
68
   // 关闭弹框
105
   // 关闭弹框

+ 1 - 1
src/app/views/inspection-configuration-item/inspection-configuration-item.component.html

@@ -7,7 +7,7 @@
7
             <button nz-button class="btn default" (click)="goBack()">返回</button>
7
             <button nz-button class="btn default" (click)="goBack()">返回</button>
8
           </div>
8
           </div>
9
           <div nz-col nzLg="6" class="list-template__btns">
9
           <div nz-col nzLg="6" class="list-template__btns">
10
-            <button nz-button class="btn default" (click)="addModal()">新增巡检项</button>
10
+            <button nz-button class="btn default" (click)="addModal()" *ngIf="pageList.length">新增巡检项</button>
11
           </div>
11
           </div>
12
         </div>
12
         </div>
13
         <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
13
         <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"