whychdw
2020-07-23 e8d6af419e27460a5a7e01b6865da33761fe75ae
提交查看导出传参
1个文件已修改
10 ■■■■■ 已修改文件
src/pages/batt-list/history-page.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/batt-list/history-page.vue
@@ -757,6 +757,7 @@
                            record_time: this.searchTime.record_time,
                            record_time1: this.searchTime.record_time1,
                        };
                        console.log(searchParams);
                        // 请求后台获取数据
                        this.$api.file.download(searchParams)
                        .then(res=>{
@@ -773,9 +774,16 @@
                                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);
                        });
                    });
@@ -793,7 +801,7 @@
            .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 {