|
@@ -188,6 +188,7 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
+ //点击复选时
|
|
|
selectionChanged(row) {
|
|
|
this.selectedArray = [];
|
|
|
row.forEach(item => {
|
|
@@ -197,12 +198,13 @@ export default {
|
|
|
},
|
|
|
//下载
|
|
|
download(type) {
|
|
|
- if (this.selectedArray == []) {
|
|
|
+ if (this.selectedArray.length == 0) {
|
|
|
this.$message("请选择要下载的文档");
|
|
|
} else {
|
|
|
switch (type) {
|
|
|
case 0:
|
|
|
console.log("点击了下载全部");
|
|
|
+ this.downloadPost();
|
|
|
break;
|
|
|
case 1:
|
|
|
console.log("点击了下载模具3D图档");
|
|
@@ -221,6 +223,33 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ },
|
|
|
+ //具体的下载
|
|
|
+ downloadPost() {
|
|
|
+ this.http.post(
|
|
|
+ this.port.mold.moldFileDowloadFile,
|
|
|
+ {
|
|
|
+ ids: this.selectedArray.join(",")
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ this.listLoading = false;
|
|
|
+ if (res.code == "ok") {
|
|
|
+ console.log(res);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.listLoading = false;
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
created() {
|