fix(用例管理): 用例变更历史问题修复
--bug=1036033 --user=王旭 【用例管理】功能用例,修改用例后,用例详情里的变更历史不显示修改记录 https://www.tapd.cn/55049933/s/1465021
This commit is contained in:
parent
0fd92306a4
commit
7f4da59afe
|
@ -7,9 +7,15 @@ import jakarta.validation.constraints.Size;
|
|||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class OperationHistoryRequest extends BasePageRequest {
|
||||
public class OperationHistoryRequest extends BasePageRequest implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{operation_history.project_id.not_blank}")
|
||||
|
@ -24,10 +30,10 @@ public class OperationHistoryRequest extends BasePageRequest {
|
|||
private String createUser;
|
||||
|
||||
@Schema(description = "操作类型")
|
||||
private String type;
|
||||
private List<String> types;
|
||||
|
||||
@Schema(description = "操作模块")
|
||||
private String module;
|
||||
private List<String> modules;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -56,11 +56,17 @@
|
|||
<if test="request.createUser != null and request.createUser != ''">
|
||||
AND operation_history.create_user = #{request.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="request.type != null and request.type != ''">
|
||||
AND operation_history.`type` = #{request.type,jdbcType=VARCHAR}
|
||||
<if test="request.types != null and request.types.size() > 0">
|
||||
AND operation_history.`type` in
|
||||
<foreach collection="request.types" item="type" open="(" close=")" separator=",">
|
||||
#{type}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.module != null and request.module != ''">
|
||||
AND operation_history.`module` = #{request.module,jdbcType=VARCHAR}
|
||||
<if test="request.modules != null and request.modules.size() > 0">
|
||||
AND operation_history.`module` in
|
||||
<foreach collection="request.modules" item="module" open="(" close=")" separator=",">
|
||||
#{module}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
<template #name="{ record }">
|
||||
<a-button type="text" class="px-0">{{ record.name }}</a-button>
|
||||
</template>
|
||||
<template #type> </template>
|
||||
<template #type="{ record }">
|
||||
{{ t(typeOptions.find((e) => e.value === record.type)?.label || '') }}
|
||||
</template>
|
||||
<template #operation="{ record }">
|
||||
<!-- TODO 这一版本不上 -->
|
||||
<!-- <MsRemoveButton
|
||||
|
@ -28,6 +30,7 @@
|
|||
/> -->
|
||||
<MsButton @click="saveAsHandler(record)">{{ t('caseManagement.featureCase.saveAsVersion') }}</MsButton>
|
||||
</template>
|
||||
|
||||
</ms-base-table>
|
||||
<a-modal
|
||||
v-model:visible="showModal"
|
||||
|
@ -122,8 +125,8 @@
|
|||
},
|
||||
{
|
||||
title: 'caseManagement.featureCase.tableColumnUpdateTime',
|
||||
slotName: 'updateTime',
|
||||
dataIndex: 'updateTime',
|
||||
slotName: 'createTime',
|
||||
dataIndex: 'createTime',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
|
@ -137,6 +140,21 @@
|
|||
},
|
||||
];
|
||||
|
||||
const typeOptions = [
|
||||
{
|
||||
label: 'system.log.operateType.add',
|
||||
value: 'ADD',
|
||||
},
|
||||
{
|
||||
label: 'system.log.operateType.update',
|
||||
value: 'UPDATE',
|
||||
},
|
||||
{
|
||||
label: 'system.log.operateType.import',
|
||||
value: 'IMPORT',
|
||||
},
|
||||
];
|
||||
|
||||
const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector } = useTable(getChangeHistoryList, {
|
||||
columns,
|
||||
tableKey: TableKeyEnum.CASE_MANAGEMENT_TAB_CHANGE_HISTORY,
|
||||
|
@ -222,7 +240,8 @@
|
|||
setLoadListParams({
|
||||
projectId: appStore.currentProjectId,
|
||||
sourceId: props.caseId,
|
||||
module: 'FUNCTIONAL_CASE',
|
||||
type:['IMPORT','ADD','UPDATE'],
|
||||
module: ['CASE_MANAGEMENT_CASE_CREATE','CASE_MANAGEMENT_CASE_UPDATE'],
|
||||
});
|
||||
await loadList();
|
||||
featureCaseStore.getCaseCounts(props.caseId);
|
||||
|
|
Loading…
Reference in New Issue