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',
{ label: t('report.detail.featureCaseDetails'),
value: 'featureCase', },
label: t('report.detail.featureCaseDetails'), ];
}, const scenarioCaseTab = [
] {
: []; value: 'scenarioCase',
}); label: t('report.detail.scenarioCaseDetails'),
},
const getApiTab = computed(() => { ];
return apiCaseTotal.value const apiCaseTab = [
? [ {
{ value: 'apiCase',
value: 'apiCase', label: t('report.detail.apiCaseDetails'),
label: t('report.detail.apiCaseDetails'), },
}, ];
]
: [];
});
const getScenarioTab = computed(() => {
return scenarioCaseTotal.value
? [
{
value: 'scenarioCase',
label: t('report.detail.scenarioCaseDetails'),
},
]
: [];
});
const activeTab = ref('bug'); const activeTab = ref('bug');
const contentTabList = ref([
{ const contentTabList = computed(() => {
value: 'bug', const featureTab = functionalCaseTotal.value ? featureCaseTab : [];
label: t('report.detail.bugDetails'), const apiTab = apiCaseTotal.value ? apiCaseTab : [];
}, const scenarioTab = scenarioCaseTotal.value ? scenarioCaseTab : [];
...getFunctionalTab.value,
...getApiTab.value, return [
...getScenarioTab.value, {
]); value: 'bug',
label: t('report.detail.bugDetails'),
},
...featureTab,
...apiTab,
...scenarioTab,
];
});
const cardCount = computed(() => { const cardCount = computed(() => {
const totalList = [functionalCaseTotal.value, apiCaseTotal.value, scenarioCaseTotal.value]; const totalList = [functionalCaseTotal.value, apiCaseTotal.value, scenarioCaseTotal.value];