fix(测试计划): 修复测试计划报告明细tab

This commit is contained in:
xinxin.wu 2024-06-24 09:59:01 +08:00 committed by 刘瑞斌
parent 8b6c46cd1c
commit cbe159d1b7
1 changed files with 34 additions and 41 deletions

View File

@ -331,49 +331,42 @@
const apiCaseTotal = computed(() => getSummaryDetail(detail.value.apiCaseCount).caseTotal); const apiCaseTotal = computed(() => getSummaryDetail(detail.value.apiCaseCount).caseTotal);
const scenarioCaseTotal = computed(() => getSummaryDetail(detail.value.apiScenarioCount).caseTotal); const scenarioCaseTotal = computed(() => getSummaryDetail(detail.value.apiScenarioCount).caseTotal);
const getFunctionalTab = computed(() => { const featureCaseTab = [
return functionalCaseTotal.value
? [
{ {
value: 'featureCase', value: 'featureCase',
label: t('report.detail.featureCaseDetails'), label: t('report.detail.featureCaseDetails'),
}, },
] ];
: []; const scenarioCaseTab = [
});
const getApiTab = computed(() => {
return apiCaseTotal.value
? [
{
value: 'apiCase',
label: t('report.detail.apiCaseDetails'),
},
]
: [];
});
const getScenarioTab = computed(() => {
return scenarioCaseTotal.value
? [
{ {
value: 'scenarioCase', value: 'scenarioCase',
label: t('report.detail.scenarioCaseDetails'), label: t('report.detail.scenarioCaseDetails'),
}, },
] ];
: []; const apiCaseTab = [
}); {
value: 'apiCase',
label: t('report.detail.apiCaseDetails'),
},
];
const activeTab = ref('bug'); const activeTab = ref('bug');
const contentTabList = ref([
const contentTabList = computed(() => {
const featureTab = functionalCaseTotal.value ? featureCaseTab : [];
const apiTab = apiCaseTotal.value ? apiCaseTab : [];
const scenarioTab = scenarioCaseTotal.value ? scenarioCaseTab : [];
return [
{ {
value: 'bug', value: 'bug',
label: t('report.detail.bugDetails'), label: t('report.detail.bugDetails'),
}, },
...getFunctionalTab.value, ...featureTab,
...getApiTab.value, ...apiTab,
...getScenarioTab.value, ...scenarioTab,
]); ];
});
const cardCount = computed(() => { const cardCount = computed(() => {
const totalList = [functionalCaseTotal.value, apiCaseTotal.value, scenarioCaseTotal.value]; const totalList = [functionalCaseTotal.value, apiCaseTotal.value, scenarioCaseTotal.value];