|
|
@ -12,42 +12,36 @@ export default { |
|
|
|
methods: { |
|
|
|
initSign(text) { |
|
|
|
this.WebSign = new jSign() |
|
|
|
const _this = this |
|
|
|
|
|
|
|
_this.WebSign.Init(function(status) { |
|
|
|
this.WebSign.Init((status) => { |
|
|
|
if (status) { |
|
|
|
_this.WebSign.Status(function(status, data) { |
|
|
|
|
|
|
|
}) |
|
|
|
_this.BeginSign() |
|
|
|
_this.saveImgBase64(text) |
|
|
|
this.BeginSign() |
|
|
|
this.saveImgBase64(text) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
saveImgBase64(text) { |
|
|
|
const _this = this |
|
|
|
this.WebSign.onSignConfirm = function(e) { |
|
|
|
this.WebSign.onSignConfirm = (e) => { |
|
|
|
if (e.img) { |
|
|
|
const img_base64 = 'data:image/png;base64,' + e.img |
|
|
|
const data = { |
|
|
|
idName: text, |
|
|
|
src: img_base64 |
|
|
|
} |
|
|
|
this.formListValue[this.currentSignText] = img_base64 |
|
|
|
eventBus.$emit('saveSignRes', data) |
|
|
|
_this.DisconnSign() |
|
|
|
this.DisconnSign() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
DisconnSign() { |
|
|
|
const _this = this |
|
|
|
_this.WebSign.Destroy(function() { |
|
|
|
_this.connState = '' |
|
|
|
_this.model = '' |
|
|
|
_this.sn = '' |
|
|
|
this.WebSign.Destroy(() => { |
|
|
|
this.model = '' |
|
|
|
this.sn = '' |
|
|
|
}) |
|
|
|
}, |
|
|
|
BeginSign() { |
|
|
|
this.WebSign.BeginSign(function(status) { |
|
|
|
this.WebSign.BeginSign((status) => { |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|