| | |
| | | const { |
| | | currentVersion: { id, version }, |
| | | } = this; |
| | | let loading = this.$layer.loading(); |
| | | zipDownload(id, version).then((res) => { |
| | | // console.log(res, "==========="); |
| | | let { headers, data, status } = res; |
| | |
| | | link.download = fileName; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | this.$layer.close(loading); |
| | | document.body.removeChild(link); |
| | | window.URL.revokeObjectURL(url); |
| | | } else { |
| | | this.$layer.close(loading); |
| | | this.$message.error("操作失败"); |
| | | } |
| | | }); |
| | |
| | | return false; |
| | | } |
| | | let loading = this.$layer.loading(); |
| | | debugger; |
| | | const formData = new FormData(); |
| | | formData.append("file", this.file); |
| | | if (this.fromProd) { |
| | |
| | | }))[0]; |
| | | formData.append("baseStr", JSON.stringify(prod)); |
| | | } |
| | | zipParse(formData) |
| | | .then((res) => { |
| | | this.$nextTick(()=>{ |
| | | zipParse(formData).then((res) => { |
| | | this.$layer.close(loading); |
| | | let { code, data, data2, data3, msg } = res.data; |
| | | if (code && data) { |
| | |
| | | } else { |
| | | this.$message.error(msg); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | }).catch((error) => { |
| | | this.$layer.close(loading); |
| | | console.log(error); |
| | | }); |
| | | }) |
| | | this.bomUploadShow = false; |
| | | this.$layer.close(loading); |
| | | }, |
| | | getAllProducts() { |
| | | getAllProducts().then((res) => { |
| | |
| | | }, |
| | | download(obj) { |
| | | const { id } = obj; |
| | | let loading = this.$layer.loading(); |
| | | downLoadSoftware(id).then((res) => { |
| | | // console.log(res, "==========="); |
| | | let { headers, data, status } = res; |
| | |
| | | link.download = fileName; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | this.$layer.close(loading); |
| | | document.body.removeChild(link); |
| | | window.URL.revokeObjectURL(url); |
| | | } else { |
| | | this.$layer.close(loading); |
| | | this.$message.error("操作失败"); |
| | | } |
| | | }); |
| | |
| | | .btn-grp button { |
| | | width: 6.4em; |
| | | } |
| | | </style> |
| | | </style> |