|
|
@@ -143,8 +143,7 @@
|
|
|
<uni-popup ref="signaturePopup" @maskClick="closeSignaturePopup">
|
|
|
<view class="signature_container" :class="isLandscape ? ' signature_container_landscape' : ''">
|
|
|
<view class="signature_content">
|
|
|
- <l-signature ref="signatureRef" v-if="signaturePopupShow"
|
|
|
- :landscape="isLandscape" :penSize="8" :minLineWidth="4" :maxLineWidth="12" :openSmooth="true"
|
|
|
+ <l-signature ref="signatureRef" v-if="signaturePopupShow" :landscape="isLandscape" :penSize="8" :minLineWidth="4" :maxLineWidth="12" :openSmooth="true" :preferToDataURL="true"
|
|
|
backgroundColor="#ffffff" penColor="black"></l-signature>
|
|
|
</view>
|
|
|
<view class="signature_button_container">
|
|
|
@@ -317,12 +316,23 @@ function onclickSignatureButton(event) {
|
|
|
$modal.msgError('签名不能为空!')
|
|
|
return
|
|
|
}
|
|
|
- uploadSignatureImg(res.tempFilePath).then(res => {
|
|
|
- formElements.value[signatureItemIndex.value].defaultValue = res.returnParams
|
|
|
- signatureItemIndex.value = -1
|
|
|
- signaturePopupShow.value = false
|
|
|
- signaturePopup.value.close()
|
|
|
+ wx.getFileSystemManager().readFile({
|
|
|
+ filePath: res.tempFilePath,
|
|
|
+ encoding: 'base64',
|
|
|
+ success: fileData => {
|
|
|
+ const _fileData = 'data:image/png;base64,' + fileData.data
|
|
|
+ uploadSignatureBoardImg(userStore.user.useId, _fileData, formElements.value[signatureItemIndex.value].tableField)
|
|
|
+ // uploadSignatureImg(res.tempFilePath)
|
|
|
+ .then(({returnParams}) => {
|
|
|
+ formElements.value[signatureItemIndex.value].defaultValue = returnParams.sealInsID
|
|
|
+ signatureItemIndex.value = -1
|
|
|
+ signaturePopupShow.value = false
|
|
|
+ signaturePopup.value.close()
|
|
|
+ // formElements.value[signatureItemIndex.value].defaultValueImg = returnParams.path
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
+ console.log('formElements', formElements.value[signatureItemIndex.value]);
|
|
|
formElements.value[signatureItemIndex.value].defaultValueImg = res.tempFilePath
|
|
|
}
|
|
|
} as LSignatureToTempFilePathOptions)
|