Commit c1f098bd by Sweet Zhang

录屏优化

parent 669b566d
......@@ -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 rrwebRecord:any;
declare var rrweb:any;
@Component({
selector: 'ydlife-signature',
templateUrl: './signature.component.html',
......@@ -40,9 +40,20 @@ export class SignatureComponent implements OnInit {
clearInterval(this.timerId)
}
creatRecord(){
let _this = this;
_this.events = [];
rrweb.record({
emit(event){
// 将evene存入events数组中
_this.events.push(event);
},
recordCanvas: true
});
}
saveRecord(){
this.myService.rrwebInfo(this.events,this.pageInfo).subscribe(res=>{
// console.log(res);
this.creatRecord()
})
}
ngOnInit() {
......@@ -64,15 +75,7 @@ export class SignatureComponent implements OnInit {
this.queryWholeInfo(this.hiringBasicInfoId)
this.viewApprovalInfo = sessionStorage.getItem('viewApprovalInfo');
}
let _this = this;
_this.events = [];
rrwebRecord({
emit(event){
// 将evene存入events数组中
_this.events.push(event);
},
recordCanvas: true
});
this.creatRecord();
this.timerId = setInterval(()=>{ this.saveRecord()},10 * 1000);
}
......
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { MyService } from '../my.service';
declare var rrwebRecord:any;
declare var rrweb:any;
@Component({
selector: 'ydlife-e-notice-sign',
......@@ -18,23 +18,26 @@ export class ENoticeSignComponent implements OnInit,OnDestroy {
constructor(private router:Router,private myService:MyService) { }
ngOnInit() {
this.creatRecord();
this.timerId = setInterval(()=>{ this.saveRecord()},10 * 1000);}
ngOnDestroy(): void {
clearInterval(this.timerId)
}
creatRecord(){
let _this = this;
_this.events = [];
rrwebRecord({
rrweb.record({
emit(event){
// 将evene存入events数组中
_this.events.push(event);
}
},
recordCanvas: true
});
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);
this.creatRecord()
})
}
agree(){
......
......@@ -2,7 +2,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute } from "@angular/router";
import { Router } from '@angular/router';
import { MyService } from '../my.service';
declare var rrwebRecord:any;
declare var rrweb:any;
@Component({
selector: 'ydlife-e-notice',
......@@ -23,23 +23,27 @@ export class ENoticeComponent implements OnInit,OnDestroy {
ngOnInit() {
this.pageType = this.activatedRoute.url['value'][0]['path'];
this.creatRecord();
this.timerId = setInterval(()=>{ this.saveRecord()},10 * 1000);
}
ngOnDestroy(): void {
clearInterval(this.timerId)
}
creatRecord(){
let _this = this;
_this.events = [];
rrwebRecord({
rrweb.record({
emit(event){
// 将evene存入events数组中
_this.events.push(event);
}
},
recordCanvas: true
});
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);
this.creatRecord()
})
}
agree(){
......
......@@ -69,6 +69,7 @@
<script src="./assets/js/qrcode.js"></script>
<!--<script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>-->
<script src="https://cdn.jsdelivr.net/npm/rrweb@latest/dist/record/rrweb-record.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/rrweb@latest/dist/rrweb.min.js"></script>
<script src="https://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script src="./assets/LCalendar/LCalendar.js"></script>
<script src="./assets/laydate/laydate.js"></script>
......
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