fix(缺陷管理): 修复缺陷详情用例列表无法使用id搜索的缺陷,以及部分文案问题

--bug=1036879 --user=宋天阳 【缺陷管理】缺陷详情-用例-列表-未支持ID搜索 https://www.tapd.cn/55049933/s/1471704;--bug=1036878 --user=宋天阳 【缺陷管理】缺陷详情-用例-列表-文案修改 https://www.tapd.cn/55049933/s/1471633;--bug=1036875 --user=宋天阳 【缺陷管理】缺陷详情-用例-关联测试计划字段隐藏起来 https://www.tapd.cn/55049933/s/1471634;--bug=1036385 --user=宋天阳 【缺陷管理】缺陷详情-名称hover展示ID https://www.tapd.cn/55049933/s/1471719
This commit is contained in:
song-tianyang 2024-03-07 19:15:51 +08:00 committed by Craftsman
parent 6e8b1f2887
commit a0bcb9f31c
4 changed files with 19 additions and 17 deletions

View File

@ -49,7 +49,10 @@
from bug_relation_case brc join functional_case fc on (brc.case_id = fc.id or brc.test_plan_case_id = fc.id)
where brc.bug_id = #{request.bugId} and fc.deleted = false
<if test="request.keyword != null and request.keyword != ''">
and fc.name like concat('%', #{request.keyword}, '%')
and (
fc.name like concat('%', #{request.keyword}, '%')
or fc.num like concat('%', #{request.keyword}, '%')
)
</if>
</select>

View File

@ -10,7 +10,8 @@
>
<template #title>
<div class="flex flex-1 items-center">
<a-tooltip :content="props.title" position="bottom">
<!-- 如果设置了tooltipText则优先展示-->
<a-tooltip :content="props.tooltipText ? props.tooltipText : props.title" position="bottom">
<div class="one-line-text max-w-[300px]">
{{ props.title }}
</div>
@ -49,6 +50,7 @@
title: string;
width: number;
detailId: string; // id
tooltipText?: string; // tooltip
detailIndex: number; //
tableData: any[]; //
pagination: MsPaginationI; //

View File

@ -5,6 +5,7 @@
:width="1200"
:footer="false"
:title="t('bugManagement.detail.title', { id: detailInfo?.num, name: detailInfo?.title })"
:tooltip-text="(detailInfo && detailInfo.title) || null"
:detail-id="props.detailId"
:detail-index="props.detailIndex"
:get-detail-func="getBugDetail"

View File

@ -4,7 +4,7 @@
<a-button type="primary" @click="handleSelect">{{ t('caseManagement.featureCase.linkCase') }}</a-button>
<a-input-search
v-model:model-value="keyword"
:placeholder="t('caseManagement.featureCase.searchByNameAndId')"
:placeholder="t('caseManagement.featureCase.searchByIdAndName')"
allow-clear
class="mx-[8px] w-[240px]"
@search="searchCase"
@ -138,16 +138,6 @@
ellipsis: true,
showDrag: false,
},
{
title: 'bugManagement.detail.isPlanRelateCase',
titleSlotName: 'relatePlanTitle',
slotName: 'isRelatePlanCase',
showInTable: true,
showTooltip: true,
width: 300,
ellipsis: true,
showDrag: false,
},
{
title: 'bugManagement.project',
slotName: 'projectName',
@ -205,8 +195,8 @@
}
async function getFetch() {
setKeyword(keyword.value);
setLoadListParams({
keyword: keyword.value,
bugId: props.bugId,
});
await loadList();
@ -269,6 +259,9 @@
async function searchCase() {
setKeyword(keyword.value);
setLoadListParams({
bugId: props.bugId,
});
await loadList();
}
@ -277,9 +270,12 @@
getFetch();
});
watchEffect(() => {
getFetch();
});
watch(
() => props.bugId,
() => {
getFetch();
}
);
</script>
<style scoped></style>