|
@@ -231,4 +231,22 @@ function TimeFormatter(time){
|
|
|
return false
|
|
|
}
|
|
|
}
|
|
|
- Vue.prototype.$validateInteger = ValidateInteger
|
|
|
+ Vue.prototype.$validateInteger = ValidateInteger
|
|
|
+
|
|
|
+// 流文件下载处理 压缩包
|
|
|
+function blobZipDown (blob, name){
|
|
|
+ const url = window.URL.createObjectURL(
|
|
|
+ new Blob([blob], {
|
|
|
+ // 设置该文件的类型,这里对应的类型对应为.zip格式
|
|
|
+ type: 'application/zip',
|
|
|
+ }),
|
|
|
+ );
|
|
|
+ const link = document.createElement('a');
|
|
|
+ link.href = url;
|
|
|
+ const fileName = decodeURI(name);
|
|
|
+ link.setAttribute('download', `${fileName}.zip`);
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ };
|
|
|
+
|
|
|
+ Vue.prototype.$blobZipDown = blobZipDown
|