mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-01 19:49:10 +08:00
style(测试跟踪): 修复测试计划相关页面的前台展示
--bug=1025862 --user=宋天阳 【测试跟踪】报告-创建时间默认显示不全 https://www.tapd.cn/55049933/s/1367636;--bug=1025866 --user=宋天阳 【我的工作台】我的仪表盘-我的待办-功能用例数统计错误 https://www.tapd.cn/55049933/s/1367691;--bug=1025876 --user=宋天阳 【测试跟踪】github#24029,测试计划关联场景时,创建人展示的是用户id,不是名称,不好区分创建人 https://www.tapd.cn/55049933/s/1367708
This commit is contained in:
parent
e857b30222
commit
d80975d853
@ -359,9 +359,7 @@ public class EnterpriseTestReportService {
|
||||
|
||||
private String genReportContent(EnterpriseTestReportWithBLOBs report, boolean isSchedule) {
|
||||
StringBuilder reportContent = new StringBuilder();
|
||||
UserDTO user = baseUserService.getUserDTO(report.getCreateUser());
|
||||
List<EnterpriseReportContentStep> stepList = JSONUtil.parseArray(report.getReportContent(), EnterpriseReportContentStep.class);
|
||||
Map<String, String> syncReportMap = this.getSyncReportMap(stepList, user, isSchedule);
|
||||
for (EnterpriseReportContentStep step : stepList) {
|
||||
String title = EmailPageInfoUtil.generateEmailStepTitle(step.getName());
|
||||
reportContent.append(title);
|
||||
@ -374,16 +372,6 @@ public class EnterpriseTestReportService {
|
||||
}
|
||||
reportContent.append(previweContent);
|
||||
} else if (isReportStep(step.getType())) {
|
||||
if (isSchedule && syncReportMap.containsKey(step.getReportRecordId())) {
|
||||
//定时任务触发的数据,需要检查图片是否需要重新生成。如果生成失败,syncReportMap里有对应的步骤id,但是没有图片数据
|
||||
String imageFile = syncReportMap.get(step.getReportRecordId());
|
||||
if (StringUtils.isNotEmpty(imageFile)) {
|
||||
step.setRecordImageContent(imageFile);
|
||||
} else {
|
||||
step.setRecordImageContent(null);
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(step.getRecordImageContent())) {
|
||||
reportContent.append(EmailPageInfoUtil.generatePicInfo(step.getReportRecordId(), step.getRecordImageContent()));
|
||||
}
|
||||
|
@ -118,7 +118,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="userId"
|
||||
prop="userName"
|
||||
:label="$t('api_test.automation.creator')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<ms-table
|
||||
v-loading="loading"
|
||||
operator-width="220px"
|
||||
operator-width="110px"
|
||||
row-key="id"
|
||||
:data="tableData"
|
||||
:condition="condition"
|
||||
@ -62,7 +62,7 @@
|
||||
:field="item"
|
||||
:fields-width="fieldsWidth"
|
||||
sortable="custom"
|
||||
min-width="120"
|
||||
min-width="180"
|
||||
:label="$t('test_track.report.list.create_time')"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
@ -174,10 +174,10 @@ import ReportTriggerModeItem from "metersphere-frontend/src/components/tableItem
|
||||
import MsTag from "metersphere-frontend/src/components/MsTag";
|
||||
import ShowMoreBtn from "metersphere-frontend/src/components/table/ShowMoreBtn";
|
||||
import {
|
||||
getCustomTableHeader,
|
||||
getCustomTableWidth,
|
||||
getLastTableSortField,
|
||||
initCondition,
|
||||
getCustomTableWidth,
|
||||
getCustomTableHeader,
|
||||
} from "metersphere-frontend/src/utils/tableUtils";
|
||||
import MsTableHeaderSelectPopover from "metersphere-frontend/src/components/table/MsTableHeaderSelectPopover";
|
||||
import { getCurrentProjectID } from "metersphere-frontend/src/utils/token";
|
||||
@ -330,6 +330,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
this.condition.projectId = getCurrentProjectID();
|
||||
this.formatCondition();
|
||||
this.loading = true;
|
||||
testPlanReportList(
|
||||
{ pageNum: this.currentPage, pageSize: this.pageSize },
|
||||
@ -404,6 +405,24 @@ export default {
|
||||
this.$refs.renameDialog.close();
|
||||
});
|
||||
},
|
||||
formatCondition() {
|
||||
if (
|
||||
this.condition &&
|
||||
this.condition.combine &&
|
||||
this.condition.combine.status &&
|
||||
this.condition.combine.status.value
|
||||
) {
|
||||
let formatValueArr = [];
|
||||
this.condition.combine.status.value.forEach((item) => {
|
||||
if (item === "Underway") {
|
||||
formatValueArr.push("RUNNING");
|
||||
} else {
|
||||
formatValueArr.push(item);
|
||||
}
|
||||
});
|
||||
this.condition.combine.status.value = formatValueArr;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user