fix(测试计划): 测试计划详情-修复规划视图下展开全部icon还显示的缺陷&查询测试集传全部协议
--bug=1042759 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001042759
This commit is contained in:
parent
1a22efd8f0
commit
0c9fbb643a
|
@ -166,6 +166,10 @@
|
|||
selectedProtocols.value = allProtocolList.value.filter((item) => protocols.includes(item as string));
|
||||
}
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
allProtocolList,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
|
@ -154,6 +154,7 @@
|
|||
moduleTree: ModuleTreeNode[];
|
||||
canEdit: boolean;
|
||||
selectedProtocols: string[];
|
||||
allProtocolList: string[];
|
||||
treeType: 'MODULE' | 'COLLECTION';
|
||||
}>();
|
||||
|
||||
|
@ -359,8 +360,9 @@
|
|||
const selectModules = await getModuleIds();
|
||||
const commonParams = {
|
||||
testPlanId: props.planId,
|
||||
protocols: props.selectedProtocols,
|
||||
...(props.treeType === 'COLLECTION' ? { collectionId: collectionId.value } : { moduleIds: selectModules }),
|
||||
...(props.treeType === 'COLLECTION'
|
||||
? { protocols: props.allProtocolList, collectionId: collectionId.value }
|
||||
: { protocols: props.selectedProtocols, moduleIds: selectModules }),
|
||||
};
|
||||
if (isBatch) {
|
||||
return {
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
:max-length="255"
|
||||
/>
|
||||
<TreeFolderAll
|
||||
ref="treeFolderAllRef"
|
||||
v-model:isExpandAll="isExpandAll"
|
||||
v-model:selectedProtocols="selectedProtocols"
|
||||
:not-show-operation="props.treeType === 'COLLECTION'"
|
||||
|
@ -91,10 +92,25 @@
|
|||
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);
|
||||
const isExpandAll = ref<boolean | undefined>(false);
|
||||
const isExpandAll = ref<boolean | undefined>(undefined);
|
||||
function setIsExpandAll() {
|
||||
if (props.treeType === 'COLLECTION') {
|
||||
isExpandAll.value = undefined;
|
||||
} else {
|
||||
isExpandAll.value = false;
|
||||
}
|
||||
}
|
||||
watch(
|
||||
() => props.treeType,
|
||||
() => {
|
||||
setIsExpandAll();
|
||||
}
|
||||
);
|
||||
|
||||
function setActiveFolder(id: string) {
|
||||
activeFolder.value = id;
|
||||
|
@ -157,8 +173,13 @@
|
|||
initModules();
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
setIsExpandAll();
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
initModules,
|
||||
setActiveFolder,
|
||||
allProtocolList,
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
:module-tree="moduleTree"
|
||||
:can-edit="props.canEdit"
|
||||
:selected-protocols="selectedProtocols"
|
||||
:all-protocol-list="allProtocolList"
|
||||
@get-module-count="getModuleCount"
|
||||
@refresh="emit('refresh')"
|
||||
@init-modules="initModules"
|
||||
|
@ -109,6 +110,8 @@
|
|||
});
|
||||
}
|
||||
|
||||
const allProtocolList = computed(() => caseTreeRef.value?.allProtocolList ?? []);
|
||||
|
||||
defineExpose({
|
||||
getCaseTableList,
|
||||
});
|
||||
|
|
|
@ -89,16 +89,18 @@
|
|||
|
||||
const activeFolder = ref<string>('all');
|
||||
const allCount = ref(0);
|
||||
const isExpandAll = ref<boolean | undefined>(false);
|
||||
|
||||
const isExpandAll = ref<boolean | undefined>(undefined);
|
||||
function setIsExpandAll() {
|
||||
if (props.treeType === 'COLLECTION') {
|
||||
isExpandAll.value = undefined;
|
||||
} else {
|
||||
isExpandAll.value = false;
|
||||
}
|
||||
}
|
||||
watch(
|
||||
() => props.treeType,
|
||||
(val) => {
|
||||
if (val === 'COLLECTION') {
|
||||
isExpandAll.value = undefined;
|
||||
} else {
|
||||
isExpandAll.value = false;
|
||||
}
|
||||
() => {
|
||||
setIsExpandAll();
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -144,6 +146,7 @@
|
|||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
setIsExpandAll();
|
||||
initModules();
|
||||
});
|
||||
|
||||
|
|
|
@ -89,16 +89,18 @@
|
|||
|
||||
const activeFolder = ref<string>('all');
|
||||
const allCount = ref(0);
|
||||
const isExpandAll = ref<boolean | undefined>(false);
|
||||
|
||||
const isExpandAll = ref<boolean | undefined>(undefined);
|
||||
function setIsExpandAll() {
|
||||
if (props.treeType === 'COLLECTION') {
|
||||
isExpandAll.value = undefined;
|
||||
} else {
|
||||
isExpandAll.value = false;
|
||||
}
|
||||
}
|
||||
watch(
|
||||
() => props.treeType,
|
||||
(val) => {
|
||||
if (val === 'COLLECTION') {
|
||||
isExpandAll.value = undefined;
|
||||
} else {
|
||||
isExpandAll.value = false;
|
||||
}
|
||||
() => {
|
||||
setIsExpandAll();
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -149,6 +151,7 @@
|
|||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
setIsExpandAll();
|
||||
initModules();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue