|
@@ -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
|
// 关闭弹框
|