Commit c1f098bd by Sweet Zhang

录屏优化

parent 669b566d
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
font-size: 18px; font-size: 18px;
} }
select.form-control{ select.form-control{
direction: rtl; direction: rtl;
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
// background-color: transparent; // background-color: transparent;
// color: #999; // color: #999;
// } // }
} }
.contentDetail.employ .contentItem{ .contentDetail.employ .contentItem{
padding: 10px 0; padding: 10px 0;
...@@ -110,4 +110,4 @@ ...@@ -110,4 +110,4 @@
height: 56px; height: 56px;
line-height: 56px; line-height: 56px;
} }
} }
\ No newline at end of file
...@@ -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 rrwebRecord:any; declare var rrweb:any;
@Component({ @Component({
selector: 'ydlife-signature', selector: 'ydlife-signature',
templateUrl: './signature.component.html', templateUrl: './signature.component.html',
...@@ -36,15 +36,26 @@ export class SignatureComponent implements OnInit { ...@@ -36,15 +36,26 @@ export class SignatureComponent implements OnInit {
} }
ngOnDestroy(): void { ngOnDestroy(): void {
clearInterval(this.timerId) clearInterval(this.timerId)
} }
saveRecord(){ creatRecord(){
this.myService.rrwebInfo(this.events,this.pageInfo).subscribe(res=>{ let _this = this;
// console.log(res); _this.events = [];
}) rrweb.record({
} emit(event){
// 将evene存入events数组中
_this.events.push(event);
},
recordCanvas: true
});
}
saveRecord(){
this.myService.rrwebInfo(this.events,this.pageInfo).subscribe(res=>{
this.creatRecord()
})
}
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 = {
...@@ -64,15 +75,7 @@ export class SignatureComponent implements OnInit { ...@@ -64,15 +75,7 @@ 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.creatRecord();
_this.events = [];
rrwebRecord({
emit(event){
// 将evene存入events数组中
_this.events.push(event);
},
recordCanvas: true
});
this.timerId = setInterval(()=>{ this.saveRecord()},10 * 1000); this.timerId = setInterval(()=>{ this.saveRecord()},10 * 1000);
} }
......
import { Component, OnDestroy, 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 rrwebRecord:any; declare var rrweb:any;
@Component({ @Component({
selector: 'ydlife-e-notice-sign', selector: 'ydlife-e-notice-sign',
...@@ -18,23 +18,26 @@ export class ENoticeSignComponent implements OnInit,OnDestroy { ...@@ -18,23 +18,26 @@ export class ENoticeSignComponent implements OnInit,OnDestroy {
constructor(private router:Router,private myService:MyService) { } constructor(private router:Router,private myService:MyService) { }
ngOnInit() { ngOnInit() {
this.creatRecord();
this.timerId = setInterval(()=>{ this.saveRecord()},10 * 1000);}
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
}); });
this.timerId = setInterval(()=>{ this.saveRecord()},10 * 1000)
} }
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()
}) })
} }
agree(){ agree(){
......
...@@ -2,7 +2,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; ...@@ -2,7 +2,7 @@ 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 rrwebRecord:any; declare var rrweb:any;
@Component({ @Component({
selector: 'ydlife-e-notice', selector: 'ydlife-e-notice',
...@@ -23,23 +23,27 @@ export class ENoticeComponent implements OnInit,OnDestroy { ...@@ -23,23 +23,27 @@ export class ENoticeComponent implements OnInit,OnDestroy {
ngOnInit() { ngOnInit() {
this.pageType = this.activatedRoute.url['value'][0]['path']; 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; 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
}); });
this.timerId = setInterval(()=>{ this.saveRecord()},10 * 1000)
} }
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()
}) })
} }
agree(){ agree(){
......
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
<script src="./assets/js/qrcode.js"></script> <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://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/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="https://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script src="./assets/LCalendar/LCalendar.js"></script> <script src="./assets/LCalendar/LCalendar.js"></script>
<script src="./assets/laydate/laydate.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