diff --git a/performance-test/frontend/src/business/report/PerformanceReportExport.vue b/performance-test/frontend/src/business/report/PerformanceReportExport.vue
index fe76abcb25..63ac301e4b 100644
--- a/performance-test/frontend/src/business/report/PerformanceReportExport.vue
+++ b/performance-test/frontend/src/business/report/PerformanceReportExport.vue
@@ -26,6 +26,13 @@
+
+
+
+ {{ $t('report.test_error_log') }}
+
+
+
{{ $t('report.test_error_log') }}
@@ -52,11 +59,13 @@ import MsReportExportTemplate from "metersphere-frontend/src/components/report/M
import MsReportTestDetails from "./components/TestDetails";
import MonitorCard from "./components/MonitorCard";
import MsTag from "metersphere-frontend/src/components/MsTag";
+import SamplesTabs from "@/business/report/components/samples/SamplesTabs.vue";
export default {
name: "MsPerformanceReportExport",
components: {
+ SamplesTabs,
MonitorCard,
MsReportExportTemplate,
MsReportTitle,
@@ -66,7 +75,7 @@ export default {
MsReportTestOverview,
MsTag,
},
- props: ['report', 'title', 'projectEnvMap']
+ props: ['report', 'title', 'projectEnvMap', 'haveErrorSamples', 'errorSamples']
}
diff --git a/performance-test/frontend/src/business/report/PerformanceReportView.vue b/performance-test/frontend/src/business/report/PerformanceReportView.vue
index f4419775d4..dd6de1aa8c 100644
--- a/performance-test/frontend/src/business/report/PerformanceReportView.vue
+++ b/performance-test/frontend/src/business/report/PerformanceReportView.vue
@@ -124,6 +124,7 @@
@@ -389,6 +390,9 @@ export default {
this.$nextTick(function () {
setTimeout(() => {
let ids = ['testOverview', 'testDetails', 'requestStatistics', 'errorLog', 'monitorCard'];
+ if (this.haveErrorSamples) {
+ ids = ['testOverview', 'testDetails', 'requestStatistics', 'errorSamples', 'monitorCard'];
+ }
let promises = [];
ids.forEach(id => {
let promise = html2canvas(document.getElementById(id), {scale: 2});
diff --git a/performance-test/frontend/src/business/report/components/samples/SamplesDrawer.vue b/performance-test/frontend/src/business/report/components/samples/SamplesDrawer.vue
index 630bbe4e4c..dd5491b0e8 100644
--- a/performance-test/frontend/src/business/report/components/samples/SamplesDrawer.vue
+++ b/performance-test/frontend/src/business/report/components/samples/SamplesDrawer.vue
@@ -50,14 +50,18 @@ export default {
datetimeFormat,
handleClose(done) {
+ this.activeName = '1';
+ this.sampleRecord = [];
done();
},
openRecord(samples) {
this.sampleRecord = [];
- samples.forEach(sample => {
- this.sampleRecord.push(sample);
- });
- this.drawer = true;
+ this.$nextTick(() => {
+ samples.forEach(sample => {
+ this.sampleRecord.push(sample);
+ });
+ this.drawer = true;
+ })
},
},
}