qinzhipeng_v 5 år sedan
förälder
incheckning
053ea5549c
1 ändrade filer med 4 tillägg och 7 borttagningar
  1. 4 7
      src/views/Platform/presentation/testPresenyL.vue

+ 4 - 7
src/views/Platform/presentation/testPresenyL.vue

@@ -11,12 +11,9 @@
               <el-button v-show="btn" size="mini" @click="download()">下载测试报告</el-button>
             </span>
           </div>
-          <!-- <div class="titleStyle">一. 进度和风险</div> -->
-
           <div style="font-size:15px;color:#606266;" class="rich" v-html="projectProgress" />
-
+          <!-- <div class="titleStyle">一. 进度和风险</div> -->
           <!-- <div class="titleStyle">二. 测试情况</div> -->
-
           <!-- <div style="font-size:15px;color:#606266;" class="rich" v-html="TestProgress" /> -->
 
           <div class="titleStyle">三. bug情况</div>
@@ -127,10 +124,10 @@ export default {
       setTimeout(() => {
         var that = this
         that.btn = false
-        html2canvas(document.getElementById('resumeId'), { useCORS: true }).then(function(canvas) {
-          var url = canvas.toDataURL('image/jpeg', 1.0)
+        html2canvas(document.getElementById('resumeId'), { useCORS: true, width: 1800 }).then(function(canvas) {
+          var url = canvas.toDataURL('image/png', 1.0)
           console.log(url)
-          url = url.toString().substring(url.indexOf(',') + 1)// 截取base64以便上传
+          url = url.toString().substring(url.indexOf(',') + 1)
           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: '发送测试报告失败,请联系管理员!' })