fix(测试计划): 改变模块视图后切换到全部接口

This commit is contained in:
teukkk 2024-06-13 14:02:46 +08:00 committed by 刘瑞斌
parent 2a9d37ada5
commit 222f6e7d55
11 changed files with 28 additions and 14 deletions

View File

@ -177,6 +177,8 @@
} }
} }
onMounted(() => { onMounted(() => {
if (!props.doNotShowShare) {
getTime(); getTime();
}
}); });
</script> </script>

View File

@ -362,9 +362,8 @@
const commonParams = { const commonParams = {
testPlanId: props.planId, testPlanId: props.planId,
projectId: appStore.currentProjectId, projectId: appStore.currentProjectId,
moduleIds: selectModules,
protocols: props.selectedProtocols, protocols: props.selectedProtocols,
collectionId: collectionId.value, ...(props.treeType === 'COLLECTION' ? { collectionId: collectionId.value } : { moduleIds: selectModules }),
}; };
if (isBatch) { if (isBatch) {
return { return {

View File

@ -154,5 +154,6 @@
defineExpose({ defineExpose({
initModules, initModules,
setActiveFolder,
}); });
</script> </script>

View File

@ -98,7 +98,11 @@
function getCaseTableList() { function getCaseTableList() {
nextTick(() => { nextTick(() => {
initModules(); initModules();
if (activeFolderId.value !== 'all') {
caseTreeRef.value?.setActiveFolder('all');
} else {
caseTableRef.value?.loadCaseList(); caseTableRef.value?.loadCaseList();
}
}); });
} }

View File

@ -345,8 +345,7 @@
const commonParams = { const commonParams = {
testPlanId: props.planId, testPlanId: props.planId,
projectId: appStore.currentProjectId, projectId: appStore.currentProjectId,
moduleIds: selectModules, ...(props.treeType === 'COLLECTION' ? { collectionId: collectionId.value } : { moduleIds: selectModules }),
collectionId: collectionId.value,
}; };
if (isBatch) { if (isBatch) {
return { return {

View File

@ -157,6 +157,7 @@
); );
defineExpose({ defineExpose({
setActiveFolder,
initModules, initModules,
}); });
</script> </script>

View File

@ -92,7 +92,11 @@
function getCaseTableList() { function getCaseTableList() {
nextTick(() => { nextTick(() => {
initModules(); initModules();
if (activeFolderId.value !== 'all') {
caseTreeRef.value?.setActiveFolder('all');
} else {
caseTableRef.value?.loadCaseList(); caseTableRef.value?.loadCaseList();
}
}); });
} }

View File

@ -369,8 +369,7 @@
const commonParams = { const commonParams = {
testPlanId: props.planId, testPlanId: props.planId,
projectId: appStore.currentProjectId, projectId: appStore.currentProjectId,
moduleIds: selectModules, ...(props.treeType === 'COLLECTION' ? { collectionId: collectionId.value } : { moduleIds: selectModules }),
collectionId: collectionId.value,
}; };
if (isBatch) { if (isBatch) {
return { return {

View File

@ -164,6 +164,7 @@
); );
defineExpose({ defineExpose({
setActiveFolder,
initModules, initModules,
}); });
</script> </script>

View File

@ -94,7 +94,11 @@
function getCaseTableList() { function getCaseTableList() {
nextTick(() => { nextTick(() => {
initModules(); initModules();
if (activeFolderId.value !== 'all') {
caseTreeRef.value?.setActiveFolder('all');
} else {
caseTableRef.value?.loadCaseList(); caseTableRef.value?.loadCaseList();
}
}); });
} }

View File

@ -314,10 +314,6 @@
value: 'featureCase', value: 'featureCase',
label: t('menu.caseManagement.featureCase'), label: t('menu.caseManagement.featureCase'),
}, },
{
value: 'defectList',
label: t('caseManagement.featureCase.defectList'),
},
{ {
value: 'apiCase', value: 'apiCase',
label: t('testPlan.testPlanIndex.apiCase'), label: t('testPlan.testPlanIndex.apiCase'),
@ -326,6 +322,10 @@
value: 'apiScenario', value: 'apiScenario',
label: t('testPlan.testPlanIndex.apiScenarioCase'), label: t('testPlan.testPlanIndex.apiScenarioCase'),
}, },
{
value: 'defectList',
label: t('caseManagement.featureCase.defectList'),
},
{ {
value: 'executeHistory', value: 'executeHistory',
label: t('testPlan.featureCase.executionHistory'), label: t('testPlan.featureCase.executionHistory'),