|
@@ -437,72 +437,72 @@ export default {
|
|
|
this.getList(this.params, this.pageSize);
|
|
|
},
|
|
|
moreDown() {
|
|
|
- let arr = [];
|
|
|
- this.idList.forEach((item) => {
|
|
|
- arr.push({
|
|
|
- id: item.fileCode,
|
|
|
- fileName: item.fileName,
|
|
|
- });
|
|
|
- });
|
|
|
- this.$http({
|
|
|
- url: "/market/cmkFileShare/downAllFile",
|
|
|
- method: "post",
|
|
|
- headers: {
|
|
|
- "Content-Type": "application/json",
|
|
|
- },
|
|
|
- responseType: "blob",
|
|
|
- data: { mkFileShareAttachList: arr },
|
|
|
- }).then((response) => {
|
|
|
- if (window.navigator && window.navigator.msSaveOrOpenBlob) {
|
|
|
- let blob = new Blob([response.data], {
|
|
|
- type: "application/vnd.ms-excel",
|
|
|
- });
|
|
|
- window.navigator.msSaveOrOpenBlob(
|
|
|
- blob,
|
|
|
- new Date().getTime().toString() + ".zip"
|
|
|
- );
|
|
|
- } else {
|
|
|
- /* 火狐谷歌的文件下载方式 */
|
|
|
- var blob = new Blob([response.data]);
|
|
|
- var downloadElement = document.createElement("a");
|
|
|
- var href = window.URL.createObjectURL(blob);
|
|
|
- downloadElement.href = href;
|
|
|
- downloadElement.download = new Date().getTime().toString() + ".zip";
|
|
|
- document.body.appendChild(downloadElement);
|
|
|
- downloadElement.click();
|
|
|
- document.body.removeChild(downloadElement);
|
|
|
- window.URL.revokeObjectURL(href);
|
|
|
- }
|
|
|
- });
|
|
|
+ // let arr = [];
|
|
|
// this.idList.forEach((item) => {
|
|
|
- // this.$http({
|
|
|
- // url: "/market/cmkFileShare/downFile",
|
|
|
- // method: "post",
|
|
|
- // headers: {
|
|
|
- // "Content-Type": "application/json",
|
|
|
- // },
|
|
|
- // responseType: "blob",
|
|
|
- // data: { id: item.fileCode, fileName: item.fileName },
|
|
|
- // }).then((response) => {
|
|
|
- // if (window.navigator && window.navigator.msSaveOrOpenBlob) {
|
|
|
- // let blob = new Blob([response.data], {
|
|
|
- // type: "application/vnd.ms-excel",
|
|
|
- // });
|
|
|
- // window.navigator.msSaveOrOpenBlob(blob, item.fileName);
|
|
|
- // } else {
|
|
|
- // /* 火狐谷歌的文件下载方式 */
|
|
|
- // var blob = new Blob([response.data]);
|
|
|
- // var downloadElement = document.createElement("a");
|
|
|
- // var href = window.URL.createObjectURL(blob);
|
|
|
- // downloadElement.href = href;
|
|
|
- // downloadElement.download = item.fileName;
|
|
|
- // document.body.appendChild(downloadElement);
|
|
|
- // downloadElement.click();
|
|
|
- // document.body.removeChild(downloadElement);
|
|
|
- // window.URL.revokeObjectURL(href);
|
|
|
- // }
|
|
|
+ // arr.push({
|
|
|
+ // id: item.fileCode,
|
|
|
+ // fileName: item.fileName,
|
|
|
// });
|
|
|
// });
|
|
|
+ // this.$http({
|
|
|
+ // url: "/market/cmkFileShare/downAllFile",
|
|
|
+ // method: "post",
|
|
|
+ // headers: {
|
|
|
+ // "Content-Type": "application/json",
|
|
|
+ // },
|
|
|
+ // responseType: "blob",
|
|
|
+ // data: { mkFileShareAttachList: arr },
|
|
|
+ // }).then((response) => {
|
|
|
+ // if (window.navigator && window.navigator.msSaveOrOpenBlob) {
|
|
|
+ // let blob = new Blob([response.data], {
|
|
|
+ // type: "application/vnd.ms-excel",
|
|
|
+ // });
|
|
|
+ // window.navigator.msSaveOrOpenBlob(
|
|
|
+ // blob,
|
|
|
+ // new Date().getTime().toString() + ".zip"
|
|
|
+ // );
|
|
|
+ // } else {
|
|
|
+ // /* 火狐谷歌的文件下载方式 */
|
|
|
+ // var blob = new Blob([response.data]);
|
|
|
+ // var downloadElement = document.createElement("a");
|
|
|
+ // var href = window.URL.createObjectURL(blob);
|
|
|
+ // downloadElement.href = href;
|
|
|
+ // downloadElement.download = new Date().getTime().toString() + ".zip";
|
|
|
+ // document.body.appendChild(downloadElement);
|
|
|
+ // downloadElement.click();
|
|
|
+ // document.body.removeChild(downloadElement);
|
|
|
+ // window.URL.revokeObjectURL(href);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ this.idList.forEach((item) => {
|
|
|
+ this.$http({
|
|
|
+ url: "/market/cmkFileShare/downFile",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ responseType: "blob",
|
|
|
+ data: { id: item.fileCode, fileName: item.fileName },
|
|
|
+ }).then((response) => {
|
|
|
+ if (window.navigator && window.navigator.msSaveOrOpenBlob) {
|
|
|
+ let blob = new Blob([response.data], {
|
|
|
+ type: "application/vnd.ms-excel",
|
|
|
+ });
|
|
|
+ window.navigator.msSaveOrOpenBlob(blob, item.fileName);
|
|
|
+ } else {
|
|
|
+ /* 火狐谷歌的文件下载方式 */
|
|
|
+ var blob = new Blob([response.data]);
|
|
|
+ var downloadElement = document.createElement("a");
|
|
|
+ var href = window.URL.createObjectURL(blob);
|
|
|
+ downloadElement.href = href;
|
|
|
+ downloadElement.download = item.fileName;
|
|
|
+ document.body.appendChild(downloadElement);
|
|
|
+ downloadElement.click();
|
|
|
+ document.body.removeChild(downloadElement);
|
|
|
+ window.URL.revokeObjectURL(href);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
|
this.idList = val;
|
|
@@ -593,7 +593,7 @@ export default {
|
|
|
type: "success",
|
|
|
});
|
|
|
this.fileInfo.fileList = [];
|
|
|
- this.infolist = {};
|
|
|
+ // this.infolist = {};
|
|
|
this.dialogStatus = false;
|
|
|
this.getList(this.params, this.pageSize);
|
|
|
}
|