|
@@ -159,11 +159,12 @@ export default {
|
|
|
html2canvas(shareContent, opts).then(function(canvas) {
|
|
|
// 从 canvas 提取图片数据
|
|
|
var imgBlob = canvas.toDataURL('image/jpeg', 1.0) // 将图片转为base64, 0-1 表示清晰度
|
|
|
+ console.log(123, imgBlob)
|
|
|
imgBlob = imgBlob.toString().substring(imgBlob.indexOf(',') + 1)// 截取base64以便上传
|
|
|
|
|
|
var postData = { 'reportId': ele.id, 'imgStr': imgBlob, 'url': window.location.href, 'emailUser': e }
|
|
|
dailyReportSendmail(postData).then(res => {
|
|
|
- res.code === 200 ? this.$message.success('发送测试报告成功') : this.$message.error('发送测试报告失败,请联系管理员!')
|
|
|
+ res.code === 200 ? that.$message({ type: 'success', message: '发送测试报告成功' }) : that.$message({ type: 'error', message: '发送测试报告失败,请联系管理员!' })
|
|
|
})
|
|
|
})
|
|
|
}, 500)
|