优化员工录入人脸

This commit is contained in:
java110 2020-06-06 21:41:58 +08:00
parent 6389a2998b
commit 04c11e59ec
2 changed files with 4 additions and 4 deletions

View File

@ -76,7 +76,7 @@
<div class="form-group row">
<label class="col-sm-2 col-form-label">照片</label>
<div class="col-sm-10"><img width="100%" height="100%"
v-bind:src="addStaffViewInfo.staffPhoto" alt="员工照片"></div>
v-bind:src="addStaffViewInfo.photo" alt="员工照片"></div>
</div>
</div>
</div>

View File

@ -35,11 +35,11 @@
},
_initEvent: function() {
vc.on('addStaffViewInfo', 'onIndex',
vc.on('addStaffView', 'onIndex',
function(_index) {
vc.component.addStaffViewInfo.index = _index;
if(_index == 3){
if(_index == 2){
$that._initAddStaffMedia();
}
});
@ -145,7 +145,7 @@
canvas.height = video.videoHeight;
canvas.getContext('2d').drawImage(video, 0, 0);
var data = canvas.toDataURL('image/jpeg',1.0);
vc.component.addStaffViewInfo.staffPhoto = data;
vc.component.addStaffViewInfo.photo = data;
//document.getElementById('photo').setAttribute('src', data);
}
},