Browse Source

需求211 研报审批已处理列表增加下载pdf下载长图操作

cxmo 4 months ago
parent
commit
0d7bc8f681
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/views/approve_manage/approveList.vue

+ 10 - 0
src/views/approve_manage/approveList.vue

@@ -87,6 +87,9 @@
                                 <el-button type="text" style="padding:0;" @click="toApproveDetail(row,'detail')">{{$t('AprrovalPage.details_table')}}</el-button>
                                 <el-button type="text" style="padding:0" @click="handleShowDetail(row)" 
                                     v-if="row.State===3&&permissionBtn.isShowBtn('approvePermission','reportApprove_rejectreason')">{{$t('AprrovalPage.rejection_table')}}</el-button>
+                                <!-- 下载长图 下载pdf按钮 -->
+                                <el-button type="text" style="padding:0" v-if="row.DetailPdfUrl" @click="downloadPdfImg(row,1)">{{$t('ReportManage.smart_btn.download_pdf')}}</el-button>
+                                <el-button type="text" style="padding:0" v-if="row.DetailImgUrl" @click="downloadPdfImg(row,2)">{{$t('ReportManage.smart_btn.download_long_image')}}</el-button>
                             </template>
                             <template v-if="activeTab==='originate'">
                                 <el-button type="text" style="padding:0;" @click="toApproveDetail(row,'myself')">{{$t('AprrovalPage.details_table')}}</el-button>
@@ -263,6 +266,13 @@ export default {
             if(e==='待审批') return this.$t('AprrovalPage.awaiting_approval_option') 
             if(e==='已同意') return this.$t('AprrovalPage.agreed_option') 
             return e
+        },
+        downloadPdfImg(row,type){
+            if(type == 1){
+                row.DetailPdfUrl&&window.open(row.DetailPdfUrl,"_blank")
+            }else{
+                row.DetailImgUrl&&this.handleDownloadResource(row.DetailImgUrl,`${row.Title}`)
+            }
         }
     },
     mounted(){