diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index bb494fc68a..57d6f78efa 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit bb494fc68a2367359c9048fa7250c7618de4afb6 +Subproject commit 57d6f78efa4b0300be188e8b024511ceef0873ed diff --git a/frontend/src/business/components/api/report/ApiReportViewDetail.vue b/frontend/src/business/components/api/report/ApiReportViewDetail.vue index a00b2b446a..5685063904 100644 --- a/frontend/src/business/components/api/report/ApiReportViewDetail.vue +++ b/frontend/src/business/components/api/report/ApiReportViewDetail.vue @@ -46,10 +46,9 @@ import MsScenarioResults from "./components/ScenarioResults"; import MsContainer from "@/business/components/common/components/MsContainer"; import MsMainContainer from "@/business/components/common/components/MsMainContainer"; import MsApiReportExport from "./ApiReportExport"; -import {exportPdf} from "@/common/js/utils"; -import html2canvas from "html2canvas"; import MsApiReportViewHeader from "./ApiReportViewHeader"; import {RequestFactory} from "../test/model/ScenarioModel"; +import {windowPrint} from "../../../../common/js/utils"; export default { name: "MsApiReportViewDetail", @@ -154,23 +153,16 @@ export default { this.scenarioName = requestResult.scenarioName; }); }, - handleExport(name) { - this.loading = true; + handleExport() { this.reportExportVisible = true; let reset = this.exportReportReset; - - this.$nextTick(function () { - html2canvas(document.getElementById('apiTestReport'), { - // scale: 2, - }).then(function (canvas) { - exportPdf(name, [canvas]); - reset(); - }); + this.$nextTick(() => { + windowPrint('apiTestReport', 0.57); + reset(); }); }, exportReportReset() { - this.reportExportVisible = false; - this.loading = false; + this.$router.go(0); } }, diff --git a/frontend/src/business/components/common/components/report/MsReportTitle.vue b/frontend/src/business/components/common/components/report/MsReportTitle.vue index 8b58a77e22..fc661d81ba 100644 --- a/frontend/src/business/components/common/components/report/MsReportTitle.vue +++ b/frontend/src/business/components/common/components/report/MsReportTitle.vue @@ -9,9 +9,7 @@