|
@@ -48,7 +48,7 @@
|
|
|
<div style="margin: 0 12%; font-size:18px; font-family:PingFangSC-Medium,PingFang SC; font-weight:500; color:rgba(51,59,74,1); line-height:29px;">
|
|
|
报告预览
|
|
|
</div>
|
|
|
- <div class="descr" style=" margin-bottom: 2%; height: 350px; overflow:scroll; overflow-x: hidden">
|
|
|
+ <div class="descr" style=" margin-bottom: 2%; overflow:scroll; overflow-x: hidden">
|
|
|
<acceptthe id="resumeId" ref="acceptthe" :message="preview" />
|
|
|
</div>
|
|
|
</div>
|
|
@@ -101,8 +101,8 @@ export default {
|
|
|
init(index, newData) {
|
|
|
console.log(newData, '提测tan窗')
|
|
|
this.dialogVisible1 = true
|
|
|
- var url = location.href // 获取url中"?"符后的字串
|
|
|
- var arr = url.split('=')
|
|
|
+ const url = location.href // 获取url中"?"符后的字串
|
|
|
+ const arr = url.split('=')
|
|
|
switch (index) {
|
|
|
case 1:
|
|
|
this.present_task = [Number(arr[1])]
|
|
@@ -213,15 +213,15 @@ export default {
|
|
|
this.active = 3
|
|
|
},
|
|
|
sendReport(e) {
|
|
|
- var ele = this.preview
|
|
|
+ const ele = this.preview
|
|
|
setTimeout(() => {
|
|
|
- var targetDom = document.getElementById('resumeId')
|
|
|
- var copyDom = targetDom.cloneNode(true)
|
|
|
+ const targetDom = document.getElementById('resumeId')
|
|
|
+ let copyDom = targetDom.cloneNode(true)
|
|
|
document.querySelector('body').appendChild(copyDom)
|
|
|
html2canvas(targetDom, { useCORS: true }).then(canvas => {
|
|
|
- var imgData = canvas.toDataURL('image/png')
|
|
|
- var sendImgData = imgData.substring(imgData.indexOf(',') + 1)
|
|
|
- var postData = { 'reportId': ele.id, 'imgStr': sendImgData, 'url': window.location.href, 'emailUser': e.name, 'copyTo': e.names }
|
|
|
+ const imgData = canvas.toDataURL('image/png')
|
|
|
+ const sendImgData = imgData.substring(imgData.indexOf(',') + 1)
|
|
|
+ const postData = { 'reportId': ele.id, 'imgStr': sendImgData, 'url': window.location.href, 'emailUser': e.name, 'copyTo': e.names }
|
|
|
launchTestSendmail(postData).then(res => {
|
|
|
document.querySelector('body').removeChild(copyDom)
|
|
|
copyDom = null
|