Sfoglia il codice sorgente

印章档案附件下载

xieyn 1 anno fa
parent
commit
274669ef2e
1 ha cambiato i file con 26 aggiunte e 0 eliminazioni
  1. 26 0
      src/views/oa/SealArchivesList.vue

+ 26 - 0
src/views/oa/SealArchivesList.vue

@@ -322,6 +322,32 @@
       cancel(){
         this.visible = false;
       },
+      /* 文件下载 */
+      uploadFile(text){
+        console.log(text)
+        if(!text){
+          this.$message.warning("未知的文件")
+          return;
+        }
+        var strArr = text;
+        if(text.indexOf(",")>0){
+          strArr = text.split(',');
+          console.log("strArr",strArr)
+          text = text.substring(0,text.indexOf(","))
+          var count=0;
+          for(var i =0;i<strArr.length;i++){
+            console.log(strArr[i])
+            var hiddenIFrameID = 'hiddenDownloader' + count++;
+            var iframe = document.createElement('iframe');
+            iframe.id = hiddenIFrameID;
+            iframe.style.display = 'none';
+            document.body.appendChild(iframe);
+            iframe.src = strArr[i];//直接下载,不会弹出新的页面
+          }
+        }else {
+          window.open(window._CONFIG['staticDomainURL']+ "/"+text);
+        }
+      },
     }
   }
 </script>