Commit 30bd9281 by Sweet Zhang

暂存录屏

parent 478f96b2
...@@ -3,7 +3,7 @@ import { MyService } from '../../my.service'; ...@@ -3,7 +3,7 @@ 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";
import {SignaturePad} from 'angular2-signaturepad'; import {SignaturePad} from 'angular2-signaturepad';
declare var record:any; declare var rrweb:any;
@Component({ @Component({
selector: 'ydlife-signature', selector: 'ydlife-signature',
templateUrl: './signature.component.html', templateUrl: './signature.component.html',
...@@ -23,19 +23,28 @@ export class SignatureComponent implements OnInit { ...@@ -23,19 +23,28 @@ export class SignatureComponent implements OnInit {
type:string; type:string;
todayDate:Date = new Date(); todayDate:Date = new Date();
@ViewChild(SignaturePad) signaturePad : SignaturePad; @ViewChild(SignaturePad) signaturePad : SignaturePad;
timerId:any;
events:Array<any>;
/**保存录制内容 */ pageInfo = {
// saveRecord(){ type:7,
// this.myService.rrwebInfo(this.events,this.pageInfo).subscribe(res=>{ name:'签字页面'
// // console.log(res); }
// })
// }
constructor(private activatedRoute: ActivatedRoute, constructor(private activatedRoute: ActivatedRoute,
private router: Router,public lifeCommonService:LifeCommonService, private router: Router,public lifeCommonService:LifeCommonService,
public myService:MyService) { public myService:MyService) {
}
ngOnDestroy(): void {
clearInterval(this.timerId)
} }
saveRecord(){
this.myService.rrwebInfo(this.events,this.pageInfo).subscribe(res=>{
// console.log(res);
})
}
ngOnInit() { ngOnInit() {
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 = {
...@@ -55,13 +64,23 @@ export class SignatureComponent implements OnInit { ...@@ -55,13 +64,23 @@ export class SignatureComponent implements OnInit {
this.queryWholeInfo(this.hiringBasicInfoId) this.queryWholeInfo(this.hiringBasicInfoId)
this.viewApprovalInfo = sessionStorage.getItem('viewApprovalInfo'); this.viewApprovalInfo = sessionStorage.getItem('viewApprovalInfo');
} }
let _this = this;
_this.events = [];
rrweb.record({
emit(event){
// 将evene存入events数组中
_this.events.push(event);
},
recordCanvas: true
});
this.timerId = setInterval(()=>{ this.saveRecord()},10 * 1000);
} }
next(){ next(){
if(this.isSignatureShow == false){ if(this.isSignatureShow == false){
this.saveDigitalSignatures(); this.saveDigitalSignatures();
}else{ }else{
this.saveRecord();
this.myService.customerBehaviorTrackSave(`经纪人合同签署 - ${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.insurerBranchName}${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.subordinateName}体系下,经纪人${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.name}点击了【我自愿签订经纪人合同书】`).subscribe(res=>{ this.myService.customerBehaviorTrackSave(`经纪人合同签署 - ${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.insurerBranchName}${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.subordinateName}体系下,经纪人${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.name}点击了【我自愿签订经纪人合同书】`).subscribe(res=>{
this.router.navigate(['/employee_submit'],{queryParams:{ hiringBasicInfoId:this.hiringBasicInfoId,status:this.approveStatus}}); this.router.navigate(['/employee_submit'],{queryParams:{ hiringBasicInfoId:this.hiringBasicInfoId,status:this.approveStatus}});
}) })
...@@ -82,6 +101,7 @@ export class SignatureComponent implements OnInit { ...@@ -82,6 +101,7 @@ export class SignatureComponent implements OnInit {
return; return;
} }
if(this.type=='eNotice'){ if(this.type=='eNotice'){
this.saveRecord();
this.myService.customerBehaviorTrackSave(`客户告知书 - 客户点击了【确认提交】,告知书ID为${sessionStorage.getItem('eNoticeId')}`).subscribe(res=>{ this.myService.customerBehaviorTrackSave(`客户告知书 - 客户点击了【确认提交】,告知书ID为${sessionStorage.getItem('eNoticeId')}`).subscribe(res=>{
}) })
this.myService.signInformedSheet({'id':sessionStorage.getItem('eNoticeId'),imgStr:this.imgStr}).subscribe(res=>{ this.myService.signInformedSheet({'id':sessionStorage.getItem('eNoticeId'),imgStr:this.imgStr}).subscribe(res=>{
...@@ -93,6 +113,7 @@ export class SignatureComponent implements OnInit { ...@@ -93,6 +113,7 @@ export class SignatureComponent implements OnInit {
} }
}) })
}else if(this.type == 'continuationRate'){ }else if(this.type == 'continuationRate'){
this.saveRecord();
this.myService.customerBehaviorTrackSave(`保单继续率承诺书 - ${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.insurerBranchName}${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.subordinateName}体系下,经纪人${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.name}点击了【确认提交】`).subscribe(res=>{ this.myService.customerBehaviorTrackSave(`保单继续率承诺书 - ${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.insurerBranchName}${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.subordinateName}体系下,经纪人${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.name}点击了【确认提交】`).subscribe(res=>{
}) })
console.log('继续率承诺书'); console.log('继续率承诺书');
......
import { Component, OnInit } from '@angular/core'; import { Component, OnDestroy, OnInit } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { MyService } from '../my.service'; import { MyService } from '../my.service';
declare var rrweb:any;
@Component({ @Component({
selector: 'ydlife-e-notice-sign', selector: 'ydlife-e-notice-sign',
templateUrl: './e-notice-sign.component.html', templateUrl: './e-notice-sign.component.html',
styleUrls: ['./e-notice-sign.component.scss'] styleUrls: ['./e-notice-sign.component.scss']
}) })
export class ENoticeSignComponent implements OnInit { export class ENoticeSignComponent implements OnInit,OnDestroy {
timerId:any;
events:Array<any>;
pageInfo = {
type:6,
name:'客户告知书同意并签署页面'
}
constructor(private router:Router,private myService:MyService) { } constructor(private router:Router,private myService:MyService) { }
ngOnInit() { ngOnInit() {
let _this = this;
_this.events = [];
rrweb.record({
emit(event){
// 将evene存入events数组中
_this.events.push(event);
}
});
this.timerId = setInterval(()=>{ this.saveRecord()},10 * 1000)
} }
ngOnDestroy(): void {
clearInterval(this.timerId)
}
saveRecord(){
this.myService.rrwebInfo(this.events,this.pageInfo).subscribe(res=>{
// console.log(res);
})
}
agree(){ agree(){
this.saveRecord();
this.myService.customerBehaviorTrackSave(`客户告知书 - 客户点击了【同意并签署】`).subscribe(res=>{ this.myService.customerBehaviorTrackSave(`客户告知书 - 客户点击了【同意并签署】`).subscribe(res=>{
this.router.navigate(['/eNoticeSignature'],{ queryParams: { type:'eNotice'} }) this.router.navigate(['/eNoticeSignature'],{ queryParams: { type:'eNotice'} })
}) })
......
import { Component, OnInit } from '@angular/core'; import { Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute } from "@angular/router"; import { ActivatedRoute } from "@angular/router";
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { MyService } from '../my.service'; import { MyService } from '../my.service';
declare var rrweb:any;
@Component({ @Component({
selector: 'ydlife-e-notice', selector: 'ydlife-e-notice',
templateUrl: './e-notice.component.html', templateUrl: './e-notice.component.html',
styleUrls: ['./e-notice.component.scss'] styleUrls: ['./e-notice.component.scss']
}) })
export class ENoticeComponent implements OnInit { export class ENoticeComponent implements OnInit,OnDestroy {
pageType:any pageType:any;
timerId:any;
events:Array<any>;
pageInfo = {
type:5,
name:'保单继续率承诺书同意签署页'
}
constructor(private activatedRoute: ActivatedRoute,private router:Router,private myService:MyService) { constructor(private activatedRoute: ActivatedRoute,private router:Router,private myService:MyService) {
} }
ngOnInit() { ngOnInit() {
this.pageType = this.activatedRoute.url['value'][0]['path']; this.pageType = this.activatedRoute.url['value'][0]['path'];
let _this = this;
_this.events = [];
rrweb.record({
emit(event){
// 将evene存入events数组中
_this.events.push(event);
}
});
this.timerId = setInterval(()=>{ this.saveRecord()},10 * 1000)
}
ngOnDestroy(): void {
clearInterval(this.timerId)
} }
saveRecord(){
this.myService.rrwebInfo(this.events,this.pageInfo).subscribe(res=>{
// console.log(res);
})
}
agree(){ agree(){
this.saveRecord();
this.myService.customerBehaviorTrackSave(`保单继续率承诺书 - ${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.insurerBranchName}${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.subordinateName}体系下,经纪人${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.name}点击了【同意并签署】`).subscribe(res=>{ this.myService.customerBehaviorTrackSave(`保单继续率承诺书 - ${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.insurerBranchName}${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.subordinateName}体系下,经纪人${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.name}点击了【同意并签署】`).subscribe(res=>{
this.router.navigate(['/eNoticeSignature'],{ queryParams: { type:'continuationRate'} }) this.router.navigate(['/eNoticeSignature'],{ queryParams: { type:'continuationRate'} })
}) })
......
...@@ -797,6 +797,7 @@ export class MyService { ...@@ -797,6 +797,7 @@ export class MyService {
* 可回溯录屏接口 * 可回溯录屏接口
*/ */
rrwebInfo(events,pageInfo){ rrwebInfo(events,pageInfo){
if (!sessionStorage.getItem('lifeSerialsNo')) sessionStorage.setItem('lifeSerialsNo',uuid.v4());
const param = { const param = {
serialsNo:sessionStorage.getItem('lifeSerialsNo'), serialsNo:sessionStorage.getItem('lifeSerialsNo'),
customerId:JSON.parse(localStorage.getItem('lifeCustomerInfo')) ? JSON.parse(localStorage.getItem('lifeCustomerInfo')).customerId : '', customerId:JSON.parse(localStorage.getItem('lifeCustomerInfo')) ? JSON.parse(localStorage.getItem('lifeCustomerInfo')).customerId : '',
......
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