소스 검색

月报2.0改造(5.0):月报预览

洪海涛 4 년 전
부모
커밋
8f0290269c
2개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/views/monthlyReport/childrenPage/editReport/index.vue
  2. 6 0
      src/views/monthlyReport/index.vue

+ 2 - 2
src/views/monthlyReport/childrenPage/editReport/index.vue

@@ -36,7 +36,7 @@
         >
           取消
         </el-button>
-        <el-button
+        <!-- <el-button
           v-if="pageType.search(/All/) > -1 && pageDate && pageDate.status === 20 && (roleCode === 100 || roleCode === 0)"
           slot="reference"
           type="primary"
@@ -44,7 +44,7 @@
           @click="dialogOpen('dialogViewPdf')"
         >
           PDF预览
-        </el-button>
+        </el-button> -->
         <el-button
           v-if="pageType.search(/All/) > -1 && pageDate && pageDate.status === 20 && (roleCode === 100 || roleCode === 0)"
           slot="reference"

+ 6 - 0
src/views/monthlyReport/index.vue

@@ -25,6 +25,7 @@
         <el-button v-if="tagData.status === 20" type="text" @click="jump('report_home_Publication', '/monthlyReport/edit', { pageType: 'readAll', reportId: reportStatus.id })"> 月报发布</el-button>
         <el-button v-if="tagData.status === 30" type="text" @click="jump('report_home_viewReport', '/monthlyReport/edit', { pageType: 'readAll', reportId: reportStatus.id })"> 查看完整报告</el-button>
         <!--    @click="downloadMonthlyReportFn"    -->
+        <a v-if="isShowPdfPushDow() && tagData.status === 20" target="blank" :href="`${projectManagementUrl}/monthlyReport/downloadMonthlyReport?id=${reportValue}&refrash=true`" :download="`${reportName}.pdf`" style="margin-left: 10px;display: inline-block"><svg-icon icon-class="monthlyReport下载" class="icon" /></a>
         <a v-if="isShowPdfDow()" target="blank" :href="`${projectManagementUrl}/monthlyReport/downloadMonthlyReport?id=${reportValue}`" :download="`${reportName}.pdf`" style="margin-left: 10px;display: inline-block"><svg-icon icon-class="monthlyReport下载" class="icon" /></a>
         <el-button v-if="tagData.status === 0" type="text" @click="sendConfirm(reportData)"> 发送确认</el-button>
       </div>
@@ -211,6 +212,11 @@ export default {
       // tagData.status === 30 && tagData.version !== 'v1' && tagData.version
       return status === 30 && version !== 'v1' && `${version}`.replace(/v/, '') > 1
     },
+    isShowPdfPushDow() {
+      const { status, version } = this.tagData
+      // tagData.status === 30 && tagData.version !== 'v1' && tagData.version
+      return status === 20 && version !== 'v1' && `${version}`.replace(/v/, '') > 1
+    },
     getReportStatus(e) {
       this.contentLoading = true
       this.monthlyReportIndex(e.id)