diff --git a/frontend/src/business/components/performance/report/PerformanceReportCompare.vue b/frontend/src/business/components/performance/report/PerformanceReportCompare.vue index 3193c0c973..5e80cfa5e2 100644 --- a/frontend/src/business/components/performance/report/PerformanceReportCompare.vue +++ b/frontend/src/business/components/performance/report/PerformanceReportCompare.vue @@ -1,9 +1,21 @@ @@ -12,15 +24,16 @@ import MsContainer from "@/business/components/common/components/MsContainer"; import MsMainContainer from "@/business/components/common/components/MsMainContainer"; import {checkoutTestManagerOrTestUser} from "@/common/js/utils"; +import OverviewCompareCard from "@/business/components/performance/report/components/OverviewCompareCard"; +import MsChart from "@/business/components/common/chart/MsChart"; +import LoadCompareCard from "@/business/components/performance/report/components/LoadCompareCard"; +import ResponseTimeCompareCard from "@/business/components/performance/report/components/ResponseTimeCompareCard"; export default { name: "PerformanceReportCompare", - components: {MsMainContainer, MsContainer}, + components: {ResponseTimeCompareCard, LoadCompareCard, MsChart, OverviewCompareCard, MsMainContainer, MsContainer}, mounted() { - let reportId = this.$route.path.split('/')[4]; - console.log(reportId); - let items = localStorage.getItem("compareReportIds"); - console.log(JSON.parse(items)); + this.init(); }, computed: { isReadOnly() { @@ -30,11 +43,28 @@ export default { data() { return {} }, - methods: {} + methods: { + init() { + this.$refs.overviewCard.initTable(); + this.$refs.loadCard.initCard(); + this.$refs.responseTimeCard.initCard(); + } + }, + watch: { + '$route'(to) { + if (to.name !== "ReportCompare") { + return; + } + this.init(); + } + } } diff --git a/frontend/src/business/components/performance/report/PerformanceReportView.vue b/frontend/src/business/components/performance/report/PerformanceReportView.vue index c496eb8646..d7934bc6b2 100644 --- a/frontend/src/business/components/performance/report/PerformanceReportView.vue +++ b/frontend/src/business/components/performance/report/PerformanceReportView.vue @@ -332,6 +332,8 @@ export default { this.$set(this.report, "id", this.reportId); this.$set(this.report, "status", data.status); this.$set(this.report, "testId", data.testId); + this.$set(this.report, "name", data.name); + this.$set(this.report, "createTime", data.createTime); this.$set(this.report, "loadConfiguration", data.loadConfiguration); this.checkReportStatus(data.status); if (this.status === "Completed" || this.status === "Running") { diff --git a/frontend/src/business/components/performance/report/components/LoadCompareCard.vue b/frontend/src/business/components/performance/report/components/LoadCompareCard.vue new file mode 100644 index 0000000000..8cba2a523f --- /dev/null +++ b/frontend/src/business/components/performance/report/components/LoadCompareCard.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/frontend/src/business/components/performance/report/components/OverviewCompareCard.vue b/frontend/src/business/components/performance/report/components/OverviewCompareCard.vue new file mode 100644 index 0000000000..18298b9967 --- /dev/null +++ b/frontend/src/business/components/performance/report/components/OverviewCompareCard.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/frontend/src/business/components/performance/report/components/ResponseTimeCompareCard.vue b/frontend/src/business/components/performance/report/components/ResponseTimeCompareCard.vue new file mode 100644 index 0000000000..1f48b5ea2c --- /dev/null +++ b/frontend/src/business/components/performance/report/components/ResponseTimeCompareCard.vue @@ -0,0 +1,188 @@ + + + + + diff --git a/frontend/src/business/components/performance/report/components/SameTestReports.vue b/frontend/src/business/components/performance/report/components/SameTestReports.vue index 6e203f66fb..216ab7d1da 100644 --- a/frontend/src/business/components/performance/report/components/SameTestReports.vue +++ b/frontend/src/business/components/performance/report/components/SameTestReports.vue @@ -5,20 +5,23 @@ :visible.sync="loadReportVisible"> + prop="name" + :label="$t('commons.name')" + show-overflow-tooltip> + + prop="userName" + :label="$t('report.user_name')" + show-overflow-tooltip> @@ -27,7 +30,7 @@ + :label="$t('commons.create_time')">