diff --git a/frontend/src/business/components/performance/report/PerformanceReportCompare.vue b/frontend/src/business/components/performance/report/PerformanceReportCompare.vue index 19ea78d52e48975385ee1ab49109167f92d5e561..3193c0c973d6ba02e796c97bc92175c4e3327e80 100644 --- a/frontend/src/business/components/performance/report/PerformanceReportCompare.vue +++ b/frontend/src/business/components/performance/report/PerformanceReportCompare.vue @@ -1,7 +1,9 @@ @@ -15,13 +17,12 @@ export default { name: "PerformanceReportCompare", components: {MsMainContainer, MsContainer}, mounted() { - console.log(111); + let reportId = this.$route.path.split('/')[4]; + console.log(reportId); + let items = localStorage.getItem("compareReportIds"); + console.log(JSON.parse(items)); }, computed: { - queryDataType: function () { - let reportIds = this.$route.params.reportIds; - return reportIds; - }, isReadOnly() { return !checkoutTestManagerOrTestUser(); } diff --git a/frontend/src/business/components/performance/report/components/SameTestReports.vue b/frontend/src/business/components/performance/report/components/SameTestReports.vue index 4e7164e49428b5950602b752893657be242ed2a3..6e203f66fb08322fb4eabed24b55cf48771ece98 100644 --- a/frontend/src/business/components/performance/report/components/SameTestReports.vue +++ b/frontend/src/business/components/performance/report/components/SameTestReports.vue @@ -47,7 +47,6 @@ import MsTablePagination from "@/business/components/common/pagination/TablePagination"; import MsDialogFooter from "@/business/components/common/components/MsDialogFooter"; import ReportTriggerModeItem from "@/business/components/common/tableItem/ReportTriggerModeItem"; -import {getUUID} from "@/common/js/utils"; export default { name: "SameTestReports", @@ -84,10 +83,10 @@ export default { }) }, handleCompare() { - console.log(123); let reportIds = [...this.selectIds]; - let uuid = getUUID(); - this.$router.push({path: '/performance/report/compare', params: {redirectID: uuid, reportIds: reportIds}}); + localStorage.setItem("compareReportIds", JSON.stringify(reportIds)); + this.close(); + this.$router.push({path: '/performance/report/compare/' + reportIds[0]}); }, handleSelectAll(selection) { if (selection.length > 0) { diff --git a/frontend/src/business/components/performance/router.js b/frontend/src/business/components/performance/router.js index 67bbfdc0594539f85d1435bc6db389041c382c5b..4ea1fe4d8cc373337be80cedd0abafc2cef1f84d 100644 --- a/frontend/src/business/components/performance/router.js +++ b/frontend/src/business/components/performance/router.js @@ -1,5 +1,3 @@ -import MsProject from "@/business/components/settings/project/MsProject"; - const PerformanceTest = () => import('@/business/components/performance/PerformanceTest') const PerformanceTestHome = () => import('@/business/components/performance/home/PerformanceTestHome') const EditPerformanceTest = () => import('@/business/components/performance/test/EditPerformanceTest') @@ -65,7 +63,7 @@ export default { component: PerformanceReportView }, { - path: "report/compare", + path: "report/compare/:reportId", name: "ReportCompare", component: PerformanceReportCompare, },