fix(测试计划): 修复执行历史文本格式可以查看步骤问题

--bug=1044969 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001044969
This commit is contained in:
guoyuqi 2024-08-12 17:52:19 +08:00 committed by Craftsman
parent a0a297f9eb
commit 9801f93f02
5 changed files with 7 additions and 6 deletions

View File

@ -26,5 +26,5 @@ public class TestPlanCaseExecHistoryResponse extends TestPlanCaseExecuteHistory
private String email; private String email;
@Schema(description = "步骤描述") @Schema(description = "步骤描述")
private boolean stepModule = false; private String caseEditType;
} }

View File

@ -25,11 +25,13 @@
tpceh.notifier as notifier, tpceh.notifier as notifier,
u.name AS userName, u.name AS userName,
ux.avatar AS userLogo, ux.avatar AS userLogo,
u.email AS email u.email AS email,
fc.case_edit_type as caseEditType
FROM FROM
test_plan_case_execute_history tpceh test_plan_case_execute_history tpceh
left JOIN user u ON tpceh.create_user = u.id left JOIN user u ON tpceh.create_user = u.id
left JOIN user_extend ux ON tpceh.create_user = ux.id left JOIN user_extend ux ON tpceh.create_user = ux.id
LEFT JOIN functional_case fc ON tpceh.case_id = fc.id
WHERE WHERE
tpceh.test_plan_case_id = #{request.id} tpceh.test_plan_case_id = #{request.id}
AND tpceh.deleted = FALSE AND tpceh.deleted = FALSE

View File

@ -705,7 +705,6 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService {
item.setContentText(new String(item.getContent(), StandardCharsets.UTF_8)); item.setContentText(new String(item.getContent(), StandardCharsets.UTF_8));
} }
if (item.getSteps() != null) { if (item.getSteps() != null) {
item.setStepModule(true);
item.setStepsExecResult(new String(item.getSteps(), StandardCharsets.UTF_8)); item.setStepsExecResult(new String(item.getSteps(), StandardCharsets.UTF_8));
} }
}); });

View File

@ -268,7 +268,7 @@ export interface ExecuteHistoryItem {
steps: string; steps: string;
createTime: string; createTime: string;
deleted: boolean; deleted: boolean;
stepModule: boolean; // 类型是:步骤描述 caseEditType: string; // 类型是:步骤描述
} }
export interface moduleForm { export interface moduleForm {

View File

@ -9,12 +9,12 @@
<div class="one-line-text max-w-[300px] font-medium text-[var(--color-text-1)]">{{ item.userName }}</div> <div class="one-line-text max-w-[300px] font-medium text-[var(--color-text-1)]">{{ item.userName }}</div>
</a-tooltip> </a-tooltip>
<a-divider <a-divider
v-if="props.showStepDetailTrigger && item.stepModule" v-if="props.showStepDetailTrigger && item.caseEditType == 'STEP'"
direction="vertical" direction="vertical"
margin="8px" margin="8px"
></a-divider> ></a-divider>
<a-trigger <a-trigger
v-if="props.showStepDetailTrigger && item.stepModule" v-if="props.showStepDetailTrigger && item.caseEditType == 'STEP'"
trigger="click" trigger="click"
position="bottom" position="bottom"
:popup-translate="[0, 4]" :popup-translate="[0, 4]"