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> <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> <div class="one-line-text cursor-pointer px-0 text-[rgb(var(--primary-5))]">{{ props.bugCount ?? 0 }}</div>
<template #content> <template #content>
<div class="w-[500px]"> <div class="w-[500px]">
@ -76,9 +76,8 @@
columns: columns.value, columns: columns.value,
size: 'mini', size: 'mini',
tableKey: TableKeyEnum.TEST_PLAN_DETAIL_CASE_TABLE_BUG_COUNT, tableKey: TableKeyEnum.TEST_PLAN_DETAIL_CASE_TABLE_BUG_COUNT,
scroll: { x: '100%' }, scroll: { x: '100%', y: 400 },
showSelectorAll: false, showSelectorAll: false,
heightUsed: 340,
showPagination: false, showPagination: false,
}); });
const { propsRes, propsEvent, setLoading } = useTable(undefined, tableProps.value); const { propsRes, propsEvent, setLoading } = useTable(undefined, tableProps.value);
@ -108,3 +107,15 @@
} }
} }
</script> </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 {}; if (!customFieldData || !customFields) return {};
const tableData: Record<string, any> = {}; const tableData: Record<string, any> = {};
customFieldData.forEach((field) => { customFieldData.forEach((field) => {
const customField = customFields.find((item) => item.fieldId === field.id); const customField = customFields.find((item) => item.fieldId === field.id);
if (!customField) return; if (!customField) return;

View File

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

View File

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

View File

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

View File

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

View File

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