Commit d8b227f5 by Sweet Zhang

增加提交成功的跟踪

parent c1f098bd
import { Component, OnInit } from '@angular/core'; import { Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute,Router } from "@angular/router"; import { ActivatedRoute,Router } from "@angular/router";
import { LifeCommonService } from "../../../common/life-common.service"; import { LifeCommonService } from "../../../common/life-common.service";
import { MyService } from '../../my.service'; import { MyService } from '../../my.service';
declare var rrweb:any;
@Component({ @Component({
selector: 'ydlife-employee-submit', selector: 'ydlife-employee-submit',
templateUrl: './employee-submit.component.html', templateUrl: './employee-submit.component.html',
...@@ -14,6 +15,12 @@ export class EmployeeSubmitComponent implements OnInit { ...@@ -14,6 +15,12 @@ export class EmployeeSubmitComponent implements OnInit {
dialogInfo: any; dialogInfo: any;
// 判断是哪个成功页面 // 判断是哪个成功页面
type:string; type:string;
timerId:any;
events:Array<any>;
pageInfo = {
type:10,
name:'提交成功页'
}
constructor(private activatedRoute: ActivatedRoute, constructor(private activatedRoute: ActivatedRoute,
public lifeCommonService:LifeCommonService, public lifeCommonService:LifeCommonService,
private myService:MyService) { } private myService:MyService) { }
...@@ -30,8 +37,27 @@ export class EmployeeSubmitComponent implements OnInit { ...@@ -30,8 +37,27 @@ export class EmployeeSubmitComponent implements OnInit {
this.hiringSubmit(); this.hiringSubmit();
} }
} }
this.creatRecord();
} }
creatRecord(){
let _this = this;
_this.events = [];
rrweb.record({
emit(event){
// 将evene存入events数组中
_this.events.push(event);
console.log('@@@',_this.events)
},
recordCanvas: true
});
setTimeout(()=>{
this.myService.rrwebInfo(this.events,this.pageInfo).subscribe(res=>{
})
},5*1000)
}
hiringSubmit(){ hiringSubmit(){
this.myService.hiringSubmit({hiringBasicInfoId:this.hiringBasicInfoId}).subscribe((res)=>{ this.myService.hiringSubmit({hiringBasicInfoId:this.hiringBasicInfoId}).subscribe((res)=>{
if(res['success']){ if(res['success']){
......
...@@ -9,7 +9,7 @@ import { ...@@ -9,7 +9,7 @@ import {
import { ActivatedRoute, Router } from "@angular/router"; import { ActivatedRoute, Router } from "@angular/router";
import { MyService } from "../../my.service"; import { MyService } from "../../my.service";
import { LifeCommonService } from "../../../common/life-common.service"; import { LifeCommonService } from "../../../common/life-common.service";
declare var rrwebRecord:any; declare var rrweb:any;
@Component({ @Component({
selector: "ydlife-personal-statement", selector: "ydlife-personal-statement",
...@@ -71,28 +71,31 @@ export class PersonalStatementComponent implements OnInit,OnDestroy { ...@@ -71,28 +71,31 @@ export class PersonalStatementComponent implements OnInit,OnDestroy {
name:'报聘合同文档确认页' name:'报聘合同文档确认页'
} }
} }
this.creatRecord();
this.timerId = setInterval(()=>{ this.saveRecord()},10 * 1000);
}
ngOnChanges() {}
ngOnDestroy(): void {
clearInterval(this.timerId)
}
creatRecord(){
let _this = this; let _this = this;
_this.events = []; _this.events = [];
rrwebRecord({ rrweb.record({
emit(event){ emit(event){
// 将evene存入events数组中 // 将evene存入events数组中
_this.events.push(event); _this.events.push(event);
}, },
recordCanvas: true recordCanvas: true
}); });
this.timerId = setInterval(()=>{ this.saveRecord()},10 * 1000);
}
ngOnChanges() {}
ngOnDestroy(): void {
clearInterval(this.timerId)
} }
saveRecord(){
saveRecord(){
this.myService.rrwebInfo(this.events,this.pageInfo).subscribe(res=>{ this.myService.rrwebInfo(this.events,this.pageInfo).subscribe(res=>{
// console.log(res); this.creatRecord()
}) })
} }
next() { next() {
if (this.type == "personal_statement") { if (this.type == "personal_statement") {
this.savePersonalStatements(); this.savePersonalStatements();
...@@ -102,6 +105,7 @@ export class PersonalStatementComponent implements OnInit,OnDestroy { ...@@ -102,6 +105,7 @@ export class PersonalStatementComponent implements OnInit,OnDestroy {
return; return;
} }
this.saveContractTermsConfirms(); this.saveContractTermsConfirms();
this.saveRecord();
this.router.navigate(["/signature"], { this.router.navigate(["/signature"], {
queryParams: { hiringBasicInfoId: this.hiringBasicInfoId }, queryParams: { hiringBasicInfoId: this.hiringBasicInfoId },
}); });
......
import { Component, OnInit,ViewChild,ElementRef } from '@angular/core'; import { Component, OnInit,ViewChild,ElementRef, OnDestroy } from '@angular/core';
import { MyService } from '../../my.service'; import { MyService } from '../../my.service';
import { ActivatedRoute,Router } from "@angular/router"; import { ActivatedRoute,Router } from "@angular/router";
import { LifeCommonService } from "../../../common/life-common.service"; import { LifeCommonService } from "../../../common/life-common.service";
...@@ -9,7 +9,7 @@ declare var rrweb:any; ...@@ -9,7 +9,7 @@ declare var rrweb:any;
templateUrl: './signature.component.html', templateUrl: './signature.component.html',
styleUrls: ['./signature.component.scss'] styleUrls: ['./signature.component.scss']
}) })
export class SignatureComponent implements OnInit { export class SignatureComponent implements OnInit,OnDestroy {
hiringBasicInfoId:any; hiringBasicInfoId:any;
signatureImage:string; signatureImage:string;
signaturePadOptions:any; signaturePadOptions:any;
...@@ -24,7 +24,7 @@ export class SignatureComponent implements OnInit { ...@@ -24,7 +24,7 @@ export class SignatureComponent implements OnInit {
todayDate:Date = new Date(); todayDate:Date = new Date();
@ViewChild(SignaturePad) signaturePad : SignaturePad; @ViewChild(SignaturePad) signaturePad : SignaturePad;
timerId:any; timerId:any;
events:Array<any>; events:Array<any> = [];
pageInfo = { pageInfo = {
type:7, type:7,
name:'签字页面' name:'签字页面'
...@@ -57,6 +57,7 @@ export class SignatureComponent implements OnInit { ...@@ -57,6 +57,7 @@ export class SignatureComponent implements OnInit {
}) })
} }
ngOnInit() { ngOnInit() {
console.log('====');
this.type = this.activatedRoute.snapshot.queryParams.type ? this.activatedRoute.snapshot.queryParams.type :null; this.type = this.activatedRoute.snapshot.queryParams.type ? this.activatedRoute.snapshot.queryParams.type :null;
this.signaturePadOptions = { this.signaturePadOptions = {
minWidth: 0.5, minWidth: 0.5,
...@@ -110,6 +111,7 @@ export class SignatureComponent implements OnInit { ...@@ -110,6 +111,7 @@ export class SignatureComponent implements OnInit {
this.myService.signInformedSheet({'id':sessionStorage.getItem('eNoticeId'),imgStr:this.imgStr}).subscribe(res=>{ this.myService.signInformedSheet({'id':sessionStorage.getItem('eNoticeId'),imgStr:this.imgStr}).subscribe(res=>{
if(res['success']){ if(res['success']){
// 确认提交 // 确认提交
this.saveRecord();
this.router.navigate(['/eNotice_submit']); this.router.navigate(['/eNotice_submit']);
}else{ }else{
this.openPopInfo(res['message']); this.openPopInfo(res['message']);
...@@ -129,6 +131,7 @@ export class SignatureComponent implements OnInit { ...@@ -129,6 +131,7 @@ export class SignatureComponent implements OnInit {
this.myService.signCommitment(param).subscribe((res)=>{ this.myService.signCommitment(param).subscribe((res)=>{
if(res['success']){ if(res['success']){
// 确认提交 // 确认提交
this.saveRecord();
this.router.navigate(['/eNotice_submit']); this.router.navigate(['/eNotice_submit']);
}else{ }else{
this.openPopInfo(res['message']); this.openPopInfo(res['message']);
...@@ -142,6 +145,7 @@ export class SignatureComponent implements OnInit { ...@@ -142,6 +145,7 @@ export class SignatureComponent implements OnInit {
this.myService.saveDigitalSignatures(param).subscribe((res)=>{ this.myService.saveDigitalSignatures(param).subscribe((res)=>{
if(res['success']){ if(res['success']){
this.queryWholeInfo(this.hiringBasicInfoId); this.queryWholeInfo(this.hiringBasicInfoId);
this.saveRecord();
this.router.navigate(['/employee_submit'],{queryParams:{ hiringBasicInfoId:this.hiringBasicInfoId,status:this.approveStatus}}); this.router.navigate(['/employee_submit'],{queryParams:{ hiringBasicInfoId:this.hiringBasicInfoId,status:this.approveStatus}});
}else{ }else{
this.openPopInfo(res['message']); this.openPopInfo(res['message']);
...@@ -203,8 +207,10 @@ export class SignatureComponent implements OnInit { ...@@ -203,8 +207,10 @@ export class SignatureComponent implements OnInit {
viewNext(){ viewNext(){
if(this.viewApprovalInfo==0){ if(this.viewApprovalInfo==0){
this.saveRecord();
this.router.navigate(['/approval_comments'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} }); this.router.navigate(['/approval_comments'],{ queryParams: { hiringBasicInfoId:this.hiringBasicInfoId} });
}else{ }else{
this.saveRecord();
this.router.navigate(['/employee_submit'],{queryParams:{ hiringBasicInfoId:this.hiringBasicInfoId,status:this.approveStatus}}); this.router.navigate(['/employee_submit'],{queryParams:{ hiringBasicInfoId:this.hiringBasicInfoId,status:this.approveStatus}});
} }
} }
...@@ -214,6 +220,7 @@ export class SignatureComponent implements OnInit { ...@@ -214,6 +220,7 @@ export class SignatureComponent implements OnInit {
} }
returnResult(){ returnResult(){
this.saveRecord();
this.router.navigate([`/approval_result_list`],{queryParams:{hiringBasicInfoId:this.hiringBasicInfoId}}) this.router.navigate([`/approval_result_list`],{queryParams:{hiringBasicInfoId:this.hiringBasicInfoId}})
} }
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
footer{ footer{
width: 100%; width: 100%;
height: 56px; height: 56px;
min-width: 320px;
max-width: 640px;
margin: 0 auto;
background: #C81B1E; background: #C81B1E;
line-height: 56px; line-height: 56px;
position: fixed; position: fixed;
...@@ -317,4 +320,3 @@ ...@@ -317,4 +320,3 @@
top: 0; top: 0;
} }
} }
\ No newline at end of file
...@@ -106,6 +106,9 @@ ...@@ -106,6 +106,9 @@
width: 100%; width: 100%;
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
min-width: 320px;
max-width: 640px;
margin: 0 auto;
background: #1b5b99; background: #1b5b99;
color: #fff; color: #fff;
font-size: 18px; font-size: 18px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment