From 271b375b437e6dd1c8691a0f5418a5910e6bd4b5 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Thu, 20 Oct 2022 11:15:19 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E6=8A=A5=E5=91=8A):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE=E6=8A=A5=E5=91=8A=E5=8F=91?= =?UTF-8?q?=E9=80=81=E9=82=AE=E4=BB=B6=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1018499 --user=宋天阳 【报表管理】发送报告提示异常 https://www.tapd.cn/55049933/s/1269178 --- .../dto/EnterpriseReportContentStep.java | 4 +- .../service/EnterpriseTestReportService.java | 6 +- .../src/business/compnent/form/MsInputTag.vue | 6 +- .../components/chart/ReportChart.vue | 8 +- .../components/chart/ReportTable.vue | 146 +++++++++--------- .../components/container/EmailComponent.vue | 2 +- .../components/container/ReportPic.vue | 4 +- .../dialog/ProjectReportEditDialog.vue | 18 +-- .../casecount/TestCaseCountContainer.vue | 2 +- .../casecount/chart/TestCaseCountChart.vue | 8 +- .../casecount/table/TestCaseCountTable.vue | 146 +++++++++--------- 11 files changed, 175 insertions(+), 175 deletions(-) diff --git a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/dto/EnterpriseReportContentStep.java b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/dto/EnterpriseReportContentStep.java index d9917a643b..1afe7b12f3 100644 --- a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/dto/EnterpriseReportContentStep.java +++ b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/dto/EnterpriseReportContentStep.java @@ -11,10 +11,8 @@ public class EnterpriseReportContentStep implements Serializable { private String type; //type为report private String reportRecordId; - // @JsonProperty("reportRecordData") - private Map reportRecordData; + private Map reportRecordData; private String recordImageContent; - // @JsonProperty("tableData") private Map tableData; //type为txt private String previewContext; diff --git a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/EnterpriseTestReportService.java b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/EnterpriseTestReportService.java index b3f36b6ab8..ca27be053c 100644 --- a/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/EnterpriseTestReportService.java +++ b/report-stat/backend/src/main/java/io/metersphere/reportstatistics/service/EnterpriseTestReportService.java @@ -3,8 +3,8 @@ package io.metersphere.reportstatistics.service; import io.metersphere.base.domain.*; import io.metersphere.base.mapper.EnterpriseTestReportMapper; import io.metersphere.base.mapper.EnterpriseTestReportSendRecordMapper; -import io.metersphere.base.mapper.ext.ExtEnterpriseTestReportMapper; import io.metersphere.base.mapper.ext.BaseUserGroupMapper; +import io.metersphere.base.mapper.ext.ExtEnterpriseTestReportMapper; import io.metersphere.commons.constants.ScheduleGroup; import io.metersphere.commons.constants.ScheduleStatus; import io.metersphere.commons.constants.ScheduleType; @@ -408,7 +408,8 @@ public class EnterpriseTestReportService { StringBuffer tableBuffer = new StringBuffer(); tableBuffer.append(""); try { - TestCaseCountTableDataDTO showTable = JSON.parseObject(step.getReportRecordData().get("showTable"), TestCaseCountTableDataDTO.class); + String showTableJsonStr = JSON.toJSONString(step.getReportRecordData().get("showTable")); + TestCaseCountTableDataDTO showTable = JSON.parseObject(showTableJsonStr, TestCaseCountTableDataDTO.class); tableBuffer.append(""); for (TestCaseCountTableItemDataDTO itemData : showTable.getHeads()) { String tableHeadValue = itemData.getValue(); @@ -454,6 +455,7 @@ public class EnterpriseTestReportService { } } catch (Exception e) { + LogUtil.error("解析表格数据出错!", e); } tableBuffer.append("
"); returnReportContentBuffer.append(tableBuffer); diff --git a/report-stat/frontend/src/business/compnent/form/MsInputTag.vue b/report-stat/frontend/src/business/compnent/form/MsInputTag.vue index 7fc44c4c03..4aa0f23a27 100644 --- a/report-stat/frontend/src/business/compnent/form/MsInputTag.vue +++ b/report-stat/frontend/src/business/compnent/form/MsInputTag.vue @@ -36,7 +36,7 @@ export default { placeholder: { type: String, }, - errorInfor: String, + errorInfo: String, addTagOnKeys: { type: Array, default: () => [13, 188, 9] @@ -119,8 +119,8 @@ export default { this.innerTags.push(tag) return true } else { - if (tag !== "" && this.errorInfor) { - this.$error(this.errorInfor); + if (tag !== "" && this.errorInfo) { + this.$error(this.errorInfo); } } return false diff --git a/report-stat/frontend/src/business/enterprisereport/components/chart/ReportChart.vue b/report-stat/frontend/src/business/enterprisereport/components/chart/ReportChart.vue index 2de7f65880..7ee2db4dfd 100644 --- a/report-stat/frontend/src/business/enterprisereport/components/chart/ReportChart.vue +++ b/report-stat/frontend/src/business/enterprisereport/components/chart/ReportChart.vue @@ -245,16 +245,16 @@ export default { if (command === 'jpg') { imageType = 'image/jpg'; } - let returnImageDatas = ""; + let returnImageData = ""; if (document.getElementById(this.reportId)) { let chartsCanvas = document.getElementById(this.reportId).querySelectorAll('canvas')[0]; if (chartsCanvas) { // toDataURL()是canvas对象的一种方法,用于将canvas对象转换为base64位编码 - returnImageDatas = chartsCanvas && chartsCanvas.toDataURL(imageType); + returnImageData = chartsCanvas && chartsCanvas.toDataURL(imageType); } } - this.$emit("getImage", returnImageDatas); - return returnImageDatas; + this.$emit("getImage", returnImageData); + return returnImageData; }, exportCommand(command) { let fileName = 'report_pic.' + command; diff --git a/report-stat/frontend/src/business/enterprisereport/components/chart/ReportTable.vue b/report-stat/frontend/src/business/enterprisereport/components/chart/ReportTable.vue index ceb34878ff..c7c5c3d06a 100644 --- a/report-stat/frontend/src/business/enterprisereport/components/chart/ReportTable.vue +++ b/report-stat/frontend/src/business/enterprisereport/components/chart/ReportTable.vue @@ -2,7 +2,7 @@
-

{{$t('commons.report_statistics.excel')}}

+

{{ $t('commons.report_statistics.excel') }}

+ prop="testCaseCount" + :label="$t('api_test.home_page.failed_case_list.table_value.case_type.functional')" + v-if="isShowColumn('testCase')" + > + prop="apiCaseCount" + :label="$t('api_test.home_page.failed_case_list.table_value.case_type.api')" + v-if="isShowColumn('apiCase')" + > + prop="scenarioCaseCount" + :label="$t('api_test.home_page.failed_case_list.table_value.case_type.scene')" + v-if="isShowColumn('scenarioCase')" + > + prop="loadCaseCount" + :label="$t('api_test.home_page.failed_case_list.table_value.case_type.load')" + v-if="isShowColumn('loadCase')" + > @@ -51,72 +51,72 @@ diff --git a/report-stat/frontend/src/business/enterprisereport/components/container/EmailComponent.vue b/report-stat/frontend/src/business/enterprisereport/components/container/EmailComponent.vue index 8fb2994e2c..c094e07c57 100644 --- a/report-stat/frontend/src/business/enterprisereport/components/container/EmailComponent.vue +++ b/report-stat/frontend/src/business/enterprisereport/components/container/EmailComponent.vue @@ -32,7 +32,7 @@ export default { } }, methods: { - initDatas() { + initData() { if (this.$refs.reportItemPic && this.$refs.reportItemPic.length > 0) { this.$refs.reportItemPic.forEach(item => { item.initData(); diff --git a/report-stat/frontend/src/business/enterprisereport/components/container/ReportPic.vue b/report-stat/frontend/src/business/enterprisereport/components/container/ReportPic.vue index b191dd5e81..c3d10957fd 100644 --- a/report-stat/frontend/src/business/enterprisereport/components/container/ReportPic.vue +++ b/report-stat/frontend/src/business/enterprisereport/components/container/ReportPic.vue @@ -14,7 +14,7 @@ ref="analysisChart" :load-option="loadOption" :pie-option="pieOption"/>
-
@@ -71,7 +71,7 @@ export default { deleteDetail() { this.$emit("deleteDetail", this.reportDetail); }, - editAttachDataName(comman) { + editAttachDataName(common) { this.reportDetail.nameIsEdit = !this.reportDetail.nameIsEdit; }, initPic() { diff --git a/report-stat/frontend/src/business/enterprisereport/components/dialog/ProjectReportEditDialog.vue b/report-stat/frontend/src/business/enterprisereport/components/dialog/ProjectReportEditDialog.vue index 9a7aa376cb..1a45e050ef 100644 --- a/report-stat/frontend/src/business/enterprisereport/components/dialog/ProjectReportEditDialog.vue +++ b/report-stat/frontend/src/business/enterprisereport/components/dialog/ProjectReportEditDialog.vue @@ -29,7 +29,7 @@ :label-width="formLabelWidth" prop="addressee"> @@ -72,7 +72,7 @@ :label-width="formLabelWidth" prop="duplicated"> @@ -126,7 +126,7 @@ - +