Pārlūkot izejas kodu

Merge branch 'demand-211'

cxmo 3 mēneši atpakaļ
vecāks
revīzija
8134f57f83
2 mainītis faili ar 12 papildinājumiem un 0 dzēšanām
  1. 2 0
      src/utils/buttonConfig.js
  2. 10 0
      src/views/approve_manage/approveList.vue

+ 2 - 0
src/utils/buttonConfig.js

@@ -809,6 +809,8 @@ export const approvePermission = {
     reportApprove_rejectreason:'reportApprove:rejectreason',//驳回理由(列表中的按钮)
     reportApprove_return:'reportApprove:return',//返回(审批详情-返回按钮)
     reportApprove_repeal:'reportApprove:repeal',//撤回(列表中的按钮,审批详情-撤回按钮)
+    reportApprove_download_pdf:'reportApprove:download:pdf',//下载PDF
+    reportApprove_download_img:'reportApprove:download:img',//下载长图
 }
 
 /* 图表主题配置 */

+ 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&&permissionBtn.isShowBtn('approvePermission','reportApprove_download_pdf')" @click="downloadPdfImg(row,1)">{{$t('ReportManage.smart_btn.download_pdf')}}</el-button>
+                                <el-button type="text" style="padding:0" v-if="row.DetailImgUrl&&permissionBtn.isShowBtn('approvePermission','reportApprove_download_img')" @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.ReportTitle}`)
+            }
         }
     },
     mounted(){