qinzhipeng_v 5 years ago
parent
commit
0198e80262

+ 1 - 1
src/layout/components/AppMain.vue

@@ -2,7 +2,7 @@
   <section class="app-main">
     <transition name="fade-transform" mode="out-in">
       <keep-alive include="DefectManage">
-        <router-view />
+        <router-view id="dstk" />
       </keep-alive>
     </transition>
   </section>

+ 1 - 1
src/layout/index.vue

@@ -6,7 +6,7 @@
       <div :class="{'fixed-header':fixedHeader}">
         <navbar />
       </div>
-      <app-main />
+      <app-main id="content1" />
     </div>
   </div>
 </template>

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

@@ -122,34 +122,13 @@ export default {
     },
 
     sendReport(e, ele) {
-      var node = document.getElementById('Gambol')
-      // domtoimage.toPng(node).then(function(dataUrl) {
-      //   var url = dataUrl
-      //   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: '发送测试报告失败,请联系管理员!' })
-      //   })
-      //   var img = new Image()
-      //   img.src = dataUrl
-      //   document.body.appendChild(img)
-
-      // domtoimage.toJpeg(node).then(function(dataUrl) {
-      //   var url = dataUrl
-      //   url = url.toString().substring(url.indexOf(',') + 1)
-      //   var postData = { 'reportId': ele.id, 'imgStr': url, 'url': window.location.href, 'emailUser': e }
-      //   dailyReportSendmail(postData).then(res => { console.log(res) })
-      // })
-      // }).catch(function(error) {
-      //   console.error('oops, something went wrong!', error)
-      // })
+      var node = document.getElementById('dstk')
       setTimeout(() => {
         var that = this
         that.btn = false
         html2canvas(node, { useCORS: true }).then(function(canvas) {
           var url = canvas.toDataURL('image/png', 1)
           url = url.toString().substring(url.indexOf(',') + 1)
-          console.log(url)
           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: '发送测试报告失败,请联系管理员!' })
@@ -175,6 +154,9 @@ export default {
     font-size: 19px;
     font-weight: bold;
   }
+  #app .hideSidebar .sidebar-container {
+    display: none;
+}
   .rich>>> table tr td{border:1px solid #ccc;font-size: 14px; color: #606266}
   .rich>>> table th{border:1px solid #ccc; font-size: 14px; background: #F0F7FF; color: #606266}
   .rich>>> table {border:1px solid #ccc; border-collapse: collapse;line-height: 30px; text-align: center;font-size: 14px; color: #606266}