refactor(性能测试): 报告对比

This commit is contained in:
Captain.B 2021-03-22 09:34:23 +08:00
parent 772454df43
commit c054c13a06
5 changed files with 67 additions and 11 deletions

View File

@ -0,0 +1,39 @@
<template>
<ms-container>
<ms-main-container>
sss
</ms-main-container>
</ms-container>
</template>
<script>
import MsContainer from "@/business/components/common/components/MsContainer";
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
import {checkoutTestManagerOrTestUser} from "@/common/js/utils";
export default {
name: "PerformanceReportCompare",
components: {MsMainContainer, MsContainer},
mounted() {
console.log(111);
},
computed: {
queryDataType: function () {
let reportIds = this.$route.params.reportIds;
return reportIds;
},
isReadOnly() {
return !checkoutTestManagerOrTestUser();
}
},
data() {
return {}
},
methods: {}
}
</script>
<style scoped>
</style>

View File

@ -82,7 +82,7 @@
</div>
</el-dialog>
</ms-main-container>
<compare-reports ref="compareReports"/>
<same-test-reports ref="compareReports"/>
</ms-container>
</template>
@ -99,13 +99,13 @@ import {checkoutTestManagerOrTestUser, exportPdf} from "@/common/js/utils";
import html2canvas from 'html2canvas';
import MsPerformanceReportExport from "./PerformanceReportExport";
import {Message} from "element-ui";
import CompareReports from "@/business/components/performance/report/components/CompareReports";
import SameTestReports from "@/business/components/performance/report/components/SameTestReports";
export default {
name: "PerformanceReportView",
components: {
CompareReports,
SameTestReports,
MsPerformanceReportExport,
MsReportErrorLog,
MsReportLogDetails,

View File

@ -82,7 +82,7 @@
:total="total"/>
</el-card>
</ms-main-container>
<compare-reports ref="compareReports"/>
<same-test-reports ref="compareReports"/>
</ms-container>
</template>
@ -100,12 +100,12 @@ import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/L
import ShowMoreBtn from "../../track/case/components/ShowMoreBtn";
import {_filter, _sort} from "@/common/js/tableUtils";
import MsDialogFooter from "@/business/components/common/components/MsDialogFooter";
import CompareReports from "@/business/components/performance/report/components/CompareReports";
import SameTestReports from "@/business/components/performance/report/components/SameTestReports";
export default {
name: "PerformanceTestReportList",
components: {
CompareReports,
SameTestReports,
MsDialogFooter,
MsTableHeader,
ReportTriggerModeItem,

View File

@ -1,7 +1,7 @@
<template>
<el-dialog :close-on-click-modal="false"
:destroy-on-close="true"
:title="$t('已完成的测试报告')" width="50%"
:title="$t('已完成的测试报告')" width="60%"
:visible.sync="loadReportVisible">
<el-table v-loading="reportLoadingResult.loading"
class="basic-config"
@ -20,6 +20,12 @@
:label="$t('report.user_name')"
show-overflow-tooltip>
</el-table-column>
<el-table-column prop="triggerMode"
:label="$t('test_track.report.list.trigger_mode')">
<template v-slot:default="scope">
<report-trigger-mode-item :trigger-mode="scope.row.triggerMode"/>
</template>
</el-table-column>
<el-table-column
:label="$t('commons.create_time')">
<template v-slot:default="scope">
@ -40,10 +46,12 @@
<script>
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: "CompareReports",
components: {MsDialogFooter, MsTablePagination},
name: "SameTestReports",
components: {ReportTriggerModeItem, MsDialogFooter, MsTablePagination},
data() {
return {
loadReportVisible: false,
@ -76,7 +84,10 @@ export default {
})
},
handleCompare() {
console.log(111);
console.log(123);
let reportIds = [...this.selectIds];
let uuid = getUUID();
this.$router.push({path: '/performance/report/compare', params: {redirectID: uuid, reportIds: reportIds}});
},
handleSelectAll(selection) {
if (selection.length > 0) {

View File

@ -7,6 +7,7 @@ const PerformanceTestList = () => import('@/business/components/performance/test
const PerformanceTestReportList = () => import('@/business/components/performance/report/PerformanceTestReportList')
const PerformanceChart = () => import('@/business/components/performance/report/components/PerformanceChart')
const PerformanceReportView = () => import('@/business/components/performance/report/PerformanceReportView')
const PerformanceReportCompare = () => import('@/business/components/performance/report/PerformanceReportCompare')
export default {
path: "/performance",
@ -62,6 +63,11 @@ export default {
path: "report/view/:reportId",
name: "perReportView",
component: PerformanceReportView
}
},
{
path: "report/compare",
name: "ReportCompare",
component: PerformanceReportCompare,
},
]
}