Commit 30bd9281 by Sweet Zhang

暂存录屏

parent 478f96b2
......@@ -3,7 +3,7 @@ import { MyService } from '../../my.service';
import { ActivatedRoute,Router } from "@angular/router";
import { LifeCommonService } from "../../../common/life-common.service";
import {SignaturePad} from 'angular2-signaturepad';
declare var record:any;
declare var rrweb:any;
@Component({
selector: 'ydlife-signature',
templateUrl: './signature.component.html',
......@@ -23,19 +23,28 @@ export class SignatureComponent implements OnInit {
type:string;
todayDate:Date = new Date();
@ViewChild(SignaturePad) signaturePad : SignaturePad;
/**保存录制内容 */
// saveRecord(){
// this.myService.rrwebInfo(this.events,this.pageInfo).subscribe(res=>{
// // console.log(res);
// })
// }
timerId:any;
events:Array<any>;
pageInfo = {
type:7,
name:'签字页面'
}
constructor(private activatedRoute: ActivatedRoute,
private router: Router,public lifeCommonService:LifeCommonService,
public myService:MyService) {
}
ngOnDestroy(): void {
clearInterval(this.timerId)
}
saveRecord(){
this.myService.rrwebInfo(this.events,this.pageInfo).subscribe(res=>{
// console.log(res);
})
}
ngOnInit() {
this.type = this.activatedRoute.snapshot.queryParams.type ? this.activatedRoute.snapshot.queryParams.type :null;
this.signaturePadOptions = {
......@@ -55,13 +64,23 @@ export class SignatureComponent implements OnInit {
this.queryWholeInfo(this.hiringBasicInfoId)
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(){
if(this.isSignatureShow == false){
this.saveDigitalSignatures();
}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.router.navigate(['/employee_submit'],{queryParams:{ hiringBasicInfoId:this.hiringBasicInfoId,status:this.approveStatus}});
})
......@@ -82,6 +101,7 @@ export class SignatureComponent implements OnInit {
return;
}
if(this.type=='eNotice'){
this.saveRecord();
this.myService.customerBehaviorTrackSave(`客户告知书 - 客户点击了【确认提交】,告知书ID为${sessionStorage.getItem('eNoticeId')}`).subscribe(res=>{
})
this.myService.signInformedSheet({'id':sessionStorage.getItem('eNoticeId'),imgStr:this.imgStr}).subscribe(res=>{
......@@ -93,6 +113,7 @@ export class SignatureComponent implements OnInit {
}
})
}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=>{
})
console.log('继续率承诺书');
......
import { Component, OnInit } from '@angular/core';
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { MyService } from '../my.service';
declare var rrweb:any;
@Component({
selector: 'ydlife-e-notice-sign',
templateUrl: './e-notice-sign.component.html',
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) { }
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(){
this.saveRecord();
this.myService.customerBehaviorTrackSave(`客户告知书 - 客户点击了【同意并签署】`).subscribe(res=>{
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 { Router } from '@angular/router';
import { MyService } from '../my.service';
declare var rrweb:any;
@Component({
selector: 'ydlife-e-notice',
templateUrl: './e-notice.component.html',
styleUrls: ['./e-notice.component.scss']
})
export class ENoticeComponent implements OnInit {
pageType:any
export class ENoticeComponent implements OnInit,OnDestroy {
pageType:any;
timerId:any;
events:Array<any>;
pageInfo = {
type:5,
name:'保单继续率承诺书同意签署页'
}
constructor(private activatedRoute: ActivatedRoute,private router:Router,private myService:MyService) {
}
ngOnInit() {
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(){
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.router.navigate(['/eNoticeSignature'],{ queryParams: { type:'continuationRate'} })
})
......
......@@ -797,6 +797,7 @@ export class MyService {
* 可回溯录屏接口
*/
rrwebInfo(events,pageInfo){
if (!sessionStorage.getItem('lifeSerialsNo')) sessionStorage.setItem('lifeSerialsNo',uuid.v4());
const param = {
serialsNo:sessionStorage.getItem('lifeSerialsNo'),
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