whychdw
2020-07-23 035904dd8f3c0bd4b4c8a72e52ed8c48d17fe290
提交生成文件失败 响应
2个文件已修改
14 ■■■■ 已修改文件
src/pages/batt-list/history-page.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/file/index.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/batt-list/history-page.vue
@@ -765,7 +765,7 @@
                            if(res.code == 1) {
                                // 关闭进度条
                                this.progress.show = false;
                                this.progress.progress = 0;
                                this.progress.value = 0;
                                let data = res.data[0];
                                const link = document.createElement("a");
                                link.href = encodeURI(this.$config.url+'tomcat7_csv/'+data.fileName);
@@ -776,13 +776,13 @@
                            }else {
                                // 关闭进度条
                                this.progress.show = false;
                                this.progress.progress = 0;
                                this.progress.value = 0;
                                this.$layer.msg('生成文件失败!');
                            }
                        }).catch(error=>{
                            // 关闭进度条
                            this.progress.show = false;
                            this.progress.progress = 0;
                            this.progress.value = 0;
                            this.$layer.msg('生成文件失败!');
                            console.log(error);
                        });
src/pages/file/index.vue
@@ -242,6 +242,7 @@
                        setTimeout(()=>{
                            // 关闭进度条
                            this.progress.show = false;
                            this.progress.value = 0;
                            // 设置点击事件
                            let data = res.data[0];
                            const link = document.createElement("a");
@@ -252,9 +253,16 @@
                            document.body.removeChild(link);
                        }, 1000);
                    }else {
                        // 关闭进度条
                        this.progress.show = false;
                        this.progress.value = 0;
                        this.$layer.msg('生成文件失败!');
                    }
                }).catch(error=>{
                    // 关闭进度条
                    this.progress.show = false;
                    this.progress.value = 0;
                    this.$layer.msg('生成文件失败!');
                    console.log(error);
                });
            });