From ccaeabfb5cce89eb4d45be73a54d1122d83bbf1b Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Tue, 24 Aug 2021 09:21:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=AF=BC=E5=87=BAzip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- report-ui/src/api/bigscreen.js | 18 ++++++-- .../views/report/bigscreen/designer/index.vue | 44 ++++++++++++++++++- 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/report-ui/src/api/bigscreen.js b/report-ui/src/api/bigscreen.js index 8155503f..ef090d96 100644 --- a/report-ui/src/api/bigscreen.js +++ b/report-ui/src/api/bigscreen.js @@ -1,5 +1,6 @@ import request from '@/utils/request' import { getShareToken, getToken } from "@/utils/auth"; +import axios from 'axios'; // 保存大屏设计 export function insertDashboard(data) { @@ -48,12 +49,21 @@ export function getData(data) { // 导出大屏 export function exportDashboard(data) { - return request({ - url: 'reportDashboard/export/' + data, - method: 'get', + return new Promise((resolve) =>{ + axios({ + method:'get', + url: process.env.BASE_API + '/reportDashboard/export/' + data, + headers: { 'Authorization': getToken() }, + params:data, + responseType:'blob' + }).then(res =>{ + resolve(res.data); + }).catch(err =>{ + resolve('error'); + }) }) -} +} // 导入大屏 export function importDashboard(data) { diff --git a/report-ui/src/views/report/bigscreen/designer/index.vue b/report-ui/src/views/report/bigscreen/designer/index.vue index f1c9d13d..3f4a6ba4 100644 --- a/report-ui/src/views/report/bigscreen/designer/index.vue +++ b/report-ui/src/views/report/bigscreen/designer/index.vue @@ -87,6 +87,26 @@ + + + + + + + + + +