소스 검색

月报邮件预览

洪海涛 4 년 전
부모
커밋
b8a74f3954
2개의 변경된 파일24개의 추가작업 그리고 4개의 파일을 삭제
  1. 8 1
      src/api/qualityMonthlyReport/edit.js
  2. 16 3
      src/views/monthlyReport/childrenPage/editReport/index.vue

+ 8 - 1
src/api/qualityMonthlyReport/edit.js

@@ -179,4 +179,11 @@ export function getQualityProcessAndRdEfficiencyPieData(reportId) {
     method: 'get'
   })
 }
-
+// 月报阅览
+export function getMonthlyReportPreView(reportId) {
+  return request({
+    url: projectManagementUrl + '/monthlyReport/getMonthlyReportPreView?id=' + reportId,
+    timeout: '100000',
+    method: 'get'
+  })
+}

+ 16 - 3
src/views/monthlyReport/childrenPage/editReport/index.vue

@@ -92,9 +92,10 @@
       </div>
     </normal-dialog>
     <!-- 月报发布确认 -->
-    <normal-dialog ref="dialogPublishAll" is-succes :show-dialog="false" :title="'发送确认'" width="420px" @succes="publishAllReport">
-      <div class="report-delete">
-        月报数据已检查无误,确认发布?
+    <normal-dialog ref="dialogPublishAll" is-succes :show-dialog="false" :title="'邮件预览'" width="70%" @succes="publishAllReport">
+      <div class="report-delete" style="text-align: initial">
+<!--        月报数据已检查无误,确认发布?-->
+        <div style="padding: 0 20px;margin: -20px 0;color: #333;" v-html="monthlyReportPreView.content" />
       </div>
     </normal-dialog>
     <!-- 月报确认 -->
@@ -114,6 +115,7 @@ import Menu from './components/menu'
 import Core from './components/core'
 import Clickoutside from 'element-ui/src/utils/clickoutside'
 import normalDialog from '@/components/dialog/normalDialog'
+import { getMonthlyReportPreView } from '@/api/qualityMonthlyReport/edit'
 
 export default {
   name: '',
@@ -132,6 +134,7 @@ export default {
       /* 右侧列表页数据 */
       anchorActive: '',
       bodyLoading: false,
+      monthlyReportPreView: null,
       scrollTop: 0
     }
   },
@@ -405,6 +408,9 @@ export default {
       }, 700)
     },
     dialogOpen(key) {
+      if (key === 'dialogPublishAll') {
+        this.setMonthlyReportPreView()
+      }
       this.$refs[key].visible = true
     },
     sendReport(key) {
@@ -462,6 +468,13 @@ export default {
           this.$router.push({ path: '/monthlyReport/index' })
         }
       })
+    },
+    // 月报预览
+    async setMonthlyReportPreView() {
+      const res = await getMonthlyReportPreView(this.$route.query.reportId)
+      if (res.code === 200) {
+        this.monthlyReportPreView = res.data
+      }
     }
   }
 }