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

View File

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

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog :close-on-click-modal="false" <el-dialog :close-on-click-modal="false"
:destroy-on-close="true" :destroy-on-close="true"
:title="$t('已完成的测试报告')" width="50%" :title="$t('已完成的测试报告')" width="60%"
:visible.sync="loadReportVisible"> :visible.sync="loadReportVisible">
<el-table v-loading="reportLoadingResult.loading" <el-table v-loading="reportLoadingResult.loading"
class="basic-config" class="basic-config"
@ -20,6 +20,12 @@
:label="$t('report.user_name')" :label="$t('report.user_name')"
show-overflow-tooltip> show-overflow-tooltip>
</el-table-column> </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 <el-table-column
:label="$t('commons.create_time')"> :label="$t('commons.create_time')">
<template v-slot:default="scope"> <template v-slot:default="scope">
@ -40,10 +46,12 @@
<script> <script>
import MsTablePagination from "@/business/components/common/pagination/TablePagination"; import MsTablePagination from "@/business/components/common/pagination/TablePagination";
import MsDialogFooter from "@/business/components/common/components/MsDialogFooter"; import MsDialogFooter from "@/business/components/common/components/MsDialogFooter";
import ReportTriggerModeItem from "@/business/components/common/tableItem/ReportTriggerModeItem";
import {getUUID} from "@/common/js/utils";
export default { export default {
name: "CompareReports", name: "SameTestReports",
components: {MsDialogFooter, MsTablePagination}, components: {ReportTriggerModeItem, MsDialogFooter, MsTablePagination},
data() { data() {
return { return {
loadReportVisible: false, loadReportVisible: false,
@ -76,7 +84,10 @@ export default {
}) })
}, },
handleCompare() { 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) { handleSelectAll(selection) {
if (selection.length > 0) { 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 PerformanceTestReportList = () => import('@/business/components/performance/report/PerformanceTestReportList')
const PerformanceChart = () => import('@/business/components/performance/report/components/PerformanceChart') const PerformanceChart = () => import('@/business/components/performance/report/components/PerformanceChart')
const PerformanceReportView = () => import('@/business/components/performance/report/PerformanceReportView') const PerformanceReportView = () => import('@/business/components/performance/report/PerformanceReportView')
const PerformanceReportCompare = () => import('@/business/components/performance/report/PerformanceReportCompare')
export default { export default {
path: "/performance", path: "/performance",
@ -62,6 +63,11 @@ export default {
path: "report/view/:reportId", path: "report/view/:reportId",
name: "perReportView", name: "perReportView",
component: PerformanceReportView component: PerformanceReportView
} },
{
path: "report/compare",
name: "ReportCompare",
component: PerformanceReportCompare,
},
] ]
} }