From 8b9b259853c63956bbda3f177533cf401af0693d Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Mon, 15 Mar 2021 16:01:09 +0800 Subject: [PATCH 01/18] =?UTF-8?q?feat(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95?= =?UTF-8?q?):=20=E6=8A=A5=E5=91=8A=E5=AF=B9=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ceTestReport.vue => PerformanceTestReportList.vue} | 11 ++++++++--- .../src/business/components/performance/router.js | 4 ++-- frontend/src/i18n/en-US.js | 3 +++ frontend/src/i18n/zh-CN.js | 3 +++ frontend/src/i18n/zh-TW.js | 3 +++ 5 files changed, 19 insertions(+), 5 deletions(-) rename frontend/src/business/components/performance/report/{PerformanceTestReport.vue => PerformanceTestReportList.vue} (95%) diff --git a/frontend/src/business/components/performance/report/PerformanceTestReport.vue b/frontend/src/business/components/performance/report/PerformanceTestReportList.vue similarity index 95% rename from frontend/src/business/components/performance/report/PerformanceTestReport.vue rename to frontend/src/business/components/performance/report/PerformanceTestReportList.vue index 8e46a0708d..ae9fa486ef 100644 --- a/frontend/src/business/components/performance/report/PerformanceTestReport.vue +++ b/frontend/src/business/components/performance/report/PerformanceTestReportList.vue @@ -55,7 +55,7 @@ {{ scope.row.createTime | timestampFormatDate }} - @@ -99,11 +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"; export default { name: "PerformanceReportView", components: { + CompareReports, MsPerformanceReportExport, MsReportErrorLog, MsReportLogDetails, @@ -312,6 +314,9 @@ export default { Message.error({message: JSON.parse(data).message || e.message, showClose: true}); }); }); + }, + compareReports() { + this.$refs.compareReports.open(this.report); } }, created() { diff --git a/frontend/src/business/components/performance/report/PerformanceTestReportList.vue b/frontend/src/business/components/performance/report/PerformanceTestReportList.vue index 934030190d..a1b1b2a038 100644 --- a/frontend/src/business/components/performance/report/PerformanceTestReportList.vue +++ b/frontend/src/business/components/performance/report/PerformanceTestReportList.vue @@ -25,31 +25,26 @@ @@ -103,11 +99,14 @@ import MsTableHeader from "../../common/components/MsTableHeader"; import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent"; 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"; export default { name: "PerformanceTestReportList", components: { + CompareReports, + MsDialogFooter, MsTableHeader, ReportTriggerModeItem, MsTableOperatorButton, @@ -203,7 +202,7 @@ export default { }); }, handleDiff(report) { - console.log("aaa"); + this.$refs.compareReports.open(report); }, _handleDeleteNoMsg(report) { this.result = this.$post(this.deletePath + report.id, {}, () => { diff --git a/frontend/src/business/components/performance/report/components/CompareReports.vue b/frontend/src/business/components/performance/report/components/CompareReports.vue new file mode 100644 index 0000000000..1dbf7e9724 --- /dev/null +++ b/frontend/src/business/components/performance/report/components/CompareReports.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index c2fa1d548d..b260734629 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -433,7 +433,7 @@ export default { export: '导出', export_to_ms_format: '导出 Metersphere 格式', export_to_swagger3_format: '导出 Swagger3.0 格式', - compare: '比较', + compare: '报告对比', generation_error: '报告生成错误, 无法查看, 请检查日志详情!', being_generated: '报告正在生成中...', delete_confirm: '确认删除报告: ', diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 2c521f51a2..05378aaf2b 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -433,7 +433,7 @@ export default { export: '導出', export_to_ms_format: '導出 Metersphere 格式', export_to_swagger3_format: '導出 Swagger3.0 格式', - compare: '比較', + compare: '報告比較', generation_error: '報告生成錯誤, 無法查看, 請檢查日誌詳情!', being_generated: '報告正在生成中...', delete_confirm: '確認刪除報告: ', From c054c13a0639dd1827c23a547161e88aa761785b Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Mon, 22 Mar 2021 09:34:23 +0800 Subject: [PATCH 03/18] =?UTF-8?q?refactor(=E6=80=A7=E8=83=BD=E6=B5=8B?= =?UTF-8?q?=E8=AF=95):=20=E6=8A=A5=E5=91=8A=E5=AF=B9=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/PerformanceReportCompare.vue | 39 +++++++++++++++++++ .../report/PerformanceReportView.vue | 6 +-- .../report/PerformanceTestReportList.vue | 6 +-- ...CompareReports.vue => SameTestReports.vue} | 19 +++++++-- .../business/components/performance/router.js | 8 +++- 5 files changed, 67 insertions(+), 11 deletions(-) create mode 100644 frontend/src/business/components/performance/report/PerformanceReportCompare.vue rename frontend/src/business/components/performance/report/components/{CompareReports.vue => SameTestReports.vue} (78%) diff --git a/frontend/src/business/components/performance/report/PerformanceReportCompare.vue b/frontend/src/business/components/performance/report/PerformanceReportCompare.vue new file mode 100644 index 0000000000..19ea78d52e --- /dev/null +++ b/frontend/src/business/components/performance/report/PerformanceReportCompare.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/frontend/src/business/components/performance/report/PerformanceReportView.vue b/frontend/src/business/components/performance/report/PerformanceReportView.vue index 0b4d28f1a0..c496eb8646 100644 --- a/frontend/src/business/components/performance/report/PerformanceReportView.vue +++ b/frontend/src/business/components/performance/report/PerformanceReportView.vue @@ -82,7 +82,7 @@ - + @@ -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, diff --git a/frontend/src/business/components/performance/report/PerformanceTestReportList.vue b/frontend/src/business/components/performance/report/PerformanceTestReportList.vue index a1b1b2a038..d8440fea96 100644 --- a/frontend/src/business/components/performance/report/PerformanceTestReportList.vue +++ b/frontend/src/business/components/performance/report/PerformanceTestReportList.vue @@ -82,7 +82,7 @@ :total="total"/> - + @@ -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, diff --git a/frontend/src/business/components/performance/report/components/CompareReports.vue b/frontend/src/business/components/performance/report/components/SameTestReports.vue similarity index 78% rename from frontend/src/business/components/performance/report/components/CompareReports.vue rename to frontend/src/business/components/performance/report/components/SameTestReports.vue index 1dbf7e9724..4e7164e494 100644 --- a/frontend/src/business/components/performance/report/components/CompareReports.vue +++ b/frontend/src/business/components/performance/report/components/SameTestReports.vue @@ -1,7 +1,7 @@