|
@@ -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>
|