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