Ver código fonte

pdf、长图下载问题处理

cldu 1 mês atrás
pai
commit
69e8ffc063
1 arquivos alterados com 20 adições e 2 exclusões
  1. 20 2
      src/views/report/List.vue

+ 20 - 2
src/views/report/List.vue

@@ -585,6 +585,24 @@ const getSystemInfoFun=()=>{
     })
 }
 
+const handleDownloadPdf = () => {
+    if(activeItem.value && activeItem.value.ReportLayout == 3) {
+        downloadPdfImg(activeItem.value,1)
+    } else {
+        showDownloadPdfImg.value=true;
+        downloadPdfImgType.value='pdf'
+    }
+}
+
+const handleDownloadImg = () => {
+    if(activeItem.value && activeItem.value.ReportLayout == 3) {
+        downloadPdfImg(activeItem.value,2)
+    } else {
+        showDownloadPdfImg.value=true;
+        downloadPdfImgType.value='img'
+    }
+}
+
 onMounted(async ()=>{
     getEtaConfig()
     getSystemInfoFun()
@@ -784,9 +802,9 @@ onMounted(async ()=>{
                 <div class="item" v-if="checkAuthBtn(reportManageBtn.reportManage_cancelPublish)&&activeItem.State===6&&activeItem.HasAuth"
                     @click="handleReportCancel(activeItem)">撤销</div>
                 <div class="item" v-if="checkAuthBtn(reportManageBtn.reportManage_exportPdf) && activeItem.DetailPdfUrl"
-                    @click="showDownloadPdfImg=true;downloadPdfImgType='pdf'">下载pdf</div>
+                    @click="handleDownloadPdf">下载pdf</div>
                 <div class="item" v-if="checkAuthBtn(reportManageBtn.reportManage_exportImg) && activeItem.DetailImgUrl"
-                    @click="showDownloadPdfImg=true;downloadPdfImgType='img'">下载长图</div>
+                    @click="handleDownloadImg">下载长图</div>
                 <div class="item" @click="handldReportMsgSend(activeItem)" v-if="activeItem.MsgIsSend==0&&checkAuthBtn(reportManageBtn.reportManage_sendMsg)&&activeItem.HasAuth">推送消息</div>
             </template>
             <!-- 待审批,已驳回 -->