qinzhipeng_v@didiglobal.com há 4 anos atrás
pai
commit
fc10c143e2
1 ficheiros alterados com 41 adições e 38 exclusões
  1. 41 38
      src/views/reportManagement/daily/dailyPreview.vue

+ 41 - 38
src/views/reportManagement/daily/dailyPreview.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 预览测试日报 -->
   <div class="parent-style">
-    <div class="backStyle"> 邮件列表</div>
+    <div class="backStyle">邮件列表</div>
     <div class="Layout_space_between report-div">
       <div class="div1">收件人</div>
       <searchTeam :value.sync="form.name" :clearable="true" :multiple="true" style="width:100%" />
@@ -11,16 +11,23 @@
       <searchTeam :value.sync="form.names" :clearable="true" :multiple="true" style="width:100%" />
     </div>
 
-    <span class="backStyle"> 关联任务</span>
-    <div v-for="(item, index) in fromCreateData.taskDetailList" :key="index" class="Layout_flex_start report-taskList">
+    <span class="backStyle">关联任务</span>
+    <div
+      v-for="(item, index) in fromCreateData.taskDetailList"
+      :key="index"
+      class="Layout_flex_start report-taskList"
+    >
       <span>{{ item.taskId }}</span>
       <span>{{ item.name }}</span>
     </div>
 
     <div id="repot-list" class="marginTop">
-      <div class="backStyle marginTop"> 报告预览</div>
-      <div class="Layout_space_between reportName_style" style="border-bottom: 0.5px solid #eee;margin-bottom: 15px; padding-bottom: 10px;">
-        <span class="backStyle report-name"> {{ fromCreateData.reportName }}</span>
+      <div class="backStyle marginTop">报告预览</div>
+      <div
+        class="Layout_space_between reportName_style"
+        style="border-bottom: 0.5px solid #eee;margin-bottom: 15px; padding-bottom: 10px;"
+      >
+        <span class="backStyle report-name">{{ fromCreateData.reportName }}</span>
         <span>报告人:{{ name }}</span>
       </div>
       <div v-html="fromCreateData.content" />
@@ -88,9 +95,6 @@ export default {
 
     sendReport() {
       if (this.form.name !== undefined) {
-        // const targetDom = document.getElementById('repot-list')
-        // const copyDom = targetDom.cloneNode(true)
-        // document.querySelector('body').appendChild(copyDom)
         setTimeout(() => {
           html2canvas(document.getElementById('repot-list'), { useCORS: true }).then(canvas => {
             const imgData = canvas.toDataURL('image/png', 1)
@@ -98,7 +102,6 @@ export default {
             const postData = { 'reportId': this.daily_Id, 'imgStr': sendImgData, 'url': window.location.href, 'emailUser': this.form.name ? this.form.name.join(',') : null, 'copyTo': this.form.names ? this.form.names.join(',') : null }
             dailyReportSendmail(postData).then(res => {
               res.code === 200 ? this.$message.success('报告发送中,请稍后进行邮件查收!') : this.$message.error('发送测试日报失败,请联系管理员!')
-              // document.querySelector('body').removeChild(copyDom)
               this.$emit('handleClose')
             })
           })
@@ -113,41 +116,41 @@ export default {
 
 <style lang="scss" scoped>
 .parent-style {
-  .report-taskList{
-    font-size:14px;
-    font-family:MicrosoftYaHei;
-    line-height:17px;
-    color:#333;
+  .report-taskList {
+    font-size: 14px;
+    font-family: MicrosoftYaHei;
+    line-height: 17px;
+    color: #333;
     margin: 10px 0 0 0;
-    opacity:1;
+    opacity: 1;
   }
   .report-name {
     font-size: 20px;
     margin-top: 15px;
-    color:#409EFF;
+    color: #409eff;
   }
 }
 .div1 {
-    width: 60px;
-    font-size: 14px;
-    font-family: MicrosoftYaHei;
-    color: rgba(51, 51, 51, 1);
-    line-height: 19px;
+  width: 60px;
+  font-size: 14px;
+  font-family: MicrosoftYaHei;
+  color: rgba(51, 51, 51, 1);
+  line-height: 19px;
+}
+.backStyle {
+  color: #333;
+  font-size: 14px;
+  font-weight: bold;
+}
+.report-div {
+  margin-top: 10px;
+}
+.marginTop {
+  margin-top: 30px;
+}
+.reportName_style {
+  border-bottom: 0.5px solid #eee;
+  margin-bottom: 15px;
+  padding-bottom: 10px;
 }
-  .backStyle {
-    color:#333;
-    font-size: 14px;
-    font-weight: bold;
-  }
-  .report-div {
-    margin-top: 10px;
-  }
-  .marginTop {
-    margin-top: 30px;
-  }
-  .reportName_style {
-    border-bottom: 0.5px solid #eee;
-    margin-bottom: 15px;
-    padding-bottom: 10px;
-  }
 </style>