Commit 0a964589 by sunchao

签名插件更换

parent 9c463aa2
...@@ -6,8 +6,12 @@ ...@@ -6,8 +6,12 @@
</div> </div>
<span class="page_mark"> 8/8</span> <span class="page_mark"> 8/8</span>
</div> </div>
<div id="signature"></div> <!-- <div id="signature"></div> -->
<!-- <signature-pad id="signatureCanvas" [options]="signaturePadOptions"></signature-pad> -->
<signature-pad #signaturePad [options]="signaturePadOptions" (onBeginEvent)="drawStart()" (onEndEvent)="drawComplete()">
</signature-pad>
<footer class="fixed" (click)="next()"> <footer class="fixed" (click)="next()">
我自愿签订经纪人合同书 我自愿签订经纪人合同书
</footer> </footer>
......
...@@ -12,4 +12,7 @@ ...@@ -12,4 +12,7 @@
font-weight: bold; font-weight: bold;
align-items: center; align-items: center;
} }
.signatureContent{
}
} }
\ No newline at end of file
import { Component, OnInit,ViewChild } from '@angular/core'; import { Component, OnInit,ViewChild,ElementRef } 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";
import {SignaturePad} from 'angular2-signaturepad' import {SignaturePad} from 'angular2-signaturepad';
import EleSign from "elesigncode"; import EleSign from "elesigncode";
import * as $ from 'jquery'; import * as $ from 'jquery';
@Component({ @Component({
...@@ -12,7 +13,8 @@ import * as $ from 'jquery'; ...@@ -12,7 +13,8 @@ import * as $ from 'jquery';
}) })
export class SignatureComponent implements OnInit { export class SignatureComponent implements OnInit {
signatureImage:string; signatureImage:string;
@ViewChild(SignaturePad) signaturePad: SignaturePad; signaturePadOptions:any
@ViewChild(SignaturePad) signaturePad : SignaturePad;
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) {
...@@ -20,6 +22,16 @@ export class SignatureComponent implements OnInit { ...@@ -20,6 +22,16 @@ export class SignatureComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.signaturePadOptions = {
minWidth: 2,
maxWidth: 5,
dotSize: 1.5,
penColor: "#333",
/* INVERSE BECAUSE IT IS SHOW ONLY IN LANDSCAPE */
canvasWidth: 800,
canvasHeight: 600,
backgroundColor:"rgb(248 248 248)"
}
const title = this.activatedRoute.snapshot.data[0]['title']; const title = this.activatedRoute.snapshot.data[0]['title'];
this.lifeCommonService.setTitle(title); this.lifeCommonService.setTitle(title);
var ele = document.getElementById("signature"); var ele = document.getElementById("signature");
...@@ -31,4 +43,15 @@ export class SignatureComponent implements OnInit { ...@@ -31,4 +43,15 @@ export class SignatureComponent implements OnInit {
next(){ next(){
this.router.navigate(['/employee_submit']); this.router.navigate(['/employee_submit']);
} }
drawComplete() {
// will be notified of szimek/signature_pad's onEnd event
console.log(this.signaturePad.toDataURL());
}
drawStart() {
// will be notified of szimek/signature_pad's onBegin event
console.log('begin drawing');
}
} }
...@@ -50,6 +50,7 @@ import { SignatureComponent } from './application-process/signature/signature.co ...@@ -50,6 +50,7 @@ import { SignatureComponent } from './application-process/signature/signature.co
import { EmployeeSubmitComponent } from './application-process/employee-submit/employee-submit.component'; import { EmployeeSubmitComponent } from './application-process/employee-submit/employee-submit.component';
import { BankCardComponent } from './application-process/bank-card/bank-card.component'; import { BankCardComponent } from './application-process/bank-card/bank-card.component';
import { SignaturePadModule } from 'angular2-signaturepad'; import { SignaturePadModule } from 'angular2-signaturepad';
@NgModule({ @NgModule({
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent, MedicalServiceComponent, InvitationComponent, RegisterComponent, EmployeeInfoComponent, EmployeeBasicInfoComponent, WorkExperienceComponent, PersonalPhotosComponent, EmployeeIdCardComponent, EmployeeEducationComponent, PersonalStatementComponent, SignatureComponent, EmployeeSubmitComponent, BankCardComponent], declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent, MedicalServiceComponent, InvitationComponent, RegisterComponent, EmployeeInfoComponent, EmployeeBasicInfoComponent, WorkExperienceComponent, PersonalPhotosComponent, EmployeeIdCardComponent, EmployeeEducationComponent, PersonalStatementComponent, SignatureComponent, EmployeeSubmitComponent, BankCardComponent],
imports: [ imports: [
......
...@@ -55,7 +55,7 @@ export class RecruitingDetailComponent implements OnInit { ...@@ -55,7 +55,7 @@ export class RecruitingDetailComponent implements OnInit {
{ id: 1, name: '基本信息' }, { id: 1, name: '基本信息' },
{ id: 2, name: '简历' }, { id: 2, name: '简历' },
{ id: 3, name: '增员跟进' }, { id: 3, name: '增员跟进' },
// { id: 4, name: '发送报聘'} { id: 4, name: '发送报聘'}
] ]
} }
...@@ -109,7 +109,7 @@ export class RecruitingDetailComponent implements OnInit { ...@@ -109,7 +109,7 @@ export class RecruitingDetailComponent implements OnInit {
if(this.hiringBasicInfoId){ if(this.hiringBasicInfoId){
this.queryWholeInfo(); this.queryWholeInfo();
}else{ }else{
this.employQuery = new EmployQuery(this.employQuery.name,null,null,this.potentialId,null,null,null,null,null,null,null,null,null,null,null,null) this.employQuery = new EmployQuery(this.employQuery.name,null,this.hiringBasicInfoId,this.potentialId,null,null,null,null,null,null,null,null,null,null,null,null)
} }
} }
} else { } else {
......
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