diff --git a/frontend/src/business/components/performance/report/PerformanceReportCompare.vue b/frontend/src/business/components/performance/report/PerformanceReportCompare.vue
index 5e80cfa5e2..3193c0c973 100644
--- a/frontend/src/business/components/performance/report/PerformanceReportCompare.vue
+++ b/frontend/src/business/components/performance/report/PerformanceReportCompare.vue
@@ -1,21 +1,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
@@ -24,16 +12,15 @@
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: {ResponseTimeCompareCard, LoadCompareCard, MsChart, OverviewCompareCard, MsMainContainer, MsContainer},
+ components: {MsMainContainer, MsContainer},
mounted() {
- this.init();
+ let reportId = this.$route.path.split('/')[4];
+ console.log(reportId);
+ let items = localStorage.getItem("compareReportIds");
+ console.log(JSON.parse(items));
},
computed: {
isReadOnly() {
@@ -43,28 +30,11 @@ export default {
data() {
return {}
},
- methods: {
- init() {
- this.$refs.overviewCard.initTable();
- this.$refs.loadCard.initCard();
- this.$refs.responseTimeCard.initCard();
- }
- },
- watch: {
- '$route'(to) {
- if (to.name !== "ReportCompare") {
- return;
- }
+ methods: {}
- this.init();
- }
- }
}
diff --git a/frontend/src/business/components/performance/report/PerformanceReportView.vue b/frontend/src/business/components/performance/report/PerformanceReportView.vue
index d7934bc6b2..c496eb8646 100644
--- a/frontend/src/business/components/performance/report/PerformanceReportView.vue
+++ b/frontend/src/business/components/performance/report/PerformanceReportView.vue
@@ -332,8 +332,6 @@ 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
deleted file mode 100644
index 8cba2a523f..0000000000
--- a/frontend/src/business/components/performance/report/components/LoadCompareCard.vue
+++ /dev/null
@@ -1,182 +0,0 @@
-
-
-
- Load
-
-
-
-
-
-
-
-
-
-
diff --git a/frontend/src/business/components/performance/report/components/OverviewCompareCard.vue b/frontend/src/business/components/performance/report/components/OverviewCompareCard.vue
deleted file mode 100644
index 18298b9967..0000000000
--- a/frontend/src/business/components/performance/report/components/OverviewCompareCard.vue
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
- Overview
-
-
-
-
-
- {{ scope.row.createTime | timestampFormatDate }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/frontend/src/business/components/performance/report/components/ResponseTimeCompareCard.vue b/frontend/src/business/components/performance/report/components/ResponseTimeCompareCard.vue
deleted file mode 100644
index 1f48b5ea2c..0000000000
--- a/frontend/src/business/components/performance/report/components/ResponseTimeCompareCard.vue
+++ /dev/null
@@ -1,188 +0,0 @@
-
-
-
- Response Time
-
-
-
-
-
-
-
-
-
-
diff --git a/frontend/src/business/components/performance/report/components/SameTestReports.vue b/frontend/src/business/components/performance/report/components/SameTestReports.vue
index 216ab7d1da..6e203f66fb 100644
--- a/frontend/src/business/components/performance/report/components/SameTestReports.vue
+++ b/frontend/src/business/components/performance/report/components/SameTestReports.vue
@@ -5,23 +5,20 @@
:visible.sync="loadReportVisible">
-
- {{ scope.row.name }}
-
+ prop="name"
+ :label="$t('commons.name')"
+ show-overflow-tooltip>
+ prop="userName"
+ :label="$t('report.user_name')"
+ show-overflow-tooltip>
@@ -30,7 +27,7 @@
+ :label="$t('commons.create_time')">
{{ scope.row.createTime | timestampFormatDate }}
@@ -58,56 +55,46 @@ export default {
return {
loadReportVisible: false,
reportLoadingResult: {},
- tableData: [],
+ compareReports: [],
currentPage: 1,
pageSize: 10,
total: 0,
selectIds: new Set,
- report: {},
- compareReports: [],
}
},
methods: {
open(report) {
- this.report = report;
- this.getCompareReports(report);
-
- this.compareReports.push(report);
-
+ this.getCompareReports(report.testId);
this.loadReportVisible = true;
},
close() {
this.loadReportVisible = false;
},
- getCompareReports(report) {
+ getCompareReports(testId) {
let condition = {
- testId: report.testId,
+ testId: testId,
filters: {status: ["Completed"]}
};
this.reportLoadingResult = this.$post('/performance/report/list/all/' + this.currentPage + "/" + this.pageSize, condition, res => {
let data = res.data;
this.total = data.itemCount;
- this.tableData = data.listObject;
+ this.compareReports = data.listObject;
})
},
handleCompare() {
let reportIds = [...this.selectIds];
- this.tableData
- .filter(r => reportIds.indexOf(r.id) > -1 && this.report.id !== r.id)
- .forEach(r => this.compareReports.push(r));
-
- localStorage.setItem("compareReports", JSON.stringify(this.compareReports));
+ localStorage.setItem("compareReportIds", JSON.stringify(reportIds));
this.close();
this.$router.push({path: '/performance/report/compare/' + reportIds[0]});
},
handleSelectAll(selection) {
if (selection.length > 0) {
- this.tableData.forEach(item => {
+ this.compareReports.forEach(item => {
this.selectIds.add(item.id);
});
} else {
- this.tableData.forEach(item => {
+ this.compareReports.forEach(item => {
if (this.selectIds.has(item.id)) {
this.selectIds.delete(item.id);
}