seimin преди 8 месеца
родител
ревизия
80e2c115d2

+ 1 - 1
proxy.conf.json

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

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

@@ -10,6 +10,9 @@
10 10
       >
11 11
         基础信息
12 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 16
       <div
14 17
         [ngClass]="{ item: true, flex_1: true, checked: tabType == 4 }"
15 18
         (click)="checkTab(4)"
@@ -20,7 +23,7 @@
20 23
 
21 24
     <!-- 基础信息 -->
22 25
     <overlay-scrollbars
23
-      #osComponentRef3
26
+      #osComponentRef1
24 27
       style="flex: 1"
25 28
       *ngIf="tabType == 1"
26 29
     >
@@ -81,9 +84,27 @@
81 84
         </div>
82 85
       </div>
83 86
     </overlay-scrollbars>
84
-    <!-- 日志 -->
87
+    <!-- 巡检信息 -->
85 88
     <overlay-scrollbars
86 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 108
       style="flex:1;"
88 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 4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5 5
 import { NzMessageService } from "ng-zorro-antd";
6 6
 import { ToolService } from 'src/app/services/tool.service';
7
+import chunk from 'lodash-es/chunk'
7 8
 @Component({
8 9
   selector: "app-inspection-execute-detail",
9 10
   templateUrl: "./inspection-execute-detail.component.html",
@@ -20,6 +21,11 @@ export class InspectionExecuteDetailComponent implements OnInit {
20 21
     static: false,
21 22
   })
22 23
   osComponentRef2: OverlayScrollbarsComponent;
24
+  @ViewChild("osComponentRef4", {
25
+    read: OverlayScrollbarsComponent,
26
+    static: false,
27
+  })
28
+  osComponentRef4: OverlayScrollbarsComponent;
23 29
   constructor(
24 30
     private message: NzMessageService,
25 31
     private route: ActivatedRoute,
@@ -37,6 +43,10 @@ export class InspectionExecuteDetailComponent implements OnInit {
37 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 51
   hsLoading:boolean = false;
42 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 92
   pageIndex: number = 1;//表格当前页码
59 93
   pageSize: number = 10;//表格每页展示条数
@@ -63,6 +97,9 @@ export class InspectionExecuteDetailComponent implements OnInit {
63 97
   tabType: number = 1; //tab栏
64 98
   checkTab(type) {
65 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 7
             <button nz-button class="btn default" (click)="goBack()">返回</button>
8 8
           </div>
9 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 11
           </div>
12 12
         </div>
13 13
         <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"