|
@@ -18,7 +18,8 @@ export class PreviewComponent implements OnInit {
|
18
|
18
|
success:boolean = false;
|
19
|
19
|
isM:boolean = false;
|
20
|
20
|
pastStatus:boolean = false;
|
21
|
|
-
|
|
21
|
+ gdid:string = '';
|
|
22
|
+ qrCodeIndex:string = '';
|
22
|
23
|
constructor(
|
23
|
24
|
private route: ActivatedRoute,
|
24
|
25
|
private mainService:MainService,
|
|
@@ -34,9 +35,11 @@ export class PreviewComponent implements OnInit {
|
34
|
35
|
}else{
|
35
|
36
|
document.documentElement.style.fontSize = '100px';
|
36
|
37
|
}
|
37
|
|
- let gdid = this.route.snapshot.queryParams.gdid;
|
38
|
|
- if(gdid){
|
39
|
|
- this.verifyPast(gdid)
|
|
38
|
+ console.log(234,this.route.snapshot.queryParams)
|
|
39
|
+ this.gdid = this.route.snapshot.queryParams.gdId;
|
|
40
|
+ this.qrCodeIndex = this.route.snapshot.queryParams.qrCodeIndex
|
|
41
|
+ if(this.gdid){
|
|
42
|
+ this.verifyPast(this.gdid)
|
40
|
43
|
}
|
41
|
44
|
this.getList();
|
42
|
45
|
}
|
|
@@ -63,6 +66,11 @@ export class PreviewComponent implements OnInit {
|
63
|
66
|
hosId: this.qm.hosId,
|
64
|
67
|
}))
|
65
|
68
|
};
|
|
69
|
+ if(this.gdid){
|
|
70
|
+ postData.gdId = this.gdid
|
|
71
|
+ }else{
|
|
72
|
+ delete postData.gdId
|
|
73
|
+ }
|
66
|
74
|
const mid = this.message.loading('loading..', { nzDuration: 0 }).messageId;
|
67
|
75
|
this.mainService.surveyCommit(postData).subscribe((res:any)=>{
|
68
|
76
|
this.message.remove(mid);
|
|
@@ -82,13 +90,14 @@ export class PreviewComponent implements OnInit {
|
82
|
90
|
// 验证工单问卷调查二维码是否过期
|
83
|
91
|
verifyPast(gdid){
|
84
|
92
|
this.mainService.verifyPastApi({
|
85
|
|
- gdId:gdid
|
|
93
|
+ gdId:gdid,
|
|
94
|
+ qrCodeIndex:this.qrCodeIndex
|
86
|
95
|
}).subscribe((res:any)=>{
|
87
|
96
|
if (res.status == 200) {
|
88
|
97
|
this.pastStatus = false;
|
89
|
98
|
}else{
|
90
|
99
|
this.pastStatus = true;
|
91
|
|
- this.message.create('error',res.info,{ nzDuration: 5000 });
|
|
100
|
+ // this.message.create('error',res.info,{ nzDuration: 5000 });
|
92
|
101
|
}
|
93
|
102
|
})
|
94
|
103
|
}
|