|
@@ -50,19 +50,7 @@ export default {
|
|
|
userInformation: localStorage.getItem('username'),
|
|
|
userNames: localStorage.getItem('realname'),
|
|
|
bugshow: '',
|
|
|
- fromCreat: {
|
|
|
- // id: '',
|
|
|
- // bizId: '',
|
|
|
- // taskId: '',
|
|
|
- // status: '',
|
|
|
- // reportName: '',
|
|
|
- // ownner: '',
|
|
|
- // progressExplain: '', // 项目节点
|
|
|
- // testExplain: '', // 测试情况
|
|
|
- // bugNumCount: '', // bug统计
|
|
|
- // bugExplain: '', // bug说明
|
|
|
- // problemRisks: ''// 进度和风险
|
|
|
- },
|
|
|
+ fromCreat: {},
|
|
|
TestProgress: '',
|
|
|
projectProgress: '',
|
|
|
dateList: [],
|
|
@@ -134,24 +122,19 @@ export default {
|
|
|
|
|
|
sendReport(e, ele) {
|
|
|
setTimeout(() => {
|
|
|
- const targetDom = document.getElementById('resumeId')
|
|
|
- const copyDom = targetDom.cloneNode(true)
|
|
|
- copyDom.style.width = targetDom.scrollWidth + 'px'
|
|
|
- copyDom.style.height = targetDom.scrollHeight + 'px'
|
|
|
- document.body.appendChild(copyDom)
|
|
|
var that = this
|
|
|
that.btn = false
|
|
|
- html2canvas(copyDom, { allowTaint: false, useCORS: true, height: targetDom.scrollHeight, width: targetDom.scrollWidth }).then(function(canvas) {
|
|
|
+ html2canvas(document.getElementById('resumeId'), { useCORS: true }).then(function(canvas) {
|
|
|
var url = canvas.toDataURL('image/png', 1.0)
|
|
|
console.log(url)
|
|
|
- url = url.toString().substring(url.indexOf(',') + 1)
|
|
|
+ url = url.toString().substring(url.indexOf(',') + 1)// 截取base64以便上传
|
|
|
var postData = { 'reportId': ele.id, 'imgStr': url, 'url': window.location.href, 'emailUser': e }
|
|
|
dailyReportSendmail(postData).then(res => {
|
|
|
res.code === 200 ? that.$message({ type: 'success', message: '发送测试报告成功' }) : that.$message({ type: 'error', message: '发送测试报告失败,请联系管理员!' })
|
|
|
that.btn = true
|
|
|
})
|
|
|
})
|
|
|
- }, 500)
|
|
|
+ }, 1000)
|
|
|
}
|
|
|
}
|
|
|
}
|