fix(测试计划): 修复测试计划详情缺陷列表展示问题&任务中心接口报错缺陷

This commit is contained in:
xinxin.wu 2024-09-14 18:09:03 +08:00 committed by Craftsman
parent e62c052c72
commit ac0c517051
7 changed files with 29 additions and 15 deletions

View File

@ -1,5 +1,5 @@
<template>
<a-popover position="br" content-class="case-count-popover">
<a-popover position="br" content-class="bug-count-popover">
<div class="one-line-text cursor-pointer px-0 text-[rgb(var(--primary-5))]">{{ props.bugCount ?? 0 }}</div>
<template #content>
<div class="w-[500px]">
@ -76,9 +76,8 @@
columns: columns.value,
size: 'mini',
tableKey: TableKeyEnum.TEST_PLAN_DETAIL_CASE_TABLE_BUG_COUNT,
scroll: { x: '100%' },
scroll: { x: '100%', y: 400 },
showSelectorAll: false,
heightUsed: 340,
showPagination: false,
});
const { propsRes, propsEvent, setLoading } = useTable(undefined, tableProps.value);
@ -108,3 +107,15 @@
}
}
</script>
<style scoped lang="less">
.bug-count-popover {
width: 540px;
height: 500px;
@apply overflow-y-auto overflow-x-hidden;
.ms-scroll-bar();
.arco-popover-content {
@apply h-full;
}
}
</style>

View File

@ -957,7 +957,6 @@ export function customFieldDataToTableData(customFieldData: Record<string, any>[
if (!customFieldData || !customFields) return {};
const tableData: Record<string, any> = {};
customFieldData.forEach((field) => {
const customField = customFields.find((item) => item.fieldId === field.id);
if (!customField) return;

View File

@ -183,6 +183,9 @@
const shareTime = ref<string>('');
async function getTime() {
if (!appStore.currentProjectId) {
return;
}
try {
const res = await getShareTime(appStore.currentProjectId);
const match = res.match(/^(\d+)([MYHD])$/);

View File

@ -91,7 +91,7 @@
<div class="diff-item">
<div class="flex">
<a-tooltip
:content="`【${apiDetailInfo?.num}】${apiDetailInfo?.name}`"
:content="`[${apiDetailInfo?.num}]${apiDetailInfo?.name}`"
:mouse-enter-delay="300"
position="br"
>
@ -108,11 +108,7 @@
</div>
<div class="diff-item">
<div class="flex">
<a-tooltip
:content="`【${caseDetail?.num}】${caseDetail?.name}`"
:mouse-enter-delay="300"
position="br"
>
<a-tooltip :content="`[${caseDetail?.num}] ${caseDetail?.name}`" :mouse-enter-delay="300" position="br">
<div class="title-type one-line-text"> [{{ caseDetail?.num }}] {{ caseDetail?.name }} </div>
</a-tooltip>
</div>

View File

@ -171,9 +171,14 @@
await getTemplateOptions();
};
onBeforeMount(() => {
watch(
() => showBugDrawer.value,
(val) => {
if (val) {
initDefaultFields();
});
}
}
);
</script>
<style scoped></style>

View File

@ -472,7 +472,7 @@
routeQuery.value = { id };
if (type === 'FUNCTIONAL_CASE') {
routerName = CaseManagementRouteEnum.CASE_MANAGEMENT_CASE_DETAIL;
routerName = CaseManagementRouteEnum.CASE_MANAGEMENT_CASE;
} else if (type === 'BUG') {
routerName = BugManagementRouteEnum.BUG_MANAGEMENT;
} else if (type === 'API_DEBUG') {

View File

@ -79,7 +79,7 @@
columns,
size: 'mini',
tableKey: TableKeyEnum.TEST_PLAN_DETAIL_BUG_TABLE_CASE_COUNT,
scroll: { x: '100%' },
scroll: { x: '100%', y: 400 },
showSelectorAll: false,
heightUsed: 340,
showPagination: false,