|
@@ -28,7 +28,9 @@
|
|
|
? "当前选择节点名称:" + actionName
|
|
|
: "当前无选择节点"
|
|
|
}}
|
|
|
- <span v-show="actionName" class="clearStyle" @click="clearClick">取消选择</span>
|
|
|
+ <span v-show="actionName" class="clearStyle" @click="clearClick"
|
|
|
+ >取消选择</span
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-alert>
|
|
|
<div style="margin: 10px 0">
|
|
@@ -426,69 +428,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, "ceshi");
|
|
|
- // } else {
|
|
|
- // /* 火狐谷歌的文件下载方式 */
|
|
|
- // var blob = new Blob([response.data]);
|
|
|
- // var downloadElement = document.createElement("a");
|
|
|
- // var href = window.URL.createObjectURL(blob);
|
|
|
- // downloadElement.href = href;
|
|
|
- // downloadElement.download = "cehi";
|
|
|
- // 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;
|
|
@@ -907,7 +912,7 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
.container {
|
|
|
background-color: #f0f2f5;
|
|
|
- .clearStyle{
|
|
|
+ .clearStyle {
|
|
|
cursor: pointer;
|
|
|
color: #0b82ff;
|
|
|
}
|