fix(测试计划): 测试计划详情-接口用例规划视图要显示协议筛选

--bug=1042909 --user=吕梦园
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001042909
This commit is contained in:
teukkk 2024-06-24 10:33:38 +08:00 committed by Craftsman
parent cbe159d1b7
commit 02ca9cf611
4 changed files with 2 additions and 16 deletions

View File

@ -166,10 +166,6 @@
selectedProtocols.value = allProtocolList.value.filter((item) => protocols.includes(item as string));
}
});
defineExpose({
allProtocolList,
});
</script>
<style lang="less" scoped>

View File

@ -154,7 +154,6 @@
moduleTree: ModuleTreeNode[];
canEdit: boolean;
selectedProtocols: string[];
allProtocolList: string[];
treeType: 'MODULE' | 'COLLECTION';
}>();
@ -360,9 +359,8 @@
const selectModules = await getModuleIds();
const commonParams = {
testPlanId: props.planId,
...(props.treeType === 'COLLECTION'
? { protocols: props.allProtocolList, collectionId: collectionId.value }
: { protocols: props.selectedProtocols, moduleIds: selectModules }),
protocols: props.selectedProtocols,
...(props.treeType === 'COLLECTION' ? { collectionId: collectionId.value } : { moduleIds: selectModules }),
};
if (isBatch) {
return {

View File

@ -12,10 +12,8 @@
:max-length="255"
/>
<TreeFolderAll
ref="treeFolderAllRef"
v-model:isExpandAll="isExpandAll"
v-model:selectedProtocols="selectedProtocols"
:not-show-operation="props.treeType === 'COLLECTION'"
:active-folder="activeFolder"
:folder-name="t('testPlan.testPlanIndex.apiCase')"
:all-count="allCount"
@ -92,8 +90,6 @@
buffer: 15, // 10 padding
};
});
const treeFolderAllRef = ref<InstanceType<typeof TreeFolderAll>>();
const allProtocolList = computed(() => treeFolderAllRef.value?.allProtocolList);
const activeFolder = ref<string>('all');
const allCount = ref(0);
@ -180,6 +176,5 @@
defineExpose({
initModules,
setActiveFolder,
allProtocolList,
});
</script>

View File

@ -24,7 +24,6 @@
:module-tree="moduleTree"
:can-edit="props.canEdit"
:selected-protocols="selectedProtocols"
:all-protocol-list="allProtocolList"
@get-module-count="getModuleCount"
@refresh="emit('refresh')"
@init-modules="initModules"
@ -110,8 +109,6 @@
});
}
const allProtocolList = computed(() => caseTreeRef.value?.allProtocolList ?? []);
defineExpose({
getCaseTableList,
});