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) {
|
private String genReportContent(EnterpriseTestReportWithBLOBs report, boolean isSchedule) {
|
||||||
StringBuilder reportContent = new StringBuilder();
|
StringBuilder reportContent = new StringBuilder();
|
||||||
UserDTO user = baseUserService.getUserDTO(report.getCreateUser());
|
|
||||||
List<EnterpriseReportContentStep> stepList = JSONUtil.parseArray(report.getReportContent(), EnterpriseReportContentStep.class);
|
List<EnterpriseReportContentStep> stepList = JSONUtil.parseArray(report.getReportContent(), EnterpriseReportContentStep.class);
|
||||||
Map<String, String> syncReportMap = this.getSyncReportMap(stepList, user, isSchedule);
|
|
||||||
for (EnterpriseReportContentStep step : stepList) {
|
for (EnterpriseReportContentStep step : stepList) {
|
||||||
String title = EmailPageInfoUtil.generateEmailStepTitle(step.getName());
|
String title = EmailPageInfoUtil.generateEmailStepTitle(step.getName());
|
||||||
reportContent.append(title);
|
reportContent.append(title);
|
||||||
|
@ -374,16 +372,6 @@ public class EnterpriseTestReportService {
|
||||||
}
|
}
|
||||||
reportContent.append(previweContent);
|
reportContent.append(previweContent);
|
||||||
} else if (isReportStep(step.getType())) {
|
} 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())) {
|
if (StringUtils.isNotEmpty(step.getRecordImageContent())) {
|
||||||
reportContent.append(EmailPageInfoUtil.generatePicInfo(step.getReportRecordId(), step.getRecordImageContent()));
|
reportContent.append(EmailPageInfoUtil.generatePicInfo(step.getReportRecordId(), step.getRecordImageContent()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="userId"
|
prop="userName"
|
||||||
:label="$t('api_test.automation.creator')"
|
:label="$t('api_test.automation.creator')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<ms-table
|
<ms-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
operator-width="220px"
|
operator-width="110px"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
:condition="condition"
|
:condition="condition"
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
:field="item"
|
:field="item"
|
||||||
:fields-width="fieldsWidth"
|
:fields-width="fieldsWidth"
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
min-width="120"
|
min-width="180"
|
||||||
:label="$t('test_track.report.list.create_time')"
|
:label="$t('test_track.report.list.create_time')"
|
||||||
:show-overflow-tooltip="true"
|
: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 MsTag from "metersphere-frontend/src/components/MsTag";
|
||||||
import ShowMoreBtn from "metersphere-frontend/src/components/table/ShowMoreBtn";
|
import ShowMoreBtn from "metersphere-frontend/src/components/table/ShowMoreBtn";
|
||||||
import {
|
import {
|
||||||
|
getCustomTableHeader,
|
||||||
|
getCustomTableWidth,
|
||||||
getLastTableSortField,
|
getLastTableSortField,
|
||||||
initCondition,
|
initCondition,
|
||||||
getCustomTableWidth,
|
|
||||||
getCustomTableHeader,
|
|
||||||
} from "metersphere-frontend/src/utils/tableUtils";
|
} from "metersphere-frontend/src/utils/tableUtils";
|
||||||
import MsTableHeaderSelectPopover from "metersphere-frontend/src/components/table/MsTableHeaderSelectPopover";
|
import MsTableHeaderSelectPopover from "metersphere-frontend/src/components/table/MsTableHeaderSelectPopover";
|
||||||
import { getCurrentProjectID } from "metersphere-frontend/src/utils/token";
|
import { getCurrentProjectID } from "metersphere-frontend/src/utils/token";
|
||||||
|
@ -330,6 +330,7 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.condition.projectId = getCurrentProjectID();
|
this.condition.projectId = getCurrentProjectID();
|
||||||
|
this.formatCondition();
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
testPlanReportList(
|
testPlanReportList(
|
||||||
{ pageNum: this.currentPage, pageSize: this.pageSize },
|
{ pageNum: this.currentPage, pageSize: this.pageSize },
|
||||||
|
@ -404,6 +405,24 @@ export default {
|
||||||
this.$refs.renameDialog.close();
|
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>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue