| | |
| | | record_time: this.searchTime.record_time, |
| | | record_time1: this.searchTime.record_time1, |
| | | }; |
| | | console.log(searchParams); |
| | | // 请求后台获取数据 |
| | | this.$api.file.download(searchParams) |
| | | .then(res=>{ |
| | |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | }else { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.progress = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | } |
| | | }).catch(error=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.progress = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | console.log(error); |
| | | }); |
| | | }); |
| | |
| | | .then(function(res){ |
| | | res = JSON.parse(res.data.result); |
| | | self.progress.value = Number(res.data.toFixed(0)); |
| | | |
| | | console.log(res.data); |
| | | if(res.data<100 && self.progress.show) { |
| | | setTimeout(self.getProgress, 50); |
| | | }else { |