From 660e0b3b563dd7fd18348696c0a5ce09ba42c25b Mon Sep 17 00:00:00 2001 From: qianlishi <1432731663@qq.com> Date: Wed, 29 Sep 2021 14:47:02 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/report/bigscreen/designer/index.vue | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/report-ui/src/views/report/bigscreen/designer/index.vue b/report-ui/src/views/report/bigscreen/designer/index.vue index 35b0a0de..eb548dc4 100644 --- a/report-ui/src/views/report/bigscreen/designer/index.vue +++ b/report-ui/src/views/report/bigscreen/designer/index.vue @@ -572,6 +572,18 @@ export default { showDataSet: val }; exportDashboard(param).then(res => { + const that = this; + const type = res.type; + if (type == "application/json") { + var reader = new FileReader(); + reader.readAsText(res, "utf-8"); + reader.onload = function() { + const data = JSON.parse(reader.result); + that.$message.error(data.message); + }; + return; + } + const blob = new Blob([res], { type: "application/octet-stream" }); if (window.navigator.msSaveOrOpenBlob) { //msSaveOrOpenBlob方法返回bool值 @@ -591,18 +603,17 @@ export default { this.$refs.upload.clearFiles(); //刷新大屏页面 this.initEchartData(); - if (response.code == '200') { + if (response.code == "200") { this.$message({ message: "导入成功!", type: "success" }); - }else { + } else { this.$message({ message: response.message, type: "error" }); } - }, handleError(err) { this.$message({