fix(测试计划): 修复测试计划关联用例全选异常

This commit is contained in:
xinxin.wu 2024-10-21 15:13:03 +08:00 committed by Craftsman
parent 74dba73597
commit c268465059
2 changed files with 10 additions and 6 deletions

View File

@ -179,7 +179,6 @@
};
const res = await getModuleTreeFunc(props.getModulesApiType, props.activeTab, getModuleParams);
caseTree.value = calculateTreeCount(res, props.modulesCount);
allCount.value = props.modulesCount.all || 0;
emit('init', caseTree.value, selectedProtocols.value);
@ -212,9 +211,12 @@
*/
watch(
() => props.modulesCount,
() => {
allCount.value = props.modulesCount.all || 0;
caseTree.value = calculateTreeCount(caseTree.value, props.modulesCount);
(val) => {
if (val) {
caseTree.value = calculateTreeCount(caseTree.value, props.modulesCount);
allCount.value = val.all || 0;
emit('init', caseTree.value, selectedProtocols.value);
}
},
{
deep: true,

View File

@ -464,7 +464,9 @@
() => moduleTree.value,
(val) => {
if (val) {
selectedModuleProps.value.modulesTree = val;
if (val) {
selectedModuleProps.value.modulesTree = val;
}
}
},
{
@ -613,7 +615,7 @@
...params,
moduleIds: [],
filter: {},
keyword: keyword.value,
keyword: '',
...props.extraModuleCountParams,
protocols: associationType.value === CaseLinkEnum.API ? selectedProtocols.value : undefined,
}